@vouchfor/embeds 0.0.0-experiment.b40b077 → 0.0.0-experiment.b77073f
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/es/components/Embed/controllers/fetcher.d.ts +5 -0
- package/dist/es/components/Embed/index.d.ts +14 -15
- package/dist/es/embeds.js +187 -170
- package/dist/es/embeds.js.map +1 -1
- package/dist/es/utils/env.d.ts +3 -3
- package/dist/iife/embeds.iife.js +311 -370
- package/dist/iife/embeds.iife.js.map +1 -1
- package/package.json +4 -4
- package/src/components/Embed/Embed.stories.ts +8 -24
- package/src/components/Embed/controllers/fetcher.ts +62 -14
- package/src/components/Embed/controllers/tracking.ts +26 -33
- package/src/components/Embed/index.ts +23 -28
- package/src/utils/env.ts +3 -3
package/dist/iife/embeds.iife.js
CHANGED
@@ -1,217 +1,200 @@
|
|
1
|
-
var embeds=function(
|
1
|
+
var embeds=function(At){"use strict";var q0=Object.defineProperty;var z0=(At,xe,ye)=>xe in At?q0(At,xe,{enumerable:!0,configurable:!0,writable:!0,value:ye}):At[xe]=ye;var Ic=(At,xe,ye)=>(z0(At,typeof xe!="symbol"?xe+"":xe,ye),ye);function xe(r,t){for(var e=0;e<t.length;e++){const i=t[e];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in r)){const n=Object.getOwnPropertyDescriptor(i,s);n&&Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2019 Google LLC
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
5
|
-
*/const
|
5
|
+
*/const ye=window,_r=ye.ShadowRoot&&(ye.ShadyCSS===void 0||ye.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,kr=Symbol(),Da=new WeakMap;let Ca=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==kr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(_r&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Da.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Da.set(e,t))}return t}toString(){return this.cssText}};const Ui=r=>new Ca(typeof r=="string"?r:r+"",void 0,kr),jt=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((i,s,n)=>i+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+r[n+1],r[0]);return new Ca(e,r,kr)},Pc=(r,t)=>{_r?r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=ye.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)})},xa=_r?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Ui(e)})(r):r;/**
|
6
6
|
* @license
|
7
7
|
* Copyright 2017 Google LLC
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
9
|
-
*/var
|
9
|
+
*/var Ir;const Rs=window,Pa=Rs.trustedTypes,Oc=Pa?Pa.emptyScript:"",Oa=Rs.reactiveElementPolyfillSupport,Dr={toAttribute(r,t){switch(t){case Boolean:r=r?Oc:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},$a=(r,t)=>t!==r&&(t==t||r==r),Cr={attribute:!0,type:String,converter:Dr,reflect:!1,hasChanged:$a},xr="finalized";let gi=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=Cr){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Cr}static finalize(){if(this.hasOwnProperty(xr))return!1;this[xr]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(xa(s))}else t!==void 0&&e.push(xa(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Pc(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Cr){var s;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const a=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:Dr).toAttribute(e,i.type);this._$El=t,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const a=s.getPropertyOptions(n),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?a.converter:Dr;this._$El=n,this[n]=o.fromAttribute(e,a.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||$a)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,n)=>this[n]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};gi[xr]=!0,gi.elementProperties=new Map,gi.elementStyles=[],gi.shadowRootOptions={mode:"open"},Oa==null||Oa({ReactiveElement:gi}),((Ir=Rs.reactiveElementVersions)!==null&&Ir!==void 0?Ir:Rs.reactiveElementVersions=[]).push("1.6.2");/**
|
10
10
|
* @license
|
11
11
|
* Copyright 2017 Google LLC
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
13
|
-
*/var
|
14
|
-
\f\r]`,
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
13
|
+
*/var Pr;const _s=window,mi=_s.trustedTypes,Ma=mi?mi.createPolicy("lit-html",{createHTML:r=>r}):void 0,Or="$lit$",Be=`lit$${(Math.random()+"").slice(9)}$`,Fa="?"+Be,$c=`<${Fa}>`,qe=document,ks=()=>qe.createComment(""),Bi=r=>r===null||typeof r!="object"&&typeof r!="function",Na=Array.isArray,Mc=r=>Na(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",$r=`[
|
14
|
+
\f\r]`,Hi=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ua=/-->/g,Ba=/>/g,ze=RegExp(`>|${$r}(?:([^\\s"'>=/]+)(${$r}*=${$r}*(?:[^
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ha=/'/g,Ga=/"/g,Va=/^(?:script|style|textarea|title)$/i,Gi=Symbol.for("lit-noChange"),kt=Symbol.for("lit-nothing"),Ka=new WeakMap,Xe=qe.createTreeWalker(qe,129,null,!1);function ja(r,t){if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ma!==void 0?Ma.createHTML(t):t}const Fc=(r,t)=>{const e=r.length-1,i=[];let s,n=t===2?"<svg>":"",a=Hi;for(let o=0;o<e;o++){const l=r[o];let h,c,d=-1,u=0;for(;u<l.length&&(a.lastIndex=u,c=a.exec(l),c!==null);)u=a.lastIndex,a===Hi?c[1]==="!--"?a=Ua:c[1]!==void 0?a=Ba:c[2]!==void 0?(Va.test(c[2])&&(s=RegExp("</"+c[2],"g")),a=ze):c[3]!==void 0&&(a=ze):a===ze?c[0]===">"?(a=s??Hi,d=-1):c[1]===void 0?d=-2:(d=a.lastIndex-c[2].length,h=c[1],a=c[3]===void 0?ze:c[3]==='"'?Ga:Ha):a===Ga||a===Ha?a=ze:a===Ua||a===Ba?a=Hi:(a=ze,s=void 0);const f=a===ze&&r[o+1].startsWith("/>")?" ":"";n+=a===Hi?l+$c:d>=0?(i.push(h),l.slice(0,d)+Or+l.slice(d)+Be+f):l+Be+(d===-2?(i.push(void 0),o):f)}return[ja(r,n+(r[e]||"<?>")+(t===2?"</svg>":"")),i]};let Mr=class Dc{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,a=0;const o=t.length-1,l=this.parts,[h,c]=Fc(t,e);if(this.el=Dc.createElement(h,i),Xe.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(s=Xe.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const u of s.getAttributeNames())if(u.endsWith(Or)||u.startsWith(Be)){const f=c[a++];if(d.push(u),f!==void 0){const p=s.getAttribute(f.toLowerCase()+Or).split(Be),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:n,name:g[2],strings:p,ctor:g[1]==="."?Uc:g[1]==="?"?Hc:g[1]==="@"?Gc:Is})}else l.push({type:6,index:n})}for(const u of d)s.removeAttribute(u)}if(Va.test(s.tagName)){const d=s.textContent.split(Be),u=d.length-1;if(u>0){s.textContent=mi?mi.emptyScript:"";for(let f=0;f<u;f++)s.append(d[f],ks()),Xe.nextNode(),l.push({type:2,index:++n});s.append(d[u],ks())}}}else if(s.nodeType===8)if(s.data===Fa)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(Be,d+1))!==-1;)l.push({type:7,index:n}),d+=Be.length-1}n++}}static createElement(t,e){const i=qe.createElement("template");return i.innerHTML=t,i}};function vi(r,t,e=r,i){var s,n,a,o;if(t===Gi)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=Bi(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((n=l==null?void 0:l._$AO)===null||n===void 0||n.call(l,!1),h===void 0?l=void 0:(l=new h(r),l._$AT(r,e,i)),i!==void 0?((a=(o=e)._$Co)!==null&&a!==void 0?a:o._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=vi(r,l._$AS(r,t.values),l,i)),t}let Nc=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,n=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:qe).importNode(i,!0);Xe.currentNode=n;let a=Xe.nextNode(),o=0,l=0,h=s[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new Wa(a,a.nextSibling,this,t):h.type===1?c=new h.ctor(a,h.name,h.strings,this,t):h.type===6&&(c=new Vc(a,this,t)),this._$AV.push(c),h=s[++l]}o!==(h==null?void 0:h.index)&&(a=Xe.nextNode(),o++)}return Xe.currentNode=qe,n}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},Wa=class Cc{constructor(t,e,i,s){var n;this.type=2,this._$AH=kt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(n=s==null?void 0:s.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=vi(this,t,e),Bi(t)?t===kt||t==null||t===""?(this._$AH!==kt&&this._$AR(),this._$AH=kt):t!==this._$AH&&t!==Gi&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Mc(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==kt&&Bi(this._$AH)?this._$AA.nextSibling.data=t:this.$(qe.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=Mr.createElement(ja(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(i);else{const a=new Nc(n,this),o=a.u(this.options);a.v(i),this.$(o),this._$AH=a}}_$AC(t){let e=Ka.get(t.strings);return e===void 0&&Ka.set(t.strings,e=new Mr(t)),e}T(t){Na(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new Cc(this.k(ks()),this.k(ks()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},Is=class{constructor(t,e,i,s,n){this.type=1,this._$AH=kt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=kt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let a=!1;if(n===void 0)t=vi(this,t,e,0),a=!Bi(t)||t!==this._$AH&&t!==Gi,a&&(this._$AH=t);else{const o=t;let l,h;for(t=n[0],l=0;l<n.length-1;l++)h=vi(this,o[i+l],e,l),h===Gi&&(h=this._$AH[l]),a||(a=!Bi(h)||h!==this._$AH[l]),h===kt?t=kt:t!==kt&&(t+=(h??"")+n[l+1]),this._$AH[l]=h}a&&!s&&this.j(t)}j(t){t===kt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Uc=class extends Is{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===kt?void 0:t}};const Bc=mi?mi.emptyScript:"";let Hc=class extends Is{constructor(){super(...arguments),this.type=4}j(t){t&&t!==kt?this.element.setAttribute(this.name,Bc):this.element.removeAttribute(this.name)}},Gc=class extends Is{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=vi(this,t,e,0))!==null&&i!==void 0?i:kt)===Gi)return;const s=this._$AH,n=t===kt&&s!==kt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,a=t!==kt&&(s===kt||n);n&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}},Vc=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){vi(this,t)}};const Ya=_s.litHtmlPolyfillSupport;Ya==null||Ya(Mr,Wa),((Pr=_s.litHtmlVersions)!==null&&Pr!==void 0?Pr:_s.litHtmlVersions=[]).push("2.8.0");/**
|
16
16
|
* @license
|
17
17
|
* Copyright 2017 Google LLC
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
19
|
-
*/var
|
20
|
-
\f\r]`,
|
21
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
19
|
+
*/var Fr;const Ds=window,yi=Ds.trustedTypes,qa=yi?yi.createPolicy("lit-html",{createHTML:r=>r}):void 0,Cs="$lit$",Pe=`lit$${(Math.random()+"").slice(9)}$`,Nr="?"+Pe,Kc=`<${Nr}>`,Qe=document,Vi=()=>Qe.createComment(""),Ki=r=>r===null||typeof r!="object"&&typeof r!="function",za=Array.isArray,Xa=r=>za(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",Ur=`[
|
20
|
+
\f\r]`,ji=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Qa=/-->/g,Za=/>/g,Ze=RegExp(`>|${Ur}(?:([^\\s"'>=/]+)(${Ur}*=${Ur}*(?:[^
|
21
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ja=/'/g,to=/"/g,eo=/^(?:script|style|textarea|title)$/i,jc=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),st=jc(1),Ee=Symbol.for("lit-noChange"),It=Symbol.for("lit-nothing"),io=new WeakMap,Je=Qe.createTreeWalker(Qe,129,null,!1),so=(r,t)=>{const e=r.length-1,i=[];let s,n=t===2?"<svg>":"",a=ji;for(let l=0;l<e;l++){const h=r[l];let c,d,u=-1,f=0;for(;f<h.length&&(a.lastIndex=f,d=a.exec(h),d!==null);)f=a.lastIndex,a===ji?d[1]==="!--"?a=Qa:d[1]!==void 0?a=Za:d[2]!==void 0?(eo.test(d[2])&&(s=RegExp("</"+d[2],"g")),a=Ze):d[3]!==void 0&&(a=Ze):a===Ze?d[0]===">"?(a=s??ji,u=-1):d[1]===void 0?u=-2:(u=a.lastIndex-d[2].length,c=d[1],a=d[3]===void 0?Ze:d[3]==='"'?to:Ja):a===to||a===Ja?a=Ze:a===Qa||a===Za?a=ji:(a=Ze,s=void 0);const p=a===Ze&&r[l+1].startsWith("/>")?" ":"";n+=a===ji?h+Kc:u>=0?(i.push(c),h.slice(0,u)+Cs+h.slice(u)+Pe+p):h+Pe+(u===-2?(i.push(void 0),l):p)}const o=n+(r[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[qa!==void 0?qa.createHTML(o):o,i]};class Wi{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,a=0;const o=t.length-1,l=this.parts,[h,c]=so(t,e);if(this.el=Wi.createElement(h,i),Je.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(s=Je.nextNode())!==null&&l.length<o;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const u of s.getAttributeNames())if(u.endsWith(Cs)||u.startsWith(Pe)){const f=c[a++];if(d.push(u),f!==void 0){const p=s.getAttribute(f.toLowerCase()+Cs).split(Pe),g=/([.?@])?(.*)/.exec(f);l.push({type:1,index:n,name:g[2],strings:p,ctor:g[1]==="."?no:g[1]==="?"?ao:g[1]==="@"?oo:Yi})}else l.push({type:6,index:n})}for(const u of d)s.removeAttribute(u)}if(eo.test(s.tagName)){const d=s.textContent.split(Pe),u=d.length-1;if(u>0){s.textContent=yi?yi.emptyScript:"";for(let f=0;f<u;f++)s.append(d[f],Vi()),Je.nextNode(),l.push({type:2,index:++n});s.append(d[u],Vi())}}}else if(s.nodeType===8)if(s.data===Nr)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(Pe,d+1))!==-1;)l.push({type:7,index:n}),d+=Pe.length-1}n++}}static createElement(t,e){const i=Qe.createElement("template");return i.innerHTML=t,i}}function ti(r,t,e=r,i){var s,n,a,o;if(t===Ee)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=Ki(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((n=l==null?void 0:l._$AO)===null||n===void 0||n.call(l,!1),h===void 0?l=void 0:(l=new h(r),l._$AT(r,e,i)),i!==void 0?((a=(o=e)._$Co)!==null&&a!==void 0?a:o._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=ti(r,l._$AS(r,t.values),l,i)),t}let ro=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,n=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:Qe).importNode(i,!0);Je.currentNode=n;let a=Je.nextNode(),o=0,l=0,h=s[0];for(;h!==void 0;){if(o===h.index){let c;h.type===2?c=new xs(a,a.nextSibling,this,t):h.type===1?c=new h.ctor(a,h.name,h.strings,this,t):h.type===6&&(c=new lo(a,this,t)),this._$AV.push(c),h=s[++l]}o!==(h==null?void 0:h.index)&&(a=Je.nextNode(),o++)}return Je.currentNode=Qe,n}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},xs=class xc{constructor(t,e,i,s){var n;this.type=2,this._$AH=It,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(n=s==null?void 0:s.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ti(this,t,e),Ki(t)?t===It||t==null||t===""?(this._$AH!==It&&this._$AR(),this._$AH=It):t!==this._$AH&&t!==Ee&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Xa(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==It&&Ki(this._$AH)?this._$AA.nextSibling.data=t:this.$(Qe.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=Wi.createElement(s.h,this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(i);else{const a=new ro(n,this),o=a.u(this.options);a.v(i),this.$(o),this._$AH=a}}_$AC(t){let e=io.get(t.strings);return e===void 0&&io.set(t.strings,e=new Wi(t)),e}T(t){za(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new xc(this.k(Vi()),this.k(Vi()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}};class Yi{constructor(t,e,i,s,n){this.type=1,this._$AH=It,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=It}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let a=!1;if(n===void 0)t=ti(this,t,e,0),a=!Ki(t)||t!==this._$AH&&t!==Ee,a&&(this._$AH=t);else{const o=t;let l,h;for(t=n[0],l=0;l<n.length-1;l++)h=ti(this,o[i+l],e,l),h===Ee&&(h=this._$AH[l]),a||(a=!Ki(h)||h!==this._$AH[l]),h===It?t=It:t!==It&&(t+=(h??"")+n[l+1]),this._$AH[l]=h}a&&!s&&this.j(t)}j(t){t===It?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class no extends Yi{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===It?void 0:t}}const Wc=yi?yi.emptyScript:"";class ao extends Yi{constructor(){super(...arguments),this.type=4}j(t){t&&t!==It?this.element.setAttribute(this.name,Wc):this.element.removeAttribute(this.name)}}let oo=class extends Yi{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=ti(this,t,e,0))!==null&&i!==void 0?i:It)===Ee)return;const s=this._$AH,n=t===It&&s!==It||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,a=t!==It&&(s===It||n);n&&this.element.removeEventListener(this.name,this,s),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}};class lo{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){ti(this,t)}}const Yc={O:Cs,P:Pe,A:Nr,C:1,M:so,L:ro,D:Xa,R:ti,I:xs,V:Yi,H:ao,N:oo,U:no,F:lo},ho=Ds.litHtmlPolyfillSupport;ho==null||ho(Wi,xs),((Fr=Ds.litHtmlVersions)!==null&&Fr!==void 0?Fr:Ds.litHtmlVersions=[]).push("2.7.4");const qc=(r,t,e)=>{var i,s;const n=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let a=n._$litPart$;if(a===void 0){const o=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:null;n._$litPart$=a=new xs(t.insertBefore(Vi(),o),o,void 0,e??{})}return a._$AI(r),a};/**
|
22
22
|
* @license
|
23
23
|
* Copyright 2017 Google LLC
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
25
|
-
*/var
|
25
|
+
*/var Br,Hr;let Ei=class extends gi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=qc(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return Ee}};Ei.finalized=!0,Ei._$litElement$=!0,(Br=globalThis.litElementHydrateSupport)===null||Br===void 0||Br.call(globalThis,{LitElement:Ei});const co=globalThis.litElementPolyfillSupport;co==null||co({LitElement:Ei}),((Hr=globalThis.litElementVersions)!==null&&Hr!==void 0?Hr:globalThis.litElementVersions=[]).push("3.3.2");/**
|
26
26
|
* @license
|
27
27
|
* Copyright 2017 Google LLC
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
29
|
-
*/const
|
29
|
+
*/const zc=r=>t=>typeof t=="function"?((e,i)=>(customElements.define(e,i),i))(r,t):((e,i)=>{const{kind:s,elements:n}=i;return{kind:s,elements:n,finisher(a){customElements.define(e,a)}}})(r,t);/**
|
30
30
|
* @license
|
31
31
|
* Copyright 2017 Google LLC
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
33
|
-
*/const
|
33
|
+
*/const Xc=(r,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,r)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,r)}},Qc=(r,t,e)=>{t.constructor.createProperty(e,r)};function j(r){return(t,e)=>e!==void 0?Qc(r,t,e):Xc(r,t)}/**
|
34
34
|
* @license
|
35
35
|
* Copyright 2017 Google LLC
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
37
|
-
*/function
|
37
|
+
*/function Wt(r){return j({...r,state:!0})}/**
|
38
38
|
* @license
|
39
39
|
* Copyright 2021 Google LLC
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
41
|
-
*/var
|
41
|
+
*/var Gr;((Gr=window.HTMLSlotElement)===null||Gr===void 0?void 0:Gr.prototype.assignedElements)!=null;/**
|
42
42
|
* @license
|
43
43
|
* Copyright 2018 Google LLC
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
45
|
-
*/const
|
45
|
+
*/const uo=r=>r??kt;/**
|
46
46
|
* @license
|
47
47
|
* Copyright 2020 Google LLC
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
49
|
-
*/const
|
49
|
+
*/const Zc=r=>r.strings===void 0;/**
|
50
50
|
* @license
|
51
51
|
* Copyright 2017 Google LLC
|
52
52
|
* SPDX-License-Identifier: BSD-3-Clause
|
53
|
-
*/const
|
53
|
+
*/const Jc={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},td=r=>(...t)=>({_$litDirective$:r,values:t});let ed=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
|
54
54
|
* @license
|
55
55
|
* Copyright 2017 Google LLC
|
56
56
|
* SPDX-License-Identifier: BSD-3-Clause
|
57
|
-
*/const
|
57
|
+
*/const qi=(r,t)=>{var e,i;const s=r._$AN;if(s===void 0)return!1;for(const n of s)(i=(e=n)._$AO)===null||i===void 0||i.call(e,t,!1),qi(n,t);return!0},Ps=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},fo=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),rd(t)}};function id(r){this._$AN!==void 0?(Ps(this),this._$AM=r,fo(this)):this._$AM=r}function sd(r,t=!1,e=0){const i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)qi(i[n],!1),Ps(i[n]);else i!=null&&(qi(i,!1),Ps(i));else qi(this,r)}const rd=r=>{var t,e,i,s;r.type==Jc.CHILD&&((t=(i=r)._$AP)!==null&&t!==void 0||(i._$AP=sd),(e=(s=r)._$AQ)!==null&&e!==void 0||(s._$AQ=id))};let nd=class extends ed{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),fo(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)===null||i===void 0||i.call(this):(s=this.disconnected)===null||s===void 0||s.call(this)),e&&(qi(this,t),Ps(this))}setValue(t){if(Zc(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};/**
|
58
58
|
* @license
|
59
59
|
* Copyright 2020 Google LLC
|
60
60
|
* SPDX-License-Identifier: BSD-3-Clause
|
61
|
-
*/const
|
61
|
+
*/const po=()=>new ad;let ad=class{};const Vr=new WeakMap,go=td(class extends nd{render(r){return kt}update(r,[t]){var e;const i=t!==this.G;return i&&this.G!==void 0&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.G=t,this.dt=(e=r.options)===null||e===void 0?void 0:e.host,this.ot(this.lt=r.element)),kt}ot(r){var t;if(typeof this.G=="function"){const e=(t=this.dt)!==null&&t!==void 0?t:globalThis;let i=Vr.get(e);i===void 0&&(i=new WeakMap,Vr.set(e,i)),i.get(this.G)!==void 0&&this.G.call(this.dt,void 0),i.set(this.G,r),r!==void 0&&this.G.call(this.dt,r)}else this.G.value=r}get rt(){var r,t,e;return typeof this.G=="function"?(t=Vr.get((r=this.dt)!==null&&r!==void 0?r:globalThis))===null||t===void 0?void 0:t.get(this.G):(e=this.G)===null||e===void 0?void 0:e.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});function od(r,t,e){function i(s){e.dispatchEvent(new CustomEvent(s.type,s))}return t.addEventListener(r,i),()=>{t.removeEventListener(r,i)}}class ld{constructor(t,e){this._events=[],this._cleanup=[],this._forwardElementRef=po(),this.host=t,this._events=e,t.addController(this)}register(){return go(this._forwardElementRef)}hostConnected(){requestAnimationFrame(()=>{this._events.forEach(t=>{this._forwardElementRef.value&&this._cleanup.push(od(t,this._forwardElementRef.value,this.host))})})}hostDisconnected(){this._cleanup.forEach(t=>{t()}),this._cleanup=[]}}/**
|
62
62
|
* @license
|
63
63
|
* Copyright 2019 Google LLC
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
65
|
-
*/const
|
65
|
+
*/const Os=globalThis,Kr=Os.ShadowRoot&&(Os.ShadyCSS===void 0||Os.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,mo=Symbol(),vo=new WeakMap;let hd=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==mo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Kr&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=vo.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&vo.set(e,t))}return t}toString(){return this.cssText}};const cd=r=>new hd(typeof r=="string"?r:r+"",void 0,mo),dd=(r,t)=>{if(Kr)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),s=Os.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,r.appendChild(i)}},yo=Kr?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return cd(e)})(r):r;/**
|
66
66
|
* @license
|
67
67
|
* Copyright 2017 Google LLC
|
68
68
|
* SPDX-License-Identifier: BSD-3-Clause
|
69
|
-
*/const{is:
|
69
|
+
*/const{is:ud,defineProperty:fd,getOwnPropertyDescriptor:pd,getOwnPropertyNames:gd,getOwnPropertySymbols:md,getPrototypeOf:vd}=Object,He=globalThis,Eo=He.trustedTypes,yd=Eo?Eo.emptyScript:"",jr=He.reactiveElementPolyfillSupport,zi=(r,t)=>r,Wr={toAttribute(r,t){switch(t){case Boolean:r=r?yd:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Yr=(r,t)=>!ud(r,t),bo={attribute:!0,type:String,converter:Wr,reflect:!1,hasChanged:Yr};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),He.litPropertyMetadata??(He.litPropertyMetadata=new WeakMap);class Xi extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=bo){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);s!==void 0&&fd(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:n}=pd(this.prototype,t)??{get(){return this[e]},set(a){this[e]=a}};return{get(){return s==null?void 0:s.call(this)},set(a){const o=s==null?void 0:s.call(this);n.call(this,a),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??bo}static _$Ei(){if(this.hasOwnProperty(zi("elementProperties")))return;const t=vd(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(zi("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(zi("properties"))){const e=this.properties,i=[...gd(e),...md(e)];for(const s of i)this.createProperty(s,e[s])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,s]of e)this.elementProperties.set(i,s)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const s=this._$Eu(e,i);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(yo(s))}else t!==void 0&&e.push(yo(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$Eg=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$ES??(this._$ES=[])).push(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$ES)==null||e.splice(this._$ES.indexOf(t)>>>0,1)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return dd(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e){var n;const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(s!==void 0&&i.reflect===!0){const a=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:Wr).toAttribute(e,i.type);this._$Em=t,a==null?this.removeAttribute(s):this.setAttribute(s,a),this._$Em=null}}_$AK(t,e){var n;const i=this.constructor,s=i._$Eh.get(t);if(s!==void 0&&this._$Em!==s){const a=i.getPropertyOptions(s),o=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)==null?void 0:n.fromAttribute)!==void 0?a.converter:Wr;this._$Em=s,this[s]=o.fromAttribute(e,a.type),this._$Em=null}}requestUpdate(t,e,i,s=!1,n){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??Yr)(s?n:this[t],e))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$Eg=this._$EP())}C(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$EP(){this.isUpdatePending=!0;try{await this._$Eg}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this._$Ep){for(const[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[n,a]of s)a.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.C(n,this[n],a)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$ES)==null||i.forEach(s=>{var n;return(n=s.hostUpdate)==null?void 0:n.call(s)}),this.update(e)):this._$ET()}catch(s){throw t=!1,this._$ET(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)==null||e.forEach(i=>{var s;return(s=i.hostUpdated)==null?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Eg}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EO(e,this[e]))),this._$ET()}updated(t){}firstUpdated(t){}}Xi.elementStyles=[],Xi.shadowRootOptions={mode:"open"},Xi[zi("elementProperties")]=new Map,Xi[zi("finalized")]=new Map,jr==null||jr({ReactiveElement:Xi}),(He.reactiveElementVersions??(He.reactiveElementVersions=[])).push("2.0.0");/**
|
70
70
|
* @license
|
71
71
|
* Copyright 2017 Google LLC
|
72
72
|
* SPDX-License-Identifier: BSD-3-Clause
|
73
|
-
*/const Gd=Symbol();let Oo=class{get taskComplete(){return this.t||(this.status===1?this.t=new Promise((e,t)=>{this.i=e,this.o=t}):this.status===3?this.t=Promise.reject(this.h):this.t=Promise.resolve(this.l)),this.t}constructor(e,t,i){var n;this.u=0,this.status=0,(this.p=e).addController(this);const s=typeof t=="object"?t:{task:t,args:i};this._=s.task,this.v=s.args,this.j=s.argsEqual??Vd,this.m=s.onComplete,this.g=s.onError,this.autoRun=s.autoRun??!0,"initialValue"in s&&(this.l=s.initialValue,this.status=2,this.k=(n=this.A)==null?void 0:n.call(this))}hostUpdate(){this.autoRun===!0&&this.O()}hostUpdated(){this.autoRun==="afterUpdate"&&this.O()}A(){if(this.v===void 0)return;const e=this.v();if(!Array.isArray(e))throw Error("The args function must return an array");return e}async O(){const e=this.A(),t=this.k;this.k=e,e===t||e===void 0||t!==void 0&&this.j(t,e)||await this.run(e)}async run(e){var a,o,l,c,h;let t,i;e??(e=this.A()),this.k=e,this.status===1?(a=this.T)==null||a.abort():(this.t=void 0,this.i=void 0,this.o=void 0),this.status=1,this.autoRun==="afterUpdate"?queueMicrotask(()=>this.p.requestUpdate()):this.p.requestUpdate();const s=++this.u;this.T=new AbortController;let n=!1;try{t=await this._(e,{signal:this.T.signal})}catch(d){n=!0,i=d}if(this.u===s){if(t===Gd)this.status=0;else{if(n===!1){try{(o=this.m)==null||o.call(this,t)}catch{}this.status=2,(l=this.i)==null||l.call(this,t)}else{try{(c=this.g)==null||c.call(this,i)}catch{}this.status=3,(h=this.o)==null||h.call(this,i)}this.l=t,this.h=i}this.p.requestUpdate()}}abort(e){var t;this.status===1&&((t=this.T)==null||t.abort(e))}get value(){return this.l}get error(){return this.h}render(e){var t,i,s,n;switch(this.status){case 0:return(t=e.initial)==null?void 0:t.call(e);case 1:return(i=e.pending)==null?void 0:i.call(e);case 2:return(s=e.complete)==null?void 0:s.call(e,this.value);case 3:return(n=e.error)==null?void 0:n.call(e,this.error);default:throw Error("Unexpected status: "+this.status)}}};const Vd=(r,e)=>r===e||r.length===e.length&&r.every((t,i)=>!sn(t,e[i])),rn="https://vouchfor.com",jd="https://d2rxhdlm2q91uk.cloudfront.net",zd="https://d1ix11aj5kfygl.cloudfront.net",Kd="https://d157jlwnudd93d.cloudfront.net",Wd="https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev",Yd="https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging",Xd="https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod",qd="http://localhost:6060/v1",Zd="https://embed-staging.vouchfor.com/v1",Jd="https://embed.vouchfor.com/v1",Qd="https://dev.vouchfor.com",_d="https://staging.vouchfor.com",$d="https://app.vouchfor.com";function nn(r){if(!["dev","staging","prod"].includes(r))throw new Error(`Unknown environment: ${r}`);if(r==="dev")return{marketingUrl:rn,videoUrl:jd,publicApiUrl:Wd,embedApiUrl:qd,publicRecorderUrl:Qd};if(r==="staging")return{marketingUrl:rn,videoUrl:zd,publicApiUrl:Yd,embedApiUrl:Zd,publicRecorderUrl:_d};if(r==="prod")return{marketingUrl:rn,videoUrl:Kd,publicApiUrl:Xd,embedApiUrl:Jd,publicRecorderUrl:$d}}class eu{constructor(e){this.host=e,new Oo(this.host,async([t,i,s])=>{var n,a;try{if(s){e.fetching=!0;const{embedApiUrl:o}=nn(t),l=await fetch(`${o}/v1/vouches/${s}`,{method:"GET",headers:[["X-Api-Key",i]]}).then(c=>c.json());e.data=l,e.instance=(a=(n=l==null?void 0:l.settings)==null?void 0:n.template)==null?void 0:a.instance}}finally{e.fetching=!1}},()=>[e.env,e.apiKey,e.vouchHashId])}}let Fs;const tu=new Uint8Array(16);function iu(){if(!Fs&&(Fs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fs(tu)}const De=[];for(let r=0;r<256;++r)De.push((r+256).toString(16).slice(1));function su(r,e=0){return De[r[e+0]]+De[r[e+1]]+De[r[e+2]]+De[r[e+3]]+"-"+De[r[e+4]]+De[r[e+5]]+"-"+De[r[e+6]]+De[r[e+7]]+"-"+De[r[e+8]]+De[r[e+9]]+"-"+De[r[e+10]]+De[r[e+11]]+De[r[e+12]]+De[r[e+13]]+De[r[e+14]]+De[r[e+15]]}const Mo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ji(r,e,t){if(Mo.randomUUID&&!e&&!r)return Mo.randomUUID();r=r||{};const i=r.random||(r.rng||iu)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(let s=0;s<16;++s)e[t+s]=i[s];return e}return su(i)}const ru=2e3;class nu{constructor(e){this._tabId=void 0,this._clientId=void 0,this._visitorId=void 0,this._hasPlayed=!1,this._hasLoaded={},this._answersViewed={},this._streamedTime={},this._streamedPrevTimestamp={},this._createVisitor=t=>{var s,n;const{publicApiUrl:i}=nn(this.host.env);return(n=(s=window.localStorage)==null?void 0:s.setItem)==null||n.call(s,"vouch-uid-visitor",t),navigator.sendBeacon(`${i}/api/visitor`,JSON.stringify({visitorId:t})),t},this._getReportingMetadata=()=>{var n,a;const[t,i]=((a=(n=Intl.DateTimeFormat().resolvedOptions().timeZone)==null?void 0:n.split)==null?void 0:a.call(n,"/"))??[],s={};return[...new URLSearchParams(location.search).entries()].forEach(([o,l])=>{if(/utm/.test(o)){const c=o.toLowerCase().replace(/[-_][a-z0-9]/g,h=>h.slice(-1).toUpperCase());s[c]=l}}),{source:this.host.trackingSource,time:new Date,region:i,country:t,screenHeight:window.screen.height,screenWidth:window.screen.width,referrer:document.referrer,currentUrl:location.href,...s}},this._sendTrackingEvent=(t,i)=>{const{publicApiUrl:s}=nn(this.host.env),{client:n,tab:a,request:o,visitor:l}=this._getUids();this.host.enableTracking&&this.host.trackingSource&&navigator.sendBeacon(`${s}/api/events`,JSON.stringify({event:t,payload:i,context:{"x-uid-client":n,"x-uid-tab":a,"x-uid-request":o,"x-uid-visitor":l,"x-reporting-metadata":this._getReportingMetadata()}}))},this._handleVouchLoaded=({detail:t})=>{t&&(this._hasLoaded[t]||(this._sendTrackingEvent("VOUCH_LOADED",{vouchId:t}),this._hasLoaded[t]=!0))},this._handlePlay=()=>{const t=this._findVouchId();t&&(this._hasPlayed||(this._sendTrackingEvent("VIDEO_PLAYED",{vouchId:t,streamStart:this.host.currentTime}),this._hasPlayed=!0))},this._handleVideoPlay=({detail:{id:t,node:i}})=>{const s=this._findVouchId();s&&(this._answersViewed[t]||(this._sendTrackingEvent("VOUCH_RESPONSE_VIEWED",{vouchId:s,answerId:t}),this._answersViewed[t]=!0),this._streamedTime[t]=i.currentTime,this._streamedPrevTimestamp[t]=Date.now())},this._handleVideoTimeUpdate=({detail:{id:t,node:i}})=>{var a,o;const s=this._findVouchId();if(!s)return;const n=Date.now();!this.host.paused&&t===((o=(a=this.host.scene)==null?void 0:a.video)==null?void 0:o.id)&&n-this._streamedPrevTimestamp[t]>ru&&(this._sendTrackingEvent("VIDEO_STREAMED",{vouchId:s,answerId:t,streamStart:this._streamedTime[t],streamEnd:i.currentTime}),this._streamedTime[t]=i.currentTime,this._streamedPrevTimestamp[t]=n)},this._handleVideoPause=({detail:{id:t,node:i}})=>{const s=this._findVouchId();s&&(this._sendTrackingEvent("VIDEO_STREAMED",{vouchId:s,answerId:t,streamStart:this._streamedTime[t],streamEnd:i.currentTime}),delete this._streamedTime[t],delete this._streamedPrevTimestamp[t])},this.host=e,e.addController(this)}_findVouchId(){if(this.host.data)return"uuid"in this.host.data?this.host.data.uuid:this.host.data.id}_getUids(){var n,a,o,l,c,h,d,u,f,p,m,g;if(typeof window>"u")return{client:null,tab:null,request:Ji()};const e=this._visitorId||((a=(n=window.localStorage)==null?void 0:n.getItem)==null?void 0:a.call(n,"vouch-uid-visitor"))||this._createVisitor(Ji()),t=this._clientId||((l=(o=window.localStorage)==null?void 0:o.getItem)==null?void 0:l.call(o,"vouch-uid-client"))||Ji(),i=this._tabId||((h=(c=window.sessionStorage)==null?void 0:c.getItem)==null?void 0:h.call(c,"vouch-uid-tab"))||Ji(),s=Ji();return e!==this._visitorId&&(this._visitorId=e,(u=(d=window.localStorage)==null?void 0:d.setItem)==null||u.call(d,"vouch-uid-visitor",e)),t!==this._clientId&&(this._clientId=t,(p=(f=window.localStorage)==null?void 0:f.setItem)==null||p.call(f,"vouch-uid-client",t)),i!==this._tabId&&(this._tabId=i,(g=(m=window.sessionStorage)==null?void 0:m.setItem)==null||g.call(m,"vouch-uid-tab",i)),{client:t,tab:i,request:s,visitor:e}}hostConnected(){this.host.enableTracking&&this.host.trackingSource&&requestAnimationFrame(()=>{var e,t,i,s;this.host.addEventListener("vouch:loaded",this._handleVouchLoaded),(e=this.host.mediaPlayer)==null||e.addEventListener("play",this._handlePlay),(t=this.host.mediaPlayer)==null||t.addEventListener("video:play",this._handleVideoPlay),(i=this.host.mediaPlayer)==null||i.addEventListener("video:pause",this._handleVideoPause),(s=this.host.mediaPlayer)==null||s.addEventListener("video:timeupdate",this._handleVideoTimeUpdate)})}hostDisconnected(){var e,t,i,s;this.host.enableTracking&&this.host.trackingSource&&(this.host.removeEventListener("vouch:loaded",this._handleVouchLoaded),(e=this.host.mediaPlayer)==null||e.removeEventListener("play",this._handlePlay),(t=this.host.mediaPlayer)==null||t.removeEventListener("video:play",this._handleVideoPlay),(i=this.host.mediaPlayer)==null||i.removeEventListener("video:pause",this._handleVideoPause),(s=this.host.mediaPlayer)==null||s.removeEventListener("video:timeupdate",this._handleVideoTimeUpdate))}}function au(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Fo={exports:{}};(function(r,e){(function(t){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,c,h){if(h=h||{},l=l.trim(),c=c.trim(),!c){if(!h.alwaysNormalize)return l;var d=o.parseURL(l);if(!d)throw new Error("Error trying to parse base URL.");return d.path=o.normalizePath(d.path),o.buildURLFromParts(d)}var u=o.parseURL(c);if(!u)throw new Error("Error trying to parse relative URL.");if(u.scheme)return h.alwaysNormalize?(u.path=o.normalizePath(u.path),o.buildURLFromParts(u)):c;var f=o.parseURL(l);if(!f)throw new Error("Error trying to parse base URL.");if(!f.netLoc&&f.path&&f.path[0]!=="/"){var p=s.exec(f.path);f.netLoc=p[1],f.path=p[2]}f.netLoc&&!f.path&&(f.path="/");var m={scheme:f.scheme,netLoc:u.netLoc,path:null,params:u.params,query:u.query,fragment:u.fragment};if(!u.netLoc&&(m.netLoc=f.netLoc,u.path[0]!=="/"))if(!u.path)m.path=f.path,u.params||(m.params=f.params,u.query||(m.query=f.query));else{var g=f.path,x=g.substring(0,g.lastIndexOf("/")+1)+u.path;m.path=o.normalizePath(x)}return m.path===null&&(m.path=h.alwaysNormalize?o.normalizePath(u.path):u.path),o.buildURLFromParts(m)},parseURL:function(l){var c=i.exec(l);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(n,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};r.exports=o})()})(Fo);var an=Fo.exports;function No(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,i)}return t}function Ve(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?No(Object(t),!0).forEach(function(i){ou(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):No(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}function ou(r,e,t){return e=cu(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Se(){return Se=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},Se.apply(this,arguments)}function lu(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function cu(r){var e=lu(r,"string");return typeof e=="symbol"?e:String(e)}const j=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)};let v=function(r){return r.MEDIA_ATTACHING="hlsMediaAttaching",r.MEDIA_ATTACHED="hlsMediaAttached",r.MEDIA_DETACHING="hlsMediaDetaching",r.MEDIA_DETACHED="hlsMediaDetached",r.BUFFER_RESET="hlsBufferReset",r.BUFFER_CODECS="hlsBufferCodecs",r.BUFFER_CREATED="hlsBufferCreated",r.BUFFER_APPENDING="hlsBufferAppending",r.BUFFER_APPENDED="hlsBufferAppended",r.BUFFER_EOS="hlsBufferEos",r.BUFFER_FLUSHING="hlsBufferFlushing",r.BUFFER_FLUSHED="hlsBufferFlushed",r.MANIFEST_LOADING="hlsManifestLoading",r.MANIFEST_LOADED="hlsManifestLoaded",r.MANIFEST_PARSED="hlsManifestParsed",r.LEVEL_SWITCHING="hlsLevelSwitching",r.LEVEL_SWITCHED="hlsLevelSwitched",r.LEVEL_LOADING="hlsLevelLoading",r.LEVEL_LOADED="hlsLevelLoaded",r.LEVEL_UPDATED="hlsLevelUpdated",r.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",r.LEVELS_UPDATED="hlsLevelsUpdated",r.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",r.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",r.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",r.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",r.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",r.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",r.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",r.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",r.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",r.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",r.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",r.CUES_PARSED="hlsCuesParsed",r.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",r.INIT_PTS_FOUND="hlsInitPtsFound",r.FRAG_LOADING="hlsFragLoading",r.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",r.FRAG_LOADED="hlsFragLoaded",r.FRAG_DECRYPTED="hlsFragDecrypted",r.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",r.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",r.FRAG_PARSING_METADATA="hlsFragParsingMetadata",r.FRAG_PARSED="hlsFragParsed",r.FRAG_BUFFERED="hlsFragBuffered",r.FRAG_CHANGED="hlsFragChanged",r.FPS_DROP="hlsFpsDrop",r.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",r.ERROR="hlsError",r.DESTROYING="hlsDestroying",r.KEY_LOADING="hlsKeyLoading",r.KEY_LOADED="hlsKeyLoaded",r.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",r.BACK_BUFFER_REACHED="hlsBackBufferReached",r}({}),K=function(r){return r.NETWORK_ERROR="networkError",r.MEDIA_ERROR="mediaError",r.KEY_SYSTEM_ERROR="keySystemError",r.MUX_ERROR="muxError",r.OTHER_ERROR="otherError",r}({}),D=function(r){return r.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",r.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",r.KEY_SYSTEM_NO_SESSION="keySystemNoSession",r.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",r.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",r.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",r.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",r.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",r.MANIFEST_LOAD_ERROR="manifestLoadError",r.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",r.MANIFEST_PARSING_ERROR="manifestParsingError",r.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",r.LEVEL_EMPTY_ERROR="levelEmptyError",r.LEVEL_LOAD_ERROR="levelLoadError",r.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",r.LEVEL_PARSING_ERROR="levelParsingError",r.LEVEL_SWITCH_ERROR="levelSwitchError",r.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",r.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",r.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",r.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",r.FRAG_LOAD_ERROR="fragLoadError",r.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",r.FRAG_DECRYPT_ERROR="fragDecryptError",r.FRAG_PARSING_ERROR="fragParsingError",r.FRAG_GAP="fragGap",r.REMUX_ALLOC_ERROR="remuxAllocError",r.KEY_LOAD_ERROR="keyLoadError",r.KEY_LOAD_TIMEOUT="keyLoadTimeOut",r.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",r.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",r.BUFFER_APPEND_ERROR="bufferAppendError",r.BUFFER_APPENDING_ERROR="bufferAppendingError",r.BUFFER_STALLED_ERROR="bufferStalledError",r.BUFFER_FULL_ERROR="bufferFullError",r.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",r.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",r.INTERNAL_EXCEPTION="internalException",r.INTERNAL_ABORTED="aborted",r.UNKNOWN="unknown",r}({});const Qt=function(){},on={trace:Qt,debug:Qt,log:Qt,warn:Qt,info:Qt,error:Qt};let Qi=on;function hu(r){const e=self.console[r];return e?e.bind(self.console,`[${r}] >`):Qt}function du(r,...e){e.forEach(function(t){Qi[t]=r[t]?r[t].bind(r):hu(t)})}function uu(r,e){if(self.console&&r===!0||typeof r=="object"){du(r,"debug","log","info","warn","error");try{Qi.log(`Debug logs enabled for "${e}" in hls.js version 1.4.12`)}catch{Qi=on}}else Qi=on}const S=Qi,fu=/^(\d+)x(\d+)$/,Uo=/(.+?)=(".*?"|.*?)(?:,|$)/g;class ue{constructor(e){typeof e=="string"&&(e=ue.parseAttrList(e));for(const t in e)e.hasOwnProperty(t)&&(t.substring(0,2)==="X-"&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(t)),this[t]=e[t])}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 i=new Uint8Array(t.length/2);for(let s=0;s<t.length/2;s++)i[s]=parseInt(t.slice(s*2,s*2+2),16);return i}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 i=this[e];return i?parseFloat(i):t}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const t=fu.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const i={},s='"';for(Uo.lastIndex=0;(t=Uo.exec(e))!==null;){let n=t[2];n.indexOf(s)===0&&n.lastIndexOf(s)===n.length-1&&(n=n.slice(1,-1));const a=t[1].trim();i[a]=n}return i}}function pu(r){return r!=="ID"&&r!=="CLASS"&&r!=="START-DATE"&&r!=="DURATION"&&r!=="END-DATE"&&r!=="END-ON-NEXT"}function mu(r){return r==="SCTE35-OUT"||r==="SCTE35-IN"}class Bo{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){S.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=Se(new ue({}),i,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const i=new Date(this.attr["END-DATE"]);j(i.getTime())&&(this._endDate=i)}}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(j(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&&j(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class Ns{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 ne={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class Ho{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[ne.AUDIO]:null,[ne.VIDEO]:null,[ne.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const i=e.split("@",2),s=[];i.length===1?s[0]=t?t.byteRangeEndOffset:0:s[0]=parseInt(i[1]),s[1]=parseInt(i[0])+s[0],this._byteRange=s}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=an.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class ln extends Ho{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 Ns,this.urlId=0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 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 i=Object.keys(this.levelkeys);if(i.length===1)return this._decryptdata=this.levelkeys[i[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!j(this.programDateTime))return null;const e=j(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),i=t.length;if(i>1||i===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,i,s,n,a=!1){const{elementaryStreams:o}=this,l=o[e];if(!l){o[e]={startPTS:t,endPTS:i,startDTS:s,endDTS:n,partial:a};return}l.startPTS=Math.min(l.startPTS,t),l.endPTS=Math.max(l.endPTS,i),l.startDTS=Math.min(l.startDTS,s),l.endDTS=Math.max(l.endDTS,n)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[ne.AUDIO]=null,e[ne.VIDEO]=null,e[ne.AUDIOVIDEO]=null}}class gu extends Ho{constructor(e,t,i,s,n){super(i),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 Ns,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=s;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,n),n&&(this.fragOffset=n.fragOffset+n.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 vu=10;class yu{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,i=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!i||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&i>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?j(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||vu}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 cn(r){return Uint8Array.from(atob(r),e=>e.charCodeAt(0))}function xu(r){const e=Go(r).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Au(r){const e=function(i,s,n){const a=i[s];i[s]=i[n],i[n]=a};e(r,0,3),e(r,1,2),e(r,4,5),e(r,6,7)}function bu(r){const e=r.split(":");let t=null;if(e[0]==="data"&&e.length===2){const i=e[1].split(";"),s=i[i.length-1].split(",");if(s.length===2){const n=s[0]==="base64",a=s[1];n?(i.splice(-1,1),t=cn(a)):t=xu(a)}}return t}function Go(r){return Uint8Array.from(unescape(encodeURIComponent(r)),e=>e.charCodeAt(0))}var fe={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},je={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Vo(r){switch(r){case je.FAIRPLAY:return fe.FAIRPLAY;case je.PLAYREADY:return fe.PLAYREADY;case je.WIDEVINE:return fe.WIDEVINE;case je.CLEARKEY:return fe.CLEARKEY}}var jo={WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function Tu(r){if(r===jo.WIDEVINE)return fe.WIDEVINE}function zo(r){switch(r){case fe.FAIRPLAY:return je.FAIRPLAY;case fe.PLAYREADY:return je.PLAYREADY;case fe.WIDEVINE:return je.WIDEVINE;case fe.CLEARKEY:return je.CLEARKEY}}function hn(r){const{drmSystems:e,widevineLicenseUrl:t}=r,i=e?[fe.FAIRPLAY,fe.WIDEVINE,fe.PLAYREADY,fe.CLEARKEY].filter(s=>!!e[s]):[];return!i[fe.WIDEVINE]&&t&&i.push(fe.WIDEVINE),i}const Ko=function(){return typeof self<"u"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Eu(r,e,t,i){let s;switch(r){case fe.FAIRPLAY:s=["cenc","sinf"];break;case fe.WIDEVINE:case fe.PLAYREADY:s=["cenc"];break;case fe.CLEARKEY:s=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${r}`)}return Su(s,e,t,i)}function Su(r,e,t,i){return[{initDataTypes:r,persistentState:i.persistentState||"not-allowed",distinctiveIdentifier:i.distinctiveIdentifier||"not-allowed",sessionTypes:i.sessionTypes||[i.sessionType||"temporary"],audioCapabilities:e.map(n=>({contentType:`audio/mp4; codecs="${n}"`,robustness:i.audioRobustness||"",encryptionScheme:i.audioEncryptionScheme||null})),videoCapabilities:t.map(n=>({contentType:`video/mp4; codecs="${n}"`,robustness:i.videoRobustness||"",encryptionScheme:i.videoEncryptionScheme||null}))}]}function _t(r,e,t){return Uint8Array.prototype.slice?r.slice(e,t):new Uint8Array(Array.prototype.slice.call(r,e,t))}const dn=(r,e)=>e+10<=r.length&&r[e]===73&&r[e+1]===68&&r[e+2]===51&&r[e+3]<255&&r[e+4]<255&&r[e+6]<128&&r[e+7]<128&&r[e+8]<128&&r[e+9]<128,Wo=(r,e)=>e+10<=r.length&&r[e]===51&&r[e+1]===68&&r[e+2]===73&&r[e+3]<255&&r[e+4]<255&&r[e+6]<128&&r[e+7]<128&&r[e+8]<128&&r[e+9]<128,Us=(r,e)=>{const t=e;let i=0;for(;dn(r,e);){i+=10;const s=Bs(r,e+6);i+=s,Wo(r,e+10)&&(i+=10),e+=i}if(i>0)return r.subarray(t,t+i)},Bs=(r,e)=>{let t=0;return t=(r[e]&127)<<21,t|=(r[e+1]&127)<<14,t|=(r[e+2]&127)<<7,t|=r[e+3]&127,t},wu=(r,e)=>dn(r,e)&&Bs(r,e+6)+10<=r.length-e,Lu=r=>{const e=Xo(r);for(let t=0;t<e.length;t++){const i=e[t];if(Yo(i))return ku(i)}},Yo=r=>r&&r.key==="PRIV"&&r.info==="com.apple.streaming.transportStreamTimestamp",Ru=r=>{const e=String.fromCharCode(r[0],r[1],r[2],r[3]),t=Bs(r,4),i=10;return{type:e,size:t,data:r.subarray(i,i+t)}},Xo=r=>{let e=0;const t=[];for(;dn(r,e);){const i=Bs(r,e+6);e+=10;const s=e+i;for(;e+8<s;){const n=Ru(r.subarray(e)),a=Cu(n);a&&t.push(a),e+=n.size+10}Wo(r,e)&&(e+=10)}return t},Cu=r=>r.type==="PRIV"?Iu(r):r.type[0]==="W"?Pu(r):Du(r),Iu=r=>{if(r.size<2)return;const e=ut(r.data,!0),t=new Uint8Array(r.data.subarray(e.length+1));return{key:r.type,info:e,data:t.buffer}},Du=r=>{if(r.size<2)return;if(r.type==="TXXX"){let t=1;const i=ut(r.data.subarray(t),!0);t+=i.length+1;const s=ut(r.data.subarray(t));return{key:r.type,info:i,data:s}}const e=ut(r.data.subarray(1));return{key:r.type,data:e}},Pu=r=>{if(r.type==="WXXX"){if(r.size<2)return;let t=1;const i=ut(r.data.subarray(t),!0);t+=i.length+1;const s=ut(r.data.subarray(t));return{key:r.type,info:i,data:s}}const e=ut(r.data);return{key:r.type,data:e}},ku=r=>{if(r.data.byteLength===8){const e=new Uint8Array(r.data),t=e[3]&1;let i=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return i/=45,t&&(i+=4772185884e-2),Math.round(i)}},ut=(r,e=!1)=>{const t=Ou();if(t){const c=t.decode(r);if(e){const h=c.indexOf("\0");return h!==-1?c.substring(0,h):c}return c.replace(/\0/g,"")}const i=r.length;let s,n,a,o="",l=0;for(;l<i;){if(s=r[l++],s===0&&e)return o;if(s===0||s===3)continue;switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(s);break;case 12:case 13:n=r[l++],o+=String.fromCharCode((s&31)<<6|n&63);break;case 14:n=r[l++],a=r[l++],o+=String.fromCharCode((s&15)<<12|(n&63)<<6|(a&63)<<0);break}}return o};let un;function Ou(){return!un&&typeof self.TextDecoder<"u"&&(un=new self.TextDecoder("utf-8")),un}const ft={hexDump:function(r){let e="";for(let t=0;t<r.length;t++){let i=r[t].toString(16);i.length<2&&(i="0"+i),e+=i}return e}},Hs=Math.pow(2,32)-1,Mu=[].push,qo={video:1,audio:2,id3:3,text:4};function Pe(r){return String.fromCharCode.apply(null,r)}function Zo(r,e){const t=r[e]<<8|r[e+1];return t<0?65536+t:t}function q(r,e){const t=Jo(r,e);return t<0?4294967296+t:t}function Jo(r,e){return r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}function fn(r,e,t){r[e]=t>>24,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t&255}function te(r,e){const t=[];if(!e.length)return t;const i=r.byteLength;for(let s=0;s<i;){const n=q(r,s),a=Pe(r.subarray(s+4,s+8)),o=n>1?s+n:i;if(a===e[0])if(e.length===1)t.push(r.subarray(s+8,o));else{const l=te(r.subarray(s+8,o),e.slice(1));l.length&&Mu.apply(t,l)}s=o}return t}function Fu(r){const e=[],t=r[0];let i=8;const s=q(r,i);i+=4;const n=0,a=0;t===0?i+=8:i+=16,i+=2;let o=r.length+a;const l=Zo(r,i);i+=2;for(let c=0;c<l;c++){let h=i;const d=q(r,h);h+=4;const u=d&2147483647;if((d&2147483648)>>>31===1)return S.warn("SIDX has hierarchical references (not supported)"),null;const p=q(r,h);h+=4,e.push({referenceSize:u,subsegmentDuration:p,info:{duration:p/s,start:o,end:o+u-1}}),o+=u,h+=4,i=h}return{earliestPresentationTime:n,timescale:s,version:t,referencesCount:l,references:e}}function Qo(r){const e=[],t=te(r,["moov","trak"]);for(let s=0;s<t.length;s++){const n=t[s],a=te(n,["tkhd"])[0];if(a){let o=a[0],l=o===0?12:20;const c=q(a,l),h=te(n,["mdia","mdhd"])[0];if(h){o=h[0],l=o===0?12:20;const d=q(h,l),u=te(n,["mdia","hdlr"])[0];if(u){const f=Pe(u.subarray(8,12)),p={soun:ne.AUDIO,vide:ne.VIDEO}[f];if(p){const m=te(n,["mdia","minf","stbl","stsd"])[0];let g;m&&(g=Pe(m.subarray(12,16))),e[c]={timescale:d,type:p},e[p]={timescale:d,id:c,codec:g}}}}}}return te(r,["moov","mvex","trex"]).forEach(s=>{const n=q(s,4),a=e[n];a&&(a.default={duration:q(s,12),flags:q(s,20)})}),e}function Nu(r,e){if(!r||!e)return r;const t=e.keyId;return t&&e.isCommonEncryption&&te(r,["moov","trak"]).forEach(s=>{const a=te(s,["mdia","minf","stbl","stsd"])[0].subarray(8);let o=te(a,["enca"]);const l=o.length>0;l||(o=te(a,["encv"])),o.forEach(c=>{const h=l?c.subarray(28):c.subarray(78);te(h,["sinf"]).forEach(u=>{const f=_o(u);if(f){const p=f.subarray(8,24);p.some(m=>m!==0)||(S.log(`[eme] Patching keyId in 'enc${l?"a":"v"}>sinf>>tenc' box: ${ft.hexDump(p)} -> ${ft.hexDump(t)}`),f.set(t,8))}})})}),r}function _o(r){const e=te(r,["schm"])[0];if(e){const t=Pe(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return te(r,["schi","tenc"])[0]}return S.error("[eme] missing 'schm' box"),null}function Uu(r,e){return te(e,["moof","traf"]).reduce((t,i)=>{const s=te(i,["tfdt"])[0],n=s[0],a=te(i,["tfhd"]).reduce((o,l)=>{const c=q(l,4),h=r[c];if(h){let d=q(s,4);if(n===1){if(d===Hs)return S.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),o;d*=Hs+1,d+=q(s,8)}const u=h.timescale||9e4,f=d/u;if(isFinite(f)&&(o===null||f<o))return f}return o},null);return a!==null&&isFinite(a)&&(t===null||a<t)?a:t},null)}function Bu(r,e){let t=0,i=0,s=0;const n=te(r,["moof","traf"]);for(let a=0;a<n.length;a++){const o=n[a],l=te(o,["tfhd"])[0],c=q(l,4),h=e[c];if(!h)continue;const d=h.default,u=q(l,0)|(d==null?void 0:d.flags);let f=d==null?void 0:d.duration;u&8&&(u&2?f=q(l,12):f=q(l,8));const p=h.timescale||9e4,m=te(o,["trun"]);for(let g=0;g<m.length;g++){if(t=Hu(m[g]),!t&&f){const x=q(m[g],4);t=f*x}h.type===ne.VIDEO?i+=t/p:h.type===ne.AUDIO&&(s+=t/p)}}if(i===0&&s===0){let a=0;const o=te(r,["sidx"]);for(let l=0;l<o.length;l++){const c=Fu(o[l]);c!=null&&c.references&&(a+=c.references.reduce((h,d)=>h+d.info.duration||0,0))}return a}return i||s}function Hu(r){const e=q(r,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let i=0;const s=q(r,4);for(let n=0;n<s;n++){if(e&256){const a=q(r,t);i+=a,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return i}function Gu(r,e,t){te(e,["moof","traf"]).forEach(i=>{te(i,["tfhd"]).forEach(s=>{const n=q(s,4),a=r[n];if(!a)return;const o=a.timescale||9e4;te(i,["tfdt"]).forEach(l=>{const c=l[0];let h=q(l,4);if(c===0)h-=t*o,h=Math.max(h,0),fn(l,4,h);else{h*=Math.pow(2,32),h+=q(l,8),h-=t*o,h=Math.max(h,0);const d=Math.floor(h/(Hs+1)),u=Math.floor(h%(Hs+1));fn(l,4,d),fn(l,8,u)}})})})}function Vu(r){const e={valid:null,remainder:null},t=te(r,["moof"]);if(t){if(t.length<2)return e.remainder=r,e}else return e;const i=t[t.length-1];return e.valid=_t(r,0,i.byteOffset-8),e.remainder=_t(r,i.byteOffset-8),e}function $t(r,e){const t=new Uint8Array(r.length+e.length);return t.set(r),t.set(e,r.length),t}function $o(r,e){const t=[],i=e.samples,s=e.timescale,n=e.id;let a=!1;return te(i,["moof"]).map(l=>{const c=l.byteOffset-8;te(l,["traf"]).map(d=>{const u=te(d,["tfdt"]).map(f=>{const p=f[0];let m=q(f,4);return p===1&&(m*=Math.pow(2,32),m+=q(f,8)),m/s})[0];return u!==void 0&&(r=u),te(d,["tfhd"]).map(f=>{const p=q(f,4),m=q(f,0)&16777215,g=(m&1)!==0,x=(m&2)!==0,b=(m&8)!==0;let A=0;const y=(m&16)!==0;let T=0;const w=(m&32)!==0;let L=8;p===n&&(g&&(L+=8),x&&(L+=4),b&&(A=q(f,L),L+=4),y&&(T=q(f,L),L+=4),w&&(L+=4),e.type==="video"&&(a=ju(e.codec)),te(d,["trun"]).map(I=>{const R=I[0],E=q(I,0)&16777215,M=(E&1)!==0;let k=0;const U=(E&4)!==0,Y=(E&256)!==0;let V=0;const B=(E&512)!==0;let z=0;const F=(E&1024)!==0,H=(E&2048)!==0;let J=0;const _=q(I,4);let X=8;M&&(k=q(I,X),X+=4),U&&(X+=4);let ee=k+c;for(let oe=0;oe<_;oe++){if(Y?(V=q(I,X),X+=4):V=A,B?(z=q(I,X),X+=4):z=T,F&&(X+=4),H&&(R===0?J=q(I,X):J=Jo(I,X),X+=4),e.type===ne.VIDEO){let $=0;for(;$<z;){const he=q(i,ee);if(ee+=4,zu(a,i[ee])){const ye=i.subarray(ee,ee+he);el(ye,a?2:1,r+J/s,t)}ee+=he,$+=he+4}}r+=V/s}}))})})}),t}function ju(r){if(!r)return!1;const e=r.indexOf("."),t=e<0?r:r.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function zu(r,e){if(r){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function el(r,e,t,i){const s=tl(r);let n=0;n+=e;let a=0,o=0,l=!1,c=0;for(;n<s.length;){a=0;do{if(n>=s.length)break;c=s[n++],a+=c}while(c===255);o=0;do{if(n>=s.length)break;c=s[n++],o+=c}while(c===255);const h=s.length-n;if(!l&&a===4&&n<s.length){if(l=!0,s[n++]===181){const u=Zo(s,n);if(n+=2,u===49){const f=q(s,n);if(n+=4,f===1195456820){const p=s[n++];if(p===3){const m=s[n++],g=31&m,x=64&m,b=x?2+g*3:0,A=new Uint8Array(b);if(x){A[0]=m;for(let y=1;y<b;y++)A[y]=s[n++]}i.push({type:p,payloadType:a,pts:t,bytes:A})}}}}}else if(a===5&&o<h){if(l=!0,o>16){const d=[];for(let p=0;p<16;p++){const m=s[n++].toString(16);d.push(m.length==1?"0"+m:m),(p===3||p===5||p===7||p===9)&&d.push("-")}const u=o-16,f=new Uint8Array(u);for(let p=0;p<u;p++)f[p]=s[n++];i.push({payloadType:a,pts:t,uuid:d.join(""),userData:ut(f),userDataBytes:f})}}else if(o<h)n+=o;else if(o>h)break}}function tl(r){const e=r.byteLength,t=[];let i=1;for(;i<e-2;)r[i]===0&&r[i+1]===0&&r[i+2]===3?(t.push(i+2),i+=2):i++;if(t.length===0)return r;const s=e-t.length,n=new Uint8Array(s);let a=0;for(i=0;i<s;a++,i++)a===t[0]&&(a++,t.shift()),n[i]=r[a];return n}function Ku(r){const e=r[0];let t="",i="",s=0,n=0,a=0,o=0,l=0,c=0;if(e===0){for(;Pe(r.subarray(c,c+1))!=="\0";)t+=Pe(r.subarray(c,c+1)),c+=1;for(t+=Pe(r.subarray(c,c+1)),c+=1;Pe(r.subarray(c,c+1))!=="\0";)i+=Pe(r.subarray(c,c+1)),c+=1;i+=Pe(r.subarray(c,c+1)),c+=1,s=q(r,12),n=q(r,16),o=q(r,20),l=q(r,24),c=28}else if(e===1){c+=4,s=q(r,c),c+=4;const d=q(r,c);c+=4;const u=q(r,c);for(c+=4,a=4294967296*d+u,Number.isSafeInteger(a)||(a=Number.MAX_SAFE_INTEGER,S.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=q(r,c),c+=4,l=q(r,c),c+=4;Pe(r.subarray(c,c+1))!=="\0";)t+=Pe(r.subarray(c,c+1)),c+=1;for(t+=Pe(r.subarray(c,c+1)),c+=1;Pe(r.subarray(c,c+1))!=="\0";)i+=Pe(r.subarray(c,c+1)),c+=1;i+=Pe(r.subarray(c,c+1)),c+=1}const h=r.subarray(c,r.byteLength);return{schemeIdUri:t,value:i,timeScale:s,presentationTime:a,presentationTimeDelta:n,eventDuration:o,id:l,payload:h}}function Wu(r,...e){const t=e.length;let i=8,s=t;for(;s--;)i+=e[s].byteLength;const n=new Uint8Array(i);for(n[0]=i>>24&255,n[1]=i>>16&255,n[2]=i>>8&255,n[3]=i&255,n.set(r,4),s=0,i=8;s<t;s++)n.set(e[s],i),i+=e[s].byteLength;return n}function Yu(r,e,t){if(r.byteLength!==16)throw new RangeError("Invalid system id");let i,s;if(e){i=1,s=new Uint8Array(e.length*16);for(let o=0;o<e.length;o++){const l=e[o];if(l.byteLength!==16)throw new RangeError("Invalid key");s.set(l,o*16)}}else i=0,s=new Uint8Array;let n;i>0?(n=new Uint8Array(4),e.length>0&&new DataView(n.buffer).setUint32(0,e.length,!1)):n=new Uint8Array;const a=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(a.buffer).setUint32(0,t.byteLength,!1),Wu([112,115,115,104],new Uint8Array([i,0,0,0]),r,n,s,a,t||new Uint8Array)}function Xu(r){if(!(r instanceof ArrayBuffer)||r.byteLength<32)return null;const e={version:0,systemId:"",kids:null,data:null},t=new DataView(r),i=t.getUint32(0);if(r.byteLength!==i&&i>44||t.getUint32(4)!==1886614376||(e.version=t.getUint32(8)>>>24,e.version>1))return null;e.systemId=ft.hexDump(new Uint8Array(r,12,16));const n=t.getUint32(28);if(e.version===0){if(i-32<n)return null;e.data=new Uint8Array(r,32,n)}else if(e.version===1){e.kids=[];for(let a=0;a<n;a++)e.kids.push(new Uint8Array(r,32+a*16,16))}return e}let Gs={};class _i{static clearKeyUriToKeyIdMap(){Gs={}}constructor(e,t,i,s=[1],n=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=i,this.keyFormatVersions=s,this.iv=n,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 je.FAIRPLAY:case je.WIDEVINE:case je.PLAYREADY:case je.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&&S.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const i=qu(e);return new _i(this.method,this.uri,"identity",this.keyFormatVersions,i)}const t=bu(this.uri);if(t)switch(this.keyFormat){case je.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case je.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Yu(i,null,t);const s=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),n=String.fromCharCode.apply(null,Array.from(s)),a=n.substring(n.indexOf("<"),n.length),c=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("KID")[0];if(c){const h=c.childNodes[0]?c.childNodes[0].nodeValue:c.getAttribute("VALUE");if(h){const d=cn(h).subarray(0,16);Au(d),this.keyId=d}}break}default:{let i=t.subarray(0,16);if(i.length!==16){const s=new Uint8Array(16);s.set(i,16-i.length),i=s}this.keyId=i;break}}if(!this.keyId||this.keyId.byteLength!==16){let i=Gs[this.uri];if(!i){const s=Object.keys(Gs).length%Number.MAX_SAFE_INTEGER;i=new Uint8Array(16),new DataView(i.buffer,12,4).setUint32(0,s),Gs[this.uri]=i}this.keyId=i}return this}}function qu(r){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=r>>8*(15-t)&255;return e}const il=/\{\$([a-zA-Z0-9-_]+)\}/g;function sl(r){return il.test(r)}function ze(r,e,t){if(r.variableList!==null||r.hasVariableRefs)for(let i=t.length;i--;){const s=t[i],n=e[s];n&&(e[s]=pn(r,n))}}function pn(r,e){if(r.variableList!==null||r.hasVariableRefs){const t=r.variableList;return e.replace(il,i=>{const s=i.substring(2,i.length-1),n=t==null?void 0:t[s];return n===void 0?(r.playlistParsingError||(r.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),i):n})}return e}function rl(r,e,t){let i=r.variableList;i||(r.variableList=i={});let s,n;if("QUERYPARAM"in e){s=e.QUERYPARAM;try{const a=new self.URL(t).searchParams;if(a.has(s))n=a.get(s);else throw new Error(`"${s}" does not match any query parameter in URI: "${t}"`)}catch(a){r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`))}}else s=e.NAME,n=e.VALUE;s in i?r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):i[s]=n||""}function Zu(r,e,t){const i=e.IMPORT;if(t&&i in t){let s=r.variableList;s||(r.variableList=s={}),s[i]=t[i]}else r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${i}"`))}function Vs(){if(!(typeof self>"u"))return self.MediaSource||self.WebKitMediaSource}const Ju={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},nl=Vs();function Qu(r,e){const t=Ju[e];return!!t&&t[r.slice(0,4)]===!0}function mn(r,e){var t;return(t=nl==null?void 0:nl.isTypeSupported(`${e||"video"}/mp4;codecs="${r}"`))!=null?t:!1}const al=/#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,ol=/#EXT-X-MEDIA:(.*)/g,_u=/^#EXT(?:INF|-X-TARGETDURATION):/m,ll=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),$u=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)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class nt{static findGroup(e,t){for(let i=0;i<e.length;i++){const s=e[i];if(s.id===t)return s}}static convertAVC1ToAVCOTI(e){const t=e.split(".");if(t.length>2){let i=t.shift()+".";return i+=parseInt(t.shift()).toString(16),i+=("000"+parseInt(t.shift()).toString(16)).slice(-4),i}return e}static resolve(e,t){return an.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return _u.test(e)}static parseMasterPlaylist(e,t){const i=sl(e),s={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:i},n=[];al.lastIndex=0;let a;for(;(a=al.exec(e))!=null;)if(a[1]){var o;const c=new ue(a[1]);ze(s,c,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const h=pn(s,a[2]),d={attrs:c,bitrate:c.decimalInteger("AVERAGE-BANDWIDTH")||c.decimalInteger("BANDWIDTH"),name:c.NAME,url:nt.resolve(h,t)},u=c.decimalResolution("RESOLUTION");u&&(d.width=u.width,d.height=u.height),ef((c.CODECS||"").split(/[ ,]+/).filter(f=>f),d),d.videoCodec&&d.videoCodec.indexOf("avc1")!==-1&&(d.videoCodec=nt.convertAVC1ToAVCOTI(d.videoCodec)),(o=d.unknownCodecs)!=null&&o.length||n.push(d),s.levels.push(d)}else if(a[3]){const c=a[3],h=a[4];switch(c){case"SESSION-DATA":{const d=new ue(h);ze(s,d,["DATA-ID","LANGUAGE","VALUE","URI"]);const u=d["DATA-ID"];u&&(s.sessionData===null&&(s.sessionData={}),s.sessionData[u]=d);break}case"SESSION-KEY":{const d=cl(h,t,s);d.encrypted&&d.isSupported()?(s.sessionKeys===null&&(s.sessionKeys=[]),s.sessionKeys.push(d)):S.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${h}"`);break}case"DEFINE":{{const d=new ue(h);ze(s,d,["NAME","VALUE","QUERYPARAM"]),rl(s,d,t)}break}case"CONTENT-STEERING":{const d=new ue(h);ze(s,d,["SERVER-URI","PATHWAY-ID"]),s.contentSteering={uri:nt.resolve(d["SERVER-URI"],t),pathwayId:d["PATHWAY-ID"]||"."};break}case"START":{s.startTimeOffset=hl(h);break}}}const l=n.length>0&&n.length<s.levels.length;return s.levels=l?n:s.levels,s.levels.length===0&&(s.playlistParsingError=new Error("no levels found in manifest")),s}static parseMasterPlaylistMedia(e,t,i){let s;const n={},a=i.levels,o={AUDIO:a.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:a.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let l=0;for(ol.lastIndex=0;(s=ol.exec(e))!==null;){const c=new ue(s[1]),h=c.TYPE;if(h){const d=o[h],u=n[h]||[];n[h]=u,ze(i,c,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const f={attrs:c,bitrate:0,id:l++,groupId:c["GROUP-ID"]||"",instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:h,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?nt.resolve(c.URI,t):""};if(d!=null&&d.length){const p=nt.findGroup(d,f.groupId)||d[0];dl(f,p,"audioCodec"),dl(f,p,"textCodec")}u.push(f)}}return n}static parseLevelPlaylist(e,t,i,s,n,a){const o=new yu(t),l=o.fragments;let c=null,h=0,d=0,u=0,f=0,p=null,m=new ln(s,t),g,x,b,A=-1,y=!1;for(ll.lastIndex=0,o.m3u8=e,o.hasVariableRefs=sl(e);(g=ll.exec(e))!==null;){y&&(y=!1,m=new ln(s,t),m.start=u,m.sn=h,m.cc=f,m.level=i,c&&(m.initSegment=c,m.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null));const I=g[1];if(I){m.duration=parseFloat(I);const R=(" "+g[2]).slice(1);m.title=R||null,m.tagList.push(R?["INF",I,R]:["INF",I])}else if(g[3]){if(j(m.duration)){m.start=u,b&&pl(m,b,o),m.sn=h,m.level=i,m.cc=f,m.urlId=n,l.push(m);const R=(" "+g[3]).slice(1);m.relurl=pn(o,R),ul(m,p),p=m,u+=m.duration,h++,d=0,y=!0}}else if(g[4]){const R=(" "+g[4]).slice(1);p?m.setByteRange(R,p):m.setByteRange(R)}else if(g[5])m.rawProgramDateTime=(" "+g[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),A===-1&&(A=l.length);else{if(g=g[0].match($u),!g){S.warn("No matches on slow regex match for level playlist!");continue}for(x=1;x<g.length&&!(typeof g[x]<"u");x++);const R=(" "+g[x]).slice(1),E=(" "+g[x+1]).slice(1),M=g[x+2]?(" "+g[x+2]).slice(1):"";switch(R){case"PLAYLIST-TYPE":o.type=E.toUpperCase();break;case"MEDIA-SEQUENCE":h=o.startSN=parseInt(E);break;case"SKIP":{const k=new ue(E);ze(o,k,["RECENTLY-REMOVED-DATERANGES"]);const U=k.decimalInteger("SKIPPED-SEGMENTS");if(j(U)){o.skippedSegments=U;for(let V=U;V--;)l.unshift(null);h+=U}const Y=k.enumeratedString("RECENTLY-REMOVED-DATERANGES");Y&&(o.recentlyRemovedDateranges=Y.split(" "));break}case"TARGETDURATION":o.targetduration=Math.max(parseInt(E),1);break;case"VERSION":o.version=parseInt(E);break;case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"#":(E||M)&&m.tagList.push(M?[E,M]:[E]);break;case"DISCONTINUITY":f++,m.tagList.push(["DIS"]);break;case"GAP":m.gap=!0,m.tagList.push([R]);break;case"BITRATE":m.tagList.push([R,E]);break;case"DATERANGE":{const k=new ue(E);ze(o,k,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),ze(o,k,k.clientAttrs);const U=new Bo(k,o.dateRanges[k.ID]);U.isValid||o.skippedSegments?o.dateRanges[U.id]=U:S.warn(`Ignoring invalid DATERANGE tag: "${E}"`),m.tagList.push(["EXT-X-DATERANGE",E]);break}case"DEFINE":{{const k=new ue(E);ze(o,k,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in k?Zu(o,k,a):rl(o,k,t)}break}case"DISCONTINUITY-SEQUENCE":f=parseInt(E);break;case"KEY":{const k=cl(E,t,o);if(k.isSupported()){if(k.method==="NONE"){b=void 0;break}b||(b={}),b[k.keyFormat]&&(b=Se({},b)),b[k.keyFormat]=k}else S.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${E}"`);break}case"START":o.startTimeOffset=hl(E);break;case"MAP":{const k=new ue(E);if(ze(o,k,["BYTERANGE","URI"]),m.duration){const U=new ln(s,t);fl(U,k,i,b),c=U,m.initSegment=c,c.rawProgramDateTime&&!m.rawProgramDateTime&&(m.rawProgramDateTime=c.rawProgramDateTime)}else fl(m,k,i,b),c=m,y=!0;break}case"SERVER-CONTROL":{const k=new ue(E);o.canBlockReload=k.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=k.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&k.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=k.optionalFloat("PART-HOLD-BACK",0),o.holdBack=k.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const k=new ue(E);o.partTarget=k.decimalFloatingPoint("PART-TARGET");break}case"PART":{let k=o.partList;k||(k=o.partList=[]);const U=d>0?k[k.length-1]:void 0,Y=d++,V=new ue(E);ze(o,V,["BYTERANGE","URI"]);const B=new gu(V,m,t,Y,U);k.push(B),m.duration+=B.duration;break}case"PRELOAD-HINT":{const k=new ue(E);ze(o,k,["URI"]),o.preloadHint=k;break}case"RENDITION-REPORT":{const k=new ue(E);ze(o,k,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(k);break}default:S.warn(`line parsed but not handled: ${g}`);break}}}p&&!p.relurl?(l.pop(),u-=p.duration,o.partList&&(o.fragmentHint=p)):o.partList&&(ul(m,p),m.cc=f,o.fragmentHint=m,b&&pl(m,b,o));const T=l.length,w=l[0],L=l[T-1];if(u+=o.skippedSegments*o.targetduration,u>0&&T&&L){o.averagetargetduration=u/T;const I=L.sn;o.endSN=I!=="initSegment"?I:0,o.live||(L.endList=!0),w&&(o.startCC=w.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(u+=o.fragmentHint.duration),o.totalduration=u,o.endCC=f,A>0&&tf(l,A),o}}function cl(r,e,t){var i,s;const n=new ue(r);ze(t,n,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const a=(i=n.METHOD)!=null?i:"",o=n.URI,l=n.hexadecimalInteger("IV"),c=n.KEYFORMATVERSIONS,h=(s=n.KEYFORMAT)!=null?s:"identity";o&&n.IV&&!l&&S.error(`Invalid IV: ${n.IV}`);const d=o?nt.resolve(o,e):"",u=(c||"1").split("/").map(Number).filter(Number.isFinite);return new _i(a,d,h,u,l)}function hl(r){const t=new ue(r).decimalFloatingPoint("TIME-OFFSET");return j(t)?t:null}function ef(r,e){["video","audio","text"].forEach(t=>{const i=r.filter(s=>Qu(s,t));if(i.length){const s=i.filter(n=>n.lastIndexOf("avc1",0)===0||n.lastIndexOf("mp4a",0)===0);e[`${t}Codec`]=s.length>0?s[0]:i[0],r=r.filter(n=>i.indexOf(n)===-1)}}),e.unknownCodecs=r}function dl(r,e,t){const i=e[t];i&&(r[t]=i)}function tf(r,e){let t=r[e];for(let i=e;i--;){const s=r[i];if(!s)return;s.programDateTime=t.programDateTime-s.duration*1e3,t=s}}function ul(r,e){r.rawProgramDateTime?r.programDateTime=Date.parse(r.rawProgramDateTime):e!=null&&e.programDateTime&&(r.programDateTime=e.endProgramDateTime),j(r.programDateTime)||(r.programDateTime=null,r.rawProgramDateTime=null)}function fl(r,e,t,i){r.relurl=e.URI,e.BYTERANGE&&r.setByteRange(e.BYTERANGE),r.level=t,r.sn="initSegment",i&&(r.levelkeys=i),r.initSegment=null}function pl(r,e,t){r.levelkeys=e;const{encryptedFragments:i}=t;(!i.length||i[i.length-1].levelkeys!==e)&&Object.keys(e).some(s=>e[s].isCommonEncryption)&&i.push(r)}var se={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},W={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function ml(r){const{type:e}=r;switch(e){case se.AUDIO_TRACK:return W.AUDIO;case se.SUBTITLE_TRACK:return W.SUBTITLE;default:return W.MAIN}}function gn(r,e){let t=r.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class sf{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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(v.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(v.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,i=t.pLoader,s=t.loader,n=i||s,a=new n(t);return this.loaders[e.type]=a,a}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:i}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:se.MANIFEST,url:i,deliveryDirectives:null})}onLevelLoading(e,t){const{id:i,level:s,url:n,deliveryDirectives:a}=t;this.load({id:i,level:s,responseType:"text",type:se.LEVEL,url:n,deliveryDirectives:a})}onAudioTrackLoading(e,t){const{id:i,groupId:s,url:n,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:se.AUDIO_TRACK,url:n,deliveryDirectives:a})}onSubtitleTrackLoading(e,t){const{id:i,groupId:s,url:n,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:se.SUBTITLE_TRACK,url:n,deliveryDirectives:a})}load(e){var t;const i=this.hls.config;let s=this.getInternalLoader(e);if(s){const c=s.context;if(c&&c.url===e.url){S.trace("[playlist-loader]: playlist request ongoing");return}S.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),s.abort()}let n;if(e.type===se.MANIFEST?n=i.manifestLoadPolicy.default:n=Se({},i.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),s=this.createInternalLoader(e),(t=e.deliveryDirectives)!=null&&t.part){let c;if(e.type===se.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===se.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===se.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const h=c.partTarget,d=c.targetduration;if(h&&d){const u=Math.max(h*3,d*.8)*1e3;n=Se({},n,{maxTimeToFirstByteMs:Math.min(u,n.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(u,n.maxTimeToFirstByteMs)})}}}const a=n.errorRetry||n.timeoutRetry||{},o={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},l={onSuccess:(c,h,d,u)=>{const f=this.getInternalLoader(d);this.resetInternalLoader(d.type);const p=c.data;if(p.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,d,new Error("no EXTM3U delimiter"),u||null,h);return}h.parsing.start=performance.now(),nt.isMediaPlaylist(p)?this.handleTrackOrLevelPlaylist(c,h,d,u||null,f):this.handleMasterPlaylist(c,h,d,u)},onError:(c,h,d,u)=>{this.handleNetworkError(h,d,!1,c,u)},onTimeout:(c,h,d)=>{this.handleNetworkError(h,d,!0,void 0,c)}};s.load(e,o,l)}handleMasterPlaylist(e,t,i,s){const n=this.hls,a=e.data,o=gn(e,i),l=nt.parseMasterPlaylist(a,o);if(l.playlistParsingError){this.handleManifestParsingError(e,i,l.playlistParsingError,s,t);return}const{contentSteering:c,levels:h,sessionData:d,sessionKeys:u,startTimeOffset:f,variableList:p}=l;this.variableList=p;const{AUDIO:m=[],SUBTITLES:g,"CLOSED-CAPTIONS":x}=nt.parseMasterPlaylistMedia(a,o,l);m.length&&!m.some(A=>!A.url)&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(S.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new ue({}),bitrate:0,url:""})),n.trigger(v.MANIFEST_LOADED,{levels:h,audioTracks:m,subtitles:g,captions:x,contentSteering:c,url:o,stats:t,networkDetails:s,sessionData:d,sessionKeys:u,startTimeOffset:f,variableList:p})}handleTrackOrLevelPlaylist(e,t,i,s,n){const a=this.hls,{id:o,level:l,type:c}=i,h=gn(e,i),d=j(o)?o:0,u=j(l)?l:d,f=ml(i),p=nt.parseLevelPlaylist(e.data,h,u,f,d,this.variableList);if(c===se.MANIFEST){const m={attrs:new ue({}),bitrate:0,details:p,name:"",url:h};a.trigger(v.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:h,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),i.levelDetails=p,this.handlePlaylistLoaded(p,e,t,i,s,n)}handleManifestParsingError(e,t,i,s,n){this.hls.trigger(v.ERROR,{type:K.NETWORK_ERROR,details:D.MANIFEST_PARSING_ERROR,fatal:t.type===se.MANIFEST,url:e.url,err:i,error:i,reason:i.message,response:e,context:t,networkDetails:s,stats:n})}handleNetworkError(e,t,i=!1,s,n){let a=`A network ${i?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===se.LEVEL?a+=`: ${e.level} id: ${e.id}`:(e.type===se.AUDIO_TRACK||e.type===se.SUBTITLE_TRACK)&&(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);S.warn(`[playlist-loader]: ${a}`);let l=D.UNKNOWN,c=!1;const h=this.getInternalLoader(e);switch(e.type){case se.MANIFEST:l=i?D.MANIFEST_LOAD_TIMEOUT:D.MANIFEST_LOAD_ERROR,c=!0;break;case se.LEVEL:l=i?D.LEVEL_LOAD_TIMEOUT:D.LEVEL_LOAD_ERROR,c=!1;break;case se.AUDIO_TRACK:l=i?D.AUDIO_TRACK_LOAD_TIMEOUT:D.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case se.SUBTITLE_TRACK:l=i?D.SUBTITLE_TRACK_LOAD_TIMEOUT:D.SUBTITLE_LOAD_ERROR,c=!1;break}h&&this.resetInternalLoader(e.type);const d={type:K.NETWORK_ERROR,details:l,fatal:c,url:e.url,loader:h,context:e,error:o,networkDetails:t,stats:n};if(s){const u=(t==null?void 0:t.url)||e.url;d.response=Ve({url:u,data:void 0},s)}this.hls.trigger(v.ERROR,d)}handlePlaylistLoaded(e,t,i,s,n,a){const o=this.hls,{type:l,level:c,id:h,groupId:d,deliveryDirectives:u}=s,f=gn(t,s),p=ml(s),m=typeof s.level=="number"&&p===W.MAIN?c:void 0;if(!e.fragments.length){const x=new Error("No Segments found in Playlist");o.trigger(v.ERROR,{type:K.NETWORK_ERROR,details:D.LEVEL_EMPTY_ERROR,fatal:!1,url:f,error:x,reason:x.message,response:t,context:s,level:m,parent:p,networkDetails:n,stats:i});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const g=e.playlistParsingError;if(g){o.trigger(v.ERROR,{type:K.NETWORK_ERROR,details:D.LEVEL_PARSING_ERROR,fatal:!1,url:f,error:g,reason:g.message,response:t,context:s,level:m,parent:p,networkDetails:n,stats:i});return}switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),l){case se.MANIFEST:case se.LEVEL:o.trigger(v.LEVEL_LOADED,{details:e,level:m||0,id:h||0,stats:i,networkDetails:n,deliveryDirectives:u});break;case se.AUDIO_TRACK:o.trigger(v.AUDIO_TRACK_LOADED,{details:e,id:h||0,groupId:d||"",stats:i,networkDetails:n,deliveryDirectives:u});break;case se.SUBTITLE_TRACK:o.trigger(v.SUBTITLE_TRACK_LOADED,{details:e,id:h||0,groupId:d||"",stats:i,networkDetails:n,deliveryDirectives:u});break}}}function gl(r,e){let t;try{t=new Event("addtrack")}catch{t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=r,e.dispatchEvent(t)}function vl(r,e){const t=r.mode;if(t==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(e.id))try{if(r.addCue(e),!r.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(i){S.debug(`[texttrack-utils]: ${i}`);try{const s=new self.TextTrackCue(e.startTime,e.endTime,e.text);s.id=e.id,r.addCue(s)}catch(s){S.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${s}`)}}t==="disabled"&&(r.mode=t)}function yi(r){const e=r.mode;if(e==="disabled"&&(r.mode="hidden"),r.cues)for(let t=r.cues.length;t--;)r.removeCue(r.cues[t]);e==="disabled"&&(r.mode=e)}function vn(r,e,t,i){const s=r.mode;if(s==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0){const n=nf(r.cues,e,t);for(let a=0;a<n.length;a++)(!i||i(n[a]))&&r.removeCue(n[a])}s==="disabled"&&(r.mode=s)}function rf(r,e){if(e<r[0].startTime)return 0;const t=r.length-1;if(e>r[t].endTime)return-1;let i=0,s=t;for(;i<=s;){const n=Math.floor((s+i)/2);if(e<r[n].startTime)s=n-1;else if(e>r[n].startTime&&i<t)i=n+1;else return n}return r[i].startTime-e<e-r[s].startTime?i:s}function nf(r,e,t){const i=[],s=rf(r,e);if(s>-1)for(let n=s,a=r.length;n<a;n++){const o=r[n];if(o.startTime>=e&&o.endTime<=t)i.push(o);else if(o.startTime>t)return i}return i}var at={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const af=.25;function yn(){if(!(typeof self>"u"))return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}const js=(()=>{const r=yn();try{new r(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function xn(r,e){return r.getTime()/1e3-e}function of(r){return Uint8Array.from(r.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class lf{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(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(yi(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 i=e[t];if(i.kind==="metadata"&&i.label==="id3")return gl(i,this.media),i}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:i,enableID3MetadataCues:s}}}=this;if(!i&&!s)return;const{samples:n}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=yn();for(let o=0;o<n.length;o++){const l=n[o].type;if(l===at.emsg&&!i||!s)continue;const c=Xo(n[o].data);if(c){const h=n[o].pts;let d=h+n[o].duration;d>js&&(d=js),d-h<=0&&(d=h+af);for(let f=0;f<c.length;f++){const p=c[f];if(!Yo(p)){this.updateId3CueEnds(h,l);const m=new a(h,d,"");m.value=p,l&&(m.type=l),this.id3Track.addCue(m)}}}}}updateId3CueEnds(e,t){var i;const s=(i=this.id3Track)==null?void 0:i.cues;if(s)for(let n=s.length;n--;){const a=s[n];a.type===t&&a.startTime<e&&a.endTime===js&&(a.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:i,type:s}){const{id3Track:n,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:l}}=a;if(n&&(o||l)){let c;s==="audio"?c=h=>h.type===at.audioId3&&l:s==="video"?c=h=>h.type===at.emsg&&o:c=h=>h.type===at.audioId3&&l||h.type===at.emsg&&o,vn(n,t,i,c)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:i,id3Track:s}=this,{dateRanges:n}=t,a=Object.keys(n);if(s){const h=Object.keys(i).filter(d=>!a.includes(d));for(let d=h.length;d--;){const u=h[d];Object.keys(i[u].cues).forEach(f=>{s.removeCue(i[u].cues[f])}),delete i[u]}}const o=t.fragments[t.fragments.length-1];if(a.length===0||!j(o==null?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const l=o.programDateTime/1e3-o.start,c=yn();for(let h=0;h<a.length;h++){const d=a[h],u=n[d],f=i[d],p=(f==null?void 0:f.cues)||{};let m=(f==null?void 0:f.durationKnown)||!1;const g=xn(u.startDate,l);let x=js;const b=u.endDate;if(b)x=xn(b,l),m=!0;else if(u.endOnNext&&!m){const y=a.reduce((T,w)=>{const L=n[w];return L.class===u.class&&L.id!==w&&L.startDate>u.startDate&&T.push(L),T},[]).sort((T,w)=>T.startDate.getTime()-w.startDate.getTime())[0];y&&(x=xn(y.startDate,l),m=!0)}const A=Object.keys(u.attr);for(let y=0;y<A.length;y++){const T=A[y];if(!pu(T))continue;let w=p[T];if(w)m&&!f.durationKnown&&(w.endTime=x);else{let L=u.attr[T];w=new c(g,x,""),mu(T)&&(L=of(L)),w.value={key:T,data:L},w.type=at.dateRange,w.id=d,this.id3Track.addCue(w),p[T]=w}}i[d]={cues:p,dateRange:u,durationKnown:m}}}}class cf{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:i,targetduration:s}=e,{liveSyncDuration:n,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,l=this.hls.userConfig;let c=o&&i||t;(l.liveSyncDuration||l.liveSyncDurationCount||c===0)&&(c=n!==void 0?n:a*s);const h=s,d=1;return c+Math.min(this.stallCount*d,h)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,i=this.levelDetails;if(e===null||t===null||i===null)return null;const s=i.edge,n=e-t-this.edgeStalled,a=s-i.totalduration,o=s-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,n),o)}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 i=e.buffered.length;return(i?e.buffered.end(i-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(v.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(v.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(v.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(v.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 i;t.details===D.BUFFER_STALLED_ERROR&&(this.stallCount++,(i=this.levelDetails)!=null&&i.live&&S.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 i=this.computeLatency();if(i===null)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:n}=this.config;if(!s||n===1)return;const a=this.targetLatency;if(a===null)return;const o=i-a,l=Math.min(this.maxLatency,a+t.targetduration),c=o<l;if(t.live&&c&&o>.05&&this.forwardBufferLength>1){const h=Math.min(2,Math.max(1,n)),d=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;e.playbackRate=Math.min(h,Math.max(1,d))}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 An=["NONE","TYPE-0","TYPE-1",null];var $i={No:"",Yes:"YES",v2:"v2"};function hf(r,e){const{canSkipUntil:t,canSkipDateRanges:i,endSN:s}=r,n=e!==void 0?e-s:0;return t&&n<t?i?$i.v2:$i.Yes:$i.No}class yl{constructor(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}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 es{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=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.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter(t=>t).join(",").replace(/\.[^.,]+/g,"")}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get attrs(){return this._attrs[this._urlId]}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get uri(){return this.url[this._urlId]||""}get urlId(){return this._urlId}set urlId(e){const t=e%this.url.length;this._urlId!==t&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=t)}get audioGroupId(){var e;return(e=this.audioGroupIds)==null?void 0:e[this.urlId]}get textGroupId(){var e;return(e=this.textGroupIds)==null?void 0:e[this.urlId]}addFallback(e){this.url.push(e.url),this._attrs.push(e.attrs)}}function bn(r,e){const t=e.startPTS;if(j(t)){let i=0,s;e.sn>r.sn?(i=t-r.start,s=r):(i=r.start-t,s=e),s.duration!==i&&(s.duration=i)}else e.sn>r.sn?r.cc===e.cc&&r.minEndPTS?e.start=r.start+(r.minEndPTS-r.start):e.start=r.start+r.duration:e.start=Math.max(r.start-e.duration,0)}function xl(r,e,t,i,s,n){i-t<=0&&(S.warn("Fragment should have a positive duration",e),i=t+e.duration,n=s+e.duration);let o=t,l=i;const c=e.startPTS,h=e.endPTS;if(j(c)){const g=Math.abs(c-t);j(e.deltaPTS)?e.deltaPTS=Math.max(g,e.deltaPTS):e.deltaPTS=g,o=Math.max(t,c),t=Math.min(t,c),s=Math.min(s,e.startDTS),l=Math.min(i,h),i=Math.max(i,h),n=Math.max(n,e.endDTS)}const d=t-e.start;e.start!==0&&(e.start=t),e.duration=i-e.start,e.startPTS=t,e.maxStartPTS=o,e.startDTS=s,e.endPTS=i,e.minEndPTS=l,e.endDTS=n;const u=e.sn;if(!r||u<r.startSN||u>r.endSN)return 0;let f;const p=u-r.startSN,m=r.fragments;for(m[p]=e,f=p;f>0;f--)bn(m[f],m[f-1]);for(f=p;f<m.length-1;f++)bn(m[f],m[f+1]);return r.fragmentHint&&bn(m[m.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,d}function df(r,e){let t=null;const i=r.fragments;for(let l=i.length-1;l>=0;l--){const c=i[l].initSegment;if(c){t=c;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;let s=0,n;if(pf(r,e,(l,c)=>{l.relurl&&(s=l.cc-c.cc),j(l.startPTS)&&j(l.endPTS)&&(c.start=c.startPTS=l.startPTS,c.startDTS=l.startDTS,c.maxStartPTS=l.maxStartPTS,c.endPTS=l.endPTS,c.endDTS=l.endDTS,c.minEndPTS=l.minEndPTS,c.duration=l.endPTS-l.startPTS,c.duration&&(n=c),e.PTSKnown=e.alignedSliding=!0),c.elementaryStreams=l.elementaryStreams,c.loader=l.loader,c.stats=l.stats,c.urlId=l.urlId,l.initSegment&&(c.initSegment=l.initSegment,t=l.initSegment)}),t&&(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach(c=>{var h;(!c.initSegment||c.initSegment.relurl===((h=t)==null?void 0:h.relurl))&&(c.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=e.fragments.some(l=>!l),e.deltaUpdateFailed){S.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let l=e.skippedSegments;l--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}else e.canSkipDateRanges&&(e.dateRanges=uf(r.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));const a=e.fragments;if(s){S.warn("discontinuity sliding from playlist, take drift into account");for(let l=0;l<a.length;l++)a[l].cc+=s}e.skippedSegments&&(e.startCC=e.fragments[0].cc),ff(r.partList,e.partList,(l,c)=>{c.elementaryStreams=l.elementaryStreams,c.stats=l.stats}),n?xl(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):Al(r,e),a.length&&(e.totalduration=e.edge-a[0].start),e.driftStartTime=r.driftStartTime,e.driftStart=r.driftStart;const o=e.advancedDateTime;if(e.advanced&&o){const l=e.edge;e.driftStart||(e.driftStartTime=o,e.driftStart=l),e.driftEndTime=o,e.driftEnd=l}else e.driftEndTime=r.driftEndTime,e.driftEnd=r.driftEnd,e.advancedDateTime=r.advancedDateTime}function uf(r,e,t){const i=Se({},r);return t&&t.forEach(s=>{delete i[s]}),Object.keys(e).forEach(s=>{const n=new Bo(e[s].attr,i[s]);n.isValid?i[s]=n:S.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[s].attr)}"`)}),i}function ff(r,e,t){if(r&&e){let i=0;for(let s=0,n=r.length;s<=n;s++){const a=r[s],o=e[s+i];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?t(a,o):i--}}}function pf(r,e,t){const i=e.skippedSegments,s=Math.max(r.startSN,e.startSN)-e.startSN,n=(r.fragmentHint?1:0)+(i?e.endSN:Math.min(r.endSN,e.endSN))-e.startSN,a=e.startSN-r.startSN,o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;for(let c=s;c<=n;c++){const h=l[a+c];let d=o[c];i&&!d&&c<i&&(d=e.fragments[c]=h),h&&d&&t(h,d)}}function Al(r,e){const t=e.startSN+e.skippedSegments-r.startSN,i=r.fragments;t<0||t>=i.length||Tn(e,i[t].start)}function Tn(r,e){if(e){const t=r.fragments;for(let i=r.skippedSegments;i<t.length;i++)t[i].start+=e;r.fragmentHint&&(r.fragmentHint.start+=e)}}function mf(r,e=1/0){let t=1e3*r.targetduration;if(r.updated){const i=r.fragments,s=4;if(i.length&&t*s>e){const n=i[i.length-1].duration*1e3;n<t&&(t=n)}}else t/=2;return Math.round(t)}function gf(r,e,t){if(!(r!=null&&r.details))return null;const i=r.details;let s=i.fragments[e-i.startSN];return s||(s=i.fragmentHint,s&&s.sn===e)?s:e<i.startSN&&t&&t.sn===e?t:null}function bl(r,e,t){var i;return r!=null&&r.details?Tl((i=r.details)==null?void 0:i.partList,e,t):null}function Tl(r,e,t){if(r)for(let i=r.length;i--;){const s=r[i];if(s.index===t&&s.fragment.sn===e)return s}return null}function zs(r){switch(r.details){case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_TIMEOUT:case D.LEVEL_LOAD_TIMEOUT:case D.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function El(r,e){const t=zs(e);return r.default[`${t?"timeout":"error"}Retry`]}function En(r,e){const t=r.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*r.retryDelayMs,r.maxRetryDelayMs)}function Sl(r){return Ve(Ve({},r),{errorRetry:null,timeoutRetry:null})}function Ks(r,e,t,i){return!!r&&e<r.maxNumRetry&&(vf(i)||!!t)}function vf(r){return r===0&&navigator.onLine===!1||!!r&&(r<400||r>499)}const wl={search:function(r,e){let t=0,i=r.length-1,s=null,n=null;for(;t<=i;){s=(t+i)/2|0,n=r[s];const a=e(n);if(a>0)t=s+1;else if(a<0)i=s-1;else return n}return null}};function yf(r,e,t){if(e===null||!Array.isArray(r)||!r.length||!j(e))return null;const i=r[0].programDateTime;if(e<(i||0))return null;const s=r[r.length-1].endProgramDateTime;if(e>=(s||0))return null;t=t||0;for(let n=0;n<r.length;++n){const a=r[n];if(xf(e,t,a))return a}return null}function ts(r,e,t=0,i=0){let s=null;if(r?s=e[r.sn-e[0].sn+1]||null:t===0&&e[0].start===0&&(s=e[0]),s&&Sn(t,i,s)===0)return s;const n=wl.search(e,Sn.bind(null,t,i));return n&&(n!==r||!s)?n:s}function Sn(r=0,e=0,t){if(t.start<=r&&t.start+t.duration>r)return 0;const i=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-i<=r?1:t.start-i>r&&t.start?-1:0}function xf(r,e,t){const i=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-i>r}function Af(r,e){return wl.search(r,t=>t.cc<e?1:t.cc>e?-1:0)}const bf=3e5;var Ne={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Qe={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Tf{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=S.log.bind(S,"[info]:"),this.warn=S.warn.bind(S,"[warning]:"),this.error=S.error.bind(S,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(v.ERROR,this.onError,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(v.ERROR,this.onError,this),e.off(v.ERROR,this.onErrorOut,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){this.playlistError=0}stopLoad(){}getVariantLevelIndex(e){return(e==null?void 0:e.type)===W.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var i,s;if(t.fatal)return;const n=this.hls,a=t.context;switch(t.details){case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case D.FRAG_PARSING_ERROR:if((i=t.frag)!=null&&i.gap){t.errorAction={action:Ne.DoNothing,flags:Qe.None};return}case D.FRAG_GAP:case D.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Ne.SendAlternateToPenaltyBox;return}case D.LEVEL_EMPTY_ERROR:case D.LEVEL_PARSING_ERROR:{var o,l;const c=t.parent===W.MAIN?t.level:n.loadLevel;t.details===D.LEVEL_EMPTY_ERROR&&((o=t.context)!=null&&(l=o.levelDetails)!=null&&l.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,c):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,c))}return;case D.LEVEL_LOAD_ERROR:case D.LEVEL_LOAD_TIMEOUT:typeof(a==null?void 0:a.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level));return;case D.AUDIO_TRACK_LOAD_ERROR:case D.AUDIO_TRACK_LOAD_TIMEOUT:case D.SUBTITLE_LOAD_ERROR:case D.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){const c=n.levels[n.loadLevel];if(c&&(a.type===se.AUDIO_TRACK&&a.groupId===c.audioGroupId||a.type===se.SUBTITLE_TRACK&&a.groupId===c.textGroupId)){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=Ne.SendAlternateToPenaltyBox,t.errorAction.flags=Qe.MoveAllAlternatesMatchingHost;return}}return;case D.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const c=n.levels[n.loadLevel],h=c==null?void 0:c.attrs["HDCP-LEVEL"];h&&(t.errorAction={action:Ne.SendAlternateToPenaltyBox,flags:Qe.MoveAllAlternatesMatchingHDCP,hdcpLevel:h})}return;case D.BUFFER_ADD_CODEC_ERROR:case D.REMUX_ALLOC_ERROR:t.errorAction=this.getLevelSwitchAction(t,(s=t.level)!=null?s:n.loadLevel);return;case D.INTERNAL_EXCEPTION:case D.BUFFER_APPENDING_ERROR:case D.BUFFER_APPEND_ERROR:case D.BUFFER_FULL_ERROR:case D.LEVEL_SWITCH_ERROR:case D.BUFFER_STALLED_ERROR:case D.BUFFER_SEEK_OVER_HOLE:case D.BUFFER_NUDGE_ON_STALL:t.errorAction={action:Ne.DoNothing,flags:Qe.None};return}if(t.type===K.KEY_SYSTEM_ERROR){const c=this.getVariantLevelIndex(t.frag);t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,c);return}}getPlaylistRetryOrSwitchAction(e,t){var i;const s=this.hls,n=El(s.config.playlistLoadPolicy,e),a=this.playlistError++,o=(i=e.response)==null?void 0:i.code;if(Ks(n,a,zs(e),o))return{action:Ne.RetryRequest,flags:Qe.None,retryConfig:n,retryCount:a};const c=this.getLevelSwitchAction(e,t);return n&&(c.retryConfig=n,c.retryCount=a),c}getFragRetryOrSwitchAction(e){const t=this.hls,i=this.getVariantLevelIndex(e.frag),s=t.levels[i],{fragLoadPolicy:n,keyLoadPolicy:a}=t.config,o=El(e.details.startsWith("key")?a:n,e),l=t.levels.reduce((d,u)=>d+u.fragmentError,0);if(s){var c;e.details!==D.FRAG_GAP&&s.fragmentError++;const d=(c=e.response)==null?void 0:c.code;if(Ks(o,l,zs(e),d))return{action:Ne.RetryRequest,flags:Qe.None,retryConfig:o,retryCount:l}}const h=this.getLevelSwitchAction(e,i);return o&&(h.retryConfig=o,h.retryCount=l),h}getLevelSwitchAction(e,t){const i=this.hls;t==null&&(t=i.loadLevel);const s=this.hls.levels[t];if(s&&(s.loadError++,i.autoLevelEnabled)){var n,a;let o=-1;const{levels:l,loadLevel:c,minAutoLevel:h,maxAutoLevel:d}=i,u=(n=e.frag)==null?void 0:n.type,{type:f,groupId:p}=(a=e.context)!=null?a:{};for(let m=l.length;m--;){const g=(m+c)%l.length;if(g!==c&&g>=h&&g<=d&&l[g].loadError===0){const x=l[g];if(e.details===D.FRAG_GAP&&e.frag){const b=l[g].details;if(b){const A=ts(e.frag,b.fragments,e.frag.start);if(A!=null&&A.gap)continue}}else{if(f===se.AUDIO_TRACK&&p===x.audioGroupId||f===se.SUBTITLE_TRACK&&p===x.textGroupId)continue;if(u===W.AUDIO&&s.audioGroupId===x.audioGroupId||u===W.SUBTITLE&&s.textGroupId===x.textGroupId)continue}o=g;break}}if(o>-1&&i.loadLevel!==o)return e.levelRetry=!0,this.playlistError=0,{action:Ne.SendAlternateToPenaltyBox,flags:Qe.None,nextAutoLevel:o}}return{action:Ne.SendAlternateToPenaltyBox,flags:Qe.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var i;switch((i=t.errorAction)==null?void 0:i.action){case Ne.DoNothing:break;case Ne.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==D.FRAG_GAP&&(t.fatal=!0);break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,i=e.errorAction;if(!i)return;const{flags:s,hdcpLevel:n,nextAutoLevel:a}=i;switch(s){case Qe.None:this.switchLevel(e,a);break;case Qe.MoveAllAlternatesMatchingHost:i.resolved||(i.resolved=this.redundantFailover(e));break;case Qe.MoveAllAlternatesMatchingHDCP:n&&(t.maxHdcpLevel=An[An.indexOf(n)-1],i.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}i.resolved||this.switchLevel(e,a)}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)}redundantFailover(e){const{hls:t,penalizedRenditions:i}=this,s=e.parent===W.MAIN?e.level:t.loadLevel,n=t.levels[s],a=n.url.length,o=e.frag?e.frag.urlId:n.urlId;n.urlId===o&&(!e.frag||n.details)&&this.penalizeRendition(n,e);for(let l=1;l<a;l++){const c=(o+l)%a,h=i[c];if(!h||Ef(h,e,i[o]))return this.warn(`Switching to Redundant Stream ${c+1}/${a}: "${n.url[c]}" after ${e.details}`),this.playlistError=0,t.levels.forEach(d=>{d.urlId=c}),t.nextLoadLevel=s,!0}return!1}penalizeRendition(e,t){const{penalizedRenditions:i}=this,s=i[e.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};s.lastErrorPerfMs=performance.now(),s.errors.push(t),s.details=e.details,i[e.urlId]=s}}function Ef(r,e,t){if(performance.now()-r.lastErrorPerfMs>bf)return!0;const i=r.details;if(e.details===D.FRAG_GAP&&i&&e.frag){const s=e.frag.start,n=ts(null,i.fragments,s);if(n&&!n.gap)return!0}if(t&&r.errors.length<t.errors.length){const s=r.errors[r.errors.length-1];if(i&&s.frag&&e.frag&&Math.abs(s.frag.start-e.frag.start)>i.targetduration*3)return!0}return!1}class wn{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=S.log.bind(S,`${t}:`),this.warn=S.warn.bind(S,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){clearTimeout(this.timer),this.timer=-1}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t){const i=t==null?void 0:t.renditionReports;if(i){let s=-1;for(let n=0;n<i.length;n++){const a=i[n];let o;try{o=new self.URL(a.URI,t.url).href}catch(l){S.warn(`Could not construct new URL for Rendition Report: ${l}`),o=a.URI||""}if(o===e){s=n;break}else o===e.substring(0,o.length)&&(s=n)}if(s!==-1){const n=i[s],a=parseInt(n["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let o=parseInt(n["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const l=Math.min(t.age-t.partTarget,t.targetduration);o>=0&&l>t.partTarget&&(o+=1)}return new yl(a,o>=0?o:void 0,$i.No)}}}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,i){const{details:s,stats:n}=t,a=self.performance.now(),o=n.loading.first?Math.max(0,a-n.loading.first):0;if(s.advancedDateTime=Date.now()-o,s.live||i!=null&&i.live){if(s.reloaded(i),i&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),i&&s.fragments.length>0&&df(i,s),!this.canLoad||!s.live)return;let l,c,h;if(s.canBlockReload&&s.endSN&&s.advanced){const g=this.hls.config.lowLatencyMode,x=s.lastPartSn,b=s.endSN,A=s.lastPartIndex,y=A!==-1,T=x===b,w=g?0:A;y?(c=T?b+1:x,h=T?w:A+1):c=b+1;const L=s.age,I=L+s.ageHeader;let R=Math.min(I-s.partTarget,s.targetduration*1.5);if(R>0){if(i&&R>i.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${i.tuneInGoal} to: ${R} with playlist age: ${s.age}`),R=0;else{const E=Math.floor(R/s.targetduration);if(c+=E,h!==void 0){const M=Math.round(R%s.targetduration/s.partTarget);h+=M}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${L.toFixed(2)}s goal: ${R} skip sn ${E} to part ${h}`)}s.tuneInGoal=R}if(l=this.getDeliveryDirectives(s,t.deliveryDirectives,c,h),g||!T){this.loadPlaylist(l);return}}else(s.canBlockReload||s.canSkipUntil)&&(l=this.getDeliveryDirectives(s,t.deliveryDirectives,c,h));const d=this.hls.mainForwardBufferInfo,u=d?d.end-d.len:0,f=(s.edge-u)*1e3,p=mf(s,f);s.updated&&a>this.requestScheduled+p&&(this.requestScheduled=n.loading.start),c!==void 0&&s.canBlockReload?this.requestScheduled=n.loading.first+p-(s.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+p<a?this.requestScheduled=a:this.requestScheduled-a<=0&&(this.requestScheduled+=p);let m=this.requestScheduled-a;m=Math.max(0,m),this.log(`reload live playlist ${e} in ${Math.round(m)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(l),m)}else this.clearTimer()}getDeliveryDirectives(e,t,i,s){let n=hf(e,i);return t!=null&&t.skip&&e.deltaUpdateFailed&&(i=t.msn,s=t.part,n=$i.No),new yl(i,s,n)}checkRetry(e){const t=e.details,i=zs(e),s=e.errorAction,{action:n,retryCount:a=0,retryConfig:o}=s||{},l=!!s&&!!o&&(n===Ne.RetryRequest||!s.resolved&&n===Ne.SendAlternateToPenaltyBox);if(l){var c;if(this.requestScheduled=-1,a>=o.maxNumRetry)return!1;if(i&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const h=En(o,a);this.timer=self.setTimeout(()=>this.loadPlaylist(),h),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${h}ms`)}e.levelRetry=!0,s.resolved=!0}return l}}let Ln;class Sf extends wn{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-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(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this),e.on(v.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this),e.off(v.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}startLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.startLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const i=[],s={};let n;t.levels.forEach(a=>{var o;const l=a.attrs;((o=a.audioCodec)==null?void 0:o.indexOf("mp4a.40.34"))!==-1&&(Ln||(Ln=/chrome|firefox/i.test(navigator.userAgent)),Ln&&(a.audioCodec=void 0));const{AUDIO:c,CODECS:h,"FRAME-RATE":d,"PATHWAY-ID":u,RESOLUTION:f,SUBTITLES:p}=l,g=`${`${u||"."}-`}${a.bitrate}-${f}-${d}-${h}`;n=s[g],n?n.addFallback(a):(n=new es(a),s[g]=n,i.push(n)),Ws(n,"audio",c),Ws(n,"text",p)}),this.filterAndSortMediaOptions(i,t)}filterAndSortMediaOptions(e,t){let i=[],s=[],n=!1,a=!1,o=!1,l=e.filter(({audioCodec:f,videoCodec:p,width:m,height:g,unknownCodecs:x})=>(n||(n=!!(m&&g)),a||(a=!!p),o||(o=!!f),!(x!=null&&x.length)&&(!f||mn(f,"audio"))&&(!p||mn(p,"video"))));if((n||a)&&o&&(l=l.filter(({videoCodec:f,width:p,height:m})=>!!f||!!(p&&m))),l.length===0){Promise.resolve().then(()=>{if(this.hls){const f=new Error("no level with compatible codecs found in manifest");this.hls.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:f,reason:f.message})}});return}t.audioTracks&&(i=t.audioTracks.filter(f=>!f.audioCodec||mn(f.audioCodec,"audio")),Ll(i)),t.subtitles&&(s=t.subtitles,Ll(s));const c=l.slice(0);l.sort((f,p)=>f.attrs["HDCP-LEVEL"]!==p.attrs["HDCP-LEVEL"]?(f.attrs["HDCP-LEVEL"]||"")>(p.attrs["HDCP-LEVEL"]||"")?1:-1:f.bitrate!==p.bitrate?f.bitrate-p.bitrate:f.attrs["FRAME-RATE"]!==p.attrs["FRAME-RATE"]?f.attrs.decimalFloatingPoint("FRAME-RATE")-p.attrs.decimalFloatingPoint("FRAME-RATE"):f.attrs.SCORE!==p.attrs.SCORE?f.attrs.decimalFloatingPoint("SCORE")-p.attrs.decimalFloatingPoint("SCORE"):n&&f.height!==p.height?f.height-p.height:0);let h=c[0];if(this.steering&&(l=this.steering.filterParsedLevels(l),l.length!==c.length)){for(let f=0;f<c.length;f++)if(c[f].pathwayId===l[0].pathwayId){h=c[f];break}}this._levels=l;for(let f=0;f<l.length;f++)if(l[f]===h){this._firstLevel=f,this.log(`manifest loaded, ${l.length} level(s) found, first bitrate: ${h.bitrate}`);break}const d=o&&!a,u={levels:l,audioTracks:i,subtitleTracks:s,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:o,video:a,altAudio:!d&&i.some(f=>!!f.url)};this.hls.trigger(v.MANIFEST_PARSED,u),(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"),d=e<0;if(this.hls.trigger(v.ERROR,{type:K.OTHER_ERROR,details:D.LEVEL_SWITCH_ERROR,level:e,fatal:d,error:h,reason:h.message}),d)return;e=Math.min(e,t.length-1)}const i=this.currentLevelIndex,s=this.currentLevel,n=s?s.attrs["PATHWAY-ID"]:void 0,a=t[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,i===e&&a.details&&s&&n===o)return;this.log(`Switching to level ${e}${o?" with Pathway "+o:""} from level ${i}${n?" with Pathway "+n:""}`);const l=Se({},a,{level:e,maxBitrate:a.maxBitrate,attrs:a.attrs,uri:a.uri,urlId:a.urlId});delete l._attrs,delete l._urlId,this.hls.trigger(v.LEVEL_SWITCHING,l);const c=a.details;if(!c||c.live){const h=this.switchParams(a.uri,s==null?void 0:s.details);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._firstLevel}else return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){t.fatal||!t.context||t.context.type===se.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragLoaded(e,{frag:t}){if(t!==void 0&&t.type===W.MAIN){const i=this._levels[t.level];i!==void 0&&(i.loadError=0)}}onLevelLoaded(e,t){var i;const{level:s,details:n}=t,a=this._levels[s];if(!a){var o;this.warn(`Invalid level index ${s}`),(o=t.deliveryDirectives)!=null&&o.skip&&(n.deltaUpdateFailed=!0);return}s===this.currentLevelIndex?(a.fragmentError===0&&(a.loadError=0),this.playlistLoaded(s,t,a.details)):(i=t.deliveryDirectives)!=null&&i.skip&&(n.deltaUpdateFailed=!0)}onAudioTrackSwitched(e,t){const i=this.currentLevel;if(!i)return;const s=this.hls.audioTracks[t.id].groupId;if(i.audioGroupIds&&i.audioGroupId!==s){let n=-1;for(let a=0;a<i.audioGroupIds.length;a++)if(i.audioGroupIds[a]===s){n=a;break}n!==-1&&n!==i.urlId&&(i.urlId=n,this.canLoad&&this.startLoad())}}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,i=this.currentLevel;if(i&&this.shouldLoadPlaylist(i)){const s=i.urlId;let n=i.uri;if(e)try{n=e.addDirectives(n)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}const a=i.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${a?" Pathway "+a:""} URI ${s+1}/${i.url.length} ${n}`),this.clearTimer(),this.hls.trigger(v.LEVEL_LOADING,{url:n,level:t,id:s,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,t){const i=(n,a)=>a!==t,s=this._levels.filter((n,a)=>a!==e?!0:n.url.length>1&&t!==void 0?(n.url=n.url.filter(i),n.audioGroupIds&&(n.audioGroupIds=n.audioGroupIds.filter(i)),n.textGroupIds&&(n.textGroupIds=n.textGroupIds.filter(i)),n.urlId=0,!0):(this.steering&&this.steering.removeLevel(n),!1));this.hls.trigger(v.LEVELS_UPDATED,{levels:s})}onLevelsUpdated(e,{levels:t}){t.forEach((i,s)=>{const{details:n}=i;n!=null&&n.fragments&&n.fragments.forEach(a=>{a.level=s})}),this._levels=t}}function Ws(r,e,t){t&&(e==="audio"?(r.audioGroupIds||(r.audioGroupIds=[]),r.audioGroupIds[r.url.length-1]=t):e==="text"&&(r.textGroupIds||(r.textGroupIds=[]),r.textGroupIds[r.url.length-1]=t))}function Ll(r){const e={};r.forEach(t=>{const i=t.groupId||"";t.id=e[i]=e[i]||0,e[i]++})}var Ce={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class wf{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(v.BUFFER_APPENDED,this.onBufferAppended,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(v.BUFFER_APPENDED,this.onBufferAppended,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const i=this.activePartLists[t];if(i)for(let s=i.length;s--;){const n=i[s];if(!n)break;const a=n.end;if(n.start<=e&&a!==null&&e<=a)return n}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:i}=this,s=Object.keys(i);for(let n=s.length;n--;){const a=i[s[n]];if((a==null?void 0:a.body.type)===t&&a.buffered){const o=a.body;if(o.start<=e&&e<=o.end)return o}}return null}detectEvictedFragments(e,t,i,s){this.timeRanges&&(this.timeRanges[e]=t);const n=(s==null?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach(a=>{const o=this.fragments[a];if(!o||n>=o.body.sn)return;if(!o.buffered&&!o.loaded){o.body.type===i&&this.removeFragment(o.body);return}const l=o.range[e];l&&l.time.some(c=>{const h=!this.isTimeBuffered(c.startPTS,c.endPTS,t);return h&&this.removeFragment(o.body),h})})}detectPartialFragments(e){const t=this.timeRanges,{frag:i,part:s}=e;if(!t||i.sn==="initSegment")return;const n=xi(i),a=this.fragments[n];if(!a||a.buffered&&i.gap)return;const o=!i.relurl;Object.keys(t).forEach(l=>{const c=i.elementaryStreams[l];if(!c)return;const h=t[l],d=o||c.partial===!0;a.range[l]=this.getBufferedTimes(i,s,d,h)}),a.loaded=null,Object.keys(a.range).length?(a.buffered=!0,(a.body.endList=i.endList||a.body.endList)&&(this.endListFragments[a.body.type]=a),Ys(a)||this.removeParts(i.sn-1,i.type)):this.removeFragment(a.body)}removeParts(e,t){const i=this.activePartLists[t];i&&(this.activePartLists[t]=i.filter(s=>s.fragment.sn>=e))}fragBuffered(e,t){const i=xi(e);let s=this.fragments[i];!s&&t&&(s=this.fragments[i]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(e,t,i,s){const n={time:[],partial:i},a=e.start,o=e.end,l=e.minEndPTS||o,c=e.maxStartPTS||a;for(let h=0;h<s.length;h++){const d=s.start(h)-this.bufferPadding,u=s.end(h)+this.bufferPadding;if(c>=d&&l<=u){n.time.push({startPTS:Math.max(a,s.start(h)),endPTS:Math.min(o,s.end(h))});break}else if(a<u&&o>d)n.partial=!0,n.time.push({startPTS:Math.max(a,s.start(h)),endPTS:Math.min(o,s.end(h))});else if(o<=d)break}return n}getPartialFragment(e){let t=null,i,s,n,a=0;const{bufferPadding:o,fragments:l}=this;return Object.keys(l).forEach(c=>{const h=l[c];h&&Ys(h)&&(s=h.body.start-o,n=h.body.end+o,e>=s&&e<=n&&(i=Math.min(e-s,n-e),a<=i&&(t=h.body,a=i)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||Ys(t))}getState(e){const t=xi(e),i=this.fragments[t];return i?i.buffered?Ys(i)?Ce.PARTIAL:Ce.OK:Ce.APPENDING:Ce.NOT_LOADED}isTimeBuffered(e,t,i){let s,n;for(let a=0;a<i.length;a++){if(s=i.start(a)-this.bufferPadding,n=i.end(a)+this.bufferPadding,e>=s&&t<=n)return!0;if(t<=s)return!1}return!1}onFragLoaded(e,t){const{frag:i,part:s}=t;if(i.sn==="initSegment"||i.bitrateTest)return;const n=s?null:t,a=xi(i);this.fragments[a]={body:i,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:i,part:s,timeRanges:n}=t;if(i.sn==="initSegment")return;const a=i.type;if(s){let o=this.activePartLists[a];o||(this.activePartLists[a]=o=[]),o.push(s)}this.timeRanges=n,Object.keys(n).forEach(o=>{const l=n[o];this.detectEvictedFragments(o,l,a,s)})}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=xi(e);return!!this.fragments[t]}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,i,s,n){s&&!this.hasGaps||Object.keys(this.fragments).forEach(a=>{const o=this.fragments[a];if(!o)return;const l=o.body;l.type!==i||s&&!l.gap||l.start<t&&l.end>e&&(o.buffered||n)&&this.removeFragment(l)})}removeFragment(e){const t=xi(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const i=this.activePartLists[e.type];if(i){const s=e.sn;this.activePartLists[e.type]=i.filter(n=>n.fragment.sn!==s)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function Ys(r){var e,t,i;return r.buffered&&(r.body.gap||((e=r.range.video)==null?void 0:e.partial)||((t=r.range.audio)==null?void 0:t.partial)||((i=r.range.audiovideo)==null?void 0:i.partial))}function xi(r){return`${r.type}_${r.level}_${r.urlId}_${r.sn}`}const Rl=Math.pow(2,17);class Lf{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const i=e.url;if(!i)return Promise.reject(new St({type:K.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${i?"part list":"url"}`),networkDetails:null}));this.abort();const s=this.config,n=s.fLoader,a=s.loader;return new Promise((o,l)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(f=>f[0]==="GAP")){l(Il(e));return}else e.gap=!1;const c=this.loader=e.loader=n?new n(s):new a(s),h=Cl(e),d=Sl(s.fragLoadPolicy.default),u={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Rl};e.stats=c.stats,c.load(h,u,{onSuccess:(f,p,m,g)=>{this.resetLoader(e,c);let x=f.data;m.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(x.slice(0,16)),x=x.slice(16)),o({frag:e,part:null,payload:x,networkDetails:g})},onError:(f,p,m,g)=>{this.resetLoader(e,c),l(new St({type:K.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:Ve({url:i,data:void 0},f),error:new Error(`HTTP Error ${f.code} ${f.text}`),networkDetails:m,stats:g}))},onAbort:(f,p,m)=>{this.resetLoader(e,c),l(new St({type:K.NETWORK_ERROR,details:D.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:m,stats:f}))},onTimeout:(f,p,m)=>{this.resetLoader(e,c),l(new St({type:K.NETWORK_ERROR,details:D.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${u.timeout}ms`),networkDetails:m,stats:f}))},onProgress:(f,p,m,g)=>{t&&t({frag:e,part:null,payload:m,networkDetails:g})}})})}loadPart(e,t,i){this.abort();const s=this.config,n=s.fLoader,a=s.loader;return new Promise((o,l)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){l(Il(e,t));return}const c=this.loader=e.loader=n?new n(s):new a(s),h=Cl(e,t),d=Sl(s.fragLoadPolicy.default),u={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Rl};t.stats=c.stats,c.load(h,u,{onSuccess:(f,p,m,g)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const x={frag:e,part:t,payload:f.data,networkDetails:g};i(x),o(x)},onError:(f,p,m,g)=>{this.resetLoader(e,c),l(new St({type:K.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:Ve({url:h.url,data:void 0},f),error:new Error(`HTTP Error ${f.code} ${f.text}`),networkDetails:m,stats:g}))},onAbort:(f,p,m)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),l(new St({type:K.NETWORK_ERROR,details:D.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:m,stats:f}))},onTimeout:(f,p,m)=>{this.resetLoader(e,c),l(new St({type:K.NETWORK_ERROR,details:D.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${u.timeout}ms`),networkDetails:m,stats:f}))}})})}updateStatsFromPart(e,t){const i=e.stats,s=t.stats,n=s.total;if(i.loaded+=s.loaded,n){const l=Math.round(e.duration/t.duration),c=Math.min(Math.round(i.loaded/n),l),d=(l-c)*Math.round(i.loaded/c);i.total=i.loaded+d}else i.total=Math.max(i.loaded,i.total);const a=i.loading,o=s.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Cl(r,e=null){const t=e||r,i={frag:r,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},s=t.byteRangeStartOffset,n=t.byteRangeEndOffset;if(j(s)&&j(n)){var a;let o=s,l=n;if(r.sn==="initSegment"&&((a=r.decryptdata)==null?void 0:a.method)==="AES-128"){const c=n-s;c%16&&(l=n+(16-c%16)),s!==0&&(i.resetIV=!0,o=s-16)}i.rangeStart=o,i.rangeEnd=l}return i}function Il(r,e){const t=new Error(`GAP ${r.gap?"tag":"attribute"} found`),i={type:K.MEDIA_ERROR,details:D.FRAG_GAP,fatal:!1,frag:r,error:t,networkDetails:null};return e&&(i.part=e),(e||r).stats.aborted=!0,new St(i)}class St extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Rf{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const t in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[t].loader;if(i){if(e&&e!==i.context.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=D.KEY_LOAD_ERROR,i,s,n){return new St({type:K.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:n,error:i,networkDetails:s})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:i,cc:s}=e;for(let n=0;n<t.length;n++){const a=t[n];if(s<=a.cc&&(i==="initSegment"||a.sn==="initSegment"||i<a.sn)){this.emeController.selectKeySystemFormat(a).then(o=>{a.setKeyFormat(o)});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 i,s;t&&e.setKeyFormat(t);const n=e.decryptdata;if(!n){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,D.KEY_LOAD_ERROR,c))}const a=n.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,D.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if((i=o)!=null&&i.decryptdata.key)return n.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});if((s=o)!=null&&s.keyLoadPromise){var l;switch((l=o.mediaKeySessionContext)==null?void 0:l.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then(c=>(n.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:o}))}}switch(o=this.keyUriToKeyInfo[a]={decryptdata:n,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},n.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return n.keyFormat==="identity"?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,D.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${n.method}"`)))}}loadKeyEME(e,t){const i={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const s=this.emeController.loadKey(i);if(s)return(e.keyLoadPromise=s.then(n=>(e.mediaKeySessionContext=n,i))).catch(n=>{throw e.keyLoadPromise=null,n})}return Promise.resolve(i)}loadKeyHTTP(e,t){const i=this.config,s=i.loader,n=new s(i);return t.keyLoader=e.loader=n,e.keyLoadPromise=new Promise((a,o)=>{const l={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=i.keyLoadPolicy.default,h={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(u,f,p,m)=>{const{frag:g,keyInfo:x,url:b}=p;if(!g.decryptdata||x!==this.keyUriToKeyInfo[b])return o(this.createKeyLoadError(g,D.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),m));x.decryptdata.key=g.decryptdata.key=new Uint8Array(u.data),g.keyLoader=null,x.loader=null,a({frag:g,keyInfo:x})},onError:(u,f,p,m)=>{this.resetLoader(f),o(this.createKeyLoadError(t,D.KEY_LOAD_ERROR,new Error(`HTTP Error ${u.code} loading key ${u.text}`),p,Ve({url:l.url,data:void 0},u)))},onTimeout:(u,f,p)=>{this.resetLoader(f),o(this.createKeyLoadError(t,D.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),p))},onAbort:(u,f,p)=>{this.resetLoader(f),o(this.createKeyLoadError(t,D.INTERNAL_ABORTED,new Error("key loading aborted"),p))}};n.load(l,h,d)})}resetLoader(e){const{frag:t,keyInfo:i,url:s}=e,n=i.loader;t.keyLoader===n&&(t.keyLoader=null,i.loader=null),delete this.keyUriToKeyInfo[s],n&&n.destroy()}}class Cf{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}const If={length:0,start:()=>0,end:()=>0};class ce{static isBuffered(e,t){try{if(e){const i=ce.getBuffered(e);for(let s=0;s<i.length;s++)if(t>=i.start(s)&&t<=i.end(s))return!0}}catch{}return!1}static bufferInfo(e,t,i){try{if(e){const s=ce.getBuffered(e),n=[];let a;for(a=0;a<s.length;a++)n.push({start:s.start(a),end:s.end(a)});return this.bufferedInfo(n,t,i)}}catch{}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,i){t=Math.max(0,t),e.sort(function(c,h){const d=c.start-h.start;return d||h.end-c.end});let s=[];if(i)for(let c=0;c<e.length;c++){const h=s.length;if(h){const d=s[h-1].end;e[c].start-d<i?e[c].end>d&&(s[h-1].end=e[c].end):s.push(e[c])}else s.push(e[c])}else s=e;let n=0,a,o=t,l=t;for(let c=0;c<s.length;c++){const h=s[c].start,d=s[c].end;if(t+i>=h&&t<d)o=h,l=d,n=l-t;else if(t+i<h){a=h;break}}return{len:n,start:o||0,end:l||0,nextStart:a}}static getBuffered(e){try{return e.buffered}catch(t){return S.log("failed to get media.buffered",t),If}}}class Rn{constructor(e,t,i,s=0,n=-1,a=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=Xs(),this.buffering={audio:Xs(),video:Xs(),audiovideo:Xs()},this.level=e,this.sn=t,this.id=i,this.size=s,this.part=n,this.partial=a}}function Xs(){return{start:0,executeStart:0,executeEnd:0,end:0}}function Dl(r,e){let t=null;for(let i=0,s=r.length;i<s;i++){const n=r[i];if(n&&n.cc===e){t=n;break}}return t}function Df(r,e,t){return!!(e.details&&(t.endCC>t.startCC||r&&r.cc<t.startCC))}function Pf(r,e,t=0){const i=r.fragments,s=e.fragments;if(!s.length||!i.length){S.log("No fragments to align");return}const n=Dl(i,s[0].cc);if(!n||n&&!n.startPTS){S.log("No frag in previous level to align on");return}return n}function Pl(r,e){if(r){const t=r.start+e;r.start=r.startPTS=t,r.endPTS=t+r.duration}}function Cn(r,e){const t=e.fragments;for(let i=0,s=t.length;i<s;i++)Pl(t[i],r);e.fragmentHint&&Pl(e.fragmentHint,r),e.alignedSliding=!0}function kf(r,e,t){e&&(Of(r,t,e),!t.alignedSliding&&e.details&&Mf(t,e.details),!t.alignedSliding&&e.details&&!t.skippedSegments&&Al(e.details,t))}function Of(r,e,t){if(Df(r,t,e)){const i=Pf(t.details,e);i&&j(i.start)&&(S.log(`Adjusting PTS using last level due to CC increase within current level ${e.url}`),Cn(i.start,e))}}function Mf(r,e){if(!e.fragments.length||!r.hasProgramDateTime||!e.hasProgramDateTime)return;const t=e.fragments[0].programDateTime,i=r.fragments[0].programDateTime,s=(i-t)/1e3+e.fragments[0].start;s&&j(s)&&(S.log(`Adjusting PTS using programDateTime delta ${i-t}ms, sliding:${s.toFixed(3)} ${r.url} `),Cn(s,r))}function kl(r,e){if(!r.hasProgramDateTime||!e.hasProgramDateTime)return;const t=r.fragments,i=e.fragments;if(!t.length||!i.length)return;const s=Math.round(i.length/2)-1,n=i[s],a=Dl(t,n.cc)||t[Math.round(t.length/2)-1],o=n.programDateTime,l=a.programDateTime;if(o===null||l===null)return;const c=(l-o)/1e3-(a.start-n.start);Cn(c,r)}class Ff{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class Nf{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function Uf(r){const e=r.byteLength,t=e&&new DataView(r.buffer).getUint8(e-1);return t?_t(r,0,e-t):r}class Bf{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),i=new Uint32Array(4);for(let s=0;s<4;s++)i[s]=t.getUint32(s*4);return i}initTable(){const e=this.sBox,t=this.invSBox,i=this.subMix,s=i[0],n=i[1],a=i[2],o=i[3],l=this.invSubMix,c=l[0],h=l[1],d=l[2],u=l[3],f=new Uint32Array(256);let p=0,m=0,g=0;for(g=0;g<256;g++)g<128?f[g]=g<<1:f[g]=g<<1^283;for(g=0;g<256;g++){let x=m^m<<1^m<<2^m<<3^m<<4;x=x>>>8^x&255^99,e[p]=x,t[x]=p;const b=f[p],A=f[b],y=f[A];let T=f[x]*257^x*16843008;s[p]=T<<24|T>>>8,n[p]=T<<16|T>>>16,a[p]=T<<8|T>>>24,o[p]=T,T=y*16843009^A*65537^b*257^p*16843008,c[x]=T<<24|T>>>8,h[x]=T<<16|T>>>16,d[x]=T<<8|T>>>24,u[x]=T,p?(p=b^f[f[f[y^b]]],m^=f[f[m]]):p=m=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let i=!0,s=0;for(;s<t.length&&i;)i=t[s]===this.key[s],s++;if(i)return;this.key=t;const n=this.keySize=t.length;if(n!==4&&n!==6&&n!==8)throw new Error("Invalid aes key size="+n);const a=this.ksRows=(n+6+1)*4;let o,l;const c=this.keySchedule=new Uint32Array(a),h=this.invKeySchedule=new Uint32Array(a),d=this.sBox,u=this.rcon,f=this.invSubMix,p=f[0],m=f[1],g=f[2],x=f[3];let b,A;for(o=0;o<a;o++){if(o<n){b=c[o]=t[o];continue}A=b,o%n===0?(A=A<<8|A>>>24,A=d[A>>>24]<<24|d[A>>>16&255]<<16|d[A>>>8&255]<<8|d[A&255],A^=u[o/n|0]<<24):n>6&&o%n===4&&(A=d[A>>>24]<<24|d[A>>>16&255]<<16|d[A>>>8&255]<<8|d[A&255]),c[o]=b=(c[o-n]^A)>>>0}for(l=0;l<a;l++)o=a-l,l&3?A=c[o]:A=c[o-4],l<4||o<=4?h[l]=A:h[l]=p[d[A>>>24]]^m[d[A>>>16&255]]^g[d[A>>>8&255]]^x[d[A&255]],h[l]=h[l]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,i){const s=this.keySize+6,n=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,l=o[0],c=o[1],h=o[2],d=o[3],u=this.uint8ArrayToUint32Array_(i);let f=u[0],p=u[1],m=u[2],g=u[3];const x=new Int32Array(e),b=new Int32Array(x.length);let A,y,T,w,L,I,R,E,M,k,U,Y,V,B;const z=this.networkToHostOrderSwap;for(;t<x.length;){for(M=z(x[t]),k=z(x[t+1]),U=z(x[t+2]),Y=z(x[t+3]),L=M^n[0],I=Y^n[1],R=U^n[2],E=k^n[3],V=4,B=1;B<s;B++)A=l[L>>>24]^c[I>>16&255]^h[R>>8&255]^d[E&255]^n[V],y=l[I>>>24]^c[R>>16&255]^h[E>>8&255]^d[L&255]^n[V+1],T=l[R>>>24]^c[E>>16&255]^h[L>>8&255]^d[I&255]^n[V+2],w=l[E>>>24]^c[L>>16&255]^h[I>>8&255]^d[R&255]^n[V+3],L=A,I=y,R=T,E=w,V=V+4;A=a[L>>>24]<<24^a[I>>16&255]<<16^a[R>>8&255]<<8^a[E&255]^n[V],y=a[I>>>24]<<24^a[R>>16&255]<<16^a[E>>8&255]<<8^a[L&255]^n[V+1],T=a[R>>>24]<<24^a[E>>16&255]<<16^a[L>>8&255]<<8^a[I&255]^n[V+2],w=a[E>>>24]<<24^a[L>>16&255]<<16^a[I>>8&255]<<8^a[R&255]^n[V+3],b[t]=z(A^f),b[t+1]=z(w^p),b[t+2]=z(T^m),b[t+3]=z(y^g),f=M,p=k,m=U,g=Y,t=t+4}return b.buffer}}const Hf=16;class In{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch{}this.subtle===null&&(this.useSoftware=!0)}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const i=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Uf(i):i}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,i){return this.useSoftware?new Promise((s,n)=>{this.softwareDecrypt(new Uint8Array(e),t,i);const a=this.flush();a?s(a.buffer):n(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,i)}softwareDecrypt(e,t,i){const{currentIV:s,currentResult:n,remainderData:a}=this;this.logOnce("JS AES decrypt"),a&&(e=$t(a,e),this.remainderData=null);const o=this.getValidChunk(e);if(!o.length)return null;s&&(i=s);let l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new Bf),l.expandKey(t);const c=n;return this.currentResult=l.decrypt(o.buffer,0,i),this.currentIV=_t(o,-16).buffer,c||null}webCryptoDecrypt(e,t,i){const s=this.subtle;return(this.key!==t||!this.fastAesKey)&&(this.key=t,this.fastAesKey=new Nf(s,t)),this.fastAesKey.expandKey().then(n=>s?(this.logOnce("WebCrypto AES decrypt"),new Ff(s,new Uint8Array(i)).decrypt(e.buffer,n)):Promise.reject(new Error("web crypto not initialized"))).catch(n=>(S.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${n.name}: ${n.message}`),this.onWebCryptoError(e,t,i)))}onWebCryptoError(e,t,i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,i);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const i=e.length-e.length%Hf;return i!==e.length&&(t=_t(e,0,i),this.remainderData=_t(e,i)),t}logOnce(e){this.logEnabled&&(S.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Gf={toString:function(r){let e="";const t=r.length;for(let i=0;i<t;i++)e+=`[${r.start(i).toFixed(3)}-${r.end(i).toFixed(3)}]`;return e}},O={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class Dn extends Cf{constructor(e,t,i,s,n){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=O.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=n,this.logPrefix=s,this.log=S.log.bind(S,`${s}:`),this.warn=S.warn.bind(S,`${s}:`),this.hls=e,this.fragmentLoader=new Lf(e.config),this.keyLoader=i,this.fragmentTracker=t,this.config=e.config,this.decrypter=new In(e.config),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=O.STOPPED}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const i=t.partList;if(i!=null&&i.length){const n=i[i.length-1];return ce.isBuffered(this.media,n.start+n.duration/2)}const s=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(s)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levels[this.levelLastLoaded])==null?void 0:e.details}}onMediaAttached(e,t){const i=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("ended",this.onvended);const s=this.config;this.levels&&s.autoStartLoad&&this.state===O.STOPPED&&this.startLoad(s.startPosition)}onMediaDetaching(){const e=this.media;e!=null&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:i,mediaBuffer:s,state:n}=this,a=i?i.currentTime:0,o=ce.bufferInfo(s||i,a,e.maxBufferHole);if(this.log(`media seeking to ${j(a)?a.toFixed(3):a}, state: ${n}`),this.state===O.ENDED)this.resetLoadingState();else if(t){const l=e.maxFragLookUpTolerance,c=t.start-l,h=t.start+t.duration+l;if(!o.len||h<o.start||c>o.end){const d=a>h;(a<c||d)&&(d&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}i&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),this.lastCurrentTime=a),!this.loadedmetadata&&!o.len&&(this.nextLoadPosition=this.startPosition=a),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.stopLoad(),super.onHandlerDestroying()}onHandlerDestroyed(){this.state=O.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,i){this._loadFragForPlayback(e,t,i)}_loadFragForPlayback(e,t,i){const s=n=>{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${n.part?" p: "+n.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(n)};this._doFragLoad(e,t,i,s).then(n=>{if(!n)return;const a=this.state;if(this.fragContextChanged(e)){(a===O.FRAG_LOADING||!this.fragCurrent&&a===O.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=O.IDLE);return}"payload"in n&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(v.FRAG_LOADED,n)),this._handleFragmentLoadComplete(n)}).catch(n=>{this.state===O.STOPPED||this.state===O.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:i}=this;if(i.getState(e)===Ce.APPENDING){const n=e.type,a=this.getFwdBufferInfo(this.mediaBuffer,n),o=Math.max(e.duration,a?a.len:this.config.maxBufferLength);this.reduceMaxBufferLength(o)&&i.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?i.removeAllFragments():i.hasParts(e.type)&&(i.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),i.getState(e)===Ce.PARTIAL&&i.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,i=null){if(!(e-t))return;const s={startOffset:e,endOffset:t,type:i};this.hls.trigger(v.BUFFER_FLUSHING,s)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(i=>{if(!i||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return i}).then(i=>{const{hls:s}=this,{payload:n}=i,a=e.decryptdata;if(n&&n.byteLength>0&&a&&a.key&&a.iv&&a.method==="AES-128"){const o=self.performance.now();return this.decrypter.decrypt(new Uint8Array(n),a.key.buffer,a.iv.buffer).catch(l=>{throw s.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:e}),l}).then(l=>{const c=self.performance.now();return s.trigger(v.FRAG_DECRYPTED,{frag:e,payload:l,stats:{tstart:o,tdecrypt:c}}),i.payload=l,i})}return i}).then(i=>{const{fragCurrent:s,hls:n,levels:a}=this;if(!a)throw new Error("init load aborted, missing levels");const o=e.stats;this.state=O.IDLE,t.fragmentError=0,e.data=new Uint8Array(i.payload),o.parsing.start=o.buffering.start=self.performance.now(),o.parsing.end=o.buffering.end=self.performance.now(),i.frag===s&&n.trigger(v.FRAG_BUFFERED,{stats:o,frag:s,part:null,id:e.type}),this.tick()}).catch(i=>{this.state===O.STOPPED||this.state===O.ERROR||(this.warn(i),this.resetFragmentLoading(e))})}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId}fragBufferedComplete(e,t){var i,s,n,a;const o=this.mediaBuffer?this.mediaBuffer:this.media;this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===W.MAIN?"level":"track"} ${e.level} (frag:[${((i=e.startPTS)!=null?i:NaN).toFixed(3)}-${((s=e.endPTS)!=null?s:NaN).toFixed(3)}] > buffer:${o?Gf.toString(ce.getBuffered(o)):"(detached)"})`),this.state=O.IDLE,o&&(!this.loadedmetadata&&e.type==W.MAIN&&o.buffered.length&&((n=this.fragCurrent)==null?void 0:n.sn)===((a=this.fragPrevious)==null?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:i,part:s,partsLoaded:n}=e,a=!n||n.length===0||n.some(l=>!l),o=new Rn(i.level,i.sn,i.stats.chunkCount+1,0,s?s.index:-1,!a);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,i=null,s){var n;const a=t==null?void 0:t.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;if(e.encrypted&&!((n=e.decryptdata)!=null&&n.key)?(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${e.level}`),this.state=O.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then(h=>{if(!this.fragContextChanged(h.frag))return this.hls.trigger(v.KEY_LOADED,h),this.state===O.KEY_LOADING&&(this.state=O.IDLE),h}),this.hls.trigger(v.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(e,a.encryptedFragments),i=Math.max(e.start,i||0),this.config.lowLatencyMode&&e.sn!=="initSegment"){const h=a.partList;if(h&&s){i>e.end&&a.fragmentHint&&(e=a.fragmentHint);const d=this.getNextPart(h,e,i);if(d>-1){const u=h[d];this.log(`Loading part sn: ${e.sn} p: ${u.index} cc: ${e.cc} of playlist [${a.startSN}-${a.endSN}] parts [0-${d}-${h.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),this.nextLoadPosition=u.start+u.duration,this.state=O.FRAG_LOADING;let f;return o?f=o.then(p=>!p||this.fragContextChanged(p.frag)?null:this.doFragPartsLoad(e,u,t,s)).catch(p=>this.handleFragLoadError(p)):f=this.doFragPartsLoad(e,u,t,s).catch(p=>this.handleFragLoadError(p)),this.hls.trigger(v.FRAG_LOADING,{frag:e,part:u,targetBufferTime:i}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):f}else if(!e.url||this.loadedEndOfParts(h,i))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${a?"of ["+a.startSN+"-"+a.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),j(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=O.FRAG_LOADING;const l=this.config.progressive;let c;return l&&o?c=o.then(h=>!h||this.fragContextChanged(h==null?void 0:h.frag)?null:this.fragmentLoader.load(e,s)).catch(h=>this.handleFragLoadError(h)):c=Promise.all([this.fragmentLoader.load(e,l?s:void 0),o]).then(([h])=>(!l&&h&&s&&s(h),h)).catch(h=>this.handleFragLoadError(h)),this.hls.trigger(v.FRAG_LOADING,{frag:e,targetBufferTime:i}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):c}doFragPartsLoad(e,t,i,s){return new Promise((n,a)=>{var o;const l=[],c=(o=i.details)==null?void 0:o.partList,h=d=>{this.fragmentLoader.loadPart(e,d,s).then(u=>{l[d.index]=u;const f=u.part;this.hls.trigger(v.FRAG_LOADED,u);const p=bl(i,e.sn,d.index+1)||Tl(c,e.sn,d.index+1);if(p)h(p);else return n({frag:e,part:f,partsLoaded:l})}).catch(a)};h(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===D.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(v.ERROR,t)}else this.hls.trigger(v.ERROR,{type:K.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==O.PARSING){!this.fragCurrent&&this.state!==O.STOPPED&&this.state!==O.ERROR&&(this.state=O.IDLE);return}const{frag:i,part:s,level:n}=t,a=self.performance.now();i.stats.parsing.end=a,s&&(s.stats.parsing.end=a),this.updateLevelTiming(i,s,n,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:i}=this,{level:s,sn:n,part:a}=e;if(!(t!=null&&t[s]))return this.warn(`Levels object was unset while buffering fragment ${n} of level ${s}. The current chunk will not be buffered.`),null;const o=t[s],l=a>-1?bl(o,n,a):null,c=l?l.fragment:gf(o,n,i);return c?(i&&i!==c&&(c.stats=i.stats),{frag:c,part:l,level:o}):null}bufferFragmentData(e,t,i,s,n){var a;if(!e||this.state!==O.PARSING)return;const{data1:o,data2:l}=e;let c=o;if(o&&l&&(c=$t(o,l)),!((a=c)!=null&&a.length))return;const h={type:e.type,frag:t,part:i,chunkMeta:s,parent:t.type,data:c};if(this.hls.trigger(v.BUFFER_APPENDING,h),e.dropped&&e.independent&&!i){if(n)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!ce.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const i=t.currentTime,s=ce.bufferInfo(t,i,0),n=e.duration,a=Math.min(this.config.maxFragLookUpTolerance*2,n*.25),o=Math.max(Math.min(e.start-a,s.end-a),i+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){const i=this.getLoadPosition();return j(i)?this.getFwdBufferInfoAtPos(e,i,t):null}getFwdBufferInfoAtPos(e,t,i){const{config:{maxBufferHole:s}}=this,n=ce.bufferInfo(e,t,s);if(n.len===0&&n.nextStart!==void 0){const a=this.fragmentTracker.getBufferedFrag(t,i);if(a&&n.nextStart<a.end)return ce.bufferInfo(e,t,Math.max(n.nextStart,s))}return n}getMaxBufferLength(e){const{config:t}=this;let i;return e?i=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):i=t.maxBufferLength,Math.min(i,t.maxMaxBufferLength)}reduceMaxBufferLength(e){const t=this.config,i=e||t.maxBufferLength;return t.maxMaxBufferLength>=i?(t.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${t.maxMaxBufferLength}s`),!0):!1}getAppendedFrag(e,t=W.MAIN){const i=this.fragmentTracker.getAppendedFrag(e,W.MAIN);return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const i=t.fragments,s=i.length;if(!s)return null;const{config:n}=this,a=i[0].start;let o;if(t.live){const l=n.initialLiveManifestSize;if(s<l)return this.warn(`Not enough fragments to start playback (have: ${s}, need: ${l})`),null;!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(o=this.getInitialLiveFragment(t,i),this.startPosition=o?this.hls.liveSyncPosition||o.start:e)}else e<=a&&(o=i[0]);if(!o){const l=n.lowLatencyMode?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,l,t)}return this.mapToInitFragWhenRequired(o)}isLoopLoading(e,t){const i=this.fragmentTracker.getState(e);return(i===Ce.OK||i===Ce.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,i,s,n){const a=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(o===null)return o;if(e=o,a&&e&&!e.gap&&i.nextStart){const l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,i.nextStart,s);if(l!==null&&i.len+l.len>=n)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,i){let s=-1,n=!1,a=!0;for(let o=0,l=e.length;o<l;o++){const c=e[o];if(a=a&&!c.independent,s>-1&&i<c.start)break;const h=c.loaded;h?s=-1:(n||c.independent||a)&&c.fragment===t&&(s=o),n=h}return s}loadedEndOfParts(e,t){const i=e[e.length-1];return i&&t>i.start&&i.loaded}getInitialLiveFragment(e,t){const i=this.fragPrevious;let s=null;if(i){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${i.programDateTime}`),s=yf(t,i.endProgramDateTime,this.config.maxFragLookUpTolerance)),!s){const n=i.sn+1;if(n>=e.startSN&&n<=e.endSN){const a=t[n-e.startSN];i.cc===a.cc&&(s=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=Af(t,i.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const n=this.hls.liveSyncPosition;n!==null&&(s=this.getFragmentAtPosition(n,this.bitrateTest?e.fragmentEnd:e.edge,e))}return s}getFragmentAtPosition(e,t,i){const{config:s}=this;let{fragPrevious:n}=this,{fragments:a,endSN:o}=i;const{fragmentHint:l}=i,c=s.maxFragLookUpTolerance,h=i.partList,d=!!(s.lowLatencyMode&&h!=null&&h.length&&l);d&&l&&!this.bitrateTest&&(a=a.concat(l),o=l.sn);let u;if(e<t){const f=e>t-c?0:c;u=ts(n,a,e,f)}else u=a[a.length-1];if(u){const f=u.sn-i.startSN,p=this.fragmentTracker.getState(u);if((p===Ce.OK||p===Ce.PARTIAL&&u.gap)&&(n=u),n&&u.sn===n.sn&&(!d||h[0].fragment.sn>u.sn)&&n&&u.level===n.level){const g=a[f+1];u.sn<o&&this.fragmentTracker.getState(g)!==Ce.OK?u=g:u=null}}return u}synchronizeToLiveEdge(e){const{config:t,media:i}=this;if(!i)return;const s=this.hls.liveSyncPosition,n=i.currentTime,a=e.fragments[0].start,o=e.edge,l=n>=a-t.maxFragLookUpTolerance&&n<=o;if(s!==null&&i.duration>s&&(n<s||!l)){const c=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!l&&i.readyState<4||n<o-c)&&(this.loadedmetadata||(this.nextLoadPosition=s),i.readyState&&(this.warn(`Playback: ${n.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${s.toFixed(3)}`),i.currentTime=s))}}alignPlaylists(e,t){const{levels:i,levelLastLoaded:s,fragPrevious:n}=this,a=s!==null?i[s]:null,o=e.fragments.length;if(!o)return this.warn("No fragments in live playlist"),0;const l=e.fragments[0].start,c=!t,h=e.alignedSliding&&j(l);if(c||!h&&!l){kf(n,a,e);const d=e.fragments[0].start;return this.log(`Live playlist sliding: ${d.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${n?n.sn:"na"} fragments: ${o}`),d}return l}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let i=this.startPosition;if(i<t&&(i=-1),i===-1||this.lastCurrentTime===-1){const s=this.startTimeOffset!==null,n=s?this.startTimeOffset:e.startTimeOffset;n!==null&&j(n)?(i=t+n,n<0&&(i+=e.totalduration),i=Math.min(Math.max(t,i),t+e.totalduration),this.log(`Start time offset ${n} found in ${s?"multivariant":"media"} playlist, adjust startPosition to ${i}`),this.startPosition=i):e.live?i=this.hls.liveSyncPosition||t:this.startPosition=i=0,this.lastCurrentTime=i}this.nextLoadPosition=i}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&e.sn!=="initSegment"&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==O.FRAG_LOADING_WAITING_RETRY)&&(this.state=O.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const d=this.getCurrentContext(t.chunkMeta);d&&(t.frag=d.frag)}const i=t.frag;if(!i||i.type!==e||!this.levels)return;if(this.fragContextChanged(i)){var s;this.warn(`Frag load error must match current frag to retry ${i.url} > ${(s=this.fragCurrent)==null?void 0:s.url}`);return}const n=t.details===D.FRAG_GAP;n&&this.fragmentTracker.fragBuffered(i,!0);const a=t.errorAction,{action:o,retryCount:l=0,retryConfig:c}=a||{};if(a&&o===Ne.RetryRequest&&c){var h;this.resetStartWhenNotLoaded((h=this.levelLastLoaded)!=null?h:i.level);const d=En(c,l);this.warn(`Fragment ${i.sn} of ${e} ${i.level} errored with ${t.details}, retrying loading ${l+1}/${c.maxNumRetry} in ${d}ms`),a.resolved=!0,this.retryDate=self.performance.now()+d,this.state=O.FRAG_LOADING_WAITING_RETRY}else c&&a?(this.resetFragmentErrors(e),l<c.maxNumRetry?n||(a.resolved=!0):S.warn(`${t.details} reached or exceeded max retry (${l})`)):(a==null?void 0:a.action)===Ne.SendAlternateToPenaltyBox?this.state=O.WAITING_LEVEL:this.state=O.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===O.PARSING||this.state===O.PARSED){const t=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,t),s=i&&i.len>.5;s&&this.reduceMaxBufferLength(i.len);const n=!s;return n&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),n}return!1}resetFragmentErrors(e){e===W.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==O.STOPPED&&(this.state=O.IDLE)}afterBufferFlushed(e,t,i){if(!e)return;const s=ce.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,s,i),this.state===O.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=O.IDLE}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=this.levels?this.levels[e].details:null;t!=null&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){var t;this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded((t=this.levelLastLoaded)!=null?t:e.level),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,i,s){var n;const a=i.details;if(!a){this.warn("level.details undefined");return}if(Object.keys(e.elementaryStreams).reduce((l,c)=>{const h=e.elementaryStreams[c];if(h){const d=h.endPTS-h.startPTS;if(d<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${d})`),l||!1;const u=s?0:xl(a,e,h.startPTS,h.endPTS,h.startDTS,h.endDTS);return this.hls.trigger(v.LEVEL_PTS_UPDATED,{details:a,level:i,drift:u,type:c,frag:e,start:h.startPTS,end:h.endPTS}),!0}return l},!1))i.fragmentError=0;else if(((n=this.transmuxer)==null?void 0:n.error)===null){const l=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(i.fragmentError===0&&(i.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(l.message),this.hls.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,error:l,frag:e,reason:`Found no media in msn ${e.sn} of level "${i.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=O.PARSED,this.hls.trigger(v.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){if(e.event==="demuxerWorker"){var t,i,s;this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded((t=(i=this.levelLastLoaded)!=null?i:(s=this.fragCurrent)==null?void 0:s.level)!=null?t:0),this.resetLoadingState()}}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Ol(){return self.SourceBuffer||self.WebKitSourceBuffer}function Vf(){const r=Vs();if(!r)return!1;const e=Ol(),t=r&&typeof r.isTypeSupported=="function"&&r.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!t&&!!i}function jf(){var r;const e=Ol();return typeof(e==null||(r=e.prototype)==null?void 0:r.changeType)=="function"}function zf(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Kf(){const r=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),e=self.URL.createObjectURL(r);return{worker:new self.Worker(e),objectURL:e}}function Wf(r){const e=new self.URL(r,self.location.href).href;return{worker:new self.Worker(e),scriptURL:e}}function pt(r="",e=9e4){return{type:r,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class Ml{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,i,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,i){}demux(e,t){this.cachedData&&(e=$t(this.cachedData,e),this.cachedData=null);let i=Us(e,0),s=i?i.length:0,n;const a=this._audioTrack,o=this._id3Track,l=i?Lu(i):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&j(l))&&(this.basePTS=Yf(l,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),i&&i.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:at.audioId3,duration:Number.POSITIVE_INFINITY});s<c;){if(this.canParse(e,s)){const h=this.appendFrame(a,e,s);h?(this.frameIndex++,this.lastPTS=h.sample.pts,s+=h.length,n=s):s=c}else wu(e,s)?(i=Us(e,s),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:at.audioId3,duration:Number.POSITIVE_INFINITY}),s+=i.length,n=s):s++;if(s===c&&n!==c){const h=_t(e,n);this.cachedData?this.cachedData=$t(this.cachedData,h):this.cachedData=h}}return{audioTrack:a,videoTrack:pt(),id3Track:o,textTrack:pt()}}demuxSampleAes(e,t,i){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:pt(),id3Track:this._id3Track,textTrack:pt()}}destroy(){}}const Yf=(r,e,t)=>{if(j(r))return r*90;const i=t?t.baseTime*9e4/t.timescale:0;return e*9e4+i};function Xf(r,e,t,i){let s,n,a,o;const l=navigator.userAgent.toLowerCase(),c=i,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((e[t+2]&192)>>>6)+1;const d=(e[t+2]&60)>>>2;if(d>h.length-1){r.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!0,reason:`invalid ADTS sampling index:${d}`});return}return a=(e[t+2]&1)<<2,a|=(e[t+3]&192)>>>6,S.log(`manifest codec:${i}, ADTS type:${s}, samplingIndex:${d}`),/firefox/i.test(l)?d>=6?(s=5,o=new Array(4),n=d-3):(s=2,o=new Array(2),n=d):l.indexOf("android")!==-1?(s=2,o=new Array(2),n=d):(s=5,o=new Array(4),i&&(i.indexOf("mp4a.40.29")!==-1||i.indexOf("mp4a.40.5")!==-1)||!i&&d>=6?n=d-3:((i&&i.indexOf("mp4a.40.2")!==-1&&(d>=6&&a===1||/vivaldi/i.test(l))||!i&&a===1)&&(s=2,o=new Array(2)),n=d)),o[0]=s<<3,o[0]|=(d&14)>>1,o[1]|=(d&1)<<7,o[1]|=a<<3,s===5&&(o[1]|=(n&14)>>1,o[2]=(n&1)<<7,o[2]|=8,o[3]=0),{config:o,samplerate:h[d],channelCount:a,codec:"mp4a.40."+s,manifestCodec:c}}function Fl(r,e){return r[e]===255&&(r[e+1]&246)===240}function Nl(r,e){return r[e+1]&1?7:9}function Pn(r,e){return(r[e+3]&3)<<11|r[e+4]<<3|(r[e+5]&224)>>>5}function qf(r,e){return e+5<r.length}function qs(r,e){return e+1<r.length&&Fl(r,e)}function Zf(r,e){return qf(r,e)&&Fl(r,e)&&Pn(r,e)<=r.length-e}function Jf(r,e){if(qs(r,e)){const t=Nl(r,e);if(e+t>=r.length)return!1;const i=Pn(r,e);if(i<=t)return!1;const s=e+i;return s===r.length||qs(r,s)}return!1}function Ul(r,e,t,i,s){if(!r.samplerate){const n=Xf(e,t,i,s);if(!n)return;r.config=n.config,r.samplerate=n.samplerate,r.channelCount=n.channelCount,r.codec=n.codec,r.manifestCodec=n.manifestCodec,S.log(`parsed codec:${r.codec}, rate:${n.samplerate}, channels:${n.channelCount}`)}}function Bl(r){return 9216e4/r}function Qf(r,e){const t=Nl(r,e);if(e+t<=r.length){const i=Pn(r,e)-t;if(i>0)return{headerLength:t,frameLength:i}}}function Hl(r,e,t,i,s){const n=Bl(r.samplerate),a=i+s*n,o=Qf(e,t);let l;if(o){const{frameLength:d,headerLength:u}=o,f=u+d,p=Math.max(0,t+f-e.length);p?(l=new Uint8Array(f-u),l.set(e.subarray(t+u,e.length),0)):l=e.subarray(t+u,t+f);const m={unit:l,pts:a};return p||r.samples.push(m),{sample:m,length:f,missing:p}}const c=e.length-t;return l=new Uint8Array(c),l.set(e.subarray(t,e.length),0),{sample:{unit:l,pts:a},length:c,missing:-1}}class _f extends Ml{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;let i=(Us(e,0)||[]).length;for(let s=e.length;i<s;i++)if(Jf(e,i))return S.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Zf(e,t)}appendFrame(e,t,i){Ul(e,this.observer,t,i,e.manifestCodec);const s=Hl(e,t,i,this.basePTS,this.frameIndex);if(s&&s.missing===0)return s}}const $f=/\/emsg[-/]ID3/i;class e0{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,i,s){const n=this.videoTrack=pt("video",1),a=this.audioTrack=pt("audio",1),o=this.txtTrack=pt("text",1);if(this.id3Track=pt("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const l=Qo(e);if(l.video){const{id:c,timescale:h,codec:d}=l.video;n.id=c,n.timescale=o.timescale=h,n.codec=d}if(l.audio){const{id:c,timescale:h,codec:d}=l.audio;a.id=c,a.timescale=h,a.codec=d}o.id=qo.text,n.sampleDuration=0,n.duration=a.duration=s}resetContiguity(){this.remainderData=null}static probe(e){return e=e.length>16384?e.subarray(0,16384):e,te(e,["moof"]).length>0}demux(e,t){this.timeOffset=t;let i=e;const s=this.videoTrack,n=this.txtTrack;if(this.config.progressive){this.remainderData&&(i=$t(this.remainderData,e));const o=Vu(i);this.remainderData=o.remainder,s.samples=o.valid||new Uint8Array}else s.samples=i;const a=this.extractID3Track(s,t);return n.samples=$o(t,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,i=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(t,this.timeOffset);return i.samples=$o(e,t),{videoTrack:t,audioTrack:pt(),id3Track:s,textTrack:pt()}}extractID3Track(e,t){const i=this.id3Track;if(e.samples.length){const s=te(e.samples,["emsg"]);s&&s.forEach(n=>{const a=Ku(n);if($f.test(a.schemeIdUri)){const o=j(a.presentationTime)?a.presentationTime/a.timeScale:t+a.presentationTimeDelta/a.timeScale;let l=a.eventDuration===4294967295?Number.POSITIVE_INFINITY:a.eventDuration/a.timeScale;l<=.001&&(l=Number.POSITIVE_INFINITY);const c=a.payload;i.samples.push({data:c,len:c.byteLength,dts:o,pts:o,type:at.emsg,duration:l})}})}return i}demuxSampleAes(e,t,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}let Zs=null;const t0=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],i0=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],s0=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],r0=[0,1,1,4];function Gl(r,e,t,i,s){if(t+24>e.length)return;const n=Vl(e,t);if(n&&t+n.frameLength<=e.length){const a=n.samplesPerFrame*9e4/n.sampleRate,o=i+s*a,l={unit:e.subarray(t,t+n.frameLength),pts:o,dts:o};return r.config=[],r.channelCount=n.channelCount,r.samplerate=n.sampleRate,r.samples.push(l),{sample:l,length:n.frameLength,missing:0}}}function Vl(r,e){const t=r[e+1]>>3&3,i=r[e+1]>>1&3,s=r[e+2]>>4&15,n=r[e+2]>>2&3;if(t!==1&&s!==0&&s!==15&&n!==3){const a=r[e+2]>>1&1,o=r[e+3]>>6,l=t===3?3-i:i===3?3:4,c=t0[l*14+s-1]*1e3,d=i0[(t===3?0:t===2?1:2)*3+n],u=o===3?1:2,f=s0[t][i],p=r0[i],m=f*8*p,g=Math.floor(f*c/d+a)*p;if(Zs===null){const A=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Zs=A?parseInt(A[1]):0}return!!Zs&&Zs<=87&&i===2&&c>=224e3&&o===0&&(r[e+3]=r[e+3]|128),{sampleRate:d,channelCount:u,frameLength:g,samplesPerFrame:m}}}function kn(r,e){return r[e]===255&&(r[e+1]&224)===224&&(r[e+1]&6)!==0}function jl(r,e){return e+1<r.length&&kn(r,e)}function n0(r,e){return kn(r,e)&&4<=r.length-e}function a0(r,e){if(e+1<r.length&&kn(r,e)){const i=Vl(r,e);let s=4;i!=null&&i.frameLength&&(s=i.frameLength);const n=e+s;return n===r.length||jl(r,n)}return!1}class zl{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,i=e.byteLength-t,s=new Uint8Array(4),n=Math.min(4,t);if(n===0)throw new Error("no bytes available");s.set(e.subarray(i,i+n)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=n*8,this.bytesAvailable-=n}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const i=this.word>>>32-t;if(e>32&&S.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?i<<t|this.readBits(t):i}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t=8,i=8,s;for(let n=0;n<e;n++)i!==0&&(s=this.readEG(),i=(t+s+256)%256),t=i===0?t:i}readSPS(){let e=0,t=0,i=0,s=0,n,a,o;const l=this.readUByte.bind(this),c=this.readBits.bind(this),h=this.readUEG.bind(this),d=this.readBoolean.bind(this),u=this.skipBits.bind(this),f=this.skipEG.bind(this),p=this.skipUEG.bind(this),m=this.skipScalingList.bind(this);l();const g=l();if(c(5),u(3),l(),p(),g===100||g===110||g===122||g===244||g===44||g===83||g===86||g===118||g===128){const w=h();if(w===3&&u(1),p(),p(),u(1),d())for(a=w!==3?8:12,o=0;o<a;o++)d()&&(o<6?m(16):m(64))}p();const x=h();if(x===0)h();else if(x===1)for(u(1),f(),f(),n=h(),o=0;o<n;o++)f();p(),u(1);const b=h(),A=h(),y=c(1);y===0&&u(1),u(1),d()&&(e=h(),t=h(),i=h(),s=h());let T=[1,1];if(d()&&d())switch(l()){case 1:T=[1,1];break;case 2:T=[12,11];break;case 3:T=[10,11];break;case 4:T=[16,11];break;case 5:T=[40,33];break;case 6:T=[24,11];break;case 7:T=[20,11];break;case 8:T=[32,11];break;case 9:T=[80,33];break;case 10:T=[18,11];break;case 11:T=[15,11];break;case 12:T=[64,33];break;case 13:T=[160,99];break;case 14:T=[4,3];break;case 15:T=[3,2];break;case 16:T=[2,1];break;case 255:{T=[l()<<8|l(),l()<<8|l()];break}}return{width:Math.ceil((b+1)*16-e*2-t*2),height:(2-y)*(A+1)*16-(y?2:4)*(i+s),pixelRatio:T}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class o0{constructor(e,t,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new In(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,i){const s=e[t].unit;if(s.length<=16)return;const n=s.subarray(16,s.length-s.length%16),a=n.buffer.slice(n.byteOffset,n.byteOffset+n.length);this.decryptBuffer(a).then(o=>{const l=new Uint8Array(o);s.set(l,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,i)})}decryptAacSamples(e,t,i){for(;;t++){if(t>=e.length){i();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,i),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,i=new Int8Array(t);let s=0;for(let n=32;n<e.length-16;n+=160,s+=16)i.set(e.subarray(n,n+16),s);return i}getAvcDecryptedUnit(e,t){const i=new Uint8Array(t);let s=0;for(let n=32;n<e.length-16;n+=160,s+=16)e.set(i.subarray(s,s+16),n);return e}decryptAvcSample(e,t,i,s,n){const a=tl(n.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then(l=>{n.data=this.getAvcDecryptedUnit(a,l),this.decrypter.isSync()||this.decryptAvcSamples(e,t,i+1,s)})}decryptAvcSamples(e,t,i,s){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,i=0){if(t>=e.length){s();return}const n=e[t].units;for(;!(i>=n.length);i++){const a=n[i];if(!(a.data.length<=48||a.type!==1&&a.type!==5)&&(this.decryptAvcSample(e,t,i,s,a),!this.decrypter.isSync()))return}}}}const Ue=188;class kt{constructor(e,t,i){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=i}static probe(e){const t=kt.syncOffset(e);return t>0&&S.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),t!==-1}static syncOffset(e){const t=e.length;let i=Math.min(Ue*5,e.length-Ue)+1,s=0;for(;s<i;){let n=!1,a=-1,o=0;for(let l=s;l<t;l+=Ue)if(e[l]===71){if(o++,a===-1&&(a=l,a!==0&&(i=Math.min(a+Ue*99,e.length-Ue)+1)),n||(n=On(e,l)===0),n&&o>1&&(a===0&&o>2||l+Ue>i))return a}else{if(o)return-1;break}s++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:qo[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,i,s){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=kt.createTrack("video"),this._audioTrack=kt.createTrack("audio",s),this._id3Track=kt.createTrack("id3"),this._txtTrack=kt.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=i,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_avcTrack:t,_id3Track:i}=this;e&&(e.pesData=null),t&&(t.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null}demux(e,t,i=!1,s=!1){i||(this.sampleAes=null);let n;const a=this._avcTrack,o=this._audioTrack,l=this._id3Track,c=this._txtTrack;let h=a.pid,d=a.pesData,u=o.pid,f=l.pid,p=o.pesData,m=l.pesData,g=null,x=this.pmtParsed,b=this._pmtId,A=e.length;if(this.remainderData&&(e=$t(this.remainderData,e),A=e.length,this.remainderData=null),A<Ue&&!s)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:l,textTrack:c};const y=Math.max(0,kt.syncOffset(e));A-=(A-y)%Ue,A<e.byteLength&&!s&&(this.remainderData=new Uint8Array(e.buffer,A,e.buffer.byteLength-A));let T=0;for(let L=y;L<A;L+=Ue)if(e[L]===71){const I=!!(e[L+1]&64),R=On(e,L),E=(e[L+3]&48)>>4;let M;if(E>1){if(M=L+5+e[L+4],M===L+Ue)continue}else M=L+4;switch(R){case h:I&&(d&&(n=Ai(d))&&this.parseAVCPES(a,c,n,!1),d={data:[],size:0}),d&&(d.data.push(e.subarray(M,L+Ue)),d.size+=L+Ue-M);break;case u:if(I){if(p&&(n=Ai(p)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,n);break;case"mp3":this.parseMPEGPES(o,n);break}p={data:[],size:0}}p&&(p.data.push(e.subarray(M,L+Ue)),p.size+=L+Ue-M);break;case f:I&&(m&&(n=Ai(m))&&this.parseID3PES(l,n),m={data:[],size:0}),m&&(m.data.push(e.subarray(M,L+Ue)),m.size+=L+Ue-M);break;case 0:I&&(M+=e[M]+1),b=this._pmtId=l0(e,M);break;case b:{I&&(M+=e[M]+1);const k=c0(e,M,this.typeSupported,i);h=k.avc,h>0&&(a.pid=h),u=k.audio,u>0&&(o.pid=u,o.segmentCodec=k.segmentCodec),f=k.id3,f>0&&(l.pid=f),g!==null&&!x&&(S.warn(`MPEG-TS PMT found at ${L} after unknown PID '${g}'. Backtracking to sync byte @${y} to parse all TS packets.`),g=null,L=y-188),x=this.pmtParsed=!0;break}case 17:case 8191:break;default:g=R;break}}else T++;if(T>0){const L=new Error(`Found ${T} TS packet/s that do not start with 0x47`);this.observer.emit(v.ERROR,v.ERROR,{type:K.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,error:L,reason:L.message})}a.pesData=d,o.pesData=p,l.pesData=m;const w={audioTrack:o,videoTrack:a,id3Track:l,textTrack:c};return s&&this.extractRemainingSamples(w),w}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:i,id3Track:s,textTrack:n}=e,a=i.pesData,o=t.pesData,l=s.pesData;let c;if(a&&(c=Ai(a))?(this.parseAVCPES(i,n,c,!0),i.pesData=null):i.pesData=a,o&&(c=Ai(o))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break}t.pesData=null}else o!=null&&o.size&&S.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;l&&(c=Ai(l))?(this.parseID3PES(s,c),s.pesData=null):s.pesData=l}demuxSampleAes(e,t,i){const s=this.demux(e,i,!0,!this.config.progressive),n=this.sampleAes=new o0(this.observer,this.config,t);return this.decrypt(s,n)}decrypt(e,t){return new Promise(i=>{const{audioTrack:s,videoTrack:n}=e;s.samples&&s.segmentCodec==="aac"?t.decryptAacSamples(s.samples,0,()=>{n.samples?t.decryptAvcSamples(n.samples,0,0,()=>{i(e)}):i(e)}):n.samples&&t.decryptAvcSamples(n.samples,0,0,()=>{i(e)})})}destroy(){this._duration=0}parseAVCPES(e,t,i,s){const n=this.parseAVCNALu(e,i.data);let a=this.avcSample,o,l=!1;i.data=null,a&&n.length&&!e.audFound&&(is(a,e),a=this.avcSample=Js(!1,i.pts,i.dts,"")),n.forEach(c=>{var h;switch(c.type){case 1:{let u=!1;o=!0;const f=c.data;if(l&&f.length>4){const p=new zl(f).readSliceType();(p===2||p===4||p===7||p===9)&&(u=!0)}if(u){var d;(d=a)!=null&&d.frame&&!a.key&&(is(a,e),a=this.avcSample=null)}a||(a=this.avcSample=Js(!0,i.pts,i.dts,"")),a.frame=!0,a.key=u;break}case 5:o=!0,(h=a)!=null&&h.frame&&!a.key&&(is(a,e),a=this.avcSample=null),a||(a=this.avcSample=Js(!0,i.pts,i.dts,"")),a.key=!0,a.frame=!0;break;case 6:{o=!0,el(c.data,1,i.pts,t.samples);break}case 7:if(o=!0,l=!0,!e.sps){const u=c.data,p=new zl(u).readSPS();e.width=p.width,e.height=p.height,e.pixelRatio=p.pixelRatio,e.sps=[u],e.duration=this._duration;const m=u.subarray(1,4);let g="avc1.";for(let x=0;x<3;x++){let b=m[x].toString(16);b.length<2&&(b="0"+b),g+=b}e.codec=g}break;case 8:o=!0,e.pps||(e.pps=[c.data]);break;case 9:o=!1,e.audFound=!0,a&&is(a,e),a=this.avcSample=Js(!1,i.pts,i.dts,"");break;case 12:o=!0;break;default:o=!1,a&&(a.debug+="unknown NAL "+c.type+" ");break}a&&o&&a.units.push(c)}),s&&a&&(is(a,e),this.avcSample=null)}getLastNalUnit(e){var t;let i=this.avcSample,s;if((!i||i.units.length===0)&&(i=e[e.length-1]),(t=i)!=null&&t.units){const n=i.units;s=n[n.length-1]}return s}parseAVCNALu(e,t){const i=t.byteLength;let s=e.naluState||0;const n=s,a=[];let o=0,l,c,h,d=-1,u=0;for(s===-1&&(d=0,u=t[0]&31,s=0,o=1);o<i;){if(l=t[o++],!s){s=l?0:1;continue}if(s===1){s=l?0:2;continue}if(!l)s=3;else if(l===1){if(d>=0){const f={data:t.subarray(d,o-s-1),type:u};a.push(f)}else{const f=this.getLastNalUnit(e.samples);if(f&&(n&&o<=4-n&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-n)),c=o-s-1,c>0)){const p=new Uint8Array(f.data.byteLength+c);p.set(f.data,0),p.set(t.subarray(0,c),f.data.byteLength),f.data=p,f.state=0}}o<i?(h=t[o]&31,d=o,u=h,s=0):s=-1}else s=0}if(d>=0&&s>=0){const f={data:t.subarray(d,i),type:u,state:s};a.push(f)}if(a.length===0){const f=this.getLastNalUnit(e.samples);if(f){const p=new Uint8Array(f.data.byteLength+t.byteLength);p.set(f.data,0),p.set(t,f.data.byteLength),f.data=p}}return e.naluState=s,a}parseAACPES(e,t){let i=0;const s=this.aacOverFlow;let n=t.data;if(s){this.aacOverFlow=null;const d=s.missing,u=s.sample.unit.byteLength;if(d===-1){const f=new Uint8Array(u+n.byteLength);f.set(s.sample.unit,0),f.set(n,u),n=f}else{const f=u-d;s.sample.unit.set(n.subarray(0,d),f),e.samples.push(s.sample),i=s.missing}}let a,o;for(a=i,o=n.length;a<o-1&&!qs(n,a);a++);if(a!==i){let d;const u=a<o-1;u?d=`AAC PES did not start with ADTS header,offset:${a}`:d="No ADTS header found in AAC PES";const f=new Error(d);if(S.warn(`parsing error: ${d}`),this.observer.emit(v.ERROR,v.ERROR,{type:K.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,levelRetry:u,error:f,reason:d}),!u)return}Ul(e,this.observer,n,a,this.audioCodec);let l;if(t.pts!==void 0)l=t.pts;else if(s){const d=Bl(e.samplerate);l=s.sample.pts+d}else{S.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,h;for(;a<o;)if(h=Hl(e,n,a,l,c),a+=h.length,h.missing){this.aacOverFlow=h;break}else for(c++;a<o-1&&!qs(n,a);a++);}parseMPEGPES(e,t){const i=t.data,s=i.length;let n=0,a=0;const o=t.pts;if(o===void 0){S.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<s;)if(jl(i,a)){const l=Gl(e,i,a,o,n);if(l)a+=l.length,n++;else break}else a++}parseID3PES(e,t){if(t.pts===void 0){S.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const i=Se({},t,{type:this._avcTrack?at.emsg:at.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(i)}}function Js(r,e,t,i){return{key:r,frame:!1,pts:e,dts:t,units:[],debug:i,length:0}}function On(r,e){return((r[e+1]&31)<<8)+r[e+2]}function l0(r,e){return(r[e+10]&31)<<8|r[e+11]}function c0(r,e,t,i){const s={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},n=(r[e+1]&15)<<8|r[e+2],a=e+3+n-4,o=(r[e+10]&15)<<8|r[e+11];for(e+=12+o;e<a;){const l=On(r,e);switch(r[e]){case 207:if(!i){S.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:s.audio===-1&&(s.audio=l);break;case 21:s.id3===-1&&(s.id3=l);break;case 219:if(!i){S.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:s.avc===-1&&(s.avc=l);break;case 3:case 4:t.mpeg!==!0&&t.mp3!==!0?S.log("MPEG audio found, not supported in this browser"):s.audio===-1&&(s.audio=l,s.segmentCodec="mp3");break;case 36:S.warn("Unsupported HEVC stream type found");break}e+=((r[e+3]&15)<<8|r[e+4])+5}return s}function Ai(r){let e=0,t,i,s,n,a;const o=r.data;if(!r||r.size===0)return null;for(;o[0].length<19&&o.length>1;){const c=new Uint8Array(o[0].length+o[1].length);c.set(o[0]),c.set(o[1],o[0].length),o[0]=c,o.splice(1,1)}if(t=o[0],(t[0]<<16)+(t[1]<<8)+t[2]===1){if(i=(t[4]<<8)+t[5],i&&i>r.size-6)return null;const c=t[7];c&192&&(n=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2,c&64?(a=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,n-a>54e5&&(S.warn(`${Math.round((n-a)/9e4)}s delta between PTS and DTS, align them`),n=a)):a=n),s=t[8];let h=s+9;if(r.size<=h)return null;r.size-=h;const d=new Uint8Array(r.size);for(let u=0,f=o.length;u<f;u++){t=o[u];let p=t.byteLength;if(h)if(h>p){h-=p;continue}else t=t.subarray(h),p-=h,h=0;d.set(t,e),e+=p}return i&&(i-=s+3),{data:d,pts:n,dts:a,len:i}}return null}function is(r,e){if(r.units.length&&r.frame){if(r.pts===void 0){const t=e.samples,i=t.length;if(i){const s=t[i-1];r.pts=s.pts,r.dts=s.dts}else{e.dropped++;return}}e.samples.push(r)}r.debug.length&&S.log(r.pts+"/"+r.dts+":"+r.debug)}class h0 extends Ml{resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;let i=(Us(e,0)||[]).length;for(let s=e.length;i<s;i++)if(a0(e,i))return S.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return n0(e,t)}appendFrame(e,t,i){if(this.basePTS!==null)return Gl(e,t,i,this.basePTS,this.frameIndex)}}class Kl{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const Ot=Math.pow(2,32)-1;class C{static init(){C.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in C.types)C.types.hasOwnProperty(e)&&(C.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);C.HDLR_TYPES={video:t,audio:i};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);C.STTS=C.STSC=C.STCO=n,C.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),C.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),C.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),C.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);C.FTYP=C.box(C.types.ftyp,a,l,a,o),C.DINF=C.box(C.types.dinf,C.box(C.types.dref,s))}static box(e,...t){let i=8,s=t.length;const n=s;for(;s--;)i+=t[s].byteLength;const a=new Uint8Array(i);for(a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=i&255,a.set(e,4),s=0,i=8;s<n;s++)a.set(t[s],i),i+=t[s].byteLength;return a}static hdlr(e){return C.box(C.types.hdlr,C.HDLR_TYPES[e])}static mdat(e){return C.box(C.types.mdat,e)}static mdhd(e,t){t*=e;const i=Math.floor(t/(Ot+1)),s=Math.floor(t%(Ot+1));return C.box(C.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255,85,196,0,0]))}static mdia(e){return C.box(C.types.mdia,C.mdhd(e.timescale,e.duration),C.hdlr(e.type),C.minf(e))}static mfhd(e){return C.box(C.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?C.box(C.types.minf,C.box(C.types.smhd,C.SMHD),C.DINF,C.stbl(e)):C.box(C.types.minf,C.box(C.types.vmhd,C.VMHD),C.DINF,C.stbl(e))}static moof(e,t,i){return C.box(C.types.moof,C.mfhd(e),C.traf(i,t))}static moov(e){let t=e.length;const i=[];for(;t--;)i[t]=C.trak(e[t]);return C.box.apply(null,[C.types.moov,C.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(C.mvex(e)))}static mvex(e){let t=e.length;const i=[];for(;t--;)i[t]=C.trex(e[t]);return C.box.apply(null,[C.types.mvex,...i])}static mvhd(e,t){t*=e;const i=Math.floor(t/(Ot+1)),s=Math.floor(t%(Ot+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return C.box(C.types.mvhd,n)}static sdtp(e){const t=e.samples||[],i=new Uint8Array(4+t.length);let s,n;for(s=0;s<t.length;s++)n=t[s].flags,i[s+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return C.box(C.types.sdtp,i)}static stbl(e){return C.box(C.types.stbl,C.stsd(e),C.box(C.types.stts,C.STTS),C.box(C.types.stsc,C.STSC),C.box(C.types.stsz,C.STSZ),C.box(C.types.stco,C.STCO))}static avc1(e){let t=[],i=[],s,n,a;for(s=0;s<e.sps.length;s++)n=e.sps[s],a=n.byteLength,t.push(a>>>8&255),t.push(a&255),t=t.concat(Array.prototype.slice.call(n));for(s=0;s<e.pps.length;s++)n=e.pps[s],a=n.byteLength,i.push(a>>>8&255),i.push(a&255),i=i.concat(Array.prototype.slice.call(n));const o=C.box(C.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(i))),l=e.width,c=e.height,h=e.pixelRatio[0],d=e.pixelRatio[1];return C.box(C.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,l&255,c>>8&255,c&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,C.box(C.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),C.box(C.types.pasp,new Uint8Array([h>>24,h>>16&255,h>>8&255,h&255,d>>24,d>>16&255,d>>8&255,d&255])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static mp4a(e){const t=e.samplerate;return C.box(C.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]),C.box(C.types.esds,C.esds(e)))}static mp3(e){const t=e.samplerate;return C.box(C.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0]))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?C.box(C.types.stsd,C.STSD,C.mp3(e)):C.box(C.types.stsd,C.STSD,C.mp4a(e)):C.box(C.types.stsd,C.STSD,C.avc1(e))}static tkhd(e){const t=e.id,i=e.duration*e.timescale,s=e.width,n=e.height,a=Math.floor(i/(Ot+1)),o=Math.floor(i%(Ot+1));return C.box(C.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>8&255,s&255,0,0,n>>8&255,n&255,0,0]))}static traf(e,t){const i=C.sdtp(e),s=e.id,n=Math.floor(t/(Ot+1)),a=Math.floor(t%(Ot+1));return C.box(C.types.traf,C.box(C.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255])),C.box(C.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,a>>24,a>>16&255,a>>8&255,a&255])),C.trun(e,i.length+16+20+8+16+8+8),i)}static trak(e){return e.duration=e.duration||4294967295,C.box(C.types.trak,C.tkhd(e),C.mdia(e))}static trex(e){const t=e.id;return C.box(C.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const i=e.samples||[],s=i.length,n=12+16*s,a=new Uint8Array(n);let o,l,c,h,d,u;for(t+=8+n,a.set([e.type==="video"?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,s&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),o=0;o<s;o++)l=i[o],c=l.duration,h=l.size,d=l.flags,u=l.cts,a.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,h>>>24&255,h>>>16&255,h>>>8&255,h&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&61440,d.degradPrio&15,u>>>24&255,u>>>16&255,u>>>8&255,u&255],12+16*o);return C.box(C.types.trun,a)}static initSegment(e){C.types||C.init();const t=C.moov(e),i=new Uint8Array(C.FTYP.byteLength+t.byteLength);return i.set(C.FTYP),i.set(t,C.FTYP.byteLength),i}}C.types=void 0,C.HDLR_TYPES=void 0,C.STTS=void 0,C.STSC=void 0,C.STCO=void 0,C.STSZ=void 0,C.VMHD=void 0,C.SMHD=void 0,C.STSD=void 0,C.FTYP=void 0,C.DINF=void 0;const Wl=9e4;function Mn(r,e,t=1,i=!1){const s=r*e*t;return i?Math.round(s):s}function d0(r,e,t=1,i=!1){return Mn(r,e,1/t,i)}function ss(r,e=!1){return Mn(r,1e3,1/Wl,e)}function u0(r,e=1){return Mn(r,Wl,1/e)}const f0=10*1e3,Yl=1024,p0=1152;let Qs=null,Fn=null;class Nn{constructor(e,t,i,s=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=i,this.ISGenerated=!1,Qs===null){const a=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Qs=a?parseInt(a[1]):0}if(Fn===null){const n=navigator.userAgent.match(/Safari\/(\d+)/i);Fn=n?parseInt(n[1]):0}}destroy(){}resetTimeStamp(e){S.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){S.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){S.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1}getVideoStartPts(e){let t=!1;const i=e.reduce((s,n)=>{const a=n.pts-s;return a<-4294967296?(t=!0,_e(s,n.pts)):a>0?s:n.pts},e[0].pts);return t&&S.debug("PTS rollover detected"),i}remux(e,t,i,s,n,a,o,l){let c,h,d,u,f,p,m=n,g=n;const x=e.pid>-1,b=t.pid>-1,A=t.samples.length,y=e.samples.length>0,T=o&&A>0||A>1;if((!x||y)&&(!b||T)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(e,t,n,a));const L=this.isVideoContiguous;let I=-1,R;if(T&&(I=m0(t.samples),!L&&this.config.forceKeyFrameOnDiscontinuity))if(p=!0,I>0){S.warn(`[mp4-remuxer]: Dropped ${I} out of ${A} video samples due to a missing keyframe`);const E=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(I),t.dropped+=I,g+=(t.samples[0].pts-E)/t.inputTimeScale,R=g}else I===-1&&(S.warn(`[mp4-remuxer]: No keyframe found out of ${A} video samples`),p=!1);if(this.ISGenerated){if(y&&T){const E=this.getVideoStartPts(t.samples),k=(_e(e.samples[0].pts,E)-E)/t.inputTimeScale;m+=Math.max(0,k),g+=Math.max(0,-k)}if(y){if(e.samplerate||(S.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,n,a)),h=this.remuxAudio(e,m,this.isAudioContiguous,a,b||T||l===W.AUDIO?g:void 0),T){const E=h?h.endPTS-h.startPTS:0;t.inputTimeScale||(S.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,n,a)),c=this.remuxVideo(t,g,L,E)}}else T&&(c=this.remuxVideo(t,g,L,0));c&&(c.firstKeyFrame=I,c.independent=I!==-1,c.firstKeyFramePTS=R)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(f=Xl(i,n,this._initPTS,this._initDTS)),s.samples.length&&(u=ql(s,n,this._initPTS))),{audio:h,video:c,initSegment:d,independent:p,text:u,id3:f}}generateIS(e,t,i,s){const n=e.samples,a=t.samples,o=this.typeSupported,l={},c=this._initPTS;let h=!c||s,d="audio/mp4",u,f,p;if(h&&(u=f=1/0),e.config&&n.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(d="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break}l.audio={id:"audio",container:d,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):C.initSegment([e]),metadata:{channelCount:e.channelCount}},h&&(p=e.inputTimeScale,!c||p!==c.timescale?u=f=n[0].pts-Math.round(p*i):h=!1)}if(t.sps&&t.pps&&a.length&&(t.timescale=t.inputTimeScale,l.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:C.initSegment([t]),metadata:{width:t.width,height:t.height}},h))if(p=t.inputTimeScale,!c||p!==c.timescale){const m=this.getVideoStartPts(a),g=Math.round(p*i);f=Math.min(f,_e(a[0].dts,m)-g),u=Math.min(u,m-g)}else h=!1;if(Object.keys(l).length)return this.ISGenerated=!0,h?(this._initPTS={baseTime:u,timescale:p},this._initDTS={baseTime:f,timescale:p}):u=p=void 0,{tracks:l,initPTS:u,timescale:p}}remuxVideo(e,t,i,s){const n=e.inputTimeScale,a=e.samples,o=[],l=a.length,c=this._initPTS;let h=this.nextAvcDts,d=8,u=this.videoSampleDuration,f,p,m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,x=!1;if(!i||h===null){const F=t*n,H=a[0].pts-_e(a[0].dts,a[0].pts);h=F-H}const b=c.baseTime*n/c.timescale;for(let F=0;F<l;F++){const H=a[F];H.pts=_e(H.pts-b,h),H.dts=_e(H.dts-b,h),H.dts<a[F>0?F-1:F].dts&&(x=!0)}x&&a.sort(function(F,H){const J=F.dts-H.dts,_=F.pts-H.pts;return J||_}),f=a[0].dts,p=a[a.length-1].dts;const A=p-f,y=A?Math.round(A/(l-1)):u||e.inputTimeScale/30;if(i){const F=f-h,H=F>y,J=F<-1;if((H||J)&&(H?S.warn(`AVC: ${ss(F,!0)} ms (${F}dts) hole between fragments detected, filling it`):S.warn(`AVC: ${ss(-F,!0)} ms (${F}dts) overlapping between fragments detected`),!J||h>=a[0].pts)){f=h;const _=a[0].pts-F;a[0].dts=f,a[0].pts=_,S.log(`Video: First PTS/DTS adjusted: ${ss(_,!0)}/${ss(f,!0)}, delta: ${ss(F,!0)} ms`)}}f=Math.max(0,f);let T=0,w=0;for(let F=0;F<l;F++){const H=a[F],J=H.units,_=J.length;let X=0;for(let ee=0;ee<_;ee++)X+=J[ee].data.length;w+=X,T+=_,H.length=X,H.dts=Math.max(H.dts,f),m=Math.min(H.pts,m),g=Math.max(H.pts,g)}p=a[l-1].dts;const L=w+4*T+8;let I;try{I=new Uint8Array(L)}catch(F){this.observer.emit(v.ERROR,v.ERROR,{type:K.MUX_ERROR,details:D.REMUX_ALLOC_ERROR,fatal:!1,error:F,bytes:L,reason:`fail allocating video mdat ${L}`});return}const R=new DataView(I.buffer);R.setUint32(0,L),I.set(C.types.mdat,4);let E=!1,M=Number.POSITIVE_INFINITY,k=Number.POSITIVE_INFINITY,U=Number.NEGATIVE_INFINITY,Y=Number.NEGATIVE_INFINITY;for(let F=0;F<l;F++){const H=a[F],J=H.units;let _=0;for(let oe=0,$=J.length;oe<$;oe++){const he=J[oe],ye=he.data,Ae=he.data.byteLength;R.setUint32(d,Ae),d+=4,I.set(ye,d),d+=Ae,_+=4+Ae}let X;if(F<l-1)u=a[F+1].dts-H.dts,X=a[F+1].pts-H.pts;else{const oe=this.config,$=F>0?H.dts-a[F-1].dts:y;if(X=F>0?H.pts-a[F-1].pts:y,oe.stretchShortVideoTrack&&this.nextAudioPts!==null){const he=Math.floor(oe.maxBufferHole*n),ye=(s?m+s*n:this.nextAudioPts)-H.pts;ye>he?(u=ye-$,u<0?u=$:E=!0,S.log(`[mp4-remuxer]: It is approximately ${ye/90} ms to the next segment; using duration ${u/90} ms for the last video frame.`)):u=$}else u=$}const ee=Math.round(H.pts-H.dts);M=Math.min(M,u),U=Math.max(U,u),k=Math.min(k,X),Y=Math.max(Y,X),o.push(new Zl(H.key,u,_,ee))}if(o.length){if(Qs){if(Qs<70){const F=o[0].flags;F.dependsOn=2,F.isNonSync=0}}else if(Fn&&Y-k<U-M&&y/U<.025&&o[0].cts===0){S.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let F=f;for(let H=0,J=o.length;H<J;H++){const _=F+o[H].duration,X=F+o[H].cts;if(H<J-1){const ee=_+o[H+1].cts;o[H].duration=ee-X}else o[H].duration=H?o[H-1].duration:y;o[H].cts=0,F=_}}}u=E||!u?y:u,this.nextAvcDts=h=p+u,this.videoSampleDuration=u,this.isVideoContiguous=!0;const V=C.moof(e.sequenceNumber++,f,Se({},e,{samples:o})),B="video",z={data1:V,data2:I,startPTS:m/n,endPTS:(g+u)/n,startDTS:f/n,endDTS:h/n,type:B,hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,z}remuxAudio(e,t,i,s,n){const a=e.inputTimeScale,o=e.samplerate?e.samplerate:a,l=a/o,c=e.segmentCodec==="aac"?Yl:p0,h=c*l,d=this._initPTS,u=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,f=[],p=n!==void 0;let m=e.samples,g=u?0:8,x=this.nextAudioPts||-1;const b=t*a,A=d.baseTime*a/d.timescale;if(this.isAudioContiguous=i=i||m.length&&x>0&&(s&&Math.abs(b-x)<9e3||Math.abs(_e(m[0].pts-A,b)-x)<20*h),m.forEach(function(B){B.pts=_e(B.pts-A,b)}),!i||x<0){if(m=m.filter(B=>B.pts>=0),!m.length)return;n===0?x=0:s&&!p?x=Math.max(0,b):x=m[0].pts}if(e.segmentCodec==="aac"){const B=this.config.maxAudioFramesDrift;for(let z=0,F=x;z<m.length;z++){const H=m[z],J=H.pts,_=J-F,X=Math.abs(1e3*_/a);if(_<=-B*h&&p)z===0&&(S.warn(`Audio frame @ ${(J/a).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*_/a)} ms.`),this.nextAudioPts=x=F=J);else if(_>=B*h&&X<f0&&p){let ee=Math.round(_/h);F=J-ee*h,F<0&&(ee--,F+=h),z===0&&(this.nextAudioPts=x=F),S.warn(`[mp4-remuxer]: Injecting ${ee} audio frame @ ${(F/a).toFixed(3)}s due to ${Math.round(1e3*_/a)} ms gap.`);for(let oe=0;oe<ee;oe++){const $=Math.max(F,0);let he=Kl.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);he||(S.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),he=H.unit.subarray()),m.splice(z,0,{unit:he,pts:$}),F+=h,z++}}H.pts=F,F+=h}}let y=null,T=null,w,L=0,I=m.length;for(;I--;)L+=m[I].unit.byteLength;for(let B=0,z=m.length;B<z;B++){const F=m[B],H=F.unit;let J=F.pts;if(T!==null){const X=f[B-1];X.duration=Math.round((J-T)/l)}else if(i&&e.segmentCodec==="aac"&&(J=x),y=J,L>0){L+=g;try{w=new Uint8Array(L)}catch(X){this.observer.emit(v.ERROR,v.ERROR,{type:K.MUX_ERROR,details:D.REMUX_ALLOC_ERROR,fatal:!1,error:X,bytes:L,reason:`fail allocating audio mdat ${L}`});return}u||(new DataView(w.buffer).setUint32(0,L),w.set(C.types.mdat,4))}else return;w.set(H,g);const _=H.byteLength;g+=_,f.push(new Zl(!0,c,_,0)),T=J}const R=f.length;if(!R)return;const E=f[f.length-1];this.nextAudioPts=x=T+l*E.duration;const M=u?new Uint8Array(0):C.moof(e.sequenceNumber++,y/l,Se({},e,{samples:f}));e.samples=[];const k=y/a,U=x/a,V={data1:M,data2:w,startPTS:k,endPTS:U,startDTS:k,endDTS:U,type:"audio",hasAudio:!0,hasVideo:!1,nb:R};return this.isAudioContiguous=!0,V}remuxEmptyAudio(e,t,i,s){const n=e.inputTimeScale,a=e.samplerate?e.samplerate:n,o=n/a,l=this.nextAudioPts,c=this._initDTS,h=c.baseTime*9e4/c.timescale,d=(l!==null?l:s.startDTS*n)+h,u=s.endDTS*n+h,f=o*Yl,p=Math.ceil((u-d)/f),m=Kl.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(S.warn("[mp4-remuxer]: remux empty Audio"),!m){S.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const g=[];for(let x=0;x<p;x++){const b=d+x*f;g.push({unit:m,pts:b,dts:b})}return e.samples=g,this.remuxAudio(e,t,i,!1)}}function _e(r,e){let t;if(e===null)return r;for(e<r?t=-8589934592:t=8589934592;Math.abs(r-e)>4294967296;)r+=t;return r}function m0(r){for(let e=0;e<r.length;e++)if(r[e].key)return e;return-1}function Xl(r,e,t,i){const s=r.samples.length;if(!s)return;const n=r.inputTimeScale;for(let o=0;o<s;o++){const l=r.samples[o];l.pts=_e(l.pts-t.baseTime*n/t.timescale,e*n)/n,l.dts=_e(l.dts-i.baseTime*n/i.timescale,e*n)/n}const a=r.samples;return r.samples=[],{samples:a}}function ql(r,e,t){const i=r.samples.length;if(!i)return;const s=r.inputTimeScale;for(let a=0;a<i;a++){const o=r.samples[a];o.pts=_e(o.pts-t.baseTime*s/t.timescale,e*s)/s}r.samples.sort((a,o)=>a.pts-o.pts);const n=r.samples;return r.samples=[],{samples:n}}class Zl{constructor(e,t,i,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=i,this.cts=s,this.flags=new g0(e)}}class g0{constructor(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}}class v0{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,i,s){this.audioCodec=t,this.videoCodec=i,this.generateInitSegment(Nu(e,s)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:i}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const s=this.initData=Qo(e);t||(t=Jl(s.audio,ne.AUDIO)),i||(i=Jl(s.video,ne.VIDEO));const n={};s.audio&&s.video?n.audiovideo={container:"video/mp4",codec:t+","+i,initSegment:e,id:"main"}:s.audio?n.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:s.video?n.video={container:"video/mp4",codec:i,initSegment:e,id:"main"}:S.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n}remux(e,t,i,s,n,a){var o,l;let{initPTS:c,lastEndTime:h}=this;const d={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};j(h)||(h=this.lastEndTime=n||0);const u=t.samples;if(!(u!=null&&u.length))return d;const f={initPTS:void 0,timescale:1};let p=this.initData;if((o=p)!=null&&o.length||(this.generateInitSegment(u),p=this.initData),!((l=p)!=null&&l.length))return S.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1);const m=Bu(u,p),g=Uu(p,u),x=g===null?n:g;(y0(c,x,n,m)||f.timescale!==c.timescale&&a)&&(f.initPTS=x-n,c&&c.timescale===1&&S.warn(`Adjusting initPTS by ${f.initPTS-c.baseTime}`),this.initPTS=c={baseTime:f.initPTS,timescale:1});const b=e?x-c.baseTime/c.timescale:h,A=b+m;Gu(p,u,c.baseTime/c.timescale),m>0?this.lastEndTime=A:(S.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const y=!!p.audio,T=!!p.video;let w="";y&&(w+="audio"),T&&(w+="video");const L={data1:u,startPTS:b,startDTS:b,endPTS:A,endDTS:A,type:w,hasAudio:y,hasVideo:T,nb:1,dropped:0};return d.audio=L.type==="audio"?L:void 0,d.video=L.type!=="audio"?L:void 0,d.initSegment=f,d.id3=Xl(i,n,c,c),s.samples.length&&(d.text=ql(s,n,c)),d}}function y0(r,e,t,i){if(r===null)return!0;const s=Math.max(i,1),n=e-r.baseTime/r.timescale;return Math.abs(n-t)>s}function Jl(r,e){const t=r==null?void 0:r.codec;return t&&t.length>4?t:t==="hvc1"||t==="hev1"?"hvc1.1.6.L120.90":t==="av01"?"av01.0.04M.08":t==="avc1"||e===ne.VIDEO?"avc1.42e01e":"mp4a.40.5"}let wt;try{wt=self.performance.now.bind(self.performance)}catch{S.debug("Unable to use Performance API on this environment"),wt=typeof self<"u"&&self.Date.now}const Un=[{demux:e0,remux:v0},{demux:kt,remux:Nn},{demux:_f,remux:Nn},{demux:h0,remux:Nn}];class Ql{constructor(e,t,i,s,n){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=i,this.vendor=s,this.id=n}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,i,s){const n=i.transmuxing;n.executeStart=wt();let a=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:l}=this;s&&(this.currentTransmuxState=s);const{contiguous:c,discontinuity:h,trackSwitch:d,accurateTimeOffset:u,timeOffset:f,initSegmentChange:p}=s||o,{audioCodec:m,videoCodec:g,defaultInitPts:x,duration:b,initSegmentData:A}=l,y=x0(a,t);if(y&&y.method==="AES-128"){const I=this.getDecrypter();if(I.isSync()){let R=I.softwareDecrypt(a,y.key.buffer,y.iv.buffer);if(i.part>-1&&(R=I.flush()),!R)return n.executeEnd=wt(),Bn(i);a=new Uint8Array(R)}else return this.decryptionPromise=I.webCryptoDecrypt(a,y.key.buffer,y.iv.buffer).then(R=>{const E=this.push(R,null,i);return this.decryptionPromise=null,E}),this.decryptionPromise}const T=this.needsProbing(h,d);if(T){const I=this.configureTransmuxer(a);if(I)return S.warn(`[transmuxer] ${I.message}`),this.observer.emit(v.ERROR,v.ERROR,{type:K.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,error:I,reason:I.message}),n.executeEnd=wt(),Bn(i)}(h||d||p||T)&&this.resetInitSegment(A,m,g,b,t),(h||p||T)&&this.resetInitialTimestamp(x),c||this.resetContiguity();const w=this.transmux(a,y,f,u,i),L=this.currentTransmuxState;return L.contiguous=!0,L.discontinuity=!1,L.trackSwitch=!1,n.executeEnd=wt(),w}flush(e){const t=e.transmuxing;t.executeStart=wt();const{decrypter:i,currentTransmuxState:s,decryptionPromise:n}=this;if(n)return n.then(()=>this.flush(e));const a=[],{timeOffset:o}=s;if(i){const d=i.flush();d&&a.push(this.push(d,null,e))}const{demuxer:l,remuxer:c}=this;if(!l||!c)return t.executeEnd=wt(),[Bn(e)];const h=l.flush(o);return _s(h)?h.then(d=>(this.flushRemux(a,d,e),a)):(this.flushRemux(a,h,e),a)}flushRemux(e,t,i){const{audioTrack:s,videoTrack:n,id3Track:a,textTrack:o}=t,{accurateTimeOffset:l,timeOffset:c}=this.currentTransmuxState;S.log(`[transmuxer.ts]: Flushed fragment ${i.sn}${i.part>-1?" p: "+i.part:""} of level ${i.level}`);const h=this.remuxer.remux(s,n,a,o,c,l,!0,this.id);e.push({remuxResult:h,chunkMeta:i}),i.transmuxing.executeEnd=wt()}resetInitialTimestamp(e){const{demuxer:t,remuxer:i}=this;!t||!i||(t.resetTimeStamp(e),i.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,i,s,n){const{demuxer:a,remuxer:o}=this;!a||!o||(a.resetInitSegment(e,t,i,s),o.resetInitSegment(e,t,i,n))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,i,s,n){let a;return t&&t.method==="SAMPLE-AES"?a=this.transmuxSampleAes(e,t,i,s,n):a=this.transmuxUnencrypted(e,i,s,n),a}transmuxUnencrypted(e,t,i,s){const{audioTrack:n,videoTrack:a,id3Track:o,textTrack:l}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(n,a,o,l,t,i,!1,this.id),chunkMeta:s}}transmuxSampleAes(e,t,i,s,n){return this.demuxer.demuxSampleAes(e,t,i).then(a=>({remuxResult:this.remuxer.remux(a.audioTrack,a.videoTrack,a.id3Track,a.textTrack,i,s,!1,this.id),chunkMeta:n}))}configureTransmuxer(e){const{config:t,observer:i,typeSupported:s,vendor:n}=this;let a;for(let d=0,u=Un.length;d<u;d++)if(Un[d].demux.probe(e)){a=Un[d];break}if(!a)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,l=this.remuxer,c=a.remux,h=a.demux;(!l||!(l instanceof c))&&(this.remuxer=new c(i,t,s,n)),(!o||!(o instanceof h))&&(this.demuxer=new h(i,t,s),this.probe=h.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new In(this.config)),e}}function x0(r,e){let t=null;return r.byteLength>0&&e!=null&&e.key!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const Bn=r=>({remuxResult:{},chunkMeta:r});function _s(r){return"then"in r&&r.then instanceof Function}class A0{constructor(e,t,i,s,n){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=i,this.duration=s,this.defaultInitPts=n||null}}class b0{constructor(e,t,i,s,n,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=i,this.trackSwitch=s,this.timeOffset=n,this.initSegmentChange=a}}var _l={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(t=!1));function s(l,c,h){this.fn=l,this.context=c,this.once=h||!1}function n(l,c,h,d,u){if(typeof h!="function")throw new TypeError("The listener must be a function");var f=new s(h,d||l,u),p=t?t+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new i:delete l._events[c]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var c=[],h,d;if(this._eventsCount===0)return c;for(d in h=this._events)e.call(h,d)&&c.push(t?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},o.prototype.listeners=function(c){var h=t?t+c:c,d=this._events[h];if(!d)return[];if(d.fn)return[d.fn];for(var u=0,f=d.length,p=new Array(f);u<f;u++)p[u]=d[u].fn;return p},o.prototype.listenerCount=function(c){var h=t?t+c:c,d=this._events[h];return d?d.fn?1:d.length:0},o.prototype.emit=function(c,h,d,u,f,p){var m=t?t+c:c;if(!this._events[m])return!1;var g=this._events[m],x=arguments.length,b,A;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),x){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,h),!0;case 3:return g.fn.call(g.context,h,d),!0;case 4:return g.fn.call(g.context,h,d,u),!0;case 5:return g.fn.call(g.context,h,d,u,f),!0;case 6:return g.fn.call(g.context,h,d,u,f,p),!0}for(A=1,b=new Array(x-1);A<x;A++)b[A-1]=arguments[A];g.fn.apply(g.context,b)}else{var y=g.length,T;for(A=0;A<y;A++)switch(g[A].once&&this.removeListener(c,g[A].fn,void 0,!0),x){case 1:g[A].fn.call(g[A].context);break;case 2:g[A].fn.call(g[A].context,h);break;case 3:g[A].fn.call(g[A].context,h,d);break;case 4:g[A].fn.call(g[A].context,h,d,u);break;default:if(!b)for(T=1,b=new Array(x-1);T<x;T++)b[T-1]=arguments[T];g[A].fn.apply(g[A].context,b)}}return!0},o.prototype.on=function(c,h,d){return n(this,c,h,d,!1)},o.prototype.once=function(c,h,d){return n(this,c,h,d,!0)},o.prototype.removeListener=function(c,h,d,u){var f=t?t+c:c;if(!this._events[f])return this;if(!h)return a(this,f),this;var p=this._events[f];if(p.fn)p.fn===h&&(!u||p.once)&&(!d||p.context===d)&&a(this,f);else{for(var m=0,g=[],x=p.length;m<x;m++)(p[m].fn!==h||u&&!p[m].once||d&&p[m].context!==d)&&g.push(p[m]);g.length?this._events[f]=g.length===1?g[0]:g:a(this,f)}return this},o.prototype.removeAllListeners=function(c){var h;return c?(h=t?t+c:c,this._events[h]&&a(this,h)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=t,o.EventEmitter=o,r.exports=o})(_l);var T0=_l.exports,Hn=au(T0);const Gn=Vs()||{isTypeSupported:()=>!1};class $l{constructor(e,t,i,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const n=e.config;this.hls=e,this.id=t,this.useWorker=!!n.enableWorker,this.onTransmuxComplete=i,this.onFlush=s;const a=(c,h)=>{h=h||{},h.frag=this.frag,h.id=this.id,c===v.ERROR&&(this.error=h.error),this.hls.trigger(c,h)};this.observer=new Hn,this.observer.on(v.FRAG_DECRYPTED,a),this.observer.on(v.ERROR,a);const o={mp4:Gn.isTypeSupported("video/mp4"),mpeg:Gn.isTypeSupported("audio/mpeg"),mp3:Gn.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(this.useWorker&&typeof Worker<"u"&&(n.workerPath||zf())){try{n.workerPath?(S.log(`loading Web Worker ${n.workerPath} for "${t}"`),this.workerContext=Wf(n.workerPath)):(S.log(`injecting Web Worker for "${t}"`),this.workerContext=Kf()),this.onwmsg=d=>this.onWorkerMessage(d);const{worker:h}=this.workerContext;h.addEventListener("message",this.onwmsg),h.onerror=d=>{const u=new Error(`${d.message} (${d.filename}:${d.lineno})`);n.enableWorker=!1,S.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(v.ERROR,{type:K.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:u})},h.postMessage({cmd:"init",typeSupported:o,vendor:l,id:t,config:JSON.stringify(n)})}catch(h){S.warn(`Error setting up "${t}" Web Worker, fallback to inline`,h),this.resetWorker(),this.error=null,this.transmuxer=new Ql(this.observer,o,n,l,t)}return}this.transmuxer=new Ql(this.observer,o,n,l,t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,i,s,n,a,o,l,c,h){var d,u;c.transmuxing.start=self.performance.now();const{transmuxer:f}=this,p=a?a.start:n.start,m=n.decryptdata,g=this.frag,x=!(g&&n.cc===g.cc),b=!(g&&c.level===g.level),A=g?c.sn-g.sn:-1,y=this.part?c.part-this.part.index:-1,T=A===0&&c.id>1&&c.id===(g==null?void 0:g.stats.chunkCount),w=!b&&(A===1||A===0&&(y===1||T&&y<=0)),L=self.performance.now();(b||A||n.stats.parsing.start===0)&&(n.stats.parsing.start=L),a&&(y||!w)&&(a.stats.parsing.start=L);const I=!(g&&((d=n.initSegment)==null?void 0:d.url)===((u=g.initSegment)==null?void 0:u.url)),R=new b0(x,w,l,b,p,I);if(!w||x||I){S.log(`[transmuxer-interface, ${n.type}]: Starting new transmux session for sn: ${c.sn} p: ${c.part} level: ${c.level} id: ${c.id}
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
initSegmentChange: ${I}`);const E=new A0(i,s,t,o,h);this.configureTransmuxer(E)}if(this.frag=n,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:m,chunkMeta:c,state:R},e instanceof ArrayBuffer?[e]:[]);else if(f){const E=f.push(e,m,c,R);_s(E)?(f.async=!0,E.then(M=>{this.handleTransmuxComplete(M)}).catch(M=>{this.transmuxerError(M,c,"transmuxer-interface push error")})):(f.async=!1,this.handleTransmuxComplete(E))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);_s(i)||t.async?(_s(i)||(i=Promise.resolve(i)),i.then(n=>{this.handleFlushResult(n,e)}).catch(n=>{this.transmuxerError(n,e,"transmuxer-interface flush error")})):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach(i=>{this.handleTransmuxComplete(i)}),this.onFlush(t)}onWorkerMessage(e){const t=e.data,i=this.hls;switch(t.event){case"init":{var s;const n=(s=this.workerContext)==null?void 0:s.objectURL;n&&self.URL.revokeObjectURL(n);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":S[t.data.logType]&&S[t.data.logType](t.data.message);break;default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data);break}}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const E0=250,Vn=2,S0=.1,w0=.05;class L0{constructor(e,t,i,s){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=i,this.hls=s}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:i,media:s,stalled:n}=this;if(s===null)return;const{currentTime:a,seeking:o}=s,l=this.seeking&&!o,c=!this.seeking&&o;if(this.seeking=o,a!==e){if(this.moved=!0,n!==null){if(this.stallReported){const x=self.performance.now()-n;S.warn(`playback not stuck anymore @${a}, after ${Math.round(x)}ms`),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(c||l){this.stalled=null;return}if(s.paused&&!o||s.ended||s.playbackRate===0||!ce.getBuffered(s).length)return;const h=ce.bufferInfo(s,a,0),d=h.len>0,u=h.nextStart||0;if(!d&&!u)return;if(o){const x=h.len>Vn,b=!u||t&&t.start<=a||u-a>Vn&&!this.fragmentTracker.getPartialFragment(a);if(x||b)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var f;const x=Math.max(u,h.start||0)-a,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,y=(b==null||(f=b.details)==null?void 0:f.live)?b.details.targetduration*2:Vn,T=this.fragmentTracker.getPartialFragment(a);if(x>0&&(x<=y||T)){this._trySkipBufferHole(T);return}}const p=self.performance.now();if(n===null){this.stalled=p;return}const m=p-n;if(!o&&m>=E0&&(this._reportStall(h),!this.media))return;const g=ce.bufferInfo(s,a,i.maxBufferHole);this._tryFixBufferStall(g,m)}_tryFixBufferStall(e,t){const{config:i,fragmentTracker:s,media:n}=this;if(n===null)return;const a=n.currentTime,o=s.getPartialFragment(a);o&&(this._trySkipBufferHole(o)||!this.media)||(e.len>i.maxBufferHole||e.nextStart&&e.nextStart-a<i.maxBufferHole)&&t>i.highBufferWatchdogPeriod*1e3&&(S.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:i,stallReported:s}=this;if(!s&&i){this.stallReported=!0;const n=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${JSON.stringify(e)})`);S.warn(n.message),t.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.BUFFER_STALLED_ERROR,fatal:!1,error:n,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:i,media:s}=this;if(s===null)return 0;const n=s.currentTime,a=ce.bufferInfo(s,n,0),o=n<a.start?a.start:a.nextStart;if(o){const l=a.len<=t.maxBufferHole,c=a.len>0&&a.len<1&&s.readyState<3,h=o-n;if(h>0&&(l||c)){if(h>t.maxBufferHole){const{fragmentTracker:u}=this;let f=!1;if(n===0){const p=u.getAppendedFrag(0,W.MAIN);p&&o<p.end&&(f=!0)}if(!f){const p=e||u.getAppendedFrag(n,W.MAIN);if(p){let m=!1,g=p.end;for(;g<o;){const x=u.getPartialFragment(g);if(x)g+=x.duration;else{m=!0;break}}if(m)return 0}}}const d=Math.max(o+w0,n+S0);if(S.warn(`skipping hole, adjusting currentTime from ${n} to ${d}`),this.moved=!0,this.stalled=null,s.currentTime=d,e&&!e.gap){const u=new Error(`fragment loaded with buffer holes, seeking from ${n} to ${d}`);i.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:u,reason:u.message,frag:e})}return d}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:i,nudgeRetry:s}=this;if(i===null)return;const n=i.currentTime;if(this.nudgeRetry++,s<e.nudgeMaxRetry){const a=n+(s+1)*e.nudgeOffset,o=new Error(`Nudging 'currentTime' from ${n} to ${a}`);S.warn(o.message),i.currentTime=a,t.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1})}else{const a=new Error(`Playhead still not moving while enough data buffered @${n} after ${e.nudgeMaxRetry} nudges`);S.error(a.message),t.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.BUFFER_STALLED_ERROR,error:a,fatal:!0})}}}const R0=100;class C0 extends Dn{constructor(e,t,i){super(e,t,i,"[stream-controller]",W.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(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(v.ERROR,this.onError,this),e.on(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(v.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this),e.on(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(v.ERROR,this.onError,this),e.off(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(v.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(v.BUFFER_CREATED,this.onBufferCreated,this),e.off(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(v.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),this.onMediaDetaching()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:i}=this;if(this.stopLoad(),this.setInterval(R0),this.level=-1,!this.startFragRequested){let s=i.startLevel;s===-1&&(i.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=i.nextAutoLevel),this.level=i.nextLoadLevel=s,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=O.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=O.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case O.WAITING_LEVEL:{var e;const{levels:i,level:s}=this,n=i==null||(e=i[s])==null?void 0:e.details;if(n&&(!n.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(n))break;this.state=O.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=O.IDLE;break}break}case O.FRAG_LOADING_WAITING_RETRY:{var t;const i=self.performance.now(),s=this.retryDate;(!s||i>=s||(t=this.media)!=null&&t.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=O.IDLE)}break}this.state===O.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:i,media:s}=this,{config:n,nextLoadLevel:a}=e;if(t===null||!s&&(this.startFragRequested||!n.startFragPrefetch)||this.altAudio&&this.audioOnly||!(i!=null&&i[a]))return;const o=i[a],l=this.getMainFwdBufferInfo();if(l===null)return;const c=this.getLevelDetails();if(c&&this._streamEnded(l,c)){const g={};this.altAudio&&(g.type="video"),this.hls.trigger(v.BUFFER_EOS,g),this.state=O.ENDED;return}e.loadLevel!==a&&e.manualLevel===-1&&this.log(`Adapting to level ${a} from level ${this.level}`),this.level=e.nextLoadLevel=a;const h=o.details;if(!h||this.state===O.WAITING_LEVEL||h.live&&this.levelLastLoaded!==a){this.level=a,this.state=O.WAITING_LEVEL;return}const d=l.len,u=this.getMaxBufferLength(o.maxBitrate);if(d>=u)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const f=this.backtrackFragment?this.backtrackFragment.start:l.end;let p=this.getNextFragment(f,h);if(this.couldBacktrack&&!this.fragPrevious&&p&&p.sn!=="initSegment"&&this.fragmentTracker.getState(p)!==Ce.OK){var m;const x=((m=this.backtrackFragment)!=null?m:p).sn-h.startSN,b=h.fragments[x-1];b&&p.cc===b.cc&&(p=b,this.fragmentTracker.removeFragment(b))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,f)){if(!p.gap){const x=this.audioOnly&&!this.altAudio?ne.AUDIO:ne.VIDEO,b=(x===ne.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,x,W.MAIN)}p=this.getNextFragmentLoopLoading(p,h,l,W.MAIN,u)}p&&(p.initSegment&&!p.initSegment.data&&!this.bitrateTest&&(p=p.initSegment),this.loadFragment(p,o,f))}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);this.fragCurrent=e,s===Ce.NOT_LOADED||s===Ce.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,i)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,W.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 i;const s=this.getAppendedFrag(t.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const n=this.getLevelDetails();if(n!=null&&n.live){const o=this.getMainFwdBufferInfo();if(!o||o.len<n.targetduration*2)return}if(!t.paused&&e){const o=this.hls.nextLoadLevel,l=e[o],c=this.fragLastKbps;c&&this.fragCurrent?i=this.fragCurrent.duration*l.maxBitrate/(1e3*c)+1:i=0}else i=0;const a=this.getBufferedFrag(t.currentTime+i);if(a){const o=this.followingBufferedFrag(a);if(o){this.abortCurrentFrag();const l=o.maxStartPTS?o.maxStartPTS:o.start,c=o.duration,h=Math.max(a.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*.5),c*.75));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 O.KEY_LOADING:case O.FRAG_LOADING:case O.FRAG_LOADING_WAITING_RETRY:case O.PARSING:case O.PARSED:this.state=O.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 i=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new L0(this.config,i,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;j(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const i=this.getMainFwdBufferInfo();if(i===null||i.len===0){this.warn(`Main forward buffer length on "seeked" event ${i?i.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(v.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1}onManifestParsed(e,t){let i=!1,s=!1,n;t.levels.forEach(a=>{n=a.audioCodec,n&&(n.indexOf("mp4a.40.2")!==-1&&(i=!0),n.indexOf("mp4a.40.5")!==-1&&(s=!0))}),this.audioCodecSwitch=i&&s&&!jf(),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:i}=this;if(!i||this.state!==O.IDLE)return;const s=i[t.level];(!s.details||s.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(s.details))&&(this.state=O.WAITING_LEVEL)}onLevelLoaded(e,t){var i;const{levels:s}=this,n=t.level,a=t.details,o=a.totalduration;if(!s){this.warn(`Levels were reset while loading level ${n}`);return}this.log(`Level ${n} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${o}`);const l=s[n],c=this.fragCurrent;c&&(this.state===O.FRAG_LOADING||this.state===O.FRAG_LOADING_WAITING_RETRY)&&(c.level!==t.level||c.urlId!==l.urlId)&&c.loader&&this.abortCurrentFrag();let h=0;if(a.live||(i=l.details)!=null&&i.live){if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;h=this.alignPlaylists(a,l.details)}if(l.details=a,this.levelLastLoaded=n,this.hls.trigger(v.LEVEL_UPDATED,{details:a,level:n}),this.state===O.WAITING_LEVEL){if(this.waitForCdnTuneIn(a))return;this.state=O.IDLE}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,h),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:n}=e,{levels:a}=this;if(!a){this.warn(`Levels were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);return}const o=a[i.level],l=o.details;if(!l){this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`),this.fragmentTracker.removeFragment(i);return}const c=o.videoCodec,h=l.PTSKnown||!l.live,d=(t=i.initSegment)==null?void 0:t.data,u=this._getAudioCodec(o),f=this.transmuxer=this.transmuxer||new $l(this.hls,W.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=s?s.index:-1,m=p!==-1,g=new Rn(i.level,i.sn,i.stats.chunkCount,n.byteLength,p,m),x=this.initPTS[i.cc];f.push(n,d,u,c,i,s,l.totalduration,h,g,x)}onAudioTrackSwitching(e,t){const i=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 a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests(),this.fragmentTracker.removeFragment(a)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const n=this.hls;i&&(n.trigger(v.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),n.trigger(v.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const i=t.id,s=!!this.hls.audioTracks[i].url;if(s){const n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=s,this.tick()}onBufferCreated(e,t){const i=t.tracks;let s,n,a=!1;for(const o in i){const l=i[o];if(l.id==="main"){if(n=o,s=l,o==="video"){const c=i[o];c&&(this.videoBuffer=c.buffer)}}else a=!0}a&&s?(this.log(`Alternate track found, use ${n}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i&&i.type!==W.MAIN)return;if(this.fragContextChanged(i)){this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`),this.state===O.PARSED&&(this.state=O.IDLE);return}const n=s?s.stats:i.stats;this.fragLastKbps=Math.round(8*n.total/(n.buffering.end-n.loading.first)),i.sn!=="initSegment"&&(this.fragPrevious=i),this.fragBufferedComplete(i,s)}onError(e,t){var i;if(t.fatal){this.state=O.ERROR;return}switch(t.details){case D.FRAG_GAP:case D.FRAG_PARSING_ERROR:case D.FRAG_DECRYPT_ERROR:case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(W.MAIN,t);break;case D.LEVEL_LOAD_ERROR:case D.LEVEL_LOAD_TIMEOUT:case D.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===O.WAITING_LEVEL&&((i=t.context)==null?void 0:i.type)===se.LEVEL&&(this.state=O.IDLE);break;case D.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case D.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!ce.getBuffered(e).length){const i=this.state!==O.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,i)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=O.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==ne.AUDIO||this.audioOnly&&!this.altAudio){const i=(t===ne.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(i,t,W.MAIN)}}onLevelsUpdated(e,t){this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let i=this.startPosition;if(i>=0&&t<i){if(e.seeking){this.log(`could not seek to ${i}, already seeking at ${t}`);return}const s=ce.getBuffered(e),a=(s.length?s.start(0):0)-i;a>0&&(a<this.config.maxBufferHole||a<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${a} to match buffer start`),i+=a,this.startPosition=i),this.log(`seek to target start position ${i} from current time ${t}`),e.currentTime=i}}_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(i=>{const{hls:s}=this;if(!i||this.fragContextChanged(e))return;t.fragmentError=0,this.state=O.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const n=e.stats;n.parsing.start=n.parsing.end=n.buffering.start=n.buffering.end=self.performance.now(),s.trigger(v.FRAG_LOADED,i),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const i="main",{hls:s}=this,{remuxResult:n,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:l,part:c,level:h}=o,{video:d,text:u,id3:f,initSegment:p}=n,{details:m}=h,g=this.altAudio?void 0:n.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=O.PARSING,p){if(p!=null&&p.tracks){const A=l.initSegment||l;this._bufferInitSegment(h,p.tracks,A,a),s.trigger(v.FRAG_PARSING_INIT_SEGMENT,{frag:A,id:i,tracks:p.tracks})}const x=p.initPTS,b=p.timescale;j(x)&&(this.initPTS[l.cc]={baseTime:x,timescale:b},s.trigger(v.INIT_PTS_FOUND,{frag:l,id:i,initPTS:x,timescale:b}))}if(d&&m&&l.sn!=="initSegment"){const x=m.fragments[l.sn-1-m.startSN],b=l.sn===m.startSN,A=!x||l.cc>x.cc;if(n.independent!==!1){const{startPTS:y,endPTS:T,startDTS:w,endDTS:L}=d;if(c)c.elementaryStreams[d.type]={startPTS:y,endPTS:T,startDTS:w,endDTS:L};else if(d.firstKeyFrame&&d.independent&&a.id===1&&!A&&(this.couldBacktrack=!0),d.dropped&&d.independent){const I=this.getMainFwdBufferInfo(),R=(I?I.end:this.getLoadPosition())+this.config.maxBufferHole,E=d.firstKeyFramePTS?d.firstKeyFramePTS:y;if(!b&&R<E-this.config.maxBufferHole&&!A){this.backtrack(l);return}else A&&(l.gap=!0);l.setElementaryStreamInfo(d.type,l.start,T,l.start,L,!0)}l.setElementaryStreamInfo(d.type,y,T,w,L),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(d,l,c,a,b||A)}else if(b||A)l.gap=!0;else{this.backtrack(l);return}}if(g){const{startPTS:x,endPTS:b,startDTS:A,endDTS:y}=g;c&&(c.elementaryStreams[ne.AUDIO]={startPTS:x,endPTS:b,startDTS:A,endDTS:y}),l.setElementaryStreamInfo(ne.AUDIO,x,b,A,y),this.bufferFragmentData(g,l,c,a)}if(m&&f!=null&&(t=f.samples)!=null&&t.length){const x={id:i,frag:l,details:m,samples:f.samples};s.trigger(v.FRAG_PARSING_METADATA,x)}if(m&&u){const x={id:i,frag:l,details:m,samples:u.samples};s.trigger(v.FRAG_PARSING_USERDATA,x)}}_bufferInitSegment(e,t,i,s){if(this.state!==O.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:n,video:a,audiovideo:o}=t;if(n){let l=e.audioCodec;const c=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(l&&(l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5"),n.metadata.channelCount!==1&&c.indexOf("firefox")===-1&&(l="mp4a.40.5")),c.indexOf("android")!==-1&&n.container!=="audio/mpeg"&&(l="mp4a.40.2",this.log(`Android: force audio codec to ${l}`)),e.audioCodec&&e.audioCodec!==l&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${l}"`),n.levelCodec=l,n.id="main",this.log(`Init audio buffer, container:${n.container}, codecs[selected/level/parsed]=[${l||""}/${e.audioCodec||""}/${n.codec}]`)}a&&(a.levelCodec=e.videoCodec,a.id="main",this.log(`Init video buffer, container:${a.container}, codecs[level/parsed]=[${e.videoCodec||""}/${a.codec}]`)),o&&this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.attrs.CODECS||""}/${o.codec}]`),this.hls.trigger(v.BUFFER_CODECS,t),Object.keys(t).forEach(l=>{const h=t[l].initSegment;h!=null&&h.byteLength&&this.hls.trigger(v.BUFFER_APPENDING,{type:l,data:h,frag:i,part:null,chunkMeta:s,parent:i.type})}),this.tick()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,W.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=O.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const i=e.currentTime;if(ce.isBuffered(e,i)?t=this.getAppendedFrag(i):ce.isBuffered(e,i+.1)&&(t=this.getAppendedFrag(i+.1)),t){this.backtrackFragment=null;const s=this.fragPlaying,n=t.level;(!s||t.sn!==s.sn||s.level!==n||t.urlId!==s.urlId)&&(this.fragPlaying=t,this.hls.trigger(v.FRAG_CHANGED,{frag:t}),(!s||s.level!==n)&&this.hls.trigger(v.LEVEL_SWITCHED,{level:n}))}}}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,i=this.currentFrag;if(i&&j(t)&&j(i.programDateTime)){const s=i.programDateTime+(t-i.start)*1e3;return new Date(s)}}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 bi{constructor(e,t=0,i=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_=i}sample(e,t){const i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*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 I0{constructor(e,t,i,s=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_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new bi(e),this.fast_=new bi(t),this.defaultTTFB_=s,this.ttfb_=new bi(e)}update(e,t){const{slow_:i,fast_:s,ttfb_:n}=this;i.halfLife!==e&&(this.slow_=new bi(e,i.getEstimate(),i.getTotalWeight())),s.halfLife!==t&&(this.fast_=new bi(t,s.getEstimate(),s.getTotalWeight())),n.halfLife!==e&&(this.ttfb_=new bi(e,n.getEstimate(),n.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const i=8*t,s=e/1e3,n=i/s;this.fast_.sample(s,n),this.slow_.sample(s,n)}sampleTTFB(e){const t=e/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(i,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(){}}class D0{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=-1,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;const t=e.config;this.bwEstimator=new I0(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(v.FRAG_LOADING,this.onFragLoading,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this)}unregisterListeners(){const{hls:e}=this;e.off(v.FRAG_LOADING,this.onFragLoading,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this)}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null}onFragLoading(e,t){var i;const s=t.frag;this.ignoreFragment(s)||(this.fragCurrent=s,this.partCurrent=(i=t.part)!=null?i:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))}onLevelSwitching(e,t){this.clearTimer()}getTimeToLoadFrag(e,t,i,s){const n=e+i/t,a=s?this.lastLevelLoadSec:0;return n+a}onLevelLoaded(e,t){const i=this.hls.config,{total:s,bwEstimate:n}=t.stats;j(s)&&j(n)&&(this.lastLevelLoadSec=8*s/n),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}_abandonRulesCheck(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{autoLevelEnabled:s,media:n}=i;if(!e||!n)return;const a=performance.now(),o=t?t.stats:e.stats,l=t?t.duration:e.duration,c=a-o.loading.start;if(o.aborted||o.loaded&&o.loaded===o.total||e.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!s||n.paused||!n.playbackRate||!n.readyState)return;const h=i.mainForwardBufferInfo;if(h===null)return;const d=this.bwEstimator.getEstimateTTFB(),u=Math.abs(n.playbackRate);if(c<=Math.max(d,1e3*(l/(u*2))))return;const f=h.len/u;if(f>=2*l/u)return;const p=o.loading.first?o.loading.first-o.loading.start:-1,m=o.loaded&&p>-1,g=this.bwEstimator.getEstimate(),{levels:x,minAutoLevel:b}=i,A=x[e.level],y=o.total||Math.max(o.loaded,Math.round(l*A.maxBitrate/8));let T=c-p;T<1&&m&&(T=Math.min(c,o.loaded*8/g));const w=m?o.loaded*1e3/T:0,L=w?(y-o.loaded)/w:y*8/g+d/1e3;if(L<=f)return;const I=w?w*8:g;let R=Number.POSITIVE_INFINITY,E;for(E=e.level-1;E>b;E--){const M=x[E].maxBitrate;if(R=this.getTimeToLoadFrag(d/1e3,I,l*M,!x[E].details),R<f)break}R>=L||R>l*10||(i.nextLoadLevel=E,m?this.bwEstimator.sample(c-Math.min(d,p),o.loaded):this.bwEstimator.sampleTTFB(c),this.clearTimer(),S.warn(`[abr] Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} is loading too slowly;
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
New BW estimate: ${(this.bwEstimator.getEstimate()/1024).toFixed(3)} Kb/s
|
86
|
-
Aborting and switching to level ${E}`),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),i.trigger(v.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o}))}onFragLoaded(e,{frag:t,part:i}){const s=i?i.stats:t.stats;if(t.type===W.MAIN&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){const n=i?i.duration:t.duration,a=this.hls.levels[t.level],o=(a.loaded?a.loaded.bytes:0)+s.loaded,l=(a.loaded?a.loaded.duration:0)+n;a.loaded={bytes:o,duration:l},a.realBitrate=Math.round(8*o/l)}if(t.bitrateTest){const n={stats:s,frag:t,part:i,id:t.type};this.onFragBuffered(v.FRAG_BUFFERED,n),t.bitrateTest=!1}}}onFragBuffered(e,t){const{frag:i,part:s}=t,n=s!=null&&s.stats.loaded?s.stats:i.stats;if(n.aborted||this.ignoreFragment(i))return;const a=n.parsing.end-n.loading.start-Math.min(n.loading.first-n.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==W.MAIN||e.sn==="initSegment"}clearTimer(){self.clearInterval(this.timer)}get nextAutoLevel(){const e=this._nextAutoLevel,t=this.bwEstimator;if(e!==-1&&!t.canEstimate())return e;let i=this.getNextABRAutoLevel();if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return e!==-1&&(i=Math.min(e,i)),i}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{maxAutoLevel:s,config:n,minAutoLevel:a,media:o}=i,l=t?t.duration:e?e.duration:0,c=o&&o.playbackRate!==0?Math.abs(o.playbackRate):1,h=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,d=i.mainForwardBufferInfo,u=(d?d.len:0)/c;let f=this.findBestLevel(h,a,s,u,n.abrBandWidthFactor,n.abrBandWidthUpFactor);if(f>=0)return f;S.trace(`[abr] ${u?"rebuffering expected":"buffer is empty"}, finding optimal quality level`);let p=l?Math.min(l,n.maxStarvationDelay):n.maxStarvationDelay,m=n.abrBandWidthFactor,g=n.abrBandWidthUpFactor;if(!u){const x=this.bitrateTestDelay;x&&(p=(l?Math.min(l,n.maxLoadingDelay):n.maxLoadingDelay)-x,S.trace(`[abr] bitrate test took ${Math.round(1e3*x)}ms, set first fragment max fetchDuration to ${Math.round(1e3*p)} ms`),m=g=1)}return f=this.findBestLevel(h,a,s,u+p,m,g),Math.max(f,0)}findBestLevel(e,t,i,s,n,a){var o;const{fragCurrent:l,partCurrent:c,lastLoadedFragLevel:h}=this,{levels:d}=this.hls,u=d[h],f=!!(u!=null&&(o=u.details)!=null&&o.live),p=u==null?void 0:u.codecSet,m=c?c.duration:l?l.duration:0,g=this.bwEstimator.getEstimateTTFB()/1e3;let x=t,b=-1;for(let A=i;A>=t;A--){const y=d[A];if(!y||p&&y.codecSet!==p){y&&(x=Math.min(A,x),b=Math.max(A,b));continue}b!==-1&&S.trace(`[abr] Skipped level(s) ${x}-${b} with CODECS:"${d[b].attrs.CODECS}"; not compatible with "${u.attrs.CODECS}"`);const T=y.details,w=(c?T==null?void 0:T.partTarget:T==null?void 0:T.averagetargetduration)||m;let L;A<=h?L=n*e:L=a*e;const I=d[A].maxBitrate,R=this.getTimeToLoadFrag(g,L,I*w,T===void 0);if(S.trace(`[abr] level:${A} adjustedbw-bitrate:${Math.round(L-I)} avgDuration:${w.toFixed(1)} maxFetchDuration:${s.toFixed(1)} fetchDuration:${R.toFixed(1)}`),L>I&&(R===0||!j(R)||f&&!this.bitrateTestDelay||R<s))return A}return-1}set nextAutoLevel(e){this._nextAutoLevel=e}}class ec{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let i;if(e.length)e.length===1?i=e[0]:i=P0(e,t);else return new Uint8Array(0);return this.reset(),i}reset(){this.chunks.length=0,this.dataLength=0}}function P0(r,e){const t=new Uint8Array(e);let i=0;for(let s=0;s<r.length;s++){const n=r[s];t.set(n,i),i+=n.length}return t}const tc=100;class k0 extends Dn{constructor(e,t,i){super(e,t,i,"[audio-stream-controller]",W.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(v.ERROR,this.onError,this),e.on(v.BUFFER_RESET,this.onBufferReset,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this),e.on(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(v.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(v.ERROR,this.onError,this),e.off(v.BUFFER_RESET,this.onBufferReset,this),e.off(v.BUFFER_CREATED,this.onBufferCreated,this),e.off(v.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:n}){if(i==="main"){const a=t.cc;this.initPTS[t.cc]={baseTime:s,timescale:n},this.log(`InitPTS for cc: ${a} found from main: ${s}`),this.videoTrackCC=a,this.state===O.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=O.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(tc),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=O.IDLE):(this.loadedmetadata=!1,this.state=O.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case O.IDLE:this.doTickIdle();break;case O.WAITING_TRACK:{var e;const{levels:i,trackId:s}=this,n=i==null||(e=i[s])==null?void 0:e.details;if(n){if(this.waitForCdnTuneIn(n))break;this.state=O.WAITING_INIT_PTS}break}case O.FRAG_LOADING_WAITING_RETRY:{var t;const i=performance.now(),s=this.retryDate;(!s||i>=s||(t=this.media)!=null&&t.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=O.IDLE);break}case O.WAITING_INIT_PTS:{const i=this.waitingData;if(i){const{frag:s,part:n,cache:a,complete:o}=i;if(this.initPTS[s.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=O.FRAG_LOADING;const l=a.flush(),c={frag:s,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(c),o&&super._handleFragmentLoadComplete(c)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${s.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const l=this.getLoadPosition(),c=ce.bufferInfo(this.mediaBuffer,l,this.config.maxBufferHole);Sn(c.end,this.config.maxFragLookUpTolerance,s)<0&&(this.log(`Waiting fragment cc (${s.cc}) @ ${s.start} cancelled because another fragment at ${c.end} is needed`),this.clearWaitingFragment())}}else this.state=O.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=O.IDLE)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:i,trackId:s}=this,n=e.config;if(!(t!=null&&t[s])||!i&&(this.startFragRequested||!n.startFragPrefetch))return;const a=t[s],o=a.details;if(!o||o.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(o)){this.state=O.WAITING_TRACK;return}const l=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&l&&(this.bufferFlushed=!1,this.afterBufferFlushed(l,ne.AUDIO,W.AUDIO));const c=this.getFwdBufferInfo(l,W.AUDIO);if(c===null)return;const{bufferedTrack:h,switchingTrack:d}=this;if(!d&&this._streamEnded(c,o)){e.trigger(v.BUFFER_EOS,{type:"audio"}),this.state=O.ENDED;return}const u=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,W.MAIN),f=c.len,p=this.getMaxBufferLength(u==null?void 0:u.len);if(f>=p&&!d)return;const g=o.fragments[0].start;let x=c.end;if(d&&i){const T=this.getLoadPosition();h&&d.attrs!==h.attrs&&(x=T),o.PTSKnown&&T<g&&(c.end>g||c.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=g+.05)}let b=this.getNextFragment(x,o),A=!1;if(b&&this.isLoopLoading(b,x)&&(A=!!b.gap,b=this.getNextFragmentLoopLoading(b,o,c,W.MAIN,p)),!b){this.bufferFlushed=!0;return}const y=u&&b.start>u.end+o.targetduration;if(y||!(u!=null&&u.len)&&c.len){const T=this.getAppendedFrag(b.start,W.MAIN);if(T===null||(A||(A=!!T.gap||!!y&&u.len===0),y&&!A||A&&c.nextStart&&c.nextStart<T.end))return}this.loadFragment(b,a,x)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(i=>new es(i))}onAudioTrackSwitching(e,t){const i=!!t.url;this.trackId=t.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),i?this.setInterval(tc):this.resetTransmuxer(),i?(this.switchingTrack=t,this.state=O.IDLE):(this.switchingTrack=null,this.bufferedTrack=t,this.state=O.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(v.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var i;if(this.mainDetails==null){this.cachedTrackLoadedData=t;return}const{levels:s}=this,{details:n,id:a}=t;if(!s){this.warn(`Audio tracks were reset while loading level ${a}`);return}this.log(`Track ${a} loaded [${n.startSN},${n.endSN}]${n.lastPartSn?`[part-${n.lastPartSn}-${n.lastPartIndex}]`:""},duration:${n.totalduration}`);const o=s[a];let l=0;if(n.live||(i=o.details)!=null&&i.live){this.checkLiveUpdate(n);const c=this.mainDetails;if(n.deltaUpdateFailed||!c)return;!o.details&&n.hasProgramDateTime&&c.hasProgramDateTime?(kl(n,c),l=n.fragments[0].start):l=this.alignPlaylists(n,o.details)}o.details=n,this.levelLastLoaded=a,!this.startFragRequested&&(this.mainDetails||!n.live)&&this.setStartPosition(o.details,l),this.state===O.WAITING_TRACK&&!this.waitForCdnTuneIn(n)&&(this.state=O.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:n}=e,{config:a,trackId:o,levels:l}=this;if(!l){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);return}const c=l[o];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const h=c.details;if(!h){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(i.start);return}const d=a.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let u=this.transmuxer;u||(u=this.transmuxer=new $l(this.hls,W.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const f=this.initPTS[i.cc],p=(t=i.initSegment)==null?void 0:t.data;if(f!==void 0){const g=s?s.index:-1,x=g!==-1,b=new Rn(i.level,i.sn,i.stats.chunkCount,n.byteLength,g,x);u.push(n,p,d,"",i,s,h.totalduration,!1,b,f)}else{this.log(`Unknown video PTS for cc ${i.cc}, waiting for video PTS before demuxing audio frag ${i.sn} of [${h.startSN} ,${h.endSN}],track ${o}`);const{cache:m}=this.waitingData=this.waitingData||{frag:i,part:s,cache:new ec,complete:!1};m.push(new Uint8Array(n)),this.waitingVideoCC=this.videoTrackCC,this.state=O.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const i=t.tracks.audio;i&&(this.mediaBuffer=i.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i.type!==W.AUDIO){if(!this.loadedmetadata&&i.type===W.MAIN){const n=this.videoBuffer||this.media;n&&ce.getBuffered(n).length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(i)){this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(i.sn!=="initSegment"){this.fragPrevious=i;const n=this.switchingTrack;n&&(this.bufferedTrack=n,this.switchingTrack=null,this.hls.trigger(v.AUDIO_TRACK_SWITCHED,Ve({},n)))}this.fragBufferedComplete(i,s)}onError(e,t){var i;if(t.fatal){this.state=O.ERROR;return}switch(t.details){case D.FRAG_GAP:case D.FRAG_PARSING_ERROR:case D.FRAG_DECRYPT_ERROR:case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(W.AUDIO,t);break;case D.AUDIO_TRACK_LOAD_ERROR:case D.AUDIO_TRACK_LOAD_TIMEOUT:case D.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===O.WAITING_TRACK&&((i=t.context)==null?void 0:i.type)===se.AUDIO_TRACK&&(this.state=O.IDLE);break;case D.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case D.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushed(e,{type:t}){t===ne.AUDIO&&(this.bufferFlushed=!0,this.state===O.ENDED&&(this.state=O.IDLE))}_handleTransmuxComplete(e){var t;const i="audio",{hls:s}=this,{remuxResult:n,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:l,part:c,level:h}=o,{details:d}=h,{audio:u,text:f,id3:p,initSegment:m}=n;if(this.fragContextChanged(l)||!d){this.fragmentTracker.removeFragment(l);return}if(this.state=O.PARSING,this.switchingTrack&&u&&this.completeAudioSwitch(this.switchingTrack),m!=null&&m.tracks){const g=l.initSegment||l;this._bufferInitSegment(m.tracks,g,a),s.trigger(v.FRAG_PARSING_INIT_SEGMENT,{frag:g,id:i,tracks:m.tracks})}if(u){const{startPTS:g,endPTS:x,startDTS:b,endDTS:A}=u;c&&(c.elementaryStreams[ne.AUDIO]={startPTS:g,endPTS:x,startDTS:b,endDTS:A}),l.setElementaryStreamInfo(ne.AUDIO,g,x,b,A),this.bufferFragmentData(u,l,c,a)}if(p!=null&&(t=p.samples)!=null&&t.length){const g=Se({id:i,frag:l,details:d},p);s.trigger(v.FRAG_PARSING_METADATA,g)}if(f){const g=Se({id:i,frag:l,details:d},f);s.trigger(v.FRAG_PARSING_USERDATA,g)}}_bufferInitSegment(e,t,i){if(this.state!==O.PARSING)return;e.video&&delete e.video;const s=e.audio;if(!s)return;s.levelCodec=s.codec,s.id="audio",this.log(`Init audio buffer, container:${s.container}, codecs[parsed]=[${s.codec}]`),this.hls.trigger(v.BUFFER_CODECS,e);const n=s.initSegment;if(n!=null&&n.byteLength){const a={type:"audio",frag:t,part:null,chunkMeta:i,parent:t.type,data:n};this.hls.trigger(v.BUFFER_APPENDING,a)}this.tick()}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);if(this.fragCurrent=e,this.switchingTrack||s===Ce.NOT_LOADED||s===Ce.PARTIAL){var n;e.sn==="initSegment"?this._loadInitSegment(e,t):(n=t.details)!=null&&n.live&&!this.initPTS[e.cc]?(this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=O.WAITING_INIT_PTS):(this.startFragRequested=!0,super.loadFragment(e,t,i))}else this.clearTrackerIfNeeded(e)}completeAudioSwitch(e){const{hls:t,media:i,bufferedTrack:s}=this,n=s==null?void 0:s.attrs,a=e.attrs;i&&n&&(n.CHANNELS!==a.CHANNELS||n.NAME!==a.NAME||n.LANGUAGE!==a.LANGUAGE)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio")),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(v.AUDIO_TRACK_SWITCHED,Ve({},e))}}class O0 extends wn{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(v.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:i,groupId:s,details:n}=t,a=this.tracksInGroup[i];if(!a||a.groupId!==s){this.warn(`Track with id:${i} and group:${s} not found in active group ${a.groupId}`);return}const o=a.details;a.details=t.details,this.log(`audio-track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${n.startSN}-${n.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!(t!=null&&t.audioGroupIds))return;const i=t.audioGroupIds[t.urlId];if(this.groupId!==i){this.groupId=i||null;const s=this.tracks.filter(a=>!i||a.groupId===i);this.selectDefaultTrack&&!s.some(a=>a.default)&&(this.selectDefaultTrack=!1),this.tracksInGroup=s;const n={audioTracks:s};this.log(`Updating audio tracks, ${s.length} track(s) found in group:${i}`),this.hls.trigger(v.AUDIO_TRACKS_UPDATED,n),this.selectInitialTrack()}else this.shouldReloadPlaylist(this.currentTrack)&&this.setAudioTrack(this.trackId)}onError(e,t){t.fatal||!t.context||t.context.type===se.AUDIO_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&(this.requestScheduled=-1,this.checkRetry(t))}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();const i=this.currentTrack;t[this.trackId];const s=t[e],{groupId:n,name:a}=s;if(this.log(`Switching to audio-track ${e} "${a}" lang:${s.lang} group:${n}`),this.trackId=e,this.currentTrack=s,this.selectDefaultTrack=!1,this.hls.trigger(v.AUDIO_TRACK_SWITCHING,Ve({},s)),s.details&&!s.details.live)return;const o=this.switchParams(s.url,i==null?void 0:i.details);this.loadPlaylist(o)}selectInitialTrack(){const e=this.tracksInGroup,t=this.findTrackId(this.currentTrack)|this.findTrackId(null);if(t!==-1)this.setAudioTrack(t);else{const i=new Error(`No track found for running audio group-ID: ${this.groupId} track count: ${e.length}`);this.warn(i.message),this.hls.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:i})}}findTrackId(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){const s=t[i];if((!this.selectDefaultTrack||s.default)&&(!e||e.attrs["STABLE-RENDITION-ID"]!==void 0&&e.attrs["STABLE-RENDITION-ID"]===s.attrs["STABLE-RENDITION-ID"]||e.name===s.name&&e.lang===s.lang))return s.id}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(t)){const i=t.id,s=t.groupId;let n=t.url;if(e)try{n=e.addDirectives(n)}catch(a){this.warn(`Could not construct new URL with HLS Delivery Directives: ${a}`)}this.log(`loading audio-track playlist ${i} "${t.name}" lang:${t.lang} group:${s}`),this.clearTimer(),this.hls.trigger(v.AUDIO_TRACK_LOADING,{url:n,id:i,groupId:s,deliveryDirectives:e||null})}}}function ic(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(!M0(r[t].attrs,e[t].attrs))return!1;return!0}function M0(r,e){const t=r["STABLE-RENDITION-ID"];return t?t===e["STABLE-RENDITION-ID"]:!["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED"].some(i=>r[i]!==e[i])}const sc=500;class F0 extends Dn{constructor(e,t,i){super(e,t,i,"[subtitle-stream-controller]",W.SUBTITLE),this.levels=[],this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.LEVEL_LOADED,this.onLevelLoaded,this),e.on(v.ERROR,this.onError,this),e.on(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(v.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.LEVEL_LOADED,this.onLevelLoaded,this),e.off(v.ERROR,this.onError,this),e.off(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(v.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(v.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=O.IDLE,this.setInterval(sc),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:i,success:s}=t;if(this.fragPrevious=i,this.state=O.IDLE,!s)return;const n=this.tracksBuffered[this.currentTrackId];if(!n)return;let a;const o=i.start;for(let c=0;c<n.length;c++)if(o>=n[c].start&&o<=n[c].end){a=n[c];break}const l=i.start+i.duration;a?a.end=l:(a={start:o,end:l},n.push(a)),this.fragmentTracker.fragBuffered(i)}onBufferFlushing(e,t){const{startOffset:i,endOffset:s}=t;if(i===0&&s!==Number.POSITIVE_INFINITY){const n=s-1;if(n<=0)return;t.endOffsetSubtitles=Math.max(0,n),this.tracksBuffered.forEach(a=>{for(let o=0;o<a.length;){if(a[o].end<=n){a.shift();continue}else if(a[o].start<n)a[o].start=n;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(i,n,W.SUBTITLE)}}onFragBuffered(e,t){if(!this.loadedmetadata&&t.frag.type===W.MAIN){var i;(i=this.media)!=null&&i.buffered.length&&(this.loadedmetadata=!0)}}onError(e,t){const i=t.frag;(i==null?void 0:i.type)===W.SUBTITLE&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==O.STOPPED&&(this.state=O.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(ic(this.levels,t)){this.levels=t.map(i=>new es(i));return}this.tracksBuffered=[],this.levels=t.map(i=>{const s=new es(i);return this.tracksBuffered[s.id]=[],s}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,W.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){if(this.currentTrackId=t.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}const i=this.levels[this.currentTrackId];i!=null&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.setInterval(sc)}onSubtitleTrackLoaded(e,t){var i;const{details:s,id:n}=t,{currentTrackId:a,levels:o}=this;if(!o.length)return;const l=o[a];if(n>=o.length||n!==a||!l)return;this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(s.live||(i=l.details)!=null&&i.live){const h=this.mainDetails;if(s.deltaUpdateFailed||!h)return;const d=h.fragments[0];l.details?(c=this.alignPlaylists(s,l.details),c===0&&d&&(c=d.start,Tn(s,c))):s.hasProgramDateTime&&h.hasProgramDateTime?(kl(s,h),c=s.fragments[0].start):d&&(c=d.start,Tn(s,c))}l.details=s,this.levelLastLoaded=n,!this.startFragRequested&&(this.mainDetails||!s.live)&&this.setStartPosition(l.details,c),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===O.IDLE&&(ts(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),l.details=void 0))}_handleFragmentLoadComplete(e){const{frag:t,payload:i}=e,s=t.decryptdata,n=this.hls;if(!this.fragContextChanged(t)&&i&&i.byteLength>0&&s&&s.key&&s.iv&&s.method==="AES-128"){const a=performance.now();this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch(o=>{throw n.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:t}),o}).then(o=>{const l=performance.now();n.trigger(v.FRAG_DECRYPTED,{frag:t,payload:o,stats:{tstart:a,tdecrypt:l}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=O.IDLE})}}doTick(){if(!this.media){this.state=O.IDLE;return}if(this.state===O.IDLE){const{currentTrackId:e,levels:t}=this,i=t[e];if(!t.length||!i||!i.details)return;const{config:s}=this,n=this.getLoadPosition(),a=ce.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],n,s.maxBufferHole),{end:o,len:l}=a,c=this.getFwdBufferInfo(this.media,W.MAIN),h=i.details,d=this.getMaxBufferLength(c==null?void 0:c.len)+h.levelTargetDuration;if(l>d)return;const u=h.fragments,f=u.length,p=h.edge;let m=null;const g=this.fragPrevious;if(o<p){const x=s.maxFragLookUpTolerance,b=o>p-x?0:x;m=ts(g,u,Math.max(u[0].start,o),b),!m&&g&&g.start<u[0].start&&(m=u[0])}else m=u[f-1];if(!m)return;if(m=this.mapToInitFragWhenRequired(m),m.sn!=="initSegment"){const x=m.sn-h.startSN,b=u[x-1];b&&b.cc===m.cc&&this.fragmentTracker.getState(b)===Ce.NOT_LOADED&&(m=b)}this.fragmentTracker.getState(m)===Ce.NOT_LOADED&&this.loadFragment(m,i,o)}}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,i){this.fragCurrent=e,e.sn==="initSegment"?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,i))}get mediaBufferTimeRanges(){return new N0(this.tracksBuffered[this.currentTrackId]||[])}}class N0{constructor(e){this.buffered=void 0;const t=(i,s,n)=>{if(s=s>>>0,s>n-1)throw new DOMException(`Failed to execute '${i}' on 'TimeRanges': The index provided (${s}) is greater than the maximum bound (${n})`);return e[s][i]};this.buffered={get length(){return e.length},end(i){return t("end",i,e.length)},start(i){return t("start",i,e.length)}}}}class U0 extends wn{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.trackChangeListener=()=>this.onTextTracksChanged(),this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes(this.trackId)}registerListeners(){const{hls:e}=this;e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.LEVEL_LOADING,this.onLevelLoading,this),e.on(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.LEVEL_LOADING,this.onLevelLoading,this),e.off(v.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(v.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(v.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),jn(this.media.textTracks).forEach(t=>{yi(t)}),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:i,details:s}=t,{trackId:n}=this,a=this.tracksInGroup[n];if(!a){this.warn(`Invalid subtitle track id ${i}`);return}const o=a.details;a.details=t.details,this.log(`subtitle track ${i} loaded [${s.startSN}-${s.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!(t!=null&&t.textGroupIds))return;const i=t.textGroupIds[t.urlId],s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;if(this.groupId!==i){const n=this.tracks.filter(l=>!i||l.groupId===i);this.tracksInGroup=n;const a=this.findTrackId(s==null?void 0:s.name)||this.findTrackId();this.groupId=i||null;const o={subtitleTracks:n};this.log(`Updating subtitle tracks, ${n.length} track(s) found in "${i}" group-id`),this.hls.trigger(v.SUBTITLE_TRACKS_UPDATED,o),a!==-1&&this.setSubtitleTrack(a,s)}else this.shouldReloadPlaylist(s)&&this.setSubtitleTrack(this.trackId,s)}findTrackId(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){const s=t[i];if((!this.selectDefaultTrack||s.default)&&(!e||e===s.name))return s.id}return-1}onError(e,t){t.fatal||!t.context||t.context.type===se.SUBTITLE_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.checkRetry(t)}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1;const t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}loadPlaylist(e){super.loadPlaylist();const t=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(t)){const i=t.id,s=t.groupId;let n=t.url;if(e)try{n=e.addDirectives(n)}catch(a){this.warn(`Could not construct new URL with HLS Delivery Directives: ${a}`)}this.log(`Loading subtitle playlist for id ${i}`),this.hls.trigger(v.SUBTITLE_TRACK_LOADING,{url:n,id:i,groupId:s,deliveryDirectives:e||null})}}toggleTrackModes(e){const{media:t,trackId:i}=this;if(!t)return;const s=jn(t.textTracks),n=s.filter(o=>o.groupId===this.groupId);if(e===-1)[].slice.call(s).forEach(o=>{o.mode="disabled"});else{const o=n[i];o&&(o.mode="disabled")}const a=n[e];a&&(a.mode=this.subtitleDisplay?"showing":"hidden")}setSubtitleTrack(e,t){var i;const s=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(this.trackId!==e&&this.toggleTrackModes(e),this.trackId===e&&(e===-1||(i=s[e])!=null&&i.details)||e<-1||e>=s.length)return;this.clearTimer();const n=s[e];if(this.log(`Switching to subtitle-track ${e}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:"")),this.trackId=e,n){const{id:a,groupId:o="",name:l,type:c,url:h}=n;this.hls.trigger(v.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:l,type:c,url:h});const d=this.switchParams(n.url,t==null?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(v.SUBTITLE_TRACK_SWITCH,{id:e})}onTextTracksChanged(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=-1;const t=jn(this.media.textTracks);for(let i=0;i<t.length;i++)if(t[i].mode==="hidden")e=i;else if(t[i].mode==="showing"){e=i;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}}function jn(r){const e=[];for(let t=0;t<r.length;t++){const i=r[t];(i.kind==="subtitles"||i.kind==="captions")&&i.label&&e.push(r[t])}return e}class B0{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t){const i=this.queues[t];i.push(e),i.length===1&&this.buffers[t]&&this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const i=new Promise(n=>{t=n}),s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,e),i}executeNext(e){const{buffers:t,queues:i}=this,s=t[e],n=i[e];if(n.length){const a=n[0];try{a.execute()}catch(o){S.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(o),s!=null&&s.updating||(n.shift(),this.executeNext(e))}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const rc=Vs(),nc=/([ha]vc.)(?:\.[^.,]+)+/;class H0{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=()=>{const{media:t,mediaSource:i}=this;S.log("[buffer-controller]: Media source opened"),t&&(t.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(v.MEDIA_ATTACHED,{media:t})),i&&i.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{S.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=()=>{S.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=()=>{const{media:t,_objectUrl:i}=this;t&&t.src!==i&&S.error(`Media element src was set while attaching MediaSource (${i} > ${t.src})`)},this.hls=e,this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null}registerListeners(){const{hls:e}=this;e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.BUFFER_RESET,this.onBufferReset,this),e.on(v.BUFFER_APPENDING,this.onBufferAppending,this),e.on(v.BUFFER_CODECS,this.onBufferCodecs,this),e.on(v.BUFFER_EOS,this.onBufferEos,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(v.FRAG_PARSED,this.onFragParsed,this),e.on(v.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.BUFFER_RESET,this.onBufferReset,this),e.off(v.BUFFER_APPENDING,this.onBufferAppending,this),e.off(v.BUFFER_CODECS,this.onBufferCodecs,this),e.off(v.BUFFER_EOS,this.onBufferEos,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(v.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(v.FRAG_PARSED,this.onFragParsed,this),e.off(v.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new B0(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,S.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const i=this.media=t.media;if(i&&rc){const s=this.mediaSource=new rc;s.addEventListener("sourceopen",this._onMediaSourceOpen),s.addEventListener("sourceended",this._onMediaSourceEnded),s.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(s),this._objectUrl=i.src,i.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:i}=this;if(t){if(S.log("[buffer-controller]: media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(s){S.warn(`[buffer-controller]: onMediaDetaching: ${s.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),i&&self.URL.revokeObjectURL(i),e.src===i?(e.removeAttribute("src"),e.load()):S.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(v.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{const t=this.sourceBuffer[e];try{t&&(this.removeBufferListeners(e),this.mediaSource&&this.mediaSource.removeSourceBuffer(t),this.sourceBuffer[e]=void 0)}catch(i){S.warn(`[buffer-controller]: Failed to reset the ${e} buffer`,i)}}),this._initSourceBuffer()}onBufferCodecs(e,t){const i=this.getSourceBufferTypes().length;Object.keys(t).forEach(s=>{if(i){const n=this.tracks[s];if(n&&typeof n.buffer.changeType=="function"){const{id:a,codec:o,levelCodec:l,container:c,metadata:h}=t[s],d=(n.levelCodec||n.codec).replace(nc,"$1"),u=(l||o).replace(nc,"$1");if(d!==u){const f=`${c};codecs=${l||o}`;this.appendChangeType(s,f),S.log(`[buffer-controller]: switching codec ${d} to ${u}`),this.tracks[s]={buffer:n.buffer,codec:o,container:c,levelCodec:l,metadata:h,id:a}}}}else this.pendingTracks[s]=t[s]}),!i&&(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())}appendChangeType(e,t){const{operationQueue:i}=this,s={execute:()=>{const n=this.sourceBuffer[e];n&&(S.log(`[buffer-controller]: changing ${e} sourceBuffer type to ${t}`),n.changeType(t)),i.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:n=>{S.warn(`[buffer-controller]: Failed to change ${e} SourceBuffer type`,n)}};i.append(s,e)}onBufferAppending(e,t){const{hls:i,operationQueue:s,tracks:n}=this,{data:a,type:o,frag:l,part:c,chunkMeta:h}=t,d=h.buffering[o],u=self.performance.now();d.start=u;const f=l.stats.buffering,p=c?c.stats.buffering:null;f.start===0&&(f.start=u),p&&p.start===0&&(p.start=u);const m=n.audio;let g=!1;o==="audio"&&(m==null?void 0:m.container)==="audio/mpeg"&&(g=!this.lastMpegAudioChunk||h.id===1||this.lastMpegAudioChunk.sn!==h.sn,this.lastMpegAudioChunk=h);const x=l.start,b={execute:()=>{if(d.executeStart=self.performance.now(),g){const A=this.sourceBuffer[o];if(A){const y=x-A.timestampOffset;Math.abs(y)>=.1&&(S.log(`[buffer-controller]: Updating audio SourceBuffer timestampOffset to ${x} (delta: ${y}) sn: ${l.sn})`),A.timestampOffset=x)}}this.appendExecutor(a,o)},onStart:()=>{},onComplete:()=>{const A=self.performance.now();d.executeEnd=d.end=A,f.first===0&&(f.first=A),p&&p.first===0&&(p.first=A);const{sourceBuffer:y}=this,T={};for(const w in y)T[w]=ce.getBuffered(y[w]);this.appendError=0,this.hls.trigger(v.BUFFER_APPENDED,{type:o,frag:l,part:c,chunkMeta:h,parent:l.type,timeRanges:T})},onError:A=>{S.error(`[buffer-controller]: Error encountered while trying to append to the ${o} SourceBuffer`,A);const y={type:K.MEDIA_ERROR,parent:l.type,details:D.BUFFER_APPEND_ERROR,frag:l,part:c,chunkMeta:h,error:A,err:A,fatal:!1};A.code===DOMException.QUOTA_EXCEEDED_ERR?y.details=D.BUFFER_FULL_ERROR:(this.appendError++,y.details=D.BUFFER_APPEND_ERROR,this.appendError>i.config.appendErrorMaxRetry&&(S.error(`[buffer-controller]: Failed ${i.config.appendErrorMaxRetry} times to append segment in sourceBuffer`),y.fatal=!0)),i.trigger(v.ERROR,y)}};s.append(b,o)}onBufferFlushing(e,t){const{operationQueue:i}=this,s=n=>({execute:this.removeExecutor.bind(this,n,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(v.BUFFER_FLUSHED,{type:n})},onError:a=>{S.warn(`[buffer-controller]: Failed to remove from ${n} SourceBuffer`,a)}});t.type?i.append(s(t.type),t.type):this.getSourceBufferTypes().forEach(n=>{i.append(s(n),n)})}onFragParsed(e,t){const{frag:i,part:s}=t,n=[],a=s?s.elementaryStreams:i.elementaryStreams;a[ne.AUDIOVIDEO]?n.push("audiovideo"):(a[ne.AUDIO]&&n.push("audio"),a[ne.VIDEO]&&n.push("video"));const o=()=>{const l=self.performance.now();i.stats.buffering.end=l,s&&(s.stats.buffering.end=l);const c=s?s.stats:i.stats;this.hls.trigger(v.FRAG_BUFFERED,{frag:i,part:s,stats:c,id:i.type})};n.length===0&&S.warn(`Fragments must have at least one ElementaryStreamType set. type: ${i.type} level: ${i.level} sn: ${i.sn}`),this.blockBuffers(o,n)}onFragChanged(e,t){this.flushBackBuffer()}onBufferEos(e,t){this.getSourceBufferTypes().reduce((s,n)=>{const a=this.sourceBuffer[n];return a&&(!t.type||t.type===n)&&(a.ending=!0,a.ended||(a.ended=!0,S.log(`[buffer-controller]: ${n} sourceBuffer now EOS`))),s&&!!(!a||a.ended)},!0)&&(S.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(n=>{const a=this.sourceBuffer[n];a&&(a.ending=!1)});const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&S.info(`[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}S.log("[buffer-controller]: Calling mediaSource.endOfStream()"),s.endOfStream()}))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}flushBackBuffer(){const{hls:e,details:t,media:i,sourceBuffer:s}=this;if(!i||t===null)return;const n=this.getSourceBufferTypes();if(!n.length)return;const a=t.live&&e.config.liveBackBufferLength!==null?e.config.liveBackBufferLength:e.config.backBufferLength;if(!j(a)||a<0)return;const o=i.currentTime,l=t.levelTargetDuration,c=Math.max(a,l),h=Math.floor(o/l)*l-c;n.forEach(d=>{const u=s[d];if(u){const f=ce.getBuffered(u);if(f.length>0&&h>f.start(0)){if(e.trigger(v.BACK_BUFFER_REACHED,{bufferEnd:h}),t.live)e.trigger(v.LIVE_BACK_BUFFER_REACHED,{bufferEnd:h});else if(u.ended&&f.end(f.length-1)-o<l*2){S.info(`[buffer-controller]: Cannot flush ${d} back buffer while SourceBuffer is in ended state`);return}e.trigger(v.BUFFER_FLUSHING,{startOffset:0,endOffset:h,type:d})}}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:e,hls:t,media:i,mediaSource:s}=this,n=e.fragments[0].start+e.totalduration,a=i.duration,o=j(s.duration)?s.duration:0;e.live&&t.config.liveDurationInfinity?(S.log("[buffer-controller]: Media Source duration is set to Infinity"),s.duration=1/0,this.updateSeekableRange(e)):(n>o&&n>a||!j(a))&&(S.log(`[buffer-controller]: Updating Media Source duration to ${n.toFixed(3)}`),s.duration=n)}updateSeekableRange(e){const t=this.mediaSource,i=e.fragments;if(i.length&&e.live&&t!=null&&t.setLiveSeekableRange){const n=Math.max(0,i[0].start),a=Math.max(n,n+e.totalduration);t.setLiveSeekableRange(n,a)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:i}=this,s=Object.keys(i).length;if(s&&!e||s===2){this.createSourceBuffers(i),this.pendingTracks={};const n=this.getSourceBufferTypes();if(n.length)this.hls.trigger(v.BUFFER_CREATED,{tracks:this.tracks}),n.forEach(a=>{t.executeNext(a)});else{const a=new Error("could not create source buffer for media codec(s)");this.hls.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:a,reason:a.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:i}=this;if(!i)throw Error("createSourceBuffers called when mediaSource was null");for(const s in e)if(!t[s]){const n=e[s];if(!n)throw Error(`source buffer exists for track ${s}, however track does not`);const a=n.levelCodec||n.codec,o=`${n.container};codecs=${a}`;S.log(`[buffer-controller]: creating sourceBuffer(${o})`);try{const l=t[s]=i.addSourceBuffer(o),c=s;this.addBufferListener(c,"updatestart",this._onSBUpdateStart),this.addBufferListener(c,"updateend",this._onSBUpdateEnd),this.addBufferListener(c,"error",this._onSBUpdateError),this.tracks[s]={buffer:l,codec:a,container:n.container,levelCodec:n.levelCodec,metadata:n.metadata,id:n.id}}catch(l){S.error(`[buffer-controller]: error while trying to add sourceBuffer: ${l.message}`),this.hls.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:o})}}}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){const{operationQueue:t}=this;t.current(e).onComplete(),t.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){const i=new Error(`${e} SourceBuffer error`);S.error(`[buffer-controller]: ${i}`,t),this.hls.trigger(v.ERROR,{type:K.MEDIA_ERROR,details:D.BUFFER_APPENDING_ERROR,error:i,fatal:!1});const s=this.operationQueue.current(e);s&&s.onError(t)}removeExecutor(e,t,i){const{media:s,mediaSource:n,operationQueue:a,sourceBuffer:o}=this,l=o[e];if(!s||!n||!l){S.warn(`[buffer-controller]: Attempting to remove from the ${e} SourceBuffer, but it does not exist`),a.shiftAndExecuteNext(e);return}const c=j(s.duration)?s.duration:1/0,h=j(n.duration)?n.duration:1/0,d=Math.max(0,t),u=Math.min(i,c,h);u>d&&!l.ending?(l.ended=!1,S.log(`[buffer-controller]: Removing [${d},${u}] from the ${e} SourceBuffer`),l.remove(d,u)):a.shiftAndExecuteNext(e)}appendExecutor(e,t){const{operationQueue:i,sourceBuffer:s}=this,n=s[t];if(!n){S.warn(`[buffer-controller]: Attempting to append to the ${t} SourceBuffer, but it does not exist`),i.shiftAndExecuteNext(t);return}n.ended=!1,n.appendBuffer(e)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length){S.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:i}=this,s=t.map(n=>i.appendBlocker(n));Promise.all(s).then(()=>{e(),t.forEach(n=>{const a=this.sourceBuffer[n];a!=null&&a.updating||i.shiftAndExecuteNext(n)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,i){const s=this.sourceBuffer[e];if(!s)return;const n=i.bind(this,e);this.listeners[e].push({event:t,listener:n}),s.addEventListener(t,n)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach(i=>{t.removeEventListener(i.event,i.listener)})}}const ac={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},oc=function(e){let t=e;return ac.hasOwnProperty(e)&&(t=ac[e]),String.fromCharCode(t)},ot=15,Lt=100,G0={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},V0={17:2,18:4,21:6,22:8,23:10,19:13,20:15},j0={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},z0={25:2,26:4,29:6,30:8,31:10,27:13,28:15},K0=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class W0{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const i=typeof t=="function"?t():t;S.log(`${this.time} [${e}] ${i}`)}}}const ei=function(e){const t=[];for(let i=0;i<e.length;i++)t.push(e[i].toString(16));return t};class lc{constructor(e,t,i,s,n){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=i||!1,this.background=s||"black",this.flash=n||!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let i=0;i<t.length;i++){const s=t[i];e.hasOwnProperty(s)&&(this[s]=e[s])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Y0{constructor(e,t,i,s,n,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new lc(t,i,s,n,a)}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class X0{constructor(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(let t=0;t<Lt;t++)this.chars.push(new Y0);this.logger=e,this.pos=0,this.currPenState=new lc}equals(e){let t=!0;for(let i=0;i<Lt;i++)if(!this.chars[i].equals(e.chars[i])){t=!1;break}return t}copy(e){for(let t=0;t<Lt;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Lt;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Lt&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Lt)}moveCursor(e){const t=this.pos+e;if(e>1)for(let i=this.pos+1;i<t+1;i++)this.chars[i].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=oc(e);if(this.pos>=Lt){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1)}clearFromPos(e){let t;for(t=e;t<Lt;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let i=0;i<Lt;i++){const s=this.chars[i].uchar;s!==" "&&(t=!1),e.push(s)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class zn{constructor(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(let t=0;t<ot;t++)this.rows.push(new X0(e));this.logger=e,this.currRow=ot-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}reset(){for(let e=0;e<ot;e++)this.rows[e].clear();this.currRow=ot-1}equals(e){let t=!0;for(let i=0;i<ot;i++)if(!this.rows[i].equals(e.rows[i])){t=!1;break}return t}copy(e){for(let t=0;t<ot;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ot;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+JSON.stringify(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let o=0;o<ot;o++)this.rows[o].clear();const n=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){const o=a.rows[n].cueStartTime,l=this.logger.time;if(o&&l!==null&&o<l)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(a.rows[n+c])}}this.currRow=t;const i=this.rows[this.currRow];if(e.indent!==null){const n=e.indent,a=Math.max(n-1,0);i.setCursor(e.indent),e.color=i.chars[a].penState.foreground}const s={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(s)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let i="",s=-1;for(let n=0;n<ot;n++){const a=this.rows[n].getTextString();a&&(s=n+1,e?t.push("Row "+s+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(e?i="["+t.join(" | ")+"]":i=t.join(`
|
87
|
-
`)),i}getTextAndFormat(){return this.rows}}class cc{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new zn(i),this.nonDisplayedMemory=new zn(i),this.lastOutputScreen=new zn(i),this.currRollUpRow=this.displayedMemory.rows[ot-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[ot-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let i=0;i<e.length;i++)this.writeScreen.insertChar(e[i]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const i=Math.floor(e/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=s[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class hc{constructor(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;const s=new W0;this.channels=[null,new cc(e,t,s),new cc(e+1,i,s)],this.cmdHistory=uc(),this.logger=s}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){let i,s,n,a=!1;this.logger.time=e;for(let o=0;o<t.length;o+=2)if(s=t[o]&127,n=t[o+1]&127,!(s===0&&n===0)){if(this.logger.log(3,"["+ei([t[o],t[o+1]])+"] -> ("+ei([s,n])+")"),i=this.parseCmd(s,n),i||(i=this.parseMidrow(s,n)),i||(i=this.parsePAC(s,n)),i||(i=this.parseBackgroundAttributes(s,n)),!i&&(a=this.parseChars(s,n),a)){const l=this.currentChannel;l&&l>0?this.channels[l].insertChars(a):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!i&&!a&&this.logger.log(2,"Couldn't parse cleaned data "+ei([s,n])+" orig: "+ei([t[o],t[o+1]]))}}parseCmd(e,t){const{cmdHistory:i}=this,s=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=33&&t<=35;if(!(s||n))return!1;if(dc(e,t,i))return Ti(null,null,i),this.logger.log(3,"Repeated command ("+ei([e,t])+") is dropped"),!0;const a=e===20||e===21||e===23?1:2,o=this.channels[a];return e===20||e===21||e===28||e===29?t===32?o.ccRCL():t===33?o.ccBS():t===34?o.ccAOF():t===35?o.ccAON():t===36?o.ccDER():t===37?o.ccRU(2):t===38?o.ccRU(3):t===39?o.ccRU(4):t===40?o.ccFON():t===41?o.ccRDC():t===42?o.ccTR():t===43?o.ccRTD():t===44?o.ccEDM():t===45?o.ccCR():t===46?o.ccENM():t===47&&o.ccEOC():o.ccTO(t-32),Ti(e,t,i),this.currentChannel=a,!0}parseMidrow(e,t){let i=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?i=1:i=2,i!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[i];return s?(s.ccMIDROW(t),this.logger.log(3,"MIDROW ("+ei([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let i;const s=this.cmdHistory,n=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,a=(e===16||e===24)&&t>=64&&t<=95;if(!(n||a))return!1;if(dc(e,t,s))return Ti(null,null,s),!0;const o=e<=23?1:2;t>=64&&t<=95?i=o===1?G0[e]:j0[e]:i=o===1?V0[e]:z0[e];const l=this.channels[o];return l?(l.setPAC(this.interpretPAC(i,t)),Ti(e,t,s),this.currentChannel=o,!0):!1}interpretPAC(e,t){let i;const s={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?i=t-96:i=t-64,s.underline=(i&1)===1,i<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(s.italics=!0,s.color="white"):s.indent=Math.floor((i-16)/2)*4,s}parseChars(e,t){let i,s=null,n=null;if(e>=25?(i=2,n=e-8):(i=1,n=e),n>=17&&n<=19){let a;n===17?a=t+80:n===18?a=t+112:a=t+144,this.logger.log(2,"Special char '"+oc(a)+"' in channel "+i),s=[a]}else e>=32&&e<=127&&(s=t===0?[e]:[e,t]);if(s){const a=ei(s);this.logger.log(3,"Char codes = "+a.join(",")),Ti(e,t,this.cmdHistory)}return s}parseBackgroundAttributes(e,t){const i=(e===16||e===24)&&t>=32&&t<=47,s=(e===23||e===31)&&t>=45&&t<=47;if(!(i||s))return!1;let n;const a={};e===16||e===24?(n=Math.floor((t-32)/2),a.background=K0[n],t%2===1&&(a.background=a.background+"_semi")):t===45?a.background="transparent":(a.foreground="black",t===47&&(a.underline=!0));const o=e<=23?1:2;return this.channels[o].setBkgData(a),Ti(e,t,this.cmdHistory),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}this.cmdHistory=uc()}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const i=this.channels[t];i&&i.cueSplitAtTime(e)}}}function Ti(r,e,t){t.a=r,t.b=e}function dc(r,e,t){return t.a===r&&t.b===e}function uc(){return{a:null,b:null}}class $s{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,i){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var Kn=function(){if(typeof self<"u"&&self.VTTCue)return self.VTTCue;const r=["","lr","rl"],e=["start","middle","end","left","right"];function t(o,l){if(typeof l!="string"||!Array.isArray(o))return!1;const c=l.toLowerCase();return~o.indexOf(c)?c:!1}function i(o){return t(r,o)}function s(o){return t(e,o)}function n(o,...l){let c=1;for(;c<arguments.length;c++){const h=arguments[c];for(const d in h)o[d]=h[d]}return o}function a(o,l,c){const h=this,d={enumerable:!0};h.hasBeenReset=!1;let u="",f=!1,p=o,m=l,g=c,x=null,b="",A=!0,y="auto",T="start",w=50,L="middle",I=50,R="middle";Object.defineProperty(h,"id",n({},d,{get:function(){return u},set:function(E){u=""+E}})),Object.defineProperty(h,"pauseOnExit",n({},d,{get:function(){return f},set:function(E){f=!!E}})),Object.defineProperty(h,"startTime",n({},d,{get:function(){return p},set:function(E){if(typeof E!="number")throw new TypeError("Start time must be set to a number.");p=E,this.hasBeenReset=!0}})),Object.defineProperty(h,"endTime",n({},d,{get:function(){return m},set:function(E){if(typeof E!="number")throw new TypeError("End time must be set to a number.");m=E,this.hasBeenReset=!0}})),Object.defineProperty(h,"text",n({},d,{get:function(){return g},set:function(E){g=""+E,this.hasBeenReset=!0}})),Object.defineProperty(h,"region",n({},d,{get:function(){return x},set:function(E){x=E,this.hasBeenReset=!0}})),Object.defineProperty(h,"vertical",n({},d,{get:function(){return b},set:function(E){const M=i(E);if(M===!1)throw new SyntaxError("An invalid or illegal string was specified.");b=M,this.hasBeenReset=!0}})),Object.defineProperty(h,"snapToLines",n({},d,{get:function(){return A},set:function(E){A=!!E,this.hasBeenReset=!0}})),Object.defineProperty(h,"line",n({},d,{get:function(){return y},set:function(E){if(typeof E!="number"&&E!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");y=E,this.hasBeenReset=!0}})),Object.defineProperty(h,"lineAlign",n({},d,{get:function(){return T},set:function(E){const M=s(E);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");T=M,this.hasBeenReset=!0}})),Object.defineProperty(h,"position",n({},d,{get:function(){return w},set:function(E){if(E<0||E>100)throw new Error("Position must be between 0 and 100.");w=E,this.hasBeenReset=!0}})),Object.defineProperty(h,"positionAlign",n({},d,{get:function(){return L},set:function(E){const M=s(E);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");L=M,this.hasBeenReset=!0}})),Object.defineProperty(h,"size",n({},d,{get:function(){return I},set:function(E){if(E<0||E>100)throw new Error("Size must be between 0 and 100.");I=E,this.hasBeenReset=!0}})),Object.defineProperty(h,"align",n({},d,{get:function(){return R},set:function(E){const M=s(E);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");R=M,this.hasBeenReset=!0}})),h.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class q0{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function fc(r){function e(i,s,n,a){return(i|0)*3600+(s|0)*60+(n|0)+parseFloat(a||0)}const t=r.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class Z0{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,i){for(let s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const i=parseFloat(t);if(i>=0&&i<=100)return this.set(e,i),!0}return!1}}function pc(r,e,t,i){const s=i?r.split(i):[r];for(const n in s){if(typeof s[n]!="string")continue;const a=s[n].split(t);if(a.length!==2)continue;const o=a[0],l=a[1];e(o,l)}}const Wn=new Kn(0,0,""),er=Wn.align==="middle"?"middle":"center";function J0(r,e,t){const i=r;function s(){const o=fc(r);if(o===null)throw new Error("Malformed timestamp: "+i);return r=r.replace(/^[^\sa-zA-Z-]+/,""),o}function n(o,l){const c=new Z0;pc(o,function(u,f){let p;switch(u){case"region":for(let m=t.length-1;m>=0;m--)if(t[m].id===f){c.set(u,t[m].region);break}break;case"vertical":c.alt(u,f,["rl","lr"]);break;case"line":p=f.split(","),c.integer(u,p[0]),c.percent(u,p[0])&&c.set("snapToLines",!1),c.alt(u,p[0],["auto"]),p.length===2&&c.alt("lineAlign",p[1],["start",er,"end"]);break;case"position":p=f.split(","),c.percent(u,p[0]),p.length===2&&c.alt("positionAlign",p[1],["start",er,"end","line-left","line-right","auto"]);break;case"size":c.percent(u,f);break;case"align":c.alt(u,f,["start",er,"end","left","right"]);break}},/:/,/\s/),l.region=c.get("region",null),l.vertical=c.get("vertical","");let h=c.get("line","auto");h==="auto"&&Wn.line===-1&&(h=-1),l.line=h,l.lineAlign=c.get("lineAlign","start"),l.snapToLines=c.get("snapToLines",!0),l.size=c.get("size",100),l.align=c.get("align",er);let d=c.get("position","auto");d==="auto"&&Wn.position===50&&(d=l.align==="start"||l.align==="left"?0:l.align==="end"||l.align==="right"?100:50),l.position=d}function a(){r=r.replace(/^\s+/,"")}if(a(),e.startTime=s(),a(),r.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);r=r.slice(3),a(),e.endTime=s(),a(),n(r,e)}function mc(r){return r.replace(/<br(?: \/)?>/gi,`
|
88
|
-
`)}class Q0{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new q0,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function i(){let n=t.buffer,a=0;for(n=mc(n);a<n.length&&n[a]!=="\r"&&n[a]!==`
|
89
|
-
`;)++a;const o=n.slice(0,a);return n[a]==="\r"&&++a,n[a]===`
|
90
|
-
`&&++a,t.buffer=n.slice(a),o}function s(n){pc(n,function(a,o){},/:/)}try{let n="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;n=i();const o=n.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let a=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:n=i(),t.state){case"HEADER":/:/.test(n)?s(n):n||(t.state="ID");continue;case"NOTE":n||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){t.state="NOTE";break}if(!n)continue;if(t.cue=new Kn(0,0,""),t.state="CUE",n.indexOf("-->")===-1){t.cue.id=n;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{J0(n,t.cue,t.regionList)}catch{t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const o=n.indexOf("-->")!==-1;if(!n||o&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
|
91
|
-
`),t.cue.text+=n}continue;case"BADCUE":n||(t.state="ID")}}}catch{t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
|
92
|
-
|
93
|
-
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const _0=/\r\n|\n\r|\n|\r/g,Yn=function(e,t,i=0){return e.slice(i,i+t.length)===t},$0=function(e){let t=parseInt(e.slice(-3));const i=parseInt(e.slice(-6,-4)),s=parseInt(e.slice(-9,-7)),n=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!j(t)||!j(i)||!j(s)||!j(n))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=60*1e3*s,t+=60*60*1e3*n,t},Xn=function(e){let t=5381,i=e.length;for(;i;)t=t*33^e.charCodeAt(--i);return(t>>>0).toString()};function qn(r,e,t){return Xn(r.toString())+Xn(e.toString())+Xn(t)}const ep=function(e,t,i){let s=e[t],n=e[s.prevCC];if(!n||!n.new&&s.new){e.ccOffset=e.presentationOffset=s.start,s.new=!1;return}for(;(a=n)!=null&&a.new;){var a;e.ccOffset+=s.start-n.start,s.new=!1,s=n,n=e[s.prevCC]}e.presentationOffset=i};function tp(r,e,t,i,s,n,a){const o=new Q0,l=ut(new Uint8Array(r)).trim().replace(_0,`
|
73
|
+
*/const Ed=Symbol();let To=class{get taskComplete(){return this.t||(this.status===1?this.t=new Promise((t,e)=>{this.i=t,this.o=e}):this.status===3?this.t=Promise.reject(this.h):this.t=Promise.resolve(this.l)),this.t}constructor(t,e,i){var n;this.u=0,this.status=0,(this.p=t).addController(this);const s=typeof e=="object"?e:{task:e,args:i};this._=s.task,this.v=s.args,this.j=s.argsEqual??bd,this.m=s.onComplete,this.g=s.onError,this.autoRun=s.autoRun??!0,"initialValue"in s&&(this.l=s.initialValue,this.status=2,this.k=(n=this.A)==null?void 0:n.call(this))}hostUpdate(){this.autoRun===!0&&this.O()}hostUpdated(){this.autoRun==="afterUpdate"&&this.O()}A(){if(this.v===void 0)return;const t=this.v();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async O(){const t=this.A(),e=this.k;this.k=t,t===e||t===void 0||e!==void 0&&this.j(e,t)||await this.run(t)}async run(t){var a,o,l,h,c;let e,i;t??(t=this.A()),this.k=t,this.status===1?(a=this.T)==null||a.abort():(this.t=void 0,this.i=void 0,this.o=void 0),this.status=1,this.autoRun==="afterUpdate"?queueMicrotask(()=>this.p.requestUpdate()):this.p.requestUpdate();const s=++this.u;this.T=new AbortController;let n=!1;try{e=await this._(t,{signal:this.T.signal})}catch(d){n=!0,i=d}if(this.u===s){if(e===Ed)this.status=0;else{if(n===!1){try{(o=this.m)==null||o.call(this,e)}catch{}this.status=2,(l=this.i)==null||l.call(this,e)}else{try{(h=this.g)==null||h.call(this,i)}catch{}this.status=3,(c=this.o)==null||c.call(this,i)}this.l=e,this.h=i}this.p.requestUpdate()}}abort(t){var e;this.status===1&&((e=this.T)==null||e.abort(t))}get value(){return this.l}get error(){return this.h}render(t){var e,i,s,n;switch(this.status){case 0:return(e=t.initial)==null?void 0:e.call(t);case 1:return(i=t.pending)==null?void 0:i.call(t);case 2:return(s=t.complete)==null?void 0:s.call(t,this.value);case 3:return(n=t.error)==null?void 0:n.call(t,this.error);default:throw Error("Unexpected status: "+this.status)}}};const bd=(r,t)=>r===t||r.length===t.length&&r.every((e,i)=>!Yr(e,t[i])),qr="https://vouchfor.com",Td="https://d2rxhdlm2q91uk.cloudfront.net",Ad="https://d1ix11aj5kfygl.cloudfront.net",wd="https://d157jlwnudd93d.cloudfront.net",Sd="https://bshyfw4h5a.execute-api.ap-southeast-2.amazonaws.com/dev",Ld="https://gyzw7rpbq3.execute-api.ap-southeast-2.amazonaws.com/staging",Rd="https://vfcjuim1l3.execute-api.ap-southeast-2.amazonaws.com/prod",_d="https://embed-dev.vouchfor.com/v2",kd="https://embed-staging.vouchfor.com/v2",Id="https://embed.vouchfor.com/v2",Dd="https://dev.vouchfor.com",Cd="https://staging.vouchfor.com",xd="https://app.vouchfor.com";function $s(r){if(!["dev","staging","prod"].includes(r))throw new Error(`Unknown environment: ${r}`);if(r==="dev")return{marketingUrl:qr,videoUrl:Td,publicApiUrl:Sd,embedApiUrl:_d,publicRecorderUrl:Dd};if(r==="staging")return{marketingUrl:qr,videoUrl:Ad,publicApiUrl:Ld,embedApiUrl:kd,publicRecorderUrl:Cd};if(r==="prod")return{marketingUrl:qr,videoUrl:wd,publicApiUrl:Rd,embedApiUrl:Id,publicRecorderUrl:xd}}class Pd{constructor(t){this._fetching=!1,this.getVouch=(e,i,s)=>{const{embedApiUrl:n}=$s(e);return fetch(`${n}/vouches/${s}`,{method:"GET",headers:[["X-Api-Key",i]]}).then(a=>(this.host.dispatchEvent(new CustomEvent("vouch:loaded",{detail:s})),a.json()))},this.host=t,new To(this.host,async([e,i,s,n,a])=>{var o,l,h,c;try{if(t.vouch=void 0,t.template=void 0,s){let d;a&&(this.fetching=!0,d=await this.getTemplate(e,i,a)),t.vouch=s,t.template=d??((l=(o=s==null?void 0:s.settings)==null?void 0:o.template)==null?void 0:l.instance)}else if(n){this.fetching=!0;const[d,u]=await Promise.all([this.getVouch(e,i,n),a?this.getTemplate(e,i,a):null]);t.vouch=d,t.template=u??((c=(h=d==null?void 0:d.settings)==null?void 0:h.template)==null?void 0:c.instance)}}finally{this.fetching=!1}},()=>[t.env,t.apiKey,t.data,t.vouchId,t.templateId])}set fetching(t){this._fetching!==t&&(this._fetching=t,this.host.requestUpdate())}get fetching(){return this._fetching}async getTemplate(t,e,i){const{embedApiUrl:s}=$s(t);return fetch(`${s}/templates/${i}`,{method:"GET",headers:[["X-Api-Key",e]]}).then(n=>n.json())}}let Ms;const Od=new Uint8Array(16);function $d(){if(!Ms&&(Ms=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ms))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ms(Od)}const Nt=[];for(let r=0;r<256;++r)Nt.push((r+256).toString(16).slice(1));function Md(r,t=0){return Nt[r[t+0]]+Nt[r[t+1]]+Nt[r[t+2]]+Nt[r[t+3]]+"-"+Nt[r[t+4]]+Nt[r[t+5]]+"-"+Nt[r[t+6]]+Nt[r[t+7]]+"-"+Nt[r[t+8]]+Nt[r[t+9]]+"-"+Nt[r[t+10]]+Nt[r[t+11]]+Nt[r[t+12]]+Nt[r[t+13]]+Nt[r[t+14]]+Nt[r[t+15]]}const Ao={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Qi(r,t,e){if(Ao.randomUUID&&!t&&!r)return Ao.randomUUID();r=r||{};const i=r.random||(r.rng||$d)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){e=e||0;for(let s=0;s<16;++s)t[e+s]=i[s];return t}return Md(i)}const Fd=2e3;class Nd{constructor(t){this._tabId=void 0,this._clientId=void 0,this._visitorId=void 0,this._hasPlayed=!1,this._hasLoaded={},this._answersViewed={},this._streamedTime={},this._streamedPrevTimestamp={},this._createVisitor=e=>{var s,n;const{publicApiUrl:i}=$s(this.host.env);return(n=(s=window.localStorage)==null?void 0:s.setItem)==null||n.call(s,"vouch-uid-visitor",e),navigator.sendBeacon(`${i}/api/visitor`,JSON.stringify({visitorId:e})),e},this._getReportingMetadata=()=>{var n,a;const[e,i]=((a=(n=Intl.DateTimeFormat().resolvedOptions().timeZone)==null?void 0:n.split)==null?void 0:a.call(n,"/"))??[],s={};return[...new URLSearchParams(location.search).entries()].forEach(([o,l])=>{if(/utm/.test(o)){const h=o.toLowerCase().replace(/[-_][a-z0-9]/g,c=>c.slice(-1).toUpperCase());s[h]=l}}),{source:this.host.trackingSource,time:new Date,region:i,country:e,screenHeight:window.screen.height,screenWidth:window.screen.width,referrer:document.referrer,currentUrl:location.href,...s}},this._sendTrackingEvent=(e,i)=>{const{publicApiUrl:s}=$s(this.host.env),{client:n,tab:a,request:o,visitor:l}=this._getUids();navigator.sendBeacon(`${s}/api/events`,JSON.stringify({event:e,payload:i,context:{"x-uid-client":n,"x-uid-tab":a,"x-uid-request":o,"x-uid-visitor":l,"x-reporting-metadata":this._getReportingMetadata()}}))},this._handleVouchLoaded=({detail:e})=>{e&&(this._hasLoaded[e]||(this._sendTrackingEvent("VOUCH_LOADED",{vouchId:e}),this._hasLoaded[e]=!0))},this._handlePlay=()=>{const e=this._findVouchId();e&&(this._hasPlayed||(this._sendTrackingEvent("VIDEO_PLAYED",{vouchId:e,streamStart:this.host.currentTime}),this._hasPlayed=!0))},this._handleVideoPlay=({detail:{id:e,node:i}})=>{const s=this._findVouchId();s&&(this._answersViewed[e]||(this._sendTrackingEvent("VOUCH_RESPONSE_VIEWED",{vouchId:s,answerId:e}),this._answersViewed[e]=!0),this._streamedTime[e]=i.currentTime,this._streamedPrevTimestamp[e]=Date.now())},this._handleVideoTimeUpdate=({detail:{id:e,node:i}})=>{var a,o;const s=this._findVouchId();if(!s)return;const n=Date.now();!this.host.paused&&e===((o=(a=this.host.scene)==null?void 0:a.video)==null?void 0:o.id)&&n-this._streamedPrevTimestamp[e]>Fd&&(this._sendTrackingEvent("VIDEO_STREAMED",{vouchId:s,answerId:e,streamStart:this._streamedTime[e],streamEnd:i.currentTime}),this._streamedTime[e]=i.currentTime,this._streamedPrevTimestamp[e]=n)},this._handleVideoPause=({detail:{id:e,node:i}})=>{const s=this._findVouchId();s&&(this._sendTrackingEvent("VIDEO_STREAMED",{vouchId:s,answerId:e,streamStart:this._streamedTime[e],streamEnd:i.currentTime}),delete this._streamedTime[e],delete this._streamedPrevTimestamp[e])},this.host=t,t.addController(this)}_findVouchId(){if(this.host.data)return"uuid"in this.host.data?this.host.data.uuid:this.host.data.id}_getUids(){var n,a,o,l,h,c,d,u,f,p,g,v;if(typeof window>"u")return{client:null,tab:null,request:Qi()};const t=this._visitorId||((a=(n=window.localStorage)==null?void 0:n.getItem)==null?void 0:a.call(n,"vouch-uid-visitor"))||this._createVisitor(Qi()),e=this._clientId||((l=(o=window.localStorage)==null?void 0:o.getItem)==null?void 0:l.call(o,"vouch-uid-client"))||Qi(),i=this._tabId||((c=(h=window.sessionStorage)==null?void 0:h.getItem)==null?void 0:c.call(h,"vouch-uid-tab"))||Qi(),s=Qi();return t!==this._visitorId&&(this._visitorId=t,(u=(d=window.localStorage)==null?void 0:d.setItem)==null||u.call(d,"vouch-uid-visitor",t)),e!==this._clientId&&(this._clientId=e,(p=(f=window.localStorage)==null?void 0:f.setItem)==null||p.call(f,"vouch-uid-client",e)),i!==this._tabId&&(this._tabId=i,(v=(g=window.sessionStorage)==null?void 0:g.setItem)==null||v.call(g,"vouch-uid-tab",i)),{client:e,tab:i,request:s,visitor:t}}hostConnected(){requestAnimationFrame(()=>{var t,e,i,s;this.host.addEventListener("vouch:loaded",this._handleVouchLoaded),(t=this.host.mediaPlayer)==null||t.addEventListener("play",this._handlePlay),(e=this.host.mediaPlayer)==null||e.addEventListener("video:play",this._handleVideoPlay),(i=this.host.mediaPlayer)==null||i.addEventListener("video:pause",this._handleVideoPause),(s=this.host.mediaPlayer)==null||s.addEventListener("video:timeupdate",this._handleVideoTimeUpdate)})}hostDisconnected(){var t,e,i,s;this.host.removeEventListener("vouch:loaded",this._handleVouchLoaded),(t=this.host.mediaPlayer)==null||t.removeEventListener("play",this._handlePlay),(e=this.host.mediaPlayer)==null||e.removeEventListener("video:play",this._handleVideoPlay),(i=this.host.mediaPlayer)==null||i.removeEventListener("video:pause",this._handleVideoPause),(s=this.host.mediaPlayer)==null||s.removeEventListener("video:timeupdate",this._handleVideoTimeUpdate)}}var Fs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Xr={exports:{}};(function(r,t){(function(e,i){i(t)})(Fs,function(e){function i(b){var T,k,N=new Error(b);return T=N,k=i.prototype,Object.setPrototypeOf?Object.setPrototypeOf(T,k):T.__proto__=k,N}function s(b,T,k){var N=T.slice(0,k).split(/\n/),U=N.length,K=N[U-1].length+1;throw i(b+=" at line "+U+" col "+K+`:
|
74
|
+
|
75
|
+
`+T.split(/\n/)[U-1]+`
|
76
|
+
`+Array(K).join(" ")+"^")}i.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});var n=new Function("return this")().Promise,a=!1;try{a=new Function("return (async function(){}).constructor")()}catch(b){if(!(b instanceof SyntaxError))throw b}function o(b,T){return Object.prototype.hasOwnProperty.call(b,T)}function l(b,T,k){for(var N in T)o(T,N)&&(T[N]==null||typeof T[N]!="object"||N!=="storage"&&N!=="prefixes"||k?b[N]=T[N]:b[N]=l({},T[N]));return b}var h=/^async +/,c=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,d=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,u=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,f=/[.*+\-?^${}()|[\]\\]/g;function p(b){return f.test(b)?b.replace(f,"\\$&"):b}function g(b,T){T.rmWhitespace&&(b=b.replace(/[\r\n]+/g,`
|
77
|
+
`).replace(/^\s+|\s+$/gm,"")),c.lastIndex=0,d.lastIndex=0,u.lastIndex=0;var k=T.prefixes,N=[k.h,k.b,k.i,k.r,k.c,k.e].reduce(function(nt,it){return nt&&it?nt+"|"+p(it):it?p(it):nt},""),U=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+p(T.tags[1])+")","g"),K=new RegExp("([^]*?)"+p(T.tags[0])+"(-|_)?\\s*("+N+")?\\s*","g"),W=0,X=!1;function lt(nt,it){var vt,dt={f:[]},Ct=0,et="c";function ut(ve){var De=b.slice(W,ve),Ht=De.trim();if(et==="f")Ht==="safe"?dt.raw=!0:T.async&&h.test(Ht)?(Ht=Ht.replace(h,""),dt.f.push([Ht,"",!0])):dt.f.push([Ht,""]);else if(et==="fp")dt.f[dt.f.length-1][1]+=Ht;else if(et==="err"){if(Ht){var ne=De.search(/\S/);s("invalid syntax",b,W+ne)}}else dt[et]=Ht;W=ve+1}for(it==="h"||it==="b"||it==="c"?et="n":it==="r"&&(dt.raw=!0,it="i"),U.lastIndex=W;(vt=U.exec(b))!==null;){var bt=vt[1],pt=vt[2],Tt=vt[3],_t=vt[4],Ot=vt[5],ft=vt.index;if(bt)bt==="("?(Ct===0&&(et==="n"?(ut(ft),et="p"):et==="f"&&(ut(ft),et="fp")),Ct++):bt===")"?--Ct===0&&et!=="c"&&(ut(ft),et="err"):Ct===0&&bt==="|"?(ut(ft),et="f"):bt==="=>"&&(ut(ft),W+=1,et="res");else if(pt)if(pt==="/*"){var Yt=b.indexOf("*/",U.lastIndex);Yt===-1&&s("unclosed comment",b,vt.index),U.lastIndex=Yt+2}else pt==="'"?(d.lastIndex=vt.index,d.exec(b)?U.lastIndex=d.lastIndex:s("unclosed string",b,vt.index)):pt==='"'?(u.lastIndex=vt.index,u.exec(b)?U.lastIndex=u.lastIndex:s("unclosed string",b,vt.index)):pt==="`"&&(c.lastIndex=vt.index,c.exec(b)?U.lastIndex=c.lastIndex:s("unclosed string",b,vt.index));else if(Tt)return ut(ft),W=ft+vt[0].length,K.lastIndex=W,X=Ot,_t&&it==="h"&&(it="s"),dt.t=it,dt}return s("unclosed tag",b,nt),dt}var rt=function nt(it,vt){it.b=[],it.d=[];var dt,Ct=!1,et=[];function ut(ne,Mi){ne&&(ne=function(ee,fi,Ss,Ls){var Ce,O;return typeof fi.autoTrim=="string"?Ce=O=fi.autoTrim:Array.isArray(fi.autoTrim)&&(Ce=fi.autoTrim[1],O=fi.autoTrim[0]),(Ss||Ss===!1)&&(Ce=Ss),(Ls||Ls===!1)&&(O=Ls),Ce==="slurp"&&O==="slurp"?ee.trim():(Ce==="_"||Ce==="slurp"?ee=String.prototype.trimLeft?ee.trimLeft():ee.replace(/^[\s\uFEFF\xA0]+/,""):Ce!=="-"&&Ce!=="nl"||(ee=ee.replace(/^(?:\n|\r|\r\n)/,"")),O==="_"||O==="slurp"?ee=String.prototype.trimRight?ee.trimRight():ee.replace(/[\s\uFEFF\xA0]+$/,""):O!=="-"&&O!=="nl"||(ee=ee.replace(/(?:\n|\r|\r\n)$/,"")),ee)}(ne,T,X,Mi))&&(ne=ne.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),et.push(ne))}for(;(dt=K.exec(b))!==null;){var bt,pt=dt[1],Tt=dt[2],_t=dt[3]||"";for(var Ot in k)if(k[Ot]===_t){bt=Ot;break}ut(pt,Tt),W=dt.index+dt[0].length,bt||s("unrecognized tag type: "+_t,b,W);var ft=lt(dt.index,bt),Yt=ft.t;if(Yt==="h"){var ve=ft.n||"";T.async&&h.test(ve)&&(ft.a=!0,ft.n=ve.replace(h,"")),ft=nt(ft),et.push(ft)}else if(Yt==="c"){if(it.n===ft.n)return Ct?(Ct.d=et,it.b.push(Ct)):it.d=et,it;s("Helper start and end don't match",b,dt.index+dt[0].length)}else if(Yt==="b"){Ct?(Ct.d=et,it.b.push(Ct)):it.d=et;var De=ft.n||"";T.async&&h.test(De)&&(ft.a=!0,ft.n=De.replace(h,"")),Ct=ft,et=[]}else if(Yt==="s"){var Ht=ft.n||"";T.async&&h.test(Ht)&&(ft.a=!0,ft.n=Ht.replace(h,"")),et.push(ft)}else et.push(ft)}if(!vt)throw i('unclosed helper "'+it.n+'"');return ut(b.slice(W,b.length),!1),it.d=et,it}({f:[]},!0);if(T.plugins)for(var at=0;at<T.plugins.length;at++){var Rt=T.plugins[at];Rt.processAST&&(rt.d=Rt.processAST(rt.d,T))}return rt.d}function v(b,T){var k=g(b,T),N="var tR='';"+(T.useWith?"with("+T.varName+"||{}){":"")+S(k,T)+"if(cb){cb(null,tR)} return tR"+(T.useWith?"}":"");if(T.plugins)for(var U=0;U<T.plugins.length;U++){var K=T.plugins[U];K.processFnString&&(N=K.processFnString(N,T))}return N}function E(b,T){for(var k=0;k<T.length;k++){var N=T[k][0],U=T[k][1];b=(T[k][2]?"await ":"")+"c.l('F','"+N+"')("+b,U&&(b+=","+U),b+=")"}return b}function A(b,T,k,N,U,K){var W="{exec:"+(U?"async ":"")+y(k,T,b)+",params:["+N+"]";return K&&(W+=",name:'"+K+"'"),U&&(W+=",async:true"),W+="}"}function L(b,T){for(var k="[",N=0;N<b.length;N++){var U=b[N];k+=A(T,U.res||"",U.d,U.p||"",U.a,U.n),N<b.length&&(k+=",")}return k+="]"}function y(b,T,k){return"function("+T+"){var tR='';"+S(b,k)+"return tR}"}function S(b,T){for(var k=0,N=b.length,U="";k<N;k++){var K=b[k];if(typeof K=="string")U+="tR+='"+K+"';";else{var W=K.t,X=K.c||"",lt=K.f,rt=K.n||"",at=K.p||"",Rt=K.res||"",nt=K.b,it=!!K.a;if(W==="i"){T.defaultFilter&&(X="c.l('F','"+T.defaultFilter+"')("+X+")");var vt=E(X,lt);!K.raw&&T.autoEscape&&(vt="c.l('F','e')("+vt+")"),U+="tR+="+vt+";"}else if(W==="h")if(T.storage.nativeHelpers.get(rt))U+=T.storage.nativeHelpers.get(rt)(K,T);else{var dt=(it?"await ":"")+"c.l('H','"+rt+"')("+A(T,Rt,K.d,at,it);dt+=nt?","+L(nt,T):",[]",U+="tR+="+E(dt+=",c)",lt)+";"}else W==="s"?U+="tR+="+E((it?"await ":"")+"c.l('H','"+rt+"')({params:["+at+"]},[],c)",lt)+";":W==="e"&&(U+=X+`
|
78
|
+
`)}}return U}var R=function(){function b(T){this.cache=T}return b.prototype.define=function(T,k){this.cache[T]=k},b.prototype.get=function(T){return this.cache[T]},b.prototype.remove=function(T){delete this.cache[T]},b.prototype.reset=function(){this.cache={}},b.prototype.load=function(T){l(this.cache,T,!0)},b}();function D(b,T,k,N){if(T&&T.length>0)throw i((N?"Native":"")+"Helper '"+b+"' doesn't accept blocks");if(k&&k.length>0)throw i((N?"Native":"")+"Helper '"+b+"' doesn't accept filters")}var M={"&":"&","<":"<",">":">",'"':""","'":"'"};function C(b){return M[b]}var I=new R({}),G=new R({each:function(b,T){var k="",N=b.params[0];if(D("each",T,!1),b.async)return new Promise(function(K){(function W(X,lt,rt,at,Rt){rt(X[lt],lt).then(function(nt){at+=nt,lt===X.length-1?Rt(at):W(X,lt+1,rt,at,Rt)})})(N,0,b.exec,k,K)});for(var U=0;U<N.length;U++)k+=b.exec(N[U],U);return k},foreach:function(b,T){var k=b.params[0];if(D("foreach",T,!1),b.async)return new Promise(function(K){(function W(X,lt,rt,at,Rt,nt){at(lt[rt],X[lt[rt]]).then(function(it){Rt+=it,rt===lt.length-1?nt(Rt):W(X,lt,rt+1,at,Rt,nt)})})(k,Object.keys(k),0,b.exec,"",K)});var N="";for(var U in k)o(k,U)&&(N+=b.exec(U,k[U]));return N},include:function(b,T,k){D("include",T,!1);var N=k.storage.templates.get(b.params[0]);if(!N)throw i('Could not fetch template "'+b.params[0]+'"');return N(b.params[1],k)},extends:function(b,T,k){var N=b.params[1]||{};N.content=b.exec();for(var U=0;U<T.length;U++){var K=T[U];N[K.name]=K.exec()}var W=k.storage.templates.get(b.params[0]);if(!W)throw i('Could not fetch template "'+b.params[0]+'"');return W(N,k)},useScope:function(b,T){return D("useScope",T,!1),b.exec(b.params[0])}}),F=new R({if:function(b,T){D("if",!1,b.f,!0);var k="if("+b.p+"){"+S(b.d,T)+"}";if(b.b)for(var N=0;N<b.b.length;N++){var U=b.b[N];U.n==="else"?k+="else{"+S(U.d,T)+"}":U.n==="elif"&&(k+="else if("+U.p+"){"+S(U.d,T)+"}")}return k},try:function(b,T){if(D("try",!1,b.f,!0),!b.b||b.b.length!==1||b.b[0].n!=="catch")throw i("native helper 'try' only accepts 1 block, 'catch'");var k="try{"+S(b.d,T)+"}",N=b.b[0];return k+="catch"+(N.res?"("+N.res+")":"")+"{"+S(N.d,T)+"}"},block:function(b,T){return D("block",b.b,b.f,!0),"if(!"+T.varName+"["+b.p+"]){tR+=("+y(b.d,"",T)+")()}else{tR+="+T.varName+"["+b.p+"]}"}}),V=new R({e:function(b){var T=String(b);return/[&<>"']/.test(T)?T.replace(/[&<>"']/g,C):T}}),q={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(b,T){if(b==="H"){var k=this.storage.helpers.get(T);if(k)return k;throw i("Can't find helper '"+T+"'")}if(b==="F"){var N=this.storage.filters.get(T);if(N)return N;throw i("Can't find filter '"+T+"'")}},async:!1,storage:{helpers:G,nativeHelpers:F,filters:V,templates:I},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function w(b,T){var k={};return l(k,q),T&&l(k,T),b&&l(k,b),k.l.bind(k),k}function P(b,T){var k=w(T||{}),N=Function;if(k.async){if(!a)throw i("This environment doesn't support async/await");N=a}try{return new N(k.varName,"c","cb",v(b,k))}catch(U){throw U instanceof SyntaxError?i(`Bad template syntax
|
79
|
+
|
80
|
+
`+U.message+`
|
81
|
+
`+Array(U.message.length+1).join("=")+`
|
82
|
+
`+v(b,k)):U}}function H(b,T){var k;return T.cache&&T.name&&T.storage.templates.get(T.name)?T.storage.templates.get(T.name):(k=typeof b=="function"?b:P(b,T),T.cache&&T.name&&T.storage.templates.define(T.name,k),k)}q.l.bind(q),e.compile=P,e.compileScope=S,e.compileScopeIntoFunction=y,e.compileToString=v,e.defaultConfig=q,e.filters=V,e.getConfig=w,e.helpers=G,e.nativeHelpers=F,e.parse=g,e.render=function(b,T,k,N){var U=w(k||{});if(!U.async)return H(b,U)(T,U);if(!N){if(typeof n=="function")return new n(function(K,W){try{K(H(b,U)(T,U))}catch(X){W(X)}});throw i("Please provide a callback function, this env doesn't support Promises")}try{H(b,U)(T,U,N)}catch(K){return N(K)}},e.templates=I,Object.defineProperty(e,"__esModule",{value:!0})})})(Xr,Xr.exports);var ei=Xr.exports,Qr={exports:{}};(function(r,t){var e=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Fs<"u"&&Fs,i=function(){function n(){this.fetch=!1,this.DOMException=e.DOMException}return n.prototype=e,new n}();(function(n){(function(a){var o=typeof n<"u"&&n||typeof self<"u"&&self||typeof o<"u"&&o,l={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function h(w){return w&&DataView.prototype.isPrototypeOf(w)}if(l.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(w){return w&&c.indexOf(Object.prototype.toString.call(w))>-1};function u(w){if(typeof w!="string"&&(w=String(w)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(w)||w==="")throw new TypeError('Invalid character in header field name: "'+w+'"');return w.toLowerCase()}function f(w){return typeof w!="string"&&(w=String(w)),w}function p(w){var P={next:function(){var H=w.shift();return{done:H===void 0,value:H}}};return l.iterable&&(P[Symbol.iterator]=function(){return P}),P}function g(w){this.map={},w instanceof g?w.forEach(function(P,H){this.append(H,P)},this):Array.isArray(w)?w.forEach(function(P){this.append(P[0],P[1])},this):w&&Object.getOwnPropertyNames(w).forEach(function(P){this.append(P,w[P])},this)}g.prototype.append=function(w,P){w=u(w),P=f(P);var H=this.map[w];this.map[w]=H?H+", "+P:P},g.prototype.delete=function(w){delete this.map[u(w)]},g.prototype.get=function(w){return w=u(w),this.has(w)?this.map[w]:null},g.prototype.has=function(w){return this.map.hasOwnProperty(u(w))},g.prototype.set=function(w,P){this.map[u(w)]=f(P)},g.prototype.forEach=function(w,P){for(var H in this.map)this.map.hasOwnProperty(H)&&w.call(P,this.map[H],H,this)},g.prototype.keys=function(){var w=[];return this.forEach(function(P,H){w.push(H)}),p(w)},g.prototype.values=function(){var w=[];return this.forEach(function(P){w.push(P)}),p(w)},g.prototype.entries=function(){var w=[];return this.forEach(function(P,H){w.push([H,P])}),p(w)},l.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function v(w){if(w.bodyUsed)return Promise.reject(new TypeError("Already read"));w.bodyUsed=!0}function E(w){return new Promise(function(P,H){w.onload=function(){P(w.result)},w.onerror=function(){H(w.error)}})}function A(w){var P=new FileReader,H=E(P);return P.readAsArrayBuffer(w),H}function L(w){var P=new FileReader,H=E(P);return P.readAsText(w),H}function y(w){for(var P=new Uint8Array(w),H=new Array(P.length),b=0;b<P.length;b++)H[b]=String.fromCharCode(P[b]);return H.join("")}function S(w){if(w.slice)return w.slice(0);var P=new Uint8Array(w.byteLength);return P.set(new Uint8Array(w)),P.buffer}function R(){return this.bodyUsed=!1,this._initBody=function(w){this.bodyUsed=this.bodyUsed,this._bodyInit=w,w?typeof w=="string"?this._bodyText=w:l.blob&&Blob.prototype.isPrototypeOf(w)?this._bodyBlob=w:l.formData&&FormData.prototype.isPrototypeOf(w)?this._bodyFormData=w:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)?this._bodyText=w.toString():l.arrayBuffer&&l.blob&&h(w)?(this._bodyArrayBuffer=S(w.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(w)||d(w))?this._bodyArrayBuffer=S(w):this._bodyText=w=Object.prototype.toString.call(w):this._bodyText="",this.headers.get("content-type")||(typeof w=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(w)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var w=v(this);if(w)return w;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var w=v(this);return w||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(A)}),this.text=function(){var w=v(this);if(w)return w;if(this._bodyBlob)return L(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(I)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function M(w){var P=w.toUpperCase();return D.indexOf(P)>-1?P:w}function C(w,P){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P=P||{};var H=P.body;if(w instanceof C){if(w.bodyUsed)throw new TypeError("Already read");this.url=w.url,this.credentials=w.credentials,P.headers||(this.headers=new g(w.headers)),this.method=w.method,this.mode=w.mode,this.signal=w.signal,!H&&w._bodyInit!=null&&(H=w._bodyInit,w.bodyUsed=!0)}else this.url=String(w);if(this.credentials=P.credentials||this.credentials||"same-origin",(P.headers||!this.headers)&&(this.headers=new g(P.headers)),this.method=M(P.method||this.method||"GET"),this.mode=P.mode||this.mode||null,this.signal=P.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&H)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(H),(this.method==="GET"||this.method==="HEAD")&&(P.cache==="no-store"||P.cache==="no-cache")){var b=/([?&])_=[^&]*/;if(b.test(this.url))this.url=this.url.replace(b,"$1_="+new Date().getTime());else{var T=/\?/;this.url+=(T.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})};function I(w){var P=new FormData;return w.trim().split("&").forEach(function(H){if(H){var b=H.split("="),T=b.shift().replace(/\+/g," "),k=b.join("=").replace(/\+/g," ");P.append(decodeURIComponent(T),decodeURIComponent(k))}}),P}function G(w){var P=new g,H=w.replace(/\r?\n[\t ]+/g," ");return H.split("\r").map(function(b){return b.indexOf(`
|
83
|
+
`)===0?b.substr(1,b.length):b}).forEach(function(b){var T=b.split(":"),k=T.shift().trim();if(k){var N=T.join(":").trim();P.append(k,N)}}),P}R.call(C.prototype);function F(w,P){if(!(this instanceof F))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');P||(P={}),this.type="default",this.status=P.status===void 0?200:P.status,this.ok=this.status>=200&&this.status<300,this.statusText=P.statusText===void 0?"":""+P.statusText,this.headers=new g(P.headers),this.url=P.url||"",this._initBody(w)}R.call(F.prototype),F.prototype.clone=function(){return new F(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},F.error=function(){var w=new F(null,{status:0,statusText:""});return w.type="error",w};var V=[301,302,303,307,308];F.redirect=function(w,P){if(V.indexOf(P)===-1)throw new RangeError("Invalid status code");return new F(null,{status:P,headers:{location:w}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(P,H){this.message=P,this.name=H;var b=Error(P);this.stack=b.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function q(w,P){return new Promise(function(H,b){var T=new C(w,P);if(T.signal&&T.signal.aborted)return b(new a.DOMException("Aborted","AbortError"));var k=new XMLHttpRequest;function N(){k.abort()}k.onload=function(){var K={status:k.status,statusText:k.statusText,headers:G(k.getAllResponseHeaders()||"")};K.url="responseURL"in k?k.responseURL:K.headers.get("X-Request-URL");var W="response"in k?k.response:k.responseText;setTimeout(function(){H(new F(W,K))},0)},k.onerror=function(){setTimeout(function(){b(new TypeError("Network request failed"))},0)},k.ontimeout=function(){setTimeout(function(){b(new TypeError("Network request failed"))},0)},k.onabort=function(){setTimeout(function(){b(new a.DOMException("Aborted","AbortError"))},0)};function U(K){try{return K===""&&o.location.href?o.location.href:K}catch{return K}}k.open(T.method,U(T.url),!0),T.credentials==="include"?k.withCredentials=!0:T.credentials==="omit"&&(k.withCredentials=!1),"responseType"in k&&(l.blob?k.responseType="blob":l.arrayBuffer&&T.headers.get("Content-Type")&&T.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(k.responseType="arraybuffer")),P&&typeof P.headers=="object"&&!(P.headers instanceof g)?Object.getOwnPropertyNames(P.headers).forEach(function(K){k.setRequestHeader(K,f(P.headers[K]))}):T.headers.forEach(function(K,W){k.setRequestHeader(W,K)}),T.signal&&(T.signal.addEventListener("abort",N),k.onreadystatechange=function(){k.readyState===4&&T.signal.removeEventListener("abort",N)}),k.send(typeof T._bodyInit>"u"?null:T._bodyInit)})}return q.polyfill=!0,o.fetch||(o.fetch=q,o.Headers=g,o.Request=C,o.Response=F),a.Headers=g,a.Request=C,a.Response=F,a.fetch=q,a})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var s=e.fetch?e:i;t=s.fetch,t.default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,r.exports=t})(Qr,Qr.exports);var Ud=Qr.exports;const Bd=zr(Ud);function Hd({canvas:r,scenes:t,currentTime:e}){if(t&&r){const i=t.scenes.filter(({start:n,duration:a})=>e>=n&&e<=n+a);if(i.length<=0)return;const s=r.getContext("2d");if(s){const n=t.transitionDuration,a=Math.max(...t.scenes.map(({start:o,duration:l})=>o+l));s.globalCompositeOperation="lighter",s.clearRect(0,0,r.width,r.height),i.forEach(({start:o,duration:l,draw:h,transitionCanvas:c})=>{s.globalAlpha=1,c.width=c.height=0,c.width=r.width,c.height=r.height;const d=c.getContext("2d");if(d){const u=o+l,f=o===0,p=u===a;h({currentTime:e,canvas:c,context:d}),!f&&e>=o&&e<=o+n/2?s.globalAlpha=Math.max(0,Math.min(1,(e-o)/(n/2))):!p&&e>=u-n/2&&e<=u&&(s.globalAlpha=Math.max(0,Math.min(1,(u-e)/(n/2)))),s.drawImage(c,0,0,r.width,r.height)}})}}}function Gd(r){if(typeof r=="string"){const[t,e]=r.split(":");return Math.min(parseFloat(t),parseFloat(e))}return r}function Vd(r){if(typeof r=="string"){const[t,e]=r.split(":"),i=parseFloat(t),s=parseFloat(e);return i/s}return r}function bi({resolution:r,aspectRatio:t}){const e=Gd(r),i=Vd(t),s=i>=1,n=Math.min(s?e*i:e/i,e),a=Math.max(s?e*i:e/i,e);return{resolution:e,aspectRatio:i,height:s?n:a,width:s?a:n}}function Kd({format:r,resolution:t,aspectRatio:e,videoResolution:i,videoAspectRatio:s}){const{height:n,width:a}=bi({resolution:t,aspectRatio:e}),{height:o,width:l}=bi({resolution:i,aspectRatio:s}),h=e>s;let c=1;if(r==="letterbox"||r==="letterbox-video")c=h?n/o:a/l;else if(r==="squarebox"){const g=Math.min(n,a);c=l>=o?g/o:g/l}else(r==="crop"||r==="crop-top")&&(c=h?a/l:n/o);const d=a/c,u=n/c,f=(l-d)/2;let p=(o-u)/2;return r==="crop-top"&&(p=Math.min(0,p)),{sx:f,sy:p,sWidth:d,sHeight:u,scale:c}}function Ns({source:r,sx:t,sy:e,sw:i,sh:s,dx:n,dy:a,dw:o,dh:l}){const h=(r==null?void 0:r.naturalWidth)??(r==null?void 0:r.videoWidth)??(r==null?void 0:r.width),c=(r==null?void 0:r.naturalHeight)??(r==null?void 0:r.videoHeight)??(r==null?void 0:r.height);t=t??0,e=e??0,i=i??h,s=s??c,i<0&&(t+=i,i=Math.abs(i)),s<0&&(e+=s,s=Math.abs(s)),o<0&&(n+=o,o=Math.abs(o)),l<0&&(a+=l,l=Math.abs(l));const d=Math.max(t,0),u=Math.min(t+i,h),f=Math.max(e,0),p=Math.min(e+s,c),g=o/i,v=l/s;return[r,d,f,u-d,p-f,t<0?n-t*g:n,e<0?a-e*v:a,(u-d)*g,(p-f)*v]}function wo({context:r,source:t,format:e="letterbox",videoResolution:i,videoAspectRatio:s,posX:n,posY:a,width:o,height:l,offscreenCanvas:h}){const{sx:c,sy:d,sWidth:u,sHeight:f,scale:p}=Kd({resolution:Math.min(o,l),aspectRatio:o/l,format:e,videoResolution:i,videoAspectRatio:s}),g=h&&typeof r.filter<"u";if(e==="letterbox"||e==="squarebox"||e==="letterbox-video"&&!g){if(c<0){const y=Math.abs(c)*p;r.fillStyle="black",r.beginPath(),r.rect(n,a,y,l),r.rect(n+o-y,a,y,l),r.fill(),r.closePath()}if(d<0){const y=Math.abs(d)*p;r.fillStyle="black",r.beginPath(),r.rect(n,a,o,y),r.rect(n,a+l-y,o,y),r.fill(),r.closePath()}}if(e==="letterbox-video"&&g){const{width:y,height:S}=bi({resolution:i,aspectRatio:s});h.width=y,h.height=S;const R=h.getContext("2d",{alpha:!1});if(R==null||R.drawImage(t,0,0,y,S),R){r.save(),r.globalCompositeOperation="destination-out",r.fillRect(n,a,o,l);const D=Ns({source:h,sx:c,sy:d,sw:u,sh:f,dx:n,dy:a,dw:o,dh:l});r.globalCompositeOperation="source-over",r.drawImage(...D),R.save();const M=1.3,C=-(y*M-y)/2,I=-(S*M-S)/2;if(R.filter="blur(40px) brightness(20%)",R.translate(C,I),R.scale(M,M),R.drawImage(h,0,0,y,S),R.restore(),r.globalCompositeOperation="destination-over",c<0){const G=o/s,F=l/G,V=Ns({source:h,sy:(1-F)*S/2,sh:F*S,dx:n,dy:a,dw:o,dh:l});r.drawImage(...V)}if(d<0){const G=l*s,F=o/G,V=Ns({source:h,sx:(1-F)*y/2,sw:F*y,dx:n,dy:a,dw:o,dh:l});r.drawImage(...V)}r.restore()}}else{const y=Ns({source:t,sx:c,sy:d,sw:u,sh:f,dx:n,dy:a,dw:o,dh:l});r.drawImage(...y)}const v=c*-1*p,E=d*-1*p,A=o-v*2,L=l-E*2;return{dx:v,dy:E,dw:A,dh:L}}const jd=/\d{0,2}:?\d{2}:\d{2}\.\d{3}\s-->\s\d{0,2}:?\d{2}:\d{2}\.\d{3}\s{1,2}.*/g,Wd=/\d{0,2}:?\d{2}:\d{2}\.\d{3}/g;function So(r){if(!r)return[];const t=r.match(jd);return t?t==null?void 0:t.map(e=>{const[i,s]=e.replace(`\r
|
84
|
+
`,`
|
94
85
|
`).split(`
|
95
|
-
`),c=[],h=e?u0(e.baseTime,e.timescale):0;let d="00:00.000",u=0,f=0,p,m=!0;o.oncue=function(g){const x=t[i];let b=t.ccOffset;const A=(u-h)/9e4;if(x!=null&&x.new&&(f!==void 0?b=t.ccOffset=x.start:ep(t,i,A)),A){if(!e){p=new Error("Missing initPTS for VTT MPEGTS");return}b=A-t.presentationOffset}const y=g.endTime-g.startTime,T=_e((g.startTime+b-f)*9e4,s*9e4)/9e4;g.startTime=Math.max(T,0),g.endTime=Math.max(T+y,0);const w=g.text.trim();g.text=decodeURIComponent(encodeURIComponent(w)),g.id||(g.id=qn(g.startTime,g.endTime,w)),g.endTime>0&&c.push(g)},o.onparsingerror=function(g){p=g},o.onflush=function(){if(p){a(p);return}n(c)},l.forEach(g=>{if(m)if(Yn(g,"X-TIMESTAMP-MAP=")){m=!1,g.slice(16).split(",").forEach(x=>{Yn(x,"LOCAL:")?d=x.slice(6):Yn(x,"MPEGTS:")&&(u=parseInt(x.slice(7)))});try{f=$0(d)/1e3}catch(x){p=x}return}else g===""&&(m=!1);o.parse(g+`
|
96
|
-
|
97
|
-
`:(n=i.childNodes)!=null&&n.length?Ac(i,e):e?t+i.textContent.trim().replace(/\s+/g," "):t+i.textContent},"")}function rp(r,e,t){const i="http://www.w3.org/ns/ttml#styling";let s=null;const n=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=r!=null&&r.hasAttribute("style")?r.getAttribute("style"):null;return a&&t.hasOwnProperty(a)&&(s=t[a]),n.reduce((o,l)=>{const c=Qn(e,i,l)||Qn(r,i,l)||Qn(s,i,l);return c&&(o[l]=c),o},{})}function Qn(r,e,t){return r&&r.hasAttributeNS(e,t)?r.getAttributeNS(e,t):null}function bc(r){return new Error(`Could not parse ttml timestamp ${r}`)}function _n(r,e){if(!r)return null;let t=fc(r);return t===null&&(gc.test(r)?t=np(r,e):vc.test(r)&&(t=ap(r,e))),t}function np(r,e){const t=gc.exec(r),i=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+i/e.frameRate}function ap(r,e){const t=vc.exec(r),i=Number(t[1]);switch(t[2]){case"h":return i*3600;case"m":return i*60;case"ms":return i*1e3;case"f":return i/e.frameRate;case"t":return i/e.tickRate}return i}class op{constructor(e){if(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.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Tc(),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}},this.config.enableCEA708Captions){const t=new $s(this,"textTrack1"),i=new $s(this,"textTrack2"),s=new $s(this,"textTrack3"),n=new $s(this,"textTrack4");this.cea608Parser1=new hc(1,t,i),this.cea608Parser2=new hc(3,s,n)}e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(v.FRAG_LOADING,this.onFragLoading,this),e.on(v.FRAG_LOADED,this.onFragLoaded,this),e.on(v.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(v.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(v.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(v.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(v.FRAG_LOADING,this.onFragLoading,this),e.off(v.FRAG_LOADED,this.onFragLoaded,this),e.off(v.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(v.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(v.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(v.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(v.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null}addCues(e,t,i,s,n){let a=!1;for(let o=n.length;o--;){const l=n[o],c=cp(l[0],l[1],t,i);if(c>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],i),a=!0,c/(i-t)>.5))return}if(a||n.push([t,i]),this.config.renderTextTracksNatively){const o=this.captionsTracks[e];this.Cues.newCue(o,t,i,s)}else{const o=this.Cues.newCue(null,t,i,s);this.hls.trigger(v.CUES_PARSED,{type:"captions",cues:o,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:n}){const{unparsedVttFrags:a}=this;i==="main"&&(this.initPTS[t.cc]={baseTime:s,timescale:n}),a.length&&(this.unparsedVttFrags=[],a.forEach(o=>{this.onFragLoaded(v.FRAG_LOADED,o)}))}getExistingTrack(e){const{media:t}=this;if(t)for(let i=0;i<t.textTracks.length;i++){const s=t.textTracks[i];if(s[e])return s}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:i,media:s}=this,{label:n,languageCode:a}=t[e],o=this.getExistingTrack(e);if(o)i[e]=o,yi(i[e]),gl(i[e],s);else{const l=this.createTextTrack("captions",n,a);l&&(l[e]=!0,i[e]=l)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const i=t.label,s={_id:e,label:i,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=s,this.hls.trigger(v.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[s]})}createTextTrack(e,t,i){const s=this.media;if(s)return s.addTextTrack(e,t,i)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{yi(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Tc(),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 i=0;i<t.length;i++)yi(t[i])}onSubtitleTracksUpdated(e,t){const i=t.subtitleTracks||[],s=i.some(n=>n.textCodec===Zn);if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(ic(this.tracks,i)){this.tracks=i;return}if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){const a=this.media?this.media.textTracks:null;this.tracks.forEach((o,l)=>{let c;if(a&&l<a.length){let h=null;for(let d=0;d<a.length;d++)if(lp(a[d],o)){h=a[d];break}h&&(c=h)}if(c)yi(c);else{const h=this._captionsOrSubtitlesFromCharacteristics(o);c=this.createTextTrack(h,o.name,o.lang),c&&(c.mode="disabled")}c&&(c.groupId=o.groupId,this.textTracks.push(c))})}else if(this.tracks.length){const a=this.tracks.map(o=>({label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}));this.hls.trigger(v.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:a})}}}_captionsOrSubtitlesFromCharacteristics(e){if(e.attrs.CHARACTERISTICS){const t=/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS),i=/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);if(t&&i)return"captions"}return"subtitles"}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(i=>{const s=/(?:CC|SERVICE)([1-4])/.exec(i.instreamId);if(!s)return;const n=`textTrack${s[1]}`,a=this.captionsProperties[n];a&&(a.label=i.name,i.lang&&(a.languageCode=i.lang),a.media=i)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){const{cea608Parser1:i,cea608Parser2:s,lastSn:n,lastPartIndex:a}=this;if(!(!this.enabled||!(i&&s))&&t.frag.type===W.MAIN){var o,l;const c=t.frag.sn,h=(o=t==null||(l=t.part)==null?void 0:l.index)!=null?o:-1;c===n+1||c===n&&h===a+1||(i.reset(),s.reset()),this.lastSn=c,this.lastPartIndex=h}}onFragLoaded(e,t){const{frag:i,payload:s}=t;if(i.type===W.SUBTITLE)if(s.byteLength){const n=i.decryptdata,a="stats"in t;if(n==null||!n.encrypted||a){const o=this.tracks[i.level],l=this.vttCCs;l[i.cc]||(l[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),o&&o.textCodec===Zn?this._parseIMSC1(i,s):this._parseVTTs(t)}}else this.hls.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const i=this.hls;yc(t,this.initPTS[e.cc],s=>{this._appendCues(s,e.level),i.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},s=>{S.log(`Failed to parse IMSC1: ${s}`),i.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:s})})}_parseVTTs(e){var t;const{frag:i,payload:s}=e,{initPTS:n,unparsedVttFrags:a}=this,o=n.length-1;if(!n[i.cc]&&o===-1){a.push(e);return}const l=this.hls,c=(t=i.initSegment)!=null&&t.data?$t(i.initSegment.data,new Uint8Array(s)):s;tp(c,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,h=>{this._appendCues(h,i.level),l.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},h=>{const d=h.message==="Missing initPTS for VTT MPEGTS";d?a.push(e):this._fallbackToIMSC1(i,s),S.log(`Failed to parse VTT cue: ${h}`),!(d&&o>i.cc)&&l.trigger(v.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:h})})}_fallbackToIMSC1(e,t){const i=this.tracks[e.level];i.textCodec||yc(t,this.initPTS[e.cc],()=>{i.textCodec=Zn,this._parseIMSC1(e,t)},()=>{i.textCodec="wvtt"})}_appendCues(e,t){const i=this.hls;if(this.config.renderTextTracksNatively){const s=this.textTracks[t];if(!s||s.mode==="disabled")return;e.forEach(n=>vl(s,n))}else{const s=this.tracks[t];if(!s)return;const n=s.default?"default":"subtitles"+t;i.trigger(v.CUES_PARSED,{type:"subtitles",cues:e,track:n})}}onFragDecrypted(e,t){const{frag:i}=t;i.type===W.SUBTITLE&&this.onFragLoaded(v.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){const{cea608Parser1:i,cea608Parser2:s}=this;if(!this.enabled||!(i&&s))return;const{frag:n,samples:a}=t;if(!(n.type===W.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let o=0;o<a.length;o++){const l=a[o].bytes;if(l){const c=this.extractCea608Data(l);i.addData(a[o].pts,c[0]),s.addData(a[o].pts,c[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:i,endOffsetSubtitles:s,type:n}){const{media:a}=this;if(!(!a||a.currentTime<i)){if(!n||n==="video"){const{captionsTracks:o}=this;Object.keys(o).forEach(l=>vn(o[l],t,i))}if(this.config.renderTextTracksNatively&&t===0&&s!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(l=>vn(o[l],t,s))}}}extractCea608Data(e){const t=[[],[]],i=e[0]&31;let s=2;for(let n=0;n<i;n++){const a=e[s++],o=127&e[s++],l=127&e[s++];if(o===0&&l===0)continue;if((4&a)!==0){const h=3&a;(h===0||h===1)&&(t[h].push(o),t[h].push(l))}}return t}}function lp(r,e){return!!r&&r.label===e.name&&!(r.textTrack1||r.textTrack2)}function cp(r,e,t,i){return Math.min(e,i)-Math.max(r,t)}function Tc(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class $n{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.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(v.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.BUFFER_CODECS,this.onBufferCodecs,this),e.on(v.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(v.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.BUFFER_CODECS,this.onBufferCodecs,this),e.off(v.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const i=this.hls.levels[t.droppedLevel];this.isLevelAllowed(i)&&this.restrictedLevels.push({bitrate:i.bitrate,height:i.height,width:i.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null}onManifestParsed(e,t){const i=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){const e=this.hls.levels;if(e.length){const t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),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 i=t.filter((s,n)=>this.isLevelAllowed(s)&&n<=e);return this.clientRect=null,$n.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),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 i=e.getBoundingClientRect();t.width=i.width,t.height=i.height,!t.width&&!t.height&&(t.width=i.right-i.left||e.width||0,t.height=i.bottom-i.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(i=>e.bitrate===i.bitrate&&e.width===i.width&&e.height===i.height)}static getMaxLevelByMediaSize(e,t,i){if(!(e!=null&&e.length))return-1;const s=(a,o)=>o?a.width!==o.width||a.height!==o.height:!0;let n=e.length-1;for(let a=0;a<e.length;a+=1){const o=e[a];if((o.width>=t||o.height>=i)&&s(o,e[a+1])){n=a;break}}return n}}class hp{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(v.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(v.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const i=this.hls.config;if(i.capLevelOnFPSDrop){const s=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=s,s&&typeof s.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,i){const s=performance.now();if(t){if(this.lastTime){const n=s-this.lastTime,a=i-this.lastDroppedFrames,o=t-this.lastDecodedFrames,l=1e3*a/n,c=this.hls;if(c.trigger(v.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:i}),l>0&&a>c.config.fpsDroppedMonitoringThreshold*o){let h=c.currentLevel;S.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(v.FPS_DROP_LEVEL_CAPPING,{level:h,droppedLevel:c.currentLevel}),c.autoLevelCapping=h,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,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 tr="[eme]";class Ei{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=Ei.CDMCleanupPromise?[Ei.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=S.debug.bind(S,tr),this.log=S.log.bind(S,tr),this.warn=S.warn.bind(S,tr),this.error=S.error.bind(S,tr),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(v.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(v.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(v.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(v.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(v.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(v.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(v.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:i}=this.config,s=t[e];if(s)return s.licenseUrl;if(e===fe.WIDEVINE&&i)return i;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,i=t[e];if(i)return i.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,i=(a,o,l)=>!!a&&l.indexOf(a)===o,s=t.map(a=>a.audioCodec).filter(i),n=t.map(a=>a.videoCodec).filter(i);return s.length+n.length===0&&n.push("avc1.42e01e"),new Promise((a,o)=>{const l=c=>{const h=c.shift();this.getMediaKeysPromise(h,s,n).then(d=>a({keySystem:h,mediaKeys:d})).catch(d=>{c.length?l(c):d instanceof $e?o(d):o(new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_ACCESS,error:d,fatal:!0},d.message))})};l(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:i}=this.config;if(typeof i!="function"){let s=`Configured requestMediaKeySystemAccess is not a function ${i}`;return Ko===null&&self.location.protocol==="http:"&&(s=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(s))}return i(e,t)}getMediaKeysPromise(e,t,i){const s=Eu(e,t,i,this.config.drmSystemOptions),n=this.keySystemAccessPromises[e];let a=n==null?void 0:n.keySystemAccess;if(!a){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(s)}`),a=this.requestMediaKeySystemAccess(e,s);const o=this.keySystemAccessPromises[e]={keySystemAccess:a};return a.catch(l=>{this.log(`Failed to obtain access to key-system "${e}": ${l}`)}),a.then(l=>{this.log(`Access for key-system "${l.keySystem}" obtained`);const c=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),o.mediaKeys=l.createMediaKeys().then(h=>(this.log(`Media-keys created for "${e}"`),c.then(d=>d?this.setMediaKeysServerCertificate(h,e,d):h))),o.mediaKeys.catch(h=>{this.error(`Failed to create media-keys for "${e}"}: ${h}`)}),o.mediaKeys})}return a.then(()=>n.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:i}){this.log(`Creating key-system session "${t}" keyId: ${ft.hexDump(e.keyId||[])}`);const s=i.createSession(),n={decryptdata:e,keySystem:t,mediaKeys:i,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(n),n}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const i=this.createMediaKeySessionContext(e),s=this.getKeyIdString(t),n="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(i,n,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 ft.hexDump(e.keyId)}updateKeySession(e,t){var i;const s=e.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${ft.hexDump(((i=e.decryptdata)==null?void 0:i.keyId)||[])}
|
98
|
-
} (data length: ${t&&t.byteLength})`),s.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,i)=>{const s=hn(this.config),n=e.map(Vo).filter(a=>!!a&&s.indexOf(a)!==-1);return this.getKeySystemSelectionPromise(n).then(({keySystem:a})=>{const o=zo(a);o?t(o):i(new Error(`Unable to find format for key-system "${a}"`))}).catch(i)})}loadKey(e){const t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),s=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${s}`);let n=this.keyIdToKeySessionPromise[i];return n||(n=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then(({keySystem:a,mediaKeys:o})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(a,o).then(()=>{this.throwIfDestroyed();const l=this.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:t}),c="cenc";return this.generateRequestWithPreferredKeySession(l,c,t.pssh,"playlist-key")}))),n.catch(a=>this.handleError(a))),n}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof $e?this.hls.trigger(v.ERROR,e.data):this.hls.trigger(v.ERROR,{type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){const s=Vo(e.keyFormat),n=s?[s]:hn(this.config);return this.attemptKeySystemAccess(n)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=hn(this.config)),e.length===0)throw new $e({type:K.KEY_SYSTEM_ERROR,details:D.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:i}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),i===null)return;let s,n;if(t==="sinf"&&this.config.drmSystems[fe.FAIRPLAY]){const h=Pe(new Uint8Array(i));try{const d=cn(JSON.parse(h).sinf),u=_o(new Uint8Array(d));if(!u)return;s=u.subarray(8,24),n=fe.FAIRPLAY}catch{this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{const h=Xu(i);if(h===null)return;h.version===0&&h.systemId===jo.WIDEVINE&&h.data&&(s=h.data.subarray(8,24)),n=Tu(h.systemId)}if(!n||!s)return;const a=ft.hexDump(s),{keyIdToKeySessionPromise:o,mediaKeySessions:l}=this;let c=o[a];for(let h=0;h<l.length;h++){const d=l[h],u=d.decryptdata;if(u.pssh||!u.keyId)continue;const f=ft.hexDump(u.keyId);if(a===f||u.uri.replace(/-/g,"").indexOf(a)!==-1){c=o[f],delete o[f],u.pssh=new Uint8Array(i),u.keyId=s,c=o[a]=c.then(()=>this.generateRequestWithPreferredKeySession(d,t,i,"encrypted-event-key-match"));break}}c||(c=o[a]=this.getKeySystemSelectionPromise([n]).then(({keySystem:h,mediaKeys:d})=>{var u;this.throwIfDestroyed();const f=new _i("ISO-23001-7",a,(u=zo(h))!=null?u:"");return f.pssh=new Uint8Array(i),f.keyId=s,this.attemptSetMediaKeys(h,d).then(()=>{this.throwIfDestroyed();const p=this.createMediaKeySessionContext({decryptdata:f,keySystem:h,mediaKeys:d});return this.generateRequestWithPreferredKeySession(p,t,i,"encrypted-event-no-match")})})),c.catch(h=>this.handleError(h))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const s=Promise.all(i).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(s),s.then(()=>{this.log(`Media-keys set for "${e}"`),i.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(n=>i.indexOf(n)===-1)})}generateRequestWithPreferredKeySession(e,t,i,s){var n,a;const o=(n=this.config.drmSystems)==null||(a=n[e.keySystem])==null?void 0:a.generateRequest;if(o)try{const u=o.call(this.hls,t,i,e);if(!u)throw new Error("Invalid response from configured generateRequest filter");t=u.initDataType,i=e.decryptdata.pssh=u.initData?new Uint8Array(u.initData):null}catch(u){var l;if(this.warn(u.message),(l=this.hls)!=null&&l.config.debug)throw u}if(i===null)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${s}": ${c} (init data type: ${t} length: ${i?i.byteLength:null})`);const h=new Hn;e.mediaKeysSession.onmessage=u=>{const f=e.mediaKeysSession;if(!f){h.emit("error",new Error("invalid state"));return}const{messageType:p,message:m}=u;this.log(`"${p}" message event for session "${f.sessionId}" message size: ${m.byteLength}`),p==="license-request"||p==="license-renewal"?this.renewLicense(e,m).catch(g=>{this.handleError(g),h.emit("error",g)}):p==="license-release"?e.keySystem===fe.FAIRPLAY&&(this.updateKeySession(e,Go("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${p}"`)},e.mediaKeysSession.onkeystatuseschange=u=>{if(!e.mediaKeysSession){h.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const p=e.keyStatus;h.emit("keyStatus",p),p==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};const d=new Promise((u,f)=>{h.on("error",f),h.on("keyStatus",p=>{p.startsWith("usable")?u():p==="output-restricted"?f(new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):p==="internal-error"?f(new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${p}"`)):p==="expired"?f(new Error("key expired while generating request")):this.warn(`unhandled key status change "${p}"`)})});return e.mediaKeysSession.generateRequest(t,i).then(()=>{var u;this.log(`Request generated for key-session "${(u=e.mediaKeysSession)==null?void 0:u.sessionId}" keyId: ${c}`)}).catch(u=>{throw new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_SESSION,error:u,fatal:!1},`Error generating key-session request: ${u}`)}).then(()=>d).catch(u=>{throw h.removeAllListeners(),this.removeSession(e),u}).then(()=>(h.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,i)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${ft.hexDump("buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i))} session keyId: ${ft.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,i=t.loader,s=new i(t),n=this.getServerCertificateUrl(e);return n?(this.log(`Fetching serverCertificate for "${e}"`),new Promise((a,o)=>{const l={responseType:"arraybuffer",url:n},c=t.certLoadPolicy.default,h={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(u,f,p,m)=>{a(u.data)},onError:(u,f,p,m)=>{o(new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:p,response:Ve({url:l.url,data:void 0},u)},`"${e}" certificate request failed (${n}). Status: ${u.code} (${u.text})`))},onTimeout:(u,f,p)=>{o(new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:p,response:{url:l.url,data:void 0}},`"${e}" certificate request timed out (${n})`))},onAbort:(u,f,p)=>{o(new Error("aborted"))}};s.load(l,h,d)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,i){return new Promise((s,n)=>{e.setServerCertificate(i).then(a=>{this.log(`setServerCertificate ${a?"success":"not supported by CDM"} (${i==null?void 0:i.byteLength}) on "${t}"`),s(e)}).catch(a=>{n(new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:a,fatal:!0},a.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(i=>this.updateKeySession(e,new Uint8Array(i)).catch(s=>{throw new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:s,fatal:!0},s.message)}))}setupLicenseXHR(e,t,i,s){const n=this.config.licenseXhrSetup;return n?Promise.resolve().then(()=>{if(!i.decryptdata)throw new Error("Key removed");return n.call(this.hls,e,t,i,s)}).catch(a=>{if(!i.decryptdata)throw a;return e.open("POST",t,!0),n.call(this.hls,e,t,i,s)}).then(a=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:a||s})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:s}))}requestLicense(e,t){const i=this.config.keyLoadPolicy.default;return new Promise((s,n)=>{const a=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return n(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let l=o.response;this.log(`License received ${l instanceof ArrayBuffer?l.byteLength:l}`);const c=this.config.licenseResponseCallback;if(c)try{l=c.call(this.hls,o,a,e)}catch(h){this.error(h)}s(l)}else{const l=i.errorRetry,c=l?l.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||o.status>=400&&o.status<500)n(new $e({type:K.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const h=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${h} attempts left`),this.requestLicense(e,t).then(s,n)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,t).then(({xhr:l,licenseChallenge:c})=>{l.send(c)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const i=t.media;this.media=i,i.addEventListener("encrypted",this.onMediaEncrypted),i.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={},_i.clearKeyUriToKeyIdMap();const i=t.length;Ei.CDMCleanupPromise=Promise.all(t.map(s=>this.removeSession(s)).concat(e==null?void 0:e.setMediaKeys(null).catch(s=>{this.log(`Could not clear media keys: ${s}. media.src: ${e==null?void 0:e.src}`)}))).then(()=>{i&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}. media.src: ${e==null?void 0:e.src}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const i=t.reduce((s,n)=>(s.indexOf(n.keyFormat)===-1&&s.push(n.keyFormat),s),[]);this.log(`Selecting key-system from session-keys ${i.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(i)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:i}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),t.onmessage=null,t.onkeystatuseschange=null,i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);return s>-1&&this.mediaKeySessions.splice(s,1),t.remove().catch(n=>{this.log(`Could not remove session: ${n}`)}).then(()=>t.close()).catch(n=>{this.log(`Could not close session: ${n}`)})}}}Ei.CDMCleanupPromise=void 0;class $e 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}}const dp=1;var Ke={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"};const up="h";class Mt{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.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=s=>{try{this.apply(s,{ot:Ke.MANIFEST,su:!this.initialized})}catch(n){S.warn("Could not generate manifest CMCD data.",n)}},this.applyFragmentData=s=>{try{const n=s.frag,a=this.hls.levels[n.level],o=this.getObjectType(n),l={d:n.duration*1e3,ot:o};(o===Ke.VIDEO||o===Ke.AUDIO||o==Ke.MUXED)&&(l.br=a.bitrate/1e3,l.tb=this.getTopBandwidth(o)/1e3,l.bl=this.getBufferLength(o)),this.apply(s,l)}catch(n){S.warn("Could not generate segment CMCD data.",n)}},this.hls=e;const t=this.config=e.config,{cmcd:i}=t;i!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||Mt.uuid(),this.cid=i.contentId,this.useHeaders=i.useHeaders===!0,this.registerListeners())}registerListeners(){const e=this.hls;e.on(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(v.MEDIA_DETACHED,this.onMediaDetached,this),e.on(v.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(v.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(v.MEDIA_DETACHED,this.onMediaDetached,this),e.off(v.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=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 i,s;this.audioBuffer=(i=t.tracks.audio)==null?void 0:i.buffer,this.videoBuffer=(s=t.tracks.video)==null?void 0:s.buffer}createData(){var e;return{v:dp,sf:up,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){Se(t,this.createData());const i=t.ot===Ke.INIT||t.ot===Ke.VIDEO||t.ot===Ke.MUXED;if(this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering),this.useHeaders){const s=Mt.toHeaders(t);if(!Object.keys(s).length)return;e.headers||(e.headers={}),Se(e.headers,s)}else{const s=Mt.toQuery(t);if(!s)return;e.url=Mt.appendQueryToUri(e.url,s)}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Ke.TIMED_TEXT;if(e.sn==="initSegment")return Ke.INIT;if(t==="audio")return Ke.AUDIO;if(t==="main")return this.hls.audioTracks.length?Ke.VIDEO:Ke.MUXED}getTopBandwidth(e){let t=0,i;const s=this.hls;if(e===Ke.AUDIO)i=s.audioTracks;else{const n=s.maxAutoLevel,a=n>-1?n+1:s.levels.length;i=s.levels.slice(0,a)}for(const n of i)n.bitrate>t&&(t=n.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,i=e===Ke.AUDIO?this.audioBuffer:this.videoBuffer;return!i||!t?NaN:ce.bufferInfo(i,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,i=e||this.config.loader;return class{constructor(n){this.loader=void 0,this.loader=new i(n)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(n,a,o){t(n),this.loader.load(n,a,o)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,i=e||this.config.loader;return class{constructor(n){this.loader=void 0,this.loader=new i(n)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(n,a,o){t(n),this.loader.load(n,a,o)}}}static uuid(){const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}static serialize(e){const t=[],i=c=>!Number.isNaN(c)&&c!=null&&c!==""&&c!==!1,s=c=>Math.round(c),n=c=>s(c/100)*100,o={br:s,d:s,bl:n,dl:n,mtp:n,nor:c=>encodeURIComponent(c),rtp:n,tb:s},l=Object.keys(e||{}).sort();for(const c of l){let h=e[c];if(!i(h)||c==="v"&&h===1||c=="pr"&&h===1)continue;const d=o[c];d&&(h=d(h));const u=typeof h;let f;c==="ot"||c==="sf"||c==="st"?f=`${c}=${h}`:u==="boolean"?f=c:u==="number"?f=`${c}=${h}`:f=`${c}=${JSON.stringify(h)}`,t.push(f)}return t.join(",")}static toHeaders(e){const t=Object.keys(e),i={},s=["Object","Request","Session","Status"],n=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};for(const o of t){const l=a[o]!=null?a[o]:1;n[l][o]=e[o]}for(let o=0;o<n.length;o++){const l=Mt.serialize(n[o]);l&&(i[`CMCD-${s[o]}`]=l)}return i}static toQuery(e){return`CMCD=${encodeURIComponent(Mt.serialize(e))}`}static appendQueryToUri(e,t){if(!t)return e;const i=e.includes("?")?"&":"?";return`${e}${i}${t}`}}const fp=3e5;class pp{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=S.log.bind(S,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(v.MANIFEST_LOADING,this.onManifestLoading,this),e.on(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(v.MANIFEST_PARSED,this.onManifestParsed,this),e.on(v.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(v.MANIFEST_LOADING,this.onManifestLoading,this),e.off(v.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(v.MANIFEST_PARSED,this.onManifestParsed,this),e.off(v.ERROR,this.onError,this))}startLoad(){if(this.started=!0,self.clearTimeout(this.reloadTimer),this.enabled&&this.uri)if(this.updated){const e=Math.max(this.timeToLoad*1e3-(performance.now()-this.updated),0);this.scheduleRefresh(this.uri,e)}else this.loadSteeringManifest(this.uri)}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),self.clearTimeout(this.reloadTimer)}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(i=>i!==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:i}=t;i!==null&&(this.pathwayId=i.pathwayId,this.uri=i.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:i}=t;if((i==null?void 0:i.action)===Ne.SendAlternateToPenaltyBox&&i.flags===Qe.MoveAllAlternatesMatchingHost){let s=this.pathwayPriority;const n=this.pathwayId;this.penalizedPathways[n]||(this.penalizedPathways[n]=performance.now()),!s&&this.levels&&(s=this.levels.reduce((a,o)=>(a.indexOf(o.pathwayId)===-1&&a.push(o.pathwayId),a),[])),s&&s.length>1&&(this.updatePathwayPriority(s),i.resolved=this.pathwayId!==n)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const i=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${i}"`),t=this.getLevelsForPathway(i),this.pathwayId=i}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let t;const i=this.penalizedPathways,s=performance.now();Object.keys(i).forEach(n=>{s-i[n]>fp&&delete i[n]});for(let n=0;n<e.length;n++){const a=e[n];if(i[a])continue;if(a===this.pathwayId)return;const o=this.hls.nextLoadLevel,l=this.hls.levels[o];if(t=this.getLevelsForPathway(a),t.length>0){this.log(`Setting Pathway to "${a}"`),this.pathwayId=a,this.hls.trigger(v.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[o];l&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==l.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==l.bitrate&&this.log(`Unstable Pathways change from bitrate ${l.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=o);break}}}clonePathways(e){const t=this.levels;if(!t)return;const i={},s={};e.forEach(n=>{const{ID:a,"BASE-ID":o,"URI-REPLACEMENT":l}=n;if(t.some(h=>h.pathwayId===a))return;const c=this.getLevelsForPathway(o).map(h=>{const d=Se({},h);d.details=void 0,d.url=Sc(h.uri,h.attrs["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",l);const u=new ue(h.attrs);u["PATHWAY-ID"]=a;const f=u.AUDIO&&`${u.AUDIO}_clone_${a}`,p=u.SUBTITLES&&`${u.SUBTITLES}_clone_${a}`;f&&(i[u.AUDIO]=f,u.AUDIO=f),p&&(s[u.SUBTITLES]=p,u.SUBTITLES=p),d.attrs=u;const m=new es(d);return Ws(m,"audio",f),Ws(m,"text",p),m});t.push(...c),Ec(this.audioTracks,i,l,a),Ec(this.subtitleTracks,s,l,a)})}loadSteeringManifest(e){const t=this.hls.config,i=t.loader;this.loader&&this.loader.destroy(),this.loader=new i(t);let s;try{s=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(s.protocol!=="data:"){const h=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+h)}const n={responseType:"json",url:s.href},a=t.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},l={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},c={onSuccess:(h,d,u,f)=>{this.log(`Loaded steering manifest: "${s}"`);const p=h.data;if(p.VERSION!==1){this.log(`Steering VERSION ${p.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=p.TTL;const{"RELOAD-URI":m,"PATHWAY-CLONES":g,"PATHWAY-PRIORITY":x}=p;if(m)try{this.uri=new self.URL(m,s).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${m}`);return}this.scheduleRefresh(this.uri||u.url),g&&this.clonePathways(g),x&&this.updatePathwayPriority(x)},onError:(h,d,u,f)=>{if(this.log(`Error loading steering manifest: ${h.code} ${h.text} (${d.url})`),this.stopLoad(),h.code===410){this.enabled=!1,this.log(`Steering manifest ${d.url} no longer available`);return}let p=this.timeToLoad*1e3;if(h.code===429){const m=this.loader;if(typeof(m==null?void 0:m.getResponseHeader)=="function"){const g=m.getResponseHeader("Retry-After");g&&(p=parseFloat(g)*1e3)}this.log(`Steering manifest ${d.url} rate limited`);return}this.scheduleRefresh(this.uri||d.url,p)},onTimeout:(h,d,u)=>{this.log(`Timeout loading steering manifest (${d.url})`),this.scheduleRefresh(this.uri||d.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(n,l,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){self.clearTimeout(this.reloadTimer),this.reloadTimer=self.setTimeout(()=>{this.loadSteeringManifest(e)},t)}}function Ec(r,e,t,i){r&&Object.keys(e).forEach(s=>{const n=r.filter(a=>a.groupId===s).map(a=>{const o=Se({},a);return o.details=void 0,o.attrs=new ue(o.attrs),o.url=o.attrs.URI=Sc(a.url,a.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),o.groupId=o.attrs["GROUP-ID"]=e[s],o.attrs["PATHWAY-ID"]=i,o});r.push(...n)})}function Sc(r,e,t,i){const{HOST:s,PARAMS:n,[t]:a}=i;let o;e&&(o=a==null?void 0:a[e],o&&(r=o));const l=new self.URL(r);return s&&!o&&(l.host=s),n&&Object.keys(n).sort().forEach(c=>{c&&l.searchParams.set(c,n[c])}),l.href}const mp=/^age:\s*[\d.]+\s*$/im;class wc{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=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new Ns,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=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,i){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=i,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e)return;const i=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const n=this.xhrSetup;n?Promise.resolve().then(()=>{if(!this.stats.aborted)return n(i,t.url)}).catch(a=>(i.open("GET",t.url,!0),n(i,t.url))).then(()=>{this.stats.aborted||this.openAndSendXhr(i,t,e)}).catch(a=>{this.callbacks.onError({code:i.status,text:a.message},t,i,s)}):this.openAndSendXhr(i,t,e)}openAndSendXhr(e,t,i){e.readyState||e.open("GET",t.url,!0);const s=this.context.headers,{maxTimeToFirstByteMs:n,maxLoadTimeMs:a}=i.loadPolicy;if(s)for(const o in s)e.setRequestHeader(o,s[o]);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),i.timeout=n&&j(n)?n:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:i}=this;if(!e||!t)return;const s=t.readyState,n=this.config;if(!i.aborted&&s>=2&&(i.loading.first===0&&(i.loading.first=Math.max(self.performance.now(),i.loading.start),n.timeout!==n.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),n.timeout=n.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.loadPolicy.maxLoadTimeMs-(i.loading.first-i.loading.start)))),s===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const a=t.status,o=t.responseType!=="text";if(a>=200&&a<300&&(o&&t.response||t.responseText!==null)){i.loading.end=Math.max(self.performance.now(),i.loading.first);const l=o?t.response:t.responseText,c=t.responseType==="arraybuffer"?l.byteLength:l.length;if(i.loaded=i.total=c,i.bwEstimate=i.total*8e3/(i.loading.end-i.loading.first),!this.callbacks)return;const h=this.callbacks.onProgress;if(h&&h(i,e,l,t),!this.callbacks)return;const d={url:t.responseURL,data:l,code:a};this.callbacks.onSuccess(d,i,e,t)}else{const l=n.loadPolicy.errorRetry,c=i.retry;Ks(l,c,!1,a)?this.retry(l):(S.error(`${a} while loading ${e.url}`),this.callbacks.onError({code:a,text:t.statusText},e,t,i))}}}loadtimeout(){var e;const t=(e=this.config)==null?void 0:e.loadPolicy.timeoutRetry,i=this.stats.retry;if(Ks(t,i,!0))this.retry(t);else{S.warn(`timeout while loading ${this.context.url}`);const s=this.callbacks;s&&(this.abortInternal(),s.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:i}=this;this.retryDelay=En(e,i.retry),i.retry++,S.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t.url}, retrying ${i.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&&mp.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 gp(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const vp=/(\d+)-(\d+)\/(\d+)/;class Lc{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||bp,this.controller=new self.AbortController,this.stats=new Ns}destroy(){this.loader=this.callbacks=null,this.abortInternal()}abortInternal(){const e=this.response;e!=null&&e.ok||(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,i){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const n=yp(e,this.controller.signal),a=i.onProgress,o=e.responseType==="arraybuffer",l=o?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:h}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=i,this.request=this.fetchSetup(e,n),self.clearTimeout(this.requestTimeout),t.timeout=c&&j(c)?c:h,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),i.onTimeout(s,e,this.response)},t.timeout),self.fetch(this.request).then(d=>{this.response=this.loader=d;const u=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=h,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),i.onTimeout(s,e,this.response)},h-(u-s.loading.start)),!d.ok){const{status:f,statusText:p}=d;throw new Tp(p||"fetch, bad network response",f,d)}return s.loading.first=u,s.total=Ap(d.headers)||s.total,a&&j(t.highWaterMark)?this.loadProgressively(d,s,e,t.highWaterMark,a):o?d.arrayBuffer():e.responseType==="json"?d.json():d.text()}).then(d=>{const{response:u}=this;self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const f=d[l];f&&(s.loaded=s.total=f);const p={url:u.url,data:d,code:u.status};a&&!j(t.highWaterMark)&&a(s,e,d,u),i.onSuccess(p,s,e,u)}).catch(d=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const u=d&&d.code||0,f=d?d.message:null;i.onError({code:u,text:f},e,d?d.details:null,s)})}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,i,s=0,n){const a=new ec,o=e.body.getReader(),l=()=>o.read().then(c=>{if(c.done)return a.dataLength&&n(t,i,a.flush(),e),Promise.resolve(new ArrayBuffer(0));const h=c.value,d=h.length;return t.loaded+=d,d<s||a.dataLength?(a.push(h),a.dataLength>=s&&n(t,i,a.flush(),e)):n(t,i,h,e),l()}).catch(()=>Promise.reject());return l()}}function yp(r,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(Se({},r.headers))};return r.rangeEnd&&t.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),t}function xp(r){const e=vp.exec(r);if(e)return parseInt(e[2])-parseInt(e[1])+1}function Ap(r){const e=r.get("Content-Range");if(e){const i=xp(e);if(j(i))return i}const t=r.get("Content-Length");if(t)return parseInt(t)}function bp(r,e){return new self.Request(r.url,e)}class Tp extends Error{constructor(e,t,i){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=i}}const Ep=/\s/,Sp={newCue(r,e,t,i){const s=[];let n,a,o,l,c;const h=self.VTTCue||self.TextTrackCue;for(let u=0;u<i.rows.length;u++)if(n=i.rows[u],o=!0,l=0,c="",!n.isEmpty()){var d;for(let m=0;m<n.chars.length;m++)Ep.test(n.chars[m].uchar)&&o?l++:(c+=n.chars[m].uchar,o=!1);n.cueStartTime=e,e===t&&(t+=1e-4),l>=16?l--:l++;const f=mc(c.trim()),p=qn(e,t,f);r!=null&&(d=r.cues)!=null&&d.getCueById(p)||(a=new h(e,t,f),a.id=p,a.line=u+1,a.align="left",a.position=10+Math.min(80,Math.floor(l*8/32)*10),s.push(a))}return r&&s.length&&(s.sort((u,f)=>u.line==="auto"||f.line==="auto"?0:u.line>8&&f.line>8?f.line-u.line:u.line-f.line),s.forEach(u=>vl(r,u))),s}},wp={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Lp=Ve(Ve({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength: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:wc,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:D0,bufferController:H0,capLevelController:$n,errorController:Tf,fpsController:hp,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Ko,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:wp},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},Rp()),{},{subtitleStreamController:F0,subtitleTrackController:U0,timelineController:op,audioStreamController:k0,audioTrackController:O0,emeController:Ei,cmcdController:Mt,contentSteeringController:pp});function Rp(){return{cueHandler:Sp,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 Cp(r,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=ea(r),i=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return i.forEach(n=>{const a=`${n==="level"?"playlist":n}LoadPolicy`,o=e[a]===void 0,l=[];s.forEach(c=>{const h=`${n}Loading${c}`,d=e[h];if(d!==void 0&&o){l.push(h);const u=t[a].default;switch(e[a]={default:u},c){case"TimeOut":u.maxLoadTimeMs=d,u.maxTimeToFirstByteMs=d;break;case"MaxRetry":u.errorRetry.maxNumRetry=d,u.timeoutRetry.maxNumRetry=d;break;case"RetryDelay":u.errorRetry.retryDelayMs=d,u.timeoutRetry.retryDelayMs=d;break;case"MaxRetryTimeout":u.errorRetry.maxRetryDelayMs=d,u.timeoutRetry.maxRetryDelayMs=d;break}}}),l.length&&S.warn(`hls.js config: "${l.join('", "')}" setting(s) are deprecated, use "${a}": ${JSON.stringify(e[a])}`)}),Ve(Ve({},t),e)}function ea(r){return r&&typeof r=="object"?Array.isArray(r)?r.map(ea):Object.keys(r).reduce((e,t)=>(e[t]=ea(r[t]),e),{}):r}function Ip(r){const e=r.loader;e!==Lc&&e!==wc?(S.log("[config]: Custom loader detected, cannot enable progressive streaming"),r.progressive=!1):gp()&&(r.loader=Lc,r.progressive=!0,r.enableSoftwareAES=!0,S.log("[config]: Progressive streaming enabled, using FetchLoader"))}class Rt{static get version(){return"1.4.12"}static isSupported(){return Vf()}static get Events(){return v}static get ErrorTypes(){return K}static get ErrorDetails(){return D}static get DefaultConfig(){return Rt.defaultConfig?Rt.defaultConfig:Lp}static set DefaultConfig(e){Rt.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Hn,this._autoLevelCapping=void 0,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,uu(e.debug||!1,"Hls instance");const t=this.config=Cp(Rt.DefaultConfig,e);this.userConfig=e,this._autoLevelCapping=-1,t.progressive&&Ip(t);const{abrController:i,bufferController:s,capLevelController:n,errorController:a,fpsController:o}=t,l=new a(this),c=this.abrController=new i(this),h=this.bufferController=new s(this),d=this.capLevelController=new n(this),u=new o(this),f=new sf(this),p=new lf(this),m=t.contentSteeringController,g=m?new m(this):null,x=this.levelController=new Sf(this,g),b=new wf(this),A=new Rf(this.config),y=this.streamController=new C0(this,b,A);d.setStreamController(y),u.setStreamController(y);const T=[f,x,y];g&&T.splice(1,0,g),this.networkControllers=T;const w=[c,h,d,u,p,b];this.audioTrackController=this.createController(t.audioTrackController,T);const L=t.audioStreamController;L&&T.push(new L(this,b,A)),this.subtitleTrackController=this.createController(t.subtitleTrackController,T);const I=t.subtitleStreamController;I&&T.push(new I(this,b,A)),this.createController(t.timelineController,w),A.emeController=this.emeController=this.createController(t.emeController,w),this.cmcdController=this.createController(t.cmcdController,w),this.latencyController=this.createController(cf,w),this.coreComponents=w,T.push(l);const R=l.onErrorOut;typeof R=="function"&&this.on(v.ERROR,R,l)}createController(e,t){if(e){const i=new e(this);return t&&t.push(i),i}return null}on(e,t,i=this){this._emitter.on(e,t,i)}once(e,t,i=this){this._emitter.once(e,t,i)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,i=this,s){this._emitter.off(e,t,i,s)}listeners(e){return this._emitter.listeners(e)}emit(e,t,i){return this._emitter.emit(e,t,i)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(i){S.error("An internal error happened while handling event "+e+'. Error message: "'+i.message+'". Here is a stacktrace:',i),this.trigger(v.ERROR,{type:K.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,fatal:!1,event:e,error:i})}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){S.log("destroy"),this.trigger(v.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){S.log("attachMedia"),this._media=e,this.trigger(v.MEDIA_ATTACHING,{media:e})}detachMedia(){S.log("detachMedia"),this.trigger(v.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,i=this.url,s=this.url=an.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});S.log(`loadSource:${s}`),t&&i&&(i!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(v.MANIFEST_LOADING,{url:e})}startLoad(e=-1){S.log(`startLoad(${e})`),this.networkControllers.forEach(t=>{t.startLoad(e)})}stopLoad(){S.log("stopLoad"),this.networkControllers.forEach(e=>{e.stopLoad()})}swapAudioCodec(){S.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){S.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e,t=0){this.levelController.removeLevel(e,t)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){S.log(`set currentLevel:${e}`),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){S.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){S.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){S.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){return this.levelController.startLevel}set startLevel(e){S.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}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(S.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e)}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){An.indexOf(e)>-1&&(this._maxHdcpLevel=e)}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 i=e.length;for(let s=0;s<i;s++)if(e[s].maxBitrate>=t)return s;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:i}=this;let s;if(t===-1&&e&&e.length?s=e.length-1:s=t,i)for(let n=s;n--;){const a=e[n].attrs["HDCP-LEVEL"];if(a&&a<=i)return n}return s}get nextAutoLevel(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)}set nextAutoLevel(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}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 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}}Rt.defaultConfig=void 0;var Rc=new Function("return this")().Promise,ta=!1;try{ta=new Function("return (async function(){}).constructor")()}catch(r){if(!(r instanceof SyntaxError))throw r}function Cc(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function rs(r,e,t){for(var i in e)Cc(e,i)&&(e[i]!=null&&typeof e[i]=="object"&&(i==="storage"||i==="prefixes")&&!t?r[i]=rs({},e[i]):r[i]=e[i]);return r}function Dp(r,e,t,i){var s,n;return typeof e.autoTrim=="string"?s=n=e.autoTrim:Array.isArray(e.autoTrim)&&(s=e.autoTrim[1],n=e.autoTrim[0]),(t||t===!1)&&(s=t),(i||i===!1)&&(n=i),s==="slurp"&&n==="slurp"?r.trim():(s==="_"||s==="slurp"?String.prototype.trimLeft?r=r.trimLeft():r=r.replace(/^[\s\uFEFF\xA0]+/,""):(s==="-"||s==="nl")&&(r=r.replace(/^(?:\n|\r|\r\n)/,"")),n==="_"||n==="slurp"?String.prototype.trimRight?r=r.trimRight():r=r.replace(/[\s\uFEFF\xA0]+$/,""):(n==="-"||n==="nl")&&(r=r.replace(/(?:\n|\r|\r\n)$/,"")),r)}var ir=function(){function r(e){this.cache=e}return r.prototype.define=function(e,t){this.cache[e]=t},r.prototype.get=function(e){return this.cache[e]},r.prototype.remove=function(e){delete this.cache[e]},r.prototype.reset=function(){this.cache={}},r.prototype.load=function(e){rs(this.cache,e,!0)},r}();function Pp(r,e){Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e}function ke(r){var e=new Error(r);return Pp(e,ke.prototype),e}ke.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});function Ft(r,e,t){var i=e.slice(0,t).split(/\n/),s=i.length,n=i[s-1].length+1;throw r+=" at line "+s+" col "+n+`:
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
`+Dc(r,t)):s}}var na=require("fs"),aa=require("path"),Hp=/^\uFEFF/;function oa(r,e,t){var i=aa.resolve(t?e:aa.dirname(e),r),s=aa.extname(r);return s||(i+=".sqrl"),i}function Gp(r,e){var t,i,s=e.views,n=/^[A-Za-z]+:\\|^\//.exec(r);if(n&&n.length)t=oa(r.replace(/^\/*/,""),e.root||"/",!0);else if(e.filename&&(i=oa(r,e.filename),na.existsSync(i)&&(t=i)),t||Array.isArray(s)&&s.some(function(a){return i=oa(r,a,!0),na.existsSync(i)})&&(t=i),!t)throw ke('Could not find the include file "'+r+'"');return t}function Fc(r){return na.readFileSync(r).toString().replace(Hp,"")}function Vp(r,e){var t=as(e),i=Fc(r);try{var s=ra(i,t);return t.storage.templates.define(t.filename,s),s}catch{throw ke("Loading file: "+r+" failed")}}function jp(r){var e=r.filename;if(r.cache){var t=r.storage.templates.get(e);return t||Vp(e,r)}return ra(Fc(e),r)}function Nc(r,e){var t=as({filename:Gp(r,e)},e);return jp(t)}function zp(r,e,t){if(e&&e.length>0)throw ke("Helper 'includeFile' doesn't accept blocks");return Nc(r.params[0],t)(r.params[1],t)}function Kp(r,e,t){var i=r.params[1]||{};i.content=r.exec();for(var s=0;s<e.length;s++){var n=e[s];i[n.name]=n.exec()}return Nc(r.params[0],t)(i,t)}function la(r,e){var t;return e.cache&&e.name&&e.storage.templates.get(e.name)?e.storage.templates.get(e.name):(typeof r=="function"?t=r:t=ra(r,e),e.cache&&e.name&&e.storage.templates.define(e.name,t),t)}function Wp(r,e,t,i){var s=as(t||{});if(s.async){var n;if(i)try{la(r,s)(e,s,i)}catch(a){return i(a)}else{if(typeof Rc=="function")return new Rc(function(a,o){try{n=la(r,s)(e,s),a(n)}catch(l){o(l)}});throw ke("Please provide a callback function, this env doesn't support Promises")}}else return la(r,s)(e,s)}ns.define("includeFile",zp),ns.define("extendsFile",Kp);function Yp({canvas:r,scenes:e,currentTime:t}){if(e&&r){const i=e.scenes.filter(({start:n,duration:a})=>t>=n&&t<=n+a);if(i.length<=0)return;const s=r.getContext("2d");if(s){const n=e.transitionDuration,a=Math.max(...e.scenes.map(({start:o,duration:l})=>o+l));s.globalCompositeOperation="lighter",s.clearRect(0,0,r.width,r.height),i.forEach(({start:o,duration:l,draw:c,transitionCanvas:h})=>{s.globalAlpha=1,h.width=h.height=0,h.width=r.width,h.height=r.height;const d=h.getContext("2d");if(d){const u=o+l,f=o===0,p=u===a;c({currentTime:t,canvas:h,context:d}),!f&&t>=o&&t<=o+n/2?s.globalAlpha=Math.max(0,Math.min(1,(t-o)/(n/2))):!p&&t>=u-n/2&&t<=u&&(s.globalAlpha=Math.max(0,Math.min(1,(u-t)/(n/2)))),s.drawImage(h,0,0,r.width,r.height)}})}}}function Xp(r){if(typeof r=="string"){const[e,t]=r.split(":");return Math.min(parseFloat(e),parseFloat(t))}return r}function qp(r){if(typeof r=="string"){const[e,t]=r.split(":"),i=parseFloat(e),s=parseFloat(t);return i/s}return r}function os({resolution:r,aspectRatio:e}){const t=Xp(r),i=qp(e),s=i>=1,n=Math.min(s?t*i:t/i,t),a=Math.max(s?t*i:t/i,t);return{resolution:t,aspectRatio:i,height:s?n:a,width:s?a:n}}function Zp({format:r,resolution:e,aspectRatio:t,videoResolution:i,videoAspectRatio:s}){const{height:n,width:a}=os({resolution:e,aspectRatio:t}),{height:o,width:l}=os({resolution:i,aspectRatio:s}),c=t>s;let h=1;if(r==="letterbox"||r==="letterbox-video")h=c?n/o:a/l;else if(r==="squarebox"){const m=Math.min(n,a);h=l>=o?m/o:m/l}else(r==="crop"||r==="crop-top")&&(h=c?a/l:n/o);const d=a/h,u=n/h,f=(l-d)/2;let p=(o-u)/2;return r==="crop-top"&&(p=Math.min(0,p)),{sx:f,sy:p,sWidth:d,sHeight:u,scale:h}}function lr({source:r,sx:e,sy:t,sw:i,sh:s,dx:n,dy:a,dw:o,dh:l}){const c=(r==null?void 0:r.naturalWidth)??(r==null?void 0:r.videoWidth)??(r==null?void 0:r.width),h=(r==null?void 0:r.naturalHeight)??(r==null?void 0:r.videoHeight)??(r==null?void 0:r.height);e=e??0,t=t??0,i=i??c,s=s??h,i<0&&(e+=i,i=Math.abs(i)),s<0&&(t+=s,s=Math.abs(s)),o<0&&(n+=o,o=Math.abs(o)),l<0&&(a+=l,l=Math.abs(l));const d=Math.max(e,0),u=Math.min(e+i,c),f=Math.max(t,0),p=Math.min(t+s,h),m=o/i,g=l/s;return[r,d,f,u-d,p-f,e<0?n-e*m:n,t<0?a-t*g:a,(u-d)*m,(p-f)*g]}function Jp({context:r,source:e,format:t="letterbox",videoResolution:i,videoAspectRatio:s,posX:n,posY:a,width:o,height:l,offscreenCanvas:c}){const{sx:h,sy:d,sWidth:u,sHeight:f,scale:p}=Zp({resolution:Math.min(o,l),aspectRatio:o/l,format:t,videoResolution:i,videoAspectRatio:s}),m=c&&typeof r.filter<"u";if(t==="letterbox"||t==="squarebox"||t==="letterbox-video"&&!m){if(h<0){const y=Math.abs(h)*p;r.fillStyle="black",r.beginPath(),r.rect(n,a,y,l),r.rect(n+o-y,a,y,l),r.fill(),r.closePath()}if(d<0){const y=Math.abs(d)*p;r.fillStyle="black",r.beginPath(),r.rect(n,a,o,y),r.rect(n,a+l-y,o,y),r.fill(),r.closePath()}}if(t==="letterbox-video"&&m){const{width:y,height:T}=os({resolution:i,aspectRatio:s});c.width=y,c.height=T;const w=c.getContext("2d",{alpha:!1});if(w==null||w.drawImage(e,0,0,y,T),w){r.save(),r.globalCompositeOperation="destination-out",r.fillRect(n,a,o,l);const L=lr({source:c,sx:h,sy:d,sw:u,sh:f,dx:n,dy:a,dw:o,dh:l});r.globalCompositeOperation="source-over",r.drawImage(...L),w.save();const I=1.3,R=-(y*I-y)/2,E=-(T*I-T)/2;if(w.filter="blur(40px) brightness(20%)",w.translate(R,E),w.scale(I,I),w.drawImage(c,0,0,y,T),w.restore(),r.globalCompositeOperation="destination-over",h<0){const M=o/s,k=l/M,U=lr({source:c,sy:(1-k)*T/2,sh:k*T,dx:n,dy:a,dw:o,dh:l});r.drawImage(...U)}if(d<0){const M=l*s,k=o/M,U=lr({source:c,sx:(1-k)*y/2,sw:k*y,dx:n,dy:a,dw:o,dh:l});r.drawImage(...U)}r.restore()}}else{const y=lr({source:e,sx:h,sy:d,sw:u,sh:f,dx:n,dy:a,dw:o,dh:l});r.drawImage(...y)}const g=h*-1*p,x=d*-1*p,b=o-g*2,A=l-x*2;return{dx:g,dy:x,dw:b,dh:A}}const Ct=1.8;function ls(r){return typeof r=="number"?{top:r,right:r,bottom:r,left:r}:{top:0,right:0,bottom:0,left:0,...r}}function Qp(r,e=1){return typeof r=="number"?{topLeft:r*e,topRight:r*e,bottomRight:r*e,bottomLeft:r*e}:{topLeft:((r==null?void 0:r.topLeft)??0)*e,topRight:((r==null?void 0:r.topRight)??0)*e,bottomRight:((r==null?void 0:r.bottomRight)??0)*e,bottomLeft:((r==null?void 0:r.bottomLeft)??0)*e}}function cr(r,e){return typeof r=="number"?r:typeof r=="function"?r(e):null}function hr(r,e){const{w:t,gap:i=0,padding:s=0,direction:n="column",elements:a}=r,{right:o,left:l}=ls(s);if(t){const c=cr(t,e);if(c)return c}if(a){const c=a.length;if(n==="row")return o+l+i*(c-1)+a.reduce((h,d)=>h+=hr(d,e),0);if(n==="column"){let h=0;return a.forEach(d=>{const u=o+l+hr(d,e);u>h&&(h=u)}),h}}return 0}function _p(r,e,t){const{w:i=0,gap:s=0,padding:n=0,direction:a="column"}=r,{right:o,left:l}=ls(n),c=e.length,h=e.reduce((u,f)=>{const{w:p}=f;if(p){const m=cr(p,t);if(m)return u+=m}return p==="auto"?u+=hr(f,t):u},0),d=e.filter(({w:u})=>u==="fill").length;return e.reduce((u,f)=>{const{w:p}=f,m=i-o-l,g=Math.min(m,hr(f,t));if(p==="fill"){if(a==="row"){const x=(i-h-o-l-s*(c-1))/d;return u=[...u,x]}if(a==="column")return u=[...u,m]}return u=[...u,g]},[])}function dr(r,e){const{h:t,gap:i=0,padding:s=0,direction:n="column",elements:a}=r,{top:o,bottom:l}=ls(s);if(t){const c=cr(t,e);if(c)return c}if(a){const c=a.length;if(n==="row"){let h=0;return a.forEach(d=>{const u=o+l+dr(d,e);u>h&&(h=u)}),h}if(n==="column")return o+l+i*(c-1)+a.reduce((h,d)=>h+=dr(d,e),0)}return 0}function $p(r,e,t){const{h:i=0,gap:s=0,padding:n=0,direction:a="column"}=r,{top:o,bottom:l}=ls(n),c=e.length,h=e.reduce((u,f)=>{const{h:p}=f;if(p){const m=cr(p,t);if(m)return u+=m}return p==="auto"?u+=dr(f,t):u},0),d=e.filter(({h:u})=>u==="fill").length;return e.reduce((u,f)=>{const{h:p}=f,m=i-o-l,g=Math.min(m,dr(f,t));if(p==="fill"){if(a==="row")return u=[...u,m];if(a==="column"){const x=(i-h-o-l-s*(c-1))/d;return u=[...u,x]}}return u=[...u,g]},[])}function Uc({canvas:r,offscreenCanvas:e,debug:t=!1,origin:{x:i=0,y:s=0,w:n=r.width,h:a=r.height}={},parent:o,elements:l=[]}){const c=Math.min(n,a)/1080,h={x:0,y:0,w:n/c,h:a/c,gap:0,padding:0,direction:"column",align:"start",justify:"start",...o},{x:d,y:u,w:f,h:p,gap:m,padding:g,direction:x,align:b,justify:A}=h,{top:y,right:T,bottom:w,left:L}=ls(g);l.map((I,R)=>{const E=r.getContext("2d",{alpha:!1});if(E){const M=l.length,{x:k,y:U,radius:Y,elements:V=[],draw:B}=I,{topLeft:z,topRight:F,bottomRight:H,bottomLeft:J}=Qp(Y,c),_=_p(h,l,{context:E}),[X,ee,oe]=_.reduce((Ee,Me,Ze)=>(Ze<R&&(Ee[0]=Ee[0]+=Me),Ze>R&&(Ee[1]=Ee[1]+=Me),Ee[2]=Ee[2]+=Me,Ee),[0,0,0]),$=_[R],he=$p(h,l,{context:E,width:$}),[ye,Ae,bt]=he.reduce((Ee,Me,Ze)=>(Ze<R&&(Ee[0]=Ee[0]+=Me),Ze>R&&(Ee[1]=Ee[1]+=Me),Ee[2]=Ee[2]+=Me,Ee),[0,0,0]),be=he[R],jt={"row|start|start":L+X+m*R,"row|center|start":L+X+m*R,"row|end|start":L+X+m*R,"row|start|center":f/2-oe/2-m*(M-1)/2+X+m*R,"row|center|center":f/2-oe/2-m*(M-1)/2+X+m*R,"row|end|center":f/2-oe/2-m*(M-1)/2+X+m*R,"row|start|end":f-T-$-ee-m*(M-R),"row|center|end":f-T-$-ee-m*(M-R),"row|end|end":f-T-$-ee-m*(M-R),"column|start|start":L,"column|center|start":f/2-$/2,"column|end|start":f-T-$-ee,"column|start|center":L,"column|center|center":f/2-$/2,"column|end|center":f-T-$-ee,"column|start|end":L,"column|center|end":f/2-$/2,"column|end|end":f-T-$-ee},Ni={"row|start|start":y,"row|center|start":p/2-be/2,"row|end|start":p-w-be-Ae,"row|start|center":y,"row|center|center":p/2-be/2,"row|end|center":p-w-be-Ae,"row|start|end":y,"row|center|end":p/2-be/2,"row|end|end":p-w-be-Ae,"column|start|start":y+ye+m*R,"column|center|start":y+ye+m*R,"column|end|start":y+ye+m*R,"column|start|center":p/2-bt/2-m*(M-1)/2+ye+m*R,"column|center|center":p/2-bt/2-m*(M-1)+ye+m*R,"column|end|center":p/2-bt/2-m*(M-1)+ye+m*R,"column|start|end":p-w-be-Ae-m*(M-R),"column|center|end":p-w-be-Ae-m*(M-R),"column|end|end":p-w-be-Ae-m*(M-R)},zt=d+(k??jt[`${x}|${b}|${A}`]),ci=u+(U??Ni[`${x}|${b}|${A}`]),Te=i+zt*c,xe=s+ci*c,qe=$*c,pe=be*c;B&&(E.save(),Y&&(E.beginPath(),E.moveTo(Te+Math.min(pe/Ct,z),xe),E.lineTo(Te+qe-Math.min(pe/Ct,F),xe),E.quadraticCurveTo(Te+qe,xe,Te+qe,xe+Math.min(pe/Ct,F)),E.lineTo(Te+qe,xe+pe-Math.min(pe/Ct,H)),E.quadraticCurveTo(Te+qe,xe+pe,Te+qe-Math.min(pe/Ct,H),xe+pe),E.lineTo(Te+Math.min(pe/Ct,J),xe+pe),E.quadraticCurveTo(Te,xe+pe,Te,xe+pe-Math.min(pe/Ct,J)),E.lineTo(Te,xe+Math.min(pe/Ct,z)),E.quadraticCurveTo(Te,xe,Te+Math.min(pe/Ct,z),xe),E.closePath(),t&&(E.strokeStyle="blue",E.stroke()),E.clip()),B({scale:c,canvas:r,offscreenCanvas:e,context:E,dx:Te,dy:xe,dw:qe,dh:pe}),t&&(E.strokeStyle="red",E.strokeRect(Te,xe,qe,pe)),E.restore()),Uc({canvas:r,offscreenCanvas:e,debug:t,origin:{x:i,y:s,w:n,h:a},parent:{...I,x:zt,y:ci,w:$,h:be},elements:V})}})}function em(r){return Uc(r)}function ur({context:r,node:e,maxW:t=1/0}){const i=(e.value??"").split(" ");return i.slice(1).reduce((s,n)=>{const a=`${s[s.length-1].text} ${n}`.trim(),o=r.measureText(a);return o.width>t?s=[...s,{text:n,metrics:r.measureText(n)}]:s[s.length-1]={text:a,metrics:o},s},[{text:i[0],metrics:r.measureText(i[0])}])}function Bc(r){const{visible:e=!0,node:t}=r,i=[...(t==null?void 0:t.elements)??[],...(r==null?void 0:r.elements)??[]];return e&&(t&&t.type!=="box"?!!t.value:!0)||(i==null?void 0:i.some(s=>Bc(s)))}function Hc(r=!1,e,t){return e.map(i=>{const{node:s}=i;if(Bc(i))return{...i,...(s==null?void 0:s.type)==="text"&&s.value?{w:s.fill?"fill":({context:n})=>s&&s.type==="text"&&s.value?(n.font=s.font,n.textBaseline="top",Math.ceil(n.measureText(s.value).width)):0,h:s.fill?"fill":({width:n,context:a})=>{var o,l;if(s&&s.type==="text"){const c=/(?<value>\d+\.?\d*)/,h=parseFloat(((l=(o=s.font.match(c))==null?void 0:o.groups)==null?void 0:l.value)??"0");return s.wrap?ur({context:a,node:s,maxW:n}).length*h:h}return 0}}:{},...(s==null?void 0:s.type)==="image"&&s.image&&s.size?{w:()=>{var n,a,o,l;const c=((n=s.image)==null?void 0:n.naturalWidth)??s.image.width,h=((a=s.image)==null?void 0:a.naturalHeight)??s.image.height,d=c/h,u=(o=s.size)==null?void 0:o.w,f=((l=s.size)==null?void 0:l.h)??0;return u??(d>=1?f:f*d)},h:()=>{var n,a,o,l;const c=((n=s.image)==null?void 0:n.naturalWidth)??s.image.width,h=((a=s.image)==null?void 0:a.naturalHeight)??s.image.height,d=c/h,u=((o=s.size)==null?void 0:o.w)??0;return((l=s.size)==null?void 0:l.h)??(d<1?u:u*d)}}:{},elements:i.elements?Hc(r,i.elements,t):void 0,draw:({canvas:n,offscreenCanvas:a,context:o,dx:l,dy:c,dw:h,dh:d,scale:u})=>{var f,p,m,g,x,b,A,y,T;if(s){const{type:w,from:L=0,to:I=1/0}=s;if(!t||t>=L&&t<=I){if(o.save(),t&&I-.3333333333333333<=t&&(o.globalAlpha=1-(.16666666666666666-(I-t))/.16666666666666666),w==="box"&&(o.fillStyle=s.background,o.fillRect(l,c,h,d)),w==="text"&&s.value){const R=/(?<value>\d+\.?\d*)/;let E=0;const M=parseFloat(((p=(f=s.font.match(R))==null?void 0:f.groups)==null?void 0:p.value)??"0")*u;if(s.fill){const{minSize:k,maxSize:U}=s.fill;E=k*u,o.font=s.font.replace(R,E.toString());const Y=10*u;let V=0,B=ur({context:o,node:s,maxW:h});for(;E+Y<U*u&&(B.length+1)*(E+Y)<d;)if(E+=Y,o.font=s.font.replace(R,E.toString()),B=ur({context:o,node:s,maxW:h}),V=B.reduce((z,F)=>(F.metrics.width>z&&(z=F.metrics.width),z),0),V>h){E-=Y;break}o.font=s.font.replace(R,E.toString())}else E=M,o.font=s.font.replace(R,M.toString());o.textBaseline="top",o.fillStyle=s.color,s.wrap?ur({context:o,node:s,maxW:h}).forEach((k,U)=>{o.fillText(k.text,l,c+E*U)}):o.fillText(s.value,l,c)}if(w==="image"&&s.image&&o.drawImage(s.image,l,c,h,d),w==="video"&&(m=s.video)!=null&&m.node){const R=(x=(g=s.video)==null?void 0:g.node)==null?void 0:x.videoWidth,E=(A=(b=s.video)==null?void 0:b.node)==null?void 0:A.videoHeight;if(R&&E){const{resolution:M,aspectRatio:k}=os({resolution:Math.min(R,E),aspectRatio:R/E}),{dx:U,dy:Y,dw:V,dh:B}=Jp({offscreenCanvas:a,context:o,source:(y=s.video)==null?void 0:y.node,format:s.format??"letterbox",videoResolution:M,videoAspectRatio:k,posX:l,posY:c,width:h,height:d});s.elements&&Gc({time:t,canvas:n,offscreenCanvas:a,origin:{x:Math.max(l,l+U),y:Math.max(c,c+Y),w:Math.min(h,V),h:Math.min(d,B)},elements:s.elements})}}if(w==="gradient"){const R=o.createLinearGradient(l+h,c,l+h,c+d);(T=s.value)==null||T.forEach(E=>{R.addColorStop(E.percent,E.color)}),o.fillStyle=R,o.fillRect(l,c,h,d)}o.restore()}}}}}).filter(Boolean)}function Gc({debug:r,time:e,elements:t,...i}){return em({...i,debug:r,elements:Hc(r,t,e)})}function tm(){return typeof window>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}async function Vc(r){return r.duration===1/0?new Promise(e=>{r.currentTime=Number.MAX_SAFE_INTEGER,r.ontimeupdate=()=>{r.ontimeupdate=null,e(r.duration),r.currentTime=0}}):r.duration}async function ca({element:r}){var e,t,i;let s={...r};const{node:n}=r;if((n==null?void 0:n.type)==="video"&&((e=n==null?void 0:n.value)!=null&&e.src||(t=n==null?void 0:n.value)!=null&&t.playlist)){const{id:a,src:o,playlist:l,duration:c}=n.value,h=await new Promise(d=>{let u=null;const f=document.createElement("video");if(f.playsInline=!0,f.muted=!0,f.loop=!1,l&&!tm()&&Rt.isSupported()){let p=!1;u=new Rt({autoStartLoad:!0,xhrSetup:m=>{const{open:g}=m,x=l.split("?")[1];m.open=function(b,A,y){A.toString().includes("?")||(A+="?"+x),g.apply(this,[b,A,y])}}}),u.loadSource(l),u.attachMedia(f),u.startLoadOnce=(m=-1)=>{u&&!p&&(u.startLoad(m),p=!0)},u.on(Rt.Events.LEVEL_LOADED,async()=>{var m;p||u==null||u.stopLoad();const g=c??await Vc(f),x=(1-(((m=n.value)==null?void 0:m.endOffset)??0))*g;d({...s,node:{...n,elements:[],video:{id:a,hls:u,duration:x,node:f,start:(n.value.startOffset??0)*g}}})})}else{f.src=o;let p=!1;if(f.startLoadOnce=()=>{p||(f.preload="auto",f.load(),p=!0)},c){f.preload="none";const m=(1-(n.value.endOffset??0))*c;d({...s,node:{...n,elements:[],video:{id:a,hls:u,node:f,duration:m,start:(n.value.startOffset??0)*c}}})}else{f.preload="metadata";const m=async()=>{const g=await Vc(f),x=(1-(n.value.endOffset??0))*g;d({...s,node:{...n,elements:[],video:{id:a,hls:u,duration:x,node:f,start:(n.value.startOffset??0)*g}}}),f.removeEventListener("loadedmetadata",m)};f.addEventListener("loadedmetadata",m)}}});s={...s,...h}}if((n==null?void 0:n.type)==="image"&&n.value){const a=await new Promise(o=>{const l=new Image;l.onload=async()=>{o({...s,node:{...n,image:l,elements:[]}})},l.src=n.value});s={...s,...a}}return s.node&&(i=r.node)!=null&&i.elements&&(s.node.elements=await Promise.all(r.node.elements.map(a=>ca({element:a})))),r.elements&&(s.elements=await Promise.all(r.elements.map(a=>ca({element:a})))),s}async function jc(){if(typeof window>"u"){const r=await Promise.resolve().then(()=>py);return new r.Canvas}return document.createElement("canvas")}async function im(r){var e;try{if((e=await window.fetch(r,{method:"HEAD"}))!=null&&e.ok)return r}catch{return}}async function sm({sources:r}){let e=null;if(r){const t=r.filter(Boolean).map(i=>im(i));e=(await Promise.all(t)).find(Boolean)}return e}or.define("stringify",r=>JSON.stringify(r)),or.define("nullify",r=>typeof r>"u"?null:r),or.define("filter",(r,e)=>{if(!e)return r;if(!Array.isArray(r))throw new Error("Data for filter must be an array");return r.filter((t,i)=>e.includes(i))}),ns.define("parse",r=>{const e=r.params[0];return typeof e=="string"?`"${e}"`:typeof e>"u"?null:e}),ns.define("resolve-source",async r=>{const{mp4:e,input:t}=r.params[0]??{},i=e!=null&&e.includes("blob:")?e:await sm({sources:[e,t]});return i?`"${i}"`:"null"});const fr=(r,e,t)=>Wp(r,e,as({autoEscape:!1,defaultFilter:"nullify",async:!0,asyncHelpers:["resolve-source"],...t}));function ha(r=[]){var e;for(const t of r)return((e=t==null?void 0:t.node)==null?void 0:e.type)==="video"?t.node.video:ha(t==null?void 0:t.elements)}async function zc({data:r,instance:e}){var t;const i=(await Promise.all(e.template.content.map(async({layouts:n,root:a})=>(await Promise.all(n.map(async({type:o,duration:l,data:c,options:h})=>{async function d(u){const f=c?JSON.parse(await fr(c,{...e.options,...u})):{},p=h?JSON.parse(await fr(h,e.options)):{},m=JSON.parse(await fr(e.template.layouts[o],{...f,...p})),g=await Promise.all(m.flatMap(b=>ca({element:b}))),x=ha(g);return{duration:l??(x==null?void 0:x.duration)??0,elements:g}}if(a){const u=JSON.parse(await fr(a,{...e.options,...r}));return Array.isArray(u)?await Promise.all(u.map(async f=>await d(f))):d(u)}return d(r)}))).flatMap(o=>o).filter(o=>o.duration>0)))).flatMap(n=>n),s=((t=e.meta)==null?void 0:t.transitionDuration)??1/3;return{scenes:await Promise.all(i.map(async({duration:n,elements:a},o)=>{const l=await jc(),c=await jc(),h=i.reduce((d,u,f)=>(f<o&&(d+=u.duration-s/2),d),0);return{draw:({canvas:d,currentTime:u})=>{Gc({canvas:d,elements:a,offscreenCanvas:l,time:u})},video:ha(a),duration:n,transitionCanvas:c,start:h}})),transitionDuration:s}}/**
|
86
|
+
`),[n,a]=i.match(Wd)||[];return{start:n,end:a,text:s}}):[]}function Us(r){const[t,e,i]=r.split(":");return i?parseInt(t)*60*60+parseInt(e)*60+parseFloat(i):parseInt(t)*60+parseInt(e)}function Yd({canvas:r,dx:t,dy:e,dw:i,dh:s,relativeTime:n,vttCaptions:a}){if(a){const o=So(a).find(({start:l,end:h})=>l&&h&&n>=Us(l)&&n<Us(h));if(o){const l=r.getContext("2d");if(l){const h=Math.min(i,s);let c=[""];const d=i*.9,u=h*.05;l.font=`${u}px Roobert, Dejavu Sans, sans-serif`,l.textBaseline="middle",o.text.split(" ").forEach(f=>{const p=c.length-1,g=l.measureText(c[p]).width,v=l.measureText(` ${f}`).width;g+v<d?c[p]=`${c[p]} ${f}`:c=[...c,f]}),c.forEach((f,p)=>{const g=f.trim(),v=l.measureText(g),E=t+(i-v.width)/2,A=e+(s*.85-(u+h*.04)*(c.length-1-p)),L=u*.8,y=u/1.5,S=t+(i-v.width-y)/2,R=A-L,D=v.width+y,M=L*2,C=l.globalAlpha;l.save(),l.globalAlpha=.8*C,l.fillStyle="#000000",l.beginPath(),l.roundRect(S,R,D,M,h*.01),l.fill(),l.closePath(),l.globalAlpha=C,l.fillStyle="#FFFFFF",l.fillText(g,E,A),l.restore()})}}}}const Oe=1.8;function Zi(r){return typeof r=="number"?{top:r,right:r,bottom:r,left:r}:{top:0,right:0,bottom:0,left:0,...r}}function qd(r,t=1){return typeof r=="number"?{topLeft:r*t,topRight:r*t,bottomRight:r*t,bottomLeft:r*t}:{topLeft:((r==null?void 0:r.topLeft)??0)*t,topRight:((r==null?void 0:r.topRight)??0)*t,bottomRight:((r==null?void 0:r.bottomRight)??0)*t,bottomLeft:((r==null?void 0:r.bottomLeft)??0)*t}}function Bs(r,t){return typeof r=="number"?r:typeof r=="function"?r(t):null}function Hs(r,t){const{w:e,gap:i=0,padding:s=0,direction:n="column",elements:a}=r,{right:o,left:l}=Zi(s);if(e){const h=Bs(e,t);if(h)return h}if(a){const h=a.length;if(n==="row")return o+l+i*(h-1)+a.reduce((c,d)=>c+=Hs(d,t),0);if(n==="column"){let c=0;return a.forEach(d=>{const u=o+l+Hs(d,t);u>c&&(c=u)}),c}}return 0}function zd(r,t,e){const{w:i=0,gap:s=0,padding:n=0,direction:a="column"}=r,{right:o,left:l}=Zi(n),h=t.length,c=t.reduce((u,f)=>{const{w:p}=f;if(p){const g=Bs(p,e);if(g)return u+=g}return p==="auto"?u+=Hs(f,e):u},0),d=t.filter(({w:u})=>u==="fill").length;return t.reduce((u,f)=>{const{w:p}=f,g=i-o-l,v=Math.min(g,Hs(f,e));if(p==="fill"){if(a==="row"){const E=(i-c-o-l-s*(h-1))/d;return u=[...u,E]}if(a==="column")return u=[...u,g]}return u=[...u,v]},[])}function Gs(r,t){const{h:e,gap:i=0,padding:s=0,direction:n="column",elements:a}=r,{top:o,bottom:l}=Zi(s);if(e){const h=Bs(e,t);if(h)return h}if(a){const h=a.length;if(n==="row"){let c=0;return a.forEach(d=>{const u=o+l+Gs(d,t);u>c&&(c=u)}),c}if(n==="column")return o+l+i*(h-1)+a.reduce((c,d)=>c+=Gs(d,t),0)}return 0}function Xd(r,t,e){const{h:i=0,gap:s=0,padding:n=0,direction:a="column"}=r,{top:o,bottom:l}=Zi(n),h=t.length,c=t.reduce((u,f)=>{const{h:p}=f;if(p){const g=Bs(p,e);if(g)return u+=g}return p==="auto"?u+=Gs(f,e):u},0),d=t.filter(({h:u})=>u==="fill").length;return t.reduce((u,f)=>{const{h:p}=f,g=i-o-l,v=Math.min(g,Gs(f,e));if(p==="fill"){if(a==="row")return u=[...u,g];if(a==="column"){const E=(i-c-o-l-s*(h-1))/d;return u=[...u,E]}}return u=[...u,v]},[])}function Lo({canvas:r,offscreenCanvas:t,debug:e=!1,origin:{x:i=0,y:s=0,w:n=r.width,h:a=r.height}={},parent:o,elements:l=[]}){const h=Math.min(n,a)/1080,c={x:0,y:0,w:n/h,h:a/h,gap:0,padding:0,direction:"column",align:"start",justify:"start",...o},{x:d,y:u,w:f,h:p,gap:g,padding:v,direction:E,align:A,justify:L}=c,{top:y,right:S,bottom:R,left:D}=Zi(v);l.map((M,C)=>{const I=r.getContext("2d",{alpha:!1});if(I){const G=l.length,{x:F,y:V,radius:q,elements:w=[],draw:P}=M,{topLeft:H,topRight:b,bottomRight:T,bottomLeft:k}=qd(q,h),N=zd(c,l,{context:I}),[U,K,W]=N.reduce((Tt,_t,Ot)=>(Ot<C&&(Tt[0]=Tt[0]+=_t),Ot>C&&(Tt[1]=Tt[1]+=_t),Tt[2]=Tt[2]+=_t,Tt),[0,0,0]),X=N[C],lt=Xd(c,l,{context:I,width:X}),[rt,at,Rt]=lt.reduce((Tt,_t,Ot)=>(Ot<C&&(Tt[0]=Tt[0]+=_t),Ot>C&&(Tt[1]=Tt[1]+=_t),Tt[2]=Tt[2]+=_t,Tt),[0,0,0]),nt=lt[C],it={"row|start|start":D+U+g*C,"row|center|start":D+U+g*C,"row|end|start":D+U+g*C,"row|start|center":f/2-W/2-g*(G-1)/2+U+g*C,"row|center|center":f/2-W/2-g*(G-1)/2+U+g*C,"row|end|center":f/2-W/2-g*(G-1)/2+U+g*C,"row|start|end":f-S-X-K-g*(G-C),"row|center|end":f-S-X-K-g*(G-C),"row|end|end":f-S-X-K-g*(G-C),"column|start|start":D,"column|center|start":f/2-X/2,"column|end|start":f-S-X-K,"column|start|center":D,"column|center|center":f/2-X/2,"column|end|center":f-S-X-K,"column|start|end":D,"column|center|end":f/2-X/2,"column|end|end":f-S-X-K},vt={"row|start|start":y,"row|center|start":p/2-nt/2,"row|end|start":p-R-nt-at,"row|start|center":y,"row|center|center":p/2-nt/2,"row|end|center":p-R-nt-at,"row|start|end":y,"row|center|end":p/2-nt/2,"row|end|end":p-R-nt-at,"column|start|start":y+rt+g*C,"column|center|start":y+rt+g*C,"column|end|start":y+rt+g*C,"column|start|center":p/2-Rt/2-g*(G-1)/2+rt+g*C,"column|center|center":p/2-Rt/2-g*(G-1)+rt+g*C,"column|end|center":p/2-Rt/2-g*(G-1)+rt+g*C,"column|start|end":p-R-nt-at-g*(G-C),"column|center|end":p-R-nt-at-g*(G-C),"column|end|end":p-R-nt-at-g*(G-C)},dt=d+(F??it[`${E}|${A}|${L}`]),Ct=u+(V??vt[`${E}|${A}|${L}`]),et=i+dt*h,ut=s+Ct*h,bt=X*h,pt=nt*h;P&&(I.save(),q&&(I.beginPath(),I.moveTo(et+Math.min(pt/Oe,H),ut),I.lineTo(et+bt-Math.min(pt/Oe,b),ut),I.quadraticCurveTo(et+bt,ut,et+bt,ut+Math.min(pt/Oe,b)),I.lineTo(et+bt,ut+pt-Math.min(pt/Oe,T)),I.quadraticCurveTo(et+bt,ut+pt,et+bt-Math.min(pt/Oe,T),ut+pt),I.lineTo(et+Math.min(pt/Oe,k),ut+pt),I.quadraticCurveTo(et,ut+pt,et,ut+pt-Math.min(pt/Oe,k)),I.lineTo(et,ut+Math.min(pt/Oe,H)),I.quadraticCurveTo(et,ut,et+Math.min(pt/Oe,H),ut),I.closePath(),e&&(I.strokeStyle="blue",I.stroke()),I.clip()),P({scale:h,canvas:r,context:I,offscreenCanvas:t,dx:et,dy:ut,dw:bt,dh:pt}),e&&(I.strokeStyle="red",I.strokeRect(et,ut,bt,pt)),I.restore()),Lo({canvas:r,offscreenCanvas:t,debug:e,origin:{x:i,y:s,w:n,h:a},parent:{...M,x:dt,y:Ct,w:X,h:nt},elements:w})}})}function Qd(r){return Lo(r)}function Vs({context:r,node:t,maxW:e=1/0}){const i=(t.value??"").split(" ");return i.slice(1).reduce((s,n)=>{const a=`${s[s.length-1].text} ${n}`.trim(),o=r.measureText(a);return o.width>e?s=[...s,{text:n,metrics:r.measureText(n)}]:s[s.length-1]={text:a,metrics:o},s},[{text:i[0],metrics:r.measureText(i[0])}])}function Ro(r){const{visible:t=!0,node:e}=r,i=[...(e==null?void 0:e.elements)??[],...(r==null?void 0:r.elements)??[]];return t?e&&e.type!=="box"&&e.type!=="gradient"?!!e.value:i==null?void 0:i.some(s=>Ro(s)):!1}function _o({debug:r,elements:t,currentTime:e,relativeTime:i}){return t.map(s=>{const{node:n}=s;if(Ro(s))return{...s,...(n==null?void 0:n.type)==="text"&&n.value?{w:n.fill?"fill":({context:a})=>n&&n.type==="text"&&n.value?(a.font=n.font,a.textBaseline="top",Math.ceil(a.measureText(n.value).width)):0,h:n.fill?"fill":({width:a,context:o})=>{var l,h;if(n&&n.type==="text"){const c=/(?<value>\d+\.?\d*)(?=px)/,d=parseFloat(((h=(l=n.font.match(c))==null?void 0:l.groups)==null?void 0:h.value)??"0");return n.wrap?Vs({context:o,node:n,maxW:a}).length*d:d}return 0}}:{},...(n==null?void 0:n.type)==="image"&&n.image&&n.size?{w:()=>{var a,o,l,h,c,d;const u=((a=n.image)==null?void 0:a.naturalWidth)??((o=n.image)==null?void 0:o.width),f=((l=n.image)==null?void 0:l.naturalHeight)??((h=n.image)==null?void 0:h.height),p=u/f,g=(c=n.size)==null?void 0:c.w,v=((d=n.size)==null?void 0:d.h)??0;return g??(p>=1?v:v*p)},h:()=>{var a,o,l,h,c,d;const u=((a=n.image)==null?void 0:a.naturalWidth)??((o=n.image)==null?void 0:o.width),f=((l=n.image)==null?void 0:l.naturalHeight)??((h=n.image)==null?void 0:h.height),p=u/f,g=((c=n.size)==null?void 0:c.w)??0;return((d=n.size)==null?void 0:d.h)??(p<1?g:g*p)}}:{},elements:s.elements?_o({debug:r,elements:s.elements,currentTime:e,relativeTime:i}):void 0,draw:({canvas:a,offscreenCanvas:o,context:l,dx:h,dy:c,dw:d,dh:u,scale:f})=>{var p,g,v,E,A,L,y,S,R,D,M;if(n){const{type:C,from:I=0,to:G=1/0}=n;if(i>=I&&i<=G){if(l.save(),i&&G-.3333333333333333<=i&&(l.globalAlpha=1-(.16666666666666666-(G-i))/.16666666666666666),C==="box"&&(l.fillStyle=n.background,l.fillRect(h,c,d,u)),C==="text"&&n.value){const F=/(?<value>\d+\.?\d*)(?=px)/;let V=0;const q=parseFloat(((g=(p=n.font.match(F))==null?void 0:p.groups)==null?void 0:g.value)??"0")*f;if(n.fill){const{minSize:w,maxSize:P}=n.fill;V=w*f,l.font=n.font.replace(F,V.toString());const H=10*f;let b=0,T=Vs({context:l,node:n,maxW:d});for(;V+H<P*f&&(T.length+1)*(V+H)<u;)if(V+=H,l.font=n.font.replace(F,V.toString()),T=Vs({context:l,node:n,maxW:d}),b=T.reduce((k,N)=>(N.metrics.width>k&&(k=N.metrics.width),k),0),b>d){V-=H;break}l.font=n.font.replace(F,V.toString())}else V=q,l.font=n.font.replace(F,q.toString());l.textBaseline="top",l.fillStyle=n.color,n.wrap?Vs({context:l,node:n,maxW:d}).forEach((w,P)=>{l.fillText(w.text,h,c+V*P)}):l.fillText(n.value,h,c)}if(C==="image"&&n.image&&l.drawImage(n.image,h,c,d,u),C==="video"&&((v=n.video)!=null&&v.node||(E=n.video)!=null&&E.getSource)){const F=n.format??"letterbox",V=((L=(A=n.video)==null?void 0:A.getSource)==null?void 0:L.call(A,i))??n.video.node,q=(V==null?void 0:V.videoWidth)??(V==null?void 0:V.naturalWidth)??(V==null?void 0:V.width),w=(V==null?void 0:V.videoHeight)??(V==null?void 0:V.naturalHeight)??(V==null?void 0:V.height);if(q&&w){const{resolution:H,aspectRatio:b}=bi({resolution:Math.min(q,w),aspectRatio:q/w}),{dx:T,dy:k,dw:N,dh:U}=wo({offscreenCanvas:o,context:l,source:V,format:F,videoResolution:H,videoAspectRatio:b,posX:h,posY:c,width:d,height:u});n.elements&&Zr({debug:r,canvas:a,offscreenCanvas:o,currentTime:e,relativeTime:i,origin:{x:Math.max(h,h+T),y:Math.max(c,c+k),w:Math.min(d,N),h:Math.min(u,U)},elements:n.elements})}const P=1/3;if(n.poster&&e>=0&&e<=P){l.save(),l.globalAlpha=1-e/P;const H=((y=n.poster)==null?void 0:y.naturalWidth)??((S=n.poster)==null?void 0:S.width),b=((R=n.poster)==null?void 0:R.naturalHeight)??((D=n.poster)==null?void 0:D.height);if(H&&b){const{resolution:T,aspectRatio:k}=bi({resolution:Math.min(H,b),aspectRatio:H/b}),{dx:N,dy:U,dw:K,dh:W}=wo({offscreenCanvas:o,context:l,source:n.poster,format:F,videoResolution:T,videoAspectRatio:k,posX:h,posY:c,width:d,height:u});n.elements&&Zr({debug:r,canvas:a,offscreenCanvas:o,currentTime:e,relativeTime:i,origin:{x:Math.max(h,h+N),y:Math.max(c,c+U),w:Math.min(d,K),h:Math.min(u,W)},elements:n.elements})}l.restore()}}if(C==="gradient"&&n.value){const F=l.createLinearGradient(h+d,c,h+d,c+u);(M=n.value)==null||M.forEach(V=>{F.addColorStop(V.percent,V.color)}),l.fillStyle=F,l.fillRect(h,c,d,u)}l.restore()}}}}}).filter(Boolean)}function Zr({debug:r,elements:t,currentTime:e,relativeTime:i,...s}){return Qd({...s,debug:r,elements:_o({debug:r,elements:t,currentTime:e,relativeTime:i})})}const Zd=(r,t,e,i)=>{if(e==="length"||e==="prototype"||e==="arguments"||e==="caller")return;const s=Object.getOwnPropertyDescriptor(r,e),n=Object.getOwnPropertyDescriptor(t,e);!Jd(s,n)&&i||Object.defineProperty(r,e,n)},Jd=function(r,t){return r===void 0||r.configurable||r.writable===t.writable&&r.enumerable===t.enumerable&&r.configurable===t.configurable&&(r.writable||r.value===t.value)},tu=(r,t)=>{const e=Object.getPrototypeOf(t);e!==Object.getPrototypeOf(r)&&Object.setPrototypeOf(r,e)},eu=(r,t)=>`/* Wrapped ${r}*/
|
87
|
+
${t}`,iu=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),su=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),ru=(r,t,e)=>{const i=e===""?"":`with ${e.trim()}() `,s=eu.bind(null,i,t.toString());Object.defineProperty(s,"name",su),Object.defineProperty(r,"toString",{...iu,value:s})};function nu(r,t,{ignoreNonConfigurable:e=!1}={}){const{name:i}=r;for(const s of Reflect.ownKeys(t))Zd(r,t,s,e);return tu(r,t),ru(r,t,i),r}const au=new WeakMap;function ko(r,{cacheKey:t=([i])=>i,cache:e=new Map}={}){const i=new Map,s=function(...n){const a=t(n);if(i.has(a))return i.get(a);const o=(async()=>{try{if(e&&await e.has(a))return await e.get(a);const l=await r.apply(this,n);try{return l}finally{e&&await e.set(a,l)}}finally{i.delete(a)}})();return i.set(a,o),o};return nu(s,r,{ignoreNonConfigurable:!0}),au.set(s,e),s}const ou={id:"default",name:"None",template:{id:"basic",name:"Basic",layouts:[{name:"basic",tree:`[
|
88
|
+
{
|
89
|
+
"w": "fill",
|
90
|
+
"h": "fill",
|
91
|
+
"node": {
|
92
|
+
"type": "video",
|
93
|
+
"format": {{@ parse(it.videoFormat) /}},
|
94
|
+
"value": {
|
95
|
+
"id": {{@ parse(it.id) /}},
|
96
|
+
"src": {{@async resolve-source({ sources: [it.mp4, it.input] }) /}},
|
97
|
+
"playlist": {{@async resolve-source({ sources: [it.playlist] }) /}},
|
98
|
+
"poster": {{@ parse(it.poster) /}},
|
99
|
+
"captions": {{@ parse(it.captions) /}},
|
100
|
+
"duration": {{@ parse(it.duration) /}},
|
101
|
+
"startOffset": {{@ parse(it.startOffset) /}},
|
102
|
+
"endOffset": {{@ parse(it.endOffset) /}}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
106
|
+
]`}],content:[{scenes:[{layout:"basic",data:`{
|
107
|
+
"id": "{{ it.root?.answer?.id }}-intro",
|
108
|
+
"mp4": {{@ parse(it.root?.answer?.media?.video) /}},
|
109
|
+
"input": {{@ parse(it.root?.answer?.media?.input) /}},
|
110
|
+
"playlist": {{@ parse(it.root?.answer?.media?.playlist) /}},
|
111
|
+
"poster": {{@ parse(it.root?.answer?.media?.preview) /}},
|
112
|
+
"captions": {{@ parse(it.root?.answer?.captions?.current) /}},
|
113
|
+
"duration": {{@ parse(it.root?.answer?.metadata?.duration) /}},
|
114
|
+
"startOffset": {{@ parse(it.root?.answer?.settings?.startOffset) /}},
|
115
|
+
"endOffset": {{@ parse(it.root?.answer?.settings?.endOffset) /}}
|
116
|
+
}`}],root:"{{ it.intro?.questions?.items | stringify }}"},{scenes:[{layout:"basic",data:`{
|
117
|
+
"id": {{@ parse(it.root?.answer?.id) /}},
|
118
|
+
"mp4": {{@ parse(it.root?.answer?.media?.video) /}},
|
119
|
+
"input": {{@ parse(it.root?.answer?.media?.input) /}},
|
120
|
+
"playlist": {{@ parse(it.root?.answer?.media?.playlist) /}},
|
121
|
+
"poster": {{@ parse(it.root?.answer?.media?.preview) /}},
|
122
|
+
"captions": {{@ parse(it.root?.answer?.captions?.current) /}},
|
123
|
+
"duration": {{@ parse(it.root?.answer?.metadata?.duration) /}},
|
124
|
+
"startOffset": {{@ parse(it.root?.answer?.settings?.startOffset) /}},
|
125
|
+
"endOffset": {{@ parse(it.root?.answer?.settings?.endOffset) /}}
|
126
|
+
}`}],root:"{{ it.questions?.items | stringify }}"},{scenes:[{layout:"basic",data:`{
|
127
|
+
"id": "{{ it.root?.answer?.id }}-outro",
|
128
|
+
"mp4": {{@ parse(it.root?.answer?.media?.video) /}},
|
129
|
+
"input": {{@ parse(it.root?.answer?.media?.input) /}},
|
130
|
+
"playlist": {{@ parse(it.root?.answer?.media?.playlist) /}},
|
131
|
+
"poster": {{@ parse(it.root?.answer?.media?.preview) /}},
|
132
|
+
"captions": {{@ parse(it.root?.answer?.captions?.current) /}},
|
133
|
+
"duration": {{@ parse(it.root?.answer?.metadata?.duration) /}},
|
134
|
+
"startOffset": {{@ parse(it.root?.answer?.settings?.startOffset) /}},
|
135
|
+
"endOffset": {{@ parse(it.root?.answer?.settings?.endOffset) /}}
|
136
|
+
}`}],root:"{{ it.outro?.questions?.items | stringify }}"}]},meta:{frameRate:30,resolution:720,transitionDuration:1/3}};async function lu(){if(typeof window>"u"){const r=await Promise.resolve().then(()=>_c);return new r.Image}return new Image}const Io=ko(async function(r){return r?new Promise((t,e)=>{lu().then(i=>{i.onload=()=>{t(i)},i.onerror=s=>{e(s)},i.src=r})}):null});async function Jr({element:r},t,e){var i,s,n;let a={...r};const{node:o}=r;if((o==null?void 0:o.type)==="video"&&((i=o==null?void 0:o.value)!=null&&i.src||(s=o==null?void 0:o.value)!=null&&s.playlist)){const l=await t(o.value);let h;try{h=await Io(o.value.poster)}catch{h=null}a={...a,node:{...o,video:l,poster:h,meta:await e(o.value,l.node)}}}if((o==null?void 0:o.type)==="image"&&o.value){let l;try{l=await Io(o.value)}catch{l=null}a={...a,node:{...o,image:l}}}return a.node&&(n=r.node)!=null&&n.elements&&(a.node.elements=await Promise.all(r.node.elements.map(l=>Jr({element:l},t,e)))),r.elements&&(a.elements=await Promise.all(r.elements.map(l=>Jr({element:l},t,e)))),a}async function Do(){if(typeof window>"u"){const r=await Promise.resolve().then(()=>_c),t=new r.Canvas;return t.gpu=!1,t}return document.createElement("canvas")}async function hu(r){var t;try{if((t=await Bd(r,{method:"HEAD"}))!=null&&t.ok)return r}catch{return}}async function cu({sources:r}){let t=null;if(r){const e=r.filter(Boolean).map(i=>hu(i));t=(await Promise.all(e)).find(Boolean)}return t}ei.filters.define("stringify",r=>JSON.stringify(r)),ei.filters.define("nullify",r=>typeof r>"u"?null:r),ei.filters.define("filter",(r,t)=>{if(!t)return r;if(!Array.isArray(r))throw new Error("Data for filter must be an array");return r.filter((e,i)=>t.includes(i))}),ei.helpers.define("parse",r=>{const t=r.params[0];return typeof t=="string"?`"${t.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}"`:typeof t>"u"?null:t}),ei.helpers.define("resolve-source",ko(async r=>{const{sources:t}=r.params[0]??{},e=t==null?void 0:t.filter(Boolean),i=e==null?void 0:e.find(a=>a.includes("blob:")),s=e==null?void 0:e.find(a=>!a.includes("http")),n=i??s??await cu({sources:t});return n?`"${n}"`:"null"},{cacheKey:([r])=>JSON.stringify(r.params[0]??{})}));const Ks=(r,t,e)=>ei.render(r,t,ei.getConfig({autoEscape:!1,defaultFilter:"nullify",async:!0,asyncHelpers:["resolve-source"],...e}));function tn(r=[]){var t;for(const e of r)return((t=e==null?void 0:e.node)==null?void 0:t.type)==="video"?e.node:tn(e==null?void 0:e.elements)}async function Co({data:r,template:t,burnCaptions:e=!1},i,s){var n,a,o;const l=t??ou,h=(await Promise.all(l.template.content.map(async({scenes:p,root:g})=>{const v={...l.options,...r,intro:l.intro,outro:l.outro};async function E(A){return Promise.all(p.map(async({layout:L,duration:y,data:S,options:R})=>{var D,M,C;const I=S?JSON.parse(await Ks(S,{...v,root:A})):{},G=R?JSON.parse(await Ks(R,v)):{},F=(D=l.template.layouts.find(P=>P.name===L))==null?void 0:D.tree,V=JSON.parse(await Ks(F,{...I,...G})),q=await Promise.all(V.flatMap(P=>Jr({element:P},i,s))),w=tn(q);return{duration:y??((M=w==null?void 0:w.meta)==null?void 0:M.duration)??0,captions:(C=w==null?void 0:w.meta)==null?void 0:C.captions,elements:q}}))}if(g){const A=JSON.parse(await Ks(g,v));return Array.isArray(A)?(await Promise.all(A.map(async L=>E(L)))).flatMap(L=>L):E(A)}return E(r)}))).flatMap(p=>p).filter(p=>p.duration>0),c=((n=l.meta)==null?void 0:n.frameRate)??30,d=((a=l.meta)==null?void 0:a.resolution)??720,u=((o=l.meta)==null?void 0:o.transitionDuration)??1/3,f=await Promise.all(h.map(async({duration:p,captions:g,elements:v},E)=>{var A,L;const y=await Do(),S=await Do(),R=tn(v),D=h.reduce((M,C,I)=>(I<E&&(M+=C.duration-u/2),M),0);return{draw:({canvas:M,currentTime:C})=>{const I=Math.max(0,C-D);Zr({canvas:M,elements:v,currentTime:C,relativeTime:I,offscreenCanvas:y}),g&&e&&Yd({canvas:M,dx:0,dy:0,dw:M.width,dh:M.height,vttCaptions:g,relativeTime:I+((R==null?void 0:R.meta.start)??0)})},duration:p,transitionCanvas:S,start:D,video:R==null?void 0:R.video,videoMeta:R==null?void 0:R.meta,audio:{duration:p,src:(A=R==null?void 0:R.value)==null?void 0:A.src,start:(L=R==null?void 0:R.meta)==null?void 0:L.start}}}));return{scenes:f,frameRate:c,resolution:d,transitionDuration:u,fonts:l.template.fonts??[],duration:Math.max(0,...f.map(({start:p,duration:g})=>p+g))}}/**
|
108
137
|
* @license
|
109
138
|
* Copyright 2017 Google LLC
|
110
139
|
* SPDX-License-Identifier: BSD-3-Clause
|
111
|
-
*/const
|
140
|
+
*/const Ji={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ts=r=>(...t)=>({_$litDirective$:r,values:t});class js{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
112
141
|
* @license
|
113
142
|
* Copyright 2018 Google LLC
|
114
143
|
* SPDX-License-Identifier: BSD-3-Clause
|
115
|
-
*/const
|
144
|
+
*/const wt=ts(class extends js{constructor(r){var t;if(super(r),r.type!==Ji.ATTRIBUTE||r.name!=="class"||((t=r.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){var e,i;if(this.it===void 0){this.it=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!(!((e=this.nt)===null||e===void 0)&&e.has(n))&&this.it.add(n);return this.render(t)}const s=r.element.classList;this.it.forEach(n=>{n in t||(s.remove(n),this.it.delete(n))});for(const n in t){const a=!!t[n];a===this.it.has(n)||!((i=this.nt)===null||i===void 0)&&i.has(n)||(a?(s.add(n),this.it.add(n)):(s.remove(n),this.it.delete(n)))}return Ee}});/**
|
116
145
|
* @license
|
117
146
|
* Copyright 2018 Google LLC
|
118
147
|
* SPDX-License-Identifier: BSD-3-Clause
|
119
|
-
*/const
|
148
|
+
*/const es=r=>r??It;/**
|
120
149
|
* @license
|
121
150
|
* Copyright 2020 Google LLC
|
122
151
|
* SPDX-License-Identifier: BSD-3-Clause
|
123
|
-
*/const{I:
|
152
|
+
*/const{I:du}=Yc,uu=r=>r.strings===void 0,xo=()=>document.createComment(""),is=(r,t,e)=>{var i;const s=r._$AA.parentNode,n=t===void 0?r._$AB:t._$AA;if(e===void 0){const a=s.insertBefore(xo(),n),o=s.insertBefore(xo(),n);e=new du(a,o,r,r.options)}else{const a=e._$AB.nextSibling,o=e._$AM,l=o!==r;if(l){let h;(i=e._$AQ)===null||i===void 0||i.call(e,r),e._$AM=r,e._$AP!==void 0&&(h=r._$AU)!==o._$AU&&e._$AP(h)}if(a!==n||l){let h=e._$AA;for(;h!==a;){const c=h.nextSibling;s.insertBefore(h,n),h=c}}}return e},ii=(r,t,e=r)=>(r._$AI(t,e),r),fu={},pu=(r,t=fu)=>r._$AH=t,gu=r=>r._$AH,en=r=>{var t;(t=r._$AP)===null||t===void 0||t.call(r,!1,!0);let e=r._$AA;const i=r._$AB.nextSibling;for(;e!==i;){const s=e.nextSibling;e.remove(),e=s}};/**
|
124
153
|
* @license
|
125
154
|
* Copyright 2017 Google LLC
|
126
155
|
* SPDX-License-Identifier: BSD-3-Clause
|
127
|
-
*/const
|
156
|
+
*/const ss=(r,t)=>{var e,i;const s=r._$AN;if(s===void 0)return!1;for(const n of s)(i=(e=n)._$AO)===null||i===void 0||i.call(e,t,!1),ss(n,t);return!0},Ws=r=>{let t,e;do{if((t=r._$AM)===void 0)break;e=t._$AN,e.delete(r),r=t}while((e==null?void 0:e.size)===0)},Po=r=>{for(let t;t=r._$AM;r=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(r))break;e.add(r),yu(t)}};function mu(r){this._$AN!==void 0?(Ws(this),this._$AM=r,Po(this)):this._$AM=r}function vu(r,t=!1,e=0){const i=this._$AH,s=this._$AN;if(s!==void 0&&s.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)ss(i[n],!1),Ws(i[n]);else i!=null&&(ss(i,!1),Ws(i));else ss(this,r)}const yu=r=>{var t,e,i,s;r.type==Ji.CHILD&&((t=(i=r)._$AP)!==null&&t!==void 0||(i._$AP=vu),(e=(s=r)._$AQ)!==null&&e!==void 0||(s._$AQ=mu))};let Oo=class extends js{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),Po(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,s;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)===null||i===void 0||i.call(this):(s=this.disconnected)===null||s===void 0||s.call(this)),e&&(ss(this,t),Ws(this))}setValue(t){if(uu(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};/**
|
128
157
|
* @license
|
129
158
|
* Copyright 2020 Google LLC
|
130
159
|
* SPDX-License-Identifier: BSD-3-Clause
|
131
|
-
*/const
|
160
|
+
*/const be=()=>new Eu;class Eu{}const sn=new WeakMap,Te=ts(class extends Oo{render(r){return It}update(r,[t]){var e;const i=t!==this.G;return i&&this.G!==void 0&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.G=t,this.ct=(e=r.options)===null||e===void 0?void 0:e.host,this.ot(this.lt=r.element)),It}ot(r){var t;if(typeof this.G=="function"){const e=(t=this.ct)!==null&&t!==void 0?t:globalThis;let i=sn.get(e);i===void 0&&(i=new WeakMap,sn.set(e,i)),i.get(this.G)!==void 0&&this.G.call(this.ct,void 0),i.set(this.G,r),r!==void 0&&this.G.call(this.ct,r)}else this.G.value=r}get rt(){var r,t,e;return typeof this.G=="function"?(t=sn.get((r=this.ct)!==null&&r!==void 0?r:globalThis))===null||t===void 0?void 0:t.get(this.G):(e=this.G)===null||e===void 0?void 0:e.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});var bu=rs;rs.flatten=rs,rs.unflatten=Fo;function $o(r){return r&&r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Mo(r){return r}function rs(r,t){t=t||{};const e=t.delimiter||".",i=t.maxDepth,s=t.transformKey||Mo,n={};function a(o,l,h){h=h||1,Object.keys(o).forEach(function(c){const d=o[c],u=t.safe&&Array.isArray(d),f=Object.prototype.toString.call(d),p=$o(d),g=f==="[object Object]"||f==="[object Array]",v=l?l+e+s(c):s(c);if(!u&&!p&&g&&Object.keys(d).length&&(!t.maxDepth||h<i))return a(d,v,h+1);n[v]=d})}return a(r),n}function Fo(r,t){t=t||{};const e=t.delimiter||".",i=t.overwrite||!1,s=t.transformKey||Mo,n={};if($o(r)||Object.prototype.toString.call(r)!=="[object Object]")return r;function o(c){const d=Number(c);return isNaN(d)||c.indexOf(".")!==-1||t.object?c:d}function l(c,d,u){return Object.keys(u).reduce(function(f,p){return f[c+e+p]=u[p],f},d)}function h(c){const d=Object.prototype.toString.call(c),u=d==="[object Array]",f=d==="[object Object]";if(c){if(u)return!c.length;if(f)return!Object.keys(c).length}else return!0}return r=Object.keys(r).reduce(function(c,d){const u=Object.prototype.toString.call(r[d]);return!(u==="[object Object]"||u==="[object Array]")||h(r[d])?(c[d]=r[d],c):l(d,c,rs(r[d],t))},{}),Object.keys(r).forEach(function(c){const d=c.split(e).map(s);let u=o(d.shift()),f=o(d[0]),p=n;for(;f!==void 0;){if(u==="__proto__")return;const g=Object.prototype.toString.call(p[u]),v=g==="[object Object]"||g==="[object Array]";if(!i&&!v&&typeof p[u]<"u")return;(i&&!v||!i&&p[u]==null)&&(p[u]=typeof f=="number"&&!t.object?[]:{}),p=p[u],d.length>0&&(u=o(d.shift()),f=o(d[0]))}p[u]=Fo(r[c],t)}),n}const Tu=zr(bu);/**
|
132
161
|
* @license
|
133
162
|
* Copyright 2017 Google LLC
|
134
163
|
* SPDX-License-Identifier: BSD-3-Clause
|
135
|
-
*/const Qc=(r,e,t)=>{const i=new Map;for(let s=e;s<=t;s++)i.set(r[s],s);return i},_c=wi(class extends cs{constructor(r){if(super(r),r.type!==Si.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,e,t){let i;t===void 0?t=e:e!==void 0&&(i=e);const s=[],n=[];let a=0;for(const o of r)s[a]=i?i(o,a):a,n[a]=t(o,a),a++;return{values:n,keys:s}}render(r,e,t){return this.dt(r,e,t).values}update(r,[e,t,i]){var s;const n=lm(r),{values:a,keys:o}=this.dt(e,t,i);if(!Array.isArray(n))return this.ht=o,a;const l=(s=this.ht)!==null&&s!==void 0?s:this.ht=[],c=[];let h,d,u=0,f=n.length-1,p=0,m=a.length-1;for(;u<=f&&p<=m;)if(n[u]===null)u++;else if(n[f]===null)f--;else if(l[u]===o[p])c[p]=si(n[u],a[p]),u++,p++;else if(l[f]===o[m])c[m]=si(n[f],a[m]),f--,m--;else if(l[u]===o[m])c[m]=si(n[u],a[m]),ds(r,c[m+1],n[u]),u++,m--;else if(l[f]===o[p])c[p]=si(n[f],a[p]),ds(r,n[u],n[f]),f--,p++;else if(h===void 0&&(h=Qc(o,p,m),d=Qc(l,u,f)),h.has(l[u]))if(h.has(l[f])){const g=d.get(o[p]),x=g!==void 0?n[g]:null;if(x===null){const b=ds(r,n[u]);si(b,a[p]),c[p]=b}else c[p]=si(x,a[p]),ds(r,n[u],x),n[g]=null;p++}else da(n[f]),f--;else da(n[u]),u++;for(;p<=m;){const g=ds(r,c[m+1]);si(g,a[p]),c[p++]=g}for(;u<=f;){const g=n[u++];g!==null&&da(g)}return this.ht=o,om(r,c),rt}});var We="top",et="bottom",tt="right",Ye="left",fa="auto",ps=[We,et,tt,Ye],Li="start",ms="end",gm="clippingParents",$c="viewport",gs="popper",vm="reference",eh=ps.reduce(function(r,e){return r.concat([e+"-"+Li,e+"-"+ms])},[]),th=[].concat(ps,[fa]).reduce(function(r,e){return r.concat([e,e+"-"+Li,e+"-"+ms])},[]),ym="beforeRead",xm="read",Am="afterRead",bm="beforeMain",Tm="main",Em="afterMain",Sm="beforeWrite",wm="write",Lm="afterWrite",Rm=[ym,xm,Am,bm,Tm,Em,Sm,wm,Lm];function mt(r){return r?(r.nodeName||"").toLowerCase():null}function Je(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function ri(r){var e=Je(r).Element;return r instanceof e||r instanceof Element}function it(r){var e=Je(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function pa(r){if(typeof ShadowRoot>"u")return!1;var e=Je(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function Cm(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},s=e.attributes[t]||{},n=e.elements[t];!it(n)||!mt(n)||(Object.assign(n.style,i),Object.keys(s).forEach(function(a){var o=s[a];o===!1?n.removeAttribute(a):n.setAttribute(a,o===!0?"":o)}))})}function Im(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],n=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(l,c){return l[c]="",l},{});!it(s)||!mt(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){s.removeAttribute(l)}))})}}const ih={name:"applyStyles",enabled:!0,phase:"write",fn:Cm,effect:Im,requires:["computeStyles"]};function gt(r){return r.split("-")[0]}var ni=Math.max,mr=Math.min,Ri=Math.round;function ma(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function sh(){return!/^((?!chrome|android).)*safari/i.test(ma())}function Ci(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=r.getBoundingClientRect(),s=1,n=1;e&&it(r)&&(s=r.offsetWidth>0&&Ri(i.width)/r.offsetWidth||1,n=r.offsetHeight>0&&Ri(i.height)/r.offsetHeight||1);var a=ri(r)?Je(r):window,o=a.visualViewport,l=!sh()&&t,c=(i.left+(l&&o?o.offsetLeft:0))/s,h=(i.top+(l&&o?o.offsetTop:0))/n,d=i.width/s,u=i.height/n;return{width:d,height:u,top:h,right:c+d,bottom:h+u,left:c,x:c,y:h}}function ga(r){var e=Ci(r),t=r.offsetWidth,i=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:i}}function rh(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&pa(t)){var i=e;do{if(i&&r.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function It(r){return Je(r).getComputedStyle(r)}function Dm(r){return["table","td","th"].indexOf(mt(r))>=0}function Ut(r){return((ri(r)?r.ownerDocument:r.document)||window.document).documentElement}function gr(r){return mt(r)==="html"?r:r.assignedSlot||r.parentNode||(pa(r)?r.host:null)||Ut(r)}function nh(r){return!it(r)||It(r).position==="fixed"?null:r.offsetParent}function Pm(r){var e=/firefox/i.test(ma()),t=/Trident/i.test(ma());if(t&&it(r)){var i=It(r);if(i.position==="fixed")return null}var s=gr(r);for(pa(s)&&(s=s.host);it(s)&&["html","body"].indexOf(mt(s))<0;){var n=It(s);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||e&&n.willChange==="filter"||e&&n.filter&&n.filter!=="none")return s;s=s.parentNode}return null}function vs(r){for(var e=Je(r),t=nh(r);t&&Dm(t)&&It(t).position==="static";)t=nh(t);return t&&(mt(t)==="html"||mt(t)==="body"&&It(t).position==="static")?e:t||Pm(r)||e}function va(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function ys(r,e,t){return ni(r,mr(e,t))}function km(r,e,t){var i=ys(r,e,t);return i>t?t:i}function ah(){return{top:0,right:0,bottom:0,left:0}}function oh(r){return Object.assign({},ah(),r)}function lh(r,e){return e.reduce(function(t,i){return t[i]=r,t},{})}var Om=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,oh(typeof e!="number"?e:lh(e,ps))};function Mm(r){var e,t=r.state,i=r.name,s=r.options,n=t.elements.arrow,a=t.modifiersData.popperOffsets,o=gt(t.placement),l=va(o),c=[Ye,tt].indexOf(o)>=0,h=c?"height":"width";if(!(!n||!a)){var d=Om(s.padding,t),u=ga(n),f=l==="y"?We:Ye,p=l==="y"?et:tt,m=t.rects.reference[h]+t.rects.reference[l]-a[l]-t.rects.popper[h],g=a[l]-t.rects.reference[l],x=vs(n),b=x?l==="y"?x.clientHeight||0:x.clientWidth||0:0,A=m/2-g/2,y=d[f],T=b-u[h]-d[p],w=b/2-u[h]/2+A,L=ys(y,w,T),I=l;t.modifiersData[i]=(e={},e[I]=L,e.centerOffset=L-w,e)}}function Fm(r){var e=r.state,t=r.options,i=t.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||rh(e.elements.popper,s)&&(e.elements.arrow=s))}const Nm={name:"arrow",enabled:!0,phase:"main",fn:Mm,effect:Fm,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ii(r){return r.split("-")[1]}var Um={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bm(r,e){var t=r.x,i=r.y,s=e.devicePixelRatio||1;return{x:Ri(t*s)/s||0,y:Ri(i*s)/s||0}}function ch(r){var e,t=r.popper,i=r.popperRect,s=r.placement,n=r.variation,a=r.offsets,o=r.position,l=r.gpuAcceleration,c=r.adaptive,h=r.roundOffsets,d=r.isFixed,u=a.x,f=u===void 0?0:u,p=a.y,m=p===void 0?0:p,g=typeof h=="function"?h({x:f,y:m}):{x:f,y:m};f=g.x,m=g.y;var x=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),A=Ye,y=We,T=window;if(c){var w=vs(t),L="clientHeight",I="clientWidth";if(w===Je(t)&&(w=Ut(t),It(w).position!=="static"&&o==="absolute"&&(L="scrollHeight",I="scrollWidth")),w=w,s===We||(s===Ye||s===tt)&&n===ms){y=et;var R=d&&w===T&&T.visualViewport?T.visualViewport.height:w[L];m-=R-i.height,m*=l?1:-1}if(s===Ye||(s===We||s===et)&&n===ms){A=tt;var E=d&&w===T&&T.visualViewport?T.visualViewport.width:w[I];f-=E-i.width,f*=l?1:-1}}var M=Object.assign({position:o},c&&Um),k=h===!0?Bm({x:f,y:m},Je(t)):{x:f,y:m};if(f=k.x,m=k.y,l){var U;return Object.assign({},M,(U={},U[y]=b?"0":"",U[A]=x?"0":"",U.transform=(T.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",U))}return Object.assign({},M,(e={},e[y]=b?m+"px":"",e[A]=x?f+"px":"",e.transform="",e))}function Hm(r){var e=r.state,t=r.options,i=t.gpuAcceleration,s=i===void 0?!0:i,n=t.adaptive,a=n===void 0?!0:n,o=t.roundOffsets,l=o===void 0?!0:o,c={placement:gt(e.placement),variation:Ii(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,ch(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,ch(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Gm={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hm,data:{}};var vr={passive:!0};function Vm(r){var e=r.state,t=r.instance,i=r.options,s=i.scroll,n=s===void 0?!0:s,a=i.resize,o=a===void 0?!0:a,l=Je(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return n&&c.forEach(function(h){h.addEventListener("scroll",t.update,vr)}),o&&l.addEventListener("resize",t.update,vr),function(){n&&c.forEach(function(h){h.removeEventListener("scroll",t.update,vr)}),o&&l.removeEventListener("resize",t.update,vr)}}const jm={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vm,data:{}};var zm={left:"right",right:"left",bottom:"top",top:"bottom"};function yr(r){return r.replace(/left|right|bottom|top/g,function(e){return zm[e]})}var Km={start:"end",end:"start"};function hh(r){return r.replace(/start|end/g,function(e){return Km[e]})}function ya(r){var e=Je(r),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function xa(r){return Ci(Ut(r)).left+ya(r).scrollLeft}function Wm(r,e){var t=Je(r),i=Ut(r),s=t.visualViewport,n=i.clientWidth,a=i.clientHeight,o=0,l=0;if(s){n=s.width,a=s.height;var c=sh();(c||!c&&e==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}return{width:n,height:a,x:o+xa(r),y:l}}function Ym(r){var e,t=Ut(r),i=ya(r),s=(e=r.ownerDocument)==null?void 0:e.body,n=ni(t.scrollWidth,t.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=ni(t.scrollHeight,t.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),o=-i.scrollLeft+xa(r),l=-i.scrollTop;return It(s||t).direction==="rtl"&&(o+=ni(t.clientWidth,s?s.clientWidth:0)-n),{width:n,height:a,x:o,y:l}}function Aa(r){var e=It(r),t=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+s+i)}function dh(r){return["html","body","#document"].indexOf(mt(r))>=0?r.ownerDocument.body:it(r)&&Aa(r)?r:dh(gr(r))}function xs(r,e){var t;e===void 0&&(e=[]);var i=dh(r),s=i===((t=r.ownerDocument)==null?void 0:t.body),n=Je(i),a=s?[n].concat(n.visualViewport||[],Aa(i)?i:[]):i,o=e.concat(a);return s?o:o.concat(xs(gr(a)))}function ba(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function Xm(r,e){var t=Ci(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function uh(r,e,t){return e===$c?ba(Wm(r,t)):ri(e)?Xm(e,t):ba(Ym(Ut(r)))}function qm(r){var e=xs(gr(r)),t=["absolute","fixed"].indexOf(It(r).position)>=0,i=t&&it(r)?vs(r):r;return ri(i)?e.filter(function(s){return ri(s)&&rh(s,i)&&mt(s)!=="body"}):[]}function Zm(r,e,t,i){var s=e==="clippingParents"?qm(r):[].concat(e),n=[].concat(s,[t]),a=n[0],o=n.reduce(function(l,c){var h=uh(r,c,i);return l.top=ni(h.top,l.top),l.right=mr(h.right,l.right),l.bottom=mr(h.bottom,l.bottom),l.left=ni(h.left,l.left),l},uh(r,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function fh(r){var e=r.reference,t=r.element,i=r.placement,s=i?gt(i):null,n=i?Ii(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(s){case We:l={x:a,y:e.y-t.height};break;case et:l={x:a,y:e.y+e.height};break;case tt:l={x:e.x+e.width,y:o};break;case Ye:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var c=s?va(s):null;if(c!=null){var h=c==="y"?"height":"width";switch(n){case Li:l[c]=l[c]-(e[h]/2-t[h]/2);break;case ms:l[c]=l[c]+(e[h]/2-t[h]/2);break}}return l}function As(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=i===void 0?r.placement:i,n=t.strategy,a=n===void 0?r.strategy:n,o=t.boundary,l=o===void 0?gm:o,c=t.rootBoundary,h=c===void 0?$c:c,d=t.elementContext,u=d===void 0?gs:d,f=t.altBoundary,p=f===void 0?!1:f,m=t.padding,g=m===void 0?0:m,x=oh(typeof g!="number"?g:lh(g,ps)),b=u===gs?vm:gs,A=r.rects.popper,y=r.elements[p?b:u],T=Zm(ri(y)?y:y.contextElement||Ut(r.elements.popper),l,h,a),w=Ci(r.elements.reference),L=fh({reference:w,element:A,strategy:"absolute",placement:s}),I=ba(Object.assign({},A,L)),R=u===gs?I:w,E={top:T.top-R.top+x.top,bottom:R.bottom-T.bottom+x.bottom,left:T.left-R.left+x.left,right:R.right-T.right+x.right},M=r.modifiersData.offset;if(u===gs&&M){var k=M[s];Object.keys(E).forEach(function(U){var Y=[tt,et].indexOf(U)>=0?1:-1,V=[We,et].indexOf(U)>=0?"y":"x";E[U]+=k[V]*Y})}return E}function Jm(r,e){e===void 0&&(e={});var t=e,i=t.placement,s=t.boundary,n=t.rootBoundary,a=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?th:l,h=Ii(i),d=h?o?eh:eh.filter(function(p){return Ii(p)===h}):ps,u=d.filter(function(p){return c.indexOf(p)>=0});u.length===0&&(u=d);var f=u.reduce(function(p,m){return p[m]=As(r,{placement:m,boundary:s,rootBoundary:n,padding:a})[gt(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function Qm(r){if(gt(r)===fa)return[];var e=yr(r);return[hh(r),e,hh(e)]}function _m(r){var e=r.state,t=r.options,i=r.name;if(!e.modifiersData[i]._skip){for(var s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!0:a,l=t.fallbackPlacements,c=t.padding,h=t.boundary,d=t.rootBoundary,u=t.altBoundary,f=t.flipVariations,p=f===void 0?!0:f,m=t.allowedAutoPlacements,g=e.options.placement,x=gt(g),b=x===g,A=l||(b||!p?[yr(g)]:Qm(g)),y=[g].concat(A).reduce(function(oe,$){return oe.concat(gt($)===fa?Jm(e,{placement:$,boundary:h,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):$)},[]),T=e.rects.reference,w=e.rects.popper,L=new Map,I=!0,R=y[0],E=0;E<y.length;E++){var M=y[E],k=gt(M),U=Ii(M)===Li,Y=[We,et].indexOf(k)>=0,V=Y?"width":"height",B=As(e,{placement:M,boundary:h,rootBoundary:d,altBoundary:u,padding:c}),z=Y?U?tt:Ye:U?et:We;T[V]>w[V]&&(z=yr(z));var F=yr(z),H=[];if(n&&H.push(B[k]<=0),o&&H.push(B[z]<=0,B[F]<=0),H.every(function(oe){return oe})){R=M,I=!1;break}L.set(M,H)}if(I)for(var J=p?3:1,_=function($){var he=y.find(function(ye){var Ae=L.get(ye);if(Ae)return Ae.slice(0,$).every(function(bt){return bt})});if(he)return R=he,"break"},X=J;X>0;X--){var ee=_(X);if(ee==="break")break}e.placement!==R&&(e.modifiersData[i]._skip=!0,e.placement=R,e.reset=!0)}}const $m={name:"flip",enabled:!0,phase:"main",fn:_m,requiresIfExists:["offset"],data:{_skip:!1}};function ph(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function mh(r){return[We,tt,et,Ye].some(function(e){return r[e]>=0})}function eg(r){var e=r.state,t=r.name,i=e.rects.reference,s=e.rects.popper,n=e.modifiersData.preventOverflow,a=As(e,{elementContext:"reference"}),o=As(e,{altBoundary:!0}),l=ph(a,i),c=ph(o,s,n),h=mh(l),d=mh(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":d})}const tg={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:eg};function ig(r,e,t){var i=gt(r),s=[Ye,We].indexOf(i)>=0?-1:1,n=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,a=n[0],o=n[1];return a=a||0,o=(o||0)*s,[Ye,tt].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function sg(r){var e=r.state,t=r.options,i=r.name,s=t.offset,n=s===void 0?[0,0]:s,a=th.reduce(function(h,d){return h[d]=ig(d,e.rects,n),h},{}),o=a[e.placement],l=o.x,c=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=a}const rg={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:sg};function ng(r){var e=r.state,t=r.name;e.modifiersData[t]=fh({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const ag={name:"popperOffsets",enabled:!0,phase:"read",fn:ng,data:{}};function og(r){return r==="x"?"y":"x"}function lg(r){var e=r.state,t=r.options,i=r.name,s=t.mainAxis,n=s===void 0?!0:s,a=t.altAxis,o=a===void 0?!1:a,l=t.boundary,c=t.rootBoundary,h=t.altBoundary,d=t.padding,u=t.tether,f=u===void 0?!0:u,p=t.tetherOffset,m=p===void 0?0:p,g=As(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:h}),x=gt(e.placement),b=Ii(e.placement),A=!b,y=va(x),T=og(y),w=e.modifiersData.popperOffsets,L=e.rects.reference,I=e.rects.popper,R=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,E=typeof R=="number"?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),M=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(w){if(n){var U,Y=y==="y"?We:Ye,V=y==="y"?et:tt,B=y==="y"?"height":"width",z=w[y],F=z+g[Y],H=z-g[V],J=f?-I[B]/2:0,_=b===Li?L[B]:I[B],X=b===Li?-I[B]:-L[B],ee=e.elements.arrow,oe=f&&ee?ga(ee):{width:0,height:0},$=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ah(),he=$[Y],ye=$[V],Ae=ys(0,L[B],oe[B]),bt=A?L[B]/2-J-Ae-he-E.mainAxis:_-Ae-he-E.mainAxis,be=A?-L[B]/2+J+Ae+ye+E.mainAxis:X+Ae+ye+E.mainAxis,jt=e.elements.arrow&&vs(e.elements.arrow),Ni=jt?y==="y"?jt.clientTop||0:jt.clientLeft||0:0,zt=(U=M==null?void 0:M[y])!=null?U:0,ci=z+bt-zt-Ni,Te=z+be-zt,xe=ys(f?mr(F,ci):F,z,f?ni(H,Te):H);w[y]=xe,k[y]=xe-z}if(o){var qe,pe=y==="x"?We:Ye,Ee=y==="x"?et:tt,Me=w[T],Ze=T==="y"?"height":"width",ws=Me+g[pe],hi=Me-g[Ee],Ls=[We,Ye].indexOf(x)!==-1,Cr=(qe=M==null?void 0:M[T])!=null?qe:0,Ir=Ls?ws:Me-L[Ze]-I[Ze]-Cr+E.altAxis,Dr=Ls?Me+L[Ze]+I[Ze]-Cr-E.altAxis:hi,Pr=f&&Ls?km(Ir,Me,Dr):ys(f?Ir:ws,Me,f?Dr:hi);w[T]=Pr,k[T]=Pr-Me}e.modifiersData[i]=k}}const cg={name:"preventOverflow",enabled:!0,phase:"main",fn:lg,requiresIfExists:["offset"]};function hg(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function dg(r){return r===Je(r)||!it(r)?ya(r):hg(r)}function ug(r){var e=r.getBoundingClientRect(),t=Ri(e.width)/r.offsetWidth||1,i=Ri(e.height)/r.offsetHeight||1;return t!==1||i!==1}function fg(r,e,t){t===void 0&&(t=!1);var i=it(e),s=it(e)&&ug(e),n=Ut(e),a=Ci(r,s,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((mt(e)!=="body"||Aa(n))&&(o=dg(e)),it(e)?(l=Ci(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):n&&(l.x=xa(n))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function pg(r){var e=new Map,t=new Set,i=[];r.forEach(function(n){e.set(n.name,n)});function s(n){t.add(n.name);var a=[].concat(n.requires||[],n.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&s(l)}}),i.push(n)}return r.forEach(function(n){t.has(n.name)||s(n)}),i}function mg(r){var e=pg(r);return Rm.reduce(function(t,i){return t.concat(e.filter(function(s){return s.phase===i}))},[])}function gg(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function vg(r){var e=r.reduce(function(t,i){var s=t[i.name];return t[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var gh={placement:"bottom",modifiers:[],strategy:"absolute"};function vh(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function yg(r){r===void 0&&(r={});var e=r,t=e.defaultModifiers,i=t===void 0?[]:t,s=e.defaultOptions,n=s===void 0?gh:s;return function(o,l,c){c===void 0&&(c=n);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},gh,n),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},d=[],u=!1,f={state:h,setOptions:function(x){var b=typeof x=="function"?x(h.options):x;m(),h.options=Object.assign({},n,h.options,b),h.scrollParents={reference:ri(o)?xs(o):o.contextElement?xs(o.contextElement):[],popper:xs(l)};var A=mg(vg([].concat(i,h.options.modifiers)));return h.orderedModifiers=A.filter(function(y){return y.enabled}),p(),f.update()},forceUpdate:function(){if(!u){var x=h.elements,b=x.reference,A=x.popper;if(vh(b,A)){h.rects={reference:fg(b,vs(A),h.options.strategy==="fixed"),popper:ga(A)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(E){return h.modifiersData[E.name]=Object.assign({},E.data)});for(var y=0;y<h.orderedModifiers.length;y++){if(h.reset===!0){h.reset=!1,y=-1;continue}var T=h.orderedModifiers[y],w=T.fn,L=T.options,I=L===void 0?{}:L,R=T.name;typeof w=="function"&&(h=w({state:h,options:I,name:R,instance:f})||h)}}}},update:gg(function(){return new Promise(function(g){f.forceUpdate(),g(h)})}),destroy:function(){m(),u=!0}};if(!vh(o,l))return f;f.setOptions(c).then(function(g){!u&&c.onFirstUpdate&&c.onFirstUpdate(g)});function p(){h.orderedModifiers.forEach(function(g){var x=g.name,b=g.options,A=b===void 0?{}:b,y=g.effect;if(typeof y=="function"){var T=y({state:h,name:x,instance:f,options:A}),w=function(){};d.push(T||w)}})}function m(){d.forEach(function(g){return g()}),d=[]}return f}}var xg=[jm,ag,Gm,ih,rg,$m,cg,Nm,tg],Ag=yg({defaultModifiers:xg}),bg="tippy-box",yh="tippy-content",Tg="tippy-backdrop",xh="tippy-arrow",Ah="tippy-svg-arrow",ai={passive:!0,capture:!0},bh=function(){return document.body};function Ta(r,e,t){if(Array.isArray(r)){var i=r[e];return i??(Array.isArray(t)?t[e]:t)}return r}function Ea(r,e){var t={}.toString.call(r);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function Th(r,e){return typeof r=="function"?r.apply(void 0,e):r}function Eh(r,e){if(e===0)return r;var t;return function(i){clearTimeout(t),t=setTimeout(function(){r(i)},e)}}function Eg(r){return r.split(/\s+/).filter(Boolean)}function Di(r){return[].concat(r)}function Sh(r,e){r.indexOf(e)===-1&&r.push(e)}function Sg(r){return r.filter(function(e,t){return r.indexOf(e)===t})}function wg(r){return r.split("-")[0]}function xr(r){return[].slice.call(r)}function wh(r){return Object.keys(r).reduce(function(e,t){return r[t]!==void 0&&(e[t]=r[t]),e},{})}function bs(){return document.createElement("div")}function Ar(r){return["Element","Fragment"].some(function(e){return Ea(r,e)})}function Lg(r){return Ea(r,"NodeList")}function Rg(r){return Ea(r,"MouseEvent")}function Cg(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function Ig(r){return Ar(r)?[r]:Lg(r)?xr(r):Array.isArray(r)?r:xr(document.querySelectorAll(r))}function Sa(r,e){r.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Lh(r,e){r.forEach(function(t){t&&t.setAttribute("data-state",e)})}function Dg(r){var e,t=Di(r),i=t[0];return i!=null&&(e=i.ownerDocument)!=null&&e.body?i.ownerDocument:document}function Pg(r,e){var t=e.clientX,i=e.clientY;return r.every(function(s){var n=s.popperRect,a=s.popperState,o=s.props,l=o.interactiveBorder,c=wg(a.placement),h=a.modifiersData.offset;if(!h)return!0;var d=c==="bottom"?h.top.y:0,u=c==="top"?h.bottom.y:0,f=c==="right"?h.left.x:0,p=c==="left"?h.right.x:0,m=n.top-i+d>l,g=i-n.bottom-u>l,x=n.left-t+f>l,b=t-n.right-p>l;return m||g||x||b})}function wa(r,e,t){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){r[i](s,t)})}function Rh(r,e){for(var t=e;t;){var i;if(r.contains(t))return!0;t=t.getRootNode==null||(i=t.getRootNode())==null?void 0:i.host}return!1}var vt={isTouch:!1},Ch=0;function kg(){vt.isTouch||(vt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ih))}function Ih(){var r=performance.now();r-Ch<20&&(vt.isTouch=!1,document.removeEventListener("mousemove",Ih)),Ch=r}function Og(){var r=document.activeElement;if(Cg(r)){var e=r._tippy;r.blur&&!e.state.isVisible&&r.blur()}}function Mg(){document.addEventListener("touchstart",kg,ai),window.addEventListener("blur",Og)}var Fg=typeof window<"u"&&typeof document<"u",Ng=Fg?!!window.msCrypto:!1,Ug={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Bg={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ht=Object.assign({appendTo:bh,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ug,Bg),Hg=Object.keys(ht),Gg=function(e){var t=Object.keys(e);t.forEach(function(i){ht[i]=e[i]})};function Dh(r){var e=r.plugins||[],t=e.reduce(function(i,s){var n=s.name,a=s.defaultValue;if(n){var o;i[n]=r[n]!==void 0?r[n]:(o=ht[n])!=null?o:a}return i},{});return Object.assign({},r,t)}function Vg(r,e){var t=e?Object.keys(Dh(Object.assign({},ht,{plugins:e}))):Hg,i=t.reduce(function(s,n){var a=(r.getAttribute("data-tippy-"+n)||"").trim();if(!a)return s;if(n==="content")s[n]=a;else try{s[n]=JSON.parse(a)}catch{s[n]=a}return s},{});return i}function Ph(r,e){var t=Object.assign({},e,{content:Th(e.content,[r])},e.ignoreAttributes?{}:Vg(r,e.plugins));return t.aria=Object.assign({},ht.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var jg=function(){return"innerHTML"};function La(r,e){r[jg()]=e}function kh(r){var e=bs();return r===!0?e.className=xh:(e.className=Ah,Ar(r)?e.appendChild(r):La(e,r)),e}function Oh(r,e){Ar(e.content)?(La(r,""),r.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?La(r,e.content):r.textContent=e.content)}function Ra(r){var e=r.firstElementChild,t=xr(e.children);return{box:e,content:t.find(function(i){return i.classList.contains(yh)}),arrow:t.find(function(i){return i.classList.contains(xh)||i.classList.contains(Ah)}),backdrop:t.find(function(i){return i.classList.contains(Tg)})}}function Mh(r){var e=bs(),t=bs();t.className=bg,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var i=bs();i.className=yh,i.setAttribute("data-state","hidden"),Oh(i,r.props),e.appendChild(t),t.appendChild(i),s(r.props,r.props);function s(n,a){var o=Ra(e),l=o.box,c=o.content,h=o.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(n.content!==a.content||n.allowHTML!==a.allowHTML)&&Oh(c,r.props),a.arrow?h?n.arrow!==a.arrow&&(l.removeChild(h),l.appendChild(kh(a.arrow))):l.appendChild(kh(a.arrow)):h&&l.removeChild(h)}return{popper:e,onUpdate:s}}Mh.$$tippy=!0;var zg=1,br=[],Ca=[];function Kg(r,e){var t=Ph(r,Object.assign({},ht,Dh(wh(e)))),i,s,n,a=!1,o=!1,l=!1,c=!1,h,d,u,f=[],p=Eh(ci,t.interactiveDebounce),m,g=zg++,x=null,b=Sg(t.plugins),A={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:g,reference:r,popper:bs(),popperInstance:x,props:t,state:A,plugins:b,clearDelayTimeouts:Ir,setProps:Dr,setContent:Pr,show:my,hide:gy,hideWithInteractivity:vy,enable:Ls,disable:Cr,unmount:yy,destroy:xy};if(!t.render)return y;var T=t.render(y),w=T.popper,L=T.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+y.id,y.popper=w,r._tippy=y,w._tippy=y;var I=b.map(function(P){return P.fn(y)}),R=r.hasAttribute("aria-expanded");return jt(),J(),z(),F("onCreate",[y]),t.showOnCreate&&ws(),w.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&Y().addEventListener("mousemove",p)}),y;function E(){var P=y.props.touch;return Array.isArray(P)?P:[P,0]}function M(){return E()[0]==="hold"}function k(){var P;return!!((P=y.props.render)!=null&&P.$$tippy)}function U(){return m||r}function Y(){var P=U().parentNode;return P?Dg(P):document}function V(){return Ra(w)}function B(P){return y.state.isMounted&&!y.state.isVisible||vt.isTouch||h&&h.type==="focus"?0:Ta(y.props.delay,P?0:1,ht.delay)}function z(P){P===void 0&&(P=!1),w.style.pointerEvents=y.props.interactive&&!P?"":"none",w.style.zIndex=""+y.props.zIndex}function F(P,G,Z){if(Z===void 0&&(Z=!0),I.forEach(function(ie){ie[P]&&ie[P].apply(ie,G)}),Z){var re;(re=y.props)[P].apply(re,G)}}function H(){var P=y.props.aria;if(P.content){var G="aria-"+P.content,Z=w.id,re=Di(y.props.triggerTarget||r);re.forEach(function(ie){var Ge=ie.getAttribute(G);if(y.state.isVisible)ie.setAttribute(G,Ge?Ge+" "+Z:Z);else{var st=Ge&&Ge.replace(Z,"").trim();st?ie.setAttribute(G,st):ie.removeAttribute(G)}})}}function J(){if(!(R||!y.props.aria.expanded)){var P=Di(y.props.triggerTarget||r);P.forEach(function(G){y.props.interactive?G.setAttribute("aria-expanded",y.state.isVisible&&G===U()?"true":"false"):G.removeAttribute("aria-expanded")})}}function _(){Y().removeEventListener("mousemove",p),br=br.filter(function(P){return P!==p})}function X(P){if(!(vt.isTouch&&(l||P.type==="mousedown"))){var G=P.composedPath&&P.composedPath()[0]||P.target;if(!(y.props.interactive&&Rh(w,G))){if(Di(y.props.triggerTarget||r).some(function(Z){return Rh(Z,G)})){if(vt.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else F("onClickOutside",[y,P]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),o=!0,setTimeout(function(){o=!1}),y.state.isMounted||he())}}}function ee(){l=!0}function oe(){l=!1}function $(){var P=Y();P.addEventListener("mousedown",X,!0),P.addEventListener("touchend",X,ai),P.addEventListener("touchstart",oe,ai),P.addEventListener("touchmove",ee,ai)}function he(){var P=Y();P.removeEventListener("mousedown",X,!0),P.removeEventListener("touchend",X,ai),P.removeEventListener("touchstart",oe,ai),P.removeEventListener("touchmove",ee,ai)}function ye(P,G){bt(P,function(){!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&G()})}function Ae(P,G){bt(P,G)}function bt(P,G){var Z=V().box;function re(ie){ie.target===Z&&(wa(Z,"remove",re),G())}if(P===0)return G();wa(Z,"remove",d),wa(Z,"add",re),d=re}function be(P,G,Z){Z===void 0&&(Z=!1);var re=Di(y.props.triggerTarget||r);re.forEach(function(ie){ie.addEventListener(P,G,Z),f.push({node:ie,eventType:P,handler:G,options:Z})})}function jt(){M()&&(be("touchstart",zt,{passive:!0}),be("touchend",Te,{passive:!0})),Eg(y.props.trigger).forEach(function(P){if(P!=="manual")switch(be(P,zt),P){case"mouseenter":be("mouseleave",Te);break;case"focus":be(Ng?"focusout":"blur",xe);break;case"focusin":be("focusout",xe);break}})}function Ni(){f.forEach(function(P){var G=P.node,Z=P.eventType,re=P.handler,ie=P.options;G.removeEventListener(Z,re,ie)}),f=[]}function zt(P){var G,Z=!1;if(!(!y.state.isEnabled||qe(P)||o)){var re=((G=h)==null?void 0:G.type)==="focus";h=P,m=P.currentTarget,J(),!y.state.isVisible&&Rg(P)&&br.forEach(function(ie){return ie(P)}),P.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||a)&&y.props.hideOnClick!==!1&&y.state.isVisible?Z=!0:ws(P),P.type==="click"&&(a=!Z),Z&&!re&&hi(P)}}function ci(P){var G=P.target,Z=U().contains(G)||w.contains(G);if(!(P.type==="mousemove"&&Z)){var re=Ze().concat(w).map(function(ie){var Ge,st=ie._tippy,Ui=(Ge=st.popperInstance)==null?void 0:Ge.state;return Ui?{popperRect:ie.getBoundingClientRect(),popperState:Ui,props:t}:null}).filter(Boolean);Pg(re,P)&&(_(),hi(P))}}function Te(P){var G=qe(P)||y.props.trigger.indexOf("click")>=0&&a;if(!G){if(y.props.interactive){y.hideWithInteractivity(P);return}hi(P)}}function xe(P){y.props.trigger.indexOf("focusin")<0&&P.target!==U()||y.props.interactive&&P.relatedTarget&&w.contains(P.relatedTarget)||hi(P)}function qe(P){return vt.isTouch?M()!==P.type.indexOf("touch")>=0:!1}function pe(){Ee();var P=y.props,G=P.popperOptions,Z=P.placement,re=P.offset,ie=P.getReferenceClientRect,Ge=P.moveTransition,st=k()?Ra(w).arrow:null,Ui=ie?{getBoundingClientRect:ie,contextElement:ie.contextElement||U()}:r,Zh={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(kr){var Bi=kr.state;if(k()){var Ay=V(),ja=Ay.box;["placement","reference-hidden","escaped"].forEach(function(Or){Or==="placement"?ja.setAttribute("data-placement",Bi.placement):Bi.attributes.popper["data-popper-"+Or]?ja.setAttribute("data-"+Or,""):ja.removeAttribute("data-"+Or)}),Bi.attributes.popper={}}}},di=[{name:"offset",options:{offset:re}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Ge}},Zh];k()&&st&&di.push({name:"arrow",options:{element:st,padding:3}}),di.push.apply(di,(G==null?void 0:G.modifiers)||[]),y.popperInstance=Ag(Ui,w,Object.assign({},G,{placement:Z,onFirstUpdate:u,modifiers:di}))}function Ee(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Me(){var P=y.props.appendTo,G,Z=U();y.props.interactive&&P===bh||P==="parent"?G=Z.parentNode:G=Th(P,[Z]),G.contains(w)||G.appendChild(w),y.state.isMounted=!0,pe()}function Ze(){return xr(w.querySelectorAll("[data-tippy-root]"))}function ws(P){y.clearDelayTimeouts(),P&&F("onTrigger",[y,P]),$();var G=B(!0),Z=E(),re=Z[0],ie=Z[1];vt.isTouch&&re==="hold"&&ie&&(G=ie),G?i=setTimeout(function(){y.show()},G):y.show()}function hi(P){if(y.clearDelayTimeouts(),F("onUntrigger",[y,P]),!y.state.isVisible){he();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(P.type)>=0&&a)){var G=B(!1);G?s=setTimeout(function(){y.state.isVisible&&y.hide()},G):n=requestAnimationFrame(function(){y.hide()})}}function Ls(){y.state.isEnabled=!0}function Cr(){y.hide(),y.state.isEnabled=!1}function Ir(){clearTimeout(i),clearTimeout(s),cancelAnimationFrame(n)}function Dr(P){if(!y.state.isDestroyed){F("onBeforeUpdate",[y,P]),Ni();var G=y.props,Z=Ph(r,Object.assign({},G,wh(P),{ignoreAttributes:!0}));y.props=Z,jt(),G.interactiveDebounce!==Z.interactiveDebounce&&(_(),p=Eh(ci,Z.interactiveDebounce)),G.triggerTarget&&!Z.triggerTarget?Di(G.triggerTarget).forEach(function(re){re.removeAttribute("aria-expanded")}):Z.triggerTarget&&r.removeAttribute("aria-expanded"),J(),z(),L&&L(G,Z),y.popperInstance&&(pe(),Ze().forEach(function(re){requestAnimationFrame(re._tippy.popperInstance.forceUpdate)})),F("onAfterUpdate",[y,P])}}function Pr(P){y.setProps({content:P})}function my(){var P=y.state.isVisible,G=y.state.isDestroyed,Z=!y.state.isEnabled,re=vt.isTouch&&!y.props.touch,ie=Ta(y.props.duration,0,ht.duration);if(!(P||G||Z||re)&&!U().hasAttribute("disabled")&&(F("onShow",[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,k()&&(w.style.visibility="visible"),z(),$(),y.state.isMounted||(w.style.transition="none"),k()){var Ge=V(),st=Ge.box,Ui=Ge.content;Sa([st,Ui],0)}u=function(){var di;if(!(!y.state.isVisible||c)){if(c=!0,w.offsetHeight,w.style.transition=y.props.moveTransition,k()&&y.props.animation){var Va=V(),kr=Va.box,Bi=Va.content;Sa([kr,Bi],ie),Lh([kr,Bi],"visible")}H(),J(),Sh(Ca,y),(di=y.popperInstance)==null||di.forceUpdate(),F("onMount",[y]),y.props.animation&&k()&&Ae(ie,function(){y.state.isShown=!0,F("onShown",[y])})}},Me()}}function gy(){var P=!y.state.isVisible,G=y.state.isDestroyed,Z=!y.state.isEnabled,re=Ta(y.props.duration,1,ht.duration);if(!(P||G||Z)&&(F("onHide",[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,c=!1,a=!1,k()&&(w.style.visibility="hidden"),_(),he(),z(!0),k()){var ie=V(),Ge=ie.box,st=ie.content;y.props.animation&&(Sa([Ge,st],re),Lh([Ge,st],"hidden"))}H(),J(),y.props.animation?k()&&ye(re,y.unmount):y.unmount()}}function vy(P){Y().addEventListener("mousemove",p),Sh(br,p),p(P)}function yy(){y.state.isVisible&&y.hide(),y.state.isMounted&&(Ee(),Ze().forEach(function(P){P._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w),Ca=Ca.filter(function(P){return P!==y}),y.state.isMounted=!1,F("onHidden",[y]))}function xy(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),Ni(),delete r._tippy,y.state.isDestroyed=!0,F("onDestroy",[y]))}}function oi(r,e){e===void 0&&(e={});var t=ht.plugins.concat(e.plugins||[]);Mg();var i=Object.assign({},e,{plugins:t}),s=Ig(r),n=s.reduce(function(a,o){var l=o&&Kg(o,i);return l&&a.push(l),a},[]);return Ar(r)?n[0]:n}oi.defaultProps=ht,oi.setDefaultProps=Gg,oi.currentInput=vt,Object.assign({},ih,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}}),oi.setDefaultProps({render:Mh});/**
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
{
|
141
|
-
"w": "fill",
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
"src": {{@async resolve-source({ mp4: it.mp4, input: it.input }) /}},
|
149
|
-
"playlist": {{@ parse(it.playlist) /}},
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
"mp4": {{@ parse(it.answer?.media?.video) /}},
|
160
|
-
"input": {{@ parse(it.answer?.media?.input) /}},
|
161
|
-
"playlist": {{@ parse(it.answer?.media?.playlist) /}},
|
162
|
-
"duration": {{@ parse(it.answer?.metadata?.duration) /}},
|
163
|
-
"startOffset": {{@ parse(it.answer?.settings?.startOffset) /}},
|
164
|
-
"endOffset": {{@ parse(it.answer?.settings?.endOffset) /}}
|
165
|
-
}`}],root:"{{ it.settings?.intro?.vouch?.questions?.items | stringify }}"},{layouts:[{type:"basic",data:`{
|
166
|
-
"id": {{@ parse(it.answer?.id) /}},
|
167
|
-
"mp4": {{@ parse(it.answer?.media?.video) /}},
|
168
|
-
"input": {{@ parse(it.answer?.media?.input) /}},
|
169
|
-
"playlist": {{@ parse(it.answer?.media?.playlist) /}},
|
170
|
-
"duration": {{@ parse(it.answer?.metadata?.duration) /}},
|
171
|
-
"startOffset": {{@ parse(it.answer?.settings?.startOffset) /}},
|
172
|
-
"endOffset": {{@ parse(it.answer?.settings?.endOffset) /}}
|
173
|
-
}`}],root:"{{ it.questions?.items | filter(it.questionIndexes) | stringify }}"},{layouts:[{type:"basic",data:`{
|
174
|
-
"id": "{{ it.answer?.id }}-outro",
|
175
|
-
"mp4": {{@ parse(it.answer?.media?.video) /}},
|
176
|
-
"input": {{@ parse(it.answer?.media?.input) /}},
|
177
|
-
"playlist": {{@ parse(it.answer?.media?.playlist) /}},
|
178
|
-
"duration": {{@ parse(it.answer?.metadata?.duration) /}},
|
179
|
-
"startOffset": {{@ parse(it.answer?.settings?.startOffset) /}},
|
180
|
-
"endOffset": {{@ parse(it.answer?.settings?.endOffset) /}}
|
181
|
-
}`}],root:"{{ it.settings?.outro?.vouch?.questions?.items | stringify }}"}]},meta:{transitionDuration:1/3}};function Qg(r){r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen()}function _g(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}const Ia=["progress","play-large","navigation","play","volume","current-time","duration","speed","captions","fullscreen"],$g={id:"captions",event:"captions:click",label:"Closed Captions"},ev={id:"fullscreen",event:"fullscreen:click",label:"Full Screen"},Nh={title:"Playback Speed",items:[{id:"playback-rate-0.5",event:"playbackRate:click",label:"0.5x",value:.5},{id:"playback-rate-1",event:"playbackRate:click",label:"1.0x",value:1},{id:"playback-rate-1.5",event:"playbackRate:click",label:"1.5x",value:1.5},{id:"playback-rate-2",event:"playbackRate:click",label:"2.0x",value:2}]},tv={id:"playbackRate",label:"Playback playbackRate",subItems:Nh};class iv extends Yc{constructor(e){if(super(e),this.element=null,this.observer=void 0,e.type!==Si.ELEMENT)throw new Error("Resize directive must be used in an Element expression")}disconnected(){var e;(e=this.observer)==null||e.disconnect(),this.observer=void 0}reconnected(){var e;this.element&&((e=this.observer)==null||e.observe(this.element))}update(e,[t]){return this.isConnected&&!this.observer&&(this.observer=new ResizeObserver(t),this.element=e.element,this.observer.observe(this.element)),rt}}const Tr=wi(iv),sv=`
|
182
|
-
@font-face {
|
183
|
-
font-family: "Futura";
|
184
|
-
font-weight: 800;
|
185
|
-
font-style: bold;
|
186
|
-
src: url(data:application/octet-stream;base64,d09GMgABAAAAAElUABAAAAAApXQAAEjyAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG7x4BmAWi2AAg0YIgi4JjzQRCAqBu3iBohMBNgIkA4ckC4coAAQgBZwQByAMggsb05MXcOdLNoDyBsPZfp9qJTobUbsdUgIps6GEedaHcztsy/raa7L//78mHYctbBW4u5RcRSqMVimLqXAqV+xQ2Tozb+1aN2dgknaQbdF++8kvdxNn1EpMguhutihln9GjCSYIZgFb9kjZ8DppiN/PThriFUYSr90/nMPu0+jEArn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ADhhEQoD5WUF2fqIxfINTKwNRshTpZJXroYe5e/FuFUI1Q6TU95gZWsh5Fb9SNahAEvMeSaoa8aA91oQtNBBO1WWdiLWlimP5zh6pWKocqioZARL0Uw40iVtyNDBgQ0MLQCbVupyy3VTlIF/kkqekai5Tlew2bWMwDhLkxFTTpZrWVF1RDV0WunUMoXiW3OAPRqRYQig3iEHhmIeyQoBbp35XYllzDRczpQVG1U20W5s2+ux4gnlJVJXBMAYgM03pVX1KpSiSTycEtdOt1jK5ze6mz6kpgmkAXNCzQ1rAcUmwFvlkaIsueZMRjZhtRmq3P44+6A9caWzq9/se3x8413kTxScahD4T1a0FnhEVxTcFMWF7fjxqnfCg0LzRCL0mSG+Y5R3pNnZUGzkyL82uE7Q7IJlZFuqZQhvN25OJ5qnOZbe8k0GcWGtVnd4W7h2Mk1iLdvSzV7fsqgk348gQ3p55DmjSPHbnsWnR+4D7FnSquKDebXv+67TKalL7s2W7dm596317S+xAGg1d1OOuE8BOtSp2glJCC0wwvtey4i21CogvdX+1S0RXgJ5VEqrucOVC2Ka47H/eXbts75+E3zus0b8BrS+tQ4qJbEX8qwdafSAhxrMLfFcfwsWwZ3Q97PyXlblwo+8iGHe5PYOFB2K6fwahR5Mzh9wvvzBXC8FMDtgWiy78szO76q5hcZtr8DO7WGAcwDJ6+gxHt5mv9QJxTQlNRTY9cui6erkP5316ubwoSF+cTNxvL8ScW6bv7PiY7/eVq+K/YbqyZvgU0ueYHgv6wchJrFTCOuTkKWkpfaOevH5NcusY3PUvLrlep1Jz9u9cDIT3e+462z4bUtS/dPlKrqUjIR7bHi91UW92AgAAAA==);
|
187
|
-
}
|
188
|
-
`,rv=`
|
189
|
-
@font-face {
|
190
|
-
font-family: "CiscoSansTT";
|
191
|
-
font-weight: 500;
|
192
|
-
font-style: normal;
|
193
|
-
src: url(data:application/octet-stream;base64,d09GMgABAAAAAM4AABAAAAACyewAAM2gAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG99oHJUKBmAAnA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obert";
|
198
|
-
font-weight: 500;
|
199
|
-
font-style: normal;
|
200
|
-
src: url(data:application/font-woff;base64,d09GRgABAAAAAKo8AA8AAAABauQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAACqIAAAABwAAAAcij3a9EdERUYAAHZ8AAAAtAAAARgcDEU8R1BPUwAAfIQAAC2cAABqOg9lrOVHU1VCAAB3MAAABVEAAAuAX0q6zk9TLzIAAAHUAAAATgAAAGB1ariVY21hcAAABvQAAAK9AAAD7qTSjcZnYXNwAAB2dAAAAAgAAAAI//8AA2dseWYAAA5MAABc8QAAygDb9aUMaGVhZAAAAVgAAAA2AAAANhuGAEZoaGVhAAABkAAAACEAAAAkD8gKYWhtdHgAAAIkAAAEzQAACUh+XZH6bG9jYQAACbQAAASVAAAEqNayCgBtYXhwAAABtAAAAB8AAAAgApwAXW5hbWUAAGtAAAAB/QAAA/MOLbxrcG9zdAAAbUAAAAkyAAASPd0AALMAAQAAAAEAgy9Tpi9fDzz1AAsIAAAAAADYreGrAAAAANvr0kD9Kf4ICqQI0wAAAAgAAgAAAAAAAHjaY2BkYGD/8S+OgYHr+1/Nf7u4ljAARZABUyAArpMHPgAAAHjaY2BkYGAKZohiYGcAASYgZgRCBgYHMJ8BABSdAPwAeNpjYGbJYJzAwMrAwGrMcpaBgWEWhGY6y5DGlAXkg6RggJ0BCYR6h/sxODDwqmWzxf2LY5zF/oNxkQIDw2SQHOMPpj1ASoFBAgBkhg4hAAB42o1Wf0hbVxg979773stE/ENk1g5a3aZVJIQgpYjY0ZG6VoJ0ToKIFAlBJGx10wpV6URCCSIS/EcyusK6TbcOKSUMEZEiDlzZ3BhlowwREZEitoyygRQ2s3NvYiepMoXDuS/313e/85179dxBCPwT3xACsB6TFSZkPUbsh+hVc7hg7yBid6Db2sKI8CNMeGUKIbWKpKhAi1xAlFOnZBin+FtY3MdHagDdagl99qsIqAdkD/rUDc5ZQ6/toE+PN3O/Qoteh9ymjqHRPcd+PwrUBpI2Y7MvI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-
font-family: "Roobert";
|
204
|
-
font-weight: 700;
|
205
|
-
font-style: bold;
|
206
|
-
src: url(data:application/font-woff;base64,d09GRgABAAAAAKncAA8AAAABahgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAACpwAAAABwAAAAcij3a9EdERUYAAHYsAAAAuAAAARgcDEZxR1BPUwAAfDgAAC2IAABqSLXcRylHU1VCAAB25AAABVEAAAuAX0q6zk9TLzIAAAHUAAAATwAAAGB2Mrq1Y21hcAAABvgAAAK9AAAD7qTSjcZnYXNwAAB2JAAAAAgAAAAI//8AA2dseWYAAA5QAABcegAAyKAs14kZaGVhZAAAAVgAAAA2AAAANhsyAG1oaGVhAAABkAAAACEAAAAkD3QKFWhtdHgAAAIkAAAE1AAACUjGCHW+bG9jYQAACbgAAASYAAAEqGK1lc5tYXhwAAABtAAAAB8AAAAgApwAWW5hbWUAAGrMAAACIQAABHpfYNRVcG9zdAAAbPAAAAkyAAASPd0AALMAAQAAAAEAg/afm2xfDzz1AAsIAAAAAADYreGrAAAAANvr0kD87v4ICosI+gAAAAgAAgAAAAAAAHjaY2BkYGD/8S+OgYHryp93/yZydTMARZABUyAAt4sHnQAAAHjaY2BkYGAKZghjYGcAASYgZgRCBgYHMJ8BABQ5APgAeNpjYGbpYIpgYGVgYDVmOcvAwDALQjOdZUhjygLyGdgZ4ACJycAQ6h3ux+DAwKuWzRb3L45xFvsPxkUKDAyTQXKMP5j2ACkFBgkAXRYODAB42o1WbUibVxR+cu993zcTkRJkqyuWEeZsERERkRCCzKoT28VOhkgREZFQQr+kaxl1Q4o/SigiUsp++EO6zpYVESlShj9KcVI6ka50AykSZJQiMpzYsQlzmj3nJrYSlRl4eO57P889zznnxn8DjeBP3SPIvkfkEPr0IHqcecTMDKpcg5gTR4sKoEe1oJYo0A8QdQ4joa7ghJ5HpyrDgP4GBU4Ap7QfrWYQHWYRcacCNWYeZ50PETfXEDUr6HSCOC3z7dpZNMo+5GbzARq8Vo7HkOsYJJxnHOtDw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grnTRK+ScLL/McV8cqDkh49KPlfGX9B0qMSeqneUopvrYAvz+ceqS5dSn/otvr5ZLFOXoLvLsY//fj31U80b0j6+4aUP0p4bZPUf7N6udy+WClemh8Zf6c0P5Ok+tLPpPpSKZ+PbrVP9xXrw623qhtXjFsq5C+3ja+QZ1WID8XfmEqwUcA2sd9nfvYAYAh7DHA3e4L9ERvK/phtZt9hf4q45LfYbvZX7Pvsr9lB9iP2Eh/FHuKj+WjWxRv5t9nf8R/y2eyf+BxouMr/gp/knJ9WTPyO/1+ey+Zn+BGm5Rdh6cRfapuI/u1kJ7gbczCLv1j5Ofbeuk1RlvT1Rby+vg+v0NP8Xhyhwl9mK+w+5/edq3oop+ihVbuRMpZvBaVuJtU6ZlagrMyzX//5ZZqPSyQzl2k+6LzqahFfdbUPX+ZeeavIab41lBlp9pTvVd7ecnqCQkMxs+btCpTT8y3V9imL0d5RgTJfHSWJ0NL8aGNEqShmBdSKW/HR38b/95JP8Yth/v9KPtlwNgBtI+RTy2rp790FMPqMsAc9V4QV7HlX2ADVSRZCyx7lf8Cn8j+k30+Id6Xwtwetpfdj59letFfA18Ua2GA2DPaiCTM0AbPThpmZiVlZgBlZjtlYg5nYQH9HnvMnqco5RvgYTk/S8OeEfeRbRNbNl5HtfldYXv6w8Cv8l8JbqEFBqdaLtmeEoO+ZKvA9ywSfnkZxVU+3uKonRjSviWt7WgVPdaCw7z2fkVV1wUbNZY/wZv4dPp5/l0/gLVjl3+YT+e/wSfx3+WT+e7yNT+F/oHyvIAF/AAn4HiTASH/FcDiO0TiEXDbn/9YWE7Gg+O84QgJFnDEXx0IcS+j39Ez8ivzfa8WLK/uvmI2O6AAAAAEAAAAA1aQnCAAAAADYreGrAAAAANvr0kA=);
|
207
|
-
}`,yt={"red-120":"#feeded","red-130":"#fcd5d0","red-400":"#e84a4a","red-500":"#c51c3a","red-700":"#a21c39","red-800":"#850231","red-900":"#580A2D","teal-100":"#a5e9ed","teal-600":"#006776","purple-100":"#d7cfff","purple-700":"#5f2fe9","green-200":"#a4d7aa","green-500":"#38b319","green-800":"#2b3c2f","grey-100":"#f0f0f0","light-50":"rgba(255, 255, 255, .05)","light-100":"rgba(255, 255, 255, .1)","light-200":"rgba(255, 255, 255, .2)","light-400":"rgba(255, 255, 255, .4)","light-500":"rgba(255, 255, 255, .5)","light-640":"rgba(255, 255, 255, .64)","light-800":"rgba(255, 255, 255, .8)","light-1000":"#fff","dark-50":"rgba(0, 0, 0, .05)","dark-80":"rgba(0, 0, 0, .08)","dark-100":"rgba(0, 0, 0, .1)","dark-200":"rgba(0, 0, 0, .2)","dark-250":"rgba(0, 0, 0, .25)","dark-400":"rgba(0, 0, 0, .4)","dark-500":"rgba(0, 0, 0, .5)","dark-640":"rgba(0, 0, 0, .64)","dark-800":"rgba(0, 0, 0, .8)","dark-900":"rgba(0, 0, 0, .9)","dark-1000":"#000"},ov={colors:yt,space:{xxs:".25rem",xs:".5rem",small:".75rem",medium:"1rem",large:"1.5rem",xl:"2.5rem"},sizes:{xxs:"1rem",xs:"1.5rem",small:"2rem",medium:"2.5rem",large:"3rem"},fontWeights:{regular:400,semibold:500,bold:700},lineHeights:{small:1.1,medium:1.25,large:1.4},letterSpacings:{xxs:"-.04rem",xs:"-.03rem",small:"-.02rem",medium:"-.01rem",large:0},fontSizes:{micro:".625rem",small:".75rem",medium:".875rem",large:"1rem",xl:"1.25rem",xxl:"1.5rem",xxxl:"2rem",huge:"2.75rem"},fontFamilies:{sans:'Roobert, "Times New Roman", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,"Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',mono:'"Maison Neue Mono", Menlo, Monaco, Consolas, Liberation Mono, "Courier New", monospace'},borderWidths:{thin:".0625rem"},radii:{small:".25rem",medium:".5rem",large:".75rem",xl:"1rem"},shadows:{small:`.25rem .25rem .25rem ${yt["dark-100"]}`,medium:`0 .125rem .625rem ${yt["dark-100"]}`,large:`0 .25rem 1rem ${yt["dark-50"]}`,xl:`.25rem .25rem 1rem ${yt["dark-250"]}`,xxl:`0 .25rem 2rem ${yt["dark-100"]}`,xxxl:`.25rem .25rem 3rem ${yt["dark-250"]}`,toolbar:`0 -.625rem .625rem ${yt["dark-50"]}`,text:`0 0 .25rem ${yt["dark-250"]}`},timings:{fast:".1s",normal:".2s",slow:".3s"},easings:{linear:"linear"},focusOutline:{width:".2rem",color:yt["dark-400"]},iconSizes:{small:"0.75rem",medium:"1rem",large:"1.5rem"}},Uh=mm.flatten(ov,{delimiter:"-"}),lv=Object.keys(Uh).map(r=>Hi(`:host { --${r}: ${Uh[r]}; }`)),cv=r=>{class e extends r{firstUpdated(){if(document.querySelectorAll("#vmp-embedded-font-futura").length<=0){const i=document.createElement("style");i.setAttribute("id","vmp-embedded-font-futura"),i.innerHTML=sv,document.head.appendChild(i)}if(document.querySelectorAll("#vmp-embedded-font-cisco-sans").length<=0){const i=document.createElement("style");i.setAttribute("id","vmp-embedded-font-cisco-sans"),i.innerHTML=rv,document.head.appendChild(i)}{const i=document.querySelectorAll("#vmp-embedded-font-roobert-normal"),s=document.querySelectorAll("#vmp-embedded-font-roobert-semibold");if(i.length<=0){const n=document.createElement("style");n.setAttribute("id","vmp-embedded-font-roobert-normal"),n.innerHTML=nv,document.head.appendChild(n)}if(s.length<=0){const n=document.createElement("style");n.setAttribute("id","vmp-embedded-font-roobert-semibold"),n.innerHTML=av,document.head.appendChild(n)}}}}return e.styles=[(r==null?void 0:r.styles)??[],lv,Fe`
|
164
|
+
*/const No=(r,t,e)=>{const i=new Map;for(let s=t;s<=e;s++)i.set(r[s],s);return i},Uo=ts(class extends js{constructor(r){if(super(r),r.type!==Ji.CHILD)throw Error("repeat() can only be used in text expressions")}dt(r,t,e){let i;e===void 0?e=t:t!==void 0&&(i=t);const s=[],n=[];let a=0;for(const o of r)s[a]=i?i(o,a):a,n[a]=e(o,a),a++;return{values:n,keys:s}}render(r,t,e){return this.dt(r,t,e).values}update(r,[t,e,i]){var s;const n=gu(r),{values:a,keys:o}=this.dt(t,e,i);if(!Array.isArray(n))return this.ht=o,a;const l=(s=this.ht)!==null&&s!==void 0?s:this.ht=[],h=[];let c,d,u=0,f=n.length-1,p=0,g=a.length-1;for(;u<=f&&p<=g;)if(n[u]===null)u++;else if(n[f]===null)f--;else if(l[u]===o[p])h[p]=ii(n[u],a[p]),u++,p++;else if(l[f]===o[g])h[g]=ii(n[f],a[g]),f--,g--;else if(l[u]===o[g])h[g]=ii(n[u],a[g]),is(r,h[g+1],n[u]),u++,g--;else if(l[f]===o[p])h[p]=ii(n[f],a[p]),is(r,n[u],n[f]),f--,p++;else if(c===void 0&&(c=No(o,p,g),d=No(l,u,f)),c.has(l[u]))if(c.has(l[f])){const v=d.get(o[p]),E=v!==void 0?n[v]:null;if(E===null){const A=is(r,n[u]);ii(A,a[p]),h[p]=A}else h[p]=ii(E,a[p]),is(r,n[u],E),n[v]=null;p++}else en(n[f]),f--;else en(n[u]),u++;for(;p<=g;){const v=is(r,h[g+1]);ii(v,a[p]),h[p++]=v}for(;u<=f;){const v=n[u++];v!==null&&en(v)}return this.ht=o,pu(r,h),Ee}});var zt="top",ae="bottom",oe="right",Xt="left",rn="auto",ns=[zt,ae,oe,Xt],Ti="start",as="end",Au="clippingParents",Bo="viewport",os="popper",wu="reference",Ho=ns.reduce(function(r,t){return r.concat([t+"-"+Ti,t+"-"+as])},[]),Go=[].concat(ns,[rn]).reduce(function(r,t){return r.concat([t,t+"-"+Ti,t+"-"+as])},[]),Su="beforeRead",Lu="read",Ru="afterRead",_u="beforeMain",ku="main",Iu="afterMain",Du="beforeWrite",Cu="write",xu="afterWrite",Pu=[Su,Lu,Ru,_u,ku,Iu,Du,Cu,xu];function Ae(r){return r?(r.nodeName||"").toLowerCase():null}function ie(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var t=r.ownerDocument;return t&&t.defaultView||window}return r}function si(r){var t=ie(r).Element;return r instanceof t||r instanceof Element}function le(r){var t=ie(r).HTMLElement;return r instanceof t||r instanceof HTMLElement}function nn(r){if(typeof ShadowRoot>"u")return!1;var t=ie(r).ShadowRoot;return r instanceof t||r instanceof ShadowRoot}function Ou(r){var t=r.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},s=t.attributes[e]||{},n=t.elements[e];!le(n)||!Ae(n)||(Object.assign(n.style,i),Object.keys(s).forEach(function(a){var o=s[a];o===!1?n.removeAttribute(a):n.setAttribute(a,o===!0?"":o)}))})}function $u(r){var t=r.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var s=t.elements[i],n=t.attributes[i]||{},a=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]),o=a.reduce(function(l,h){return l[h]="",l},{});!le(s)||!Ae(s)||(Object.assign(s.style,o),Object.keys(n).forEach(function(l){s.removeAttribute(l)}))})}}const Vo={name:"applyStyles",enabled:!0,phase:"write",fn:Ou,effect:$u,requires:["computeStyles"]};function we(r){return r.split("-")[0]}var ri=Math.max,Ys=Math.min,Ai=Math.round;function an(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Ko(){return!/^((?!chrome|android).)*safari/i.test(an())}function wi(r,t,e){t===void 0&&(t=!1),e===void 0&&(e=!1);var i=r.getBoundingClientRect(),s=1,n=1;t&&le(r)&&(s=r.offsetWidth>0&&Ai(i.width)/r.offsetWidth||1,n=r.offsetHeight>0&&Ai(i.height)/r.offsetHeight||1);var a=si(r)?ie(r):window,o=a.visualViewport,l=!Ko()&&e,h=(i.left+(l&&o?o.offsetLeft:0))/s,c=(i.top+(l&&o?o.offsetTop:0))/n,d=i.width/s,u=i.height/n;return{width:d,height:u,top:c,right:h+d,bottom:c+u,left:h,x:h,y:c}}function on(r){var t=wi(r),e=r.offsetWidth,i=r.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:r.offsetLeft,y:r.offsetTop,width:e,height:i}}function jo(r,t){var e=t.getRootNode&&t.getRootNode();if(r.contains(t))return!0;if(e&&nn(e)){var i=t;do{if(i&&r.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function $e(r){return ie(r).getComputedStyle(r)}function Mu(r){return["table","td","th"].indexOf(Ae(r))>=0}function Ge(r){return((si(r)?r.ownerDocument:r.document)||window.document).documentElement}function qs(r){return Ae(r)==="html"?r:r.assignedSlot||r.parentNode||(nn(r)?r.host:null)||Ge(r)}function Wo(r){return!le(r)||$e(r).position==="fixed"?null:r.offsetParent}function Fu(r){var t=/firefox/i.test(an()),e=/Trident/i.test(an());if(e&&le(r)){var i=$e(r);if(i.position==="fixed")return null}var s=qs(r);for(nn(s)&&(s=s.host);le(s)&&["html","body"].indexOf(Ae(s))<0;){var n=$e(s);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||t&&n.willChange==="filter"||t&&n.filter&&n.filter!=="none")return s;s=s.parentNode}return null}function ls(r){for(var t=ie(r),e=Wo(r);e&&Mu(e)&&$e(e).position==="static";)e=Wo(e);return e&&(Ae(e)==="html"||Ae(e)==="body"&&$e(e).position==="static")?t:e||Fu(r)||t}function ln(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function hs(r,t,e){return ri(r,Ys(t,e))}function Nu(r,t,e){var i=hs(r,t,e);return i>e?e:i}function Yo(){return{top:0,right:0,bottom:0,left:0}}function qo(r){return Object.assign({},Yo(),r)}function zo(r,t){return t.reduce(function(e,i){return e[i]=r,e},{})}var Uu=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,qo(typeof t!="number"?t:zo(t,ns))};function Bu(r){var t,e=r.state,i=r.name,s=r.options,n=e.elements.arrow,a=e.modifiersData.popperOffsets,o=we(e.placement),l=ln(o),h=[Xt,oe].indexOf(o)>=0,c=h?"height":"width";if(!(!n||!a)){var d=Uu(s.padding,e),u=on(n),f=l==="y"?zt:Xt,p=l==="y"?ae:oe,g=e.rects.reference[c]+e.rects.reference[l]-a[l]-e.rects.popper[c],v=a[l]-e.rects.reference[l],E=ls(n),A=E?l==="y"?E.clientHeight||0:E.clientWidth||0:0,L=g/2-v/2,y=d[f],S=A-u[c]-d[p],R=A/2-u[c]/2+L,D=hs(y,R,S),M=l;e.modifiersData[i]=(t={},t[M]=D,t.centerOffset=D-R,t)}}function Hu(r){var t=r.state,e=r.options,i=e.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||jo(t.elements.popper,s)&&(t.elements.arrow=s))}const Gu={name:"arrow",enabled:!0,phase:"main",fn:Bu,effect:Hu,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Si(r){return r.split("-")[1]}var Vu={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ku(r,t){var e=r.x,i=r.y,s=t.devicePixelRatio||1;return{x:Ai(e*s)/s||0,y:Ai(i*s)/s||0}}function Xo(r){var t,e=r.popper,i=r.popperRect,s=r.placement,n=r.variation,a=r.offsets,o=r.position,l=r.gpuAcceleration,h=r.adaptive,c=r.roundOffsets,d=r.isFixed,u=a.x,f=u===void 0?0:u,p=a.y,g=p===void 0?0:p,v=typeof c=="function"?c({x:f,y:g}):{x:f,y:g};f=v.x,g=v.y;var E=a.hasOwnProperty("x"),A=a.hasOwnProperty("y"),L=Xt,y=zt,S=window;if(h){var R=ls(e),D="clientHeight",M="clientWidth";if(R===ie(e)&&(R=Ge(e),$e(R).position!=="static"&&o==="absolute"&&(D="scrollHeight",M="scrollWidth")),R=R,s===zt||(s===Xt||s===oe)&&n===as){y=ae;var C=d&&R===S&&S.visualViewport?S.visualViewport.height:R[D];g-=C-i.height,g*=l?1:-1}if(s===Xt||(s===zt||s===ae)&&n===as){L=oe;var I=d&&R===S&&S.visualViewport?S.visualViewport.width:R[M];f-=I-i.width,f*=l?1:-1}}var G=Object.assign({position:o},h&&Vu),F=c===!0?Ku({x:f,y:g},ie(e)):{x:f,y:g};if(f=F.x,g=F.y,l){var V;return Object.assign({},G,(V={},V[y]=A?"0":"",V[L]=E?"0":"",V.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",V))}return Object.assign({},G,(t={},t[y]=A?g+"px":"",t[L]=E?f+"px":"",t.transform="",t))}function ju(r){var t=r.state,e=r.options,i=e.gpuAcceleration,s=i===void 0?!0:i,n=e.adaptive,a=n===void 0?!0:n,o=e.roundOffsets,l=o===void 0?!0:o,h={placement:we(t.placement),variation:Si(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Xo(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xo(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Wu={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ju,data:{}};var zs={passive:!0};function Yu(r){var t=r.state,e=r.instance,i=r.options,s=i.scroll,n=s===void 0?!0:s,a=i.resize,o=a===void 0?!0:a,l=ie(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&h.forEach(function(c){c.addEventListener("scroll",e.update,zs)}),o&&l.addEventListener("resize",e.update,zs),function(){n&&h.forEach(function(c){c.removeEventListener("scroll",e.update,zs)}),o&&l.removeEventListener("resize",e.update,zs)}}const qu={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yu,data:{}};var zu={left:"right",right:"left",bottom:"top",top:"bottom"};function Xs(r){return r.replace(/left|right|bottom|top/g,function(t){return zu[t]})}var Xu={start:"end",end:"start"};function Qo(r){return r.replace(/start|end/g,function(t){return Xu[t]})}function hn(r){var t=ie(r),e=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:e,scrollTop:i}}function cn(r){return wi(Ge(r)).left+hn(r).scrollLeft}function Qu(r,t){var e=ie(r),i=Ge(r),s=e.visualViewport,n=i.clientWidth,a=i.clientHeight,o=0,l=0;if(s){n=s.width,a=s.height;var h=Ko();(h||!h&&t==="fixed")&&(o=s.offsetLeft,l=s.offsetTop)}return{width:n,height:a,x:o+cn(r),y:l}}function Zu(r){var t,e=Ge(r),i=hn(r),s=(t=r.ownerDocument)==null?void 0:t.body,n=ri(e.scrollWidth,e.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=ri(e.scrollHeight,e.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),o=-i.scrollLeft+cn(r),l=-i.scrollTop;return $e(s||e).direction==="rtl"&&(o+=ri(e.clientWidth,s?s.clientWidth:0)-n),{width:n,height:a,x:o,y:l}}function dn(r){var t=$e(r),e=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(e+s+i)}function Zo(r){return["html","body","#document"].indexOf(Ae(r))>=0?r.ownerDocument.body:le(r)&&dn(r)?r:Zo(qs(r))}function cs(r,t){var e;t===void 0&&(t=[]);var i=Zo(r),s=i===((e=r.ownerDocument)==null?void 0:e.body),n=ie(i),a=s?[n].concat(n.visualViewport||[],dn(i)?i:[]):i,o=t.concat(a);return s?o:o.concat(cs(qs(a)))}function un(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function Ju(r,t){var e=wi(r,!1,t==="fixed");return e.top=e.top+r.clientTop,e.left=e.left+r.clientLeft,e.bottom=e.top+r.clientHeight,e.right=e.left+r.clientWidth,e.width=r.clientWidth,e.height=r.clientHeight,e.x=e.left,e.y=e.top,e}function Jo(r,t,e){return t===Bo?un(Qu(r,e)):si(t)?Ju(t,e):un(Zu(Ge(r)))}function tf(r){var t=cs(qs(r)),e=["absolute","fixed"].indexOf($e(r).position)>=0,i=e&&le(r)?ls(r):r;return si(i)?t.filter(function(s){return si(s)&&jo(s,i)&&Ae(s)!=="body"}):[]}function ef(r,t,e,i){var s=t==="clippingParents"?tf(r):[].concat(t),n=[].concat(s,[e]),a=n[0],o=n.reduce(function(l,h){var c=Jo(r,h,i);return l.top=ri(c.top,l.top),l.right=Ys(c.right,l.right),l.bottom=Ys(c.bottom,l.bottom),l.left=ri(c.left,l.left),l},Jo(r,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function tl(r){var t=r.reference,e=r.element,i=r.placement,s=i?we(i):null,n=i?Si(i):null,a=t.x+t.width/2-e.width/2,o=t.y+t.height/2-e.height/2,l;switch(s){case zt:l={x:a,y:t.y-e.height};break;case ae:l={x:a,y:t.y+t.height};break;case oe:l={x:t.x+t.width,y:o};break;case Xt:l={x:t.x-e.width,y:o};break;default:l={x:t.x,y:t.y}}var h=s?ln(s):null;if(h!=null){var c=h==="y"?"height":"width";switch(n){case Ti:l[h]=l[h]-(t[c]/2-e[c]/2);break;case as:l[h]=l[h]+(t[c]/2-e[c]/2);break}}return l}function ds(r,t){t===void 0&&(t={});var e=t,i=e.placement,s=i===void 0?r.placement:i,n=e.strategy,a=n===void 0?r.strategy:n,o=e.boundary,l=o===void 0?Au:o,h=e.rootBoundary,c=h===void 0?Bo:h,d=e.elementContext,u=d===void 0?os:d,f=e.altBoundary,p=f===void 0?!1:f,g=e.padding,v=g===void 0?0:g,E=qo(typeof v!="number"?v:zo(v,ns)),A=u===os?wu:os,L=r.rects.popper,y=r.elements[p?A:u],S=ef(si(y)?y:y.contextElement||Ge(r.elements.popper),l,c,a),R=wi(r.elements.reference),D=tl({reference:R,element:L,strategy:"absolute",placement:s}),M=un(Object.assign({},L,D)),C=u===os?M:R,I={top:S.top-C.top+E.top,bottom:C.bottom-S.bottom+E.bottom,left:S.left-C.left+E.left,right:C.right-S.right+E.right},G=r.modifiersData.offset;if(u===os&&G){var F=G[s];Object.keys(I).forEach(function(V){var q=[oe,ae].indexOf(V)>=0?1:-1,w=[zt,ae].indexOf(V)>=0?"y":"x";I[V]+=F[w]*q})}return I}function sf(r,t){t===void 0&&(t={});var e=t,i=e.placement,s=e.boundary,n=e.rootBoundary,a=e.padding,o=e.flipVariations,l=e.allowedAutoPlacements,h=l===void 0?Go:l,c=Si(i),d=c?o?Ho:Ho.filter(function(p){return Si(p)===c}):ns,u=d.filter(function(p){return h.indexOf(p)>=0});u.length===0&&(u=d);var f=u.reduce(function(p,g){return p[g]=ds(r,{placement:g,boundary:s,rootBoundary:n,padding:a})[we(g)],p},{});return Object.keys(f).sort(function(p,g){return f[p]-f[g]})}function rf(r){if(we(r)===rn)return[];var t=Xs(r);return[Qo(r),t,Qo(t)]}function nf(r){var t=r.state,e=r.options,i=r.name;if(!t.modifiersData[i]._skip){for(var s=e.mainAxis,n=s===void 0?!0:s,a=e.altAxis,o=a===void 0?!0:a,l=e.fallbackPlacements,h=e.padding,c=e.boundary,d=e.rootBoundary,u=e.altBoundary,f=e.flipVariations,p=f===void 0?!0:f,g=e.allowedAutoPlacements,v=t.options.placement,E=we(v),A=E===v,L=l||(A||!p?[Xs(v)]:rf(v)),y=[v].concat(L).reduce(function(W,X){return W.concat(we(X)===rn?sf(t,{placement:X,boundary:c,rootBoundary:d,padding:h,flipVariations:p,allowedAutoPlacements:g}):X)},[]),S=t.rects.reference,R=t.rects.popper,D=new Map,M=!0,C=y[0],I=0;I<y.length;I++){var G=y[I],F=we(G),V=Si(G)===Ti,q=[zt,ae].indexOf(F)>=0,w=q?"width":"height",P=ds(t,{placement:G,boundary:c,rootBoundary:d,altBoundary:u,padding:h}),H=q?V?oe:Xt:V?ae:zt;S[w]>R[w]&&(H=Xs(H));var b=Xs(H),T=[];if(n&&T.push(P[F]<=0),o&&T.push(P[H]<=0,P[b]<=0),T.every(function(W){return W})){C=G,M=!1;break}D.set(G,T)}if(M)for(var k=p?3:1,N=function(X){var lt=y.find(function(rt){var at=D.get(rt);if(at)return at.slice(0,X).every(function(Rt){return Rt})});if(lt)return C=lt,"break"},U=k;U>0;U--){var K=N(U);if(K==="break")break}t.placement!==C&&(t.modifiersData[i]._skip=!0,t.placement=C,t.reset=!0)}}const af={name:"flip",enabled:!0,phase:"main",fn:nf,requiresIfExists:["offset"],data:{_skip:!1}};function el(r,t,e){return e===void 0&&(e={x:0,y:0}),{top:r.top-t.height-e.y,right:r.right-t.width+e.x,bottom:r.bottom-t.height+e.y,left:r.left-t.width-e.x}}function il(r){return[zt,oe,ae,Xt].some(function(t){return r[t]>=0})}function of(r){var t=r.state,e=r.name,i=t.rects.reference,s=t.rects.popper,n=t.modifiersData.preventOverflow,a=ds(t,{elementContext:"reference"}),o=ds(t,{altBoundary:!0}),l=el(a,i),h=el(o,s,n),c=il(l),d=il(h);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const lf={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:of};function hf(r,t,e){var i=we(r),s=[Xt,zt].indexOf(i)>=0?-1:1,n=typeof e=="function"?e(Object.assign({},t,{placement:r})):e,a=n[0],o=n[1];return a=a||0,o=(o||0)*s,[Xt,oe].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function cf(r){var t=r.state,e=r.options,i=r.name,s=e.offset,n=s===void 0?[0,0]:s,a=Go.reduce(function(c,d){return c[d]=hf(d,t.rects,n),c},{}),o=a[t.placement],l=o.x,h=o.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=h),t.modifiersData[i]=a}const df={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cf};function uf(r){var t=r.state,e=r.name;t.modifiersData[e]=tl({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ff={name:"popperOffsets",enabled:!0,phase:"read",fn:uf,data:{}};function pf(r){return r==="x"?"y":"x"}function gf(r){var t=r.state,e=r.options,i=r.name,s=e.mainAxis,n=s===void 0?!0:s,a=e.altAxis,o=a===void 0?!1:a,l=e.boundary,h=e.rootBoundary,c=e.altBoundary,d=e.padding,u=e.tether,f=u===void 0?!0:u,p=e.tetherOffset,g=p===void 0?0:p,v=ds(t,{boundary:l,rootBoundary:h,padding:d,altBoundary:c}),E=we(t.placement),A=Si(t.placement),L=!A,y=ln(E),S=pf(y),R=t.modifiersData.popperOffsets,D=t.rects.reference,M=t.rects.popper,C=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,I=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),G=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(R){if(n){var V,q=y==="y"?zt:Xt,w=y==="y"?ae:oe,P=y==="y"?"height":"width",H=R[y],b=H+v[q],T=H-v[w],k=f?-M[P]/2:0,N=A===Ti?D[P]:M[P],U=A===Ti?-M[P]:-D[P],K=t.elements.arrow,W=f&&K?on(K):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Yo(),lt=X[q],rt=X[w],at=hs(0,D[P],W[P]),Rt=L?D[P]/2-k-at-lt-I.mainAxis:N-at-lt-I.mainAxis,nt=L?-D[P]/2+k+at+rt+I.mainAxis:U+at+rt+I.mainAxis,it=t.elements.arrow&&ls(t.elements.arrow),vt=it?y==="y"?it.clientTop||0:it.clientLeft||0:0,dt=(V=G==null?void 0:G[y])!=null?V:0,Ct=H+Rt-dt-vt,et=H+nt-dt,ut=hs(f?Ys(b,Ct):b,H,f?ri(T,et):T);R[y]=ut,F[y]=ut-H}if(o){var bt,pt=y==="x"?zt:Xt,Tt=y==="x"?ae:oe,_t=R[S],Ot=S==="y"?"height":"width",ft=_t+v[pt],Yt=_t-v[Tt],ve=[zt,Xt].indexOf(E)!==-1,De=(bt=G==null?void 0:G[S])!=null?bt:0,Ht=ve?ft:_t-D[Ot]-M[Ot]-De+I.altAxis,ne=ve?_t+D[Ot]+M[Ot]-De-I.altAxis:Yt,Mi=f&&ve?Nu(Ht,_t,ne):hs(f?Ht:ft,_t,f?ne:Yt);R[S]=Mi,F[S]=Mi-_t}t.modifiersData[i]=F}}const mf={name:"preventOverflow",enabled:!0,phase:"main",fn:gf,requiresIfExists:["offset"]};function vf(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function yf(r){return r===ie(r)||!le(r)?hn(r):vf(r)}function Ef(r){var t=r.getBoundingClientRect(),e=Ai(t.width)/r.offsetWidth||1,i=Ai(t.height)/r.offsetHeight||1;return e!==1||i!==1}function bf(r,t,e){e===void 0&&(e=!1);var i=le(t),s=le(t)&&Ef(t),n=Ge(t),a=wi(r,s,e),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&((Ae(t)!=="body"||dn(n))&&(o=yf(t)),le(t)?(l=wi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):n&&(l.x=cn(n))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function Tf(r){var t=new Map,e=new Set,i=[];r.forEach(function(n){t.set(n.name,n)});function s(n){e.add(n.name);var a=[].concat(n.requires||[],n.requiresIfExists||[]);a.forEach(function(o){if(!e.has(o)){var l=t.get(o);l&&s(l)}}),i.push(n)}return r.forEach(function(n){e.has(n.name)||s(n)}),i}function Af(r){var t=Tf(r);return Pu.reduce(function(e,i){return e.concat(t.filter(function(s){return s.phase===i}))},[])}function wf(r){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(r())})})),t}}function Sf(r){var t=r.reduce(function(e,i){var s=e[i.name];return e[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,e},{});return Object.keys(t).map(function(e){return t[e]})}var sl={placement:"bottom",modifiers:[],strategy:"absolute"};function rl(){for(var r=arguments.length,t=new Array(r),e=0;e<r;e++)t[e]=arguments[e];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Lf(r){r===void 0&&(r={});var t=r,e=t.defaultModifiers,i=e===void 0?[]:e,s=t.defaultOptions,n=s===void 0?sl:s;return function(o,l,h){h===void 0&&(h=n);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},sl,n),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},d=[],u=!1,f={state:c,setOptions:function(E){var A=typeof E=="function"?E(c.options):E;g(),c.options=Object.assign({},n,c.options,A),c.scrollParents={reference:si(o)?cs(o):o.contextElement?cs(o.contextElement):[],popper:cs(l)};var L=Af(Sf([].concat(i,c.options.modifiers)));return c.orderedModifiers=L.filter(function(y){return y.enabled}),p(),f.update()},forceUpdate:function(){if(!u){var E=c.elements,A=E.reference,L=E.popper;if(rl(A,L)){c.rects={reference:bf(A,ls(L),c.options.strategy==="fixed"),popper:on(L)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(I){return c.modifiersData[I.name]=Object.assign({},I.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var S=c.orderedModifiers[y],R=S.fn,D=S.options,M=D===void 0?{}:D,C=S.name;typeof R=="function"&&(c=R({state:c,options:M,name:C,instance:f})||c)}}}},update:wf(function(){return new Promise(function(v){f.forceUpdate(),v(c)})}),destroy:function(){g(),u=!0}};if(!rl(o,l))return f;f.setOptions(h).then(function(v){!u&&h.onFirstUpdate&&h.onFirstUpdate(v)});function p(){c.orderedModifiers.forEach(function(v){var E=v.name,A=v.options,L=A===void 0?{}:A,y=v.effect;if(typeof y=="function"){var S=y({state:c,name:E,instance:f,options:L}),R=function(){};d.push(S||R)}})}function g(){d.forEach(function(v){return v()}),d=[]}return f}}var Rf=[qu,ff,Wu,Vo,df,af,mf,Gu,lf],_f=Lf({defaultModifiers:Rf}),kf="tippy-box",nl="tippy-content",If="tippy-backdrop",al="tippy-arrow",ol="tippy-svg-arrow",ni={passive:!0,capture:!0},ll=function(){return document.body};function fn(r,t,e){if(Array.isArray(r)){var i=r[t];return i??(Array.isArray(e)?e[t]:e)}return r}function pn(r,t){var e={}.toString.call(r);return e.indexOf("[object")===0&&e.indexOf(t+"]")>-1}function hl(r,t){return typeof r=="function"?r.apply(void 0,t):r}function cl(r,t){if(t===0)return r;var e;return function(i){clearTimeout(e),e=setTimeout(function(){r(i)},t)}}function Df(r){return r.split(/\s+/).filter(Boolean)}function Li(r){return[].concat(r)}function dl(r,t){r.indexOf(t)===-1&&r.push(t)}function Cf(r){return r.filter(function(t,e){return r.indexOf(t)===e})}function xf(r){return r.split("-")[0]}function Qs(r){return[].slice.call(r)}function ul(r){return Object.keys(r).reduce(function(t,e){return r[e]!==void 0&&(t[e]=r[e]),t},{})}function us(){return document.createElement("div")}function Zs(r){return["Element","Fragment"].some(function(t){return pn(r,t)})}function Pf(r){return pn(r,"NodeList")}function Of(r){return pn(r,"MouseEvent")}function $f(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function Mf(r){return Zs(r)?[r]:Pf(r)?Qs(r):Array.isArray(r)?r:Qs(document.querySelectorAll(r))}function gn(r,t){r.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function fl(r,t){r.forEach(function(e){e&&e.setAttribute("data-state",t)})}function Ff(r){var t,e=Li(r),i=e[0];return i!=null&&(t=i.ownerDocument)!=null&&t.body?i.ownerDocument:document}function Nf(r,t){var e=t.clientX,i=t.clientY;return r.every(function(s){var n=s.popperRect,a=s.popperState,o=s.props,l=o.interactiveBorder,h=xf(a.placement),c=a.modifiersData.offset;if(!c)return!0;var d=h==="bottom"?c.top.y:0,u=h==="top"?c.bottom.y:0,f=h==="right"?c.left.x:0,p=h==="left"?c.right.x:0,g=n.top-i+d>l,v=i-n.bottom-u>l,E=n.left-e+f>l,A=e-n.right-p>l;return g||v||E||A})}function mn(r,t,e){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(s){r[i](s,e)})}function pl(r,t){for(var e=t;e;){var i;if(r.contains(e))return!0;e=e.getRootNode==null||(i=e.getRootNode())==null?void 0:i.host}return!1}var Se={isTouch:!1},gl=0;function Uf(){Se.isTouch||(Se.isTouch=!0,window.performance&&document.addEventListener("mousemove",ml))}function ml(){var r=performance.now();r-gl<20&&(Se.isTouch=!1,document.removeEventListener("mousemove",ml)),gl=r}function Bf(){var r=document.activeElement;if($f(r)){var t=r._tippy;r.blur&&!t.state.isVisible&&r.blur()}}function Hf(){document.addEventListener("touchstart",Uf,ni),window.addEventListener("blur",Bf)}var Gf=typeof window<"u"&&typeof document<"u",Vf=Gf?!!window.msCrypto:!1,Kf={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},jf={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},fe=Object.assign({appendTo:ll,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Kf,jf),Wf=Object.keys(fe),Yf=function(t){var e=Object.keys(t);e.forEach(function(i){fe[i]=t[i]})};function vl(r){var t=r.plugins||[],e=t.reduce(function(i,s){var n=s.name,a=s.defaultValue;if(n){var o;i[n]=r[n]!==void 0?r[n]:(o=fe[n])!=null?o:a}return i},{});return Object.assign({},r,e)}function qf(r,t){var e=t?Object.keys(vl(Object.assign({},fe,{plugins:t}))):Wf,i=e.reduce(function(s,n){var a=(r.getAttribute("data-tippy-"+n)||"").trim();if(!a)return s;if(n==="content")s[n]=a;else try{s[n]=JSON.parse(a)}catch{s[n]=a}return s},{});return i}function yl(r,t){var e=Object.assign({},t,{content:hl(t.content,[r])},t.ignoreAttributes?{}:qf(r,t.plugins));return e.aria=Object.assign({},fe.aria,e.aria),e.aria={expanded:e.aria.expanded==="auto"?t.interactive:e.aria.expanded,content:e.aria.content==="auto"?t.interactive?null:"describedby":e.aria.content},e}var zf=function(){return"innerHTML"};function vn(r,t){r[zf()]=t}function El(r){var t=us();return r===!0?t.className=al:(t.className=ol,Zs(r)?t.appendChild(r):vn(t,r)),t}function bl(r,t){Zs(t.content)?(vn(r,""),r.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?vn(r,t.content):r.textContent=t.content)}function yn(r){var t=r.firstElementChild,e=Qs(t.children);return{box:t,content:e.find(function(i){return i.classList.contains(nl)}),arrow:e.find(function(i){return i.classList.contains(al)||i.classList.contains(ol)}),backdrop:e.find(function(i){return i.classList.contains(If)})}}function Tl(r){var t=us(),e=us();e.className=kf,e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=us();i.className=nl,i.setAttribute("data-state","hidden"),bl(i,r.props),t.appendChild(e),e.appendChild(i),s(r.props,r.props);function s(n,a){var o=yn(t),l=o.box,h=o.content,c=o.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(n.content!==a.content||n.allowHTML!==a.allowHTML)&&bl(h,r.props),a.arrow?c?n.arrow!==a.arrow&&(l.removeChild(c),l.appendChild(El(a.arrow))):l.appendChild(El(a.arrow)):c&&l.removeChild(c)}return{popper:t,onUpdate:s}}Tl.$$tippy=!0;var Xf=1,Js=[],En=[];function Qf(r,t){var e=yl(r,Object.assign({},fe,vl(ul(t)))),i,s,n,a=!1,o=!1,l=!1,h=!1,c,d,u,f=[],p=cl(Ct,e.interactiveDebounce),g,v=Xf++,E=null,A=Cf(e.plugins),L={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:r,popper:us(),popperInstance:E,props:e,state:L,plugins:A,clearDelayTimeouts:Ht,setProps:ne,setContent:Mi,show:ee,hide:fi,hideWithInteractivity:Ss,enable:ve,disable:De,unmount:Ls,destroy:Ce};if(!e.render)return y;var S=e.render(y),R=S.popper,D=S.onUpdate;R.setAttribute("data-tippy-root",""),R.id="tippy-"+y.id,y.popper=R,r._tippy=y,R._tippy=y;var M=A.map(function(O){return O.fn(y)}),C=r.hasAttribute("aria-expanded");return it(),k(),H(),b("onCreate",[y]),e.showOnCreate&&ft(),R.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),R.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&q().addEventListener("mousemove",p)}),y;function I(){var O=y.props.touch;return Array.isArray(O)?O:[O,0]}function G(){return I()[0]==="hold"}function F(){var O;return!!((O=y.props.render)!=null&&O.$$tippy)}function V(){return g||r}function q(){var O=V().parentNode;return O?Ff(O):document}function w(){return yn(R)}function P(O){return y.state.isMounted&&!y.state.isVisible||Se.isTouch||c&&c.type==="focus"?0:fn(y.props.delay,O?0:1,fe.delay)}function H(O){O===void 0&&(O=!1),R.style.pointerEvents=y.props.interactive&&!O?"":"none",R.style.zIndex=""+y.props.zIndex}function b(O,Y,tt){if(tt===void 0&&(tt=!0),M.forEach(function(ht){ht[O]&&ht[O].apply(ht,Y)}),tt){var gt;(gt=y.props)[O].apply(gt,Y)}}function T(){var O=y.props.aria;if(O.content){var Y="aria-"+O.content,tt=R.id,gt=Li(y.props.triggerTarget||r);gt.forEach(function(ht){var qt=ht.getAttribute(Y);if(y.state.isVisible)ht.setAttribute(Y,qt?qt+" "+tt:tt);else{var ue=qt&&qt.replace(tt,"").trim();ue?ht.setAttribute(Y,ue):ht.removeAttribute(Y)}})}}function k(){if(!(C||!y.props.aria.expanded)){var O=Li(y.props.triggerTarget||r);O.forEach(function(Y){y.props.interactive?Y.setAttribute("aria-expanded",y.state.isVisible&&Y===V()?"true":"false"):Y.removeAttribute("aria-expanded")})}}function N(){q().removeEventListener("mousemove",p),Js=Js.filter(function(O){return O!==p})}function U(O){if(!(Se.isTouch&&(l||O.type==="mousedown"))){var Y=O.composedPath&&O.composedPath()[0]||O.target;if(!(y.props.interactive&&pl(R,Y))){if(Li(y.props.triggerTarget||r).some(function(tt){return pl(tt,Y)})){if(Se.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else b("onClickOutside",[y,O]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),o=!0,setTimeout(function(){o=!1}),y.state.isMounted||lt())}}}function K(){l=!0}function W(){l=!1}function X(){var O=q();O.addEventListener("mousedown",U,!0),O.addEventListener("touchend",U,ni),O.addEventListener("touchstart",W,ni),O.addEventListener("touchmove",K,ni)}function lt(){var O=q();O.removeEventListener("mousedown",U,!0),O.removeEventListener("touchend",U,ni),O.removeEventListener("touchstart",W,ni),O.removeEventListener("touchmove",K,ni)}function rt(O,Y){Rt(O,function(){!y.state.isVisible&&R.parentNode&&R.parentNode.contains(R)&&Y()})}function at(O,Y){Rt(O,Y)}function Rt(O,Y){var tt=w().box;function gt(ht){ht.target===tt&&(mn(tt,"remove",gt),Y())}if(O===0)return Y();mn(tt,"remove",d),mn(tt,"add",gt),d=gt}function nt(O,Y,tt){tt===void 0&&(tt=!1);var gt=Li(y.props.triggerTarget||r);gt.forEach(function(ht){ht.addEventListener(O,Y,tt),f.push({node:ht,eventType:O,handler:Y,options:tt})})}function it(){G()&&(nt("touchstart",dt,{passive:!0}),nt("touchend",et,{passive:!0})),Df(y.props.trigger).forEach(function(O){if(O!=="manual")switch(nt(O,dt),O){case"mouseenter":nt("mouseleave",et);break;case"focus":nt(Vf?"focusout":"blur",ut);break;case"focusin":nt("focusout",ut);break}})}function vt(){f.forEach(function(O){var Y=O.node,tt=O.eventType,gt=O.handler,ht=O.options;Y.removeEventListener(tt,gt,ht)}),f=[]}function dt(O){var Y,tt=!1;if(!(!y.state.isEnabled||bt(O)||o)){var gt=((Y=c)==null?void 0:Y.type)==="focus";c=O,g=O.currentTarget,k(),!y.state.isVisible&&Of(O)&&Js.forEach(function(ht){return ht(O)}),O.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||a)&&y.props.hideOnClick!==!1&&y.state.isVisible?tt=!0:ft(O),O.type==="click"&&(a=!tt),tt&&!gt&&Yt(O)}}function Ct(O){var Y=O.target,tt=V().contains(Y)||R.contains(Y);if(!(O.type==="mousemove"&&tt)){var gt=Ot().concat(R).map(function(ht){var qt,ue=ht._tippy,Fi=(qt=ue.popperInstance)==null?void 0:qt.state;return Fi?{popperRect:ht.getBoundingClientRect(),popperState:Fi,props:e}:null}).filter(Boolean);Nf(gt,O)&&(N(),Yt(O))}}function et(O){var Y=bt(O)||y.props.trigger.indexOf("click")>=0&&a;if(!Y){if(y.props.interactive){y.hideWithInteractivity(O);return}Yt(O)}}function ut(O){y.props.trigger.indexOf("focusin")<0&&O.target!==V()||y.props.interactive&&O.relatedTarget&&R.contains(O.relatedTarget)||Yt(O)}function bt(O){return Se.isTouch?G()!==O.type.indexOf("touch")>=0:!1}function pt(){Tt();var O=y.props,Y=O.popperOptions,tt=O.placement,gt=O.offset,ht=O.getReferenceClientRect,qt=O.moveTransition,ue=F()?yn(R).arrow:null,Fi=ht?{getBoundingClientRect:ht,contextElement:ht.contextElement||V()}:r,kc={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Lr){var Ni=Lr.state;if(F()){var Y0=w(),Ia=Y0.box;["placement","reference-hidden","escaped"].forEach(function(Rr){Rr==="placement"?Ia.setAttribute("data-placement",Ni.placement):Ni.attributes.popper["data-popper-"+Rr]?Ia.setAttribute("data-"+Rr,""):Ia.removeAttribute("data-"+Rr)}),Ni.attributes.popper={}}}},pi=[{name:"offset",options:{offset:gt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!qt}},kc];F()&&ue&&pi.push({name:"arrow",options:{element:ue,padding:3}}),pi.push.apply(pi,(Y==null?void 0:Y.modifiers)||[]),y.popperInstance=_f(Fi,R,Object.assign({},Y,{placement:tt,onFirstUpdate:u,modifiers:pi}))}function Tt(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function _t(){var O=y.props.appendTo,Y,tt=V();y.props.interactive&&O===ll||O==="parent"?Y=tt.parentNode:Y=hl(O,[tt]),Y.contains(R)||Y.appendChild(R),y.state.isMounted=!0,pt()}function Ot(){return Qs(R.querySelectorAll("[data-tippy-root]"))}function ft(O){y.clearDelayTimeouts(),O&&b("onTrigger",[y,O]),X();var Y=P(!0),tt=I(),gt=tt[0],ht=tt[1];Se.isTouch&>==="hold"&&ht&&(Y=ht),Y?i=setTimeout(function(){y.show()},Y):y.show()}function Yt(O){if(y.clearDelayTimeouts(),b("onUntrigger",[y,O]),!y.state.isVisible){lt();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(O.type)>=0&&a)){var Y=P(!1);Y?s=setTimeout(function(){y.state.isVisible&&y.hide()},Y):n=requestAnimationFrame(function(){y.hide()})}}function ve(){y.state.isEnabled=!0}function De(){y.hide(),y.state.isEnabled=!1}function Ht(){clearTimeout(i),clearTimeout(s),cancelAnimationFrame(n)}function ne(O){if(!y.state.isDestroyed){b("onBeforeUpdate",[y,O]),vt();var Y=y.props,tt=yl(r,Object.assign({},Y,ul(O),{ignoreAttributes:!0}));y.props=tt,it(),Y.interactiveDebounce!==tt.interactiveDebounce&&(N(),p=cl(Ct,tt.interactiveDebounce)),Y.triggerTarget&&!tt.triggerTarget?Li(Y.triggerTarget).forEach(function(gt){gt.removeAttribute("aria-expanded")}):tt.triggerTarget&&r.removeAttribute("aria-expanded"),k(),H(),D&&D(Y,tt),y.popperInstance&&(pt(),Ot().forEach(function(gt){requestAnimationFrame(gt._tippy.popperInstance.forceUpdate)})),b("onAfterUpdate",[y,O])}}function Mi(O){y.setProps({content:O})}function ee(){var O=y.state.isVisible,Y=y.state.isDestroyed,tt=!y.state.isEnabled,gt=Se.isTouch&&!y.props.touch,ht=fn(y.props.duration,0,fe.duration);if(!(O||Y||tt||gt)&&!V().hasAttribute("disabled")&&(b("onShow",[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,F()&&(R.style.visibility="visible"),H(),X(),y.state.isMounted||(R.style.transition="none"),F()){var qt=w(),ue=qt.box,Fi=qt.content;gn([ue,Fi],0)}u=function(){var pi;if(!(!y.state.isVisible||h)){if(h=!0,R.offsetHeight,R.style.transition=y.props.moveTransition,F()&&y.props.animation){var ka=w(),Lr=ka.box,Ni=ka.content;gn([Lr,Ni],ht),fl([Lr,Ni],"visible")}T(),k(),dl(En,y),(pi=y.popperInstance)==null||pi.forceUpdate(),b("onMount",[y]),y.props.animation&&F()&&at(ht,function(){y.state.isShown=!0,b("onShown",[y])})}},_t()}}function fi(){var O=!y.state.isVisible,Y=y.state.isDestroyed,tt=!y.state.isEnabled,gt=fn(y.props.duration,1,fe.duration);if(!(O||Y||tt)&&(b("onHide",[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,h=!1,a=!1,F()&&(R.style.visibility="hidden"),N(),lt(),H(!0),F()){var ht=w(),qt=ht.box,ue=ht.content;y.props.animation&&(gn([qt,ue],gt),fl([qt,ue],"hidden"))}T(),k(),y.props.animation?F()&&rt(gt,y.unmount):y.unmount()}}function Ss(O){q().addEventListener("mousemove",p),dl(Js,p),p(O)}function Ls(){y.state.isVisible&&y.hide(),y.state.isMounted&&(Tt(),Ot().forEach(function(O){O._tippy.unmount()}),R.parentNode&&R.parentNode.removeChild(R),En=En.filter(function(O){return O!==y}),y.state.isMounted=!1,b("onHidden",[y]))}function Ce(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),vt(),delete r._tippy,y.state.isDestroyed=!0,b("onDestroy",[y]))}}function ai(r,t){t===void 0&&(t={});var e=fe.plugins.concat(t.plugins||[]);Hf();var i=Object.assign({},t,{plugins:e}),s=Mf(r),n=s.reduce(function(a,o){var l=o&&Qf(o,i);return l&&a.push(l),a},[]);return Zs(r)?n[0]:n}ai.defaultProps=fe,ai.setDefaultProps=Yf,ai.currentInput=Se,Object.assign({},Vo,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}}),ai.setDefaultProps({render:Tl});const Zf=5;class Jf{constructor(t){this._caption="",this._currentTime=0,this._activeScenes=[],this._upcomingScenes=[],this._fakeBufferSegments=[],this._canvas=be(),this._controls=be(),this.host=t}set activeScenes(t){if(t!==this._activeScenes){const e=t[0],i=this._activeScenes[0];this._activeScenes=t,e!==i&&(this.host.dispatchEvent(new CustomEvent("scenechange",{detail:t[0]})),this.host.requestUpdate())}}get activeScenes(){return this._activeScenes}set currentTime(t){var e,i,s,n,a;const o=Math.min(this.host.duration,Math.max(0,t));this._currentTime=o,this.activeScenes=((e=this.host.scenes)==null?void 0:e.filter(({start:c,duration:d})=>o>=c&&o<=c+d))??[],this._upcomingScenes=((i=this.host.scenes)==null?void 0:i.filter(({start:c})=>o>=c-Zf&&o<c))??[],this.loadScenes(),this.syncVideoState(),(s=this._controls.value)==null||s.setAttribute("currentTime",o.toString());const l=this.activeScenes[0],h=So((n=l==null?void 0:l.videoMeta)==null?void 0:n.captions);this.caption=((a=h.find(({start:c,end:d})=>{var u;const f=o-l.start+(((u=l.videoMeta)==null?void 0:u.start)??0);return c&&d&&f>=Us(c)&&f<=Us(d)}))==null?void 0:a.text)??"",this.draw(o),!this.host.paused&&!this.host.loading&&!this.host.processing&&!this.host.waiting&&!this.host.stalled&&this.host.dispatchEvent(new CustomEvent("timeupdate",{detail:o}))}get currentTime(){return this._currentTime}set fakeBufferSegments(t){t!==this._fakeBufferSegments&&(this._fakeBufferSegments=t,this.host.requestUpdate())}get fakeBufferSegments(){return this._fakeBufferSegments}set caption(t){t!==this._caption&&(this._caption=t,this.host.requestUpdate())}get caption(){return this._caption}canvas(){return Te(this._canvas)}controls(){return Te(this._controls)}loadScenes(){var t;let e=this.fakeBufferSegments;(t=this.host.scenes)==null||t.forEach(i=>{var s,n;const{start:a,duration:o,video:l,videoMeta:h}=i,c=this.activeScenes.includes(i),d=(this._upcomingScenes.includes(i)||c)&&(this.host.currentTime>0||this.host.preload==="auto"||!this.host.paused);if(l&&h){const{id:u,hls:f,node:p}=l,{start:g,duration:v}=h,E=this.host.videoState[u];p&&E&&(p.currentTime>=g+v||p.ended||d&&(f?(s=f.startLoadOnce)==null||s.call(f,p.currentTime):E.initialised||(n=p.startLoadOnce)==null||n.call(p)))}else if(d){const u={start:Math.max(0,a/this.host.duration*100),end:Math.min((a+o)/this.host.duration*100,100)};this.fakeBufferSegments.find(({start:f})=>f===u.start)||(e=[...e,u])}}),this.fakeBufferSegments=e}syncVideoState(){var t;(t=this.host.scenes)==null||t.forEach(e=>{if(e.video){const{id:i,node:s}=e.video,n=this.host.videoState[i],a=this.activeScenes.includes(e);if(s&&n)if(a&&!this.host.waiting&&!this.host.loading&&!this.host.paused){if(s.paused&&n.initialised)return s.play()}else s.paused||s.pause()}})}draw(t=this.currentTime){var e,i;this.host.sceneConfig&&this._canvas.value&&((i=(e=this.host).compilation)==null||i.call(e,{currentTime:t,scenes:this.host.sceneConfig,canvas:this._canvas.value}))}clear(){var t;const e=this._canvas.value;(t=e==null?void 0:e.getContext("2d"))==null||t.clearRect(0,0,e.width,e.height)}}function tp(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Al={exports:{}};(function(r,t){(function(e){var i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,h,c){if(c=c||{},l=l.trim(),h=h.trim(),!h){if(!c.alwaysNormalize)return l;var d=o.parseURL(l);if(!d)throw new Error("Error trying to parse base URL.");return d.path=o.normalizePath(d.path),o.buildURLFromParts(d)}var u=o.parseURL(h);if(!u)throw new Error("Error trying to parse relative URL.");if(u.scheme)return c.alwaysNormalize?(u.path=o.normalizePath(u.path),o.buildURLFromParts(u)):h;var f=o.parseURL(l);if(!f)throw new Error("Error trying to parse base URL.");if(!f.netLoc&&f.path&&f.path[0]!=="/"){var p=s.exec(f.path);f.netLoc=p[1],f.path=p[2]}f.netLoc&&!f.path&&(f.path="/");var g={scheme:f.scheme,netLoc:u.netLoc,path:null,params:u.params,query:u.query,fragment:u.fragment};if(!u.netLoc&&(g.netLoc=f.netLoc,u.path[0]!=="/"))if(!u.path)g.path=f.path,u.params||(g.params=f.params,u.query||(g.query=f.query));else{var v=f.path,E=v.substring(0,v.lastIndexOf("/")+1)+u.path;g.path=o.normalizePath(E)}return g.path===null&&(g.path=c.alwaysNormalize?o.normalizePath(u.path):u.path),o.buildURLFromParts(g)},parseURL:function(l){var h=i.exec(l);return h?{scheme:h[1]||"",netLoc:h[2]||"",path:h[3]||"",params:h[4]||"",query:h[5]||"",fragment:h[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(n,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};r.exports=o})()})(Al);var bn=Al.exports;function wl(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),e.push.apply(e,i)}return e}function Qt(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?wl(Object(e),!0).forEach(function(i){ep(r,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):wl(Object(e)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(e,i))})}return r}function ep(r,t,e){return t=sp(t),t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function xt(){return xt=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}return r},xt.apply(this,arguments)}function ip(r,t){if(typeof r!="object"||r===null)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var i=e.call(r,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}function sp(r){var t=ip(r,"string");return typeof t=="symbol"?t:String(t)}const z=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)};let m=function(r){return r.MEDIA_ATTACHING="hlsMediaAttaching",r.MEDIA_ATTACHED="hlsMediaAttached",r.MEDIA_DETACHING="hlsMediaDetaching",r.MEDIA_DETACHED="hlsMediaDetached",r.BUFFER_RESET="hlsBufferReset",r.BUFFER_CODECS="hlsBufferCodecs",r.BUFFER_CREATED="hlsBufferCreated",r.BUFFER_APPENDING="hlsBufferAppending",r.BUFFER_APPENDED="hlsBufferAppended",r.BUFFER_EOS="hlsBufferEos",r.BUFFER_FLUSHING="hlsBufferFlushing",r.BUFFER_FLUSHED="hlsBufferFlushed",r.MANIFEST_LOADING="hlsManifestLoading",r.MANIFEST_LOADED="hlsManifestLoaded",r.MANIFEST_PARSED="hlsManifestParsed",r.LEVEL_SWITCHING="hlsLevelSwitching",r.LEVEL_SWITCHED="hlsLevelSwitched",r.LEVEL_LOADING="hlsLevelLoading",r.LEVEL_LOADED="hlsLevelLoaded",r.LEVEL_UPDATED="hlsLevelUpdated",r.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",r.LEVELS_UPDATED="hlsLevelsUpdated",r.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",r.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",r.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",r.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",r.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",r.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",r.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",r.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",r.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",r.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",r.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",r.CUES_PARSED="hlsCuesParsed",r.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",r.INIT_PTS_FOUND="hlsInitPtsFound",r.FRAG_LOADING="hlsFragLoading",r.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",r.FRAG_LOADED="hlsFragLoaded",r.FRAG_DECRYPTED="hlsFragDecrypted",r.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",r.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",r.FRAG_PARSING_METADATA="hlsFragParsingMetadata",r.FRAG_PARSED="hlsFragParsed",r.FRAG_BUFFERED="hlsFragBuffered",r.FRAG_CHANGED="hlsFragChanged",r.FPS_DROP="hlsFpsDrop",r.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",r.ERROR="hlsError",r.DESTROYING="hlsDestroying",r.KEY_LOADING="hlsKeyLoading",r.KEY_LOADED="hlsKeyLoaded",r.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",r.BACK_BUFFER_REACHED="hlsBackBufferReached",r}({}),Q=function(r){return r.NETWORK_ERROR="networkError",r.MEDIA_ERROR="mediaError",r.KEY_SYSTEM_ERROR="keySystemError",r.MUX_ERROR="muxError",r.OTHER_ERROR="otherError",r}({}),$=function(r){return r.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",r.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",r.KEY_SYSTEM_NO_SESSION="keySystemNoSession",r.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",r.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",r.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",r.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",r.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",r.MANIFEST_LOAD_ERROR="manifestLoadError",r.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",r.MANIFEST_PARSING_ERROR="manifestParsingError",r.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",r.LEVEL_EMPTY_ERROR="levelEmptyError",r.LEVEL_LOAD_ERROR="levelLoadError",r.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",r.LEVEL_PARSING_ERROR="levelParsingError",r.LEVEL_SWITCH_ERROR="levelSwitchError",r.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",r.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",r.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",r.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",r.FRAG_LOAD_ERROR="fragLoadError",r.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",r.FRAG_DECRYPT_ERROR="fragDecryptError",r.FRAG_PARSING_ERROR="fragParsingError",r.FRAG_GAP="fragGap",r.REMUX_ALLOC_ERROR="remuxAllocError",r.KEY_LOAD_ERROR="keyLoadError",r.KEY_LOAD_TIMEOUT="keyLoadTimeOut",r.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",r.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",r.BUFFER_APPEND_ERROR="bufferAppendError",r.BUFFER_APPENDING_ERROR="bufferAppendingError",r.BUFFER_STALLED_ERROR="bufferStalledError",r.BUFFER_FULL_ERROR="bufferFullError",r.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",r.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",r.INTERNAL_EXCEPTION="internalException",r.INTERNAL_ABORTED="aborted",r.UNKNOWN="unknown",r}({});const oi=function(){},Tn={trace:oi,debug:oi,log:oi,warn:oi,info:oi,error:oi};let fs=Tn;function rp(r){const t=self.console[r];return t?t.bind(self.console,`[${r}] >`):oi}function np(r,...t){t.forEach(function(e){fs[e]=r[e]?r[e].bind(r):rp(e)})}function ap(r,t){if(self.console&&r===!0||typeof r=="object"){np(r,"debug","log","info","warn","error");try{fs.log(`Debug logs enabled for "${t}" in hls.js version 1.4.12`)}catch{fs=Tn}}else fs=Tn}const _=fs,op=/^(\d+)x(\d+)$/,Sl=/(.+?)=(".*?"|.*?)(?:,|$)/g;class St{constructor(t){typeof t=="string"&&(t=St.parseAttrList(t));for(const e in t)t.hasOwnProperty(e)&&(e.substring(0,2)==="X-"&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(e)),this[e]=t[e])}decimalInteger(t){const e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e}hexadecimalInteger(t){if(this[t]){let e=(this[t]||"0x").slice(2);e=(e.length&1?"0":"")+e;const i=new Uint8Array(e.length/2);for(let s=0;s<e.length/2;s++)i[s]=parseInt(e.slice(s*2,s*2+2),16);return i}else return null}hexadecimalIntegerAsNumber(t){const e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e}decimalFloatingPoint(t){return parseFloat(this[t])}optionalFloat(t,e){const i=this[t];return i?parseFloat(i):e}enumeratedString(t){return this[t]}bool(t){return this[t]==="YES"}decimalResolution(t){const e=op.exec(this[t]);if(e!==null)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}}static parseAttrList(t){let e;const i={},s='"';for(Sl.lastIndex=0;(e=Sl.exec(t))!==null;){let n=e[2];n.indexOf(s)===0&&n.lastIndexOf(s)===n.length-1&&(n=n.slice(1,-1));const a=e[1].trim();i[a]=n}return i}}function lp(r){return r!=="ID"&&r!=="CLASS"&&r!=="START-DATE"&&r!=="DURATION"&&r!=="END-DATE"&&r!=="END-ON-NEXT"}function hp(r){return r==="SCTE35-OUT"||r==="SCTE35-IN"}class Ll{constructor(t,e){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,e){const i=e.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(t,s)&&t[s]!==i[s]){_.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${t.ID}"`),this._badValueForSameId=s;break}t=xt(new St({}),i,t)}if(this.attr=t,this._startDate=new Date(t["START-DATE"]),"END-DATE"in this.attr){const i=new Date(this.attr["END-DATE"]);z(i.getTime())&&(this._endDate=i)}}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 t=this.duration;return t!==null?new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const t=this.attr.decimalFloatingPoint("DURATION");if(z(t))return t}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&&z(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class tr{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 mt={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class Rl{constructor(t){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[mt.AUDIO]:null,[mt.VIDEO]:null,[mt.AUDIOVIDEO]:null},this.baseurl=t}setByteRange(t,e){const i=t.split("@",2),s=[];i.length===1?s[0]=e?e.byteRangeEndOffset:0:s[0]=parseInt(i[1]),s[1]=parseInt(i[0])+s[0],this._byteRange=s}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=bn.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(t){this._url=t}}class An extends Rl{constructor(t,e){super(e),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 tr,this.urlId=0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.type=t}get decryptdata(){const{levelkeys:t}=this;if(!t&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const i=Object.keys(this.levelkeys);if(i.length===1)return this._decryptdata=this.levelkeys[i[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!z(this.programDateTime))return null;const t=z(this.duration)?this.duration:0;return this.programDateTime+t*1e3}get encrypted(){var t;if((t=this._decryptdata)!=null&&t.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),i=e.length;if(i>1||i===1&&this.levelkeys[e[0]].encrypted)return!0}return!1}setKeyFormat(t){if(this.levelkeys){const e=this.levelkeys[t];e&&!this._decryptdata&&(this._decryptdata=e.getDecryptData(this.sn))}}abortRequests(){var t,e;(t=this.loader)==null||t.abort(),(e=this.keyLoader)==null||e.abort()}setElementaryStreamInfo(t,e,i,s,n,a=!1){const{elementaryStreams:o}=this,l=o[t];if(!l){o[t]={startPTS:e,endPTS:i,startDTS:s,endDTS:n,partial:a};return}l.startPTS=Math.min(l.startPTS,e),l.endPTS=Math.max(l.endPTS,i),l.startDTS=Math.min(l.startDTS,s),l.endDTS=Math.max(l.endDTS,n)}clearElementaryStreamInfo(){const{elementaryStreams:t}=this;t[mt.AUDIO]=null,t[mt.VIDEO]=null,t[mt.AUDIOVIDEO]=null}}class cp extends Rl{constructor(t,e,i,s,n){super(i),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 tr,this.duration=t.decimalFloatingPoint("DURATION"),this.gap=t.bool("GAP"),this.independent=t.bool("INDEPENDENT"),this.relurl=t.enumeratedString("URI"),this.fragment=e,this.index=s;const a=t.enumeratedString("BYTERANGE");a&&this.setByteRange(a,n),n&&(this.fragOffset=n.fragOffset+n.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:t}=this;return!!(t.audio||t.video||t.audiovideo)}}const dp=10;class up{constructor(t){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=t}reloaded(t){if(!t){this.advanced=!0,this.updated=!0;return}const e=this.lastPartSn-t.lastPartSn,i=this.lastPartIndex-t.lastPartIndex;this.updated=this.endSN!==t.endSN||!!i||!!e||!this.live,this.advanced=this.endSN>t.endSN||e>0||e===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(t.misses*.6):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?z(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||dp}get drift(){const t=this.driftEndTime-this.driftStartTime;return t>0?(this.driftEnd-this.driftStart)*1e3/t:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var t;return(t=this.partList)!=null&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var t;return(t=this.fragments)!=null&&t.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 t;return(t=this.partList)!=null&&t.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var t;return(t=this.partList)!=null&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function wn(r){return Uint8Array.from(atob(r),t=>t.charCodeAt(0))}function fp(r){const t=_l(r).subarray(0,16),e=new Uint8Array(16);return e.set(t,16-t.length),e}function pp(r){const t=function(e,i,s){const n=e[i];e[i]=e[s],e[s]=n};t(r,0,3),t(r,1,2),t(r,4,5),t(r,6,7)}function gp(r){const t=r.split(":");let e=null;if(t[0]==="data"&&t.length===2){const i=t[1].split(";"),s=i[i.length-1].split(",");if(s.length===2){const n=s[0]==="base64",a=s[1];n?(i.splice(-1,1),e=wn(a)):e=fp(a)}}return e}function _l(r){return Uint8Array.from(unescape(encodeURIComponent(r)),t=>t.charCodeAt(0))}var Lt={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Zt={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function kl(r){switch(r){case Zt.FAIRPLAY:return Lt.FAIRPLAY;case Zt.PLAYREADY:return Lt.PLAYREADY;case Zt.WIDEVINE:return Lt.WIDEVINE;case Zt.CLEARKEY:return Lt.CLEARKEY}}var Il={WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function mp(r){if(r===Il.WIDEVINE)return Lt.WIDEVINE}function Dl(r){switch(r){case Lt.FAIRPLAY:return Zt.FAIRPLAY;case Lt.PLAYREADY:return Zt.PLAYREADY;case Lt.WIDEVINE:return Zt.WIDEVINE;case Lt.CLEARKEY:return Zt.CLEARKEY}}function Sn(r){const{drmSystems:t,widevineLicenseUrl:e}=r,i=t?[Lt.FAIRPLAY,Lt.WIDEVINE,Lt.PLAYREADY,Lt.CLEARKEY].filter(s=>!!t[s]):[];return!i[Lt.WIDEVINE]&&e&&i.push(Lt.WIDEVINE),i}const Cl=function(){return typeof self<"u"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function vp(r,t,e,i){let s;switch(r){case Lt.FAIRPLAY:s=["cenc","sinf"];break;case Lt.WIDEVINE:case Lt.PLAYREADY:s=["cenc"];break;case Lt.CLEARKEY:s=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${r}`)}return yp(s,t,e,i)}function yp(r,t,e,i){return[{initDataTypes:r,persistentState:i.persistentState||"not-allowed",distinctiveIdentifier:i.distinctiveIdentifier||"not-allowed",sessionTypes:i.sessionTypes||[i.sessionType||"temporary"],audioCapabilities:t.map(s=>({contentType:`audio/mp4; codecs="${s}"`,robustness:i.audioRobustness||"",encryptionScheme:i.audioEncryptionScheme||null})),videoCapabilities:e.map(s=>({contentType:`video/mp4; codecs="${s}"`,robustness:i.videoRobustness||"",encryptionScheme:i.videoEncryptionScheme||null}))}]}function li(r,t,e){return Uint8Array.prototype.slice?r.slice(t,e):new Uint8Array(Array.prototype.slice.call(r,t,e))}const Ln=(r,t)=>t+10<=r.length&&r[t]===73&&r[t+1]===68&&r[t+2]===51&&r[t+3]<255&&r[t+4]<255&&r[t+6]<128&&r[t+7]<128&&r[t+8]<128&&r[t+9]<128,xl=(r,t)=>t+10<=r.length&&r[t]===51&&r[t+1]===68&&r[t+2]===73&&r[t+3]<255&&r[t+4]<255&&r[t+6]<128&&r[t+7]<128&&r[t+8]<128&&r[t+9]<128,er=(r,t)=>{const e=t;let i=0;for(;Ln(r,t);){i+=10;const s=ir(r,t+6);i+=s,xl(r,t+10)&&(i+=10),t+=i}if(i>0)return r.subarray(e,e+i)},ir=(r,t)=>{let e=0;return e=(r[t]&127)<<21,e|=(r[t+1]&127)<<14,e|=(r[t+2]&127)<<7,e|=r[t+3]&127,e},Ep=(r,t)=>Ln(r,t)&&ir(r,t+6)+10<=r.length-t,bp=r=>{const t=Ol(r);for(let e=0;e<t.length;e++){const i=t[e];if(Pl(i))return Rp(i)}},Pl=r=>r&&r.key==="PRIV"&&r.info==="com.apple.streaming.transportStreamTimestamp",Tp=r=>{const t=String.fromCharCode(r[0],r[1],r[2],r[3]),e=ir(r,4),i=10;return{type:t,size:e,data:r.subarray(i,i+e)}},Ol=r=>{let t=0;const e=[];for(;Ln(r,t);){const i=ir(r,t+6);t+=10;const s=t+i;for(;t+8<s;){const n=Tp(r.subarray(t)),a=Ap(n);a&&e.push(a),t+=n.size+10}xl(r,t)&&(t+=10)}return e},Ap=r=>r.type==="PRIV"?wp(r):r.type[0]==="W"?Lp(r):Sp(r),wp=r=>{if(r.size<2)return;const t=Le(r.data,!0),e=new Uint8Array(r.data.subarray(t.length+1));return{key:r.type,info:t,data:e.buffer}},Sp=r=>{if(r.size<2)return;if(r.type==="TXXX"){let e=1;const i=Le(r.data.subarray(e),!0);e+=i.length+1;const s=Le(r.data.subarray(e));return{key:r.type,info:i,data:s}}const t=Le(r.data.subarray(1));return{key:r.type,data:t}},Lp=r=>{if(r.type==="WXXX"){if(r.size<2)return;let e=1;const i=Le(r.data.subarray(e),!0);e+=i.length+1;const s=Le(r.data.subarray(e));return{key:r.type,info:i,data:s}}const t=Le(r.data);return{key:r.type,data:t}},Rp=r=>{if(r.data.byteLength===8){const t=new Uint8Array(r.data),e=t[3]&1;let i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,e&&(i+=4772185884e-2),Math.round(i)}},Le=(r,t=!1)=>{const e=_p();if(e){const h=e.decode(r);if(t){const c=h.indexOf("\0");return c!==-1?h.substring(0,c):h}return h.replace(/\0/g,"")}const i=r.length;let s,n,a,o="",l=0;for(;l<i;){if(s=r[l++],s===0&&t)return o;if(!(s===0||s===3))switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(s);break;case 12:case 13:n=r[l++],o+=String.fromCharCode((s&31)<<6|n&63);break;case 14:n=r[l++],a=r[l++],o+=String.fromCharCode((s&15)<<12|(n&63)<<6|(a&63)<<0);break}}return o};let Rn;function _p(){return!Rn&&typeof self.TextDecoder<"u"&&(Rn=new self.TextDecoder("utf-8")),Rn}const Re={hexDump:function(r){let t="";for(let e=0;e<r.length;e++){let i=r[e].toString(16);i.length<2&&(i="0"+i),t+=i}return t}},sr=Math.pow(2,32)-1,kp=[].push,$l={video:1,audio:2,id3:3,text:4};function Ut(r){return String.fromCharCode.apply(null,r)}function Ml(r,t){const e=r[t]<<8|r[t+1];return e<0?65536+e:e}function J(r,t){const e=Fl(r,t);return e<0?4294967296+e:e}function Fl(r,t){return r[t]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3]}function _n(r,t,e){r[t]=e>>24,r[t+1]=e>>16&255,r[t+2]=e>>8&255,r[t+3]=e&255}function ot(r,t){const e=[];if(!t.length)return e;const i=r.byteLength;for(let s=0;s<i;){const n=J(r,s),a=Ut(r.subarray(s+4,s+8)),o=n>1?s+n:i;if(a===t[0])if(t.length===1)e.push(r.subarray(s+8,o));else{const l=ot(r.subarray(s+8,o),t.slice(1));l.length&&kp.apply(e,l)}s=o}return e}function Ip(r){const t=[],e=r[0];let i=8;const s=J(r,i);i+=4;const n=0,a=0;e===0?i+=8:i+=16,i+=2;let o=r.length+a;const l=Ml(r,i);i+=2;for(let h=0;h<l;h++){let c=i;const d=J(r,c);c+=4;const u=d&2147483647;if((d&2147483648)>>>31===1)return _.warn("SIDX has hierarchical references (not supported)"),null;const f=J(r,c);c+=4,t.push({referenceSize:u,subsegmentDuration:f,info:{duration:f/s,start:o,end:o+u-1}}),o+=u,c+=4,i=c}return{earliestPresentationTime:n,timescale:s,version:e,referencesCount:l,references:t}}function Nl(r){const t=[],e=ot(r,["moov","trak"]);for(let i=0;i<e.length;i++){const s=e[i],n=ot(s,["tkhd"])[0];if(n){let a=n[0],o=a===0?12:20;const l=J(n,o),h=ot(s,["mdia","mdhd"])[0];if(h){a=h[0],o=a===0?12:20;const c=J(h,o),d=ot(s,["mdia","hdlr"])[0];if(d){const u=Ut(d.subarray(8,12)),f={soun:mt.AUDIO,vide:mt.VIDEO}[u];if(f){const p=ot(s,["mdia","minf","stbl","stsd"])[0];let g;p&&(g=Ut(p.subarray(12,16))),t[l]={timescale:c,type:f},t[f]={timescale:c,id:l,codec:g}}}}}}return ot(r,["moov","mvex","trex"]).forEach(i=>{const s=J(i,4),n=t[s];n&&(n.default={duration:J(i,12),flags:J(i,20)})}),t}function Dp(r,t){if(!r||!t)return r;const e=t.keyId;return e&&t.isCommonEncryption&&ot(r,["moov","trak"]).forEach(i=>{const s=ot(i,["mdia","minf","stbl","stsd"])[0].subarray(8);let n=ot(s,["enca"]);const a=n.length>0;a||(n=ot(s,["encv"])),n.forEach(o=>{const l=a?o.subarray(28):o.subarray(78);ot(l,["sinf"]).forEach(h=>{const c=Ul(h);if(c){const d=c.subarray(8,24);d.some(u=>u!==0)||(_.log(`[eme] Patching keyId in 'enc${a?"a":"v"}>sinf>>tenc' box: ${Re.hexDump(d)} -> ${Re.hexDump(e)}`),c.set(e,8))}})})}),r}function Ul(r){const t=ot(r,["schm"])[0];if(t){const e=Ut(t.subarray(4,8));if(e==="cbcs"||e==="cenc")return ot(r,["schi","tenc"])[0]}return _.error("[eme] missing 'schm' box"),null}function Cp(r,t){return ot(t,["moof","traf"]).reduce((e,i)=>{const s=ot(i,["tfdt"])[0],n=s[0],a=ot(i,["tfhd"]).reduce((o,l)=>{const h=J(l,4),c=r[h];if(c){let d=J(s,4);if(n===1){if(d===sr)return _.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),o;d*=sr+1,d+=J(s,8)}const u=c.timescale||9e4,f=d/u;if(isFinite(f)&&(o===null||f<o))return f}return o},null);return a!==null&&isFinite(a)&&(e===null||a<e)?a:e},null)}function xp(r,t){let e=0,i=0,s=0;const n=ot(r,["moof","traf"]);for(let a=0;a<n.length;a++){const o=n[a],l=ot(o,["tfhd"])[0],h=J(l,4),c=t[h];if(!c)continue;const d=c.default,u=J(l,0)|(d==null?void 0:d.flags);let f=d==null?void 0:d.duration;u&8&&(u&2?f=J(l,12):f=J(l,8));const p=c.timescale||9e4,g=ot(o,["trun"]);for(let v=0;v<g.length;v++){if(e=Pp(g[v]),!e&&f){const E=J(g[v],4);e=f*E}c.type===mt.VIDEO?i+=e/p:c.type===mt.AUDIO&&(s+=e/p)}}if(i===0&&s===0){let a=0;const o=ot(r,["sidx"]);for(let l=0;l<o.length;l++){const h=Ip(o[l]);h!=null&&h.references&&(a+=h.references.reduce((c,d)=>c+d.info.duration||0,0))}return a}return i||s}function Pp(r){const t=J(r,0);let e=8;t&1&&(e+=4),t&4&&(e+=4);let i=0;const s=J(r,4);for(let n=0;n<s;n++){if(t&256){const a=J(r,e);i+=a,e+=4}t&512&&(e+=4),t&1024&&(e+=4),t&2048&&(e+=4)}return i}function Op(r,t,e){ot(t,["moof","traf"]).forEach(i=>{ot(i,["tfhd"]).forEach(s=>{const n=J(s,4),a=r[n];if(!a)return;const o=a.timescale||9e4;ot(i,["tfdt"]).forEach(l=>{const h=l[0];let c=J(l,4);if(h===0)c-=e*o,c=Math.max(c,0),_n(l,4,c);else{c*=Math.pow(2,32),c+=J(l,8),c-=e*o,c=Math.max(c,0);const d=Math.floor(c/(sr+1)),u=Math.floor(c%(sr+1));_n(l,4,d),_n(l,8,u)}})})})}function $p(r){const t={valid:null,remainder:null},e=ot(r,["moof"]);if(e){if(e.length<2)return t.remainder=r,t}else return t;const i=e[e.length-1];return t.valid=li(r,0,i.byteOffset-8),t.remainder=li(r,i.byteOffset-8),t}function hi(r,t){const e=new Uint8Array(r.length+t.length);return e.set(r),e.set(t,r.length),e}function Bl(r,t){const e=[],i=t.samples,s=t.timescale,n=t.id;let a=!1;return ot(i,["moof"]).map(o=>{const l=o.byteOffset-8;ot(o,["traf"]).map(h=>{const c=ot(h,["tfdt"]).map(d=>{const u=d[0];let f=J(d,4);return u===1&&(f*=Math.pow(2,32),f+=J(d,8)),f/s})[0];return c!==void 0&&(r=c),ot(h,["tfhd"]).map(d=>{const u=J(d,4),f=J(d,0)&16777215,p=(f&1)!==0,g=(f&2)!==0,v=(f&8)!==0;let E=0;const A=(f&16)!==0;let L=0;const y=(f&32)!==0;let S=8;u===n&&(p&&(S+=8),g&&(S+=4),v&&(E=J(d,S),S+=4),A&&(L=J(d,S),S+=4),y&&(S+=4),t.type==="video"&&(a=Mp(t.codec)),ot(h,["trun"]).map(R=>{const D=R[0],M=J(R,0)&16777215,C=(M&1)!==0;let I=0;const G=(M&4)!==0,F=(M&256)!==0;let V=0;const q=(M&512)!==0;let w=0;const P=(M&1024)!==0,H=(M&2048)!==0;let b=0;const T=J(R,4);let k=8;C&&(I=J(R,k),k+=4),G&&(k+=4);let N=I+l;for(let U=0;U<T;U++){if(F?(V=J(R,k),k+=4):V=E,q?(w=J(R,k),k+=4):w=L,P&&(k+=4),H&&(D===0?b=J(R,k):b=Fl(R,k),k+=4),t.type===mt.VIDEO){let K=0;for(;K<w;){const W=J(i,N);if(N+=4,Fp(a,i[N])){const X=i.subarray(N,N+W);Hl(X,a?2:1,r+b/s,e)}N+=W,K+=W+4}}r+=V/s}}))})})}),e}function Mp(r){if(!r)return!1;const t=r.indexOf("."),e=t<0?r:r.substring(0,t);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Fp(r,t){if(r){const e=t>>1&63;return e===39||e===40}else return(t&31)===6}function Hl(r,t,e,i){const s=Gl(r);let n=0;n+=t;let a=0,o=0,l=!1,h=0;for(;n<s.length;){a=0;do{if(n>=s.length)break;h=s[n++],a+=h}while(h===255);o=0;do{if(n>=s.length)break;h=s[n++],o+=h}while(h===255);const c=s.length-n;if(!l&&a===4&&n<s.length){if(l=!0,s[n++]===181){const d=Ml(s,n);if(n+=2,d===49){const u=J(s,n);if(n+=4,u===1195456820){const f=s[n++];if(f===3){const p=s[n++],g=31&p,v=64&p,E=v?2+g*3:0,A=new Uint8Array(E);if(v){A[0]=p;for(let L=1;L<E;L++)A[L]=s[n++]}i.push({type:f,payloadType:a,pts:e,bytes:A})}}}}}else if(a===5&&o<c){if(l=!0,o>16){const d=[];for(let p=0;p<16;p++){const g=s[n++].toString(16);d.push(g.length==1?"0"+g:g),(p===3||p===5||p===7||p===9)&&d.push("-")}const u=o-16,f=new Uint8Array(u);for(let p=0;p<u;p++)f[p]=s[n++];i.push({payloadType:a,pts:e,uuid:d.join(""),userData:Le(f),userDataBytes:f})}}else if(o<c)n+=o;else if(o>c)break}}function Gl(r){const t=r.byteLength,e=[];let i=1;for(;i<t-2;)r[i]===0&&r[i+1]===0&&r[i+2]===3?(e.push(i+2),i+=2):i++;if(e.length===0)return r;const s=t-e.length,n=new Uint8Array(s);let a=0;for(i=0;i<s;a++,i++)a===e[0]&&(a++,e.shift()),n[i]=r[a];return n}function Np(r){const t=r[0];let e="",i="",s=0,n=0,a=0,o=0,l=0,h=0;if(t===0){for(;Ut(r.subarray(h,h+1))!=="\0";)e+=Ut(r.subarray(h,h+1)),h+=1;for(e+=Ut(r.subarray(h,h+1)),h+=1;Ut(r.subarray(h,h+1))!=="\0";)i+=Ut(r.subarray(h,h+1)),h+=1;i+=Ut(r.subarray(h,h+1)),h+=1,s=J(r,12),n=J(r,16),o=J(r,20),l=J(r,24),h=28}else if(t===1){h+=4,s=J(r,h),h+=4;const d=J(r,h);h+=4;const u=J(r,h);for(h+=4,a=4294967296*d+u,Number.isSafeInteger(a)||(a=Number.MAX_SAFE_INTEGER,_.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=J(r,h),h+=4,l=J(r,h),h+=4;Ut(r.subarray(h,h+1))!=="\0";)e+=Ut(r.subarray(h,h+1)),h+=1;for(e+=Ut(r.subarray(h,h+1)),h+=1;Ut(r.subarray(h,h+1))!=="\0";)i+=Ut(r.subarray(h,h+1)),h+=1;i+=Ut(r.subarray(h,h+1)),h+=1}const c=r.subarray(h,r.byteLength);return{schemeIdUri:e,value:i,timeScale:s,presentationTime:a,presentationTimeDelta:n,eventDuration:o,id:l,payload:c}}function Up(r,...t){const e=t.length;let i=8,s=e;for(;s--;)i+=t[s].byteLength;const n=new Uint8Array(i);for(n[0]=i>>24&255,n[1]=i>>16&255,n[2]=i>>8&255,n[3]=i&255,n.set(r,4),s=0,i=8;s<e;s++)n.set(t[s],i),i+=t[s].byteLength;return n}function Bp(r,t,e){if(r.byteLength!==16)throw new RangeError("Invalid system id");let i,s;if(t){i=1,s=new Uint8Array(t.length*16);for(let o=0;o<t.length;o++){const l=t[o];if(l.byteLength!==16)throw new RangeError("Invalid key");s.set(l,o*16)}}else i=0,s=new Uint8Array;let n;i>0?(n=new Uint8Array(4),t.length>0&&new DataView(n.buffer).setUint32(0,t.length,!1)):n=new Uint8Array;const a=new Uint8Array(4);return e&&e.byteLength>0&&new DataView(a.buffer).setUint32(0,e.byteLength,!1),Up([112,115,115,104],new Uint8Array([i,0,0,0]),r,n,s,a,e||new Uint8Array)}function Hp(r){if(!(r instanceof ArrayBuffer)||r.byteLength<32)return null;const t={version:0,systemId:"",kids:null,data:null},e=new DataView(r),i=e.getUint32(0);if(r.byteLength!==i&&i>44||e.getUint32(4)!==1886614376||(t.version=e.getUint32(8)>>>24,t.version>1))return null;t.systemId=Re.hexDump(new Uint8Array(r,12,16));const s=e.getUint32(28);if(t.version===0){if(i-32<s)return null;t.data=new Uint8Array(r,32,s)}else if(t.version===1){t.kids=[];for(let n=0;n<s;n++)t.kids.push(new Uint8Array(r,32+n*16,16))}return t}let rr={};class ps{static clearKeyUriToKeyIdMap(){rr={}}constructor(t,e,i,s=[1],n=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=t,this.uri=e,this.keyFormat=i,this.keyFormatVersions=s,this.iv=n,this.encrypted=t?t!=="NONE":!1,this.isCommonEncryption=this.encrypted&&t!=="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 Zt.FAIRPLAY:case Zt.WIDEVINE:case Zt.PLAYREADY:case Zt.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(t){if(!this.encrypted||!this.uri)return null;if(this.method==="AES-128"&&this.uri&&!this.iv){typeof t!="number"&&(this.method==="AES-128"&&!this.iv&&_.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),t=0);const i=Gp(t);return new ps(this.method,this.uri,"identity",this.keyFormatVersions,i)}const e=gp(this.uri);if(e)switch(this.keyFormat){case Zt.WIDEVINE:this.pssh=e,e.length>=22&&(this.keyId=e.subarray(e.length-22,e.length-6));break;case Zt.PLAYREADY:{const i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Bp(i,null,e);const s=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),n=String.fromCharCode.apply(null,Array.from(s)),a=n.substring(n.indexOf("<"),n.length),o=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("KID")[0];if(o){const l=o.childNodes[0]?o.childNodes[0].nodeValue:o.getAttribute("VALUE");if(l){const h=wn(l).subarray(0,16);pp(h),this.keyId=h}}break}default:{let i=e.subarray(0,16);if(i.length!==16){const s=new Uint8Array(16);s.set(i,16-i.length),i=s}this.keyId=i;break}}if(!this.keyId||this.keyId.byteLength!==16){let i=rr[this.uri];if(!i){const s=Object.keys(rr).length%Number.MAX_SAFE_INTEGER;i=new Uint8Array(16),new DataView(i.buffer,12,4).setUint32(0,s),rr[this.uri]=i}this.keyId=i}return this}}function Gp(r){const t=new Uint8Array(16);for(let e=12;e<16;e++)t[e]=r>>8*(15-e)&255;return t}const Vl=/\{\$([a-zA-Z0-9-_]+)\}/g;function Kl(r){return Vl.test(r)}function Jt(r,t,e){if(r.variableList!==null||r.hasVariableRefs)for(let i=e.length;i--;){const s=e[i],n=t[s];n&&(t[s]=kn(r,n))}}function kn(r,t){if(r.variableList!==null||r.hasVariableRefs){const e=r.variableList;return t.replace(Vl,i=>{const s=i.substring(2,i.length-1),n=e==null?void 0:e[s];return n===void 0?(r.playlistParsingError||(r.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),i):n})}return t}function jl(r,t,e){let i=r.variableList;i||(r.variableList=i={});let s,n;if("QUERYPARAM"in t){s=t.QUERYPARAM;try{const a=new self.URL(e).searchParams;if(a.has(s))n=a.get(s);else throw new Error(`"${s}" does not match any query parameter in URI: "${e}"`)}catch(a){r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${a.message}`))}}else s=t.NAME,n=t.VALUE;s in i?r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):i[s]=n||""}function Vp(r,t,e){const i=t.IMPORT;if(e&&i in e){let s=r.variableList;s||(r.variableList=s={}),s[i]=e[i]}else r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${i}"`))}function nr(){if(!(typeof self>"u"))return self.MediaSource||self.WebKitMediaSource}const Kp={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},Wl=nr();function jp(r,t){const e=Kp[t];return!!e&&e[r.slice(0,4)]===!0}function In(r,t){var e;return(e=Wl==null?void 0:Wl.isTypeSupported(`${t||"video"}/mp4;codecs="${r}"`))!=null?e:!1}const Yl=/#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,ql=/#EXT-X-MEDIA:(.*)/g,Wp=/^#EXT(?:INF|-X-TARGETDURATION):/m,zl=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Yp=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)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class pe{static findGroup(t,e){for(let i=0;i<t.length;i++){const s=t[i];if(s.id===e)return s}}static convertAVC1ToAVCOTI(t){const e=t.split(".");if(e.length>2){let i=e.shift()+".";return i+=parseInt(e.shift()).toString(16),i+=("000"+parseInt(e.shift()).toString(16)).slice(-4),i}return t}static resolve(t,e){return bn.buildAbsoluteURL(e,t,{alwaysNormalize:!0})}static isMediaPlaylist(t){return Wp.test(t)}static parseMasterPlaylist(t,e){const i=Kl(t),s={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:i},n=[];Yl.lastIndex=0;let a;for(;(a=Yl.exec(t))!=null;)if(a[1]){var o;const h=new St(a[1]);Jt(s,h,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const c=kn(s,a[2]),d={attrs:h,bitrate:h.decimalInteger("AVERAGE-BANDWIDTH")||h.decimalInteger("BANDWIDTH"),name:h.NAME,url:pe.resolve(c,e)},u=h.decimalResolution("RESOLUTION");u&&(d.width=u.width,d.height=u.height),qp((h.CODECS||"").split(/[ ,]+/).filter(f=>f),d),d.videoCodec&&d.videoCodec.indexOf("avc1")!==-1&&(d.videoCodec=pe.convertAVC1ToAVCOTI(d.videoCodec)),(o=d.unknownCodecs)!=null&&o.length||n.push(d),s.levels.push(d)}else if(a[3]){const h=a[3],c=a[4];switch(h){case"SESSION-DATA":{const d=new St(c);Jt(s,d,["DATA-ID","LANGUAGE","VALUE","URI"]);const u=d["DATA-ID"];u&&(s.sessionData===null&&(s.sessionData={}),s.sessionData[u]=d);break}case"SESSION-KEY":{const d=Xl(c,e,s);d.encrypted&&d.isSupported()?(s.sessionKeys===null&&(s.sessionKeys=[]),s.sessionKeys.push(d)):_.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${c}"`);break}case"DEFINE":{{const d=new St(c);Jt(s,d,["NAME","VALUE","QUERYPARAM"]),jl(s,d,e)}break}case"CONTENT-STEERING":{const d=new St(c);Jt(s,d,["SERVER-URI","PATHWAY-ID"]),s.contentSteering={uri:pe.resolve(d["SERVER-URI"],e),pathwayId:d["PATHWAY-ID"]||"."};break}case"START":{s.startTimeOffset=Ql(c);break}}}const l=n.length>0&&n.length<s.levels.length;return s.levels=l?n:s.levels,s.levels.length===0&&(s.playlistParsingError=new Error("no levels found in manifest")),s}static parseMasterPlaylistMedia(t,e,i){let s;const n={},a=i.levels,o={AUDIO:a.map(h=>({id:h.attrs.AUDIO,audioCodec:h.audioCodec})),SUBTITLES:a.map(h=>({id:h.attrs.SUBTITLES,textCodec:h.textCodec})),"CLOSED-CAPTIONS":[]};let l=0;for(ql.lastIndex=0;(s=ql.exec(t))!==null;){const h=new St(s[1]),c=h.TYPE;if(c){const d=o[c],u=n[c]||[];n[c]=u,Jt(i,h,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const f={attrs:h,bitrate:0,id:l++,groupId:h["GROUP-ID"]||"",instreamId:h["INSTREAM-ID"],name:h.NAME||h.LANGUAGE||"",type:c,default:h.bool("DEFAULT"),autoselect:h.bool("AUTOSELECT"),forced:h.bool("FORCED"),lang:h.LANGUAGE,url:h.URI?pe.resolve(h.URI,e):""};if(d!=null&&d.length){const p=pe.findGroup(d,f.groupId)||d[0];Zl(f,p,"audioCodec"),Zl(f,p,"textCodec")}u.push(f)}}return n}static parseLevelPlaylist(t,e,i,s,n,a){const o=new up(e),l=o.fragments;let h=null,c=0,d=0,u=0,f=0,p=null,g=new An(s,e),v,E,A,L=-1,y=!1;for(zl.lastIndex=0,o.m3u8=t,o.hasVariableRefs=Kl(t);(v=zl.exec(t))!==null;){y&&(y=!1,g=new An(s,e),g.start=u,g.sn=c,g.cc=f,g.level=i,h&&(g.initSegment=h,g.rawProgramDateTime=h.rawProgramDateTime,h.rawProgramDateTime=null));const M=v[1];if(M){g.duration=parseFloat(M);const C=(" "+v[2]).slice(1);g.title=C||null,g.tagList.push(C?["INF",M,C]:["INF",M])}else if(v[3]){if(z(g.duration)){g.start=u,A&&eh(g,A,o),g.sn=c,g.level=i,g.cc=f,g.urlId=n,l.push(g);const C=(" "+v[3]).slice(1);g.relurl=kn(o,C),Jl(g,p),p=g,u+=g.duration,c++,d=0,y=!0}}else if(v[4]){const C=(" "+v[4]).slice(1);p?g.setByteRange(C,p):g.setByteRange(C)}else if(v[5])g.rawProgramDateTime=(" "+v[5]).slice(1),g.tagList.push(["PROGRAM-DATE-TIME",g.rawProgramDateTime]),L===-1&&(L=l.length);else{if(v=v[0].match(Yp),!v){_.warn("No matches on slow regex match for level playlist!");continue}for(E=1;E<v.length&&!(typeof v[E]<"u");E++);const C=(" "+v[E]).slice(1),I=(" "+v[E+1]).slice(1),G=v[E+2]?(" "+v[E+2]).slice(1):"";switch(C){case"PLAYLIST-TYPE":o.type=I.toUpperCase();break;case"MEDIA-SEQUENCE":c=o.startSN=parseInt(I);break;case"SKIP":{const F=new St(I);Jt(o,F,["RECENTLY-REMOVED-DATERANGES"]);const V=F.decimalInteger("SKIPPED-SEGMENTS");if(z(V)){o.skippedSegments=V;for(let w=V;w--;)l.unshift(null);c+=V}const q=F.enumeratedString("RECENTLY-REMOVED-DATERANGES");q&&(o.recentlyRemovedDateranges=q.split(" "));break}case"TARGETDURATION":o.targetduration=Math.max(parseInt(I),1);break;case"VERSION":o.version=parseInt(I);break;case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"#":(I||G)&&g.tagList.push(G?[I,G]:[I]);break;case"DISCONTINUITY":f++,g.tagList.push(["DIS"]);break;case"GAP":g.gap=!0,g.tagList.push([C]);break;case"BITRATE":g.tagList.push([C,I]);break;case"DATERANGE":{const F=new St(I);Jt(o,F,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Jt(o,F,F.clientAttrs);const V=new Ll(F,o.dateRanges[F.ID]);V.isValid||o.skippedSegments?o.dateRanges[V.id]=V:_.warn(`Ignoring invalid DATERANGE tag: "${I}"`),g.tagList.push(["EXT-X-DATERANGE",I]);break}case"DEFINE":{{const F=new St(I);Jt(o,F,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in F?Vp(o,F,a):jl(o,F,e)}break}case"DISCONTINUITY-SEQUENCE":f=parseInt(I);break;case"KEY":{const F=Xl(I,e,o);if(F.isSupported()){if(F.method==="NONE"){A=void 0;break}A||(A={}),A[F.keyFormat]&&(A=xt({},A)),A[F.keyFormat]=F}else _.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${I}"`);break}case"START":o.startTimeOffset=Ql(I);break;case"MAP":{const F=new St(I);if(Jt(o,F,["BYTERANGE","URI"]),g.duration){const V=new An(s,e);th(V,F,i,A),h=V,g.initSegment=h,h.rawProgramDateTime&&!g.rawProgramDateTime&&(g.rawProgramDateTime=h.rawProgramDateTime)}else th(g,F,i,A),h=g,y=!0;break}case"SERVER-CONTROL":{const F=new St(I);o.canBlockReload=F.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=F.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&F.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=F.optionalFloat("PART-HOLD-BACK",0),o.holdBack=F.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const F=new St(I);o.partTarget=F.decimalFloatingPoint("PART-TARGET");break}case"PART":{let F=o.partList;F||(F=o.partList=[]);const V=d>0?F[F.length-1]:void 0,q=d++,w=new St(I);Jt(o,w,["BYTERANGE","URI"]);const P=new cp(w,g,e,q,V);F.push(P),g.duration+=P.duration;break}case"PRELOAD-HINT":{const F=new St(I);Jt(o,F,["URI"]),o.preloadHint=F;break}case"RENDITION-REPORT":{const F=new St(I);Jt(o,F,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(F);break}default:_.warn(`line parsed but not handled: ${v}`);break}}}p&&!p.relurl?(l.pop(),u-=p.duration,o.partList&&(o.fragmentHint=p)):o.partList&&(Jl(g,p),g.cc=f,o.fragmentHint=g,A&&eh(g,A,o));const S=l.length,R=l[0],D=l[S-1];if(u+=o.skippedSegments*o.targetduration,u>0&&S&&D){o.averagetargetduration=u/S;const M=D.sn;o.endSN=M!=="initSegment"?M:0,o.live||(D.endList=!0),R&&(o.startCC=R.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(u+=o.fragmentHint.duration),o.totalduration=u,o.endCC=f,L>0&&zp(l,L),o}}function Xl(r,t,e){var i,s;const n=new St(r);Jt(e,n,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const a=(i=n.METHOD)!=null?i:"",o=n.URI,l=n.hexadecimalInteger("IV"),h=n.KEYFORMATVERSIONS,c=(s=n.KEYFORMAT)!=null?s:"identity";o&&n.IV&&!l&&_.error(`Invalid IV: ${n.IV}`);const d=o?pe.resolve(o,t):"",u=(h||"1").split("/").map(Number).filter(Number.isFinite);return new ps(a,d,c,u,l)}function Ql(r){const t=new St(r).decimalFloatingPoint("TIME-OFFSET");return z(t)?t:null}function qp(r,t){["video","audio","text"].forEach(e=>{const i=r.filter(s=>jp(s,e));if(i.length){const s=i.filter(n=>n.lastIndexOf("avc1",0)===0||n.lastIndexOf("mp4a",0)===0);t[`${e}Codec`]=s.length>0?s[0]:i[0],r=r.filter(n=>i.indexOf(n)===-1)}}),t.unknownCodecs=r}function Zl(r,t,e){const i=t[e];i&&(r[e]=i)}function zp(r,t){let e=r[t];for(let i=t;i--;){const s=r[i];if(!s)return;s.programDateTime=e.programDateTime-s.duration*1e3,e=s}}function Jl(r,t){r.rawProgramDateTime?r.programDateTime=Date.parse(r.rawProgramDateTime):t!=null&&t.programDateTime&&(r.programDateTime=t.endProgramDateTime),z(r.programDateTime)||(r.programDateTime=null,r.rawProgramDateTime=null)}function th(r,t,e,i){r.relurl=t.URI,t.BYTERANGE&&r.setByteRange(t.BYTERANGE),r.level=e,r.sn="initSegment",i&&(r.levelkeys=i),r.initSegment=null}function eh(r,t,e){r.levelkeys=t;const{encryptedFragments:i}=e;(!i.length||i[i.length-1].levelkeys!==t)&&Object.keys(t).some(s=>t[s].isCommonEncryption)&&i.push(r)}var ct={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Z={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function ih(r){const{type:t}=r;switch(t){case ct.AUDIO_TRACK:return Z.AUDIO;case ct.SUBTITLE_TRACK:return Z.SUBTITLE;default:return Z.MAIN}}function Dn(r,t){let e=r.url;return(e===void 0||e.indexOf("data:")===0)&&(e=t.url),e}class Xp{constructor(t){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=t,this.registerListeners()}startLoad(t){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:t}=this;t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.LEVEL_LOADING,this.onLevelLoading,this),t.on(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:t}=this;t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.LEVEL_LOADING,this.onLevelLoading,this),t.off(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(t){const e=this.hls.config,i=e.pLoader,s=e.loader,n=i||s,a=new n(e);return this.loaders[t.type]=a,a}getInternalLoader(t){return this.loaders[t.type]}resetInternalLoader(t){this.loaders[t]&&delete this.loaders[t]}destroyInternalLoaders(){for(const t in this.loaders){const e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(t,e){const{url:i}=e;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ct.MANIFEST,url:i,deliveryDirectives:null})}onLevelLoading(t,e){const{id:i,level:s,url:n,deliveryDirectives:a}=e;this.load({id:i,level:s,responseType:"text",type:ct.LEVEL,url:n,deliveryDirectives:a})}onAudioTrackLoading(t,e){const{id:i,groupId:s,url:n,deliveryDirectives:a}=e;this.load({id:i,groupId:s,level:null,responseType:"text",type:ct.AUDIO_TRACK,url:n,deliveryDirectives:a})}onSubtitleTrackLoading(t,e){const{id:i,groupId:s,url:n,deliveryDirectives:a}=e;this.load({id:i,groupId:s,level:null,responseType:"text",type:ct.SUBTITLE_TRACK,url:n,deliveryDirectives:a})}load(t){var e;const i=this.hls.config;let s=this.getInternalLoader(t);if(s){const h=s.context;if(h&&h.url===t.url){_.trace("[playlist-loader]: playlist request ongoing");return}_.log(`[playlist-loader]: aborting previous loader for type: ${t.type}`),s.abort()}let n;if(t.type===ct.MANIFEST?n=i.manifestLoadPolicy.default:n=xt({},i.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),s=this.createInternalLoader(t),(e=t.deliveryDirectives)!=null&&e.part){let h;if(t.type===ct.LEVEL&&t.level!==null?h=this.hls.levels[t.level].details:t.type===ct.AUDIO_TRACK&&t.id!==null?h=this.hls.audioTracks[t.id].details:t.type===ct.SUBTITLE_TRACK&&t.id!==null&&(h=this.hls.subtitleTracks[t.id].details),h){const c=h.partTarget,d=h.targetduration;if(c&&d){const u=Math.max(c*3,d*.8)*1e3;n=xt({},n,{maxTimeToFirstByteMs:Math.min(u,n.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(u,n.maxTimeToFirstByteMs)})}}}const a=n.errorRetry||n.timeoutRetry||{},o={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},l={onSuccess:(h,c,d,u)=>{const f=this.getInternalLoader(d);this.resetInternalLoader(d.type);const p=h.data;if(p.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(h,d,new Error("no EXTM3U delimiter"),u||null,c);return}c.parsing.start=performance.now(),pe.isMediaPlaylist(p)?this.handleTrackOrLevelPlaylist(h,c,d,u||null,f):this.handleMasterPlaylist(h,c,d,u)},onError:(h,c,d,u)=>{this.handleNetworkError(c,d,!1,h,u)},onTimeout:(h,c,d)=>{this.handleNetworkError(c,d,!0,void 0,h)}};s.load(t,o,l)}handleMasterPlaylist(t,e,i,s){const n=this.hls,a=t.data,o=Dn(t,i),l=pe.parseMasterPlaylist(a,o);if(l.playlistParsingError){this.handleManifestParsingError(t,i,l.playlistParsingError,s,e);return}const{contentSteering:h,levels:c,sessionData:d,sessionKeys:u,startTimeOffset:f,variableList:p}=l;this.variableList=p;const{AUDIO:g=[],SUBTITLES:v,"CLOSED-CAPTIONS":E}=pe.parseMasterPlaylistMedia(a,o,l);g.length&&!g.some(A=>!A.url)&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(_.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),g.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new St({}),bitrate:0,url:""})),n.trigger(m.MANIFEST_LOADED,{levels:c,audioTracks:g,subtitles:v,captions:E,contentSteering:h,url:o,stats:e,networkDetails:s,sessionData:d,sessionKeys:u,startTimeOffset:f,variableList:p})}handleTrackOrLevelPlaylist(t,e,i,s,n){const a=this.hls,{id:o,level:l,type:h}=i,c=Dn(t,i),d=z(o)?o:0,u=z(l)?l:d,f=ih(i),p=pe.parseLevelPlaylist(t.data,c,u,f,d,this.variableList);if(h===ct.MANIFEST){const g={attrs:new St({}),bitrate:0,details:p,name:"",url:c};a.trigger(m.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:c,stats:e,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}e.parsing.end=performance.now(),i.levelDetails=p,this.handlePlaylistLoaded(p,t,e,i,s,n)}handleManifestParsingError(t,e,i,s,n){this.hls.trigger(m.ERROR,{type:Q.NETWORK_ERROR,details:$.MANIFEST_PARSING_ERROR,fatal:e.type===ct.MANIFEST,url:t.url,err:i,error:i,reason:i.message,response:t,context:e,networkDetails:s,stats:n})}handleNetworkError(t,e,i=!1,s,n){let a=`A network ${i?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${t.type}`;t.type===ct.LEVEL?a+=`: ${t.level} id: ${t.id}`:(t.type===ct.AUDIO_TRACK||t.type===ct.SUBTITLE_TRACK)&&(a+=` id: ${t.id} group-id: "${t.groupId}"`);const o=new Error(a);_.warn(`[playlist-loader]: ${a}`);let l=$.UNKNOWN,h=!1;const c=this.getInternalLoader(t);switch(t.type){case ct.MANIFEST:l=i?$.MANIFEST_LOAD_TIMEOUT:$.MANIFEST_LOAD_ERROR,h=!0;break;case ct.LEVEL:l=i?$.LEVEL_LOAD_TIMEOUT:$.LEVEL_LOAD_ERROR,h=!1;break;case ct.AUDIO_TRACK:l=i?$.AUDIO_TRACK_LOAD_TIMEOUT:$.AUDIO_TRACK_LOAD_ERROR,h=!1;break;case ct.SUBTITLE_TRACK:l=i?$.SUBTITLE_TRACK_LOAD_TIMEOUT:$.SUBTITLE_LOAD_ERROR,h=!1;break}c&&this.resetInternalLoader(t.type);const d={type:Q.NETWORK_ERROR,details:l,fatal:h,url:t.url,loader:c,context:t,error:o,networkDetails:e,stats:n};if(s){const u=(e==null?void 0:e.url)||t.url;d.response=Qt({url:u,data:void 0},s)}this.hls.trigger(m.ERROR,d)}handlePlaylistLoaded(t,e,i,s,n,a){const o=this.hls,{type:l,level:h,id:c,groupId:d,deliveryDirectives:u}=s,f=Dn(e,s),p=ih(s),g=typeof s.level=="number"&&p===Z.MAIN?h:void 0;if(!t.fragments.length){const E=new Error("No Segments found in Playlist");o.trigger(m.ERROR,{type:Q.NETWORK_ERROR,details:$.LEVEL_EMPTY_ERROR,fatal:!1,url:f,error:E,reason:E.message,response:e,context:s,level:g,parent:p,networkDetails:n,stats:i});return}t.targetduration||(t.playlistParsingError=new Error("Missing Target Duration"));const v=t.playlistParsingError;if(v){o.trigger(m.ERROR,{type:Q.NETWORK_ERROR,details:$.LEVEL_PARSING_ERROR,fatal:!1,url:f,error:v,reason:v.message,response:e,context:s,level:g,parent:p,networkDetails:n,stats:i});return}switch(t.live&&a&&(a.getCacheAge&&(t.ageHeader=a.getCacheAge()||0),(!a.getCacheAge||isNaN(t.ageHeader))&&(t.ageHeader=0)),l){case ct.MANIFEST:case ct.LEVEL:o.trigger(m.LEVEL_LOADED,{details:t,level:g||0,id:c||0,stats:i,networkDetails:n,deliveryDirectives:u});break;case ct.AUDIO_TRACK:o.trigger(m.AUDIO_TRACK_LOADED,{details:t,id:c||0,groupId:d||"",stats:i,networkDetails:n,deliveryDirectives:u});break;case ct.SUBTITLE_TRACK:o.trigger(m.SUBTITLE_TRACK_LOADED,{details:t,id:c||0,groupId:d||"",stats:i,networkDetails:n,deliveryDirectives:u});break}}}function sh(r,t){let e;try{e=new Event("addtrack")}catch{e=document.createEvent("Event"),e.initEvent("addtrack",!1,!1)}e.track=r,t.dispatchEvent(e)}function rh(r,t){const e=r.mode;if(e==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(t.id))try{if(r.addCue(t),!r.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(i){_.debug(`[texttrack-utils]: ${i}`);try{const s=new self.TextTrackCue(t.startTime,t.endTime,t.text);s.id=t.id,r.addCue(s)}catch(s){_.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${s}`)}}e==="disabled"&&(r.mode=e)}function Ri(r){const t=r.mode;if(t==="disabled"&&(r.mode="hidden"),r.cues)for(let e=r.cues.length;e--;)r.removeCue(r.cues[e]);t==="disabled"&&(r.mode=t)}function Cn(r,t,e,i){const s=r.mode;if(s==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0){const n=Zp(r.cues,t,e);for(let a=0;a<n.length;a++)(!i||i(n[a]))&&r.removeCue(n[a])}s==="disabled"&&(r.mode=s)}function Qp(r,t){if(t<r[0].startTime)return 0;const e=r.length-1;if(t>r[e].endTime)return-1;let i=0,s=e;for(;i<=s;){const n=Math.floor((s+i)/2);if(t<r[n].startTime)s=n-1;else if(t>r[n].startTime&&i<e)i=n+1;else return n}return r[i].startTime-t<t-r[s].startTime?i:s}function Zp(r,t,e){const i=[],s=Qp(r,t);if(s>-1)for(let n=s,a=r.length;n<a;n++){const o=r[n];if(o.startTime>=t&&o.endTime<=e)i.push(o);else if(o.startTime>e)return i}return i}var ge={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const Jp=.25;function xn(){if(!(typeof self>"u"))return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}const ar=(()=>{const r=xn();try{new r(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Pn(r,t){return r.getTime()/1e3-t}function tg(r){return Uint8Array.from(r.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class eg{constructor(t){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=t,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:t}=this;t.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(m.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:t}=this;t.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(m.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(t,e){this.media=e.media}onMediaDetaching(){this.id3Track&&(Ri(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(t){const e=this.getID3Track(t.textTracks);return e.mode="hidden",e}getID3Track(t){if(this.media){for(let e=0;e<t.length;e++){const i=t[e];if(i.kind==="metadata"&&i.label==="id3")return sh(i,this.media),i}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(t,e){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:i,enableID3MetadataCues:s}}}=this;if(!i&&!s)return;const{samples:n}=e;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=xn();for(let o=0;o<n.length;o++){const l=n[o].type;if(l===ge.emsg&&!i||!s)continue;const h=Ol(n[o].data);if(h){const c=n[o].pts;let d=c+n[o].duration;d>ar&&(d=ar),d-c<=0&&(d=c+Jp);for(let u=0;u<h.length;u++){const f=h[u];if(!Pl(f)){this.updateId3CueEnds(c,l);const p=new a(c,d,"");p.value=f,l&&(p.type=l),this.id3Track.addCue(p)}}}}}updateId3CueEnds(t,e){var i;const s=(i=this.id3Track)==null?void 0:i.cues;if(s)for(let n=s.length;n--;){const a=s[n];a.type===e&&a.startTime<t&&a.endTime===ar&&(a.endTime=t)}}onBufferFlushing(t,{startOffset:e,endOffset:i,type:s}){const{id3Track:n,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:l}}=a;if(n&&(o||l)){let h;s==="audio"?h=c=>c.type===ge.audioId3&&l:s==="video"?h=c=>c.type===ge.emsg&&o:h=c=>c.type===ge.audioId3&&l||c.type===ge.emsg&&o,Cn(n,e,i,h)}}onLevelUpdated(t,{details:e}){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:i,id3Track:s}=this,{dateRanges:n}=e,a=Object.keys(n);if(s){const c=Object.keys(i).filter(d=>!a.includes(d));for(let d=c.length;d--;){const u=c[d];Object.keys(i[u].cues).forEach(f=>{s.removeCue(i[u].cues[f])}),delete i[u]}}const o=e.fragments[e.fragments.length-1];if(a.length===0||!z(o==null?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const l=o.programDateTime/1e3-o.start,h=xn();for(let c=0;c<a.length;c++){const d=a[c],u=n[d],f=i[d],p=(f==null?void 0:f.cues)||{};let g=(f==null?void 0:f.durationKnown)||!1;const v=Pn(u.startDate,l);let E=ar;const A=u.endDate;if(A)E=Pn(A,l),g=!0;else if(u.endOnNext&&!g){const y=a.reduce((S,R)=>{const D=n[R];return D.class===u.class&&D.id!==R&&D.startDate>u.startDate&&S.push(D),S},[]).sort((S,R)=>S.startDate.getTime()-R.startDate.getTime())[0];y&&(E=Pn(y.startDate,l),g=!0)}const L=Object.keys(u.attr);for(let y=0;y<L.length;y++){const S=L[y];if(!lp(S))continue;let R=p[S];if(R)g&&!f.durationKnown&&(R.endTime=E);else{let D=u.attr[S];R=new h(v,E,""),hp(S)&&(D=tg(D)),R.value={key:S,data:D},R.type=ge.dateRange,R.id=d,this.id3Track.addCue(R),p[S]=R}}i[d]={cues:p,dateRange:u,durationKnown:g}}}}class ig{constructor(t){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=t,this.config=t.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:t,levelDetails:e}=this;return t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}get targetLatency(){const{levelDetails:t}=this;if(t===null)return null;const{holdBack:e,partHoldBack:i,targetduration:s}=t,{liveSyncDuration:n,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,l=this.hls.userConfig;let h=o&&i||e;(l.liveSyncDuration||l.liveSyncDurationCount||h===0)&&(h=n!==void 0?n:a*s);const c=s,d=1;return h+Math.min(this.stallCount*d,c)}get liveSyncPosition(){const t=this.estimateLiveEdge(),e=this.targetLatency,i=this.levelDetails;if(t===null||e===null||i===null)return null;const s=i.edge,n=t-e-this.edgeStalled,a=s-i.totalduration,o=s-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,n),o)}get drift(){const{levelDetails:t}=this;return t===null?1:t.drift}get edgeStalled(){const{levelDetails:t}=this;if(t===null)return 0;const e=(this.config.lowLatencyMode&&t.partTarget||t.targetduration)*3;return Math.max(t.age-e,0)}get forwardBufferLength(){const{media:t,levelDetails:e}=this;if(!t||!e)return 0;const i=t.buffered.length;return(i?t.buffered.end(i-1):e.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(m.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(m.ERROR,this.onError,this)}onMediaAttached(t,e){this.media=e.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(t,{details:e}){this.levelDetails=e,e.advanced&&this.timeupdate(),!e.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(t,e){var i;e.details===$.BUFFER_STALLED_ERROR&&(this.stallCount++,(i=this.levelDetails)!=null&&i.live&&_.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:t,levelDetails:e}=this;if(!t||!e)return;this.currentTime=t.currentTime;const i=this.computeLatency();if(i===null)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:n}=this.config;if(!s||n===1)return;const a=this.targetLatency;if(a===null)return;const o=i-a,l=Math.min(this.maxLatency,a+e.targetduration),h=o<l;if(e.live&&h&&o>.05&&this.forwardBufferLength>1){const c=Math.min(2,Math.max(1,n)),d=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;t.playbackRate=Math.min(c,Math.max(1,d))}else t.playbackRate!==1&&t.playbackRate!==0&&(t.playbackRate=1)}estimateLiveEdge(){const{levelDetails:t}=this;return t===null?null:t.edge+t.age}computeLatency(){const t=this.estimateLiveEdge();return t===null?null:t-this.currentTime}}const On=["NONE","TYPE-0","TYPE-1",null];var gs={No:"",Yes:"YES",v2:"v2"};function sg(r,t){const{canSkipUntil:e,canSkipDateRanges:i,endSN:s}=r,n=t!==void 0?t-s:0;return e&&n<e?i?gs.v2:gs.Yes:gs.No}class nh{constructor(t,e,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=t,this.part=e,this.skip=i}addDirectives(t){const e=new self.URL(t);return this.msn!==void 0&&e.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&e.searchParams.set("_HLS_part",this.part.toString()),this.skip&&e.searchParams.set("_HLS_skip",this.skip),e.href}}class ms{constructor(t){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[t.url],this._attrs=[t.attrs],this.bitrate=t.bitrate,t.details&&(this.details=t.details),this.id=t.id||0,this.name=t.name,this.width=t.width||0,this.height=t.height||0,this.audioCodec=t.audioCodec,this.videoCodec=t.videoCodec,this.unknownCodecs=t.unknownCodecs,this.codecSet=[t.videoCodec,t.audioCodec].filter(e=>e).join(",").replace(/\.[^.,]+/g,"")}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get attrs(){return this._attrs[this._urlId]}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get uri(){return this.url[this._urlId]||""}get urlId(){return this._urlId}set urlId(t){const e=t%this.url.length;this._urlId!==e&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=e)}get audioGroupId(){var t;return(t=this.audioGroupIds)==null?void 0:t[this.urlId]}get textGroupId(){var t;return(t=this.textGroupIds)==null?void 0:t[this.urlId]}addFallback(t){this.url.push(t.url),this._attrs.push(t.attrs)}}function $n(r,t){const e=t.startPTS;if(z(e)){let i=0,s;t.sn>r.sn?(i=e-r.start,s=r):(i=r.start-e,s=t),s.duration!==i&&(s.duration=i)}else t.sn>r.sn?r.cc===t.cc&&r.minEndPTS?t.start=r.start+(r.minEndPTS-r.start):t.start=r.start+r.duration:t.start=Math.max(r.start-t.duration,0)}function ah(r,t,e,i,s,n){i-e<=0&&(_.warn("Fragment should have a positive duration",t),i=e+t.duration,n=s+t.duration);let a=e,o=i;const l=t.startPTS,h=t.endPTS;if(z(l)){const g=Math.abs(l-e);z(t.deltaPTS)?t.deltaPTS=Math.max(g,t.deltaPTS):t.deltaPTS=g,a=Math.max(e,l),e=Math.min(e,l),s=Math.min(s,t.startDTS),o=Math.min(i,h),i=Math.max(i,h),n=Math.max(n,t.endDTS)}const c=e-t.start;t.start!==0&&(t.start=e),t.duration=i-t.start,t.startPTS=e,t.maxStartPTS=a,t.startDTS=s,t.endPTS=i,t.minEndPTS=o,t.endDTS=n;const d=t.sn;if(!r||d<r.startSN||d>r.endSN)return 0;let u;const f=d-r.startSN,p=r.fragments;for(p[f]=t,u=f;u>0;u--)$n(p[u],p[u-1]);for(u=f;u<p.length-1;u++)$n(p[u],p[u+1]);return r.fragmentHint&&$n(p[p.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,c}function rg(r,t){let e=null;const i=r.fragments;for(let l=i.length-1;l>=0;l--){const h=i[l].initSegment;if(h){e=h;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;let s=0,n;if(og(r,t,(l,h)=>{l.relurl&&(s=l.cc-h.cc),z(l.startPTS)&&z(l.endPTS)&&(h.start=h.startPTS=l.startPTS,h.startDTS=l.startDTS,h.maxStartPTS=l.maxStartPTS,h.endPTS=l.endPTS,h.endDTS=l.endDTS,h.minEndPTS=l.minEndPTS,h.duration=l.endPTS-l.startPTS,h.duration&&(n=h),t.PTSKnown=t.alignedSliding=!0),h.elementaryStreams=l.elementaryStreams,h.loader=l.loader,h.stats=l.stats,h.urlId=l.urlId,l.initSegment&&(h.initSegment=l.initSegment,e=l.initSegment)}),e&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach(l=>{var h;(!l.initSegment||l.initSegment.relurl===((h=e)==null?void 0:h.relurl))&&(l.initSegment=e)}),t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some(l=>!l),t.deltaUpdateFailed){_.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let l=t.skippedSegments;l--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=ng(r.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));const a=t.fragments;if(s){_.warn("discontinuity sliding from playlist, take drift into account");for(let l=0;l<a.length;l++)a[l].cc+=s}t.skippedSegments&&(t.startCC=t.fragments[0].cc),ag(r.partList,t.partList,(l,h)=>{h.elementaryStreams=l.elementaryStreams,h.stats=l.stats}),n?ah(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):oh(r,t),a.length&&(t.totalduration=t.edge-a[0].start),t.driftStartTime=r.driftStartTime,t.driftStart=r.driftStart;const o=t.advancedDateTime;if(t.advanced&&o){const l=t.edge;t.driftStart||(t.driftStartTime=o,t.driftStart=l),t.driftEndTime=o,t.driftEnd=l}else t.driftEndTime=r.driftEndTime,t.driftEnd=r.driftEnd,t.advancedDateTime=r.advancedDateTime}function ng(r,t,e){const i=xt({},r);return e&&e.forEach(s=>{delete i[s]}),Object.keys(t).forEach(s=>{const n=new Ll(t[s].attr,i[s]);n.isValid?i[s]=n:_.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[s].attr)}"`)}),i}function ag(r,t,e){if(r&&t){let i=0;for(let s=0,n=r.length;s<=n;s++){const a=r[s],o=t[s+i];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?e(a,o):i--}}}function og(r,t,e){const i=t.skippedSegments,s=Math.max(r.startSN,t.startSN)-t.startSN,n=(r.fragmentHint?1:0)+(i?t.endSN:Math.min(r.endSN,t.endSN))-t.startSN,a=t.startSN-r.startSN,o=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;for(let h=s;h<=n;h++){const c=l[a+h];let d=o[h];i&&!d&&h<i&&(d=t.fragments[h]=c),c&&d&&e(c,d)}}function oh(r,t){const e=t.startSN+t.skippedSegments-r.startSN,i=r.fragments;e<0||e>=i.length||Mn(t,i[e].start)}function Mn(r,t){if(t){const e=r.fragments;for(let i=r.skippedSegments;i<e.length;i++)e[i].start+=t;r.fragmentHint&&(r.fragmentHint.start+=t)}}function lg(r,t=1/0){let e=1e3*r.targetduration;if(r.updated){const i=r.fragments,s=4;if(i.length&&e*s>t){const n=i[i.length-1].duration*1e3;n<e&&(e=n)}}else e/=2;return Math.round(e)}function hg(r,t,e){if(!(r!=null&&r.details))return null;const i=r.details;let s=i.fragments[t-i.startSN];return s||(s=i.fragmentHint,s&&s.sn===t)?s:t<i.startSN&&e&&e.sn===t?e:null}function lh(r,t,e){var i;return r!=null&&r.details?hh((i=r.details)==null?void 0:i.partList,t,e):null}function hh(r,t,e){if(r)for(let i=r.length;i--;){const s=r[i];if(s.index===e&&s.fragment.sn===t)return s}return null}function or(r){switch(r.details){case $.FRAG_LOAD_TIMEOUT:case $.KEY_LOAD_TIMEOUT:case $.LEVEL_LOAD_TIMEOUT:case $.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function ch(r,t){const e=or(t);return r.default[`${e?"timeout":"error"}Retry`]}function Fn(r,t){const e=r.backoff==="linear"?1:Math.pow(2,t);return Math.min(e*r.retryDelayMs,r.maxRetryDelayMs)}function dh(r){return Qt(Qt({},r),{errorRetry:null,timeoutRetry:null})}function lr(r,t,e,i){return!!r&&t<r.maxNumRetry&&(cg(i)||!!e)}function cg(r){return r===0&&navigator.onLine===!1||!!r&&(r<400||r>499)}const uh={search:function(r,t){let e=0,i=r.length-1,s=null,n=null;for(;e<=i;){s=(e+i)/2|0,n=r[s];const a=t(n);if(a>0)e=s+1;else if(a<0)i=s-1;else return n}return null}};function dg(r,t,e){if(t===null||!Array.isArray(r)||!r.length||!z(t))return null;const i=r[0].programDateTime;if(t<(i||0))return null;const s=r[r.length-1].endProgramDateTime;if(t>=(s||0))return null;e=e||0;for(let n=0;n<r.length;++n){const a=r[n];if(ug(t,e,a))return a}return null}function vs(r,t,e=0,i=0){let s=null;if(r?s=t[r.sn-t[0].sn+1]||null:e===0&&t[0].start===0&&(s=t[0]),s&&Nn(e,i,s)===0)return s;const n=uh.search(t,Nn.bind(null,e,i));return n&&(n!==r||!s)?n:s}function Nn(r=0,t=0,e){if(e.start<=r&&e.start+e.duration>r)return 0;const i=Math.min(t,e.duration+(e.deltaPTS?e.deltaPTS:0));return e.start+e.duration-i<=r?1:e.start-i>r&&e.start?-1:0}function ug(r,t,e){const i=Math.min(t,e.duration+(e.deltaPTS?e.deltaPTS:0))*1e3;return(e.endProgramDateTime||0)-i>r}function fg(r,t){return uh.search(r,e=>e.cc<t?1:e.cc>t?-1:0)}const pg=3e5;var Gt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},he={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class gg{constructor(t){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=t,this.log=_.log.bind(_,"[info]:"),this.warn=_.warn.bind(_,"[warning]:"),this.error=_.error.bind(_,"[error]:"),this.registerListeners()}registerListeners(){const t=this.hls;t.on(m.ERROR,this.onError,this),t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const t=this.hls;t&&(t.off(m.ERROR,this.onError,this),t.off(m.ERROR,this.onErrorOut,this),t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(t){this.playlistError=0}stopLoad(){}getVariantLevelIndex(t){return(t==null?void 0:t.type)===Z.MAIN?t.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(t,e){var i,s;if(e.fatal)return;const n=this.hls,a=e.context;switch(e.details){case $.FRAG_LOAD_ERROR:case $.FRAG_LOAD_TIMEOUT:case $.KEY_LOAD_ERROR:case $.KEY_LOAD_TIMEOUT:e.errorAction=this.getFragRetryOrSwitchAction(e);return;case $.FRAG_PARSING_ERROR:if((i=e.frag)!=null&&i.gap){e.errorAction={action:Gt.DoNothing,flags:he.None};return}case $.FRAG_GAP:case $.FRAG_DECRYPT_ERROR:{e.errorAction=this.getFragRetryOrSwitchAction(e),e.errorAction.action=Gt.SendAlternateToPenaltyBox;return}case $.LEVEL_EMPTY_ERROR:case $.LEVEL_PARSING_ERROR:{var o,l;const h=e.parent===Z.MAIN?e.level:n.loadLevel;e.details===$.LEVEL_EMPTY_ERROR&&(o=e.context)!=null&&(l=o.levelDetails)!=null&&l.live?e.errorAction=this.getPlaylistRetryOrSwitchAction(e,h):(e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,h))}return;case $.LEVEL_LOAD_ERROR:case $.LEVEL_LOAD_TIMEOUT:typeof(a==null?void 0:a.level)=="number"&&(e.errorAction=this.getPlaylistRetryOrSwitchAction(e,a.level));return;case $.AUDIO_TRACK_LOAD_ERROR:case $.AUDIO_TRACK_LOAD_TIMEOUT:case $.SUBTITLE_LOAD_ERROR:case $.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){const h=n.levels[n.loadLevel];if(h&&(a.type===ct.AUDIO_TRACK&&a.groupId===h.audioGroupId||a.type===ct.SUBTITLE_TRACK&&a.groupId===h.textGroupId)){e.errorAction=this.getPlaylistRetryOrSwitchAction(e,n.loadLevel),e.errorAction.action=Gt.SendAlternateToPenaltyBox,e.errorAction.flags=he.MoveAllAlternatesMatchingHost;return}}return;case $.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const h=n.levels[n.loadLevel],c=h==null?void 0:h.attrs["HDCP-LEVEL"];c&&(e.errorAction={action:Gt.SendAlternateToPenaltyBox,flags:he.MoveAllAlternatesMatchingHDCP,hdcpLevel:c})}return;case $.BUFFER_ADD_CODEC_ERROR:case $.REMUX_ALLOC_ERROR:e.errorAction=this.getLevelSwitchAction(e,(s=e.level)!=null?s:n.loadLevel);return;case $.INTERNAL_EXCEPTION:case $.BUFFER_APPENDING_ERROR:case $.BUFFER_APPEND_ERROR:case $.BUFFER_FULL_ERROR:case $.LEVEL_SWITCH_ERROR:case $.BUFFER_STALLED_ERROR:case $.BUFFER_SEEK_OVER_HOLE:case $.BUFFER_NUDGE_ON_STALL:e.errorAction={action:Gt.DoNothing,flags:he.None};return}if(e.type===Q.KEY_SYSTEM_ERROR){const h=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,h);return}}getPlaylistRetryOrSwitchAction(t,e){var i;const s=this.hls,n=ch(s.config.playlistLoadPolicy,t),a=this.playlistError++,o=(i=t.response)==null?void 0:i.code;if(lr(n,a,or(t),o))return{action:Gt.RetryRequest,flags:he.None,retryConfig:n,retryCount:a};const l=this.getLevelSwitchAction(t,e);return n&&(l.retryConfig=n,l.retryCount=a),l}getFragRetryOrSwitchAction(t){const e=this.hls,i=this.getVariantLevelIndex(t.frag),s=e.levels[i],{fragLoadPolicy:n,keyLoadPolicy:a}=e.config,o=ch(t.details.startsWith("key")?a:n,t),l=e.levels.reduce((d,u)=>d+u.fragmentError,0);if(s){var h;t.details!==$.FRAG_GAP&&s.fragmentError++;const d=(h=t.response)==null?void 0:h.code;if(lr(o,l,or(t),d))return{action:Gt.RetryRequest,flags:he.None,retryConfig:o,retryCount:l}}const c=this.getLevelSwitchAction(t,i);return o&&(c.retryConfig=o,c.retryCount=l),c}getLevelSwitchAction(t,e){const i=this.hls;e==null&&(e=i.loadLevel);const s=this.hls.levels[e];if(s&&(s.loadError++,i.autoLevelEnabled)){var n,a;let o=-1;const{levels:l,loadLevel:h,minAutoLevel:c,maxAutoLevel:d}=i,u=(n=t.frag)==null?void 0:n.type,{type:f,groupId:p}=(a=t.context)!=null?a:{};for(let g=l.length;g--;){const v=(g+h)%l.length;if(v!==h&&v>=c&&v<=d&&l[v].loadError===0){const E=l[v];if(t.details===$.FRAG_GAP&&t.frag){const A=l[v].details;if(A){const L=vs(t.frag,A.fragments,t.frag.start);if(L!=null&&L.gap)continue}}else if(f===ct.AUDIO_TRACK&&p===E.audioGroupId||f===ct.SUBTITLE_TRACK&&p===E.textGroupId||u===Z.AUDIO&&s.audioGroupId===E.audioGroupId||u===Z.SUBTITLE&&s.textGroupId===E.textGroupId)continue;o=v;break}}if(o>-1&&i.loadLevel!==o)return t.levelRetry=!0,this.playlistError=0,{action:Gt.SendAlternateToPenaltyBox,flags:he.None,nextAutoLevel:o}}return{action:Gt.SendAlternateToPenaltyBox,flags:he.MoveAllAlternatesMatchingHost}}onErrorOut(t,e){var i;switch((i=e.errorAction)==null?void 0:i.action){case Gt.DoNothing:break;case Gt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(e),!e.errorAction.resolved&&e.details!==$.FRAG_GAP&&(e.fatal=!0);break}if(e.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(t){const e=this.hls,i=t.errorAction;if(!i)return;const{flags:s,hdcpLevel:n,nextAutoLevel:a}=i;switch(s){case he.None:this.switchLevel(t,a);break;case he.MoveAllAlternatesMatchingHost:i.resolved||(i.resolved=this.redundantFailover(t));break;case he.MoveAllAlternatesMatchingHDCP:n&&(e.maxHdcpLevel=On[On.indexOf(n)-1],i.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${e.maxHdcpLevel}" or lower`);break}i.resolved||this.switchLevel(t,a)}switchLevel(t,e){e!==void 0&&t.errorAction&&(this.warn(`switching to level ${e} after ${t.details}`),this.hls.nextAutoLevel=e,t.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}redundantFailover(t){const{hls:e,penalizedRenditions:i}=this,s=t.parent===Z.MAIN?t.level:e.loadLevel,n=e.levels[s],a=n.url.length,o=t.frag?t.frag.urlId:n.urlId;n.urlId===o&&(!t.frag||n.details)&&this.penalizeRendition(n,t);for(let l=1;l<a;l++){const h=(o+l)%a,c=i[h];if(!c||mg(c,t,i[o]))return this.warn(`Switching to Redundant Stream ${h+1}/${a}: "${n.url[h]}" after ${t.details}`),this.playlistError=0,e.levels.forEach(d=>{d.urlId=h}),e.nextLoadLevel=s,!0}return!1}penalizeRendition(t,e){const{penalizedRenditions:i}=this,s=i[t.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};s.lastErrorPerfMs=performance.now(),s.errors.push(e),s.details=t.details,i[t.urlId]=s}}function mg(r,t,e){if(performance.now()-r.lastErrorPerfMs>pg)return!0;const i=r.details;if(t.details===$.FRAG_GAP&&i&&t.frag){const s=t.frag.start,n=vs(null,i.fragments,s);if(n&&!n.gap)return!0}if(e&&r.errors.length<e.errors.length){const s=r.errors[r.errors.length-1];if(i&&s.frag&&t.frag&&Math.abs(s.frag.start-t.frag.start)>i.targetduration*3)return!0}return!1}class Un{constructor(t,e){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=_.log.bind(_,`${e}:`),this.warn=_.warn.bind(_,`${e}:`),this.hls=t}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){clearTimeout(this.timer),this.timer=-1}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(t,e){const i=e==null?void 0:e.renditionReports;if(i){let s=-1;for(let n=0;n<i.length;n++){const a=i[n];let o;try{o=new self.URL(a.URI,e.url).href}catch(l){_.warn(`Could not construct new URL for Rendition Report: ${l}`),o=a.URI||""}if(o===t){s=n;break}else o===t.substring(0,o.length)&&(s=n)}if(s!==-1){const n=i[s],a=parseInt(n["LAST-MSN"])||(e==null?void 0:e.lastPartSn);let o=parseInt(n["LAST-PART"])||(e==null?void 0:e.lastPartIndex);if(this.hls.config.lowLatencyMode){const l=Math.min(e.age-e.partTarget,e.targetduration);o>=0&&l>e.partTarget&&(o+=1)}return new nh(a,o>=0?o:void 0,gs.No)}}}loadPlaylist(t){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(t){return this.canLoad&&!!t&&!!t.url&&(!t.details||t.details.live)}shouldReloadPlaylist(t){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(t)}playlistLoaded(t,e,i){const{details:s,stats:n}=e,a=self.performance.now(),o=n.loading.first?Math.max(0,a-n.loading.first):0;if(s.advancedDateTime=Date.now()-o,s.live||i!=null&&i.live){if(s.reloaded(i),i&&this.log(`live playlist ${t} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),i&&s.fragments.length>0&&rg(i,s),!this.canLoad||!s.live)return;let l,h,c;if(s.canBlockReload&&s.endSN&&s.advanced){const v=this.hls.config.lowLatencyMode,E=s.lastPartSn,A=s.endSN,L=s.lastPartIndex,y=L!==-1,S=E===A,R=v?0:L;y?(h=S?A+1:E,c=S?R:L+1):h=A+1;const D=s.age,M=D+s.ageHeader;let C=Math.min(M-s.partTarget,s.targetduration*1.5);if(C>0){if(i&&C>i.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${i.tuneInGoal} to: ${C} with playlist age: ${s.age}`),C=0;else{const I=Math.floor(C/s.targetduration);if(h+=I,c!==void 0){const G=Math.round(C%s.targetduration/s.partTarget);c+=G}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${D.toFixed(2)}s goal: ${C} skip sn ${I} to part ${c}`)}s.tuneInGoal=C}if(l=this.getDeliveryDirectives(s,e.deliveryDirectives,h,c),v||!S){this.loadPlaylist(l);return}}else(s.canBlockReload||s.canSkipUntil)&&(l=this.getDeliveryDirectives(s,e.deliveryDirectives,h,c));const d=this.hls.mainForwardBufferInfo,u=d?d.end-d.len:0,f=(s.edge-u)*1e3,p=lg(s,f);s.updated&&a>this.requestScheduled+p&&(this.requestScheduled=n.loading.start),h!==void 0&&s.canBlockReload?this.requestScheduled=n.loading.first+p-(s.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+p<a?this.requestScheduled=a:this.requestScheduled-a<=0&&(this.requestScheduled+=p);let g=this.requestScheduled-a;g=Math.max(0,g),this.log(`reload live playlist ${t} in ${Math.round(g)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(l),g)}else this.clearTimer()}getDeliveryDirectives(t,e,i,s){let n=sg(t,i);return e!=null&&e.skip&&t.deltaUpdateFailed&&(i=e.msn,s=e.part,n=gs.No),new nh(i,s,n)}checkRetry(t){const e=t.details,i=or(t),s=t.errorAction,{action:n,retryCount:a=0,retryConfig:o}=s||{},l=!!s&&!!o&&(n===Gt.RetryRequest||!s.resolved&&n===Gt.SendAlternateToPenaltyBox);if(l){var h;if(this.requestScheduled=-1,a>=o.maxNumRetry)return!1;if(i&&(h=t.context)!=null&&h.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${e}" without delivery-directives`),this.loadPlaylist();else{const c=Fn(o,a);this.timer=self.setTimeout(()=>this.loadPlaylist(),c),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${e}" in ${c}ms`)}t.levelRetry=!0,s.resolved=!0}return l}}let Bn;class vg extends Un{constructor(t,e){super(t,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=e,this._registerListeners()}_registerListeners(){const{hls:t}=this;t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(m.LEVEL_LOADED,this.onLevelLoaded,this),t.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(m.FRAG_LOADED,this.onFragLoaded,this),t.on(m.ERROR,this.onError,this)}_unregisterListeners(){const{hls:t}=this;t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(m.LEVEL_LOADED,this.onLevelLoaded,this),t.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(m.FRAG_LOADED,this.onFragLoaded,this),t.off(m.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}startLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.startLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]}onManifestLoading(t,e){this.resetLevels()}onManifestLoaded(t,e){const i=[],s={};let n;e.levels.forEach(a=>{var o;const l=a.attrs;((o=a.audioCodec)==null?void 0:o.indexOf("mp4a.40.34"))!==-1&&(Bn||(Bn=/chrome|firefox/i.test(navigator.userAgent)),Bn&&(a.audioCodec=void 0));const{AUDIO:h,CODECS:c,"FRAME-RATE":d,"PATHWAY-ID":u,RESOLUTION:f,SUBTITLES:p}=l,g=`${`${u||"."}-`}${a.bitrate}-${f}-${d}-${c}`;n=s[g],n?n.addFallback(a):(n=new ms(a),s[g]=n,i.push(n)),hr(n,"audio",h),hr(n,"text",p)}),this.filterAndSortMediaOptions(i,e)}filterAndSortMediaOptions(t,e){let i=[],s=[],n=!1,a=!1,o=!1,l=t.filter(({audioCodec:f,videoCodec:p,width:g,height:v,unknownCodecs:E})=>(n||(n=!!(g&&v)),a||(a=!!p),o||(o=!!f),!(E!=null&&E.length)&&(!f||In(f,"audio"))&&(!p||In(p,"video"))));if((n||a)&&o&&(l=l.filter(({videoCodec:f,width:p,height:g})=>!!f||!!(p&&g))),l.length===0){Promise.resolve().then(()=>{if(this.hls){const f=new Error("no level with compatible codecs found in manifest");this.hls.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:e.url,error:f,reason:f.message})}});return}e.audioTracks&&(i=e.audioTracks.filter(f=>!f.audioCodec||In(f.audioCodec,"audio")),fh(i)),e.subtitles&&(s=e.subtitles,fh(s));const h=l.slice(0);l.sort((f,p)=>f.attrs["HDCP-LEVEL"]!==p.attrs["HDCP-LEVEL"]?(f.attrs["HDCP-LEVEL"]||"")>(p.attrs["HDCP-LEVEL"]||"")?1:-1:f.bitrate!==p.bitrate?f.bitrate-p.bitrate:f.attrs["FRAME-RATE"]!==p.attrs["FRAME-RATE"]?f.attrs.decimalFloatingPoint("FRAME-RATE")-p.attrs.decimalFloatingPoint("FRAME-RATE"):f.attrs.SCORE!==p.attrs.SCORE?f.attrs.decimalFloatingPoint("SCORE")-p.attrs.decimalFloatingPoint("SCORE"):n&&f.height!==p.height?f.height-p.height:0);let c=h[0];if(this.steering&&(l=this.steering.filterParsedLevels(l),l.length!==h.length)){for(let f=0;f<h.length;f++)if(h[f].pathwayId===l[0].pathwayId){c=h[f];break}}this._levels=l;for(let f=0;f<l.length;f++)if(l[f]===c){this._firstLevel=f,this.log(`manifest loaded, ${l.length} level(s) found, first bitrate: ${c.bitrate}`);break}const d=o&&!a,u={levels:l,audioTracks:i,subtitleTracks:s,sessionData:e.sessionData,sessionKeys:e.sessionKeys,firstLevel:this._firstLevel,stats:e.stats,audio:o,video:a,altAudio:!d&&i.some(f=>!!f.url)};this.hls.trigger(m.MANIFEST_PARSED,u),(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(t){const e=this._levels;if(e.length===0)return;if(t<0||t>=e.length){const c=new Error("invalid level idx"),d=t<0;if(this.hls.trigger(m.ERROR,{type:Q.OTHER_ERROR,details:$.LEVEL_SWITCH_ERROR,level:t,fatal:d,error:c,reason:c.message}),d)return;t=Math.min(t,e.length-1)}const i=this.currentLevelIndex,s=this.currentLevel,n=s?s.attrs["PATHWAY-ID"]:void 0,a=e[t],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=t,this.currentLevel=a,i===t&&a.details&&s&&n===o)return;this.log(`Switching to level ${t}${o?" with Pathway "+o:""} from level ${i}${n?" with Pathway "+n:""}`);const l=xt({},a,{level:t,maxBitrate:a.maxBitrate,attrs:a.attrs,uri:a.uri,urlId:a.urlId});delete l._attrs,delete l._urlId,this.hls.trigger(m.LEVEL_SWITCHING,l);const h=a.details;if(!h||h.live){const c=this.switchParams(a.uri,s==null?void 0:s.details);this.loadPlaylist(c)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(t){this.manualLevelIndex=t,this._startLevel===void 0&&(this._startLevel=t),t!==-1&&(this.level=t)}get firstLevel(){return this._firstLevel}set firstLevel(t){this._firstLevel=t}get startLevel(){if(this._startLevel===void 0){const t=this.hls.config.startLevel;return t!==void 0?t:this._firstLevel}else return this._startLevel}set startLevel(t){this._startLevel=t}onError(t,e){e.fatal||!e.context||e.context.type===ct.LEVEL&&e.context.level===this.level&&this.checkRetry(e)}onFragLoaded(t,{frag:e}){if(e!==void 0&&e.type===Z.MAIN){const i=this._levels[e.level];i!==void 0&&(i.loadError=0)}}onLevelLoaded(t,e){var i;const{level:s,details:n}=e,a=this._levels[s];if(!a){var o;this.warn(`Invalid level index ${s}`),(o=e.deliveryDirectives)!=null&&o.skip&&(n.deltaUpdateFailed=!0);return}s===this.currentLevelIndex?(a.fragmentError===0&&(a.loadError=0),this.playlistLoaded(s,e,a.details)):(i=e.deliveryDirectives)!=null&&i.skip&&(n.deltaUpdateFailed=!0)}onAudioTrackSwitched(t,e){const i=this.currentLevel;if(!i)return;const s=this.hls.audioTracks[e.id].groupId;if(i.audioGroupIds&&i.audioGroupId!==s){let n=-1;for(let a=0;a<i.audioGroupIds.length;a++)if(i.audioGroupIds[a]===s){n=a;break}n!==-1&&n!==i.urlId&&(i.urlId=n,this.canLoad&&this.startLoad())}}loadPlaylist(t){super.loadPlaylist();const e=this.currentLevelIndex,i=this.currentLevel;if(i&&this.shouldLoadPlaylist(i)){const s=i.urlId;let n=i.uri;if(t)try{n=t.addDirectives(n)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}const a=i.attrs["PATHWAY-ID"];this.log(`Loading level index ${e}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""} with${a?" Pathway "+a:""} URI ${s+1}/${i.url.length} ${n}`),this.clearTimer(),this.hls.trigger(m.LEVEL_LOADING,{url:n,level:e,id:s,deliveryDirectives:t||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(t){this.level=t,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=t)}removeLevel(t,e){const i=(n,a)=>a!==e,s=this._levels.filter((n,a)=>a!==t?!0:n.url.length>1&&e!==void 0?(n.url=n.url.filter(i),n.audioGroupIds&&(n.audioGroupIds=n.audioGroupIds.filter(i)),n.textGroupIds&&(n.textGroupIds=n.textGroupIds.filter(i)),n.urlId=0,!0):(this.steering&&this.steering.removeLevel(n),!1));this.hls.trigger(m.LEVELS_UPDATED,{levels:s})}onLevelsUpdated(t,{levels:e}){e.forEach((i,s)=>{const{details:n}=i;n!=null&&n.fragments&&n.fragments.forEach(a=>{a.level=s})}),this._levels=e}}function hr(r,t,e){e&&(t==="audio"?(r.audioGroupIds||(r.audioGroupIds=[]),r.audioGroupIds[r.url.length-1]=e):t==="text"&&(r.textGroupIds||(r.textGroupIds=[]),r.textGroupIds[r.url.length-1]=e))}function fh(r){const t={};r.forEach(e=>{const i=e.groupId||"";e.id=t[i]=t[i]||0,t[i]++})}var $t={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class yg{constructor(t){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=t,this._registerListeners()}_registerListeners(){const{hls:t}=this;t.on(m.BUFFER_APPENDED,this.onBufferAppended,this),t.on(m.FRAG_BUFFERED,this.onFragBuffered,this),t.on(m.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:t}=this;t.off(m.BUFFER_APPENDED,this.onBufferAppended,this),t.off(m.FRAG_BUFFERED,this.onFragBuffered,this),t.off(m.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(t,e){const i=this.activePartLists[e];if(i)for(let s=i.length;s--;){const n=i[s];if(!n)break;const a=n.end;if(n.start<=t&&a!==null&&t<=a)return n}return this.getBufferedFrag(t,e)}getBufferedFrag(t,e){const{fragments:i}=this,s=Object.keys(i);for(let n=s.length;n--;){const a=i[s[n]];if((a==null?void 0:a.body.type)===e&&a.buffered){const o=a.body;if(o.start<=t&&t<=o.end)return o}}return null}detectEvictedFragments(t,e,i,s){this.timeRanges&&(this.timeRanges[t]=e);const n=(s==null?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach(a=>{const o=this.fragments[a];if(!o||n>=o.body.sn)return;if(!o.buffered&&!o.loaded){o.body.type===i&&this.removeFragment(o.body);return}const l=o.range[t];l&&l.time.some(h=>{const c=!this.isTimeBuffered(h.startPTS,h.endPTS,e);return c&&this.removeFragment(o.body),c})})}detectPartialFragments(t){const e=this.timeRanges,{frag:i,part:s}=t;if(!e||i.sn==="initSegment")return;const n=_i(i),a=this.fragments[n];if(!a||a.buffered&&i.gap)return;const o=!i.relurl;Object.keys(e).forEach(l=>{const h=i.elementaryStreams[l];if(!h)return;const c=e[l],d=o||h.partial===!0;a.range[l]=this.getBufferedTimes(i,s,d,c)}),a.loaded=null,Object.keys(a.range).length?(a.buffered=!0,(a.body.endList=i.endList||a.body.endList)&&(this.endListFragments[a.body.type]=a),cr(a)||this.removeParts(i.sn-1,i.type)):this.removeFragment(a.body)}removeParts(t,e){const i=this.activePartLists[e];i&&(this.activePartLists[e]=i.filter(s=>s.fragment.sn>=t))}fragBuffered(t,e){const i=_i(t);let s=this.fragments[i];!s&&e&&(s=this.fragments[i]={body:t,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},t.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(t,e,i,s){const n={time:[],partial:i},a=t.start,o=t.end,l=t.minEndPTS||o,h=t.maxStartPTS||a;for(let c=0;c<s.length;c++){const d=s.start(c)-this.bufferPadding,u=s.end(c)+this.bufferPadding;if(h>=d&&l<=u){n.time.push({startPTS:Math.max(a,s.start(c)),endPTS:Math.min(o,s.end(c))});break}else if(a<u&&o>d)n.partial=!0,n.time.push({startPTS:Math.max(a,s.start(c)),endPTS:Math.min(o,s.end(c))});else if(o<=d)break}return n}getPartialFragment(t){let e=null,i,s,n,a=0;const{bufferPadding:o,fragments:l}=this;return Object.keys(l).forEach(h=>{const c=l[h];c&&cr(c)&&(s=c.body.start-o,n=c.body.end+o,t>=s&&t<=n&&(i=Math.min(t-s,n-t),a<=i&&(e=c.body,a=i)))}),e}isEndListAppended(t){const e=this.endListFragments[t];return e!==void 0&&(e.buffered||cr(e))}getState(t){const e=_i(t),i=this.fragments[e];return i?i.buffered?cr(i)?$t.PARTIAL:$t.OK:$t.APPENDING:$t.NOT_LOADED}isTimeBuffered(t,e,i){let s,n;for(let a=0;a<i.length;a++){if(s=i.start(a)-this.bufferPadding,n=i.end(a)+this.bufferPadding,t>=s&&e<=n)return!0;if(e<=s)return!1}return!1}onFragLoaded(t,e){const{frag:i,part:s}=e;if(i.sn==="initSegment"||i.bitrateTest)return;const n=s?null:e,a=_i(i);this.fragments[a]={body:i,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(t,e){const{frag:i,part:s,timeRanges:n}=e;if(i.sn==="initSegment")return;const a=i.type;if(s){let o=this.activePartLists[a];o||(this.activePartLists[a]=o=[]),o.push(s)}this.timeRanges=n,Object.keys(n).forEach(o=>{const l=n[o];this.detectEvictedFragments(o,l,a,s)})}onFragBuffered(t,e){this.detectPartialFragments(e)}hasFragment(t){const e=_i(t);return!!this.fragments[e]}hasParts(t){var e;return!!((e=this.activePartLists[t])!=null&&e.length)}removeFragmentsInRange(t,e,i,s,n){s&&!this.hasGaps||Object.keys(this.fragments).forEach(a=>{const o=this.fragments[a];if(!o)return;const l=o.body;l.type!==i||s&&!l.gap||l.start<e&&l.end>t&&(o.buffered||n)&&this.removeFragment(l)})}removeFragment(t){const e=_i(t);t.stats.loaded=0,t.clearElementaryStreamInfo();const i=this.activePartLists[t.type];if(i){const s=t.sn;this.activePartLists[t.type]=i.filter(n=>n.fragment.sn!==s)}delete this.fragments[e],t.endList&&delete this.endListFragments[t.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function cr(r){var t,e,i;return r.buffered&&(r.body.gap||((t=r.range.video)==null?void 0:t.partial)||((e=r.range.audio)==null?void 0:e.partial)||((i=r.range.audiovideo)==null?void 0:i.partial))}function _i(r){return`${r.type}_${r.level}_${r.urlId}_${r.sn}`}const ph=Math.pow(2,17);class Eg{constructor(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(t,e){const i=t.url;if(!i)return Promise.reject(new Me({type:Q.NETWORK_ERROR,details:$.FRAG_LOAD_ERROR,fatal:!1,frag:t,error:new Error(`Fragment does not have a ${i?"part list":"url"}`),networkDetails:null}));this.abort();const s=this.config,n=s.fLoader,a=s.loader;return new Promise((o,l)=>{if(this.loader&&this.loader.destroy(),t.gap)if(t.tagList.some(f=>f[0]==="GAP")){l(mh(t));return}else t.gap=!1;const h=this.loader=t.loader=n?new n(s):new a(s),c=gh(t),d=dh(s.fragLoadPolicy.default),u={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:t.sn==="initSegment"?1/0:ph};t.stats=h.stats,h.load(c,u,{onSuccess:(f,p,g,v)=>{this.resetLoader(t,h);let E=f.data;g.resetIV&&t.decryptdata&&(t.decryptdata.iv=new Uint8Array(E.slice(0,16)),E=E.slice(16)),o({frag:t,part:null,payload:E,networkDetails:v})},onError:(f,p,g,v)=>{this.resetLoader(t,h),l(new Me({type:Q.NETWORK_ERROR,details:$.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:Qt({url:i,data:void 0},f),error:new Error(`HTTP Error ${f.code} ${f.text}`),networkDetails:g,stats:v}))},onAbort:(f,p,g)=>{this.resetLoader(t,h),l(new Me({type:Q.NETWORK_ERROR,details:$.INTERNAL_ABORTED,fatal:!1,frag:t,error:new Error("Aborted"),networkDetails:g,stats:f}))},onTimeout:(f,p,g)=>{this.resetLoader(t,h),l(new Me({type:Q.NETWORK_ERROR,details:$.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,error:new Error(`Timeout after ${u.timeout}ms`),networkDetails:g,stats:f}))},onProgress:(f,p,g,v)=>{e&&e({frag:t,part:null,payload:g,networkDetails:v})}})})}loadPart(t,e,i){this.abort();const s=this.config,n=s.fLoader,a=s.loader;return new Promise((o,l)=>{if(this.loader&&this.loader.destroy(),t.gap||e.gap){l(mh(t,e));return}const h=this.loader=t.loader=n?new n(s):new a(s),c=gh(t,e),d=dh(s.fragLoadPolicy.default),u={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:ph};e.stats=h.stats,h.load(c,u,{onSuccess:(f,p,g,v)=>{this.resetLoader(t,h),this.updateStatsFromPart(t,e);const E={frag:t,part:e,payload:f.data,networkDetails:v};i(E),o(E)},onError:(f,p,g,v)=>{this.resetLoader(t,h),l(new Me({type:Q.NETWORK_ERROR,details:$.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:Qt({url:c.url,data:void 0},f),error:new Error(`HTTP Error ${f.code} ${f.text}`),networkDetails:g,stats:v}))},onAbort:(f,p,g)=>{t.stats.aborted=e.stats.aborted,this.resetLoader(t,h),l(new Me({type:Q.NETWORK_ERROR,details:$.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,error:new Error("Aborted"),networkDetails:g,stats:f}))},onTimeout:(f,p,g)=>{this.resetLoader(t,h),l(new Me({type:Q.NETWORK_ERROR,details:$.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,error:new Error(`Timeout after ${u.timeout}ms`),networkDetails:g,stats:f}))}})})}updateStatsFromPart(t,e){const i=t.stats,s=e.stats,n=s.total;if(i.loaded+=s.loaded,n){const l=Math.round(t.duration/e.duration),h=Math.min(Math.round(i.loaded/n),l),c=(l-h)*Math.round(i.loaded/h);i.total=i.loaded+c}else i.total=Math.max(i.loaded,i.total);const a=i.loading,o=s.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()}}function gh(r,t=null){const e=t||r,i={frag:r,part:t,responseType:"arraybuffer",url:e.url,headers:{},rangeStart:0,rangeEnd:0},s=e.byteRangeStartOffset,n=e.byteRangeEndOffset;if(z(s)&&z(n)){var a;let o=s,l=n;if(r.sn==="initSegment"&&((a=r.decryptdata)==null?void 0:a.method)==="AES-128"){const h=n-s;h%16&&(l=n+(16-h%16)),s!==0&&(i.resetIV=!0,o=s-16)}i.rangeStart=o,i.rangeEnd=l}return i}function mh(r,t){const e=new Error(`GAP ${r.gap?"tag":"attribute"} found`),i={type:Q.MEDIA_ERROR,details:$.FRAG_GAP,fatal:!1,frag:r,error:e,networkDetails:null};return t&&(i.part=t),(t||r).stats.aborted=!0,new Me(i)}class Me extends Error{constructor(t){super(t.error.message),this.data=void 0,this.data=t}}class bg{constructor(t){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=t}abort(t){for(const e in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[e].loader;if(i){if(t&&t!==i.context.frag.type)return;i.abort()}}}detach(){for(const t in this.keyUriToKeyInfo){const e=this.keyUriToKeyInfo[t];(e.mediaKeySessionContext||e.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[t]}}destroy(){this.detach();for(const t in this.keyUriToKeyInfo){const e=this.keyUriToKeyInfo[t].loader;e&&e.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(t,e=$.KEY_LOAD_ERROR,i,s,n){return new Me({type:Q.NETWORK_ERROR,details:e,fatal:!1,frag:t,response:n,error:i,networkDetails:s})}loadClear(t,e){if(this.emeController&&this.config.emeEnabled){const{sn:i,cc:s}=t;for(let n=0;n<e.length;n++){const a=e[n];if(s<=a.cc&&(i==="initSegment"||a.sn==="initSegment"||i<a.sn)){this.emeController.selectKeySystemFormat(a).then(o=>{a.setKeyFormat(o)});break}}}}load(t){return!t.decryptdata&&t.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(t).then(e=>this.loadInternal(t,e)):this.loadInternal(t)}loadInternal(t,e){var i,s;e&&t.setKeyFormat(e);const n=t.decryptdata;if(!n){const h=new Error(e?`Expected frag.decryptdata to be defined after setting format ${e}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(t,$.KEY_LOAD_ERROR,h))}const a=n.uri;if(!a)return Promise.reject(this.createKeyLoadError(t,$.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if((i=o)!=null&&i.decryptdata.key)return n.key=o.decryptdata.key,Promise.resolve({frag:t,keyInfo:o});if((s=o)!=null&&s.keyLoadPromise){var l;switch((l=o.mediaKeySessionContext)==null?void 0:l.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then(h=>(n.key=h.keyInfo.decryptdata.key,{frag:t,keyInfo:o}))}}switch(o=this.keyUriToKeyInfo[a]={decryptdata:n,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},n.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return n.keyFormat==="identity"?this.loadKeyHTTP(o,t):this.loadKeyEME(o,t);case"AES-128":return this.loadKeyHTTP(o,t);default:return Promise.reject(this.createKeyLoadError(t,$.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${n.method}"`)))}}loadKeyEME(t,e){const i={frag:e,keyInfo:t};if(this.emeController&&this.config.emeEnabled){const s=this.emeController.loadKey(i);if(s)return(t.keyLoadPromise=s.then(n=>(t.mediaKeySessionContext=n,i))).catch(n=>{throw t.keyLoadPromise=null,n})}return Promise.resolve(i)}loadKeyHTTP(t,e){const i=this.config,s=i.loader,n=new s(i);return e.keyLoader=t.loader=n,t.keyLoadPromise=new Promise((a,o)=>{const l={keyInfo:t,frag:e,responseType:"arraybuffer",url:t.decryptdata.uri},h=i.keyLoadPolicy.default,c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(u,f,p,g)=>{const{frag:v,keyInfo:E,url:A}=p;if(!v.decryptdata||E!==this.keyUriToKeyInfo[A])return o(this.createKeyLoadError(v,$.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),g));E.decryptdata.key=v.decryptdata.key=new Uint8Array(u.data),v.keyLoader=null,E.loader=null,a({frag:v,keyInfo:E})},onError:(u,f,p,g)=>{this.resetLoader(f),o(this.createKeyLoadError(e,$.KEY_LOAD_ERROR,new Error(`HTTP Error ${u.code} loading key ${u.text}`),p,Qt({url:l.url,data:void 0},u)))},onTimeout:(u,f,p)=>{this.resetLoader(f),o(this.createKeyLoadError(e,$.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),p))},onAbort:(u,f,p)=>{this.resetLoader(f),o(this.createKeyLoadError(e,$.INTERNAL_ABORTED,new Error("key loading aborted"),p))}};n.load(l,c,d)})}resetLoader(t){const{frag:e,keyInfo:i,url:s}=t,n=i.loader;e.keyLoader===n&&(e.keyLoader=null,i.loader=null),delete this.keyUriToKeyInfo[s],n&&n.destroy()}}class Tg{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(t){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,t),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}const Ag={length:0,start:()=>0,end:()=>0};class Et{static isBuffered(t,e){try{if(t){const i=Et.getBuffered(t);for(let s=0;s<i.length;s++)if(e>=i.start(s)&&e<=i.end(s))return!0}}catch{}return!1}static bufferInfo(t,e,i){try{if(t){const s=Et.getBuffered(t),n=[];let a;for(a=0;a<s.length;a++)n.push({start:s.start(a),end:s.end(a)});return this.bufferedInfo(n,e,i)}}catch{}return{len:0,start:e,end:e,nextStart:void 0}}static bufferedInfo(t,e,i){e=Math.max(0,e),t.sort(function(h,c){return h.start-c.start||c.end-h.end});let s=[];if(i)for(let h=0;h<t.length;h++){const c=s.length;if(c){const d=s[c-1].end;t[h].start-d<i?t[h].end>d&&(s[c-1].end=t[h].end):s.push(t[h])}else s.push(t[h])}else s=t;let n=0,a,o=e,l=e;for(let h=0;h<s.length;h++){const c=s[h].start,d=s[h].end;if(e+i>=c&&e<d)o=c,l=d,n=l-e;else if(e+i<c){a=c;break}}return{len:n,start:o||0,end:l||0,nextStart:a}}static getBuffered(t){try{return t.buffered}catch(e){return _.log("failed to get media.buffered",e),Ag}}}class Hn{constructor(t,e,i,s=0,n=-1,a=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=dr(),this.buffering={audio:dr(),video:dr(),audiovideo:dr()},this.level=t,this.sn=e,this.id=i,this.size=s,this.part=n,this.partial=a}}function dr(){return{start:0,executeStart:0,executeEnd:0,end:0}}function vh(r,t){let e=null;for(let i=0,s=r.length;i<s;i++){const n=r[i];if(n&&n.cc===t){e=n;break}}return e}function wg(r,t,e){return!!(t.details&&(e.endCC>e.startCC||r&&r.cc<e.startCC))}function Sg(r,t,e=0){const i=r.fragments,s=t.fragments;if(!s.length||!i.length){_.log("No fragments to align");return}const n=vh(i,s[0].cc);if(!n||n&&!n.startPTS){_.log("No frag in previous level to align on");return}return n}function yh(r,t){if(r){const e=r.start+t;r.start=r.startPTS=e,r.endPTS=e+r.duration}}function Gn(r,t){const e=t.fragments;for(let i=0,s=e.length;i<s;i++)yh(e[i],r);t.fragmentHint&&yh(t.fragmentHint,r),t.alignedSliding=!0}function Lg(r,t,e){t&&(Rg(r,e,t),!e.alignedSliding&&t.details&&_g(e,t.details),!e.alignedSliding&&t.details&&!e.skippedSegments&&oh(t.details,e))}function Rg(r,t,e){if(wg(r,e,t)){const i=Sg(e.details,t);i&&z(i.start)&&(_.log(`Adjusting PTS using last level due to CC increase within current level ${t.url}`),Gn(i.start,t))}}function _g(r,t){if(!t.fragments.length||!r.hasProgramDateTime||!t.hasProgramDateTime)return;const e=t.fragments[0].programDateTime,i=r.fragments[0].programDateTime,s=(i-e)/1e3+t.fragments[0].start;s&&z(s)&&(_.log(`Adjusting PTS using programDateTime delta ${i-e}ms, sliding:${s.toFixed(3)} ${r.url} `),Gn(s,r))}function Eh(r,t){if(!r.hasProgramDateTime||!t.hasProgramDateTime)return;const e=r.fragments,i=t.fragments;if(!e.length||!i.length)return;const s=Math.round(i.length/2)-1,n=i[s],a=vh(e,n.cc)||e[Math.round(e.length/2)-1],o=n.programDateTime,l=a.programDateTime;if(o===null||l===null)return;const h=(l-o)/1e3-(a.start-n.start);Gn(h,r)}class kg{constructor(t,e){this.subtle=void 0,this.aesIV=void 0,this.subtle=t,this.aesIV=e}decrypt(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)}}class Ig{constructor(t,e){this.subtle=void 0,this.key=void 0,this.subtle=t,this.key=e}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function Dg(r){const t=r.byteLength,e=t&&new DataView(r.buffer).getUint8(t-1);return e?li(r,0,t-e):r}class Cg{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(t){const e=new DataView(t),i=new Uint32Array(4);for(let s=0;s<4;s++)i[s]=e.getUint32(s*4);return i}initTable(){const t=this.sBox,e=this.invSBox,i=this.subMix,s=i[0],n=i[1],a=i[2],o=i[3],l=this.invSubMix,h=l[0],c=l[1],d=l[2],u=l[3],f=new Uint32Array(256);let p=0,g=0,v=0;for(v=0;v<256;v++)v<128?f[v]=v<<1:f[v]=v<<1^283;for(v=0;v<256;v++){let E=g^g<<1^g<<2^g<<3^g<<4;E=E>>>8^E&255^99,t[p]=E,e[E]=p;const A=f[p],L=f[A],y=f[L];let S=f[E]*257^E*16843008;s[p]=S<<24|S>>>8,n[p]=S<<16|S>>>16,a[p]=S<<8|S>>>24,o[p]=S,S=y*16843009^L*65537^A*257^p*16843008,h[E]=S<<24|S>>>8,c[E]=S<<16|S>>>16,d[E]=S<<8|S>>>24,u[E]=S,p?(p=A^f[f[f[y^A]]],g^=f[f[g]]):p=g=1}}expandKey(t){const e=this.uint8ArrayToUint32Array_(t);let i=!0,s=0;for(;s<e.length&&i;)i=e[s]===this.key[s],s++;if(i)return;this.key=e;const n=this.keySize=e.length;if(n!==4&&n!==6&&n!==8)throw new Error("Invalid aes key size="+n);const a=this.ksRows=(n+6+1)*4;let o,l;const h=this.keySchedule=new Uint32Array(a),c=this.invKeySchedule=new Uint32Array(a),d=this.sBox,u=this.rcon,f=this.invSubMix,p=f[0],g=f[1],v=f[2],E=f[3];let A,L;for(o=0;o<a;o++){if(o<n){A=h[o]=e[o];continue}L=A,o%n===0?(L=L<<8|L>>>24,L=d[L>>>24]<<24|d[L>>>16&255]<<16|d[L>>>8&255]<<8|d[L&255],L^=u[o/n|0]<<24):n>6&&o%n===4&&(L=d[L>>>24]<<24|d[L>>>16&255]<<16|d[L>>>8&255]<<8|d[L&255]),h[o]=A=(h[o-n]^L)>>>0}for(l=0;l<a;l++)o=a-l,l&3?L=h[o]:L=h[o-4],l<4||o<=4?c[l]=L:c[l]=p[d[L>>>24]]^g[d[L>>>16&255]]^v[d[L>>>8&255]]^E[d[L&255]],c[l]=c[l]>>>0}networkToHostOrderSwap(t){return t<<24|(t&65280)<<8|(t&16711680)>>8|t>>>24}decrypt(t,e,i){const s=this.keySize+6,n=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,l=o[0],h=o[1],c=o[2],d=o[3],u=this.uint8ArrayToUint32Array_(i);let f=u[0],p=u[1],g=u[2],v=u[3];const E=new Int32Array(t),A=new Int32Array(E.length);let L,y,S,R,D,M,C,I,G,F,V,q,w,P;const H=this.networkToHostOrderSwap;for(;e<E.length;){for(G=H(E[e]),F=H(E[e+1]),V=H(E[e+2]),q=H(E[e+3]),D=G^n[0],M=q^n[1],C=V^n[2],I=F^n[3],w=4,P=1;P<s;P++)L=l[D>>>24]^h[M>>16&255]^c[C>>8&255]^d[I&255]^n[w],y=l[M>>>24]^h[C>>16&255]^c[I>>8&255]^d[D&255]^n[w+1],S=l[C>>>24]^h[I>>16&255]^c[D>>8&255]^d[M&255]^n[w+2],R=l[I>>>24]^h[D>>16&255]^c[M>>8&255]^d[C&255]^n[w+3],D=L,M=y,C=S,I=R,w=w+4;L=a[D>>>24]<<24^a[M>>16&255]<<16^a[C>>8&255]<<8^a[I&255]^n[w],y=a[M>>>24]<<24^a[C>>16&255]<<16^a[I>>8&255]<<8^a[D&255]^n[w+1],S=a[C>>>24]<<24^a[I>>16&255]<<16^a[D>>8&255]<<8^a[M&255]^n[w+2],R=a[I>>>24]<<24^a[D>>16&255]<<16^a[M>>8&255]<<8^a[C&255]^n[w+3],A[e]=H(L^f),A[e+1]=H(R^p),A[e+2]=H(S^g),A[e+3]=H(y^v),f=G,p=F,g=V,v=q,e=e+4}return A.buffer}}const xg=16;class Vn{constructor(t,{removePKCS7Padding:e=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=t.enableSoftwareAES,this.removePKCS7Padding=e,e)try{const i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch{}this.subtle===null&&(this.useSoftware=!0)}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:t,remainderData:e}=this;if(!t||e)return this.reset(),null;const i=new Uint8Array(t);return this.reset(),this.removePKCS7Padding?Dg(i):i}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(t,e,i){return this.useSoftware?new Promise((s,n)=>{this.softwareDecrypt(new Uint8Array(t),e,i);const a=this.flush();a?s(a.buffer):n(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(t),e,i)}softwareDecrypt(t,e,i){const{currentIV:s,currentResult:n,remainderData:a}=this;this.logOnce("JS AES decrypt"),a&&(t=hi(a,t),this.remainderData=null);const o=this.getValidChunk(t);if(!o.length)return null;s&&(i=s);let l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new Cg),l.expandKey(e);const h=n;return this.currentResult=l.decrypt(o.buffer,0,i),this.currentIV=li(o,-16).buffer,h||null}webCryptoDecrypt(t,e,i){const s=this.subtle;return(this.key!==e||!this.fastAesKey)&&(this.key=e,this.fastAesKey=new Ig(s,e)),this.fastAesKey.expandKey().then(n=>s?(this.logOnce("WebCrypto AES decrypt"),new kg(s,new Uint8Array(i)).decrypt(t.buffer,n)):Promise.reject(new Error("web crypto not initialized"))).catch(n=>(_.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${n.name}: ${n.message}`),this.onWebCryptoError(t,e,i)))}onWebCryptoError(t,e,i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(t,e,i);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(t){let e=t;const i=t.length-t.length%xg;return i!==t.length&&(e=li(t,0,i),this.remainderData=li(t,i)),e}logOnce(t){this.logEnabled&&(_.log(`[decrypter]: ${t}`),this.logEnabled=!1)}}const Pg={toString:function(r){let t="";const e=r.length;for(let i=0;i<e;i++)t+=`[${r.start(i).toFixed(3)}-${r.end(i).toFixed(3)}]`;return t}},B={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class Kn extends Tg{constructor(t,e,i,s,n){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=B.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=n,this.logPrefix=s,this.log=_.log.bind(_,`${s}:`),this.warn=_.warn.bind(_,`${s}:`),this.hls=t,this.fragmentLoader=new Eg(t.config),this.keyLoader=i,this.fragmentTracker=e,this.config=t.config,this.decrypter=new Vn(t.config),t.on(m.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(t){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const t=this.fragCurrent;t!=null&&t.loader&&(t.abortRequests(),this.fragmentTracker.removeFragment(t)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=B.STOPPED}_streamEnded(t,e){if(e.live||t.nextStart||!t.end||!this.media)return!1;const i=e.partList;if(i!=null&&i.length){const n=i[i.length-1];return Et.isBuffered(this.media,n.start+n.duration/2)}const s=e.fragments[e.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(s)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var t;return(t=this.levels[this.levelLastLoaded])==null?void 0:t.details}}onMediaAttached(t,e){const i=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("ended",this.onvended);const s=this.config;this.levels&&s.autoStartLoad&&this.state===B.STOPPED&&this.startLoad(s.startPosition)}onMediaDetaching(){const t=this.media;t!=null&&t.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&this.onvseeking&&this.onvended&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:t,fragCurrent:e,media:i,mediaBuffer:s,state:n}=this,a=i?i.currentTime:0,o=Et.bufferInfo(s||i,a,t.maxBufferHole);if(this.log(`media seeking to ${z(a)?a.toFixed(3):a}, state: ${n}`),this.state===B.ENDED)this.resetLoadingState();else if(e){const l=t.maxFragLookUpTolerance,h=e.start-l,c=e.start+e.duration+l;if(!o.len||c<o.start||h>o.end){const d=a>c;(a<h||d)&&(d&&e.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),e.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}i&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),this.lastCurrentTime=a),!this.loadedmetadata&&!o.len&&(this.nextLoadPosition=this.startPosition=a),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(t,e){this.startTimeOffset=e.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.stopLoad(),super.onHandlerDestroying()}onHandlerDestroyed(){this.state=B.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(t,e,i){this._loadFragForPlayback(t,e,i)}_loadFragForPlayback(t,e,i){const s=n=>{if(this.fragContextChanged(t)){this.warn(`Fragment ${t.sn}${n.part?" p: "+n.part.index:""} of level ${t.level} was dropped during download.`),this.fragmentTracker.removeFragment(t);return}t.stats.chunkCount++,this._handleFragmentLoadProgress(n)};this._doFragLoad(t,e,i,s).then(n=>{if(!n)return;const a=this.state;if(this.fragContextChanged(t)){(a===B.FRAG_LOADING||!this.fragCurrent&&a===B.PARSING)&&(this.fragmentTracker.removeFragment(t),this.state=B.IDLE);return}"payload"in n&&(this.log(`Loaded fragment ${t.sn} of level ${t.level}`),this.hls.trigger(m.FRAG_LOADED,n)),this._handleFragmentLoadComplete(n)}).catch(n=>{this.state===B.STOPPED||this.state===B.ERROR||(this.warn(n),this.resetFragmentLoading(t))})}clearTrackerIfNeeded(t){var e;const{fragmentTracker:i}=this;if(i.getState(t)===$t.APPENDING){const s=t.type,n=this.getFwdBufferInfo(this.mediaBuffer,s),a=Math.max(t.duration,n?n.len:this.config.maxBufferLength);this.reduceMaxBufferLength(a)&&i.removeFragment(t)}else((e=this.mediaBuffer)==null?void 0:e.buffered.length)===0?i.removeAllFragments():i.hasParts(t.type)&&(i.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type}),i.getState(t)===$t.PARTIAL&&i.removeFragment(t))}checkLiveUpdate(t){if(t.updated&&!t.live){const e=t.fragments[t.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type})}t.fragments[0]||(t.deltaUpdateFailed=!0)}flushMainBuffer(t,e,i=null){if(!(t-e))return;const s={startOffset:t,endOffset:e,type:i};this.hls.trigger(m.BUFFER_FLUSHING,s)}_loadInitSegment(t,e){this._doFragLoad(t,e).then(i=>{if(!i||this.fragContextChanged(t)||!this.levels)throw new Error("init load aborted");return i}).then(i=>{const{hls:s}=this,{payload:n}=i,a=t.decryptdata;if(n&&n.byteLength>0&&a&&a.key&&a.iv&&a.method==="AES-128"){const o=self.performance.now();return this.decrypter.decrypt(new Uint8Array(n),a.key.buffer,a.iv.buffer).catch(l=>{throw s.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const h=self.performance.now();return s.trigger(m.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:o,tdecrypt:h}}),i.payload=l,i})}return i}).then(i=>{const{fragCurrent:s,hls:n,levels:a}=this;if(!a)throw new Error("init load aborted, missing levels");const o=t.stats;this.state=B.IDLE,e.fragmentError=0,t.data=new Uint8Array(i.payload),o.parsing.start=o.buffering.start=self.performance.now(),o.parsing.end=o.buffering.end=self.performance.now(),i.frag===s&&n.trigger(m.FRAG_BUFFERED,{stats:o,frag:s,part:null,id:t.type}),this.tick()}).catch(i=>{this.state===B.STOPPED||this.state===B.ERROR||(this.warn(i),this.resetFragmentLoading(t))})}fragContextChanged(t){const{fragCurrent:e}=this;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId}fragBufferedComplete(t,e){var i,s,n,a;const o=this.mediaBuffer?this.mediaBuffer:this.media;this.log(`Buffered ${t.type} sn: ${t.sn}${e?" part: "+e.index:""} of ${this.playlistType===Z.MAIN?"level":"track"} ${t.level} (frag:[${((i=t.startPTS)!=null?i:NaN).toFixed(3)}-${((s=t.endPTS)!=null?s:NaN).toFixed(3)}] > buffer:${o?Pg.toString(Et.getBuffered(o)):"(detached)"})`),this.state=B.IDLE,o&&(!this.loadedmetadata&&t.type==Z.MAIN&&o.buffered.length&&((n=this.fragCurrent)==null?void 0:n.sn)===((a=this.fragPrevious)==null?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(t){const{transmuxer:e}=this;if(!e)return;const{frag:i,part:s,partsLoaded:n}=t,a=!n||n.length===0||n.some(l=>!l),o=new Hn(i.level,i.sn,i.stats.chunkCount+1,0,s?s.index:-1,!a);e.flush(o)}_handleFragmentLoadProgress(t){}_doFragLoad(t,e,i=null,s){var n;const a=e==null?void 0:e.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;if(t.encrypted&&!((n=t.decryptdata)!=null&&n.key)?(this.log(`Loading key for ${t.sn} of [${a.startSN}-${a.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${t.level}`),this.state=B.KEY_LOADING,this.fragCurrent=t,o=this.keyLoader.load(t).then(c=>{if(!this.fragContextChanged(c.frag))return this.hls.trigger(m.KEY_LOADED,c),this.state===B.KEY_LOADING&&(this.state=B.IDLE),c}),this.hls.trigger(m.KEY_LOADING,{frag:t}),this.fragCurrent===null&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!t.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(t,a.encryptedFragments),i=Math.max(t.start,i||0),this.config.lowLatencyMode&&t.sn!=="initSegment"){const c=a.partList;if(c&&s){i>t.end&&a.fragmentHint&&(t=a.fragmentHint);const d=this.getNextPart(c,t,i);if(d>-1){const u=c[d];this.log(`Loading part sn: ${t.sn} p: ${u.index} cc: ${t.cc} of playlist [${a.startSN}-${a.endSN}] parts [0-${d}-${c.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${t.level}, target: ${parseFloat(i.toFixed(3))}`),this.nextLoadPosition=u.start+u.duration,this.state=B.FRAG_LOADING;let f;return o?f=o.then(p=>!p||this.fragContextChanged(p.frag)?null:this.doFragPartsLoad(t,u,e,s)).catch(p=>this.handleFragLoadError(p)):f=this.doFragPartsLoad(t,u,e,s).catch(p=>this.handleFragLoadError(p)),this.hls.trigger(m.FRAG_LOADING,{frag:t,part:u,targetBufferTime:i}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):f}else if(!t.url||this.loadedEndOfParts(c,i))return Promise.resolve(null)}}this.log(`Loading fragment ${t.sn} cc: ${t.cc} ${a?"of ["+a.startSN+"-"+a.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${t.level}, target: ${parseFloat(i.toFixed(3))}`),z(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=B.FRAG_LOADING;const l=this.config.progressive;let h;return l&&o?h=o.then(c=>!c||this.fragContextChanged(c==null?void 0:c.frag)?null:this.fragmentLoader.load(t,s)).catch(c=>this.handleFragLoadError(c)):h=Promise.all([this.fragmentLoader.load(t,l?s:void 0),o]).then(([c])=>(!l&&c&&s&&s(c),c)).catch(c=>this.handleFragLoadError(c)),this.hls.trigger(m.FRAG_LOADING,{frag:t,targetBufferTime:i}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):h}doFragPartsLoad(t,e,i,s){return new Promise((n,a)=>{var o;const l=[],h=(o=i.details)==null?void 0:o.partList,c=d=>{this.fragmentLoader.loadPart(t,d,s).then(u=>{l[d.index]=u;const f=u.part;this.hls.trigger(m.FRAG_LOADED,u);const p=lh(i,t.sn,d.index+1)||hh(h,t.sn,d.index+1);if(p)c(p);else return n({frag:t,part:f,partsLoaded:l})}).catch(a)};c(e)})}handleFragLoadError(t){if("data"in t){const e=t.data;t.data&&e.details===$.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(m.ERROR,e)}else this.hls.trigger(m.ERROR,{type:Q.OTHER_ERROR,details:$.INTERNAL_EXCEPTION,err:t,error:t,fatal:!0});return null}_handleTransmuxerFlush(t){const e=this.getCurrentContext(t);if(!e||this.state!==B.PARSING){!this.fragCurrent&&this.state!==B.STOPPED&&this.state!==B.ERROR&&(this.state=B.IDLE);return}const{frag:i,part:s,level:n}=e,a=self.performance.now();i.stats.parsing.end=a,s&&(s.stats.parsing.end=a),this.updateLevelTiming(i,s,n,t.partial)}getCurrentContext(t){const{levels:e,fragCurrent:i}=this,{level:s,sn:n,part:a}=t;if(!(e!=null&&e[s]))return this.warn(`Levels object was unset while buffering fragment ${n} of level ${s}. The current chunk will not be buffered.`),null;const o=e[s],l=a>-1?lh(o,n,a):null,h=l?l.fragment:hg(o,n,i);return h?(i&&i!==h&&(h.stats=i.stats),{frag:h,part:l,level:o}):null}bufferFragmentData(t,e,i,s,n){var a;if(!t||this.state!==B.PARSING)return;const{data1:o,data2:l}=t;let h=o;if(o&&l&&(h=hi(o,l)),!((a=h)!=null&&a.length))return;const c={type:t.type,frag:e,part:i,chunkMeta:s,parent:e.type,data:h};if(this.hls.trigger(m.BUFFER_APPENDING,c),t.dropped&&t.independent&&!i){if(n)return;this.flushBufferGap(e)}}flushBufferGap(t){const e=this.media;if(!e)return;if(!Et.isBuffered(e,e.currentTime)){this.flushMainBuffer(0,t.start);return}const i=e.currentTime,s=Et.bufferInfo(e,i,0),n=t.duration,a=Math.min(this.config.maxFragLookUpTolerance*2,n*.25),o=Math.max(Math.min(t.start-a,s.end-a),i+a);t.start-o>a&&this.flushMainBuffer(o,t.start)}getFwdBufferInfo(t,e){const i=this.getLoadPosition();return z(i)?this.getFwdBufferInfoAtPos(t,i,e):null}getFwdBufferInfoAtPos(t,e,i){const{config:{maxBufferHole:s}}=this,n=Et.bufferInfo(t,e,s);if(n.len===0&&n.nextStart!==void 0){const a=this.fragmentTracker.getBufferedFrag(e,i);if(a&&n.nextStart<a.end)return Et.bufferInfo(t,e,Math.max(n.nextStart,s))}return n}getMaxBufferLength(t){const{config:e}=this;let i;return t?i=Math.max(8*e.maxBufferSize/t,e.maxBufferLength):i=e.maxBufferLength,Math.min(i,e.maxMaxBufferLength)}reduceMaxBufferLength(t){const e=this.config,i=t||e.maxBufferLength;return e.maxMaxBufferLength>=i?(e.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${e.maxMaxBufferLength}s`),!0):!1}getAppendedFrag(t,e=Z.MAIN){const i=this.fragmentTracker.getAppendedFrag(t,Z.MAIN);return i&&"fragment"in i?i.fragment:i}getNextFragment(t,e){const i=e.fragments,s=i.length;if(!s)return null;const{config:n}=this,a=i[0].start;let o;if(e.live){const l=n.initialLiveManifestSize;if(s<l)return this.warn(`Not enough fragments to start playback (have: ${s}, need: ${l})`),null;!e.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(o=this.getInitialLiveFragment(e,i),this.startPosition=o?this.hls.liveSyncPosition||o.start:t)}else t<=a&&(o=i[0]);if(!o){const l=n.lowLatencyMode?e.partEnd:e.fragmentEnd;o=this.getFragmentAtPosition(t,l,e)}return this.mapToInitFragWhenRequired(o)}isLoopLoading(t,e){const i=this.fragmentTracker.getState(t);return(i===$t.OK||i===$t.PARTIAL&&!!t.gap)&&this.nextLoadPosition>e}getNextFragmentLoopLoading(t,e,i,s,n){const a=t.gap,o=this.getNextFragment(this.nextLoadPosition,e);if(o===null)return o;if(t=o,a&&t&&!t.gap&&i.nextStart){const l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,i.nextStart,s);if(l!==null&&i.len+l.len>=n)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${t.sn}`),null}return t}mapToInitFragWhenRequired(t){return t!=null&&t.initSegment&&!(t!=null&&t.initSegment.data)&&!this.bitrateTest?t.initSegment:t}getNextPart(t,e,i){let s=-1,n=!1,a=!0;for(let o=0,l=t.length;o<l;o++){const h=t[o];if(a=a&&!h.independent,s>-1&&i<h.start)break;const c=h.loaded;c?s=-1:(n||h.independent||a)&&h.fragment===e&&(s=o),n=c}return s}loadedEndOfParts(t,e){const i=t[t.length-1];return i&&e>i.start&&i.loaded}getInitialLiveFragment(t,e){const i=this.fragPrevious;let s=null;if(i){if(t.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${i.programDateTime}`),s=dg(e,i.endProgramDateTime,this.config.maxFragLookUpTolerance)),!s){const n=i.sn+1;if(n>=t.startSN&&n<=t.endSN){const a=e[n-t.startSN];i.cc===a.cc&&(s=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=fg(e,i.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const n=this.hls.liveSyncPosition;n!==null&&(s=this.getFragmentAtPosition(n,this.bitrateTest?t.fragmentEnd:t.edge,t))}return s}getFragmentAtPosition(t,e,i){const{config:s}=this;let{fragPrevious:n}=this,{fragments:a,endSN:o}=i;const{fragmentHint:l}=i,h=s.maxFragLookUpTolerance,c=i.partList,d=!!(s.lowLatencyMode&&c!=null&&c.length&&l);d&&l&&!this.bitrateTest&&(a=a.concat(l),o=l.sn);let u;if(t<e){const f=t>e-h?0:h;u=vs(n,a,t,f)}else u=a[a.length-1];if(u){const f=u.sn-i.startSN,p=this.fragmentTracker.getState(u);if((p===$t.OK||p===$t.PARTIAL&&u.gap)&&(n=u),n&&u.sn===n.sn&&(!d||c[0].fragment.sn>u.sn)&&n&&u.level===n.level){const g=a[f+1];u.sn<o&&this.fragmentTracker.getState(g)!==$t.OK?u=g:u=null}}return u}synchronizeToLiveEdge(t){const{config:e,media:i}=this;if(!i)return;const s=this.hls.liveSyncPosition,n=i.currentTime,a=t.fragments[0].start,o=t.edge,l=n>=a-e.maxFragLookUpTolerance&&n<=o;if(s!==null&&i.duration>s&&(n<s||!l)){const h=e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:e.liveMaxLatencyDurationCount*t.targetduration;(!l&&i.readyState<4||n<o-h)&&(this.loadedmetadata||(this.nextLoadPosition=s),i.readyState&&(this.warn(`Playback: ${n.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${s.toFixed(3)}`),i.currentTime=s))}}alignPlaylists(t,e){const{levels:i,levelLastLoaded:s,fragPrevious:n}=this,a=s!==null?i[s]:null,o=t.fragments.length;if(!o)return this.warn("No fragments in live playlist"),0;const l=t.fragments[0].start,h=!e,c=t.alignedSliding&&z(l);if(h||!c&&!l){Lg(n,a,t);const d=t.fragments[0].start;return this.log(`Live playlist sliding: ${d.toFixed(2)} start-sn: ${e?e.startSN:"na"}->${t.startSN} prev-sn: ${n?n.sn:"na"} fragments: ${o}`),d}return l}waitForCdnTuneIn(t){return t.live&&t.canBlockReload&&t.partTarget&&t.tuneInGoal>Math.max(t.partHoldBack,t.partTarget*3)}setStartPosition(t,e){let i=this.startPosition;if(i<e&&(i=-1),i===-1||this.lastCurrentTime===-1){const s=this.startTimeOffset!==null,n=s?this.startTimeOffset:t.startTimeOffset;n!==null&&z(n)?(i=e+n,n<0&&(i+=t.totalduration),i=Math.min(Math.max(e,i),e+t.totalduration),this.log(`Start time offset ${n} found in ${s?"multivariant":"media"} playlist, adjust startPosition to ${i}`),this.startPosition=i):t.live?i=this.hls.liveSyncPosition||e:this.startPosition=i=0,this.lastCurrentTime=i}this.nextLoadPosition=i}getLoadPosition(){const{media:t}=this;let e=0;return this.loadedmetadata&&t?e=t.currentTime:this.nextLoadPosition&&(e=this.nextLoadPosition),e}handleFragLoadAborted(t,e){this.transmuxer&&t.sn!=="initSegment"&&t.stats.aborted&&(this.warn(`Fragment ${t.sn}${e?" part "+e.index:""} of level ${t.level} was aborted`),this.resetFragmentLoading(t))}resetFragmentLoading(t){(!this.fragCurrent||!this.fragContextChanged(t)&&this.state!==B.FRAG_LOADING_WAITING_RETRY)&&(this.state=B.IDLE)}onFragmentOrKeyLoadError(t,e){if(e.chunkMeta&&!e.frag){const d=this.getCurrentContext(e.chunkMeta);d&&(e.frag=d.frag)}const i=e.frag;if(!i||i.type!==t||!this.levels)return;if(this.fragContextChanged(i)){var s;this.warn(`Frag load error must match current frag to retry ${i.url} > ${(s=this.fragCurrent)==null?void 0:s.url}`);return}const n=e.details===$.FRAG_GAP;n&&this.fragmentTracker.fragBuffered(i,!0);const a=e.errorAction,{action:o,retryCount:l=0,retryConfig:h}=a||{};if(a&&o===Gt.RetryRequest&&h){var c;this.resetStartWhenNotLoaded((c=this.levelLastLoaded)!=null?c:i.level);const d=Fn(h,l);this.warn(`Fragment ${i.sn} of ${t} ${i.level} errored with ${e.details}, retrying loading ${l+1}/${h.maxNumRetry} in ${d}ms`),a.resolved=!0,this.retryDate=self.performance.now()+d,this.state=B.FRAG_LOADING_WAITING_RETRY}else h&&a?(this.resetFragmentErrors(t),l<h.maxNumRetry?n||(a.resolved=!0):_.warn(`${e.details} reached or exceeded max retry (${l})`)):(a==null?void 0:a.action)===Gt.SendAlternateToPenaltyBox?this.state=B.WAITING_LEVEL:this.state=B.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(t){if(this.state===B.PARSING||this.state===B.PARSED){const e=t.parent,i=this.getFwdBufferInfo(this.mediaBuffer,e),s=i&&i.len>.5;s&&this.reduceMaxBufferLength(i.len);const n=!s;return n&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${e} buffer`),t.frag&&(this.fragmentTracker.removeFragment(t.frag),this.nextLoadPosition=t.frag.start),this.resetLoadingState(),n}return!1}resetFragmentErrors(t){t===Z.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==B.STOPPED&&(this.state=B.IDLE)}afterBufferFlushed(t,e,i){if(!t)return;const s=Et.getBuffered(t);this.fragmentTracker.detectEvictedFragments(e,s,i),this.state===B.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=B.IDLE}resetStartWhenNotLoaded(t){if(!this.loadedmetadata){this.startFragRequested=!1;const e=this.levels?this.levels[t].details:null;e!=null&&e.live?(this.startPosition=-1,this.setStartPosition(e,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(t){var e;this.warn(`The loading context changed while buffering fragment ${t.sn} of level ${t.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded((e=this.levelLastLoaded)!=null?e:t.level),this.resetLoadingState()}removeUnbufferedFrags(t=0){this.fragmentTracker.removeFragmentsInRange(t,1/0,this.playlistType,!1,!0)}updateLevelTiming(t,e,i,s){var n;const a=i.details;if(!a){this.warn("level.details undefined");return}if(Object.keys(t.elementaryStreams).reduce((o,l)=>{const h=t.elementaryStreams[l];if(h){const c=h.endPTS-h.startPTS;if(c<=0)return this.warn(`Could not parse fragment ${t.sn} ${l} duration reliably (${c})`),o||!1;const d=s?0:ah(a,t,h.startPTS,h.endPTS,h.startDTS,h.endDTS);return this.hls.trigger(m.LEVEL_PTS_UPDATED,{details:a,level:i,drift:d,type:l,frag:t,start:h.startPTS,end:h.endPTS}),!0}return o},!1))i.fragmentError=0;else if(((n=this.transmuxer)==null?void 0:n.error)===null){const o=new Error(`Found no media in fragment ${t.sn} of level ${t.level} resetting transmuxer to fallback to playlist timing`);if(i.fragmentError===0&&(i.fragmentError++,t.gap=!0,this.fragmentTracker.removeFragment(t),this.fragmentTracker.fragBuffered(t,!0)),this.warn(o.message),this.hls.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,fatal:!1,error:o,frag:t,reason:`Found no media in msn ${t.sn} of level "${i.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=B.PARSED,this.hls.trigger(m.FRAG_PARSED,{frag:t,part:e})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(t){if(t.event==="demuxerWorker"){var e,i,s;this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded((e=(i=this.levelLastLoaded)!=null?i:(s=this.fragCurrent)==null?void 0:s.level)!=null?e:0),this.resetLoadingState()}}set state(t){const e=this._state;e!==t&&(this._state=t,this.log(`${e}->${t}`))}get state(){return this._state}}function bh(){return self.SourceBuffer||self.WebKitSourceBuffer}function Og(){const r=nr();if(!r)return!1;const t=bh(),e=r&&typeof r.isTypeSupported=="function"&&r.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),i=!t||t.prototype&&typeof t.prototype.appendBuffer=="function"&&typeof t.prototype.remove=="function";return!!e&&!!i}function $g(){var r;const t=bh();return typeof(t==null||(r=t.prototype)==null?void 0:r.changeType)=="function"}function Mg(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Fg(){const r=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(r);return{worker:new self.Worker(t),objectURL:t}}function Ng(r){const t=new self.URL(r,self.location.href).href;return{worker:new self.Worker(t),scriptURL:t}}function _e(r="",t=9e4){return{type:r,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class Th{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(t,e,i,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(t){this.initPTS=t,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(t,e){return!1}appendFrame(t,e,i){}demux(t,e){this.cachedData&&(t=hi(this.cachedData,t),this.cachedData=null);let i=er(t,0),s=i?i.length:0,n;const a=this._audioTrack,o=this._id3Track,l=i?bp(i):void 0,h=t.length;for((this.basePTS===null||this.frameIndex===0&&z(l))&&(this.basePTS=Ug(l,e,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),i&&i.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:ge.audioId3,duration:Number.POSITIVE_INFINITY});s<h;){if(this.canParse(t,s)){const c=this.appendFrame(a,t,s);c?(this.frameIndex++,this.lastPTS=c.sample.pts,s+=c.length,n=s):s=h}else Ep(t,s)?(i=er(t,s),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:ge.audioId3,duration:Number.POSITIVE_INFINITY}),s+=i.length,n=s):s++;if(s===h&&n!==h){const c=li(t,n);this.cachedData?this.cachedData=hi(this.cachedData,c):this.cachedData=c}}return{audioTrack:a,videoTrack:_e(),id3Track:o,textTrack:_e()}}demuxSampleAes(t,e,i){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(t){const e=this.cachedData;return e&&(this.cachedData=null,this.demux(e,0)),{audioTrack:this._audioTrack,videoTrack:_e(),id3Track:this._id3Track,textTrack:_e()}}destroy(){}}const Ug=(r,t,e)=>{if(z(r))return r*90;const i=e?e.baseTime*9e4/e.timescale:0;return t*9e4+i};function Bg(r,t,e,i){let s,n,a,o;const l=navigator.userAgent.toLowerCase(),h=i,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=((t[e+2]&192)>>>6)+1;const d=(t[e+2]&60)>>>2;if(d>c.length-1){r.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,fatal:!0,reason:`invalid ADTS sampling index:${d}`});return}return a=(t[e+2]&1)<<2,a|=(t[e+3]&192)>>>6,_.log(`manifest codec:${i}, ADTS type:${s}, samplingIndex:${d}`),/firefox/i.test(l)?d>=6?(s=5,o=new Array(4),n=d-3):(s=2,o=new Array(2),n=d):l.indexOf("android")!==-1?(s=2,o=new Array(2),n=d):(s=5,o=new Array(4),i&&(i.indexOf("mp4a.40.29")!==-1||i.indexOf("mp4a.40.5")!==-1)||!i&&d>=6?n=d-3:((i&&i.indexOf("mp4a.40.2")!==-1&&(d>=6&&a===1||/vivaldi/i.test(l))||!i&&a===1)&&(s=2,o=new Array(2)),n=d)),o[0]=s<<3,o[0]|=(d&14)>>1,o[1]|=(d&1)<<7,o[1]|=a<<3,s===5&&(o[1]|=(n&14)>>1,o[2]=(n&1)<<7,o[2]|=8,o[3]=0),{config:o,samplerate:c[d],channelCount:a,codec:"mp4a.40."+s,manifestCodec:h}}function Ah(r,t){return r[t]===255&&(r[t+1]&246)===240}function wh(r,t){return r[t+1]&1?7:9}function jn(r,t){return(r[t+3]&3)<<11|r[t+4]<<3|(r[t+5]&224)>>>5}function Hg(r,t){return t+5<r.length}function ur(r,t){return t+1<r.length&&Ah(r,t)}function Gg(r,t){return Hg(r,t)&&Ah(r,t)&&jn(r,t)<=r.length-t}function Vg(r,t){if(ur(r,t)){const e=wh(r,t);if(t+e>=r.length)return!1;const i=jn(r,t);if(i<=e)return!1;const s=t+i;return s===r.length||ur(r,s)}return!1}function Sh(r,t,e,i,s){if(!r.samplerate){const n=Bg(t,e,i,s);if(!n)return;r.config=n.config,r.samplerate=n.samplerate,r.channelCount=n.channelCount,r.codec=n.codec,r.manifestCodec=n.manifestCodec,_.log(`parsed codec:${r.codec}, rate:${n.samplerate}, channels:${n.channelCount}`)}}function Lh(r){return 9216e4/r}function Kg(r,t){const e=wh(r,t);if(t+e<=r.length){const i=jn(r,t)-e;if(i>0)return{headerLength:e,frameLength:i}}}function Rh(r,t,e,i,s){const n=Lh(r.samplerate),a=i+s*n,o=Kg(t,e);let l;if(o){const{frameLength:c,headerLength:d}=o,u=d+c,f=Math.max(0,e+u-t.length);f?(l=new Uint8Array(u-d),l.set(t.subarray(e+d,t.length),0)):l=t.subarray(e+d,e+u);const p={unit:l,pts:a};return f||r.samples.push(p),{sample:p,length:u,missing:f}}const h=t.length-e;return l=new Uint8Array(h),l.set(t.subarray(e,t.length),0),{sample:{unit:l,pts:a},length:h,missing:-1}}class jg extends Th{constructor(t,e){super(),this.observer=void 0,this.config=void 0,this.observer=t,this.config=e}resetInitSegment(t,e,i,s){super.resetInitSegment(t,e,i,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:e,duration:s,inputTimeScale:9e4,dropped:0}}static probe(t){if(!t)return!1;let e=(er(t,0)||[]).length;for(let i=t.length;e<i;e++)if(Vg(t,e))return _.log("ADTS sync word found !"),!0;return!1}canParse(t,e){return Gg(t,e)}appendFrame(t,e,i){Sh(t,this.observer,e,i,t.manifestCodec);const s=Rh(t,e,i,this.basePTS,this.frameIndex);if(s&&s.missing===0)return s}}const Wg=/\/emsg[-/]ID3/i;class Yg{constructor(t,e){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=e}resetTimeStamp(){}resetInitSegment(t,e,i,s){const n=this.videoTrack=_e("video",1),a=this.audioTrack=_e("audio",1),o=this.txtTrack=_e("text",1);if(this.id3Track=_e("id3",1),this.timeOffset=0,!(t!=null&&t.byteLength))return;const l=Nl(t);if(l.video){const{id:h,timescale:c,codec:d}=l.video;n.id=h,n.timescale=o.timescale=c,n.codec=d}if(l.audio){const{id:h,timescale:c,codec:d}=l.audio;a.id=h,a.timescale=c,a.codec=d}o.id=$l.text,n.sampleDuration=0,n.duration=a.duration=s}resetContiguity(){this.remainderData=null}static probe(t){return t=t.length>16384?t.subarray(0,16384):t,ot(t,["moof"]).length>0}demux(t,e){this.timeOffset=e;let i=t;const s=this.videoTrack,n=this.txtTrack;if(this.config.progressive){this.remainderData&&(i=hi(this.remainderData,t));const o=$p(i);this.remainderData=o.remainder,s.samples=o.valid||new Uint8Array}else s.samples=i;const a=this.extractID3Track(s,e);return n.samples=Bl(e,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const t=this.timeOffset,e=this.videoTrack,i=this.txtTrack;e.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(e,this.timeOffset);return i.samples=Bl(t,e),{videoTrack:e,audioTrack:_e(),id3Track:s,textTrack:_e()}}extractID3Track(t,e){const i=this.id3Track;if(t.samples.length){const s=ot(t.samples,["emsg"]);s&&s.forEach(n=>{const a=Np(n);if(Wg.test(a.schemeIdUri)){const o=z(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale;let l=a.eventDuration===4294967295?Number.POSITIVE_INFINITY:a.eventDuration/a.timeScale;l<=.001&&(l=Number.POSITIVE_INFINITY);const h=a.payload;i.samples.push({data:h,len:h.byteLength,dts:o,pts:o,type:ge.emsg,duration:l})}})}return i}demuxSampleAes(t,e,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}let fr=null;const qg=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],zg=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Xg=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Qg=[0,1,1,4];function _h(r,t,e,i,s){if(e+24>t.length)return;const n=kh(t,e);if(n&&e+n.frameLength<=t.length){const a=n.samplesPerFrame*9e4/n.sampleRate,o=i+s*a,l={unit:t.subarray(e,e+n.frameLength),pts:o,dts:o};return r.config=[],r.channelCount=n.channelCount,r.samplerate=n.sampleRate,r.samples.push(l),{sample:l,length:n.frameLength,missing:0}}}function kh(r,t){const e=r[t+1]>>3&3,i=r[t+1]>>1&3,s=r[t+2]>>4&15,n=r[t+2]>>2&3;if(e!==1&&s!==0&&s!==15&&n!==3){const a=r[t+2]>>1&1,o=r[t+3]>>6,l=e===3?3-i:i===3?3:4,h=qg[l*14+s-1]*1e3,c=zg[(e===3?0:e===2?1:2)*3+n],d=o===3?1:2,u=Xg[e][i],f=Qg[i],p=u*8*f,g=Math.floor(u*h/c+a)*f;if(fr===null){const v=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);fr=v?parseInt(v[1]):0}return fr&&fr<=87&&i===2&&h>=224e3&&o===0&&(r[t+3]=r[t+3]|128),{sampleRate:c,channelCount:d,frameLength:g,samplesPerFrame:p}}}function Wn(r,t){return r[t]===255&&(r[t+1]&224)===224&&(r[t+1]&6)!==0}function Ih(r,t){return t+1<r.length&&Wn(r,t)}function Zg(r,t){return Wn(r,t)&&4<=r.length-t}function Jg(r,t){if(t+1<r.length&&Wn(r,t)){const e=kh(r,t);let i=4;e!=null&&e.frameLength&&(i=e.frameLength);const s=t+i;return s===r.length||Ih(r,s)}return!1}class Dh{constructor(t){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const t=this.data,e=this.bytesAvailable,i=t.byteLength-e,s=new Uint8Array(4),n=Math.min(4,e);if(n===0)throw new Error("no bytes available");s.set(t.subarray(i,i+n)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=n*8,this.bytesAvailable-=n}skipBits(t){let e;t=Math.min(t,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,e=t>>3,t-=e<<3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)}readBits(t){let e=Math.min(this.bitsAvailable,t);const i=this.word>>>32-e;if(t>32&&_.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0)this.word<<=e;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return e=t-e,e>0&&this.bitsAvailable?i<<e|this.readBits(e):i}skipLZ(){let t;for(t=0;t<this.bitsAvailable;++t)if(this.word&2147483648>>>t)return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const t=this.skipLZ();return this.readBits(t+1)-1}readEG(){const t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(t){let e=8,i=8,s;for(let n=0;n<t;n++)i!==0&&(s=this.readEG(),i=(e+s+256)%256),e=i===0?e:i}readSPS(){let t=0,e=0,i=0,s=0,n,a,o;const l=this.readUByte.bind(this),h=this.readBits.bind(this),c=this.readUEG.bind(this),d=this.readBoolean.bind(this),u=this.skipBits.bind(this),f=this.skipEG.bind(this),p=this.skipUEG.bind(this),g=this.skipScalingList.bind(this);l();const v=l();if(h(5),u(3),l(),p(),v===100||v===110||v===122||v===244||v===44||v===83||v===86||v===118||v===128){const R=c();if(R===3&&u(1),p(),p(),u(1),d())for(a=R!==3?8:12,o=0;o<a;o++)d()&&(o<6?g(16):g(64))}p();const E=c();if(E===0)c();else if(E===1)for(u(1),f(),f(),n=c(),o=0;o<n;o++)f();p(),u(1);const A=c(),L=c(),y=h(1);y===0&&u(1),u(1),d()&&(t=c(),e=c(),i=c(),s=c());let S=[1,1];if(d()&&d())switch(l()){case 1:S=[1,1];break;case 2:S=[12,11];break;case 3:S=[10,11];break;case 4:S=[16,11];break;case 5:S=[40,33];break;case 6:S=[24,11];break;case 7:S=[20,11];break;case 8:S=[32,11];break;case 9:S=[80,33];break;case 10:S=[18,11];break;case 11:S=[15,11];break;case 12:S=[64,33];break;case 13:S=[160,99];break;case 14:S=[4,3];break;case 15:S=[3,2];break;case 16:S=[2,1];break;case 255:{S=[l()<<8|l(),l()<<8|l()];break}}return{width:Math.ceil((A+1)*16-t*2-e*2),height:(2-y)*(L+1)*16-(y?2:4)*(i+s),pixelRatio:S}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class tm{constructor(t,e,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new Vn(e,{removePKCS7Padding:!1})}decryptBuffer(t){return this.decrypter.decrypt(t,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(t,e,i){const s=t[e].unit;if(s.length<=16)return;const n=s.subarray(16,s.length-s.length%16),a=n.buffer.slice(n.byteOffset,n.byteOffset+n.length);this.decryptBuffer(a).then(o=>{const l=new Uint8Array(o);s.set(l,16),this.decrypter.isSync()||this.decryptAacSamples(t,e+1,i)})}decryptAacSamples(t,e,i){for(;;e++){if(e>=t.length){i();return}if(!(t[e].unit.length<32)&&(this.decryptAacSample(t,e,i),!this.decrypter.isSync()))return}}getAvcEncryptedData(t){const e=Math.floor((t.length-48)/160)*16+16,i=new Int8Array(e);let s=0;for(let n=32;n<t.length-16;n+=160,s+=16)i.set(t.subarray(n,n+16),s);return i}getAvcDecryptedUnit(t,e){const i=new Uint8Array(e);let s=0;for(let n=32;n<t.length-16;n+=160,s+=16)t.set(i.subarray(s,s+16),n);return t}decryptAvcSample(t,e,i,s,n){const a=Gl(n.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then(l=>{n.data=this.getAvcDecryptedUnit(a,l),this.decrypter.isSync()||this.decryptAvcSamples(t,e,i+1,s)})}decryptAvcSamples(t,e,i,s){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,i=0){if(e>=t.length){s();return}const n=t[e].units;for(;!(i>=n.length);i++){const a=n[i];if(!(a.data.length<=48||a.type!==1&&a.type!==5)&&(this.decryptAvcSample(t,e,i,s,a),!this.decrypter.isSync()))return}}}}const Vt=188;class Ve{constructor(t,e,i){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=t,this.config=e,this.typeSupported=i}static probe(t){const e=Ve.syncOffset(t);return e>0&&_.warn(`MPEG2-TS detected but first sync word found @ offset ${e}`),e!==-1}static syncOffset(t){const e=t.length;let i=Math.min(Vt*5,t.length-Vt)+1,s=0;for(;s<i;){let n=!1,a=-1,o=0;for(let l=s;l<e;l+=Vt)if(t[l]===71){if(o++,a===-1&&(a=l,a!==0&&(i=Math.min(a+Vt*99,t.length-Vt)+1)),n||(n=Yn(t,l)===0),n&&o>1&&(a===0&&o>2||l+Vt>i))return a}else{if(o)return-1;break}s++}return-1}static createTrack(t,e){return{container:t==="video"||t==="audio"?"video/mp2t":void 0,type:t,id:$l[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:t==="audio"?e:void 0}}resetInitSegment(t,e,i,s){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=Ve.createTrack("video"),this._audioTrack=Ve.createTrack("audio",s),this._id3Track=Ve.createTrack("id3"),this._txtTrack=Ve.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=e,this.videoCodec=i,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:t,_avcTrack:e,_id3Track:i}=this;t&&(t.pesData=null),e&&(e.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null}demux(t,e,i=!1,s=!1){i||(this.sampleAes=null);let n;const a=this._avcTrack,o=this._audioTrack,l=this._id3Track,h=this._txtTrack;let c=a.pid,d=a.pesData,u=o.pid,f=l.pid,p=o.pesData,g=l.pesData,v=null,E=this.pmtParsed,A=this._pmtId,L=t.length;if(this.remainderData&&(t=hi(this.remainderData,t),L=t.length,this.remainderData=null),L<Vt&&!s)return this.remainderData=t,{audioTrack:o,videoTrack:a,id3Track:l,textTrack:h};const y=Math.max(0,Ve.syncOffset(t));L-=(L-y)%Vt,L<t.byteLength&&!s&&(this.remainderData=new Uint8Array(t.buffer,L,t.buffer.byteLength-L));let S=0;for(let D=y;D<L;D+=Vt)if(t[D]===71){const M=!!(t[D+1]&64),C=Yn(t,D),I=(t[D+3]&48)>>4;let G;if(I>1){if(G=D+5+t[D+4],G===D+Vt)continue}else G=D+4;switch(C){case c:M&&(d&&(n=ki(d))&&this.parseAVCPES(a,h,n,!1),d={data:[],size:0}),d&&(d.data.push(t.subarray(G,D+Vt)),d.size+=D+Vt-G);break;case u:if(M){if(p&&(n=ki(p)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,n);break;case"mp3":this.parseMPEGPES(o,n);break}p={data:[],size:0}}p&&(p.data.push(t.subarray(G,D+Vt)),p.size+=D+Vt-G);break;case f:M&&(g&&(n=ki(g))&&this.parseID3PES(l,n),g={data:[],size:0}),g&&(g.data.push(t.subarray(G,D+Vt)),g.size+=D+Vt-G);break;case 0:M&&(G+=t[G]+1),A=this._pmtId=em(t,G);break;case A:{M&&(G+=t[G]+1);const F=im(t,G,this.typeSupported,i);c=F.avc,c>0&&(a.pid=c),u=F.audio,u>0&&(o.pid=u,o.segmentCodec=F.segmentCodec),f=F.id3,f>0&&(l.pid=f),v!==null&&!E&&(_.warn(`MPEG-TS PMT found at ${D} after unknown PID '${v}'. Backtracking to sync byte @${y} to parse all TS packets.`),v=null,D=y-188),E=this.pmtParsed=!0;break}case 17:case 8191:break;default:v=C;break}}else S++;if(S>0){const D=new Error(`Found ${S} TS packet/s that do not start with 0x47`);this.observer.emit(m.ERROR,m.ERROR,{type:Q.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,fatal:!1,error:D,reason:D.message})}a.pesData=d,o.pesData=p,l.pesData=g;const R={audioTrack:o,videoTrack:a,id3Track:l,textTrack:h};return s&&this.extractRemainingSamples(R),R}flush(){const{remainderData:t}=this;this.remainderData=null;let e;return t?e=this.demux(t,-1,!1,!0):e={videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e}extractRemainingSamples(t){const{audioTrack:e,videoTrack:i,id3Track:s,textTrack:n}=t,a=i.pesData,o=e.pesData,l=s.pesData;let h;if(a&&(h=ki(a))?(this.parseAVCPES(i,n,h,!0),i.pesData=null):i.pesData=a,o&&(h=ki(o))){switch(e.segmentCodec){case"aac":this.parseAACPES(e,h);break;case"mp3":this.parseMPEGPES(e,h);break}e.pesData=null}else o!=null&&o.size&&_.log("last AAC PES packet truncated,might overlap between fragments"),e.pesData=o;l&&(h=ki(l))?(this.parseID3PES(s,h),s.pesData=null):s.pesData=l}demuxSampleAes(t,e,i){const s=this.demux(t,i,!0,!this.config.progressive),n=this.sampleAes=new tm(this.observer,this.config,e);return this.decrypt(s,n)}decrypt(t,e){return new Promise(i=>{const{audioTrack:s,videoTrack:n}=t;s.samples&&s.segmentCodec==="aac"?e.decryptAacSamples(s.samples,0,()=>{n.samples?e.decryptAvcSamples(n.samples,0,0,()=>{i(t)}):i(t)}):n.samples&&e.decryptAvcSamples(n.samples,0,0,()=>{i(t)})})}destroy(){this._duration=0}parseAVCPES(t,e,i,s){const n=this.parseAVCNALu(t,i.data);let a=this.avcSample,o,l=!1;i.data=null,a&&n.length&&!t.audFound&&(ys(a,t),a=this.avcSample=pr(!1,i.pts,i.dts,"")),n.forEach(h=>{var c;switch(h.type){case 1:{let u=!1;o=!0;const f=h.data;if(l&&f.length>4){const p=new Dh(f).readSliceType();(p===2||p===4||p===7||p===9)&&(u=!0)}if(u){var d;(d=a)!=null&&d.frame&&!a.key&&(ys(a,t),a=this.avcSample=null)}a||(a=this.avcSample=pr(!0,i.pts,i.dts,"")),a.frame=!0,a.key=u;break}case 5:o=!0,(c=a)!=null&&c.frame&&!a.key&&(ys(a,t),a=this.avcSample=null),a||(a=this.avcSample=pr(!0,i.pts,i.dts,"")),a.key=!0,a.frame=!0;break;case 6:{o=!0,Hl(h.data,1,i.pts,e.samples);break}case 7:if(o=!0,l=!0,!t.sps){const u=h.data,f=new Dh(u).readSPS();t.width=f.width,t.height=f.height,t.pixelRatio=f.pixelRatio,t.sps=[u],t.duration=this._duration;const p=u.subarray(1,4);let g="avc1.";for(let v=0;v<3;v++){let E=p[v].toString(16);E.length<2&&(E="0"+E),g+=E}t.codec=g}break;case 8:o=!0,t.pps||(t.pps=[h.data]);break;case 9:o=!1,t.audFound=!0,a&&ys(a,t),a=this.avcSample=pr(!1,i.pts,i.dts,"");break;case 12:o=!0;break;default:o=!1,a&&(a.debug+="unknown NAL "+h.type+" ");break}a&&o&&a.units.push(h)}),s&&a&&(ys(a,t),this.avcSample=null)}getLastNalUnit(t){var e;let i=this.avcSample,s;if((!i||i.units.length===0)&&(i=t[t.length-1]),(e=i)!=null&&e.units){const n=i.units;s=n[n.length-1]}return s}parseAVCNALu(t,e){const i=e.byteLength;let s=t.naluState||0;const n=s,a=[];let o=0,l,h,c,d=-1,u=0;for(s===-1&&(d=0,u=e[0]&31,s=0,o=1);o<i;){if(l=e[o++],!s){s=l?0:1;continue}if(s===1){s=l?0:2;continue}if(!l)s=3;else if(l===1){if(d>=0){const f={data:e.subarray(d,o-s-1),type:u};a.push(f)}else{const f=this.getLastNalUnit(t.samples);if(f&&(n&&o<=4-n&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-n)),h=o-s-1,h>0)){const p=new Uint8Array(f.data.byteLength+h);p.set(f.data,0),p.set(e.subarray(0,h),f.data.byteLength),f.data=p,f.state=0}}o<i?(c=e[o]&31,d=o,u=c,s=0):s=-1}else s=0}if(d>=0&&s>=0){const f={data:e.subarray(d,i),type:u,state:s};a.push(f)}if(a.length===0){const f=this.getLastNalUnit(t.samples);if(f){const p=new Uint8Array(f.data.byteLength+e.byteLength);p.set(f.data,0),p.set(e,f.data.byteLength),f.data=p}}return t.naluState=s,a}parseAACPES(t,e){let i=0;const s=this.aacOverFlow;let n=e.data;if(s){this.aacOverFlow=null;const d=s.missing,u=s.sample.unit.byteLength;if(d===-1){const f=new Uint8Array(u+n.byteLength);f.set(s.sample.unit,0),f.set(n,u),n=f}else{const f=u-d;s.sample.unit.set(n.subarray(0,d),f),t.samples.push(s.sample),i=s.missing}}let a,o;for(a=i,o=n.length;a<o-1&&!ur(n,a);a++);if(a!==i){let d;const u=a<o-1;u?d=`AAC PES did not start with ADTS header,offset:${a}`:d="No ADTS header found in AAC PES";const f=new Error(d);if(_.warn(`parsing error: ${d}`),this.observer.emit(m.ERROR,m.ERROR,{type:Q.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,fatal:!1,levelRetry:u,error:f,reason:d}),!u)return}Sh(t,this.observer,n,a,this.audioCodec);let l;if(e.pts!==void 0)l=e.pts;else if(s){const d=Lh(t.samplerate);l=s.sample.pts+d}else{_.warn("[tsdemuxer]: AAC PES unknown PTS");return}let h=0,c;for(;a<o;)if(c=Rh(t,n,a,l,h),a+=c.length,c.missing){this.aacOverFlow=c;break}else for(h++;a<o-1&&!ur(n,a);a++);}parseMPEGPES(t,e){const i=e.data,s=i.length;let n=0,a=0;const o=e.pts;if(o===void 0){_.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;a<s;)if(Ih(i,a)){const l=_h(t,i,a,o,n);if(l)a+=l.length,n++;else break}else a++}parseID3PES(t,e){if(e.pts===void 0){_.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const i=xt({},e,{type:this._avcTrack?ge.emsg:ge.audioId3,duration:Number.POSITIVE_INFINITY});t.samples.push(i)}}function pr(r,t,e,i){return{key:r,frame:!1,pts:t,dts:e,units:[],debug:i,length:0}}function Yn(r,t){return((r[t+1]&31)<<8)+r[t+2]}function em(r,t){return(r[t+10]&31)<<8|r[t+11]}function im(r,t,e,i){const s={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},n=(r[t+1]&15)<<8|r[t+2],a=t+3+n-4,o=(r[t+10]&15)<<8|r[t+11];for(t+=12+o;t<a;){const l=Yn(r,t);switch(r[t]){case 207:if(!i){_.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:s.audio===-1&&(s.audio=l);break;case 21:s.id3===-1&&(s.id3=l);break;case 219:if(!i){_.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:s.avc===-1&&(s.avc=l);break;case 3:case 4:e.mpeg!==!0&&e.mp3!==!0?_.log("MPEG audio found, not supported in this browser"):s.audio===-1&&(s.audio=l,s.segmentCodec="mp3");break;case 36:_.warn("Unsupported HEVC stream type found");break}t+=((r[t+3]&15)<<8|r[t+4])+5}return s}function ki(r){let t=0,e,i,s,n,a;const o=r.data;if(!r||r.size===0)return null;for(;o[0].length<19&&o.length>1;){const l=new Uint8Array(o[0].length+o[1].length);l.set(o[0]),l.set(o[1],o[0].length),o[0]=l,o.splice(1,1)}if(e=o[0],(e[0]<<16)+(e[1]<<8)+e[2]===1){if(i=(e[4]<<8)+e[5],i&&i>r.size-6)return null;const l=e[7];l&192&&(n=(e[9]&14)*536870912+(e[10]&255)*4194304+(e[11]&254)*16384+(e[12]&255)*128+(e[13]&254)/2,l&64?(a=(e[14]&14)*536870912+(e[15]&255)*4194304+(e[16]&254)*16384+(e[17]&255)*128+(e[18]&254)/2,n-a>54e5&&(_.warn(`${Math.round((n-a)/9e4)}s delta between PTS and DTS, align them`),n=a)):a=n),s=e[8];let h=s+9;if(r.size<=h)return null;r.size-=h;const c=new Uint8Array(r.size);for(let d=0,u=o.length;d<u;d++){e=o[d];let f=e.byteLength;if(h)if(h>f){h-=f;continue}else e=e.subarray(h),f-=h,h=0;c.set(e,t),t+=f}return i&&(i-=s+3),{data:c,pts:n,dts:a,len:i}}return null}function ys(r,t){if(r.units.length&&r.frame){if(r.pts===void 0){const e=t.samples,i=e.length;if(i){const s=e[i-1];r.pts=s.pts,r.dts=s.dts}else{t.dropped++;return}}t.samples.push(r)}r.debug.length&&_.log(r.pts+"/"+r.dts+":"+r.debug)}class sm extends Th{resetInitSegment(t,e,i,s){super.resetInitSegment(t,e,i,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:e,duration:s,inputTimeScale:9e4,dropped:0}}static probe(t){if(!t)return!1;let e=(er(t,0)||[]).length;for(let i=t.length;e<i;e++)if(Jg(t,e))return _.log("MPEG Audio sync word found !"),!0;return!1}canParse(t,e){return Zg(t,e)}appendFrame(t,e,i){if(this.basePTS!==null)return _h(t,e,i,this.basePTS,this.frameIndex)}}class Ch{static getSilentFrame(t,e){switch(t){case"mp4a.40.2":if(e===1)return new Uint8Array([0,200,0,128,35,128]);if(e===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(e===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(e===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(e===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(e===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(e===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(e===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(e===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const Ke=Math.pow(2,32)-1;class x{static init(){x.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let t;for(t in x.types)x.types.hasOwnProperty(t)&&(x.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);const e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);x.HDLR_TYPES={video:e,audio:i};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);x.STTS=x.STSC=x.STCO=n,x.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),x.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),x.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),x.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);x.FTYP=x.box(x.types.ftyp,a,l,a,o),x.DINF=x.box(x.types.dinf,x.box(x.types.dref,s))}static box(t,...e){let i=8,s=e.length;const n=s;for(;s--;)i+=e[s].byteLength;const a=new Uint8Array(i);for(a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=i&255,a.set(t,4),s=0,i=8;s<n;s++)a.set(e[s],i),i+=e[s].byteLength;return a}static hdlr(t){return x.box(x.types.hdlr,x.HDLR_TYPES[t])}static mdat(t){return x.box(x.types.mdat,t)}static mdhd(t,e){e*=t;const i=Math.floor(e/(Ke+1)),s=Math.floor(e%(Ke+1));return x.box(x.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255,85,196,0,0]))}static mdia(t){return x.box(x.types.mdia,x.mdhd(t.timescale,t.duration),x.hdlr(t.type),x.minf(t))}static mfhd(t){return x.box(x.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255]))}static minf(t){return t.type==="audio"?x.box(x.types.minf,x.box(x.types.smhd,x.SMHD),x.DINF,x.stbl(t)):x.box(x.types.minf,x.box(x.types.vmhd,x.VMHD),x.DINF,x.stbl(t))}static moof(t,e,i){return x.box(x.types.moof,x.mfhd(t),x.traf(i,e))}static moov(t){let e=t.length;const i=[];for(;e--;)i[e]=x.trak(t[e]);return x.box.apply(null,[x.types.moov,x.mvhd(t[0].timescale,t[0].duration)].concat(i).concat(x.mvex(t)))}static mvex(t){let e=t.length;const i=[];for(;e--;)i[e]=x.trex(t[e]);return x.box.apply(null,[x.types.mvex,...i])}static mvhd(t,e){e*=t;const i=Math.floor(e/(Ke+1)),s=Math.floor(e%(Ke+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return x.box(x.types.mvhd,n)}static sdtp(t){const e=t.samples||[],i=new Uint8Array(4+e.length);let s,n;for(s=0;s<e.length;s++)n=e[s].flags,i[s+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return x.box(x.types.sdtp,i)}static stbl(t){return x.box(x.types.stbl,x.stsd(t),x.box(x.types.stts,x.STTS),x.box(x.types.stsc,x.STSC),x.box(x.types.stsz,x.STSZ),x.box(x.types.stco,x.STCO))}static avc1(t){let e=[],i=[],s,n,a;for(s=0;s<t.sps.length;s++)n=t.sps[s],a=n.byteLength,e.push(a>>>8&255),e.push(a&255),e=e.concat(Array.prototype.slice.call(n));for(s=0;s<t.pps.length;s++)n=t.pps[s],a=n.byteLength,i.push(a>>>8&255),i.push(a&255),i=i.concat(Array.prototype.slice.call(n));const o=x.box(x.types.avcC,new Uint8Array([1,e[3],e[4],e[5],255,224|t.sps.length].concat(e).concat([t.pps.length]).concat(i))),l=t.width,h=t.height,c=t.pixelRatio[0],d=t.pixelRatio[1];return x.box(x.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,l&255,h>>8&255,h&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,x.box(x.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),x.box(x.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,d>>24,d>>16&255,d>>8&255,d&255])))}static esds(t){const e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))}static mp4a(t){const e=t.samplerate;return x.box(x.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),x.box(x.types.esds,x.esds(t)))}static mp3(t){const e=t.samplerate;return x.box(x.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))}static stsd(t){return t.type==="audio"?t.segmentCodec==="mp3"&&t.codec==="mp3"?x.box(x.types.stsd,x.STSD,x.mp3(t)):x.box(x.types.stsd,x.STSD,x.mp4a(t)):x.box(x.types.stsd,x.STSD,x.avc1(t))}static tkhd(t){const e=t.id,i=t.duration*t.timescale,s=t.width,n=t.height,a=Math.floor(i/(Ke+1)),o=Math.floor(i%(Ke+1));return x.box(x.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,a>>24,a>>16&255,a>>8&255,a&255,o>>24,o>>16&255,o>>8&255,o&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>8&255,s&255,0,0,n>>8&255,n&255,0,0]))}static traf(t,e){const i=x.sdtp(t),s=t.id,n=Math.floor(e/(Ke+1)),a=Math.floor(e%(Ke+1));return x.box(x.types.traf,x.box(x.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255])),x.box(x.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,a>>24,a>>16&255,a>>8&255,a&255])),x.trun(t,i.length+16+20+8+16+8+8),i)}static trak(t){return t.duration=t.duration||4294967295,x.box(x.types.trak,x.tkhd(t),x.mdia(t))}static trex(t){const e=t.id;return x.box(x.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(t,e){const i=t.samples||[],s=i.length,n=12+16*s,a=new Uint8Array(n);let o,l,h,c,d,u;for(e+=8+n,a.set([t.type==="video"?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,s&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),o=0;o<s;o++)l=i[o],h=l.duration,c=l.size,d=l.flags,u=l.cts,a.set([h>>>24&255,h>>>16&255,h>>>8&255,h&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,d.degradPrio&61440,d.degradPrio&15,u>>>24&255,u>>>16&255,u>>>8&255,u&255],12+16*o);return x.box(x.types.trun,a)}static initSegment(t){x.types||x.init();const e=x.moov(t),i=new Uint8Array(x.FTYP.byteLength+e.byteLength);return i.set(x.FTYP),i.set(e,x.FTYP.byteLength),i}}x.types=void 0,x.HDLR_TYPES=void 0,x.STTS=void 0,x.STSC=void 0,x.STCO=void 0,x.STSZ=void 0,x.VMHD=void 0,x.SMHD=void 0,x.STSD=void 0,x.FTYP=void 0,x.DINF=void 0;const xh=9e4;function qn(r,t,e=1,i=!1){const s=r*t*e;return i?Math.round(s):s}function rm(r,t,e=1,i=!1){return qn(r,t,1/e,i)}function Es(r,t=!1){return qn(r,1e3,1/xh,t)}function nm(r,t=1){return qn(r,xh,1/t)}const am=10*1e3,Ph=1024,om=1152;let gr=null,zn=null;class Xn{constructor(t,e,i,s=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=t,this.config=e,this.typeSupported=i,this.ISGenerated=!1,gr===null){const n=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);gr=n?parseInt(n[1]):0}if(zn===null){const n=navigator.userAgent.match(/Safari\/(\d+)/i);zn=n?parseInt(n[1]):0}}destroy(){}resetTimeStamp(t){_.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=t}resetNextTimestamp(){_.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){_.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1}getVideoStartPts(t){let e=!1;const i=t.reduce((s,n)=>{const a=n.pts-s;return a<-4294967296?(e=!0,ce(s,n.pts)):a>0?s:n.pts},t[0].pts);return e&&_.debug("PTS rollover detected"),i}remux(t,e,i,s,n,a,o,l){let h,c,d,u,f,p,g=n,v=n;const E=t.pid>-1,A=e.pid>-1,L=e.samples.length,y=t.samples.length>0,S=o&&L>0||L>1;if((!E||y)&&(!A||S)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(t,e,n,a));const R=this.isVideoContiguous;let D=-1,M;if(S&&(D=lm(e.samples),!R&&this.config.forceKeyFrameOnDiscontinuity))if(p=!0,D>0){_.warn(`[mp4-remuxer]: Dropped ${D} out of ${L} video samples due to a missing keyframe`);const C=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(D),e.dropped+=D,v+=(e.samples[0].pts-C)/e.inputTimeScale,M=v}else D===-1&&(_.warn(`[mp4-remuxer]: No keyframe found out of ${L} video samples`),p=!1);if(this.ISGenerated){if(y&&S){const C=this.getVideoStartPts(e.samples),I=(ce(t.samples[0].pts,C)-C)/e.inputTimeScale;g+=Math.max(0,I),v+=Math.max(0,-I)}if(y){if(t.samplerate||(_.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(t,e,n,a)),c=this.remuxAudio(t,g,this.isAudioContiguous,a,A||S||l===Z.AUDIO?v:void 0),S){const C=c?c.endPTS-c.startPTS:0;e.inputTimeScale||(_.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(t,e,n,a)),h=this.remuxVideo(e,v,R,C)}}else S&&(h=this.remuxVideo(e,v,R,0));h&&(h.firstKeyFrame=D,h.independent=D!==-1,h.firstKeyFramePTS=M)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(f=Oh(i,n,this._initPTS,this._initDTS)),s.samples.length&&(u=$h(s,n,this._initPTS))),{audio:c,video:h,initSegment:d,independent:p,text:u,id3:f}}generateIS(t,e,i,s){const n=t.samples,a=e.samples,o=this.typeSupported,l={},h=this._initPTS;let c=!h||s,d="audio/mp4",u,f,p;if(c&&(u=f=1/0),t.config&&n.length){switch(t.timescale=t.samplerate,t.segmentCodec){case"mp3":o.mpeg?(d="audio/mpeg",t.codec=""):o.mp3&&(t.codec="mp3");break}l.audio={id:"audio",container:d,codec:t.codec,initSegment:t.segmentCodec==="mp3"&&o.mpeg?new Uint8Array(0):x.initSegment([t]),metadata:{channelCount:t.channelCount}},c&&(p=t.inputTimeScale,!h||p!==h.timescale?u=f=n[0].pts-Math.round(p*i):c=!1)}if(e.sps&&e.pps&&a.length&&(e.timescale=e.inputTimeScale,l.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:x.initSegment([e]),metadata:{width:e.width,height:e.height}},c))if(p=e.inputTimeScale,!h||p!==h.timescale){const g=this.getVideoStartPts(a),v=Math.round(p*i);f=Math.min(f,ce(a[0].dts,g)-v),u=Math.min(u,g-v)}else c=!1;if(Object.keys(l).length)return this.ISGenerated=!0,c?(this._initPTS={baseTime:u,timescale:p},this._initDTS={baseTime:f,timescale:p}):u=p=void 0,{tracks:l,initPTS:u,timescale:p}}remuxVideo(t,e,i,s){const n=t.inputTimeScale,a=t.samples,o=[],l=a.length,h=this._initPTS;let c=this.nextAvcDts,d=8,u=this.videoSampleDuration,f,p,g=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,E=!1;if(!i||c===null){const b=e*n,T=a[0].pts-ce(a[0].dts,a[0].pts);c=b-T}const A=h.baseTime*n/h.timescale;for(let b=0;b<l;b++){const T=a[b];T.pts=ce(T.pts-A,c),T.dts=ce(T.dts-A,c),T.dts<a[b>0?b-1:b].dts&&(E=!0)}E&&a.sort(function(b,T){const k=b.dts-T.dts,N=b.pts-T.pts;return k||N}),f=a[0].dts,p=a[a.length-1].dts;const L=p-f,y=L?Math.round(L/(l-1)):u||t.inputTimeScale/30;if(i){const b=f-c,T=b>y,k=b<-1;if((T||k)&&(T?_.warn(`AVC: ${Es(b,!0)} ms (${b}dts) hole between fragments detected, filling it`):_.warn(`AVC: ${Es(-b,!0)} ms (${b}dts) overlapping between fragments detected`),!k||c>=a[0].pts)){f=c;const N=a[0].pts-b;a[0].dts=f,a[0].pts=N,_.log(`Video: First PTS/DTS adjusted: ${Es(N,!0)}/${Es(f,!0)}, delta: ${Es(b,!0)} ms`)}}f=Math.max(0,f);let S=0,R=0;for(let b=0;b<l;b++){const T=a[b],k=T.units,N=k.length;let U=0;for(let K=0;K<N;K++)U+=k[K].data.length;R+=U,S+=N,T.length=U,T.dts=Math.max(T.dts,f),g=Math.min(T.pts,g),v=Math.max(T.pts,v)}p=a[l-1].dts;const D=R+4*S+8;let M;try{M=new Uint8Array(D)}catch(b){this.observer.emit(m.ERROR,m.ERROR,{type:Q.MUX_ERROR,details:$.REMUX_ALLOC_ERROR,fatal:!1,error:b,bytes:D,reason:`fail allocating video mdat ${D}`});return}const C=new DataView(M.buffer);C.setUint32(0,D),M.set(x.types.mdat,4);let I=!1,G=Number.POSITIVE_INFINITY,F=Number.POSITIVE_INFINITY,V=Number.NEGATIVE_INFINITY,q=Number.NEGATIVE_INFINITY;for(let b=0;b<l;b++){const T=a[b],k=T.units;let N=0;for(let W=0,X=k.length;W<X;W++){const lt=k[W],rt=lt.data,at=lt.data.byteLength;C.setUint32(d,at),d+=4,M.set(rt,d),d+=at,N+=4+at}let U;if(b<l-1)u=a[b+1].dts-T.dts,U=a[b+1].pts-T.pts;else{const W=this.config,X=b>0?T.dts-a[b-1].dts:y;if(U=b>0?T.pts-a[b-1].pts:y,W.stretchShortVideoTrack&&this.nextAudioPts!==null){const lt=Math.floor(W.maxBufferHole*n),rt=(s?g+s*n:this.nextAudioPts)-T.pts;rt>lt?(u=rt-X,u<0?u=X:I=!0,_.log(`[mp4-remuxer]: It is approximately ${rt/90} ms to the next segment; using duration ${u/90} ms for the last video frame.`)):u=X}else u=X}const K=Math.round(T.pts-T.dts);G=Math.min(G,u),V=Math.max(V,u),F=Math.min(F,U),q=Math.max(q,U),o.push(new Mh(T.key,u,N,K))}if(o.length){if(gr){if(gr<70){const b=o[0].flags;b.dependsOn=2,b.isNonSync=0}}else if(zn&&q-F<V-G&&y/V<.025&&o[0].cts===0){_.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let b=f;for(let T=0,k=o.length;T<k;T++){const N=b+o[T].duration,U=b+o[T].cts;if(T<k-1){const K=N+o[T+1].cts;o[T].duration=K-U}else o[T].duration=T?o[T-1].duration:y;o[T].cts=0,b=N}}}u=I||!u?y:u,this.nextAvcDts=c=p+u,this.videoSampleDuration=u,this.isVideoContiguous=!0;const w=x.moof(t.sequenceNumber++,f,xt({},t,{samples:o})),P="video",H={data1:w,data2:M,startPTS:g/n,endPTS:(v+u)/n,startDTS:f/n,endDTS:c/n,type:P,hasAudio:!1,hasVideo:!0,nb:o.length,dropped:t.dropped};return t.samples=[],t.dropped=0,H}remuxAudio(t,e,i,s,n){const a=t.inputTimeScale,o=t.samplerate?t.samplerate:a,l=a/o,h=t.segmentCodec==="aac"?Ph:om,c=h*l,d=this._initPTS,u=t.segmentCodec==="mp3"&&this.typeSupported.mpeg,f=[],p=n!==void 0;let g=t.samples,v=u?0:8,E=this.nextAudioPts||-1;const A=e*a,L=d.baseTime*a/d.timescale;if(this.isAudioContiguous=i=i||g.length&&E>0&&(s&&Math.abs(A-E)<9e3||Math.abs(ce(g[0].pts-L,A)-E)<20*c),g.forEach(function(w){w.pts=ce(w.pts-L,A)}),!i||E<0){if(g=g.filter(w=>w.pts>=0),!g.length)return;n===0?E=0:s&&!p?E=Math.max(0,A):E=g[0].pts}if(t.segmentCodec==="aac"){const w=this.config.maxAudioFramesDrift;for(let P=0,H=E;P<g.length;P++){const b=g[P],T=b.pts,k=T-H,N=Math.abs(1e3*k/a);if(k<=-w*c&&p)P===0&&(_.warn(`Audio frame @ ${(T/a).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*k/a)} ms.`),this.nextAudioPts=E=H=T);else if(k>=w*c&&N<am&&p){let U=Math.round(k/c);H=T-U*c,H<0&&(U--,H+=c),P===0&&(this.nextAudioPts=E=H),_.warn(`[mp4-remuxer]: Injecting ${U} audio frame @ ${(H/a).toFixed(3)}s due to ${Math.round(1e3*k/a)} ms gap.`);for(let K=0;K<U;K++){const W=Math.max(H,0);let X=Ch.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);X||(_.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),X=b.unit.subarray()),g.splice(P,0,{unit:X,pts:W}),H+=c,P++}}b.pts=H,H+=c}}let y=null,S=null,R,D=0,M=g.length;for(;M--;)D+=g[M].unit.byteLength;for(let w=0,P=g.length;w<P;w++){const H=g[w],b=H.unit;let T=H.pts;if(S!==null){const N=f[w-1];N.duration=Math.round((T-S)/l)}else if(i&&t.segmentCodec==="aac"&&(T=E),y=T,D>0){D+=v;try{R=new Uint8Array(D)}catch(N){this.observer.emit(m.ERROR,m.ERROR,{type:Q.MUX_ERROR,details:$.REMUX_ALLOC_ERROR,fatal:!1,error:N,bytes:D,reason:`fail allocating audio mdat ${D}`});return}u||(new DataView(R.buffer).setUint32(0,D),R.set(x.types.mdat,4))}else return;R.set(b,v);const k=b.byteLength;v+=k,f.push(new Mh(!0,h,k,0)),S=T}const C=f.length;if(!C)return;const I=f[f.length-1];this.nextAudioPts=E=S+l*I.duration;const G=u?new Uint8Array(0):x.moof(t.sequenceNumber++,y/l,xt({},t,{samples:f}));t.samples=[];const F=y/a,V=E/a,q={data1:G,data2:R,startPTS:F,endPTS:V,startDTS:F,endDTS:V,type:"audio",hasAudio:!0,hasVideo:!1,nb:C};return this.isAudioContiguous=!0,q}remuxEmptyAudio(t,e,i,s){const n=t.inputTimeScale,a=t.samplerate?t.samplerate:n,o=n/a,l=this.nextAudioPts,h=this._initDTS,c=h.baseTime*9e4/h.timescale,d=(l!==null?l:s.startDTS*n)+c,u=s.endDTS*n+c,f=o*Ph,p=Math.ceil((u-d)/f),g=Ch.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(_.warn("[mp4-remuxer]: remux empty Audio"),!g){_.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const v=[];for(let E=0;E<p;E++){const A=d+E*f;v.push({unit:g,pts:A,dts:A})}return t.samples=v,this.remuxAudio(t,e,i,!1)}}function ce(r,t){let e;if(t===null)return r;for(t<r?e=-8589934592:e=8589934592;Math.abs(r-t)>4294967296;)r+=e;return r}function lm(r){for(let t=0;t<r.length;t++)if(r[t].key)return t;return-1}function Oh(r,t,e,i){const s=r.samples.length;if(!s)return;const n=r.inputTimeScale;for(let o=0;o<s;o++){const l=r.samples[o];l.pts=ce(l.pts-e.baseTime*n/e.timescale,t*n)/n,l.dts=ce(l.dts-i.baseTime*n/i.timescale,t*n)/n}const a=r.samples;return r.samples=[],{samples:a}}function $h(r,t,e){const i=r.samples.length;if(!i)return;const s=r.inputTimeScale;for(let a=0;a<i;a++){const o=r.samples[a];o.pts=ce(o.pts-e.baseTime*s/e.timescale,t*s)/s}r.samples.sort((a,o)=>a.pts-o.pts);const n=r.samples;return r.samples=[],{samples:n}}class Mh{constructor(t,e,i,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=i,this.cts=s,this.flags=new hm(t)}}class hm{constructor(t){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=t?2:1,this.isNonSync=t?0:1}}class cm{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(t){this.initPTS=t,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(t,e,i,s){this.audioCodec=e,this.videoCodec=i,this.generateInitSegment(Dp(t,s)),this.emitInitSegment=!0}generateInitSegment(t){let{audioCodec:e,videoCodec:i}=this;if(!(t!=null&&t.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const s=this.initData=Nl(t);e||(e=Fh(s.audio,mt.AUDIO)),i||(i=Fh(s.video,mt.VIDEO));const n={};s.audio&&s.video?n.audiovideo={container:"video/mp4",codec:e+","+i,initSegment:t,id:"main"}:s.audio?n.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:s.video?n.video={container:"video/mp4",codec:i,initSegment:t,id:"main"}:_.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n}remux(t,e,i,s,n,a){var o,l;let{initPTS:h,lastEndTime:c}=this;const d={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};z(c)||(c=this.lastEndTime=n||0);const u=e.samples;if(!(u!=null&&u.length))return d;const f={initPTS:void 0,timescale:1};let p=this.initData;if((o=p)!=null&&o.length||(this.generateInitSegment(u),p=this.initData),!((l=p)!=null&&l.length))return _.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1);const g=xp(u,p),v=Cp(p,u),E=v===null?n:v;(dm(h,E,n,g)||f.timescale!==h.timescale&&a)&&(f.initPTS=E-n,h&&h.timescale===1&&_.warn(`Adjusting initPTS by ${f.initPTS-h.baseTime}`),this.initPTS=h={baseTime:f.initPTS,timescale:1});const A=t?E-h.baseTime/h.timescale:c,L=A+g;Op(p,u,h.baseTime/h.timescale),g>0?this.lastEndTime=L:(_.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const y=!!p.audio,S=!!p.video;let R="";y&&(R+="audio"),S&&(R+="video");const D={data1:u,startPTS:A,startDTS:A,endPTS:L,endDTS:L,type:R,hasAudio:y,hasVideo:S,nb:1,dropped:0};return d.audio=D.type==="audio"?D:void 0,d.video=D.type!=="audio"?D:void 0,d.initSegment=f,d.id3=Oh(i,n,h,h),s.samples.length&&(d.text=$h(s,n,h)),d}}function dm(r,t,e,i){if(r===null)return!0;const s=Math.max(i,1),n=t-r.baseTime/r.timescale;return Math.abs(n-e)>s}function Fh(r,t){const e=r==null?void 0:r.codec;return e&&e.length>4?e:e==="hvc1"||e==="hev1"?"hvc1.1.6.L120.90":e==="av01"?"av01.0.04M.08":e==="avc1"||t===mt.VIDEO?"avc1.42e01e":"mp4a.40.5"}let Fe;try{Fe=self.performance.now.bind(self.performance)}catch{_.debug("Unable to use Performance API on this environment"),Fe=typeof self<"u"&&self.Date.now}const Qn=[{demux:Yg,remux:cm},{demux:Ve,remux:Xn},{demux:jg,remux:Xn},{demux:sm,remux:Xn}];class Nh{constructor(t,e,i,s,n){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=t,this.typeSupported=e,this.config=i,this.vendor=s,this.id=n}configure(t){this.transmuxConfig=t,this.decrypter&&this.decrypter.reset()}push(t,e,i,s){const n=i.transmuxing;n.executeStart=Fe();let a=new Uint8Array(t);const{currentTransmuxState:o,transmuxConfig:l}=this;s&&(this.currentTransmuxState=s);const{contiguous:h,discontinuity:c,trackSwitch:d,accurateTimeOffset:u,timeOffset:f,initSegmentChange:p}=s||o,{audioCodec:g,videoCodec:v,defaultInitPts:E,duration:A,initSegmentData:L}=l,y=um(a,e);if(y&&y.method==="AES-128"){const M=this.getDecrypter();if(M.isSync()){let C=M.softwareDecrypt(a,y.key.buffer,y.iv.buffer);if(i.part>-1&&(C=M.flush()),!C)return n.executeEnd=Fe(),Zn(i);a=new Uint8Array(C)}else return this.decryptionPromise=M.webCryptoDecrypt(a,y.key.buffer,y.iv.buffer).then(C=>{const I=this.push(C,null,i);return this.decryptionPromise=null,I}),this.decryptionPromise}const S=this.needsProbing(c,d);if(S){const M=this.configureTransmuxer(a);if(M)return _.warn(`[transmuxer] ${M.message}`),this.observer.emit(m.ERROR,m.ERROR,{type:Q.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,fatal:!1,error:M,reason:M.message}),n.executeEnd=Fe(),Zn(i)}(c||d||p||S)&&this.resetInitSegment(L,g,v,A,e),(c||p||S)&&this.resetInitialTimestamp(E),h||this.resetContiguity();const R=this.transmux(a,y,f,u,i),D=this.currentTransmuxState;return D.contiguous=!0,D.discontinuity=!1,D.trackSwitch=!1,n.executeEnd=Fe(),R}flush(t){const e=t.transmuxing;e.executeStart=Fe();const{decrypter:i,currentTransmuxState:s,decryptionPromise:n}=this;if(n)return n.then(()=>this.flush(t));const a=[],{timeOffset:o}=s;if(i){const d=i.flush();d&&a.push(this.push(d,null,t))}const{demuxer:l,remuxer:h}=this;if(!l||!h)return e.executeEnd=Fe(),[Zn(t)];const c=l.flush(o);return mr(c)?c.then(d=>(this.flushRemux(a,d,t),a)):(this.flushRemux(a,c,t),a)}flushRemux(t,e,i){const{audioTrack:s,videoTrack:n,id3Track:a,textTrack:o}=e,{accurateTimeOffset:l,timeOffset:h}=this.currentTransmuxState;_.log(`[transmuxer.ts]: Flushed fragment ${i.sn}${i.part>-1?" p: "+i.part:""} of level ${i.level}`);const c=this.remuxer.remux(s,n,a,o,h,l,!0,this.id);t.push({remuxResult:c,chunkMeta:i}),i.transmuxing.executeEnd=Fe()}resetInitialTimestamp(t){const{demuxer:e,remuxer:i}=this;!e||!i||(e.resetTimeStamp(t),i.resetTimeStamp(t))}resetContiguity(){const{demuxer:t,remuxer:e}=this;!t||!e||(t.resetContiguity(),e.resetNextTimestamp())}resetInitSegment(t,e,i,s,n){const{demuxer:a,remuxer:o}=this;!a||!o||(a.resetInitSegment(t,e,i,s),o.resetInitSegment(t,e,i,n))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(t,e,i,s,n){let a;return e&&e.method==="SAMPLE-AES"?a=this.transmuxSampleAes(t,e,i,s,n):a=this.transmuxUnencrypted(t,i,s,n),a}transmuxUnencrypted(t,e,i,s){const{audioTrack:n,videoTrack:a,id3Track:o,textTrack:l}=this.demuxer.demux(t,e,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(n,a,o,l,e,i,!1,this.id),chunkMeta:s}}transmuxSampleAes(t,e,i,s,n){return this.demuxer.demuxSampleAes(t,e,i).then(a=>({remuxResult:this.remuxer.remux(a.audioTrack,a.videoTrack,a.id3Track,a.textTrack,i,s,!1,this.id),chunkMeta:n}))}configureTransmuxer(t){const{config:e,observer:i,typeSupported:s,vendor:n}=this;let a;for(let d=0,u=Qn.length;d<u;d++)if(Qn[d].demux.probe(t)){a=Qn[d];break}if(!a)return new Error("Failed to find demuxer by probing fragment data");const o=this.demuxer,l=this.remuxer,h=a.remux,c=a.demux;(!l||!(l instanceof h))&&(this.remuxer=new h(i,e,s,n)),(!o||!(o instanceof c))&&(this.demuxer=new c(i,e,s),this.probe=c.probe)}needsProbing(t,e){return!this.demuxer||!this.remuxer||t||e}getDecrypter(){let t=this.decrypter;return t||(t=this.decrypter=new Vn(this.config)),t}}function um(r,t){let e=null;return r.byteLength>0&&t!=null&&t.key!=null&&t.iv!==null&&t.method!=null&&(e=t),e}const Zn=r=>({remuxResult:{},chunkMeta:r});function mr(r){return"then"in r&&r.then instanceof Function}class fm{constructor(t,e,i,s,n){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=t,this.videoCodec=e,this.initSegmentData=i,this.duration=s,this.defaultInitPts=n||null}}class pm{constructor(t,e,i,s,n,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=t,this.contiguous=e,this.accurateTimeOffset=i,this.trackSwitch=s,this.timeOffset=n,this.initSegmentChange=a}}var Uh={exports:{}};(function(r){var t=Object.prototype.hasOwnProperty,e="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(e=!1));function s(l,h,c){this.fn=l,this.context=h,this.once=c||!1}function n(l,h,c,d,u){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new s(c,d||l,u),p=e?e+h:h;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],f]:l._events[p].push(f):(l._events[p]=f,l._eventsCount++),l}function a(l,h){--l._eventsCount===0?l._events=new i:delete l._events[h]}function o(){this._events=new i,this._eventsCount=0}o.prototype.eventNames=function(){var l=[],h,c;if(this._eventsCount===0)return l;for(c in h=this._events)t.call(h,c)&&l.push(e?c.slice(1):c);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(h)):l},o.prototype.listeners=function(l){var h=e?e+l:l,c=this._events[h];if(!c)return[];if(c.fn)return[c.fn];for(var d=0,u=c.length,f=new Array(u);d<u;d++)f[d]=c[d].fn;return f},o.prototype.listenerCount=function(l){var h=e?e+l:l,c=this._events[h];return c?c.fn?1:c.length:0},o.prototype.emit=function(l,h,c,d,u,f){var p=e?e+l:l;if(!this._events[p])return!1;var g=this._events[p],v=arguments.length,E,A;if(g.fn){switch(g.once&&this.removeListener(l,g.fn,void 0,!0),v){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,h),!0;case 3:return g.fn.call(g.context,h,c),!0;case 4:return g.fn.call(g.context,h,c,d),!0;case 5:return g.fn.call(g.context,h,c,d,u),!0;case 6:return g.fn.call(g.context,h,c,d,u,f),!0}for(A=1,E=new Array(v-1);A<v;A++)E[A-1]=arguments[A];g.fn.apply(g.context,E)}else{var L=g.length,y;for(A=0;A<L;A++)switch(g[A].once&&this.removeListener(l,g[A].fn,void 0,!0),v){case 1:g[A].fn.call(g[A].context);break;case 2:g[A].fn.call(g[A].context,h);break;case 3:g[A].fn.call(g[A].context,h,c);break;case 4:g[A].fn.call(g[A].context,h,c,d);break;default:if(!E)for(y=1,E=new Array(v-1);y<v;y++)E[y-1]=arguments[y];g[A].fn.apply(g[A].context,E)}}return!0},o.prototype.on=function(l,h,c){return n(this,l,h,c,!1)},o.prototype.once=function(l,h,c){return n(this,l,h,c,!0)},o.prototype.removeListener=function(l,h,c,d){var u=e?e+l:l;if(!this._events[u])return this;if(!h)return a(this,u),this;var f=this._events[u];if(f.fn)f.fn===h&&(!d||f.once)&&(!c||f.context===c)&&a(this,u);else{for(var p=0,g=[],v=f.length;p<v;p++)(f[p].fn!==h||d&&!f[p].once||c&&f[p].context!==c)&&g.push(f[p]);g.length?this._events[u]=g.length===1?g[0]:g:a(this,u)}return this},o.prototype.removeAllListeners=function(l){var h;return l?(h=e?e+l:l,this._events[h]&&a(this,h)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=e,o.EventEmitter=o,r.exports=o})(Uh);var gm=Uh.exports,Jn=tp(gm);const ta=nr()||{isTypeSupported:()=>!1};class Bh{constructor(t,e,i,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const n=t.config;this.hls=t,this.id=e,this.useWorker=!!n.enableWorker,this.onTransmuxComplete=i,this.onFlush=s;const a=(h,c)=>{c=c||{},c.frag=this.frag,c.id=this.id,h===m.ERROR&&(this.error=c.error),this.hls.trigger(h,c)};this.observer=new Jn,this.observer.on(m.FRAG_DECRYPTED,a),this.observer.on(m.ERROR,a);const o={mp4:ta.isTypeSupported("video/mp4"),mpeg:ta.isTypeSupported("audio/mpeg"),mp3:ta.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(this.useWorker&&typeof Worker<"u"&&(n.workerPath||Mg())){try{n.workerPath?(_.log(`loading Web Worker ${n.workerPath} for "${e}"`),this.workerContext=Ng(n.workerPath)):(_.log(`injecting Web Worker for "${e}"`),this.workerContext=Fg()),this.onwmsg=c=>this.onWorkerMessage(c);const{worker:h}=this.workerContext;h.addEventListener("message",this.onwmsg),h.onerror=c=>{const d=new Error(`${c.message} (${c.filename}:${c.lineno})`);n.enableWorker=!1,_.warn(`Error in "${e}" Web Worker, fallback to inline`),this.hls.trigger(m.ERROR,{type:Q.OTHER_ERROR,details:$.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:d})},h.postMessage({cmd:"init",typeSupported:o,vendor:l,id:e,config:JSON.stringify(n)})}catch(h){_.warn(`Error setting up "${e}" Web Worker, fallback to inline`,h),this.resetWorker(),this.error=null,this.transmuxer=new Nh(this.observer,o,n,l,e)}return}this.transmuxer=new Nh(this.observer,o,n,l,e)}resetWorker(){if(this.workerContext){const{worker:t,objectURL:e}=this.workerContext;e&&self.URL.revokeObjectURL(e),t.removeEventListener("message",this.onwmsg),t.onerror=null,t.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const t=this.observer;t&&t.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(t,e,i,s,n,a,o,l,h,c){var d,u;h.transmuxing.start=self.performance.now();const{transmuxer:f}=this,p=a?a.start:n.start,g=n.decryptdata,v=this.frag,E=!(v&&n.cc===v.cc),A=!(v&&h.level===v.level),L=v?h.sn-v.sn:-1,y=this.part?h.part-this.part.index:-1,S=L===0&&h.id>1&&h.id===(v==null?void 0:v.stats.chunkCount),R=!A&&(L===1||L===0&&(y===1||S&&y<=0)),D=self.performance.now();(A||L||n.stats.parsing.start===0)&&(n.stats.parsing.start=D),a&&(y||!R)&&(a.stats.parsing.start=D);const M=!(v&&((d=n.initSegment)==null?void 0:d.url)===((u=v.initSegment)==null?void 0:u.url)),C=new pm(E,R,l,A,p,M);if(!R||E||M){_.log(`[transmuxer-interface, ${n.type}]: Starting new transmux session for sn: ${h.sn} p: ${h.part} level: ${h.level} id: ${h.id}
|
165
|
+
discontinuity: ${E}
|
166
|
+
trackSwitch: ${A}
|
167
|
+
contiguous: ${R}
|
168
|
+
accurateTimeOffset: ${l}
|
169
|
+
timeOffset: ${p}
|
170
|
+
initSegmentChange: ${M}`);const I=new fm(i,s,e,o,c);this.configureTransmuxer(I)}if(this.frag=n,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:t,decryptdata:g,chunkMeta:h,state:C},t instanceof ArrayBuffer?[t]:[]);else if(f){const I=f.push(t,g,h,C);mr(I)?(f.async=!0,I.then(G=>{this.handleTransmuxComplete(G)}).catch(G=>{this.transmuxerError(G,h,"transmuxer-interface push error")})):(f.async=!1,this.handleTransmuxComplete(I))}}flush(t){t.transmuxing.start=self.performance.now();const{transmuxer:e}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:t});else if(e){let i=e.flush(t);mr(i)||e.async?(mr(i)||(i=Promise.resolve(i)),i.then(s=>{this.handleFlushResult(s,t)}).catch(s=>{this.transmuxerError(s,t,"transmuxer-interface flush error")})):this.handleFlushResult(i,t)}}transmuxerError(t,e,i){this.hls&&(this.error=t,this.hls.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.FRAG_PARSING_ERROR,chunkMeta:e,fatal:!1,error:t,err:t,reason:i}))}handleFlushResult(t,e){t.forEach(i=>{this.handleTransmuxComplete(i)}),this.onFlush(e)}onWorkerMessage(t){const e=t.data,i=this.hls;switch(e.event){case"init":{var s;const n=(s=this.workerContext)==null?void 0:s.objectURL;n&&self.URL.revokeObjectURL(n);break}case"transmuxComplete":{this.handleTransmuxComplete(e.data);break}case"flush":{this.onFlush(e.data);break}case"workerLog":_[e.data.logType]&&_[e.data.logType](e.data.message);break;default:{e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,i.trigger(e.event,e.data);break}}}configureTransmuxer(t){const{transmuxer:e}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:t}):e&&e.configure(t)}handleTransmuxComplete(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)}}const mm=250,ea=2,vm=.1,ym=.05;class Em{constructor(t,e,i,s){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=t,this.media=e,this.fragmentTracker=i,this.hls=s}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(t,e){const{config:i,media:s,stalled:n}=this;if(s===null)return;const{currentTime:a,seeking:o}=s,l=this.seeking&&!o,h=!this.seeking&&o;if(this.seeking=o,a!==t){if(this.moved=!0,n!==null){if(this.stallReported){const E=self.performance.now()-n;_.warn(`playback not stuck anymore @${a}, after ${Math.round(E)}ms`),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(h||l){this.stalled=null;return}if(s.paused&&!o||s.ended||s.playbackRate===0||!Et.getBuffered(s).length)return;const c=Et.bufferInfo(s,a,0),d=c.len>0,u=c.nextStart||0;if(!d&&!u)return;if(o){const E=c.len>ea,A=!u||e&&e.start<=a||u-a>ea&&!this.fragmentTracker.getPartialFragment(a);if(E||A)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var f;const E=Math.max(u,c.start||0)-a,A=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,L=!(A==null||(f=A.details)==null)&&f.live?A.details.targetduration*2:ea,y=this.fragmentTracker.getPartialFragment(a);if(E>0&&(E<=L||y)){this._trySkipBufferHole(y);return}}const p=self.performance.now();if(n===null){this.stalled=p;return}const g=p-n;if(!o&&g>=mm&&(this._reportStall(c),!this.media))return;const v=Et.bufferInfo(s,a,i.maxBufferHole);this._tryFixBufferStall(v,g)}_tryFixBufferStall(t,e){const{config:i,fragmentTracker:s,media:n}=this;if(n===null)return;const a=n.currentTime,o=s.getPartialFragment(a);o&&(this._trySkipBufferHole(o)||!this.media)||(t.len>i.maxBufferHole||t.nextStart&&t.nextStart-a<i.maxBufferHole)&&e>i.highBufferWatchdogPeriod*1e3&&(_.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(t){const{hls:e,media:i,stallReported:s}=this;if(!s&&i){this.stallReported=!0;const n=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${JSON.stringify(t)})`);_.warn(n.message),e.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.BUFFER_STALLED_ERROR,fatal:!1,error:n,buffer:t.len})}}_trySkipBufferHole(t){const{config:e,hls:i,media:s}=this;if(s===null)return 0;const n=s.currentTime,a=Et.bufferInfo(s,n,0),o=n<a.start?a.start:a.nextStart;if(o){const l=a.len<=e.maxBufferHole,h=a.len>0&&a.len<1&&s.readyState<3,c=o-n;if(c>0&&(l||h)){if(c>e.maxBufferHole){const{fragmentTracker:u}=this;let f=!1;if(n===0){const p=u.getAppendedFrag(0,Z.MAIN);p&&o<p.end&&(f=!0)}if(!f){const p=t||u.getAppendedFrag(n,Z.MAIN);if(p){let g=!1,v=p.end;for(;v<o;){const E=u.getPartialFragment(v);if(E)v+=E.duration;else{g=!0;break}}if(g)return 0}}}const d=Math.max(o+ym,n+vm);if(_.warn(`skipping hole, adjusting currentTime from ${n} to ${d}`),this.moved=!0,this.stalled=null,s.currentTime=d,t&&!t.gap){const u=new Error(`fragment loaded with buffer holes, seeking from ${n} to ${d}`);i.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:u,reason:u.message,frag:t})}return d}}return 0}_tryNudgeBuffer(){const{config:t,hls:e,media:i,nudgeRetry:s}=this;if(i===null)return;const n=i.currentTime;if(this.nudgeRetry++,s<t.nudgeMaxRetry){const a=n+(s+1)*t.nudgeOffset,o=new Error(`Nudging 'currentTime' from ${n} to ${a}`);_.warn(o.message),i.currentTime=a,e.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1})}else{const a=new Error(`Playhead still not moving while enough data buffered @${n} after ${t.nudgeMaxRetry} nudges`);_.error(a.message),e.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.BUFFER_STALLED_ERROR,error:a,fatal:!0})}}}const bm=100;class Tm extends Kn{constructor(t,e,i){super(t,e,i,"[stream-controller]",Z.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:t}=this;t.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.MANIFEST_PARSED,this.onManifestParsed,this),t.on(m.LEVEL_LOADING,this.onLevelLoading,this),t.on(m.LEVEL_LOADED,this.onLevelLoaded,this),t.on(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.on(m.ERROR,this.onError,this),t.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(m.BUFFER_CREATED,this.onBufferCreated,this),t.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:t}=this;t.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.MANIFEST_PARSED,this.onManifestParsed,this),t.off(m.LEVEL_LOADED,this.onLevelLoaded,this),t.off(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.off(m.ERROR,this.onError,this),t.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(m.BUFFER_CREATED,this.onBufferCreated,this),t.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(m.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),this.onMediaDetaching()}startLoad(t){if(this.levels){const{lastCurrentTime:e,hls:i}=this;if(this.stopLoad(),this.setInterval(bm),this.level=-1,!this.startFragRequested){let s=i.startLevel;s===-1&&(i.config.testBandwidth&&this.levels.length>1?(s=0,this.bitrateTest=!0):s=i.nextAutoLevel),this.level=i.nextLoadLevel=s,this.loadedmetadata=!1}e>0&&t===-1&&(this.log(`Override startPosition with lastCurrentTime @${e.toFixed(3)}`),t=e),this.state=B.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=B.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case B.WAITING_LEVEL:{var t;const{levels:i,level:s}=this,n=i==null||(t=i[s])==null?void 0:t.details;if(n&&(!n.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(n))break;this.state=B.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=B.IDLE;break}break}case B.FRAG_LOADING_WAITING_RETRY:{var e;const i=self.performance.now(),s=this.retryDate;(!s||i>=s||(e=this.media)!=null&&e.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=B.IDLE)}break}this.state===B.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:t,levelLastLoaded:e,levels:i,media:s}=this,{config:n,nextLoadLevel:a}=t;if(e===null||!s&&(this.startFragRequested||!n.startFragPrefetch)||this.altAudio&&this.audioOnly||!(i!=null&&i[a]))return;const o=i[a],l=this.getMainFwdBufferInfo();if(l===null)return;const h=this.getLevelDetails();if(h&&this._streamEnded(l,h)){const v={};this.altAudio&&(v.type="video"),this.hls.trigger(m.BUFFER_EOS,v),this.state=B.ENDED;return}t.loadLevel!==a&&t.manualLevel===-1&&this.log(`Adapting to level ${a} from level ${this.level}`),this.level=t.nextLoadLevel=a;const c=o.details;if(!c||this.state===B.WAITING_LEVEL||c.live&&this.levelLastLoaded!==a){this.level=a,this.state=B.WAITING_LEVEL;return}const d=l.len,u=this.getMaxBufferLength(o.maxBitrate);if(d>=u)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const f=this.backtrackFragment?this.backtrackFragment.start:l.end;let p=this.getNextFragment(f,c);if(this.couldBacktrack&&!this.fragPrevious&&p&&p.sn!=="initSegment"&&this.fragmentTracker.getState(p)!==$t.OK){var g;const v=((g=this.backtrackFragment)!=null?g:p).sn-c.startSN,E=c.fragments[v-1];E&&p.cc===E.cc&&(p=E,this.fragmentTracker.removeFragment(E))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,f)){if(!p.gap){const v=this.audioOnly&&!this.altAudio?mt.AUDIO:mt.VIDEO,E=(v===mt.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;E&&this.afterBufferFlushed(E,v,Z.MAIN)}p=this.getNextFragmentLoopLoading(p,c,l,Z.MAIN,u)}p&&(p.initSegment&&!p.initSegment.data&&!this.bitrateTest&&(p=p.initSegment),this.loadFragment(p,o,f))}loadFragment(t,e,i){const s=this.fragmentTracker.getState(t);this.fragCurrent=t,s===$t.NOT_LOADED||s===$t.PARTIAL?t.sn==="initSegment"?this._loadInitSegment(t,e):this.bitrateTest?(this.log(`Fragment ${t.sn} of level ${t.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(t,e)):(this.startFragRequested=!0,super.loadFragment(t,e,i)):this.clearTrackerIfNeeded(t)}getBufferedFrag(t){return this.fragmentTracker.getBufferedFrag(t,Z.MAIN)}followingBufferedFrag(t){return t?this.getBufferedFrag(t.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:t,media:e}=this;if(e!=null&&e.readyState){let i;const s=this.getAppendedFrag(e.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const n=this.getLevelDetails();if(n!=null&&n.live){const o=this.getMainFwdBufferInfo();if(!o||o.len<n.targetduration*2)return}if(!e.paused&&t){const o=this.hls.nextLoadLevel,l=t[o],h=this.fragLastKbps;h&&this.fragCurrent?i=this.fragCurrent.duration*l.maxBitrate/(1e3*h)+1:i=0}else i=0;const a=this.getBufferedFrag(e.currentTime+i);if(a){const o=this.followingBufferedFrag(a);if(o){this.abortCurrentFrag();const l=o.maxStartPTS?o.maxStartPTS:o.start,h=o.duration,c=Math.max(a.end,l+Math.min(Math.max(h-this.config.maxFragLookUpTolerance,h*.5),h*.75));this.flushMainBuffer(c,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const t=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,t&&(t.abortRequests(),this.fragmentTracker.removeFragment(t)),this.state){case B.KEY_LOADING:case B.FRAG_LOADING:case B.FRAG_LOADING_WAITING_RETRY:case B.PARSING:case B.PARSED:this.state=B.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(t,e){super.flushMainBuffer(t,e,this.altAudio?"video":null)}onMediaAttached(t,e){super.onMediaAttached(t,e);const i=e.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new Em(this.config,i,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:t}=this;t&&this.onvplaying&&this.onvseeked&&(t.removeEventListener("playing",this.onvplaying),t.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 t=this.media,e=t?t.currentTime:null;z(e)&&this.log(`Media seeked to ${e.toFixed(3)}`);const i=this.getMainFwdBufferInfo();if(i===null||i.len===0){this.warn(`Main forward buffer length on "seeked" event ${i?i.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(m.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1}onManifestParsed(t,e){let i=!1,s=!1,n;e.levels.forEach(a=>{n=a.audioCodec,n&&(n.indexOf("mp4a.40.2")!==-1&&(i=!0),n.indexOf("mp4a.40.5")!==-1&&(s=!0))}),this.audioCodecSwitch=i&&s&&!$g(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1}onLevelLoading(t,e){const{levels:i}=this;if(!i||this.state!==B.IDLE)return;const s=i[e.level];(!s.details||s.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(s.details))&&(this.state=B.WAITING_LEVEL)}onLevelLoaded(t,e){var i;const{levels:s}=this,n=e.level,a=e.details,o=a.totalduration;if(!s){this.warn(`Levels were reset while loading level ${n}`);return}this.log(`Level ${n} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${o}`);const l=s[n],h=this.fragCurrent;h&&(this.state===B.FRAG_LOADING||this.state===B.FRAG_LOADING_WAITING_RETRY)&&(h.level!==e.level||h.urlId!==l.urlId)&&h.loader&&this.abortCurrentFrag();let c=0;if(a.live||(i=l.details)!=null&&i.live){if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;c=this.alignPlaylists(a,l.details)}if(l.details=a,this.levelLastLoaded=n,this.hls.trigger(m.LEVEL_UPDATED,{details:a,level:n}),this.state===B.WAITING_LEVEL){if(this.waitForCdnTuneIn(a))return;this.state=B.IDLE}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,c),this.tick()}_handleFragmentLoadProgress(t){var e;const{frag:i,part:s,payload:n}=t,{levels:a}=this;if(!a){this.warn(`Levels were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);return}const o=a[i.level],l=o.details;if(!l){this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`),this.fragmentTracker.removeFragment(i);return}const h=o.videoCodec,c=l.PTSKnown||!l.live,d=(e=i.initSegment)==null?void 0:e.data,u=this._getAudioCodec(o),f=this.transmuxer=this.transmuxer||new Bh(this.hls,Z.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=s?s.index:-1,g=p!==-1,v=new Hn(i.level,i.sn,i.stats.chunkCount,n.byteLength,p,g),E=this.initPTS[i.cc];f.push(n,d,u,h,i,s,l.totalduration,c,v,E)}onAudioTrackSwitching(t,e){const i=this.altAudio;if(!e.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 n=this.fragCurrent;n&&(this.log("Switching to main audio track, cancel main fragment load"),n.abortRequests(),this.fragmentTracker.removeFragment(n)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const s=this.hls;i&&(s.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),s.trigger(m.AUDIO_TRACK_SWITCHED,e)}}onAudioTrackSwitched(t,e){const i=e.id,s=!!this.hls.audioTracks[i].url;if(s){const n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=s,this.tick()}onBufferCreated(t,e){const i=e.tracks;let s,n,a=!1;for(const o in i){const l=i[o];if(l.id==="main"){if(n=o,s=l,o==="video"){const h=i[o];h&&(this.videoBuffer=h.buffer)}}else a=!0}a&&s?(this.log(`Alternate track found, use ${n}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(t,e){const{frag:i,part:s}=e;if(i&&i.type!==Z.MAIN)return;if(this.fragContextChanged(i)){this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`),this.state===B.PARSED&&(this.state=B.IDLE);return}const n=s?s.stats:i.stats;this.fragLastKbps=Math.round(8*n.total/(n.buffering.end-n.loading.first)),i.sn!=="initSegment"&&(this.fragPrevious=i),this.fragBufferedComplete(i,s)}onError(t,e){var i;if(e.fatal){this.state=B.ERROR;return}switch(e.details){case $.FRAG_GAP:case $.FRAG_PARSING_ERROR:case $.FRAG_DECRYPT_ERROR:case $.FRAG_LOAD_ERROR:case $.FRAG_LOAD_TIMEOUT:case $.KEY_LOAD_ERROR:case $.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Z.MAIN,e);break;case $.LEVEL_LOAD_ERROR:case $.LEVEL_LOAD_TIMEOUT:case $.LEVEL_PARSING_ERROR:!e.levelRetry&&this.state===B.WAITING_LEVEL&&((i=e.context)==null?void 0:i.type)===ct.LEVEL&&(this.state=B.IDLE);break;case $.BUFFER_FULL_ERROR:if(!e.parent||e.parent!=="main")return;this.reduceLengthAndFlushBuffer(e)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case $.INTERNAL_EXCEPTION:this.recoverWorkerError(e);break}}checkBuffer(){const{media:t,gapController:e}=this;if(!(!t||!e||!t.readyState)){if(this.loadedmetadata||!Et.getBuffered(t).length){const i=this.state!==B.IDLE?this.fragCurrent:null;e.poll(this.lastCurrentTime,i)}this.lastCurrentTime=t.currentTime}}onFragLoadEmergencyAborted(){this.state=B.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(t,{type:e}){if(e!==mt.AUDIO||this.audioOnly&&!this.altAudio){const i=(e===mt.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(i,e,Z.MAIN)}}onLevelsUpdated(t,e){this.levels=e.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:t}=this;if(!t)return;const e=t.currentTime;let i=this.startPosition;if(i>=0&&e<i){if(t.seeking){this.log(`could not seek to ${i}, already seeking at ${e}`);return}const s=Et.getBuffered(t),n=(s.length?s.start(0):0)-i;n>0&&(n<this.config.maxBufferHole||n<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${n} to match buffer start`),i+=n,this.startPosition=i),this.log(`seek to target start position ${i} from current time ${e}`),t.currentTime=i}}_getAudioCodec(t){let e=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&e&&(this.log("Swapping audio codec"),e.indexOf("mp4a.40.5")!==-1?e="mp4a.40.2":e="mp4a.40.5"),e}_loadBitrateTestFrag(t,e){t.bitrateTest=!0,this._doFragLoad(t,e).then(i=>{const{hls:s}=this;if(!i||this.fragContextChanged(t))return;e.fragmentError=0,this.state=B.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const n=t.stats;n.parsing.start=n.parsing.end=n.buffering.start=n.buffering.end=self.performance.now(),s.trigger(m.FRAG_LOADED,i),t.bitrateTest=!1})}_handleTransmuxComplete(t){var e;const i="main",{hls:s}=this,{remuxResult:n,chunkMeta:a}=t,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:l,part:h,level:c}=o,{video:d,text:u,id3:f,initSegment:p}=n,{details:g}=c,v=this.altAudio?void 0:n.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=B.PARSING,p){if(p!=null&&p.tracks){const L=l.initSegment||l;this._bufferInitSegment(c,p.tracks,L,a),s.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:L,id:i,tracks:p.tracks})}const E=p.initPTS,A=p.timescale;z(E)&&(this.initPTS[l.cc]={baseTime:E,timescale:A},s.trigger(m.INIT_PTS_FOUND,{frag:l,id:i,initPTS:E,timescale:A}))}if(d&&g&&l.sn!=="initSegment"){const E=g.fragments[l.sn-1-g.startSN],A=l.sn===g.startSN,L=!E||l.cc>E.cc;if(n.independent!==!1){const{startPTS:y,endPTS:S,startDTS:R,endDTS:D}=d;if(h)h.elementaryStreams[d.type]={startPTS:y,endPTS:S,startDTS:R,endDTS:D};else if(d.firstKeyFrame&&d.independent&&a.id===1&&!L&&(this.couldBacktrack=!0),d.dropped&&d.independent){const M=this.getMainFwdBufferInfo(),C=(M?M.end:this.getLoadPosition())+this.config.maxBufferHole,I=d.firstKeyFramePTS?d.firstKeyFramePTS:y;if(!A&&C<I-this.config.maxBufferHole&&!L){this.backtrack(l);return}else L&&(l.gap=!0);l.setElementaryStreamInfo(d.type,l.start,S,l.start,D,!0)}l.setElementaryStreamInfo(d.type,y,S,R,D),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(d,l,h,a,A||L)}else if(A||L)l.gap=!0;else{this.backtrack(l);return}}if(v){const{startPTS:E,endPTS:A,startDTS:L,endDTS:y}=v;h&&(h.elementaryStreams[mt.AUDIO]={startPTS:E,endPTS:A,startDTS:L,endDTS:y}),l.setElementaryStreamInfo(mt.AUDIO,E,A,L,y),this.bufferFragmentData(v,l,h,a)}if(g&&f!=null&&(e=f.samples)!=null&&e.length){const E={id:i,frag:l,details:g,samples:f.samples};s.trigger(m.FRAG_PARSING_METADATA,E)}if(g&&u){const E={id:i,frag:l,details:g,samples:u.samples};s.trigger(m.FRAG_PARSING_USERDATA,E)}}_bufferInitSegment(t,e,i,s){if(this.state!==B.PARSING)return;this.audioOnly=!!e.audio&&!e.video,this.altAudio&&!this.audioOnly&&delete e.audio;const{audio:n,video:a,audiovideo:o}=e;if(n){let l=t.audioCodec;const h=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(l&&(l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5"),n.metadata.channelCount!==1&&h.indexOf("firefox")===-1&&(l="mp4a.40.5")),h.indexOf("android")!==-1&&n.container!=="audio/mpeg"&&(l="mp4a.40.2",this.log(`Android: force audio codec to ${l}`)),t.audioCodec&&t.audioCodec!==l&&this.log(`Swapping manifest audio codec "${t.audioCodec}" for "${l}"`),n.levelCodec=l,n.id="main",this.log(`Init audio buffer, container:${n.container}, codecs[selected/level/parsed]=[${l||""}/${t.audioCodec||""}/${n.codec}]`)}a&&(a.levelCodec=t.videoCodec,a.id="main",this.log(`Init video buffer, container:${a.container}, codecs[level/parsed]=[${t.videoCodec||""}/${a.codec}]`)),o&&this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${t.attrs.CODECS||""}/${o.codec}]`),this.hls.trigger(m.BUFFER_CODECS,e),Object.keys(e).forEach(l=>{const h=e[l].initSegment;h!=null&&h.byteLength&&this.hls.trigger(m.BUFFER_APPENDING,{type:l,data:h,frag:i,part:null,chunkMeta:s,parent:i.type})}),this.tick()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Z.MAIN)}backtrack(t){this.couldBacktrack=!0,this.backtrackFragment=t,this.resetTransmuxer(),this.flushBufferGap(t),this.fragmentTracker.removeFragment(t),this.fragPrevious=null,this.nextLoadPosition=t.start,this.state=B.IDLE}checkFragmentChanged(){const t=this.media;let e=null;if(t&&t.readyState>1&&t.seeking===!1){const i=t.currentTime;if(Et.isBuffered(t,i)?e=this.getAppendedFrag(i):Et.isBuffered(t,i+.1)&&(e=this.getAppendedFrag(i+.1)),e){this.backtrackFragment=null;const s=this.fragPlaying,n=e.level;(!s||e.sn!==s.sn||s.level!==n||e.urlId!==s.urlId)&&(this.fragPlaying=e,this.hls.trigger(m.FRAG_CHANGED,{frag:e}),(!s||s.level!==n)&&this.hls.trigger(m.LEVEL_SWITCHED,{level:n}))}}}get nextLevel(){const t=this.nextBufferedFrag;return t?t.level:-1}get currentFrag(){const t=this.media;return t?this.fragPlaying||this.getAppendedFrag(t.currentTime):null}get currentProgramDateTime(){const t=this.media;if(t){const e=t.currentTime,i=this.currentFrag;if(i&&z(e)&&z(i.programDateTime)){const s=i.programDateTime+(e-i.start)*1e3;return new Date(s)}}return null}get currentLevel(){const t=this.currentFrag;return t?t.level:-1}get nextBufferedFrag(){const t=this.currentFrag;return t?this.followingBufferedFrag(t):null}get forceStartLoad(){return this._forceStartLoad}}class Ii{constructor(t,e=0,i=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=i}sample(t,e){const i=Math.pow(this.alpha_,t);this.estimate_=e*(1-i)+i*this.estimate_,this.totalWeight_+=t}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_}}class Am{constructor(t,e,i,s=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_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Ii(t),this.fast_=new Ii(e),this.defaultTTFB_=s,this.ttfb_=new Ii(t)}update(t,e){const{slow_:i,fast_:s,ttfb_:n}=this;i.halfLife!==t&&(this.slow_=new Ii(t,i.getEstimate(),i.getTotalWeight())),s.halfLife!==e&&(this.fast_=new Ii(e,s.getEstimate(),s.getTotalWeight())),n.halfLife!==t&&(this.ttfb_=new Ii(t,n.getEstimate(),n.getTotalWeight()))}sample(t,e){t=Math.max(t,this.minDelayMs_);const i=8*e,s=t/1e3,n=i/s;this.fast_.sample(s,n),this.slow_.sample(s,n)}sampleTTFB(t){const e=t/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(e,2)/2);this.ttfb_.sample(i,Math.max(t,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(){}}class wm{constructor(t){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=-1,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=t;const e=t.config;this.bwEstimator=new Am(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate),this.registerListeners()}registerListeners(){const{hls:t}=this;t.on(m.FRAG_LOADING,this.onFragLoading,this),t.on(m.FRAG_LOADED,this.onFragLoaded,this),t.on(m.FRAG_BUFFERED,this.onFragBuffered,this),t.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(m.LEVEL_LOADED,this.onLevelLoaded,this)}unregisterListeners(){const{hls:t}=this;t.off(m.FRAG_LOADING,this.onFragLoading,this),t.off(m.FRAG_LOADED,this.onFragLoaded,this),t.off(m.FRAG_BUFFERED,this.onFragBuffered,this),t.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(m.LEVEL_LOADED,this.onLevelLoaded,this)}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null}onFragLoading(t,e){var i;const s=e.frag;this.ignoreFragment(s)||(this.fragCurrent=s,this.partCurrent=(i=e.part)!=null?i:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))}onLevelSwitching(t,e){this.clearTimer()}getTimeToLoadFrag(t,e,i,s){const n=t+i/e,a=s?this.lastLevelLoadSec:0;return n+a}onLevelLoaded(t,e){const i=this.hls.config,{total:s,bwEstimate:n}=e.stats;z(s)&&z(n)&&(this.lastLevelLoadSec=8*s/n),e.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}_abandonRulesCheck(){const{fragCurrent:t,partCurrent:e,hls:i}=this,{autoLevelEnabled:s,media:n}=i;if(!t||!n)return;const a=performance.now(),o=e?e.stats:t.stats,l=e?e.duration:t.duration,h=a-o.loading.start;if(o.aborted||o.loaded&&o.loaded===o.total||t.level===0){this.clearTimer(),this._nextAutoLevel=-1;return}if(!s||n.paused||!n.playbackRate||!n.readyState)return;const c=i.mainForwardBufferInfo;if(c===null)return;const d=this.bwEstimator.getEstimateTTFB(),u=Math.abs(n.playbackRate);if(h<=Math.max(d,1e3*(l/(u*2))))return;const f=c.len/u;if(f>=2*l/u)return;const p=o.loading.first?o.loading.first-o.loading.start:-1,g=o.loaded&&p>-1,v=this.bwEstimator.getEstimate(),{levels:E,minAutoLevel:A}=i,L=E[t.level],y=o.total||Math.max(o.loaded,Math.round(l*L.maxBitrate/8));let S=h-p;S<1&&g&&(S=Math.min(h,o.loaded*8/v));const R=g?o.loaded*1e3/S:0,D=R?(y-o.loaded)/R:y*8/v+d/1e3;if(D<=f)return;const M=R?R*8:v;let C=Number.POSITIVE_INFINITY,I;for(I=t.level-1;I>A;I--){const G=E[I].maxBitrate;if(C=this.getTimeToLoadFrag(d/1e3,M,l*G,!E[I].details),C<f)break}C>=D||C>l*10||(i.nextLoadLevel=I,g?this.bwEstimator.sample(h-Math.min(d,p),o.loaded):this.bwEstimator.sampleTTFB(h),this.clearTimer(),_.warn(`[abr] Fragment ${t.sn}${e?" part "+e.index:""} of level ${t.level} is loading too slowly;
|
171
|
+
Time to underbuffer: ${f.toFixed(3)} s
|
172
|
+
Estimated load time for current fragment: ${D.toFixed(3)} s
|
173
|
+
Estimated load time for down switch fragment: ${C.toFixed(3)} s
|
174
|
+
TTFB estimate: ${p}
|
175
|
+
Current BW estimate: ${z(v)?(v/1024).toFixed(3):"Unknown"} Kb/s
|
176
|
+
New BW estimate: ${(this.bwEstimator.getEstimate()/1024).toFixed(3)} Kb/s
|
177
|
+
Aborting and switching to level ${I}`),t.loader&&(this.fragCurrent=this.partCurrent=null,t.abortRequests()),i.trigger(m.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:o}))}onFragLoaded(t,{frag:e,part:i}){const s=i?i.stats:e.stats;if(e.type===Z.MAIN&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(e)){if(this.clearTimer(),this.lastLoadedFragLevel=e.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){const n=i?i.duration:e.duration,a=this.hls.levels[e.level],o=(a.loaded?a.loaded.bytes:0)+s.loaded,l=(a.loaded?a.loaded.duration:0)+n;a.loaded={bytes:o,duration:l},a.realBitrate=Math.round(8*o/l)}if(e.bitrateTest){const n={stats:s,frag:e,part:i,id:e.type};this.onFragBuffered(m.FRAG_BUFFERED,n),e.bitrateTest=!1}}}onFragBuffered(t,e){const{frag:i,part:s}=e,n=s!=null&&s.stats.loaded?s.stats:i.stats;if(n.aborted||this.ignoreFragment(i))return;const a=n.parsing.end-n.loading.start-Math.min(n.loading.first-n.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,n.loaded),n.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(t){return t.type!==Z.MAIN||t.sn==="initSegment"}clearTimer(){self.clearInterval(this.timer)}get nextAutoLevel(){const t=this._nextAutoLevel,e=this.bwEstimator;if(t!==-1&&!e.canEstimate())return t;let i=this.getNextABRAutoLevel();if(t!==-1){const s=this.hls.levels;if(s.length>Math.max(t,i)&&s[t].loadError<=s[i].loadError)return t}return t!==-1&&(i=Math.min(t,i)),i}getNextABRAutoLevel(){const{fragCurrent:t,partCurrent:e,hls:i}=this,{maxAutoLevel:s,config:n,minAutoLevel:a,media:o}=i,l=e?e.duration:t?t.duration:0,h=o&&o.playbackRate!==0?Math.abs(o.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,d=i.mainForwardBufferInfo,u=(d?d.len:0)/h;let f=this.findBestLevel(c,a,s,u,n.abrBandWidthFactor,n.abrBandWidthUpFactor);if(f>=0)return f;_.trace(`[abr] ${u?"rebuffering expected":"buffer is empty"}, finding optimal quality level`);let p=l?Math.min(l,n.maxStarvationDelay):n.maxStarvationDelay,g=n.abrBandWidthFactor,v=n.abrBandWidthUpFactor;if(!u){const E=this.bitrateTestDelay;E&&(p=(l?Math.min(l,n.maxLoadingDelay):n.maxLoadingDelay)-E,_.trace(`[abr] bitrate test took ${Math.round(1e3*E)}ms, set first fragment max fetchDuration to ${Math.round(1e3*p)} ms`),g=v=1)}return f=this.findBestLevel(c,a,s,u+p,g,v),Math.max(f,0)}findBestLevel(t,e,i,s,n,a){var o;const{fragCurrent:l,partCurrent:h,lastLoadedFragLevel:c}=this,{levels:d}=this.hls,u=d[c],f=!!(u!=null&&(o=u.details)!=null&&o.live),p=u==null?void 0:u.codecSet,g=h?h.duration:l?l.duration:0,v=this.bwEstimator.getEstimateTTFB()/1e3;let E=e,A=-1;for(let L=i;L>=e;L--){const y=d[L];if(!y||p&&y.codecSet!==p){y&&(E=Math.min(L,E),A=Math.max(L,A));continue}A!==-1&&_.trace(`[abr] Skipped level(s) ${E}-${A} with CODECS:"${d[A].attrs.CODECS}"; not compatible with "${u.attrs.CODECS}"`);const S=y.details,R=(h?S==null?void 0:S.partTarget:S==null?void 0:S.averagetargetduration)||g;let D;L<=c?D=n*t:D=a*t;const M=d[L].maxBitrate,C=this.getTimeToLoadFrag(v,D,M*R,S===void 0);if(_.trace(`[abr] level:${L} adjustedbw-bitrate:${Math.round(D-M)} avgDuration:${R.toFixed(1)} maxFetchDuration:${s.toFixed(1)} fetchDuration:${C.toFixed(1)}`),D>M&&(C===0||!z(C)||f&&!this.bitrateTestDelay||C<s))return L}return-1}set nextAutoLevel(t){this._nextAutoLevel=t}}class Hh{constructor(){this.chunks=[],this.dataLength=0}push(t){this.chunks.push(t),this.dataLength+=t.length}flush(){const{chunks:t,dataLength:e}=this;let i;if(t.length)t.length===1?i=t[0]:i=Sm(t,e);else return new Uint8Array(0);return this.reset(),i}reset(){this.chunks.length=0,this.dataLength=0}}function Sm(r,t){const e=new Uint8Array(t);let i=0;for(let s=0;s<r.length;s++){const n=r[s];e.set(n,i),i+=n.length}return e}const Gh=100;class Lm extends Kn{constructor(t,e,i){super(t,e,i,"[audio-stream-controller]",Z.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:t}=this;t.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.LEVEL_LOADED,this.onLevelLoaded,this),t.on(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(m.ERROR,this.onError,this),t.on(m.BUFFER_RESET,this.onBufferReset,this),t.on(m.BUFFER_CREATED,this.onBufferCreated,this),t.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:t}=this;t.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.LEVEL_LOADED,this.onLevelLoaded,this),t.off(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(m.ERROR,this.onError,this),t.off(m.BUFFER_RESET,this.onBufferReset,this),t.off(m.BUFFER_CREATED,this.onBufferCreated,this),t.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(m.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(t,{frag:e,id:i,initPTS:s,timescale:n}){if(i==="main"){const a=e.cc;this.initPTS[e.cc]={baseTime:s,timescale:n},this.log(`InitPTS for cc: ${a} found from main: ${s}`),this.videoTrackCC=a,this.state===B.WAITING_INIT_PTS&&this.tick()}}startLoad(t){if(!this.levels){this.startPosition=t,this.state=B.STOPPED;return}const e=this.lastCurrentTime;this.stopLoad(),this.setInterval(Gh),e>0&&t===-1?(this.log(`Override startPosition with lastCurrentTime @${e.toFixed(3)}`),t=e,this.state=B.IDLE):(this.loadedmetadata=!1,this.state=B.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}doTick(){switch(this.state){case B.IDLE:this.doTickIdle();break;case B.WAITING_TRACK:{var t;const{levels:i,trackId:s}=this,n=i==null||(t=i[s])==null?void 0:t.details;if(n){if(this.waitForCdnTuneIn(n))break;this.state=B.WAITING_INIT_PTS}break}case B.FRAG_LOADING_WAITING_RETRY:{var e;const i=performance.now(),s=this.retryDate;(!s||i>=s||(e=this.media)!=null&&e.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=B.IDLE);break}case B.WAITING_INIT_PTS:{const i=this.waitingData;if(i){const{frag:s,part:n,cache:a,complete:o}=i;if(this.initPTS[s.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=B.FRAG_LOADING;const l=a.flush(),h={frag:s,part:n,payload:l,networkDetails:null};this._handleFragmentLoadProgress(h),o&&super._handleFragmentLoadComplete(h)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${s.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const l=this.getLoadPosition(),h=Et.bufferInfo(this.mediaBuffer,l,this.config.maxBufferHole);Nn(h.end,this.config.maxFragLookUpTolerance,s)<0&&(this.log(`Waiting fragment cc (${s.cc}) @ ${s.start} cancelled because another fragment at ${h.end} is needed`),this.clearWaitingFragment())}}else this.state=B.IDLE}}this.onTickEnd()}clearWaitingFragment(){const t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=B.IDLE)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:t}=this;t!=null&&t.readyState&&(this.lastCurrentTime=t.currentTime)}doTickIdle(){const{hls:t,levels:e,media:i,trackId:s}=this,n=t.config;if(!(e!=null&&e[s])||!i&&(this.startFragRequested||!n.startFragPrefetch))return;const a=e[s],o=a.details;if(!o||o.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(o)){this.state=B.WAITING_TRACK;return}const l=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&l&&(this.bufferFlushed=!1,this.afterBufferFlushed(l,mt.AUDIO,Z.AUDIO));const h=this.getFwdBufferInfo(l,Z.AUDIO);if(h===null)return;const{bufferedTrack:c,switchingTrack:d}=this;if(!d&&this._streamEnded(h,o)){t.trigger(m.BUFFER_EOS,{type:"audio"}),this.state=B.ENDED;return}const u=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Z.MAIN),f=h.len,p=this.getMaxBufferLength(u==null?void 0:u.len);if(f>=p&&!d)return;const g=o.fragments[0].start;let v=h.end;if(d&&i){const y=this.getLoadPosition();c&&d.attrs!==c.attrs&&(v=y),o.PTSKnown&&y<g&&(h.end>g||h.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=g+.05)}let E=this.getNextFragment(v,o),A=!1;if(E&&this.isLoopLoading(E,v)&&(A=!!E.gap,E=this.getNextFragmentLoopLoading(E,o,h,Z.MAIN,p)),!E){this.bufferFlushed=!0;return}const L=u&&E.start>u.end+o.targetduration;if(L||!(u!=null&&u.len)&&h.len){const y=this.getAppendedFrag(E.start,Z.MAIN);if(y===null||(A||(A=!!y.gap||!!L&&u.len===0),L&&!A||A&&h.nextStart&&h.nextStart<y.end))return}this.loadFragment(E,a,v)}getMaxBufferLength(t){const e=super.getMaxBufferLength();return t?Math.min(Math.max(e,t),this.config.maxMaxBufferLength):e}onMediaDetaching(){this.videoBuffer=null,super.onMediaDetaching()}onAudioTracksUpdated(t,{audioTracks:e}){this.resetTransmuxer(),this.levels=e.map(i=>new ms(i))}onAudioTrackSwitching(t,e){const i=!!e.url;this.trackId=e.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),i?this.setInterval(Gh):this.resetTransmuxer(),i?(this.switchingTrack=e,this.state=B.IDLE):(this.switchingTrack=null,this.bufferedTrack=e,this.state=B.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(t,e){this.mainDetails=e.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(m.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(t,e){var i;if(this.mainDetails==null){this.cachedTrackLoadedData=e;return}const{levels:s}=this,{details:n,id:a}=e;if(!s){this.warn(`Audio tracks were reset while loading level ${a}`);return}this.log(`Track ${a} loaded [${n.startSN},${n.endSN}]${n.lastPartSn?`[part-${n.lastPartSn}-${n.lastPartIndex}]`:""},duration:${n.totalduration}`);const o=s[a];let l=0;if(n.live||(i=o.details)!=null&&i.live){this.checkLiveUpdate(n);const h=this.mainDetails;if(n.deltaUpdateFailed||!h)return;!o.details&&n.hasProgramDateTime&&h.hasProgramDateTime?(Eh(n,h),l=n.fragments[0].start):l=this.alignPlaylists(n,o.details)}o.details=n,this.levelLastLoaded=a,!this.startFragRequested&&(this.mainDetails||!n.live)&&this.setStartPosition(o.details,l),this.state===B.WAITING_TRACK&&!this.waitForCdnTuneIn(n)&&(this.state=B.IDLE),this.tick()}_handleFragmentLoadProgress(t){var e;const{frag:i,part:s,payload:n}=t,{config:a,trackId:o,levels:l}=this;if(!l){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);return}const h=l[o];if(!h){this.warn("Audio track is undefined on fragment load progress");return}const c=h.details;if(!c){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(i.start);return}const d=a.defaultAudioCodec||h.audioCodec||"mp4a.40.2";let u=this.transmuxer;u||(u=this.transmuxer=new Bh(this.hls,Z.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const f=this.initPTS[i.cc],p=(e=i.initSegment)==null?void 0:e.data;if(f!==void 0){const g=s?s.index:-1,v=g!==-1,E=new Hn(i.level,i.sn,i.stats.chunkCount,n.byteLength,g,v);u.push(n,p,d,"",i,s,c.totalduration,!1,E,f)}else{this.log(`Unknown video PTS for cc ${i.cc}, waiting for video PTS before demuxing audio frag ${i.sn} of [${c.startSN} ,${c.endSN}],track ${o}`);const{cache:g}=this.waitingData=this.waitingData||{frag:i,part:s,cache:new Hh,complete:!1};g.push(new Uint8Array(n)),this.waitingVideoCC=this.videoTrackCC,this.state=B.WAITING_INIT_PTS}}_handleFragmentLoadComplete(t){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(t)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(t,e){const i=e.tracks.audio;i&&(this.mediaBuffer=i.buffer||null),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer||null)}onFragBuffered(t,e){const{frag:i,part:s}=e;if(i.type!==Z.AUDIO){if(!this.loadedmetadata&&i.type===Z.MAIN){const n=this.videoBuffer||this.media;n&&Et.getBuffered(n).length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(i)){this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(i.sn!=="initSegment"){this.fragPrevious=i;const n=this.switchingTrack;n&&(this.bufferedTrack=n,this.switchingTrack=null,this.hls.trigger(m.AUDIO_TRACK_SWITCHED,Qt({},n)))}this.fragBufferedComplete(i,s)}onError(t,e){var i;if(e.fatal){this.state=B.ERROR;return}switch(e.details){case $.FRAG_GAP:case $.FRAG_PARSING_ERROR:case $.FRAG_DECRYPT_ERROR:case $.FRAG_LOAD_ERROR:case $.FRAG_LOAD_TIMEOUT:case $.KEY_LOAD_ERROR:case $.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Z.AUDIO,e);break;case $.AUDIO_TRACK_LOAD_ERROR:case $.AUDIO_TRACK_LOAD_TIMEOUT:case $.LEVEL_PARSING_ERROR:!e.levelRetry&&this.state===B.WAITING_TRACK&&((i=e.context)==null?void 0:i.type)===ct.AUDIO_TRACK&&(this.state=B.IDLE);break;case $.BUFFER_FULL_ERROR:if(!e.parent||e.parent!=="audio")return;this.reduceLengthAndFlushBuffer(e)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case $.INTERNAL_EXCEPTION:this.recoverWorkerError(e);break}}onBufferFlushed(t,{type:e}){e===mt.AUDIO&&(this.bufferFlushed=!0,this.state===B.ENDED&&(this.state=B.IDLE))}_handleTransmuxComplete(t){var e;const i="audio",{hls:s}=this,{remuxResult:n,chunkMeta:a}=t,o=this.getCurrentContext(a);if(!o){this.resetWhenMissingContext(a);return}const{frag:l,part:h,level:c}=o,{details:d}=c,{audio:u,text:f,id3:p,initSegment:g}=n;if(this.fragContextChanged(l)||!d){this.fragmentTracker.removeFragment(l);return}if(this.state=B.PARSING,this.switchingTrack&&u&&this.completeAudioSwitch(this.switchingTrack),g!=null&&g.tracks){const v=l.initSegment||l;this._bufferInitSegment(g.tracks,v,a),s.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:v,id:i,tracks:g.tracks})}if(u){const{startPTS:v,endPTS:E,startDTS:A,endDTS:L}=u;h&&(h.elementaryStreams[mt.AUDIO]={startPTS:v,endPTS:E,startDTS:A,endDTS:L}),l.setElementaryStreamInfo(mt.AUDIO,v,E,A,L),this.bufferFragmentData(u,l,h,a)}if(p!=null&&(e=p.samples)!=null&&e.length){const v=xt({id:i,frag:l,details:d},p);s.trigger(m.FRAG_PARSING_METADATA,v)}if(f){const v=xt({id:i,frag:l,details:d},f);s.trigger(m.FRAG_PARSING_USERDATA,v)}}_bufferInitSegment(t,e,i){if(this.state!==B.PARSING)return;t.video&&delete t.video;const s=t.audio;if(!s)return;s.levelCodec=s.codec,s.id="audio",this.log(`Init audio buffer, container:${s.container}, codecs[parsed]=[${s.codec}]`),this.hls.trigger(m.BUFFER_CODECS,t);const n=s.initSegment;if(n!=null&&n.byteLength){const a={type:"audio",frag:e,part:null,chunkMeta:i,parent:e.type,data:n};this.hls.trigger(m.BUFFER_APPENDING,a)}this.tick()}loadFragment(t,e,i){const s=this.fragmentTracker.getState(t);if(this.fragCurrent=t,this.switchingTrack||s===$t.NOT_LOADED||s===$t.PARTIAL){var n;t.sn==="initSegment"?this._loadInitSegment(t,e):(n=e.details)!=null&&n.live&&!this.initPTS[t.cc]?(this.log(`Waiting for video PTS in continuity counter ${t.cc} of live stream before loading audio fragment ${t.sn} of level ${this.trackId}`),this.state=B.WAITING_INIT_PTS):(this.startFragRequested=!0,super.loadFragment(t,e,i))}else this.clearTrackerIfNeeded(t)}completeAudioSwitch(t){const{hls:e,media:i,bufferedTrack:s}=this,n=s==null?void 0:s.attrs,a=t.attrs;i&&n&&(n.CHANNELS!==a.CHANNELS||n.NAME!==a.NAME||n.LANGUAGE!==a.LANGUAGE)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio")),this.bufferedTrack=t,this.switchingTrack=null,e.trigger(m.AUDIO_TRACK_SWITCHED,Qt({},t))}}class Rm extends Un{constructor(t){super(t,"[audio-track-controller]"),this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:t}=this;t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.MANIFEST_PARSED,this.onManifestParsed,this),t.on(m.LEVEL_LOADING,this.onLevelLoading,this),t.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:t}=this;t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.MANIFEST_PARSED,this.onManifestParsed,this),t.off(m.LEVEL_LOADING,this.onLevelLoading,this),t.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(m.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(t,e){this.tracks=e.audioTracks||[]}onAudioTrackLoaded(t,e){const{id:i,groupId:s,details:n}=e,a=this.tracksInGroup[i];if(!a||a.groupId!==s){this.warn(`Track with id:${i} and group:${s} not found in active group ${a.groupId}`);return}const o=a.details;a.details=e.details,this.log(`audio-track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${n.startSN}-${n.endSN}]`),i===this.trackId&&this.playlistLoaded(i,e,o)}onLevelLoading(t,e){this.switchLevel(e.level)}onLevelSwitching(t,e){this.switchLevel(e.level)}switchLevel(t){const e=this.hls.levels[t];if(!(e!=null&&e.audioGroupIds))return;const i=e.audioGroupIds[e.urlId];if(this.groupId!==i){this.groupId=i||null;const s=this.tracks.filter(a=>!i||a.groupId===i);this.selectDefaultTrack&&!s.some(a=>a.default)&&(this.selectDefaultTrack=!1),this.tracksInGroup=s;const n={audioTracks:s};this.log(`Updating audio tracks, ${s.length} track(s) found in group:${i}`),this.hls.trigger(m.AUDIO_TRACKS_UPDATED,n),this.selectInitialTrack()}else this.shouldReloadPlaylist(this.currentTrack)&&this.setAudioTrack(this.trackId)}onError(t,e){e.fatal||!e.context||e.context.type===ct.AUDIO_TRACK&&e.context.id===this.trackId&&e.context.groupId===this.groupId&&(this.requestScheduled=-1,this.checkRetry(e))}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(t){this.selectDefaultTrack=!1,this.setAudioTrack(t)}setAudioTrack(t){const e=this.tracksInGroup;if(t<0||t>=e.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();const i=this.currentTrack;e[this.trackId];const s=e[t],{groupId:n,name:a}=s;if(this.log(`Switching to audio-track ${t} "${a}" lang:${s.lang} group:${n}`),this.trackId=t,this.currentTrack=s,this.selectDefaultTrack=!1,this.hls.trigger(m.AUDIO_TRACK_SWITCHING,Qt({},s)),s.details&&!s.details.live)return;const o=this.switchParams(s.url,i==null?void 0:i.details);this.loadPlaylist(o)}selectInitialTrack(){const t=this.tracksInGroup,e=this.findTrackId(this.currentTrack)|this.findTrackId(null);if(e!==-1)this.setAudioTrack(e);else{const i=new Error(`No track found for running audio group-ID: ${this.groupId} track count: ${t.length}`);this.warn(i.message),this.hls.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:i})}}findTrackId(t){const e=this.tracksInGroup;for(let i=0;i<e.length;i++){const s=e[i];if((!this.selectDefaultTrack||s.default)&&(!t||t.attrs["STABLE-RENDITION-ID"]!==void 0&&t.attrs["STABLE-RENDITION-ID"]===s.attrs["STABLE-RENDITION-ID"]||t.name===s.name&&t.lang===s.lang))return s.id}return-1}loadPlaylist(t){super.loadPlaylist();const e=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(e)){const i=e.id,s=e.groupId;let n=e.url;if(t)try{n=t.addDirectives(n)}catch(a){this.warn(`Could not construct new URL with HLS Delivery Directives: ${a}`)}this.log(`loading audio-track playlist ${i} "${e.name}" lang:${e.lang} group:${s}`),this.clearTimer(),this.hls.trigger(m.AUDIO_TRACK_LOADING,{url:n,id:i,groupId:s,deliveryDirectives:t||null})}}}function Vh(r,t){if(r.length!==t.length)return!1;for(let e=0;e<r.length;e++)if(!_m(r[e].attrs,t[e].attrs))return!1;return!0}function _m(r,t){const e=r["STABLE-RENDITION-ID"];return e?e===t["STABLE-RENDITION-ID"]:!["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED"].some(i=>r[i]!==t[i])}const Kh=500;class km extends Kn{constructor(t,e,i){super(t,e,i,"[subtitle-stream-controller]",Z.SUBTITLE),this.levels=[],this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null}_registerListeners(){const{hls:t}=this;t.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.LEVEL_LOADED,this.onLevelLoaded,this),t.on(m.ERROR,this.onError,this),t.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),t.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:t}=this;t.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.LEVEL_LOADED,this.onLevelLoaded,this),t.off(m.ERROR,this.onError,this),t.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),t.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(m.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(t){this.stopLoad(),this.state=B.IDLE,this.setInterval(Kh),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(t,e){this.mainDetails=e.details}onSubtitleFragProcessed(t,e){const{frag:i,success:s}=e;if(this.fragPrevious=i,this.state=B.IDLE,!s)return;const n=this.tracksBuffered[this.currentTrackId];if(!n)return;let a;const o=i.start;for(let h=0;h<n.length;h++)if(o>=n[h].start&&o<=n[h].end){a=n[h];break}const l=i.start+i.duration;a?a.end=l:(a={start:o,end:l},n.push(a)),this.fragmentTracker.fragBuffered(i)}onBufferFlushing(t,e){const{startOffset:i,endOffset:s}=e;if(i===0&&s!==Number.POSITIVE_INFINITY){const n=s-1;if(n<=0)return;e.endOffsetSubtitles=Math.max(0,n),this.tracksBuffered.forEach(a=>{for(let o=0;o<a.length;){if(a[o].end<=n){a.shift();continue}else if(a[o].start<n)a[o].start=n;else break;o++}}),this.fragmentTracker.removeFragmentsInRange(i,n,Z.SUBTITLE)}}onFragBuffered(t,e){if(!this.loadedmetadata&&e.frag.type===Z.MAIN){var i;(i=this.media)!=null&&i.buffered.length&&(this.loadedmetadata=!0)}}onError(t,e){const i=e.frag;(i==null?void 0:i.type)===Z.SUBTITLE&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==B.STOPPED&&(this.state=B.IDLE))}onSubtitleTracksUpdated(t,{subtitleTracks:e}){if(Vh(this.levels,e)){this.levels=e.map(i=>new ms(i));return}this.tracksBuffered=[],this.levels=e.map(i=>{const s=new ms(i);return this.tracksBuffered[s.id]=[],s}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Z.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(t,e){if(this.currentTrackId=e.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}const i=this.levels[this.currentTrackId];i!=null&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.setInterval(Kh)}onSubtitleTrackLoaded(t,e){var i;const{details:s,id:n}=e,{currentTrackId:a,levels:o}=this;if(!o.length)return;const l=o[a];if(n>=o.length||n!==a||!l)return;this.mediaBuffer=this.mediaBufferTimeRanges;let h=0;if(s.live||(i=l.details)!=null&&i.live){const c=this.mainDetails;if(s.deltaUpdateFailed||!c)return;const d=c.fragments[0];l.details?(h=this.alignPlaylists(s,l.details),h===0&&d&&(h=d.start,Mn(s,h))):s.hasProgramDateTime&&c.hasProgramDateTime?(Eh(s,c),h=s.fragments[0].start):d&&(h=d.start,Mn(s,h))}l.details=s,this.levelLastLoaded=n,!this.startFragRequested&&(this.mainDetails||!s.live)&&this.setStartPosition(l.details,h),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===B.IDLE&&(vs(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),l.details=void 0))}_handleFragmentLoadComplete(t){const{frag:e,payload:i}=t,s=e.decryptdata,n=this.hls;if(!this.fragContextChanged(e)&&i&&i.byteLength>0&&s&&s.key&&s.iv&&s.method==="AES-128"){const a=performance.now();this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch(o=>{throw n.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.FRAG_DECRYPT_ERROR,fatal:!1,error:o,reason:o.message,frag:e}),o}).then(o=>{const l=performance.now();n.trigger(m.FRAG_DECRYPTED,{frag:e,payload:o,stats:{tstart:a,tdecrypt:l}})}).catch(o=>{this.warn(`${o.name}: ${o.message}`),this.state=B.IDLE})}}doTick(){if(!this.media){this.state=B.IDLE;return}if(this.state===B.IDLE){const{currentTrackId:t,levels:e}=this,i=e[t];if(!e.length||!i||!i.details)return;const{config:s}=this,n=this.getLoadPosition(),a=Et.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],n,s.maxBufferHole),{end:o,len:l}=a,h=this.getFwdBufferInfo(this.media,Z.MAIN),c=i.details,d=this.getMaxBufferLength(h==null?void 0:h.len)+c.levelTargetDuration;if(l>d)return;const u=c.fragments,f=u.length,p=c.edge;let g=null;const v=this.fragPrevious;if(o<p){const E=s.maxFragLookUpTolerance,A=o>p-E?0:E;g=vs(v,u,Math.max(u[0].start,o),A),!g&&v&&v.start<u[0].start&&(g=u[0])}else g=u[f-1];if(!g)return;if(g=this.mapToInitFragWhenRequired(g),g.sn!=="initSegment"){const E=g.sn-c.startSN,A=u[E-1];A&&A.cc===g.cc&&this.fragmentTracker.getState(A)===$t.NOT_LOADED&&(g=A)}this.fragmentTracker.getState(g)===$t.NOT_LOADED&&this.loadFragment(g,i,o)}}getMaxBufferLength(t){const e=super.getMaxBufferLength();return t?Math.max(e,t):e}loadFragment(t,e,i){this.fragCurrent=t,t.sn==="initSegment"?this._loadInitSegment(t,e):(this.startFragRequested=!0,super.loadFragment(t,e,i))}get mediaBufferTimeRanges(){return new Im(this.tracksBuffered[this.currentTrackId]||[])}}class Im{constructor(t){this.buffered=void 0;const e=(i,s,n)=>{if(s=s>>>0,s>n-1)throw new DOMException(`Failed to execute '${i}' on 'TimeRanges': The index provided (${s}) is greater than the maximum bound (${n})`);return t[s][i]};this.buffered={get length(){return t.length},end(i){return e("end",i,t.length)},start(i){return e("start",i,t.length)}}}}class Dm extends Un{constructor(t){super(t,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.trackChangeListener=()=>this.onTextTracksChanged(),this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(t){this._subtitleDisplay=t,this.trackId>-1&&this.toggleTrackModes(this.trackId)}registerListeners(){const{hls:t}=this;t.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.MANIFEST_PARSED,this.onManifestParsed,this),t.on(m.LEVEL_LOADING,this.onLevelLoading,this),t.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:t}=this;t.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.MANIFEST_PARSED,this.onManifestParsed,this),t.off(m.LEVEL_LOADING,this.onLevelLoading,this),t.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(m.ERROR,this.onError,this)}onMediaAttached(t,e){this.media=e.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)}onMediaDetaching(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),ia(this.media.textTracks).forEach(t=>{Ri(t)}),this.subtitleTrack=-1,this.media=null)}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(t,e){this.tracks=e.subtitleTracks}onSubtitleTrackLoaded(t,e){const{id:i,details:s}=e,{trackId:n}=this,a=this.tracksInGroup[n];if(!a){this.warn(`Invalid subtitle track id ${i}`);return}const o=a.details;a.details=e.details,this.log(`subtitle track ${i} loaded [${s.startSN}-${s.endSN}]`),i===this.trackId&&this.playlistLoaded(i,e,o)}onLevelLoading(t,e){this.switchLevel(e.level)}onLevelSwitching(t,e){this.switchLevel(e.level)}switchLevel(t){const e=this.hls.levels[t];if(!(e!=null&&e.textGroupIds))return;const i=e.textGroupIds[e.urlId],s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;if(this.groupId!==i){const n=this.tracks.filter(l=>!i||l.groupId===i);this.tracksInGroup=n;const a=this.findTrackId(s==null?void 0:s.name)||this.findTrackId();this.groupId=i||null;const o={subtitleTracks:n};this.log(`Updating subtitle tracks, ${n.length} track(s) found in "${i}" group-id`),this.hls.trigger(m.SUBTITLE_TRACKS_UPDATED,o),a!==-1&&this.setSubtitleTrack(a,s)}else this.shouldReloadPlaylist(s)&&this.setSubtitleTrack(this.trackId,s)}findTrackId(t){const e=this.tracksInGroup;for(let i=0;i<e.length;i++){const s=e[i];if((!this.selectDefaultTrack||s.default)&&(!t||t===s.name))return s.id}return-1}onError(t,e){e.fatal||!e.context||e.context.type===ct.SUBTITLE_TRACK&&e.context.id===this.trackId&&e.context.groupId===this.groupId&&this.checkRetry(e)}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(t){this.selectDefaultTrack=!1;const e=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(t,e)}loadPlaylist(t){super.loadPlaylist();const e=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(e)){const i=e.id,s=e.groupId;let n=e.url;if(t)try{n=t.addDirectives(n)}catch(a){this.warn(`Could not construct new URL with HLS Delivery Directives: ${a}`)}this.log(`Loading subtitle playlist for id ${i}`),this.hls.trigger(m.SUBTITLE_TRACK_LOADING,{url:n,id:i,groupId:s,deliveryDirectives:t||null})}}toggleTrackModes(t){const{media:e,trackId:i}=this;if(!e)return;const s=ia(e.textTracks),n=s.filter(o=>o.groupId===this.groupId);if(t===-1)[].slice.call(s).forEach(o=>{o.mode="disabled"});else{const o=n[i];o&&(o.mode="disabled")}const a=n[t];a&&(a.mode=this.subtitleDisplay?"showing":"hidden")}setSubtitleTrack(t,e){var i;const s=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=t;return}if(this.trackId!==t&&this.toggleTrackModes(t),this.trackId===t&&(t===-1||(i=s[t])!=null&&i.details)||t<-1||t>=s.length)return;this.clearTimer();const n=s[t];if(this.log(`Switching to subtitle-track ${t}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:"")),this.trackId=t,n){const{id:a,groupId:o="",name:l,type:h,url:c}=n;this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:l,type:h,url:c});const d=this.switchParams(n.url,e==null?void 0:e.details);this.loadPlaylist(d)}else this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:t})}onTextTracksChanged(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=-1;const e=ia(this.media.textTracks);for(let i=0;i<e.length;i++)if(e[i].mode==="hidden")t=i;else if(e[i].mode==="showing"){t=i;break}this.subtitleTrack!==t&&(this.subtitleTrack=t)}}function ia(r){const t=[];for(let e=0;e<r.length;e++){const i=r[e];(i.kind==="subtitles"||i.kind==="captions")&&i.label&&t.push(r[e])}return t}class Cm{constructor(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}append(t,e){const i=this.queues[e];i.push(t),i.length===1&&this.buffers[e]&&this.executeNext(e)}insertAbort(t,e){this.queues[e].unshift(t),this.executeNext(e)}appendBlocker(t){let e;const i=new Promise(n=>{e=n}),s={execute:e,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,t),i}executeNext(t){const{buffers:e,queues:i}=this,s=e[t],n=i[t];if(n.length){const a=n[0];try{a.execute()}catch(o){_.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(o),s!=null&&s.updating||(n.shift(),this.executeNext(t))}}}shiftAndExecuteNext(t){this.queues[t].shift(),this.executeNext(t)}current(t){return this.queues[t][0]}}const jh=nr(),Wh=/([ha]vc.)(?:\.[^.,]+)+/;class xm{constructor(t){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=()=>{const{media:e,mediaSource:i}=this;_.log("[buffer-controller]: Media source opened"),e&&(e.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(m.MEDIA_ATTACHED,{media:e})),i&&i.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{_.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=()=>{_.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=()=>{const{media:e,_objectUrl:i}=this;e&&e.src!==i&&_.error(`Media element src was set while attaching MediaSource (${i} > ${e.src})`)},this.hls=t,this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null}registerListeners(){const{hls:t}=this;t.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.MANIFEST_PARSED,this.onManifestParsed,this),t.on(m.BUFFER_RESET,this.onBufferReset,this),t.on(m.BUFFER_APPENDING,this.onBufferAppending,this),t.on(m.BUFFER_CODECS,this.onBufferCodecs,this),t.on(m.BUFFER_EOS,this.onBufferEos,this),t.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(m.FRAG_PARSED,this.onFragParsed,this),t.on(m.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:t}=this;t.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.MANIFEST_PARSED,this.onManifestParsed,this),t.off(m.BUFFER_RESET,this.onBufferReset,this),t.off(m.BUFFER_APPENDING,this.onBufferAppending,this),t.off(m.BUFFER_CODECS,this.onBufferCodecs,this),t.off(m.BUFFER_EOS,this.onBufferEos,this),t.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(m.FRAG_PARSED,this.onFragParsed,this),t.off(m.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new Cm(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(t,e){let i=2;(e.audio&&!e.video||!e.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,_.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(t,e){const i=this.media=e.media;if(i&&jh){const s=this.mediaSource=new jh;s.addEventListener("sourceopen",this._onMediaSourceOpen),s.addEventListener("sourceended",this._onMediaSourceEnded),s.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(s),this._objectUrl=i.src,i.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:t,mediaSource:e,_objectUrl:i}=this;if(e){if(_.log("[buffer-controller]: media source detaching"),e.readyState==="open")try{e.endOfStream()}catch(s){_.warn(`[buffer-controller]: onMediaDetaching: ${s.message} while calling endOfStream`)}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(t.removeEventListener("emptied",this._onMediaEmptied),i&&self.URL.revokeObjectURL(i),t.src===i?(t.removeAttribute("src"),t.load()):_.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(m.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(t=>{const e=this.sourceBuffer[t];try{e&&(this.removeBufferListeners(t),this.mediaSource&&this.mediaSource.removeSourceBuffer(e),this.sourceBuffer[t]=void 0)}catch(i){_.warn(`[buffer-controller]: Failed to reset the ${t} buffer`,i)}}),this._initSourceBuffer()}onBufferCodecs(t,e){const i=this.getSourceBufferTypes().length;Object.keys(e).forEach(s=>{if(i){const n=this.tracks[s];if(n&&typeof n.buffer.changeType=="function"){const{id:a,codec:o,levelCodec:l,container:h,metadata:c}=e[s],d=(n.levelCodec||n.codec).replace(Wh,"$1"),u=(l||o).replace(Wh,"$1");if(d!==u){const f=`${h};codecs=${l||o}`;this.appendChangeType(s,f),_.log(`[buffer-controller]: switching codec ${d} to ${u}`),this.tracks[s]={buffer:n.buffer,codec:o,container:h,levelCodec:l,metadata:c,id:a}}}}else this.pendingTracks[s]=e[s]}),!i&&(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks())}appendChangeType(t,e){const{operationQueue:i}=this,s={execute:()=>{const n=this.sourceBuffer[t];n&&(_.log(`[buffer-controller]: changing ${t} sourceBuffer type to ${e}`),n.changeType(e)),i.shiftAndExecuteNext(t)},onStart:()=>{},onComplete:()=>{},onError:n=>{_.warn(`[buffer-controller]: Failed to change ${t} SourceBuffer type`,n)}};i.append(s,t)}onBufferAppending(t,e){const{hls:i,operationQueue:s,tracks:n}=this,{data:a,type:o,frag:l,part:h,chunkMeta:c}=e,d=c.buffering[o],u=self.performance.now();d.start=u;const f=l.stats.buffering,p=h?h.stats.buffering:null;f.start===0&&(f.start=u),p&&p.start===0&&(p.start=u);const g=n.audio;let v=!1;o==="audio"&&(g==null?void 0:g.container)==="audio/mpeg"&&(v=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const E=l.start,A={execute:()=>{if(d.executeStart=self.performance.now(),v){const L=this.sourceBuffer[o];if(L){const y=E-L.timestampOffset;Math.abs(y)>=.1&&(_.log(`[buffer-controller]: Updating audio SourceBuffer timestampOffset to ${E} (delta: ${y}) sn: ${l.sn})`),L.timestampOffset=E)}}this.appendExecutor(a,o)},onStart:()=>{},onComplete:()=>{const L=self.performance.now();d.executeEnd=d.end=L,f.first===0&&(f.first=L),p&&p.first===0&&(p.first=L);const{sourceBuffer:y}=this,S={};for(const R in y)S[R]=Et.getBuffered(y[R]);this.appendError=0,this.hls.trigger(m.BUFFER_APPENDED,{type:o,frag:l,part:h,chunkMeta:c,parent:l.type,timeRanges:S})},onError:L=>{_.error(`[buffer-controller]: Error encountered while trying to append to the ${o} SourceBuffer`,L);const y={type:Q.MEDIA_ERROR,parent:l.type,details:$.BUFFER_APPEND_ERROR,frag:l,part:h,chunkMeta:c,error:L,err:L,fatal:!1};L.code===DOMException.QUOTA_EXCEEDED_ERR?y.details=$.BUFFER_FULL_ERROR:(this.appendError++,y.details=$.BUFFER_APPEND_ERROR,this.appendError>i.config.appendErrorMaxRetry&&(_.error(`[buffer-controller]: Failed ${i.config.appendErrorMaxRetry} times to append segment in sourceBuffer`),y.fatal=!0)),i.trigger(m.ERROR,y)}};s.append(A,o)}onBufferFlushing(t,e){const{operationQueue:i}=this,s=n=>({execute:this.removeExecutor.bind(this,n,e.startOffset,e.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(m.BUFFER_FLUSHED,{type:n})},onError:a=>{_.warn(`[buffer-controller]: Failed to remove from ${n} SourceBuffer`,a)}});e.type?i.append(s(e.type),e.type):this.getSourceBufferTypes().forEach(n=>{i.append(s(n),n)})}onFragParsed(t,e){const{frag:i,part:s}=e,n=[],a=s?s.elementaryStreams:i.elementaryStreams;a[mt.AUDIOVIDEO]?n.push("audiovideo"):(a[mt.AUDIO]&&n.push("audio"),a[mt.VIDEO]&&n.push("video"));const o=()=>{const l=self.performance.now();i.stats.buffering.end=l,s&&(s.stats.buffering.end=l);const h=s?s.stats:i.stats;this.hls.trigger(m.FRAG_BUFFERED,{frag:i,part:s,stats:h,id:i.type})};n.length===0&&_.warn(`Fragments must have at least one ElementaryStreamType set. type: ${i.type} level: ${i.level} sn: ${i.sn}`),this.blockBuffers(o,n)}onFragChanged(t,e){this.flushBackBuffer()}onBufferEos(t,e){this.getSourceBufferTypes().reduce((i,s)=>{const n=this.sourceBuffer[s];return n&&(!e.type||e.type===s)&&(n.ending=!0,n.ended||(n.ended=!0,_.log(`[buffer-controller]: ${s} sourceBuffer now EOS`))),i&&!!(!n||n.ended)},!0)&&(_.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(s=>{const n=this.sourceBuffer[s];n&&(n.ending=!1)});const{mediaSource:i}=this;if(!i||i.readyState!=="open"){i&&_.info(`[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: ${i.readyState}`);return}_.log("[buffer-controller]: Calling mediaSource.endOfStream()"),i.endOfStream()}))}onLevelUpdated(t,{details:e}){e.fragments.length&&(this.details=e,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}flushBackBuffer(){const{hls:t,details:e,media:i,sourceBuffer:s}=this;if(!i||e===null)return;const n=this.getSourceBufferTypes();if(!n.length)return;const a=e.live&&t.config.liveBackBufferLength!==null?t.config.liveBackBufferLength:t.config.backBufferLength;if(!z(a)||a<0)return;const o=i.currentTime,l=e.levelTargetDuration,h=Math.max(a,l),c=Math.floor(o/l)*l-h;n.forEach(d=>{const u=s[d];if(u){const f=Et.getBuffered(u);if(f.length>0&&c>f.start(0)){if(t.trigger(m.BACK_BUFFER_REACHED,{bufferEnd:c}),e.live)t.trigger(m.LIVE_BACK_BUFFER_REACHED,{bufferEnd:c});else if(u.ended&&f.end(f.length-1)-o<l*2){_.info(`[buffer-controller]: Cannot flush ${d} back buffer while SourceBuffer is in ended state`);return}t.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:c,type:d})}}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:t,hls:e,media:i,mediaSource:s}=this,n=t.fragments[0].start+t.totalduration,a=i.duration,o=z(s.duration)?s.duration:0;t.live&&e.config.liveDurationInfinity?(_.log("[buffer-controller]: Media Source duration is set to Infinity"),s.duration=1/0,this.updateSeekableRange(t)):(n>o&&n>a||!z(a))&&(_.log(`[buffer-controller]: Updating Media Source duration to ${n.toFixed(3)}`),s.duration=n)}updateSeekableRange(t){const e=this.mediaSource,i=t.fragments;if(i.length&&t.live&&e!=null&&e.setLiveSeekableRange){const s=Math.max(0,i[0].start),n=Math.max(s,s+t.totalduration);e.setLiveSeekableRange(s,n)}}checkPendingTracks(){const{bufferCodecEventsExpected:t,operationQueue:e,pendingTracks:i}=this,s=Object.keys(i).length;if(s&&!t||s===2){this.createSourceBuffers(i),this.pendingTracks={};const n=this.getSourceBufferTypes();if(n.length)this.hls.trigger(m.BUFFER_CREATED,{tracks:this.tracks}),n.forEach(a=>{e.executeNext(a)});else{const a=new Error("could not create source buffer for media codec(s)");this.hls.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:a,reason:a.message})}}}createSourceBuffers(t){const{sourceBuffer:e,mediaSource:i}=this;if(!i)throw Error("createSourceBuffers called when mediaSource was null");for(const s in t)if(!e[s]){const n=t[s];if(!n)throw Error(`source buffer exists for track ${s}, however track does not`);const a=n.levelCodec||n.codec,o=`${n.container};codecs=${a}`;_.log(`[buffer-controller]: creating sourceBuffer(${o})`);try{const l=e[s]=i.addSourceBuffer(o),h=s;this.addBufferListener(h,"updatestart",this._onSBUpdateStart),this.addBufferListener(h,"updateend",this._onSBUpdateEnd),this.addBufferListener(h,"error",this._onSBUpdateError),this.tracks[s]={buffer:l,codec:a,container:n.container,levelCodec:n.levelCodec,metadata:n.metadata,id:n.id}}catch(l){_.error(`[buffer-controller]: error while trying to add sourceBuffer: ${l.message}`),this.hls.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:o})}}}_onSBUpdateStart(t){const{operationQueue:e}=this;e.current(t).onStart()}_onSBUpdateEnd(t){const{operationQueue:e}=this;e.current(t).onComplete(),e.shiftAndExecuteNext(t)}_onSBUpdateError(t,e){const i=new Error(`${t} SourceBuffer error`);_.error(`[buffer-controller]: ${i}`,e),this.hls.trigger(m.ERROR,{type:Q.MEDIA_ERROR,details:$.BUFFER_APPENDING_ERROR,error:i,fatal:!1});const s=this.operationQueue.current(t);s&&s.onError(e)}removeExecutor(t,e,i){const{media:s,mediaSource:n,operationQueue:a,sourceBuffer:o}=this,l=o[t];if(!s||!n||!l){_.warn(`[buffer-controller]: Attempting to remove from the ${t} SourceBuffer, but it does not exist`),a.shiftAndExecuteNext(t);return}const h=z(s.duration)?s.duration:1/0,c=z(n.duration)?n.duration:1/0,d=Math.max(0,e),u=Math.min(i,h,c);u>d&&!l.ending?(l.ended=!1,_.log(`[buffer-controller]: Removing [${d},${u}] from the ${t} SourceBuffer`),l.remove(d,u)):a.shiftAndExecuteNext(t)}appendExecutor(t,e){const{operationQueue:i,sourceBuffer:s}=this,n=s[e];if(!n){_.warn(`[buffer-controller]: Attempting to append to the ${e} SourceBuffer, but it does not exist`),i.shiftAndExecuteNext(e);return}n.ended=!1,n.appendBuffer(t)}blockBuffers(t,e=this.getSourceBufferTypes()){if(!e.length){_.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(t);return}const{operationQueue:i}=this,s=e.map(n=>i.appendBlocker(n));Promise.all(s).then(()=>{t(),e.forEach(n=>{const a=this.sourceBuffer[n];a!=null&&a.updating||i.shiftAndExecuteNext(n)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(t,e,i){const s=this.sourceBuffer[t];if(!s)return;const n=i.bind(this,t);this.listeners[t].push({event:e,listener:n}),s.addEventListener(e,n)}removeBufferListeners(t){const e=this.sourceBuffer[t];e&&this.listeners[t].forEach(i=>{e.removeEventListener(i.event,i.listener)})}}const Yh={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},qh=function(r){let t=r;return Yh.hasOwnProperty(r)&&(t=Yh[r]),String.fromCharCode(t)},me=15,Ne=100,Pm={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Om={17:2,18:4,21:6,22:8,23:10,19:13,20:15},$m={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Mm={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Fm=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Nm{constructor(){this.time=null,this.verboseLevel=0}log(t,e){if(this.verboseLevel>=t){const i=typeof e=="function"?e():e;_.log(`${this.time} [${t}] ${i}`)}}}const ci=function(r){const t=[];for(let e=0;e<r.length;e++)t.push(r[e].toString(16));return t};class zh{constructor(t,e,i,s,n){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=t||"white",this.underline=e||!1,this.italics=i||!1,this.background=s||"black",this.flash=n||!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(t){const e=["foreground","underline","italics","background","flash"];for(let i=0;i<e.length;i++){const s=e[i];t.hasOwnProperty(s)&&(this[s]=t[s])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash}copy(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Um{constructor(t,e,i,s,n,a){this.uchar=void 0,this.penState=void 0,this.uchar=t||" ",this.penState=new zh(e,i,s,n,a)}reset(){this.uchar=" ",this.penState.reset()}setChar(t,e){this.uchar=t,this.penState.copy(e)}setPenState(t){this.penState.copy(t)}equals(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)}copy(t){this.uchar=t.uchar,this.penState.copy(t.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class Bm{constructor(t){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(let e=0;e<Ne;e++)this.chars.push(new Um);this.logger=t,this.pos=0,this.currPenState=new zh}equals(t){let e=!0;for(let i=0;i<Ne;i++)if(!this.chars[i].equals(t.chars[i])){e=!1;break}return e}copy(t){for(let e=0;e<Ne;e++)this.chars[e].copy(t.chars[e])}isEmpty(){let t=!0;for(let e=0;e<Ne;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t}setCursor(t){this.pos!==t&&(this.pos=t),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Ne&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ne)}moveCursor(t){const e=this.pos+t;if(t>1)for(let i=this.pos+1;i<e+1;i++)this.chars[i].setPenState(this.currPenState);this.setCursor(e)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(t){t>=144&&this.backSpace();const e=qh(t);if(this.pos>=Ne){this.logger.log(0,()=>"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1)}clearFromPos(t){let e;for(e=t;e<Ne;e++)this.chars[e].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const t=[];let e=!0;for(let i=0;i<Ne;i++){const s=this.chars[i].uchar;s!==" "&&(e=!1),t.push(s)}return e?"":t.join("")}setPenStyles(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)}}class sa{constructor(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(let e=0;e<me;e++)this.rows.push(new Bm(t));this.logger=t,this.currRow=me-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}reset(){for(let t=0;t<me;t++)this.rows[t].clear();this.currRow=me-1}equals(t){let e=!0;for(let i=0;i<me;i++)if(!this.rows[i].equals(t.rows[i])){e=!1;break}return e}copy(t){for(let e=0;e<me;e++)this.rows[e].copy(t.rows[e])}isEmpty(){let t=!0;for(let e=0;e<me;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(t){this.rows[this.currRow].insertChar(t)}setPen(t){this.rows[this.currRow].setPenStyles(t)}moveCursor(t){this.rows[this.currRow].moveCursor(t)}setCursor(t){this.logger.log(2,"setCursor: "+t),this.rows[this.currRow].setCursor(t)}setPAC(t){this.logger.log(2,()=>"pacData = "+JSON.stringify(t));let e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(let o=0;o<me;o++)this.rows[o].clear();const n=this.currRow+1-this.nrRollUpRows,a=this.lastOutputScreen;if(a){const o=a.rows[n].cueStartTime,l=this.logger.time;if(o&&l!==null&&o<l)for(let h=0;h<this.nrRollUpRows;h++)this.rows[e-this.nrRollUpRows+h+1].copy(a.rows[n+h])}}this.currRow=e;const i=this.rows[this.currRow];if(t.indent!==null){const n=t.indent,a=Math.max(n-1,0);i.setCursor(t.indent),t.color=i.chars[a].penState.foreground}const s={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(s)}setBkgData(t){this.logger.log(2,()=>"bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)}setRollUpRows(t){this.nrRollUpRows=t}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),this.logger.log(2,"Rolling up")}getDisplayText(t){t=t||!1;const e=[];let i="",s=-1;for(let n=0;n<me;n++){const a=this.rows[n].getTextString();a&&(s=n+1,t?e.push("Row "+s+": '"+a+"'"):e.push(a.trim()))}return e.length>0&&(t?i="["+e.join(" | ")+"]":i=e.join(`
|
178
|
+
`)),i}getTextAndFormat(){return this.rows}}class Xh{constructor(t,e,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new sa(i),this.nonDisplayedMemory=new sa(i),this.lastOutputScreen=new sa(i),this.currRollUpRow=this.displayedMemory.rows[me-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[me-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(t){this.outputFilter=t}setPAC(t){this.writeScreen.setPAC(t)}setBkgData(t){this.writeScreen.setBkgData(t)}setMode(t){t!==this.mode&&(this.mode=t,this.logger.log(2,()=>"MODE="+t),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)}insertChars(t){for(let i=0;i<t.length;i++)this.writeScreen.insertChar(t[i]);const e=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>e+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(t){this.logger.log(2,"RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(t){this.logger.log(2,"TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)}ccMIDROW(t){const e={flash:!1};if(e.underline=t%2===1,e.italics=t>=46,e.italics)e.foreground="white";else{const i=Math.floor(t/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=s[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)}outputDataUpdate(t=!1){const e=this.logger.time;e!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=e:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))}}class Qh{constructor(t,e,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;const s=new Nm;this.channels=[null,new Xh(t,e,s),new Xh(t+1,i,s)],this.cmdHistory=Jh(),this.logger=s}getHandler(t){return this.channels[t].getHandler()}setHandler(t,e){this.channels[t].setHandler(e)}addData(t,e){let i,s,n,a=!1;this.logger.time=t;for(let o=0;o<e.length;o+=2)if(s=e[o]&127,n=e[o+1]&127,!(s===0&&n===0)){if(this.logger.log(3,"["+ci([e[o],e[o+1]])+"] -> ("+ci([s,n])+")"),i=this.parseCmd(s,n),i||(i=this.parseMidrow(s,n)),i||(i=this.parsePAC(s,n)),i||(i=this.parseBackgroundAttributes(s,n)),!i&&(a=this.parseChars(s,n),a)){const l=this.currentChannel;l&&l>0?this.channels[l].insertChars(a):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!i&&!a&&this.logger.log(2,"Couldn't parse cleaned data "+ci([s,n])+" orig: "+ci([e[o],e[o+1]]))}}parseCmd(t,e){const{cmdHistory:i}=this,s=(t===20||t===28||t===21||t===29)&&e>=32&&e<=47,n=(t===23||t===31)&&e>=33&&e<=35;if(!(s||n))return!1;if(Zh(t,e,i))return Di(null,null,i),this.logger.log(3,"Repeated command ("+ci([t,e])+") is dropped"),!0;const a=t===20||t===21||t===23?1:2,o=this.channels[a];return t===20||t===21||t===28||t===29?e===32?o.ccRCL():e===33?o.ccBS():e===34?o.ccAOF():e===35?o.ccAON():e===36?o.ccDER():e===37?o.ccRU(2):e===38?o.ccRU(3):e===39?o.ccRU(4):e===40?o.ccFON():e===41?o.ccRDC():e===42?o.ccTR():e===43?o.ccRTD():e===44?o.ccEDM():e===45?o.ccCR():e===46?o.ccENM():e===47&&o.ccEOC():o.ccTO(e-32),Di(t,e,i),this.currentChannel=a,!0}parseMidrow(t,e){let i=0;if((t===17||t===25)&&e>=32&&e<=47){if(t===17?i=1:i=2,i!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[i];return s?(s.ccMIDROW(e),this.logger.log(3,"MIDROW ("+ci([t,e])+")"),!0):!1}return!1}parsePAC(t,e){let i;const s=this.cmdHistory,n=(t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127,a=(t===16||t===24)&&e>=64&&e<=95;if(!(n||a))return!1;if(Zh(t,e,s))return Di(null,null,s),!0;const o=t<=23?1:2;e>=64&&e<=95?i=o===1?Pm[t]:$m[t]:i=o===1?Om[t]:Mm[t];const l=this.channels[o];return l?(l.setPAC(this.interpretPAC(i,e)),Di(t,e,s),this.currentChannel=o,!0):!1}interpretPAC(t,e){let i;const s={color:null,italics:!1,indent:null,underline:!1,row:t};return e>95?i=e-96:i=e-64,s.underline=(i&1)===1,i<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(s.italics=!0,s.color="white"):s.indent=Math.floor((i-16)/2)*4,s}parseChars(t,e){let i,s=null,n=null;if(t>=25?(i=2,n=t-8):(i=1,n=t),n>=17&&n<=19){let a;n===17?a=e+80:n===18?a=e+112:a=e+144,this.logger.log(2,"Special char '"+qh(a)+"' in channel "+i),s=[a]}else t>=32&&t<=127&&(s=e===0?[t]:[t,e]);if(s){const a=ci(s);this.logger.log(3,"Char codes = "+a.join(",")),Di(t,e,this.cmdHistory)}return s}parseBackgroundAttributes(t,e){const i=(t===16||t===24)&&e>=32&&e<=47,s=(t===23||t===31)&&e>=45&&e<=47;if(!(i||s))return!1;let n;const a={};t===16||t===24?(n=Math.floor((e-32)/2),a.background=Fm[n],e%2===1&&(a.background=a.background+"_semi")):e===45?a.background="transparent":(a.foreground="black",e===47&&(a.underline=!0));const o=t<=23?1:2;return this.channels[o].setBkgData(a),Di(t,e,this.cmdHistory),!0}reset(){for(let t=0;t<Object.keys(this.channels).length;t++){const e=this.channels[t];e&&e.reset()}this.cmdHistory=Jh()}cueSplitAtTime(t){for(let e=0;e<this.channels.length;e++){const i=this.channels[e];i&&i.cueSplitAtTime(t)}}}function Di(r,t,e){e.a=r,e.b=t}function Zh(r,t,e){return e.a===r&&e.b===t}function Jh(){return{a:null,b:null}}class vr{constructor(t,e){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=t,this.trackName=e}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(t,e,i){(this.startTime===null||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var ra=function(){if(typeof self<"u"&&self.VTTCue)return self.VTTCue;const r=["","lr","rl"],t=["start","middle","end","left","right"];function e(o,l){if(typeof l!="string"||!Array.isArray(o))return!1;const h=l.toLowerCase();return~o.indexOf(h)?h:!1}function i(o){return e(r,o)}function s(o){return e(t,o)}function n(o,...l){let h=1;for(;h<arguments.length;h++){const c=arguments[h];for(const d in c)o[d]=c[d]}return o}function a(o,l,h){const c=this,d={enumerable:!0};c.hasBeenReset=!1;let u="",f=!1,p=o,g=l,v=h,E=null,A="",L=!0,y="auto",S="start",R=50,D="middle",M=50,C="middle";Object.defineProperty(c,"id",n({},d,{get:function(){return u},set:function(I){u=""+I}})),Object.defineProperty(c,"pauseOnExit",n({},d,{get:function(){return f},set:function(I){f=!!I}})),Object.defineProperty(c,"startTime",n({},d,{get:function(){return p},set:function(I){if(typeof I!="number")throw new TypeError("Start time must be set to a number.");p=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"endTime",n({},d,{get:function(){return g},set:function(I){if(typeof I!="number")throw new TypeError("End time must be set to a number.");g=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"text",n({},d,{get:function(){return v},set:function(I){v=""+I,this.hasBeenReset=!0}})),Object.defineProperty(c,"region",n({},d,{get:function(){return E},set:function(I){E=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"vertical",n({},d,{get:function(){return A},set:function(I){const G=i(I);if(G===!1)throw new SyntaxError("An invalid or illegal string was specified.");A=G,this.hasBeenReset=!0}})),Object.defineProperty(c,"snapToLines",n({},d,{get:function(){return L},set:function(I){L=!!I,this.hasBeenReset=!0}})),Object.defineProperty(c,"line",n({},d,{get:function(){return y},set:function(I){if(typeof I!="number"&&I!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");y=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"lineAlign",n({},d,{get:function(){return S},set:function(I){const G=s(I);if(!G)throw new SyntaxError("An invalid or illegal string was specified.");S=G,this.hasBeenReset=!0}})),Object.defineProperty(c,"position",n({},d,{get:function(){return R},set:function(I){if(I<0||I>100)throw new Error("Position must be between 0 and 100.");R=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"positionAlign",n({},d,{get:function(){return D},set:function(I){const G=s(I);if(!G)throw new SyntaxError("An invalid or illegal string was specified.");D=G,this.hasBeenReset=!0}})),Object.defineProperty(c,"size",n({},d,{get:function(){return M},set:function(I){if(I<0||I>100)throw new Error("Size must be between 0 and 100.");M=I,this.hasBeenReset=!0}})),Object.defineProperty(c,"align",n({},d,{get:function(){return C},set:function(I){const G=s(I);if(!G)throw new SyntaxError("An invalid or illegal string was specified.");C=G,this.hasBeenReset=!0}})),c.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class Hm{decode(t,e){if(!t)return"";if(typeof t!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}function tc(r){function t(i,s,n,a){return(i|0)*3600+(s|0)*60+(n|0)+parseFloat(a||0)}const e=r.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return e?parseFloat(e[2])>59?t(e[2],e[3],0,e[4]):t(e[1],e[2],e[3],e[4]):null}class Gm{constructor(){this.values=Object.create(null)}set(t,e){!this.get(t)&&e!==""&&(this.values[t]=e)}get(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e}has(t){return t in this.values}alt(t,e,i){for(let s=0;s<i.length;++s)if(e===i[s]){this.set(t,e);break}}integer(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))}percent(t,e){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(e)){const i=parseFloat(e);if(i>=0&&i<=100)return this.set(t,i),!0}return!1}}function ec(r,t,e,i){const s=i?r.split(i):[r];for(const n in s){if(typeof s[n]!="string")continue;const a=s[n].split(e);if(a.length!==2)continue;const o=a[0],l=a[1];t(o,l)}}const na=new ra(0,0,""),yr=na.align==="middle"?"middle":"center";function Vm(r,t,e){const i=r;function s(){const o=tc(r);if(o===null)throw new Error("Malformed timestamp: "+i);return r=r.replace(/^[^\sa-zA-Z-]+/,""),o}function n(o,l){const h=new Gm;ec(o,function(u,f){let p;switch(u){case"region":for(let g=e.length-1;g>=0;g--)if(e[g].id===f){h.set(u,e[g].region);break}break;case"vertical":h.alt(u,f,["rl","lr"]);break;case"line":p=f.split(","),h.integer(u,p[0]),h.percent(u,p[0])&&h.set("snapToLines",!1),h.alt(u,p[0],["auto"]),p.length===2&&h.alt("lineAlign",p[1],["start",yr,"end"]);break;case"position":p=f.split(","),h.percent(u,p[0]),p.length===2&&h.alt("positionAlign",p[1],["start",yr,"end","line-left","line-right","auto"]);break;case"size":h.percent(u,f);break;case"align":h.alt(u,f,["start",yr,"end","left","right"]);break}},/:/,/\s/),l.region=h.get("region",null),l.vertical=h.get("vertical","");let c=h.get("line","auto");c==="auto"&&na.line===-1&&(c=-1),l.line=c,l.lineAlign=h.get("lineAlign","start"),l.snapToLines=h.get("snapToLines",!0),l.size=h.get("size",100),l.align=h.get("align",yr);let d=h.get("position","auto");d==="auto"&&na.position===50&&(d=l.align==="start"||l.align==="left"?0:l.align==="end"||l.align==="right"?100:50),l.position=d}function a(){r=r.replace(/^\s+/,"")}if(a(),t.startTime=s(),a(),r.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);r=r.slice(3),a(),t.endTime=s(),a(),n(r,t)}function ic(r){return r.replace(/<br(?: \/)?>/gi,`
|
179
|
+
`)}class Km{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Hm,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(t){const e=this;t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));function i(){let n=e.buffer,a=0;for(n=ic(n);a<n.length&&n[a]!=="\r"&&n[a]!==`
|
180
|
+
`;)++a;const o=n.slice(0,a);return n[a]==="\r"&&++a,n[a]===`
|
181
|
+
`&&++a,e.buffer=n.slice(a),o}function s(n){ec(n,function(a,o){},/:/)}try{let n="";if(e.state==="INITIAL"){if(!/\r\n|\n/.test(e.buffer))return this;n=i();const o=n.match(/^()?WEBVTT([ \t].*)?$/);if(!(o!=null&&o[0]))throw new Error("Malformed WebVTT signature.");e.state="HEADER"}let a=!1;for(;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(a?a=!1:n=i(),e.state){case"HEADER":/:/.test(n)?s(n):n||(e.state="ID");continue;case"NOTE":n||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){e.state="NOTE";break}if(!n)continue;if(e.cue=new ra(0,0,""),e.state="CUE",n.indexOf("-->")===-1){e.cue.id=n;continue}case"CUE":if(!e.cue){e.state="BADCUE";continue}try{Vm(n,e.cue,e.regionList)}catch{e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":{const o=n.indexOf("-->")!==-1;if(!n||o&&(a=!0)){e.oncue&&e.cue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}if(e.cue===null)continue;e.cue.text&&(e.cue.text+=`
|
182
|
+
`),e.cue.text+=n}continue;case"BADCUE":n||(e.state="ID")}}}catch{e.state==="CUETEXT"&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state=e.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const t=this;try{if((t.cue||t.state==="HEADER")&&(t.buffer+=`
|
183
|
+
|
184
|
+
`,t.parse()),t.state==="INITIAL"||t.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(e){t.onparsingerror&&t.onparsingerror(e)}return t.onflush&&t.onflush(),this}}const jm=/\r\n|\n\r|\n|\r/g,aa=function(r,t,e=0){return r.slice(e,e+t.length)===t},Wm=function(r){let t=parseInt(r.slice(-3));const e=parseInt(r.slice(-6,-4)),i=parseInt(r.slice(-9,-7)),s=r.length>9?parseInt(r.substring(0,r.indexOf(":"))):0;if(!z(t)||!z(e)||!z(i)||!z(s))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${r}`);return t+=1e3*e,t+=60*1e3*i,t+=60*60*1e3*s,t},oa=function(r){let t=5381,e=r.length;for(;e;)t=t*33^r.charCodeAt(--e);return(t>>>0).toString()};function la(r,t,e){return oa(r.toString())+oa(t.toString())+oa(e)}const Ym=function(r,t,e){let i=r[t],s=r[i.prevCC];if(!s||!s.new&&i.new){r.ccOffset=r.presentationOffset=i.start,i.new=!1;return}for(;(n=s)!=null&&n.new;){var n;r.ccOffset+=i.start-s.start,i.new=!1,i=s,s=r[i.prevCC]}r.presentationOffset=e};function qm(r,t,e,i,s,n,a){const o=new Km,l=Le(new Uint8Array(r)).trim().replace(jm,`
|
185
|
+
`).split(`
|
186
|
+
`),h=[],c=t?nm(t.baseTime,t.timescale):0;let d="00:00.000",u=0,f=0,p,g=!0;o.oncue=function(v){const E=e[i];let A=e.ccOffset;const L=(u-c)/9e4;if(E!=null&&E.new&&(f!==void 0?A=e.ccOffset=E.start:Ym(e,i,L)),L){if(!t){p=new Error("Missing initPTS for VTT MPEGTS");return}A=L-e.presentationOffset}const y=v.endTime-v.startTime,S=ce((v.startTime+A-f)*9e4,s*9e4)/9e4;v.startTime=Math.max(S,0),v.endTime=Math.max(S+y,0);const R=v.text.trim();v.text=decodeURIComponent(encodeURIComponent(R)),v.id||(v.id=la(v.startTime,v.endTime,R)),v.endTime>0&&h.push(v)},o.onparsingerror=function(v){p=v},o.onflush=function(){if(p){a(p);return}n(h)},l.forEach(v=>{if(g)if(aa(v,"X-TIMESTAMP-MAP=")){g=!1,v.slice(16).split(",").forEach(E=>{aa(E,"LOCAL:")?d=E.slice(6):aa(E,"MPEGTS:")&&(u=parseInt(E.slice(7)))});try{f=Wm(d)/1e3}catch(E){p=E}return}else v===""&&(g=!1);o.parse(v+`
|
187
|
+
`)}),o.flush()}const ha="stpp.ttml.im1t",sc=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,rc=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,zm={left:"start",center:"center",right:"end",start:"start",end:"end"};function nc(r,t,e,i){const s=ot(new Uint8Array(r),["mdat"]);if(s.length===0){i(new Error("Could not parse IMSC1 mdat"));return}const n=s.map(o=>Le(o)),a=rm(t.baseTime,1,t.timescale);try{n.forEach(o=>e(Xm(o,a)))}catch(o){i(o)}}function Xm(r,t){const e=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("tt")[0];if(!e)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((h,c)=>(h[c]=e.getAttribute(`ttp:${c}`)||i[c],h),{}),n=e.getAttribute("xml:space")!=="preserve",a=ac(ca(e,"styling","style")),o=ac(ca(e,"layout","region")),l=ca(e,"body","[begin]");return[].map.call(l,h=>{const c=oc(h,n);if(!c||!h.hasAttribute("begin"))return null;const d=ua(h.getAttribute("begin"),s),u=ua(h.getAttribute("dur"),s);let f=ua(h.getAttribute("end"),s);if(d===null)throw lc(h);if(f===null){if(u===null)throw lc(h);f=d+u}const p=new ra(d-t,f-t,c);p.id=la(p.startTime,p.endTime,p.text);const g=o[h.getAttribute("region")],v=a[h.getAttribute("style")],E=Qm(g,v,a),{textAlign:A}=E;if(A){const L=zm[A];L&&(p.lineAlign=L),p.align=A}return xt(p,E),p}).filter(h=>h!==null)}function ca(r,t,e){const i=r.getElementsByTagName(t)[0];return i?[].slice.call(i.querySelectorAll(e)):[]}function ac(r){return r.reduce((t,e)=>{const i=e.getAttribute("xml:id");return i&&(t[i]=e),t},{})}function oc(r,t){return[].slice.call(r.childNodes).reduce((e,i,s)=>{var n;return i.nodeName==="br"&&s?e+`
|
188
|
+
`:(n=i.childNodes)!=null&&n.length?oc(i,t):t?e+i.textContent.trim().replace(/\s+/g," "):e+i.textContent},"")}function Qm(r,t,e){const i="http://www.w3.org/ns/ttml#styling";let s=null;const n=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],a=r!=null&&r.hasAttribute("style")?r.getAttribute("style"):null;return a&&e.hasOwnProperty(a)&&(s=e[a]),n.reduce((o,l)=>{const h=da(t,i,l)||da(r,i,l)||da(s,i,l);return h&&(o[l]=h),o},{})}function da(r,t,e){return r&&r.hasAttributeNS(t,e)?r.getAttributeNS(t,e):null}function lc(r){return new Error(`Could not parse ttml timestamp ${r}`)}function ua(r,t){if(!r)return null;let e=tc(r);return e===null&&(sc.test(r)?e=Zm(r,t):rc.test(r)&&(e=Jm(r,t))),e}function Zm(r,t){const e=sc.exec(r),i=(e[4]|0)+(e[5]|0)/t.subFrameRate;return(e[1]|0)*3600+(e[2]|0)*60+(e[3]|0)+i/t.frameRate}function Jm(r,t){const e=rc.exec(r),i=Number(e[1]);switch(e[2]){case"h":return i*3600;case"m":return i*60;case"ms":return i*1e3;case"f":return i/t.frameRate;case"t":return i/t.tickRate}return i}class tv{constructor(t){if(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.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=hc(),this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.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}},this.config.enableCEA708Captions){const e=new vr(this,"textTrack1"),i=new vr(this,"textTrack2"),s=new vr(this,"textTrack3"),n=new vr(this,"textTrack4");this.cea608Parser1=new Qh(1,e,i),this.cea608Parser2=new Qh(3,s,n)}t.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(m.FRAG_LOADING,this.onFragLoading,this),t.on(m.FRAG_LOADED,this.onFragLoaded,this),t.on(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(m.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:t}=this;t.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(m.FRAG_LOADING,this.onFragLoading,this),t.off(m.FRAG_LOADED,this.onFragLoaded,this),t.off(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(m.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null}addCues(t,e,i,s,n){let a=!1;for(let o=n.length;o--;){const l=n[o],h=iv(l[0],l[1],e,i);if(h>=0&&(l[0]=Math.min(l[0],e),l[1]=Math.max(l[1],i),a=!0,h/(i-e)>.5))return}if(a||n.push([e,i]),this.config.renderTextTracksNatively){const o=this.captionsTracks[t];this.Cues.newCue(o,e,i,s)}else{const o=this.Cues.newCue(null,e,i,s);this.hls.trigger(m.CUES_PARSED,{type:"captions",cues:o,track:t})}}onInitPtsFound(t,{frag:e,id:i,initPTS:s,timescale:n}){const{unparsedVttFrags:a}=this;i==="main"&&(this.initPTS[e.cc]={baseTime:s,timescale:n}),a.length&&(this.unparsedVttFrags=[],a.forEach(o=>{this.onFragLoaded(m.FRAG_LOADED,o)}))}getExistingTrack(t){const{media:e}=this;if(e)for(let i=0;i<e.textTracks.length;i++){const s=e.textTracks[i];if(s[t])return s}return null}createCaptionsTrack(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)}createNativeTrack(t){if(this.captionsTracks[t])return;const{captionsProperties:e,captionsTracks:i,media:s}=this,{label:n,languageCode:a}=e[t],o=this.getExistingTrack(t);if(o)i[t]=o,Ri(i[t]),sh(i[t],s);else{const l=this.createTextTrack("captions",n,a);l&&(l[t]=!0,i[t]=l)}}createNonNativeTrack(t){if(this.nonNativeCaptionsTracks[t])return;const e=this.captionsProperties[t];if(!e)return;const i=e.label,s={_id:t,label:i,kind:"captions",default:e.media?!!e.media.default:!1,closedCaptions:e.media};this.nonNativeCaptionsTracks[t]=s,this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[s]})}createTextTrack(t,e,i){const s=this.media;if(s)return s.addTextTrack(t,e,i)}onMediaAttaching(t,e){this.media=e.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:t}=this;Object.keys(t).forEach(e=>{Ri(t[e]),delete t[e]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=hc(),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:t}=this;if(!t)return;const e=t.textTracks;if(e)for(let i=0;i<e.length;i++)Ri(e[i])}onSubtitleTracksUpdated(t,e){const i=e.subtitleTracks||[],s=i.some(n=>n.textCodec===ha);if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(Vh(this.tracks,i)){this.tracks=i;return}if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){const n=this.media?this.media.textTracks:null;this.tracks.forEach((a,o)=>{let l;if(n&&o<n.length){let h=null;for(let c=0;c<n.length;c++)if(ev(n[c],a)){h=n[c];break}h&&(l=h)}if(l)Ri(l);else{const h=this._captionsOrSubtitlesFromCharacteristics(a);l=this.createTextTrack(h,a.name,a.lang),l&&(l.mode="disabled")}l&&(l.groupId=a.groupId,this.textTracks.push(l))})}else if(this.tracks.length){const n=this.tracks.map(a=>({label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}));this.hls.trigger(m.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:n})}}}_captionsOrSubtitlesFromCharacteristics(t){if(t.attrs.CHARACTERISTICS){const e=/transcribes-spoken-dialog/gi.test(t.attrs.CHARACTERISTICS),i=/describes-music-and-sound/gi.test(t.attrs.CHARACTERISTICS);if(e&&i)return"captions"}return"subtitles"}onManifestLoaded(t,e){this.config.enableCEA708Captions&&e.captions&&e.captions.forEach(i=>{const s=/(?:CC|SERVICE)([1-4])/.exec(i.instreamId);if(!s)return;const n=`textTrack${s[1]}`,a=this.captionsProperties[n];a&&(a.label=i.name,i.lang&&(a.languageCode=i.lang),a.media=i)})}closedCaptionsForLevel(t){const e=this.hls.levels[t.level];return e==null?void 0:e.attrs["CLOSED-CAPTIONS"]}onFragLoading(t,e){const{cea608Parser1:i,cea608Parser2:s,lastSn:n,lastPartIndex:a}=this;if(!(!this.enabled||!(i&&s))&&e.frag.type===Z.MAIN){var o,l;const h=e.frag.sn,c=(o=e==null||(l=e.part)==null?void 0:l.index)!=null?o:-1;h===n+1||h===n&&c===a+1||(i.reset(),s.reset()),this.lastSn=h,this.lastPartIndex=c}}onFragLoaded(t,e){const{frag:i,payload:s}=e;if(i.type===Z.SUBTITLE)if(s.byteLength){const n=i.decryptdata,a="stats"in e;if(n==null||!n.encrypted||a){const o=this.tracks[i.level],l=this.vttCCs;l[i.cc]||(l[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),o&&o.textCodec===ha?this._parseIMSC1(i,s):this._parseVTTs(e)}}else this.hls.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})}_parseIMSC1(t,e){const i=this.hls;nc(e,this.initPTS[t.cc],s=>{this._appendCues(s,t.level),i.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},s=>{_.log(`Failed to parse IMSC1: ${s}`),i.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:s})})}_parseVTTs(t){var e;const{frag:i,payload:s}=t,{initPTS:n,unparsedVttFrags:a}=this,o=n.length-1;if(!n[i.cc]&&o===-1){a.push(t);return}const l=this.hls,h=(e=i.initSegment)!=null&&e.data?hi(i.initSegment.data,new Uint8Array(s)):s;qm(h,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,c=>{this._appendCues(c,i.level),l.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})},c=>{const d=c.message==="Missing initPTS for VTT MPEGTS";d?a.push(t):this._fallbackToIMSC1(i,s),_.log(`Failed to parse VTT cue: ${c}`),!(d&&o>i.cc)&&l.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:c})})}_fallbackToIMSC1(t,e){const i=this.tracks[t.level];i.textCodec||nc(e,this.initPTS[t.cc],()=>{i.textCodec=ha,this._parseIMSC1(t,e)},()=>{i.textCodec="wvtt"})}_appendCues(t,e){const i=this.hls;if(this.config.renderTextTracksNatively){const s=this.textTracks[e];if(!s||s.mode==="disabled")return;t.forEach(n=>rh(s,n))}else{const s=this.tracks[e];if(!s)return;const n=s.default?"default":"subtitles"+e;i.trigger(m.CUES_PARSED,{type:"subtitles",cues:t,track:n})}}onFragDecrypted(t,e){const{frag:i}=e;i.type===Z.SUBTITLE&&this.onFragLoaded(m.FRAG_LOADED,e)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(t,e){const{cea608Parser1:i,cea608Parser2:s}=this;if(!this.enabled||!(i&&s))return;const{frag:n,samples:a}=e;if(!(n.type===Z.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let o=0;o<a.length;o++){const l=a[o].bytes;if(l){const h=this.extractCea608Data(l);i.addData(a[o].pts,h[0]),s.addData(a[o].pts,h[1])}}}onBufferFlushing(t,{startOffset:e,endOffset:i,endOffsetSubtitles:s,type:n}){const{media:a}=this;if(!(!a||a.currentTime<i)){if(!n||n==="video"){const{captionsTracks:o}=this;Object.keys(o).forEach(l=>Cn(o[l],e,i))}if(this.config.renderTextTracksNatively&&e===0&&s!==void 0){const{textTracks:o}=this;Object.keys(o).forEach(l=>Cn(o[l],e,s))}}}extractCea608Data(t){const e=[[],[]],i=t[0]&31;let s=2;for(let n=0;n<i;n++){const a=t[s++],o=127&t[s++],l=127&t[s++];if(!(o===0&&l===0)&&4&a){const h=3&a;(h===0||h===1)&&(e[h].push(o),e[h].push(l))}}return e}}function ev(r,t){return!!r&&r.label===t.name&&!(r.textTrack1||r.textTrack2)}function iv(r,t,e,i){return Math.min(t,i)-Math.max(r,e)}function hc(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class fa{constructor(t){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=t,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(t){this.streamController=t}destroy(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:t}=this;t.on(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(m.MANIFEST_PARSED,this.onManifestParsed,this),t.on(m.BUFFER_CODECS,this.onBufferCodecs,this),t.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:t}=this;t.off(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(m.MANIFEST_PARSED,this.onManifestParsed,this),t.off(m.BUFFER_CODECS,this.onBufferCodecs,this),t.off(m.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(t,e){const i=this.hls.levels[e.droppedLevel];this.isLevelAllowed(i)&&this.restrictedLevels.push({bitrate:i.bitrate,height:i.height,width:i.width})}onMediaAttaching(t,e){this.media=e.media instanceof HTMLVideoElement?e.media:null,this.clientRect=null}onManifestParsed(t,e){const i=this.hls;this.restrictedLevels=[],this.firstLevel=e.firstLevel,i.config.capLevelToPlayerSize&&e.video&&this.startCapping()}onBufferCodecs(t,e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){const t=this.hls.levels;if(t.length){const e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}}getMaxLevel(t){const e=this.hls.levels;if(!e.length)return-1;const i=e.filter((s,n)=>this.isLevelAllowed(s)&&n<=t);return this.clientRect=null,fa.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),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 t=this.media,e={width:0,height:0};if(t){const i=t.getBoundingClientRect();e.width=i.width,e.height=i.height,!e.width&&!e.height&&(e.width=i.right-i.left||t.width||0,e.height=i.bottom-i.top||t.height||0)}return this.clientRect=e,e}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let t=1;if(!this.hls.config.ignoreDevicePixelRatio)try{t=self.devicePixelRatio}catch{}return t}isLevelAllowed(t){return!this.restrictedLevels.some(e=>t.bitrate===e.bitrate&&t.width===e.width&&t.height===e.height)}static getMaxLevelByMediaSize(t,e,i){if(!(t!=null&&t.length))return-1;const s=(a,o)=>o?a.width!==o.width||a.height!==o.height:!0;let n=t.length-1;for(let a=0;a<t.length;a+=1){const o=t[a];if((o.width>=e||o.height>=i)&&s(o,t[a+1])){n=a;break}}return n}}class sv{constructor(t){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=t,this.registerListeners()}setStreamController(t){this.streamController=t}registerListeners(){this.hls.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(t,e){const i=this.hls.config;if(i.capLevelOnFPSDrop){const s=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=s,s&&typeof s.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}}checkFPS(t,e,i){const s=performance.now();if(e){if(this.lastTime){const n=s-this.lastTime,a=i-this.lastDroppedFrames,o=e-this.lastDecodedFrames,l=1e3*a/n,h=this.hls;if(h.trigger(m.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:i}),l>0&&a>h.config.fpsDroppedMonitoringThreshold*o){let c=h.currentLevel;_.warn("drop FPS ratio greater than max allowed value for currentLevel: "+c),c>0&&(h.autoLevelCapping===-1||h.autoLevelCapping>=c)&&(c=c-1,h.trigger(m.FPS_DROP_LEVEL_CAPPING,{level:c,droppedLevel:h.currentLevel}),h.autoLevelCapping=c,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,this.lastDecodedFrames=e}}checkFPSInterval(){const t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){const e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)}}const Er="[eme]";class Ci{constructor(t){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=Ci.CDMCleanupPromise?[Ci.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=_.debug.bind(_,Er),this.log=_.log.bind(_,Er),this.warn=_.warn.bind(_,Er),this.error=_.error.bind(_,Er),this.hls=t,this.config=t.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const t=this.config;t.requestMediaKeySystemAccessFunc=null,t.licenseXhrSetup=t.licenseResponseCallback=void 0,t.drmSystems=t.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(m.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(t){const{drmSystems:e,widevineLicenseUrl:i}=this.config,s=e[t];if(s)return s.licenseUrl;if(t===Lt.WIDEVINE&&i)return i;throw new Error(`no license server URL configured for key-system "${t}"`)}getServerCertificateUrl(t){const{drmSystems:e}=this.config,i=e[t];if(i)return i.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${t}"]`)}attemptKeySystemAccess(t){const e=this.hls.levels,i=(a,o,l)=>!!a&&l.indexOf(a)===o,s=e.map(a=>a.audioCodec).filter(i),n=e.map(a=>a.videoCodec).filter(i);return s.length+n.length===0&&n.push("avc1.42e01e"),new Promise((a,o)=>{const l=h=>{const c=h.shift();this.getMediaKeysPromise(c,s,n).then(d=>a({keySystem:c,mediaKeys:d})).catch(d=>{h.length?l(h):d instanceof de?o(d):o(new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_ACCESS,error:d,fatal:!0},d.message))})};l(t)})}requestMediaKeySystemAccess(t,e){const{requestMediaKeySystemAccessFunc:i}=this.config;if(typeof i!="function"){let s=`Configured requestMediaKeySystemAccess is not a function ${i}`;return Cl===null&&self.location.protocol==="http:"&&(s=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(s))}return i(t,e)}getMediaKeysPromise(t,e,i){const s=vp(t,e,i,this.config.drmSystemOptions),n=this.keySystemAccessPromises[t];let a=n==null?void 0:n.keySystemAccess;if(!a){this.log(`Requesting encrypted media "${t}" key-system access with config: ${JSON.stringify(s)}`),a=this.requestMediaKeySystemAccess(t,s);const o=this.keySystemAccessPromises[t]={keySystemAccess:a};return a.catch(l=>{this.log(`Failed to obtain access to key-system "${t}": ${l}`)}),a.then(l=>{this.log(`Access for key-system "${l.keySystem}" obtained`);const h=this.fetchServerCertificate(t);return this.log(`Create media-keys for "${t}"`),o.mediaKeys=l.createMediaKeys().then(c=>(this.log(`Media-keys created for "${t}"`),h.then(d=>d?this.setMediaKeysServerCertificate(c,t,d):c))),o.mediaKeys.catch(c=>{this.error(`Failed to create media-keys for "${t}"}: ${c}`)}),o.mediaKeys})}return a.then(()=>n.mediaKeys)}createMediaKeySessionContext({decryptdata:t,keySystem:e,mediaKeys:i}){this.log(`Creating key-system session "${e}" keyId: ${Re.hexDump(t.keyId||[])}`);const s=i.createSession(),n={decryptdata:t,keySystem:e,mediaKeys:i,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(n),n}renewKeySession(t){const e=t.decryptdata;if(e.pssh){const i=this.createMediaKeySessionContext(t),s=this.getKeyIdString(e),n="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(i,n,e.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(t)}getKeyIdString(t){if(!t)throw new Error("Could not read keyId of undefined decryptdata");if(t.keyId===null)throw new Error("keyId is null");return Re.hexDump(t.keyId)}updateKeySession(t,e){var i;const s=t.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${Re.hexDump(((i=t.decryptdata)==null?void 0:i.keyId)||[])}
|
189
|
+
} (data length: ${e&&e.byteLength})`),s.update(e)}selectKeySystemFormat(t){const e=Object.keys(t.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${t.sn} ${t.type}: ${t.level}) key formats ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)),this.keyFormatPromise}getKeyFormatPromise(t){return new Promise((e,i)=>{const s=Sn(this.config),n=t.map(kl).filter(a=>!!a&&s.indexOf(a)!==-1);return this.getKeySystemSelectionPromise(n).then(({keySystem:a})=>{const o=Dl(a);o?e(o):i(new Error(`Unable to find format for key-system "${a}"`))}).catch(i)})}loadKey(t){const e=t.keyInfo.decryptdata,i=this.getKeyIdString(e),s=`(keyId: ${i} format: "${e.keyFormat}" method: ${e.method} uri: ${e.uri})`;this.log(`Starting session for key ${s}`);let n=this.keyIdToKeySessionPromise[i];return n||(n=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(e).then(({keySystem:a,mediaKeys:o})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${t.frag.sn} ${t.frag.type}: ${t.frag.level} using key ${s}`),this.attemptSetMediaKeys(a,o).then(()=>{this.throwIfDestroyed();const l=this.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:e}),h="cenc";return this.generateRequestWithPreferredKeySession(l,h,e.pssh,"playlist-key")}))),n.catch(a=>this.handleError(a))),n}throwIfDestroyed(t="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(t){this.hls&&(this.error(t.message),t instanceof de?this.hls.trigger(m.ERROR,t.data):this.hls.trigger(m.ERROR,{type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_KEYS,error:t,fatal:!0}))}getKeySystemForKeyPromise(t){const e=this.getKeyIdString(t),i=this.keyIdToKeySessionPromise[e];if(!i){const s=kl(t.keyFormat),n=s?[s]:Sn(this.config);return this.attemptKeySystemAccess(n)}return i}getKeySystemSelectionPromise(t){if(t.length||(t=Sn(this.config)),t.length===0)throw new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(t)}_onMediaEncrypted(t){const{initDataType:e,initData:i}=t;if(this.debug(`"${t.type}" event: init data type: "${e}"`),i===null)return;let s,n;if(e==="sinf"&&this.config.drmSystems[Lt.FAIRPLAY]){const c=Ut(new Uint8Array(i));try{const d=wn(JSON.parse(c).sinf),u=Ul(new Uint8Array(d));if(!u)return;s=u.subarray(8,24),n=Lt.FAIRPLAY}catch{this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{const c=Hp(i);if(c===null)return;c.version===0&&c.systemId===Il.WIDEVINE&&c.data&&(s=c.data.subarray(8,24)),n=mp(c.systemId)}if(!n||!s)return;const a=Re.hexDump(s),{keyIdToKeySessionPromise:o,mediaKeySessions:l}=this;let h=o[a];for(let c=0;c<l.length;c++){const d=l[c],u=d.decryptdata;if(u.pssh||!u.keyId)continue;const f=Re.hexDump(u.keyId);if(a===f||u.uri.replace(/-/g,"").indexOf(a)!==-1){h=o[f],delete o[f],u.pssh=new Uint8Array(i),u.keyId=s,h=o[a]=h.then(()=>this.generateRequestWithPreferredKeySession(d,e,i,"encrypted-event-key-match"));break}}h||(h=o[a]=this.getKeySystemSelectionPromise([n]).then(({keySystem:c,mediaKeys:d})=>{var u;this.throwIfDestroyed();const f=new ps("ISO-23001-7",a,(u=Dl(c))!=null?u:"");return f.pssh=new Uint8Array(i),f.keyId=s,this.attemptSetMediaKeys(c,d).then(()=>{this.throwIfDestroyed();const p=this.createMediaKeySessionContext({decryptdata:f,keySystem:c,mediaKeys:d});return this.generateRequestWithPreferredKeySession(p,e,i,"encrypted-event-no-match")})})),h.catch(c=>this.handleError(c))}_onWaitingForKey(t){this.log(`"${t.type}" event`)}attemptSetMediaKeys(t,e){const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${t}"`);const s=Promise.all(i).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(e)});return this.setMediaKeysQueue.push(s),s.then(()=>{this.log(`Media-keys set for "${t}"`),i.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(n=>i.indexOf(n)===-1)})}generateRequestWithPreferredKeySession(t,e,i,s){var n,a;const o=(n=this.config.drmSystems)==null||(a=n[t.keySystem])==null?void 0:a.generateRequest;if(o)try{const u=o.call(this.hls,e,i,t);if(!u)throw new Error("Invalid response from configured generateRequest filter");e=u.initDataType,i=t.decryptdata.pssh=u.initData?new Uint8Array(u.initData):null}catch(u){var l;if(this.warn(u.message),(l=this.hls)!=null&&l.config.debug)throw u}if(i===null)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(t);const h=this.getKeyIdString(t.decryptdata);this.log(`Generating key-session request for "${s}": ${h} (init data type: ${e} length: ${i?i.byteLength:null})`);const c=new Jn;t.mediaKeysSession.onmessage=u=>{const f=t.mediaKeysSession;if(!f){c.emit("error",new Error("invalid state"));return}const{messageType:p,message:g}=u;this.log(`"${p}" message event for session "${f.sessionId}" message size: ${g.byteLength}`),p==="license-request"||p==="license-renewal"?this.renewLicense(t,g).catch(v=>{this.handleError(v),c.emit("error",v)}):p==="license-release"?t.keySystem===Lt.FAIRPLAY&&(this.updateKeySession(t,_l("acknowledged")),this.removeSession(t)):this.warn(`unhandled media key message type "${p}"`)},t.mediaKeysSession.onkeystatuseschange=u=>{if(!t.mediaKeysSession){c.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(t);const f=t.keyStatus;c.emit("keyStatus",f),f==="expired"&&(this.warn(`${t.keySystem} expired for key ${h}`),this.renewKeySession(t))};const d=new Promise((u,f)=>{c.on("error",f),c.on("keyStatus",p=>{p.startsWith("usable")?u():p==="output-restricted"?f(new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):p==="internal-error"?f(new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${p}"`)):p==="expired"?f(new Error("key expired while generating request")):this.warn(`unhandled key status change "${p}"`)})});return t.mediaKeysSession.generateRequest(e,i).then(()=>{var u;this.log(`Request generated for key-session "${(u=t.mediaKeysSession)==null?void 0:u.sessionId}" keyId: ${h}`)}).catch(u=>{throw new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_NO_SESSION,error:u,fatal:!1},`Error generating key-session request: ${u}`)}).then(()=>d).catch(u=>{throw c.removeAllListeners(),this.removeSession(t),u}).then(()=>(c.removeAllListeners(),t))}onKeyStatusChange(t){t.mediaKeysSession.keyStatuses.forEach((e,i)=>{this.log(`key status change "${e}" for keyStatuses keyId: ${Re.hexDump("buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i))} session keyId: ${Re.hexDump(new Uint8Array(t.decryptdata.keyId||[]))} uri: ${t.decryptdata.uri}`),t.keyStatus=e})}fetchServerCertificate(t){const e=this.config,i=e.loader,s=new i(e),n=this.getServerCertificateUrl(t);return n?(this.log(`Fetching serverCertificate for "${t}"`),new Promise((a,o)=>{const l={responseType:"arraybuffer",url:n},h=e.certLoadPolicy.default,c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(u,f,p,g)=>{a(u.data)},onError:(u,f,p,g)=>{o(new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:p,response:Qt({url:l.url,data:void 0},u)},`"${t}" certificate request failed (${n}). Status: ${u.code} (${u.text})`))},onTimeout:(u,f,p)=>{o(new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:p,response:{url:l.url,data:void 0}},`"${t}" certificate request timed out (${n})`))},onAbort:(u,f,p)=>{o(new Error("aborted"))}};s.load(l,c,d)})):Promise.resolve()}setMediaKeysServerCertificate(t,e,i){return new Promise((s,n)=>{t.setServerCertificate(i).then(a=>{this.log(`setServerCertificate ${a?"success":"not supported by CDM"} (${i==null?void 0:i.byteLength}) on "${e}"`),s(t)}).catch(a=>{n(new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:a,fatal:!0},a.message))})})}renewLicense(t,e){return this.requestLicense(t,new Uint8Array(e)).then(i=>this.updateKeySession(t,new Uint8Array(i)).catch(s=>{throw new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:s,fatal:!0},s.message)}))}setupLicenseXHR(t,e,i,s){const n=this.config.licenseXhrSetup;return n?Promise.resolve().then(()=>{if(!i.decryptdata)throw new Error("Key removed");return n.call(this.hls,t,e,i,s)}).catch(a=>{if(!i.decryptdata)throw a;return t.open("POST",e,!0),n.call(this.hls,t,e,i,s)}).then(a=>(t.readyState||t.open("POST",e,!0),{xhr:t,licenseChallenge:a||s})):(t.open("POST",e,!0),Promise.resolve({xhr:t,licenseChallenge:s}))}requestLicense(t,e){const i=this.config.keyLoadPolicy.default;return new Promise((s,n)=>{const a=this.getLicenseServerUrl(t.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!t.mediaKeysSession)return n(new Error("invalid state"));if(o.readyState===4)if(o.status===200){this._requestLicenseFailureCount=0;let l=o.response;this.log(`License received ${l instanceof ArrayBuffer?l.byteLength:l}`);const h=this.config.licenseResponseCallback;if(h)try{l=h.call(this.hls,o,a,t)}catch(c){this.error(c)}s(l)}else{const l=i.errorRetry,h=l?l.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>h||o.status>=400&&o.status<500)n(new de({type:Q.KEY_SYSTEM_ERROR,details:$.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const c=h-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${c} attempts left`),this.requestLicense(t,e).then(s,n)}}},t.licenseXhr&&t.licenseXhr.readyState!==XMLHttpRequest.DONE&&t.licenseXhr.abort(),t.licenseXhr=o,this.setupLicenseXHR(o,a,t,e).then(({xhr:l,licenseChallenge:h})=>{l.send(h)})})}onMediaAttached(t,e){if(!this.config.emeEnabled)return;const i=e.media;this.media=i,i.addEventListener("encrypted",this.onMediaEncrypted),i.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const t=this.media,e=this.mediaKeySessions;t&&(t.removeEventListener("encrypted",this.onMediaEncrypted),t.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},ps.clearKeyUriToKeyIdMap();const i=e.length;Ci.CDMCleanupPromise=Promise.all(e.map(s=>this.removeSession(s)).concat(t==null?void 0:t.setMediaKeys(null).catch(s=>{this.log(`Could not clear media keys: ${s}. media.src: ${t==null?void 0:t.src}`)}))).then(()=>{i&&(this.log("finished closing key sessions and clearing media keys"),e.length=0)}).catch(s=>{this.log(`Could not close sessions and clear media keys: ${s}. media.src: ${t==null?void 0:t.src}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(t,{sessionKeys:e}){if(!(!e||!this.config.emeEnabled)&&!this.keyFormatPromise){const i=e.reduce((s,n)=>(s.indexOf(n.keyFormat)===-1&&s.push(n.keyFormat),s),[]);this.log(`Selecting key-system from session-keys ${i.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(i)}}removeSession(t){const{mediaKeysSession:e,licenseXhr:i}=t;if(e){this.log(`Remove licenses and keys and close session ${e.sessionId}`),e.onmessage=null,e.onkeystatuseschange=null,i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),t.mediaKeysSession=t.decryptdata=t.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(t);return s>-1&&this.mediaKeySessions.splice(s,1),e.remove().catch(n=>{this.log(`Could not remove session: ${n}`)}).then(()=>e.close()).catch(n=>{this.log(`Could not close session: ${n}`)})}}}Ci.CDMCleanupPromise=void 0;class de extends Error{constructor(t,e){super(e),this.data=void 0,t.error||(t.error=new Error(e)),this.data=t,t.err=t.error}}const rv=1;var te={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"};const nv="h";class je{constructor(t){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,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=s=>{try{this.apply(s,{ot:te.MANIFEST,su:!this.initialized})}catch(n){_.warn("Could not generate manifest CMCD data.",n)}},this.applyFragmentData=s=>{try{const n=s.frag,a=this.hls.levels[n.level],o=this.getObjectType(n),l={d:n.duration*1e3,ot:o};(o===te.VIDEO||o===te.AUDIO||o==te.MUXED)&&(l.br=a.bitrate/1e3,l.tb=this.getTopBandwidth(o)/1e3,l.bl=this.getBufferLength(o)),this.apply(s,l)}catch(n){_.warn("Could not generate segment CMCD data.",n)}},this.hls=t;const e=this.config=t.config,{cmcd:i}=e;i!=null&&(e.pLoader=this.createPlaylistLoader(),e.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||je.uuid(),this.cid=i.contentId,this.useHeaders=i.useHeaders===!0,this.registerListeners())}registerListeners(){const t=this.hls;t.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(m.MEDIA_DETACHED,this.onMediaDetached,this),t.on(m.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const t=this.hls;t.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(m.MEDIA_DETACHED,this.onMediaDetached,this),t.off(m.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null}onMediaAttached(t,e){this.media=e.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(t,e){var i,s;this.audioBuffer=(i=e.tracks.audio)==null?void 0:i.buffer,this.videoBuffer=(s=e.tracks.video)==null?void 0:s.buffer}createData(){var t;return{v:rv,sf:nv,sid:this.sid,cid:this.cid,pr:(t=this.media)==null?void 0:t.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(t,e={}){xt(e,this.createData());const i=e.ot===te.INIT||e.ot===te.VIDEO||e.ot===te.MUXED;if(this.starved&&i&&(e.bs=!0,e.su=!0,this.starved=!1),e.su==null&&(e.su=this.buffering),this.useHeaders){const s=je.toHeaders(e);if(!Object.keys(s).length)return;t.headers||(t.headers={}),xt(t.headers,s)}else{const s=je.toQuery(e);if(!s)return;t.url=je.appendQueryToUri(t.url,s)}}getObjectType(t){const{type:e}=t;if(e==="subtitle")return te.TIMED_TEXT;if(t.sn==="initSegment")return te.INIT;if(e==="audio")return te.AUDIO;if(e==="main")return this.hls.audioTracks.length?te.VIDEO:te.MUXED}getTopBandwidth(t){let e=0,i;const s=this.hls;if(t===te.AUDIO)i=s.audioTracks;else{const n=s.maxAutoLevel,a=n>-1?n+1:s.levels.length;i=s.levels.slice(0,a)}for(const n of i)n.bitrate>e&&(e=n.bitrate);return e>0?e:NaN}getBufferLength(t){const e=this.hls.media,i=t===te.AUDIO?this.audioBuffer:this.videoBuffer;return!i||!e?NaN:Et.bufferInfo(i,e.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:t}=this.config,e=this.applyPlaylistData,i=t||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new i(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,n,a){e(s),this.loader.load(s,n,a)}}}createFragmentLoader(){const{fLoader:t}=this.config,e=this.applyFragmentData,i=t||this.config.loader;return class{constructor(s){this.loader=void 0,this.loader=new i(s)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(s,n,a){e(s),this.loader.load(s,n,a)}}}static uuid(){const t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.slice(e.lastIndexOf("/")+1)}static serialize(t){const e=[],i=l=>!Number.isNaN(l)&&l!=null&&l!==""&&l!==!1,s=l=>Math.round(l),n=l=>s(l/100)*100,a={br:s,d:s,bl:n,dl:n,mtp:n,nor:l=>encodeURIComponent(l),rtp:n,tb:s},o=Object.keys(t||{}).sort();for(const l of o){let h=t[l];if(!i(h)||l==="v"&&h===1||l=="pr"&&h===1)continue;const c=a[l];c&&(h=c(h));const d=typeof h;let u;l==="ot"||l==="sf"||l==="st"?u=`${l}=${h}`:d==="boolean"?u=l:d==="number"?u=`${l}=${h}`:u=`${l}=${JSON.stringify(h)}`,e.push(u)}return e.join(",")}static toHeaders(t){const e=Object.keys(t),i={},s=["Object","Request","Session","Status"],n=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};for(const o of e){const l=a[o]!=null?a[o]:1;n[l][o]=t[o]}for(let o=0;o<n.length;o++){const l=je.serialize(n[o]);l&&(i[`CMCD-${s[o]}`]=l)}return i}static toQuery(t){return`CMCD=${encodeURIComponent(je.serialize(t))}`}static appendQueryToUri(t,e){if(!e)return t;const i=t.includes("?")?"&":"?";return`${t}${i}${e}`}}const av=3e5;class ov{constructor(t){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=t,this.log=_.log.bind(_,"[content-steering]:"),this.registerListeners()}registerListeners(){const t=this.hls;t.on(m.MANIFEST_LOADING,this.onManifestLoading,this),t.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(m.MANIFEST_PARSED,this.onManifestParsed,this),t.on(m.ERROR,this.onError,this)}unregisterListeners(){const t=this.hls;t&&(t.off(m.MANIFEST_LOADING,this.onManifestLoading,this),t.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(m.MANIFEST_PARSED,this.onManifestParsed,this),t.off(m.ERROR,this.onError,this))}startLoad(){if(this.started=!0,self.clearTimeout(this.reloadTimer),this.enabled&&this.uri)if(this.updated){const t=Math.max(this.timeToLoad*1e3-(performance.now()-this.updated),0);this.scheduleRefresh(this.uri,t)}else this.loadSteeringManifest(this.uri)}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),self.clearTimeout(this.reloadTimer)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(t){const e=this.levels;e&&(this.levels=e.filter(i=>i!==t))}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(t,e){const{contentSteering:i}=e;i!==null&&(this.pathwayId=i.pathwayId,this.uri=i.uri,this.started&&this.startLoad())}onManifestParsed(t,e){this.audioTracks=e.audioTracks,this.subtitleTracks=e.subtitleTracks}onError(t,e){const{errorAction:i}=e;if((i==null?void 0:i.action)===Gt.SendAlternateToPenaltyBox&&i.flags===he.MoveAllAlternatesMatchingHost){let s=this.pathwayPriority;const n=this.pathwayId;this.penalizedPathways[n]||(this.penalizedPathways[n]=performance.now()),!s&&this.levels&&(s=this.levels.reduce((a,o)=>(a.indexOf(o.pathwayId)===-1&&a.push(o.pathwayId),a),[])),s&&s.length>1&&(this.updatePathwayPriority(s),i.resolved=this.pathwayId!==n)}}filterParsedLevels(t){this.levels=t;let e=this.getLevelsForPathway(this.pathwayId);if(e.length===0){const i=t[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${i}"`),e=this.getLevelsForPathway(i),this.pathwayId=i}return e.length!==t.length?(this.log(`Found ${e.length}/${t.length} levels in Pathway "${this.pathwayId}"`),e):t}getLevelsForPathway(t){return this.levels===null?[]:this.levels.filter(e=>t===e.pathwayId)}updatePathwayPriority(t){this.pathwayPriority=t;let e;const i=this.penalizedPathways,s=performance.now();Object.keys(i).forEach(n=>{s-i[n]>av&&delete i[n]});for(let n=0;n<t.length;n++){const a=t[n];if(i[a])continue;if(a===this.pathwayId)return;const o=this.hls.nextLoadLevel,l=this.hls.levels[o];if(e=this.getLevelsForPathway(a),e.length>0){this.log(`Setting Pathway to "${a}"`),this.pathwayId=a,this.hls.trigger(m.LEVELS_UPDATED,{levels:e});const h=this.hls.levels[o];l&&h&&this.levels&&(h.attrs["STABLE-VARIANT-ID"]!==l.attrs["STABLE-VARIANT-ID"]&&h.bitrate!==l.bitrate&&this.log(`Unstable Pathways change from bitrate ${l.bitrate} to ${h.bitrate}`),this.hls.nextLoadLevel=o);break}}}clonePathways(t){const e=this.levels;if(!e)return;const i={},s={};t.forEach(n=>{const{ID:a,"BASE-ID":o,"URI-REPLACEMENT":l}=n;if(e.some(c=>c.pathwayId===a))return;const h=this.getLevelsForPathway(o).map(c=>{const d=xt({},c);d.details=void 0,d.url=dc(c.uri,c.attrs["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",l);const u=new St(c.attrs);u["PATHWAY-ID"]=a;const f=u.AUDIO&&`${u.AUDIO}_clone_${a}`,p=u.SUBTITLES&&`${u.SUBTITLES}_clone_${a}`;f&&(i[u.AUDIO]=f,u.AUDIO=f),p&&(s[u.SUBTITLES]=p,u.SUBTITLES=p),d.attrs=u;const g=new ms(d);return hr(g,"audio",f),hr(g,"text",p),g});e.push(...h),cc(this.audioTracks,i,l,a),cc(this.subtitleTracks,s,l,a)})}loadSteeringManifest(t){const e=this.hls.config,i=e.loader;this.loader&&this.loader.destroy(),this.loader=new i(e);let s;try{s=new self.URL(t)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${t}`);return}if(s.protocol!=="data:"){const c=(this.hls.bandwidthEstimate||e.abrEwmaDefaultEstimate)|0;s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+c)}const n={responseType:"json",url:s.href},a=e.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},l={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},h={onSuccess:(c,d,u,f)=>{this.log(`Loaded steering manifest: "${s}"`);const p=c.data;if(p.VERSION!==1){this.log(`Steering VERSION ${p.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=p.TTL;const{"RELOAD-URI":g,"PATHWAY-CLONES":v,"PATHWAY-PRIORITY":E}=p;if(g)try{this.uri=new self.URL(g,s).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${g}`);return}this.scheduleRefresh(this.uri||u.url),v&&this.clonePathways(v),E&&this.updatePathwayPriority(E)},onError:(c,d,u,f)=>{if(this.log(`Error loading steering manifest: ${c.code} ${c.text} (${d.url})`),this.stopLoad(),c.code===410){this.enabled=!1,this.log(`Steering manifest ${d.url} no longer available`);return}let p=this.timeToLoad*1e3;if(c.code===429){const g=this.loader;if(typeof(g==null?void 0:g.getResponseHeader)=="function"){const v=g.getResponseHeader("Retry-After");v&&(p=parseFloat(v)*1e3)}this.log(`Steering manifest ${d.url} rate limited`);return}this.scheduleRefresh(this.uri||d.url,p)},onTimeout:(c,d,u)=>{this.log(`Timeout loading steering manifest (${d.url})`),this.scheduleRefresh(this.uri||d.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(n,l,h)}scheduleRefresh(t,e=this.timeToLoad*1e3){self.clearTimeout(this.reloadTimer),this.reloadTimer=self.setTimeout(()=>{this.loadSteeringManifest(t)},e)}}function cc(r,t,e,i){r&&Object.keys(t).forEach(s=>{const n=r.filter(a=>a.groupId===s).map(a=>{const o=xt({},a);return o.details=void 0,o.attrs=new St(o.attrs),o.url=o.attrs.URI=dc(a.url,a.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",e),o.groupId=o.attrs["GROUP-ID"]=t[s],o.attrs["PATHWAY-ID"]=i,o});r.push(...n)})}function dc(r,t,e,i){const{HOST:s,PARAMS:n,[e]:a}=i;let o;t&&(o=a==null?void 0:a[t],o&&(r=o));const l=new self.URL(r);return s&&!o&&(l.host=s),n&&Object.keys(n).sort().forEach(h=>{h&&l.searchParams.set(h,n[h])}),l.href}const lv=/^age:\s*[\d.]+\s*$/im;class uc{constructor(t){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=t&&t.xhrSetup||null,this.stats=new tr,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null}abortInternal(){const t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,t.readyState!==4&&(this.stats.aborted=!0,t.abort()))}abort(){var t;this.abortInternal(),(t=this.callbacks)!=null&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(t,e,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=i,this.loadInternal()}loadInternal(){const{config:t,context:e}=this;if(!t)return;const i=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const n=this.xhrSetup;n?Promise.resolve().then(()=>{if(!this.stats.aborted)return n(i,e.url)}).catch(a=>(i.open("GET",e.url,!0),n(i,e.url))).then(()=>{this.stats.aborted||this.openAndSendXhr(i,e,t)}).catch(a=>{this.callbacks.onError({code:i.status,text:a.message},e,i,s)}):this.openAndSendXhr(i,e,t)}openAndSendXhr(t,e,i){t.readyState||t.open("GET",e.url,!0);const s=this.context.headers,{maxTimeToFirstByteMs:n,maxLoadTimeMs:a}=i.loadPolicy;if(s)for(const o in s)t.setRequestHeader(o,s[o]);e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,self.clearTimeout(this.requestTimeout),i.timeout=n&&z(n)?n:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),t.send()}readystatechange(){const{context:t,loader:e,stats:i}=this;if(!t||!e)return;const s=e.readyState,n=this.config;if(!i.aborted&&s>=2&&(i.loading.first===0&&(i.loading.first=Math.max(self.performance.now(),i.loading.start),n.timeout!==n.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),n.timeout=n.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.loadPolicy.maxLoadTimeMs-(i.loading.first-i.loading.start)))),s===4)){self.clearTimeout(this.requestTimeout),e.onreadystatechange=null,e.onprogress=null;const a=e.status,o=e.responseType!=="text";if(a>=200&&a<300&&(o&&e.response||e.responseText!==null)){i.loading.end=Math.max(self.performance.now(),i.loading.first);const l=o?e.response:e.responseText,h=e.responseType==="arraybuffer"?l.byteLength:l.length;if(i.loaded=i.total=h,i.bwEstimate=i.total*8e3/(i.loading.end-i.loading.first),!this.callbacks)return;const c=this.callbacks.onProgress;if(c&&c(i,t,l,e),!this.callbacks)return;const d={url:e.responseURL,data:l,code:a};this.callbacks.onSuccess(d,i,t,e)}else{const l=n.loadPolicy.errorRetry,h=i.retry;lr(l,h,!1,a)?this.retry(l):(_.error(`${a} while loading ${t.url}`),this.callbacks.onError({code:a,text:e.statusText},t,e,i))}}}loadtimeout(){var t;const e=(t=this.config)==null?void 0:t.loadPolicy.timeoutRetry,i=this.stats.retry;if(lr(e,i,!0))this.retry(e);else{_.warn(`timeout while loading ${this.context.url}`);const s=this.callbacks;s&&(this.abortInternal(),s.onTimeout(this.stats,this.context,this.loader))}}retry(t){const{context:e,stats:i}=this;this.retryDelay=Fn(t,i.retry),i.retry++,_.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${e.url}, retrying ${i.retry}/${t.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(t){const e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)}getCacheAge(){let t=null;if(this.loader&&lv.test(this.loader.getAllResponseHeaders())){const e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t}getResponseHeader(t){return this.loader&&new RegExp(`^${t}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(t):null}}function hv(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const cv=/(\d+)-(\d+)\/(\d+)/;class fc{constructor(t){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=t.fetchSetup||pv,this.controller=new self.AbortController,this.stats=new tr}destroy(){this.loader=this.callbacks=null,this.abortInternal()}abortInternal(){const t=this.response;t!=null&&t.ok||(this.stats.aborted=!0,this.controller.abort())}abort(){var t;this.abortInternal(),(t=this.callbacks)!=null&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(t,e,i){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const n=dv(t,this.controller.signal),a=i.onProgress,o=t.responseType==="arraybuffer",l=o?"byteLength":"length",{maxTimeToFirstByteMs:h,maxLoadTimeMs:c}=e.loadPolicy;this.context=t,this.config=e,this.callbacks=i,this.request=this.fetchSetup(t,n),self.clearTimeout(this.requestTimeout),e.timeout=h&&z(h)?h:c,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),i.onTimeout(s,t,this.response)},e.timeout),self.fetch(this.request).then(d=>{this.response=this.loader=d;const u=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),e.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),i.onTimeout(s,t,this.response)},c-(u-s.loading.start)),!d.ok){const{status:f,statusText:p}=d;throw new gv(p||"fetch, bad network response",f,d)}return s.loading.first=u,s.total=fv(d.headers)||s.total,a&&z(e.highWaterMark)?this.loadProgressively(d,s,t,e.highWaterMark,a):o?d.arrayBuffer():t.responseType==="json"?d.json():d.text()}).then(d=>{const{response:u}=this;self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const f=d[l];f&&(s.loaded=s.total=f);const p={url:u.url,data:d,code:u.status};a&&!z(e.highWaterMark)&&a(s,t,d,u),i.onSuccess(p,s,t,u)}).catch(d=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const u=d&&d.code||0,f=d?d.message:null;i.onError({code:u,text:f},t,d?d.details:null,s)})}getCacheAge(){let t=null;if(this.response){const e=this.response.headers.get("age");t=e?parseFloat(e):null}return t}getResponseHeader(t){return this.response?this.response.headers.get(t):null}loadProgressively(t,e,i,s=0,n){const a=new Hh,o=t.body.getReader(),l=()=>o.read().then(h=>{if(h.done)return a.dataLength&&n(e,i,a.flush(),t),Promise.resolve(new ArrayBuffer(0));const c=h.value,d=c.length;return e.loaded+=d,d<s||a.dataLength?(a.push(c),a.dataLength>=s&&n(e,i,a.flush(),t)):n(e,i,c,t),l()}).catch(()=>Promise.reject());return l()}}function dv(r,t){const e={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(xt({},r.headers))};return r.rangeEnd&&e.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),e}function uv(r){const t=cv.exec(r);if(t)return parseInt(t[2])-parseInt(t[1])+1}function fv(r){const t=r.get("Content-Range");if(t){const i=uv(t);if(z(i))return i}const e=r.get("Content-Length");if(e)return parseInt(e)}function pv(r,t){return new self.Request(r.url,t)}class gv extends Error{constructor(t,e,i){super(t),this.code=void 0,this.details=void 0,this.code=e,this.details=i}}const mv=/\s/,vv={newCue(r,t,e,i){const s=[];let n,a,o,l,h;const c=self.VTTCue||self.TextTrackCue;for(let u=0;u<i.rows.length;u++)if(n=i.rows[u],o=!0,l=0,h="",!n.isEmpty()){var d;for(let g=0;g<n.chars.length;g++)mv.test(n.chars[g].uchar)&&o?l++:(h+=n.chars[g].uchar,o=!1);n.cueStartTime=t,t===e&&(e+=1e-4),l>=16?l--:l++;const f=ic(h.trim()),p=la(t,e,f);r!=null&&(d=r.cues)!=null&&d.getCueById(p)||(a=new c(t,e,f),a.id=p,a.line=u+1,a.align="left",a.position=10+Math.min(80,Math.floor(l*8/32)*10),s.push(a))}return r&&s.length&&(s.sort((u,f)=>u.line==="auto"||f.line==="auto"?0:u.line>8&&f.line>8?f.line-u.line:u.line-f.line),s.forEach(u=>rh(r,u))),s}},yv={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Ev=Qt(Qt({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength: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:uc,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:wm,bufferController:xm,capLevelController:fa,errorController:gg,fpsController:sv,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Cl,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:yv},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},bv()),{},{subtitleStreamController:km,subtitleTrackController:Dm,timelineController:tv,audioStreamController:Lm,audioTrackController:Rm,emeController:Ci,cmcdController:je,contentSteeringController:ov});function bv(){return{cueHandler:vv,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 Tv(r,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(t.liveMaxLatencyDurationCount!==void 0&&(t.liveSyncDurationCount===void 0||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(t.liveMaxLatencyDuration!==void 0&&(t.liveSyncDuration===void 0||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const e=pa(r),i=["manifest","level","frag"],s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return i.forEach(n=>{const a=`${n==="level"?"playlist":n}LoadPolicy`,o=t[a]===void 0,l=[];s.forEach(h=>{const c=`${n}Loading${h}`,d=t[c];if(d!==void 0&&o){l.push(c);const u=e[a].default;switch(t[a]={default:u},h){case"TimeOut":u.maxLoadTimeMs=d,u.maxTimeToFirstByteMs=d;break;case"MaxRetry":u.errorRetry.maxNumRetry=d,u.timeoutRetry.maxNumRetry=d;break;case"RetryDelay":u.errorRetry.retryDelayMs=d,u.timeoutRetry.retryDelayMs=d;break;case"MaxRetryTimeout":u.errorRetry.maxRetryDelayMs=d,u.timeoutRetry.maxRetryDelayMs=d;break}}}),l.length&&_.warn(`hls.js config: "${l.join('", "')}" setting(s) are deprecated, use "${a}": ${JSON.stringify(t[a])}`)}),Qt(Qt({},e),t)}function pa(r){return r&&typeof r=="object"?Array.isArray(r)?r.map(pa):Object.keys(r).reduce((t,e)=>(t[e]=pa(r[e]),t),{}):r}function Av(r){const t=r.loader;t!==fc&&t!==uc?(_.log("[config]: Custom loader detected, cannot enable progressive streaming"),r.progressive=!1):hv()&&(r.loader=fc,r.progressive=!0,r.enableSoftwareAES=!0,_.log("[config]: Progressive streaming enabled, using FetchLoader"))}class Ue{static get version(){return"1.4.12"}static isSupported(){return Og()}static get Events(){return m}static get ErrorTypes(){return Q}static get ErrorDetails(){return $}static get DefaultConfig(){return Ue.defaultConfig?Ue.defaultConfig:Ev}static set DefaultConfig(t){Ue.defaultConfig=t}constructor(t={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Jn,this._autoLevelCapping=void 0,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,ap(t.debug||!1,"Hls instance");const e=this.config=Tv(Ue.DefaultConfig,t);this.userConfig=t,this._autoLevelCapping=-1,e.progressive&&Av(e);const{abrController:i,bufferController:s,capLevelController:n,errorController:a,fpsController:o}=e,l=new a(this),h=this.abrController=new i(this),c=this.bufferController=new s(this),d=this.capLevelController=new n(this),u=new o(this),f=new Xp(this),p=new eg(this),g=e.contentSteeringController,v=g?new g(this):null,E=this.levelController=new vg(this,v),A=new yg(this),L=new bg(this.config),y=this.streamController=new Tm(this,A,L);d.setStreamController(y),u.setStreamController(y);const S=[f,E,y];v&&S.splice(1,0,v),this.networkControllers=S;const R=[h,c,d,u,p,A];this.audioTrackController=this.createController(e.audioTrackController,S);const D=e.audioStreamController;D&&S.push(new D(this,A,L)),this.subtitleTrackController=this.createController(e.subtitleTrackController,S);const M=e.subtitleStreamController;M&&S.push(new M(this,A,L)),this.createController(e.timelineController,R),L.emeController=this.emeController=this.createController(e.emeController,R),this.cmcdController=this.createController(e.cmcdController,R),this.latencyController=this.createController(ig,R),this.coreComponents=R,S.push(l);const C=l.onErrorOut;typeof C=="function"&&this.on(m.ERROR,C,l)}createController(t,e){if(t){const i=new t(this);return e&&e.push(i),i}return null}on(t,e,i=this){this._emitter.on(t,e,i)}once(t,e,i=this){this._emitter.once(t,e,i)}removeAllListeners(t){this._emitter.removeAllListeners(t)}off(t,e,i=this,s){this._emitter.off(t,e,i,s)}listeners(t){return this._emitter.listeners(t)}emit(t,e,i){return this._emitter.emit(t,e,i)}trigger(t,e){if(this.config.debug)return this.emit(t,t,e);try{return this.emit(t,t,e)}catch(i){_.error("An internal error happened while handling event "+t+'. Error message: "'+i.message+'". Here is a stacktrace:',i),this.trigger(m.ERROR,{type:Q.OTHER_ERROR,details:$.INTERNAL_EXCEPTION,fatal:!1,event:t,error:i})}return!1}listenerCount(t){return this._emitter.listenerCount(t)}destroy(){_.log("destroy"),this.trigger(m.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(e=>e.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(e=>e.destroy()),this.coreComponents.length=0;const t=this.config;t.xhrSetup=t.fetchSetup=void 0,this.userConfig=null}attachMedia(t){_.log("attachMedia"),this._media=t,this.trigger(m.MEDIA_ATTACHING,{media:t})}detachMedia(){_.log("detachMedia"),this.trigger(m.MEDIA_DETACHING,void 0),this._media=null}loadSource(t){this.stopLoad();const e=this.media,i=this.url,s=this.url=bn.buildAbsoluteURL(self.location.href,t,{alwaysNormalize:!0});_.log(`loadSource:${s}`),e&&i&&(i!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(e)),this.trigger(m.MANIFEST_LOADING,{url:t})}startLoad(t=-1){_.log(`startLoad(${t})`),this.networkControllers.forEach(e=>{e.startLoad(t)})}stopLoad(){_.log("stopLoad"),this.networkControllers.forEach(t=>{t.stopLoad()})}swapAudioCodec(){_.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){_.log("recoverMediaError");const t=this._media;this.detachMedia(),t&&this.attachMedia(t)}removeLevel(t,e=0){this.levelController.removeLevel(t,e)}get levels(){return this.levelController.levels||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(t){_.log(`set currentLevel:${t}`),this.loadLevel=t,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(t){_.log(`set nextLevel:${t}`),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(t){_.log(`set loadLevel:${t}`),this.levelController.manualLevel=t}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(t){this.levelController.nextLoadLevel=t}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(t){_.log(`set firstLevel:${t}`),this.levelController.firstLevel=t}get startLevel(){return this.levelController.startLevel}set startLevel(t){_.log(`set startLevel:${t}`),t!==-1&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(t){const e=!!t;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:t}=this.abrController;return t?t.getEstimate():NaN}get ttfbEstimate(){const{bwEstimator:t}=this.abrController;return t?t.getEstimateTTFB():NaN}set autoLevelCapping(t){this._autoLevelCapping!==t&&(_.log(`set autoLevelCapping:${t}`),this._autoLevelCapping=t)}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(t){On.indexOf(t)>-1&&(this._maxHdcpLevel=t)}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:t,config:{minAutoBitrate:e}}=this;if(!t)return 0;const i=t.length;for(let s=0;s<i;s++)if(t[s].maxBitrate>=e)return s;return 0}get maxAutoLevel(){const{levels:t,autoLevelCapping:e,maxHdcpLevel:i}=this;let s;if(e===-1&&t&&t.length?s=t.length-1:s=e,i)for(let n=s;n--;){const a=t[n].attrs["HDCP-LEVEL"];if(a&&a<=i)return n}return s}get nextAutoLevel(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)}set nextAutoLevel(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get audioTracks(){const t=this.audioTrackController;return t?t.audioTracks:[]}get audioTrack(){const t=this.audioTrackController;return t?t.audioTrack:-1}set audioTrack(t){const e=this.audioTrackController;e&&(e.audioTrack=t)}get subtitleTracks(){const t=this.subtitleTrackController;return t?t.subtitleTracks:[]}get subtitleTrack(){const t=this.subtitleTrackController;return t?t.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(t){const e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}get subtitleDisplay(){const t=this.subtitleTrackController;return t?t.subtitleDisplay:!1}set subtitleDisplay(t){const e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(t){this.config.lowLatencyMode=t}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}}Ue.defaultConfig=void 0;const wv=(r,t,e,i)=>{if(e==="length"||e==="prototype"||e==="arguments"||e==="caller")return;const s=Object.getOwnPropertyDescriptor(r,e),n=Object.getOwnPropertyDescriptor(t,e);!Sv(s,n)&&i||Object.defineProperty(r,e,n)},Sv=function(r,t){return r===void 0||r.configurable||r.writable===t.writable&&r.enumerable===t.enumerable&&r.configurable===t.configurable&&(r.writable||r.value===t.value)},Lv=(r,t)=>{const e=Object.getPrototypeOf(t);e!==Object.getPrototypeOf(r)&&Object.setPrototypeOf(r,e)},Rv=(r,t)=>`/* Wrapped ${r}*/
|
190
|
+
${t}`,_v=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),kv=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Iv=(r,t,e)=>{const i=e===""?"":`with ${e.trim()}() `,s=Rv.bind(null,i,t.toString());Object.defineProperty(s,"name",kv),Object.defineProperty(r,"toString",{..._v,value:s})};function Dv(r,t,{ignoreNonConfigurable:e=!1}={}){const{name:i}=r;for(const s of Reflect.ownKeys(t))wv(r,t,s,e);return Lv(r,t),Iv(r,t,i),r}const Cv=new WeakMap;function ga(r,{cacheKey:t=([i])=>i,cache:e=new Map}={}){const i=new Map,s=function(...n){const a=t(n);if(i.has(a))return i.get(a);const o=(async()=>{try{if(e&&await e.has(a))return await e.get(a);const l=await r.apply(this,n);try{return l}finally{e&&await e.set(a,l)}}finally{i.delete(a)}})();return i.set(a,o),o};return Dv(s,r,{ignoreNonConfigurable:!0}),Cv.set(s,e),s}function xv(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Pv(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Ov=ga(async function(r){return new FontFace(r.name,`url(${r.url})`,{style:r.style,weight:r.weight}).load()},{cacheKey:([r])=>JSON.stringify(r)});async function $v(r){return r.duration===1/0?new Promise(t=>{r.currentTime=Number.MAX_SAFE_INTEGER,r.ontimeupdate=()=>{r.ontimeupdate=null,t(r.duration),r.currentTime=0}}):r.duration}class Mv{constructor(t){this._memoKey=null,this._lastDeps=null,this._duration=0,this._processing=!1,this._scenes=null,this._videos={},this._videoMeta={},this._videoState={},this._resolveVideo=ga(e=>{const{id:i,src:s,playlist:n,duration:a}=e;return this._cleanupVideo(i),new Promise(o=>{let l=null;const h=document.createElement("video");h.playsInline=!0,h.muted=!0,h.loop=!1,h.volume=this.host.volume,h.playbackRate=this.host.playbackRate;const c={loadeddata:this._handleLoadedData,waiting:this._handleWaiting,canplay:this._handleCanPlay,progress:this._handleProgress,seeked:this._handleSeeked,play:this._handlePlay,playing:this._handlePlaying,pause:this._handlePause,stalled:this._handleStalled,timeupdate:this._handleTimeUpdate,ended:this._handleEnded,error:this._handleError},d=Object.keys(c).reduce((u,f)=>{const p=f,g=c[p](i,h);return u[p]=g,h.addEventListener(f,g),u},{});if(n&&!xv()&&Ue.isSupported()){let u=!1;l=new Ue({autoStartLoad:!0,xhrSetup:f=>{const{open:p}=f,g=n.split("?")[1];f.open=function(v,E,A){E.toString().includes("?")||(E+="?"+g),p.apply(this,[v,E,A])}}}),l.loadSource(n),l.attachMedia(h),l.startLoadOnce=(f=-1)=>{l&&!u&&(l.startLoad(f),u=!0)},l.on(Ue.Events.LEVEL_LOADED,async()=>{u||l==null||l.stopLoad(),o({id:i,hls:l,node:h})})}else{h.src=s;let u=!1;if(h.startLoadOnce=()=>{u||(h.preload="auto",h.load(),u=!0)},a)h.preload="none",o({id:i,hls:l,node:h});else{h.preload="metadata";const f=async()=>{o({id:i,hls:l,node:h}),h.removeEventListener("loadedmetadata",f)};h.addEventListener("loadedmetadata",f)}}this.videos[i]={id:i,hls:l,node:h,listeners:d},this.videoState[i]={initialised:!1,waiting:!0,buffered:[]}})},{cacheKey:([{id:e,src:i,playlist:s}])=>JSON.stringify({id:e,src:i.split("?")[0],playlist:s==null?void 0:s.split("?")[0]})}),this._resolveVideoMeta=ga(async(e,i)=>{const{id:s,captions:n,duration:a,startOffset:o,endOffset:l}=e,h=a??await $v(i),c=(o??0)*h,d=(1-(l??0))*h,u={id:s,captions:n,start:c,duration:d};return this.videoMeta[s]=u,u},{cacheKey:([{id:e,captions:i,duration:s,startOffset:n,endOffset:a}])=>JSON.stringify({id:e,captions:i,duration:s,startOffset:n,endOffset:a})}),this._handleLoadedData=(e,i)=>()=>{const s=this.videoState[e];s!=null&&s.initialised||(this.videoState={...this.videoState,[e]:{...s,initialised:!0,waiting:!1,buffered:(s==null?void 0:s.buffered)??[]}},this.setVideosCurrentTime(this.host.currentTime),this.host.dispatchEvent(new CustomEvent("video:loadeddata",{detail:{id:e,node:i}})))},this._handleWaiting=e=>()=>{const i=this.videoState[e];i!=null&&i.initialised&&!(i!=null&&i.waiting)&&(this.videoState={...this.videoState,[e]:{...i,waiting:!0}})},this._handleCanPlay=e=>()=>{const i=this.videoState[e];i!=null&&i.initialised&&i!=null&&i.waiting&&(this.videoState={...this.videoState,[e]:{...i,waiting:!1}})},this._handleProgress=(e,i)=>()=>{var s;const n=i==null?void 0:i.buffered,a=[],{start:o,video:l,videoMeta:h}=((s=this.scenes)==null?void 0:s.scenes.find(({video:c})=>e===(c==null?void 0:c.id)))??{};if(i&&n&&l&&h&&typeof o<"u"){for(let d=0;d<n.length;d++){const u=n.start(d),f=n.end(d);Math.max(u,h.start)<=Math.min(f,h.start+h.duration)&&a.push({start:Math.max(0,(Math.max(u-h.start,0)+o)/this.host.duration*100),end:Math.min((Math.min(f-h.start,h.duration)+o)/this.host.duration*100,100)})}const c=this.videoState[e];this.videoState={...this.videoState,[e]:{...c,buffered:a}}}},this._handleSeeked=(e,i)=>()=>{const s=this.videoState[e];s!=null&&s.initialised&&(this.host.draw(),this.host.dispatchEvent(new CustomEvent("video:seeked",{detail:{id:e,node:i}})))},this._handlePlay=(e,i)=>()=>{this.host.dispatchEvent(new CustomEvent("video:play",{detail:{id:e,node:i}}))},this._handlePlaying=(e,i)=>()=>{this.host.dispatchEvent(new CustomEvent("video:playing",{detail:{id:e,node:i}}))},this._handlePause=(e,i)=>()=>{this.host.dispatchEvent(new CustomEvent("video:pause",{detail:{id:e,node:i}}))},this._handleStalled=(e,i)=>()=>{this.host.dispatchEvent(new CustomEvent("video:stalled",{detail:{id:e,node:i}}))},this._handleTimeUpdate=(e,i)=>()=>{this.host.dispatchEvent(new CustomEvent("video:timeupdate",{detail:{id:e,node:i}}))},this._handleEnded=(e,i)=>()=>{this.host.dispatchEvent(new CustomEvent("video:ended",{detail:{id:e,node:i}}))},this._handleError=(e,i)=>()=>{this.host.dispatchEvent(new CustomEvent("video:error",{detail:{id:e,node:i}}))},this.host=t,this.host.addController(this)}set processing(t){t!==this._processing&&(this._processing=t,this.host.requestUpdate())}get processing(){return this._processing}set duration(t){!isNaN(t)&&t!==this._duration&&(this._duration=t,this.host.requestUpdate(),this.host.dispatchEvent(new CustomEvent("durationchange",{detail:this._duration})))}get duration(){return this._duration}set scenes(t){this._scenes=t,this.host.requestUpdate()}get scenes(){return this._scenes}set videos(t){this._videos=t,this.host.requestUpdate()}get videos(){return this._videos}set videoMeta(t){this._videoMeta=t,this.host.requestUpdate()}get videoMeta(){return this._videoMeta}set videoState(t){this._videoState=t,this.host.requestUpdate()}get videoState(){return this._videoState}_setupTask(){new To(this.host,async([t,e,i,s,n])=>{try{if(i||t){if(this.processing=!0,i){let a=null;if(s)try{a=await(await fetch(s,{method:"GET"})).text()}catch{this.host.dispatchEvent(new ErrorEvent("error",new Error("Track failed to fetch")))}const o=i.includes(".m3u8")?"playlist":"video";this.scenes=await Co({data:{questions:{items:[{answer:{id:"source",media:{[o]:i},captions:{current:a}}}]}},template:e,burnCaptions:n},this._resolveVideo,this._resolveVideoMeta)}else this.scenes=await Co({data:t,template:e,burnCaptions:n},this._resolveVideo,this._resolveVideoMeta);(await Promise.all(this.scenes.fonts.map(a=>Ov(a)))).forEach(a=>{document.fonts.add(a)}),this.duration=this.scenes.duration,this.host.paused&&this.host.reset(this.host.currentTime,!this.host.paused),this.host.autoplay&&this.host.play()}}catch{this.scenes=null,this.duration=0,this.host.dispatchEvent(new ErrorEvent("error",new Error("Failed to create scenes")))}finally{this.processing=!1}},()=>{const t=JSON.stringify({data:this.host.data,template:this.host.template,src:this.host.src,track:this.host.track,burnCaptions:this.host.burnCaptions});if(this._lastDeps&&this._memoKey===t)return this._lastDeps;const e=[this.host.data,this.host.template,this.host.src,this.host.track,this.host.burnCaptions];return this._memoKey=t,this._lastDeps=e,e})}_setVideoCurrentTime({time:t,scene:e}){const{start:i,video:s,videoMeta:n}=e;if(s&&s.node&&n&&typeof i<"u"){const a=t-i;s.node.currentTime=Math.max(n.start,Math.min(n.start+n.duration,a+n.start))}}setVideosCurrentTime(t){var e;(e=this.scenes)==null||e.scenes.forEach(i=>{this._setVideoCurrentTime({time:t,scene:i})})}_cleanupVideo(t){var e;const i=this.videos[t];i&&((e=i.hls)==null||e.destroy(),i.node.pause(),i.node.src="",Object.keys(i.listeners).forEach(s=>{var n;if((n=this.videos)!=null&&n[t]){const a=i.listeners[s];i.node.removeEventListener(s,a)}}),delete this.videos[t])}hostConnected(){this._setupTask()}hostDisconnected(){Object.keys(this.videos).forEach(t=>{this._cleanupVideo(t)}),this.videos={}}}function Fv(r){r.requestFullscreen?r.requestFullscreen():r.mozRequestFullScreen?r.mozRequestFullScreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen():r.msRequestFullscreen&&r.msRequestFullscreen()}function Nv(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}const ma=["progress","play-large","navigation","play","volume","current-time","duration","speed","captions","fullscreen"],Uv={id:"captions",event:"captions:click",label:"Closed Captions"},Bv={id:"fullscreen",event:"fullscreen:click",label:"Full Screen"},pc={title:"Playback Speed",items:[{id:"playback-rate-0.5",event:"playbackRate:click",label:"0.5x",value:.5},{id:"playback-rate-1",event:"playbackRate:click",label:"1.0x",value:1},{id:"playback-rate-1.5",event:"playbackRate:click",label:"1.5x",value:1.5},{id:"playback-rate-2",event:"playbackRate:click",label:"2.0x",value:2}]},Hv={id:"playbackRate",label:"Playback playbackRate",subItems:pc};class Gv extends Oo{constructor(t){if(super(t),this.element=null,this.observer=void 0,t.type!==Ji.ELEMENT)throw new Error("Resize directive must be used in an Element expression")}disconnected(){var t;(t=this.observer)==null||t.disconnect(),this.observer=void 0}reconnected(){var t;this.element&&((t=this.observer)==null||t.observe(this.element))}update(t,[e]){return this.isConnected&&!this.observer&&(this.observer=new ResizeObserver(e),this.element=t.element,this.observer.observe(this.element)),Ee}}const va=ts(Gv),ke={"red-120":"#feeded","red-130":"#fcd5d0","red-400":"#e84a4a","red-500":"#c51c3a","red-700":"#a21c39","red-800":"#850231","red-900":"#580A2D","teal-100":"#a5e9ed","teal-600":"#006776","purple-100":"#d7cfff","purple-700":"#5f2fe9","green-200":"#a4d7aa","green-500":"#38b319","green-800":"#2b3c2f","grey-100":"#f0f0f0","light-50":"rgba(255, 255, 255, .05)","light-100":"rgba(255, 255, 255, .1)","light-200":"rgba(255, 255, 255, .2)","light-400":"rgba(255, 255, 255, .4)","light-500":"rgba(255, 255, 255, .5)","light-640":"rgba(255, 255, 255, .64)","light-800":"rgba(255, 255, 255, .8)","light-1000":"#fff","dark-50":"rgba(0, 0, 0, .05)","dark-80":"rgba(0, 0, 0, .08)","dark-100":"rgba(0, 0, 0, .1)","dark-200":"rgba(0, 0, 0, .2)","dark-250":"rgba(0, 0, 0, .25)","dark-400":"rgba(0, 0, 0, .4)","dark-500":"rgba(0, 0, 0, .5)","dark-640":"rgba(0, 0, 0, .64)","dark-800":"rgba(0, 0, 0, .8)","dark-900":"rgba(0, 0, 0, .9)","dark-1000":"#000"},Vv={colors:ke,space:{xxs:".25rem",xs:".5rem",small:".75rem",medium:"1rem",large:"1.5rem",xl:"2.5rem"},sizes:{xxs:"1rem",xs:"1.5rem",small:"2rem",medium:"2.5rem",large:"3rem"},fontWeights:{regular:400,semibold:600},lineHeights:{small:1.1,medium:1.25,large:1.4},letterSpacings:{xxs:"-.04rem",xs:"-.03rem",small:"-.02rem",medium:"-.01rem",large:0},fontSizes:{micro:".625rem",small:".75rem",medium:".875rem",large:"1rem",xl:"1.25rem",xxl:"1.5rem",xxxl:"2rem",huge:"2.75rem"},fontFamilies:{sans:'Roobert, "Times New Roman", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,"Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',mono:'"Maison Neue Mono", Menlo, Monaco, Consolas, Liberation Mono, "Courier New", monospace'},borderWidths:{thin:".0625rem"},radii:{small:".25rem",medium:".5rem",large:".75rem",xl:"1rem"},shadows:{small:`.25rem .25rem .25rem ${ke["dark-100"]}`,medium:`0 .125rem .625rem ${ke["dark-100"]}`,large:`0 .25rem 1rem ${ke["dark-50"]}`,xl:`.25rem .25rem 1rem ${ke["dark-250"]}`,xxl:`0 .25rem 2rem ${ke["dark-100"]}`,xxxl:`.25rem .25rem 3rem ${ke["dark-250"]}`,toolbar:`0 -.625rem .625rem ${ke["dark-50"]}`,text:`0 0 .25rem ${ke["dark-250"]}`},timings:{fast:".1s",normal:".2s",slow:".3s"},easings:{linear:"linear"},focusOutline:{width:".2rem",color:ke["dark-400"]},iconSizes:{small:"0.75rem",medium:"1rem",large:"1.5rem"}},gc=Tu.flatten(Vv,{delimiter:"-"}),Kv=Object.keys(gc).map(r=>Ui(`:host { --${r}: ${gc[r]}; }`)),jv=r=>{class t extends r{firstUpdated(){const i=new FontFace("Roobert","url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-Regular.woff2)",{style:"normal",weight:"400"}),s=new FontFace("Roobert","url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-SemiBold.woff2)",{style:"normal",weight:"600"});document.fonts.add(i),document.fonts.add(s)}}return t.styles=[(r==null?void 0:r.styles)??[],Kv,jt`
|
208
191
|
:host {
|
209
192
|
font-family: var(--fontFamilies-sans);
|
210
193
|
font-size: var(--fontSizes-medium);
|
211
194
|
line-height: var(--lineHeights-medium);
|
212
195
|
font-weight: var(--fontWeights-regular);
|
213
196
|
}
|
214
|
-
`,
|
197
|
+
`,jt`
|
215
198
|
*,
|
216
199
|
*::before,
|
217
200
|
*::after,
|
@@ -285,12 +268,12 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
285
268
|
scroll-behavior: auto !important;
|
286
269
|
}
|
287
270
|
}
|
288
|
-
`],
|
289
|
-
class=${
|
271
|
+
`],t},yt=jv(Ei),Wv=(r,t)=>(typeof window<"u"&&(window.customElements.get(r)??window.customElements.define(r,t)),t),Yv=(r,t)=>{const{kind:e,elements:i}=t;return{kind:e,elements:i,finisher(s){typeof window<"u"&&(window.customElements.get(r)??window.customElements.define(r,s))}}},se=r=>t=>typeof t=="function"?Wv(r,t):Yv(r,t);class qv extends js{constructor(t){if(super(t),t.type!==Ji.ELEMENT)throw new Error("Resize directive must be used in an Element expression")}update(t,[e]){return e==null||e(t.element),Ee}}const mc=ts(qv);class zv{constructor(t){this.hiddenControls=[],this._measureRef=be(),this._prevControlsWidth=0,this._hideables={},this._showables={},this._onResize=e=>{var i,s,n;const a=this._measureRef.value,o=(n=(s=(i=e==null?void 0:e[0])==null?void 0:i.borderBoxSize)==null?void 0:s[0])==null?void 0:n.inlineSize;if(a&&o&&o!==this._prevControlsWidth){Object.keys(this._hideables).forEach(h=>{this._hideables[h].element.style.display=""}),Object.keys(this._showables).forEach(h=>{this._showables[h].element.style.display="none"});const l=[];for(;a.scrollWidth>a.offsetWidth;){const h=Object.keys(this._hideables).find(c=>this._hideables[c].hideIndex===l.length);if(h){const c=this._hideables[h].element;c&&(c.style.display="none"),l.push(h)}Object.keys(this._showables).forEach(c=>{this._showables[c].showOn.some(d=>l.includes(d))&&(this._showables[c].element.style.display="flex")})}this.hiddenControls=l,this._prevControlsWidth=o,this.host.requestUpdate()}},this.host=t}measure(){return Te(this._measureRef)}contain(){return va(this._onResize)}hide(t,e){return mc(i=>{this._hideables[t]={element:i,hideIndex:e}})}show(t,e){return mc(i=>{this._showables[t]={element:i,showOn:e}})}}function vc(r,t={}){const e=Math.max(0,r||0),i=Math.floor(e/3600),s=Math.floor(e%3600/60),n=Math.floor(e%3600%60),a=Math.floor(e%1*1e3);let o=i?`${i}:${`${s}`.padStart(2,"0")}:${`${n}`.padStart(2,"0")}`:`${s}:${`${n}`.padStart(2,"0")}`;return t.includeMs&&(o+=`:${`${a}`.padStart(3,"0")}`),o}var Xv=Object.defineProperty,Qv=Object.getOwnPropertyDescriptor,xi=(r,t,e,i)=>{for(var s=i>1?void 0:i?Qv(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&Xv(t,e,s),s};let We=class extends yt{constructor(){super(...arguments),this.active=!1,this.size="small",this.rounded="medium",this.weight="light"}render(){return st`<button
|
272
|
+
class=${wt({active:this.active,"size-tiny":this.size==="tiny","size-small":this.size==="small","size-large":this.size==="large","radius-medium":this.rounded==="medium","radius-full":this.rounded==="full","weight-light":this.weight==="light","weight-heavy":this.weight==="heavy"})}
|
290
273
|
>
|
291
274
|
<slot></slot>
|
292
|
-
${this.icon&&
|
293
|
-
</button>`}};
|
275
|
+
${this.icon&&st`<vmp-new-icon icon=${this.icon}></vmp-new-icon>`}
|
276
|
+
</button>`}};We.styles=[yt.styles??[],jt`
|
294
277
|
:host {
|
295
278
|
--button-color: var(--vu-button-color, var(--colors-dark-640));
|
296
279
|
--button-background: var(--vu-button-background, var(--colors-light-1000));
|
@@ -307,7 +290,7 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
307
290
|
padding: 0;
|
308
291
|
border: none;
|
309
292
|
cursor: pointer;
|
310
|
-
font-weight: var(--fontWeights-
|
293
|
+
font-weight: var(--fontWeights-semibold);
|
311
294
|
pointer-events: all;
|
312
295
|
transition: background 150ms ease;
|
313
296
|
|
@@ -366,37 +349,37 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
366
349
|
.weight-light:focus {
|
367
350
|
background: #9d9d9d;
|
368
351
|
}
|
369
|
-
`],
|
352
|
+
`],xi([j({type:Boolean})],We.prototype,"active",2),xi([j({type:String})],We.prototype,"size",2),xi([j({type:String})],We.prototype,"rounded",2),xi([j({type:String})],We.prototype,"weight",2),xi([j({type:String})],We.prototype,"icon",2),We=xi([se("vmp-new-button")],We);const yc={"arrow-left":()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
370
353
|
<path
|
371
354
|
d="M16.6666 9.21875H6.52492L11.1833 4.85156L9.99992 3.75L3.33325 10L9.99992 16.25L11.1749 15.1484L6.52492 10.7812H16.6666V9.21875Z"
|
372
355
|
fill="currentColor"
|
373
356
|
/>
|
374
|
-
</svg>`,"arrow-right":()=>
|
357
|
+
</svg>`,"arrow-right":()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
375
358
|
<path
|
376
359
|
d="M3.75 9.21875H13.2578L8.89062 4.85156L10 3.75L16.25 10L10 16.25L8.89844 15.1484L13.2578 10.7812H3.75V9.21875Z"
|
377
360
|
fill="currentColor"
|
378
361
|
/>
|
379
|
-
</svg>`,"captions-cross":()=>
|
362
|
+
</svg>`,"captions-cross":()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
380
363
|
<path
|
381
364
|
d="M17.0625 19.4167L14.3125 16.6667H3.33333C2.875 16.6667 2.4825 16.5036 2.15583 16.1775C1.82972 15.8509 1.66667 15.4584 1.66667 15V4.16669C1.66667 4.13891 1.66667 4.11446 1.66667 4.09335C1.66667 4.0728 1.66667 4.04863 1.66667 4.02085L0.5625 2.91669L1.75 1.72919L18.25 18.2292L17.0625 19.4167ZM18.3333 15.9375L14.7083 12.3125C14.8056 12.2431 14.8786 12.1495 14.9275 12.0317C14.9758 11.9134 15 11.7917 15 11.6667V10.8334H13.75V11.25H13.6458L12.0833 9.68752V8.75002H13.75V9.16669H15V8.33335C15 8.09724 14.92 7.89919 14.76 7.73919C14.6006 7.57974 14.4028 7.50002 14.1667 7.50002H11.6667C11.4306 7.50002 11.2328 7.57974 11.0733 7.73919C10.9133 7.89919 10.8333 8.09724 10.8333 8.33335V8.43752L5.72917 3.33335H16.6667C17.125 3.33335 17.5175 3.49669 17.8442 3.82335C18.1703 4.14946 18.3333 4.54169 18.3333 5.00002V15.9375ZM5.83333 12.5H8.33333C8.56944 12.5 8.7675 12.42 8.9275 12.26C9.08694 12.1006 9.16667 11.9028 9.16667 11.6667V11.5209L8.47917 10.8334H7.91667V11.25H6.25V8.60419L5.3125 7.66669C5.21528 7.73613 5.13889 7.82974 5.08333 7.94752C5.02778 8.06585 5 8.19446 5 8.33335V11.6667C5 11.9028 5.07972 12.1006 5.23917 12.26C5.39917 12.42 5.59722 12.5 5.83333 12.5Z"
|
382
365
|
fill="currentColor"
|
383
366
|
/>
|
384
|
-
</svg>`,captions:()=>
|
367
|
+
</svg>`,captions:()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
385
368
|
<path
|
386
369
|
d="M5.83342 12.5H8.33342C8.56953 12.5 8.76758 12.42 8.92758 12.26C9.08703 12.1005 9.16675 11.9028 9.16675 11.6666V10.8333H7.91675V11.25H6.25008V8.74998H7.91675V9.16665H9.16675V8.33331C9.16675 8.0972 9.08703 7.89915 8.92758 7.73915C8.76758 7.5797 8.56953 7.49998 8.33342 7.49998H5.83342C5.5973 7.49998 5.39925 7.5797 5.23925 7.73915C5.0798 7.89915 5.00008 8.0972 5.00008 8.33331V11.6666C5.00008 11.9028 5.0798 12.1005 5.23925 12.26C5.39925 12.42 5.5973 12.5 5.83342 12.5ZM11.6667 12.5H14.1667C14.4029 12.5 14.6006 12.42 14.7601 12.26C14.9201 12.1005 15.0001 11.9028 15.0001 11.6666V10.8333H13.7501V11.25H12.0834V8.74998H13.7501V9.16665H15.0001V8.33331C15.0001 8.0972 14.9201 7.89915 14.7601 7.73915C14.6006 7.5797 14.4029 7.49998 14.1667 7.49998H11.6667C11.4306 7.49998 11.2329 7.5797 11.0734 7.73915C10.9134 7.89915 10.8334 8.0972 10.8334 8.33331V11.6666C10.8334 11.9028 10.9134 12.1005 11.0734 12.26C11.2329 12.42 11.4306 12.5 11.6667 12.5ZM3.33341 16.6666C2.87508 16.6666 2.48258 16.5036 2.15591 16.1775C1.8298 15.8508 1.66675 15.4583 1.66675 15V4.99998C1.66675 4.54165 1.8298 4.14942 2.15591 3.82331C2.48258 3.49665 2.87508 3.33331 3.33341 3.33331H16.6667C17.1251 3.33331 17.5176 3.49665 17.8442 3.82331C18.1704 4.14942 18.3334 4.54165 18.3334 4.99998V15C18.3334 15.4583 18.1704 15.8508 17.8442 16.1775C17.5176 16.5036 17.1251 16.6666 16.6667 16.6666H3.33341Z"
|
387
370
|
fill="currentColor"
|
388
371
|
/>
|
389
|
-
</svg>`,"chevron-down":()=>
|
372
|
+
</svg>`,"chevron-down":()=>st`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" part="svg">
|
390
373
|
<path
|
391
374
|
d="M11.8032 7.13666L10.8632 6.19666L7.80322 9.24999L4.74322 6.19666L3.80322 7.13666L7.80322 11.1367L11.8032 7.13666Z"
|
392
375
|
fill="currentColor"
|
393
376
|
/>
|
394
|
-
</svg>`,close:()=>
|
377
|
+
</svg>`,close:()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" part="svg">
|
395
378
|
<path
|
396
379
|
d="M15.8334 5.34163L14.6584 4.16663L10 8.82496L5.34169 4.16663L4.16669 5.34163L8.82502 9.99996L4.16669 14.6583L5.34169 15.8333L10 11.175L14.6584 15.8333L15.8334 14.6583L11.175 9.99996L15.8334 5.34163Z"
|
397
380
|
fill="currentColor"
|
398
381
|
/>
|
399
|
-
</svg>`,loading:()=>
|
382
|
+
</svg>`,loading:()=>st`<svg class="spinner" width="50" height="50" viewBox="0 0 50 50" part="svg">
|
400
383
|
<style>
|
401
384
|
/* SVG spinner icon animation */
|
402
385
|
.spinner {
|
@@ -456,62 +439,62 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
456
439
|
}
|
457
440
|
</style>
|
458
441
|
<circle class="path" cx="25" cy="25" r="20" fill="none" stroke-width="5" />
|
459
|
-
</svg>`,maximize:()=>
|
442
|
+
</svg>`,maximize:()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
460
443
|
<path
|
461
444
|
fill-rule="evenodd"
|
462
445
|
clip-rule="evenodd"
|
463
446
|
d="M6.66675 3.33331H3.33341H1.66675V4.99998V8.33331H3.33341V4.99998H6.66675V3.33331ZM6.66675 15H3.33341V11.6666H1.66675V15V16.6666H3.33341H6.66675V15ZM13.3334 3.33331H16.6667H18.3334V4.99998V8.33331H16.6667V4.99998H13.3334V3.33331ZM16.6667 15H13.3334V16.6666H16.6667H18.3334V15V11.6666H16.6667V15Z"
|
464
447
|
fill="currentColor"
|
465
448
|
/>
|
466
|
-
</svg>`,minimize:()=>
|
449
|
+
</svg>`,minimize:()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
467
450
|
<path
|
468
451
|
fill-rule="evenodd"
|
469
452
|
clip-rule="evenodd"
|
470
453
|
d="M5.00008 3.33331H6.66675V6.66665V8.33331H5.00008H1.66675V6.66665H5.00008V3.33331ZM5.00008 11.6666H1.66675V13.3333H5.00008V16.6666H6.66675V13.3333V11.6666H5.00008ZM15.0001 6.66665H18.3334V8.33331H15.0001H13.3334V6.66665V3.33331H15.0001V6.66665ZM18.3334 11.6666H15.0001H13.3334V13.3333V16.6666H15.0001V13.3333H18.3334V11.6666Z"
|
471
454
|
fill="currentColor"
|
472
455
|
/>
|
473
|
-
</svg>`,muted:()=>
|
456
|
+
</svg>`,muted:()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
474
457
|
<path
|
475
458
|
d="M13.75 10C13.75 8.525 12.9 7.25833 11.6667 6.64167V8.48333L13.7083 10.525C13.7333 10.3583 13.75 10.1833 13.75 10ZM15.8333 10C15.8333 10.7833 15.6667 11.5167 15.3833 12.2L16.6417 13.4583C17.1917 12.425 17.5 11.25 17.5 10C17.5 6.43333 15.0083 3.45 11.6667 2.69167V4.40833C14.075 5.125 15.8333 7.35833 15.8333 10ZM3.55833 2.5L2.5 3.55833L6.44167 7.5H2.5V12.5H5.83333L10 16.6667V11.0583L13.5417 14.6C12.9833 15.0333 12.3583 15.375 11.6667 15.5833V17.3C12.8167 17.0417 13.8583 16.5083 14.7417 15.7917L16.4417 17.5L17.5 16.4417L10 8.94167L3.55833 2.5ZM10 3.33333L8.25833 5.075L10 6.81667V3.33333Z"
|
476
459
|
fill="currentColor"
|
477
460
|
/>
|
478
|
-
</svg>`,pause:()=>
|
461
|
+
</svg>`,pause:()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
479
462
|
<path
|
480
463
|
fill-rule="evenodd"
|
481
464
|
clip-rule="evenodd"
|
482
465
|
d="M8.33333 2.5H5V17.5H8.33333V2.5ZM15 2.5H11.6667V17.5H15V2.5Z"
|
483
466
|
fill="currentColor"
|
484
467
|
/>
|
485
|
-
</svg>`,"play-large":()=>
|
468
|
+
</svg>`,"play-large":()=>st`<svg width="45" height="53" viewBox="0 0 45 53" fill="none" part="svg">
|
486
469
|
<path
|
487
470
|
d="M43.5 23.8319C45.5 25.0083 45.5 27.9492 43.5 29.1256L4.5 52.0647C2.5 53.2411 0 51.7706 0 49.4179V3.53961C0 1.18687 2.5 -0.283582 4.5 0.892785L43.5 23.8319Z"
|
488
471
|
fill="currentColor"
|
489
472
|
/>
|
490
|
-
</svg>`,play:()=>
|
473
|
+
</svg>`,play:()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
491
474
|
<path d="M17.3803 9.99998L5.83325 16.6666V3.33331L17.3803 9.99998Z" fill="currentColor" />
|
492
|
-
</svg>`,settings:()=>
|
475
|
+
</svg>`,settings:()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
493
476
|
<path
|
494
477
|
d="M7.70833 18.3334L7.375 15.6667C7.19445 15.5972 7.02444 15.5139 6.865 15.4167C6.705 15.3195 6.54861 15.2153 6.39583 15.1042L3.91667 16.1459L1.625 12.1875L3.77083 10.5625C3.75694 10.4653 3.75 10.3714 3.75 10.2809C3.75 10.1909 3.75 10.0972 3.75 10C3.75 9.9028 3.75 9.80891 3.75 9.71835C3.75 9.62835 3.75694 9.53474 3.77083 9.43752L1.625 7.81252L3.91667 3.85419L6.39583 4.89585C6.54861 4.78474 6.70833 4.68058 6.875 4.58335C7.04167 4.48613 7.20833 4.4028 7.375 4.33335L7.70833 1.66669H12.2917L12.625 4.33335C12.8056 4.4028 12.9758 4.48613 13.1358 4.58335C13.2953 4.68058 13.4514 4.78474 13.6042 4.89585L16.0833 3.85419L18.375 7.81252L16.2292 9.43752C16.2431 9.53474 16.25 9.62835 16.25 9.71835C16.25 9.80891 16.25 9.9028 16.25 10C16.25 10.0972 16.25 10.1909 16.25 10.2809C16.25 10.3714 16.2361 10.4653 16.2083 10.5625L18.3542 12.1875L16.0625 16.1459L13.6042 15.1042C13.4514 15.2153 13.2917 15.3195 13.125 15.4167C12.9583 15.5139 12.7917 15.5972 12.625 15.6667L12.2917 18.3334H7.70833ZM10.0417 12.9167C10.8472 12.9167 11.5347 12.632 12.1042 12.0625C12.6736 11.4931 12.9583 10.8056 12.9583 10C12.9583 9.19447 12.6736 8.50696 12.1042 7.93752C11.5347 7.36808 10.8472 7.08335 10.0417 7.08335C9.22222 7.08335 8.53111 7.36808 7.96833 7.93752C7.40611 8.50696 7.125 9.19447 7.125 10C7.125 10.8056 7.40611 11.4931 7.96833 12.0625C8.53111 12.632 9.22222 12.9167 10.0417 12.9167ZM10.0417 11.25C9.69445 11.25 9.39945 11.1284 9.15667 10.885C8.91333 10.6422 8.79167 10.3472 8.79167 10C8.79167 9.6528 8.91333 9.3578 9.15667 9.11502C9.39945 8.87169 9.69445 8.75002 10.0417 8.75002C10.3889 8.75002 10.6842 8.87169 10.9275 9.11502C11.1703 9.3578 11.2917 9.6528 11.2917 10C11.2917 10.3472 11.1703 10.6422 10.9275 10.885C10.6842 11.1284 10.3889 11.25 10.0417 11.25ZM9.16667 16.6667H10.8125L11.1042 14.4584C11.5347 14.3472 11.9342 14.1839 12.3025 13.9684C12.6703 13.7534 13.0069 13.4931 13.3125 13.1875L15.375 14.0417L16.1875 12.625L14.3958 11.2709C14.4653 11.0764 14.5139 10.8714 14.5417 10.6559C14.5694 10.4409 14.5833 10.2222 14.5833 10C14.5833 9.7778 14.5694 9.55891 14.5417 9.34335C14.5139 9.12835 14.4653 8.92363 14.3958 8.72919L16.1875 7.37502L15.375 5.95835L13.3125 6.83335C13.0069 6.51391 12.6703 6.24641 12.3025 6.03085C11.9342 5.81585 11.5347 5.6528 11.1042 5.54169L10.8333 3.33335H9.1875L8.89583 5.54169C8.46528 5.6528 8.06611 5.81585 7.69833 6.03085C7.33 6.24641 6.99306 6.50697 6.6875 6.81252L4.625 5.95835L3.8125 7.37502L5.60417 8.70835C5.53472 8.91669 5.48611 9.12502 5.45833 9.33335C5.43056 9.54169 5.41667 9.76391 5.41667 10C5.41667 10.2222 5.43056 10.4375 5.45833 10.6459C5.48611 10.8542 5.53472 11.0625 5.60417 11.2709L3.8125 12.625L4.625 14.0417L6.6875 13.1667C6.99306 13.4861 7.33 13.7534 7.69833 13.9684C8.06611 14.1839 8.46528 14.3472 8.89583 14.4584L9.16667 16.6667Z"
|
495
478
|
fill="currentColor"
|
496
479
|
/>
|
497
|
-
</svg>`,tick:()=>
|
480
|
+
</svg>`,tick:()=>st`<svg width="20" height="21" viewBox="0 0 20 21" fill="none" part="svg">
|
498
481
|
<path
|
499
482
|
d="M7.50016 14.0001L4.00016 10.5001L2.8335 11.6667L7.50016 16.3334L17.5002 6.33341L16.3335 5.16675L7.50016 14.0001Z"
|
500
483
|
fill="currentColor"
|
501
484
|
/>
|
502
|
-
</svg>`,"volume-high":()=>
|
485
|
+
</svg>`,"volume-high":()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
503
486
|
<path
|
504
487
|
d="M2.5 7.49998V12.5H5.83333L10 16.6667V3.33332L5.83333 7.49998H2.5ZM13.75 9.99998C13.75 8.52498 12.9 7.25832 11.6667 6.64165V13.35C12.9 12.7417 13.75 11.475 13.75 9.99998ZM11.6667 2.69165V4.40832C14.075 5.12498 15.8333 7.35832 15.8333 9.99998C15.8333 12.6417 14.075 14.875 11.6667 15.5917V17.3083C15.0083 16.55 17.5 13.5667 17.5 9.99998C17.5 6.43332 15.0083 3.44998 11.6667 2.69165Z"
|
505
488
|
fill="currentColor"
|
506
489
|
/>
|
507
|
-
</svg>`,"volume-low":()=>
|
490
|
+
</svg>`,"volume-low":()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
508
491
|
<path d="M5.83325 7.49998V12.5H9.16658L13.3333 16.6666V3.33331L9.16658 7.49998H5.83325Z" fill="currentColor" />
|
509
|
-
</svg>`,"volume-medium":()=>
|
492
|
+
</svg>`,"volume-medium":()=>st`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" part="svg">
|
510
493
|
<path
|
511
494
|
d="M15.4167 9.99998C15.4167 8.52498 14.5667 7.25831 13.3334 6.64165V13.35C14.5667 12.7416 15.4167 11.475 15.4167 9.99998ZM4.16675 7.49998V12.5H7.50008L11.6667 16.6666V3.33331L7.50008 7.49998H4.16675Z"
|
512
495
|
fill="currentColor"
|
513
496
|
/>
|
514
|
-
</svg>`,vouch:()=>
|
497
|
+
</svg>`,vouch:()=>st`<svg
|
515
498
|
xmlns="http://www.w3.org/2000/svg"
|
516
499
|
height="28"
|
517
500
|
width="105"
|
@@ -522,26 +505,26 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
522
505
|
<path
|
523
506
|
d="M9.853 23.246L4.86 7.688H0L7 27.42h5.52l7.265-19.733h-4.65L9.854 23.246zM95.12 7.08a8.905 8.905 0 00-4.648 1.294V0H86.14v27.419h4.332V16.087a4.656 4.656 0 014.649-4.65 4.656 4.656 0 014.649 4.65v11.332h4.332V16.087c.026-4.966-4.015-9.008-8.981-9.008zM57.188 19.02a4.656 4.656 0 01-4.649 4.649 4.656 4.656 0 01-4.649-4.65V7.689h-4.332V19.02c0 4.966 4.041 8.98 8.981 8.98 4.94 0 8.981-4.04 8.981-8.98V7.688h-4.332V19.02zM30.483 7.133c-5.732 0-10.408 4.675-10.408 10.407s4.676 10.408 10.408 10.408c5.732 0 10.408-4.676 10.408-10.408 0-5.732-4.676-10.407-10.408-10.407zm0 16.483a6.076 6.076 0 116.075-6.076c0 3.355-2.747 6.076-6.075 6.076zM74.517 23.616a6.076 6.076 0 010-12.151 6.132 6.132 0 015.045 2.668l3.592-2.43a10.473 10.473 0 00-8.637-4.57c-5.732 0-10.408 4.675-10.408 10.407s4.676 10.408 10.408 10.408a10.35 10.35 0 008.611-4.596l-3.593-2.43a5.975 5.975 0 01-5.018 2.694z"
|
524
507
|
/>
|
525
|
-
</svg>`};var
|
508
|
+
</svg>`};var Zv=Object.defineProperty,Jv=Object.getOwnPropertyDescriptor,Ec=(r,t,e,i)=>{for(var s=i>1?void 0:i?Jv(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&Zv(t,e,s),s};let br=class extends yt{render(){return!this.icon||!Object.keys(yc).includes(this.icon)?null:yc[this.icon]()}};br.styles=[yt.styles??[],jt`
|
526
509
|
:host {
|
527
510
|
display: flex;
|
528
511
|
align-items: center;
|
529
512
|
justify-content: center;
|
530
513
|
flex-shrink: 0;
|
531
514
|
}
|
532
|
-
`],
|
533
|
-
<vmp-button
|
515
|
+
`],Ec([j({type:String})],br.prototype,"icon",2),br=Ec([se("vmp-new-icon")],br);var t0=Object.defineProperty,e0=Object.getOwnPropertyDescriptor,Pi=(r,t,e,i)=>{for(var s=i>1?void 0:i?e0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&t0(t,e,s),s};let Ye=class extends yt{constructor(){super(...arguments),this.active=!1,this.size="small",this.rounded="medium",this.weight="light"}render(){return st`
|
516
|
+
<vmp-new-button
|
534
517
|
?active=${this.active}
|
535
|
-
size=${
|
536
|
-
rounded=${
|
537
|
-
weight=${
|
518
|
+
size=${es(this.size)}
|
519
|
+
rounded=${es(this.rounded)}
|
520
|
+
weight=${es(this.weight)}
|
538
521
|
>
|
539
|
-
<vmp-icon
|
540
|
-
class=${
|
541
|
-
icon=${
|
542
|
-
></vmp-icon>
|
543
|
-
</vmp-button>
|
544
|
-
`}};
|
522
|
+
<vmp-new-icon
|
523
|
+
class=${wt({tiny:this.size==="tiny",small:this.size==="small",large:this.size==="large"})}
|
524
|
+
icon=${es(this.icon)}
|
525
|
+
></vmp-new-icon>
|
526
|
+
</vmp-new-button>
|
527
|
+
`}};Ye.styles=[yt.styles??[],jt`
|
545
528
|
.tiny::part(svg) {
|
546
529
|
height: 12px;
|
547
530
|
width: 12px;
|
@@ -556,15 +539,15 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
556
539
|
height: 32px;
|
557
540
|
width: 32px;
|
558
541
|
}
|
559
|
-
`],
|
560
|
-
`;var
|
542
|
+
`],Pi([j({type:Boolean})],Ye.prototype,"active",2),Pi([j({type:String})],Ye.prototype,"size",2),Pi([j({type:String})],Ye.prototype,"rounded",2),Pi([j({type:String})],Ye.prototype,"weight",2),Pi([j({type:String})],Ye.prototype,"icon",2),Ye=Pi([se("vmp-new-icon-button")],Ye);const ya=`.tippy-box[data-animation=shift-away-subtle][data-state=hidden]{opacity:0}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=top]{transform:translateY(5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=bottom]{transform:translateY(-5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=left]{transform:translate(5px)}.tippy-box[data-animation=shift-away-subtle][data-state=hidden][data-placement^=right]{transform:translate(-5px)}
|
543
|
+
`;var i0=Object.defineProperty,s0=Object.getOwnPropertyDescriptor,bs=(r,t,e,i)=>{for(var s=i>1?void 0:i?s0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&i0(t,e,s),s};let di=class extends yt{constructor(){super(...arguments),this.semibold=!1,this.truncate=!1,this.size="medium",this.content=""}render(){return st`
|
561
544
|
<div
|
562
545
|
part="content"
|
563
|
-
class=${
|
546
|
+
class=${wt({semibold:this.semibold,truncate:this.truncate,[this.size]:!0})}
|
564
547
|
>
|
565
548
|
${this.content}
|
566
549
|
</div>
|
567
|
-
`}};
|
550
|
+
`}};di.styles=[yt.styles??[],jt`
|
568
551
|
:host {
|
569
552
|
--text-size: var(--fontSizes-medium);
|
570
553
|
--text-line-height: var(--lineHeights-medium);
|
@@ -593,10 +576,6 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
593
576
|
--text-line-height: var(--lineHeights-large);
|
594
577
|
}
|
595
578
|
|
596
|
-
.bold {
|
597
|
-
--text-weight: var(--fontWeights-bold);
|
598
|
-
}
|
599
|
-
|
600
579
|
.semibold {
|
601
580
|
--text-weight: var(--fontWeights-semibold);
|
602
581
|
}
|
@@ -606,76 +585,33 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
606
585
|
text-overflow: ellipsis;
|
607
586
|
overflow: hidden;
|
608
587
|
}
|
609
|
-
`],
|
610
|
-
<span
|
611
|
-
${ct(this._textRef)}
|
612
|
-
${Tr(this._handleResize)}
|
613
|
-
style=${Yg({fontSize:`${this.fontSize}px`,lineHeight:Pa,"-webkit-line-clamp":this.lines})}
|
614
|
-
part="content"
|
615
|
-
class=${de({bold:this.bold,semibold:this.semibold})}
|
616
|
-
>
|
617
|
-
${this.content}
|
618
|
-
</span>
|
619
|
-
`}};xt.styles=[ae.styles??[],Fe`
|
620
|
-
:host {
|
621
|
-
--text-size: var(--fontSizes-medium);
|
622
|
-
--text-line-height: ${Pa};
|
623
|
-
--text-weight: var(--fontWeights-regular);
|
624
|
-
|
625
|
-
display: flex;
|
626
|
-
height: 100%;
|
627
|
-
width: 100%;
|
628
|
-
}
|
629
|
-
|
630
|
-
span {
|
631
|
-
position: relative;
|
632
|
-
display: block;
|
633
|
-
display: -webkit-box;
|
634
|
-
-webkit-box-orient: vertical;
|
635
|
-
height: 100%;
|
636
|
-
width: 100%;
|
637
|
-
overflow: hidden;
|
638
|
-
|
639
|
-
font-family: var(--fontFamilies-sans);
|
640
|
-
font-size: var(--text-size);
|
641
|
-
line-height: var(--text-line-height);
|
642
|
-
font-weight: var(--text-weight);
|
643
|
-
}
|
644
|
-
|
645
|
-
.bold {
|
646
|
-
--text-weight: var(--fontWeights-bold);
|
647
|
-
}
|
648
|
-
|
649
|
-
.semibold {
|
650
|
-
--text-weight: var(--fontWeights-semibold);
|
651
|
-
}
|
652
|
-
`],Vt([N({type:Boolean})],xt.prototype,"bold",2),Vt([N({type:Boolean})],xt.prototype,"semibold",2),Vt([N({type:String})],xt.prototype,"content",2),Vt([N({type:Number})],xt.prototype,"minFontSize",2),Vt([N({type:Number})],xt.prototype,"maxFontSize",2),Vt([Re()],xt.prototype,"fontSize",2),Vt([Re()],xt.prototype,"lines",2),xt=Vt([Xe("vmp-responsive-text")],xt);var wv=Object.defineProperty,Lv=Object.getOwnPropertyDescriptor,Ts=(r,e,t,i)=>{for(var s=i>1?void 0:i?Lv(e,t):e,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(e,t,s):a(s))||s);return i&&s&&wv(e,t,s),s};let li=class extends ae{constructor(){super(...arguments),this.activeItems=[],this.visibleItems=null,this.subItemsActive=null,this.tippy=null,this._contentRef=lt()}_handleBackClick(){this.subItemsActive=null,this.visibleItems=this.items??null}willUpdate(){this.visibleItems=this.visibleItems??this.items??null}updated(){var r,e;const t=(e=(r=this.items)==null?void 0:r.items.find(({id:i})=>this.subItemsActive===i))==null?void 0:e.subItems;this.visibleItems=t??this.items??null,t||(this.subItemsActive=null)}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{var r;const e=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),t=e==null?void 0:e.assignedElements()[0];t&&this._contentRef.value&&(this.tippy=oi(t,{content:this._contentRef.value,allowHTML:!0,arrow:!1,animation:"shift-away-subtle",interactive:!0,placement:"top",trigger:"click",onShow:()=>{this.dispatchEvent(new CustomEvent("menu:toggle",{detail:!0}))},onHide:()=>{this.dispatchEvent(new CustomEvent("menu:toggle",{detail:!1}))},appendTo:()=>this.shadowRoot}))})}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.tippy)==null||r.destroy()}render(){var r,e;return Q`
|
588
|
+
`],bs([j({type:Boolean})],di.prototype,"semibold",2),bs([j({type:Boolean})],di.prototype,"truncate",2),bs([j({type:String})],di.prototype,"size",2),bs([j({type:String})],di.prototype,"content",2),di=bs([se("vmp-new-text")],di);var r0=Object.defineProperty,n0=Object.getOwnPropertyDescriptor,Ts=(r,t,e,i)=>{for(var s=i>1?void 0:i?n0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&r0(t,e,s),s};let ui=class extends yt{constructor(){super(...arguments),this.activeItems=[],this.visibleItems=null,this.subItemsActive=null,this.tippy=null,this._contentRef=be()}_handleBackClick(){this.subItemsActive=null,this.visibleItems=this.items??null}willUpdate(){this.visibleItems=this.visibleItems??this.items??null}updated(){var r,t;const e=(t=(r=this.items)==null?void 0:r.items.find(({id:i})=>this.subItemsActive===i))==null?void 0:t.subItems;this.visibleItems=e??this.items??null,e||(this.subItemsActive=null)}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{var r;const t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),e=t==null?void 0:t.assignedElements()[0];e&&this._contentRef.value&&(this.tippy=ai(e,{content:this._contentRef.value,allowHTML:!0,arrow:!1,animation:"shift-away-subtle",interactive:!0,placement:"top",trigger:"click",onShow:()=>{this.dispatchEvent(new CustomEvent("menu:toggle",{detail:!0}))},onHide:()=>{this.dispatchEvent(new CustomEvent("menu:toggle",{detail:!1}))},appendTo:()=>this.shadowRoot}))})}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.tippy)==null||r.destroy()}render(){var r,t;return st`
|
653
589
|
<slot></slot>
|
654
|
-
<div ${
|
590
|
+
<div ${Te(this._contentRef)} class="content">
|
655
591
|
<div class="title">
|
656
|
-
${this.subItemsActive?
|
592
|
+
${this.subItemsActive?st`
|
657
593
|
<button class="back" @click=${this._handleBackClick}>
|
658
|
-
<vmp-icon icon="chevron-down"></vmp-icon>
|
594
|
+
<vmp-new-icon icon="chevron-down"></vmp-new-icon>
|
659
595
|
</button>
|
660
596
|
`:null}
|
661
|
-
<vmp-text
|
597
|
+
<vmp-new-text
|
662
598
|
?bold=${!0}
|
663
599
|
?truncate=${!0}
|
664
600
|
size="small"
|
665
601
|
.content=${((r=this.visibleItems)==null?void 0:r.title)??"Sub Menu"}
|
666
|
-
></vmp-text>
|
602
|
+
></vmp-new-text>
|
667
603
|
</div>
|
668
|
-
${
|
604
|
+
${Uo(((t=this.visibleItems)==null?void 0:t.items)??[],({id:e})=>e,e=>st`
|
669
605
|
<button
|
670
606
|
class="item"
|
671
|
-
@click=${()=>{
|
607
|
+
@click=${()=>{e.subItems&&(this.subItemsActive=e.id,this.visibleItems=e.subItems),e.event&&this.dispatchEvent(new CustomEvent(e.event,{detail:e,bubbles:!0,composed:!0}))}}
|
672
608
|
>
|
673
|
-
<vmp-text ?
|
674
|
-
${
|
609
|
+
<vmp-new-text ?semibold=${!0} size="small" content=${e.label}></vmp-new-text>
|
610
|
+
${e.subItems?st`<vmp-new-icon class="forward" icon="chevron-down"></vmp-new-icon>`:this.activeItems.includes(e.id)?st`<vmp-new-icon icon="tick"></vmp-new-icon>`:null}
|
675
611
|
</button>
|
676
612
|
`)}
|
677
613
|
</div>
|
678
|
-
`}};
|
614
|
+
`}};ui.styles=[yt.styles??[],Ui(ya),jt`
|
679
615
|
:host {
|
680
616
|
display: flex;
|
681
617
|
}
|
@@ -729,16 +665,16 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
729
665
|
padding: 0 var(--space-small);
|
730
666
|
}
|
731
667
|
|
732
|
-
vmp-icon::part(svg) {
|
668
|
+
vmp-new-icon::part(svg) {
|
733
669
|
height: 20px;
|
734
670
|
width: 20px;
|
735
671
|
}
|
736
|
-
`],Ts([
|
672
|
+
`],Ts([j({type:Object})],ui.prototype,"items",2),Ts([j({type:Array})],ui.prototype,"activeItems",2),Ts([Wt()],ui.prototype,"visibleItems",2),Ts([Wt()],ui.prototype,"subItemsActive",2),ui=Ts([se("vmp-new-menu")],ui);var a0=Object.defineProperty,o0=Object.getOwnPropertyDescriptor,Ea=(r,t,e,i)=>{for(var s=i>1?void 0:i?o0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&a0(t,e,s),s};let As=class extends yt{constructor(){super(...arguments),this.content="",this.disabled=!1,this.tippy=null,this._contentRef=be()}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{var r;const t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),e=t==null?void 0:t.assignedElements()[0];e&&this._contentRef.value&&(this.tippy=ai(e,{content:this._contentRef.value,allowHTML:!0,arrow:!1,animation:"shift-away-subtle",interactive:!1,placement:"top",zIndex:1e4,appendTo:()=>this.shadowRoot}))})}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.tippy)==null||r.destroy()}updated(){var r,t;this.disabled?(r=this.tippy)==null||r.disable():(t=this.tippy)==null||t.enable()}render(){return st`
|
737
673
|
<slot></slot>
|
738
|
-
<div ${
|
739
|
-
<vmp-text content=${this.content}></vmp-text>
|
674
|
+
<div ${Te(this._contentRef)} class="content">
|
675
|
+
<vmp-new-text content=${this.content}></vmp-new-text>
|
740
676
|
</div>
|
741
|
-
`}};
|
677
|
+
`}};As.styles=[yt.styles??[],Ui(ya),jt`
|
742
678
|
:host {
|
743
679
|
display: flex;
|
744
680
|
}
|
@@ -752,19 +688,19 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
752
688
|
background: var(--colors-dark-800);
|
753
689
|
border-radius: var(--radii-medium);
|
754
690
|
}
|
755
|
-
`],
|
756
|
-
<vmp-icon-button
|
757
|
-
${
|
691
|
+
`],Ea([j({type:String})],As.prototype,"content",2),Ea([j({type:Boolean})],As.prototype,"disabled",2),As=Ea([se("vmp-new-tooltip")],As);var l0=Object.defineProperty,h0=Object.getOwnPropertyDescriptor,ba=(r,t,e,i)=>{for(var s=i>1?void 0:i?h0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&l0(t,e,s),s};let ws=class extends yt{constructor(){super(...arguments),this.volume=1,this.muted=!1,this.tippy=null,this._contentRef=be(),this._anchorRef=be(),this._menuOpen=!1}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this._anchorRef.value&&this._contentRef.value&&(this.tippy=ai(this._anchorRef.value,{content:this._contentRef.value,allowHTML:!0,arrow:!1,animation:"shift-away-subtle",interactive:!0,placement:"top",interactiveBorder:20,onShow:()=>{this._menuOpen=!0,this.dispatchEvent(new CustomEvent("menu:toggle",{detail:!0}))},onHide:()=>{this._menuOpen=!1,this.dispatchEvent(new CustomEvent("menu:toggle",{detail:!1}))},appendTo:()=>this.shadowRoot}))})}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.tippy)==null||r.destroy()}render(){return st`
|
692
|
+
<vmp-new-icon-button
|
693
|
+
${Te(this._anchorRef)}
|
758
694
|
icon=${this.muted||this.volume===0?"muted":this.volume<1/3?"volume-low":this.volume<2/3?"volume-medium":"volume-high"}
|
759
695
|
weight="heavy"
|
760
696
|
rounded="full"
|
761
697
|
@pointerdown=${r=>{this._menuOpen&&r.preventDefault()}}
|
762
698
|
@click=${()=>{this._menuOpen&&this.dispatchEvent(new CustomEvent("volume:click",{bubbles:!0,composed:!0,detail:this.muted}))}}
|
763
|
-
></vmp-icon-button>
|
764
|
-
<div ${
|
699
|
+
></vmp-new-icon-button>
|
700
|
+
<div ${Te(this._contentRef)} class="content">
|
765
701
|
<input key="volume" type="range" min="0" max="1" step="0.01" .value=${this.volume.toString()} />
|
766
702
|
</div>
|
767
|
-
`}};
|
703
|
+
`}};ws.styles=[yt.styles??[],Ui(ya),jt`
|
768
704
|
.content {
|
769
705
|
--volume-slider-height: 4px;
|
770
706
|
--volume-slider-width: 78px;
|
@@ -892,7 +828,7 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
892
828
|
--volume-slider-height: 8px;
|
893
829
|
color: var(--colors-light-800);
|
894
830
|
}
|
895
|
-
`],
|
831
|
+
`],ba([j({type:Number})],ws.prototype,"volume",2),ba([j({type:Boolean})],ws.prototype,"muted",2),ws=ba([se("vmp-new-volume-button")],ws);var c0=Object.defineProperty,d0=Object.getOwnPropertyDescriptor,Tr=(r,t,e,i)=>{for(var s=i>1?void 0:i?d0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&c0(t,e,s),s};let Oi=class extends yt{constructor(){super(...arguments),this.duration=0,this.currentTime=0,this.buffer=[]}render(){var r;const t=((r=this.buffer)==null?void 0:r.sort((e,i)=>e.start<i.start?-1:i.start<e.start?1:0).reduce((e,{start:i,end:s},n)=>{const a=e[n-1],o=Math.floor(i),l=Math.ceil(s);return e.push({id:i,start:Math.max(0,o),end:Math.min(l,100)}),a&&a.end>=i-1&&(e[n].start=a.end),e},[]))??[];return st`
|
896
832
|
<div class="container">
|
897
833
|
<input
|
898
834
|
key="scrubber"
|
@@ -904,11 +840,11 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
904
840
|
.value=${this.currentTime.toString()}
|
905
841
|
data-testid="scrubber"
|
906
842
|
/>
|
907
|
-
${
|
908
|
-
<div class="buffer" style=${`left: ${
|
843
|
+
${Uo(t,({id:e})=>e,e=>st`
|
844
|
+
<div class="buffer" style=${`left: ${e.start}%; width: ${e.end-e.start}%`}></div>
|
909
845
|
`)}
|
910
846
|
</div>
|
911
|
-
`}};
|
847
|
+
`}};Oi.styles=[yt.styles??[],jt`
|
912
848
|
:host {
|
913
849
|
--player-scrubber-height: 8px;
|
914
850
|
--player-scrubber-shadow-width: 4000px;
|
@@ -1041,137 +977,143 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
1041
977
|
--player-scrubber-height: 16px;
|
1042
978
|
color: var(--colors-light-800);
|
1043
979
|
}
|
1044
|
-
`],
|
980
|
+
`],Tr([j({type:Number})],Oi.prototype,"duration",2),Tr([j({type:Number})],Oi.prototype,"currentTime",2),Tr([j({type:Array})],Oi.prototype,"buffer",2),Oi=Tr([se("vmp-new-progress-scrubber")],Oi);var u0=Object.defineProperty,f0=Object.getOwnPropertyDescriptor,Bt=(r,t,e,i)=>{for(var s=i>1?void 0:i?f0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&u0(t,e,s),s};let Pt=class extends yt{constructor(){super(...arguments),this.resizeHider=new zv(this),this.playing=!1,this.volume=1,this.muted=!1,this.currentTime=0,this.duration=0,this.level=-1,this.playbackRate=1,this.buffer=[],this.levels=[],this.captions=!1,this.fullscreen=!1,this.controls=ma,this.volumeMenuOpen=!1,this.levelsMenuOpen=!1,this.playbackRateMenuOpen=!1,this.settingsMenuOpen=!1}_handleNavigateBackClick(){this.dispatchEvent(new CustomEvent("navigate:back",{bubbles:!0,composed:!0}))}_handleNavigateForwardClick(){this.dispatchEvent(new CustomEvent("navigate:forward",{bubbles:!0,composed:!0}))}_handlePlayClick(){this.dispatchEvent(new CustomEvent("play:click",{bubbles:!0,composed:!0,detail:this.playing}))}_handleCaptionsClick(){this.dispatchEvent(new CustomEvent("captions:click",{bubbles:!0,composed:!0,detail:this.captions}))}_handleFullscreenClick(){this.dispatchEvent(new CustomEvent("fullscreen:click",{bubbles:!0,composed:!0,detail:this.fullscreen}))}_handleVolumeMenuToggle({detail:r}){this.volumeMenuOpen=r}_handleLevelsMenuOpen({detail:r}){this.levelsMenuOpen=r}_handlePlaybackMenuToggle({detail:r}){this.playbackRateMenuOpen=r}_handleSettingsMenuToggle({detail:r}){this.settingsMenuOpen=r}hideMenus(){var r,t;(t=Array.from((r=this.shadowRoot)==null?void 0:r.querySelectorAll("vmp-new-menu, vmp-new-tooltip, vmp-new-volume-button")))==null||t.forEach(e=>{var i;(i=e.tippy)==null||i.hide()})}render(){var r,t,e,i,s,n,a,o,l,h,c,d,u;const f=((r=this.levels)==null?void 0:r.map((w,P)=>{const H=Math.min(w.width,w.height);return{id:`level-${P.toString()}`,event:"level:click",label:`${H}p`,value:{resolution:H,level:P}}}))??[],p={title:"Quality",items:[...f.reverse(),{id:"level--1",event:"level:click",label:"Auto",value:{level:-1,resolution:"auto"}}]},g={id:"levels",label:"Quality",subItems:p},v=(t=p.items)==null?void 0:t.find(({value:w})=>w.level===this.level),E=["levels","playback-rate","captions","fullscreen"].filter(w=>{var P;return(P=this.controls)==null?void 0:P.includes(w)}),A={title:"Settings",items:[Uv,Bv,g,Hv].filter(({id:w})=>E.includes(w)&&this.resizeHider.hiddenControls.includes(w))},L=(e=this.controls)==null?void 0:e.includes("progress"),y=(i=this.controls)==null?void 0:i.includes("navigation"),S=(s=this.controls)==null?void 0:s.includes("play"),R=(n=this.controls)==null?void 0:n.includes("volume"),D=(a=this.controls)==null?void 0:a.includes("current-time"),M=(o=this.controls)==null?void 0:o.includes("duration"),C=(l=this.controls)==null?void 0:l.includes("levels"),I=(h=this.controls)==null?void 0:h.includes("speed"),G=(c=this.controls)==null?void 0:c.includes("captions"),F=(d=this.controls)==null?void 0:d.includes("fullscreen"),V=S||R||D||M||C||I||G||F,q=[`level-${(u=this.level)==null?void 0:u.toString()}`,`playback-rate-${this.playbackRate.toString()}`,this.captions&&"captions",this.fullscreen&&"fullscreen"].filter(Boolean);return st`
|
1045
981
|
<div
|
1046
982
|
${this.resizeHider.measure()}
|
1047
983
|
${this.resizeHider.contain()}
|
1048
|
-
class=${
|
984
|
+
class=${wt({container:!0,hidden:!L&&!V})}
|
1049
985
|
>
|
1050
986
|
<div
|
1051
|
-
class=${
|
987
|
+
class=${wt({"scrubber-container":!0,hidden:!L})}
|
1052
988
|
>
|
1053
|
-
<vmp-progress-scrubber
|
1054
|
-
class=${
|
989
|
+
<vmp-new-progress-scrubber
|
990
|
+
class=${wt({scrubber:!0,invisible:this.volumeMenuOpen||this.levelsMenuOpen||this.playbackRateMenuOpen||this.settingsMenuOpen})}
|
1055
991
|
duration=${this.duration}
|
1056
992
|
currentTime=${this.currentTime}
|
1057
993
|
.buffer=${this.buffer}
|
1058
|
-
></vmp-progress-scrubber>
|
994
|
+
></vmp-new-progress-scrubber>
|
1059
995
|
</div>
|
1060
996
|
<div
|
1061
997
|
${this.resizeHider.contain()}
|
1062
|
-
class=${
|
998
|
+
class=${wt({buttons:!0,hidden:!V})}
|
1063
999
|
>
|
1064
1000
|
<div class="section">
|
1065
1001
|
<div
|
1066
1002
|
${this.resizeHider.hide("navigation",6)}
|
1067
|
-
class=${
|
1003
|
+
class=${wt({navigation:!0,hidden:!y})}
|
1068
1004
|
>
|
1069
|
-
<vmp-icon-button
|
1005
|
+
<vmp-new-icon-button
|
1070
1006
|
icon="arrow-left"
|
1071
1007
|
weight="heavy"
|
1072
1008
|
rounded="full"
|
1073
1009
|
@click=${this._handleNavigateBackClick}
|
1074
|
-
></vmp-icon-button>
|
1075
|
-
<vmp-icon-button
|
1010
|
+
></vmp-new-icon-button>
|
1011
|
+
<vmp-new-icon-button
|
1076
1012
|
icon="arrow-right"
|
1077
1013
|
weight="heavy"
|
1078
1014
|
rounded="full"
|
1079
1015
|
@click=${this._handleNavigateForwardClick}
|
1080
|
-
></vmp-icon-button>
|
1016
|
+
></vmp-new-icon-button>
|
1081
1017
|
</div>
|
1082
|
-
<vmp-icon-button
|
1083
|
-
class=${
|
1018
|
+
<vmp-new-icon-button
|
1019
|
+
class=${wt({hidden:!S})}
|
1084
1020
|
icon=${this.playing?"pause":"play"}
|
1085
1021
|
weight="heavy"
|
1086
1022
|
rounded="full"
|
1087
1023
|
data-testid="play"
|
1088
1024
|
@click=${this._handlePlayClick}
|
1089
|
-
></vmp-icon-button>
|
1090
|
-
<vmp-volume-button
|
1091
|
-
class=${
|
1025
|
+
></vmp-new-icon-button>
|
1026
|
+
<vmp-new-volume-button
|
1027
|
+
class=${wt({hidden:!R})}
|
1092
1028
|
?muted=${this.muted}
|
1093
1029
|
volume=${this.volume}
|
1094
1030
|
@menu:toggle=${this._handleVolumeMenuToggle}
|
1095
|
-
></vmp-volume-button>
|
1031
|
+
></vmp-new-volume-button>
|
1096
1032
|
<div class="time">
|
1097
|
-
<vmp-text
|
1033
|
+
<vmp-new-text
|
1098
1034
|
${this.resizeHider.hide("current-time",1)}
|
1099
|
-
class=${
|
1100
|
-
?
|
1101
|
-
content="${
|
1102
|
-
></vmp-text>
|
1103
|
-
<vmp-text
|
1035
|
+
class=${wt({hidden:!D})}
|
1036
|
+
?semibold=${!0}
|
1037
|
+
content="${vc(this.currentTime)}${M?"/":null}"
|
1038
|
+
></vmp-new-text>
|
1039
|
+
<vmp-new-text
|
1104
1040
|
${this.resizeHider.hide("duration",5)}
|
1105
|
-
class=${
|
1106
|
-
?
|
1107
|
-
content=${
|
1108
|
-
></vmp-text>
|
1041
|
+
class=${wt({hidden:!M})}
|
1042
|
+
?semibold=${!0}
|
1043
|
+
content=${vc(this.duration)}
|
1044
|
+
></vmp-new-text>
|
1109
1045
|
</div>
|
1110
1046
|
</div>
|
1111
1047
|
<div class="section">
|
1112
|
-
<vmp-menu
|
1048
|
+
<vmp-new-menu
|
1113
1049
|
${this.resizeHider.hide("levels",0)}
|
1114
|
-
class=${
|
1050
|
+
class=${wt({hidden:!C||f.length<=0})}
|
1115
1051
|
.items=${p}
|
1116
|
-
.activeItems=${
|
1052
|
+
.activeItems=${q}
|
1117
1053
|
@menu:toggle=${this._handleLevelsMenuOpen}
|
1118
1054
|
>
|
1119
|
-
<vmp-tooltip content="Quality" ?disabled=${this.levelsMenuOpen}>
|
1120
|
-
<vmp-button ?active=${this.levelsMenuOpen} icon="chevron-down"
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1055
|
+
<vmp-new-tooltip content="Quality" ?disabled=${this.levelsMenuOpen}>
|
1056
|
+
<vmp-new-button ?active=${this.levelsMenuOpen} icon="chevron-down"
|
1057
|
+
>${v==null?void 0:v.label}</vmp-new-button
|
1058
|
+
>
|
1059
|
+
</vmp-new-tooltip>
|
1060
|
+
</vmp-new-menu>
|
1061
|
+
<vmp-new-menu
|
1124
1062
|
${this.resizeHider.hide("playback-rate",4)}
|
1125
|
-
class=${
|
1126
|
-
.items=${
|
1127
|
-
.activeItems=${
|
1063
|
+
class=${wt({hidden:!I})}
|
1064
|
+
.items=${pc}
|
1065
|
+
.activeItems=${q}
|
1128
1066
|
@menu:toggle=${this._handlePlaybackMenuToggle}
|
1129
1067
|
>
|
1130
|
-
<vmp-tooltip content="Playback speed" ?disabled=${this.playbackRateMenuOpen}>
|
1131
|
-
<vmp-button ?active=${this.playbackRateMenuOpen} icon="chevron-down"
|
1132
|
-
>${this.playbackRate.toFixed(1)}x</vmp-button
|
1068
|
+
<vmp-new-tooltip content="Playback speed" ?disabled=${this.playbackRateMenuOpen}>
|
1069
|
+
<vmp-new-button ?active=${this.playbackRateMenuOpen} icon="chevron-down"
|
1070
|
+
>${this.playbackRate.toFixed(1)}x</vmp-new-button
|
1133
1071
|
>
|
1134
|
-
</vmp-tooltip>
|
1135
|
-
</vmp-menu>
|
1136
|
-
<vmp-tooltip
|
1072
|
+
</vmp-new-tooltip>
|
1073
|
+
</vmp-new-menu>
|
1074
|
+
<vmp-new-tooltip
|
1137
1075
|
${this.resizeHider.hide("captions",3)}
|
1138
|
-
class=${
|
1076
|
+
class=${wt({hidden:!G})}
|
1139
1077
|
content="Captions"
|
1140
1078
|
>
|
1141
|
-
<vmp-icon-button
|
1079
|
+
<vmp-new-icon-button
|
1142
1080
|
?active=${this.captions}
|
1143
1081
|
icon=${this.captions?"captions":"captions-cross"}
|
1144
1082
|
rounded="full"
|
1145
1083
|
@click=${this._handleCaptionsClick}
|
1146
|
-
></vmp-icon-button>
|
1147
|
-
</vmp-tooltip>
|
1148
|
-
<vmp-tooltip
|
1084
|
+
></vmp-new-icon-button>
|
1085
|
+
</vmp-new-tooltip>
|
1086
|
+
<vmp-new-tooltip
|
1149
1087
|
${this.resizeHider.hide("fullscreen",2)}
|
1150
1088
|
content="Fullscreen"
|
1151
|
-
class=${
|
1089
|
+
class=${wt({hidden:!F})}
|
1152
1090
|
>
|
1153
|
-
<vmp-icon-button
|
1091
|
+
<vmp-new-icon-button
|
1154
1092
|
?active=${this.fullscreen}
|
1155
1093
|
icon=${this.fullscreen?"minimize":"maximize"}
|
1156
1094
|
rounded="full"
|
1157
1095
|
data-testid="fullscreen"
|
1158
1096
|
@click=${this._handleFullscreenClick}
|
1159
|
-
></vmp-icon-button>
|
1160
|
-
</vmp-tooltip>
|
1161
|
-
<vmp-menu
|
1097
|
+
></vmp-new-icon-button>
|
1098
|
+
</vmp-new-tooltip>
|
1099
|
+
<vmp-new-menu
|
1162
1100
|
${this.resizeHider.show("settings",["levels","playback-rate","captions","fullscreen"])}
|
1163
|
-
.items=${
|
1164
|
-
.activeItems=${
|
1101
|
+
.items=${A}
|
1102
|
+
.activeItems=${q}
|
1165
1103
|
@menu:toggle=${this._handleSettingsMenuToggle}
|
1166
1104
|
>
|
1167
|
-
<vmp-tooltip content="Settings" ?disabled=${this.settingsMenuOpen}>
|
1168
|
-
<vmp-
|
1169
|
-
|
1170
|
-
|
1105
|
+
<vmp-new-tooltip content="Settings" ?disabled=${this.settingsMenuOpen}>
|
1106
|
+
<vmp-new-icon-button
|
1107
|
+
?active=${this.settingsMenuOpen}
|
1108
|
+
icon="settings"
|
1109
|
+
rounded="full"
|
1110
|
+
></vmp-new-icon-button>
|
1111
|
+
</vmp-new-tooltip>
|
1112
|
+
</vmp-new-menu>
|
1171
1113
|
</div>
|
1172
1114
|
</div>
|
1173
1115
|
</div>
|
1174
|
-
`}};
|
1116
|
+
`}};Pt.styles=[yt.styles??[],jt`
|
1175
1117
|
:host {
|
1176
1118
|
--controls-border-radius: var(--player-border-radius, 0px);
|
1177
1119
|
|
@@ -1242,24 +1184,24 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
1242
1184
|
.hidden {
|
1243
1185
|
display: none;
|
1244
1186
|
}
|
1245
|
-
`],
|
1187
|
+
`],Bt([j({type:Boolean})],Pt.prototype,"playing",2),Bt([j({type:Number})],Pt.prototype,"volume",2),Bt([j({type:Boolean})],Pt.prototype,"muted",2),Bt([j({type:Number})],Pt.prototype,"currentTime",2),Bt([j({type:Number})],Pt.prototype,"duration",2),Bt([j({type:Number})],Pt.prototype,"level",2),Bt([j({type:Number})],Pt.prototype,"playbackRate",2),Bt([j({type:Array})],Pt.prototype,"buffer",2),Bt([j({type:Array,attribute:!1})],Pt.prototype,"levels",2),Bt([j({type:Boolean})],Pt.prototype,"captions",2),Bt([j({type:Boolean})],Pt.prototype,"fullscreen",2),Bt([j({type:Array})],Pt.prototype,"controls",2),Bt([Wt()],Pt.prototype,"volumeMenuOpen",2),Bt([Wt()],Pt.prototype,"levelsMenuOpen",2),Bt([Wt()],Pt.prototype,"playbackRateMenuOpen",2),Bt([Wt()],Pt.prototype,"settingsMenuOpen",2),Pt=Bt([se("vmp-new-player-controls")],Pt);var p0=Object.defineProperty,g0=Object.getOwnPropertyDescriptor,m0=(r,t,e,i)=>{for(var s=i>1?void 0:i?g0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&p0(t,e,s),s};let Ta=class extends yt{render(){return st`<vmp-new-icon icon="loading"></vmp-new-icon>`}};Ta.styles=[yt.styles??[],jt`
|
1246
1188
|
:host {
|
1247
1189
|
display: flex;
|
1248
1190
|
align-items: center;
|
1249
1191
|
justify-content: center;
|
1250
1192
|
}
|
1251
|
-
`],
|
1193
|
+
`],Ta=m0([se("vmp-new-loading-spinner")],Ta);var v0=Object.defineProperty,y0=Object.getOwnPropertyDescriptor,bc=(r,t,e,i)=>{for(var s=i>1?void 0:i?y0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&v0(t,e,s),s};let Ar=class extends yt{constructor(){super(...arguments),this.caption=""}render(){return st`
|
1252
1194
|
<div class="container">
|
1253
|
-
<vmp-text content=${this.caption} size="large"></vmp-text>
|
1195
|
+
<vmp-new-text content=${this.caption} size="large"></vmp-new-text>
|
1254
1196
|
</div>
|
1255
|
-
`}};
|
1197
|
+
`}};Ar.styles=[yt.styles??[],jt`
|
1256
1198
|
.container {
|
1257
1199
|
display: block;
|
1258
1200
|
margin: 0 var(--space-small);
|
1259
1201
|
text-align: center;
|
1260
1202
|
}
|
1261
1203
|
|
1262
|
-
vmp-text::part(content) {
|
1204
|
+
vmp-new-text::part(content) {
|
1263
1205
|
display: inline;
|
1264
1206
|
padding: var(--space-xxs) var(--space-xs);
|
1265
1207
|
text-align: center;
|
@@ -1271,37 +1213,37 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
1271
1213
|
/* Line height controls the spacing between the cloned boxes so has to override the default */
|
1272
1214
|
line-height: 2.2;
|
1273
1215
|
}
|
1274
|
-
`],
|
1216
|
+
`],bc([j({type:String})],Ar.prototype,"caption",2),Ar=bc([se("vmp-new-captions")],Ar);var E0=Object.defineProperty,b0=Object.getOwnPropertyDescriptor,Kt=(r,t,e,i)=>{for(var s=i>1?void 0:i?b0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&E0(t,e,s),s};const T0=3e3;let Mt=class extends yt{constructor(){super(...arguments),this.loading=!1,this.playing=!1,this.volume=1,this.muted=!1,this.currentTime=0,this.duration=0,this.levels=[],this.level=-1,this.playbackRate=1,this.caption="",this.buffer=[],this.captions=!1,this.fullscreen=!1,this.controls=ma,this.showControls=!0,this._hasTouched=!1,this._playerControlsRef=be()}_startHideControls(){clearTimeout(this._controlHideTimeout),this._controlHideTimeout=setTimeout(()=>{this.showControls=!1,this._hasTouched=!1},T0)}_immediateShowControls(){this.showControls=!0,clearTimeout(this._controlHideTimeout)}_immediateHideControls(){this.showControls=!1,this._hasTouched=!1,clearTimeout(this._controlHideTimeout)}willUpdate(r){var t;r.has("showControls")&&this.playing&&!this.showControls&&((t=this._playerControlsRef.value)==null||t.hideMenus())}render(){var r;const t=(r=this.controls)==null?void 0:r.includes("play-large"),e=this.playing&&!this.showControls,i=!!(t&&!this.playing);return st`
|
1275
1217
|
<div
|
1276
|
-
class=${
|
1218
|
+
class=${wt({container:!0,hide:e})}
|
1277
1219
|
@mousemove=${()=>{this._immediateShowControls(),this._startHideControls()}}
|
1278
1220
|
@mouseleave=${this._immediateHideControls}
|
1279
1221
|
@touchstart=${s=>{this.playing&&!this.showControls&&!this._hasTouched&&(s.preventDefault(),this._hasTouched=!0,this._immediateShowControls(),this._startHideControls())}}
|
1280
1222
|
>
|
1281
1223
|
<div
|
1282
|
-
class=${
|
1224
|
+
class=${wt({fixtures:!0,invisible:!this.loading&&!i})}
|
1283
1225
|
@click=${()=>{this.showControls&&this.dispatchEvent(new CustomEvent("play:click",{bubbles:!0,composed:!0,detail:this.playing}))}}
|
1284
1226
|
>
|
1285
|
-
<vmp-icon
|
1286
|
-
class=${
|
1227
|
+
<vmp-new-icon
|
1228
|
+
class=${wt({hidden:!i})}
|
1287
1229
|
icon="play-large"
|
1288
|
-
></vmp-icon>
|
1289
|
-
<vmp-loading-spinner
|
1290
|
-
class=${
|
1291
|
-
></vmp-loading-spinner>
|
1230
|
+
></vmp-new-icon>
|
1231
|
+
<vmp-new-loading-spinner
|
1232
|
+
class=${wt({hidden:!this.loading||i})}
|
1233
|
+
></vmp-new-loading-spinner>
|
1292
1234
|
</div>
|
1293
1235
|
<div
|
1294
|
-
class=${
|
1236
|
+
class=${wt({controls:!0,hide:e})}
|
1295
1237
|
@focusin=${this._immediateShowControls}
|
1296
1238
|
@mousemove=${s=>{s.stopPropagation(),this._immediateShowControls()}}
|
1297
1239
|
@click=${this._immediateShowControls}
|
1298
1240
|
>
|
1299
|
-
${this.captions?
|
1300
|
-
class=${
|
1241
|
+
${this.captions?st`<vmp-new-captions
|
1242
|
+
class=${wt({hidden:!this.caption,hiddenControls:e})}
|
1301
1243
|
caption=${this.caption}
|
1302
|
-
></vmp-captions>`:null}
|
1303
|
-
<vmp-player-controls
|
1304
|
-
${
|
1244
|
+
></vmp-new-captions>`:null}
|
1245
|
+
<vmp-new-player-controls
|
1246
|
+
${Te(this._playerControlsRef)}
|
1305
1247
|
?playing=${this.playing}
|
1306
1248
|
?muted=${this.muted}
|
1307
1249
|
volume=${this.volume}
|
@@ -1314,10 +1256,10 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
1314
1256
|
.controls=${this.controls}
|
1315
1257
|
?captions=${this.captions}
|
1316
1258
|
?fullscreen=${this.fullscreen}
|
1317
|
-
></vmp-player-controls>
|
1259
|
+
></vmp-new-player-controls>
|
1318
1260
|
</div>
|
1319
1261
|
</div>
|
1320
|
-
`}};
|
1262
|
+
`}};Mt.styles=[yt.styles??[],jt`
|
1321
1263
|
:host {
|
1322
1264
|
--overlay-border-radius: var(--player-border-radius, 0px);
|
1323
1265
|
}
|
@@ -1378,7 +1320,7 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
1378
1320
|
transform: translateY(100%);
|
1379
1321
|
}
|
1380
1322
|
|
1381
|
-
vmp-captions {
|
1323
|
+
vmp-new-captions {
|
1382
1324
|
position: absolute;
|
1383
1325
|
bottom: calc(100%);
|
1384
1326
|
width: 100%;
|
@@ -1386,52 +1328,52 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
1386
1328
|
transition: transform 200ms ease-out;
|
1387
1329
|
}
|
1388
1330
|
|
1389
|
-
vmp-captions.hiddenControls {
|
1331
|
+
vmp-new-captions.hiddenControls {
|
1390
1332
|
transform: translateY(calc(var(--space-small) * -1));
|
1391
1333
|
}
|
1392
|
-
`],
|
1334
|
+
`],Kt([j({type:Boolean})],Mt.prototype,"loading",2),Kt([j({type:Boolean})],Mt.prototype,"playing",2),Kt([j({type:Number})],Mt.prototype,"volume",2),Kt([j({type:Boolean})],Mt.prototype,"muted",2),Kt([j({type:Number})],Mt.prototype,"currentTime",2),Kt([j({type:Number})],Mt.prototype,"duration",2),Kt([j({type:Array,attribute:!1})],Mt.prototype,"levels",2),Kt([j({type:Number})],Mt.prototype,"level",2),Kt([j({type:Number})],Mt.prototype,"playbackRate",2),Kt([j({type:String})],Mt.prototype,"caption",2),Kt([j({type:Array})],Mt.prototype,"buffer",2),Kt([j({type:Boolean})],Mt.prototype,"captions",2),Kt([j({type:Boolean})],Mt.prototype,"fullscreen",2),Kt([j({type:Array})],Mt.prototype,"controls",2),Kt([Wt()],Mt.prototype,"showControls",2),Mt=Kt([se("vmp-new-player-overlay")],Mt);var A0=Object.defineProperty,w0=Object.getOwnPropertyDescriptor,Ft=(r,t,e,i)=>{for(var s=i>1?void 0:i?w0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&A0(t,e,s),s};let Dt=class extends yt{constructor(){super(...arguments),this.burnCaptions=!1,this.propAspectRatio=0,this.preload="auto",this.autoplay=!1,this.loading=!1,this.compilation=Hd,this._sceneController=new Mv(this),this._drawController=new Jf(this),this._wasPlaying=!1,this._manualMute=this.muted,this._seekerRAF=null,this._lastWaiting=!1,this._lastTimestamp=null,this._lastTimeUpdate=null,this._playerRef=be(),this._canvasRef=be(),this._aspectRatio=this.propAspectRatio,this._waiting=!1,this._stalled=!1,this._seeking=!1,this._captions=!1,this._fullscreen=!1,this._paused=!0,this._playbackRate=1,this._volume=null,this._muted=null,this._videoResolution=-1,this._handleContainerResize=()=>{this._playerRef.value&&(this.propAspectRatio||(this._aspectRatio=this._playerRef.value.offsetWidth/this._playerRef.value.offsetHeight))},this._handleCanvasResize=()=>{this.draw()},this._seeker=r=>{var t;this.sceneConfig&&this.scenes.length>0&&(this._waiting=this._drawController.activeScenes.some(({video:e})=>{if(e){const i=this._sceneController.videoState[e.id];return!i||!i.initialised||i.waiting}}),this.waiting?(this._lastTimestamp=null,this._lastWaiting||this.dispatchEvent(new CustomEvent("waiting"))):this._lastWaiting&&this.dispatchEvent(new CustomEvent("playing")),!this.stalled&&r-(this._lastTimestamp??0)>1e3/this.sceneConfig.frameRate&&(this._drawController.currentTime=this._drawController.currentTime+(r-(this._lastTimestamp??r))/1e3*this.playbackRate,this._lastTimestamp=r),this._lastWaiting=this._waiting,this._drawController.currentTime>=this.duration&&(this.pause(),this.dispatchEvent(new CustomEvent("ended")))),this.paused||((t=this.scene)!=null&&t.video?this._lastTimeUpdate&&r-this._lastTimeUpdate>1e3&&(this._stalled=!0):(this._stalled=!1,this._lastTimeUpdate=r),this._seekerRAF=requestAnimationFrame(this._seeker))},this._handleFullscreenChange=()=>{document.fullscreenElement?this._fullscreen=!0:this._fullscreen=!1}}get aspectRatio(){return this._aspectRatio}get waiting(){return!this.paused&&this._waiting}get stalled(){return this._stalled}get seeking(){return this._seeking}get captions(){return this._captions}get fullscreen(){return this._fullscreen}get processing(){return this._sceneController.processing}get duration(){return this._sceneController.duration}get scene(){return this._drawController.activeScenes[this._drawController.activeScenes.length-1]}get scenes(){var r;return((r=this._sceneController.scenes)==null?void 0:r.scenes)??[]}get sceneConfig(){return this._sceneController.scenes}get videos(){return this._sceneController.videos??{}}get videoState(){return this._sceneController.videoState}set paused(r){r!==this._paused&&(this._paused=r,this.requestUpdate(),this.dispatchEvent(new CustomEvent(r?"pause":"play")))}get paused(){return this._paused}set playbackRate(r){r!==this._playbackRate&&(this._playbackRate=r,this.scenes.forEach(({video:t})=>{t&&(t.node.playbackRate=r)}),this.requestUpdate(),this.dispatchEvent(new CustomEvent("ratechange",{detail:r})))}get playbackRate(){return this._playbackRate}set volume(r){const t=Math.min(1,Math.max(0,r));t!==this._volume&&(this.scenes.forEach(({video:e})=>{e&&(e.node.volume=t)}),localStorage.setItem("vmp-new-player-volume",t.toString()),this._volume=t,t>0&&(this.muted=!1),this.requestUpdate(),this.dispatchEvent(new CustomEvent("volumechange",{detail:r})))}get volume(){return this._volume??(this._volume=parseFloat(localStorage.getItem("vmp-new-player-volume")??"1"))}set muted(r){this.scenes.forEach(({video:t})=>{t&&(t.node.muted=r)}),r!==this._muted&&(this._muted=r,localStorage.setItem("vmp-new-player-muted",r.toString()),this.requestUpdate(),this.dispatchEvent(new CustomEvent("volumechange",{detail:r?0:this.volume})))}get muted(){return this._muted??(this._muted=this.autoplay||localStorage.getItem("vmp-new-player-muted")==="true")}set videoResolution(r){r!==this._videoResolution&&(this._videoResolution=r,this.scenes.forEach(({video:t})=>{if(t!=null&&t.hls){const e=t.hls.levels.findIndex(i=>Math.min(i.height,i.width)===r);t.hls.currentLevel=e??-1}}),this.requestUpdate())}get videoResolution(){return this._videoResolution}set currentTime(r){r!==this._drawController.currentTime&&(this._drawController.currentTime=r,this._sceneController.setVideosCurrentTime(r))}get currentTime(){return this._drawController.currentTime}reset(r=0,t=!1){this._lastTimestamp=null,this._drawController.currentTime=r,this._sceneController.setVideosCurrentTime(r),t?this.play():this.pause()}clear(){this._drawController.clear()}play(){this.paused=!1,this._lastTimestamp=null,this._lastTimeUpdate=1/0,this.duration>0&&this._drawController.currentTime>=this.duration&&this.reset(0,!0),this._seekerRAF||(this._seekerRAF=requestAnimationFrame(this._seeker))}pause(){this._seekerRAF&&(cancelAnimationFrame(this._seekerRAF),this._seekerRAF=null),this.paused=!0,this.scenes.forEach(({video:r})=>{r&&r.node.pause()})}draw(r){return this._drawController.draw(r)}setScene(r){var t,e;if((t=this._sceneController)!=null&&t.scenes){const i=(e=this.scenes)==null?void 0:e[r];if(!i)return this.dispatchEvent(new ErrorEvent("error",new Error(`No scene at index: ${r}`)));this.reset(i.start+this._sceneController.scenes.transitionDuration,!this.paused)}}toggleFullscreen(r){r??this.fullscreen?Nv():this._playerRef.value&&Fv(this._playerRef.value)}connectedCallback(){super.connectedCallback(),document.addEventListener("fullscreenchange",this._handleFullscreenChange),this.addEventListener("video:timeupdate",r=>{this._stalled=!1,this._lastTimeUpdate=r.timeStamp})}willUpdate(){this.propAspectRatio&&(this._aspectRatio=this.propAspectRatio)}updated(r){r.has("_stalled")&&this.stalled&&this.dispatchEvent(new CustomEvent("stalled")),r.has("propAspectRatio")&&!this.propAspectRatio&&this._handleContainerResize()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("fullscreenchange",this._handleFullscreenChange)}render(){var r,t,e,i,s,n;const a=this.loading||!this.scenes||this.duration<=0,{height:o,width:l}=bi({resolution:((r=this.sceneConfig)==null?void 0:r.resolution)??720,aspectRatio:this.aspectRatio}),h=Object.keys(this.videoState).reduce((p,g)=>p.concat(this.videoState[g].buffered??[]),[...this._drawController.fakeBufferSegments]),c=a?[]:(t=this.controls??ma)==null?void 0:t.filter(p=>!(p==="fullscreen"&&Pv()||p==="navigation"&&(!this.scenes||this.scenes.length<=1))),d=(((e=this.scenes)==null?void 0:e.length)??0)-1,u=((i=this.scenes)==null?void 0:i.findIndex(p=>p===this._drawController.activeScenes[0]))??0,f=(n=(s=this._drawController.activeScenes[0])==null?void 0:s.video)==null?void 0:n.hls;return st`
|
1393
1335
|
<div
|
1394
|
-
${
|
1395
|
-
${
|
1396
|
-
class=${
|
1336
|
+
${Te(this._playerRef)}
|
1337
|
+
${va(this._handleContainerResize)}
|
1338
|
+
class=${wt({player:!0,responsive:!this.propAspectRatio})}
|
1397
1339
|
>
|
1398
1340
|
<canvas
|
1399
|
-
${
|
1341
|
+
${Te(this._canvasRef)}
|
1400
1342
|
${this._drawController.canvas()}
|
1401
|
-
${
|
1402
|
-
height=${
|
1403
|
-
width=${
|
1343
|
+
${va(this._handleCanvasResize)}
|
1344
|
+
height=${o}
|
1345
|
+
width=${l}
|
1404
1346
|
></canvas>
|
1405
|
-
<vmp-player-overlay
|
1347
|
+
<vmp-new-player-overlay
|
1406
1348
|
${this._drawController.controls()}
|
1407
|
-
?disabled=${
|
1349
|
+
?disabled=${a}
|
1408
1350
|
?playing=${!this.paused}
|
1409
|
-
?loading=${this.loading||this.
|
1351
|
+
?loading=${this.loading||this.waiting||this.stalled}
|
1410
1352
|
?muted=${this.muted}
|
1411
1353
|
volume=${this.volume}
|
1412
1354
|
duration=${this.duration}
|
1413
|
-
.levels=${(
|
1414
|
-
level=${
|
1355
|
+
.levels=${(f==null?void 0:f.levels)??[]}
|
1356
|
+
level=${es(f!=null&&f.autoLevelEnabled?-1:f==null?void 0:f.currentLevel)}
|
1415
1357
|
playbackRate=${this.playbackRate}
|
1416
1358
|
caption=${this._drawController.caption}
|
1417
|
-
.buffer=${
|
1359
|
+
.buffer=${h}
|
1418
1360
|
.controls=${c}
|
1419
1361
|
?captions=${this.captions}
|
1420
1362
|
?fullscreen=${this.fullscreen}
|
1421
|
-
@navigate:back=${
|
1422
|
-
@navigate:forward=${
|
1423
|
-
@play:click=${({detail:
|
1424
|
-
@volume:click=${({detail:
|
1425
|
-
@level:click=${({detail:
|
1426
|
-
@playbackRate:click=${({detail:
|
1363
|
+
@navigate:back=${p=>{p.defaultPrevented||this.setScene(u<=0?d:u-1)}}
|
1364
|
+
@navigate:forward=${p=>{p.defaultPrevented||this.setScene(u>=d?0:u+1)}}
|
1365
|
+
@play:click=${({detail:p})=>{a||(p?this.pause():(this.muted=this._manualMute,this.play()))}}
|
1366
|
+
@volume:click=${({detail:p})=>{this.muted=!p,this._manualMute=!p}}
|
1367
|
+
@level:click=${({detail:p})=>{this.videoResolution=p.value.resolution}}
|
1368
|
+
@playbackRate:click=${({detail:p})=>{this.playbackRate=p.value??1}}
|
1427
1369
|
@captions:click=${()=>{this._captions=!this._captions}}
|
1428
1370
|
@fullscreen:click=${()=>{this.toggleFullscreen()}}
|
1429
|
-
@input=${
|
1430
|
-
@pointerdown=${
|
1431
|
-
@pointerup=${
|
1432
|
-
></vmp-player-overlay>
|
1371
|
+
@input=${p=>{const g=p.composedPath()[0],v=g.getAttribute("key");if(v==="scrubber"){const E=parseFloat(g.value);this._drawController.currentTime=E,this._sceneController.setVideosCurrentTime(E),this.dispatchEvent(new CustomEvent("seeking",{detail:E}))}v==="volume"&&(this.volume=parseFloat(g.value))}}
|
1372
|
+
@pointerdown=${p=>{p.composedPath()[0].getAttribute("key")==="scrubber"&&(this._seeking=!0,this._wasPlaying=!this.paused,this.paused||this.pause())}}
|
1373
|
+
@pointerup=${p=>{p.composedPath()[0].getAttribute("key")==="scrubber"&&(this._seeking=!1,this._wasPlaying&&(this.play(),this._wasPlaying=!1),this.dispatchEvent(new CustomEvent("seeked",{detail:this._drawController.currentTime})))}}
|
1374
|
+
></vmp-new-player-overlay>
|
1433
1375
|
</div>
|
1434
|
-
`}};
|
1376
|
+
`}};Dt.styles=[yt.styles??[],jt`
|
1435
1377
|
:host {
|
1436
1378
|
--player-border-radius: var(--vouch-media-player-border-radius, 0px);
|
1437
1379
|
}
|
@@ -1457,25 +1399,24 @@ var embeds=function(le){"use strict";var by=Object.defineProperty;var Ty=(le,Tt,
|
|
1457
1399
|
border-radius: var(--player-border-radius);
|
1458
1400
|
}
|
1459
1401
|
|
1460
|
-
vmp-player-overlay {
|
1402
|
+
vmp-new-player-overlay {
|
1461
1403
|
position: absolute;
|
1462
1404
|
top: 0;
|
1463
1405
|
left: 0;
|
1464
1406
|
right: 0;
|
1465
1407
|
bottom: 0;
|
1466
1408
|
}
|
1467
|
-
`],
|
1468
|
-
<vmp-media-player
|
1469
|
-
${
|
1409
|
+
`],Ft([j({type:Object})],Dt.prototype,"data",2),Ft([j({type:Object})],Dt.prototype,"template",2),Ft([j({type:Boolean})],Dt.prototype,"burnCaptions",2),Ft([j({type:String})],Dt.prototype,"src",2),Ft([j({type:String})],Dt.prototype,"track",2),Ft([j({type:Number,attribute:"aspectratio"})],Dt.prototype,"propAspectRatio",2),Ft([j({type:String})],Dt.prototype,"preload",2),Ft([j({type:Boolean})],Dt.prototype,"autoplay",2),Ft([j({type:Boolean})],Dt.prototype,"loading",2),Ft([j({type:Array})],Dt.prototype,"controls",2),Ft([j({attribute:!1})],Dt.prototype,"compilation",2),Ft([Wt()],Dt.prototype,"_aspectRatio",2),Ft([Wt()],Dt.prototype,"_waiting",2),Ft([Wt()],Dt.prototype,"_stalled",2),Ft([Wt()],Dt.prototype,"_seeking",2),Ft([Wt()],Dt.prototype,"_captions",2),Ft([Wt()],Dt.prototype,"_fullscreen",2),Dt=Ft([se("vmp-new-media-player")],Dt);var S0=Object.defineProperty,L0=Object.getOwnPropertyDescriptor,re=(r,t,e,i)=>{for(var s=i>1?void 0:i?L0(t,e):t,n=r.length-1,a;n>=0;n--)(a=r[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&S0(t,e,s),s};At.Embed=class extends Ei{constructor(){super(...arguments),this._mediaPlayerRef=po(),this.env="prod",this.apiKey="",this.trackingSource="embed",this.preload="auto",this.autoplay=!1,this.aspectRatio=0,this.eventController=new ld(this,["durationchange","ended","error","loadeddata","pause","stalled","play","playing","ratechange","scenechange","seeking","seeked","timeupdate","volumechange","waiting","video:loadeddata","video:seeked","video:play","video:playing","video:pause","video:stalled","video:timeupdate","video:ended","video:error"]),this._fetcherController=new Pd(this),this._trackingController=new Nd(this)}get fetching(){return this._fetcherController.fetching}get waiting(){var t;return(t=this._mediaPlayerRef.value)==null?void 0:t.waiting}get seeking(){var t;return(t=this._mediaPlayerRef.value)==null?void 0:t.seeking}get paused(){var t;return(t=this._mediaPlayerRef.value)==null?void 0:t.paused}get captions(){var t;return(t=this._mediaPlayerRef.value)==null?void 0:t.captions}get fullscreen(){var t;return(t=this._mediaPlayerRef.value)==null?void 0:t.fullscreen}get duration(){var t;return(t=this._mediaPlayerRef.value)==null?void 0:t.duration}set currentTime(t){this._mediaPlayerRef.value&&(this._mediaPlayerRef.value.currentTime=t)}get currentTime(){var t;return((t=this._mediaPlayerRef.value)==null?void 0:t.currentTime)??0}set playbackRate(t){this._mediaPlayerRef.value&&(this._mediaPlayerRef.value.playbackRate=t)}get playbackRate(){var t;return((t=this._mediaPlayerRef.value)==null?void 0:t.playbackRate)??1}set volume(t){this._mediaPlayerRef.value&&(this._mediaPlayerRef.value.volume=t)}get volume(){var t;return((t=this._mediaPlayerRef.value)==null?void 0:t.volume)??1}set muted(t){this._mediaPlayerRef.value&&(this._mediaPlayerRef.value.muted=t)}get muted(){var t;return((t=this._mediaPlayerRef.value)==null?void 0:t.muted)??!1}get scene(){var t;return((t=this._mediaPlayerRef.value)==null?void 0:t.scene)??null}get scenes(){var t;return((t=this._mediaPlayerRef.value)==null?void 0:t.scenes)??[]}get videoState(){var t;return(t=this._mediaPlayerRef.value)==null?void 0:t.videoState}get mediaPlayer(){return this._mediaPlayerRef.value}play(){var t;(t=this._mediaPlayerRef.value)==null||t.play()}pause(){var t;(t=this._mediaPlayerRef.value)==null||t.pause()}setScene(t){var e;(e=this._mediaPlayerRef.value)==null||e.setScene(t)}render(){return st`
|
1410
|
+
<vmp-new-media-player
|
1411
|
+
${go(this._mediaPlayerRef)}
|
1470
1412
|
${this.eventController.register()}
|
1471
1413
|
?autoplay=${this.autoplay}
|
1472
1414
|
?loading=${this.fetching}
|
1473
|
-
.data=${this.
|
1474
|
-
.
|
1475
|
-
|
1476
|
-
|
1477
|
-
preload=${Qr(this.preload)}
|
1415
|
+
.data=${this.vouch}
|
1416
|
+
.template=${this.template}
|
1417
|
+
aspectRatio=${uo(this.aspectRatio)}
|
1418
|
+
preload=${uo(this.preload)}
|
1478
1419
|
.controls=${this.controls}
|
1479
|
-
></vmp-media-player>
|
1480
|
-
`}},He([N({type:Object,attribute:"data"})],le.Embed.prototype,"propData",2),He([N({type:String})],le.Embed.prototype,"vouchHashId",2),He([N({type:String})],le.Embed.prototype,"env",2),He([N({type:String})],le.Embed.prototype,"apiKey",2),He([N({type:String})],le.Embed.prototype,"preload",2),He([N({type:Boolean})],le.Embed.prototype,"autoplay",2),He([N({type:Boolean})],le.Embed.prototype,"enableTracking",2),He([N({type:String})],le.Embed.prototype,"trackingSource",2),He([N({type:Number})],le.Embed.prototype,"resolution",2),He([N({type:Number})],le.Embed.prototype,"aspectRatio",2),He([N({type:Array})],le.Embed.prototype,"controls",2),He([Re()],le.Embed.prototype,"data",2),He([Re()],le.Embed.prototype,"instance",2),He([Re()],le.Embed.prototype,"fetching",2),le.Embed=He([gd("vouch-embed")],le.Embed);function At(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function zh(r,e){for(var t="",i=0,s=-1,n=0,a,o=0;o<=r.length;++o){if(o<r.length)a=r.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(s===o-1||n===1))if(s!==o-1&&n===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),s=o,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=o,n=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+="/"+r.slice(s+1,o):t=r.slice(s+1,o),i=o-s-1;s=o,n=0}else a===46&&n!==-1?++n:n=-1}return t}function Xv(r,e){var t=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+i:t+r+i:i}var Fi={resolve:function(){for(var e="",t=!1,i,s=arguments.length-1;s>=-1&&!t;s--){var n;s>=0?n=arguments[s]:(i===void 0&&(i=process.cwd()),n=i),At(n),n.length!==0&&(e=n+"/"+e,t=n.charCodeAt(0)===47)}return e=zh(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(At(e),e.length===0)return".";var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=zh(e,!t),e.length===0&&!t&&(e="."),e.length>0&&i&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return At(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var i=arguments[t];At(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":Fi.normalize(e)},relative:function(e,t){if(At(e),At(t),e===t||(e=Fi.resolve(e),t=Fi.resolve(t),e===t))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var s=e.length,n=s-i,a=1;a<t.length&&t.charCodeAt(a)===47;++a);for(var o=t.length,l=o-a,c=n<l?n:l,h=-1,d=0;d<=c;++d){if(d===c){if(l>c){if(t.charCodeAt(a+d)===47)return t.slice(a+d+1);if(d===0)return t.slice(a+d)}else n>c&&(e.charCodeAt(i+d)===47?h=d:d===0&&(h=0));break}var u=e.charCodeAt(i+d),f=t.charCodeAt(a+d);if(u!==f)break;u===47&&(h=d)}var p="";for(d=i+h+1;d<=s;++d)(d===s||e.charCodeAt(d)===47)&&(p.length===0?p+="..":p+="/..");return p.length>0?p+t.slice(a+h):(a+=h,t.charCodeAt(a)===47&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(At(e),e.length===0)return".";for(var t=e.charCodeAt(0),i=t===47,s=-1,n=!0,a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),t===47){if(!n){s=a;break}}else n=!1;return s===-1?i?"/":".":i&&s===1?"//":e.slice(0,s)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');At(e);var i=0,s=-1,n=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var o=t.length-1,l=-1;for(a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(c===47){if(!n){i=a+1;break}}else l===-1&&(n=!1,l=a+1),o>=0&&(c===t.charCodeAt(o)?--o===-1&&(s=a):(o=-1,s=l))}return i===s?s=l:s===-1&&(s=e.length),e.slice(i,s)}else{for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!n){i=a+1;break}}else s===-1&&(n=!1,s=a+1);return s===-1?"":e.slice(i,s)}},extname:function(e){At(e);for(var t=-1,i=0,s=-1,n=!0,a=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(l===47){if(!n){i=o+1;break}continue}s===-1&&(n=!1,s=o+1),l===46?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||s===-1||a===0||a===1&&t===s-1&&t===i+1?"":e.slice(t,s)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return Xv("/",e)},parse:function(e){At(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var i=e.charCodeAt(0),s=i===47,n;s?(t.root="/",n=1):n=0;for(var a=-1,o=0,l=-1,c=!0,h=e.length-1,d=0;h>=n;--h){if(i=e.charCodeAt(h),i===47){if(!c){o=h+1;break}continue}l===-1&&(c=!1,l=h+1),i===46?a===-1?a=h:d!==1&&(d=1):a!==-1&&(d=-1)}return a===-1||l===-1||d===0||d===1&&a===l-1&&a===o+1?l!==-1&&(o===0&&s?t.base=t.name=e.slice(1,l):t.base=t.name=e.slice(o,l)):(o===0&&s?(t.name=e.slice(1,a),t.base=e.slice(1,l)):(t.name=e.slice(o,a),t.base=e.slice(o,l)),t.ext=e.slice(a,l)),o>0?t.dir=e.slice(0,o-1):s&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Fi.posix=Fi;var qv=Fi;const{basename:Kh,extname:Zv}=qv;class Jv{constructor(){let e=(()=>typeof fm>"u")(),t="image/png",i="image/jpeg",s="image/jpeg",n="image/webp",a="application/pdf",o="image/svg+xml";Object.assign(this,{toMime:this.toMime.bind(this),fromMime:this.fromMime.bind(this),expected:e?'"png", "jpg", or "webp"':'"png", "jpg", "pdf", or "svg"',formats:e?{png:t,jpg:i,jpeg:s,webp:n}:{png:t,jpg:i,jpeg:s,pdf:a,svg:o},mimes:e?{[t]:"png",[i]:"jpg",[n]:"webp"}:{[t]:"png",[i]:"jpg",[a]:"pdf",[o]:"svg"}})}toMime(e){return this.formats[(e||"").replace(/^\./,"").toLowerCase()]}fromMime(e){return this.mimes[e]}}function Qv(r,{filename:e="",extension:t="",format:m,page:s,quality:n,matte:a,density:o,outline:l,archive:f}={}){var{fromMime:h,toMime:d,expected:u}=new Jv,f=f||"canvas",p=m||t.replace(/@\d+x$/i,"")||Zv(e),m=h(d(p)||p),g=d(m),x=r.length;if(!p)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!m)throw new Error(`Unsupported file format "${p}" (expected ${u})`);if(!x)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let b,A,y=e.replace(/{(\d*)}/g,(w,L)=>(A=!0,L=parseInt(L,10),b=isFinite(L)?L:isFinite(b)?b:-1,"{}")),T=s>0?s-1:s<0?x+s:void 0;if(isFinite(T)&&T<0||T>=x)throw new RangeError(x==1?`Canvas only has a ‘page 1’ (${T} is out of bounds)`:`Canvas has pages 1–${x} (${T} is out of bounds)`);if(r=isFinite(T)?[r[T]]:A||m=="pdf"?r:r.slice(-1),n===void 0)n=.92;else if(typeof n!="number"||!isFinite(n)||n<0||n>1)throw new TypeError("The quality option must be an number in the 0.0–1.0 range");if(o===void 0){let w=(t||Kh(e,p)).match(/@(\d+)x$/i);o=w?parseInt(w[1],10):1}else if(typeof o!="number"||!Number.isInteger(o)||o<1)throw new TypeError("The density option must be a non-negative integer");return l===void 0?l=!0:m=="svg"&&(l=!!l),{filename:e,pattern:y,format:m,mime:g,pages:r,padding:b,quality:n,matte:a,density:o,outline:l,archive:f}}class Lr{static for(e){return new Lr().append(e).get()}constructor(){this.crc=-1}get(){return~this.crc}append(e){for(var t=this.crc|0,i=this.table,s=0,n=e.length|0;s<n;s++)t=t>>>8^i[(t^e[s])&255];return this.crc=t,this}}Lr.prototype.table=(()=>{var r,e,t,i=[];for(r=0;r<256;r++){for(t=r,e=0;e<8;e++)t=t&1?t>>>1^3988292384:t>>>1;i[r]=t}return i})();function Fa(r){let e=new Uint8Array(r),t=new DataView(e.buffer),i={array:e,view:t,size:r,set8(s,n){return t.setUint8(s,n),i},set16(s,n){return t.setUint16(s,n,!0),i},set32(s,n){return t.setUint32(s,n,!0),i},bytes(s,n){return e.set(n,s),i}};return i}const Rr=class Rr{constructor(e){let t=new Date;Object.assign(this,{directory:e,offset:0,files:[],time:(t.getHours()<<6|t.getMinutes())<<5|t.getSeconds()/2,date:(t.getFullYear()-1980<<4|t.getMonth()+1)<<5|t.getDate()}),this.add(e)}async add(e,t){let i=!t,s=Rr.encoder.encode(`${this.directory}/${i?"":e}`),n=new Uint8Array(i?0:await t.arrayBuffer()),a=30+s.length,o=a+n.length,l=16,{offset:c}=this,h=Fa(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,Lr.for(n)).set32(14,n.length).set32(18,n.length).set16(22,s.length);c+=a;let d=Fa(a+n.length+l).set32(0,67324752).bytes(4,h.array).bytes(30,s).bytes(a,n);c+=n.length,d.set32(o,134695760).bytes(o+4,h.array.slice(10,22)),c+=l,this.files.push({offset:c,folder:i,name:s,header:h,payload:d}),this.offset=c}toBuffer(){let e=this.files.reduce((d,{name:u})=>46+u.length+d,0),t=Fa(e+22),i=0;for(var{offset:s,name:n,header:a,folder:o}of this.files)t.set32(i,33639248).set16(i+4,20).bytes(i+6,a.array).set8(i+38,o?16:0).set32(i+42,s).bytes(i+46,n),i+=46+n.length;t.set32(i,101010256).set16(i+8,this.files.length).set16(i+10,this.files.length).set32(i+12,e).set32(i+16,this.offset);let l=new Uint8Array(this.offset+t.size),c=0;for(var{payload:h}of this.files)l.set(h.array,c),c+=h.size;return l.set(t.array,c),l}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}};Jh(Rr,"encoder",new TextEncoder);let Na=Rr;const Ua=(r,e,t,i)=>{if(i){let{width:s,height:n}=r,a=Object.assign(document.createElement("canvas"),{width:s,height:n}),o=a.getContext("2d");o.fillStyle=i,o.fillRect(0,0,s,n),o.drawImage(r,0,0),r=a}return new Promise((s,n)=>r.toBlob(s,e,t))},_v=(...r)=>Ua(...r).then(e=>e.arrayBuffer()),$v=async(r,e,t,i,s)=>{Wh(s,await Ua(r,e,t,i))},ey=async(r,e,t,i,s,n,a)=>{let o=h=>n.replace("{}",String(h+1).padStart(a,"0")),l=Kh(s,".zip")||"archive",c=new Na(l);await Promise.all(r.map(async(h,d)=>{let u=o(d);await c.add(u,await Ua(h,e,t,i))})),Wh(`${l}.zip`,c.blob)},Wh=(r,e)=>{const t=window.URL.createObjectURL(e),i=document.createElement("a");i.style.display="none",i.href=t,i.setAttribute("download",r),typeof i.download>"u"&&i.setAttribute("target","_blank"),document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(()=>window.URL.revokeObjectURL(t),100)};var ty={asBuffer:_v,asDownload:$v,asZipDownload:ey,atScale:(r,e,t)=>r.map(i=>{if(e==1&&!t)return i.canvas;let s=document.createElement("canvas"),n=s.getContext("2d"),a=i.canvas?i.canvas:i;return s.width=a.width*e,s.height=a.height*e,t&&(n.fillStyle=t,n.fillRect(0,0,s.width,s.height)),n.scale(e,e),n.drawImage(a,0,0),s}),options:Qv};const{asBuffer:Ba,asDownload:iy,asZipDownload:sy,atScale:Ha,options:Ga}=ty,Yh=Symbol.for("toDataURL"),ry=r=>{let e=Object.assign(new Xh,{crossOrigin:"Anonymous",src:r});return e.decode().then(()=>e)};class ny{constructor(e,t){let i=document.createElement("canvas"),s=[];Object.defineProperty(i,"async",{value:!0,writable:!1,enumerable:!0});for(var[n,a]of Object.entries({png:()=>Ba(i,"image/png"),jpg:()=>Ba(i,"image/jpeg"),pages:()=>s.concat(i).map(o=>o.getContext("2d"))}))Object.defineProperty(i,n,{get:a});return Object.assign(i,{width:e,height:t,newPage(...o){var{width:c,height:h}=i,l=Object.assign(document.createElement("canvas"),{width:c,height:h});l.getContext("2d").drawImage(i,0,0),s.push(l);var[c,h]=o.length?o:[c,h];return Object.assign(i,{width:c,height:h}).getContext("2d")},saveAs(o,l){l=typeof l=="number"?{quality:l}:l;let c=Ga(this.pages,{filename:o,...l}),{pattern:h,padding:d,mime:u,quality:f,matte:p,density:m,archive:g}=c,x=Ha(c.pages,m);return d==null?iy(x[0],u,f,p,o):sy(x,u,f,p,g,h,d)},toBuffer(o="png",l={}){l=typeof l=="number"?{quality:l}:l;let c=Ga(this.pages,{extension:o,...l}),{mime:h,quality:d,matte:u,pages:f,density:p}=c,m=Ha(f,p,u)[0];return Ba(m,h,d,u)},[Yh]:i.toDataURL.bind(i),toDataURL(o="png",l={}){l=typeof l=="number"?{quality:l}:l;let c=Ga(this.pages,{extension:o,...l}),{mime:h,quality:d,matte:u,pages:f,density:p}=c,m=Ha(f,p,u)[0],g=m[m===i?Yh:"toDataURL"](h,d);return Promise.resolve(g)}})}}const{CanvasRenderingContext2D:ay,CanvasGradient:oy,CanvasPattern:ly,Image:Xh,ImageData:cy,Path2D:hy,DOMMatrix:dy,DOMRect:uy,DOMPoint:fy}=window;var qh={Canvas:ny,loadImage:ry,CanvasRenderingContext2D:ay,CanvasGradient:oy,CanvasPattern:ly,Image:Xh,ImageData:cy,Path2D:hy,DOMMatrix:dy,DOMRect:uy,DOMPoint:fy};const py=Tt({__proto__:null,default:Xc(qh)},[qh]);return Object.defineProperty(le,Symbol.toStringTag,{value:"Module"}),le}({});
|
1420
|
+
></vmp-new-media-player>
|
1421
|
+
`}},re([j({type:Object,attribute:"data"})],At.Embed.prototype,"data",2),re([j({type:String})],At.Embed.prototype,"vouchId",2),re([j({type:String})],At.Embed.prototype,"templateId",2),re([j({type:String})],At.Embed.prototype,"env",2),re([j({type:String})],At.Embed.prototype,"apiKey",2),re([j({type:String})],At.Embed.prototype,"trackingSource",2),re([j({type:Array})],At.Embed.prototype,"controls",2),re([j({type:String})],At.Embed.prototype,"preload",2),re([j({type:Boolean})],At.Embed.prototype,"autoplay",2),re([j({type:Number})],At.Embed.prototype,"aspectRatio",2),re([Wt()],At.Embed.prototype,"vouch",2),re([Wt()],At.Embed.prototype,"template",2),At.Embed=re([zc("vouch-embed")],At.Embed);function Ie(r){if(typeof r!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(r))}function Tc(r,t){for(var e="",i=0,s=-1,n=0,a,o=0;o<=r.length;++o){if(o<r.length)a=r.charCodeAt(o);else{if(a===47)break;a=47}if(a===47){if(!(s===o-1||n===1))if(s!==o-1&&n===2){if(e.length<2||i!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){var l=e.lastIndexOf("/");if(l!==e.length-1){l===-1?(e="",i=0):(e=e.slice(0,l),i=e.length-1-e.lastIndexOf("/")),s=o,n=0;continue}}else if(e.length===2||e.length===1){e="",i=0,s=o,n=0;continue}}t&&(e.length>0?e+="/..":e="..",i=2)}else e.length>0?e+="/"+r.slice(s+1,o):e=r.slice(s+1,o),i=o-s-1;s=o,n=0}else a===46&&n!==-1?++n:n=-1}return e}function R0(r,t){var e=t.dir||t.root,i=t.base||(t.name||"")+(t.ext||"");return e?e===t.root?e+i:e+r+i:i}var $i={resolve:function(){for(var t="",e=!1,i,s=arguments.length-1;s>=-1&&!e;s--){var n;s>=0?n=arguments[s]:(i===void 0&&(i=process.cwd()),n=i),Ie(n),n.length!==0&&(t=n+"/"+t,e=n.charCodeAt(0)===47)}return t=Tc(t,!e),e?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(Ie(t),t.length===0)return".";var e=t.charCodeAt(0)===47,i=t.charCodeAt(t.length-1)===47;return t=Tc(t,!e),t.length===0&&!e&&(t="."),t.length>0&&i&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return Ie(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,e=0;e<arguments.length;++e){var i=arguments[e];Ie(i),i.length>0&&(t===void 0?t=i:t+="/"+i)}return t===void 0?".":$i.normalize(t)},relative:function(t,e){if(Ie(t),Ie(e),t===e||(t=$i.resolve(t),e=$i.resolve(e),t===e))return"";for(var i=1;i<t.length&&t.charCodeAt(i)===47;++i);for(var s=t.length,n=s-i,a=1;a<e.length&&e.charCodeAt(a)===47;++a);for(var o=e.length,l=o-a,h=n<l?n:l,c=-1,d=0;d<=h;++d){if(d===h){if(l>h){if(e.charCodeAt(a+d)===47)return e.slice(a+d+1);if(d===0)return e.slice(a+d)}else n>h&&(t.charCodeAt(i+d)===47?c=d:d===0&&(c=0));break}var u=t.charCodeAt(i+d),f=e.charCodeAt(a+d);if(u!==f)break;u===47&&(c=d)}var p="";for(d=i+c+1;d<=s;++d)(d===s||t.charCodeAt(d)===47)&&(p.length===0?p+="..":p+="/..");return p.length>0?p+e.slice(a+c):(a+=c,e.charCodeAt(a)===47&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(Ie(t),t.length===0)return".";for(var e=t.charCodeAt(0),i=e===47,s=-1,n=!0,a=t.length-1;a>=1;--a)if(e=t.charCodeAt(a),e===47){if(!n){s=a;break}}else n=!1;return s===-1?i?"/":".":i&&s===1?"//":t.slice(0,s)},basename:function(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Ie(t);var i=0,s=-1,n=!0,a;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var o=e.length-1,l=-1;for(a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(h===47){if(!n){i=a+1;break}}else l===-1&&(n=!1,l=a+1),o>=0&&(h===e.charCodeAt(o)?--o===-1&&(s=a):(o=-1,s=l))}return i===s?s=l:s===-1&&(s=t.length),t.slice(i,s)}else{for(a=t.length-1;a>=0;--a)if(t.charCodeAt(a)===47){if(!n){i=a+1;break}}else s===-1&&(n=!1,s=a+1);return s===-1?"":t.slice(i,s)}},extname:function(t){Ie(t);for(var e=-1,i=0,s=-1,n=!0,a=0,o=t.length-1;o>=0;--o){var l=t.charCodeAt(o);if(l===47){if(!n){i=o+1;break}continue}s===-1&&(n=!1,s=o+1),l===46?e===-1?e=o:a!==1&&(a=1):e!==-1&&(a=-1)}return e===-1||s===-1||a===0||a===1&&e===s-1&&e===i+1?"":t.slice(e,s)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return R0("/",t)},parse:function(t){Ie(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;var i=t.charCodeAt(0),s=i===47,n;s?(e.root="/",n=1):n=0;for(var a=-1,o=0,l=-1,h=!0,c=t.length-1,d=0;c>=n;--c){if(i=t.charCodeAt(c),i===47){if(!h){o=c+1;break}continue}l===-1&&(h=!1,l=c+1),i===46?a===-1?a=c:d!==1&&(d=1):a!==-1&&(d=-1)}return a===-1||l===-1||d===0||d===1&&a===l-1&&a===o+1?l!==-1&&(o===0&&s?e.base=e.name=t.slice(1,l):e.base=e.name=t.slice(o,l)):(o===0&&s?(e.name=t.slice(1,a),e.base=t.slice(1,l)):(e.name=t.slice(o,a),e.base=t.slice(o,l)),e.ext=t.slice(a,l)),o>0?e.dir=t.slice(0,o-1):s&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};$i.posix=$i;var _0=$i;const{basename:Ac,extname:k0}=_0;class I0{constructor(){let t=(()=>typeof Fs>"u")(),e="image/png",i="image/jpeg",s="image/jpeg",n="image/webp",a="application/pdf",o="image/svg+xml";Object.assign(this,{toMime:this.toMime.bind(this),fromMime:this.fromMime.bind(this),expected:t?'"png", "jpg", or "webp"':'"png", "jpg", "pdf", or "svg"',formats:t?{png:e,jpg:i,jpeg:s,webp:n}:{png:e,jpg:i,jpeg:s,pdf:a,svg:o},mimes:t?{[e]:"png",[i]:"jpg",[n]:"webp"}:{[e]:"png",[i]:"jpg",[a]:"pdf",[o]:"svg"}})}toMime(t){return this.formats[(t||"").replace(/^\./,"").toLowerCase()]}fromMime(t){return this.mimes[t]}}function D0(r,{filename:t="",extension:e="",format:g,page:s,quality:n,matte:a,density:o,outline:l,archive:f}={}){var{fromMime:c,toMime:d,expected:u}=new I0,f=f||"canvas",p=g||e.replace(/@\d+x$/i,"")||k0(t),g=c(d(p)||p),v=d(g),E=r.length;if(!p)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!g)throw new Error(`Unsupported file format "${p}" (expected ${u})`);if(!E)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let A,L,y=t.replace(/{(\d*)}/g,(R,D)=>(L=!0,D=parseInt(D,10),A=isFinite(D)?D:isFinite(A)?A:-1,"{}")),S=s>0?s-1:s<0?E+s:void 0;if(isFinite(S)&&S<0||S>=E)throw new RangeError(E==1?`Canvas only has a ‘page 1’ (${S} is out of bounds)`:`Canvas has pages 1–${E} (${S} is out of bounds)`);if(r=isFinite(S)?[r[S]]:L||g=="pdf"?r:r.slice(-1),n===void 0)n=.92;else if(typeof n!="number"||!isFinite(n)||n<0||n>1)throw new TypeError("The quality option must be an number in the 0.0–1.0 range");if(o===void 0){let R=(e||Ac(t,p)).match(/@(\d+)x$/i);o=R?parseInt(R[1],10):1}else if(typeof o!="number"||!Number.isInteger(o)||o<1)throw new TypeError("The density option must be a non-negative integer");return l===void 0?l=!0:g=="svg"&&(l=!!l),{filename:t,pattern:y,format:g,mime:v,pages:r,padding:A,quality:n,matte:a,density:o,outline:l,archive:f}}class wr{static for(t){return new wr().append(t).get()}constructor(){this.crc=-1}get(){return~this.crc}append(t){for(var e=this.crc|0,i=this.table,s=0,n=t.length|0;s<n;s++)e=e>>>8^i[(e^t[s])&255];return this.crc=e,this}}wr.prototype.table=(()=>{var r,t,e,i=[];for(r=0;r<256;r++){for(e=r,t=0;t<8;t++)e=e&1?e>>>1^3988292384:e>>>1;i[r]=e}return i})();function Aa(r){let t=new Uint8Array(r),e=new DataView(t.buffer),i={array:t,view:e,size:r,set8(s,n){return e.setUint8(s,n),i},set16(s,n){return e.setUint16(s,n,!0),i},set32(s,n){return e.setUint32(s,n,!0),i},bytes(s,n){return t.set(n,s),i}};return i}const Sr=class Sr{constructor(t){let e=new Date;Object.assign(this,{directory:t,offset:0,files:[],time:(e.getHours()<<6|e.getMinutes())<<5|e.getSeconds()/2,date:(e.getFullYear()-1980<<4|e.getMonth()+1)<<5|e.getDate()}),this.add(t)}async add(t,e){let i=!e,s=Sr.encoder.encode(`${this.directory}/${i?"":t}`),n=new Uint8Array(i?0:await e.arrayBuffer()),a=30+s.length,o=a+n.length,l=16,{offset:h}=this,c=Aa(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,wr.for(n)).set32(14,n.length).set32(18,n.length).set16(22,s.length);h+=a;let d=Aa(a+n.length+l).set32(0,67324752).bytes(4,c.array).bytes(30,s).bytes(a,n);h+=n.length,d.set32(o,134695760).bytes(o+4,c.array.slice(10,22)),h+=l,this.files.push({offset:h,folder:i,name:s,header:c,payload:d}),this.offset=h}toBuffer(){let t=this.files.reduce((d,{name:u})=>46+u.length+d,0),e=Aa(t+22),i=0;for(var{offset:s,name:n,header:a,folder:o}of this.files)e.set32(i,33639248).set16(i+4,20).bytes(i+6,a.array).set8(i+38,o?16:0).set32(i+42,s).bytes(i+46,n),i+=46+n.length;e.set32(i,101010256).set16(i+8,this.files.length).set16(i+10,this.files.length).set32(i+12,t).set32(i+16,this.offset);let l=new Uint8Array(this.offset+e.size),h=0;for(var{payload:c}of this.files)l.set(c.array,h),h+=c.size;return l.set(e.array,h),l}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}};Ic(Sr,"encoder",new TextEncoder);let wa=Sr;const Sa=(r,t,e,i)=>{if(i){let{width:s,height:n}=r,a=Object.assign(document.createElement("canvas"),{width:s,height:n}),o=a.getContext("2d");o.fillStyle=i,o.fillRect(0,0,s,n),o.drawImage(r,0,0),r=a}return new Promise((s,n)=>r.toBlob(s,t,e))},C0=(...r)=>Sa(...r).then(t=>t.arrayBuffer()),x0=async(r,t,e,i,s)=>{wc(s,await Sa(r,t,e,i))},P0=async(r,t,e,i,s,n,a)=>{let o=c=>n.replace("{}",String(c+1).padStart(a,"0")),l=Ac(s,".zip")||"archive",h=new wa(l);await Promise.all(r.map(async(c,d)=>{let u=o(d);await h.add(u,await Sa(c,t,e,i))})),wc(`${l}.zip`,h.blob)},wc=(r,t)=>{const e=window.URL.createObjectURL(t),i=document.createElement("a");i.style.display="none",i.href=e,i.setAttribute("download",r),typeof i.download>"u"&&i.setAttribute("target","_blank"),document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(()=>window.URL.revokeObjectURL(e),100)};var O0={asBuffer:C0,asDownload:x0,asZipDownload:P0,atScale:(r,t,e)=>r.map(i=>{if(t==1&&!e)return i.canvas;let s=document.createElement("canvas"),n=s.getContext("2d"),a=i.canvas?i.canvas:i;return s.width=a.width*t,s.height=a.height*t,e&&(n.fillStyle=e,n.fillRect(0,0,s.width,s.height)),n.scale(t,t),n.drawImage(a,0,0),s}),options:D0};const{asBuffer:La,asDownload:$0,asZipDownload:M0,atScale:Ra,options:_a}=O0,Sc=Symbol.for("toDataURL"),F0=r=>{let t=Object.assign(new Lc,{crossOrigin:"Anonymous",src:r});return t.decode().then(()=>t)};class N0{constructor(t,e){let i=document.createElement("canvas"),s=[];Object.defineProperty(i,"async",{value:!0,writable:!1,enumerable:!0});for(var[n,a]of Object.entries({png:()=>La(i,"image/png"),jpg:()=>La(i,"image/jpeg"),pages:()=>s.concat(i).map(o=>o.getContext("2d"))}))Object.defineProperty(i,n,{get:a});return Object.assign(i,{width:t,height:e,newPage(...o){var{width:h,height:c}=i,l=Object.assign(document.createElement("canvas"),{width:h,height:c});l.getContext("2d").drawImage(i,0,0),s.push(l);var[h,c]=o.length?o:[h,c];return Object.assign(i,{width:h,height:c}).getContext("2d")},saveAs(o,l){l=typeof l=="number"?{quality:l}:l;let h=_a(this.pages,{filename:o,...l}),{pattern:c,padding:d,mime:u,quality:f,matte:p,density:g,archive:v}=h,E=Ra(h.pages,g);return d==null?$0(E[0],u,f,p,o):M0(E,u,f,p,v,c,d)},toBuffer(o="png",l={}){l=typeof l=="number"?{quality:l}:l;let h=_a(this.pages,{extension:o,...l}),{mime:c,quality:d,matte:u,pages:f,density:p}=h,g=Ra(f,p,u)[0];return La(g,c,d,u)},[Sc]:i.toDataURL.bind(i),toDataURL(o="png",l={}){l=typeof l=="number"?{quality:l}:l;let h=_a(this.pages,{extension:o,...l}),{mime:c,quality:d,matte:u,pages:f,density:p}=h,g=Ra(f,p,u)[0],v=g[g===i?Sc:"toDataURL"](c,d);return Promise.resolve(v)}})}}const{CanvasRenderingContext2D:U0,CanvasGradient:B0,CanvasPattern:H0,Image:Lc,ImageData:G0,Path2D:V0,DOMMatrix:K0,DOMRect:j0,DOMPoint:W0}=window;var Rc={Canvas:N0,loadImage:F0,CanvasRenderingContext2D:U0,CanvasGradient:B0,CanvasPattern:H0,Image:Lc,ImageData:G0,Path2D:V0,DOMMatrix:K0,DOMRect:j0,DOMPoint:W0};const _c=xe({__proto__:null,default:zr(Rc)},[Rc]);return Object.defineProperty(At,Symbol.toStringTag,{value:"Module"}),At}({});
|
1481
1422
|
//# sourceMappingURL=embeds.iife.js.map
|