PageSourceSearch

https://samply.app/assets/index.1ffd022d.js

js samply.app collected 2026-09-24 17:53:49 UTC 754,014 bytes, 82 lines download raw bytes

1import{I as $r,aY as Vk,a1 as _o,aZ as bo,a_ as Hk,a$ as Gk,b0 as Uo,b1 as Xk,b2 as Qr,r as Rt,i as ut,w as Kk,aM as Wk,aN as qk,U as tw,z as Xh,A as GS,b3 as zk,b4 as Yk,b5 as Qk,b6 as $k,b7 as Jk,b8 as Zk,b9 as xa,ba as XS,_ as eD,V as Kh,aA as tD,bb as nD,R as $h,bc as iD,bd as rD,be as oD,bf as sD,ah as uD,au as aD,X as lD,y as cD}from"./index.a7219c61.js";import{s as Ea}from"./files.8f5c9851.js";(function(x){x.AmazonMusic="amazon-music",x.AppleMusic="apple-music",x.Deezer="deezer",x.Spotify="spotify",x.TIDAL="tidal",x.YouTube="youtube"})(Ar=Ar||{}),function(x){x[x.None=0]="None",x[x.LimitGainIncrease=1]="LimitGainIncrease",x[x.ReduceGain=2]="ReduceGain"}(_i=_i||{}),(Oo={})[Ar.AmazonMusic]={referenceLevel:-14,allowPositiveGain:!1,maxTruePeakBehavior:_i.None,maxTruePeak:0},Oo[Ar.AppleMusic]={referenceLevel:-16,allowPositiveGain:!0,maxTruePeakBehavior:_i.ReduceGain,maxTruePeak:-1},Oo[Ar.Deezer]={referenceLevel:-15,allowPositiveGain:!1,maxTruePeakBehavior:_i.None,maxTruePeak:0},Oo[Ar.Spotify]={referenceLevel:-14,allowPositiveGain:!0,maxTruePeakBehavior:_i.LimitGainIncrease,maxTruePeak:-1},Oo[Ar.TIDAL]={referenceLevel:-14,allowPositiveGain:!1,maxTruePeakBehavior:_i.None,maxTruePeak:0},Oo[Ar.YouTube]={referenceLevel:-14,allowPositiveGain:!1,maxTruePeakBehavior:_i.None,maxTruePeak:0};var Oo,Ar,_i,dD=Oo,pD=function(x,N){var B=dD[x],b=B.referenceLevel-N.integratedLoudness;switch(B.allowPositiveGain||(b=Math.min(b,0)),B.maxTruePeakBehavior){case _i.None:break;case _i.LimitGainIncrease:var j=Math.max(0,B.maxTruePeak-N.maxTruePeak),b=Math.min(b,j);break;case _i.ReduceGain:j=B.maxTruePeak-N.maxTruePeak,b=Math.min(b,j)}return b};function fD(x){const b=288/(200*Math.log10(10));return((10**x-1)/(10-1))**b}function hD(x,N,B){if(x===void 0||N===void 0||B===void 0)return 0;const Z=Math.max(-60,Math.min(0,x)),Te=1,f=B>-Te?0:Math.abs(B)-Te,He=Z-N;return He<0?He:Math.min(He,f)}function gD(x,N,B){return N===void 0||B===void 0||!Object.values(Ar).includes(x)?0:pD(x,{integratedLoudness:N,maxTruePeak:B})}function mD(x){return Math.pow(10,x/20)}function nd(){const x=$r(),N=x.isApple();if(!N)return!0;const B=x.isMobile();if(N&&B)return!1;const{major:b,minor:j}=x.safariVersion();return(b??0)>15||b===15&&(j??0)>5}var zs={};/*
2 @license
3 Shaka Player
4 Copyright 2016 Google LLC
5 SPDX-License-Identifier: Apache-2.0
6*/(function(x){(function(){var N=typeof window<"u"?window:Vk,B={};(function(j,Z,Te){var f;function He(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var Lt=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function Nt(e){e=[typeof globalThis=="object"&&globalThis,e,typeof j=="object"&&j,typeof self=="object"&&self,typeof Z=="object"&&Z];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var At=Nt(this);function be(e,t){if(t)e:{var n=At;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}e=e[e.length-1],i=n[e],t=t(i),t!=i&&t!=null&&Lt(n,e,{configurable:!0,writable:!0,value:t})}}be("Symbol",function(e){function t(o){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(i+(o||"")+"_"+r++,o)}function n(o,s){this.g=o,Lt(this,"description",{configurable:!0,writable:!0,value:s})}if(e)return e;n.prototype.toString=function(){return this.g};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return t}),be("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var i=At[t[n]];typeof i=="function"&&typeof i.prototype[e]!="function"&&Lt(i.prototype,e,{configurable:!0,writable:!0,value:function(){return Nn(He(this))}})}return e});function Nn(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}function g(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:He(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function W(e){if(!(e instanceof Array)){e=g(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var Fe=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},ti;
6if(typeof Object.setPrototypeOf=="function")ti=Object.setPrototypeOf;else{var Wt;e:{var xn={a:!0},Bt={};try{Bt.__proto__=xn,Wt=Bt.a;break e}catch{}Wt=!1}ti=Wt?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var Vt=ti;function ct(e,t){if(e.prototype=Fe(t.prototype),e.prototype.constructor=e,Vt)Vt(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.Vk=t.prototype}function fn(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.A=this.i=null}function Ee(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}fn.prototype.u=function(e){this.h=e};function Ht(e,t){e.i={Pg:t,$g:!0},e.g=e.m||e.j}fn.prototype.return=function(e){this.i={return:e},this.g=this.j};function S(e,t,n){return e.g=n,{value:t}}fn.prototype.s=function(e){this.g=e};function q(e){e.g=0}function ee(e,t,n){e.m=t,n!=null&&(e.j=n)}function It(e,t){e.m=0,e.j=t||0}function fe(e,t,n){e.g=t,e.m=n||0}function re(e,t){return e.m=t||0,t=e.i.Pg,e.i=null,t}function qt(e){e.A=[e.i],e.m=0,e.j=0}function jt(e,t){var n=e.A.splice(0)[0];(n=e.i=e.i||n)?n.$g?e.g=e.m||e.j:n.s!=null&&e.j<n.s?(e.g=n.s,e.i=null):e.g=e.j:e.g=t}function Jr(e){this.g=new fn,this.h=e}function Zr(e,t){Ee(e.g);var n=e.g.l;return n?Ie(e,"return"in n?n.return:function(i){return{value:i,done:!0}},t,e.g.return):(e.g.return(t),me(e))}function Ie(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var o=r.value}catch(s){return e.g.l=null,Ht(e.g,s),me(e)}
vendor: 24,915 bytes, lines 6-14
6return e.g.l=null,i.call(e.g,o),me(e)}function me(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(n){e.g.h=void 0,Ht(e.g,n)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.$g)throw t.Pg;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function Ze(e){this.next=function(t){return Ee(e.g),e.g.l?t=Ie(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=me(e)),t},this.throw=function(t){return Ee(e.g),e.g.l?t=Ie(e,e.g.l.throw,t,e.g.u):(Ht(e.g,t),t=me(e)),t},this.return=function(t){return Zr(e,t)},this[Symbol.iterator]=function(){return this}}function gt(e){function t(i){return e.next(i)}function n(i){return e.throw(i)}return new Promise(function(i,r){function o(s){s.done?i(s.value):Promise.resolve(s.value).then(t,n).then(o,r)}o(e.next())})}function C(e){return gt(new Ze(new Jr(e)))}function mt(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}be("Promise",function(e){function t(s){this.h=0,this.i=void 0,this.g=[],this.o=!1;var u=this.j();try{s(u.resolve,u.reject)}catch(a){u.reject(a)}}function n(){this.g=null}function i(s){return s instanceof t?s:new t(function(u){u(s)})}if(e)return e;n.prototype.h=function(s){if(this.g==null){this.g=[];var u=this;this.i(function(){u.l()})}this.g.push(s)};var r=At.setTimeout;n.prototype.i=function(s){r(s,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var s=this.g;this.g=[];for(var u=0;u<s.length;++u){var a=s[u];s[u]=null;try{a()}catch(l){this.j(l)}}}this.g=null},n.prototype.j=function(s){this.i(function(){throw s})},t.prototype.j=function(){function s(l){return function(c){a||(a=!0,l.call(u,c))}}var u=this,a=!1;return{resolve:s(this.F),reject:s(this.l)}},t.prototype.F=function(s){if(s===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(s instanceof t)this.H(s);else{e:switch(typeof s){case"object":var u=s!=null;break e;case"function":u=!0;break e;default:u=!1}u?this.C(s):this.m(s)}},t.prototype.C=function(s){var u=void 0;try{u=s.then}catch(a){this.l(a);return}typeof u=="function"?this.I(u,s):this.m(s)},t.prototype.l=function(s){this.u(2,s)},t.prototype.m=function(s){this.u(1,s)},t.prototype.u=function(s,u){if(this.h!=0)throw Error("Cannot settle("+s+", "+u+"): Promise already settled in state"+this.h);this.h=s,this.i=u,this.h===2&&this.G(),this.A()},t.prototype.G=function(){var s=this;r(function(){if(s.B()){var u=At.console;typeof u<"u"&&u.error(s.i)}},1)},t.prototype.B=function(){if(this.o)return!1;var s=At.CustomEvent,u=At.Event,a=At.dispatchEvent;return typeof a>"u"?!0:(typeof s=="function"?s=new s("unhandledrejection",{cancelable:!0}):typeof u=="function"?s=new u("unhandledrejection",{cancelable:!0}):(s=At.document.createEvent("CustomEvent"),s.initCustomEvent("unhandledrejection",!1,!0,s)),s.promise=this,s.reason=this.i,a(s))},t.prototype.A=function(){if(this.g!=null){for(var s=0;s<this.g.length;++s)o.h(this.g[s]);this.g=null}};var o=new n;return t.prototype.H=function(s){var u=this.j();s.Vd(u.resolve,u.reject)},t.prototype.I=function(s,u){var a=this.j();try{s.call(u,a.resolve,a.reject)}catch(l){a.reject(l)}},t.prototype.then=function(s,u){function a(p,h){return typeof p=="function"?function(m){try{l(p(m))}catch(y){c(y)}}:h}var l,c,d=new t(function(p,h){l=p,c=h});return this.Vd(a(s,l),a(u,c)),d},t.prototype.catch=function(s){return this.then(void 0,s)},t.prototype.Vd=function(s,u){function a(){switch(l.h){case 1:s(l.i);break;case 2:u(l.i);break;default:throw Error("Unexpected state: "+l.h)}}var l=this;this.g==null?o.h(a):this.g.push(a),this.o=!0},t.resolve=i,t.reject=function(s){return new t(function(u,a){a(s)})},t.race=function(s){return new t(function(u,a){for(var l=g(s),c=l.next();!c.done;c=l.next())i(c.value).Vd(u,a)})},t.all=function(s){var u=g(s),a=u.next();return a.done?i([]):new t(function(l,c){function d(m){return function(y){p[m]=y,h--,h==0&&l(p)}}var p=[],h=0;do p.push(void 0),h++,i(a.value).Vd(d(p.length-1),c),a=u.next();while(!a.done)})},t});function wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}be("WeakMap",function(e){function t(a){if(this.g=(u+=Math.random()+1).toString(),a){a=g(a);for(var l;!(l=a.next()).done;)l=l.value,this.set(l[0],l[1])}}function n(){}function i(a){var l=typeof a;return l==="object"&&a!==null||l==="function"}function r(a){if(!wt(a,s)){var l=new n;Lt(a,s,{value:l})}}function o(a){var l=Object[a];l&&(Object[a]=function(c){return c instanceof n?c:(Object.isExtensible(c)&&r(c),l(c))})}if(function(){if(!e||!Object.seal)return!1;try{var a=Object.seal({}),l=Object.seal({}),c=new e([[a,2],[l,3]]);return c.get(a)!=2||c.get(l)!=3?!1:(c.delete(a),c.set(l,4),!c.has(a)&&c.get(l)==4)}catch{return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var u=0;return t.prototype.set=function(a,l){if(!i(a))throw Error("Invalid WeakMap key");if(r(a),!wt(a,s))throw Error("WeakMap key fail: "+a);return a[s][this.g]=l,this},t.prototype.get=function(a){return i(a)&&wt(a,s)?a[s][this.g]:void 0},t.prototype.has=function(a){return i(a)&&wt(a,s)&&wt(a[s],this.g)},t.prototype.delete=function(a){return i(a)&&wt(a,s)&&wt(a[s],this.g)?delete a[s][this.g]:!1},t}),be("Map",function(e){function t(){var u={};return u.Yb=u.next=u.head=u}function n(u,a){var l=u[1];return Nn(function(){if(l){for(;l.head!=u[1];)l=l.Yb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:a(l)};l=null}return{done:!0,value:void 0}})}function i(u,a){var l=a&&typeof a;l=="object"||l=="function"?o.has(a)?l=o.get(a):(l=""+ ++s,o.set(a,l)):l="p_"+a;var c=u[0][l];if(c&&wt(u[0],l))for(u=0;u<c.length;u++){var d=c[u];if(a!==a&&d.key!==d.key||a===d.key)return{id:l,list:c,index:u,entry:d}}return{id:l,list:c,index:-1,entry:void 0}}function r(u){if(this[0]={},this[1]=t(),this.size=0,u){u=g(u);for(var a;!(a=u.next()).done;)a=a.value,this.set(a[0],a[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var u=Object.seal({x:4}),a=new e(g([[u,"s"]]));if(a.get(u)!="s"||a.size!=1||a.get({x:4})||a.set({x:4},"t")!=a||a.size!=2)return!1;var l=a.entries(),c=l.next();return c.done||c.value[0]!=u||c.value[1]!="s"?!1:(c=l.next(),!(c.done||c.value[0].x!=4||c.value[1]!="t"||!l.next().done))}catch{return!1}}())return e;var o=new WeakMap;r.prototype.set=function(u,a){u=u===0?0:u;var l=i(this,u);return l.list||(l.list=this[0][l.id]=[]),l.entry?l.entry.value=a:(l.entry={next:this[1],Yb:this[1].Yb,head:this[1],key:u,value:a},l.list.push(l.entry),this[1].Yb.next=l.entry,this[1].Yb=l.entry,this.size++),this},r.prototype.delete=function(u){return u=i(this,u),u.entry&&u.list?(u.list.splice(u.index,1),u.list.length||delete this[0][u.id],u.entry.Yb.next=u.entry.next,u.entry.next.Yb=u.entry.Yb,u.entry.head=null,this.size--,!0):!1},r.prototype.clear=function(){this[0]={},this[1]=this[1].Yb=t(),this.size=0},r.prototype.has=function(u){return!!i(this,u).entry},r.prototype.get=function(u){return(u=i(this,u).entry)&&u.value},r.prototype.entries=function(){return n(this,function(u){return[u.key,u.value]})},r.prototype.keys=function(){return n(this,function(u){return u.key})},r.prototype.values=function(){return n(this,function(u){return u.value})},r.prototype.forEach=function(u,a){for(var l=this.entries(),c;!(c=l.next()).done;)c=c.value,u.call(a,c[1],c[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var s=0;return r}),be("Set",function(e){function t(n){if(this.g=new Map,n){n=g(n);for(var i;!(i=n.next()).done;)this.add(i.value)}this.size=this.g.size}return function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),i=new e(g([n]));if(!i.has(n)||i.size!=1||i.add(n)!=i||i.size!=1||i.add({x:4})!=i||i.size!=2)return!1;var r=i.entries(),o=r.next();return o.done||o.value[0]!=n||o.value[1]!=n?!1:(o=r.next(),o.done||o.value[0]==n||o.value[0].x!=4||o.value[1]!=o.value[0]?!1:r.next().done)}catch{return!1}}()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,i){var r=this;this.g.forEach(function(o){return n.call(i,o,o,r)})},t)});function mi(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}be("Array.prototype.values",function(e){return e||function(){return mi(this,function(t,n){return n})}}),be("Array.from",function(e){return e||function(t,n,i){n=n??function(u){return u};var r=[],o=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof o=="function"){t=o.call(t);for(var s=0;!(o=t.next()).done;)r.push(n.call(i,o.value,s++))}else for(o=t.length,s=0;s<o;s++)r.push(n.call(i,t[s],s));return r}}),be("Array.prototype.keys",function(e){return e||function(){return mi(this,function(t){return t})}}),be("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),be("Array.prototype.includes",function(e){return e||function(t,n){var i=this;i instanceof String&&(i=String(i));var r=i.length;for(n=n||0,0>n&&(n=Math.max(n+r,0));n<r;n++){var o=i[n];if(o===t||Object.is(o,t))return!0}return!1}});function bi(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}be("String.prototype.includes",function(e){return e||function(t,n){return bi(this,t,"includes").indexOf(t,n||0)!==-1}}),be("String.fromCodePoint",function(e){return e||function(t){for(var n="",i=0;i<arguments.length;i++){var r=Number(arguments[i]);if(0>r||1114111<r||r!==Math.floor(r))throw new RangeError("invalid_code_point "+r);65535>=r?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(r>>>10&1023|55296),n+=String.fromCharCode(r&1023|56320))}return n}});function Ke(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var o=e[r];if(t.call(n,o,r,e))return{Yg:r,v:o}}return{Yg:-1,v:void 0}}be("Array.prototype.findIndex",function(e){return e||function(t,n){return Ke(this,t,n).Yg}}),be("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=g(n);for(var i;!(i=n.next()).done;)this.add(i.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),i=Object.seal({}),r=new e([n]);return!r.has(n)||r.has(i)?!1:(r.delete(n),r.add(i),!r.has(n)&&r.has(i))}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),be("Array.prototype.find",function(e){return e||function(t,n){return Ke(this,t,n).v}}),be("String.prototype.startsWith",function(e){return e||function(t,n){var i=bi(this,t,"startsWith"),r=i.length,o=t.length;n=Math.max(0,Math.min(n|0,i.length));for(var s=0;s<o&&n<r;)if(i[n++]!=t[s++])return!1;return s>=o}}),be("Object.entries",function(e){return e||function(t){var n=[],i;for(i in t)wt(t,i)&&n.push([i,t[i]]);return n}});var et=typeof Object.assign=="function"?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)wt(i,r)&&(e[r]=i[r])}return e};be("Object.assign",function(e){return e||et}),be("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),be("Array.prototype.entries",function(e){return e||function(){return mi(this,function(t,n){return[t,n]})}}),be("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),be("String.prototype.repeat",function(e){return e||function(t){var n=bi(this,null,"repeat");if(0>t||1342177279<t)throw new RangeError("Invalid count value");t|=0;for(var i="";t;)t&1&&(i+=n),(t>>>=1)&&(n+=n);return i}}),be("Number.EPSILON",function(){return Math.pow(2,-52)}),be("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),be("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),be("Object.values",function(e){return e||function(t){var n=[],i;for(i in t)wt(t,i)&&n.push(t[i]);return n}}),be("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),be("String.prototype.endsWith",function(e){return e||function(t,n){var i=bi(this,t,"endsWith");n===void 0&&(n=i.length),n=Math.max(0,Math.min(n|0,i.length));for(var r=t.length;0<r&&0<n;)if(i[--n]!=t[--r])return!1;return 0>=r}}),be("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return 0>t?-n:n}});var $t=this||self;function Y(e,t){e=e.split(".");var n=$t;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||t===void 0?n[i]&&n[i]!==Object.prototype[i]?n=n[i]:n=n[i]={}:n[i]=t}function vi(){}function ni(){}function hn(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}hn.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)};function Gn(e){return e.h/(1-Math.pow(e.g,e.i))}function $e(){this.h=new hn(2),this.j=new hn(5),this.g=0,this.i=128e3,this.l=16e3}$e.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},$e.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},$e.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(Gn(this.h),Gn(this.j))};function ii(){}function En(){}function Pe(){}function zi(e){var t=mt.apply(1,arguments);Ut.has(e)||(Ut.add(e),Pe.apply(ii,W(t)))}function Ir(){}function $(){}function Me(){}var Ut=new Set;j.console&&(new Map().set(1,function(){return console.error.apply(console,W(mt.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,W(mt.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,W(mt.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,W(mt.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,W(mt.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,W(mt.apply(0,arguments)))}),Pe=function(){return console.warn.apply(console,W(mt.apply(0,arguments)))},En=function(){console.error.apply(console,W(mt.apply(0,arguments)))});function gn(){this.g=new Map}f=gn.prototype,f.push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},f.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},f.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(i){return i!=t});this.g.set(e,n),n.length||this.g.delete(e)}},f.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},f.size=function(){return this.g.size},f.keys=function(){return Array.from(this.g.keys())};function Le(){this.g=new gn}f=Le.prototype,f.release=function(){this.Ra(),this.g=null},f.D=function(e,t,n,i){this.g&&(e=new yi(e,t,n,i),this.g.push(t,e))},f.qa=function(e,t,n,i){function r(s){o.Ka(e,t,r),n(s)}var o=this;this.D(e,t,r,i)},f.Ka=function(e,t,n){if(this.g){var i=this.g.get(t)||[];i=g(i);for(var r=i.next();!r.done;r=i.next())r=r.value,r.target!=e||n!=r.listener&&n||(r.Ka(),this.g.remove(t,r))}},f.Ra=function(){if(this.g){for(var e=[],t=g(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,W(n.value));for(e=g(e),t=e.next();!t.done;t=e.next())t.value.Ka();this.g.g.clear()}},Y("shaka.util.EventManager",Le),Le.prototype.removeAll=Le.prototype.Ra,Le.prototype.unlisten=Le.prototype.Ka,Le.prototype.listenOnce=Le.prototype.qa,Le.prototype.listen=Le.prototype.D,Le.prototype.release=Le.prototype.release;function yi(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=Yi(e,i),this.target.addEventListener(t,n,this.g)}yi.prototype.Ka=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function Yi(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(i){return!n.has(i)}),Xn(e)?t:t.capture||!1}function Xn(e){var t=zt;if(t==null){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),i=function(){},e.addEventListener("test",i,n),e.removeEventListener("test",i,n)}catch{t=!1}zt=t}return t||!1}var zt=void 0;Y("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function jn(e,t){this.g=e,this.h=t}jn.prototype.toString=function(){return"v"+this.g+"."+this.h};function Ue(e,t){var n=new jn(5,0),i=ig,r=i.g,o=n.h-r.h;(0<(n.g-r.g||o)?i.i:i.h)(i.g,n,e,t)}function Ys(e,t,n,i){Pe([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function uw(e,t,n,i){En([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}var ig=null;/*
7 @license
8 Copyright 2008 The Closure Library Authors
9 SPDX-License-Identifier: Apache-2.0
10*/var aw=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
11 @license
12 Copyright 2006 The Closure Library Authors
13 SPDX-License-Identifier: Apache-2.0
14*/function vt(e){var t;e instanceof vt?(Ma(this,e.Kb),this.Hc=e.Hc,Ca(this,e.nb),rd(this,e.$c),this.ab=e.ab,eo(this,e.g.clone()),this.qc=e.qc):e&&(t=String(e).match(aw))?(Ma(this,t[1]||"",!0),this.Hc=Fo(t[2]||""),Ca(this,t[3]||"",!0),rd(this,t[4]),this.ab=Fo(t[5]||"",!0),eo(this,t[6]||"",!0),this.qc=Fo(t[7]||"")):this.g=new Bo(null)}f=vt.prototype,f.Kb="",f.Hc="",f.nb="",f.$c=null,f.ab="",f.qc="",f.toString=function(){var e=[],t=this.Kb;if(t&&e.push(Qs(t,rg,!0),":"),t=this.nb){e.push("//");var n=this.Hc;n&&e.push(Qs(n,rg,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.$c,t!=null&&e.push(":",String(t))}return(t=this.ab)&&(this.nb&&t.charAt(0)!="/"&&e.push("/"),e.push(Qs(t,t.charAt(0)=="/"?dw:cw,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.qc)&&e.push("#",Qs(t,fw)),e.join("")},f.resolve=function(e){var t=this.clone();t.Kb==="data"&&(t=new vt);var n=!!e.Kb;n?Ma(t,e.Kb):n=!!e.Hc,n?t.Hc=e.Hc:n=!!e.nb,n?Ca(t,e.nb):n=e.$c!=null;var i=e.ab;if(n)rd(t,e.$c);else if(n=!!e.ab){if(i.charAt(0)!="/")if(this.nb&&!this.ab)i="/"+i;else{var r=t.ab.lastIndexOf("/");r!=-1&&(i=t.ab.substr(0,r+1)+i)}if(i==".."||i==".")i="";else if(i.indexOf("./")!=-1||i.indexOf("/.")!=-1){r=i.lastIndexOf("/",0)==0,i=i.split("/");for(var o=[],s=0;s<i.length;){var u=i[s++];u=="."?r&&s==i.length&&o.push(""):u==".."?((1<o.length||o.length==1&&o[0]!="")&&o.pop(),r&&s==i.length&&o.push("")):(o.push(u),r=!0)}i=o.join("/")}}return n?t.ab=i:n=e.g.toString()!=="",n?eo(t,e.g.clone()):n=!!e.qc,n&&(t.qc=e.qc),t},f.clone=function(){return new vt(this)};function Ma(e,t,n){e.Kb=n?Fo(t,!0):t,e.Kb&&(e.Kb=e.Kb.replace(/:$/,""))}function Ca(e,t,n){e.nb=n?Fo(t,!0):t}function rd(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.$c=t}else e.$c=null}function eo(e,t,n){t instanceof Bo?e.g=t:(n||(t=Qs(t,pw)),e.g=new Bo(t))}function Fo(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Qs(e,t,n){return e!=null?(e=encodeURI(e).replace(t,lw),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function lw(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var rg=/[#\/\?@]/g,cw=/[#\?:]/g,dw=/[#\?]/g,pw=/[#\?@]/g,fw=/#/g;function Bo(e){this.g=e||null}function ka(e){if(!e.Va&&(e.Va=new Map,e.kd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(0<=i){var o=t[n].substring(0,i);r=t[n].substring(i+1)}else o=t[n];o=decodeURIComponent(o.replace(/\+/g," ")),r=r||"",e.add(o,decodeURIComponent(r.replace(/\+/g," ")))}}f=Bo.prototype,f.Va=null,f.kd=null;function og(e){return ka(e),e.kd}f.add=function(e,t){ka(this),this.g=null;var n=this.Va.has(e)?this.Va.get(e):null;return n||this.Va.set(e,n=[]),n.push(t),this.kd++,this},f.set=function(e,t){return ka(this),this.g=null,this.Va.has(e)?this.Va.set(e,[t]):this.add(e,t),this},f.get=function(e){return ka(this),this.Va.get(e)||[]},f.toString=function(){if(this.g)return this.g;if(!this.Va||!this.Va.size)return"";for(var e=[],t=g(this.Va.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.Va.get(i);for(var r=0;r<i.length;r++){var o=n;i[r]!==""&&(o+="="+encodeURIComponent(i[r])),e.push(o)}}return this.g=e.join("&")},f.clone=function(){var e=new Bo;if(e.g=this.g,this.Va){for(var t=new Map,n=g(this.Va),i=n.next();!i.done;i=n.next()){var r=g(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.Va=t,e.kd=this.kd}return e};function Vo(){}function Qi(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=he(e);t=he(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function ri(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function he(e,t,n){return n=n===void 0?1/0:n,od(e,t===void 0?0:t,n,Uint8Array)}function sg(e,t,n){return n=n===void 0?1/0:n,od(e,t===void 0?0:t,n,Uint16Array)}function An(e,t,n){return n=n===void 0?1/0:n,od(e,t===void 0?0:t,n,DataView)}function od(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,o=1;"BYTES_PER_ELEMENT"in i&&(o=i.BYTES_PER_ELEMENT);var s=((e.byteOffset||0)+e.byteLength)/o;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/o,s))),new i(r,e,Math.floor(Math.min(e+Math.max(n,0),s))-e)}Y("shaka.util.BufferUtils",Vo),Vo.toDataView=An,Vo.toUint16=sg,Vo.toUint8=he,Vo.toArrayBuffer=ri,Vo.equal=Qi;function k(e,t,n){var i=mt.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(r){this.stack=r.stack}}k.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},Y("shaka.util.Error",k),k.Severity={RECOVERABLE:1,CRITICAL:2},k.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},k.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_
14LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4054,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function $s(e){this.h=e,this.g=void 0}$s.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};function ug(e,t){return e.length&&t.length&&e!==t?0<sd(e,t).length:!0}function sd(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=g(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=g(t),o=r.next();!o.done;o=r.next())if(o=o.value,i.keySystem==o.keySystem){r=new Map;for(var s=g((i.initData||[]).concat(o.initData||[])),u=s.next();!u.done;u=s.next())u=u.value,r.set(u.keyId,u);r=Array.from(r.values()),s=i.keyIds&&o.keyIds?new Set([].concat(W(i.keyIds),W(o.keyIds))):i.keyIds||o.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||o.persistentStateRequired,videoRobustness:i.videoRobustness||o.videoRobustness,audioRobustness:i.audioRobustness||o.audioRobustness,serverCertificate:i.serverCertificate||o.serverCertificate,serverCertificateUri:i.serverCertificateUri||o.serverCertificateUri,initData:r,keyIds:s});break}}return n}function ud(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Da(e){return e?!!e.match(/^com\.apple\.fps/):!1}var Pa=new $s(function(){return ri(new Uint8Array([0]))}),Ho=new Map;function Js(e){this.h=e,this.g=null}Js.prototype.da=function(e){var t=this;this.stop();var n=!0,i=null;return this.g=function(){j.clearTimeout(i),n=!1},i=j.setTimeout(function(){n&&t.h()},1e3*e),this},Js.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function ke(e){this.h=e,this.g=null}ke.prototype.sb=function(){return this.stop(),this.h(),this},ke.prototype.da=function(e){var t=this;return this.stop(),this.g=new Js(function(){t.h()}).da(e),this},ke.prototype.ua=function(e){var t=this;return this.stop(),this.g=new Js(function(){t.g.da(e),t.h()}).da(e),this},ke.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},Y("shaka.util.Timer",ke),ke.prototype.stop=ke.prototype.stop,ke.prototype.tickEvery=ke.prototype.ua,ke.prototype.tickAfter=ke.prototype.da,ke.prototype.tickNow=ke.prototype.sb;function Fi(){var e=j.ManagedMediaSource||j.MediaSource;
14return!!(e&&e.isTypeSupported)}function Zs(e){return cg().canPlayType(e)!=""}function Go(){return!!navigator.userAgent.match(/Edge?\//)}function ki(){return xt("Xbox One")}function Bi(){return xt("Tizen")}function $i(){return xt("Tizen 3")}function Ji(){return xt("Web0S")}function Ra(){return Ji()&&ag()===38}function Ti(){return xt("CrKey")&&!xt("VIZIO SmartCast")}function ag(){if(!xt("Chrome")||navigator.userAgent.match(/Edge\//))return null;var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}function Jt(){return Ko()&&((navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="macos":navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1)||(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?!0:Ko()&&1<navigator.maxTouchPoints))}function Xo(){return xt("PlayStation 5")}function Di(){return xt("PlayStation 4")}function La(){return xt("Hisense")||xt("VIDAA")}function lg(){if(!Jt()&&(!Ko()||Jt()))return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function Na(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function Mr(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":xt("Android")}function ad(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="fuchsia":xt("Fuchsia")}function ld(){return!!(Bi()||Ji()||ki()||Di()||Xo()||Ti()||La()||xt("VIZIO SmartCast")||Ko()&&!Jt())}function xt(e){return(navigator.userAgent||"").includes(e)}function Ko(){return(navigator.vendor||"").includes("Apple")}function cg(){return Wo||(cd||(cd=new ke(function(){Wo=null})),(Wo=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Wo=document.createElement("video")),cd.da(1),Wo)}function hw(){if($i()||xt("Tizen 2")||Ra()||Di()||Xo())return!1;var e=lg();return!(Ko()&&!Jt()&&e!=null&&15>e)}function dg(){var e,t,n,i,r,o,s,u,a,l,c,d,p,h,m,y,v;return C(function(T){switch(T.g){case 1:if(e={width:1/0,height:1/0},Ti()){if(h=j.cast&&cast.__platform__&&cast.__platform__.canDisplayType,e.width=1280,e.height=720,ee(T,14),!(m=h)){T.s(16);break}return S(T,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(Bi()){t=j.devicePixelRatio,e.width=1920<j.screen.width*t?3840:1920,e.height=1080<j.screen.height*t?2160:1080;try{webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution?(n=webapis.systeminfo.getMaxVideoResolution(),e.width=n.width,e.height=n.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{Pe("Tizen: Error detecting screen size, default screen size 1920x1080.")}T.s(3);break}if(Ji()){try{i=JSON.parse(j.PalmSystem.deviceInfo),e.width=Math.max(1920,i.screenWidth),e.height=Math.max(1080,i.screenHeight)}catch{Pe("WebOS: Error detecting screen size, default screen size 1920x1080."),e.width=1920,e.height=1080}T.s(3);break}if(La()){if(r=null,j.Hisense_Get4KSupportState)try{r=j.Hisense_Get4KSupportState()}catch{}r==null&&(r=xt("UHD")),r?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),T.s(3);break}if(!Di()&&!Xo()){o=void 0;try{o=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}if(o){e.width=1920,e.height=1080;try{s=new o.Media.Protection.ProtectionCapabilities,u=o.Media.Protection.ProtectionCapabilityResult,a=null;do a=s.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(a===u.maybe);a===u.probably&&(e.width=3840,e.height=2160)}catch{Pe("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else ki()&&(e.width=1920,e.height=1080,Pe("Xbox: Error detecting screen size, default screen size 1920x1080."));T.s(3);break}return l=!1,ee(T,8),S(T,j.msdk.device.getDisplayInfo(),10);case 10:c=T.h,l=c.resolution==="4K",fe(T,9);break;case 8:return re(T),ee(T,11),S(T,j.msdk.device.getDisplayInfoImmediate(),13);case 13:d=T.h,l=d.resolution==="4K",fe(T,9);break;case 11:p=re(T),Pe("PlayStation: Failed to get the display info:",p);case 9:l?(e.width=3840,e.height=2160):(e.width=1920,e.height=1080),T.s(3);break;case 17:m=T.h;case 16:if(m){e.width=3840,e.height=2160,T.s(18);break}if(!(y=h)){T.s(19);break}return S(T,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:y=T.h;case 19:y&&(e.width=1920,e.height=1080);case 18:fe(T,3);break;case 14:v=re(T),En("Failed to check canDisplayType:",v);case 3:return T.return(e)}})}function pg(e){return j.matchMedia!==void 0&&j.matchMedia("(color-gamut: p3)").matches?e?"HLG":"PQ":"SDR"}var cd=null,Wo=null;function to(){}function at(e){if(!e)return"";if(e=he(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),j.TextDecoder&&!Di())return e=new TextDecoder().decode(e),e.includes("\uFFFD")&&En('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var i=65533;if((e[n]&128)==0?i=e[n]:e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(i=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(i=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(i=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3),65535>=i)t+=String.fromCharCode(i);else{i-=65536;var r=i&1023;t+=String.fromCharCode(55296+(i>>10)),t+=String.fromCharCode(56320+r)}}return t}function Cr(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new k(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=An(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return pd(i)}function Vi(e){function t(i){return n.byteLength<=i||9<=n[i]&&126>=n[i]}if(!e)return"";var n=he(e);if(n[0]==239&&n[1]==187&&n[2]==191)return at(n);if(n[0]==254&&n[1]==255)return Cr(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return Cr(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return Cr(e,!1);if(n[1]==0&&n[3]==0)return Cr(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return at(e);throw new k(2,2,2003)}function Si(e){if(j.TextEncoder&&!Di()){var t=new TextEncoder;return ri(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;
14n++)t[n]=e[n].charCodeAt(0);return ri(t)}function dd(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}function pd(e){return fg.value()(e)}function In(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\xA0","&lrm;":"\u200E","&rlm;":"\u200F"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return r[1]=="#"?(r=r[2]=="x"||r[2]=="X"?parseInt(r.substring(3),16):parseInt(r.substring(2),10),0<=r&&1114111>=r?String.fromCodePoint(r):""):t[r]||"'"}):e||""}Y("shaka.util.StringUtils",to),to.resetFromCharCode=function(){fg.g=void 0},to.toUTF16=dd,to.toUTF8=Si,to.fromBytesAutoDetect=Vi,to.fromUTF16=Cr,to.fromUTF8=at;var fg=new $s(function(){function e(n){try{var i=new Uint8Array(n);return 0<String.fromCharCode.apply(null,i).length}catch{return!1}}for(var t={jc:65536};0<t.jc;t={jc:t.jc},t.jc/=2)if(e(t.jc))return function(n){return function(i){for(var r="",o=0;o<i.length;o+=n.jc)r+=String.fromCharCode.apply(null,i.subarray(o,o+n.jc));return r}}(t);return null});function tn(){}function ja(e){return e=pd(he(e)),btoa(e)}function Zi(e,t){return t=t??!0,e=ja(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function oi(e){e=j.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}function no(e){for(var t=e.length/2,n=new Uint8Array(t),i=0;i<t;i++)n[i]=j.parseInt(e.substr(2*i,2),16);return n}function er(e){var t=he(e);e="",t=g(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}function yt(){for(var e=mt.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var i=n=0;i<e.length;++i){var r=e[i];ArrayBuffer.isView(r)&&r.BYTES_PER_ELEMENT===1?t.set(r,n):t.set(he(r),n),n+=r.byteLength}return t}Y("shaka.util.Uint8ArrayUtils",tn),tn.concat=yt,tn.toHex=er,tn.fromHex=no,tn.fromBase64=oi,tn.toBase64=Zi,tn.toStandardBase64=ja;function Gt(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var i=new vt(e[0]);return t=new vt(t[0]),t=i.resolve(t),n&&eo(t,n),[t.toString()]}t=t.map(function(u){return new vt(u)}),i=[],e=g(e);for(var r=e.next();!r.done;r=e.next()){r=new vt(r.value);for(var o=g(t),s=o.next();!s.done;s=o.next())s=r.resolve(s.value),n&&eo(s,n),i.push(s.toString())}return i}function kr(e,t,n,i){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},i&&(e.keySystemUris=new Set([i])),e}function hg(e,t){t=t===void 0?"cenc":t;var n=[],i=[],r=[];e.forEach(function(s,u){var a=u;a.length!=22&&(a=Zi(no(u),!1));var l=s;l.length!=22&&(l=Zi(no(s),!1)),s={kty:"oct",kid:a,k:l},n.push(s),i.push(s.kid),r.push(u)}),e=JSON.stringify({keys:n});var o=JSON.stringify({kids:i});return o=[{initData:he(Si(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+j.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(r)}}function qo(e,t){if(t.length==1)return t[0];if(e=Mn(e,t),e!=null)return e;throw new k(2,4,4025,t)}function Mn(e,t){var n=gg.get(e);n=g(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;for(var r=g(t),o=r.next();!o.done;o=r.next())if(o=o.value,i.test(o.trim()))return o.trim()}return e==Ce?"":null}function fd(e,t){var n=[];e=gg.get(e),e=g(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;for(var r=g(t),o=r.next();!o.done;o=r.next())o=o.value,i.test(o.trim())&&n.push(o.trim())}return n}var Ce="text",Mt={la:"video",V:"audio",va:Ce,bf:"image",Oj:"application"},gw=1/15,gg=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function eu(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.o=i,this.j=!1;e:{if(typeof libDPIModule>"u"&&Pe("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else if(typeof LcevcDil<"u")this.h=LcevcDil,this.j=!0,Ue("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Pe("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(Pe("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Pe(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function hd(e,t,n,i){i.type!=="video"||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function mg(e){e.g&&e.i.classList.add("shaka-hidden")}eu.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function vg(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}Y("shaka.lcevc.Dec",eu),eu.prototype.release=eu.prototype.release;function Zt(e){if(gd.has(e))return gd.get(e);var t=j.ManagedMediaSource||j.MediaSource;
14return t?(t=t.isTypeSupported(e),gd.set(e,t),t):!1}function io(){var e=j.ManagedSourceBuffer||j.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType}function yg(){var e=j.ManagedMediaSource||j.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var gd=new Map;function tu(){}tu.prototype.extract=function(){},tu.prototype.decode=function(){return[]},tu.prototype.clear=function(){},tu.prototype.getStreams=function(){return[]};function md(){}md.prototype.init=function(){},md.prototype.parse=function(){return[]};function nu(){}nu.prototype.init=function(){},nu.prototype.i=function(){},nu.prototype.g=function(){},nu.prototype.j=function(){},Y("shaka.media.IClosedCaptionParser",nu);function Kn(e){this.l=new md,(e=Tg(e.toLowerCase()))&&(this.l=e()),this.h=new tu,(e=zo)&&(this.h=e())}Kn.prototype.init=function(e,t){t!==void 0&&t||this.g(),this.l.init(e)},Kn.prototype.i=function(e){e=this.l.parse(e),e=g(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=he(t.packet);0<n.length&&this.h.extract(n,t.pts)}return this.h.decode()},Kn.prototype.g=function(){this.h.clear()},Kn.prototype.j=function(){return this.h.getStreams()};function vd(e,t){yd.set(e,t)}function Tg(e){return yd.get(e)}Y("shaka.media.ClosedCaptionParser",Kn),Kn.findDecoder=function(){return zo},Kn.unregisterDecoder=function(){zo=null},Kn.registerDecoder=function(e){zo=e},Kn.findParser=Tg,Kn.unregisterParser=function(e){yd.delete(e)},Kn.registerParser=vd;var yd=new Map,zo=null;function ro(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Un,this.scroll=Sg}Y("shaka.text.CueRegion",ro);var Un=1;ro.units={PX:0,PERCENTAGE:Un,LINES:2};var Sg="";ro.scrollMode={NONE:Sg,UP:"up"};function wg(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function wi(e,t){t=e.indexOf(t),-1<t&&e.splice(t,1)}function Td(e,t,n){if(n||(n=wg),e.length!=t.length)return!1;t=t.slice(),e=g(e);for(var i=e.next(),r={};!i.done;r={bh:void 0},i=e.next()){if(r.bh=i.value,i=t.findIndex(function(o){return function(s){return n(o.bh,s)}}(r)),i==-1)return!1;t[i]=t[t.length-1],t.pop()}return t.length==0}function Yo(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=wg),e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function Qo(e){this.h=e||"",this.g=0}function $o(e){oo(e,/[ \t]+/gm)}function oo(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function so(e){return e.g==e.h.length?null:(e=oo(e,/[^ \t\n]*/gm))?e[0]:null}function iu(e){if(e=oo(e,mw),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function Jo(e){return e?iu(new Qo(e)):null}var mw=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Pi(e){function t(i){switch(typeof i){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return i;default:if(!i||ArrayBuffer.isView(i))return i;if(n.has(i))return null;var r=i.constructor==Array;if(i.constructor!=Object&&!r)return null;n.add(i);var o=r?[]:{},s;for(s in i)o[s]=t(i[s]);return r&&(o.length=i.length),o}}var n=new WeakSet;return t(e)}function uo(e){var t={},n;for(n in e)t[n]=e[n];return t}function Sd(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];r!==void 0&&(r=Sd(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=g(n),i=n.next();!i.done;i=n.next())r=i.value,i=JSON.stringify(r),r=e[r],r!==void 0&&(r=Sd(r))&&t.push(i+":"+r);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function ru(e,t){var n=n===void 0?!1:n;return e=Vi(e),ao(e,t,n)}function ao(e,t,n){return e=vw(e,n===void 0?!1:n),!t&&e.length?e[0]:(e=e.find(function(i){return t.split(",").includes(i.tagName)}))?e:null}function wd(e){return Ed.has(e)?Ed.get(e):""}function vw(e,t){function n(o,s){s=s===void 0?!1:s;for(var u=[];e[r];)if(e.charCodeAt(r)==60){if(e.charCodeAt(r+1)===47){s=r+2,r=e.indexOf(">",r),s=e.substring(s,r);var a=s.indexOf(o);if(a==-1){var l=o.indexOf(".");0<l&&(a=s.indexOf(o.substring(0,l)))}if(a==-1)throw o=e.substring(0,r).split(`
15`),Error(`Unexpected close tag
16Line: `+(o.length-1)+`
17Column: `+(o[o.length-1].length+1)+`
18Char: `+e[r]);r+1&&(r+=1);break}else if(e.charCodeAt(r+1)===33){if(e.charCodeAt(r+2)==45){for(;r!==-1&&(e.charCodeAt(r)!==62||e.charCodeAt(r-1)!=45||e.charCodeAt(r-2)!=45||r==-1);)r=e.indexOf(">",r+1);r===-1&&(r=e.length)}else if(e.charCodeAt(r+2)===91&&e.charCodeAt(r+8)===91&&e.substr(r+3,5).toLowerCase()==="cdata"){a=e.indexOf("]]>",r),a==-1?(u.push(e.substr(r+9)),r=e.length):(u.push(e.substring(r+9,a)),r=a+3);continue}r++;continue}e:{l=s,r++;var c=i(),d={};for(a=[];e.charCodeAt(r)!==62&&e[r];){var p=e.charCodeAt(r);
18if(64<p&&91>p||96<p&&123>p){p=i();for(var h=e.charCodeAt(r);h&&h!==39&&h!==34&&!(64<h&&91>h||96<h&&123>h)&&h!==62;)r++,h=e.charCodeAt(r);var m=r+1;if(r=e.indexOf(e[r],m),m=e.slice(m,r),h===39||h===34){if(r===-1){if(l={tagName:c,attributes:d,children:a,parent:null},t)for(c=0;c<a.length;c++)typeof a[c]!="string"&&(a[c].parent=l);a=l;break e}}else m=null,r--;if(p.startsWith("xmlns:")){h=m;var y=p.split(":")[1];Ed.set(h,y),Ad.set(y,h)}c==="tt"&&p==="xml:space"&&m==="preserve"&&(l=!0),d[p]=m}r++}for(e.charCodeAt(r-1)!==47?(r++,a=n(c,l)):r++,l={tagName:c,attributes:d,children:a,parent:null},c=a.length,d=0;d<c;d++)p=a[d],typeof p!="string"?t&&(p.parent=l):d==c-1&&p==`
19`&&a.pop();a=l}if(u.push(a),typeof a=="string")break;a.tagName[0]==="?"&&a.children&&(u.push.apply(u,W(a.children)),a.children=[])}else a=r,r=e.indexOf("<",r)-1,r===-2&&(r=e.length),a=e.slice(a,r+1),s?0<a.length&&u.push(a):(u.length&&a.length==1&&a[0]==`
20`||0<a.trim().length)&&u.push(a),r++;return u}function i(){for(var o=r;`\r
21	>/= `.indexOf(e[r])===-1&&e[r];)r++;return e.slice(o,r)}var r=0;return n("")}function Ua(e){return typeof e=="string"}function xg(e){var t=[];if(!e.children)return[];e=g(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Ge(e,t){var n=[];if(!e.children)return[];e=g(e.children);for(var i=e.next();!i.done;i=e.next())i=i.value,i.tagName===t&&n.push(i);return n}function Ct(e){return typeof e=="string"?In(e):(e=e.children.reduce(function(t,n){return typeof n=="string"?t+n:t},""),e===""?null:In(e))}function Wn(e){return Array.from(e.children).every(function(t){return typeof t=="string"})?((e=Ct(e))&&(e=e.trim()),e):null}function Ri(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=g(e.children);for(var i=e.next();!i.done;i=e.next())Ri(i.value,t,n)}return n}function Et(e,t){return e=Ge(e,t),e.length!=1?null:e[0]}function xi(e,t,n){return e=Eg(e,t,n),e.length!=1?null:e[0]}function ve(e,t,n,i){i=i===void 0?null:i;var r=null;return e=e.attributes[t],e!=null&&(r=n(e)),r??i}function tr(e,t,n){return t=wd(t),e.attributes[t+":"+n]||null}function Eg(e,t,n){var i=wd(t);if(t=[],e.children)for(n=i?i+":"+n:n,e=g(e.children),i=e.next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function Hi(e,t,n){t=g(t);for(var i=t.next();!i.done;i=t.next())if(i=tr(e,i.value,n))return i;return null}function Dr(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function Gi(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function Oa(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function mn(e){return e=Number(e),e%1===0?e:null}function nr(e){return e=Number(e),e%1===0&&0<e?e:null}function ln(e){return e=Number(e),e%1===0&&0<=e?e:null}function ou(e){return e=Number(e),isNaN(e)?null:e}function _a(e){return e?e.toLowerCase()==="true":!1}function yw(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function ba(e){var t=[];e=In(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=g(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=n.match(/^([\w]+)/);if(i){var r=n.match(/(@id='(.*?)')/),o=n.match(/(@t='(\d+)')/),s=n.match(/(@n='(\d+)')/),u=n.match(/\[(\d+)\]/);t.push({name:i[0],id:r?r[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:s?Number(s[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:u?Number(u[1])-1:null,ac:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].ac=n.slice(1))}return t}function Ag(e,t){var n=ba(t.attributes.sel||"");if(n.length){var i=n[n.length-1],r=t.attributes.pos||null;n=i.position,n==null&&(i.t!==null&&(n=Ig(e,"t",i.t)),i.n!==null&&(n=Ig(e,"n",i.n))),n===null?n=r==="prepend"?0:e.length:r==="prepend"?--n:r==="after"&&++n,r=t.tagName,(i=i.ac)&&e[n]?Mg(e[n],r,i,Wn(t)||""):(r!=="remove"&&r!=="replace"||e.splice(n,1),r!=="add"&&r!=="replace"||e.splice.apply(e,[n,0].concat(W(t.children))))}}function Ig(e,t,n){var i=0;e=g(e);for(var r=e.next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function Mg(e,t,n,i){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=i)}function Cg(e){var t="",n=e.tagName.split(":");0<n.length&&(t=n[0],t=Ad.has(t)?Ad.get(t):""),t=document.createElementNS(t,e.tagName);for(var i in e.attributes)t.setAttribute(i,e.attributes[i]);for(e=g(e.children),i=e.next();!i.done;
21i=e.next())i=i.value,n=void 0,typeof i=="string"?n=new Text(i):n=Cg(i),t.appendChild(n);return t}function xd(e){if(!e)return null;var t={tagName:e.tagName,attributes:uo(e.attributes),children:[],parent:null};e=g(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=xd(n),n.parent=t),t.children.push(n);return t}var Ed=new Map,Ad=new Map;function it(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new ro,this.position=null,this.positionAlign=Va,this.size=0,this.textAlign=Xi,this.direction=au,this.writingMode=lo,this.lineInterpretation=lu,this.line=null,this.lineHeight="",this.lineAlign=co,this.displayAlign=uu,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=jg,this.fontStyle=Cd,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={oc:32,rows:15}}function kg(e,t){return e=new it(e,t,""),e.lineBreak=!0,e}it.prototype.clone=function(){var e=new it(0,0,""),t;for(t in this)e[t]=this[t],e[t]&&e[t].constructor==Array&&(e[t]=e[t].slice());return e};function Fa(e,t){if(e.payload!=t.payload||!(.001>Math.abs(e.startTime-t.startTime)&&.001>Math.abs(e.endTime-t.endTime)))return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!Yo(e.nestedCues,t.nestedCues,Fa))return!1}else if(n=="region"||n=="cellResolution"){for(var i in e[n])if(e[n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!Yo(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function Ba(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&Dg(t);var i=n;n=[];for(var r=-1,o=0;o<i.length;o++)i[o]==="<"?r=o+1:i[o]===">"&&0<r&&(r=i.substr(r,o-r),r.match(Sw)&&n.push(r),r=-1);for(n=g(n),o=n.next();!o.done;o=n.next())o=o.value,i=i.replace("<"+o+">",'<div time="'+o+'">'),i+="</div>";e:{o=i,r=[];var s=-1;n="",i=!1;for(var u=0;u<o.length;u++)if(o[u]==="/"){var a=o.indexOf(">",u);if(a===-1){n=o;break e}if((a=o.substring(u+1,a))&&a=="v"){i=!0;var l=null;if(r.length&&(l=r[r.length-1]),l){if(l===a)n+="/"+a+">";else{if(!l.startsWith("v")){n+=o[u];continue}n+="/"+l+">"}u+=a.length+1}else n+=o[u]}else n+=o[u]}else o[u]==="<"?(s=u+1,o[s]!="v"&&(s=-1)):o[u]===">"&&0<s&&(r.push(o.substr(s,u-s)),s=-1),n+=o[u];for(o=g(r),r=o.next();!r.done;r=o.next())r=r.value,s=r.replace(" ",".voice-"),n=n.replace("<"+r+">","<"+s+">"),n=n.replace("</"+r+">","</"+s+">"),i||(n+="</"+s+">")}n=Tw(n),e.payload="";try{var c=ao("<span>"+n+"</span>","span")}catch{}if(c)if(c=c.children,c.length!=1||c[0].tagName)for(c=g(c),n=c.next();!n.done;n=c.next())Pg(n.value,e,t);else e.payload=In(n);else e.payload=In(n)}else e.payload=In(n)}function Dg(e){for(var t=g(Object.entries(Lg)),n=t.next();!n.done;n=t.next()){var i=g(n.value);n=i.next().value,i=i.next().value;var r=new it(0,0,"");r.color=i,e.set("."+n,r)}for(t=g(Object.entries(Ng)),n=t.next();!n.done;n=t.next())i=g(n.value),n=i.next().value,i=i.next().value,r=new it(0,0,""),r.backgroundColor=i,e.set("."+n,r)}function Tw(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return t[r]||""}):e||""}function Pg(e,t,n){var i=t.clone();if(i.nestedCues=[],i.payload="",i.rubyTag="",i.line=null,i.region=new ro,i.position=null,i.size=0,i.textAlign=Xi,e.tagName)for(var r=g(e.tagName.split(/(?=[ .])+/g)),o=r.next();!o.done;o=r.next()){var s=o=o.value;if(s.startsWith(".voice-")){var u=s.split("-").pop();s='v[voice="'+u+'"]',n.has(s)||(s="v[voice="+u+"]")}switch(n.has(s)&&(u=i,s=n.get(s))&&(u.backgroundColor=su(s.backgroundColor,u.backgroundColor),u.color=su(s.color,u.color),u.fontFamily=su(s.fontFamily,u.fontFamily),u.fontSize=su(s.fontSize,u.fontSize),u.textShadow=su(s.textShadow,u.textShadow),u.fontWeight=s.fontWeight,u.fontStyle=s.fontStyle,u.opacity=s.opacity,u.rubyTag=s.rubyTag,u.textCombineUpright=s.textCombineUpright,u.wrapLine=s.wrapLine),o){case"br":i=kg(i.startTime,i.endTime),t.nestedCues.push(i);return;case"b":i.fontWeight=Zo;break;case"i":i.fontStyle=es;break;case"u":i.textDecoration.push(ir);break;case"font":(o=e.attributes.color)&&(i.color=o);break;case"div":if(o=e.attributes.time,!o)break;(o=Jo(o))&&(i.startTime=o);break;case"ruby":case"rp":case"rt":i.rubyTag=o}}if(r=e.children,Ua(e)||r.length==1&&Ua(r[0]))for(n=Ct(e).split(`
22`),e=!0,n=g(n),r=n.next();!r.done;r=n.next())r=r.value,e||(e=kg(i.startTime,i.endTime),t.nestedCues.push(e)),0<r.length&&(e=i.clone(),e.payload=In(r),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(i),t=g(r),e=t.next();!e.done;e=t.next())Pg(e.value,i,n)}function su(e,t){return e&&0<e.length?e:t}Y("shaka.text.Cue",it),it.parseCuePayload=Ba,it.equal=Fa,it.prototype.clone=it.prototype.clone;var Va="auto";it.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Va};var Xi="center",Id={LEFT:"left",RIGHT:"right",CENTER:Xi,START:"start",END:"end"};it.textAlign=Id;var uu="after",Rg={BEFORE:"before",CENTER:"center",AFTER:uu};it.displayAlign=Rg;var au="ltr";it.direction={HORIZONTAL_LEFT_TO_RIGHT:au,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var lo="horizontal-tb";it.writingMode={HORIZONTAL_TOP_TO_BOTTOM:lo,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var lu=0;it.lineInterpretation={LINE_NUMBER:lu,PERCENTAGE:1};var co="start",Md={CENTER:"center",START:co,END:"end"};it.lineAlign=Md;var Lg={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};it.defaultTextColor=Lg;var Ng={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};
22it.defaultTextBackgroundColor=Ng;var jg=400,Zo=700;it.fontWeight={NORMAL:jg,BOLD:Zo};var Cd="normal",es="italic",Ug={NORMAL:Cd,ITALIC:es,OBLIQUE:"oblique"};it.fontStyle=Ug;var ir="underline";it.textDecoration={UNDERLINE:ir,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Sw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Pr(){}Pr.prototype.destroy=function(){};function rr(e,t,n){kd.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,we:t})}function Rr(e,t){for(var n=e.toLowerCase().split(";")[0],i=g([Og,Pd,Dd,Lr]),r=i.next();!r.done;r=i.next())if(r=kd.get(n+"-"+r.value)){var o=r.we(),s=o.isSupported(e,t);if(o.destroy(),s)return r.we}return null}Y("shaka.transmuxer.TransmuxerEngine",Pr),Pr.findTransmuxer=Rr,Pr.unregisterTransmuxer=function(e,t){kd.delete(e.toLowerCase().split(";")[0]+"-"+t)},Pr.registerTransmuxer=rr,Pr.prototype.destroy=Pr.prototype.destroy;var kd=new Map,Lr=1,Dd=2,Pd=3,Og=4;Pr.PluginPriority={FALLBACK:Lr,PREFERRED_SECONDARY:Dd,PREFERRED:Pd,APPLICATION:Og};function Rd(){}function Tt(e,t){var n=e;return t&&!or.includes(e)&&(n+='; codecs="'+t+'"'),n}function ts(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Ld(e,t,n){var i=Tt(e,t);return t=ts(e,t),Rr(t)?(e=Rr(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?i.replace("video","audio"):i,n}function ww(e,t,n){var i=[t];return xw.forEach(function(r,o){var s=e[o];o=="codecs"?or.includes(e.mimeType)||i.push('codecs="'+n+'"'):s&&i.push(r+'="'+s+'"')}),e.hdr=="PQ"&&i.push('eotf="smpte2084"'),i.join(";")}function Ha(e){return e.split(";")[0].split("/")[1]}function nn(e){var t=_g(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):case e==="ac3":case e==="ac-3":return"ac-3";case(e==="mp4a"&&t==="a6"):case e==="eac3":case e==="ec-3":return"ec-3";case e==="ac-4":return"ac-4";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":case e==="vp9":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc"}return e}function Nr(e){var t=[];e=g(e.split(","));for(var n=e.next();!n.done;n=e.next())n=_g(n.value),t.push(n[0]);return t.sort().join(",")}function On(e){return e.split(";")[0]}function _n(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function Nd(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function _g(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}Y("shaka.util.MimeUtils",Rd),Rd.getFullTypeWithAllCodecs=ts,Rd.getFullType=Tt;var xw=new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),or=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function sr(e){this.i=null,this.j=e,this.B=!1,this.l=this.u=0,this.m=1/0,this.h=this.g=null,this.C="",this.A=function(){},this.o=new Map}function en(e,t){du.set(e,t)}function cu(e){return du.get(e)}function ns(e){return du.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!zo:!1}sr.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()};function Ew(e,t,n,i,r){var o,s,u,a,l,c,d;return C(function(p){if(p.g==1)return S(p,Promise.resolve(),2);if(!e.i||!e.j)return p.return();if(n==null||i==null)return e.i.parseInit(he(t)),p.return();for(o=e.B?n:e.u,s={periodStart:e.u,segmentStart:n,segmentEnd:i,vttOffset:o},u=e.i.parseMedia(he(t),s,r,[]),a=g(u),l=a.next();!l.done;l=a.next())c=l.value,e.A(c,r||null,s);d=u.filter(function(h){return h.startTime>=e.l&&h.startTime<e.m}),e.j.append(d),e.g==null&&(e.g=Math.max(n,e.l)),e.h=Math.min(i,e.m),q(p)})}sr.prototype.remove=function(e,t){var n=this;return C(function(i){if(i.g==1)return S(i,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||n.g==null||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),q(i)})};
22function Aw(e,t,n){e.l=t,e.m=n}function bg(e,t,n){if(e.C=t,t=e.o.get(t))for(var i=g(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(o){return o.endTime<=n}))&&e.j.append(r)}function Fg(e,t,n){t.startTime+=n,t.endTime+=n,t=g(t.nestedCues);for(var i=t.next();!i.done;i=t.next())Fg(e,i.value,n)}function Iw(e,t,n,i,r){var o=n+" "+i,s=new Map;t=g(t);for(var u=t.next();!u.done;u=t.next()){var a=u.value;u=a.stream,a=a.cue,s.has(u)||s.set(u,new Map),s.get(u).has(o)||s.get(u).set(o,[]),Fg(e,a,r),a.startTime>=e.l&&a.startTime<e.m&&(s.get(u).get(o).push(a),u==e.C&&e.j.append([a]))}for(r=g(s.keys()),o=r.next();!o.done;o=r.next())for(o=o.value,e.o.has(o)||e.o.set(o,new Map),t=g(s.get(o).keys()),u=t.next();!u.done;u=t.next())u=u.value,a=s.get(o).get(u),e.o.get(o).set(u,a);e.g=e.g==null?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}Y("shaka.text.TextEngine",sr),sr.prototype.destroy=sr.prototype.destroy,sr.findParser=cu,sr.unregisterParser=function(e){du.delete(e)},sr.registerParser=en;var du=new Map;function Mw(e,t){return e.concat(t)}function Cw(){}function jr(e){return e!=null}function pu(e,t){return Promise.race([t,new Promise(function(n,i){new ke(i).da(e)})])}function Ei(){}function is(e,t){return e=Ye(e),t=Ye(t),e.split("-")[0]==t.split("-")[0]}function fu(e,t){return e=Ye(e),t=Ye(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function jd(e,t){return e=Ye(e),t=Ye(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function Ye(e){e=g(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=g(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=Bg.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function po(e,t){return e=Ye(e),t=Ye(t),t==e?4:fu(t,e)?3:jd(t,e)?2:fu(e,t)?1:0}function Ud(e){var t=e.indexOf("-");return e=0<=t?e.substring(0,t):e,e=e.toLowerCase(),e=Bg.get(e)||e}function Od(e){return e.language?Ye(e.language):e.audio&&e.audio.language?Ye(e.audio.language):e.video&&e.video.language?Ye(e.video.language):"und"}function Ga(e,t){e=Ye(e);var n=new Set;t=g(t);for(var i=t.next();!i.done;i=t.next())n.add(Ye(i.value));for(t=g(n),i=t.next();!i.done;i=t.next())if(i=i.value,i==e)return i;for(t=g(n),i=t.next();!i.done;i=t.next())if(i=i.value,fu(i,e))return i;for(t=g(n),i=t.next();!i.done;i=t.next())if(i=i.value,jd(i,e))return i;for(n=g(n),t=n.next();!t.done;t=n.next())if(t=t.value,fu(e,t))return t;return null}Y("shaka.util.LanguageUtils",Ei),Ei.findClosestLocale=Ga,Ei.getLocaleForVariant=Od,Ei.getLocaleForText=function(e){return Ye(e.language||"und")},Ei.getBase=Ud,Ei.relatedness=po,Ei.areSiblings=function(e,t){var n=Ud(e),i=Ud(t);return e!=n&&t!=i&&n==i},Ei.normalize=Ye,Ei.isSiblingOf=jd,Ei.isParentOf=fu,Ei.areLanguageCompatible=is,Ei.areLocaleCompatible=function(e,t){return e=Ye(e),t=Ye(t),e==t};var Bg=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","
22sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Vg(){}function Hg(e,t,n,i,r){function o(T){var w=String(T.width||"")+String(T.height||"")+String(Math.round(T.frameRate||0))+(T.hdr||"")+T.fastSwitching;return T.dependencyStream&&(w+=T.dependencyStream.baseOriginalId||""),w}function s(T){var w=T.language+(T.channelsCount||0)+(T.audioSamplingRate||0)+T.roles.join(",")+T.label+T.groupId+T.fastSwitching;return T.dependencyStream&&(w+=T.dependencyStream.baseOriginalId||""),w}if(r.length){var u=e.textStreams;r=g(r);for(var a=r.next(),l={};!a.done;l={ug:void 0},a=r.next())if(l.ug=a.value,a=u.filter(function(T){return function(w){return!!(w.codecs.startsWith(T.ug)||w.mimeType.startsWith(T.ug))}}(l)),a.length){u=a;break}e.textStreams=u}if(u=e.variants,(t.length||n.length)&&(u=kw(u,t,n)),i.length){for(t=new gn,n=g(u),u=n.next();!u.done;u=n.next())u=u.value,t.push(String(u.video.width||0),u);var c=[];t.forEach(function(T,w){T=0;var I=[];w=g(w);for(var M=w.next(),R={};!M.done;R={Se:void 0},M=w.next())R.Se=M.value,M=i.filter(function(A){return function(E){return A.Se.decodingInfos[0][E]}}(R)).length,M>T?(T=M,I=[R.Se]):M==T&&I.push(R.Se);c.push.apply(c,W(I))}),u=c}for(n=new Set,t=new Set,u=g(u),r=u.next();!r.done;r=u.next())r=r.value,r.audio&&n.add(r.audio),r.video&&t.add(r.video);u=Array.from(n).sort(function(T,w){return T.bandwidth-w.bandwidth});var d=[];for(n=new Map,u=g(u),r=u.next();!r.done;r=u.next()){if(r=r.value,a=s(r),l=n.get(a)||[],l.length){var p=l[l.length-1],h=nn(p.codecs),m=nn(r.codecs);h!=m||r.bandwidth&&p.bandwidth&&!(r.bandwidth>p.bandwidth)||(l.push(r),d.push(r.id))}else l.push(r),d.push(r.id);n.set(a,l)}var y={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};u=Array.from(t).sort(function(T,w){if(!T.bandwidth||!w.bandwidth||T.bandwidth==w.bandwidth){if(T.codecs&&w.codecs&&T.codecs!=w.codecs&&T.width==w.width){var I=nn(T.codecs),M=nn(w.codecs);if(I!=M)return(y[I]||1)-(y[M]||1)}return T.width-w.width}return T.bandwidth-w.bandwidth}),t=io();var v=[];for(n=new Map,u=g(u),r=u.next();!r.done;r=u.next()){if(r=r.value,a=o(r),l=n.get(a)||[],l.length){if(p=l[l.length-1],!t&&(h=nn(p.codecs),m=nn(r.codecs),h!==m))continue;h=nn(p.codecs),m=nn(r.codecs),h!=m||r.bandwidth&&p.bandwidth&&!(r.bandwidth>p.bandwidth)||(l.push(r),v.push(r.id))}else l.push(r),v.push(r.id);n.set(a,l)}e.variants=e.variants.filter(function(T){var w=T.audio;return T=T.video,!(w&&!d.includes(w.id)||T&&!v.includes(T.id))})}function kw(e,t,n){t=g(t);for(var i=t.next(),r={};!i.done;r={Mh:void 0},i=t.next())if(r.Mh=i.value,i=e.filter(function(o){return function(s){return s.video&&s.video.codecs.startsWith(o.Mh)}}(r)),i.length){e=i;break}for(n=g(n),t=n.next(),i={};!t.done;i={Eg:void 0},t=n.next())if(i.Eg=t.value,t=e.filter(function(o){return function(s){return s.audio&&s.audio.codecs.startsWith(o.Eg)}}(i)),t.length){e=t;break}return e}function Dw(e,t,n){e.variants=e.variants.filter(function(i){return Xa(i,t,n)})}function Xa(e,t,n){function i(u,a,l){return u>=a&&u<=l}var r=e.video;if(r&&r.width&&r.height){var o=r.width,s=r.height;if(s>o&&(s=g([s,o]),o=s.next().value,s=s.next().value),!i(o,t.minWidth,Math.min(t.maxWidth,n.width))||!i(s,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!i(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!i(e.bandwidth,t.minBandwidth,t.max
vendor: 9,612 bytes, line 22
22Bandwidth))}function Pw(e,t,n,i){return n=n===void 0?[]:n,i=i===void 0?{}:i,C(function(r){return r.g==1?S(r,Gg(e,t,0<t.offlineSessionIds.length,n,i),2):(jw(t),S(r,Uw(t),0))})}function Gg(e,t,n,i,r){var o,s;return C(function(u){if(u.g==1)return ki()&&Rw(t.variants),S(u,Kg(t.variants,n,!1,i),2);o=null,e&&(s=e.h)&&(o=s.keySystem),t.variants=t.variants.filter(function(a){var l=Lw(a,o,r);if(!l){var c=[];a.audio&&c.push(Qg(a.audio)),a.video&&c.push(Qg(a.video))}return l}),q(u)})}function Rw(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=g(e);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&n.add(i.video);for(n=g(n),e=n.next();!e.done;e=n.next()){e=e.value,i=g(t);for(var r=i.next();!r.done;r=i.next()){var o=g(r.value);if(r=o.next().value,o=o.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,o);break}}}}function Lw(e,t,n){if(!e.decodingInfos.some(function(a){return!(!a.supported||t&&(a=a.keySystemAccess)&&(n[a.keySystem]||a.keySystem)!=t)}))return!1;var i=ki(),r=xt("Firefox")&&Mr(),o=e.video,s=o&&o.width||0,u=o&&o.height||0;return i&&o&&(1920<s||1080<u)&&(o.codecs.includes("avc1.")||o.codecs.includes("avc3."))||(i=o&&o.dependencyStream)&&!vg(i)?!1:(e=e.audio,!(r&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function Xg(e,t){var n,i,r,o,s,u,a;return C(function(l){if(l.g==1){for(n=function(c,d){if(c){var p=uo(c);return p.supported=c.supported&&d.supported,p.powerEfficient=c.powerEfficient&&d.powerEfficient,p.smooth=c.smooth&&d.smooth,d.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=d.keySystemAccess),p}return d},i=null,r=[],o=g(t),s=o.next(),u={};!s.done;u={cache:void 0,Ud:void 0},s=o.next())a=s.value,u.Ud=Sd(a),u.cache=Wa,u.cache.has(u.Ud)?i=n(i,u.cache.get(u.Ud)):r.push(Nw(a).then(function(c){return function(d){var p=null;d=g(d||[]);for(var h=d.next();!h.done;h=d.next())p=n(p,h.value);p&&(c.cache.set(c.Ud,p),i=n(i,p))}}(u)));return S(l,Promise.all(r),2)}i&&e.decodingInfos.push(i),q(l)})}function Nw(e){var t=[""];e.video&&(t=_n(e.video.contentType).split(","));var n=[""];e.audio&&(n=_n(e.audio.contentType).split(","));var i=[];t=g(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;for(var o=g(n),s=o.next(),u={};!s.done;u={pc:void 0},s=o.next())s=s.value,u.pc=Pi(e),e.video&&(u.pc.video.contentType=Tt(On(u.pc.video.contentType),r)),e.audio&&(u.pc.audio.contentType=Tt(On(u.pc.audio.contentType),s)),i.push(new Promise(function(a){return function(l,c){(Mr()?pu(5,navigator.mediaCapabilities.decodingInfo(a.pc)):navigator.mediaCapabilities.decodingInfo(a.pc)).then(function(d){l(d)}).catch(c)}}(u)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})}function Kg(e,t,n,i){var r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R;return C(function(A){switch(A.g){case 1:if(e.some(function(E){return E.decodingInfos.length}))return A.return();r=g(i),o=r.next(),s={};case 2:if(o.done){A.s(4);break}s.nh=o.value,u=!1,a=g(e),l=a.next();case 5:if(l.done){A.s(7);break}c=l.value,d=Wg(c,t,n).filter(function(E){return function(D){return D=D[0],(D.keySystemConfiguration&&D.keySystemConfiguration.keySystem)===E.nh}}(s)),p=g(d),h=p.next();case 8:if(h.done){A.s(10);break}return m=h.value,S(A,Xg(c,m),9);case 9:h=p.next(),A.s(8);break;case 10:c.decodingInfos.length&&(u=!0),l=a.next(),A.s(5);break;case 7:if(u)return A.return();s={nh:void 0},o=r.next(),A.s(2);break;case 4:y=g(e),v=y.next();case 12:if(v.done){A.s(0);break}T=v.value,w=Wg(T,t,n).filter(function(E){return E=E[0],E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem,!E||!i.includes(E)}),I=g(w),M=I.next();case 15:if(M.done){v=y.next(),A.s(12);break}return R=M.value,S(A,Xg(T,R),16);case 16:M=I.next(),A.s(15)}})}function Wg(e,t,n){var i=e.audio,r=e.video,o=[],s=[];if(r)for(var u=g(r.fullMimeTypes),a=u.next();!a.done;a=u.next()){a=a.value;var l=_n(a);if(l.includes(",")&&!i){var c=l.split(","),d=On(a);l=qo("video",c),c=qo("audio",c),c=hu(c,d),d=Ld(d,c,"audio"),s.push({contentType:d,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=_d(l),a={contentType:Ld(On(a),l,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1},r.hdr)switch(r.hdr){case"SDR":a.transferFunction="srgb";break;case"PQ":a.transferFunction="pq";break;case"HLG":a.transferFunction="hlg"}r.colorGamut&&(a.colorGamut=r.colorGamut),o.push(a)}if(i)for(u=g(i.fullMimeTypes),a=u.next();!a.done;a=u.next())l=a.value,a=On(l),l=hu(_n(l),a),a=Ld(a,l,"audio"),s.push({contentType:a,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(u=[],o.length==0&&o.push(null),s.length==0&&s.push(null),o=g(o),a=o.next();!a.done;a=o.next())for(a=a.value,l=g(s),d=l.next();!d.done;d=l.next())d=d.value,c={type:n?"file":"media-source"},a&&(c.video=a),d&&(c.audio=d),u.push(c);if(s=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!s.length)return[u];for(e=[],n=new Map,s=g(s),o=s.next();!o.done;o=s.next())o=o.value,n.get(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);for(s=t?"required":"optional",t=t?["persistent-license"]:["temporary"],o=g(n.keys()),a=o.next();!a.done;a=o.next()){for(a=a.value,d=n.get(a),l=new Map,d=g(d),c=d.next();!c.done;c=d.next()){c=c.value;var p=c.videoRobustness+","+c.audioRobustness;l.get(p)||l.set(p,[]),l.get(p).push(c)}for(l=g(l.values()),d=l.next();!d.done;d=l.next()){d=d.value,c=[],p=g(u);for(var h=p.next();!h.done;h=p.next()){h=Object.assign({},h.value);for(var m={keySystem:a,initDataType:"cenc",persistentState:s,distinctiveIdentifier:"optional",sessionTypes:t},y=g(d),v=y.next();!v.done;v=y.next()){if(v=v.value,v.initData&&v.initData.length){for(var T=new Set,w=g(v.initData),I=w.next();!I.done;I=w.next())T.add(I.value.initDataType);m.initDataType=v.initData[0].initDataType}v.distinctiveIdentifierRequired&&(m.distinctiveIdentifier="required"),v.persistentStateRequired&&(m.persistentState="required"),v.sessionType&&(m.sessionTypes=[v.sessionType]),i&&(m.audio?(v.encryptionScheme&&(m.audio.encryptionScheme=m.audio.encryptionScheme||v.encryptionScheme),m.audio.robustness=m.audio.robustness||v.audioRobustness):(m.audio={robustness:v.audioRobustness},v.encryptionScheme&&(m.audio.encryptionScheme=v.encryptionScheme)),m.audio.robustness==""&&delete m.audio.robustness),r&&(m.video?(v.encryptionScheme&&(m.video.encryptionScheme=m.video.encryptionScheme||v.encryptionScheme),m.video.robustness=m.video.robustness||v.videoRobustness):(m.video={robustness:v.videoRobustness},v.encryptionScheme&&(m.video.encryptionScheme=v.encryptionScheme)),m.video.robustness==""&&delete m.video.robustness)}h.keySystemConfiguration=m,c.push(h)}e.push(c)}}return e}function hu(e,t){return e.toLowerCase()=="flac"?Jt()?"fLaC":"flac":e.toLowerCase()==="opus"?Jt()&&Ha(t)=="mp4"?"Opus":"opus":e.toLowerCase()=="ac-3"&&$i()?"ec-3":e}function _d(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function jw(e){e.textStreams=e.textStreams.filter(function(t){return t=Tt(t.mimeType,t.codecs),ns(t)})}function Uw(e){var t,n,i,r,o,s,u;return C(function(a){switch(a.g){case 1:t=[],n=g(e.imageStreams),i=n.next();case 2:if(i.done){a.s(4);break}if(r=i.value,o=r.mimeType,o=="application/mp4"&&r.codecs=="mjpg"&&(o="image/jpg"),qa.has(o)){a.s(5);break}if(s=bw.get(o),!s){qa.set(o,!1),a.s(5);break}return S(a,Ow(s),7);case 7:u=a.h,qa.set(o,u);case 5:qa.get(o)&&t.push(r),i=n.next(),a.s(2);break;case 4:e.imageStreams=t,q(a)}})}function Ow(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(n.height===2)}})}function fo(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,o=t?t.codecs:null,s=n?n.codecs:null,u=t?t.groupId:null,a=[];n&&a.push(n.mimeType),t&&a.push(t.mimeType),a=a[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var c=new Set;if(t)for(var d=g(t.roles),p=d.next();!p.done;p=d.next())c.add(p.value);if(n)for(d=g(n.roles),p=d.next();!p.done;p=d.next())c.add(p.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:o,videoCodec:s,primary:e.primary,roles:Array.from(c),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:u,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec),s.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,n=s.split(",");try{e.videoCodec=qo("video",n),e.audioCodec=qo("audio",n)}catch{}}
22return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,t=t.dependencyStream)&&(e.audioCodec=t.codecs||e.audioCodec),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function ho(e){return{id:e.id,active:!1,type:Ce,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function bd(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=Ni(e.segmentIndex));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&t!=null&&(t/=Number(r.split("x")[0])),r&&n!=null&&(n/=Number(r.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:r||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function Fd(e){return e.__shaka_id||(e.__shaka_id=_w++),e.__shaka_id}function Bd(e){var t=qg(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,e.kind=="main"&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function qg(e){var t=e.language;return{id:Fd(e),active:!1,type:"",bandwidth:0,language:Ye(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioR
22oles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function gu(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function Ka(e){return e.filter(function(t){return gu(t)})}function rs(e,t,n,i){var r=e,o=e.filter(function(a){return a.primary});o.length&&(r=o);var s=r.length?r[0].language:"";if(r=r.filter(function(a){return a.language==s}),t){var u=Ga(Ye(t),e.map(function(a){return a.language}));u&&(r=e.filter(function(a){return Ye(a.language)==u}))}if(r=r.filter(function(a){return a.forced==i}),n){if(e=zg(r,n),e.length)return e}else if(e=r.filter(function(a){return a.roles.length==0}),e.length)return e;return e=r.map(function(a){return a.roles}).reduce(Mw,[]),e.length?zg(r,e[0]):r}function zg(e,t){return e.filter(function(n){return n.roles.includes(t)})}function Yg(e,t){t.length&&(t=t.filter(function(n){return nn(e.codecs)==nn(n.codecs)}).sort(function(n,i){return n.bandwidth&&i.bandwidth&&n.bandwidth!=i.bandwidth?n.bandwidth-i.bandwidth:(n.width||0)-(i.width||0)}),e.trickModeVideo=t[0],1<t.length&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function Qg(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function $g(e,t,n){if(n.autoShowText==0)return!1;if(n.autoShowText==1)return!0;var i=Ye(n.preferredTextLanguage);return t=Ye(t.language),n.autoShowText==2?is(t,i):n.autoShowText==3?e?(e=Ye(e.language),is(t,i)&&!is(e,t)):!1:(Pe("Invalid autoShowText setting!"),!1)}Y("shaka.util.StreamUtils",Vg),Vg.meetsRestrictions=Xa;var Wa=new Map,_w=0,qa=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),bw=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function dt(){var e=this;this.G=null,this.o=!1,this.m=new $e,this.j=new Le,navigator.connection&&navigator.connection.addEventListener&&this.j.D(navigator.connection,"change",function(){if(e.o&&e.g.useNetworkInformation){e.m=new $e,e.g&&e.m.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.F=[],this.H=1,this.I=!1,this.h=this.l=this.g=this.u=null,this.A=new ke(function(){if(e.o&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.B=j,"documentPictureInPicture"in j&&this.j.D(j.documentPictureInPicture,"enter",function(){e.B=j.documentPictureInPicture.window,e.A&&e.A.sb(),e.j.qa(e.B,"pagehide",function(){e.B=j,e.A&&e.A.sb()})}),this.C=this.i=null}f=dt.prototype,f.stop=function(){this.G=null,this.o=!1,this.F=[],this.H=1,this.l=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.A.stop(),this.C=this.i=null},f.release=function(){this.j.release(),this.A=null},f.init=function(e){this.G=e},f.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;e=this.B.screen.height*n,t=this.B.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.B.devicePixelRatio;var i=this.l.clientHeight,r=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(i=this.i.height,r=this.i.width),e=Math.min(e,i*n),t=Math.min(t,r*n)}if(n=this.F.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)}),n.length||(n=this.F),i=n,n.length!=this.F.length&&(i=this.F.filter(function(l){return l&&!!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)})),n=Vd(this,this.g.restrictions,i,1/0,1/0),e!=1/0||t!=1/0){for(n=Fw(n),n=g(n),r=n.next();!r.done;r=n.next())if(r=r.value,r.height>=e&&r.width>=t){e=r.height,t=r.width;break}n=Vd(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=Vd(this,null,i,1/0,1/0),n=[n[0]]),t=n[0]||null,i=0;i<n.length;i++){r=n[i];for(var o=isNaN(this.H)?1:Math.abs(this.H),s=o*r.bandwidth/this.g.bandwidthDowngradeTarget,u={bandwidth:1/0},a=i+1;a<n.length;a++)if(r.bandwidth!=n[a].bandwidth){u=n[a];break}o=o*u.bandwidth/this.g.bandwidthUpgradeTarget,e>=s&&e<=o&&(t.bandwidth!=r.bandwidth||t.bandwidth==r.bandwidth&&t.video&&r.video&&(t.video.width<r.video.width||t.video.height<r.video.height))&&(t=r)}return this.u=Date.now(),t},f.enable=function(){this.o=!0},f.disable=function(){this.o=!1},f.segmentDownloaded=function(e,t,n){e<this.g.cacheLoadThreshold||(this.m.sample(e,t),n&&this.u!=null&&this.o&&Jg(this))},f.trySuggestStreams=function(){this.u!=null&&this.o&&Jg(this)},f.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.m.getBandwidthEstimate(e),this.C?this.C.getBandwidthEstimate(e):e)},f.setVariants=function(e){this.F=e},f.playbackRateChanged=function(e){this.H=e},f.setMediaElement=function(e){function t(){n.A.da(Bw)}var n=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in j&&(this.h=new ResizeObserver(t),this.h.observe(this.l)),this.j.D(e,"enterpictureinpicture",function(i){i.pictureInPictureWindow&&(n.i=i.pictureInPictureWindow,n.j.D(n.i,"resize",t))}),this.j.D(e,"leavepictureinpicture",function(){n.i&&n.j.Ka(n.i,"resize",t),n.i=null})},f.setCmsdManager=function(e){this.C=e},f.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)};function Jg(e){if(!e.I){var t=e.m;if(!(t.g>=t.i))return;e.I=!0,e.u-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.u<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function Vd(e,t,n,i,r){if(e.C){var o=e.C.Vg();o&&(n=n.filter(function(s){return s.bandwidth&&o?s.bandwidth<=o:!0}))}return t&&(n=n.filter(function(s){return Xa(s,t,{width:r,height:i})})),n.sort(function(s,u){return s.bandwidth-u.bandwidth})}function Fw(e){var t=[];e=g(e);for(var n=e.next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(i,r){return i.width-r.width})}Y("shaka.abr.SimpleAbrManager",dt),dt.prototype.configure=dt.prototype.configure,dt.prototype.setCmsdManager=dt.prototype.setCmsdManager,dt.prototype.setMediaElement=dt.prototype.setMediaElement,dt.prototype.playbackRateChanged=dt.prototype.playbackRateChanged,dt.prototype.setVariants=dt.prototype.setVariants,dt.prototype.getBandwidthEstimate=dt.prototype.getBandwidthEstimate,dt.prototype.trySuggestStreams=dt.prototype.trySuggestStreams,dt.prototype.segmentDownloaded=dt.prototype.segmentDownloaded,dt.prototype.disable=dt.prototype.disable,dt.prototype.enable=dt.prototype.enable,dt.prototype.chooseVariant=dt.prototype.chooseVariant,dt.prototype.init=dt.prototype.init,dt.prototype.release=dt.prototype.release,dt.prototype.stop=dt.prototype.stop;var Bw=1;Y("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function Zg(e,t){var n=Li();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}function em(e){var t,n;return C(function(i){if(i.g==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new k(2,7,1010);return t=e.g,e.g++,t==0?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),S(i,new Promise(function(r){new ke(r).da(n/1e3)}),2))}e.h*=e.m,q(i)})}function Li(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function We(){var e,t,n=new Promise(function(i,r){e=i,t=r});return n.resolve=e,n.reject=t,n}We.prototype.resolve=function(){},We.prototype.reject=function(){};function St(e,t){this.promise=e,this.i=t,this.g=null}function go(e){return new St(Promise.reject(e),function(){return Promise.resolve()})}function Hd(){var e=Promise.reject(new k(2,7,7001));return e.catch(function(){}),new St(e,function(){return Promise.resolve()})}function os(e){return new St(Promise.resolve(e),function(){return Promise.resolve()})}function tm(e){return new St(e,function(){return e.catch(function(){})})}St.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function nm(e){return new St(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}St.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},St.prototype.Ha=function(e,t){function n(u){return function(a){if
vendor: 4,413 bytes, line 22
22(r.g&&u)o.reject(s);else{var l=u?e:t;l?i=Vw(l,a,o):(u?o.resolve:o.reject)(a)}}}function i(){return o.reject(s),r.abort()}var r=this,o=new We;o.catch(function(){});var s=new k(2,7,7001);return this.promise.then(n(!0),n(!1)),new St(o,function(){return i()})};function Vw(e,t,n){try{var i=e(t);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})})}catch(r){return n.reject(r),function(){return Promise.resolve()}}}At.Object.defineProperties(St.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),Y("shaka.util.AbortableOperation",St),St.prototype.chain=St.prototype.Ha,St.prototype.finally=St.prototype.finally,St.all=nm,St.prototype.abort=St.prototype.abort,St.notAbortable=tm,St.completed=os,St.aborted=Hd,St.failed=go;function z(e,t){if(t)if(t instanceof Map)for(var n=g(t.keys()),i=n.next();!i.done;i=n.next())i=i.value,Object.defineProperty(this,i,{value:t.get(i),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=j.performance&&j.performance.now?j.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function im(e){var t=new z(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}z.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},z.prototype.stopImmediatePropagation=function(){this.g=!0},z.prototype.stopPropagation=function(){},Y("shaka.util.FakeEvent",z);var za={Qj:"abrstatuschanged",Rj:"adaptation",Sj:"audiotrackchanged",Tj:"audiotrackschanged",Uj:"boundarycrossed",Vj:"buffering",Wj:"complete",Xj:"downloadcompleted",Yj:"downloadfailed",Zj:"downloadheadersreceived",$j:"drmsessionupdate",bk:"emsg",wk:"prft",Error:"error",ck:"expirationupdated",dk:"firstquartile",ek:"gapjumped",hk:"keystatuschanged",lk:"loaded",mk:"loading",pk:"manifestparsed",qk:"manifestupdated",rk:"mediaqualitychanged",sk:"mediasourcerecovered",Metadata:"metadata",tk:"midpoint",uk:"nospatialvideoinfo",vk:"onstatechange",xk:"ratechange",zk:"segmentappended",Ak:"sessiondata",Bk:"spatialvideoinfo",Ck:"stalldetected",Dk:"started",Ek:"statechanged",Fk:"streaming",Gk:"textchanged",Hk:"texttrackvisibility",Ik:"thirdquartile",Jk:"timelineregionadded",Kk:"timelineregionenter",Lk:"timelineregionexit",Mk:"trackschanged",Ok:"unloading",Qk:"variantchanged"};function qe(){this.Ea=new gn,this.Te=this}qe.prototype.addEventListener=function(e,t){this.Ea&&this.Ea.push(e,t)},qe.prototype.removeEventListener=function(e,t){this.Ea&&this.Ea.remove(e,t)},qe.prototype.dispatchEvent=function(e){if(!this.Ea)return!0;var t=this.Ea.get(e.type)||[],n=this.Ea.get("All");for(n&&(t=t.concat(n)),t=g(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.Te,e.currentTarget=this.Te;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},qe.prototype.release=function(){this.Ea=null};function ss(){this.g=[]}function mo(e,t){e.g.push(t.finally(function(){wi(e.g,t)}))}ss.prototype.destroy=function(){for(var e=[],t=g(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function tt(e,t,n,i,r,o,s){qe.call(this),this.i=!1,this.u=new ss,this.g=new Set,this.h=new Set,this.m=e||null,this.l=t||null,this.C=n||null,this.F=i||null,this.G=r||null,this.I=o||null,this.H=s||null,this.A=this.B=!1,this.o=16e3,this.j=new Map}ct(tt,qe),f=tt.prototype,f.mg=function(e){this.B=e},f.ng=function(e){this.A=e};function ur(e,t,n,i){i=i===void 0?!1:i,n=n||am;var r=Qa.get(e);(!r||n>=r.priority)&&Qa.set(e,{priority:n,we:t,kj:i})}function rm(e,t){for(var n=g(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(e=g(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}f.nj=function(e){this.g.add(e)},f.Jj=function(e){this.g.delete(e)},f.ai=function(){this.g.clear()},f.oj=function(e){this.h.add(e)},f.Kj=function(e){this.h.delete(e)},f.bi=function(){this.h.clear()},f.Jg=function(){this.j.clear()};function Ot(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:n===void 0?null:n}}
22f.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.j.clear(),qe.prototype.release.call(this),this.u.destroy()},f.request=function(e,t,n){var i=this,r=new um;if(this.i){var o=Promise.reject(new k(2,7,7001));return o.catch(function(){}),new Ya(o,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Pi(t.retryParameters):Li(),t.uris=Pi(t.uris),o=Hw(this,e,t,n);var s=o.Ha(function(){return om(i,e,t,n,new Zg(t.retryParameters,!1),0,null,r)}),u=s.Ha(function(p){return Gw(i,e,p,n)}),a=Date.now(),l=0;o.promise.then(function(){l=Date.now()-a},function(){});var c=0;s.promise.then(function(){c=Date.now()},function(){});var d=u.Ha(function(p){var h=Date.now()-c,m=p.response;return m.timeMs+=l,m.timeMs+=h,p.Qi||!i.m||m.fromCache||t.method=="HEAD"||e!=Ai||i.m(m.timeMs,m.data.byteLength,sm(n)),i.H&&i.H(e,m,n),m},function(p){throw p&&(p.severity=2),p});return o=new Ya(d.promise,function(){return d.abort()},r),mo(this.u,o),o};function Hw(e,t,n,i){function r(u){o=o.Ha(function(){return n.body&&(n.body=ri(n.body)),u(t,n,i)})}var o=os(void 0);e.G&&r(e.G),e=g(e.g);for(var s=e.next();!s.done;s=e.next())r(s.value);return o.Ha(void 0,function(u){throw u instanceof k&&u.code==7001?u:new k(2,1,1006,u)})}function om(e,t,n,i,r,o,s,u){e.B&&(n.uris[o]=n.uris[o].replace("https://","http://")),e.A&&(n.uris[o]=n.uris[o].replace("http://","https://")),0<o&&e.I&&e.I(t,i,n.uris[o],n.uris[o-1]);var a=new vt(n.uris[o]),l=a.Kb,c=!1;l||(l=location.protocol,l=l.slice(0,-1),Ma(a,l),n.uris[o]=a.toString()),l=l.toLowerCase();var d=(l=Qa.get(l))?l.we:null;if(!d)return go(new k(2,1,1e3,a));var p=l.kj;(a=e.j.get(a.nb))&&(n.headers["common-access-token"]=a);var h=null,m=null,y=!1,v=!1,T;return tm(em(r)).Ha(function(){if(e.i)return Hd();T=Date.now();var w=0;n.requestStartTime=Date.now();var I=d(n.uris[o],n,t,function(A,E,D){h&&h.stop(),m&&m.da(R/1e3),e.m&&t==Ai&&(w++,n.packetNumber=w,e.m(A,E,sm(i),n),c=!0,u.g=D)},function(A){v=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.l&&e.l(A,n,t)},{minBytesForProgressEvents:e.o});if(!p)return I;var M=n.retryParameters.connectionTimeout;M&&(h=new ke(function(){y=!0,I.abort()}),h.da(M/1e3));var R=n.retryParameters.stallTimeout;return R&&(m=new ke(function(){y=!0,I.abort()})),I}).Ha(function(w){h&&h.stop(),m&&m.stop(),w.timeMs==null&&(w.timeMs=Date.now()-T);var I=w.headers["common-access-token"];if(I){var M=new vt(w.uri);e.j.set(M.nb,I)}return I={response:w,Qi:c},!v&&e.l&&e.l(w.headers,n,t),e.C&&e.C(n,w),I},function(w){if(h&&h.stop(),m&&m.stop(),e.F){var I=null,M=0;w instanceof k&&(I=w,w.code==1001&&(M=w.data[1])),e.F(n,I,M,y)}if(e.i)return Hd();if(y&&(w=new k(1,1,1003,n.uris[o],t)),w instanceof k){if(w.code==7001)throw w;if(w.code==1010)throw s;if(w.severity==1){if(I=new Map().set("error",w),I=new z("retry",I),I.cancelable=!0,e.dispatchEvent(I),I.defaultPrevented)throw w;return o=(o+1)%n.uris.length,om(e,t,n,i,r,o,w,u)}}throw w})}function Gw(e,t,n,i){var r=os(void 0);e=g(e.h);for(var o=e.next(),s={};!o.done;s={qh:void 0},o=e.next())s.qh=o.value,r=r.Ha(function(u){return function(){var a=n.response;return a.data&&(a.data=ri(a.data)),(0,u.qh)(t,a,i)}}(s));return r.Ha(function(){return n},function(u){var a=2;if(u instanceof k){if(u.code==7001)throw u;a=u.severity}throw new k(a,1,1007,u)})}function sm(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}Y("shaka.net.NetworkingEngine",tt),tt.prototype.request=tt.prototype.request,tt.prototype.destroy=tt.prototype.destroy,tt.makeRequest=Ot,tt.defaultRetryParameters=function(){return Li()},tt.prototype.clearCommonAccessTokenMap=tt.prototype.Jg,tt.prototype.clearAllResponseFilters=tt.prototype.bi,tt.prototype.unregisterResponseFilter=tt.prototype.Kj,tt.prototype.registerResponseFilter=tt.prototype.oj,tt.prototype.clearAllRequestFilters=tt.prototype.ai,tt.prototype.unregisterRequestFilter=tt.prototype.Jj,tt.prototype.registerRequestFilter=tt.prototype.nj,tt.unregisterScheme=function(e){Qa.delete(e)},tt.registerScheme=ur,tt.prototype.setForceHTTPS=tt.prototype.ng,tt.prototype.setForceHTTP=tt.prototype.mg;function um(){this.g=0}tt.NumBytesRemainingClass=um;function Ya(e,t,n){St.call(this,e,t),this.h=n}ct(Ya,St),tt.PendingRequest=Ya;var Ai=1;tt.RequestType={MANIFEST:0,SEGMENT:Ai,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},tt.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var am=3;tt.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:am};var Qa=new Map;function us(e){this.g=!1,this.h=new We,this.i=e}
vendor: 4,726 bytes, line 22
22us.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function Je(e,t){if(e.g)throw t instanceof k&&t.code==7003?t:new k(2,7,7003,t)}function Gd(e,t){var n=[];e=g(e);for(var i=e.next();!i.done;i=e.next())n.push(t(i.value));return n}function Xw(e,t){e=g(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function vo(e){for(var t=new Map,n=g(Object.keys(e)),i=n.next();!i.done;i=n.next())i=i.value,t.set(i,e[i]);return t}function Xd(e){var t={};return e.forEach(function(n,i){t[i]=n}),t}function rt(e,t){this.h=An(e),this.i=t==lm,this.g=0}f=rt.prototype,f.ta=function(){return this.g<this.h.byteLength},f.Ba=function(){return this.g},f.getLength=function(){return this.h.byteLength},f.X=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw ar()}},f.ma=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw ar()}},f.S=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw ar()}},f.bg=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw ar()}},f.bd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw ar()}if(2097151<t)throw new k(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},f.Db=function(e){if(this.g+e>this.h.byteLength)throw ar();var t=he(this.h,this.g,e);return this.g+=e,t},f.skip=function(e){if(this.g+e>this.h.byteLength)throw ar();this.g+=e},f.rh=function(e){if(this.g<e)throw ar();this.g-=e},f.seek=function(e){if(0>e||e>this.h.byteLength)throw ar();this.g=e},f.Cc=function(){for(var e=this.g;this.ta()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=he(this.h,e,this.g-e),this.g+=1,at(e)};function ar(){return new k(2,3,3e3)}Y("shaka.util.DataViewReader",rt),rt.prototype.readTerminatedString=rt.prototype.Cc,rt.prototype.seek=rt.prototype.seek,rt.prototype.rewind=rt.prototype.rh,rt.prototype.skip=rt.prototype.skip,rt.prototype.readBytes=rt.prototype.Db,rt.prototype.readUint64=rt.prototype.bd,rt.prototype.readInt32=rt.prototype.bg,rt.prototype.readUint32=rt.prototype.S,rt.prototype.readUint16=rt.prototype.ma,rt.prototype.readUint8=rt.prototype.X,rt.prototype.getLength=rt.prototype.getLength,rt.prototype.getPosition=rt.prototype.Ba,rt.prototype.hasMoreData=rt.prototype.ta;var lm=1;rt.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:lm};function ze(){this.i=new Map,this.h=new Map,this.g=!1}f=ze.prototype,f.box=function(e,t){return e=cm(e),this.i.set(e,Kw),this.h.set(e,t),this},f.R=function(e,t){return e=cm(e),this.i.set(e,dm),this.h.set(e,t),this},f.stop=function(){this.g=!0},f.parse=function(e,t,n){for(e=new rt(e,0),this.g=!1;e.ta()&&!this.g;)this.Yc(0,e,t,n)},f.Yc=function(e,t,n,i){var r=t.Ba();if(i&&r+8>t.getLength())this.g=!0;else{var o=t.S(),s=t.S(),u=Ja(s),a=!1;switch(o){case 0:o=t.getLength()-r;break;case 1:if(i&&t.Ba()+8>t.getLength()){this.g=!0;return}o=t.bd(),a=!0}var l=this.h.get(s);if(l){var c=null,d=null;if(this.i.get(s)==dm){if(i&&t.Ba()+4>t.getLength()){this.g=!0;return}d=t.S(),c=d>>>24,d&=16777215}s=r+o,n&&s>t.getLength()&&(s=t.getLength()),i&&s>t.getLength()?this.g=!0:(i=s-t.Ba(),t=0<i?t.Db(i):new Uint8Array(0),t=new rt(t,0),l({name:u,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t,size:o,start:r+e,has64BitSize:a}))}else t.skip(Math.min(r+o-t.Ba(),t.getLength()-t.Ba()))}};function ye(e){for(var t=Ur(e);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function lr(e){for(var t=Ur(e),n=e.reader.S(),i=0;i<n&&(e.parser.Yc(e.start+t,e.reader,e.partialOkay),!e.parser.g);i++);}function bn(e){var t=Ur(e);for(e.reader.skip(78);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function $a(e){var t=Ur(e);e.reader.skip(8);var n=e.reader.ma();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.ta()&&!e.parser.g;)e.parser.Yc(e.start+t,e.reader,e.partialOkay)}function as(e){return function(t){e(t.reader.Db(t.reader.getLength()-t.reader.Ba()))}}function cm(e){var t=0;e=g(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Ja(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function Ur(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}Y("shaka.util.Mp4Parser",ze),ze.headerSize=Ur,ze.typeToString=Ja,ze.allData=as,ze.audioSampleEntry=$a,ze.visualSampleEntry=bn,ze.sampleDescription=lr,ze.children=ye,ze.prototype.parseNext=ze.prototype.Yc,ze.prototype.parse=ze.prototype.parse,ze.prototype.stop=ze.prototype.stop,ze.prototype.fullBox=ze.prototype.R,ze.prototype.box=ze.prototype.box;
22var Kw=0,dm=1;function Kd(e){var t=this;this.g=[],this.h=[],this.data=[],new ze().box("moov",ye).box("moof",ye).R("pssh",function(n){if(!(1<n.version)){var i=he(n.reader.h,-12,n.size);if(t.data.push(i),t.g.push(er(n.reader.Db(16))),0<n.version){i=n.reader.S();for(var r=0;r<i;r++){var o=er(n.reader.Db(16));t.h.push(o)}}}}).parse(e)}function Za(e,t,n,i){var r=e.length,o=t.length+16+r;0<i&&(o+=4+16*n.size);var s=new Uint8Array(o),u=An(s),a=0;if(u.setUint32(a,o),a+=4,u.setUint32(a,1886614376),a+=4,1>i?u.setUint32(a,0):u.setUint32(a,16777216),a+=4,s.set(t,a),a+=t.length,0<i)for(u.setUint32(a,n.size),a+=4,t=g(n),n=t.next();!n.done;n=t.next())n=no(n.value),s.set(n,a),a+=n.length;return u.setUint32(a,r),s.set(e,a+4),s}function el(e){var t=this;this.C=e,this.j=this.A=null,this.ka=this.ea=!1,this.H=0,this.h=null,this.o=new Le,this.i=new Map,this.T=[],this.B=new Map,this.K=!1,this.m=new We,this.g=null,this.u=function(n){n.severity==2&&t.m.reject(n),e.onError(n)},this.Z=new Map,this.fa=new Map,this.L=new ke(function(){return nx(t)}),this.O=!1,this.M=[],this.W=!1,this.I=new ke(function(){rx(t)}),this.m.catch(function(){}),this.l=new us(function(){return Ww(t)}),this.$=!1,this.F=this.G=null,this.P=function(){return!1}}f=el.prototype,f.destroy=function(){return this.l.destroy()};function Ww(e){return C(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.I.stop(),e.I=null,e.L.stop(),e.L=null,S(t,vu(e),2);case 2:if(!e.j){t.s(3);break}return ee(t,4),S(t,e.j.setMediaKeys(null),6);case 6:fe(t,5);break;case 4:re(t);case 5:e.j=null;case 3:e.h=null,e.A=null,e.B=new Map,e.g=null,e.u=function(){},e.C=null,e.$=!1,e.G=null,q(t)}})}f.configure=function(e,t){this.g=e,t&&(this.P=t),this.I&&this.I.ua(this.g.updateExpirationTime)};function qw(e,t,n){return e.ka=!0,e.B=new Map,e.O=n,fm(e,t,!1)}function pm(e,t,n,i){i=i===void 0?!0:i,e.B=new Map,n=g(n);for(var r=n.next();!r.done;r=n.next())e.B.set(r.value,{initData:null,initDataType:null});for(n=g(e.g.persistentSessionsMetadata),r=n.next();!r.done;r=n.next())r=r.value,e.B.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.O=0<e.B.size,fm(e,t,i)}function zw(e,t,n,i,r,o){var s=new Map;return r={audioCapabilities:r,videoCapabilities:o,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t},r.drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioR
22obustness:"",videoRobustness:"",serverCertificate:i,serverCertificateUri:"",initData:null,keyIds:null}],s.set(t,r),vm(e,s,[])}function fm(e,t,n){var i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A;return C(function(E){if(E.g==1){for(Am(e.g.clearKeys,t),i=t.some(function(D){return!!(D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length)}),!i&&n&&(r=vo(e.g.servers),sx(t,r)),o=new Set,s=g(t),u=s.next();!u.done;u=s.next())for(a=u.value,l=xm(a),c=g(l),d=c.next();!d.done;d=c.next())p=d.value,o.add(p);for(h=g(o),m=h.next();!m.done;m=h.next())y=m.value,ux(y,vo(e.g.servers),vo(e.g.advanced||{}),e.g.keySystemsMapping);for(v=function(D,P){var O=[];D=g(D);for(var L=D.next();!L.done;L=D.next()){L=L.value;var U=L[P]||e.g.advanced&&e.g.advanced[L.keySystem]&&e.g.advanced[L.keySystem][P]||"",_;if((_=U=="")&&(_=(_=L.keySystem)?!!_.match(/^com\.widevine\.alpha/):!1),_&&(P=="audioRobustness"?U=[e.g.defaultAudioRobustnessForWidevine]:P=="videoRobustness"&&(U=[e.g.defaultVideoRobustnessForWidevine])),typeof U=="string")O.push(L);else if(Array.isArray(U))for(U.length===0&&(U=[""]),U=g(U),_=U.next();!_.done;_=U.next()){var F={};O.push(Object.assign({},L,(F[P]=_.value,F)))}}return O},T=new Set,w=g(t),I=w.next();!I.done;I=w.next())M=I.value,M.video&&!T.has(M.video)&&(M.video.drmInfos=v(M.video.drmInfos,"videoRobustness"),M.video.drmInfos=v(M.video.drmInfos,"audioRobustness"),T.add(M.video)),M.audio&&!T.has(M.audio)&&(M.audio.drmInfos=v(M.audio.drmInfos,"videoRobustness"),M.audio.drmInfos=v(M.audio.drmInfos,"audioRobustness"),T.add(M.audio));return T.clear(),S(E,Kg(t,e.O,e.$,e.g.preferredKeySystems),2)}return Je(e.l),R=i||Object.keys(e.g.servers).length,R?(A=vm(e,void 0,t),E.return(i?A:A.catch(function(){}))):(e.ea=!0,E.return(Promise.resolve()))})}function hm(e){var t;return C(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.G){n.s(2);break}return S(n,e.G,3);case 3:return Je(e.l),n.return();case 2:return ee(n,4),e.G=e.j.setMediaKeys(e.A),S(n,e.G,6);case 6:fe(n,5);break;case 4:t=re(n),e.u(new k(2,6,6003,t.message));case 5:Je(e.l),q(n)}})}function Yw(e,t){return C(function(n){if(n.g==1)return S(n,hm(e),2);mu(e,t.initDataType,he(t.initData)),q(n)})}f.Lb=function(e){var t=this,n;return C(function(i){if(i.g==1)return t.j===e?i.return():t.A?(t.j=e,t.o.qa(t.j,"play",function(){for(var r=g(t.M),o=r.next();!o.done;o=r.next())qd(t,o.value);t.W=!0,t.M=[]}),t.j.remote?(t.o.D(t.j.remote,"connect",function(){return vu(t)}),t.o.D(t.j.remote,"connecting",function(){return vu(t)}),t.o.D(t.j.remote,"disconnect",function(){return vu(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.j&&t.o.D(t.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return vu(t)}),t.F=t.h&&t.h.initData.find(function(r){return 0<r.initData.length})||null,n=t.h.keySystem,n.startsWith("com.microsoft.playready.recommendation")||n=="com.apple.fps"||!(t.F||t.B.size||t.g.parseInbandPsshEnabled)?(t.o.D(t.j,"encrypted",function(r){return Yw(t,r)}),i.s(2)):S(i,hm(t),2)):(t.o.qa(e,"encrypted",function(){t.u(new k(2,6,6010))}),i.return());gm(t).catch(function(){}),q(i)})};function Qw(e){var t,n,i,r,o;return C(function(s){switch(s.g){case 1:if(!e.A||!e.h)return s.return();if(!e.h.serverCertificateUri||e.h.serverCertificate&&e.h.serverCertificate.length){s.s(2);break}return t=Ot([e.h.serverCertificateUri],e.g.retryParameters),ee(s,3),n=e.C.Xb.request(5,t,{isPreload:e.P()}),S(s,n.promise,5);case 5:i=s.h,e.h.serverCertificate=he(i.data),fe(s,4);break;case 3:throw r=re(s),new k(2,6,6017,r);case 4:if(e.l.g)return s.return();case 2:return!e.h.serverCertificate||!e.h.serverCertificate.length?s.return():(ee(s,6),S(s,e.A.setServerCertificate(e.h.serverCertificate),8));case 8:fe(s,0);break;case 6:throw o=re(s),new k(2,6,6004,o.message)}})}function $w(e,t){var n,i,r;return C(function(o){if(o.g==1)return S(o,Tm(e,t,{initData:null,initDataType:null}),2);if(o.g!=3)return n=o.h,n?(i=[],(r=e.i.get(n))&&(r.ub=new We,i.push(r.ub)),i.push(n.remove()),S(o,Promise.all(i),3)):o.return();e.i.delete(n),q(o)})}function gm(e){var t,n,i,r,o;return C(function(s){if(s.g==1)return e.B.size?(e.B.forEach(function(u,a){Tm(e,a,u)}),S(s,e.m,3)):s.s(2);if(s.g!=2){if(t=e.h&&e.h.keyIds||new Set([]),0<t.size&&ox(e))return s.return(e.m);e.K=!1,e.m=new We,e.m.catch(function(){})}for(n=(e.h?e.h.initData:[])||[],i=g(n),r=i.next();!r.done;r=i.next())o=r.value,mu(e,o.initDataType,o.initData);return yu(e)&&e.m.resolve(),s.return(e.m)})}function mu(e,t,n){if(n.length){if(e.g.ignoreDuplicateInitData){var i=e.i.values();i=g(i);for(var r=i.next();!r.done;r=i.next())if(Qi(n,r.value.initData))return;var o=!1;if(e.B.forEach(function(s){!o&&Qi(n,s.initData)&&(o=!0)}),o)return}e.K=!0,0<e.i.size&&yu(e)&&(e.m.resolve(),e.K=!1,e.m=new We,e.m.catch(function(){})),ex(e,t,n,e.h.sessionType)}}function mm(e){return e=e.i.keys(),e=Gd(e,function(t){return t.sessionId}),Array.from(e)}f.If=function(){var e=this,t=this.i.keys();return t=Gd(t,function(n){var i=e.i.get(n);return{sessionId:n.sessionId,sessionType:i.type,initData:i.initData,initDataType:i.initDataType}}),Array.from(t)},f.pd=function(){var e=1/0,t=this.i.keys();
22t=g(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},f.be=function(){return Xd(this.fa)};function vm(e,t,n){var i,r,o,s,u,a,l,c;return C(function(d){switch(d.g){case 1:if(i=new Map,n.length){r=Jw(e,n,i),d.s(2);break}return S(d,Zw(e,t),3);case 3:r=d.h;case 2:if(o=r,!o)throw navigator.requestMediaKeySystemAccess?new k(2,6,6001):new k(2,6,6020);if(Je(e.l),ee(d,4),o.getConfiguration(),s=e.g.keySystemsMapping[o.keySystem]||o.keySystem,n.length){var p=s,h=i.get(s),m=[],y=[],v=[],T=[],w=[],I=new Set,M=new Set;Em(h,m,y,T,v,w,I,M);var R=e.O?"persistent-license":"temporary";for(p={keySystem:p,encryptionScheme:m[0],licenseServerUri:y[0],distinctiveIdentifierRequired:h[0].distinctiveIdentifierRequired,persistentStateRequired:h[0].persistentStateRequired,sessionType:h[0].sessionType||R,audioRobustness:h[0].audioRobustness||"",videoRobustness:h[0].videoRobustness||"",serverCertificate:T[0],serverCertificateUri:v[0],initData:w,keyIds:I},0<M.size&&(p.keySystemUris=M),h=g(h),M=h.next();!M.done;M=h.next())M=M.value,M.distinctiveIdentifierRequired&&(p.distinctiveIdentifierRequired=M.distinctiveIdentifierRequired),M.persistentStateRequired&&(p.persistentStateRequired=M.persistentStateRequired);h=p}else h=s,M=t.get(s),p=[],m=[],y=[],v=[],T=[],w=new Set,Em(M.drmInfos,p,m,v,y,T,w),h={ke
22ySystem:h,encryptionScheme:p[0],licenseServerUri:m[0],distinctiveIdentifierRequired:M.distinctiveIdentifier=="required",persistentStateRequired:M.persistentState=="required",sessionType:M.sessionTypes[0]||"temporary",audioRobustness:(M.audioCapabilities?M.audioCapabilities[0].robustness:"")||"",videoRobustness:(M.videoCapabilities?M.videoCapabilities[0].robustness:"")||"",serverCertificate:v[0],serverCertificateUri:y[0],initData:T,keyIds:w};if(e.h=h,!e.h.licenseServerUri)throw new k(2,6,6012,e.h.keySystem);return S(d,o.createMediaKeys(),6);case 6:if(u=d.h,Je(e.l),e.A=u,!(e.g.minHdcpVersion!=""&&"getStatusForPolicy"in e.A)){d.s(7);break}return ee(d,8),S(d,e.A.getStatusForPolicy({minHdcpVersion:e.g.minHdcpVersion}),10);case 10:if(a=d.h,a!="usable")throw new k(2,6,6018);Je(e.l),fe(d,7,4);break;case 8:throw l=re(d,4),l instanceof k?l:new k(2,6,6019,l.message);case 7:return e.ea=!0,S(d,Qw(e),11);case 11:Je(e.l),fe(d,0);break;case 4:throw c=re(d),Je(e.l,c),e.h=null,c instanceof k?c:new k(2,6,6002,c.message)}})}function Jw(e,t,n
22){for(var i=g(t),r=i.next();!r.done;r=i.next()){r=g(xm(r.value));for(var o=r.next();!o.done;o=r.next())o=o.value,n.has(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o)}if(n.size==1&&n.has(""))throw new k(2,6,6e3);i=e.g.preferredKeySystems,i.length||(r=vo(e.g.servers),r.size==1&&(i=Array.from(r.keys()))),r=g(i);var s=r.next();for(o={};!s.done;o={oh:void 0},s=r.next()){o.oh=s.value,s=g(t);for(var u=s.next();!u.done;u=s.next())if(u=u.value.decodingInfos.find(function(d){return function(p){return p.supported&&p.keySystemAccess!=null&&p.keySystemAccess.keySystem==d.oh}}(o)))return u.keySystemAccess}for(r=g([!0,!1]),o=r.next();!o.done;o=r.next())for(o=o.value,s=g(t),u=s.next();!u.done;u=s.next()){u=g(u.value.decodingInfos);for(var a=u.next();!a.done;a=u.next())if(a=a.value,a.supported&&a.keySystemAccess){var l=a.keySystemAccess.keySystem;if(!i.includes(l)){var c=n.get(l);for(!c&&e.g.keySystemsMapping[l]&&(c=n.get(e.g.keySystemsMapping[l])),l=g(c),c=l.next();!c.done;c=l.next())if(!!c.value.licenseServerUri==o)return a.keySystemAccess}}}return null}function Zw(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T;return C(function(w){switch(w.g){case 1:if(t.size==1&&t.has(""))throw new k(2,6,6e3);for(i=g(t.values()),r=i.next();!r.done;r=i.next())o=r.value,o.audioCapabilities.length==0&&delete o.audioCapabilities,o.videoCapabilities.length==0&&delete o.videoCapabilities;s=g(e.g.preferredKeySystems),u=s.next();case 2:if(u.done){w.s(4);break}if(a=u.value,!t.has(a)){w.s(3);break}return l=t.get(a),ee(w,6),S(w,navigator.requestMediaKeySystemAccess(a,[l]),8);case 8:return n=w.h,w.return(n);case 6:re(w);case 7:Je(e.l);case 3:u=s.next(),w.s(2);break;case 4:c=g([!0,!1]),d=c.next();case 9:if(d.done){w.s(11);break}p=d.value,h=g(t.keys()),m=h.next();case 12:if(m.done){d=c.next(),w.s(9);break}if(y=m.value,v=t.get(y),T=v.drmInfos.some(function(I){return!!I.licenseServerUri}),T!=p){w.s(13);break}return ee(w,15),S(w,navigator.requestMediaKeySystemAccess(y,[v]),17);case 17:return n=w.h,w.return(n);case 15:re(w);case 16:Je(e.l);case 13:m=h.next(),w.s(12);break;case 11:return w.return(n)}})}function Wd(e){yu(e)&&e.m.resolve()}function ym(e,t){new ke(function(){t.loaded=!0,Wd(e)}).da(lx)}function Tm(e,t,n){var i,r,o,s,u,a,l;return C(function(c){switch(c.g){case 1:try{i=e.A.createSession("persistent-license")}catch(d){return r=new k(2,6,6005,d.message),e.u(r),c.return(Promise.reject(r))}return e.o.D(i,"message",function(d){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(d):qd(e,d)}),e.o.D(i,"keystatuseschange",function(d){return Sm(e,d)}),o={initData:n.initData,initDataType:n.initDataType,loaded:!1,Xf:1/0,ub:null,type:"persistent-license"},e.i.set(i,o),ee(c,2),S(c,i.load(t),4);case 4:return s=c.h,Je(e.l),s||(e.i.delete(i),u=e.g.persistentSessionOnlinePlayback?1:2,e.u(new k(u,6,6013)),o.loaded=!0),ym(e,o),Wd(e),c.return(i);case 2:a=re(c),Je(e.l,a),e.i.delete(i),l=e.g.persistentSessionOnlinePlayback?1:2,e.u(new k(l,6,6005,a.message)),o.loaded=!0,Wd(e);case 3:return c.return(Promise.resolve())}})}function ex(e,t,n,i){try{var r=e.A.createSession(i)}catch(o){e.u(new k(2,6,6005,o.message));return}e.o.D(r,"message",function(o){e.j&&e.g.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.W?e.M.push(o):qd(e,o)}),e.o.D(r,"keystatuseschange",function(o){return Sm(e,o)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Xf:1/0,ub:null,type:i});try{n=e.g.initDataTransform(n,t,e.h)}catch(o){t=o,o instanceof k||(t=new k(2,6,6016,o)),e.u(t);return}e.g.logLicenseExchange&&Zi(n),r.generateRequest(t,n).catch(function(o){if(!e.l.g){e.i.delete(r);var s=o.errorCode;if(s&&s.systemCode){var u=s.systemCode;0>u&&(u+=Math.pow(2,32)),u="0x"+u.toString(16)}e.u(new k(2,6,6006,o.message,o,u))}})}function tx(e){return C(function(t){return t.g==1?e.K?S(t,e.m,3):t.s(0):S(t,Promise.all(e.T.map(function(n){return n.promise})),0)})}function qd(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m,y;C(function(v){switch(v.g){case 1:if(n=t.target,e.g.logLicenseExchange&&Zi(t.message),i=e.i.get(n),r=e.h.licenseServerUri,o=e.g.advanced[e.h.keySystem],t.messageType=="individualization-request"&&o&&o.individualizationServer&&(r=o.individualizationServer),s=Ot([r],e.g.retryParameters),s.body=t.message,s.method="POST",s.licenseRequestType=t.messageType,s.sessionId=n.sessionId,s.drmInfo=e.h,i&&(s.initData=i.initData,s.initDataType=i.initDataType),o&&o.headers)for(u in o.headers)s.headers[u]=o.headers[u];if(e.h.keySystem==="org.w3.clearkey"){var T=s,w=e.h;try{var I=Vi(T.body);
22if(I){var M=JSON.parse(I);M.type||(M.type=w.sessionType,T.body=Si(JSON.stringify(M)))}}catch{}}if(ud(e.h.keySystem))if(T=Cr(s.body,!0,!0),T.includes("PlayReadyKeyMessage")){for(T=ao(T,"PlayReadyKeyMessage"),w=Ri(T,"HttpHeader"),w=g(w),I=w.next();!I.done;I=w.next())M=I.value,I=Ri(M,"name")[0],M=Ri(M,"value")[0],s.headers[Ct(I)]=Ct(M);T=Ri(T,"Challenge")[0],s.body=oi(Ct(T))}else s.headers["Content-Type"]="text/xml; charset=utf-8";return a=Date.now(),ee(v,2),c=e.C.Xb.request(2,s,{isPreload:e.P()}),e.T.push(c),S(v,c.promise,4);case 4:l=v.h,wi(e.T,c),fe(v,3);break;case 2:return d=re(v),e.l.g||(p=new k(2,6,6007,d),e.i.size==1?(e.u(p),i&&i.ub&&i.ub.reject(p)):(i&&i.ub&&i.ub.reject(p),e.i.delete(n),yu(e)&&(e.m.resolve(),e.L.da(.1)))),v.return();case 3:return e.l.g?v.return():(e.H+=(Date.now()-a)/1e3,e.g.logLicenseExchange&&Zi(l.data),ee(v,5),S(v,n.update(l.data),7));case 7:fe(v,6);break;case 5:return h=re(v),m=new k(2,6,6008,h.message),e.u(m),i&&i.ub&&i.ub.reject(m),v.return();case 6:if(e.l.g)return v.return();y=new z("drmsessionupdate"),e.C.onEvent(y),i&&(i.ub&&i.ub.resolve(),ym(e,i)),q(v)}})}function Sm(e,t){t=t.target;var n=e.i.get(t),i=!1;t.keyStatuses.forEach(function(o,s){if(typeof s=="string"){var u=s;s=o,o=u}if(ud(e.h.keySystem)&&s.byteLength==16&&(Go()||Di())){u=An(s);var a=u.getUint32(0,!0),l=u.getUint16(4,!0),c=u.getUint16(6,!0);u.setUint32(0,a,!1),u.setUint16(4,l,!1),u.setUint16(6,c,!1)}o!="status-pending"&&(n.loaded=!0),o=="expired"&&(i=!0),s=er(s).slice(0,32),e.Z.set(s,o)});var r=t.expiration-Date.now();(0>r||i&&1e3>r)&&n&&!n.ub&&(e.i.delete(t),wm(t)),yu(e)&&(e.m.resolve(),e.L.da(cx))}function nx(e){var t=e.Z,n=e.fa;n.clear(),t.forEach(function(i,r){return n.set(r,i)}),t=Array.from(n.values()),t.length&&t.every(function(i){return i=="expired"})&&e.u(new k(2,6,6014)),e.C.te(Xd(n))}function ix(){var e,t,n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X;return C(function(K){if(K.g==1){if(e="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(j.MediaKeys&&j.navigator&&j.navigator.requestMediaKeySystemAccess&&j.MediaKeySystemAccess&&j.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=g(e),i=n.next();!i.done;i=n.next())r=i.value,t[r]=null;return K.return(t)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),s=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],u=["150","2000","3000"],a={"com.widevine.alpha":s,"com.widevine.alpha.experiment":s,"com.microsoft.playready.recommendation":u},l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],d={videoCapabilities:l,audioCapabilities:c,initDataTypes:["cenc","sinf","skd","keyids"]},p=[null,"cenc","cbcs","cbcs-1-9"],h=new Map,m=function(pe,te){var Be,De,xe,Ae,_e,Se,Re,ge,we,Qe,Ft,pt,ht;return C(function(Dt){switch(Dt.g){case 1:return ee(Dt,2),S(Dt,te.createMediaKeys(),5);case 5:Be=Dt.h;case 4:fe(Dt,3);break;case 2:return re(Dt),Dt.return();case 3:if(xe=(De=te.getConfiguration().sessionTypes)?De.includes("persistent-license"):!1,$i()&&(xe=!1),Ae=te.getConfiguration().videoCapabilities,_e=te.getConfiguration().audioCapabilities,Se={persistentState:xe,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},h.has(pe)&&h.get(pe)?Se=h.get(pe):h.set(pe,Se),(Re=Ae[0].encryptionScheme)&&!Se.encryptionSchemes.includes(Re)&&Se.encryptionSchemes.push(Re),(ge=Ae[0].robustness)&&!Se.videoRobustnessLevels.includes(ge)&&Se.videoRobustnessLevels.push(ge),(we=_e[0].robustness)&&!Se.audioRobustnessLevels.includes(we)&&Se.audioRobustnessLevels.push(we),"getStatusForPolicy"in Be){for(Qe=[],Ft=g(o),pt=Ft.next(),ht={};!pt.done;ht={td:void 0},pt=Ft.next())ht.td=pt.value,Se.minHdcpVersions.includes(ht.td)||Qe.push(Be.getStatusForPolicy({minHdcpVersion:ht.td}).then(function(Kt){return function(No){No!="usable"||Se.minHdcpVersions.includes(Kt.td)||Se.minHdcpVersions.push(Kt.td)}}(ht)));return S(Dt,Promise.all(Qe),0)}Dt.s(0)}})},y=function(pe,te,Be,De){var xe,Ae,_e,Se,Re,ge,we,Qe,Ft,pt;return C(function(ht){switch(ht.g){case 1:for(ee(ht,2),xe=Pi(d),Ae=g(xe.videoCapabilities),_e=Ae.next();!_e.done;_e=Ae.next())Se=_e.value,Se.encryptionScheme=te,Se.robustness=Be;for(Re=g(xe.audioCapabilities),ge=Re.next();!ge.done;ge=Re.next())we=ge.value,we.encryptionScheme=te,we.robustness=De;return Qe=Pi(xe),Qe.persistentState="required",Qe.sessionTypes=["persistent-license"],Ft=[Qe,xe],Mr()?S(ht,pu(5,navigator.requestMediaKeySystemAccess(pe,Ft)),7):S(ht,navigator.requestMediaKeySystemAccess(pe,Ft),6);case 6:pt=ht.h,ht.s(5);break;case 7:pt=ht.h;case 5:return S(ht,m(pe,pt),8);case 8:fe(ht,0);break;case 2:re(ht),q(ht)}})},v=function(pe,te,Be,De){var xe,Ae,_e;return C(function(Se){switch(Se.g){case 1:return ee(Se,2),xe={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:c[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:pe,video:{encryptionScheme:te,robustness:Be},audio:{encryptionScheme:te,robustness:De}}},Mr()?S(Se,pu(5,navigator.mediaCapabilities.decodingInfo(xe)),7):S(Se,navigator.mediaCapabilities.decodingInfo(xe),6);case 6:Ae=Se.h,Se.s(5);break;case 7:Ae=Se.h;
22case 5:return _e=Ae.keySystemAccess,S(Se,m(pe,_e),8);case 8:fe(Se,0);break;case 2:re(Se),q(Se)}})},T=g(e),w=T.next();!w.done;w=T.next())I=w.value,h.set(I,null);for(M=function(pe){return!(pe==="org.w3.clearkey"&&Jt())},R=[],A=g(p),E=A.next();!E.done;E=A.next())for(D=E.value,P=g(e),O=P.next();!O.done;O=P.next())L=O.value,M(L)&&(R.push(y(L,D,"","")),R.push(v(L,D,"","")));for(U=g(e),_=U.next();!_.done;_=U.next())for(F=_.value,H=g(a[F]||[]),V=H.next();!V.done;V=H.next())X=V.value,M(F)&&(R.push(y(F,null,X,"")),R.push(y(F,null,"",X)),R.push(v(F,null,X,"")),R.push(v(F,null,"",X)));return S(K,Promise.all(R),2)}return K.return(Xd(h))})}function wm(e){return C(function(t){if(t.g==1)return ee(t,2),S(t,pu(ax,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.g!=2)return fe(t,0);re(t),q(t)})}function vu(e){var t;return C(function(n){return t=Array.from(e.i.entries()),e.i.clear(),S(n,Promise.all(t.map(function(i){i=g(i);var r=i.next().value,o=i.next().value;return C(function(s){if(s.g==1)return ee(s,2),e.ka||e.B.has(r.sessionId)||o.type!=="persistent-license"||e.g.persistentSessionOnlinePlayback?S(s,wm(r),5):S(s,r.remove(),5);if(s.g!=2)return fe(s,0);re(s),q(s)})})),0)})}function xm(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function rx(e){e.i.forEach(function(t,n){var i=t.Xf,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.C.onExpirationUpdated(n.sessionId,r),t.Xf=r)})}function yu(e){return e=e.i.values(),Xw(e,function(t){return t.loaded})}function ox(e){for(var t=g(e.h&&e.h.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.Z.get(n.value)!=="usable")return!1;return!0}function sx(e,t){var n=[];for(t.forEach(function(i,r){n.push({keySystem:r,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=g(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function Em(e,t,n,i,r,o,s,u){var a=[];e=g(e);for(var l=e.next(),c={};!l.done;c={wa:void 0},l=e.next()){if(c.wa=l.value,t.includes(c.wa.encryptionScheme)||t.push(c.wa.encryptionScheme),c.wa.keySystem=="org.w3.clearkey"&&c.wa.licenseServerUri.startsWith("data:application/json;base64,")?a.includes(c.wa.licenseServerUri)||a.push(c.wa.licenseServerUri):n.includes(c.wa.licenseServerUri)||n.push(c.wa.licenseServerUri),r.includes(c.wa.serverCertificateUri)||r.push(c.wa.serverCertificateUri),c.wa.serverCertificate&&(i.some(function(h){return function(m){return Qi(m,h.wa.serverCertificate)}}(c))||i.push(c.wa.serverCertificate)),c.wa.initData){l=g(c.wa.initData);for(var d=l.next(),p={};!d.done;p={Of:void 0},d=l.next())p.Of=d.value,o.some(function(h){return function(m){var y=h.Of;return m.keyId&&m.keyId==y.keyId?!0:m.initDataType==y.initDataType&&Qi(m.initData,y.initData)}}(p))||o.push(p.Of)}if(c.wa.keyIds)for(l=g(c.wa.keyIds),d=l.next();!d.done;d=l.next())s.add(d.value);if(c.wa.keySystemUris&&u)for(c=g(c.wa.keySystemUris),l=c.next();!l.done;l=c.next())u.add(l.value)}if(a.length==1)n.push(a[0]);else if(0<a.length){for(t=[],a=g(a),i=a.next();!i.done;i=a.next())i=j.atob(i.value.split("data:application/json;base64,").pop()),i=JSON.parse(i),t.push.apply(t,W(i.keys));a=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+j.btoa(a))}}function ux(e,t,n,i){var r=e.keySystem;r&&(r!="org.w3.clearkey"||!e.licenseServerUri)&&(t.size&&t.get(r)&&(t=t.get(r),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(r))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),i[r]&&(e.keySystem=i[r]),j.cast&&j.cast.__platform__&&r=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function Am(e,t){if(e=vo(e),e.size!=0){e=hg(e),t=g(t);for(var n=t.next();!n.done;
22n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var ax=1,lx=5,cx=.5;function tl(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=g(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}tl.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var i;if(!(i=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(i=n.audio&&e.audio)){i=n.audio;var r=e.audio;i=!(!((!i.channelsCount||!r.channelsCount||2<i.channelsCount||2<r.channelsCount)&&i.channelsCount!=r.channelsCount||i.spatialAudio!==r.spatialAudio||t&&!Im(i,r))&&Mm(i.roles,r.roles)&&i.groupId===r.groupId)}return!i&&(i=n.video&&e.video)&&(n=n.video,i=e.video,i=!((!t||Im(n,i))&&Mm(n.roles,i.roles))),i?!1:(this.g.add(e),!0)},tl.prototype.values=function(){return this.g.values()};function Im(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(i){return Nr(i)}),t=t.codecs.split(",").map(function(i){return Nr(i)}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Mm(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;e=g(e);for(var n=e.next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}Y("shaka.media.AdaptationSet",tl),Y("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function zd(){}zd.prototype.create=function(){},zd.prototype.configure=function(){},Y("shaka.media.AdaptationSetCriteria",zd);function dx(){this.g=Tu,this.i=new Map().set(Tu,2).set(ls,1),this.h=0}var ls=0,Tu=1;/*
23 @license
24 Shaka Player
25 Copyright 2023 Google LLC
26 SPDX-License-Identifier: Apache-2.0
27*/function Yd(e,t,n){this.g=e,this.i=t,this.h=n}function Cm(e,t){return C(function(n){if(n.g==1)return S(n,Pw(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||Hg(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(gu))throw new k(2,4,4032);return n.return(Dm(e,t))})}function km(e,t){var n=e.g.restrictions;e=e.i;var i=!1;t=g(t.variants);for(var r=t.next();!r.done;r=t.next()){r=r.value;var o=r.allowedByApplication;r.allowedByApplication=Xa(r,n,e),o!=r.allowedByApplication&&(i=!0)}return i}function Dm(e,t){var n=km(e,t);if(t){var i=e.h?e.h.h:null;if(i&&e.h.A){for(var r=new Set,o=g(t.variants),s=o.next();!s.done;s=o.next())s=s.value,s.audio&&r.add(s.audio),s.video&&r.add(s.video);for(r=g(r),o=r.next();!o.done;o=r.next())Pm(e,i.keySystem,o.value)}Rm(e,t)}return n}function Pm(e,t,n){n=g(n.drmInfos);for(var i=n.next();!i.done;i=n.next())if(i=i.value,i.keySystem==t){i=g(i.initData||[]);for(var r=i.next();!r.done;r=i.next())r=r.value,mu(e.h,r.initDataType,r.initData)}}function Rm(e,t){e=e.h?e.h.be():{};var n=Object.keys(e);n=n.length&&n[0]=="00";var i=!1,r=!1,o=new Set,s=new Set,u=new Set;t=g(t.variants);for(var a=t.next();!a.done;a=t.next())a=a.value,a.audio&&u.add(a.audio),a.video&&u.add(a.video),a.allowedByApplication?a.allowedByKeySystem&&(i=!0):r=!0;for(u=g(u),t=u.next();!t.done;t=u.next())if(t=t.value,t.keyIds.size)for(t=g(t.keyIds),a=t.next();!a.done;a=t.next()){a=a.value;var l=e[n?"00":a];l?Qd.includes(l)&&s.add(l):o.add(a)}if(!i)throw e={hasAppRestrictions:r,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)},new k(2,4,4012,e)}var Qd=["output-restricted","internal-error"];function Su(){}function yo(e,t){cs.set(e,t)}function px(){var e={};if(Fi())for(var t=g(cs.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=g(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]),n=t.next();!n.done;n=t.next())n=n.value,e[n]=Fi()?cs.has(n):Zs(n);return e}function Lm(e,t){if(t){var n=cs.get(t.toLowerCase());if(n)return n}throw new k(2,4,4e3,e,t)}Y("shaka.media.ManifestParser",Su),Su.unregisterParserByMime=function(e){cs.delete(e)},Su.registerParserByMime=yo,Su.registerParserByExtension=function(){Ue("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},Su.AccessibilityPurpose={Pk:"visually impaired",fk:"hard of hearing"};var cs=new Map;function nl(e,t){var n=null,i=null,r=null,o=null,s=e.S();return t&1&&(r=e.bd()),t&2&&(o=e.S()),t&8&&(n=e.S()),t&16&&(i=e.S()),{trackId:s,ld:n,md:i,Xh:r,sh:o}}function il(e,t){return t==1?(t=e.S(),e=e.S(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.S()}}
27function rl(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.S(),e.skip(4),e=e.ma(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function ol(e,t,n){var i=e.S(),r=[],o=null;n&1&&(o=e.bg()),n&4&&e.skip(4);for(var s=0;s<i;s++){var u={ig:null,sampleSize:null,Be:null};n&256&&(u.ig=e.S()),n&512&&(u.sampleSize=e.S()),n&1024&&e.skip(4),n&2048&&(u.Be=t==0?e.S():e.bg()),r.push(u)}return{Uk:i,hg:r,qf:o}}function Nm(e){e.skip(6),e.skip(2),e.skip(8);var t=e.ma();return e.skip(2),e.skip(2),e.skip(2),e=e.ma()+e.ma()/65536,{channelCount:t,sampleRate:e}}function $d(e){return e=e.S(),{codec:Ja(e)}}function fx(e){var t=null,n=null,i=e.Db(4),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),r+=String.fromCharCode(i[3]),r==="nclx"){switch(e.ma()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(i=e.ma(),e.ma(),i){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,Od:n}}function wu(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function Fn(e){return(10>e?"0":"")+e}function To(e){if(!bm){bm=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);sl=je("ftyp",t,i,t,n),t=je("dref",Ax),Jd=je("dinf",t)}this.g=e}function ds(e){for(var t=[],n=g(e.g),i=n.next();!i.done;i=n.next()){var r=t,o=r.push,s=i.value;i=je;var u=s.id+1,a=s.stream.width||0,l=s.stream.height||0;s.type=="audio"&&(l=a=0);var c=s.duration*s.timescale,d=Math.floor(c/(Or+1));switch(c=Math.floor(c%(Or+1)),u=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(W(lt(u,4)),[0,0,0,0],W(lt(d,4)),W(lt(c,4)),[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],W(lt(a,2)),[0,0],W(lt(l,2)),[0,0])),u=je("tkhd",u),a=je,d=s.duration*s.timescale,l=Math.floor(d/(Or+1)),d=Math.floor(d%(Or+1)),c=s.stream.language,c=c.charCodeAt(0)-96<<10|c.charCodeAt(1)-96<<5|c.charCodeAt(2)-96,l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(W(lt(s.timescale,4)),W(lt(l,4)),W(lt(d,4)),W(lt(c,2)),[0,0])),l=je("mdhd",l),d=s,c=new Uint8Array([]),d.type){case"video":c=gx;break;case"audio":c=mx}d=je("hdlr",c);e:{switch(s.type){case"video":s=je("minf",je("vmhd",wx),Jd,jm(s));break e;case"audio":s=je("minf",je("smhd",xx),Jd,jm(s));break e}s=new Uint8Array([])}s=a("mdia",l,d,s),i=i("trak",u,s),o.call(r,i)}for(t=yt.apply(tn,W(t)),o=e.g[0],n=je,i=o.duration*o.timescale,r=Math.floor(i/(Or+1)),i=Math.floor(i%(Or+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(W(lt(o.timescale,4)),W(lt(r,4)),W(lt(i,4)),[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])),r=je("mvhd",r),i=[],e=g(e.g),a=e.next();!a.done;a=e.next())s=i,u=s.push,a=new Uint8Array([0,0,0,0].concat(W(lt(a.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=je("trex",a),u.call(s,a);if(e=yt.apply(tn,W(i)),e=je("mvex",e),i=[],o.encrypted){for(o=g(o.stream.drmInfos),s=o.next();!s.done;s=o.next())if(s=s.value,s.initData)for(s=g(s.initData),u=s.next();!u.done;u=s.next())i.push(u.value.initData);o=yt.apply(tn,W(i))}else o=new Uint8Array([]);return e=n("moov",r,t,e,o),t=new Uint8Array(sl.byteLength+e.byteLength),t.set(sl),t.set(e,sl.byteLength),t}function jm(e){var t=je,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=$i()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var i=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,i=e.stream.height||0,0<e.Ca.byteLength)var r=je("avcC",e.Ca);else{r=je;for(var o=7,s=[],u=[],a=0,l=0,c=0,d=0;d<e.lb.length;d++){var p=Om(e.lb[d]);switch(p[0]&31){case 7:s.push(p),o+=p.length+2;break;case 8:u.push(p),o+=p.length+2}}for(0<s.length&&(a=s[0][1],c=s[0][2],l=s[0][3]),o=new Uint8Array(o),d=0,o[d++]=1,o[d++]=a,o[d++]=c,o[d++]=l,o[d++]=255,o[d++]=224|s.length,a=0;a<s.length;a++)o[d++]=(s[a].length&65280)>>8,o[d++]=s[a].length&255,o.set(s[a],d),d+=s[a].length;for(o[d++]=u.length,s=0;s<u.length;s++)o[d++]=(u[s].length&65280)>>8,o[d++]=u[s].length&255,o.set(u[s],d),d+=u[s].length;r=r("avcC",o)}n=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].concat(W(lt(n,2)),W(lt(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="avc1",u=Um(e),s=new Uint8Array([]),e.encrypted&&(s=So(0,e.stream,e.codecs),i="encv"),i=je(i,n,r,u,s)}else e.codecs.includes("hvc1")&&(i=e.stream.width||0,r=e.stream.height||0,n=new Uint8Array([]),0<e.Ca.byteLength&&(n=je("hvcC",e.Ca)),i=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].concat(W(lt(i,2)),W(lt(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="hvc1",u=Um(e),s=new Uint8Array([]),e.encrypted&&(s=So(0,e.stream,e.codecs),r="encv"),i=je(r,i,n,u,s));break;
27case"audio":n=="mp3"?e=je(".mp3",xu(e)):n=="ac-3"?(n=je("dac3",e.ra),i="ac-3",r=new Uint8Array([]),e.encrypted&&(r=So(0,e.stream,e.codecs),i="enca"),e=je(i,xu(e),n,r)):n=="ec-3"?(n=je("dec3",e.ra),i="ec-3",r=new Uint8Array([]),e.encrypted&&(r=So(0,e.stream,e.codecs),i="enca"),e=je(i,xu(e),n,r)):n=="opus"?(n=je("dOps",e.ra),i="Opus",r=new Uint8Array([]),e.encrypted&&(r=So(0,e.stream,e.codecs),i="enca"),e=je(i,xu(e),n,r)):(0<e.ra.byteLength?n=je("esds",e.ra):(n=je,i=e.id+1,r=e.stream.channelsCount||2,s=e.stream.audioSamplingRate||44100,a=qo("audio",e.codecs.split(",")),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},u=l[s],(a==="mp4a.40.5"||a==="mp4a.40.29")&&(u=l[2*s]),s=parseInt(a.split(".").pop(),10),i=new Uint8Array([0,0,0,0,3,25].concat(W(lt(i,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,s<<3|u>>>1,u<<7|r<<3,6,1,2])),n=n("esds",i)),i="mp4a",r=new Uint8Array([]),e.encrypted&&(r=So(0,e.stream,e.codecs),i="enca"),e=je(i,xu(e),n,r)),i=e}return e=je("stsd",Ex,i),t("stbl",e,je("stts",vx),je("stsc",yx),je("stsz",Sx),je("stco",Tx))}function Um(e){if(!e.Ia&&!e.La)return new Uint8Array([]);var t=e.La;return e=new Uint8Array([].concat(W(lt(e.Ia,4)),W(lt(t,4)))),je("pasp",e)}function xu(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(W(lt(e.stream.audioSamplingRate||44100,2)),[0,0]))}function So(e,t,n){e=je,n=new Uint8Array([].concat(W(lt(_m(n.split(".")[0]),4)))),n=je("frma",n);var i="cenc",r=t.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=new Uint8Array([0,0,0,0].concat(W(lt(_m(i),4)),[0,1,0,0])),i=je("schm",i),r=je;var o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);t=g(t.drmInfos);for(var s=t.next();!s.done;s=t.next())if((s=s.value)&&s.keyIds&&s.keyIds.size){s=g(s.keyIds);for(var u=s.next();!u.done;u=s.next())o=Om(u.value)}return t=new Uint8Array([0,0,0,0,0,0,1,8]),t=je("tenc",t,o),e("sinf",n,i,r("schi",t))}function Eu(e){var t=[];e=g(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var i=t.push,r=i.apply,o=je,s=new Uint8Array([0,0,0,0].concat(W(lt(n.data?n.data.Eb:0,4))));s=je("mfhd",s);var u,a=n.data?n.data.jb:[],l=new Uint8Array(4+a.length);for(u=0;u<a.length;u++){var c=a[u].flags;l[u+4]=c.Ya<<4|c.$a<<2|c.Za}a=je("sdtp",l);var d=a.length+92;l=je,u=new Uint8Array([0,0,0,58].concat(W(lt(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),u=je("tfhd",u),c=n.data?n.data.baseMediaDecodeTime:0;var p=Math.floor(c%(Or+1));c=new Uint8Array([1,0,0,0].concat(W(lt(Math.floor(c/(Or+1)),4)),W(lt(p,4)))),c=je("tfdt",c);var h=d;d=n.data?n.data.jb:[],p=d.length;var m=12+16*p,y=new Uint8Array(m);for(h+=8+m,y.set([n.type==="video"?1:0,0,15,1].concat(W(lt(p,4)),W(lt(h,4))),0),h=0;h<p;h++){var v=d[h];m=lt(v.duration,4);var T=lt(v.size,4),w=v.flags;v=lt(v.eb,4),y.set([].concat(W(m),W(T),[w.hb<<2|w.Ya,w.$a<<6|w.Za<<4|w.ib,w.Xa&61440,w.Xa&15],W(v)),12+16*h)}d=je("trun",y),a=l("traf",u,c,d,a),o=o("moof",s,a),r.call(i,t,[o,hx(n)])}return yt.apply(tn,W(t))}function hx(e){return e=(e.data?e.data.jb:[]).map(function(t){return t.data}),e=yt.apply(tn,W(e)),je("mdat",e)}function lt(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function Om(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function _m(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function je(e){var t=mt.apply(1,arguments),n=Fm.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],Fm.set(e,n));for(var i=8,r=t.length-1;0<=r;r--)i+=t[r].byteLength;for(r=new Uint8Array(i),r[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=i&255,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}var bm=!1,Or=Math.pow(2,32)-1,Fm=new Map,gx=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]),mx=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]),vx=new Uint8Array([0,0,0,0,0,0,0,0]),yx=new Uint8Array([0,0,0,0,0,0,0,0]),Tx=new Uint8Array([0,0,0,0,0,0,0,0]),Sx=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),wx=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),xx=new Uint8Array([0,0,0,0,0,0,0,0]),Ex=new Uint8Array([0,0,0,0,0,0,0,1]),sl=new Uint8Array([]),Ax=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Jd=new Uint8Array([]);function Ix(e){e=he(e);var t=null;return new ze().box("moov",ye).box("trak",ye).box("mdia",ye).box("minf",ye).box("stbl",ye).R("stsd",lr).box("enca",function(n){return t=n.reader.h,$a(n)}).box("sinf",ye).box("frma",function(n){n.parser.stop(),$d(n.reader).codec==="ec-3"&&t&&t.getUint16(16)!==2&&t.setUint16(16,2)}).parse(e),e}
27function Mx(e,t,n){function i(h){d.push({box:h,ih:1701733217})}function r(h){d.push({box:h,ih:1701733238})}function o(h){a=!0,h.parser.stop()}function s(h){c.push(h),ye(h)}var u=t=he(t),a=!1,l,c=[],d=[];if(new ze().box("moov",s).box("trak",s).box("mdia",s).box("minf",s).box("stbl",s).R("stsd",function(h){l=h,c.push(h),lr(h)}).R("encv",o).R("enca",o).R("dvav",r).R("dva1",r).R("dvh1",r).R("dvhe",r).R("dvc1",r).R("dvi1",r).R("hev1",r).R("hvc1",r).R("avc1",r).R("avc3",r).R("ac-3",i).R("ec-3",i).R("ac-4",i).R("Opus",i).R("fLaC",i).R("mp4a",i).parse(t),a)return t;if(d.length==0||!l)throw er(t),new k(2,3,3019,n);d.reverse(),n=g(d);for(var p=n.next();!p.done;p=n.next())p=p.value,u=Dx(e,u,l,p.box,c,p.ih);return Go()&&Na()&&!ki()?(e=new Uint8Array(t.byteLength+u.byteLength),e.set(u),e.set(t,u.byteLength),e):u}function Cx(e){e=he(e);var t=[];new ze().box("mdat",function(s){t.push(s)}).parse(e);for(var n=[],i=0;i<t.length;i++){var r=t[i-1],o=t[i];n.push(kx(e.subarray(r?r.start+r.size:0,o.start+o.size)))}return yt.apply(tn,W(n))}function kx(e){function t(d){s.push(d),ye(d)}var n,i,r,o,s=[];if(new ze().box("moof",t).box("traf",t).R("tfhd",function(d){n=d,r=nl(d.reader,d.flags)}).R("trun",function(d){i=d,o=ol(d.reader,d.version,d.flags)}).parse(e),r&&r.sh!==2){var u=n.start+Ur(n)+4+(r.Xh!==null?8:0),a=An(e);if(r.sh!==null)a.setUint32(u,2);else{ul(e,n.start,n.size+4);var l=a.getUint32(n.start+8);a.setUint32(n.start+8,l|2),o&&o.qf!==null&&a.setInt32(i.start+Ur(i)+4,o.qf+4),l=e.subarray(0,u),a=e.subarray(u),e=new Uint8Array(e.byteLength+4),e.set(l),l=[];for(var c=3;0<=c;c--)l.push(2>>8*c&255);for(e.set(new Uint8Array(l),u),e.set(a,u+4),u=g(s),a=u.next();!a.done;a=u.next())a=a.value,ul(e,a.start,a.size+4)}}return e}function Dx(e,t,n,i,r,o){var s=So(new To([]),e,i.name),u=t.subarray(i.start,i.start+i.size);for(e=new Uint8Array(i.size+s.byteLength),e.set(u,0),An(e).setUint32(4,o),e.set(s,i.size),ul(e,0,e.byteLength),o=new Uint8Array(t.byteLength+e.byteLength),i=Jt()||ki()||Go()?i.start:i.start+i.size,s=t.subarray(i),o.set(t.subarray(0,i)),o.set(e,i),o.set(s,i+e.byteLength),t=g(r),r=t.next();!r.done;r=t.next())r=r.value,ul(o,r.start,r.size+e.byteLength);return e=An(o,n.start),n=Ur(n),t=e.getUint32(n),e.setUint32(n,t+1),o}function ul(e,t,n){e=An(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}function Px(e){function t(r){i.push({start:r.start,size:r.size}),ye(r)}var n=he(e),i=[];return new ze().box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(r){i.push({start:r.start,size:r.size});for(var o=An(n,r.start),s=0;s<r.size-3;s++){var u=o.getUint32(s);u==1633889587?o.setUint32(s,1700998451):u==1684103987&&o.setUint32(s,1684366131)}}).parse(n),n}function Cn(e,t,n,i,r,o,s,u){this.N=e,this.Sa=t,this.xa=n,this.Wc=i===void 0?null:i,this.timescale=r===void 0?null:r,this.h=o===void 0?null:o,this.aesKey=s===void 0?null:s,this.g=this.mimeType=this.codecs=null,this.encrypted=u===void 0?!1:u}Cn.prototype.uc=function(){return this.Sa},Cn.prototype.tc=function(){return this.xa},Cn.prototype.Ld=function(e){this.h=e},Cn.prototype.Ib=function(){return this.h};function al(e,t){return e===t?!0:e&&t?e.uc()==t.uc()&&e.tc()==t.tc()&&Yo(e.N().sort(),t.N().sort())&&Qi(e.Ib(),t.Ib()):e==t}Y("shaka.media.InitSegmentReference",Cn),Cn.prototype.getEndByte=Cn.prototype.tc,Cn.prototype.getStartByte=Cn.prototype.uc;function oe(e,t,n,i,r,o,s,u,a,l,c,d,p,h,m,y){for(l=l===void 0?[]:l,h=h===void 0?cr:h,this.startTime=e,this.j=this.endTime=t,this.C=n,this.Sa=i,this.xa=r,this.Y=o,this.timestampOffset=s,this.appendWindowStart=u,this.appendWindowEnd=a,this.g=l,this.tilesLayout=c===void 0?"":c,this.B=d===void 0?null:d,this.h=p===void 0?null:p,this.status=h,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=m===void 0?null:m,this.thumbnailSprite=null,this.i=-1,this.A=y===void 0?!1:y,this.F=this.o=!1,e=g(this.g),t=e.next();!t.done;t=e.next())t.value.gh();this.A&&this.g.length&&this.g[this.g.length-1].fh(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.G=!1}f=oe.prototype,f.N=function(){return this.C()},f.getStartTime=function(){return this.startTime},f.oi=function(){return this.endTime},f.uc=function(){return this.Sa},f.tc=function(){return this.xa},f.Li=function(){return this.tilesLayout},f.Ki=function(){return this.B},f.dc=function(){return this.status},f.cj=function(){this.status=Vm},f.Uf=function(){this.preload=!0},f.isPreload=function(){return this.preload},f.Vc=function(){this.l=!1},f.Vi=function(){return this.l},f.gh=function(){this.o=!0},f.Xi=function(){return this.o},f.fh=function(){this.F=!0},f.Wi=function(){return this.F},f.eh=function(){this.m=!0},f.Ri=function(){return this.m},f.Ge=function(e){this.thumbnailSprite=e},f.Ii=function(){return this.thumbnailSprite},f.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=g(this.g),n=t.next();!n.done;
27n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},f.sg=function(e){this.h==null?En("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},f.Ld=function(e,t){this.u=e,this.G=t===void 0?!1:t},f.Ib=function(e){var t=this.u;return(e===void 0||e)&&this.G&&(this.u=null),t};function Bm(e,t){e.Y=t,e=g(e.g);for(var n=e.next();!n.done;n=e.next())Bm(n.value,t)}Y("shaka.media.SegmentReference",oe),oe.prototype.getSegmentData=oe.prototype.Ib,oe.prototype.setSegmentData=oe.prototype.Ld,oe.prototype.syncAgainst=oe.prototype.sg,oe.prototype.offset=oe.prototype.offset,oe.prototype.getThumbnailSprite=oe.prototype.Ii,oe.prototype.setThumbnailSprite=oe.prototype.Ge,oe.prototype.hasByterangeOptimization=oe.prototype.Ri,oe.prototype.markAsByterangeOptimization=oe.prototype.eh,oe.prototype.isLastPartial=oe.prototype.Wi,oe.prototype.markAsLastPartial=oe.prototype.fh,oe.prototype.isPartial=oe.prototype.Xi,oe.prototype.markAsPartial=oe.prototype.gh,oe.prototype.isIndependent=oe.prototype.Vi,oe.prototype.markAsNonIndependent=oe.prototype.Vc,oe.prototype.isPreload=oe.prototype.isPreload,oe.prototype.markAsPreload=oe.prototype.Uf,oe.prototype.markAsUnavailable=oe.prototype.cj,oe.prototype.getStatus=oe.prototype.dc,oe.prototype.getTileDuration=oe.prototype.Ki,oe.prototype.getTilesLayout=oe.prototype.Li,oe.prototype.getEndByte=oe.prototype.tc,oe.prototype.getStartByte=oe.prototype.uc,oe.prototype.getEndTime=oe.prototype.oi,oe.prototype.getStartTime=oe.prototype.getStartTime,oe.prototype.getUris=oe.prototype.N;var cr=0,Vm=1;oe.Status={Pj:cr,Nk:Vm,nk:2};function Au(e){return e.length==1&&1e-4>e.end(0)-e.start(0)}function Zd(e){return!e||Au(e)?null:e.length?e.end(e.length-1):null}function ep(e,t){return!e||!e.length||Au(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function Hm(e,t){if(!e||!e.length||Au(e))return 0;var n=0;e=g(dr(e));for(var i=e.next();!i.done;i=e.next()){var r=i.value;i=r.start,r=r.end,r>t&&(n+=r-Math.max(i,t))}return n}function Rx(e,t,n){return!e||!e.length||Au(e)?null:(e=dr(e).findIndex(function(i,r,o){return i.start>t&&(r==0||o[r-1].end-t<=n)}),0<=e?e:null)}function dr(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function Gm(){}function Xm(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function _r(e){for(;e.firstChild;)e.removeChild(e.firstChild)}Y("shaka.util.Dom",Gm),Gm.removeAllChildren=_r;/*
28 @license
29 Shaka Player
30 Copyright 2022 Google LLC
31 SPDX-License-Identifier: Apache-2.0
32*/function tp(){}function Km(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function Wm(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function np(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function Lx(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(2>e.size||e.data[0]!==3)return null;var n=e.data.subarray(1).indexOf(0);if(n===-1)return null;var i=at(he(e.data,1,n)),r=e.data[2+n],o=e.data.subarray(3+n).indexOf(0);if(o===-1)return null;var s=at(he(e.data,3+n,o)),u;return i==="-->"?u=at(he(e.data,4+n+o)):u=ri(e.data.subarray(4+n+o)),t.mimeType=i,t.pictureType=r,t.description=s,t.data=u,t}return e.type==="TXXX"?2>e.size||e.data[0]!==3||(i=e.data.subarray(1).indexOf(0),i===-1)?null:(n=at(he(e.data,1,i)),e=at(he(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="WXXX"?2>e.size||e.data[0]!==3||(i=e.data.subarray(1).indexOf(0),i===-1)?null:(n=at(he(e.data,1,i)),e=at(he(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="PRIV"?2>e.size||(n=e.data.indexOf(0),n===-1)?null:(n=at(he(e.data,0,n)),t.description=n,n=="com.apple.streaming.transportStreamTimestamp"?(n=e.data.subarray(n.length+1),e=n[3]&1,n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=4772185884e-2),t.data=n):(e=ri(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?2>e.size||e.data[0]!==3?null:(e=at(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=at(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=ri(e.data),t):null}function wo(e){for(var t=0,n=[];Km(e,t);){var i=np(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,i=t+i;t+10<i;){var r=e.subarray(t),o=np(r,4);r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:o,data:r.subarray(10,10+o)},(o=Lx(r))&&n.push(o),t+=r.size+10}Wm(e,t)&&(t+=10)}return n}function ps(e,t){for(var n=t=t===void 0?0:t,i=0;Km(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=np(e,t+6),Wm(e,t+10)&&(i+=10),t+=i;return 0<i?e.subarray(n,n+i):new Uint8Array([])}Y("shaka.util.Id3Utils",tp),tp.getID3Data=ps,tp.getID3Frames=wo;
32function pr(e,t){if(this.j=e,t!==void 0&&t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)2<=i&&e[i]==3&&e[i-1]==0&&e[i-2]==0||(t[n]=e[i],n++);this.j=he(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function ip(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),i=Math.min(4,e.i);i!==0&&(n.set(e.j.subarray(t,t+i)),e.h=new rt(n,0).S(),e.g=8*i,e.i-=i)}function Bn(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,ip(e)}e.h<<=t,e.g-=t}function Ne(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&ip(e),n=t-n,0<n?i<<n|Ne(e,n):i}function rp(e){var t;for(t=0;t<e.g;++t)if((e.h&2147483648>>>t)!==0)return e.h<<=t,e.g-=t,t;return ip(e),t+rp(e)}function kn(e){Bn(e,1+rp(e))}function Q(e){var t=rp(e);return Ne(e,t+1)-1}function fs(e){return e=Q(e),1&e?1+e>>>1:-1*(e>>>1)}function ie(e){return Ne(e,1)===1}function Ve(e){return Ne(e,8)}function ll(e,t){for(var n=8,i=8,r=0;r<t;r++)i!==0&&(i=fs(e),i=(n+i+256)%256),n=i===0?n:i}function Nx(e){return Ve(e),Q(e),Q(e)}Y("shaka.util.ExpGolomb",pr);function ot(){this.G=null,this.H=!1,this.m=this.I=null,this.j=[],this.g=[],this.A=this.B=null,this.i=[],this.h=[],this.C=null,this.l=[],this.F=this.o=this.u=null}f=ot.prototype,f.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},f.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,sp(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(e[r]==71){var o=!!(e[r+1]&64),s=((e[r+1]&31)<<8)+e[r+2];if(1<(e[r+3]&48)>>4){var u=r+5+e[r+4];if(u==r+188)continue}else u=r+4;switch(s){case 0:o&&(u+=e[u]+1),this.G=(e[u+10]&31)<<8|e[u+11];break;case 17:case 8191:break;case this.G:o&&(u+=e[u]+1),o=e,s={audio:-1,video:-1,ge:-1,audioCodec:"",videoCodec:""};var a=u+3+((o[u+1]&15)<<8|o[u+2])-4;for(u+=12+((o[u+10]&15)<<8|o[u+11]);u<a;){var l=(o[u+1]&31)<<8|o[u+2],c=(o[u+3]&15)<<8|o[u+4];switch(o[u]){case 6:if(0<c)for(var d=u+5,p=c;2<p;){var h=o[d+1]+2;switch(o[d]){case 5:var m=pd(o.subarray(d+2,d+h));s.audio==-1&&m==="Opus"?(s.audio=l,s.audioCodec="opus"):s.video==-1&&m==="AV01"&&(s.video=l,s.videoCodec="av1");break;case 106:s.audio==-1&&(s.audio=l,s.audioCodec="ac3");break;case 122:s.audio==-1&&(s.audio=l,s.audioCodec="ec3");break;case 124:s.audio==-1&&(s.audio=l,s.audioCodec="aac");break;case 127:s.audioCodec=="opus"&&(m=null,o[d+2]===128&&(m=o[d+3]),m!=null&&(this.F={channelCount:(m&15)===0?2:m&15,$h:m,sampleRate:48e3}))}d+=h,p-=h}break;case 15:s.audio==-1&&(s.audio=l,s.audioCodec="aac");break;case 17:s.audio==-1&&(s.audio=l,s.audioCodec="aac-loas");break;case 21:s.ge==-1&&(s.ge=l);break;case 27:s.video==-1&&(s.video=l,s.videoCodec="avc");break;case 3:case 4:s.audio==-1&&(s.audio=l,s.audioCodec="mp3");break;case 36:s.video==-1&&(s.video=l,s.videoCodec="hvc");break;case 129:s.audio==-1&&(s.audio=l,s.audioCodec="ac3");break;case 132:case 135:s.audio==-1&&(s.audio=l,s.audioCodec="ec3")}u+=c+5}o=s,o.video!=-1&&(this.I=o.video,this.m=o.videoCodec),o.audio!=-1&&(this.B=o.audio,this.A=o.audioCodec),o.ge!=-1&&(this.C=o.ge),i&&!this.H&&(i=!1,r=t-188),this.H=!0;break;case this.I:u=e.subarray(u,r+188),o?this.j.push([u]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(u);break;case this.B:u=e.subarray(u,r+188),o?this.i.push([u]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(u);break;case this.C:u=e.subarray(u,r+188),o?this.l.push([u]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(u);break;default:i=!0}}return this};function op(e,t){if((t[0]<<16|t[1]<<8|t[2])!==1)return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var i=t[7];if(i&192){var r=536870912*(t[9]&14)+4194304*(t[10]&255)+16384*(t[11]&254)+128*(t[12]&255)+(t[13]&254)/2;e.u==null&&(e.u=r),n.pts=zm(r,e.u),e.u=n.pts,n.dts=n.pts,i&64&&(i=536870912*(t[14]&14)+4194304*(t[15]&255)+16384*(t[16]&254)+128*(t[17]&255)+(t[18]&254)/2,e.o==null&&(e.o=i),n.dts=zm(i,e.o)),e.o=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}f.jj=function(e){return Ue("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Zf(e,{Dd:null,state:null})},f.Zf=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var i=e.byteLength,r=1;this.m=="hvc"&&(r=2);var o=t.state||0,s=o,u=0,a=[],l=-1,c=0;for(o==-1&&(l=0,c=this.m=="hvc"?e[0]>>1&63:e[0]&31,o=0,u=1);u<i;){var d=e[u++];o?o===1?o=d?0:2:d?d==1?(d=u-o-1,0<=l?a.push({data:e.subarray(l+r,d),fullData:e.subarray(l,d),type:c,time:n,state:null}):(o=a.length?a[a.length-1]:t.Dd)&&(s&&u<=4-s&&o.state&&(o.data=o.data.subarray(0,o.data.byteLength-s),o.fullData=o.fullData.subarray(0,o.fullData.byteLength-s)),0<d&&(d=e.subarray(0,d),o.data=yt(o.data,d),o.fullData=yt(o.fullData,d),o.state=0)),u<i?(c=this.m=="hvc"?e[u]>>1&63:e[u]&31,l=u,o=0):o=-1):o=0:o=3:o=d?0:1}return 0<=l&&0<=o&&a.push({data:e.subarray(l+r,i),fullData:e.subarray(l,i),type:c,time:n,state:o}),!a.length&&t.Dd&&(n=a.length?a[a.length-1]:t.Dd)&&(n.data=yt(n.data,e),n.fullData=yt(n.fullData,e)),t.state=o,a},f.getMetadata=function(){for(var e=[],t=g(this.l),n=t.next();!n.done;n=t.next())n=yt.apply(tn,W(n.value)),(n=op(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:wo(n.data),dts:n.dts,pts:n.pts});return e},f.fb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=g(this.i),n=t.next();!n.done;n=t.next()){var i=yt.apply(tn,W(n.value)),r=op(this,i);n=this.h.length?this.h[this.h.length-1]:null,r&&r.pts!=null&&r.dts!=null&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?(this.h.length&&r.dts<(n.dts||0)&&(e=!0),this.h.push(r)):this.h.length&&(i=r?r.data:i)&&(n=this.h.pop(),n.data=yt(n.data,i),this.h.push(n))}e&&(this.h=this.h.sort(function(o,s){var u=(o.pts||0)-(s.pts||0);return(o.dts||0)-(s.dts||0)||u}))}return this.h},f.wc=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=!1,n=g(this.j),i=n.next();!i.done;i=n.next()){var r=yt.apply(tn,W(i.value)),o=op(this,r);i=this.g.length?this.g[this.g.length-1]:null,o&&o.pts!=null&&o.dts!=null&&(!i||i.pts!=o.pts&&i.dts!=o.dts)?(this.g.length&&o.dts<(i.dts||0)&&(t=!0),this.g.push(o)):this.g.length&&(r=o?o.data:r)&&(i=this.g.pop(),i.data=yt(i.data,r),this.g.push(i))}if(e){for(n={Dd:null,state:null},i=[],r=g(this.g),o=r.next();!o.done;o=r.next())o=o.value,o.nalus=this.Zf(o,n),o.nalus.length&&(i.push(o),n.Dd=o.nalus[o.nalus.length-1]);this.g=i}t&&(this.g=this.g.sort(function(s,u){var a=(s.pts||0)-(u.pts||0);return(s.dts||0)-(u.dts||0)||a}))}return e?this.g:(e=this.g,this.g=[],e)},f.getStartTime=function(e){if(e=="audio"){e=null;var t=this.fb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.wc(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},f.od=function(){return{audio:this.A,video:this.m}},f.fe=function(){for(var e=[],t=g(this.wc()),n=t.next();!n.done;n=t.next())e.push.apply(e,W(n.value.nalus));return e},f.Oi=function(){Ue("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Mf();return{height:e.height,width:e.width}},f.Mf=function(){return this.m=="hvc"?Ux(this):jx(this)};function qm(e){var t=e.wc();return 1<t.length&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function jx(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.fe();if(!n.length||(n=n.find(function(h){return h.type==7}),!n))return t;n=new pr(n.data);var i=Ve(n),r=Ve(n),o=Ve(n);if(kn(n),Ox.includes(i)){var s=Q(n);if(s===3&&Bn(n,1),kn(n),kn(n),Bn(n,1),ie(n)){s=s!==3?8:12;for(var u=0;u<s;u++)ie(n)&&(6>u?ll(n,16):ll(n,64))}}if(kn(n),s=Q(n),s===0)Q(n);else if(s===1)for(Bn(n,1),kn(n),kn(n),s=Q(n),u=0;u<s;u++)kn(n);kn(n),Bn(n,1),s=Q(n),u=Q(n);var a=Ne(n,1);a===0&&Bn(n,1),Bn(n,1);var l=0,c=0,d=0,p=0;return ie(n)&&(l=Q(n),c=Q(n),d=Q(n),p=Q(n)),t.height=String((2-a)*(u+1)*16-2*d-2*p),t.width=String(16*(s+1)-2*l-2*c),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+o.toString(16).toUpperCase()).slice(-2),t.frameRate=qm(e),t}function Ux(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.fe();if(!n.length||(n=n.find(function(R){return R.type==33}),!n))return t;var i=new pr(n.fullData,!0);Ve(i),Ve(i),Ne(i,4);var r=Ne(i,3);ie(i);
32var o=Ne(i,2),s=Ne(i,1),u=Ne(i,5),a=Ne(i,32);n=Ve(i);for(var l=Ve(i),c=Ve(i),d=Ve(i),p=Ve(i),h=Ve(i),m=Ve(i),y=[],v=[],T=0;T<r;T++)y.push(ie(i)),v.push(ie(i));if(0<r)for(T=r;8>T;T++)Ne(i,2);for(T=0;T<r;T++)y[T]&&Ne(i,88),v[T]&&Ve(i);Q(i),r=Q(i),r==3&&Ne(i,1),y=Q(i),v=Q(i);var w=T=0,I=0,M=0;return ie(i)&&(T+=Q(i),w+=Q(i),I+=Q(i),M+=Q(i)),t.width=String(y-(T+w)*(r===1||r===2?2:1)),t.height=String(v-(I+M)*(r===1?2:1)),i=function(R){for(var A=0,E=0;32>E;E++)A|=(R>>E&1)<<31-E;return A>>>0}(a),s=s==1?"H":"L",o="hvc1"+("."+["","A","B","C"][o]+u),o+="."+i.toString(16).toUpperCase(),o+="."+s+m,h&&(o+="."+h.toString(16).toUpperCase()),p&&(o+="."+p.toString(16).toUpperCase()),d&&(o+="."+d.toString(16).toUpperCase()),c&&(o+="."+c.toString(16).toUpperCase()),l&&(o+="."+l.toString(16).toUpperCase()),n&&(o+="."+n.toString(16).toUpperCase()),t.codec=o,t.frameRate=qm(e),t}function zm(e,t){var n=1;for(e>t&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function hs(e){return!(0>sp(e))}function sp(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;n++}return-1}Y("shaka.util.TsParser",ot),ot.syncOffset=sp,ot.probe=hs,ot.prototype.getVideoInfo=ot.prototype.Mf,ot.prototype.getVideoResolution=ot.prototype.Oi,ot.prototype.getVideoNalus=ot.prototype.fe,ot.prototype.getCodecs=ot.prototype.od,ot.prototype.getStartTime=ot.prototype.getStartTime,ot.prototype.getVideoData=ot.prototype.wc,ot.prototype.getAudioData=ot.prototype.fb,ot.prototype.getMetadata=ot.prototype.getMetadata,ot.prototype.parseNalus=ot.prototype.Zf,ot.prototype.parseAvcNalus=ot.prototype.jj,ot.prototype.parse=ot.prototype.parse,ot.prototype.clearData=ot.prototype.clearData,ot.Timescale=9e4;var Ox=[100,110,122,244,44,83,86,118,128,138,139,134];function Ym(e,t,n,i){var r=this;this.g=e,this.L=n,this.A=null,this.ea=t,this.l=new Map,this.B=new Map,this.Aa=new Map,this.h=null,this.Ea=!1,this.K=i||null,this.u=new Map,this.o=new Le,this.j=new Map,this.O=null,this.H=new We,this.Ga="",this.Oa=!1,this.sa=!0,this.M=!1,this.C=this.P=null,this.i=up(this,this.H),this.za=this.G=!1,this.I=new us(function(){return Bx(r)}),this.F=!1,this.T="UNKNOWN",this.Ma=this.Na=!1,this.Fa=new We,this.m=!1,this.oa=null,this.$=new Map,this.ka=this.W=this.na=this.Z=null,this.fa=new We,this.g.remote&&(this.M=this.g.remote.state!="disconnected",this.o.D(this.g.remote,"connect",function(){r.M=r.g.remote.state!="disconnected"}),this.o.D(this.g.remote,"connecting",function(){r.M=r.g.remote.state!="disconnected"}),this.o.D(this.g.remote,"disconnect",function(){r.M=r.g.remote.state!="disconnected"}))}function up(e,t){if(e.sa=!0,j.ManagedMediaSource){e.C||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.o.D(n,"startstreaming",function(){e.sa=!0}),e.o.D(n,"endstreaming",function(){e.sa=!1})}else n=new MediaSource;return e.o.qa(n,"sourceopen",function(){URL.revokeObjectURL(e.Ga),t.resolve()}),e.o.qa(e.g,"playing",function(){e.Oa=!0}),e.Ga=dp(n),e.g.removeAttribute("src"),e.P&&e.g.removeChild(e.P),e.C&&e.g.removeChild(e.C),e.P=Xm(e.Ga),e.g.appendChild(e.P),e.C&&e.g.appendChild(e.C),e.g.load(),n}function _x(e,t,n){e.g&&j.ManagedMediaSource&&e.i&&(e.C&&e.g.removeChild(e.C),e.C=Xm(t,n),e.g.appendChild(e.C),e.g.disableRemotePlayback=!1)}function bx(e,t){var n,i,r,o,s,u,a,l,c,d,p;return C(function(h){if(h.g==1)return e.createSegmentIndex?S(h,e.createSegmentIndex(),2):h.s(2);if(!e.segmentIndex)return h.return(!1);if(e.segmentIndex.getNumReferences()==0)return h.return(!0);for(n=Mt,i=new Set,r=g(e.segmentIndex),o=r.next();!o.done;o=r.next())if(s=o.value,u=s.mimeType||e.mimeType||"",a=s.codecs||e.codecs||"",(u!=e.mimeType||a!=e.codecs)&&(l=u+":"+a,!i.has(l))){if(i.add(l),t==n.va){if(c=Tt(u,a),!ns(c))return h.return(!1)}else if(t==n.la?a=_d(a):t==n.V&&(a=hu(a,u)),d=ww(e,u,a),p=ts(u,a),!Zt(d)&&!Rr(p))return h.return(!1)}return h.return(!0)})}function Fx(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(W(or)),t={};e=g(e);for(var n=e.next();!n.done;
32n=e.next()){n=n.value,ns(n)?t[n]=!0:t[n]=Fi()?Zt(n)||!!Rr(n):Zs(n);var i=n.split(";")[0];t[i]=t[i]||t[n]}return t}f=Ym.prototype,f.destroy=function(){return this.I.destroy()};function Bx(e){var t,n,i,r,o,s,u,a,l,c,d,p,h,m,y;return C(function(v){if(v.g==1){for(t=[],n=g(e.u),i=n.next();!i.done;i=n.next())for(r=i.value,o=g(r),s=o.next().value,u=o.next().value,a=u[0],l=s,e.u.set(l,u.slice(0,1)),a&&t.push(a.p.catch(Cw)),c=g(u.slice(1)),d=c.next();!d.done;d=c.next())p=d.value,p.p.reject(new k(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),S(v,Promise.all(t),2)}for(h=g(e.j.values()),m=h.next();!m.done;m=h.next())y=m.value,y.destroy();e.o&&(e.o.release(),e.o=null),e.g&&e.C&&e.g.removeChild(e.C),e.g&&e.P&&(e.g.removeChild(e.P),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.P=null,e.C=null,e.A=null,e.i=null,e.h=null,e.ea=null,e.l.clear(),e.Aa.clear(),e.j.clear(),e.O=null,e.u.clear(),e.K=null,e.$.clear(),e.L=null,q(v)})}f.init=function(e,t,n,i){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,i=i===void 0?!1:i;var r=this,o,s,u,a,l,c;return C(function(d){switch(d.g){case 1:return o=Mt,S(d,r.H,2);case 2:if(!xo(r)&&!gs(r)){d.s(3);break}return En("Expected MediaSource to be open during init(); reopening the media source."),r.H=new We,r.i=up(r,r.H),S(d,r.H,3);case 3:r.F=t,r.T=n,r.Na=i,r.Ma=!r.F&&r.T=="HLS"&&!r.Na,r.$.clear(),r.Z=null,r.na=null,r.W=null,r.ka=null,r.fa=new We,s=g(e.keys()),u=s.next();case 5:if(u.done){d.s(7);break}return a=u.value,l=e.get(a),S(d,cl(r,a,l,l.codecs),8);case 8:r.m?(r.u.set(o.V,[]),r.u.set(o.la,[])):r.u.set(a,[]),u=s.next(),d.s(5);break;case 7:(c=e.get(o.V))&&c.isAudioMuxedInVideo&&(r.m=!0),q(d)}})};function cl(e,t,n,i){var r,o,s,u,a,l,c,d,p,h,m,y;return C(function(v){switch(v.g){case 1:return r=Mt,o=vi,s=ni,S(v,bx(n,t),2);case 2:if(s.call(o,v.h,"Type negotiation should happen before MediaSourceEngine.init!"),t==r.V&&i&&(i=hu(i,n.mimeType)),u=Tt(n.mimeType,i),t==r.va){dl(e,u,e.F,n.external),v.s(0);break}if(a=e.A.forceTransmux,(!Zt(u)||!e.F&&or.includes(u))&&(a=!0),l=ts(n.mimeType,i),!a){v.s(4);break}if(c=Mn(r.V,(i||"").split(",")),d=Mn(r.la,(i||"").split(",")),!c||!d){v.s(5);break}return e.m=!0,S(v,cl(e,r.V,n,c),6);case 6:return S(v,cl(e,r.la,n,d),7);case 7:return v.return();case 5:(p=Rr(l))&&(h=p(),e.j.set(t,h),u=h.convertCodecs(t,l));case 4:m=u+e.A.addExtraFeaturesToSourceBuffer(u),Je(e.I);try{y=e.i.addSourceBuffer(m)}catch(T){throw new k(2,3,3015,T,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.F&&(y.mode=Zx),e.o.D(y,"error",function(){var T=e.u.get(t)[0];T.p.reject(new k(2,3,3014,e.g.error?e.g.error.code:0,T.uri))}),e.o.D(y,"updateend",function(){return fr(e,t)}),e.l.set(t,y),e.B.set(t,u),e.Aa.set(t,!!n.drmInfos.length),q(v)}})}f.configure=function(e){this.A=e,this.h&&(this.h.A=e.modifyCueCallback)};function Qm(e){return e.sa&&!e.M&&!e.G}function dl(e,t,n,i){e.h||(e.h=new sr(e.ea),e.h&&(e.h.A=e.A.modifyCueCallback));var r=e.h;i=i||e.Ea,e=e.T,t=="application/cea-608"||t=="application/cea-708"?r.i=null:(r.i=du.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):Ue("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):Ue("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.B=i)}function xo(e){return e.G?!1:e.i?e.i.readyState=="ended":!0}function gs(e){return e.G?!1:e.i?e.i.readyState=="closed":!0}function ap(e,t){return e.l.size?t==Ce?e=e.h.g:(e=ms(e,t),e=!e||Au(e)?null:e.length==1&&0>e.start(0)?0:e.length?e.start(0):null):e=null,e}function Eo(e,t){return e.l.size?t==Ce?e.h.h:Zd(ms(e,t)):null}function Vx(e,t,n){return t==Ce?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=ms(e,t),Hm(e,n))}f.Fb=function(){var e={total:this.G?[]:dr(this.g.buffered),audio:dr(ms(this,"audio")),video:dr(ms(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function ms(e,t){if(e.G||e.M)return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function Hx(e,t,n,i,r,o){var s=null,u=[],a=he(n);if(or.includes(o))t=wo(a),t.length&&i&&((n=t.find(function(h){return h.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=Math.round(n.data)/1e3),e.L.onMetadata([{cueTime:i.startTime,data:a,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(o.includes("/mp4")&&i&&i.Y&&i.Y.timescale){var l=i.Y.timescale;if(!isNaN(l)){var c=r.emsgSchemeIdUris!=null&&0<r.emsgSchemeIdUris.length||e.A.dispatchAllEmsgBoxes,d=0,p=!1;a=new ze,c&&a.R("emsg",function(h){var m=r.emsgSchemeIdUris;if(h.version===0)var y=h.reader.Cc(),v=h.reader.Cc(),T=h.reader.S(),w=h.reader.S(),I=h.reader.S(),M=h.reader.S(),R=i.startTime+w/T;else T=h.reader.S(),R=h.reader.bd()/T+i.timestampOffset,w=R-i.startTime,I=h.reader.S(),M=h.reader.S(),y=h.reader.Cc(),v=h.reader.Cc();h=h.reader.Db(h.reader.getLength()-h.reader.Ba()),(m&&m.includes(y)||e.A.dispatchAllEmsgBoxes)&&(y=="urn:mpeg:dash:event:2012"?e.L.ij():(m=R+I/T,T={startTime:R,endTime:m,schemeIdUri:y,value:v,timescale:T,presentationTimeDelta:w,eventDuration:I,id:M,messageData:h},M=new Map().set("detail",T),new z("emsg",M).cancelable=!0,e.L.gj(T),(y=="https://aomedia.org/emsg/ID3"||y=="https://developer.apple.com/streaming/emsg-id3")&&(y=wo(h),y.length&&e.L.onMetadata([{cueTime:R,data:h,frames:y,dts:R,pts:R}],0,m))))}),a.R("prft",function(h){var m=h.reader,y=h.version;m.S(),h=m.S();var v=m.S();h=1e3*h+v/Math.pow(2,32)*1e3,y===0?m=m.S():(y=m.S(),m=m.S(),m=y*Math.pow(2,32)+m),h=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+h).getTime(),m=new Map().set("detail",{wallClockTime:h,programStartDate:new Date(h-m/l*1e3)}),m=new z("prft",m),e.L.onEvent(m)}).box("moof",ye).box("traf",ye).R("tfdt",function(h){p||(d=il(h.reader,h.version).baseMediaDecodeTime/l,p=!0,c||h.parser.stop())}).parse(n,!0),p&&i.timestampOffset==0&&(s=d)}}else o.includes("/mp4")||o.includes("/webm")||!hs(a)||(e.$.has(t)?e.$.get(t).clearData():e.$.set(t,new ot),u=e.$.get(t).parse(a),a=u.getStartTime(t),a!=null&&(s=a),u=u.getMetadata());return{timestamp:s,metadata:u}}function pl(e,t,n,i,r,o,s,u,a,l){s=s===void 0?!1:s,u=u===void 0?!1:u,a=a===void 0?!1:a,l=l===void 0?!1:l;var c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O;return C(function(L){switch(L.g){case 1:if(c=Mt,t!=c.va){L.s(2);break}if(e.T!="HLS"){L.s(3);break}return S(L,e.Fa,4);case 4:d=L.h,e.h.u=d;case 3:return S(L,Ew(e.h,n,i?i.startTime:null,i?i.endTime:null,i?i.N()[0]:null),5);case 5:return L.return();case 2:if(l||!e.m){L.s(6);break}return S(L,pl(e,c.V,n,i,r,o,s,u,a,!0),7);case 7:return S(L,pl(e,c.la,n,i,r,o,s,u,a,!0),8);case 8:return L.return();case 6:if(!e.l.has(t))return L.return();if(p=e.l.get(t).timestampOffset,h=e.B.get(t),e.j.has(t)&&(h=e.j.get(t).getOriginalMimeType()),i&&(m=Hx(e,t,n,i,r,h),y=m.timestamp,v=m.metadata,y!=null&&(e.Z==null&&t==c.la&&(e.Z=y,e.na=i.startTime,e.W!=null&&(T=0,e.na==e.ka&&(T=e.Z-e.W),e.fa.resolve(T))),e.W==null&&t==c.V&&(e.W=y,e.ka=i.startTime,e.Z!=null&&(w=0,e.na==e.ka&&(w=e.Z-e.W),e.fa.resolve(w))),I=y,M=or,!e.F&&M.includes(e.B.get(t))&&(I=0),R=i.startTime-
32I,A=Math.abs(p-R),(.001<=A||s||u)&&(!a||0<R||!p)&&(p=R,e.Ma&&(Xt(e,t,function(){return vs(e,t)},null),Xt(e,t,function(){return ys(e,t,p)},null))),(t==c.la||!e.l.has(c.la))&&e.Fa.resolve(p)),v.length)&&e.L.onMetadata(v,p,i?i.endTime:null),o&&t==c.la&&(e.h||dl(e,"application/cea-608",e.F,!1),e.O||(E=h.split(";",1)[0],e.O=new Kn(E)),i?(D=e.O.i(n),D.length&&Iw(e.h,D,i.startTime,i.endTime,p)):e.O.init(n,u)),!e.j.has(t)){L.s(9);break}return S(L,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=L.h;case 9:if(n=zx(e,r,n,i,t),!i||!e.F||t==c.va){L.s(11);break}if(!s&&!u){L.s(11);break}if(P=i.startTime,e.T!="HLS"||e.m||t!=c.V||!e.l.has(c.la)){L.s(13);break}return S(L,e.fa,14);case 14:O=L.h,.15<Math.abs(O)&&(P-=O);case 13:Xt(e,t,function(){return vs(e,t)},null),Xt(e,t,function(){return ys(e,t,P)},null);case 11:return S(L,Xt(e,t,function(){var U=n;e.K&&hd(e.K,U,p,r),e.l.get(t).appendBuffer(U)},i?i.N()[0]:null),15);case 15:q(L)}})}function Gx(e,t){var n=Eo(e,"video")||0;bg(e.h,t,n)}function Xx(e){e.h&&bg(e.h,"",0)}f.remove=function(e,t,n){var i=this,r;return C(function(o){return o.g==1?(r=Mt,e==r.va?S(o,i.h.remove(t,n),0):n>t?S(o,Xt(i,e,function(){return fl(i,e,t,n)},null),5):o.s(0)):i.m?S(o,Xt(i,r.V,function(){return fl(i,r.V,t,n)},null),0):o.s(0)})};function $m(e,t){var n;return C(function(i){return i.g==1?(n=Mt,t==n.va?e.h?S(i,e.h.remove(0,1/0),0):i.return():S(i,Xt(e,t,function(){return fl(e,t,0,e.i.duration)},null),4)):e.m?S(i,Xt(e,n.V,function(){return fl(e,n.V,0,e.i.duration)},null),0):i.s(0)})}f.flush=function(e){var t=this,n;return C(function(i){return i.g==1?(n=Mt,e==n.va?i.return():S(i,Xt(t,e,function(){t.g.currentTime-=.001,fr(t,e)},null),2)):t.m?S(i,Xt(t,n.V,function(){var r=n.V;t.g.currentTime-=.001,fr(t,r)},null),0):i.s(0)})};function Kx(e,t,n,i,r,o,s,u,a){var l,c,d;return C(function(p){return p.g==1?(l=Mt,t==l.va?(o||(e.h.u=n),Aw(e.h,i,r),p.return()):(c=[],S(p,$x(e,t,s,u,a),2))):(d=p.h,d||(c.push(Xt(e,t,function(){return vs(e,t)},null)),e.m&&c.push(Xt(e,l.V,function(){return vs(e,l.V)},null))),o||(c.push(Xt(e,t,function(){return ys(e,t,n)},null)),e.m&&c.push(Xt(e,l.V,function(){return ys(e,l.V,n)},null))),(i!=0||r!=1/0)&&(c.push(Xt(e,t,function(){var h=e.l.get(t);h.appendWindowStart=0,h.appendWindowEnd=r,h.appendWindowStart=i,fr(e,t)},null)),e.m&&c.push(Xt(e,l.V,function(){var h=l.V,m=e.l.get(h);m.appendWindowStart=0,m.appendWindowEnd=r,m.appendWindowStart=i,fr(e,h)},null))),c.length?S(p,Promise.all(c),0):p.s(0))})}function Wx(e,t,n){var i,r;return C(function(o){return o.g==1?(i=Mt,t==i.va||(t==i.la&&(e.Fa=new We),!e.F||(r=Eo(e,t))&&.1>Math.abs(r-n))?o.return():(Xt(e,t,function(){return vs(e,t)},null),e.m&&Xt(e,i.V,function(){return vs(e,i.V)},null),S(o,Xt(e,t,function(){return ys(e,t,n)},null),2))):e.m?S(o,Xt(e,i.V,function(){return ys(e,i.V,n)},null),0):o.s(0)})}f.endOfStream=function(e){var t=this;return C(function(n){return S(n,Iu(t,function(){xo(t)||gs(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},f.bb=function(e){var t=this;return C(function(n){return S(n,Iu(t,function(){if(e<t.i.duration)for(var i=g(t.l.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var o={start:function(){},p:new We,uri:null};t.u.get(r).unshift(o)}t.i.duration=e,t.oa=e}),0)})},f.getDuration=function(){return this.i.duration};function qx(e,t,n){C(function(i){return e.I.g||e.M||e.G||xo(e)||gs(e)?i.return():S(i,Iu(e,function(){xo(e)||gs(e)||e.i.setLiveSeekableRange(t,n)}),0)})}function lp(e){C(function(t){return e.I.g||e.M||e.G||xo(e)||gs(e)?t.return():S(t,Iu(e,function(){xo(e)||gs(e)||e.i.clearLiveSeekableRange()}),0)})}function fl(e,t,n,i){i<=n?fr(e,t):e.l.get(t).remove(n,i)}function vs(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,fr(e,t)}function ys(e,t,n){0>n&&(n+=.001);var i=!0;e.T=="HLS"&&(i=Eo(e,t),i=!i||.15<Math.abs(i-n)),i&&(e.l.get(t).timestampOffset=n),fr(e,t)}function fr(e,t){if(!e.G){var n=e.u.get(t)[0];n&&(n.p.resolve(),cp(e,t))}}function Xt(e,t,n,i){return Je(e.I),n={start:n,p:new We,uri:i},e.u.get(t).push(n),e.u.get(t).length==1&&Jm(e,t),n.p}function Iu(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m;return C(function(y){switch(y.g){case 1:for(Je(e.I),n=[],i=Array.from(e.l.keys()),r=g(i),o=r.next(),s={};!o.done;s={ready:void 0},o=r.next())u=o.value,s.ready=new We,a={start:function(v){return function(){return v.ready.resolve()}}(s),p:s.ready,uri:null},l=e.u.get(u),l.push(a),n.push(s.ready),l.length==1&&a.start();return ee(y,2),S(y,Promise.all(n),4);case 4:fe(y,3);break;case 2:throw c=re(y),c;case 3:return ee(y,5,6),S(y,t(),6);case 6:for(qt(y),d=g(i),p=d.next();!p.done;p=d.next())h=p.value,cp(e,h);jt(y,0);break;case 5:throw m=re(y),new k(2,3,3015,m,e.g.error||"No error in the media element",null)}})}function cp(e,t){e.u.get(t).shift(),Jm(e,t)}function Jm(e,t){var n=e.u.get(t)[0];if(n)try{n.start()}catch(i){i.name=="QuotaExceededError"?n.p.reject(new k(2,3,3017,t)):Qm(e)?n.p.reject(new k(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new k(2,3,3024,t)),cp(e,t)}}function zx(e,t,n,i,r){if(Ha(e.B.get(r))!="mp4")return n;var o=i===null,s=e.Aa.get(r),u=e.L.ui(),a=!1;return i&&i.Y&&(a=i.Y.encrypted),i=i?i.N()[0]:null,e.A.correctEc3Enca&&o&&r==="audio"&&(n=Ix(n)),(e=e.A.insertFakeEncryptionInInit&&s)&&(u=ud(u),e=Jt()&&r==="audio"||Bi()||ki()||xt("SOPOpenBrowser")||Go()&&Na()&&u),e&&(o?n=Mx(t,n,i):((t=!a)&&(t=Jt()&&r==="audio"),t&&(n=Cx(n)))),o&&$i()&&(n=Px(n)),n}function Yx(e,t,n,i){return Xt(e,t,function(){if(t!==Ce){if(e.B.get(t),io()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),i&&e.j.set(t,i);var r=n+e.A.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(r),e.B.set(t,n)}fr(e,t)}},null)}function Qx(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R;return C(function(A){switch(A.g){case 1:if(e.G)return A.return();for(n=Mt,e.G=!0,e.m=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.za=!0),e.Oa&&(e.g.autoplay=!1),It(A,2),e.o.Ra(),o=g(e.j.values()),s=o.next();!s.done;s=o.next())u=s.value,u.destroy();for(a=g(e.l.values()),l=a.next();!l.done;l=a.next()){c=l.value;try{e.i.removeSourceBuffer(c)}catch{}}return e.j.clear(),e.l.clear(),d=e.i.duration,e.H=new We,e.i=up(e,e.H),S(A,e.H,4);case 4:!isNaN(d)&&d?e.i.duration=d:!isNaN(e.oa)&&e.oa&&(e.i.duration=e.oa),p=new We,h=e.i.sourceBuffers,m=t.size,y=0,v=function(){y++,y===m&&(p.resolve(),e.o.Ka(h,"addsourcebuffer",v))},e.o.D(h,"addsourcebuffer",v),T=g(t.keys()),w=T.next();case 5:return w.done?((R=t.get(n.V))&&R.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.u.has(n.V)&&e.u.set(n.V,[]),e.g.currentTime=i,S(A,p,2)):(I=w.value,M=t.get(I),S(A,cl(e,I,M,M.codecs),6));case 6:w=T.next(),A.s(5);break;case 2:qt(A),e.G=!1,Je(e.I),e.o.qa(e.g,"canplaythrough",function(){e.I.g||(e.g.autoplay=r,e.za&&(e.za=!1,e.g.play()))}),jt(A,0)}})}function Zm(e,t){return Iu(e,function(){return Qx(e,t)})}function ev(e,t,n,i){var r=!1,o=Mn("audio",(i||"").split(",")),s=Mn("video",(i||"").split(",")),u=s;t=="audio"&&(u=o),u||(u=i),i=Tt(n,u);var a=e.A.forceTransmux;if((!Zt(i)||!e.F&&or.includes(i))&&(a=!0),a&&(e=ts(n,u),n=Rr(e))){var l=n();o&&s&&(r=!0),i=l.convertCodecs(t,e)}return t=nn(_n(i)),{wg:l,Hj:r,Gg:On(i),codec:t,mimeType:i}}function $x(e,t,n,i,r){var o,s,u,a,l,c,d,p,h,m,y,v,T,w;return C(function(I){return I.g==1?(o=Mt,t==o.va?I.return(!1):(s=nn(_n(e.B.get(t))),u=On(e.B.get(t)),a=ev(e,t,n,i),l=a.wg,c=a.Hj,d=a.Gg,p=a.codec,h=a.mimeType,m=!0,
32c&&e.B.has(o.V)&&(y=ev(e,o.V,n,i),v=nn(_n(e.B.get(o.V))),T=On(e.B.get(o.V)),m=v==y.codec&&T==y.Gg,y.wg&&y.wg.destroy()),s===p&&u===d&&m?(e.j.has(t)&&!l?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&l?e.j.set(t,l):l&&(e.j.has(t)&&e.j.get(t).transmux!=l.transmux?(e.j.get(t).destroy(),e.j.delete(t),e.j.set(t,l)):l.destroy()),I.return(!1)):(w=!0,(e.m||c&&l&&!e.j.has(t))&&(w=!1),w&&e.A.codecSwitchingStrategy==="smooth"&&io()?S(I,Yx(e,t,h,l),3):(l&&l.destroy(),S(I,Zm(e,r),3))))):I.return(!0)})}function Jx(e,t,n,i){if(t==Ce)var r=!1;else{r=nn(_n(e.B.get(t)));var o=On(e.B.get(t)),s=Tt(n,i),u=e.A.forceTransmux;(!Zt(s)||!e.F&&or.includes(s))&&(u=!0),n=ts(n,i),u&&(u=Rr(n))&&(u=u(),s=u.convertCodecs(t,n),u.destroy()),t=nn(_n(s)),s=On(s),r=r!==t||o!==s}return r?e.A.codecSwitchingStrategy!=="smooth"||!io()||e.m:!1}var dp=j.URL.createObjectURL,Zx="sequence";function se(e,t,n){this.i=e,this.C=t,this.o=this.l=1/0,this.h=1,this.g=this.j=null,this.A=0,this.B=!0,this.I=!1,this.H=0,this.F=n===void 0?!0:n,this.G=0,this.u=!1,this.m=e}f=se.prototype,f.getDuration=function(){return this.l},f.xi=function(){return this.h},f.zh=function(e){this.i=e},f.bb=function(e){this.l=e},f.Di=function(){return this.i},f.xh=function(e){this.A=e},f.Gc=function(e){e&&!this.B&&(this.I=!0),this.B=e},f.Fe=function(e){this.o=e},f.ee=function(){return this.o},f.lg=function(e){this.C=e},f.ni=function(){return this.C},f.lh=function(e,t){if(e.length!=0){var n=(Date.now()+this.A)/1e3;if(e=e.filter(function(r){return r.start+t<n}),e.length!=0){var i=e[e.length-1].end+t;this.re(e[0].start+t),this.h=e.reduce(function(r,o){return Math.max(r,o.end-o.start)},this.h),this.g=Math.max(this.g,i),this.i!=null&&this.F&&!this.u&&(this.i=n-this.g-this.h)}}},f.Ed=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.A)/1e3;e=g(e);for(var r=e.next();!r.done;r=e.next())r=r.value,i<r.startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.h=Math.max(this.h,r.endTime-r.startTime));this.re(t),this.g=Math.max(this.g,n),this.i!=null&&this.F&&!this.u&&(this.i=i-this.g-this.h)}},f.kh=function(e,t){this.re(e),t==1/0||this.U()||(this.g=Math.max(this.g,t))},f.yi=function(){return this.g},f.me=function(){this.u=!0},f.Yi=function(){return this.u},f.yh=function(e){this.m=e},f.ti=function(){return this.m},f.re=function(e){this.j==null?this.j=e:this.I||(this.j=Math.min(this.j,e))},f.Vf=function(e){this.h=Math.max(this.h,e)},f.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},f.U=function(){return this.l==1/0&&!this.B},f.yc=function(){return this.l!=1/0&&!this.B},f.pb=function(){return Math.max(this.H,this.cc()-this.o)},f.Ch=function(e){this.H=e},f.cc=function(){return this.U()||this.yc()?Math.min(Math.max(0,(Date.now()+this.A)/1e3-this.h-this.i)+this.G,this.l):this.g?Math.min(this.g,this.l):this.l},f.qd=function(e){var t=Math.max(this.j,this.H);return this.o==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.cc()-this.o+e,this.ob()))},f.Hb=function(){return this.qd(0)},f.ob=function(){return Math.max(0,this.cc()-(this.U()||this.yc()?this.C:0))},f.Lh=function(){return!(this.i==null||this.g!=null&&this.F)},f.wh=function(e){this.G=e},f.ji=function(){return this.G},Y("shaka.media.PresentationTimeline",se),se.prototype.getAvailabilityTimeOffset=se.prototype.ji,se.prototype.setAvailabilityTimeOffset=se.prototype.wh,se.prototype.usingPresentationStartTime=se.prototype.Lh,se.prototype.getSeekRangeEnd=se.prototype.ob,se.prototype.getSeekRangeStart=se.prototype.Hb,se.prototype.getSafeSeekRangeStart=se.prototype.qd,se.prototype.getSegmentAvailabilityEnd=se.prototype.cc,se.prototype.setUserSeekStart=se.prototype.Ch,se.prototype.getSegmentAvailabilityStart=se.prototype.pb,se.prototype.isInProgress=se.prototype.yc,se.prototype.isLive=se.prototype.U,se.prototype.offset=se.prototype.offset,se.prototype.notifyMaxSegmentDuration=se.prototype.Vf,se.prototype.notifyMinSegmentStartTime=se.prototype.re,se.prototype.getInitialProgramDateTime=se.prototype.ti,se.prototype.setInitialProgramDateTime=se.prototype.yh,se.prototype.isStartTimeLocked=se.prototype.Yi,se.prototype.lockStartTime=se.prototype.me,se.prototype.getMaxSegmentEndTime=se.prototype.yi,se.prototype.notifyPeriodDuration=se.prototype.kh,se.prototype.notifySegments=se.prototype.Ed,se.prototype.notifyTimeRange=se.prototype.lh,se.prototype.getDelay=se.prototype.ni,se.prototype.setDelay=se.prototype.lg,se.prototype.getSegmentAvailabilityDuration=se.prototype.ee,se.prototype.setSegmentAvailabilityDuration=se.prototype.Fe,se.prototype.setStatic=se.prototype.Gc,se.prototype.setClockOffset=se.prototype.xh,se.prototype.getPresentationStartTime=se.prototype.Di,se.prototype.setDuration=se.prototype.bb,se.prototype.setPresentationStartTime=se.prototype.zh,se.prototype.getMaxSegmentDuration=se.prototype.xi,se.prototype.getDuration=se.prototype.getDuration;function pp(e,t,n,i){var r=this;this.u=i,this.g=e,this.B=t,this.h=n,this.o=new Le,this.l=!1,this.F=e.readyState,this.G=this.C=this.j=0,this.m=eE(this),this.A=!1,this.o.D(e,"waiting",function(){return Mu(r)}),this.i=new ke(function(){Mu(r)}).ua(this.h.gapJumpTimerTime)}pp.prototype.release=function(){this.o&&(this.o.release(),this.o=null),this.i!=null&&(this.i.stop(),this.i=null),this.m&&(this.m.release(),this.m=null),this.g=this.B=this.u=null},pp.prototype.ue=function(){this.A=!0,this.i&&this.i.ua(this.h.gapJumpTimerTime),Mu(this)};function Mu(e){if(e.g.readyState!=0){if(e.g.seeking){if(!e.l)return}else e.l=!1;if(!e.g.paused||e.g.currentTime==e.j&&(e.g.autoplay||e.g.currentTime!=e.j)){e.g.readyState!=e.F&&(e.F=e.g.readyState);var t;if(!(t=!e.m)){t=e.m;var n=t.j,i=nv(n),r=n.g.currentTime,o=Date.now()/1e3;(t.g!=r||t.m!=i)&&(t.l=o,t.g=r,t.m=i,t.h=!1),r=o-t.l,(i=r>=t.o&&i&&!t.h)&&(t.i&&t.i(t.g,r),t.h=!0,t.g=n.g.currentTime),t=!i}t&&(t=e.g.currentTime,n=e.g.buffered,i=Rx(n,t,e.h.gapDetectionThreshold),i==null||i==0&&!e.A||(r=n.start(i),(o=e.h.gapPadding)&&(r=Math.ceil(100*(r+o))/100),r>=e.B.ob()||.001>r-t||(i!=0&&n.end(i-1),e.g.currentTime=r,t==e.j&&(e.j=r),e.C++,e.u(new z("gapjumped")))))}}}function eE(e){if(!e.h.stallEnabled)return null;var t=e.h.stallSkip;return new tv(new tE(e.g),e.h.stallThreshold,function(){var n;return C(function(i){if(i.g==1)return n=dr(e.g.buffered),n.length?t?(e.g.currentTime+=t,i.s(2)):S(i,e.g.play(),3):i.return();if(i.g!=2){if(!e.g)return i.return();e.g.pause(),e.g.play()}e.G++,e.u(new z("stalldetected")),q(i)})})}function tv(e,t,n){this.j=e,this.m=nv(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.o=t,this.i=n}tv.prototype.release=function(){this.i=this.j=null};function tE(e){this.g=e}function nv(e){if(e.g.paused||e.g.playbackRate==0||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=g(dr(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function Ts(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?i():(t=nE.value().get(t),n.qa(e,t,i))}var nE=new $s(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function iv(e,t,n,i){var r=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return r.l==null&&(r.l=i()),r.l},this.o=!1,this.h=new Le,this.i=new uv(e),Ts(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){ov(r,r.j())})}iv.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function fp(e){return e.o?e.g.currentTime:e.j()}function rv(e,t){0<e.g.readyState?av(e.i,t):Ts(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){ov(e,e.j())})}function ov(e,t){.001>Math.abs(e.g.currentTime-t)?sv(e):(e.h.qa(e.g,"seeking",function(){sv(e)}),av(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function sv(e){e.o=!0,e.h.D(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function uv(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new ke(function(){0>=t.i||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}uv.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function av(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.ua(.1)}function lv(e){this.h=e,this.j=!1,this.g=null,this.i=new Le}f=lv.prototype,f.ready=function(){function e(){if(t.g==null||t.g==0&&t.h.duration!=1/0)t.j=!0;else{var n=t.h.currentTime,i=t.g;0>t.g&&(i=Math.max(0,n+t.g)),n!=i?(t.i.qa(t.h,"seeking",function(){t.j=!0}),t.h.currentTime=i):t.j=!0}}var t=this;Ts(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){e()})},f.release=function(){this.i&&(this.i.release(),this.i=null),this.h=null},f.cf=function(e){this.g=this.j?this.g:e},f.Rd=function(){return(this.j?this.h.currentTime:this.g)||0},f.Cg=function(){return 0},f.Bg=function(){return 0},f.jh=function(){};function cv(e,t,n,i,r,o){var s=this;this.i=e,this.g=t.presentationTimeline,this.l=n,this.u=r,this.o=null,this.j=new pp(e,t.presentationTimeline,n,o),this.h=new iv(e,function(){e:{var u=s.j;u.l=!0,u.A=!1,u.i&&u.i.ua(u.h.gapJumpTimerTime),Mu(u);var a=fp(s.h);
32if(u=pv(s,a),!yg()&&.001<Math.abs(u-a)){if(a=!1,!Ti()||Ti()&&Mr())a=!0;else{var l=Date.now()/1e3,c=Ti()&&ad()?3:1;(!s.o||s.o<l-c)&&(s.o=l,a=!0)}if(a){rv(s.h,u),u=void 0;break e}}s.u(),u=void 0}return u},function(u){var a=s.j;a.g.seeking&&!a.l&&(a.l=!0,a.j=u),a.i&&a.i.ua(a.h.gapJumpTimerTime),Mu(a)},function(){var u=i;return u==null?u=1/0>s.g.getDuration()?s.g.Hb():s.g.ob():0>u&&(u=s.g.ob()+u),dv(s,fv(s,u))}),this.m=new ke(function(){if(s.i.readyState!=0&&!s.i.paused){var u=fp(s.h),a=s.g.Hb(),l=s.g.ob();3>l-a&&(a=l-3),u<a&&(u=pv(s,u),s.i.currentTime=u)}})}f=cv.prototype,f.ready=function(){this.m.ua(.25)},f.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.u=function(){}},f.cf=function(e){rv(this.h,e)},f.Rd=function(){var e=fp(this.h);return 0<this.i.readyState&&!this.i.paused?fv(this,e):e},f.Cg=function(){return this.j.G},f.Bg=function(){return this.j.C},f.jh=function(){this.j.ue()};function dv(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function pv(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Hb(),o=e.g.ob(),s=e.g.getDuration();3>o-r&&(r=o-3);var u=e.g.qd(n),a=e.g.qd(i);return n=e.g.qd(n+i),t>=s?dv(e,t):t>o?o-e.l.safeSeekEndOffset:t<r?ep(e.i.buffered,a)?a:n:t>=u||ep(e.i.buffered,t)?t:n}function fv(e,t){var n=e.g.Hb();return t<n?n:(e=e.g.ob(),t>e?e:t)}function Oe(e){this.g=e,this.m=null,this.i=0,this.o=!1}f=Oe.prototype,f.getNumReferences=function(){return this.g.length},f.getNumEvicted=function(){return this.i},f.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},f.dj=function(){this.o=!0},f.xb=function(e){for(var t=g(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function Ni(e){return e.g[0]||null}f.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var i=this.g[n],r=n<t?this.g[n+1].startTime:i.endTime;if(e>=i.startTime&&e<r)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},f.get=function(e){return this.g.length==0?null:(e-=this.i,0>e||e>=this.g.length?null:this.g[e])},f.offset=function(e){if(!this.o)for(var t=g(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},f.oe=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(n){return Math.round(1e3*n.startTime)/1e3<t}),this.g.push.apply(this.g,W(e))}},f.Bd=function(e,t){var n=this;e=e.filter(function(i){return i.endTime>t&&(n.g.length==0||i.endTime>n.g[0].startTime)}),this.oe(e),this.Pa(t)},f.Pa=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(n){return n.endTime>e}),this.i+=t-this.g.length}},f.Oc=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;this.g.length!=0&&(e=this.g[this.g.length-1],t=new oe(e.startTime,t,e.C,e.Sa,e.xa,e.Y,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey),t.mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},f.Le=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new ke(function(){var i=t();i?n.g.push.apply(n.g,W(i)):(n.m.stop(),n.m=null)}),this.m.ua(e))},Oe.prototype[Symbol.iterator]=function(){return this.Gb(0)},Oe.prototype.Gb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var i=this.find(e);if(i==null)return null;var r=this.get(i);n?i++:i--;var o=-1;if(r&&0<r.g.length)for(var s=r.g.length-1;0<=s;--s){var u=r.g[s];if(e>=u.startTime&&e<u.endTime){if(!t){for(;s&&!u.l;)s--,u=r.g[s];if(!u.l)return En("No independent partial segment found!"),null}n?i--:i++,o=s-1;break}}return new si(this,i,o,n)};function hl(e,t,n){return e=new oe(e,e+t,function(){return n},0,null,null,e,e,e+t),new Oe([e])}Y("shaka.media.SegmentIndex",Oe),Oe.forSingleSegment=hl,Oe.prototype.getIteratorForTime=Oe.prototype.Gb,Oe.prototype.updateEvery=Oe.prototype.Le,Oe.prototype.fit=Oe.prototype.Oc,Oe.prototype.evict=Oe.prototype.Pa,Oe.prototype.mergeAndEvict=Oe.prototype.Bd,Oe.prototype.offset=Oe.prototype.offset,Oe.prototype.get=Oe.prototype.get,Oe.prototype.find=Oe.prototype.find,Oe.prototype.markImmutable=Oe.prototype.dj,Oe.prototype.release=Oe.prototype.release,Oe.prototype.getNumEvicted=Oe.prototype.getNumEvicted,Oe.prototype.getNumReferences=Oe.prototype.getNumReferences;function si(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}f=si.prototype,f.ed=function(e){this.reverse=e},f.ei=function(){return this.h},f.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.A&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},f.next=function(){var e=this.i.get(this.h);return this.reverse?e&&0<e.g.length?(this.g--,0>this.g&&(this.h--,this.g=(e=this.i.get(this.h))&&0<e.g.length?e.g.length-1:0)):(this.h--,this.g=0):e&&0<e.g.length?(this.g++,e.A&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},f.fg=function(){var e=this.current();if(e.o&&!e.l&&(e=this.i.get(this.h))&&0<e.g.length)for(var t=e.g[this.g];t.l&&!(0>=this.g);)this.g--,t=e.g[this.g]},Y("shaka.media.SegmentIterator",si),si.prototype.resetToLastIndependent=si.prototype.fg,si.prototype.next=si.prototype.next,si.prototype.current=si.prototype.current,si.prototype.currentPosition=si.prototype.ei,si.prototype.setReverse=si.prototype.ed;function ft(){Oe.call(this,[]),this.h=[]}ct(ft,Oe),f=ft.prototype,f.clone=function(){var e=new ft;
32return e.h=this.h.slice(),e.i=this.i,e},f.release=function(){for(var e=g(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},f.xb=function(e){for(var t=g(this.h),n=t.next();!n.done;n=t.next())n.value.xb(e)},f.find=function(e){for(var t=this.i,n=g(this.h),i=n.next();!i.done;i=n.next()){i=i.value;var r=i.find(e);if(r!=null)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null},f.get=function(e){for(var t=this.i,n=g(this.h),i=n.next();!i.done;i=n.next()){i=i.value;var r=i.get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},f.offset=function(){},f.oe=function(){},f.Pa=function(e){for(var t=g(this.h),n=t.next();!n.done;n=t.next())n.value.Pa(e);for(;1<this.h.length&&this.h[0].getNumReferences()==0;)e=this.h.shift(),this.i+=e.getNumEvicted(),e.release()},f.Bd=function(){},f.Oc=function(){},f.Le=function(){},Y("shaka.media.MetaSegmentIndex",ft),ft.prototype.updateEvery=ft.prototype.Le,ft.prototype.fit=ft.prototype.Oc,ft.prototype.mergeAndEvict=ft.prototype.Bd,ft.prototype.evict=ft.prototype.Pa,ft.prototype.merge=ft.prototype.oe,ft.prototype.offset=ft.prototype.offset,ft.prototype.get=ft.prototype.get,ft.prototype.find=ft.prototype.find,ft.prototype.forEachTopLevelReference=ft.prototype.xb,ft.prototype.release=ft.prototype.release;function Cu(e){var t=this;this.g=e,this.j=!1,this.i=this.g.de(),this.h=new ke(function(){t.g.hh(.25*t.i)})}Cu.prototype.release=function(){this.set(this.sc()),this.h&&(this.h.stop(),this.h=null),this.g=null},Cu.prototype.set=function(e){this.i=e,hp(this)},Cu.prototype.sc=function(){return this.g.sc()};function hp(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{e.g.de()!=t&&e.g.og(t);return}catch{}e.h.ua(.25),e.g.de()!=0&&e.g.og(0)}function gp(e){var t=this;this.j=e,this.h=new Le,this.g=new Set,this.i=new ke(function(){hv(t,!1)}).sb(),e.paused||this.i.ua(.25),this.h.D(e,"playing",function(){t.i.sb().ua(.25)}),this.h.D(e,"pause",function(){t.i.stop()})}gp.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=g(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function hv(e,t){var n=e.j.currentTime;e=g(e.g);for(var i=e.next();!i.done;i=e.next())i.value.j(n,t)}function gl(e){qe.call(this),this.g=new Map,this.h=e}ct(gl,qe),gl.prototype.release=function(){this.g.clear(),qe.prototype.release.call(this)};function iE(e,t){var n=e.g.get(t);return n||(n={Kd:[],pf:null,contentType:t},e.g.set(t,n)),n}function rE(e,t,n){var i=iE(e,t.contentType);oE(e,i),e={Wc:t,position:n},i=i.Kd,t=i.findIndex(function(r){return r.position>=n}),0<=t?i.splice(t,i[t].position==n?1:0,e):i.push(e)}gl.prototype.j=function(e){for(var t=g(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var i=n.pf;e:{for(var r=n.Kd,o=r.length-1;0<=o;o--){var s=r[o];if(s.position<=e){r=s.Wc;break e}}r=null}o=r&&!(i===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width),s=r&&i&&r.label&&i.label&&i.label!==r.label;var u=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!Yo(i.roles,r.roles),(s||u||i)&&gv(this,e,r.contentType)&&(n.pf=r,i=new z("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),o&&gv(this,e,r.contentType)&&(n.pf=r,JSON.stringify(r),n=new z("qual
32itychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}};function gv(e,t,n){return!!((e=e.h()[n])&&0<e.length&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function oE(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,i=e[e.length-1].end,r=t.Kd;t.Kd=r.filter(function(o,s){return!(o.position<=n&&s+1<r.length&&r[s+1].position<=n||o.position>=i)})}else t.Kd=[]}function ml(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function ku(e){qe.call(this),this.h=new Map,this.i=e,this.g=null}ct(ku,qe),ku.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),qe.prototype.release.call(this)};function mp(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+(t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1));e.h.has(n)||(e.h.set(n,t),t=new z("regionadd",new Map([["region",t]])),e.dispatchEvent(t),sE(e))}function sE(e){e.g||(e.g=new ke(function(){for(var t=e.i(),n=g(e.h),i=n.next();!i.done;i=n.next()){var r=g(i.value);i=r.next().value,r=r.next().value,r.endTime<t.start&&(e.h.delete(i),i=new z("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).ua(2))}function vl(e,t,n,i){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.o=i}function uE(e,t){e.l=t,e=g(e.h.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function Du(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Gb(t,!0,e.o)),!e.g))return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value,!!n);){var i=!0;n.isPreload()&&n.xa!=null&&(i=!1),n.dc()==2&&(i=!1),n.Ib(!1)&&(i=!1),i&&n.Y&&t.push(mv(e,n.Y)),i&&!e.h.has(n)&&(i=new yp(e.l),t.push(Tv(i,n,e.i)),e.h.set(n,i))}return vp(e),Promise.all(t)}function mv(e,t){if(!e.i.segmentIndex||t.Ib()||Array.from(e.j.keys()).some(function(r){return al(r,t)}))return Promise.resolve();var n=new yp(e.l),i=Tv(n,t,e.i);return e.j.set(t,n),i}function vv(e,t){t=g(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&Pu(e,n)}function ji(e){vv(e,e.h),vv(e,e.j),e.g=null}vl.prototype.Pa=function(e,t){t=t===void 0?!1:t;for(var n=g(this.h.keys()),i=n.next();!i.done;i=n.next())i=i.value,e>i.endTime&&Pu(this,i);t&&vp(this)},vl.prototype.ed=function(e){this.o=e,this.g&&this.g.ed(e)};function vp(e){for(var t=Array.from(e.h.keys()),n=g(e.j.keys()),i=n.next(),r={};!i.done;r={Pf:void 0},i=n.next())r.Pf=i.value,t.some(function(o){return function(s){return al(s.Y,o.Pf)}}(r))||Pu(e,r.Pf)}function yv(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&Pu(e,i)}vp(e)}function aE(e,t){t&&t!==e.i&&(ji(e),e.i=t)}function Pu(e,t){var n=e.h;t instanceof Cn&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function yp(e){this.g=e,this.Gd=this.rg=null}function Tv(e,t,n){var i=new Uint8Array(0);return e.Gd=e.g(t,n,function(r){return C(function(o){if(o.g==1)return 0<i.byteLength?i=yt(i,r):i=r,e.rg?S(o,e.rg(i),3):o.s(0);i=new Uint8Array(0),q(o)})}),e.Gd.promise.catch(function(r){return r instanceof k&&r.code==7001?Promise.resolve():Promise.reject(r)})}yp.prototype.abort=function(){this.Gd&&this.Gd.abort()};function Tp(e){var t=On(e),n=t.split("/")[0];return e=_n(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,Od:null,colorGamut:null,frameRate:null}}function lE(e,t,n){function i(E){T=E.name;var D=E.reader;D.skip(24);var P=D.ma(),O=D.ma();D.skip(50),p=String(P),d=String(O),E.reader.ta()&&ye(E)}function r(E){var D=Nm(E.reader);h=D.channelCount,m=D.sampleRate,o(E.name)}function o(E){switch(E=E.toLowerCase(),E){case"avc1":case"avc3":u.push(E+".42E01E"),l=!0;break;case"hev1":case"hvc1":u.push(E+".1.6.L93.90"),l=!0;break;case"dvh1":case"dvhe":u.push(E+".05.04"),l=!0;break;
32case"vp09":u.push(E+".00.10.08"),l=!0;break;case"av01":u.push(E+".0.01M.08"),l=!0;break;case"mp4a":s.push("mp4a.40.2"),a=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(E),a=!0}}var s=[],u=[],a=!1,l=!1,c=null,d=null,p=null,h=null,m=null,y=null,v=null,T;if(new ze().box("moov",ye).box("trak",ye).box("mdia",ye).R("mdhd",function(E){c=rl(E.reader,E.version).language}).box("minf",ye).box("stbl",ye).R("stsd",lr).box("mp4a",function(E){var D=Nm(E.reader);h=D.channelCount,m=D.sampleRate,E.reader.ta()?ye(E):o(E.name)}).box("esds",function(E){E=E.reader;for(var D="mp4a",P,O;E.ta();){P=E.X();for(var L=E.X();L&128;)L=E.X();if(P==3)E.ma(),L=E.X(),L&128&&E.ma(),L&64&&E.skip(E.X()),L&32&&E.ma();else if(P==4)O=E.X(),E.skip(12);else if(P==5)break}O&&(D+="."+wu(O),P==5&&E.ta()&&(P=E.X(),O=(P&248)>>3,O===31&&E.ta()&&(O=32+((P&7)<<3)+((E.X()&224)>>5)),D+="."+O)),s.push(D),a=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(E){var D=T||"";switch(T){case"dvav":D="avc3";break;case"dva1":D="avc1"}E=E.reader,E.skip(1),E=D+"."+wu(E.X())+wu(E.X())+wu(E.X()),u.push(E),l=!0}).box("hvcC",function(E){var D=T||"";switch(T){case"dvh1":D="hvc1";break;case"dvhe":D="hev1"}var P=E.reader;P.skip(1),E=P.X();var O=["","A","B","C"][E>>6],L=E&31,U=P.S(),_=(E&32)>>5?"H":"L";E=[P.X(),P.X(),P.X(),P.X(),P.X(),P.X()],P=P.X();for(var F=0,H=0;32>H&&(F|=U&1,H!=31);H++)F<<=1,U>>=1;for(D=D+("."+O+L)+("."+wu(F,!0)),D+="."+_+P,O="",L=E.length;L--;)((_=E[L])||O)&&(O="."+_.toString(16).toUpperCase()+O);D+=O,u.push(D),l=!0}).box("dvcC",function(E){var D=T||"";switch(T){case"hvc1":D="dvh1";break;case"hev1":D="dvhe";break;case"avc1":D="dva1";break;case"avc3":D="dvav";break;case"av01":D="dav1"}var P=E.reader;P.skip(2),E=P.X(),P=P.X(),u.push(D+"."+Fn(E>>1&127)+"."+Fn(E<<5&32|P>>3&31)),l=!0}).box("dvvC",function(E){var D=T||"";switch(T){case"hvc1":D="dvh1";break;case"hev1":D="dvhe";break;case"avc1":D="dva1";break;case"avc3":D="dvav";break;case"av01":D="dav1"}var P=E.reader;P.skip(2),E=P.X(),P=P.X(),u.push(D+"."+Fn(E>>1&127)+"."+Fn(E<<5&32|P>>3&31)),l=!0}).R("vpcC",function(E){var D=T||"",P=E.reader;E=P.X();var O=P.X();P=P.X()>>4&15,u.push(D+"."+Fn(E)+"."+Fn(O)+"."+Fn(P)),l=!0}).box("av1C",function(E){var D=T||"";switch(T){case"dav1":D="av01"}var P=E.reader;P.skip(1),E=P.X(),P=P.X();var O=E>>>5,L=(P&64)>>6;u.push(D+"."+O+"."+Fn(E&31)+(P>>>7?"H":"M")+"."+Fn(O===2&&L?(P&32)>>5?12:10:L?10:8)+"."+((P&16)>>4)+"."+((P&8)>>3)+((P&4)>>2)+(P&3)+"."+Fn(1)+"."+Fn(1)+"."+Fn(1)+".0"),l=!0}).box("enca",$a).box("encv",bn).box("sinf",ye).box("frma",function(E){E=$d(E.reader).codec,o(E)}).box("colr",function(E){u=u.map(function(O){if(O.startsWith("av01.")){var L=E.reader,U=L.Ba(),_=L.Db(4),F=String.fromCharCode(_[0]);if(F+=String.fromCharCode(_[1]),F+=String.fromCharCode(_[2]),F+=String.fromCharCode(_[3]),F==="nclx"){_=L.ma(),F=L.ma();var H=L.ma(),V=L.X()>>7,X=O.split(".");X.length==10&&(X[6]=Fn(_),X[7]=Fn(F),X[8]=Fn(H),X[9]=String(V),O=X.join("."))}L.seek(U)}return O});var D=fx(E.reader),P=D.colorGamut;y=D.Od,v=P}).parse(e||t,!0),!s.length&&!u.length)return null;var w=a&&!l,I=new Map;if(l&&!n){n=new Kn("video/mp4"),e&&n.init(e);try{n.i(t);for(var M=g(n.j()),R=M.next();!R.done;R=M.next()){var A=R.value;I.set(A,A)}}catch{}n.g()}return{type:w?"audio":"video",mimeType:w?"audio/mp4":"video/mp4",codecs:Sp(s.concat(u)).join(", "),language:c,height:d,width:p,channelCount:h,sampleRate:m,closedCaptions:I,Od:y,colorGamut:v,frameRate:null}}function Sp(e){var t=new Set,n=[];e=g(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r=Nr(i);t.has(r)||(n.push(i),t.add(r))}return t=fd("audio",n),i=fd("video",n),e=fd(Ce,n),i=cE(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function cE(e){if(1>=e.length)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?Zt('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function dE(e){var t=null;return new ze().box("moov",ye).box("trak",ye).box("mdia",ye).box("minf",ye).box("stbl",ye).R("stsd",lr).box("encv",bn).box("enca",$a).box("sinf",ye).box("schi",ye).R("tenc",function(n){n=n.reader,n.X(),n.X(),n.X(),n.X(),t=er(n.Db(16))}).parse(e,!0),t}
32function wp(e,t,n){var i,r,o,s,u;return C(function(a){if(a.g==1)return i=t,i.cryptoKey?a.s(2):S(a,i.fetchKey(),3);if(r=i.iv,!r)for(r=he(new ArrayBuffer(16)),o=i.firstMediaSequenceNumber+n,s=r.byteLength-1;0<=s;s--)r[s]=o&255,o>>=8;return t.blockCipherMode=="CBC"?u={name:"AES-CBC",iv:r}:u={name:"AES-CTR",counter:r,length:64},a.return(j.crypto.subtle.decrypt(u,i.cryptoKey,e))})}function Ru(e,t,n,i,r){return e=Ot(e,i,r),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function Sv(e,t){var n=this;this.g=t,this.j=e,this.h=null,this.K=new Map,this.C=1,this.u=this.l=null,this.O=0,this.i=new Map,this.I=!1,this.P=null,this.B=!1,this.m=new us(function(){return pE(n)}),this.L=Date.now()/1e3,this.o=new Map,this.M={projection:null,hfov:null},this.W=0,this.T=1/0,this.F=null,this.A=new ke(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var i=n.j.presentationTimeline.Hb(),r=n.j.presentationTimeline.ob();1<r-i?qx(n.g.aa,i,r):lp(n.g.aa)}else lp(n.g.aa),n.A&&n.A.stop()}),this.G=null,this.H=new ke(function(){var i=n.g.video;!i.ended&&n.G&&(i.currentTime=n.G,n.G=null)})}f=Sv.prototype,f.destroy=function(){return this.m.destroy()};function pE(e){var t,n,i,r,o,s,u;return C(function(a){if(a.g==1){for(t=[],n=g(e.i.values()),i=n.next();!i.done;i=n.next())r=i.value,ws(r),t.push(Nu(r)),r.ba&&(ji(r.ba),r.ba=null);for(o=g(e.o.values()),s=o.next();!s.done;s=o.next())u=s.value,ji(u);return S(a,Promise.all(t),2)}e.i.clear(),e.o.clear(),e.g=null,e.j=null,e.h=null,e.A&&e.A.stop(),e.A=null,e.H&&e.H.stop(),e.H=null,e.G=null,q(a)})}f.configure=function(e){if(this.h=e,this.P=new Zg({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0),e.disableAudioPrefetch){var t=this.i.get("audio");t&&t.ba&&(ji(t.ba),t.ba=null),t=g(this.o.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,ji(this.o.get(n)),this.o.delete(n)}for(e.disableTextPrefetch&&(t=this.i.get(Ce))&&t.ba&&(ji(t.ba),t.ba=null),e.disableVideoPrefetch&&(t=this.i.get("video"))&&t.ba&&(ji(t.ba),t.ba=null),t=g(this.i.keys()),n=t.next();!n.done;n=t.next())n=this.i.get(n.value),n.ba?(yv(n.ba,e.segmentPrefetchLimit),0<e.segmentPrefetchLimit||(ji(n.ba),n.ba=null)):0<e.segmentPrefetchLimit&&(n.ba=Ep(this,n.stream));e.disableAudioPrefetch||TE(this)};function fE(e,t,n){e.j.presentationTimeline.U()||(e.W=t,e.T=n)}f.start=function(e){var t=this;return C(function(n){if(n.g==1)return S(n,yE(t,e||new Map),2);Je(t.m),t.I=!0,q(n)})};function hE(e,t){var n,i,r,o,s,u;C(function(a){switch(a.g){case 1:return n=Mt,e.O++,i=e.O,ee(a,2),S(a,$m(e.g.aa,n.va),4);case 4:fe(a,3);break;case 2:r=re(a),e.g&&e.g.onError(r);case 3:o=Tt(t.mimeType,t.codecs),dl(e.g.aa,o,e.j.sequenceMode,t.external),s=e.g.aa.ea,(s.isTextVisible()||e.h.alwaysStreamText)&&e.O==i&&(u=Sl(e,t),e.i.set(n.va,u),vn(e,u,0)),q(a)}})}function gE(e){var t=e.i.get(Ce);t&&(ws(t),Nu(t).catch(function(){}),e.F=e.i.get(Ce),e.i.delete(Ce)),e.u=null}function xp(e,t){for(var n=0>e.g.gb(),i=g(e.i.values()),r=i.next();!r.done;r=i.next())r=r.value,r.ja&&r.ja.ed(n),r.ba&&r.ba.ed(n);for(i=g(e.o.values()),r=i.next();!r.done;r=i.next())r.value.ed(n);(n=e.i.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.fc&&(Ss(e,t,!1,0,!1),n.fc=i):(t=n.fc)&&(n.fc=null,Ss(e,t,!0,0,!1)))}function wv(e,t,n,i,r,o){n=n===void 0?!1:n,i=i===void 0?0:i,r=r===void 0?!1:r,o=o===void 0?!1:o,e.l=t,e.I&&(t.video&&Ss(e,t.video,n,i,r,o),t.audio&&Ss(e,t.audio,n,i,r,o))}function yl(e,t){C(function(n){if(n.g==1)return e.F=null,e.u=t,e.I?t.segmentIndex?n.s(2):S(n,t.createSegmentIndex(),2):n.return();Ss(e,t,!0,0,!1),q(n)})}function mE(e,t){for(var n=g(e.K.entries()),i=n.next();!i.done;i=n.next()){var r=g(i.value);i=r.next().value,r=r.next().value,i.includes(t.type)&&(r(),e.K.delete(i))}}function Ss(e,t,n,i,r,o){var s=e.i.get(t.type);s||t.type!=Ce?s&&(s.fc&&(t.trickModeVideo?(s.fc=t,t=t.trickModeVideo):s.fc=null),s.stream!=t||r)&&(e.o.has(t)?s.ba=e.o.get(t):s.ba&&aE(s.ba,t),t.type==Ce&&(r=Tt(t.mimeType,t.codecs),dl(e.g.aa,r,e.j.sequenceMode,t.external)),!e.o.has(s.stream)&&s.stream.closeSegmentIndex&&(s.Da?(r="("+s.type+":"+s.stream.id+")",e.K.has(r)||e.K.set(r,s.stream.closeSegmentIndex)):s.stream.closeSegmentIndex()),r=s.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,s.stream=t,s.ja=null,
32s.df=!!o,t.dependencyStream?s.nd=Sl(e,t.dependencyStream):s.nd=null,r?xl(e,!0,!1):(n?s.nc?s.Ue=!0:s.Da?(s.lc=!0,s.Yd=i,s.Ue=!0):(ws(s),Cp(e,s,!0,i).catch(function(u){e.g&&e.g.onError(u)})):s.Da||s.kb||vn(e,s,0),vE(e,s).catch(function(u){e.g&&e.g.onError(u)}))):hE(e,t)}function vE(e,t){var n,i;return C(function(r){if(r.g==1)return t.rb?(n=t.stream,i=t.rb,n.segmentIndex?r.s(2):S(r,n.createSegmentIndex(),2)):r.return();if(t.rb!=i||t.stream!=n)return r.return();var o=e.g.Rc(),s=Eo(e.g.aa,t.type),u=t.stream.segmentIndex.find(t.ya?t.ya.endTime:o),a=u==null?null:t.stream.segmentIndex.get(u);u=a&&a.xa?a.xa-a.Sa:null,a&&!u&&(u=(a.endTime-a.getStartTime())*(t.stream.bandwidth||0)/8),u?((a=a.Y)&&(u+=(a.xa?a.xa-a.Sa:null)||0),a=e.g.getBandwidthEstimate(),o=8*u/a<(s||0)-o-e.h.rebufferingGoal||t.rb.h.g>u):o=!1,o&&t.rb.abort(),q(r)})}f.Fc=function(){if(this.g){for(var e=this.g.Rc(),t=g(this.i.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.i.get(i);var r=this.g.aa;if(i==Ce?(r=r.h,r=r.g==null||r.h==null?!1:e>=r.g&&e<r.h):(r=ms(r,i),r=ep(r,e)),!r){if(this.L=0,n.ba&&(n.ba.g=null),n.type==="audio"){r=g(this.o.values());for(var o=r.next();!o.done;o=r.next())o.value.g=null}n.ja=null,(Eo(this.g.aa,i)!=null||n.Da)&&Tl(this,n),n.rb&&(n.rb.abort(),n.rb=null),i===Ce&&(i=this.g.aa,i.O&&i.O.g()),n.Fc=!0}}this.h.crossBoundaryStrategy!=="keep"&&Dp(this)}};function Tl(e,t){t.nc||t.lc||(t.Da?(t.lc=!0,t.Yd=0):ap(e.g.aa,t.type)==null?t.kb==null&&vn(e,t,0):(ws(t),Cp(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function yE(e,t){var n,i,r,o,s,u,a,l,c,d;return C(function(p){if(p.g==1){if(n=Mt,!e.l)throw new k(2,5,5006);return i=new Map,r=new Set,e.l.audio&&(i.set(n.V,e.l.audio),r.add(e.l.audio)),e.l.video&&(i.set(n.la,e.l.video),r.add(e.l.video)),e.u&&(i.set(n.va,e.u),r.add(e.u)),o=e.g.aa,S(p,o.init(i,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(Je(e.m),e.updateDuration(),s=g(i.keys()),u=s.next();!u.done;u=s.next())a=u.value,l=i.get(a),e.i.has(a)||(c=Sl(e,l),t.has(l.id)&&(d=t.get(l.id),uE(d,function(h,m,y){return wl(h,m,y||null,e.h.retryParameters,e.g.Xb)}),c.ba=d),e.i.set(a,c),vn(e,c,0));q(p)})}function Sl(e,t){var n={stream:t,type:t.type,ja:null,ba:Ep(e,t),ya:null,zb:null,le:null,Ac:null,zc:null,je:null,ke:null,fc:null,endOfStream:!1,Da:!1,kb:null,lc:!1,Yd:0,Ue:!1,nc:!1,Fc:!0,df:!1,dg:!1,sd:!1,rb:null,nd:null};return t.dependencyStream&&(n.nd=Sl(e,t.dependencyStream)),n}function Ep(e,t){if(t.type==="video"&&e.h.disableVideoPrefetch||t.type==="audio"&&e.h.disableAudioPrefetch||t.type===Ce&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===Ce&&e.h.disableTextPrefetch)return null;if(e.o.has(t))return e.o.get(t);var n=e.i.get(t.type);return(n=n&&n.ba)&&t===n.i?n:0<e.h.segmentPrefetchLimit?new vl(e.h.segmentPrefetchLimit,t,function(i,r,o){return wl(i,r,o||null,e.h.retryParameters,e.g.Xb)},0>e.g.gb()):null}function TE(e){for(var t=e.h.segmentPrefetchLimit,n=e.h.prefetchAudioLanguages,i=g(e.j.variants),r=i.next(),o={};!r.done;o={wb:void 0},r=i.next())if(o.wb=r.value,o.wb.audio)if(e.o.has(o.wb.audio)){if(r=e.o.get(o.wb.audio),yv(r,t),!(0<t&&n.some(function(u){return function(a){return is(u.wb.audio.language,a)}}(o)))){var s=e.i.get(o.wb.audio.type);r!==(s&&s.ba)&&ji(r),e.o.delete(o.wb.audio)}}else 0>=t||!n.some(function(u){return function(a){return is(u.wb.audio.language,a)}}(o))||!(r=Ep(e,o.wb.audio))||(o.wb.audio.segmentIndex||o.wb.audio.createSegmentIndex(),e.o.set(o.wb.audio,r))}f.updateDuration=function(){var e=yg(),t=this.j.presentationTimeline.getDuration();1/0>t?(e&&(this.A&&this.A.stop(),lp(this.g.aa)),this.g.aa.bb(t)):e?(this.A&&this.A.ua(.5),this.g.aa.bb(1/0)):this.g.aa.bb(Math.pow(2,32))};function SE(e,t){var n,i,r,o,s,u;return C(function(a){switch(a.g){case 1:if(Je(e.m),t.Da||t.kb==null||t.nc)return a.return();if(t.kb=null,!t.lc){a.s(2);break}return S(a,Cp(e,t,t.Ue,t.Yd),3);case 3:return a.return();case 2:if(mE(e,t),t.stream.segmentIndex){a.s(4);break}return n=t.stream,ee(a,5),S(a,t.stream.createSegmentIndex(),7);case 7:fe(a,6);break;case 5:return i=re(a),S(a,kp(e,t,i),8);case 8:return a.return();case 6:if(n!=t.stream)return n.closeSegmentIndex&&n.closeSegmentIndex(),t.Da||t.kb||vn(e,t,0),a.return();case 4:ee(a,9),r=wE(e,t),r!=null&&(vn(e,t,r),t.sd=!1),fe(a,10);break;case 9:return o=re(a),S(a,kp(e,t,o),11);case 11:return a.return();case 10:if(s=Array.from(e.i.values()),!e.I||!s.every(function(l){return l.endOfStream})){a.s(0);break}return S(a,e.g.aa.endOfStream(),13);case 13:Je(e.m),u=e.g.aa.getDuration(),u!=0&&u<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.bb(u),q(a)}})}function wE(e,t){if(Mp(t))return Gx(e.g.aa,t.stream.originalId||""),null;if(t.type==Ce&&Xx(e.g.aa),t.stream.isAudioMuxedInVideo)return null;var n=e.h.updateIntervalSeconds/Math.max(1,Math.abs(e.g.gb()));if(!Qm(e.g.aa)&&t.type!=Ce)return n/2;var i=e.g.Rc();
32if(t.type==="audio")for(var r=g(e.o.keys()),o=r.next();!o.done;o=r.next())o=e.o.get(o.value),o.Pa(i,!0),Du(o,i);r=t.ya?t.ya.endTime:i;var s=Vx(e.g.aa,t.type,i),u=Math.max(1,Math.max(e.h.rebufferingGoal,e.h.bufferingGoal)*e.C),a=e.j.presentationTimeline.getDuration()-r;if(o=Eo(e.g.aa,t.type),1e-6>a&&o)return t.endOfStream=!0,t.type=="video"&&(e=e.i.get(Ce))&&Mp(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,s>=u)return n/2;if(u=!t.ja,o=xE(e,t,i,o),!o)return n;s=!1,u&&t.df&&(s=!0,t.df=!1),u=1/0,a=Array.from(e.i.values()),a=g(a);for(var l=a.next();!l.done;l=a.next())l=l.value,Mp(l)||l.ja&&!l.ja.current()||(u=Math.min(u,l.ya?l.ya.endTime:i));return r>=u+e.j.presentationTimeline.h?n:(e.h.crossBoundaryStrategy!=="keep"&&DE(e,t,o)||(t.ba&&t.ja&&!e.o.has(t.stream)&&(t.ba.Pa(o.startTime+.001),Du(t.ba,o.startTime).catch(function(){})),EE(e,t,i,o,s).catch(function(){}),t.nd&&AE(e,t.nd,i)),null)}function xE(e,t,n,i){if(t.ja)return(n=t.ja.current())&&t.ya&&.001>Math.abs(t.ya.startTime-n.startTime)&&(n=t.ja.next().value),n;if(t.ya||i)return n=t.ya?t.ya.endTime:i,e=0>e.g.gb(),t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),t.ja&&t.ja.next().value;i=e.j.sequenceMode?0:e.h.inaccurateManifestTolerance;var r=Math.max(n-i,0);e=0>e.g.gb();var o=null;return i&&(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(r,!1,e)),o=t.ja&&t.ja.next().value),o||(t.stream.segmentIndex&&(t.ja=t.stream.segmentIndex.Gb(n,!1,e)),o=t.ja&&t.ja.next().value),o}function EE(e,t,n,i,r){var o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R;return C(function(A){switch(A.g){case 1:if(o=Mt,s=t.stream,u=t.ja,t.Da=!0,ee(A,2),i.dc()==2)throw new k(1,1,1011);return S(A,CE(e,t,i,r),4);case 4:return Je(e.m),e.B?A.return():(a=s.mimeType=="video/mp4"||s.mimeType=="audio/mp4",l=j.ReadableStream,e.h.lowLatencyMode&&e.j.isLowLatency&&l&&a&&(e.j.type!="HLS"||i.m)?(p=new Uint8Array(0),m=h=!1,v=function(E){var D,P,O;return C(function(L){switch(L.g){case 1:if(h||(m=!0,Je(e.m),e.B))return L.return();if(ee(L,2),p=IE(p,E),D=!1,P=0,new ze().box("mdat",function(U){P=U.size+U.start,D=!0}).parse(p,!1,!0),!D){L.s(4);break}return O=p.subarray(0,P),p=p.subarray(P),S(L,Ap(e,t,n,s,i,O,!0,r),5);case 5:t.ba&&t.ja&&Du(t.ba,i.startTime,!0);case 4:fe(L,0);break;case 2:y=re(L),q(L)}})},S(A,Lu(e,t,i,v),9)):(c=Lu(e,t,i),S(A,c,7)));case 7:return d=A.h,Je(e.m),e.B?A.return():(Je(e.m),t.lc?(t.Da=!1,vn(e,t,0),A.return()):S(A,Ap(e,t,n,s,i,d,!1,r),6));case 9:if(T=A.h,y)throw y;if(m){A.s(10);break}return h=!0,Je(e.m),e.B?A.return():t.lc?(t.Da=!1,vn(e,t,0),A.return()):S(A,Ap(e,t,n,s,i,T,!1,r),10);case 10:t.ba&&t.ja&&Du(t.ba,i.startTime,!0);case 6:if(Je(e.m),e.B)return A.return();t.ya=i,u.next(),t.Da=!1,t.dg=!1,w=e.g.aa.Fb(),I=w[t.type],JSON.stringify(I),t.lc||(M=null,t.type===o.la?M=e.i.get(o.V):t.type===o.V&&(M=e.i.get(o.la)),M&&M.type==o.V?e.g.ue(i,t.stream,M.stream.isAudioMuxedInVideo):e.g.ue(i,t.stream,t.stream.codecs.includes(","))),vn(e,t,0),fe(A,0);break;case 2:if(R=re(A),Je(e.m,R),e.B)return A.return();if(t.Da=!1,R.code==7001)t.Da=!1,ws(t),vn(e,t,0),A.s(0);else if(t.type==o.va&&e.h.ignoreTextStreamFailures)e.i.delete(o.va),A.s(0);else return R.code==3017?S(A,ME(e,t,R),0):(t.sd=!0,R.category==1&&t.ba&&Pu(t.ba,i),R.severity=2,S(A,kp(e,t,R),0))}})}function AE(e,t,n){var i,r,o,s,u,a,l,c;C(function(d){switch(d.g){case 1:if(i=t.stream,o=(r=i.segmentIndex.Gb(n))&&r.next().value,!o){d.s(0);break}if(s=o.Y,!s||al(s,t.zb)){d.s(3);break}return t.zb=s,ee(d,4),S(d,Lu(e,t,s),6);case 6:u=d.h;var p=e.g.aa;p.K&&hd(p.K,u,0,i),fe(d,3);break;case 4:throw a=re(d),t.zb=null,a;case 3:if(t.ya&&t.ya==o){d.s(0);break}return t.ya=o,ee(d,8),S(d,Lu(e,t,o),10);case 10:l=d.h,p=e.g.aa,p.K&&hd(p.K,l,0,i),fe(d,0);break;case 8:throw c=re(d),t.ya=null,c}})}function IE(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function ME(e,t,n){var i,r,o,s;return C(function(u){if(u.g==1){if(i=Array.from(e.i.values()),i.some(function(a){return a!=t&&a.dg}))return u.s(2);if(r=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,e.g.disableStream(t.stream,r))return u.return();if(e.h.avoidEvictionOnQuotaExceededError)return vn(e,t,4),u.return();if(o=Math.round(100*e.C),20<o)e.C-=.2;else if(4<o)e.C-=.04;else return t.sd=!0,e.B=!0,e.g.onError(n),u.return();return t.dg=!0,s=e.g.Rc(),S(u,Ip(e,t,s),2)}vn(e,t,4),q(u)})}function CE(e,t,n,i){var r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I;return C(function(M){switch(M.g){case 1:if(r=Mt,o=t.ya==null,s=[],u=Math.max(0,Math.max(n.appendWindowStart,e.W)-.1),a=Math.min(n.appendWindowEnd,e.T)+.01,l=n.codecs||t.stream.codecs,c=Nr(l),d=On(n.mimeType||t.stream.mimeType),p=n.timestampOffset,p==t.le&&u==t.Ac&&a==t.zc&&c==t.je&&d==t.ke){M.s(2);break}if(h=t.je&&t.ke&&Jx(e.g.aa,t.type,d,l),!h){M.s(3);break}if(m=null,t.type===r.la?m=e.i.get(r.V):t.type===r.V&&(m=e.i.get(r.la)),!m){M.s(3);break}return S(M,Nu(m).catch(function(){}),5);case 5:m.zb=null,m.Ac=null,m.zc=null,Tl(e,m);case 3:return S(M,xv(e,t,p,u,a,n,c,d),2);case 2:return al(n.Y,t.zb)||(t.zb=n.Y,n.l&&n.Y&&(y=Lu(e,t,n.Y),v=function(){var R,A,E,D,P,O,L;return C(function(U){switch(U.g){case 1:return ee(U,2),S(U,y,4);case 4:return R=U.h,Je(e.m),A=null,E=new Map,D={projection:null,hfov:null},P=new ze,P.box("moov",ye).box("trak",ye).box("mdia",ye).R("mdhd",function(_){A=rl(_.reader,_.version).timescale}).box("hdlr",function(_){switch(_=_.reader,_.skip(8),_.Cc()){case"soun":E.set(r.V,A);break;case"vide":E.set(r.la,A)}A=null}).box("minf",ye).box("stbl",ye).R("stsd",lr).box("encv",bn).box("avc1",bn).box("avc3",bn).box("hev1",bn).box("hvc1",bn).box("dvav",bn).box("dva1",bn).box("dvh1",bn).box("dvhe",bn).box("dvc1",bn).box("dvi1",bn).box("vexu",ye).box("proj",ye).R("prji",function(_){_=_.reader.Cc(),D.projection=_}).box("hfov",function(_){_=_.reader.S()/1e3,D.hfov=_}).parse(R),t.type===r.la&&kE(e,D),E.has(t.type)?n.Y.timescale=E.get(t.type):A!=null&&(n.Y.timescale=A),O=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,S(U,e.g.Hg(t.type,R),5);case 5:return S(U,pl(e.g.aa,t.type,R,null,t.stream,O,t.Fc,i),6);case 6:fe(U,0);break;case 2:throw L=re(U),t.zb=null,L}})},T=n.startTime,o&&(w=Eo(e.g.aa,t.type),w!=null&&(T=w)),e.g.hj(T,n.Y),s.push(v()
32))),I=t.ya?t.ya.i:-1,n.i!=I&&s.push(Wx(e.g.aa,t.type,n.startTime)),S(M,Promise.all(s),0)}})}function xv(e,t,n,i,r,o,s,u){var a,l,c,d;return C(function(p){if(p.g==1)return a=Mt,l=new Map,e.l.audio&&l.set(a.V,e.l.audio),e.l.video&&l.set(a.la,e.l.video),ee(p,2),t.Ac=i,t.zc=r,s&&(t.je=s),u&&(t.ke=u),t.le=n,c=e.j.sequenceMode||e.j.type=="HLS",S(p,Kx(e.g.aa,t.type,n,i,r,c,o.mimeType||t.stream.mimeType,o.codecs||t.stream.codecs,l),4);if(p.g!=2)return fe(p,0);throw d=re(p),t.Ac=null,t.zc=null,t.je=null,t.ke=null,t.le=null,d})}function Ap(e,t,n,i,r,o,s,u){s=s===void 0?!1:s,u=u===void 0?!1:u;var a,l,c,d,p,h;return C(function(m){switch(m.g){case 1:return a=i.closedCaptions&&0<i.closedCaptions.size,e.h.shouldFixTimestampOffset&&(c=i.mimeType=="video/mp4"||i.mimeType=="audio/mp4",d=null,r.Y&&(d=r.Y.timescale),(p=c&&d&&i.type==="video"&&e.j.type=="DASH")&&(l=new ze),p&&l.box("moof",ye).box("traf",ye).R("tfdt",function(y){var v,T,w,I,M,R;return C(function(A){return v=il(y.reader,y.version),T=v.baseMediaDecodeTime,T?(w=-T/d,I=Number(t.le)||0,I<w?(M=t.Ac,R=t.zc,S(A,xv(e,t,w,M,R,r),0)):A.s(0)):A.return()})}),p&&l.parse(o,!1,s)),S(m,Ip(e,t,n),2);case 2:return Je(e.m),h=t.Fc,t.Fc=!1,S(m,e.g.Hg(t.type,o),3);case 3:return S(m,pl(e.g.aa,t.type,o,r,i,a,h,u,s),4);case 4:Je(e.m),q(m)}})}function Ip(e,t,n){var i,r,o,s,u,a,l,c;return C(function(d){if(d.g==1)return i=t.stream.segmentIndex,i instanceof ft&&i.Pa(e.j.presentationTimeline.pb()),r=Math.max(e.h.bufferBehind*e.C,e.j.presentationTimeline.h),o=ap(e.g.aa,t.type),o==null?(e.F==t&&(e.F=null),d.return()):(s=n-o,u=e.h.evictionGoal,a=e.j.presentationTimeline.Hb(),l=e.j.presentationTimeline.ob(),c=s-r,l-a>u&&(c=Math.max(s-r,a-u-o)),c<=u?d.return():S(d,e.g.aa.remove(t.type,o,o+c),2));if(d.g!=4)return Je(e.m),e.F?S(d,Ip(e,e.F,n),4):d.s(0);Je(e.m),q(d)})}function Mp(e){return e&&e.type==Ce&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function Lu(e,t,n,i){var r,o,s,u,a;return C(function(l){switch(l.g){case 1:if(r=n.Ib())return l.return(r);if(o=null,t.ba){var c=t.ba,d=c.h;n instanceof Cn&&(d=c.j),d.has(n)?(c=d.get(n),i&&(c.rg=i),o=c.Gd):o=null}return o||(o=wl(n,t.stream,i||null,e.h.retryParameters,e.g.Xb)),s=0,t.ja&&(s=t.ja.h),t.rb=o,S(l,o.promise,2);case 2:if(u=l.h,t.rb=null,a=u.data,!n.aesKey){l.s(3);break}return S(l,wp(a,n.aesKey,s),4);case 4:a=l.h;case 3:return l.return(a)}})}function wl(e,t,n,i,r,o){o=o===void 0?!1:o;var s=e instanceof oe?e:void 0,u=s?1:0;return e=Ru(e.N(),e.Sa,e.xa,i,n),e.contentType=t.type,r.request(Ai,e,{type:u,stream:t,segment:s,isPreload:o})}function Cp(e,t,n,i){var r,o;return C(function(s){if(s.g==1)return t.lc=!1,t.Ue=!1,t.Yd=0,t.nc=!0,t.ya=null,t.ja=null,t.ba&&!e.o.has(t.stream)&&ji(t.ba),i?(r=e.g.Rc(),o=e.g.aa.getDuration(),S(s,e.g.aa.remove(t.type,r+i,o),3)):S(s,$m(e.g.aa,t.type),4);if(s.g!=3)return Je(e.m),n?S(s,e.g.aa.flush(t.type),3):s.s(3);Je(e.m),t.nc=!1,t.endOfStream=!1,t.Da||t.kb||vn(e,t,0),q(s)})}
32function vn(e,t,n){var i=t.type;(i!=Ce||e.i.has(i))&&(t.kb=new Js(function(){var r;return C(function(o){if(o.g==1)return ee(o,2),S(o,SE(e,t),4);if(o.g!=2)return fe(o,0);r=re(o),e.g&&e.g.onError(r),q(o)})}).da(n))}function ws(e){e.kb!=null&&(e.kb.stop(),e.kb=null)}function Nu(e){return C(function(t){return e.rb?S(t,e.rb.abort(),0):t.s(0)})}function kp(e,t,n){var i;return C(function(r){if(r.g==1)return n.code==3024?(t.Da=!1,ws(t),vn(e,t,0),r.return()):S(r,em(e.P),2);if(Je(e.m),n.category===1&&n.code!=1003){if(t.fc)return xp(e,!1),r.return();i=e.h.maxDisabledTime===0&&n.code==1011?1:e.h.maxDisabledTime,n.handled=e.g.disableStream(t.stream,i),n.handled&&(n.severity=1)}(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.h.failureCallback(n),q(r)})}function xl(e,t,n){t=t===void 0?!1:t,n=n===void 0?!0:n;var i,r,o,s,u,a;return C(function(l){if(l.g==1){if(i=Date.now()/1e3,r=e.h.minTimeBetweenRecoveries,!t){if(!e.h.allowMediaSourceRecoveries||i-e.L<r)return l.return(!1);e.L=i}return o=Mt,(s=e.i.get(o.V))&&(s.zb=null,s.Ac=null,s.zc=null,n&&Tl(e,s),Nu(s).catch(function(){}),s.ja&&s.ja.fg()),(u=e.i.get(o.la))&&(u.zb=null,u.Ac=null,u.zc=null,n&&Tl(e,u),Nu(u).catch(function(){}),u.ja&&u.ja.fg()),a=new Map,e.l.audio&&a.set(o.V,e.l.audio),e.l.video&&a.set(o.la,e.l.video),S(l,Zm(e.g.aa,a),2)}return!u||u.nc||u.Da||u.kb||vn(e,u,0),!s||s.nc||s.Da||s.kb||vn(e,s,0),l.return(!0)})}function kE(e,t){if(e.M.projection!=t.projection||e.M.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new z("spatialvideoinfo",n)}else n=new z("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.M=t}}function Dp(e){if(e.h.crossBoundaryStrategy!=="keep"){e.H.stop();var t=e.g.Rc(),n=e.i.get("video")||e.i.get("audio");n&&(n=n.zb)&&n.g!==null&&(t=n.g-t,0>t||1<t||(e.G=n.g+.01,e.H.da(t)))}}function DE(e,t,n){if(t.type===Ce)return!1;var i=t.zb;if(!i)return!1;n=n.Y;var r=i.g!==n.g;if(e.h.crossBoundaryStrategy==="reset_to_encrypted"&&(i.encrypted||n.encrypted||(r=!1),i.encrypted&&(e.h.crossBoundaryStrategy="keep")),e.h.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&i.encrypted==n.encrypted&&(r=!1),r&&t.Fc){var o=e.g.video,s=o.paused;xl(e,!0).then(function(){e.g.onEvent(new z("boundarycrossed")),s||o.play()})}return r}function El(){}function Pp(e,t,n,i,r){var o=r in i,s=o?n.constructor==Object&&Object.keys(i).length==0:n.constructor==Object&&Object.keys(n).length==0,u=o||s,a=!0,l;for(l in t){var c=r+"."+l,d=o?i[r]:n[l];u||l in n?t[l]===void 0?d===void 0||u?delete e[l]:e[l]=Pi(d):s?e[l]=t[l]:d.constructor==Object&&t[l]&&t[l].constructor==Object?(e[l]||(e[l]=Pi(d)),c=Pp(e[l],t[l],d,i,c),a=a&&c):typeof t[l]!=typeof d||t[l]==null||typeof t[l]!="function"&&t[l].constructor!=d.constructor?(En("Invalid config, wrong type for "+c),a=!1):(typeof n[l]=="function"&&n[l].length!=t[l].length&&Pe("Unexpected number of arguments for "+c),e[l]=t[l]):(En("Invalid config, unrecognized key "+c),a=!1)}return a}function Al(e,t){for(var n={},i=n,r=0,o=0;r=e.indexOf(".",r),!(0>r);)(r==0||e[r-1]!="\\")&&(o=e.substring(o,r).replace(/\\\./g,"."),i[o]={},i=i[o],o=r+1),r+=1;return i[e.substring(o).replace(/\\\./g,".")]=t,n}function xs(e,t){return e&&t}function Ev(e,t){function n(o){for(var s=g(Object.keys(o)),u=s.next();!u.done;u=s.next())if(u=u.value,!(o[u]instanceof HTMLElement))if(r(o[u])&&Object.keys(o[u]).length===0)delete o[u];else{var a=o[u];Array.isArray(a)&&a.length===0||typeof o[u]=="function"?delete o[u]:r(o[u])&&(n(o[u]),Object.keys(o[u]).length===0&&delete o[u])}}function i(o,s){return Object.keys(o).reduce(function(u,a){var l=o[a];return s.hasOwnProperty(a)?l instanceof HTMLElement&&s[a]instanceof HTMLElement?l.isEqualNode(s[a])||(u[a]=l):r(l)&&r(s[a])?(l=i(l,s[a]),(0<Object.keys(l).length||!r(l))&&(u[a]=l)):Array.isArray(l)&&Array.isArray(s[a])?Td(l,s[a])||(u[a]=l):Number.isNaN(l)&&Number.isNaN(s[a])||l!==s[a]&&(u[a]=l):u[a]=l,u},{})}function r(o){return o&&typeof o=="object"&&!Array.isArray(o)}return e=i(e,t),n(e),e}Y("shaka.util.ConfigUtils",El),El.getDifferenceFromConfigObjects=Ev,El.convertToConfigObject=Al,El.mergeConfigObjects=Pp;function Dn(){}function Av(e){return e=Vi(e),new vt(e).nb}function ju(e,t,n){function i(u){An(o).setUint32(s,u.byteLength,!0),s+=4,o.set(he(u),s),s+=u.byteLength}if(!n||!n.byteLength)throw new k(2,6,6015);var r;
32typeof t=="string"?r=dd(t,!0):r=t,e=Vi(e),e=dd(e,!0);var o=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),s=0;return i(e),i(r),i(n),o}function Rp(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=Vi(e).split("skd://").pop(),ju(e,n,t))}function Il(e,t){e===2&&(e=t.drmInfo)&&Da(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}Y("shaka.drm.FairPlay",Dn),Dn.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&Da(e.keySystem)){try{var n=at(t.data)}catch{return}if(e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(n=n.slice(5,-6),e=!0),!e)try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch{}e&&(t.data=ri(oi(n)))}},Dn.muxFairPlayRequest=function(e,t){Il(e,t)},Dn.expressplayFairPlayRequest=function(e,t){if(e===2){var n=t.drmInfo;n&&Da(n.keySystem)&&Il(e,t)}},Dn.conaxFairPlayRequest=function(e,t){Il(e,t)},Dn.ezdrmFairPlayRequest=function(e,t){Il(e,t)},Dn.verimatrixFairPlayRequest=function(e,t){e===2&&(e=t.drmInfo)&&Da(e.keySystem)&&(e=he(t.body),e=Zi(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Si("spc="+e))},Dn.muxInitDataTransform=function(e,t,n){return Rp(e,t,n)},Dn.expressplayInitDataTransform=function(e,t,n){return Rp(e,t,n)},Dn.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=Vi(e).split("skd://").pop().split("?").shift(),n=j.atob(n);var i=new ArrayBuffer(2*n.length);i=sg(i);for(var r=0,o=n.length;r<o;r++)i[r]=n.charCodeAt(r);return ju(e,i,t)},Dn.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=Vi(e).split(";").pop(),ju(e,n,t))},Dn.verimatrixInitDataTransform=function(e,t,n){return Rp(e,t,n)},Dn.initDataTransform=ju,Dn.defaultGetContentId=Av,Dn.isFairPlaySupported=function(){var e;return C(function(t){return t.g==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ee(t,2),S(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.g!=2?t.return(!0):(re(t),t.return(!1))})};function Lp(){this.g=null}Lp.prototype.configure=function(e){this.g=e},Lp.prototype.create=function(e){var t;if(this.g.language){var n=PE(e,this.g.language);n.length&&(t=n)}return t||(t=e.filter(function(i){return i.primary}),t=t.length?t:e),e=RE(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=OE(t,this.g.videoLayout),e.length&&(t=e)),this.g.Sc&&(e=UE(t,this.g.Sc),e.length&&(t=e)),this.g.channelCount&&(e=jE(t,this.g.channelCount),e.length&&(t=e)),this.g.Kc&&(e=LE(t,this.g.Kc),e.length&&(t=e)),this.g.fd&&(e=NE(t,this.g.fd),e.length&&(t=e)),e=_E(t,this.g.spatialAudio),e.length&&(t=e),this.g.audioCodec&&(e=bE(t,this.g.audioCodec),e.length&&(t=e)),new tl(t[0],t,!(this.g.codecSwitchingStrategy=="smooth"&&io()))};function PE(e,t){t=Ye(t);var n=Ga(t,e.map(function(i){return Od(i)}));return n?e.filter(function(i){return n==Od(i)}):[]}function RE(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function LE(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function NE(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function jE(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,i){return n.audio||i.audio?n.audio?i.audio?(i.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function UE(e,t){if(t=="AUTO"){var n=e.some(function(i){return!!(i.video&&i.video.hdr&&i.video.hdr=="HLG")});t=pg(n)}return e.filter(function(i){return!(i.video&&i.video.hdr&&i.video.hdr!=t)})}function OE(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function _E(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function bE(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function Ml(){}function Es(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:Li(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(c,d,p){return j.shakaMediaKeysPolyfill==="apple"&&d=="skd"&&(d=p.serverCertificate,p=Av(c),c=ju(c,p,d)),c},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:ki(),minHdcpVersion:"",ignoreDuplicateInitData:!xt("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};(ki()||Di())&&t.preferredKeySystems.push("com.microsoft.playready"),Na()&&!Go()&&(t.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"});var n="reload",i=!1;!io()||Bi()||Di()||Xo()||Ji()&&ag()===79||Ti()&&!Mr()&&!ad()||Na()&&Go()||(n="smooth",i=!0),i={retryParameters:Li(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Cl,manifestPreprocessorTXml:kl,sequenceMode:!1,multiTypeVariantsAllowed:i,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0}
32,hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:hw(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Cl,manifestPreprocessorTXml:kl,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var r={retryParameters:Li(),failureCallback:function(c){return xs([c])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:Di()||Xo(),dontChooseCodecs:!1,shouldFixTimestampOffset:Ji()||Bi(),avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep"};(Ji()||Bi()||Ti()||La())&&(r.stallSkip=0),(navigator.userAgent.match(/Edge\//)||ki())&&(r.gapPadding=.01),Bi()&&(r.gapPadding=2),Ra()&&(r.crossBoundaryStrategy="reset"),$i()&&(r.crossBoundaryStrategy="reset_to_encrypted");var o={trackSelectionCallback:function(c){return C(function(d){return d.return(c)})},downloadSizeCallback:function(c){var d;return C(function(p){return p.g==1?navigator.storage&&navigator.storage.estimate?S(p,navigator.storage.estimate(),3):p.return(!0):(d=p.h,p.return(d.usage+c<.95*d.quota))})},progressCallback:function(c,d){return xs([c,d])},usePersistentLicense:!0,numberOfParallelDownloads:5};e={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:Jt()?.5:0,preferNetworkInformationBandwidth:!1},n={codecSwitchingStrategy:n,addExtraFeaturesToSourceBuffer:function(c){return xs([c],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(c,d){return xs([c,d])},dispatchAllEmsgBoxes:!1};var s=!1,u=!1,a=!0;ld()&&(u=s=!0,a=!1);var l={drm:t,manifest:i,streaming:r,mediaSource:n,offline:o,abrFactory:function(){return new dt},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(Lp,[null].concat(W(mt.apply(0,arguments)))))},abr:e,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:s,skipPlayDetection:u,supportsMultipleMediaElements:a,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0},ignoreHardwareResolution:!1};return o.trackSelectionCallback=function(c){return C(function(d){return d.return(FE(c,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})},l}function Iv(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function br(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioR
32obustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Pp(e,t,n||Es(),i,"")}function FE(e,t,n){var i=n;i=="AUTO"&&(n=e.some(function(u){return!!(u.hdr&&u.hdr=="HLG")}),i=pg(n));var r=e.filter(function(u){return!(u.type!="variant"||u.hdr&&u.hdr!=i)});n=[];var o=Ga(t,r.map(function(u){return u.language}));o&&(n=r.filter(function(u){return Ye(u.language)==o})),n.length==0&&(n=r.filter(function(u){return u.primary})),n.length==0&&(r.map(function(u){return u.language}),n=r);var s=n.filter(function(u){return u.height&&480>=u.height});for(s.length&&(s.sort(function(u,a){return a.height-u.height}),n=s.filter(function(u){return u.height==s[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(u,a){return u.bandwidth-a.bandwidth}),t.push(n[r])),e=g(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=Ce&&n.type!="image"||t.push(n);return t}function Cl(e){return xs([e],e)}function kl(e){return xs([e],e)}Y("shaka.util.PlayerConfiguration",Ml),Ml.mergeConfigObjects=br,Ml.createDefaultForLL=Iv,Ml.createDefault=Es;function BE(){this.g=null,this.h=[]}function Np(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=g(e.h);for(var i=e.next();!i.done;i=e.next())i=i.value,n+=i.state==t?i.duration:0;return n}function VE(e){function t(o){return{timestamp:o.timestamp,state:o.state,duration:o.duration}}for(var n=[],i=g(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}function HE(){this.i=this.h=null,this.g=[]}
32function jp(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Dl(){this.mc=this.dh=this.u=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.P=this.T=this.L=this.M=this.O=this.l=this.m=NaN,this.K=0,this.F=this.G=NaN,this.g=new BE,this.h=new HE}function ui(e,t,n,i){qe.call(this),this.O=e,this.Z=t,this.Fa=i.networkingEngine,this.B=n,this.o=null,this.za=0,this.Na=i.Lc,this.F=i.aj,this.Oa=i.bj,this.g=i.config,this.l=this.G=this.h=null,this.oa=!1,this.H=i.mj,this.sa=!1,this.i=null,this.ka=!1,this.j=this.C=null,this.ea=!1,this.M=new Map,this.Aa=!1,this.Ga=i.lj,this.$=new Dl,this.na=new We,this.m=new We,this.P=null,this.u=!1,this.fa=i.Vh,this.W=this.K=null,this.Ma=i.Uh,this.T=!1,this.L=[],this.I=[],this.A=!0}ct(ui,qe);function Uu(e,t,n){(e=t?e.I:e.L)?e.push(n):n()}function GE(e){if(e.I)for(var t=g(e.I),n=t.next();!n.done;n=t.next())n=n.value,n();e.I=null}function Mv(e,t){if(e.P=t,e.T=!0,e.L){t=g(e.L);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.L=null}f=ui.prototype,f.getStartTime=function(){return this.B},f.Qc=function(){return this.O},f.Jf=function(){return this.h};function XE(e){return e.ea=!0,e.j}function KE(e){return e.sa=!0,e.H}f.getStats=function(){return this.$};function WE(e){return e.ka=!0,e.i}f.Ci=function(){return this.K?fo(this.K):null},f.Bi=function(){return this.W?ho(this.W):null};function qE(e){return e.Aa=!0,e.M}f.start=function(){var e=this;(function(){var t;return C(function(n){switch(n.g){case 1:return S(n,Promise.resolve(),2);case 2:return ee(n,3),S(n,zE(e),5);case 5:if(Ao(e),j.shakaMediaKeysPolyfill==="webkit"){n.s(6);break}return S(n,Cv(e),7);case 7:Ao(e);case 6:return S(n,YE(e),8);case 8:if(Ao(e),!e.fa||!e.i){n.s(9);break}return S(n,tx(e.i),10);case 10:Ao(e);case 9:e.m.resolve(),fe(n,0);break;case 3:t=re(n),t instanceof k&&(t.code==7001||t.code==7003)||e.m.reject(t),q(n)}})})()},f.dispatchEvent=function(e){return this.P?this.P.dispatchEvent(e):qe.prototype.dispatchEvent.call(this,e)},f.onError=function(e){e.severity===2&&(this.m.reject(e),this.destroy());var t=new Map().set("detail",e);t=new z("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function Ao(e){if(e.u)throw new k(2,7,7003)}function Up(e,t){e.dispatchEvent(new z("onstatechange",new Map().set("state",t)))}function zE(e){var t,n,i,r,o,s,u,a,l;return C(function(c){switch(c.g){case 1:if(Up(e,"manifest-parser"),e.l||(e.G=Lm(e.O,e.Z),e.l=e.G(),e.l.configure(e.g.manifest,function(){return e.A})),t=Date.now()/1e3,Up(e,"manifest"),e.h){c.s(2);break}return S(c,e.l.start(e.O,e.Oa),3);case 3:if(e.h=c.h,e.h.variants.length!=1){c.s(2);break}for(n=[],i=e.h.variants[0],r=g([i.video,i.audio]),o=r.next();!o.done;o=r.next())(s=o.value)&&!s.segmentIndex&&n.push(s.createSegmentIndex());if(!(0<n.length)){c.s(2);break}return S(c,Promise.all(n),2);case 2:return e.na.resolve(),u=new z("manifestparsed",void 0),S(c,Promise.resolve(),7);case 7:if(e.dispatchEvent(u),e.h.variants.length==0)throw new k(2,4,4036);QE(e.h),a=Date.now()/1e3,l=a-t,e.$.H=l,q(c)}})}function Cv(e,t){var n,i,r,o,s,u;return C(function(a){switch(a.g){case 1:if(!e.h||e.i)return a.return();if(Up(e,"drm-engine"),e.za=Date.now()/1e3,e.i=e.Na(),e.F.h=e.i,e.i.configure(e.g.drm,function(){return e.A}),n=km(e.F,e.h),!n){a.s(2);break}return i=new z("trackschanged",void 0),S(a,Promise.resolve(),3);case 3:Ao(e),e.dispatchEvent(i);case 2:return r=Ka(e.h.variants),o=!0,e.h&&e.h.presentationTimeline&&e.h.type!="HLS"&&(o=e.h.presentationTimeline.U()),S(a,pm(e.i,r,e.h.offlineSessionIds,o),4);case 4:if(Ao(e),!t){a.s(5);break}return S(a,e.i.Lb(t),6);case 6:Ao(e);case 5:return S(a,Cm(e.F,e.h),7);case 7:if(s=a.h,!s){a.s(0);break}return u=new z("trackschanged",void 0),S(a,Promise.resolve(),9);case 9:e.dispatchEvent(u),q(a)}})}f.configure=function(e,t){e=Al(e,t),br(this.g,e)},f.getConfiguration=function(){return Pi(this.g)};function YE(e){var t,n,i,r,o,s,u;return C(function(a){return e.o||(e.o=e.g.adaptationSetCriteriaFactory(),e.o.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Sc:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Kc:e.g.preferredAudioLabel,fd:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""})),e.Ma&&(t=e.g.abrFactory,e.C=t,e.j=t(),e.j.configure(e.g.abr)),!e.fa||(n=e.h.presentationTimeline.U(),i=Ka(e.h.variants),r=e.o.create(i),e.j.configure(e.g.abr),e.j.setVariants(Array.from(r.values())
32),o=e.j.chooseVariant(),!o)?a.s(0):(s=[],e.K=o,o.video&&s.push(Op(e,o.video,n)),o.audio&&s.push(Op(e,o.audio,n)),(u=rs(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&$g(o.audio,u,e.g)&&(s.push(Op(e,u,n)),e.W=u),S(a,Promise.all(s),0))})}function Op(e,t,n){var i,r,o,s,u;return C(function(a){return a.g==1?(i=e.g.streaming.segmentPrefetchLimit||2,r=new vl(i,t,function(l,c,d){return wl(l,c,d||null,e.g.streaming.retryParameters,e.Fa,e.A)},!1),e.M.set(t.id,r),t.segmentIndex?a.s(2):S(a,t.createSegmentIndex(),2)):(o=e.B||0,s=t.segmentIndex.Gb(o),u=null,s&&(u=s.current(),u||(u=s.next().value)),u||(u=Ni(t.segmentIndex)),u?n?u.Y?S(a,mv(r,u.Y),0):a.s(0):S(a,Du(r,u.startTime),0):a.s(0))})}f.Nj=function(){return this.m},f.destroy=function(){var e=this,t,n,i;return C(function(r){switch(r.g){case 1:if(e.u=!0,!e.l||e.oa){r.s(2);break}return S(r,e.l.stop(),2);case 2:if(!e.j||e.ea){r.s(4);break}return S(r,e.j.stop(),4);case 4:if(e.H&&!e.sa&&e.H.release(),!e.i||e.ka){r.s(6);break}return S(r,e.i.destroy(),6);case 6:if(0<e.M.size&&!e.Aa)for(t=g(e.M.values()),n=t.next();!n.done;n=t.next())i=n.value,ji(i);q(r)}})};function QE(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}Y("shaka.media.PreloadManager",ui),ui.prototype.destroy=ui.prototype.destroy,ui.prototype.waitForFinish=ui.prototype.Nj,ui.prototype.getPrefetchedTextTrack=ui.prototype.Bi,ui.prototype.getPrefetchedVariantTrack=ui.prototype.Ci;function Io(e,t){qe.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Jc:null,Ic:As,xc:function(i,r){return hr(n,"enter",i,r)}},{Jc:Ou,Ic:As,xc:function(i,r){return hr(n,"enter",i,r)}},{Jc:_u,Ic:As,xc:function(i,r){return hr(n,"enter",i,r)}},{Jc:As,Ic:Ou,xc:function(i,r){return hr(n,"exit",i,r)}},{Jc:As,Ic:_u,xc:function(i,r){return hr(n,"exit",i,r)}},{Jc:Ou,Ic:_u,xc:function(i,r){r?hr(n,"skip",i,r):(hr(n,"enter",i,r),hr(n,"exit",i,r))}},{Jc:_u,Ic:Ou,xc:function(i,r){return hr(n,"skip",i,r)}}],this.h=new Le,this.h.D(this.i,"regionremove",function(i){n.g.delete(i.region)})}ct(Io,qe),Io.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,qe.prototype.release.call(this)},Io.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=g(this.i.h.values()),i=n.next();!i.done;i=n.next()){i=i.value;var r=this.g.get(i),o=e<i.startTime?Ou:e>i.endTime?_u:As;this.g.set(i,o);for(var s=g(this.m),u=s.next();!u.done;u=s.next())u=u.value,u.Jc==r&&u.Ic==o&&u.xc(i,t)}}};function hr(e,t,n,i){t=new z(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}var Ou=1,As=2,_u=3;function Mo(e,t,n){var i,r,o,s,u,a,l;return C(function(c){switch(c.g){case 1:var d=new vt(e).ab.split("/").pop().split(".");return i=d.length==1?"":d.pop().toLowerCase(),(r=$E.get(i))?c.return(r):(o=0,s=Ot([e],n),ee(c,2),s.method="HEAD",S(c,t.request(o,s).promise,4));case 4:u=c.h,r=u.headers["content-type"],fe(c,3);break;case 2:if(a=re(c),!a||a.code!=1002&&a.code!=1001){c.s(3);break}return s.method="GET",S(c,t.request(o,s).promise,6);case 6:l=c.h,r=l.headers["content-type"];case 3:return c.return(r?r.toLowerCase().split(";").shift():"")}})}var $E=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function kv(e,t){if(e.lineBreak)return`
33`;if(e.nestedCues.length)return e.nestedCues.map(function(s){return kv(s,e)}).join("");if(!e.payload)return e.payload;var n=[],i=e.fontWeight>
33=Zo,r=e.fontStyle==es,o=e.textDecoration.includes(ir);return i&&n.push(["b"]),r&&n.push(["i"]),o&&n.push(["u"]),r=e.color,r==""&&t&&(r=t.color),i="",(r=Dv(r))&&(i+="."+r),r=e.backgroundColor,r==""&&t&&(r=t.backgroundColor),(t=Dv(r))&&(i+=".bg_"+t),i&&n.push(["c",i]),n.reduceRight(function(s,u){var a=g(u);return u=a.next().value,a=a.next().value,"<"+u+(a===void 0?"":a)+">"+s+"</"+u+">"},e.payload)}function Dv(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function _p(e,t){var n=[];e=g(Pv(e));for(var i=e.next();!i.done;i=e.next())if(i=i.value,i.isContainer)n.push.apply(n,W(_p(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=kv(i,t),n.push(r)}return n}function Pv(e){var t=[];e=g(e);for(var n=e.next(),i={};!n.done;i={lf:void 0},n=e.next())i.lf=n.value,t.some(function(r){return function(o){return Fa(r.lf,o)}}(i))||t.push(i.lf);return t}function JE(e){function t(i){for(var r=5381,o=i.length;o;)r=33*r^i.charCodeAt(--o);return(r>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function rn(e,t){for(this.h=e,this.i=t,this.g=null,e=g(Array.from(this.h.textTracks)),t=e.next();!t.done;t=e.next())t=t.value,t.kind!=="metadata"&&t.kind!=="chapters"&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}f=rn.prototype,f.configure=function(){},f.remove=function(e,t){return this.g?(Lv(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},f.append=function(e){if(this.g){var t=_p(e),n=[];e=this.g.cues?Array.from(this.g.cues):[],t=g(t);for(var i=t.next(),r={};!i.done;r={Tc:void 0},i=t.next())r.Tc=i.value,!e.some(function(o){return function(s){return s.startTime==o.Tc.startTime&&s.endTime==o.Tc.endTime&&s.text==o.Tc.payload}}(r))&&r.Tc.payload&&(i=JE(r.Tc))&&n.push(i);for(e=n.slice().sort(function(o,s){return o.startTime!=s.startTime?o.startTime-s.startTime:o.endTime!=s.endTime?o.endTime-s.startTime:"line"in VTTCue.prototype?n.indexOf(s)-n.indexOf(o):n.indexOf(o)-n.indexOf(s)}),e=g(e),t=e.next();!t.done;t=e.next())this.g.addCue(t.value)}},f.destroy=function(){return this.g&&(Lv(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},f.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},f.setTextVisibility=function(e){e&&!this.g&&Rv(this),this.g&&(this.g.mode=e?"showing":"hidden")},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){Rv(this)};function Rv(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function Lv(e,t){var n=e.mode;e.mode=n=="showing"?"showing":"hidden";for(var i=g(Array.from(e.cues)),r=i.next();!r.done;r=i.next())(r=r.value)&&t(r)&&e.removeCue(r);e.mode=n}Y("shaka.text.SimpleTextDisplayer",rn),rn.prototype.enableTextDisplayer=rn.prototype.enableTextDisplayer,rn.prototype.setTextLanguage=rn.prototype.setTextLanguage,rn.prototype.setTextVisibility=rn.prototype.setTextVisibility,rn.prototype.isTextVisible=rn.prototype.isTextVisible,rn.prototype.destroy=rn.prototype.destroy,rn.prototype.append=rn.prototype.append,rn.prototype.remove=rn.prototype.remove,rn.prototype.configure=rn.prototype.configure;function on(){}f=on.prototype,f.configure=function(){},f.remove=function(){},f.append=function(){},f.destroy=function(){},f.isTextVisible=function(){return!1},f.setTextVisibility=function(){},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){},Y("shaka.text.StubTextDisplayer",on),on.prototype.enableTextDisplayer=on.prototype.enableTextDisplayer,on.prototype.setTextLanguage=on.prototype.setTextLanguage,on.prototype.setTextVisibility=on.prototype.setTextVisibility,on.prototype.isTextVisible=on.prototype.isTextVisible,on.prototype.destroy=on.prototype.destroy,on.prototype.append=on.prototype.append,on.prototype.remove=on.prototype.remove,on.prototype.configure=on.prototype.configure;function sn(e,t){var n=this;document.fullscreenEnabled||Pe("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen"),this.A=!1,this.h=[],this.j=e,this.C=t,this.u=this.m=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.C.appendChild(this.g),this.o=new ke(function(){n.j.paused||Fr(n)}),bu(this),this.l=new Map,this.i=new Le,this.i.D(document,"fullscreenchange",function(){Fr(n,!0)}),this.i.D(this.j,"seeking",function(){Fr(n,!0)}),this.i.D(this.j,"ratechange",function(){bu(n)}),this.i.D(this.j,"resize",function(){var i=n.j,r=i.videoWidth;i=i.videoHeight,r&&i?n.m=r/i:n.m=null}),this.B=null,"ResizeObserver"in j&&(this.B=new ResizeObserver(function(){Fr(n,!0)}),this.B.observe(this.g)),this.F=new Map}f=sn.prototype,f.configure=function(e){this.u=e,bu(this),Fr(this,!0)},f.append=function(e){var t=[].concat(W(this.h));e=g(Pv(e));for(var n=e.next(),i={};!n.done;i={mf:void 0},n=e.next())i.mf=n.value,t.some(function(r){return function(o){return Fa(o,r.mf)}}(i))||this.h.push(i.mf);this.h.length&&bu(this),Fr(this)},f.destroy=function(){return this.g&&(this.C.removeChild(this.g),this.g=null,this.A=!1,this.h=[],this.o&&(this.o.stop(),this.o=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.B&&(this.B.disconnect(),this.B=null)),Promise.resolve()},f.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(i){return i.startTime<e||i.endTime>=t}),Fr(this,n>this.h.length),this.h.length||bu(this),!0},f.isTextVisible=function(){return this.A},f.setTextVisibility=function(e){this.A=e,Fr(this,!0)},f.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},f.enableTextDisplayer=function(){};function bu(e){e.o&&(e.h.length?e.o.ua((e.u?e.u.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.o.stop())}function ZE(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function Nv(e,t,n,i,r){var o=!1,s=[],u=[];t=g(t);for(var a=t.next();!a.done;a=t.next()){a=a.value,r.push(a);var l=e.l.get(a),c=a.startTime<=i&&a.endTime>i,d=l?l.Oh:null;l&&(s.push(l.nf),l.Ec&&s.push(l.Ec),c||(o=!0,e.l.delete(a),l=null)),c&&(u.push(a),l?ZE(e,d)||(o=!0):(eA(e,a,r),l=e.l.get(a),d=l.Oh,o=!0)),0<a.nestedCues.length&&d&&Nv(e,a.nestedCues,d,i,r),r.pop()}if(o){for(i=g(s),r=i.next();!r.done;r=i.next())r=r.value,r.parentElement&&r.parentElement.removeChild(r);for(u.sort(function(p,h){return p.startTime!=h.startTime?p.startTime-h.startTime:p.endTime-h.endTime}),u=g(u),i=u.next();!i.done;i=u.next())i=e.l.get(i.value),i.Ec?(i.Ec.contains(n)&&i.Ec.removeChild(n),n.appendChild(i.Ec),i.Ec.appendChild(i.nf)):n.appendChild(i.nf)}}function Fr(e,t){if(e.g){var n=e.j.currentTime;if(!e.A||(t===void 0?0:t)){t=g(e.F.values());for(var i=t.next();!i.done;i=t.next())_r(i.value);_r(e.g),e.l.clear(),e.F.clear()}e.A&&Nv(e,e.h,e.g,n,[])}}function eA(e,t,n){var i=1<n.length,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&0<t.nestedCues.length;var o=document.createElement(r);if(r!="br"&&nA(e,o,t,n,i),n=null,t.region&&t.region.id){var s=t.regi
vendor: 4,621 bytes, line 33
33on,u=e.m===4/3?2.5:1.9;if(n=s.id+"_"+s.width+"x"+s.height+(s.heightUnits==Un?"%":"px")+"-"+s.viewportAnchorX+"x"+s.viewportAnchorY+(s.viewportAnchorUnits==Un?"%":"px"),e.F.has(n))n=e.F.get(n);else{r=document.createElement("span");var a=s.heightUnits==Un?"%":"px",l=s.widthUnits==Un?"%":"px",c=s.viewportAnchorUnits==Un?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var d=s.height,p=s.width;s.heightUnits===2&&(d=5.33*s.height,a="%"),s.widthUnits===2&&(p=s.width*u,l="%"),r.style.height=d+a,r.style.width=p+l,s.viewportAnchorUnits===2?(u=s.viewportAnchorY/75*100,a=s.viewportAnchorX/(e.m===4/3?160:210)*100,u-=s.regionAnchorY*d/100,a-=s.regionAnchorX*p/100,r.style.top=u+"%",r.style.left=a+"%"):(r.style.top=s.viewportAnchorY-s.regionAnchorY*d/100+c,r.style.left=s.viewportAnchorX-s.regionAnchorX*p/100+c),s.heightUnits!==0&&s.widthUnits!==0&&s.viewportAnchorUnits!==0&&(s=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=s+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent=t.displayAlign=="before"?"flex-start":t.displayAlign=="center"?"center":"flex-end",e.F.set(n,r),n=r}}r=o,i&&(r=document.createElement("span"),r.classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",o.appendChild(r)),e.l.set(t,{nf:o,Oh:r,Ec:n})}function tA(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==Va?n:e==="left"||e==="start"&&t===au||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===au?"line-right":"center"}function nA(e,t,n,i,r){var o=t.style,s=n.nestedCues.length==0,u=1<i.length;o.whiteSpace="pre-wrap";var a=n.payload.replace(/\s+$/g,function(c){return"\xA0".repeat(c.length)});if(o.webkitTextStrokeColor=n.textStrokeColor,o.webkitTextStrokeWidth=n.textStrokeWidth,o.color=n.color,o.direction=n.direction,o.opacity=n.opacity,o.paddingLeft=bp(n.linePadding,n,e.C),o.paddingRight=bp(n.linePadding,n,e.C),o.textCombineUpright=n.textCombineUpright,o.textShadow=n.textShadow,n.backgroundImage)o.backgroundImage="url('"+n.backgroundImage+"')",o.backgroundRepeat="no-repeat",o.backgroundSize="contain",o.backgroundPosition="center",n.backgroundColor&&(o.backgroundColor=n.backgroundColor),o.width="100%",o.height="100%";else{if(n.nestedCues.length)var l=t;else l=document.createElement("span"),t.appendChild(l);n.border&&(l.style.border=n.border),r||((t=iA(i,function(c){return c.backgroundColor}))?l.style.backgroundColor=t:a&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),a&&(l.textContent=a)}u&&!i[i.length-1].isContainer?o.display="inline":(o.display="flex",o.flexDirection="column",o.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(o.width="100%",o.alignItems="start"):(n.textAlign=="right"||n.textAlign=="end")&&(o.width="100%",o.alignItems="end"),o.justifyContent=n.displayAlign=="before"?"flex-start":n.displayAlign=="center"?"center":"flex-end"),s||(o.margin="0"),o.fontFamily=n.fontFamily,o.fontWeight=n.fontWeight.toString(),o.fontStyle=n.fontStyle,o.letterSpacing=n.letterSpacing,o.fontSize=bp(n.fontSize,n,e.C,e.u?e.u.fontScaleFactor:1),i=n.line,i!=null&&(s=n.lineInterpretation,s==lu&&(s=1,u=16,e.m&&1>e.m&&(u=32),i=0>i?100+i/u*100:i/u*100),s==1&&(o.position="absolute",n.writingMode==lo?(o.width="100%",n.lineAlign==co?o.top=i+"%":n.lineAlign=="end"&&(o.bottom=100-i+"%")):n.writingMode=="vertical-lr"?(o.height="100%",n.lineAlign==co?o.left=i+"%":n.lineAlign=="end"&&(o.right=100-i+"%")):(o.height="100%",n.lineAlign==co?o.right=i+"%":n.lineAlign=="end"&&(o.left=100-i+"%")))),o.lineHeight=n.lineHeight,e=tA(n),e=="line-left"?(o.cssFloat="left",n.position!==null&&(o.position="absolute",n.writingMode==lo?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%")):e=="line-right"?(o.cssFloat="right",n.position!==null&&(o.position="absolute",n.writingMode==lo?(o.right=100-n.position+"%",o.width="auto"):o.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(o.position="absolute",n.writingMode==lo?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%"),o.textAlign=n.textAlign,o.textDecoration=n.textDecoration.join(" "),o.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&o.writingMode==n.writingMode||(o.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==lo?o.width=n.size+"%":o.height=n.size+"%")}function bp(e,t,n,i){i=i===void 0?1:i;
33var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(e=r.unit,i*=r.value,e){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}function iA(e,t){for(var n=e.length-1;0<=n;n--){var i=t(e[n]);if(i||i===0)return i}return null}Y("shaka.text.UITextDisplayer",sn),sn.prototype.enableTextDisplayer=sn.prototype.enableTextDisplayer,sn.prototype.setTextLanguage=sn.prototype.setTextLanguage,sn.prototype.setTextVisibility=sn.prototype.setTextVisibility,sn.prototype.isTextVisible=sn.prototype.isTextVisible,sn.prototype.remove=sn.prototype.remove,sn.prototype.destroy=sn.prototype.destroy,sn.prototype.append=sn.prototype.append,sn.prototype.configure=sn.prototype.configure;function rA(e,t){function n(o){for(var s=o,u=g(t),a=u.next();!a.done;a=u.next())a=a.value,a.end&&a.start<o&&(s+=a.end-a.start);return o=Math.floor(s/3600),u=Math.floor(s/60%60),a=Math.floor(s%60),s=Math.floor(1e3*s%1e3),(10>o?"0":"")+o+":"+(10>u?"0":"")+u+":"+(10>a?"0":"")+a+"."+(100>s?10>s?"00":"0":"")+s}var i=_p(e);e=`WEBVTT
34
35`,i=g(i);for(var r=i.next();!r.done;r=i.next())r=r.value,e+=n(r.startTime)+" --> "+n(r.endTime)+function(o){var s=[];switch(o.textAlign){case"left":s.push("align:left");break;case"right":s.push("align:right");break;case Xi:s.push("align:middle");break;case"start":s.push("align:start");break;case"end":s.push("align:end")}switch(o.writingMode){case"vertical-lr":s.push("vertical:lr");break;case"vertical-rl":s.push("vertical:rl")}return s.length?" "+s.join(" "):""}(r)+`
36`,e+=r.payload+`
37
38`;return e}Y("shaka.text.WebVttGenerator",function(){});function Fp(e,t){this.h=e,this.g=t,this.i=void 0,this.u=!1,this.F=!0,this.l=this.B=!1,this.o=this.m=void 0,this.A=0,this.G=!1,this.C=new Le,this.j=null}Fp.prototype.setMediaElement=function(e){this.j=e,lA(this)},Fp.prototype.configure=function(e){this.g=e};function oA(e){e.u=!1,e.F=!0,e.B=!1,e.l=!1,e.m=0,e.o=0,e.A=0,e.G=!1,e.j=null,e.C.Ra()}function sA(e,t){e.l=t,e.l?e.i==Ul?e.i=Ol:e.i==_l&&(e.i=bl):e.i==Ol?e.i=Ul:e.i==bl&&(e.i=_l)}function uA(e,t){if(e.g&&e.g.enabled&&e.g.version==Ov&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.A=t}).catch(function(){e.A=0})}}function aA(e,t,n){try{if(!e.g.enabled)return t;var i=Bp(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var r=Rl;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=Nl;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r=Uv;break e}r=void 0}i.ot=r,i.su=!0;var o=Pl(i);return Vp(t,o)}catch(s){return zi("CMCD_SRC_ERROR","Could not generate src CMCD data.",s),t}}function lA(e){e.C.qa(e.j,"play",function(){e.m||(e.m=Date.now())}),e.C.qa(e.j,"playing",function(){e.o||(e.o=Date.now())})}function Bp(e){return e.g.sessionId||(e.g.sessionId=j.crypto.randomUUID()),{v:e.g.version,sf:e.i,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function Is(e,t,n){n=n===void 0?{}:n;var i=i===void 0?e.g.useHeaders:i;if(e.g.enabled){Object.assign(n,Bp(e)),n.pr=e.h.gb();var r=n.ot===Ll||n.ot===Nl;if(e.B&&r&&(n.bs=!0,n.su=!0,e.B=!1),n.su==null&&(n.su=e.F),n.v===Ov&&(e.h.U()&&(n.ltc=e.h.ce()),r=!e.G&&e.o&&e.m?e.o-(e.A||e.m):void 0,r!=null&&(n.msd=r,e.G=!0)),e=cA(e,n),i)i=hA(e),Object.keys(i).length&&Object.assign(t.headers,i);else{var o=Pl(e);o&&(t.uris=t.uris.map(function(s){return Vp(s,o)}))}}}function cA(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce(function(i,r){return n.includes(r)&&(i[r]=t[r]),i},{}):t}function dA(e){if(e.type===0)return gA;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?Nl:Ll;if(t=="audio")return Rl;if(t=="text")return e.mimeType==="application/mp4"?jl:Hp}}function pA(e,t){if(t=e.h.Fb()[t],!t.length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):NaN}function jv(e,t){if(t=e.h.Fb()[t],!t.length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):0}function fA(e,t){var n=e.h.Rb();if(!n.length)return NaN;e=n[0],n=g(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.type==="variant"&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case Ll:return e.videoBandwidth||NaN;
38case Rl:return e.audioBandwidth||NaN;default:return e.bandwidth}}function Pl(e){function t(d){return 100*n(d/100)}function n(d){return Math.round(d)}function i(d){return!Number.isNaN(d)&&d!=null&&d!==""&&d!==!1}var r=[],o={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(d){return encodeURIComponent(d)},rtp:t,tb:n},s=Object.keys(e||{}).sort();s=g(s);for(var u=s.next();!u.done;u=s.next()){u=u.value;var a=e[u];if(i(a)&&(u!=="v"||a!==1)&&(u!="pr"||a!==1)){var l=o[u];l&&(a=l(a)),l=typeof a;var c=void 0;c=l==="string"&&u!=="ot"&&u!=="sf"&&u!=="st"?u+"="+JSON.stringify(a):l==="boolean"?u:l==="symbol"?u+"="+a.description:u+"="+a,r.push(c)}}return r.join(",")}function hA(e){var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};t=g(t);for(var s=t.next();!s.done;s=t.next())s=s.value,r[o[s]!=null?o[s]:1][s]=e[s];for(e=0;e<r.length;e++)(o=Pl(r[e]))&&(n["CMCD-"+i[e]]=o);return n}function Vp(e,t){return!t||e.includes("offline:")?e:(e=new vt(e),e.g.set("CMCD",t),e.toString())}var Uv="m",Rl="a",Ll="v",Nl="av",gA="i",Hp="c",jl="tt",Ov=2,Ul="d",Ol="ld",_l="h",bl="lh";Y("shaka.util.CmcdManager.StreamingFormat",{DASH:Ul,jk:Ol,HLS:_l,kk:bl,yk:"s",OTHER:"o"});function ai(e){this.h=e,this.g=null}f=ai.prototype,f.configure=function(e){this.h=e},f.Vg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Fv)?1e3*this.g.get(Fv):null},f.Tg=function(){return this.h.enabled&&this.g&&this.g.has(bv)?1e3*this.g.get(bv):null},f.Ei=function(){return this.h.enabled&&this.g&&this.g.has(Bv)?this.g.get(Bv):null},f.Fi=function(){return this.h.enabled&&this.g&&this.g.has(Vv)?this.g.get(Vv):null},f.getBandwidthEstimate=function(e){var t=this.Tg();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e};function _v(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}Y("shaka.util.CmsdManager",ai),ai.prototype.getBandwidthEstimate=ai.prototype.getBandwidthEstimate,ai.prototype.getRoundTripTime=ai.prototype.Fi,ai.prototype.getResponseDelay=ai.prototype.Ei,ai.prototype.getEstimatedThroughput=ai.prototype.Tg,ai.prototype.getMaxBitrate=ai.prototype.Vg;var bv="etp",Fv="mb",Bv="rd",Vv="rtt";function Hv(){this.g=null,this.h=[]}function Gp(e,t){return C(function(n){if(n.g==1)return e.g?S(n,new Promise(function(i){return e.h.push(i)}),2):n.s(2);e.g=t,q(n)})}Hv.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function G(e,t,n){t=t===void 0?null:t,qe.call(this);var i=this;this.m=Xl,this.h=null,this.He=t,this.na=!1,this.We=new Le,this.zd=new Le,this.l=new Le,this.Oa=new Le,this.Sb=new Le,this.G=this.I=this.C=this.F=null,this.Pd=0,this.$=new Hv,this.Z=this.Pb=this.T=this.i=this.Qb=this.H=this.j=this.xd=this.O=this.Ag=this.fa=this.L=this.Ga=this.Aa=this.yd=this.M=this.oa=this.K=this.Ma=null,this.sa=!1,this.Fa=this.o=null,this.Ae=1e9,this.Ve=[],this.Jd=[],this.Ye=-1,this.g=gr(this),this.Ze=Iv(),this.P=null,this.Qd=-1,this.Na=null,this.ka={width:1/0,height:1/0},this.xe=new Yd(this.g,this.ka,null),this.Re=[],this.A=null,this.W=this.g.adaptationSetCriteriaFactory(),this.W.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,Sc:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Kc:this.g.preferredAudioLabel,fd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),this.Tb=this.g.preferredTextLanguage,this.Hd=this.g.preferredTextRole,this.Fd=this.g.preferForcedSubs,this.Cd=[],n&&n(this),this.L=PA(this),this.fa=new ai(this.g.cmsd),this.F=$v(this),this.F.mg(this.g.streaming.forceHTTP),this.F.ng(this.g.streaming.forceHTTPS),this.F.o=this.g.streaming.minBytesForProgressEvents,this.Ub=this.ea=this.B=null,this.af=!1,this.$e=new ke(function(){return C(function(r){if(r.g==1)return i.ea?S(r,i.Lb(i.Ub,!0),3):r.s(0);if(r.g!=4)return S(r,i.load(i.ea),4);i.af?i.Ub.pause():i.Ub.play(),i.ea=null,i.af=!1,q(r)})}),Kl&&(this.B=Kl(),this.B.configure(this.g.ads),this.Sb.D(this.B,"ad-content-pause-requested",function(r){var o;return C(function(s){if(s.g==1)return i.$e.stop(),i.ea?s.s(0):(i.Ub=i.h,i.af=i.Uc(),o=r.saveLivePosition||!1,S(s,i.Ng(!0,o),3));i.ea=s.h,q(s)})}),this.Sb.D(this.B,"ad-content-resume-requested",function(r){if(r=r.offset||0,i.ea){var o=i.ea;o.B&&r&&(o.B+=r)}i.$e.da(.1)}),this.Sb.D(this.B,"ad-content-attach-requested",function(){return C(function(r){return i.h||!i.Ub?r.s(0):S(r,i.Lb(i.Ub,!0),0)})})),this.We.D(j,"online",function(){Yp(i),i.gg()}),this.Je=new ke(function(){for(var r=Date.now()/1e3,o=!1,s=!0,u=g(i.i.variants),a=u.next();!a.done;a=u.next())a=a.value,0<a.disabledUntilTime&&a.disabledUntilTime<=r&&(a.disabledUntilTime=0,o=!0),0<a.disabledUntilTime&&(s=!1);s&&i.Je.stop(),o&&Cs(i,!1,void 0,!1,!1)}),this.za=null,e&&(Ue("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Lb(e,!0)),this.u=null}ct(G,qe);function Fl(e){e.O!=null&&(mg(e.O),e.O.release(),e.O=null)}function mA(e,t,n){n||t.lcevc.enabled?(Fl(e),e.O==null&&(e.O=new eu(e.h,e.Ag,t.lcevc,n),e.I&&(e.I.K=e.O))):Fl(e)}function nt(e,t){return new z(e,t)}f=G.prototype,f.destroy=function(){var e=this,t;return C(function(n){switch(n.g){case 1:return e.m==Ii?n.return():(Fl(e),t=e.detach(),e.m=Ii,S(n,t,2));case 2:return S(n,e.rf(),3);case 3:if(e.We&&(e.We.release(),e.We=null),e.zd&&(e.zd.release(),e.zd=null),e.l&&(e.l.release(),e.l=null),e.Oa&&(e.Oa.release(),e.Oa=null),e.Sb&&(e.Sb.release(),e.Sb=null),e.Fa=null,e.g=null,e.A=null,e.He=null,e.L=null,e.fa=null,!e.F){n.s(4);break}return S(n,e.F.destroy(),5);case 5:e.F=null;case 4:e.o&&(e.o.release(),e.o=null),qe.prototype.release.call(e),q(n)}})};function Gv(e,t){Ty.set(e,t)}function Ms(e,t){e.dispatchEvent(nt("onstatechange",new Map().set("state",t)))}f.Lb=function(e,t){t=t===void 0?!0:t;var n=this,i,r,o;return C(function(s){switch(s.g){case 1:if(n.m==Ii)throw new k(2,7,7e3);if(i=n.h&&n.h==e,!n.h||n.h==e){s.s(2);break}return S(s,n.detach(),2);case 2:return S(s,Xp(n,"attach"),4);case 4:if(s.h)return s.return();if(ee(s,5,6),i||(Ms(n,"attach"),r=function(){var u=Qp(n,!1);u&&ks(n,u)},n.zd.D(e,"error",r),n.h=e,n.L&&n.L.setMediaElement(e)),!t||!Fi()||n.I){s.s(6);break}return S(s,Kp(n),6);case 6:qt(s),n.$.release(),jt(s,0);break;case 5:return o=re(s),S(s,n.detach(),10);case 10:throw o}})},f.Wh=function(e){this.Ag=e},f.detach=function(e){e=e===void 0?!1:e;var t=this;return C(function(n){if(n.g==1){if(t.m==Ii)throw new k(2,7,7e3);return S(n,t.kc(!1,e),2)}if(n.g!=3)return S(n,Xp(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.zd.Ra(),t.h=null),Ms(t,"detach"),t.B&&!e&&t.B.release()}finally{t.$.release()}q(n)})};function Xp(e,t){var n;return C(function(i){return i.g==1?(n=++e.Pd,S(i,Gp(e.$,t),2)):n!=e.Pd?(e.$.release(),i.return(!0)):i.return(!1)})}f.kc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i,r,o,s,u,a,l,c,d,p;return C(function(h){switch(h.g){case 1:return n.m!=Ii&&(n.m=Xl),S(h,Xp(n,"unload"),2);case 2:return h.h?h.return():(It(h,3),n.sa=!1,Ms(n,"unload"),Fl(n),i=n.Cd.map(function(m){return m()}),n.Cd=[],S(h,Promise.all(i),5));case 5:if(n.dispatchEvent(nt("unloading")),n.yd&&(n.yd.release(),n.yd=null),n.Aa&&(n.Aa.release(),n.Aa=null),n.Ga&&(n.Ga.release(),n.Ga=null),n.h&&(n.l.Ra(),n.Oa.Ra()),n.Je.stop(),n.Ma&&(n.Ma.release(),n.Ma=null),n.oa&&(n.oa.stop(),n.oa=null),!n.H){h.s(6);break}return S(h,n.H.stop(),7);case 7:n.H=null,n.Qb=null;case 6:if(!n.o){h.s(8);break}return S(h,n.o.stop(),8);case 8:if(!n.j){h.s(10);break}return S(h,n.j.destroy(),11);case 11:n.j=null;case 10:if(n.K&&(n.K.release(),n.K=null),n.G&&(n.G.release(),n.G=null),j.shakaMediaKeysPolyfill!=="webkit"||!n.C){h.s(12);break}return S(h,n.C.destroy(),13);case 13:n.C=null;case 12:if(!n.I){h.s(14);break}return S(h,n.I.destroy(),15);case 15:n.I=null;case 14:if(n.B&&!t&&n.B.onAssetUnload(),n.ea&&!t&&(n.ea.destroy(),n.ea=null),t||n.$e.stop(),n.L&&oA(n.L),n.fa&&(n.fa.g=null),!n.u){h.s(16);break}return S(h,n.u.destroy(),17);case 17:n.u=null;case 16:if(n.h&&(_r(n.h),n.h.src&&(n.h.removeAttribute("src"),n.h.load())),!n.C){h.s(18);break}return S(h,n.C.destroy(),19);case 19:n.C=null;case 18:if(n.za&&n.T!=n.za.Qc()&&(n.za.u||n.za.destroy(),n.za=null),n.T=null,n.Pb=null,n.M=null,n.i){for(r=g(n.i.variants),o=r.
38next();!o.done;o=r.next())for(s=o.value,u=g([s.audio,s.video]),a=u.next();!a.done;a=u.next())(l=a.value)&&l.segmentIndex&&l.segmentIndex.release();for(c=g(n.i.textStreams),d=c.next();!d.done;d=c.next())p=d.value,p.segmentIndex&&p.segmentIndex.release()}n.g&&n.g.streaming.clearDecodingCache&&(Wa.clear(),Ho.clear()),n.i=null,n.A=new Dl,n.Xe=null,n.Na=null,n.P=null,n.Qd=-1,n.Ve=[],n.Jd=[],n.Ye=-1,n.F&&n.F.Jg(),Vl(n);case 3:qt(h),n.$.release(),jt(h,4);break;case 4:if(e&&Fi()&&!n.I&&n.h)return S(h,Kp(n),0);h.s(0)}})},f.Mj=function(e){this.Z=e},f.load=function(e,t,n){t=t===void 0?null:t;var i=this,r,o,s,u,a,l,c,d,p,h,m,y,v;return C(function(T){switch(T.g){case 1:if(i.m==Ii)throw new k(2,7,7e3);if(r=null,o="",e instanceof ui){if(e.u)throw new k(2,7,7006);r=e,o=r.Qc()||""}else o=e||"";return S(T,Gp(i.$,"load"),2);case 2:if(i.$.release(),!i.h)throw new k(2,7,7002);if(!i.T){T.s(3);break}return i.T=o,S(T,i.kc(!1),3);case 3:if(s=++i.Pd,u=function(){return C(function(w){if(w.g==1)return i.Pd==s?w.s(0):r?S(w,r.destroy(),3):w.s(3);throw new k(2,7,7e3)})},a=function(w,I){return C(function(M){switch(M.g){case 1:return It(M,2),S(M,Gp(i.$,I),4);case 4:return S(M,u(),5);case 5:return S(M,w(),6);case 6:return S(M,u(),7);case 7:r&&i.g&&(r.g=i.g);case 2:qt(M),i.$.release(),jt(M,0)}})},ee(T,5,6),t==null&&r&&(t=r.getStartTime()),i.Z=t,i.sa=!1,i.dispatchEvent(nt("loading")),r){n=r.Z,T.s(8);break}if(n){T.s(8);break}return S(T,a(function(){return C(function(w){if(w.g==1)return S(w,qv(i,o),2);n=w.h,q(w)})},"guessMimeType_"),8);case 8:if(l=!!r,r){Mv(r,i),i.A=r.getStats(),T.s(11);break}return S(T,Kv(i,o,t,n,!0),12);case 12:(r=T.h)?(r.A=!1,Mv(r,i),i.A=r.getStats(),r.start(),r.m.catch(function(){})):i.A=new Dl;case 11:return c=!r,d=Date.now()/1e3,i.A=r?r.getStats():new Dl,i.T=o,i.Pb=n||null,Vl(i),i.Aa=new ku(function(){return i.Ja()}),c?S(T,a(function(){return C(function(w){return S(w,SA(i,n),0)})},"initializeSrcEqualsDrmInner_"),23):(i.Ga=new ku(function(){return i.Ja()}),S(T,a(function(){return C(function(w){if(w.g==1)return S(w,Promise.race([r.na,r.m]),2);i.Qb=r.G;var I=r;I.oa=!0,i.H=I.l,i.i=r.Jf(),q(w)})},"waitForFinish"),15));case 15:if(i.I){T.s(16);break}return S(T,a(function(){return C(function(w){return S(w,Kp(i),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return i.i&&i.i.textStreams.length&&(i.u.enableTextDisplayer?i.u.enableTextDisplayer():Ue("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),S(T,a(function(){return C(function(w){return S(w,r.m,0)})},"waitForFinish"),18);case 18:if(i.g=r.getConfiguration(),i.xe=r.F,i.H&&i.H.setMediaElement&&i.h&&i.H.setMediaElement(i.h),i.yd=KE(r),i.xd=r.Ga,(p=r.o)&&(i.W=p),l&&i.h&&i.h.nodeName==="AUDIO"&&(vA(i),i.configure("manifest.disableVideo",!0)),r.i){T.s(19);break}return S(T,a(function(){return C(function(w){return S(w,Cv(r,i.h),0)})},"drmEngine_.init"),19);case 19:return i.C=WE(r),S(T,a(function(){return C(function(w){return S(w,i.C.Lb(i.h),0)})},"drmEngine_.attach"),21);case 21:return!(h=r.C)||i.Fa&&i.Fa==h||(i.o=XE(r),i.Fa=r.C,typeof i.o.setMediaElement!="function"&&(Ue("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),i.o.setMediaElement=function(){}),typeof i.o.setCmsdManager!="function"&&(Ue("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),i.o.setCmsdManager=function(){}),typeof i.o.trySuggestStreams!="function"&&(Ue("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),i.o.trySuggestStreams=function(){})),m=qE(r),y=r.K,S(T,a(function(){return C(function(w){return S(w,TA(i,d,y,m),0)})},"loadInner_"),22);case 22:GE(r),i.Pb&&Jt()&&Nd(i.Pb)&&_x(i.I,i.T,i.Pb),T.s(14);break;case 23:return S(T,a(function(){return C(function(w){return S(w,wA(i,d,n),0)})},"srcEqualsInner_"),14);case 14:i.dispatchEvent(nt("loaded"));case 6:if(qt(T),!r){T.s(25);break}return S(T,r.destroy(),25);case 25:i.za=null,jt(T,0);break;case 5:if(v=re(T),!v||v.code==7e3){T.s(27);break}return S(T,i.kc(!1),27);case 27:throw v}})};function vA(e){for(var t=g(e.i.variants),n=t.next();!n.done;
38n=t.next())n=n.value,n.video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(i){return i.audio})}f.Ij=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,i;return C(function(r){return r.g==1?S(r,Xv(n),2):r.g!=3?(i=r.h,S(r,n.kc(e,t),3)):r.return(i)})},f.Ng=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this,i;return C(function(r){return r.g==1?S(r,Xv(n,t),2):r.g!=3?(i=r.h,S(r,n.detach(e),3)):r.return(i)})};function Xv(e,t){t=t===void 0?!1:t;var n,i;return C(function(r){if(r.g==1)return n=null,e.i&&e.H&&e.Qb&&e.T?(i=e.h.currentTime,e.U()&&!t&&(i=null),S(r,Wv(e,e.T,i,e.Pb,!0,!1,!1),3)):r.s(2);if(r.g!=2){n=r.h,e.Re.push(n),e.H&&e.H.setMediaElement&&e.H.setMediaElement(null);var o=n,s=e.H,u=e.Qb;o.h=e.i,o.l=s,o.G=u,o=n,s=e.Fa,o.j=e.o,o.C=s,n.o=e.W,n.start(),e.i=null,e.H=null,e.Qb=null,e.o=null,e.Fa=null}return r.return(n)})}f.preload=function(e,t,n){t=t===void 0?null:t;var i=this,r;return C(function(o){return o.g==1?S(o,Kv(i,e,t,n),2):((r=o.h)?r.start():ks(i,new k(2,7,7005)),o.return(r))})},f.rf=function(){var e=this,t,n,i,r;return C(function(o){for(t=[],n=g(e.Re),i=n.next();!i.done;i=n.next())r=i.value,r.u||t.push(r.destroy());return e.Re=[],S(o,Promise.all(t),0)})};function Kv(e,t,n,i,r){r=r===void 0?!1:r;var o,s,u;return C(function(a){return a.g==1?i?a.s(2):S(a,qv(e,t),3):(a.g!=2&&(i=a.h),yA(e,i)?a.return(null):(o=!1,s=!0,r&&(e.o&&e.Fa==e.g.abrFactory&&(s=!1),e.h&&e.h.nodeName==="AUDIO"&&(o=!0)),u=Wv(e,t,n,i||null,!r,o,s),u=r?u.then(function(l){return l.A=!1,l}):u.then(function(l){return e.Re.push(l),l}),a.return(u)))})}function Wv(e,t,n,i,r,o,s){r=r===void 0?!0:r,o=o===void 0?!1:o,s=s===void 0?!0:s;var u,a,l,c,d,p,h,m,y,v,T,w,I,M;return C(function(R){return R.g==1?(u=null,a=Pi(e.g),o&&(a.manifest.disableVideo=!0),l=function(){return u.T&&u.u?null:u},c=function(){return l()?l().getConfiguration():e.g},e.ka.width!=1/0||e.ka.height!=1/0||e.g.ignoreHardwareResolution?R.s(2):S(R,dg(),3)):(R.g!=2&&(d=R.h,e.ka.width=d.width,e.ka.height=d.height),p=new Yd(a,e.ka,null),h={networkingEngine:e.F,filter:function(A){var E,D;return C(function(P){if(P.g==1)return S(P,Cm(p,A),2);if(P.g!=4)return E=P.h,E?(D=nt("trackschanged"),S(P,Promise.resolve(),4)):P.s(0);u.dispatchEvent(D),q(P)})},makeTextStreamsForClosedCaptions:function(A){return jA(e,A)},onTimelineRegionAdded:function(A){mp(u.H,A)},onEvent:function(A){return u.dispatchEvent(A)},onError:function(A){return u.onError(A)},isLowLatencyMode:function(){return c().streaming.lowLatencyMode},updateDuration:function(){e.j&&u.T&&e.j.updateDuration()},newDrmInfo:function(A){var E=u.i,D=E?E.h:null;D&&E.A&&Pm(p,D.keySystem,A)},onManifestUpdated:function(){var A=new Map().set("isLive",e.U());u.dispatchEvent(nt("manifestupdated",A)),Uu(u,!1,function(){e.B&&e.B.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(A,E,D,P){var O=A;A=="com.apple.hls.interstitial"&&(O="com.apple.quicktime.HLS",A={startTime:E,endTime:D,values:P},e.B)&&e.B.onHLSInterstitialMetadata(e,e.h,A),P=g(P),A=P.next();for(var L={};!A.done;L={ag:void 0},A=P.next())L.ag=A.value,L.ag.name!="ID"&&Uu(u,!1,function(U){return function(){Wp(e,E,D,O,U.ag)}}(L))},disableStream:function(A){return e.disableStream(A,e.g.streaming.maxDisabledTime)},addFont:function(A,E){return e.addFont(A,E)}},m=new ku(function(){return e.Ja()}),m.addEventListener("regionadd",function(A){var E=A.region;Hu(e,"timelineregionadded",E,u),Uu(u,!1,function(){e.B&&(e.B.onDashTimedMetadata(E),e.B.onDASHInterstitialMetadata(e,e.h,E))})}),y=null,a.streaming.observeQualityChanges&&(y=new gl(function(){return e.Fb()}),y.addEventListener("qualitychange",function(A){gy(e,A.quality,A.position)}),y.addEventListener("audiotrackchange",function(A){gy(e,A.quality,A.position,!0)})),v=!0,T={Xb:e.F,onError:function(A){return u.onError(A)},te:function(A){Uu(u,!0,function(){e:{var E=A,D=nt("keystatuschanged");e.dispatchEvent(D);var P=Object.keys(E);P.length==1&&P[0]==""&&(P=["00"],E={"00":E[""]}),D=P.length==1&&P[0]=="00";var O=!1;if(P.length){P=e.keySystem();for(var L=vo(e.g.drm.clearKeys),U=g(e.i.variants),_=U.next();!_.done;_=U.next()){_=_.value;var F=[];_.audio&&F.push(_.audio),_.video&&F.push(_.video),F=g(F);for(var H=F.next();!H.done;H=F.next()){var V=H.value;if(H=_.allowedByKeySystem,V.keyIds.size)if(V.drmInfos.length&&!L.size){V=g(V.drmInfos);for(var X=V.next();!X.done;X=V.next())if(X=X.value,X.keyIds.size&&X.keySystem==P){_.allowedByKeySystem=!0,X=g(X.keyIds);for(var K=X.next();!K.done;K=X.next())K=K.value,((K=E[D?"00":K])||e.C.F)&&(_.allowedByKeySystem=_.allowedByKeySystem&&!!K&&!Qd.includes(K))}}else for(_.allowedByKeySystem=!0,V=g(V.keyIds),X=V.next();!X.done;X=V.next())X=X.value,((X=E[D?"00":X])||e.C.F)&&(_.allowedByKeySystem=_.allowedByKeySystem&&!!X&&!Qd.includes(X));H!=_.allowedByKeySystem&&(O=!0)}}}if(O&&(Pn(e),!Co(e)))break e;(E=e.j.l)&&!E.allowedByKeySystem&&Cs(e)}})},onExpirationUpdated:function(A,E){var D=nt("expirationupdated");u.dispatchEvent(D),(D=u.l)&&D.onExpirationUpdated&&D.onExpirationUpdated(A,E)},onEvent:function(A){u.dispatchEvent(A),A.type=="drmsessionupdate"&&v&&(v=!1,A=Date.now()/1e3-u.za,(e.A||u.getStats()).j=A,e.O&&mg(e.O))}},w=$v(e,l),rm(e.F,w),I=function(){return e.Lc(T)},M={config:a,bj:h,mj:m,lj:y,Lc:I,aj:p,networkingEngine:w,Vh:r,Uh:s},u=new ui(t,i,n,M),R.return(u))})}function qv(e,t){var n,i;return C(function(r){return r.g==1?(n=e.g.manifest.retryParameters,S(r,Mo(t,e.F,n),2)):(i=r.h,i=="application/x-mpegurl"&&Jt()&&(i="application/vnd.apple.mpegurl"),r.return(i))})}function yA(e,t){if(!Fi())return!0;
38if(t){if((e.h||cg()).canPlayType(t)=="")return!1;if(!Fi()||!cs.has(t))return!0;if(Nd(t))return Jt()&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function zv(e){var t=e.g.textDisplayFactory;t!==e.Xe&&(e.u=t(),e.u.configure?e.u.configure(e.g.textDisplayer):Ue("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.Xe=t,e.u.setTextVisibility(e.na))}function Kp(e){var t,n,i;return C(function(r){if(r.g==1)return Ms(e,"media-source"),e.h.removeAttribute("src"),_r(e.h),zv(e),t=DA(e.h,e.u,{ui:function(){return e.keySystem()},onMetadata:function(o,s,u){o=g(o);for(var a=o.next();!a.done;a=o.next())if(a=a.value,a.data&&typeof a.cueTime=="number"&&a.frames){var l=a.cueTime+s,c=u;c&&l>c&&(c=l);for(var d=g(a.frames),p=d.next();!p.done;p=d.next())Wp(e,l,c,"org.id3",p.value);e.B&&e.B.onHlsTimedMetadata(a,l)}},gj:function(o){e.Ga&&mp(e.Ga,{schemeIdUri:o.schemeIdUri,startTime:o.startTime,endTime:o.endTime,id:String(o.id),emsg:o})},onEvent:function(o){return e.dispatchEvent(o)},ij:function(){e.H&&e.H.update&&e.H.update()}},e.O),t.configure(e.g.mediaSource),n=e.g.manifest,i=n.segmentRelativeVttTiming,t.Ea=i,S(r,t.H,2);e.I=t,q(r)})}function Yv(e,t,n){function i(){return zp(e)}e.l.D(t,"playing",i),e.l.D(t,"pause",i),e.l.D(t,"ended",i),e.l.D(t,"ratechange",function(){var r=e.h.playbackRate;r!=0&&(e.K&&(e.K.set(r),e.m==cn&&e.o.playbackRateChanged(r),uy(e,r)),r=nt("ratechange"),e.dispatchEvent(r))}),t.remote&&(e.l.D(t.remote,"connect",function(){return Pn(e)}),e.l.D(t.remote,"connecting",function(){return Pn(e)}),e.l.D(t.remote,"disconnect",function(){return C(function(r){if(r.g==1)return e.j&&t.remote.state=="disconnected"?S(r,xl(e.j),2):r.s(2);Pn(e),q(r)})}
38)),t.audioTracks&&(e.l.D(t.audioTracks,"addtrack",function(){return Pn(e)}),e.l.D(t.audioTracks,"removetrack",function(){return Pn(e)}),e.l.D(t.audioTracks,"change",function(){return Pn(e)})),t.textTracks&&(e.l.D(t.textTracks,"addtrack",function(r){if(r.track)switch(r=r.track,r.kind){case"metadata":AA(e,r);break;case"chapters":IA(e,r);break;default:Pn(e)}}),e.l.D(t.textTracks,"removetrack",function(){return Pn(e)}),e.l.D(t.textTracks,"change",function(){return Pn(e)}),e.g.streaming.crossBoundaryStrategy!=="keep"&&(e.l.D(t,"waiting",function(){e.j&&Dp(e.j)}),e.l.D(t,"timeupdate",function(){e.j&&Dp(e.j)}))),t.preload!="none"&&e.l.qa(t,"loadedmetadata",function(){e.A.C=Date.now()/1e3-n})}function TA(e,t,n,i){var r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_;return C(function(F){switch(F.g){case 1:for(Ms(e,"load"),r=e.h,e.K=new Cu({de:function(){return r.playbackRate},sc:function(){return r.defaultPlaybackRate},og:function(H){r.playbackRate=H},hh:function(H){r.currentTime+=H}}),Yv(e,r,t),o=!1,s=g(e.i.variants),u=s.next();!u.done;u=s.next())a=u.value,(l=a.video&&a.video.dependencyStream)&&(o=vg(l));mA(e,e.g,o),e.Tb=e.g.preferredTextLanguage,e.Hd=e.g.preferredTextRole,e.Fd=e.g.preferForcedSubs,$p(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.o.init(function(H,V,X){e.i&&e.j&&H!=e.j.l&&Bu(e,H,!0,V===void 0?!1:V,X===void 0?0:X)}),e.o.setMediaElement(r),e.o.setCmsdManager(e.fa),e.j=RA(e),e.j.configure(e.g.streaming),e.m=cn,e.dispatchEvent(nt("streaming")),c=n;case 2:for((p=e.j.l)||c||(c=Co(e)?e.o.chooseVariant():null),h=[],d=p||c,m=g([d.video,d.audio]),y=m.next();!y.done;y=m.next())(v=y.value)&&!v.segmentIndex&&(h.push(v.createSegmentIndex()),v.dependencyStream&&h.push(v.dependencyStream.createSegmentIndex()));if(!(0<h.length)){F.s(4);break}return S(F,Promise.all(h),4);case 4:if(!d||d.disabledUntilTime!=0){F.s(2);break}if(e.H&&e.H.onInitialVariantChosen&&e.H.onInitialVariantChosen(d),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Ze):Pe("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),e.L&&(sA(e.L,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),uA(e.L,1e3*t)),$p(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),fE(e.j,e.g.playRangeStart,e.g.playRangeEnd),T=function(H){e.G=MA(e,H),e.Ma=CA(e,H),Jv(e,r,!1)},e.g.streaming.startAtSegmentBoundary||(w=e.Z,w==null&&e.i.startTime&&(w=e.i.startTime),T(w)),p){F.s(7);break}if(!e.g.streaming.startAtSegmentBoundary){F.s(8);break}return I=e.i.presentationTimeline,M=e.Z||e.h.currentTime,e.Z==null&&e.i.startTime&&(M=e.i.startTime),R=I.Hb(),A=I.ob(),M<R?M=R:M>A&&(M=A),S(F,UA(c,M),9);case 9:E=F.h,T(E);case 8:Bu(e,c,!0,!1,0);case 7:return e.G.ready(),D=e.vc().find(function(H){return H.active}),D||((P=rs(e.i.textStreams,e.Tb,e.Hd,e.Fd)[0]||null)&&jp(e.A.h,P,!0),c&&(P?($g(c.audio,P,e.g)&&(e.na=!0),e.na&&e.u.setTextVisibility(!0),fy(e)):e.na=!1),P&&(e.g.streaming.alwaysStreamText||e.Rf())&&(yl(e.j,P),Vu(e))),S(F,e.j.start(i),10);case 10:e.g.abr.enabled&&(e.o.enable(),hy(e)),Pn(e),Co(e),e.i.variants.some(function(H){return H.primary}),((O=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(L=function(){return ay(e)},e.l.D(r,"timeupdate",L)),O||(U=function(){return Hl(e)},e.l.D(r,"timeupdate",U),Hl(e),e.i.nextUrl&&(0<e.g.streaming.preloadNextUrlWindow&&(_=function(){var H;return C(function(V){if(V.g==1)return H=e.Ja().end-e.h.currentTime,isNaN(H)||!(H<=e.g.streaming.preloadNextUrlWindow)?V.s(0):(e.l.Ka(r,"timeupdate",_),S(V,e.preload(e.i.nextUrl),4));e.za=V.h,q(V)})},e.l.D(r,"timeupdate",_)),e.l.D(r,"ended",function(){e.load(e.za||e.i.nextUrl)}))),e.B&&e.B.onManifestUpdated(O),e.sa=!0,q(F)}})}function SA(e,t){var n,i,r,o,s;return C(function(u){return u.g==1?(n=Mt,i=Date.now()/1e3,r=!0,e.C=e.Lc({Xb:e.F,onError:function(a){ks(e,a)},te:function(){},onExpirationUpdated:function(){var a=nt("expirationupdated");e.dispatchEvent(a)},onEvent:function(a){e.dispatchEvent(a),a.type=="drmsessionupdate"&&r&&(r=!1,e.A.j=Date.now()/1e3-i)}}),e.C.configure(e.g.drm),o={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},s={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:t?On(t):"",codecs:t?_n(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.la,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},s.fullMimeTypes.add(Tt(s.mimeType,s.codecs)),t.startsWith("audio/")?(s.type=n.V,o.audio=s):o.video=s,e.C.$=!0,S(u,pm(e.C,[o],[]),2)):S(u,e.C.Lb(e.h),0)})}function wA(e,t,n){var i,r,o,s,u,a,l,c,d,p,h,m;return C(function(y){switch(y.g){case 1:if(Ms(e,"src-equals"),i=e.h,e.G=new lv(i),r=!1,e.Cd.push(function(){r=!0}),e.Z!=null&&e.G.cf(e.Z),e.Ma=kA(e,e.Z||0),e.K=new Cu({de:function(){return i.playbackRate},sc:function(){return i.defaultPlaybackRate},og:function(v){i.playbackRate=v},hh:function(v){i.currentTime+=v}}),Jv(e,i,!0),i.textTracks&&(zv(e),o=function(){var v=Fu(e).find(function(T){return T.mode!=="disabled"});v&&(v.mode="showing"),(v=oy(e))&&(v.mode="hidden")},s=function(){var v=Fu(e).find(function(w){return w.mode!=="disabled"});v&&(v.mode="hidden"),v=oy(e);var T=e.u.isTextVisible();v&&T&&(v.mode="showing")},e.l.D(i,"enterpictureinpicture",function(){return o()}),e.l.D(i,"leavepictureinpicture",function(){return s()}),i.remote?(e.l.D(i.remote,"connect",function(){return s()}),e.l.D(i.remote,"connecting",function(){return s()}),e.l.D(i.remote,"disconnect",function(){return s()})):"webkitCurrentPlaybackTargetIsWireless"in i&&e.l.D(i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return s()}
38),u=i,u.webkitSupportsFullscreen&&e.l.D(u,"webkitpresentationmodechanged",function(){u.webkitPresentationMode!="inline"?o():s()})),Yv(e,i,t),a=aA(e.L,e.T,n),!a.includes("#t=")&&(0<e.g.playRangeStart||isFinite(e.g.playRangeEnd))&&(a+="#t=",0<e.g.playRangeStart&&(a+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(a+=","+e.g.playRangeEnd)),!e.I){y.s(2);break}return S(y,e.I.destroy(),3);case 3:e.I=null;case 2:return _r(i),i.src=a,(Bi()||Ji())&&i.load(),i.preload!="none"&&!i.autoplay&&Nd(n)&&Jt()&&i.load(),e.m=qn,e.dispatchEvent(nt("streaming")),l=new We,Ts(i,HTMLMediaElement.HAVE_METADATA,e.l,function(){e.G.ready(),l.resolve()}),c=function(){return new Promise(function(v){var T=new ke(v);e.l.D(i.textTracks,"change",function(){return T.da(.5)}),T.da(.5)})},Ts(i,HTMLMediaElement.HAVE_CURRENT_DATA,e.l,function(){var v,T,w,I,M;return C(function(R){if(R.g==1)return S(R,c(),2);if(r)return R.return();for(xA(e),v=Fu(e),v.some(function(A){return A.mode==="showing"})&&(e.na=!0,e.u.setTextVisibility(!0)),v.length&&(e.u.enableTextDisplayer?e.u.enableTextDisplayer():Ue("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),T=!1,w=g(v),I=w.next();!I.done;I=w.next())M=I.value,M.mode!=="disabled"&&(T?(M.mode="disabled",Pe("Found more than one enabled text track, disabling it",M)):(ry(e,M),T=!0));EA(e),q(R)})}),i.error?l.reject(Qp(e)):i.preload=="none"&&(Pe('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),l.resolve()),e.l.qa(i,"error",function(){l.reject(Qp(e))}),S(y,pu(e.g.streaming.loadTimeout,l),4);case 4:((d=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(p=function(){return ay(e)},e.l.D(i,"timeupdate",p)),d||(h=function(){return Hl(e)},e.l.D(i,"timeupdate",h),Hl(e)),e.B&&(e.B.onManifestUpdated(d),d&&(m=e.Ja().end,e.l.D(i,"progress",function(){var v=e.Ja().end;m!=v&&(e.B.onManifestUpdated(e.U()),m=v)}))),e.sa=!0,q(y)}})}function xA(e){var t=e.g.preferredAudioLanguage;t!=""&&e.th(t,e.g.preferredVariantRole)}function EA(e){var t=e.g.preferredTextLanguage;t!=""&&e.jg(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function AA(e,t){if(t.kind=="metadata"){t.mode="hidden",e.l.D(t,"cuechange",function(){if(t.activeCues)for(var i=g(t.activeCues),r=i.next();!r.done;r=i.next())r=r.value,Wp(e,r.startTime,r.endTime,r.type,r.value),e.B&&e.B.onCueMetadataChange(r.value);if(t.cues){i=[],r=g(t.cues);for(var o=r.next(),s={};!o.done;s={bc:void 0},o=r.next())s.bc=o.value,s.bc.type=="com.apple.quicktime.HLS"&&s.bc.startTime!=null&&(o=i.find(function(u){return function(a){return a.startTime==u.bc.startTime&&a.endTime==u.bc.endTime}}(s)),o||(o={startTime:s.bc.startTime,endTime:s.bc.endTime,values:[]},i.push(o)),o.values.push(s.bc.value));for(i=g(i),r=i.next();!r.done;r=i.next())r=r.value,r.values.some(function(u){return u.key=="X-ASSET-URI"||u.key=="X-ASSET-LIST"})&&e.B&&(r.values.push({key:"CUE",description:"",data:r.startTime!=0||e.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.B.onHLSInterstitialMetadata(e,e.h,r))}});var n=new ke(function(){var i=LA(e);i=g(i);for(var r=i.next();!r.done;r=i.next())r.value.mode="hidden"}).sb().da(.5);e.Cd.push(function(){n.stop()})}}function Qv(e,t){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(nt("metadata",t))}function Wp(e,t,n,i,r){e.Aa&&(t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r},t.id=JSON.stringify(t),mp(e.Aa,t))}function IA(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new ke(function(){t.mode="hidden"}).sb().da(.5);e.Cd.push(function(){n.stop()})}}f.qj=function(){for(var e=this.$;e.g;)e.release()},f.Lc=function(e){return new el(e)};function $v(e,t){function n(r){t()?t().dispatchEvent(r):e.dispatchEvent(r)}function i(r){t()?Uu(t(),!0,r):r()}return t||(t=function(){return null}),new tt(function(r,o,s,u){var a=t()?t().j:e.o;a&&a.segmentDownloaded(r,o,s,u)},function(r,o,s){o=new Map().set("headers",r).set("request",o).set("requestType",s),n(nt("downloadheadersreceived",o)),i(function(){if(e.fa){var u=e.fa;if(u.h.enabled){var a=r["cmsd-static"];if(a)try{var l=new Map,c=a.split(",");for(a=0;a<c.length;a++){var d=c[a].split("=");l.set(d[0],_v(d[1]))}}catch{}if(l=r["cmsd-dynamic"]){try{var p=new Map,h=l.split(";");for(l=1;l<h.length;l++){var m=h[l].split("=");p.set(m[0],_v(m[1]))}var y=p}catch{y=null}y&&(u.g=y)}}}})},function(r,o){r=new Map().set("request",r).set("response",o),n(nt("downloadcompleted",r))},function(r,o,s,u){r=new Map().set("request",r).set("error",o).set("httpResponseCode",s).set("aborted",u),n(nt("downloadfailed",r))},function(r,o,s){i(function(){var u=e.L,a=s;if(a=a===void 0?{}:a,u.g.enabled)if(o.method==="HEAD")Is(u,o);else switch(r){case 0:try{if(u.g.enabled){if(a.type){e:{switch(a.type){case 4:var l=u.l?Ol:Ul;break e;case 3:case 2:l=u.l?bl:_l;break e;case 5:l="s";break e}l=void 0}u.i=l}Is(u,o,{ot:Uv,su:!u.u})}}catch(F){zi("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",F)}break;case Ai:try{if(u.g.enabled){var c=a.segment;
38l=0,c&&(l=c.endTime-c.startTime);var d={d:1e3*l,st:u.h.U()?"l":"v"};d.ot=dA(a);var p=d.ot===Ll||d.ot===Rl||d.ot===Nl||d.ot===jl,h=a.stream;if(h){var m=u.h.gb();if(p&&(d.bl=pA(u,h.type),d.ot!==jl)){var y=jv(u,h.type);d.dl=m?y/Math.abs(m):y}if(h.bandwidth&&(d.br=h.bandwidth/1e3),h.segmentIndex&&c){var v=h.segmentIndex.Gb(c.endTime,!0,0>m);if(v){var T=v.next().value;if(T&&T!=c){if(!Yo(c.N(),T.N())){var w=T.N()[0],I=o.uris[0],M=new URL(w),R=new URL(I);if(M.origin!==R.origin)var A=w;else{for(var E=M.pathname.split("/").slice(1),D=R.pathname.split("/").slice(1,-1);E[0]===D[0];)E.shift(),D.shift();for(;D.length;)D.shift(),E.unshift("..");A=E.join("/")}d.nor=A}if((T.Sa||T.xa)&&(c.Sa!=T.Sa||c.xa!=T.xa)){var P=T.Sa+"-";T.xa&&(P+=T.xa),d.nrr=P}}}var O=u.h.gb()||1,L=jv(u,h.type)||500,U=h.bandwidth,_=U?U*(c.endTime-c.startTime)/1e3/(L/O/1e3)*u.g.rtpSafetyFactor:NaN;isNaN(_)||(d.rtp=_)}}p&&d.ot!==jl&&(d.tb=fA(u,d.ot)/1e3),Is(u,o,d)}}catch(F){zi("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",F)}break;case 2:case 5:case 6:Is(u,o,{ot:"k"});break;case 4:Is(u,o,{ot:"o"})}})},function(r,o,s,u){(r=t()?t().l:e.H)&&r.banLocation&&r.banLocation(u)},function(r,o){if(o.data){o=o.data.byteLength;var s=t()?t().getStats():e.A;s&&(s.mc=isNaN(s.mc)?o:s.mc+o,r===0&&(s.dh=o))}})}function MA(e,t){return new cv(e.h,e.i,e.g.streaming,t,function(){e.Ma&&hv(e.Ma,!0),e.j&&e.j.Fc(),e.M&&Ki(e)},function(n){return e.dispatchEvent(n)})}function CA(e,t){var n=e.U()||0<t;t=new Io(e.yd,n),t.addEventListener("enter",function(o){Hu(e,"timelineregionenter",o.region)}),t.addEventListener("exit",function(o){Hu(e,"timelineregionexit",o.region)}),t.addEventListener("skip",function(o){var s=o.region;
38o.seeking||(Hu(e,"timelineregionenter",s),Hu(e,"timelineregionexit",s))});var i=new Io(e.Aa,n);i.addEventListener("enter",function(o){Qv(e,o.region)}),n=new Io(e.Ga,n),n.addEventListener("enter",function(o){o=new Map().set("detail",o.region.emsg),e.dispatchEvent(nt("emsg",o))});var r=new gp(e.h);return r.g.add(t),r.g.add(i),r.g.add(n),e.xd&&r.g.add(e.xd),r}function kA(e,t){t=new Io(e.Aa,0<t),t.addEventListener("enter",function(i){Qv(e,i.region)});var n=new gp(e.h);return n.g.add(t),n}function Jv(e,t,n){e.M=new dx,e.M.g=ls,Zv(e),Vl(e),e.oa=new ke(function(){Ki(e)}),e.g.streaming.rebufferingGoal&&e.oa.ua(.25),e.l.D(t,"waiting",function(){return Ki(e)}),e.l.D(t,"canplaythrough",function(){return Ki(e)}),e.l.D(t,"playing",function(){return Ki(e)}),e.l.D(t,"seeked",function(){return Ki(e)}),n&&(e.l.D(t,"stalled",function(){return Ki(e)}),e.l.D(t,"progress",function(){return Ki(e)}),e.l.D(t,"timeupdate",function(){return Ki(e)}))}function Zv(e){var t=e.g.streaming.rebufferingGoal;e.M.i.set(Tu,Math.min(.5,t/2)).set(ls,t)}function Ki(e){switch(e.m){case qn:if(e.Uc())var t=!0;else{var n=Zd(e.h.buffered);t=n!=null&&n>=e.h.duration-1}break;case cn:e:if(e.Uc()||xo(e.I))t=!0;else{if(e.i.presentationTimeline.U()){n=e.i.presentationTimeline.cc();var i=Zd(e.h.buffered);if(i!=null&&i>=n){t=!0;break e}}t=!1}break;default:t=!1}i=Hm(e.h.buffered,e.h.currentTime),n=e.M;var r=t,o=n.i.get(n.g);t=n.g,i=r||i>=o&&0<i?Tu:ls,n.g=i,(t=t!=i)&&i===Tu&&(n.h=Date.now()),t&&Vl(e)}function DA(e,t,n,i){return new Ym(e,t,n,i)}function PA(e){return new Fp({getBandwidthEstimate:function(){return e.o?e.o.getBandwidthEstimate():NaN},Fb:function(){return e.Fb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},gb:function(){return e.gb()},yb:function(){return e.yb()},Rb:function(){return e.Rb()},U:function(){return e.U()},ce:function(){return e.ce()}},e.g.cmcd)}function RA(e){return new Sv(e.i,{Rc:function(){return e.G?e.G.Rd():0},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},gb:function(){return e.gb()},video:e.h,aa:e.I,Xb:e.F,onError:function(t){return ks(e,t)},onEvent:function(t){return e.dispatchEvent(t)},ue:function(t,n,i){var r=t.startTime;if(t=t.endTime,n=n.type,n!=Ce){if(e.G){e.G.jh();var o=ap(e.I,n);!e.U()&&e.h.paused&&!e.h.seeking&&o!=null&&0<o&&e.G.Rd()<o&&e.G.cf(o)}Ki(e)}i=new Map().set("start",r).set("end",t).set("contentType",n).set("isMuxed",i),e.dispatchEvent(nt("segmentappended",i))},hj:function(t,n){(n=n.Wc)&&e.xd&&rE(e.xd,n,t)},Hg:function(t,n){var i=e.C;if(i.g.parseInbandPsshEnabled&&!i.F&&["audio","video"].includes(t)){t=new Kd(he(n)),n=0;for(var r=g(t.data),o=r.next();!o.done;o=r.next())n+=o.value.length;if(n==0)i=Promise.resolve();else{for(n=new Uint8Array(n),r=0,t=g(t.data),o=t.next();!o.done;o=t.next())o=o.value,n.set(o,r),r+=o.length;mu(i,"cenc",n),i=i.m}}else i=Promise.resolve();return i},disableStream:function(t,n){return e.disableStream(t,n)}})}f.configure=function(e,t){if(arguments.length==2&&typeof e=="string"&&(e=Al(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(Ue("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(Ue("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming&&(Ue("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&Jt(),delete e.streaming.useNativeHlsOnSafari),e.streaming&&typeof e.streaming.liveSync=="boolean"){Ue("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var n=e.streaming.liveSync;e.streaming.liveSync={},e.streaming.liveSync.enabled=n}if(e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.
38streaming)){n=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(Ue("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(Ue("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(Ue("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(Ue("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(Ue("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(Ue("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(Ue("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(Ue("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){Ue("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(Ue("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(Ue("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(Ue("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(Ue("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(Ue("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(Ue("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(Ue("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(Ue("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(Ue("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(Ue("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){n=!1;for(var o in e.drm.advanced){var s=e.drm.advanced[o];
38i=s.videoRobustness,s=s.audioRobustness,"videoRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].videoRobustness)&&(e.drm.advanced[o].videoRobustness=[i],n=!0),"audioRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].audioRobustness)&&(e.drm.advanced[o].audioRobustness=[s],n=!0)}n&&Ue("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"crossBoundaryStrategy"in e.streaming&&e.streaming.crossBoundaryStrategy!="keep"&&(e.streaming.inaccurateManifestTolerance=0),o=br(this.g,e,gr(this)),ey(this),o},f.di=function(e){this.Ze=e};function ey(e){if(e.xe=new Yd(e.g,e.ka,e.C),e.H){var t=Pi(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(t.disableVideo=!0),e.H.configure(t)}if(e.C&&e.C.configure(e.g.drm),e.j){e.j.configure(e.g.streaming);try{e.m!=Ii&&Dm(e.xe,e.i)&&Pn(e)}catch(r){ks(e,r)}e.o&&Co(e),t=e.j.l,!t||t.allowedByApplication&&t.allowedByKeySystem||Cs(e)}if(e.F&&(e.F.mg(e.g.streaming.forceHTTP),e.F.ng(e.g.streaming.forceHTTPS),e.F.o=e.g.streaming.minBytesForProgressEvents),e.I&&(e.I.configure(e.g.mediaSource),e.I.Ea=e.g.manifest.segmentRelativeVttTiming),e.u)if(t=e.g.textDisplayFactory,e.Xe!=t){var n=e.u;if(e.u=t(),e.u.configure?e.u.configure(e.g.textDisplayer):Ue("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.u.setTextLanguage||Ue("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),e.u.setTextVisibility(n.isTextVisible()),n.destroy(),e.I){n=e.I;var i=e.u;n.ea=i,n.h&&(n.h.j=i)}e.Xe=t,e.j&&(t=e.j,(n=t.i.get(Ce))&&Ss(t,n.stream,!0,0,!0))}else e.u.configure&&e.u.configure(e.g.textDisplayer);e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),hy(e)),e.M&&Zv(e),e.oa&&(e.g.streaming.rebufferingGoal?e.oa.ua(.25):e.oa.stop()),e.i&&$p(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.B&&e.B.configure(e.g.ads),e.L&&e.L.configure(e.g.cmcd),e.fa&&e.fa.configure(e.g.cmsd)}f.getConfiguration=function(){var e=gr(this);return br(e,this.g,gr(this)),e},f.mi=function(){return this.Ze},f.Wg=function(){var e=gr(this);return br(e,this.g,gr(this)),Ev(this.g,gr(this))},f.Sg=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(t=Math.min(this.h.currentTime+t,this.Ja().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},f.uj=function(){for(var e in this.g)delete this.g[e];br(this.g,gr(this),gr(this)),ey(this)},f.vi=function(){return this.m},f.Ug=function(){return this.i?this.i.type:null},f.zi=function(){return this.h},f.yb=function(){return this.F},f.Qc=function(){return this.T},f.Rg=function(){return this.B?this.B:null}
38,f.U=function(){return this.i&&!this.Qa()?this.i.presentationTimeline.U():this.h&&this.h.src?this.h.duration==1/0:!1},f.yc=function(){return this.i?this.i.presentationTimeline.yc():!1},f.Si=function(){if(this.i&&!this.Qa()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},f.Ja=function(){if(this.i&&!this.Qa()){if(!this.sa&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Hb(),end:e.ob()}}if(this.h&&this.h.src&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},f.Pi=function(){this.U()&&(this.h.currentTime=this.Ja().end)},f.Ti=function(){return this.sa},f.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},f.drmInfo=function(){return this.C?this.C.h:null},f.pd=function(){return this.C?this.C.pd():1/0},f.If=function(){return this.C?this.C.If():[]},f.be=function(){return this.C?this.C.be():{}},f.Qf=function(){return this.M?this.M.g==ls:!!this.T},f.gb=function(){return this.h?this.K?this.K.i:1:0},f.Nd=function(e,t){t=t===void 0?!0:t,e==0?Pe("A trick play rate of 0 is unsupported!"):(this.K.set(e),this.m==cn&&(this.o.playbackRateChanged(e),xp(this.j,t&&1<Math.abs(e))),uy(this,e))},f.gd=function(){var e=this.K.sc();this.m==qn&&this.K.set(e),this.m==cn&&(this.K.set(e),this.o.playbackRateChanged(e),xp(this.j,!1)),this.Oa.Ra()},f.Rb=function(){if(this.i&&!this.Qa()){for(var e=this.j?this.j.l:null,t=[],n=0,i=g(this.i.variants),r=i.next();!r.done;r=i.next())if(r=r.value,gu(r)){var o=fo(r);o.active=r==e,o.active||n==1||e==null||r.video!=e.video||r.audio!=e.audio||(o.active=!0),o.active&&n++,t.push(o)}return t}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(s){return Bd(s)}):[]},f.vc=function(){if(this.i&&!this.Qa()){for(var e=this.j?this.j.u:null,t=[],n=g(this.i.textStreams),i=n.next();!i.done;i=n.next()){i=i.value;var r=ho(i);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?Fu(this).map(function(o){var s=qg(o);return s.active=o.mode!="disabled",s.type="text",s.originalTextId=o.id,o.kind=="captions"&&(s.mimeType="unknown"),o.kind=="subtitles"&&(s.mimeType="text/vtt"),o.kind&&(s.roles=[o.kind]),o.kind=="forced"&&(s.forced=!0),s}):[]},f.si=function(){var e=this.Ve;return this.i&&(e=this.i.imageStreams),e.map(function(t){return bd(t)})},f.gi=function(e){var t=this,n,i;return C(function(r){return r.g==1?S(r,ny(t,e),2):(n=r.h,n?(i=[],n.segmentIndex.xb(function(o){var s=ty(o.tilesLayout||n.tilesLayout);if(s)for(var u=s.rows*s.oc,a=o.j-o.startTime,l=0;l<u;l++){var c=iy(o,n,o.startTime+a*l/u,s);i.push(c)}}),n.closeSegmentIndex&&n.closeSegmentIndex(),r.return(i)):r.return(null))})};function ty(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}f.Ji=function(e,t){var n=this,i,r,o,s;return C(function(u){return u.g==1?S(u,ny(n,e),2):(i=u.h,!i||(r=i.segmentIndex.find(t),r==null)?u.return(null):(o=i.segmentIndex.get(r),(s=ty(o.tilesLayout||i.tilesLayout))?u.return(iy(o,i,t,s)):u.return(null)))})};function ny(e,t){var n,i;return C(function(r){return r.g==1?e.m!=cn&&e.m!=qn||(n=e.Ve,e.i&&(n=e.i.imageStreams),i=n[0],!i)?r.return(null):(t!=null&&(i=n.find(function(o){return o.id==t})),i?i.segmentIndex?r.s(2):S(r,i.createSegmentIndex(),2):r.return(null)):r.return(i)})}function iy(e,t,n,i){var r=t.width||0,o=t.height||0,s=r/i.oc,u=o/i.rows,a=i.oc*i.rows,l=e.j-e.startTime;l=e.B||l/a;var c=e.startTime,d=0,p=0;return 1<a&&(p=Math.floor((n-e.startTime)/l),c=e.startTime+p*l,d=p%i.oc*s,p=Math.floor(p/i.oc)*u),i=!1,(n=e.thumbnailSprite)&&(i=!0,u=n.height,d=n.positionX,p=n.positionY,s=n.width),{segment:e,imageHeight:o,imageWidth:r,height:u,positionX:d,positionY:p,startTime:c,duration:l,uris:e.N(),width:s,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs}}f.uh=function(e){function t(){var i=n.i.textStreams.find(function(r){return r.id==e.id});i&&i!=n.j.u&&(jp(n.A.h,i,!1),yl(n.j,i),Gl(n),Vu(n),n.Tb=i.language)}var n=this;this.i&&this.G&&(t(),!this.Qa())||function(){if(n.h&&n.h.textTracks){var i=Fu(n),r=i.find(function(o){return o.mode!=="disabled"});(i=i.find(function(o){return Fd(o)===e.id}))&&(r!==i&&(r&&(r.mode="disabled",n.l.Ka(r,"cuechange"),n.u.remove(0,1/0)),i&&ry(n,i)),Gl(n),Vu(n))}}()};function ry(e,t){e.l.D(t,"cuechange",function(){e.u.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]);r=g(r);
38for(var o=r.next();!o.done;o=r.next()){if(o=o.value,o.endTime===1/0||o.endTime<o.startTime)o=null;else{var s=new it(o.startTime,o.endTime,o.text);s.line=typeof o.line=="number"?o.line:null,o.lineAlign&&(s.lineAlign=o.lineAlign),s.lineInterpretation=o.snapToLines?lu:1,s.position=typeof o.position=="number"?o.position:null,o.positionAlign&&(s.positionAlign=o.positionAlign),s.size=o.size,s.textAlign=o.align,o.vertical==="lr"?s.writingMode="vertical-lr":o.vertical==="rl"&&(s.writingMode="vertical-rl"),o.region&&(s.region.id=o.region.id,s.region.height=o.region.lines,s.region.heightUnits=2,s.region.regionAnchorX=o.region.regionAnchorX,s.region.regionAnchorY=o.region.regionAnchorY,s.region.scroll=o.region.scroll,s.region.viewportAnchorX=o.region.viewportAnchorX,s.region.viewportAnchorY=o.region.viewportAnchorY,s.region.viewportAnchorUnits=Un,s.region.width=o.region.width,s.region.widthUnits=Un),Ba(s),o=s}o&&((s=e.g.mediaSource.modifyCueCallback)&&s(o,null,n),i.push(o))}e.u.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}f.Ee=function(e,t,n){function i(){var o=r.i.variants.find(function(u){return u.id==e.id});if(o&&gu(o)){var s=r.j.l;r.g.abr.enabled&&(s.video!=o.video||s.audio&&o.audio&&s.audio.language==o.audio.language&&s.audio.channelsCount==o.audio.channelsCount&&s.audio.label==o.audio.label)&&Pe("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),r.Qa()?Bu(r,o,!1,!1,0):Bu(r,o,!1,t||!1,n||0),r.W.configure({language:o.language,role:o.audio&&o.audio.roles&&o.audio.roles[0]||"",channelCount:o.audio&&o.audio.channelsCount?o.audio.channelsCount:0,Sc:o.video&&o.video.hdr?o.video.hdr:"",spatialAudio:o.audio&&o.audio.spatialAudio?o.audio.spatialAudio:!1,videoLayout:o.video&&o.video.videoLayout?o.video.videoLayout:"",Kc:o.audio&&o.audio.label?o.audio.label:"",fd:"",codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:o.audio&&o.audio.codecs?o.audio.codecs:""}),Co(r)}}var r=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.G&&(i(),!this.Qa()))&&function(){if(r.h&&r.h.audioTracks){var o=Array.from(r.h.audioTracks);o=g(o);for(var s=o.next();!s.done;s=o.next())if(s=s.value,Fd(s)==e.id){ly(r,s);break}}}()},f.zj=function(e,t){t=t===void 0?0:t;var n=this.Rb();if(n.length){var i=n.find(function(r){return r.active});i&&(n=n.find(function(r){return r.videoId===i.videoId&&r.language==e.language&&r.label==e.label&&r.audioMimeType==e.mimeType&&r.audioCodec==e.codecs&&r.primary==e.primary&&Yo(r.audioRoles,e.roles)&&r.accessibilityPurpose==e.accessibilityPurpose&&r.channelsCount==e.channelsCount&&r.audioSamplingRate==e.audioSamplingRate&&r.spatialAudio==e.spatialAudio}))&&!n.active&&this.Ee(n,!0,t)}},f.getAudioTracks=function(){var e=this.Rb();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.m==cn&&(n=e.filter(function(o){return o.originalVideoId===t.originalVideoId&&o.audioCodec})),!n.length)return[];e=new Map,n=g(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.originalAudioId;r||i.audioId==null||(r=String(i.audioId)),r&&e.set(r,{active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioRoles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage})}return Array.from(e.values())},f.ii=function(){return vy(this.Rb())},f.Hi=function(){return vy(this.vc())},f.hi=function(){return Array.from(my(this.Rb()))},f.Gi=function(){return Array.from(my(this.vc()))},f.th=function(e,t,n,i,r,o,s){function u(){function l(m,y){return m.video||y.video?m.video&&y.video?Math.abs((m.video.height||0)-(y.video.height||0))+Math.abs((m.video.width||0)-(y.video.width||0)):1/0:0}a.W=a.g.adaptationSetCriteriaFactory(),a.W.configure({language:e,role:t||"",channelCount:n||0,Sc:"",spatialAudio:o||!1,videoLayout:"",Kc:s||"",fd:"",codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:r||""});var c=a.j.l,d=a.W.create(a.i.variants),p=null;d=g(d.values());for(var h=d.next();!h.done;
38h=d.next())h=h.value,gu(h)&&(!p||l(p,c)>l(h,c))&&(p=h);p!=c&&(p?(c=fo(p),a.Ee(c,!0,i||0)):Cs(a))}var a=this;n=n===void 0?0:n,i=i===void 0?0:i,r=r===void 0?"":r,o=o===void 0?!1:o,s=s===void 0?"":s,!(this.i&&this.G&&(u(),!this.Qa()))&&function(){if(a.h&&a.h.audioTracks){var l=rs(a.Rb(),e,t||"",!1)[0];l&&a.Ee(l)}}()},f.jg=function(e,t,n){function i(){r.Tb=e,r.Hd=t||"",r.Fd=n||!1;var o=rs(r.i.textStreams,r.Tb,r.Hd,r.Fd)[0]||null;o&&o!=r.j.u&&(jp(r.A.h,o,!1),r.g.streaming.alwaysStreamText||r.Rf())&&(yl(r.j,o),Gl(r),Vu(r))}var r=this;n=n===void 0?!1:n,!(this.i&&this.G&&(i(),!this.Qa()))&&function(){var o=rs(r.vc(),e,t||"",n||!1)[0];o&&r.uh(o)}()},f.Aj=function(e,t,n){function i(){for(var o=null,s=g(r.i.variants),u=s.next();!u.done;u=s.next())if(u=u.value,u.audio.label==e){o=u;break}o!=null&&(r.W=r.g.adaptationSetCriteriaFactory(),r.W.configure({language:o.language,role:"",channelCount:0,Sc:"",spatialAudio:!1,videoLayout:"",fd:"",Kc:e,codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),Cs(r,t,n))}var r=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.G&&(i(),!this.Qa()))&&function(){if(r.h&&r.h.audioTracks){var o=Array.from(r.h.audioTracks),s=null;o=g(o);for(var u=o.next();!u.done;u=o.next())u=u.value,u.label==e&&(s=u);s&&ly(r,s)}}()},f.Rf=function(){var e=this.na;return this.u?this.u.isTextVisible():e},f.li=function(){return this.Jd.map(function(e){return ho(e)})},f.ki=function(e){if(!this.Jd.length)return[];var t=Ye(e);if(e=this.Jd.filter(function(o){return Ye(o.language)==t}),!e.length)return[];var n=[],i=new Set;e=g(e);for(var r=e.next();!r.done;r=e.next())r=r.value,r.segmentIndex&&r.segmentIndex.xb(function(o){var s=o.N()[0],u=o.startTime+"-"+o.endTime+"-"+s;o={id:u,title:s,startTime:o.startTime,endTime:o.endTime},i.has(u)||(n.push(o),i.add(u))});return n};function Fu(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function oy(e){return Array.from(e.h.textTracks).find(function(t){return t.label=="Shaka Player TextTrack"})}function LA(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}f.Ah=function(e){e=!!e,this.na!=e&&(this.na=e,this.m==cn?(this.u.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.j.u||(e=rs(this.i.textStreams,this.Tb,this.Hd,this.Fd),0<e.length&&(yl(this.j,e[0]),Gl(this),Vu(this))):gE(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(e),fy(this))},f.Ai=function(){if(this.G)var e=this.G.Rd();else{if(this.Z==null)return new Date;e=this.Z}if(this.i&&!this.Qa()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},f.Xg=function(){if(this.i&&!this.Qa()){var e=this.i.presentationTimeline;return new Date(1e3*(e.m||e.i))}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null},f.ee=function(){return this.U()&&this.i?this.i.presentationTimeline.ee():null},f.Fb=function(){if(this.m==cn)return this.I.Fb();var e={total:[],audio:[],video:[],text:[]};return this.m==qn&&(e.total=dr(this.h.buffered)),e},f.ce=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Xg().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},f.getStats=function(){if(this.m!=cn&&this.m!=qn)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};zp(this);var e=this.h,t=e.currentTime/e.duration;if(!isNaN(t)&&!this.U()){var n=this.A;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.G&&(this.A.P=this.G.Bg(),this.A.T=this.G.Cg()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.A;var i=Number(n.totalVideoFrames);t.O=Number(n.droppedVideoFrames),t.M=i,this.A.L=Number(n.corruptedVideoFrames)}if(this.C?(n=this.C,n=n.H?n.H:NaN):n=NaN,this.A.o=n,this.m==cn){if(n=this.j.l,t=this.j.u,n){i=this.K?this.K.i:1;var r=i*n.bandwidth;t&&t.bandwidth&&(r+=i*t.bandwidth),this.A.A=r}n&&n.video&&(t=this.A,i=n.video.height||NaN,t.m=n.video.width||NaN,t.l=i),this.U()&&(n=this.ce()||0,this.A.B=n/1e3),this.i&&(this.A.G=this.i.periodCount,this.A.F=this.i.gapCount,this.i.presentationTimeline&&(this.A.I=this.i.presentationTimeline.h)),n=this.o.getBandwidthEstimate(),this.A.u=n}this.m==qn&&(n=this.A,n.mc=isNaN(n.mc)?NaN:n.mc+NaN,n=this.A,t=e.videoHeight||NaN,n.m=e.videoWidth||NaN,n.l=t);var o=this.A;e=o.m,n=o.l,t=o.A,i=o.M,r=o.O;
38var s=o.L,u=o.T,a=o.P,l=o.u,c=o.i,d=o.C,p=o.H,h=o.j,m=Np(o.g,"playing"),y=Np(o.g,"paused"),v=Np(o.g,"buffering"),T=o.o,w=o.B,I=o.I,M=o.dh,R=o.mc,A=o.K,E=o.G,D=o.F,P=VE(o.g),O=[];o=g(o.h.g);for(var L=o.next();!L.done;L=o.next())L=L.value,O.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:i,droppedFrames:r,corruptedFrames:s,stallsDetected:u,gapsJumped:a,estimatedBandwidth:l,completionPercent:c,loadLatency:d,manifestTimeSeconds:p,drmTimeSeconds:h,playTime:m,pauseTime:y,bufferingTime:v,licenseTime:T,liveLatency:w,maxSegmentDuration:I,manifestSizeBytes:M,bytesDownloaded:R,nonFatalErrorCount:A,manifestPeriodCount:E,manifestGapCount:D,stateHistory:P,switchHistory:O}},f.Sh=function(e,t,n,i,r,o,s){s=s===void 0?!1:s;var u=this,a,l,c,d,p,h,m,y,v,T,w,I,M;return C(function(R){switch(R.g){case 1:if(u.m!=cn&&u.m!=qn)throw new k(1,7,7004);if(n!="subtitles"&&n!="captions"&&Pe("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){R.s(2);break}return S(R,qp(u,e),3);case 3:i=R.h;case 2:if(a=[],u.B&&(a=u.B.getCuePoints()),u.m!=qn){R.s(4);break}return s&&(n="forced"),S(R,NA(u,e,t,n,i,o||"",a),5);case 5:if(l=Ye(t),c=u.vc(),d=c.find(function(A){return Ye(A.language)==l&&A.label==(o||"")&&A.kind==n}))return Pn(u),R.return(d);throw new k(1,2,2012);case 4:if(p=Mt,h=u.Ja(),m=h.end-h.start,u.i&&(m=u.i.presentationTimeline.getDuration()),m==1/0)throw new k(1,4,4033);if(!a.length){R.s(6);break}return S(R,Bl(u,e,u.F,u.g.streaming.retryParameters),7);case 7:y=R.h,v=sy(u,y,i,a),T=new Blob([v],{type:"text/vtt"}),e=dp(T),i="text/vtt";case 6:if(w={id:u.Ae++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:hl(0,m,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:o||null,type:p.va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!s,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Tt(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},I=Tt(w.mimeType,w.codecs),M=ns(I),!M)throw new k(2,2,2014,i);return u.i.textStreams.push(w),Pn(u),R.return(ho(w))}})},f.Th=function(e,t){var n=this,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M;return C(function(R){switch(R.g){case 1:if(n.m!=cn&&n.m!=qn)throw new k(1,7,7004);if(t){R.s(2);break}return S(R,qp(n,e),3);case 3:t=R.h;case 2:if(t!="text/vtt")throw new k(1,2,2017,e);if(i=Mt,r=n.Ja(),o=r.end-r.start,n.i&&(o=n.i.presentationTimeline.getDuration()),o==1/0)throw new k(1,4,4045);return S(R,Bl(n,e,n.F,n.g.streaming.retryParameters),4);case 4:if(s=R.h,u=cu(t),!u)throw new k(2,2,2014,t);for(a=u(),l={periodStart:0,segmentStart:0,segmentEnd:o,vttOffset:0},c=he(s),d=a.parseMedia(c,l,e,[]),p=[],h=g(d),m=h.next(),y={};!m.done;y={Qe:void 0,Mc:void 0},m=h.next())y.Mc=m.value,y.Qe=null,v=function(A){return function(){return A.Qe==null&&(A.Qe=Gt([e],[A.Mc.payload])),A.Qe||[]}}(y),T=new oe(y.Mc.startTime,y.Mc.endTime,v,0,null,null,0,0,1/0),y.Mc.payload.includes("#xywh")&&(w=y.Mc.payload.split("#xywh=")[1].split(","),w.length===4&&T.Ge({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),p.push(T);if(I=t,!p.length){R.s(5);break}return S(R,Mo(p[0].N()[0],n.F,n.g.manifest.retryParameters),6);case 6:I=R.h;case 5:return M={id:n.Ae++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oe(p),mimeType:I||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:i.bf,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Tt(I||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},n.m==qn?n.Ve.push(M):n.i.imageStreams.push(M),Pn(n),R.return(bd(M))}})},f.Rh=function(e,t,n){var i=this,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w;return C(function(I){switch(I.g){case 1:if(i.m!=cn&&i.m!=qn)throw new k(1,7,7004);if(n){I.s(2);break}return S(I,qp(i,e),3);case 3:n=I.h;case 2:if(r=Mt,o=i.Ja(),s=o.end-o.start,i.i&&(s=i.i.presentationTimeline.getDuration()),s==1/0)throw new k(1,4,4054);return S(I,Bl(i,e,i.F,i.g.streaming.retryParameters),4);case 4:if(u=I.h,a=cu(n),!a)throw new k(2,2,2014,n);for(l=a(),c={periodStart:0,segmentStart:0,segmentEnd:s,vttOffset:0},d=he(u),p=l.parseMedia(d,c,e,[]),h=[],m=g(p),y=m.next(),v={};!y.done;v={Zd:void 0},y=m.next())v.Zd=y.value,T=new oe(v.Zd.startTime,v.Zd.endTime,function(M){return function(){return[M.Zd.payload]}}(v),0,null,null,0,0,1/0),h.push(T);return w={id:i.Ae++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oe(h),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:r.va,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Tt("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},i.Jd.push(w),Pn(i),I.return(ho(w))}})};function qp(e,t){var n;return C(function(i){switch(i.g){case 1:return ee(i,2),S(i,Mo(t,e.F,e.g.streaming.retryParameters),4);case 4:n=i.h,fe(i,3);break;case 2:re(i);case 3:if(n)return i.return(n);throw new k(1,2,2011,t)}})}function NA(e,t,n,i,r,o,s){var u,a,l,c;return C(function(d){if(d.g==1)return r!="text/vtt"||s.length?S(d,Bl(e,t,e.F,e.g.streaming.retryParameters),3):d.s(2);d.g!=2&&(u=d.h,a=sy(e,u,r,s),l=new Blob([a],{type:"text/vtt"}),t=dp(l),r="text/vtt"),c=document.createElement("track");var p=e.L,h=t;try{if(p.g.enabled){var m=Bp(p);m.ot=Hp,m.su=!0;
38var y=Pl(m),v=Vp(h,y)}else v=h}catch(T){zi("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",T),v=h}return c.src=v,c.label=o,c.kind=i,c.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(c),d.return(c)})}function Bl(e,t,n,i){var r,o,s;return C(function(u){if(u.g==1){r=Ai,o=Ot([t],i),o.method="GET";var a=e.L;try{a.g.enabled&&Is(a,o,{ot:Hp,su:!0})}catch(l){zi("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return S(u,n.request(r,o).promise,2)}return s=u.h,u.return(s.data)})}function sy(e,t,n,i){var r=cu(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=he(t),t=n.parseMedia(t,e,null,[]),rA(t,i);throw new k(2,2,2014,n)}f.Fj=function(e,t){this.ka.width=e,this.ka.height=t},f.gg=function(e){if(this.m==cn){var t=this.j;if(e=e===void 0?.1:e,t.m.g)t=!1;else if(t.B)t=!1;else{for(var n=g(t.i.values()),i=n.next();!i.done;i=n.next())i=i.value,!i.sd||i.Da||i.kb||(i.sd=!1,vn(t,i,e));t=!0}}else t=!1;return t},f.Jf=function(){return Pe("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for."),this.i},f.wi=function(){return this.Qb},f.pi=function(){var e={video:null,audio:null,text:null};if(this.m!=cn)return e;var t=this.j.l,n=this.h.currentTime;t=g([t.video,t.audio,this.j.u]);for(var i=t.next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r=i.segmentIndex.find(n);r=i.segmentIndex.get(r),r={codecs:r.codecs||i.codecs,mimeType:r.mimeType||i.mimeType,bandwidth:r.bandwidth||i.bandwidth},i.type=="video"?(r.width=i.width,r.height=i.height,e.video=r):i.type=="audio"?e.audio=r:i.type==Ce&&(e.text=r)}return e};function gr(e){var t=Es();return t.streaming.failureCallback=function(n){if(e.U()){var i=null;n.code==1001||n.code==1002?(i=1,e.g.streaming.lowLatencyMode&&(i=.1)):n.code==1003&&(i=.1),i!=null&&(n.severity=1,e.gg(i))}},t.textDisplayFactory=function(){return!e.He||Jt()&&!document.fullscreenEnabled?"addTextTrack"in e.h?new rn(e.h,"Shaka Player TextTrack"):new on:new sn(e.h,e.He)},t}f.Dh=function(e){this.He=e};function jA(e,t){for(var n=new Set,i=g(t.textStreams),r=i.next();!r.done;r=i.next())r=r.value,r.mimeType!="application/cea-608"&&r.mimeType!="application/cea-708"||n.add(r.originalId);for(i=g(t.variants),r=i.next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions){for(var o=g(r.closedCaptions.keys()),s=o.next();!s.done;s=o.next())if(s=s.value,!n.has(s)){var u=s.startsWith("CC")?"application/cea-608":"application/cea-708",a=new ft,l=r.closedCaptions.get(s);u={id:e.Ae++,originalId:s,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:a,mimeType:u,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Ce,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Tt(u,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(u),n.add(s)}}}function UA(e,t){var n,i,r,o,s;return C(function(u){return u.g==1?(n=e.audio,i=e.video,r=function(a,l){var c,d,p;return C(function(h){return h.g==1?a?a.segmentIndex?h.s(2):S(h,a.createSegmentIndex(),2):h.return(null):(d=(c=a.segmentIndex.Gb(l))?c.next().value:null,d?(p=d.startTime,h.return(p)):h.return(null))})},S(u,r(n,t),2)):u.g!=3?(o=u.h,S(u,r(i,t),3)):(s=u.h,s!=null&&o!=null?u.return(Math.max(s,o)):s!=null?u.return(s):o!=null?u.return(o):u.return(t))})}function Vl(e){var t=e.Qf();if(e.A&&e.M&&e.G){if(e.g.streaming.rebufferingGoal==0){var n=e.K;n.j=!1,hp(n)}else n=e.K,n.j=t,hp(n);if(e.L&&(n=e.L,t||n.u||(n.u=!0),n.u&&t&&(n.B=!0),n.F=t),zp(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Qd<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.P&&(e.P=Math.min(e.P+ ++e.Qd*r,n-i))}}
38t=new Map().set("buffering",t),e.dispatchEvent(nt("buffering",t))}function uy(e,t){e.Oa.Ra(),e.Oa.D(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Ja(),r=e.U()?e.g.streaming.safeSeekOffset:0;0<t?Math.floor(n)>=Math.floor(i.end)&&e.gd():Math.floor(n)<=Math.floor(i.start+r)&&e.gd()})}function zp(e){if(e.A&&e.M){var t=e.A.g,n="playing";e.M.g==ls?n="buffering":e.Uc()?n="ended":e.h.paused&&(n="paused");var i=n;if(t.g==null)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(nt("statechanged",n)))}}function ay(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.Sg();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.Nd(i,!1):r==1&&t!==e.K.sc()&&e.gd()}if(n&&(n=e.Ja(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var o=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var s=e.g.streaming.liveSync.targetLatency,u=s+i,a=Math.max(0,s-i),l=e.g.streaming.liveSync.maxPlaybackRate,c=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(s=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?u=e.i.serviceDescription.targetLatency+i:e.i.serviceDescription.maxLatency!=null&&(u=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?a=Math.max(0,e.i.serviceDescription.targetLatency-i):e.i.serviceDescription.minLatency!=null&&(a=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,c=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.P||typeof s!="number"||(e.P=s);var d=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;r&&e.Na&&e.P!==null&&typeof s=="number"&&e.Qd<d&&Date.now()-e.Na>1e3*o&&(o=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.P=Math.max(e.P-(s-o)/2,o+i),e.Na=Date.now()),r&&e.P!==null&&(u=e.P+i,a=e.P-i),s=n.end-e.h.currentTime,i=0,e.m==qn&&(r=e.h.buffered,0<r.length&&(i=r.end(r.length-1),i=Math.max(l,i-n.end))),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,o=Date.now()-e.M.h,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&o<=r?t!=c&&e.Nd(c,!1):u!=null&&l&&s-i>u?(t!=l&&e.Nd(l,!1),e.Na=null):a!=null&&c&&s-i<a?(t!=c&&e.Nd(c,!1),e.Na=null):t!==e.K.sc()&&(e.gd(),e.Na=Date.now())}}function Hl(e){if(e.h){var t=function(r,o){var s=s===void 0?Number.EPSILON:s;
38if(r===o)s=!0;else{var u=Math.abs(r-o);s=u<=s?!0:s!==Number.EPSILON?Math.abs(u-s)<=Number.EPSILON:!1}return(s||o>r)&&e.Ye<r?(e.Ye=r,!0):!1},n=e.Ja();if(n=n.end-n.start,n=0<n?e.h.currentTime/n:0,!isNaN(n)){if(n*=100,t(0,n))var i=nt("started");else t(25,n)?i=nt("firstquartile"):t(50,n)?i=nt("midpoint"):t(75,n)?i=nt("thirdquartile"):(t(100,n)&&(i=nt("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Uc()&&e.h.pause());i&&e.dispatchEvent(i)}}}function Co(e){try{Rm(e.xe,e.i)}catch(n){return ks(e,n),!1}var t=Ka(e.i.variants);return t=e.W.create(t),e.o.setVariants(Array.from(t.values())),!0}function Cs(e,t,n,i,r){t=t===void 0?!0:t,n=n===void 0?0:n,i=i===void 0?!1:i,r=r===void 0?!0:r;var o;(o=Co(e)?e.o.chooseVariant():null)&&Bu(e,o,r,t,n,i)}function Bu(e,t,n,i,r,o){o=o===void 0?!1:o;var s=e.j.l;if(t==s)i&&wv(e.j,t,i,r,!0);else{var u=e.A.h;if(u.h!=t&&(u.h=t,u.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),wv(e.j,t,i,r,o,n),i=null,s&&(i=fo(s)),s=fo(t),s.active=!0,e.O&&(r=e.O,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),o=0,u=-1,t.mimeType){case"video/webm":o=1;break;case"video/mp4":o=2}switch(e.Ug()){case"DASH":u=1;break;case"HLS":u=0}r.g&&(r.g.setLevelSwitching(t.id,!0),r.g.setContainerFormat(o),r.j||r.g.setStreamingFormat(u))}n?(n=new Map().set("oldTrack",i).set("newTrack",s),n=nt("adaptation",n),ko(e,n)):cy(e,i,s),dy(e,i,s)}}function ly(e,t){var n=Array.from(e.h.audioTracks).find(function(i){return i.enabled});t.enabled=!0,n&&(t.id!==n.id&&(n.enabled=!1),n=Bd(n),t=Bd(t),cy(e,n,t),dy(e,n,t))}function Pn(e){var t=nt("trackschanged");ko(e,t),py(e)}function cy(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=nt("variantchanged",t),ko(e,t)}function dy(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&py(e)}function py(e){var t=nt("audiotrackschanged");ko(e,t)}function Gl(e){var t=nt("textchanged");ko(e,t)}function fy(e){var t=nt("texttrackvisibility");ko(e,t)}function hy(e){e.g.abr.enabled||Yp(e);var t=new Map().set("newStatus",e.g.abr.enabled);ko(e,nt("abrstatuschanged",t))}function Vu(e){var t=e.vc().find(function(n){return n.active});t&&e.u&&e.u.setTextLanguage&&e.u.setTextLanguage(t.language)}function Yp(e,t){if(t=t===void 0?!0:t,e.m==cn){e.Je.stop();for(var n=g(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&Co(e)}}f.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===Ii||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(u){var a=u[e.type];return a&&a.id!==e.id&&!u.disabledUntilTime?e.type=="audio"?e.language===a.language:!0:!1})){for(var n=!1,i=!1,r=g(this.i.variants),o=r.next();!o.done;o=r.next()){o=o.value;var s=o[e.type];s&&(s.id===e.id?(o.disabledUntilTime=Date.now()/1e3+t,n=!0):s.trickModeVideo&&s.trickModeVideo.id==e.id&&(i=!0))}return!n&&i?!1:(this.Je.ua(1),t=this.Fb().video.reduce(function(u,a){return u+a.end-a.start},0),Cs(this,!1,t,!0,!1),!0)}return!1};function ks(e,t){var n,i,r,o;return C(function(s){switch(s.g){case 1:if(e.m==Ii)return s.return();if(t.severity===1&&e.A.K++,n=!0,!(e.sa&&e.i&&e.j)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3018){s.s(2);break}return Jt()&&t.code==3016?s.return():(ee(s,3),S(s,xl(e.j),5));case 5:i=s.h,n=!i,i&&(r=nt("mediasourcerecovered"),e.dispatchEvent(r)),fe(s,2);break;case 3:re(s),n=!0;case 2:if(!n)return s.return();t.severity===2&&Yp(e,!1),o=nt("error",new Map().set("detail",t)),e.dispatchEvent(o),o.defaultPrevented&&(t.handled=!0),q(s)}})}f.addFont=function(e,t){var n,i,r,o,s;return C(function(u){if(u.g==1)return"fonts"in document&&"FontFace"in j?S(u,document.fonts.ready,3):u.s(0);if(!("entries"in document.fonts))return u.return();for(n=function(a){a=a.entries();for(var l=[],c=a.next();c.done===!1;)l.push(c.value),c=a.next();return l},i=g(n(document.fonts)),r=i.next();!r.done;r=i.next())if(o=r.value,o.family==e&&o.display=="swap")return u.return();s=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(s),q(u)})};function Hu(e,t,n,i){i=i===void 0?e:i,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),i.dispatchEvent(nt(t,e))}function gy(e,t,n,i){i=i===void 0?!1:i,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(nt(i?"audiotrackchanged":"mediaqualitychanged",t))}function Qp(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new k(2,3,3016):null;var n=e.h.error.code;return!t&&n==1?null:((t=e.h.error.msExtendedCode)&&(0>t&&(t+=Math.pow(2,32)),t=t.toString(16)),new k(2,3,3016,n,t,e.h.error.message))}function $p(e,t,n){0<t&&(e.U()||e.Ch(t)),t=e.getDuration(),n<t&&(e.U()||e.bb(n))}function ko(e,t){C(function(n){if(n.g==1)return S(n,Promise.resolve(),2);e.m!=Ii&&e.dispatchEvent(t),q(n)})}function my(e){var t=new Set;e=g(e);for(var n=e.next();!n.done;
38n=e.next())n=n.value,n.language?t.add(Ye(n.language)):t.add("und");return t}function vy(e){var t=new Map,n=new Map;e=g(e);for(var i=e.next();!i.done;i=e.next()){i=i.value;var r="und",o=[];i.language&&(r=Ye(i.language)),i.type=="variant"?o=i.audioRoles:o=i.roles,o&&o.length||(o=[""]),t.has(r)||t.set(r,new Set),o=g(o);for(var s=o.next();!s.done;s=o.next())s=s.value,t.get(r).add(s),i.label&&(n.has(r)||n.set(r,new Map),n.get(r).set(s,i.label))}var u=[];return t.forEach(function(a,l){a=g(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=null;n.has(l)&&n.get(l).has(c)&&(d=n.get(l).get(c)),u.push({language:l,role:c,label:d})}}),u}f.Qa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},f.Uc=function(){return!this.h||this.h.ended?!0:this.sa&&!this.U()&&this.h.currentTime>=this.Ja().end},Y("shaka.Player",G),G.prototype.isEnded=G.prototype.Uc,G.prototype.isRemotePlayback=G.prototype.Qa,G.prototype.addFont=G.prototype.addFont,G.prototype.setVideoContainer=G.prototype.Dh,G.prototype.getFetchedPlaybackInfo=G.prototype.pi,G.prototype.getManifestParserFactory=G.prototype.wi,G.prototype.getManifest=G.prototype.Jf,G.prototype.retryStreaming=G.prototype.gg,G.prototype.setMaxHardwareResolution=G.prototype.Fj,G.prototype.addChaptersTrack=G.prototype.Rh,G.prototype.addThumbnailsTrack=G.prototype.Th,G.prototype.addTextTrackAsync=G.prototype.Sh,G.prototype.getStats=G.prototype.getStats,G.prototype.getBufferedInfo=G.prototype.Fb,G.prototype.getSegmentAvailabilityDuration=G.prototype.ee,G.prototype.getPresentationStartTimeAsDate=G.prototype.Xg,G.prototype.getPlayheadTimeAsDate=G.prototype.Ai,G.prototype.setTextTrackVisibility=G.prototype.Ah,G.prototype.getChapters=G.prototype.ki,G.prototype.getChaptersTracks=G.prototype.li,G.prototype.isTextTrackVisible=G.prototype.Rf,G.prototype.selectVariantsByLabel=G.prototype.Aj,G.prototype.selectTextLanguage=G.prototype.jg,G.prototype.selectAudioLanguage=G.prototype.th,G.prototype.getTextLanguages=G.prototype.Gi,G.prototype.getAudioLanguages=G.prototype.hi,G.prototype.getTextLanguagesAndRoles=G.prototype.Hi,G.prototype.getAudioLanguagesAndRoles=G.prototype.ii,G.prototype.getAudioTracks=G.prototype.getAudioTracks,G.prototype.selectAudioTrack=G.prototype.zj,G.prototype.selectVariantTrack=G.prototype.Ee,G.prototype.selectTextTrack=G.prototype.uh,G.prototype.getThumbnails=G.prototype.Ji,G.prototype.getAllThumbnails=G.prototype.gi,G.prototype.getImageTracks=G.prototype.si,G.prototype.getTextTracks=G.prototype.vc,G.prototype.getVariantTracks=G.prototype.Rb,G.prototype.cancelTrickPlay=G.prototype.gd,G.prototype.trickPlay=G.prototype.Nd,G.prototype.getPlaybackRate=G.prototype.gb,G.prototype.isBuffering=G.prototype.Qf,G.prototype.getKeyStatuses=G.prototype.be,G.prototype.getActiveSessionsMetadata=G.prototype.If,G.prototype.getExpiration=G.prototype.pd,G.prototype.drmInfo=G.prototype.drmInfo,G.prototype.keySystem=G.prototype.keySystem,G.prototype.isFullyLoaded=G.prototype.Ti,G.prototype.goToLive=G.prototype.Pi,G.prototype.seekRange=G.prototype.Ja,G.prototype.isAudioOnly=G.prototype.Si,G.prototype.isInProgress=G.prototype.yc,G.prototype.isLive=G.prototype.U,G.prototype.getAdManager=G.prototype.Rg,G.prototype.getAssetUri=G.prototype.Qc,G.prototype.getNetworkingEngine=G.prototype.yb,G.prototype.getMediaElement=G.prototype.zi,G.prototype.getManifestType=G.prototype.Ug,G.prototype.getLoadMode=G.prototype.vi,G.prototype.resetConfiguration=G.prototype.uj,G.prototype.getBufferFullness=G.prototype.Sg,G.prototype.getNonDefaultConfiguration=G.prototype.Wg,G.prototype.getConfigurationForLowLatency=G.prototype.mi,G.prototype.getConfiguration=G.prototype.getConfiguration,G.prototype.configurationForLowLatency=G.prototype.di,G.prototype.configure=G.prototype.configure,G.prototype.releaseAllMutexes=G.prototype.qj,G.prototype.destroyAllPreloads=G.prototype.rf,G.prototype.preload=G.prototype.preload,G.prototype.detachAndSavePreload=G.prototype.Ng,G.prototype.unloadAndSavePreload=G.prototype.Ij,G.prototype.load=G.prototype.load,G.prototype.updateStartTime=G.prototype.Mj,G.prototype.unload=G.prototype.kc,G.prototype.detach=G.prototype.detach,G.prototype.attachCanvas=G.prototype.Wh,G.prototype.attach=G.prototype.Lb,G.probeSupport=function(e){e=e===void 0?!0:e;var t,n,i,r,o,s;return C(function(u){switch(u.g){case 1:if(t={},!e){u.s(2);break}return S(u,ix(),3);case 3:t=u.h;case 2:return n=px(),i=Fx(),S(u,dg(),4);case 4:return r=u.h,o={manifest:n,media:i,drm:t,hardwareResolution:r}
38,s=Ty,s.forEach(function(a,l){o[l]=a()}),u.return(o)}})},G.isBrowserSupported=function(){return j.Promise||Pe("A Promise implementation or polyfill is required"),j.Promise&&j.Uint8Array&&Array.prototype.forEach&&!xt("Trident/")?Fi()?!0:Zs("application/x-mpegurl"):!1},G.setAdManagerFactory=function(e){Kl=e},G.registerSupportPlugin=Gv,G.prototype.destroy=G.prototype.destroy;var Ii=0,Xl=1,cn=2,qn=3;G.LoadMode={DESTROYED:Ii,NOT_LOADED:Xl,MEDIA_SOURCE:cn,SRC_EQUALS:qn},G.version="v4.14.10";var yy=["4","14"];ig=new function(e){this.g=e,this.i=Ys,this.h=uw}(new jn(Number(yy[0]),Number(yy[1])));var Ty=new Map,Kl=null;function Sy(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function OA(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function ae(e,t,n){var i=this;this.g=e,this.h=t,this.j=n,this.i=!1,this.l=this.h.getVolume(),this.m=new Le,this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){i.i=!0}),this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}f=ae.prototype,f.needsSkipUI=function(){return!1},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return!0},f.isUsingAnotherMediaElement=function(){return!0},f.getDuration=function(){return this.g.getDuration()},f.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},f.getRemainingTime=function(){return this.h.getRemainingTime()},f.isPaused=function(){return this.i},f.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},f.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},f.canSkipNow=function(){return this.h.getAdSkippableState()},f.skip=function(){return this.h.skip()},f.pause=function(){return this.h.pause()},f.play=function(){return this.h.resume()},f.getVolume=function(){return this.h.getVolume()},f.setVolume=function(e){return this.j.volume=e,this.h.setVolume(e)},f.isMuted=function(){return this.h.getVolume()==0},f.isLinear=function(){return this.g.isLinear()},f.resize=function(e,t){var n=!1,i=this.j;document.fullscreenEnabled?n=!!document.fullscreenElement:i.webkitSupportsFullscreen&&(n=i.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},f.setMuted=function(e){(this.j.muted=e)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)},f.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},f.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},f.getTitle=function(){return this.g.getTitle()},f.getDescription=function(){return this.g.getDescription()},f.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},f.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},f.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},f.getAdId=function(){return this.g.getAdId()},f.getCreativeAdId=function(){return this.g.getCreativeAdId()},f.getAdvertiserName=function(){return this.g.getAdvertiserName()},f.getMediaUrl=function(){return this.g.getMediaUrl()},f.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},f.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},f.release=function(){this.h=this.g=null},Y("shaka.ads.ClientSideAd",ae),ae.prototype.release=ae.prototype.release,ae.prototype.getPodIndex=ae.prototype.getPodIndex,ae.prototype.getTimeOffset=ae.prototype.getTimeOffset,ae.prototype.getMediaUrl=ae.prototype.getMediaUrl,ae.prototype.getAdvertiserName=ae.prototype.getAdvertiserName,ae.prototype.getCreativeAdId=ae.prototype.getCreativeAdId,ae.prototype.getAdId=ae.prototype.getAdId,ae.prototype.getVastMediaWidth=ae.prototype.getVastMediaWidth,ae.prototype.getVastMediaHeight=ae.prototype.getVastMediaHeight,ae.prototype.getVastMediaBitrate=ae.prototype.getVastMediaBitrate,ae.prototype.getDescription=ae.prototype.getDescription,ae.prototype.getTitle=ae.prototype.getTitle,ae.prototype.getPositionInSequence=ae.prototype.getPositionInSequence,ae.prototype.getSequenceLength=ae.prototype.getSequenceLength,ae.prototype.setMuted=ae.prototype.setMuted,ae.prototype.resize=ae.prototype.resize,ae.prototype.isLinear=ae.prototype.isLinear,ae.prototype.isMuted=ae.prototype.isMuted,ae.prototype.setVolume=ae.prototype.setVolume,ae.prototype.getVolume=ae.prototype.getVolume,ae.prototype.play=ae.prototype.play,ae.prototype.pause=ae.prototype.pause,ae.prototype.skip=ae.prototype.skip,ae.prototype.canSkipNow=ae.prototype.canSkipNow,ae.prototype.getTimeUntilSkippable=ae.prototype.getTimeUntilSkippable,ae.prototype.isSkippable=ae.prototype.isSkippable,ae.prototype.isPaused=ae.prototype.isPaused,ae.prototype.getRemainingTime=ae.prototype.getRemainingTime,ae.prototype.getMinSuggestedDuration=ae.prototype.getMinSuggestedDuration,ae.prototype.getDuration=ae.prototype.getDuration,ae.prototype.isUsingAnotherMediaElement=ae.prototype.isUsingAnotherMediaElement,ae.prototype.hasCu
38stomClick=ae.prototype.hasCustomClick,ae.prototype.isClientRendering=ae.prototype.isClientRendering,ae.prototype.needsSkipUI=ae.prototype.needsSkipUI;function st(){}function wy(e,t){var n=[];e=g(Ge(e,"Ad"));for(var i=e.next();!i.done;i=e.next())if((i=Et(i.value,"InLine"))&&(i=Et(i,"Creatives"))){i=g(Ge(i,"Creative"));for(var r=i.next();!r.done;r=i.next()){r=r.value;var o=Et(r,"Linear");if(o&&_A(n,t,o),r=Et(r,"NonLinearAds")){r=Ge(r,"NonLinear"),r=g(r);for(var s=r.next();!s.done;s=r.next())e:{o=n;var u=t,a=s.value,l=Et(a,"StaticResource");if(l)s=l.attributes.creativeType;else{if(l=Et(a,"HTMLResource"),!l)break e;s="text/html"}if(l=Wn(l)){s==="text/html"&&(l="data:text/html;charset=UTF-8,"+encodeURIComponent(l));var c=ve(a,"width",mn)||ve(a,"expandedWidth",mn),d=ve(a,"height",mn)||ve(a,"expandedHeight",mn);if(c||d){var p=null;(a=a.attributes.minSuggestedDuration)&&(p=Jo(a)),a=0,u!=null&&(a=u),o.push({id:null,groupId:null,startTime:a,endTime:null,uri:l,mimeType:s,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:p,once:!0,pre:u==null,post:u==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:c||0,y:d||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}}}return n}function _A(e,t,n){var i=0;t!=null&&(i=t);var r=null;if(n.attributes.skipoffset&&(r=Jo(n.attributes.skipoffset),isNaN(r)&&(r=null)),n=Et(n,"MediaFiles")){var o=Ge(n,"MediaFile");for(n=o,o=o.filter(function(u){return u.attributes.delivery=="streaming"}),o.length&&(n=o),n=n.sort(function(u,a){return(parseInt(a.attributes.height,10)||0)-(parseInt(u.attributes.height,10)||0)}),n=g(n),o=n.next();!o.done;o=n.next())if(o=o.value,!o.attributes.apiFramework){var s=Wn(o);if(s){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:s,mimeType:o.attributes.type||null,isSkippable:r!=null,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}Y("shaka.ads.Utils",st),st.ADS_LOADED="ads-loaded",st.AD_STARTED="ad-started",st.AD_FIRST_QUARTILE="ad-first-quartile",st.AD_MIDPOINT="ad-midpoint",st.AD_THIRD_QUARTILE="ad-third-quartile",st.AD_COMPLETE="ad-complete",st.AD_STOPPED="ad-stopped",st.AD_SKIPPED="ad-skipped",st.AD_VOLUME_CHANGED="ad-volume-changed",st.AD_MUTED="ad-muted",st.AD_PAUSED="ad-paused",st.AD_RESUMED="ad-resumed",st.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",st.CUEPOINTS_CHANGED="ad-cue-points-changed",st.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",st.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",st.AD_CLICKED="ad-clicked",st.AD_PROGRESS="ad-progress",st.AD_BUFFERING="ad-buffering",st.AD_IMPRESSION="ad-impression",st.AD_DURATION_CHANGED="ad-duration-changed",st.AD_CLOSED="ad-closed",st.AD_LOADED="ad-loaded",st.ALL_ADS_COMPLETED="all-ads-completed",st.AD_LINEAR_CHANGED="ad-linear-changed",st.AD_METADATA="ad-metadata",st.AD_RECOVERABLE_ERROR="ad-recoverable-error",st.AD_ERROR="ad-error",st.AD_BREAK_READY="ad-break-ready",st.AD_INTERACTION="ad-interaction",st.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",st.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",st.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Wl(e,t,n,i,r){var o=this;this.u=e,this.i=t,this.F=!1,this.A=this.o=null,this.G=NaN,this.l=r,this.j=null,this.h=new Le,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.C=new google.ima.AdDisplayContainer(this.u,this.i),this.C.initialize(),this.m=new google.ima.AdsLoader(this.C),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.14.10"),this.g=null,this.B=i||new google.ima.AdsRenderingSettings,this.h.D(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(s){bA(o,s)}),this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(s){xy(o,s)}),this.h.D(this.i,"ended",function(){o.m.contentComplete()}),this.h.qa(this.i,"play",function(){o.F=!0})}Wl.prototype.configure=function(e){this.o=e},Wl.prototype.stop=function(){this.g&&this.g.stop(),this.u&&_r(this.u)},Wl.prototype.release=function(){this.stop(),this.A&&this.A.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.C.destroy()};function xy(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new z("ad-error",t)),zl(e,null),e.l(new z("ad-cue-points-changed",new Map().set("cuepoints",[])))}function bA(e,t){if(e.l(new z("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.G))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.B),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.D(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.D(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.B);e.l(new z("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var i=e.g.getCuePoints();if(i.length){t=[],i=g(i);for(var r=i.next();!r.done;r=i.next())t.push({start:r.value,end:null});e.l(new z("ad-cue-points-changed",new Map().set("cuepoints",t)))}FA(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight,ql(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),e.h.D(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,ql(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in j?(e.A=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,ql(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.A.observe(e.i)):e.h.D(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight,ql(e)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),e.F||e.o.skipPlayDetection?e.g.start():e.h.qa(e.i,"play",function(){e.F=!0,e.g.start()})}catch{zl(e,null)}}function ql(e){return document.fullscreenEnabled?!!document.fullscreenElement:(e=e.i,e.webkitSupportsFullscreen?e.webkitDisplayingFullscreen:!1)}function FA(e){function t(n,i){n=new Map().set("originalEvent",n),e.l(new z(i,n))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){xy(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){Ey(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,function(n){Ey(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}
vendor: 6,201 bytes, line 38
38),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){zl(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){zl(e,n)}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed")}),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.D(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function Ey(e,t){var n=t.getAd();n?(e.j=new ae(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new z("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new z("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.l=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Pe("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function zl(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new z("ad-content-resume-requested")),e.l(new z("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function le(e,t,n,i,r,o){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.A=n,this.o=i,this.m=r,this.u=o,this.B=t.overlay}f=le.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return!1},f.isUsingAnotherMediaElement=function(){return this.u},f.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},f.isPaused=function(){return this.g.paused},f.isSkippable=function(){return this.h&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},f.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},f.canSkipNow=function(){return this.h&&this.getTimeUntilSkippable()==0},f.skip=function(){this.canSkipNow()&&this.A()},f.pause=function(){return this.g.pause()},f.play=function(){return this.g.play()},f.getVolume=function(){return this.g.volume},f.setVolume=function(e){this.g.volume=e},f.isMuted=function(){return this.g.muted},f.isLinear=function(){return this.B==null},f.resize=function(){},f.setMuted=function(e){this.g.muted=e},f.getSequenceLength=function(){return this.o},f.getPositionInSequence=function(){return this.m},f.getTitle=function(){return""},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getAdId=function(){return this.i.id||""},f.getCreativeAdId=function(){return""},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return this.i.uri},f.getTimeOffset=function(){return 0},f.getPodIndex=function(){return 0},f.release=function(){this.g=null},Y("shaka.ads.InterstitialAd",le),le.prototype.release=le.prototype.release,le.prototype.getPodIndex=le.prototype.getPodIndex,le.prototype.getTimeOffset=le.prototype.getTimeOffset,le.prototype.getMediaUrl=le.prototype.getMediaUrl,le.prototype.getAdvertiserName=le.prototype.getAdvertiserName,le.prototype.getCreativeAdId=le.prototype.getCreativeAdId,le.prototype.getAdId=le.prototype.getAdId,le.prototype.getVastMediaWidth=le.prototype.getVastMediaWidth,le.prototype.getVastMediaHeight=le.prototype.getVastMediaHeight,le.prototype.getVastMediaBitrate=le.prototype.getVastMediaBitrate,le.prototype.getDescription=le.prototype.getDescription,le.prototype.getTitle=le.prototype.getTitle,le.prototype.getPositionInSequence=le.prototype.getPositionInSequence,le.prototype.getSequenceLength=le.prototype.getSequenceLength,le.prototype.setMuted=le.prototype.setMuted,le.prototype.resize=le.prototype.resize,le.prototype.isLinear=le.prototype.isLinear,le.prototype.isMuted=le.prototype.isMuted,le.prototype.setVolume=le.prototype.setVolume,le.prototype.getVolume=le.prototype.getVolume,le.prototype.play=le.prototype.play,le.prototype.pause=le.prototype.pause,le.prototype.skip=le.prototype.skip,le.prototype.canSkipNow=le.prototype.canSkipNow,le.prototype.getTimeUntilSkippable=le.prototype.getTimeUntilSkippable,le.prototype.isSkippable=le.prototype.isSkippable,le.prototype.isPaused=le.prototype.isPaused,le.prototype.getRemainingTime=le.prototype.getRemainingTime,le.prototype.getMinSuggestedDuration=le.prototype.getMinSuggestedDuration,le.prototype.getDuration=le.prototype.getDuration,le.prototype.isUsingAnotherMediaElement=le.prototype.isUsingAnotherMediaElement,le.prototype.hasCu
38stomClick=le.prototype.hasCustomClick,le.prototype.isClientRendering=le.prototype.isClientRendering,le.prototype.needsSkipUI=le.prototype.needsSkipUI;function ce(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}f=ce.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return!1},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return-1},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return-1},f.isPaused=function(){return!1},f.isSkippable=function(){return!1},f.getTimeUntilSkippable=function(){return 0},f.canSkipNow=function(){return!1},f.skip=function(){},f.pause=function(){},f.play=function(){},f.getVolume=function(){return 1},f.setVolume=function(){},f.isMuted=function(){return!1},f.isLinear=function(){return this.i},f.resize=function(){},f.setMuted=function(){},f.getSequenceLength=function(){return this.j},f.getPositionInSequence=function(){return this.h},f.getTitle=function(){return""},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getAdId=function(){return this.g.id||""},f.getCreativeAdId=function(){return""},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return this.g.uri},f.getTimeOffset=function(){return 0},f.getPodIndex=function(){return 0},f.release=function(){},Y("shaka.ads.InterstitialStaticAd",ce),ce.prototype.release=ce.prototype.release,ce.prototype.getPodIndex=ce.prototype.getPodIndex,ce.prototype.getTimeOffset=ce.prototype.getTimeOffset,ce.prototype.getMediaUrl=ce.prototype.getMediaUrl,ce.prototype.getAdvertiserName=ce.prototype.getAdvertiserName,ce.prototype.getCreativeAdId=ce.prototype.getCreativeAdId,ce.prototype.getAdId=ce.prototype.getAdId,ce.prototype.getVastMediaWidth=ce.prototype.getVastMediaWidth,ce.prototype.getVastMediaHeight=ce.prototype.getVastMediaHeight,ce.prototype.getVastMediaBitrate=ce.prototype.getVastMediaBitrate,ce.prototype.getDescription=ce.prototype.getDescription,ce.prototype.getTitle=ce.prototype.getTitle,ce.prototype.getPositionInSequence=ce.prototype.getPositionInSequence,ce.prototype.getSequenceLength=ce.prototype.getSequenceLength,ce.prototype.setMuted=ce.prototype.setMuted,ce.prototype.resize=ce.prototype.resize,ce.prototype.isLinear=ce.prototype.isLinear,ce.prototype.isMuted=ce.prototype.isMuted,ce.prototype.setVolume=ce.prototype.setVolume,ce.prototype.getVolume=ce.prototype.getVolume,ce.prototype.play=ce.prototype.play,ce.prototype.pause=ce.prototype.pause,ce.prototype.skip=ce.prototype.skip,ce.prototype.canSkipNow=ce.prototype.canSkipNow,ce.prototype.getTimeUntilSkippable=ce.prototype.getTimeUntilSkippable,ce.prototype.isSkippable=ce.prototype.isSkippable,ce.prototype.isPaused=ce.prototype.isPaused,ce.prototype.getRemainingTime=ce.prototype.getRemainingTime,ce.prototype.getMinSuggestedDuration=ce.prototype.getMinSuggestedDuration,ce.prototype.getDuration=ce.prototype.getDuration,ce.prototype.isUsingAnotherMediaElement=ce.prototype.isUsingAnotherMediaElement,ce.prototype.hasCustomClick=ce.prototype.hasCustomClick,ce.prototype.isClientRendering=ce.prototype.isClientRendering,ce.prototype.needsSkipUI=ce.prototype.needsSkipUI;function Ay(e,t,n,i){var r=this;this.T=null,this.A=e,this.H=t,this.g=n,this.F=null,this.B=!0,this.h=this.g,this.i=i,this.W=new Set,this.G=new Set,this.C=new Map,this.L=new Map,this.j=new G,tf(this),this.I=new Le,this.l=new Le,this.K=!1,this.ea=this.m=this.u=this.o=null,this.fa=!1,this.O=-1,this.$=function(){if(!r.K&&r.o&&!r.H.Qa()){r.o=r.g.currentTime,r.u&&!r.u.pre&&!r.u.post&&r.o<r.u.startTime&&(r.u=null);var o=Xu(r);o&&Yl(r,o,1,1,Date.now())}},this.Z=function(){if(!(r.K||r.o||r.H.Qa())){r.o=r.g.currentTime;var o=Xu(r,!0);o&&Yl(r,o,1,1,Date.now())}},this.P=new ke(this.$),this.M=new ke(function(){var o,s,u,a,l,c,d,p,h,m,y;return C(function(v){switch(v.g){case 1:if(!r.G.size||r.o==null){v.s(0);break}if(o=r.H.m,o==Ii||o==Xl)return v.return();s=!1,u=Array.from(r.G),a=r.H.Ja(),l=g(u),c=l.next();case 3:if(c.done){v.s(5);break}if(d=c.value,d==r.u){v.s(4);break}if(p=d.endTime||d.startTime,!(1<=a.start-p)){h=d.startTime-r.o,0<h&&10>=h&&(!r.C.has(d)&&My(d)&&r.C.set(d,r.j.preload(d.uri,null,d.mimeType||void 0)),Cy(r,d)),v.s(4);break}if(!r.C.has(d)){v.s(7);break}return S(v,r.C.get(d),8);
38case 8:(m=v.h)&&m.destroy(),r.C.delete(d);case 7:ky(r,d),y=JSON.stringify(d),r.W.has(y)&&r.W.delete(y),r.G.delete(d),Jp(r),d.overlay||(s=!0);case 4:c=l.next(),v.s(3);break;case 5:s&&Ql(r),q(v)}})})}f=Ay.prototype,f.configure=function(e){this.T=e,Zp(this)};function BA(e){if(!e.fa&&e.G.size){if(e.I.D(e.g,"playing",e.Z),e.I.D(e.g,"timeupdate",e.Z),e.I.D(e.g,"ended",e.$),"requestVideoFrameCallback"in e.g&&!ld()){var t=e.g,n=function(){e.O!=-1&&(e.$(),e.O!=-1&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.ua(.025);e.M&&e.M.ua(1),e.fa=!0}}function Jp(e){e.fa&&!e.G.size&&(e.I.Ka(e.g,"playing",e.Z),e.I.Ka(e.g,"timeupdate",e.Z),e.I.Ka(e.g,"ended",e.$),e.O!=-1&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.M&&e.M.stop(),e.fa=!1)}function Zp(e){if(e.A&&e.T&&!e.K){var t=e.T.supportsMultipleMediaElements,n=e.g;n.webkitSupportsFullscreen&&n.webkitDisplayingFullscreen&&(t=!1),e.B==t&&(e.B=!t,e.B?(e.h=e.g,e.F&&(e.F.parentElement&&e.A.removeChild(e.F),e.F=null)):(e.F||(t=document.createElement(e.g.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.F=t),e.h=e.F))}}f.stop=function(){if(this.l&&this.l.Ra(),this.W.clear(),this.G.clear(),this.j.rf(),this.C.size){var e=Array.from(this.C.values());e=g(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()})}if(this.C.clear(),this.L.size)for(e=Array.from(this.L.keys()),e=g(e),t=e.next();!t.done;t=e.next())ky(this,t.value);this.L.clear(),this.j.detach(),this.K=!1,this.u=this.o=null,this.B=!0,this.h=this.g,this.F=null,ef(this),Jp(this),this.A&&_r(this.A),this.m&&(this.m.stop(),this.m=null)},f.release=function(){this.stop(),this.I&&this.I.release(),this.l&&this.l.release(),this.P&&(this.P.stop(),this.P=null),this.M&&(this.M.stop(),this.M=null),this.j.destroy()},f.Kf=function(){return this.j};function VA(e,t){var n;C(function(i){if(i.g==1)return tf(e),S(i,KA(e,t),2);n=i.h,n.length?Gu(e,n):Pe("Unsupported HLS interstitial",t),q(i)})}function HA(e,t){var n=Et(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,o=n.attributes.loop=="true",s=ve(n,"z",mn);if(i&&s!=0){var u={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},a=Et(n,"Viewport"),l=Et(n,"TopLeft"),c=Et(n,"Size");if(a&&l&&c){if(u=ve(a,"x",mn),u==null||(a=ve(a,"y",mn),a==null))return;var d=ve(l,"x",mn);if(d==null||(l=ve(l,"y",mn),l==null))return;var p=ve(c,"x",mn);if(p==null||(c=ve(c,"y",mn),c==null))return;u={viewport:{x:u,y:a},topLeft:{x:d,y:l},size:{x:p,y:c}}}c=Et(n,"SqueezeCurrent"),n=null,c&&(c=ve(c,"percentage",ou))&&(n={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*c,y:1080*c}}),Gu(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:o,overlay:u,displayOnBackground:s==-1,currentVideo:n,background:null}])}}f.addAdUrlInterstitial=function(e){var t=this,n,i,r,o,s,u,a,l,c;return C(function(d){switch(d.g){case 1:return n={type:12},S(d,nf(t,e,n),2);case 2:if(i=d.h,r=ru(i,"VAST,vmap:VMAP"),!r)throw new k(2,10,10007);if(o=[],r.tagName=="VAST"){o=wy(r,t.o),d.s(3);break}if(r.tagName!="vmap:VMAP"){d.s(3);break}for(var p=[],h=g(Ge(r,"vmap:AdBreak")),m=h.next();!m.done;m=h.next()){var y=m.value,v=y.attributes.timeOffset;v&&(m=null,v=="start"?m=0:v=="end"?m=1/0:m=Jo(v),(y=Et(y,"vmap:AdSource"))&&(y=Et(y,"vmap:AdTagURI"))&&(y=Ct(y))&&p.push({time:m,uri:y}))}s=g(p),u=s.next();case 5:if(u.done){d.s(3);break}return a=u.value,S(d,nf(t,a.uri,n),8);case 8:if(l=d.h,c=ru(l,"VAST"),!c)throw new k(2,10,10007);o.push.apply(o,W(wy(c,a.time))),u=s.next(),d.s(5);break;case 3:Gu(t,o),q(d)}})};function Gu(e,t){var n,i,r,o,s,u,a,l;C(function(c){switch(c.g){case 1:n=!1,i=g(t),r=i.next();case 2:if(r.done){c.s(4);break}if(o=r.value,!o.uri){Pe("Missing URL in interstitial",o),c.s(3);break}if(o.mimeType){c.s(5);break}return ee(c,6),s=e.j.yb(),S(c,Mo(o.uri,s,e.H.getConfiguration().streaming.retryParameters),8);case 8:o.mimeType=c.h,fe(c,5);break;case 6:re(c);case 5:if(u=o.id||JSON.stringify(o),e.W.has(u)){c.s(3);break}o.loop&&!o.overlay&&Pe("Loop is only supported in overlay interstitials",o),o.overlay||(n=!0),e.W.add(u),e.G.add(o),a=!1,o.pre&&e.o==null?a=!0:o.startTime!=0||o.canJump?e.o!=null&&(l=o.startTime-e.o,0<l&&10>=l&&(a=!0)):a=!0,a&&(!e.C.has(o)&&My(o)&&e.C.set(o,e.j.preload(o.uri,null,o.mimeType||void 0)),Cy(e,o));case 3:r=i.next(),c.s(2);break;case 4:n&&Ql(e),BA(e),q(c)}})}function Xu(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var i=0,r=null;if(e.G.size&&e.o!=null){var o=e.g.ended,s=Array.from(e.G).sort(function(c,d){return d.startTime-c.startTime}),u=s;for(u=t?s.filter(function(c){return c.pre}):o?s.filter(function(c){return c.post}):s.filter(function(c){return!c.pre&&!c.post}),s=g(u),u=s.next();!u.done;u=s.next()){u=u.value;var a=!1;if(t)a=u.pre;else if(o)a=u.post;else if(!u.pre&&!u.post){var l=e.o-Math.round(1e3*u.startTime)/1e3;0<l&&(1>=l||!u.canJump)&&(a=!(n==null&&e.u&&!e.u.pre&&!e.u.post&&e.u.startTime>=u.startTime))}a&&(!e.u||u.startTime>=e.u.startTime)&&(i==(n||0)?r=u:r&&!u.canJump&&.001<Math.round(1e3*u.startTime)/1e3-Math.round(1e3*r.startTime)/1e3&&(r=u,i=0),i++)}}return r}
38function Yl(e,t,n,i,r,o){o=o===void 0?0:o,e.u=t,Zp(e),!e.h.parentElement&&e.A&&e.A.appendChild(e.h),i==1&&n==1&&(n=Array.from(e.G).filter(function(s){return t.pre?s.pre==t.pre:t.post?s.post==t.post:.001>Math.abs(s.startTime-t.startTime)}).length),t.once&&(o++,e.G.delete(t),Jp(e),t.overlay||Ql(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?GA(e,t,n,i,o):Pe("Unsupported interstitial",t):e.B&&t.overlay?Pe("Unsupported interstitial",t):XA(e,t,n,i,r,o)}function GA(e,t,n,i,r){function o(){e.m&&(e.m.stop(),e.m=null),e.A.removeChild(a),ef(e,t),e.i(new z("ad-stopped"));var p=Xu(e,t.pre,i-r);p?(e.l.Ra(),Yl(e,p,n,++i,Date.now(),r)):e.K=!1}var s=t.overlay,u=t.mimeType=="text/html"?"iframe":"img",a=document.createElement(u);a.style.objectFit="contain",a.style.position="absolute",a.style.border="none",Iy(e,t),e.i(new z("ad-started",new Map().set("ad",new ce(t,n,i)))),u=="iframe"?a.src=t.uri:(a.src=t.uri,a.onerror=function(p){e.i(new z("ad-error",new Map().set("originalEvent",p))),o()});var l=s.viewport,c=s.topLeft;s=s.size,l.x==0&&l.y==0?(a.width=t.overlay.size.x,a.height=t.overlay.size.y,a.style.bottom="10%",a.style.left="0",a.style.right="0",a.style.width="100%",t.overlay.size.y||u!="iframe"||(a.style.height="auto")):(a.style.height=s.y/l.y*100+"%",a.style.left=c.x/l.x*100+"%",a.style.top=c.y/l.y*100+"%",a.style.width=s.x/l.x*100+"%"),e.A.appendChild(a);var d=Date.now();e.m&&e.m.stop(),e.m=new ke(function(){t.playoutLimit&&(Date.now()-d)/1e3>t.playoutLimit?(e.i(new z("ad-complete")),o()):t.endTime&&e.g.currentTime>t.endTime?(e.i(new z("ad-complete")),o()):e.g.currentTime<t.startTime&&(e.i(new z("ad-skipped")),o())}),t.playoutLimit&&!t.endTime?e.m.da(t.playoutLimit):t.endTime&&e.m.ua(.025),e.l.D(e.g,"seeked",function(){var p=e.g.currentTime;(p<t.startTime||t.endTime&&p>t.endTime)&&(e.m&&e.m.stop(),e.i(new z("ad-skipped")),o())})}function XA(e,t,n,i,r,o){var s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A;C(function(E){switch(E.g){case 1:if(s=Date.now(),e.K=!0,!e.B||i!=1){E.s(2);break}return e.i(new z("ad-content-pause-requested",new Map().set("saveLivePosition",!0))),u=new We,a=function(D){return C(function(P){if(P.g==1)return D.state!="detach"?P.s(0):ld()?S(P,new Promise(function(O){return new ke(O).da(.1)}),3):P.s(3);u.resolve(),e.l.Ka(e.H,"onstatechange",a),q(P)})},e.l.D(e.H,"onstatechange",a),S(E,u,2);case 2:return Iy(e,t),e.B||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,l=t.overlay.viewport,c=t.overlay.topLeft,d=t.overlay.size,e.h.style.height=d.y/l.y*100+"%",e.h.style.left=c.x/l.x*100+"%",e.h.style.top=c.y/l.y*100+"%",e.h.style.width=d.x/l.x*100+"%"):(e.g.pause(),t.resumeOffset!=null&&t.resumeOffset!=0&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),p=!1,h=function(){if(!e.B&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var D=Date.now();e.g.currentTime+=(D-r)/1e3,r=D}},m=function(D){var P,O;return C(function(L){if(L.g==1){if(h(),P=Xu(e,t.pre,i-o),D&&t.groupId)for(;P&&P.groupId==t.groupId;)i++,P=Xu(e,t.pre,i-o);return e.m&&(!t.groupId||P&&P.groupId!=t.groupId)&&(e.m.stop(),e.m=null),ef(e,t),P&&!P.overlay?L.s(2):(t.post&&(e.o=null,e.u=null),e.B?S(L,e.j.detach(),4):S(L,e.j.kc(),4))}L.g!=2&&(e.B&&(O=t.resumeOffset,O==null&&(O=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.o||0):(Date.now()-r)/1e3),e.i(new z("ad-content-resume-requested",new Map().set("offset",O)))),e.i(new z("ad-stopped")),e.l.Ra(),e.K=!1,e.B?Ql(e):(e.h.style.display="none",h(),e.g.ended||e.g.play())),Zp(e),P&&(e.i(new z("ad-stopped")),e.l.Ra(),Yl(e,P,n,++i,r,o)),q(L)})},y=function(D){return C(function(P){return p?P.return():(p=!0,e.i(new z("ad-error",new Map().set("originalEvent",D))),S(P,m(!1),0))})},v=function(){return C(function(D){if(D.g==1)return p?D.return():(p=!0,S(D,m(!1),2));e.i(new z("ad-complete")),q(D)})},e.ea=function(){return C(function(D){return p?D.return():(p=!0,e.i(new z("ad-skipped")),S(D,m(!0),0))})},T=new le(e.h,t,e.ea,n,i,!e.B),e.B||(T.setMuted(e.g.muted),T.setVolume(e.g.volume)),e.i(new z("ad-started",new Map().set("ad",T))),(w=T.canSkipNow())&&e.i(new z("ad-skip-state-changed")),e.l.qa(e.j,"error",y),e.l.D(e.h,"timeupdate",function(){if(e.h.duration){var D=T.canSkipNow();w!=D&&0<T.getRemainingTime()&&0<T.getDuration()&&e.i(new z("ad-skip-state-changed")),w=D}}),e.l.qa(e.j,"firstquartile",function(){h(),e.i(new z("ad-first-quartile"))}),e.l.qa(e.j,"midpoint",function(){h(),e.i(new z("ad-midpoint"))}),e.l.qa(e.j,"thirdquartile",function(){h(),e.i(new z("ad-third-quartile"))}),e.l.qa(e.j,"complete",v),e.l.D(e.h,"play",function(){e.i(new z("ad-resumed"))}),e.l.D(e.h,"pause",function(){var D=e.j.getConfiguration();e.h.currentTime>=D.playRangeEnd?v():e.i(new z("ad-paused"))}),e.l.D(e.h,"volumechange",function(){e.h.muted?e.i(new z("ad-muted")):e.i(new z("ad-volume-changed"))}),ee(E,4),tf(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(I=t.endTime-t.startTime,0<I&&e.j.configure("playRangeEnd",I)),t.playoutLimit&&!e.m&&(e.m=new ke(function(){e.ea()}).da(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),S(E,e.j.Lb(e.h),6);case 6:return e.C.has(t)?S(E,e.C.get(t),10):S(E,e.j.load(t.uri,null,t.mimeType||void 0),8);case 10:return M=E.h,e.C.delete(t),M?S(E,e.j.load(M),8):S(E,e.j.load(t.uri,null,t.mimeType||void 0),8);case 8:e.h.play(),R=(Date.now()-s)/1e3,e.i(new z("ads-loaded",new Map().set("loadTime",R))),e.B&&e.g.play(),t.overlay&&(e.l.D(e.g,"seeking",function(){var D=e.g.currentTime-t.startTime;
38.1<Math.abs(D-e.h.currentTime)&&(e.h.currentTime=D)}),e.l.D(e.g,"seeked",function(){var D=e.g.currentTime;(D<t.startTime||t.endTime&&D>t.endTime)&&e.ea()})),fe(E,0);break;case 4:if(A=re(E),!e.K)return E.return();y(A),q(E)}})}function Iy(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),t.currentVideo!=null){var n=t.currentVideo;e.g.style.transformOrigin="top left";var i=!0,r=[],o=n.topLeft.x/n.viewport.x*100;0<o&&100>=o&&(r.push("translateX("+o+"%)"),i=!1),o=n.topLeft.y/n.viewport.y*100,0<o&&100>=o&&(r.push("translateY("+o+"%)"),i=!1),o=n.size.x/n.viewport.x,1>o&&r.push("scaleX("+o+")"),n=n.size.y/n.viewport.y,1>o&&r.push("scaleY("+n+")"),r.length&&(e.g.style.transform=r.join(" ")),i&&(e.g.style.transition="transform 250ms")}e.A&&(e.A.style.pointerEvents="none",t.background&&(e.A.style.background=t.background)),e.F&&(e.F.style.background=t.overlay?"":"rgb(0, 0, 0)")}function ef(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&t.currentVideo==null||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.A&&(e.A.style.pointerEvents="",!t||t.background)&&(e.A.style.background=""),e.F&&(e.F.style.background="")}function KA(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X,K,pe,te,Be,De,xe,Ae,_e,Se,Re;return C(function(ge){switch(ge.g){case 1:if(n=[],!t||(i=t.values.find(function(we){return we.key=="X-ASSET-URI"}),r=t.values.find(function(we){return we.key=="X-ASSET-LIST"}),!i&&!r))return ge.return(n);if(o=null,(s=t.values.find(function(we){return we.key=="ID"}))&&(o=s.data),u=o==null?Math.floor(10*t.startTime)/10:t.startTime,(a=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(a=o==null?Math.floor(10*t.endTime)/10:t.endTime),l=t.values.find(function(we){return we.key=="X-RESTRICT"}),d=c=!0,l&&l.data&&(p=l.data,c=!p.includes("SKIP"),d=!p.includes("JUMP")),h=c?0:null,(m=t.values.find(function(we){return we.key=="X-ENABLE-SKIP-AFTER"}))&&(y=m.data,h=parseFloat(y),isNaN(h)&&(h=c?0:null)),v=null,(T=t.values.find(function(we){return we.key=="X-ENABLE-SKIP-FOR"}))&&(w=T.data,v=parseFloat(w),isNaN(h)&&(v=null)),I=null,(M=t.values.find(function(we){return we.key=="X-RESUME-OFFSET"}))&&(R=M.data,I=parseFloat(R),isNaN(I)&&(I=null)),A=null,(E=t.values.find(function(we){return we.key=="X-PLAYOUT-LIMIT"}))&&(D=E.data,A=parseFloat(D),isNaN(A)&&(A=null)),L=O=P=!1,(U=t.values.find(function(we){return we.key=="CUE"}))&&(_=U.data,P=_.includes("ONCE"),O=_.includes("PRE"),L=_.includes("POST")),F=!1,(H=t.values.find(function(we){return we.key=="X-TIMELINE-OCCUPIES"}))?(V=H.data,F=V.includes("RANGE")):!M&&e.H.U()&&(F=!O&&!L),i){if(X=i.data,!X)return ge.return(n);n.push({id:o,groupId:null,startTime:u,endTime:a,uri:X,mimeType:null,isSkippable:c,skipOffset:h,skipFor:v,canJump:d,resumeOffset:I,playoutLimit:A,once:P,pre:O,post:L,timelineRange:F,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),ge.s(2);break}if(!r){ge.s(2);break}return K=r.data,K?(ee(ge,4),pe={type:11},S(ge,nf(e,K,pe),6)):ge.return(n);case 6:for(te=ge.h,Be=at(te),De=JSON.parse(Be),(xe=De["SKIP-CONTROL"])&&(Ae=xe["ENABLE-SKIP-AFTER"],typeof Ae=="number"&&(h=parseFloat(Ae),isNaN(Ae)&&(h=c?0:null)),_e=xe["ENABLE-SKIP-FOR"],typeof _e=="number"&&(v=parseFloat(_e),isNaN(_e)&&(v=null))),Se=0;Se<De.ASSETS.length;Se++)Re=De.ASSETS[Se],Re.URI&&n.push({id:o+"_shaka_asset_"+Se,groupId:o,startTime:u,endTime:a,uri:Re.URI,mimeType:null,isSkippable:c,skipOffset:h,skipFor:v,canJump:d,resumeOffset:I,playoutLimit:A,once:P,pre:O,post:L,timelineRange:F,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});fe(ge,2);break;case 4:re(ge);case 2:return ge.return(n)}})}function Ql(e){for(var t=[],n=g(e.G),i=n.next(),r={};!i.done;r={$b:void 0},i=n.next())i=i.value,i.overlay||(r.$b={start:i.startTime,end:null},i.pre?(r.$b.start=0,r.$b.end=null):i.post?(r.$b.start=-1,r.$b.end=null):i.timelineRange&&(r.$b.end=i.endTime),t.find(function(o){return function(s){return o.$b.start==s.start&&o.$b.end==s.end}}(r))||t.push(r.$b));e.i(new z("ad-cue-points-changed",new Map().set("cuepoints",t)))}function tf(e){e.j.configure(e.H.Wg()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),rm(e.H.yb(),e.j.yb())}function nf(e,t,n){var i,r,o;
38return C(function(s){return s.g==1?(i=Ot([t],Li()),r=e.H.yb().request(7,i,n),S(s,r.promise,2)):(o=s.h,s.return(o.data))})}function My(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function Cy(e,t){if(!(e.L.has(t)||e.T&&!e.T.allowPreloadOnDomElements)){var n=function(o){var s=document.createElement("link");return s.rel="preload",s.href=o,s.as="image",document.head.appendChild(s),s},i=[];if(t.background){var r=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);r&&i.push(n(r[2]))}t.mimeType.startsWith("image/")&&i.push(n(t.uri)),e.L.set(t,i)}}function ky(e,t){if(e.L.has(t)){var n=e.L.get(t);n=g(n);for(var i=n.next();!i.done;i=n.next())i=i.value,i.parentNode.removeChild(i);e.L.delete(t)}}function ue(e,t,n,i,r){this.h=e,this.j=Jo(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}f=ue.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!1},f.hasCustomClick=function(){return!1},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return this.h.durationInSeconds},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},f.isPaused=function(){return this.g.paused},f.isSkippable=function(){return typeof this.j=="number"},f.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},f.canSkipNow=function(){return this.getTimeUntilSkippable()==0},f.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},f.pause=function(){return this.g.pause()},f.play=function(){return this.g.play()},f.getVolume=function(){return this.g.volume},f.setVolume=function(e){this.g.volume=e},f.isMuted=function(){return this.g.muted},f.isLinear=function(){return this.o},f.resize=function(){},f.setMuted=function(e){this.g.muted=e},f.getSequenceLength=function(){return this.l?this.l:1},f.getPositionInSequence=function(){return this.i?this.i:1},f.getTitle=function(){return this.h.adTitle},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getAdId=function(){return this.h.adId},f.getCreativeAdId=function(){return this.h.creativeId},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return null},f.getTimeOffset=function(){return 0},f.getPodIndex=function(){return 0},f.release=function(){this.l=this.i=this.g=this.h=null},Y("shaka.ads.MediaTailorAd",ue),ue.prototype.release=ue.prototype.release,ue.prototype.getPodIndex=ue.prototype.getPodIndex,ue.prototype.getTimeOffset=ue.prototype.getTimeOffset,ue.prototype.getMediaUrl=ue.prototype.getMediaUrl,ue.prototype.getAdvertiserName=ue.prototype.getAdvertiserName,ue.prototype.getCreativeAdId=ue.prototype.getCreativeAdId,ue.prototype.getAdId=ue.prototype.getAdId,ue.prototype.getVastMediaWidth=ue.prototype.getVastMediaWidth,ue.prototype.getVastMediaHeight=ue.prototype.getVastMediaHeight,ue.prototype.getVastMediaBitrate=ue.prototype.getVastMediaBitrate,ue.prototype.getDescription=ue.prototype.getDescription,ue.prototype.getTitle=ue.prototype.getTitle,ue.prototype.getPositionInSequence=ue.prototype.getPositionInSequence,ue.prototype.getSequenceLength=ue.prototype.getSequenceLength,ue.prototype.setMuted=ue.prototype.setMuted,ue.prototype.resize=ue.prototype.resize,ue.prototype.isLinear=ue.prototype.isLinear,ue.prototype.isMuted=ue.prototype.isMuted,ue.prototype.setVolume=ue.prototype.setVolume,ue.prototype.getVolume=ue.prototype.getVolume,ue.prototype.play=ue.prototype.play,ue.prototype.pause=ue.prototype.pause,ue.prototype.skip=ue.prototype.skip,ue.prototype.canSkipNow=ue.prototype.canSkipNow,ue.prototype.getTimeUntilSkippable=ue.prototype.getTimeUntilSkippable,ue.prototype.isSkippable=ue.prototype.isSkippable,ue.prototype.isPaused=ue.prototype.isPaused,ue.prototype.getRemainingTime=ue.prototype.getRemainingTime,ue.prototype.getMinSuggestedDuration=ue.prototype.getMinSuggestedDuration,ue.prototype.getDuration=ue.prototype.getDuration,ue.prototype.isUsingAnotherMediaElement=ue.prototype.isUsingAnotherMediaElement,ue.prototype.hasCu
38stomClick=ue.prototype.hasCustomClick,ue.prototype.isClientRendering=ue.prototype.isClientRendering,ue.prototype.needsSkipUI=ue.prototype.needsSkipUI;function Ku(e,t,n,i){this.B=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=i,this.I=!1,this.A=null,this.j=[],this.M=[],this.L=this.C=this.g=null,this.F=new Map,this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.o=new Le}Ku.prototype.stop=function(){for(var e=g(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ka(t.target,t.type,t.listener);Ds(this),this.m=[],this.u=[],this.G="",this.O=!0,this.H="",this.A=null,this.j=[],this.M=[],this.F.clear()},Ku.prototype.release=function(){this.stop(),this.o&&this.o.release()},Ku.prototype.onManifestUpdated=function(e){this.I=e,this.G!=""&&(qA(this,this.G,this.O),this.O=!1)},Ku.prototype.getCuePoints=function(){for(var e=[],t=g(this.j),n=t.next();!n.done;n=t.next()){n=g(n.value.ads);for(var i=n.next();!i.done;i=n.next())i=i.value,e.push({start:i.startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds})}return e};function WA(e,t,n){var i,r,o,s,u,a,l,c,d,p,h,m;C(function(y){if(y.g==1)return i={type:7},r=Ot([t],Li()),r.method="POST",n&&(o=JSON.stringify(n),r.body=Si(o)),s=e.K.request(7,r,i),ee(y,2),S(y,s.promise,4);if(y.g!=2){if(u=y.h,a=at(u.data),l=JSON.parse(a),l.manifestUrl&&l.trackingUrl)c=new vt(t),d=new vt(l.trackingUrl),e.G=c.resolve(d).toString(),p=Date.now()/1e3,h=p-e.P,e.i(new z("ads-loaded",new Map().set("loadTime",h))),m=new vt(l.manifestUrl),e.l.resolve(c.resolve(m).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return fe(y,0)}if(re(y),!e.H.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,y.return();e.l.resolve(e.H),e.l=null,q(y)})}function qA(e,t,n){var i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w;C(function(I){if(I.g==1)return i={type:8},r=Ot([t],Li()),o=e.K.request(7,r,i),ee(I,2),S(I,o.promise,4);if(I.g!=2){if(s=I.h,u=[],a=at(s.data),l=JSON.parse(a),0<l.avails.length){if(JSON.stringify(e.j)!=JSON.stringify(l.avails)){for(e.j=l.avails,c=g(e.j),d=c.next();!d.done;d=c.next())for(p=d.value,h=g(p.nonLinearAdsList),m=h.next();!m.done;m=h.next())for(y=m.value,v=g(y.nonLinearAdList),T=v.next();!T.done;T=v.next())w=T.value,zA(e,w);u=e.getCuePoints(),e.i(new z("ad-cue-points-changed",new Map().set("cuepoints",u)))}}else e.j.length&&e.i(new z("ad-cue-points-changed",new Map().set("cuepoints",u))),Ds(e),e.j=[];return n&&(e.I||0<u.length)&&YA(e),fe(I,0)}re(I),q(I)})}function zA(e,t){var n,i,r,o,s,u,a,l;C(function(c){if(c.g==1)return!t.staticResource||(n=Dy(t),e.F.get(n))?c.return():(i={type:9},r=Ot([t.staticResource],Li()),o=e.K.request(7,r,i),ee(c,2),e.F.set(n,[]),S(c,o.promise,4));if(c.g!=2)return s=c.h,u=at(s.data),a=JSON.parse(u),l=a.apps,e.F.set(n,l),fe(c,0);re(c),e.F.delete(n),q(c)})}function Dy(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function YA(e){Ry(e),e.I||(Py(e),e.o.D(e.h,"seeked",function(){Py(e)}),e.o.D(e.h,"ended",function(){Ds(e)})),e.o.D(e.h,"timeupdate",function(){Ry(e)})}function Py(e){var t=e.h.currentTime;if(t!=0&&e.A==null){for(var n,i,r=g(e.j),o=r.next();!o.done;o=r.next()){o=o.value;for(var s=g(o.ads),u=s.next();!u.done;u=s.next())if(u=u.value,!i)u.startTimeInSeconds<t&&(i=u,n=o);else if(u.startTimeInSeconds<t&&u.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=u,n=o;break}}n&&i&&!e.M.includes(i.adId)&&(e.A=t,e.h.currentTime=n.startTimeInSeconds)}}function Ry(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.C,r=i.startTimeInSeconds+.5*i.durationInSeconds,o=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),yn(e,"firstQuartile")):t>=r&&!e.u.includes("midpoint")?(e.u.push("midpoint"),yn(e,"midpoint")):t>=o&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),yn(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&0<i&&0<r&&yn(e,"skipStateChanged"),0<r&&(0>=i||i>r)&&Ds(e)}if(!e.g||!e.g.isLinear()){e:for(i=g(e.j),r=i.next();!r.done&&(r=r.value,!(e.g&&e.g.isLinear()));r=i.next())for(o=0;o<r.ads.length;o++){var s=r.ads[o],u=s.startTimeInSeconds+s.durationInSeconds;if(s.startTimeInSeconds<=t&&u>t){if(e.M.includes(s.adId)){if(e.h.ended)continue;e.h.currentTime=u;break e}Ds(e),e.L=r,e.g=new ue(s,o+1,r.ads.length,!0,e.h),e.C=s,o===0&&yn(e,"breakStart"),Ly(e);break}}if(!e.g){for(i=g(e.j),r=i.next();!r.done&&(r=r.value,!e.g);r=i.next())for(o=0;o<r.nonLinearAdsList.length;o++)if(s=r.nonLinearAdsList[o],s.nonLinearAdList.length){u=r.startTimeInSeconds;var a=e.F.get(Dy(s.nonLinearAdList[0]));if(u<=t&&a&&a.length){Ds(e),u=e,a=g(a);for(var l=a.next();!l.done;l=a.next())if(l=l.value,l.data.source.length){var c=document.createElement("img");c.src=l.data.source[0].url,c.style.top=(l.placeholder.top||0)+"%",c.style.height=100-(l.placeholder.top||0)+"%",c.style.left=(l.placeholder.left||0)+"%",c.style.maxWidth=100-(l.placeholder.left||0)+"%",c.style.objectFit="contain",c.style.position="absolute",u.B.appendChild(c)}e.L=r,e.g=new ue(s,o+1,r.ads.length,!1,e.h),e.C=s,o===0&&yn(e,"breakStart"),Ly(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.A&&e.A>t&&(e.h.currentTime=e.A),e.A=null)}}}function Ds(e){if(e.g){for(;e.B.lastChild;)e.B.removeChild(e.B.firstChild);e.I||e.M.push(e.C.adId);var t=e.g.m;t!==void 0&&t?yn(e,"skip"):yn(e,"complete"),t=g(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Ka(n.target,n.type,n.listener);e.m=[],e.u=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&yn(e,"breakEnd"),e.g=null,e.C=null,e.L=null}}function Ly(e){var t=!1;e.h.paused?t=!0:(yn(e,"impression"),yn(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&yn(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||yn(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(yn(e,"impression"),yn(e,"start"),t=!1):yn(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){yn(e,"pause")}});for(var n=g(e.m),i=n.next();!i.done;i=n.next())i=i.value,e.o.D(i.target,i.type,i.listener)}function yn(e,t){var n=e.C.trackingEvents.find(function(o){return o.eventType==t});if(n||(n=e.L.adBreakTrackingEvents.find(function(o){return o.eventType==t})),n){var i={type:10};n=g(n.beaconUrls);for(var r=n.next();!r.done;r=n.next())(r=r.value)&&r!=""&&(r=Ot([r],Li()),r.method="POST",e.K.request(7,r,i))}switch(t){case"impression":e.i(new z("ad-impression"));break;case"start":e.i(new z("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new z("ad-muted"));break;case"unmute":e.i(new z("ad-volume-changed"));break;case"resume":e.i(new z("ad-resumed"));break;case"pause":e.i(new z("ad-paused"));break;case"firstQuartile":e.i(new z("ad-first-quartile"));break;case"midpoint":e.i(new z("ad-midpoint"));break;case"thirdQuartile":e.i(new z("ad-third-quartile"));break;case"complete":e.i(new z("ad-complete")),e.i(new z("ad-stopped"));break;case"skip":e.i(new z("ad-skipped")),e.i(new z("ad-stopped"));break;case"breakStart":e.B.setAttribute("ad-active","true");break;case"breakEnd":e.B.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new z("ad-skip-state-changed"))}}function de(e,t){this.g=e,this.i=null,this.h=t}f=de.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!1}
vendor: 4,749 bytes, line 38
38,f.hasCustomClick=function(){return!0},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return this.i?this.i.duration:-1},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},f.isPaused=function(){return this.h.paused},f.isSkippable=function(){return this.g.isSkippable()},f.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},f.canSkipNow=function(){return this.getTimeUntilSkippable()==0},f.skip=function(){this.h.currentTime+=this.getRemainingTime()},f.pause=function(){return this.h.pause()},f.play=function(){return this.h.play()},f.getVolume=function(){return this.h.volume},f.setVolume=function(e){this.h.volume=e},f.isMuted=function(){return this.h.muted},f.isLinear=function(){return!0},f.resize=function(){},f.setMuted=function(e){this.h.muted=e},f.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},f.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},f.getTitle=function(){return this.g.getTitle()},f.getDescription=function(){return this.g.getDescription()},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},f.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},f.getAdId=function(){return this.g.getAdId()},f.getCreativeAdId=function(){return this.g.getCreativeAdId()},f.getAdvertiserName=function(){return this.g.getAdvertiserName()},f.getMediaUrl=function(){return null},f.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},f.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},f.release=function(){this.h=this.i=this.g=null},Y("shaka.ads.ServerSideAd",de),de.prototype.release=de.prototype.release,de.prototype.getPodIndex=de.prototype.getPodIndex,de.prototype.getTimeOffset=de.prototype.getTimeOffset,de.prototype.getMediaUrl=de.prototype.getMediaUrl,de.prototype.getAdvertiserName=de.prototype.getAdvertiserName,de.prototype.getCreativeAdId=de.prototype.getCreativeAdId,de.prototype.getAdId=de.prototype.getAdId,de.prototype.getVastMediaWidth=de.prototype.getVastMediaWidth,de.prototype.getVastMediaHeight=de.prototype.getVastMediaHeight,de.prototype.getVastMediaBitrate=de.prototype.getVastMediaBitrate,de.prototype.getDescription=de.prototype.getDescription,de.prototype.getTitle=de.prototype.getTitle,de.prototype.getPositionInSequence=de.prototype.getPositionInSequence,de.prototype.getSequenceLength=de.prototype.getSequenceLength,de.prototype.setMuted=de.prototype.setMuted,de.prototype.resize=de.prototype.resize,de.prototype.isLinear=de.prototype.isLinear,de.prototype.isMuted=de.prototype.isMuted,de.prototype.setVolume=de.prototype.setVolume,de.prototype.getVolume=de.prototype.getVolume,de.prototype.play=de.prototype.play,de.prototype.pause=de.prototype.pause,de.prototype.skip=de.prototype.skip,de.prototype.canSkipNow=de.prototype.canSkipNow,de.prototype.getTimeUntilSkippable=de.prototype.getTimeUntilSkippable,de.prototype.isSkippable=de.prototype.isSkippable,de.prototype.isPaused=de.prototype.isPaused,de.prototype.getRemainingTime=de.prototype.getRemainingTime,de.prototype.getMinSuggestedDuration=de.prototype.getMinSuggestedDuration,de.prototype.getDuration=de.prototype.getDuration,de.prototype.isUsingAnotherMediaElement=de.prototype.isUsingAnotherMediaElement,de.prototype.hasCustomClick=de.prototype.hasCustomClick,de.prototype.isClientRendering=de.prototype.isClientRendering,de.prototype.needsSkipUI=de.prototype.needsSkipUI;function Ny(e,t,n,i){var r=this;this.u=e,this.l=t,this.j=null,this.F=NaN,this.i=i,this.G=!1,this.A=this.m=this.o=null,this.B="",this.C=[],this.h=new Le,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new z("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(o){QA(r,o)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.B.length?r.j.resolve(r.B):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.j=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(o){o=o.getAd(),r.m=new de(o,r.l),r.A&&(r.m.i=r.A),r.i(new z("ad-started",new Map().set("ad",r.m))),r.u.setAttribute("ad-active","true")}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.u.removeAttribute("ad-active");var o=r.l.currentTime;r.o&&r.o>
38o&&(r.l.currentTime=r.o,r.o=null)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(o){r.A=o.getStreamData().adProgressData,r.m&&(r.m.i=r.A)}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new z("ad-first-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new z("ad-midpoint"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new z("ad-third-quartile"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new z("ad-complete")),r.i(new z("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new z("ad-skipped")),r.i(new z("ad-stopped"))}),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(o){var s=o.getStreamData();o=[],s=g(s.cuepoints);for(var u=s.next();!u.done;u=s.next())u=u.value,o.push({start:u.start,end:u.end});r.C=o,r.i(new z("ad-cue-points-changed",new Map().set("cuepoints",o)))})}f=Ny.prototype,f.configure=function(){},f.stop=function(){this.B="",this.o=null,this.C=[]},f.release=function(){this.stop(),this.h&&this.h.release()},f.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},f.getCuePoints=function(){return this.C};function QA(e,t){e.i(new z("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.D(e.l,"seeked",function(){var n=e.l.currentTime;if(n!=0){e.g.streamTimeForContentTime(n);var i=e.g.previousCuePointForStreamTime(n);i&&!i.played&&(e.o=n,e.l.currentTime=i.start)}})}function J(){qe.call(this),this.h=this.i=this.j=this.g=null,this.m=new Sy,this.o=navigator.language,this.l=null}ct(J,qe),f=J.prototype,f.setLocale=function(e){this.o=e},f.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},f.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new Ay(e,t,n,function(r){return $l(i,r)}),this.g.configure(this.l)},f.initClientSide=function(e,t,n){var i=this;if(!j.google||!google.ima||!google.ima.AdsLoader)throw new k(2,10,1e4);this.j&&this.j.release(),this.j=new Wl(e,t,this.o,n,function(r){return $l(i,r)}),this.j.configure(this.l)},f.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),qe.prototype.release.call(this)},f.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new z("ad-stopped")),this.dispatchEvent(new z("ad-content-attach-requested")),this.m=new Sy},f.requestClientSideAds=function(e){if(!this.j)throw new k(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.G=Date.now()/1e3,t.m.requestAds(e)},f.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new k(1,10,10001);var t=this.j;t.B=e,t.g&&t.g.updateAdsRenderingSettings(t.B)},f.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new Ku(e,t,n,function(r){return $l(i,r)})},f.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new k(1,10,10005);var i=this.i;return n=n===void 0?"":n,i.l?e=Promise.reject(new k(1,10,10004)):(i.l=new We,WA(i,e,t),i.H=n||"",i.P=Date.now()/1e3,e=i.l),e},f.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new k(1,10,10005);var t=this.i;t.G=e,t.i(new z("ads-loaded",new Map().set("loadTime",0)))},f.initServerSide=function(e,t){var n=this;if(!j.google||!google.ima||!google.ima.dai)throw new k(2,10,10002);this.h&&this.h.release(),this.h=new Ny(e,t,this.o,function(i){return $l
38(n,i)}),this.h.configure(this.l)},f.requestServerSideStream=function(e,t){if(t=t===void 0?"":t,!this.h)throw new k(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&Pe('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.14.10",n=this.h,n.j?e=Promise.reject(new k(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new We,n.g.requestStream(e),n.B=t||"",n.F=Date.now()/1e3,e=n.j),e},f.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new k(1,10,10003);(e.mpt||e.mpv)&&Pe('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.14.10",this.h.g.replaceAdTagParameters(e)},f.getServerSideCuePoints=function(){return Ue("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},f.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},f.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:OA(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},f.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},f.onDashTimedMetadata=function(e){this.h&&e.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},f.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},f.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},f.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&VA(this.g,n))},f.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if(i=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||i=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",i=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",t||i)){for(var r=n.startTime,o=n.endTime,s=null,u=0,a,l=g(n.eventNode.children),c=l.next();!c.done;c=l.next())if(c=c.value,c.tagName=="AlternativeMPD"){if(c=c.attributes.uri){a=c;break}}else if(c.tagName=="InsertPresentation"||c.tagName=="ReplacePresentation"){var d=c.attributes.url;if(d){a=d,(l=ve(c,"maxDuration",mn))&&(s=l/n.timescale),(l=ve(c,"returnOffset",mn))&&(u=l/n.timescale),t&&u&&(o=r+u);break}}a&&Gu(e,[{id:n.id,groupId:null,startTime:r,endTime:o,uri:a,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?u:null,playoutLimit:s,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else(i=="urn:mpeg:dash:event:2012"||i=="urn:scte:dash:scte214-events")&&n.eventNode&&Et(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&HA(this.g,n))}},f.addCustomInterstitial=function(e){if(!this.g)throw new k(1,10,10006);Gu(this.g,[e])},f.addAdUrlInterstitial=function(e){if(!this.g)throw new k(1,10,10006);return this.g.addAdUrlInterstitial(e)},f.getInterstitialPlayer=function(){if(!this.g)throw new k(1,10,10006);return this.g.Kf()};function $l(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}Y("shaka.ads.AdManager",J),J.prototype.getInterstitialPlayer=J.prototype.getInterstitialPlayer,J.prototype.addAdUrlInterstitial=J.prototype.addAdUrlInterstitial,J.prototype.addCustomInterstitial=J.prototype.addCustomInterstitial,J.prototype.onDASHInterstitialMetadata=J.prototype.onDASHInterstitialMetadata,J.prototype.onHLSInterstitialMetadata=J.prototype.onHLSInterstitialMetadata,J.prototype.onCueMetadataChange=J.prototype.onCueMetadataChange,J.prototype.onHlsTimedMetadata=J.prototype.onHlsTimedMetadata,J.prototype.onDashTimedMetadata=J.prototype.onDashTimedMetadata,J.prototype.onManifestUpdated=J.prototype.onManifestUpdated,J.prototype.getStats=J.prototype.getStats,J.prototype.getCuePoints=J.prototype.getCuePoints,J.prototype.getServerSideCuePoints=J.prototype.getServerSideCuePoints,J.prototype.replaceServerSideAdTagParameters=J.prototype.replaceServerSideAdTagParameters,J.prototype.requestServerSideStream=J.prototype.requestServerSideStream,J.prototype.initServerSide=J.prototype.initServerSide,J.prototype.addMediaTailorTrackingUrl=J.prototype.addMediaTailorTrackingUrl,J.prototype.requestMediaTailorStream=J.prototype.requestMediaTailorStream,J.prototype.initMediaTailor=J.prototype.initMediaTailor,J.prototype.updateClientSideAdsRenderingSettings=J.prototype.updateClientSideAdsRenderingSettings,J.prototype.requestClientSideAds=J.prototype.requestClientSideAds,J.prototype.onAssetUnload=J.prototype.onAssetUnload,J.prototype.release=J.prototype.release,J.prototype.initClientSide=J.prototype.initClientSide,J.prototype.initInterstitial=J.prototype.initInterstitial,J.prototype.configure=J.prototype.configure,J.prototype.setLocale=J.prototype.setLocale,J.ADS_LOADED="ads-loaded",J.AD_STARTED="ad-started",J.AD_FIRST_QUARTILE="ad-first-quartile",J.AD_MIDPOINT="ad-midpoint",J.AD_THIRD_QUARTILE="ad-third-quartile",J.AD_COMPLETE="ad-complete",J.AD_STOPPED="ad-stopped",J.AD_SKIPPED="ad-skipped",J.AD_VOLUME_CHANGED="ad-volume-changed",J.AD_MUTED="ad-muted",J.AD_PAUSED="ad-paused",J.AD_RESUMED="ad-resumed",J.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",J.CUEPOINTS_CHANGED="ad-cue-points-changed",J.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",J.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",J.AD_CLICKED="ad-clicked",J.AD_PROGRESS="ad-progress",J.AD_BUFFERING="ad-buffering",J.AD_IMPRESSION="ad-impression",J.AD_DURATION_CHANGED="ad-duration-changed",J.AD_CLOSED="ad-closed",J.AD_LOADED="ad-loaded",J.ALL_ADS_COMPLETED="all-ads-completed",J.AD_LINEAR_CHANGED="ad-linear-changed",J.AD_METADATA="ad-metadata",J.AD_RECOVERABLE_ERROR="ad-recoverable-error",J.AD_ERROR="ad-error",J.AD_BREAK_READY="ad-break-ready",J.AD_INTERACTION="ad-interaction",J.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",J.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",J.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",Kl=function(){return new J};function jy(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(n instanceof Event||n instanceof z){var i={};for(r in n)(t=n[r])&&typeof t=="object"?r=="detail"&&(i[r]=t):r in Event||(i[r]=t);return i}if(n instanceof Error){var r=new Set(["name","message","stack"]);for(i in n)r.add(i);for(i=g(Object.getOwnPropertyNames(n)),t=i.next();!t.done;t=i.next())r.add(t.value);for(i={},r=g(r),t=r.next();!t.done;t=r.next())t=t.value,i[t]=n[t];n={__type__:"Error",contents:i}}else if(n instanceof TimeRanges){for(r={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=g(dr(n)),i=n.next();!i.done;i=n.next())i=i.value,t=i.end,r.start.push(i.start),r.end.push(t);n=r}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:0>n?"-Infinity":"Infinity":n;return n}})}function rf(e){return JSON.parse(e,function(t,n){if(n=="NaN")var i=NaN;else if(n=="-Infinity")i=-1/0;else if(n=="Infinity")i=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")i=$A(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")i=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(i in t)n[i]=t[i];i=n}else i=n;return i})}function $A(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var Uy="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),JA="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),of=["loop","playbackRate"],ZA=["pause","play"],sf=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("getImageTracks",2).set("getThumbnails",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),uf=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("get
38Stats",5).set("getAudioTracks",2).set("getTextTracks",2).set("getVariantTracks",2),Oy=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),_y=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],by=[["isTextTrackVisible","setTextTrackVisibility"]],e2="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),t2=["attach","attachCanvas","detach","load","unload"];function af(e,t,n,i,r,o,s){var u=this;this.G=e,this.K=s,this.l=new ke(t),this.L=n,this.u=!1,this.A=i,this.F=r,this.M=o,this.i=this.m=!1,this.I="",this.o=null,this.B=function(){return lf(u)},this.C=function(a,l){switch(a=rf(l),a.type){case"event":var c=a.targetName,d=im(a.event);u.A(c,d);break;case"update":c=a.update;for(d in c){a=u.g[d]||{};for(var p in c[d])a[p]=c[d][p]}u.u&&(u.L(),u.u=!1);break;case"asyncComplete":if(d=a.id,p=a.error,a=u.h.get(d),u.h.delete(d),a)if(p){d=new k(p.severity,p.category,p.code);for(c in p)d[c]=p[c];a.reject(d)}else a.resolve()}},this.g={video:{},player:{}},this.H=0,this.h=new Map,this.j=null,qu.add(this)}f=af.prototype,f.destroy=function(){return qu.delete(this),cf(this),Mi&&By(this),this.l&&(this.l.stop(),this.l=null),this.F=this.A=null,this.i=this.m=!1,this.C=this.B=this.j=this.h=this.g=this.o=null,Promise.resolve()},f.qb=function(){return this.i},f.cg=function(){return this.I},f.init=function(){if(this.G.length)if(j.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.sb();var e=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=g(qu),i=n.next();!i.done;i=n.next()){i=i.value;var r=t;i.j=new We,i.u=!0,Jl(i,r)}},function(t){for(var n=g(qu),i=n.next();!i.done;i=n.next())i=i.value,Zl=t=="available",i.l.sb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),Zl&&this.l.da(i2),(e=Mi)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new We,this.u=!0,Jl(this,e)):Mi=null}else j.__onGCastApiAvailable!==Vy&&(ec=j.__onGCastApiAvailable||null,j.__onGCastApiAvailable=Vy)},f.kg=function(e){this.o=e,this.i&&Wu(this,{type:"appData",appData:this.o})},f.cast=function(){var e=this;return C(function(t){if(!e.m)throw new k(1,8,8e3);if(!Zl)throw new k(1,8,8001);if(e.i)throw new k(1,8,8002);return e.j=new We,chrome.cast.requestSession(function(n){return Jl(e,n)},function(n){return Fy(e,n)}),S(t,e.j,0)})};function n2(e){e.i&&chrome.cast.requestSession(function(t){return Jl(e,t)},function(t){return Fy(e,t)})}f.Pc=function(){if(this.i){if(cf(this),Mi){By(this);try{Mi.stop(function(){},function(){})}catch{}Mi=null}lf(this)}},f.get=function(e,t){var n=this;if(e=="video"){if(ZA.includes(t))return function(){return n.ph.apply(n,[e,t].concat(W(mt.apply(0,arguments))))}}else if(e=="player"){if(Oy.has(t)&&!this.get("player","isLive")())return function(){};if(e2.includes(t))return function(){return n.ph.apply(n,[e,t].concat(W(mt.apply(0,arguments))))};if(t2.includes(t))return function(){return n.rj.apply(n,[e,t].concat(W(mt.apply(0,arguments))))};if(sf.has(t)||uf.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},f.set=function(e,t,n){this.g[e][t]=n,Wu(this,{type:"set",targetName:e,property:t,value:n})};function Jl(e,t){var n=e.M();Mi=t,t.addUpdateListener(e.B),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),lf(e),Wu(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function Fy(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new k(2,8,n,t))}f.ph=function(e,t){Wu(this,{type:"call",targetName:e,methodName:t,args:mt.apply(2,arguments)})},f.rj=function(e,t){var n=mt.apply(2,arguments),i=new We,r=this.H.toString();this.H++,this.h.set(r,i);try{Wu(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(o){i.reject(o)}return i};function By(e){var t=Mi;t.removeUpdateListener(e.B),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function lf(e){var t=Mi?Mi.status=="connected":!1;if(e.i&&!t){e.F();for(var n in e.g)e.g[n]={};cf(e)}e.i=t,e.I=t?Mi.receiver.friendlyName:"",e.l.sb()}function cf(e){if(e.h)for(var t=g(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var i=e.h.get(n);e.h.delete(n),i.reject(new k(1,7,7e3))}}function Wu(e,t){t=jy(t);var n=Mi;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},Ir)}catch(i){throw t=new k(2,8,8005,i),n=new z("error",new Map().set("detail",t)),e.A("player",n),e.Pc(),t}}var i2=.02,Zl=!1,Mi=null,ec=null,qu=new Set;function Vy(e){if(ec?j.__onGCastApiAvailable=ec:delete j.__onGCastApiAvailable,ec=null,e)for(var t=g(qu),n=t.next();!n.done;
38n=t.next())n.value.init();typeof j.__onGCastApiAvailable=="function"&&j.__onGCastApiAvailable(e)}function kt(e,t,n,i){i=i===void 0?!1:i,qe.call(this);var r=this;this.i=e,this.h=t,this.m=this.o=this.l=this.u=this.j=null,this.C=n,this.B=i,this.A=new Map,this.g=null,j.chrome?(this.g=new af(n,function(){return Xy(r)},function(){return Ky(r)},function(o,s){return qy(r,o,s)},function(){return Wy(r)},function(){return Gy(r)},i),r2(this)):(this.j=this.i,this.u=this.h)}ct(kt,qe),f=kt.prototype,f.destroy=function(e){return this.g&&e&&this.g.Pc(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,qe.prototype.release.call(this),Promise.all(e)},f.Ni=function(){return this.j},f.Kf=function(){return this.u},f.Yh=function(){return this.g?this.g.m&&Zl:!1},f.qb=function(){return this.g?this.g.qb():!1},f.cg=function(){return this.g?this.g.cg():""},f.cast=function(){var e=this;return C(function(t){return t.g==1?e.g?S(t,e.g.cast(),2):t.return():e.h?S(t,e.h.kc(),0):t.return()})},f.kg=function(e){this.g&&this.g.kg(e)},f.Gj=function(){this.g&&n2(this.g)},f.Pc=function(){this.g&&this.g.Pc()},f.Zh=function(e,t){t=t===void 0?!1:t;var n=this;return C(function(i){if(i.g==1)return e==n.C&&t==n.B||(n.C=e,n.B=t,!n.g)?i.return():(n.g.Pc(),S(i,n.g.destroy(),2));n.g=null,n.g=new af(e,function(){return Xy(n)},function(){return Ky(n)},function(r,o){return qy(n,r,o)},function(){return Wy(n)},function(){return Gy(n)},t),n.g.init(),q(i)})};function r2(e){e.g.init(),e.m=new Le;for(var t=g(Uy),n=t.next();!n.done;n=t.next())e.m.D(e.i,n.value,function(o){e.g.qb()||(o=im(o),e.l.dispatchEvent(o))});for(var i in za)e.m.D(e.h,za[i],function(o){e.g.qb()||e.o.dispatchEvent(o)});e.j={},t={};for(var r in e.i)t={wd:t.wd},t.wd=r,Object.defineProperty(e.j,t.wd,{configurable:!1,enumerable:!0,get:function(o){return function(){return s2(e,o.wd)}}(t),set:function(o){return function(s){var u=o.wd;e.g.qb()?e.g.set("video",u,s):e.i[u]=s}}(t)});e.u={},Hy(e,function(o){Object.defineProperty(e.u,o,{configurable:!1,enumerable:!0,get:function(){return u2(e,o)}})}
38),o2(e),e.l=new qe,e.l.Te=e.j,e.o=new qe,e.o.Te=e.u}function o2(e){var t=new Map;Hy(e,function(n,i){t.has(i)?(i=t.get(i),n.length<i.length?e.A.set(n,i):e.A.set(i,n)):t.set(i,n)})}function Hy(e,t){function n(a){return a=="constructor"||typeof i[a]!="function"?!1:!r.has(a)}var i=e.h,r=new Set,o;for(o in i)n(o)&&(r.add(o),t(o,i[o]));for(e=Object.getPrototypeOf(i),o=Object.getPrototypeOf({});e&&e!=o;){for(var s=g(Object.getOwnPropertyNames(e)),u=s.next();!u.done;u=s.next())u=u.value,n(u)&&(r.add(u),t(u,i[u]));e=Object.getPrototypeOf(e)}}function Gy(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Qc(),startTime:null};e.i.pause();for(var n=g(of),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),n=g(_y),i=n.next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(n=g(by),i=n.next();!i.done;i=n.next())r=i.value,i=r[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function Xy(e){var t=new z("caststatuschanged");e.dispatchEvent(t)}function Ky(e){var t=new z(e.j.paused?"pause":"play");e.l.dispatchEvent(t)}function Wy(e){for(var t=g(_y),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.g.get("player","getAssetUri")();i=e.g.get("video","ended"),t=Promise.resolve();var o=e.i.autoplay;n=null,i||(n=e.g.get("video","currentTime"));var s;(i=e.g.get("player","getTextTracks")())&&i.length&&(s=i.find(function(l){return l.active}));var u=e.g.get("player","isTextTrackVisible")();r&&(e.i.autoplay=!1,t=e.h.load(r,n));var a={};for(n=g(of),i=n.next();!i.done;i=n.next())i=i.value,a[i]=e.g.get("video",i);t.then(function(){if(e.i){for(var l=g(of),c=l.next();!c.done;c=l.next())c=c.value,e.i[c]=a[c];for(l=g(by),c=l.next();!c.done;c=l.next()){var d=c.value;c=d[1],d=e.g.get("player",d[0])(),e.h[c](d)}e.h.Ah(u),s&&e.h.jg(s.language,s.roles,s.forced),e.i.autoplay=o,r&&e.i.play()}},function(l){l=new Map().set("detail",l),l=new z("error",l),e.h.dispatchEvent(l)})}function s2(e,t){if(t=="addEventListener")return function(i,r,o){return e.l.addEventListener(i,r,o)};if(t=="removeEventListener")return function(i,r,o){return e.l.removeEventListener(i,r,o)};if(e.g.qb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.qb()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function u2(e,t){if(e.A.has(t)&&(t=e.A.get(t)),t=="addEventListener")return function(n,i,r){return e.o.addEventListener(n,i,r)};if(t=="removeEventListener")return function(n,i,r){return e.o.removeEventListener(n,i,r)};if(t=="getMediaElement")return function(){return e.j};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.yb()};if(t=="getDrmEngine")return function(){return e.h.C};if(t=="getAdManager")return function(){return e.h.Rg()};if(t=="setVideoContainer")return function(n){return e.h.Dh(n)};if(e.g.qb()){if(t=="getManifest"||t=="drmInfo")return function(){return Pe(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return Pe(t+"() does not work while casting!"),Promise.resolve()};if(t=="getChapters")return function(){return Pe(t+"() does not work while casting!"),[]}}return e.g.qb()&&Object.keys(e.g.g.video).length==0&&(sf.has(t)||uf.has(t))||!e.g.qb()?e.h[t].bind(e.h):e.g.get("player",t)}
38function qy(e,t,n){e.g.qb()&&(t=="video"?e.l.dispatchEvent(n):t=="player"&&e.o.dispatchEvent(n))}Y("shaka.cast.CastProxy",kt),kt.prototype.changeReceiverId=kt.prototype.Zh,kt.prototype.forceDisconnect=kt.prototype.Pc,kt.prototype.suggestDisconnect=kt.prototype.Gj,kt.prototype.setAppData=kt.prototype.kg,kt.prototype.cast=kt.prototype.cast,kt.prototype.receiverName=kt.prototype.cg,kt.prototype.isCasting=kt.prototype.qb,kt.prototype.canCast=kt.prototype.Yh,kt.prototype.getPlayer=kt.prototype.Kf,kt.prototype.getVideo=kt.prototype.Ni,kt.prototype.destroy=kt.prototype.destroy;function un(e,t,n,i){qe.call(this);var r=this;this.g=e,this.h=t,this.j=new Le,this.H={video:e,player:t},this.F=n||function(){},this.I=i||function(o){return o},this.i=null,this.G=!1,this.o=!0,this.m=0,this.B=!1,this.A=!0,this.u=this.l=null,this.C=new ke(function(){df(r)}),a2(this)}ct(un,qe),f=un.prototype,f.isConnected=function(){return this.G},f.Ui=function(){return this.o},f.Dj=function(e){this.i=e},f.ci=function(){this.i=null},f.Ej=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},f.Cj=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},f.Bj=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},f.destroy=function(){var e=this,t,n;return C(function(i){if(i.g==1)return e.j&&(e.j.release(),e.j=null),t=[],e.h&&(t.push(e.h.destroy()),e.h=null),e.C&&(e.C.stop(),e.C=null),e.g=null,e.H=null,e.F=null,e.G=!1,e.o=!0,e.l=null,e.u=null,qe.prototype.release.call(e),S(i,Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),q(i)})};function a2(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return zy(e)},t.onSenderDisconnected=function(){return zy(e)},t.onSystemVolumeChanged=function(){var r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();r&&mr(e,{type:"update",update:{video:{volume:r.level,muted:r.muted}}},e.l),mr(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(r){return d2(e,r)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(r){return c2(e,r)},t.start(),t=g(Uy);for(var n=t.next();!n.done;n=t.next())e.j.D(e.g,n.value,function(r){return Yy(e,"video",r)});for(var i in za)e.j.D(e.h,za[i],function(r){return Yy(e,"player",r)});e.j.D(e.g,"loadeddata",function(){e.B=!0}),e.j.D(e.h,"loading",function(){e.o=!1,Ps(e)}),e.j.D(e.g,"playing",function(){e.o=!1,Ps(e)}),e.j.D(e.g,"pause",function(){Ps(e)}),e.j.D(e.h,"unloading",function(){e.o=!0,Ps(e)}),e.j.D(e.g,"ended",function(){new ke(function(){e.g&&e.g.ended&&(e.o=!0,Ps(e))}).da(f2)})}function zy(e){e.m=0,e.A=!0,e.G=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,Ps(e)}function Ps(e){var t;C(function(n){if(n.g==1)return S(n,Promise.resolve(),2);if(!e.h)return n.return();t=new z("caststatuschanged"),e.dispatchEvent(t),Qy(e)||vr(e),q(n)})}function l2(e,t,n){var i,r,o,s,u,a,l,c,d,p;C(function(h){switch(h.g){case 1:for(i in t.player)r=t.player[i],e.h[i](r);return e.F(n),o=e.g.autoplay,t.manifest?(e.g.autoplay=!1,ee(h,5),S(h,e.h.load(t.manifest,t.startTime),7)):S(h,Promise.resolve(),3);case 7:fe(h,3);break;case 5:return s=re(h),u=new Map().set("detail",s),a=new z("error",u),e.h&&e.h.dispatchEvent(a),h.return();case 3:if(!e.h)return h.return();for(l in t.video)c=t.video[l],e.g[l]=c;for(d in t.playerAfterLoad)p=t.playerAfterLoad[d],e.h[d](p);e.g.autoplay=o,t.manifest&&(e.g.play(),vr(e)),q(h)}})}function Yy(e,t,n){e.h&&(df(e),mr(e,{type:"event",targetName:t,event:n},e.l))}function df(e){e.C.da(p2);for(var t={video:{},player:{}},n=g(JA),i=n.next();!i.done;i=n.next())i=i.value,t.video[i]=e.g[i];e.h.U()&&Oy.forEach(function(r,o){e.m%r==0&&(t.player[o]=e.h[o]())}),sf.forEach(function(r,o){e.m%r==0&&(t.player[o]=e.h[o]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),mr(e,{type:"update",update:t},e.l),uf.forEach(function(r,o){e.m%r==0&&(r={player:{}},r.player[o]=e.h[o](),mr(e,{type:"update",update:r},e.l))}),e.B&&(e.m+=1),Qy(e)}function Qy(e){return e.A&&(e.g.duration||e.h.U())?(pf(e),e.A=!1,!0):!1}function pf(e,t){var n={contentId:e.h.Qc(),streamType:e.h.U()?"LIVE":"BUFFERED",contentType:""};e.h.U()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),vr(e,t===void 0?0:t,n)}function c2(e,t){var n=rf(t.data);switch(n.type){case"init":e.m=0,e.B=!1,e.A=!0,l2(e,n.initState,n.appData),df(e);break;case"appData":e.F(n.appData);break;case"set":var i=n.targetName,r=n.property;if(n=n.value,i=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),r=="volume"){t.setSystemVolumeLevel(n);break}else if(r=="muted"){t.setSystemVolumeMuted(n);break}}e.H[i][r]=n;break;case"call":i=e.H[n.targetName],i[n.methodName].apply(i,n.args);break;case"asyncCall":i=n.targetName,r=n.methodName,i=="player"&&r=="load"&&(e.m=0,e.B=!1);var o=n.id,s=t.senderId;t=e.H[i],n=t[r].apply(t,n.args),i=="player"&&r=="load"&&(n=n.then(function(){e.A=!0})),n.then(function(){return $y(e,s,o,null)},function(u){return $y(e,s,o,u)})}}function d2(e,t){var n=rf(t.data);switch(n.type){case"PLAY":e.g.play(),vr(e);break;case"PAUSE":e.g.pause(),vr(e);break;case"SEEK":t=n.currentTime;var i=n.resumeState;t!=null&&(e.g.currentTime=Number(t)),i&&i=="PLAYBACK_START"?(e.g.play(),vr(e)):i&&i=="PLAYBACK_PAUSE"&&(e.g.pause(),vr(e));break;case"STOP":e.h.kc().then(function(){e.h&&vr(e)});break;case"GET_STATUS":pf(e,Number(n.requestId));break;case"VOLUME":i=n.volume,t=i.level,i=i.muted;var r=e.g.volume,o=e.g.muted;t!=null&&(e.g.volume=Number(t)),i!=null&&(e.g.muted=i),r==e.g.volume&&o==e.g.muted||vr(e);break;case"LOAD":e.m=0,e.B=!1,e.A=!1,t=n.media,i=n.currentTime,r=e.I(t.contentId),o=n.autoplay||!0,e.F(t.customData),o&&(e.g.autoplay=!0),e.h.load(r,i).then(function(){e.h&&pf(e)}
38).catch(function(s){var u="LOAD_FAILED";s.category==7&&s.code==7e3&&(u="LOAD_CANCELLED"),mr(e,{requestId:Number(n.requestId),type:u},e.u)});break;default:mr(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}function $y(e,t,n,i){e.h&&mr(e,{type:"asyncComplete",id:n,error:i},e.l,t)}function mr(e,t,n,i){e.G&&(e=jy(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function vr(e,t,n){n=n===void 0?null:n;var i={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?h2:e.h.Qf()?m2:e.g.paused?v2:g2,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(i.media=n),mr(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}Y("shaka.cast.CastReceiver",un),un.prototype.destroy=un.prototype.destroy,un.prototype.setContentArtist=un.prototype.Bj,un.prototype.setContentImage=un.prototype.Cj,un.prototype.setContentTitle=un.prototype.Ej,un.prototype.clearContentMetadata=un.prototype.ci,un.prototype.setContentMetadata=un.prototype.Dj,un.prototype.isIdle=un.prototype.Ui,un.prototype.isConnected=un.prototype.isConnected;var p2=.5,f2=5,h2="IDLE",g2="PLAYING",m2="BUFFERING",v2="PAUSED";function Jy(e,t,n,i,r){if(i>=r)return null;for(var o=-1,s=-1,u=0;u<n.length;u++)if(n[u].some(function(M){return M!=null&&M.g.trim()!=""})){o=u;break}for(u=n.length-1;0<=u;u--)if(n[u].some(function(M){return M!=null&&M.g.trim()!=""})){s=u;break}if(o===-1||s===-1)return null;for(var a=u=!1,l="white",c="black",d=ff(i,r,u,a,l,c);o<=s;o++){for(var p=n[o],h=-1,m=-1,y=0;y<p.length;y++)if(p[y]!=null&&p[y].g.trim()!==""){h=y;break}for(y=p.length-1;0<=y;y--)if(p[y]!=null&&p[y].g.trim()!==""){m=y;break}if(h===-1||m===-1)p=Zy(i,r),e.nestedCues.push(p);else{for(;h<=m;h++)if(y=p[h]){var v=y.l,T=y.i,w=y.j,I=y.h;(v!=u||T!=a||w!=l||I!=c)&&(d.payload&&e.nestedCues.push(d),d=ff(i,r,v,T,w,I),u=v,a=T,l=w,c=I),d.payload+=y.g}else d.payload+=" ";d.payload&&e.nestedCues.push(d),o!==s&&(d=Zy(i,r),e.nestedCues.push(d)),d=ff(i,r,u,a,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function ff(e,t,n,i,r,o){return e=new it(e,t,""),n&&e.textDecoration.push(ir),i&&(e.fontStyle=es),e.color=r,e.backgroundColor=o,e}function Zy(e,t){return e=new it(e,t,""),e.lineBreak=!0,e}function e0(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function hf(e,t){this.i=[],this.g=1,this.h=0,this.C=e,this.B=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.A=null,zu(this)}function tc(e,t,n){var i="CC"+((e.C<<1|e.B)+1),r=new it(t,n,"");r.lineInterpretation=1;var o=i0.get(e.g);return o&&(r.line=o),e.u!=null&&e.A!=null&&(r.position=10+Math.min(70,10*e.u)+2.5*e.A),(t=Jy(r,i,e.i,t,n))&&15<e.g+t.cue.nestedCues.length-3&&(o=i0.get(e.g+3-t.cue.nestedCues.length))&&(r.line=o),t}function zu(e){yr(e,0,15),e.g=1}function Rs(e,t,n){if(!(32>n||127<n)){var i="";switch(t){case 0:i=n0.has(n)?n0.get(n):String.fromCharCode(n);break;case 1:i=y2.get(n);break;case 2:e.i[e.g].pop(),i=T2.get(n);break;case 3:e.i[e.g].pop(),i=S2.get(n)}i&&e.i[e.g].push(new e0(i,e.m,e.j,e.o,e.l))}}function t0(e,t,n,i){if(!(0>n||0>t))if(t>=n)for(--i;0<=i;i--)e.i[t+i]=e.i[n+i].map(function(o){return o});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(o){return o})}function yr(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var n0=new Map([[39,"\u2019"],[42,"\xE1"],[92,"\xE9"],[92,"\xE9"],[94,"\xED"],[95,"\xF3"],[96,"\xFA"],[123,"\xE7"],[124,"\xF7"],[125,"\xD1"],[126,"\xF1"],[127,"\u2588"]]),y2=new Map([[48,"\xAE"],[49,"\xB0"],[50,"\xBD"],[51,"\xBF"],[52,"\u2122"],[53,"\xA2"],[54,"\xA3"],[55,"\u266A"],[56,"\xE0"],[57," "],[58,"\xE8"],[59,"\xE2"],[60,"\xEA"],[61,"\xEE"],[62,"\xF4"],[63,"\xFB"]]),T2=new Map([[32,"\xC1"],[33,"\xC9"],[34,"\xD3"],[35,"\xDA"],[36,"\xDC"],[37,"\xFC"],[38,"\u2018"],[39,"\xA1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\xA9"],[44,"\u2120"],[45,"\xB7"],[46,"\u201C"],[47,"\u201D"],[48,"\xC0"],[49,"\xC2"],[50,"\xC7"],[51,"\xC8"],[52,"\xCA"],[53,"\xCB"],[54,"\xEB"],[55,"\xCE"],[56,"\xCF"],[57,"\xEF"],[58,"\xD4"],[59,"\xD9"],[60,"\xF9"],[61,"\xDB"],[62,"\xAB"],[63,"\xBB"]]),S2=new Map([[32,"\xC3"],[33,"\xE3"],[34,"\xCD"],[35,"\xCC"],[36,"\xEC"],[37,"\xD2"],[38,"\xF2"],[39,"\xD5"],[40,"\xF5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\xC4"],[49,"\xE4"],[50,"\xD6"],[51,"\xF6"],[52,"\xDF"],[53,"\xA5"],[54,"\xA4"],[55,"\u2502"],[56,"\xC5"],[57,"\xE5"],[58,"\xD8"],[59,"\xF8"],[60,"\u250C"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),i0=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function nc(e,t){this.h=0,this.o=new hf(e,t),this.i=new hf(e,t),this.g=this.j=new hf(e,t),this.l=0,this.m=null}
38function gf(e,t,n){e.g=e.i;var i=e.g,r=null;return e.h!==3&&e.h!==4&&(r=tc(i,e.l,n),n=e.i,n.g=0<n.h?n.h:0,yr(n,0,15),n=e.j,n.g=0<n.h?n.h:0,yr(n,0,15),i.g=15),e.h=3,i.h=t,r}function r0(e){e.h=1,e.g=e.j,e.g.h=0}function o0(e){zi("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var w2="black green blue cyan red yellow magenta black".split(" "),s0="white green blue cyan red yellow magenta white_italics".split(" ");function mf(e,t){this.I=t,this.M=e,this.K=this.l=!1,this.m=this.o=this.G=this.L=this.H=0,this.F=2,this.i=[],this.g=this.h=this.j=0,this.C=this.A=!1,this.B="white",this.u="black",vf(this)}function vf(e){e.i=[];for(var t=0;16>t;t++)e.i.push(yf())}function yf(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function Br(e,t){u0(e)&&(e.i[e.h][e.g]=new e0(t,e.C,e.A,e.u,e.B),e.g++)}function u0(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}mf.prototype.isVisible=function(){return this.l};function x2(e){for(var t=0,n=1;16>n;n++,t++)e.i[t]=e.i[n];for(n=0;1>n;n++,t++)e.i[t]=yf()}function Do(e,t,n){var i=new it(e.j,t,"");i.textAlign=e.F===0?"left":e.F===1?"right":Xi;var r=i.region;switch(e.I&&(r.id+="svc"+e.I),r.id+="win"+e.M,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.H,r.viewportAnchorY=e.L,r.viewportAnchorUnits=e.K?Un:2,e.G){case 0:r.regionAnchorX=0,r.regionAnchorY=0;break;case 1:r.regionAnchorX=50,r.regionAnchorY=0;break;case 2:r.regionAnchorX=100,r.regionAnchorY=0;break;case 3:r.regionAnchorX=0,r.regionAnchorY=50;break;case 4:r.regionAnchorX=50,r.regionAnchorY=50;break;case 5:r.regionAnchorX=100,r.regionAnchorY=50;break;case 6:r.regionAnchorX=0,r.regionAnchorY=100;break;case 7:r.regionAnchorX=50,r.regionAnchorY=100;break;case 8:r.regionAnchorX=100,r.regionAnchorY=100}return(n=Jy(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}mf.prototype.display=function(){this.l=!0};function E2(){this.i=[],this.h=null,this.g=0}function A2(e,t){t.type===3?(e.g=2*(t.value&63)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new Yu(e.h)),e.h=null,e.g=0))}function Yu(e){this.g=0,this.h=e}Yu.prototype.ta=function(){return this.g<this.h.length},Yu.prototype.Ba=function(){return this.g};function _t(e){if(!e.ta())throw new k(2,2,3e3);return e.h[e.g++]}Yu.prototype.skip=function(e){if(this.g+e>this.h.length)throw new k(2,2,3e3);this.g+=e},Yu.prototype.rh=function(e){if(0>this.g-e)throw new k(2,2,3e3);this.g-=e};function I2(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function M2(e,t,n,i){if(!e.g)return[];if(n==24)return n=_t(t).value,i=_t(t).value,n=function(o){return o.map(function(s){return("0"+(s&255).toString(16)).slice(-2)}).join("")}([n,i]),Br(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!u0(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(r=Do(t,i,e.i)),t.h+1>=t.o?x2(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=Do(t,i,e.i)),t.i[t.h]=yf(),t.g=0;break;case 12:t.isVisible()&&(r=Do(t,i,e.i)),vf(t),t.h=0,t.g=0}return r?[r]:[]}function C2(e,t,n,i){if(128<=n&&135>=n)i=n&7,e.h[i]&&(e.g=e.h[i]);else{if(n===136){n=_t(t).value,t=[],n=g(Qu(e,n));for(var r=n.next();!r.done;r=n.next()){if(r=e.h[r.value],r.isVisible()){var o=Do(r,i,e.i);o&&t.push(o)}vf(r)}return t}if(n===137)for(t=_t(t).value,t=g(Qu(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=i),n.display();else{if(n===138){for(n=_t(t).value,t=null,n=g(Qu(e,n)),r=n.next();!r.done;r=n.next())r=e.h[r.value],r.isVisible()&&(t=Do(r,i,e.i)),r.l=!1;return t?[t]:[]}if(n===139){for(n=_t(t).value,t=null,n=g(Qu(e,n)),r=n.next();!r.done;r=n.next())r=e.h[r.value],r.isVisible()?t=Do(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(n===140)return t=_t(t).value,a0(e,t,i);if(n===143)return i=a0(e,255,i),l0(e),i;if(n===144)t.skip(1),i=_t(t).value,e.g&&(e.g.A=0<(i&128),e.g.C=0<(i&64));
38else if(n===145)i=_t(t).value,n=_t(t).value,t.skip(1),e.g&&(t=c0((n&48)>>4,(n&12)>>2,n&3),e.g.B=c0((i&48)>>4,(i&12)>>2,i&3),e.g.u=t);else if(n===146)i=_t(t).value,t=_t(t).value,e.g&&(e=e.g,e.h=i&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),i=_t(t).value,t.skip(1),e.g&&(e.g.F=i&3);else if(152<=n&&159>=n){n=(n&15)-8,r=e.h[n]!==null,r||(o=new mf(n,e.i),o.j=i,e.h[n]=o),i=_t(t).value,o=_t(t).value;var s=_t(t).value,u=_t(t).value,a=_t(t).value;t=_t(t).value,r&&(t&7)===0||(t=e.h[n],t.h=0,t.g=0,t.C=!1,t.A=!1,t.B="white",t.u="black"),t=e.h[n],t.l=0<(i&32),t.L=o&127,t.H=s,t.G=(u&240)>>4,t.K=0<(o&128),t.o=(u&15)+1,t.m=(a&63)+1,e.g=e.h[n]}}}return[]}function Qu(e,t){for(var n=[],i=0;8>i;i++)(t&1)===1&&e.h[i]&&n.push(i),t>>=1;return n}function a0(e,t,n){var i=[];t=g(Qu(e,t));for(var r=t.next();!r.done;r=t.next()){r=r.value;var o=e.h[r];o.isVisible()&&(o=Do(o,n,e.i))&&i.push(o),e.h[r]=null}return i}function l0(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function c0(e,t,n){var i={0:0,1:0,2:1,3:1};return e=i[e],t=i[t],n=i[n],k2[e<<2|t<<1|n]}var d0=new Map([[32," "],[33,"\xA0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201C"],[52,"\u201D"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215B"],[119,"\u215C"],[120,"\u215D"],[121,"\u215E"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250C"]]),k2="black blue green cyan red magenta yellow white".split(" ");function Ls(){this.h=[],this.g=[],this.i=new E2,this.l=0,this.m=new Map([["CC1",new nc(0,0)],["CC2",new nc(0,1)],["CC3",new nc(1,0)],["CC4",new nc(1,1)]]),this.u=this.o=0,this.j=new Map,this.B=!0,this.A=new Set,Tf(this)}Ls.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,Tf(this),e=g(this.j.values());for(var t=e.next();!t.done;t=e.next())l0(t.value)};function Tf(e){e.o=0,e.u=0;for(var t=g(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,zu(n.i),zu(n.j),zu(n.o);e.B=!0}Ls.prototype.extract=function(e,t){if(this.B){for(var n=g(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.B=!1}if(e=new rt(e,0),!(8>e.getLength())&&e.X()===181&&e.ma()===49&&e.S()===1195456820&&e.X()===3&&(n=e.X(),(n&64)!==0))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.X(),o=(r&4)>>2,s=e.X(),u=e.X();o&&(r&=3,r===0||r===1?this.h.push({pts:t,type:r,mb:s,Mb:u,order:this.h.length}):(this.g.push({pts:t,type:r,value:s,order:this.g.length}),this.g.push({pts:t,type:2,value:u,order:this.g.length})))}},Ls.prototype.decode=function(){function e(r,o){return r.pts-o.pts||r.order-o.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=g(this.h),i=n.next();!i.done;i=n.next())(i=D2(this,i.value))&&t.push(i);for(n=g(this.g),i=n.next();!i.done;i=n.next())A2(this.i,i.value);for(n=g(this.i.i),i=n.next();!i.done;i=n.next())i=P2(this,i.value),t.push.apply(t,W(i));return this.i.i=[],this.h=[],this.g=[],t};function D2(e,t){var n=t.type;if((t.mb&112)===16){var i=t.mb>>3&1;n===0?e.o=i:e.u=i}if(i="CC"+((n<<1|(n?e.u:e.o))+1),n=e.m.get(i),t.mb===255&&t.Mb===255||!t.mb&&!t.Mb||!p0(t.mb)||!p0(t.Mb))return 45<=++e.l&&Tf(e),null;e.l=0,t.mb&=127,t.Mb&=127;var r=t.mb;if(1<=r&&15>=r||!t.mb&&!t.Mb)return null;if(r=null,(t.mb&112)===16)e:{if(e.A.add(i),i=t.mb,e=t.Mb,n.m===(i<<8|e))n.m=null;else if(n.m=i<<8|e,(i&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(i&7)<<1|e>>5&1],i="white",r=!1;var o=null,s=95<e?e-96:e-64;13>=s?i=s0[Math.floor(s/2)]:15>=s?r=!0:o=Math.floor((s-16)/2),e=(e&1)===1,n.h!==4&&(s=n.g,n.h===3&&t!==s.g&&(n=1+t-s.h,t0(s,n,1+s.g-s.h,s.h),yr(s,0,n-1),yr(s,t+1,15-t)),s.g=t,s.m=e,s.j=r,s.l=i,s.u=o,s.o="black")}else if((i&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",Rs(n.g,0,32),i=!1,t=s0[(e&14)>>1],t==="white_italics"&&(t="white",i=!0),n.g.m=(e&1)===1,n.g.j=i,n.g.l=t;else if((i&247)===16&&(e&240)===32||(i&247)===23&&(e&255)===45)t="black",(i&7)===0&&(t=w2[(e&14)>>1]),n.g.o=t;else if((i&247)===17&&(e&240)===48)Rs(n.g,1,e);else if((i&246)===18&&(e&224)===32)Rs(n.g,i&1?3:2,e);else{if((i&246)===20&&(e&240)===32){switch(e=t.pts,i=null,t.Mb){case 32:r0(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:i=gf(n,2,e);break;case 38:i=gf(n,3,e);break;case 39:i=gf(n,4,e);break;case 40:Rs(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:zu(n.o),o0(n);break;case 43:o0(n);break;case 44:t=n.i,i=null,n.h!==4&&(i=tc(t,n.l,e)),yr(t,0,15);break;case 45:t=n.g,n.h!==3?i=null:(i=tc(t,n.l,e),r=t.g-t.h+1,t0(t,r-1,r,t.h),yr(t,0,r-1),yr(t,t.g,15-t.g),n.l=e);break;case 46:yr(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=tc(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,r0(n),n.l=e,i=t}r=i;break e}(i==23||i==31)&&33<=e&&35>=e&&(n.g.A=e-32)}r=null}else e=t.Mb,Rs(n.g,0,t.mb),Rs(n.g,0,e);return r}function P2(e,t){var n=[];try{for(;t.ta();){var i=_t(t).value,r=(i&224)>>5,o=i&31;if(r===7&&o!=0&&(r=_t(t).value&63),r!=0){e.A.add("svc"+r),e.j.has(r)||e.j.set(r,new I2(r));for(var s=e.j.get(r),u=t.Ba();t.Ba()-u<o;){r=s;var a=t,l=_t(a),c=l.value,d=l.pts;if(c===16){var p=_t(a);c=c<<16|p.value}if(0<=c&&31>=c)var h=M2(r,a,c,d);else if(128<=c&&159>=c)h=C2(r,a,c,d);else{if(4096<=c&&4127>=c)r=a,a=c&255,8<=a&&15>=a?r.skip(1):16<=a&&23>=a?r.skip(2):24<=a&&31>=a&&r.skip(3);else if(4224<=c&&4255>=c)r=a,a=c&255,128<=a&&135>=a?r.skip(4):136<=a&&143>=a&&r.skip(5);else if(32<=c&&127>=c)a=c,r.g&&(a===127?Br(r.g,"\u266A"):Br(r.g,String.fromCharCode(a)));else if(160<=c&&255>=c)r.g&&Br(r.g,String.fromCharCode(c));else if(4128<=c&&4223>
38=c){if(a=c&255,r.g)if(d0.has(a)){var m=d0.get(a);Br(r.g,m)}else Br(r.g,"_")}else 4256<=c&&4351>=c&&r.g&&((c&255)!=160?Br(r.g,"_"):Br(r.g,"[CC]"));h=[]}n.push.apply(n,W(h))}}}}catch(y){if(y instanceof k&&y.code===3e3)zi("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw y}return n}function p0(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}Ls.prototype.getStreams=function(){return Array.from(this.A)},Y("shaka.cea.CeaDecoder",Ls),zo=function(){return new Ls};function f0(e){for(var t=[],n=e,i=e=0;i<n.length;)e==2&&n[i]==3?(e=0,n=[].concat(W(n)),n.splice(i,1),n=new Uint8Array(n)):n[i]==0?e++:e=0,i++;for(e=n,i=0;i<e.length;){for(n=0;e[i]==255;)n+=255,i++;n+=e[i++];for(var r=0;e[i]==255;)r+=255,i++;r+=e[i++],n==4&&t.push(e.subarray(i,i+r)),i+=r}return t}function ic(){this.j=new Map,this.i=this.h=0,this.g=Sf}ic.prototype.init=function(e){function t(o){o=o.name,rc.has(o)&&(n.g=rc.get(o))}var n=this,i=[],r=[];if(new ze().box("moov",ye).box("mvex",ye).R("trex",function(o){var s=o.reader;s.skip(4),s.skip(4),o=s.S(),s=s.S(),n.h=o,n.i=s}).box("trak",ye).R("tkhd",function(o){var s=o.reader;o=o.version,o==1?(s.skip(8),s.skip(8)):(s.skip(4),s.skip(4));var u=s.S();o==1?s.skip(8):s.skip(4),s.skip(4),s.skip(8),s.skip(2),s.skip(2),s.skip(2),s.skip(2),s.skip(36),s.ma(),s.ma(),s.ma(),s.ma(),i.push(u)}).box("mdia",ye).R("mdhd",function(o){o=rl(o.reader,o.version),r.push(o.timescale)}).box("minf",ye).box("stbl",ye).R("stsd",lr).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",bn).box("sinf",ye).box("frma",function(o){o=$d(o.reader).codec,rc.has(o)&&(n.g=rc.get(o))}).parse(e,!0),!i.length||!r.length||i.length!=r.length)throw new k(2,2,2010);this.g==Sf&&Pe("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(o,s){n.j.set(o,r[s])})},ic.prototype.parse=function(e){var t=this;if(this.g==Sf)return[];var n=[],i=0,r=[];return new ze().box("moof",function(o){i=o.start,r=[],ye(o)}).box("traf",function(o){r.push({baseMediaDecodeTime:null,ld:t.h,md:t.i,mh:[],timescale:9e4}),ye(o)}).R("trun",function(o){var s=r[r.length-1];o=ol(o.reader,o.version,o.flags),s.mh.push(o)}).R("tfhd",function(o){var s=r[r.length-1];o=nl(o.reader,o.flags),s.ld=o.ld||t.h,s.md=o.md||t.i,o=o.trackId,t.j.has(o)&&(s.timescale=t.j.get(o))}).R("tfdt",function(o){var s=r[r.length-1];o=il(o.reader,o.version),s.baseMediaDecodeTime=o.baseMediaDecodeTime}).box("mdat",function(o){for(var s=i-o.start-8,u=o.reader.Ba(),a=g(r),l=a.next();!l.done;l=a.next()){if(l=l.value,l.baseMediaDecodeTime===null)throw Pe("Unable to find base media decode time for CEA captions!"),new k(2,2,2010);o.reader.seek(u),R2(t,o.reader,l.baseMediaDecodeTime,l.timescale,l.ld,l.md,s,l.mh,n)}}).parse(e,!1),n};function R2(e,t,n,i,r,o,s,u,a){var l=0,c=o,d=u.map(function(m){return m.hg});for(d=[].concat.apply([],W(d)),d.length&&(c=d[0].sampleSize||o),t.skip(s+u[0].qf);t.ta();){s=t.S();var p=t.X(),h=null;switch(h=!1,u=1,e.g){case $u:h=p&31,h=h==6;break;case Ju:u=2,t.skip(1),h=p>>1&63,h=h==39||h==40;break;case Zu:u=2,t.skip(1),h=p>>1&63,h=h==23||h==24;break;default:return}if(h)for(p=0,l<d.length&&(p=d[l].Be||0),p=(n+p)/i,u=g(f0(t.Db(s-u))),h=u.next();!h.done;h=u.next())a.push({packet:h.value,pts:p});else try{t.skip(s-u)}catch{break}c-=s+4,c==0&&(n=l<d.length?n+(d[l].ig||r):n+r,l++,l<d.length?c=d[l].sampleSize||o:c=o)}}Y("shaka.cea.Mp4CeaParser",ic);var Sf=0,$u=1,Ju=2,Zu=3,rc=new Map().set("avc1",$u).set("avc3",$u).set("dvav",$u).set("dva1",$u).set("hev1",Ju).set("hvc1",Ju).set("dvh1",Ju).set("dvhe",Ju).set("vvc1",Zu).set("vvi1",Zu).set("dvc1",Zu).set("dvi1",Zu);vd("video/mp4",function(){return new ic});function oc(){this.g=null}oc.prototype.init=function(){},oc.prototype.parse=function(e){this.g?this.g.clearData():this.g=new ot;var t=[];if(e=he(e),!hs(e))return t;e=this.g.parse(e);var n=e.od(),i=e.fe();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(n=g(i),i=n.next();!i.done;i=n.next())if(i=i.value,e.includes(i.type)&&i.time!=null)for(var r=g(f0(i.data)),o=r.
38next();!o.done;o=r.next())t.push({packet:o.value,pts:i.time});return t},Y("shaka.cea.TsCeaParser",oc),vd("video/mp2t",function(){return new oc});function L2(e){var t=0,n=An(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0),e+=2;var r=n.getUint16(e,!0);if(e+=2,(r&1)!=0||r+e>n.byteLength){n=[];break e}var o=he(n,e,r);t.push({type:i,value:o}),e+=r}n=t}return n}function h0(e){return e=oi(Ct(e)),e=L2(e).filter(function(t){return t.type===N2})[0],e?(e=Cr(e.value,!0),(e=ao(e,"WRMHEADER"))?e:null):null}function sc(e){try{var t=h0(e);if(t)e:{for(var n=g(Ri(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var o=g(r.children),s=o.next();!s.done;s=o.next()){var u=s.value;if(u.tagName=="LA_URL"){var a=Ct(u);break e}}}a=""}else a="";return a}catch{return""}}var N2=1;function g0(e,t,n){var i=O2(e),r=null;e=[];var o=[],s=null,u=new Set(i.map(function(l){return l.keyId}));u.delete(null);var a="cenc";if(1<u.size)throw new k(2,4,4010);if(!t){if(o=i.filter(function(l){return l.cd=="urn:mpeg:dash:sea:2012"}),1<o.length)throw new k(2,4,4050);o.length&&(s=b2(o[0])),(o=i.find(function(l){return l.cd=="urn:mpeg:dash:mp4protection:2011"}))&&o.encryptionScheme&&(a=o.encryptionScheme),o=i.filter(function(l){return l.cd=="urn:mpeg:dash:mp4protection:2011"?(r=l.init||r,!1):l.cd!="urn:mpeg:dash:sea:2012"}),o.length&&(e=U2(r,a,o,n,u),e.length==0&&(e=[kr("",a,r)]))}if(i.length&&!s&&(t||!o.length))for(e=[],t=g(Object.values(n)),n=t.next();!n.done;n=t.next())n=n.value,n!="org.w3.clearkey"&&e.push(kr(n,a,r));if(u=Array.from(u)[0]||null)for(a=g(e),t=a.next();!t.done;t=a.next())for(t=g(t.value.initData),n=t.next();!n.done;n=t.next())n.value.keyId=u;return{Lg:u,Rk:r,drmInfos:e,ef:s,Qg:!0}}function j2(e,t,n,i){var r=g0(e,n,i);
38if(t.Qg)e=t.drmInfos.length==1&&!t.drmInfos[0].keySystem,n=r.drmInfos.length==0,(t.drmInfos.length==0||e&&!n)&&(t.drmInfos=r.drmInfos),t.Qg=!1;else if(0<r.drmInfos.length&&(t.drmInfos=t.drmInfos.filter(function(o){return r.drmInfos.some(function(s){return s.keySystem==o.keySystem})}),t.drmInfos.length==0))throw new k(2,4,4008);return r.Lg||t.Lg}function uc(e){var t=xi(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=Ct(t)))return t;if((t=xi(e.node,"urn:microsoft:playready","pro"))&&Ct(t))return sc(t);if((e=xi(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=Ct(e))){t=oi(e),e=8,t=An(t);var n=t.getUint8(e);return e+=20,0<n&&(e+=4+16*t.getUint32(e)),e=he(t,e+4),e=ja(e),e=ao("<pro>"+e+"</pro>"),sc(e)}return""}function U2(e,t,n,i,r){var o=[];n=g(n);for(var s=n.next();!s.done;s=n.next()){s=s.value;var u=i[s.cd];if(u){var a;if((a=xi(s.node,"urn:microsoft:playready","pro"))&&Ct(a)){a=Ct(a),a=oi(a);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=[{initData:Za(a,l,new Set,0),initDataType:"cenc",keyId:s.keyId}]}else a=null;if(l=null,s.cd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=s;var c=r;if(c.size==0)l=null;else{var d=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Za(p,d,c,1),initDataType:"cenc",keyId:l.keyId}]}}a=kr(u,t,s.init||e||a||l),(u=F2.get(u))&&(a.licenseServerUri=u(s)),o.push(a)}}return o}function O2(e){var t=[];e=g(e);for(var n=e.next();!n.done;n=e.next())(n=_2(n.value))&&t.push(n);return t}function _2(e){var t=e.attributes.schemeIdUri,n=tr(e,"urn:mpeg:cenc:2013","default_KID"),i=Eg(e,"urn:mpeg:cenc:2013","pssh").map(Wn),r=e.attributes.value;if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase(),n.includes(" ")))throw new k(2,4,4009);var o=[];try{o=i.map(function(s){return{initDataType:"cenc",initData:oi(s),keyId:null}})}catch{throw new k(2,4,4007)}return{node:e,cd:t,keyId:n,init:0<o.length?o:null,encryptionScheme:r}}function b2(e){if(!j.crypto||!j.crypto.subtle)throw Pe("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new k(2,4,4042);var t=xi(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new k(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new k(2,4,4051);if(t=xi(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new k(2,4,4051);if(e=t.attributes.IV,t=In(t.attributes.keyUriTemplate),!e||!t)throw new k(2,4,4051);if(e=no(e.substr(2)),e.byteLength!=16)throw new k(2,4,4048);return{Zi:t,iv:e}}var F2=new Map().set("com.apple.fps",function(e){if(j.shakaMediaKeysPolyfill==="apple")throw new k(2,4,4054);return(e=xi(e.node,"https://dashif.org/CPS","Laurl"))&&(e=Ct(e))?e:""}).set("com.widevine.alpha",function(e){var t=xi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Ct(t))?t:(e=xi(e.node,"urn:microsoft","laurl"))&&In(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",uc).set("com.microsoft.playready.recommendation",uc).set("com.microsoft.playready.software",uc).set("com.microsoft.playready.hardware",uc).set("org.w3.clearkey",function(e){var t=xi(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=Ct(t))?t:(e=xi(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=Ct(e))?e:""});function ea(e,t,n,i,r,o){var s=new Map().set("RepresentationID",t).set("Number",n).set("SubNumber",i).set("Bandwidth",r).set("Time",o);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(u,a,l,c){if(u=="$$")return"$";var d=s.get(a);if(d==null)return u;switch(a=="RepresentationID"&&l&&(l=void 0),a=="Time"&&typeof d!="bigint"&&(.2<=Math.abs(d-Math.round(d))&&Pe("Calculated $Time$ values must be close to integers"),d=Math.round(d)),c){case void 0:case"d":case"i":case"u":u=d.toString();break;case"o":u=d.toString(8);break;case"x":u=d.toString(16);break;case"X":u=d.toString(16).toUpperCase();break;default:u=d.toString()}return l=j.parseInt(l,10)||1,Array(Math.max(0,l-u.length)+1).join("0")+u})}function m0(e,t){var n=Ci(e,t,"timescale"),i=1;n&&(i=nr(n)||1),n=Ci(e,t,"duration");var r=(n=nr(n||""))?n/i:null,o=Ci(e,t,"startNumber"),s=Number(Ci(e,t,"presentationTimeOffset"))||0,u=ln(o||"");if((o==null||u==null)&&(u=1),o=null,t=Ns(e,t,"SegmentTimeline")){t=Ge(t,"S"),o=i,e=e.ha.duration||1/0;for(var a=u,l=[],c=-s,d=0;d<t.length;++d){var p=t[d],h=t[d+1],m=ve(p,"t",ln),y=ve(p,"d",ln),v=ve(p,"r",mn);if(p=ve(p,"k",mn)||0,m!=null&&(m-=s),y){if(m=m??c,v=v||0,0>
vendor: 4,563 bytes, line 38
38v)if(h){if(h=ve(h,"t",ln),h==null)break;if(m>=h)break;v=Math.ceil((h-m)/y)-1}else{if(e==1/0)break;if(m/o>=e)break;v=Math.ceil((e*o-m)/y)-1}for(0<l.length&&m!=c&&(l[l.length-1].end=m/o),h=0;h<=v;++h)c=m+y,l.push({start:m/o,end:c/o,zg:m,Jb:p,yj:l.length+a}),m=c}}o=l}return{timescale:i,Ke:n,Wa:r,Md:u,hc:s/i||0,yg:s,timeline:o}}function v0(e,t){return[t(e.J),t(e.ga),t(e.pa)].filter(jr)}function Ci(e,t,n){t=v0(e,t),e=null,t=g(t);for(var i=t.next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function Ns(e,t,n){t=v0(e,t),e=null,t=g(t);for(var i=t.next();!i.done&&!(e=Et(i.value,n));i=t.next());return e}function B2(e,t,n,i,r,o){for(var s=tr(e,"http://www.w3.org/1999/xlink","href"),u=tr(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",a=g(Object.keys(e.attributes)),l=a.next();!l.done;l=a.next()){l=l.value;var c=l.split(":"),d=wd("http://www.w3.org/1999/xlink");c[0]==d&&delete e.attributes[l]}if(5<=o)return go(new k(2,4,4028));if(u!="onLoad")return go(new k(2,4,4027));var p=Gt([i],[s]);return r.request(0,Ot(p,t)).Ha(function(h){if(h=ru(h.data,e.tagName),!h)return go(new k(2,4,4001,s));for(e.children=[];h.children.length;){var m=h.children.shift();e.children.push(m)}m=g(Object.keys(h.attributes));for(var y=m.next();!y.done;y=m.next())y=y.value,e.attributes[y]=h.attributes[y];return ac(e,t,n,p[0],r,o+1)})}function ac(e,t,n,i,r,o){if(o=o===void 0?0:o,tr(e,"http://www.w3.org/1999/xlink","href")){var s=B2(e,t,n,i,r,o);return n&&(s=s.Ha(void 0,function(){return ac(e,t,n,i,r,o)})),s}s=[];for(var u=g(xg(e)),a=u.next(),l={};!a.done;l={hd:void 0},a=u.next())l.hd=a.value,tr(l.hd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(c){return function(d){return d!==c.hd}}(l)):l.hd.tagName!="SegmentTimeline"&&s.push(ac(l.hd,t,n,i,r,o));return nm(s).Ha(function(){return e})}function V2(e,t,n,i,r,o,s){var u,a=new ze().R("sidx",function(l){u=H2(t,i,r,o,s,n,l)});if(e&&a.parse(e),u)return u;throw new k(2,3,3004)}function H2(e,t,n,i,r,o,s){var u=[];s.reader.skip(4);var a=s.reader.S();if(a==0)throw new k(2,3,3005);if(s.version==0)var l=s.reader.S(),c=s.reader.S();else l=s.reader.bd(),c=s.reader.bd();s.reader.skip(2);var d=s.reader.ma();for(e=e+s.size+c,c=0;c<d;c++){var p=s.reader.S(),h=(p&2147483648)>>>31;p&=2147483647;var m=s.reader.S();if(s.reader.skip(4),h==1)throw new k(2,3,3006);u.push(new oe(l/a+n,(l+m)/a+n,function(){return o},e,e+p-1,t,n,i,r)),l+=m,e+=p}return s.parser.stop(),u}function Vr(e){this.h=An(e),this.g=new rt(this.h,0)}Vr.prototype.ta=function(){return this.g.ta()};function Tr(e){var t=y0(e);if(7<t.length)throw new k(2,3,3002);var n=0;t=g(t);for(var i=t.next();!i.done;i=t.next())n=256*n+i.value;t=y0(e);e:{i=g(G2);for(var r=i.next();!r.done;r=i.next())if(Qi(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Ba();else{if(t.length==8&&t[1]&224)throw new k(2,3,3001);for(r=i=0;r<t.length;r++){var o=t[r];i=r==0?o&(1<<8-t.length)-1:256*i+o}t=i}return t=e.g.Ba()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Ba(),i=An(e.h,e.g.Ba(),t),e.g.skip(t),new X2(n,i)}function y0(e){var t=e.g.Ba(),n=e.g.X();if(n==0)throw new k(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),he(e.h,t,n)}var G2=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function X2(e,t){this.id=e,this.g=t}function wf(e){if(8<e.g.byteLength)throw new k(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new k(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var i=e.g.getUint8(n);t=256*t+i}return t}function K2(e,t,n,i,r,o,s,u,a){function l(){return r}var c=[];e=new Vr(e.g);for(var d=null,p=null;e.ta();){var h=Tr(e);if(h.id==187){var m=W2(h);m&&(h=n*m.Lj,m=t+m.pj,d!=null&&c.push(new oe(d+s,h+s,l,p,m-1,o,s,u,a)),d=h,p=m)}}return d!=null&&c.push(new oe(d+s,i+s,l,p,null,o,s,u,a)),c}function W2(e){var t=new Vr(e.g);if(e=Tr(t),e.id!=179)throw new k(2,3,3013);if(e=wf(e),t=Tr(t),t.id!=183)throw new k(2,3,3012);t=new Vr(t.g);for(var n=0;t.ta();){var i=Tr(t);if(i.id==241){n=wf(i);break}}return{Lj:e,pj:n}}function T0(e,t,n){if(t=Ns(e,t,"Initialization"),!t)return null;var i=e.J.Ua(),r=t.attributes.sourceURL;r&&(i=Gt(i,[In(r)],e.vb())),r=0;var o=null;return(t=ve(t,"range",Oa))&&(r=t.start,o=t.end),n=new Cn(function(){return i},r,o,E0(e),null,null,n,e.ga.encrypted),n.codecs=e.J.codecs,n.mimeType=e.J.mimeType,e.ha&&(n.g=e.ha.start+e.ha.duration),n}function q2(e,t,n){var i=Number(Ci(e,js,"presentationTimeOffset"))||0,r=Ci(e,js,"timescale"),o=1;
38r&&(o=nr(r)||1);var s=i/o||0,u=T0(e,js,n);z2(e,u);var a=uo(e);return{rc:function(){var l=Ns(a,js,"RepresentationIndex"),c=a.J.Ua();return l&&(l=In(l.attributes.sourceURL))&&(c=Gt(c,[l],a.vb())),l=w0(a),S0(a,t,u,c,l.start,l.end,s)}}}function S0(e,t,n,i,r,o,s){var u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D;return C(function(P){if(P.g==1)return u=e.presentationTimeline,a=!e.Ob||!e.ha.ah,l=e.ha.start,c=e.ha.duration,d=e.J.mimeType.split("/")[1],p=t,h=null,m=[p(i,r,o,!1),d=="webm"?p(n.N(),n.Sa,n.xa,!0):null],p=null,S(P,Promise.all(m),2);if(y=P.h,v=y[0],T=y[1]||null,w=null,I=l-s,M=l,R=c?l+c:1/0,d=="mp4")var O=V2(v,r,i,n,I,M,R);else{O=v;var L=new Vr(T);if(Tr(L).id!=440786851)throw new k(2,3,3008);var U=Tr(L);if(U.id!=408125543)throw new k(2,3,3009);L=U.g.byteOffset,U=new Vr(U.g);for(var _=null;U.ta();){var F=Tr(U);if(F.id==357149030){_=F;break}}if(!_)throw new k(2,3,3010);for(_=new Vr(_.g),F=1e6,U=null;_.ta();){var H=Tr(_);if(H.id==2807729)F=wf(H);else if(H.id==17545)if(H.g.byteLength==4)U=H.g.getFloat32(0);else if(H.g.byteLength==8)U=H.g.getFloat64(0);else throw new k(2,3,3003)}if(U==null)throw new k(2,3,3011);if(_=F/1e9,U*=_,O=Tr(new Vr(O)),O.id!=475249515)throw new k(2,3,3007);O=K2(O,L,_,U,i,n,I,M,R)}for(w=O,A=g(w),E=A.next();!E.done;E=A.next())D=E.value,D.codecs=e.J.codecs,D.mimeType=e.J.mimeType,D.bandwidth=e.bandwidth;
38return u.Ed(w),h=new Oe(w),a&&h.Oc(M,R,!0),P.return(h)})}function js(e){return e.dd}function w0(e){var t=Ns(e,js,"RepresentationIndex");return e=Ci(e,js,"indexRange"),e=Oa(e||""),t&&(e=ve(t,"range",Oa,e)),e}function z2(e,t){if(x0(e,t),!w0(e))throw new k(2,4,4002)}function x0(e,t){var n=e.J.mimeType.split("/")[1];if(e.J.contentType!=Ce&&n!="mp4"&&n!="webm")throw new k(2,4,4006);if(n=="webm"&&!t)throw new k(2,4,4005)}function E0(e){var t=e.J;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.se,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.ga.label||null,roles:e.roles||null,language:e.ga.language||null}}function Y2(e,t,n){var i=T0(e,A0,n),r=Q2(e);if(!r.Wa&&!r.timeline&&1<r.Xc.length)throw new k(2,4,4002);if(!r.Wa&&!e.ha.duration&&!r.timeline&&r.Xc.length==1)throw new k(2,4,4002);if(r.timeline&&r.timeline.length==0)throw new k(2,4,4002);var o=null,s=null;e.pa.id&&e.J.id&&(s=t.get(e.pa.id+","+e.J.id))&&(o=s.segmentIndex);var u=$2(e.ha.start,e.ha.duration,e.J.Ua,r,i,n,e.J.mimeType,e.J.codecs,e.bandwidth,e.vb);return t=!o,o?o.Bd(u,e.presentationTimeline.pb()):o=new Oe(u),e.presentationTimeline.Ed(u),e.Ob&&e.ha.ah||o.Oc(e.ha.start,e.ha.duration?e.ha.start+e.ha.duration:1/0,t),s&&(s.segmentIndex=o),{rc:function(){return o&&o.getNumReferences()!=0||o.oe(u),Promise.resolve(o)}}}function A0(e){return e.Zb}function Q2(e){var t=J2(e);e=m0(e,A0);var n=e.Md;n==0&&(n=1);var i=0;return e.Wa?i=e.Wa*(n-1):e.timeline&&0<e.timeline.length&&(i=e.timeline[0].start),{Wa:e.Wa,startTime:i,Md:n,hc:e.hc,timeline:e.timeline,Xc:t}}function $2(e,t,n,i,r,o,s,u,a,l){var c=i.Xc.length;i.timeline&&i.timeline.length!=i.Xc.length&&(c=Math.min(i.timeline.length,i.Xc.length));for(var d=e-i.hc,p=t?e+t:1/0,h=[],m=i.startTime,y={},v=0;v<c;y={Me:void 0,Ce:void 0},v++){y.Ce=i.Xc[v];var T=m;m=void 0,m=i.Wa!=null?T+i.Wa:i.timeline?i.timeline[v].end:T+t,y.Me=null,y=new oe(e+T,e+m,function(w){return function(){return w.Me==null&&(w.Me=Gt(n(),[w.Ce.ej],l())),w.Me}}(y),y.Ce.start,y.Ce.end,r,d,e,p,[],"",null,null,cr,o),y.codecs=u,y.mimeType=s,y.bandwidth=a,h.push(y)}return h}function J2(e){return[e.J.Zb,e.ga.Zb,e.pa.Zb].filter(jr).map(function(t){return Ge(t,"SegmentURL")}).reduce(function(t,n){return 0<t.length?t:n}).map(function(t){t.attributes.indexRange&&!e.Nf&&(e.Nf=!0);var n=In(t.attributes.media);return t=ve(t,"mediaRange",Oa,{start:0,end:null}),{ej:n,start:t.start,end:t.end}})}function I0(e,t,n,i,r,o,s,u,a){a||e.J.he||(e.J.he=Ci(e,Hr,"initialization"));var l=e.J.he?nI(e,s):null,c=Z2(e);eI(c);var d=uo(e);if(c.vd)return x0(e,l),{rc:function(){var y=ea(c.vd,d.J.originalId,null,null,d.bandwidth||null,null);return y=Gt(d.J.Ua(),[y]),S0(d,t,l,y,0,null,c.hc)}};if(c.Wa)return i||e.ga.contentType==="image"||e.ga.contentType==="text"||(n=e.ha.start,i=e.pa.id,a=e.ha.duration,i=(i=i!=null&&o.get(i)||a)?n+i:1/0,e.presentationTimeline.Vf(c.Wa),e.presentationTimeline.kh(n,i)),{rc:function(){return tI(d,c,r,l,o,s,u,e.J.De)}};var p=null;i=i=null,e.pa.id&&e.J.id&&(i=e.pa.id+","+e.J.id,i=n.get(i))&&(p=i.segmentIndex);var h=e.ha.start,m=e.ha.duration?h+e.ha.duration:1/0;return p?(n=p,M0(n,c,h,m,l),n.Pa(e.presentationTimeline.pb())):p=new lc(c,e.J.originalId,e.bandwidth,e.J.Ua,e.vb,h,m,l,s,e.J.De),c.timeline&&e.ga.contentType!=="image"&&e.ga.contentType!=="text"&&e.presentationTimeline.lh(p.h?p.h.timeline:[],h),i&&e.Ob&&(i.segmentIndex=p),{rc:function(){return p instanceof lc&&p.getNumReferences()==0&&M0(p,c,h,m,l),Promise.resolve(p)}}}function Hr(e){return e.ic}function Z2(e){var t=m0(e,Hr),n=Ci(e,Hr,"media"),i=Ci(e,Hr,"index"),r=Ci(e,Hr,"k"),o=0;return r&&(o=parseInt(r,10)),{Ke:t.Ke,Wa:t.Wa,timescale:t.timescale,Md:t.Md,hc:t.hc,yg:t.yg,timeline:t.timeline,ec:n&&In(n),vd:i,mimeType:e.J.mimeType,codecs:e.J.codecs,bandwidth:e.bandwidth,fj:o}}function eI(e){var t=e.vd?1:0;if(t+=e.timeline?1:0,t+=e.Wa?1:0,t==0)throw new k(2,4,4002);if(t!=1&&(e.vd&&(e.timeline=null),e.Ke=null,e.Wa=null),!e.vd&&!e.ec)throw new k(2,4,4002)}function tI(e,t,n,i,r,o,s,u){function a(U){var _=U-v,F=_*y,H=t.Ke,V=_*H;"BigInt"in j&&V>Number.MAX_SAFE_INTEGER&&(V=BigInt(_)*BigInt(H)),F+=p,_=F+y,H=Math.min(_,c());var X=[],K=t.fj;if(K)for(var pe=(H-F)/K,te={},Be=0;Be<K;te={Fh:void 0},Be++){var De=F+pe*Be,xe=De+pe;te.Fh=Be+1,te=new oe(De,xe,function(Ae){return function(){var _e=ea(T,I,U,Ae.Fh,w,V);return Gt(M(),[_e],R())}}(te),0,null,i,A,p,c(),[],"",null,null,cr,o),te.codecs=e.J.codecs,te.mimeType=e.J.mimeType,u==0?0<Be&&te.Vc():Be%u!=0&&te.Vc(),X.push(te)}return F=new oe(F,H,function(){if(K)return[];
38var Ae=ea(T,I,U,null,w,V);return Gt(M(),[Ae],R())},0,null,i,A,p,c(),X,"",null,null,cr,o,0<X.length),F.codecs=e.J.codecs,F.mimeType=e.J.mimeType,F.bandwidth=e.bandwidth,F.j=_,F}function l(){var U=[Math.max(d.pb(),p),Math.min(d.cc(),c())].map(function(_){return _-p});return U=[Math.ceil(U[0]/y),Math.ceil(U[1]/y)-1],e.J.cb&&U[1]++,U.map(function(_){return _+v})}function c(){var U=h!=null&&r.get(h)||m;return U?p+U:1/0}var d=e.presentationTimeline,p=e.ha.start,h=e.pa.id,m=e.ha.duration,y=t.Wa,v=t.Md,T=t.ec,w=e.bandwidth||null,I=e.J.id,M=e.J.Ua,R=e.vb,A=p-t.hc,E=l();n=e.Ob?Math.max(E[0],E[1]-n+1):E[0],s=s||E[1],E=[];for(var D=n;D<=s;++D){var P=a(D);E.push(P)}var O=new Oe(E);if(E=d.cc()<c(),D=d.U(),E||D){var L=Math.max(n,s+1);n=y,e.J.cb&&(n=.1),O.Le(n,function(){var U=d.pb();O.Pa(U);var _=g(l());_.next(),_=_.next().value;for(var F=[];L<=_;){var H=a(L);F.push(H),L++}return U>c()&&!F.length?null:F})}return Promise.resolve(O)}function nI(e,t){var n=e.J.he;if(n||(n=Ci(e,Hr,"initialization")),!n)return null;n=In(n);var i=e.J.originalId,r=e.bandwidth||null,o=e.J.Ua,s=e.vb;return t=new Cn(function(){var u=ea(n,i,null,null,r,null);return Gt(o(),[u],s())},0,null,E0(e),null,null,t,e.ga.encrypted),t.codecs=e.J.codecs,t.mimeType=e.J.mimeType,e.ha&&(t.g=e.ha.start+e.ha.duration),t}function lc(e,t,n,i,r,o,s,u,a,l){Oe.call(this,[]),this.h=e,this.F=t,this.B=n,this.C=i,this.H=r,this.j=o,this.l=s,this.u=u,this.A=a,this.G=l,xf(this)}ct(lc,Oe),f=lc.prototype,f.getNumReferences=function(){return this.h?this.h.timeline.length:0},f.release=function(){Oe.prototype.release.call(this),this.h=null},f.Pa=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length&&n[i].end+this.j<=e;i+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,this.getNumReferences()===0&&this.release())}};function M0(e,t,n,i,r){if(iI(e,r),e.h){if(n=e.h.timeline,e.h.ec!==t.ec&&(e.h.ec=t.ec),n.length){var o=n[n.length-1];t=t.timeline.filter(function(s){return s.end>o.end})}else t=t.timeline.slice();0<t.length&&e.h.timeline.push.apply(e.h.timeline,W(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;xf(e)}function iI(e,t){if(e.u!==t){e.u=t,e=g(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&Bm(n,t)}}function xf(e){if(e.h&&!e.o){for(var t=[],n=g(e.h.timeline),i=n.next();!i.done;i=n.next())i=i.value,i.start>=e.l||0>=i.end||t.push(i);e.h.timeline=t,e.Pa(e.j)}}f.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,i=0;i<t.length;i++){var r=t[i],o=r.start+this.j;if(r=i<n?t[i+1].start+this.j:this.l===1/0?r.end+this.j:this.l,e>=o&&e<r)return i+this.i}return null},f.get=function(e){var t=this;if(e-=this.i,0>e||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var i=this.h.timeline[e],r=i.yj,o=i.zg+this.h.yg;n=this.j-this.h.hc;var s=this.j+i.end,u=s;e===this.getNumReferences()-1&&this.l!==1/0&&(u=Math.min(u,this.l));for(var a=this.h.codecs,l=this.h.mimeType,c=this.h.bandwidth,d=[],p=(i.end-i.start)/i.Jb,h={},m=0;m<i.Jb;h={Ne:void 0,Gh:void 0},m++){var y=i.start+p*m,v=y+p;h.Gh=m+1,h.Ne=null,h=new oe(this.j+y,this.j+v,function(T){return function(){return t.h?(T.Ne==null&&(T.Ne=C0(t.h.ec,t.F,r,t.B,o,T.Gh,t.C,t.H)),T.Ne):[]}}(h),0,null,this.u,n,this.j,this.l,[],"",null,null,cr,this.A),h.codecs=a,h.mimeType=l,h.bandwidth=c,this.G==0?0<m&&h.Vc():m%this.G!=0&&h.Vc(),d.push(h)}n=new oe(this.j+i.start,u,function(){return 0<i.Jb||!t.h?[]:C0(t.h.ec,t.F,r,t.B,o,null,t.C,t.H)},0,null,this.u,n,this.j,this.l,d,"",null,null,cr,this.A,0<i.Jb),n.codecs=a,n.mimeType=l,n.j=s,n.bandwidth=c,this.g[e]=n}return n},f.xb=function(e){xf(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function C0(e,t,n,i,r,o,s,u){return e=ea(e,t,n,o,i||null,r),Gt(s(),[e],u()).map(function(a){return a.toString()})}function Us(e){this.o=null,this.A=e,this.G=new ss,this.i=[],this.h=null,this.m=[],this.B=null,this.F=[],this.C=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}Us.prototype.configure=function(e){this.o=e},Us.prototype.destroy=function(){return this.A=this.o=null,this.i=[],this.h=null,this.m=[],this.F=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.G.destroy()},Us.prototype.setManifestType=function(e){this.u=e};function ta(e,t){var n,i,r,o,s,u,a;return C(function(l){if(l.g==1)return n=Gt(e.i,[rI(e,t)]),i=Ot(n,e.o.retryParameters),r=e.A.networkingEngine.request(8,i),mo(e.G,r),ee(l,2),S(l,r.promise,4);if(l.g!=2)return o=l.h,s=at(o.data),u=JSON.parse(s),u.VERSION==1&&oI(e,u,o.uri),fe(l,0);if((a=re(l))&&a.code==7001)return l.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new ke(function(){ta(e,t)}),e.g.da(e.C),q(l)})}function rI(e,t){if(!e.m.length)return t;t=new vt(t);var n=e.B||e.m[0],i=Math.round(e.A.getBandwidthEstimate()),r=t.g;return e.u=="DASH"?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):e.u=="HLS"&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),og(r)&&eo(t,r),t.toString()}
38function oI(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var i=t["RELOAD-URI"]||n;e.g=new ke(function(){ta(e,i)}),(n=t.TTL)&&(e.C=n),e.g.da(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}function Os(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}Us.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function na(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var i=[],r=g(e.m),o=r.next(),s={};!o.done;s={Zc:void 0},o=r.next())if(s.Zc=o.value,o=t.get(s.Zc))i.push({$f:s.Zc,location:o});else if(o=e.F.find(function(a){return function(l){return l.gk==a.Zc}}(s))){var u=t.get(o["BASE-ID"]);u&&(o["URI-REPLACEMENT"].Ph?(u=new vt(u),Ca(u,o["URI-REPLACEMENT"].Ph),i.push({$f:s.Zc,location:u.toString()})):i.push({$f:s.Zc,location:u}))}for(r=Date.now(),s=g(e.j.keys()),o=s.next();!o.done;o=s.next())o=o.value,u=e.j.get(o),r>u&&e.j.delete(o);if(i=i.filter(function(a){for(var l=g(e.j.keys()),c=l.next();!c.done;c=l.next())if(c.value.includes(new vt(a.location).nb))return!1;return!0}),i.length&&(e.B=i[0].$f),i=i.map(function(a){return a.location}),!i.length&&e.h)for(r=g(e.h.split(",")),s=r.next();!s.done;s=r.next())(s=t.get(s.value))&&(e.B=e.h,i.push(s));if(!i.length)for(t=g(t.values()),r=t.next();!r.done;r=t.next())i.push(r.value);return n?i:Gt(e.i,i)}function dn(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.u=this.o=!1,this.m=new Set}f=dn.prototype,f.release=function(){for(var e=g(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.u=this.o=!1,this.m.clear()},f.Mi=function(){return this.l},f.Lf=function(){return this.j.slice()},f.ri=function(){return this.i},f.Mg=function(e,t){if(e){if(e.type=="audio")for(var n=g(this.h),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if(e.type=="video")for(n=g(this.g),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e}),i.trickModeVideo&&(i.trickModeVideo.matchedStreams=i.trickModeVideo.matchedStreams.filter(function(r){return r!==e})),i.dependencyStream&&(i.dependencyStream.matchedStreams=i.dependencyStream.matchedStreams.filter(function(r){return r!==e}));else if(e.type==Ce)for(n=g(this.j),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if(e.type=="image")for(n=g(this.i),i=n.next();!i.done;i=n.next())i=i.value,i.matchedStreams=i.matchedStreams.filter(function(r){return r!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function k0(e,t){var n=[],i=[],r=[],o=[];e=g(e);for(var s=e.next();!s.done;s=e.next()){var u=s.value;s=new Map(u.audioStreams.map(function(d){return[Mf(d),d]}));var a=new Map(u.videoStreams.map(function(d){return[If(d),d]})),l=new Map(u.textStreams.map(function(d){return[oa(d),d]}));if(u=new Map(u.imageStreams.map(function(d){return[sa(d),d]})),t){var c=j0(Ce);l.set(oa(c),c),c=j0("image"),u.set(sa(c),c)}n.push(s),i.push(a),r.push(l),o.push(u)}return{Fg:n,Nh:i,Jh:r,Zg:o}}f.jf=function(e,t,n){n=n===void 0?!1:n;var i=this,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X,K,pe;return C(function(te){if(te.g==1){if(r=Mt,!t&&e.length==1)return o=k0(e,!1),s=o.Fg,u=o.Nh,a=o.Jh,l=o.Zg,i.h=Array.from(s[0].values()),i.g=Array.from(u[0].values()),i.j=Array.from(a[0].values()),i.i=Array.from(l[0].values()),te.s(2);for(c=n?i.m.size:0,d=-1,p=0;p<e.length;p++)h=e[p],i.m.has(h.id)||(i.m.add(h.id),d==-1&&(d=p));return d==-1?te.return():(m=k0(e,!0),y=m.Fg,v=m.Nh,T=m.Jh,w=m.Zg,S(te,Promise.all([Gr(i,i.h,y,d,_s,Xr,c),Gr(i,i.g,v,d,_s,Xr,c),Gr(i,i.j,T,d,_s,Xr,c),Gr(i,i.i,w,d,_s,Xr,c)]),2))}if(I=0,M=[],i.g.length&&i.h.length)for(L=g(i.h),U=L.next();!U.done;U=L.next())for(_=U.value,F=g(i.g),H=F.next();!H.done;H=F.next())V=H.value,X=sd(_.drmInfos,V.drmInfos),_.drmInfos.length&&V.drmInfos.length&&!X.length||(K=(_.bandwidth||0)+(V.bandwidth||0),_.dependencyStream&&(K+=_.dependencyStream.bandwidth||0),V.dependencyStream&&(K+=V.dependencyStream.bandwidth||0),pe=I++,M.push({id:pe,language:_.language,disabledUntilTime:0,primary:_.primary,audio:_,video:V,bandwidth:K,drmInfos:X,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));
38else for(R=i.g.length?i.g:i.h,A=g(R),E=A.next();!E.done;E=A.next())D=E.value,P=I++,O=D.bandwidth||0,D.dependencyStream&&(O+=D.dependencyStream.bandwidth||0),M.push({id:P,language:D.language,disabledUntilTime:0,primary:D.primary,audio:D.type==r.V?D:null,video:D.type==r.la?D:null,bandwidth:O,drmInfos:D.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});i.l=M,q(te)})};function D0(e){var t,n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F;return C(function(H){switch(H.g){case 1:if(t=Mt,e.length==1)return H.return(e[0]);for(n=e.map(function(V){return new Map(V.filter(function(X){return X.type===t.V}).map(function(X){return[Mf(X),X]}))}),i=e.map(function(V){return new Map(V.filter(function(X){return X.type===t.la}).map(function(X){return[If(X),X]}))}),r=e.map(function(V){return new Map(V.filter(function(X){return X.type===t.va}).map(function(X){return[oa(X),X]}))}),o=e.map(function(V){return new Map(V.filter(function(X){return X.type===t.bf}).map(function(X){return[sa(X),X]}))}),s=g(r),u=s.next();!u.done;u=s.next())a=u.value,l=N0(t.va),a.set(oa(l),l);for(c=g(o),d=c.next();!d.done;d=c.next())p=d.value,h=N0(t.bf),p.set(sa(h),h);return m=new dn,S(H,Gr(m,[],n,0,cc,dc,0),2);case 2:return y=H.h,S(H,Gr(m,[],i,0,cc,dc,0),3);case 3:return v=H.h,S(H,Gr(m,[],r,0,cc,dc,0),4);case 4:return T=H.h,S(H,Gr(m,[],o,0,cc,dc,0),5);case 5:if(w=H.h,I=0,v.length&&y.length)for(D=g(y),P=D.next();!P.done;P=D.next())for(O=P.value,L=g(v),U=L.next();!U.done;U=L.next())_=U.value,F=I++,_.variantIds.push(F),O.variantIds.push(F);else for(M=v.concat(y),R=g(M),A=R.next();!A.done;A=R.next())E=A.value,E.variantIds=[I++];return H.return(v.concat(y).concat(T).concat(w))}})}function Gr(e,t,n,i,r,o,s){var u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P;return C(function(O){switch(O.g){case 1:for(u=[],a=0;a<n.length;a++)a>=i?u.push(new Set(n[a].values())):u.push(new Set);l=g(t),c=l.next();case 2:if(c.done){O.s(4);break}return d=c.value,S(O,sI(e,d,n,i,o,u,s),5);case 5:if(p=O.h,!p)throw new k(2,4,4037);c=l.next(),O.s(2);break;case 4:for(h=g(u),m=h.next();!m.done;m=h.next())for(y=m.value,v=g(y),T=v.next();!T.done;T=v.next())w=T.value,(I=uI(e,w,n,r,o,u))&&t.push(I);for(M=g(u),R=M.next();!R.done;R=M.next())for(A=R.value,E=g(A),D=E.next(),P={};!D.done;P={pg:void 0},D=E.next())if(P.pg=D.value,!Af(P.pg)&&t.some(function(L){return function(U){return Ef(e,L.pg,U)}}(P)))throw new k(2,4,4037);return O.return(t)}})}function sI(e,t,n,i,r,o,s){return C(function(u){return u.g==1?(L0(e,n,t,0<s),t.matchedStreams?t.segmentIndex?S(u,P0(t,i+s),2):u.s(2):u.return(!1)):(R0(t,i,r,o,s),u.return(!0))})}function P0(e,t){var n,i,r,o,s,u;return C(function(a){if(a.g==1){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)o=i[r],n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex()),o.dependencyStream&&!o.dependencyStream.segmentIndex&&n.push(o.dependencyStream.createSegmentIndex());return S(a,Promise.all(n),2)}if(e.segmentIndex instanceof ft)for(s=t;s<i.length;s++)u=i[s],u.segmentIndex&&e.segmentIndex.h.push(u.segmentIndex);q(a)})}function uI(e,t,n,i,r,o){if(Af(t))return null;var s=i(t);return L0(e,n,s),s.createSegmentIndex&&(s.createSegmentIndex=function(){return C(function(u){return s.segmentIndex?u.s(0):(s.segmentIndex=new ft,S(u,P0(s,0),0))})}),!s.matchedStreams||!s.matchedStreams.length?null:(R0(s,0,r,o,0),s)}function R0(e,t,n,i,r){var o=e.matchedStreams;for(t+=r;t<o.length;t++){var s=o[t];n(e,s);var u=!0;if(e.type=="audio"&&po(e.language,s.language)==0&&(u=!1),u&&(i[t-r].delete(s),s.fullMimeTypes))for(s=g(s.fullMimeTypes.values()),u=s.next();!u.done;u=s.next())e.fullMimeTypes.add(u.value)}}function _s(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var n=g(t.matchedStreams),i=n.next();!i.done;i=n.next())i=i.value,i.segmentIndex&&(i.segmentIndex.release(),i.segmentIndex=null)},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream
38=null,t}function cc(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function Xr(e,t){function n(s,u){s||(s=[]),u=g(u);for(var a=u.next();!a.done;a=u.next())a=a.value,s.includes(a)||s.push(a);return s}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=g(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(e.originalId==null?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=sd(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new k(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),i=g(t.closedCaptions),r=i.next();!r.done;r=i.next()){var o=g(r.value);r=o.next().value,o=o.next().value,e.closedCaptions.set(r,o)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=_s(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var s=new ft,u=g(e.trickModeVideo.matchedStreams),a=u.next();!a.done;a=u.next())s.h.push(a.value.segmentIndex);return e.trickModeVideo.segmentIndex=s,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),Xr(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),Xr(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=_s(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var s=new ft,u=g(e.dependencyStream.matchedStreams),a=u.next();!a.done;a=u.next())s.h.push(a.value.segmentIndex);return e.dependencyStream.segmentIndex=s,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),Xr(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),Xr(e.dependencyStream,t))}function dc(e,t){var n=e.roles;n||(n=[]);for(var i=g(t.roles),r=i.next();!r.done;r=i.next())r=r.value,n.includes(r)||n.push(r);for(e.roles=n,n=g(t.keyIds),i=n.next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,W(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=g(t.closedCaptions),n=t.next();!n.done;n=t.next())i=g(n.value),n=i.next().value,i=i.next().value,e.closedCaptions.set(n,i)}function L0(e,t,n,i){i=i!==void 0&&i?n.matchedStreams:[],t=g(t);for(var r=t.next();!r.done;r=t.next()){if(r=aI(e,r.value,n),!r)return;i.push(r)}n.matchedStreams=i}
38function aI(e,t,n){var i={audio:Mf,video:If,text:oa,image:sa}[n.type],r=null,o=i(n);if(t.has(o))r=t.get(o);else{o={audio:function(l,c){return Ef(e,l,c)},video:function(l,c){return Ef(e,l,c)},text:lI,image:cI}[n.type];for(var s={audio:dI,video:pI,text:fI,image:hI}[n.type],u=g(t.values()),a=u.next();!a.done;a=u.next())a=a.value,!o(n,a)||n.fastSwitching!=a.fastSwitching||r&&!s(n,r,a)||(r=a)}return e.u&&!Af(r)&&t.delete(i(r)),r}function ia(e,t){return e.mimeType!=t.mimeType?!1:pc(e.codecs)===pc(t.codecs)}f.vh=function(e){this.o=e},f.Bh=function(e){this.u=e};function Ef(e,t,n){return!(!ia(t,n)&&!e.o||t.drmInfos&&!ug(t.drmInfos,n.drmInfos))}function lI(e,t){return t.language?!(e.forced!==t.forced||po(e.language,t.language)==0||t.kind!=e.kind):!0}function cI(){return!0}function dI(e,t,n){var i=ia(e,t),r=ia(e,n);if(i&&!r)return!1;if(!i&&r||(i=po(e.language,t.language),r=po(e.language,n.language),r>i))return!0;if(r<i)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(o){return e.roles.includes(o)}),r=n.roles.filter(function(o){return e.roles.includes(o)}),r.length>i.length)return!0;if(r.length<i.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&n.primary?!0:t.primary&&!n.primary?!1:(i=ra(e.channelsCount,t.channelsCount,n.channelsCount),i==Ui?!0:i==Sr?!1:(i=ra(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),i==Ui?!0:i==Sr?!1:!!(e.bandwidth&&U0(e.bandwidth,t.bandwidth,n.bandwidth)==Ui)))}function pI(e,t,n){var i=ia(e,t),r=ia(e,n);if(i&&!r)return!1;if(!i&&r||(i=ra(e.width*e.height,t.width*t.height,n.width*n.height),i==Ui))return!0;if(i==Sr)return!1;if(e.frameRate){if(i=ra(e.frameRate,t.frameRate,n.frameRate),i==Ui)return!0;if(i==Sr)return!1}return!!(e.bandwidth&&U0(e.bandwidth,t.bandwidth,n.bandwidth)==Ui)}function fI(e,t,n){var i=po(e.language,t.language),r=po(e.language,n.language);if(r>i)return!0;if(r<i)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(i=t.roles.filter(function(o){return e.roles.includes(o)}),r=n.roles.filter(function(o){return e.roles.includes(o)}),r.length>i.length)return!0;if(r.length<i.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(n.mimeType!=e.mimeType||n.codecs!=e.codecs||t.mimeType==e.mimeType&&t.codecs==e.codecs)}function hI(e,t,n){return ra(e.width*e.height,t.width*t.height,n.width*n.height)==Ui}function N0(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}function j0(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oe([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function ra(e,t,n){if(t==e&&e!=n)return Sr;if(n==e&&e!=t)return Ui;if(t>e){if(n<=e||n-e<t-e)return Ui;if(n-e>t-e)return Sr}else{if(n>e)return Sr;if(e-n<e-t)return Ui;if(e-n>e-t)return Sr}return O0}function U0(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?Ui:t<e?Sr:O0}function Af(e){switch(e.type){case Ce:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function If(e){return JSON.stringify([e.fastSwitching,e.width,e.frameRate,pc(e.codecs),e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Mf(e){return JSON.stringify([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,pc(e.codecs),e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function oa(e){return JSON.stringify([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function sa(e){return JSON.stringify([e.width,e.codecs,e.mimeType])}function pc(e){if(!Cf.has(e)){var t=nn(e);Cf.set(e,t)}return Cf.get(e)}Y("shaka.util.PeriodCombiner",dn),dn.prototype.setUseStreamOnce=dn.prototype.Bh,dn.prototype.setAllowMultiT
38ypeVariants=dn.prototype.vh,dn.prototype.combinePeriods=dn.prototype.jf,dn.prototype.deleteStream=dn.prototype.Mg,dn.prototype.getImageStreams=dn.prototype.ri,dn.prototype.getTextStreams=dn.prototype.Lf,dn.prototype.getVariants=dn.prototype.Mi;var Ui=1,O0=0,Sr=-1,Cf=new Map;function gI(e,t){var n=new DOMParser,i=mI.value()(e);e=null;try{e=n.parseFromString(i,"text/xml")}catch{return null}if(n=e.documentElement,!n||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function _0(e,t){try{var n=Vi(e);return gI(n,t)}catch{return null}}var mI=new $s(function(){if(typeof trustedTypes<"u"){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(t){return t}});return function(t){return e.createHTML(t)}}return function(t){return t}});function fc(){var e=this;this.j=this.g=null,this.A=[],this.i=null,this.oa=1,this.F=[],this.l={qe:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.u=new Map,this.o=new Map,this.B=new Map,this.ka=new Map,this.m=new dn,this.I=0,this.na=new hn(5),this.K=new ke(function(){if(e.H&&!e.g.continueLoadingWhenPaused&&(e.G.Ka(e.H,"timeupdate"),e.H.paused)){e.G.qa(e.H,"timeupdate",function(){return X0(e)});return}X0(e)}),this.O=new ss,this.M=null,this.C=[],this.$=1/0,this.fa=!1,this.h=null,this.L=0,this.P=!1,this.G=new Le,this.H=null,this.T=!1,this.Z="",this.ea=function(){return!1},this.W=[]}f=fc.prototype,f.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.ea=t),n&&this.i&&this.i.presentationTimeline.U()&&this.K.sb(),this.h&&this.h.configure(this.g),this.m&&(this.m.vh(this.g.dash.multiTypeVariantsAllowed&&io()),this.m.Bh(this.g.dash.useStreamOnceInPeriodFlattening))},f.start=function(e,t){var n=this,i;return C(function(r){if(r.g==1)return n.fa=t.isLowLatencyMode(),n.A=[e],n.j=t,S(r,kf(n),2);if(i=r.h,n.j&&Df(n,i),!n.j)throw new k(2,7,7001);return r.return(n.i)})},f.stop=function(){for(var e=g(this.o.values()),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.A=[],this.i=null,this.o.clear(),this.B.clear(),this.u.clear(),this.l={qe:"",type:"",profiles:[],Wb:null,cb:0,Ua:null,Id:0},this.m=null,this.K!=null&&(this.K.stop(),this.K=null),this.h&&this.h.destroy(),this.G&&(this.G.release(),this.G=null),this.O.destroy()},f.update=function(){var e=this,t;return C(function(n){if(n.g==1)return ee(n,2),S(n,kf(e),4);if(n.g!=2)return fe(n,0);if(t=re(n),!e.j||!t)return n.return();e.j.onError(t),q(n)})},f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(e){if(this.i&&this.i.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.i.presentationTimeline.cc();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.I=t.endTime-e,Df(this,0))}}},f.banLocation=function(e){this.h&&this.h.banLocation(e)},f.setMediaElement=function(e){this.H=e};function kf(e){var t,n,i,r,o,s,u,a,l,c,d;return C(function(p){return p.g==1?(t=4,n="MPD",i=LI(e),r=e.A,i.length?(r=i,n="Patch",t=6):1<e.A.length&&e.h&&(o=na(e.h,"Location",!0),o.length&&(r=o)),s=Ot(r,e.g.retryParameters),u=Date.now(),S(p,Rf(e,s,0,{type:t}),2)):p.g!=3?(a=p.h,e.j?(a.uri&&a.uri!=a.originalUri&&!e.A.includes(a.uri)&&e.A.unshift(a.uri),l=new vt(a.uri),e.Z=l.g.toString(),S(p,vI(e,a.data,a.uri,n),3)):p.return(0)):(c=Date.now(),d=(c-u)/1e3,e.na.sample(1,d),p.return(d))})}function vI(e,t,n,i){var r,o,s,u,a,l,c,d,p,h;return C(function(m){if(m.g==1){if(r=t,o=e.g.dash.manifestPreprocessor,s=Cl,o!=s){if(Ue("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),u=_0(r,i),!u)throw new k(2,4,4001,n);o(u),r=Si(u.outerHTML)}if(a=ru(r,i),!a)throw new k(2,4,4001,n);return l=e.g.dash.manifestPreprocessorTXml,c=kl,l!=c&&l(a),i==="Patch"?m.return(yI(e,a)):e.g.dash.disableXlinkProcessing?m.return(b0(e,a,n)):(d=e.g.dash.xlinkFailGracefully,p=ac(a,e.g.retryParameters,d,n,e.j.networkingEngine),mo(e.O,p),S(m,p.promise,2))}return h=m.h,m.return(b0(e,h,n))})}
38function b0(e,t,n){var i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X,K,pe,te,Be,De,xe,Ae,_e,Se,Re,ge,we,Qe,Ft,pt,ht,Dt,Kt,No,xr,Wr;return C(function(gi){switch(gi.g){case 1:for(e.h&&e.h.l.clear(),i=[n],r=[],o=new Map,s=Ge(t,"Location"),u=g(s),a=u.next();!a.done;a=u.next())l=a.value,c=l.attributes.serviceLocation,(d=Wn(l))&&(p=Gt(i,[d])[0],c&&(e.h?Os(e.h,"Location",c,p):o.set(c,p)),r.push(p));if(e.h?(h=na(e.h,"Location",!0),0<h.length&&(i=e.A=h)):r.length&&(i=e.A=r),e.l.qe=t.attributes.id||"",e.l.Id=ve(t,"publishTime",Dr)||0,e.F=Ge(t,"PatchLocation"),m=Promise.resolve(),(y=Et(t,"ContentSteering"))&&e.j)for(v=y.attributes.defaultServiceLocation,e.h?(e.h.i=i,e.h.h=v):(e.h=new Us(e.j),e.h.configure(e.g),e.h.setManifestType("DASH"),e.h.i=i,e.h.h=v,(T=Wn(y))&&(ve(y,"queryBeforeStart",_a,!1)?m=ta(e.h,T):ta(e.h,T))),w=g(o.keys()),I=w.next();!I.done;I=w.next())M=I.value,R=o.get(M),Os(e.h,"Location",M,R);if(A=Ge(t,"BaseURL"),E=!1,e.h)for(D=g(A),P=D.next();!P.done;P=D.next())O=P.value,L=O.attributes.serviceLocation,U=Wn(O),L&&U&&(Os(e.h,"BaseURL",L,U),E=!0);if(e.W=null,E&&e.h||(_=A.map(Wn),e.W=Gt(i,_)),F=function(){return e.h&&E?na(e.h,"BaseURL"):e.W?e.W:[]},e.l.Ua=F,H=0,A&&A.length&&(H=ve(A[0],"availabilityTimeOffset",ou)||0),e.l.cb=H,e.I=ve(t,"minimumUpdatePeriod",Gi,-1),V=ve(t,"availabilityStartTime",Dr),X=ve(t,"timeShiftBufferDepth",Gi),K=e.g.dash.ignoreSuggestedPresentationDelay,pe=null,K||(pe=ve(t,"suggestedPresentationDelay",Gi)),te=e.g.dash.ignoreMaxSegmentDuration,Be=null,te||(Be=ve(t,"maxSegmentDuration",Gi)),De=t.attributes.type||"static",e.i&&e.i.presentationTimeline&&(e.T=e.i.presentationTimeline.U()&&De=="static"),e.l.type=De,e.i)for(xe=e.i.presentationTimeline,Ae=xe.pb(),_e=g(e.o.values()),Se=_e.next();!Se.done;Se=_e.next())Re=Se.value,Re.segmentIndex&&Re.segmentIndex.Pa(Ae);else ge=e.g.dash.ignoreMinBufferTime,we=0,ge||(we=ve(t,"minBufferTime",Gi)||0),Qe=0,Qe=pe!=null?Math.min(pe,X||1/0):0<e.g.defaultPresentationDelay?e.g.defaultPresentationDelay:Math.min(1.5*we,X||1/0),xe=new se(V,Qe,e.g.dash.autoCorrectDrift);return xe.Gc(De=="static"),xe.U()&&!isNaN(e.g.availabilityWindowOverride)&&(X=e.g.availabilityWindowOverride),X==null&&(X=1/0),xe.Fe(X),Ft=t.attributes.profiles||"",e.l.profiles=Ft.split(","),pt={Ob:De!="static",presentationTimeline:xe,pa:null,ha:null,ga:null,J:null,bandwidth:0,Nf:!1,cb:H,Wb:null,profiles:Ft.split(","),roles:null,vb:function(){return""}},S(gi,m,2);case 2:return e.L=0,ht=H0(e,pt,F,t,!1),Dt=ht.duration,Kt=ht.periods,(De!="static"||e.T)&&ht.Og||xe.bb(Dt||1/0),e.P&&e.fa&&xe.wh(e.$),xe.Vf(Be||1),e.P&&e.fa&&(No=pe??e.g.defaultPresentationDelay,xe.lg(No)),e.i?(e.i.periodCount=Kt.length,e.i.gapCount=e.L,S(gi,F0(e,Kt,!1),4)):S(gi,e.m.jf(Kt,pt.Ob),6);case 6:if(e.i={presentationTimeline:xe,variants:e.m.l,textStreams:e.m.Lf(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:wI(t),nextUrl:xI(t),periodCount:Kt.length,gapCount:e.L,isLowLatency:e.P,startTime:null},!xe.Lh()){gi.s(7);break}return xr=Ge(t,"UTCTiming"),S(gi,PI(e,F,xr),8);case 8:if(Wr=gi.h,!e.j)return gi.return();xe.xh(Wr);case 7:xe.me(),e.m&&!e.i.presentationTimeline.U()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.i),EI(e),q(gi)}})}function F0(e,t,n){var i;return C(function(r){if(r.g==1)return S(r,e.m.jf(t,!0,n),2);
38e.i.variants=e.m.l,i=e.m.Lf(),0<i.length&&(e.i.textStreams=i),e.i.imageStreams=e.m.i,e.j.filter(e.i),q(r)})}function yI(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U;return C(function(_){if(_.g==1){if(n=t.attributes.mpdId,i=ve(t,"originalPublishTime",Dr),!n||n!==e.l.qe||i!==e.l.Id)throw e.F=[],new k(1,4,4052);for(r=[],o=[],s=new Set,u=g(xg(t)),a=u.next();!a.done;a=u.next())if(l=a.value,c=ba(l.attributes.sel||""),d=c[c.length-1],p=Wn(l)||"",d.name==="MPD")if(d.ac==="mediaPresentationDuration"){h=Wn(l)||"";var F=Gi(h);if(F!=null){e.l.Wb=F;for(var H=g(e.u.values()),V=H.next();!V.done;V=H.next())V.value.Wb=F}}else if(d.ac==="type"){for(e.i.presentationTimeline.Gc(p=="static"),e.l.type=p,F=g(e.u.values()),H=F.next();!H.done;H=F.next())H.value.Ob=p=="dynamic";p=="static"&&(e.I=-1)}else d.ac==="publishTime"?e.l.Id=Dr(p)||0:d.ac===null&&l.tagName==="add"&&o.push(l);else if(d.name==="PatchLocation")Ag(e.F,l);else if(d.name==="Period")l.tagName==="add"?o.push(l):l.tagName==="remove"&&d.id&&SI(e,d.id);else if(d.name==="SegmentTemplate"){if(H=ba(l.attributes.sel||""),F=H[H.length-1],F.ac){H=B0(e,H),V=Wn(l)||"";for(var X=g(H),K=X.next();!K.done;K=X.next())K=e.u.get(K.value),Mg(K.J.ic,l.tagName,F.ac,V);F=H}else F=[];for(m=F,y=g(m),v=y.next();!v.done;v=y.next())T=v.value,s.add(T)}else if(d.name==="SegmentTimeline"||d.name==="S"){for(F=ba(l.attributes.sel||""),F=B0(e,F),H=g(F),V=H.next();!V.done;V=H.next())V=e.u.get(V.value),V=Ns(V,Hr,"SegmentTimeline"),X=Ge(V,"S"),Ag(X,l),V.children=X;for(w=F,I=g(w),M=I.next();!M.done;M=I.next())R=M.value,s.add(R)}for(A=g(s),E=A.next();!E.done;E=A.next())D=E.value,V0(e,D);for(P=g(o),O=P.next();!O.done;O=P.next())L=O.value,r.push.apply(r,W(TI(e,L)));return r.length?(e.i.periodCount+=r.length,e.i.gapCount=e.L,S(_,F0(e,r,!0),2)):_.s(2)}e.l.type=="static"&&(U=e.l.Wb,e.i.presentationTimeline.bb(U||1/0)),q(_)})}function TI(e,t){return H0(e,{Ob:e.l.type=="dynamic",presentationTimeline:e.i.presentationTimeline,pa:null,ha:null,ga:null,J:null,bandwidth:0,Nf:!1,cb:e.l.cb,profiles:e.l.profiles,Wb:e.l.Wb,roles:null,vb:function(){return""}},e.l.Ua,t,!0).periods}function SI(e,t){e.i.periodCount--;for(var n=g(e.u.keys()),i=n.next();!i.done;i=n.next())if(i=i.value,i.startsWith(t)){var r=e.u.get(i);Ns(r,Hr,"SegmentTimeline").children=[],V0(e,i),e.u.delete(i)}e.C=e.C.filter(function(o){return o!==t})}function B0(e,t){var n="",i="",r=-1,o="";t=g(t);for(var s=t.next();!s.done;s=t.next())s=s.value,s.name==="Period"?n=s.id:s.name==="AdaptationSet"?(i=s.id,s.position!==null&&(r=s.position)):s.name==="Representation"&&(o=s.id);if(t=[],o)t.push(n+","+o);else if(i)for(r=g(e.u.values()),e=r.next();!e.done;e=r.next())e=e.value,e.pa.id===n&&e.ga.id===i&&e.J.id&&t.push(n+","+e.J.id);else if(-1<r)for(i=g(e.u.values()),e=i.next();!e.done;e=i.next())e=e.value,e.pa.id===n&&e.ga.position===r&&e.J.id&&t.push(n+","+e.J.id);return t}function V0(e,t){var n=e.u.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.Pa(e.i.presentationTimeline.pb());try{var r=I0(n,function(o,s,u,a){return W0(e,o,s,u,a)},e.o,!0,e.g.dash.initialSegmentLimit,e.ka,n.J.aesKey,null,!0);i.createSegmentIndex=function(){return C(function(o){if(o.g==1)return i.segmentIndex?o.s(0):S(o,r.rc(),3);i.segmentIndex=o.h,q(o)})}}catch(o){if(t=n.J.contentType,t!=Ce&&t!="application"&&t!="image"||o.code!=4002)throw o}}function wI(e){var t=Et(e,"ServiceDescription");if(!t||(e=Et(t,"Latency"),t=Et(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function xI(e){if(e=Ge(e,"SupplementalProperty"),!e.length)return null;e=g(e);for(var t=e.next();!t.done;t=e.next())if(t=t.value,t.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016")return t.attributes.value;return null}function H0(e,t,n,i,r){var o=t.Wb;o||(o=ve(i,"mediaPresentationDuration",Gi),e.l.Wb=o);var s=0;e.i&&e.i.presentationTimeline&&e.T&&(s=e.i.presentationTimeline.Hb());var u=[],a=s;i=Ge(i,"Period");for(var l=0;l<i.length;l++){var c=i[l],d=i[l+1],p=ve(c,"start",Gi,a),h=c.attributes.id,m=ve(c,"duration",Gi);p=l==0&&p==0&&e.T?s:p;var y=null;if(d){var v=ve(d,"start",Gi);v!=null&&(y=v-p+s)}else o!=null&&(y=o-p+s);if(v=gw,y&&m&&Math.abs(y-m)>v&&y>m&&e.L++,y==null&&(y=m),!(e.M!==null&&h!==null&&p!==null&&p<e.M)||e.C.includes(h)||l+1==i.length){if(p!==null&&(e.M===null||p>e.M)&&(e.M=p),a=AI(e,t,n,{start:p,duration:y,node:c,ah:y==null||!d}),u.push(a),t.pa.id&&y&&e.ka.set(t.pa.id,y),y==null){a=null;break}a=p+y}}if(r)for(t=g(u),n=t.next();!n.done;n=t.next())n=n.value.id,e.C.includes(n)||e.C.push(n);else e.C=u.map(function(T){return T.id});return o!=null?{periods:u,duration:o+s,Og:!1}:{periods:u,duration:a,Og:!0}}function EI(e){var t=Array.from(e.B.keys()).filter(function(u){return!e.C.includes(u)});t=g(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;
38for(var i=!0,r=g(e.B.get(n)),o=r.next();!o.done;o=r.next()){o=o.value;var s=e.o.get(o);s&&(s.segmentIndex&&s.segmentIndex.getNumReferences()!=0?i=!1:(e.m&&e.m.Mg(s,n),e.o.delete(o)))}i&&e.B.delete(n)}}function AI(e,t,n,i){t.pa=Pf(e,i.node,null,n),t.ha=i,t.pa.cb=t.cb,t.pa.id||(t.pa.id="__shaka_period_"+i.start);var r=Ge(i.node,"EventStream");n=t.presentationTimeline.pb(),r=g(r);for(var o=r.next();!o.done;o=r.next())RI(e,i.start,i.duration,o.value,n);for(n=Ge(i.node,"SupplementalProperty"),n=g(n),r=n.next();!r.done;r=n.next())r=r.value,r.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(r=ua(e,r))&&(t.vb=r);if(n=Ge(i.node,"AdaptationSet").map(function(h,m){return G0(e,t,m,h)}).filter(jr),t.Ob){r=[],o=g(n);for(var s=o.next();!s.done;s=o.next()){s=g(s.value.tj);for(var u=s.next();!u.done;u=s.next())r.push(u.value)}if(r.length!=new Set(r).size)throw new k(2,4,4018)}for(r=new Map,o=g(n),s=o.next();!s.done;s=o.next())for(s=g(s.value.fi),u=s.next();!u.done;u=s.next()){var a=g(u.value);u=a.next().value,a=a.next().value,r.set(u,a)}if(r.size)for(o=null,s=g(n),u=s.next();!u.done;u=s.next()){u=u.value,a=[];for(var l=g(u.streams),c=l.next(),d={};!c.done;d={qg:void 0},c=l.next())if(d.qg=c.value,r.has(d.qg.originalId)){o||(o=Ge(i.node,"AdaptationSet").map(function(h,m){return G0(e,t,m,h)}).filter(jr)),c=g(o);for(var p=c.next();!p.done;p=c.next())(p=p.value.streams.find(function(h){return function(m){return m.originalId==h.qg.originalId}}
vendor: 5,354 bytes, line 38
38(d)))&&(p.dependencyStream=r.get(p.originalId),a.push(p))}a.length&&u.streams.push.apply(u.streams,W(a))}if(i=n.filter(function(h){return!h.xg}),n=n.filter(function(h){return h.xg}),!e.g.disableIFrames){for(n=g(n),r=n.next();!r.done;r=n.next())for(r=r.value,o=r.xg.split(" "),s=g(i),u=s.next();!u.done;u=s.next())if(u=u.value,o.includes(u.id))for(u=g(u.streams),a=u.next();!a.done;a=u.next())Yg(a.value,r.streams)}if(n=hc(e.g.disableAudio,i,"audio"),r=hc(e.g.disableVideo,i,"video"),o=hc(e.g.disableText,i,Ce),i=hc(e.g.disableThumbnails,i,"image"),r.length===0&&n.length===0)throw new k(2,4,4004);return{id:t.pa.id,audioStreams:n,videoStreams:r,textStreams:o,imageStreams:i}}function hc(e,t,n){return e||!t.length?[]:t.reduce(function(i,r){return r.contentType!=n||i.push.apply(i,W(r.streams)),i},[])}function G0(e,t,n,i){function r(U){var _=U.attributes["dvb:fontFamily"];U=U.attributes["dvb:url"],_&&U&&(U=Gt(t.ga.Ua(),[U],t.vb()),e.j.addFont(_,U[0]))}function o(U){switch(U){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function s(U){switch(U){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.ga=Pf(e,i,t.pa,null),t.ga.position=n;var u=!1;n=Ge(i,"Role");var a=n.map(function(U){return U.attributes.value}).filter(jr),l=void 0,c=t.ga.contentType==Ce;c&&(l="subtitle"),n=g(n);for(var d=n.next();!d.done;d=n.next()){d=d.value;var p=d.attributes.schemeIdUri;if(p==null||p=="urn:mpeg:dash:role:2011")switch(d=d.attributes.value,d){case"main":u=!0;break;case"caption":case"subtitle":l=d}}var h=Ge(i,"EssentialProperty");n=null;var m=!1;d=null,p=!1,h=g(h);for(var y=h.next();!y.done;y=h.next()){y=y.value;var v=y.attributes.schemeIdUri;if(v=="http://dashif.org/guidelines/trickmode")n=y.attributes.value;else if(v=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var T=s(parseInt(y.attributes.value,10));else if(v=="urn:mpeg:mpegB:cicp:ColourPrimaries")var w=o(parseInt(y.attributes.value,10));else v!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(v=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?m=!0:v=="urn:dvb:dash:fontdownload:2014"?r(y):v=="urn:mpeg:dash:urlparam:2014"&&(d=ua(e,y))||(p=!0))}if(p)return null;var I=null;for(p=Ge(i,"SupplementalProperty"),p=g(p),h=p.next();!h.done;h=p.next())h=h.value,y=h.attributes.schemeIdUri,y=="http://dashif.org/guidelines/last-segment-number"?I=parseInt(h.attributes.value,10)-1:y=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?T=s(parseInt(h.attributes.value,10)):y=="urn:mpeg:mpegB:cicp:ColourPrimaries"?w=o(parseInt(h.attributes.value,10)):y=="urn:dvb:dash:fontdownload:2014"?r(h):y=="urn:mpeg:dash:urlparam:2014"&&(d=ua(e,h));d&&(t.vb=d),d=Ge(i,"Accessibility");var M=new Map,R;for(d=g(d),p=d.next();!p.done;p=d.next())if(h=p.value,p=h.attributes.schemeIdUri,h=h.attributes.value,p!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(p!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)p=="urn:mpeg:dash:role:2011"?h!=null&&(a.push(h),h=="captions"&&(l="caption")):p=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(h=="1"?R="visually impaired":h=="2"&&(R="hard of hearing"));else if(p=1,h!=null)for(h=g(h.split(";")),y=h.next();!y.done;y=h.next()){v=y.value;var A=y=void 0;v.includes("=")?(v=v.split("="),y="svc"+v[0],A=v[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,A=v),M.set(y,Ye(A))}else M.set("svc1","und");else if(p=1,h!=null)for(h=h.split(";"),y=g(h),v=y.next();!v.done;v=y.next()){A=v.value;var E=v=void 0;A.includes("=")?(A=A.split("="),v=A[0].startsWith("CC")?A[0]:"CC"+A[0],E=A[1]||"und"):(v="CC"+p,h.length==2?p+=2:p++,E=A),M.set(v,Ye(E))}else M.set("CC1","und");d=Ge(i,"ContentProtection");var D=g0(d,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.ga.encrypted=0<d.length;var P=Ye(t.ga.language||"und"),O=t.ga.label,L=new Map;if(i=Ge(i,"Representation"),!e.g.ignoreSupplementalCodecs){for(d=[],p=g(i),h=p.next();!h.done;h=p.next())y=h.value,(h=tr(y,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(y=Pi(y),y.attributes.codecs=h.split(" ").join(","),y.attributes.id&&(y.attributes.supplementalId=y.attributes.id+"_supplementalCodecs"),d.push(y));i.push.apply(i,W(d))}if(d=i.map(function(U){var _=II(e,t,D,l,P,O,u,a,M,U,R,I);return _&&(_.hdr=_.hdr||T,_.colorGamut=_.colorGamut||w,_.fastSwitching=m,U=U.attributes.dependencyId)?(_.baseOriginalId=U,L.set(U,_),null):_}).filter(function(U){return!!U}),d.length==0&&L.size==0){if(n=t.ga.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||c||n)return null;throw new k(2,4,4003)}if(!t.ga.contentType||t.ga.contentType=="application")for(t.ga.contentType=q0(d[0].mimeType,d[0].codecs),c=g(d),p=c.next();!p.done;p=c.next())p.value.type=t.ga.contentType;for(c=t.ga.id||"__fake__"+e.oa++,p=g(d),h=p.next();!h.done;h=p.next()){for(h=h.value,y=g(D.drmInfos),v=y.next();!v.done;v=y.next())v=v.value,v.keyIds=v.keyIds&&h.keyIds?new Set([].concat(W(v.keyIds),W(h.keyIds))):v.keyIds||h.keyIds;h.groupId=c}return i=i.map(function(U){return U.attributes.supplementalId||U.attributes.id}).filter(jr),{id:c,contentType:t.ga.contentType,language:P,Sk:u,streams:d,drmInfos:D.drmInfos,xg:n,tj:i,fi:L}}function ua(e,t){if((t=xi(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&ve(t,"useMPDUrlQuery",_a,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.Z:n.split("&").map(function(i){if(i=="$querypart$")return e.Z;
38var r=/\$query:(.*?)\$/g.exec(i);if(r&&r.length==2){r=r[1];var o=new Bo(e.Z).get(r);if(o.length)return r+"="+o[0]}return i}).join("&")}}return null}function II(e,t,n,i,r,o,s,u,a,l,c,d){t.J=Pf(e,l,t.ga,null);var p=t.J.id;if(e.$=Math.min(e.$,t.J.cb),e.P=0<e.$,!DI(t.J))return null;var h=t.ha.start;t.bandwidth=ve(l,"bandwidth",nr)||0,t.roles=u;var m=Ge(l,"SupplementalProperty"),y=Ge(l,"EssentialProperty"),v=Ge(l,"ContentProtection");l=null;var T=y.find(function(H){return H.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(T||(T=m.find(function(H){return H.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(l=ua(e,T)),l&&(t.vb=l),T=t.J.contentType,l=T==Ce||T=="application",T=T=="image",v.length&&(t.ga.encrypted=!0);try{var w=void 0;if(n.ef){var I=t.J.Ua,M=t.vb,R=Gt(I(),[n.ef.Zi],M()),A=Ot(R,e.g.retryParameters);w={bitsKey:128,blockCipherMode:"CBC",iv:n.ef.iv,firstMediaSequenceNumber:0,fetchKey:function(){var H,V,X;return C(function(K){if(K.g==1)return S(K,Rf(e,A,6),2);if(K.g!=3){if(H=K.h,!H.data||H.data.byteLength!=16)throw new k(2,4,4049);return V={name:"AES-CBC"},X=w,S(K,j.crypto.subtle.importKey("raw",H.data,V,!0,["decrypt"]),3)}X.cryptoKey=K.h,w.fetchKey=void 0,q(K)})}}}if(t.J.aesKey=w,I=function(H,V,X,K){return W0(e,H,V,X,K)},t.J.dd)var E=q2(t,I,w);else if(t.J.Zb)E=Y2(t,e.o,w);else if(t.J.ic)E=I0(t,I,e.o,!!e.i,e.g.dash.initialSegmentLimit,e.ka,w,d,!1);else{var D=t.ha.duration||0,P=t.J.Ua,O=t.J.mimeType,L=t.J.codecs;E={rc:function(){var H=hl(h,D,P());return H.xb(function(V){V.mimeType=O,V.codecs=L}),Promise.resolve(H)}}}}catch(H){if((l||T)&&H.code==4002)return null;throw H}d=j2(v,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),d=new Set(d?[d]:[]),v=!1,m.some(function(H){return H.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&H.attributes.value=="JOC"})&&(v=!0),m=!1,l&&(m=u.includes("forced_subtitle")||u.includes("forced-subtitle"));var U;if(T&&((y=y.find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.attributes.schemeIdUri)}))&&(U=y.attributes.value),!U))return null;var _;l=t.J.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(_="PQ"),y=t.J.id?t.pa.id+","+t.J.id:"",e.F.length&&p&&e.u.set(t.pa.id+","+p,MI(t));var F=y&&e.o.has(y)?e.o.get(y):{id:e.oa++,originalId:t.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){F.segmentIndex&&(F.segmentIndex.release(),F.segmentIndex=null)},segmentIndex:null,mimeType:t.J.mimeType,codecs:l,frameRate:t.J.frameRate,pixelAspectRatio:t.J.pixelAspectRatio,bandwidth:t.bandwidth,width:t.J.width,height:t.J.height,kind:i,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:d,language:r,originalLanguage:t.ga.language,label:o,type:t.ga.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.J.emsgSchemeIdUris,roles:u,forced:m,channelsCount:t.J.se,audioSamplingRate:t.J.audioSamplingRate,spatialAudio:v,closedCaptions:a,hdr:_,colorGamut:void 0,videoLayout:void 0,tilesLayout:U,accessibilityPurpose:c,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Tt(t.J.mimeType,t.J.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return F.createSegmentIndex=function(){var H;return C(function(V){if(V.g==1)return F.segmentIndex?V.s(0):(H=F,S(V,E.rc(),3));H.segmentIndex=V.h,q(V)})},y&&t.Ob&&!e.o.has(y)&&(t=t.pa.id||"",e.B.has(t)||e.B.set(t,[]),e.o.set(y,F),e.B.get(t).push(y)),F}function MI(e){function t(n){return n?(n=uo(n),n.dd=null,n.Zb=null,n.ic=xd(n.ic),n):null}return e=uo(e),e.pa=t(e.pa),e.ga=t(e.ga),e.J=t(e.J),e.ha&&(e.ha=uo(e.ha),e.ha.node=null),e}function X0(e){var t,n;return C(function(i){switch(i.g){case 1:return t=0,ee(i,2),S(i,kf(e),4);case 4:t=i.h,fe(i,3);break;case 2:if(n=re(i),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),i.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return i.return();e.j.onManifestUpdated(),Df(e,t),q(i)}})}function Df(e,t){if(!(0>e.I)){var n=e.I;0<=e.g.updatePeriod&&(n=e.g.updatePeriod),e.K.da(Math.max(n-t,Gn(e.na)))}}function Pf(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,se:null,audioSamplingRate:null,cb:0,De:0,encrypted:!1},i=i||n.Ua;var r=t.attributes.id,o=t.attributes.supplementalId,s=Ge(t,"BaseURL"),u,a=!1;if(e.h)for(var l=g(s),c=l.next();!c.done;c=l.next()){var d=c.value;c=d.attributes.serviceLocation,d=Wn(d),c&&d&&(Os(e.h,r,c,d),a=!0)}a&&e.h||(u=s.map(Wn)),l=t.attributes.contentType||n.contentType,c=t.attributes.mimeType||n.mimeType,d=Sp([t.attributes.codecs||n.c
38odecs]).join(",");var p=ve(t,"frameRate",yw)||n.frameRate,h=t.attributes.sar||n.pixelAspectRatio,m=CI(Ge(t,"InbandEventStream"),n.emsgSchemeIdUris),y=Ge(t,"AudioChannelConfiguration");y=kI(y)||n.se;var v=ve(t,"audioSamplingRate",ln)||n.audioSamplingRate;l||(l=q0(c,d));var T=Et(t,"SegmentBase"),w=Et(t,"SegmentTemplate"),I=T&&ve(T,"availabilityTimeOffset",ou)||0,M=w&&ve(w,"availabilityTimeOffset",ou)||0,R=s&&s.length&&ve(s[0],"availabilityTimeOffset",ou)||0;I=n.cb+R+I+M,M=null,(R=Et(t,"SegmentSequenceProperties"))&&(R=Et(R,"SAP"))&&(M=ve(R,"cadence",mn)),R=t.attributes.label;var A=Ge(t,"Label");return A&&A.length&&(A=A[0],Ct(A)&&(R=Ct(A))),{Ua:function(){return Gt(i(),s.length?e.h&&a?na(e.h,r):u||[]:[])},dd:T||n.dd,Zb:Et(t,"SegmentList")||n.Zb,ic:w||n.ic,width:ve(t,"width",ln)||n.width,height:ve(t,"height",ln)||n.height,contentType:l,mimeType:c,codecs:d,frameRate:p,pixelAspectRatio:h,emsgSchemeIdUris:m,id:o||r,originalId:r,language:t.attributes.lang,se:y,audioSamplingRate:v,cb:I,he:null,De:M||n.De,label:R||null,encrypted:!1}}function CI(e,t){t=t.slice(),e=g(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function kI(e){e=g(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var i=0,r=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(r=i=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&0<t&&t<n.length)return n[t]}}return null}function DI(e){var t=e.dd?1:0;return t+=e.Zb?1:0,t+=e.ic?1:0,t==0?e.contentType==Ce||e.contentType=="application":(t!=1&&(e.dd&&(e.Zb=null),e.ic=null),!0)}function K0(e,t,n,i){var r,o,s,u,a,l,c;return C(function(d){if(d.g==1)return r=[In(n)],o=Gt(t(),r),s=Ot(o,e.g.retryParameters),s.method=i,u=e.j.networkingEngine.request(4,s,{isPreload:e.ea()}),mo(e.O,u),S(d,u.promise,2);if(a=d.h,i=="HEAD"){if(!a.headers||!a.headers.date)return d.return(0);l=a.headers.date}else l=at(a.data);return c=Date.parse(l),isNaN(c)?d.return(0):d.return(c-Date.now())})}function PI(e,t,n){var i,r,o,s,u,a,l,c;return C(function(d){switch(d.g){case 1:i=n.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),r=e.g.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),o=g(i),s=o.next();case 2:if(s.done){d.s(4);break}switch(u=s.value,ee(d,5),a=u.scheme,l=u.value,a){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return d.s(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return d.s(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return c=Date.parse(l),d.return(isNaN(c)?0:c-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Pe("NTP UTCTiming scheme is not supported");break;default:Pe("Unrecognized scheme in UTCTiming element",a)}d.s(9);break;case 7:return S(d,K0(e,t,l,"HEAD"),10);case 10:return d.return(d.h);case 8:return S(d,K0(e,t,l,"GET"),11);case 11:return d.return(d.h);case 9:fe(d,3);break;case 5:re(d);case 3:s=o.next(),d.s(2);break;case 4:return Pe("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),d.return(0)}})}function RI(e,t,n,i,r){var o=i.attributes.schemeIdUri||"",s=i.attributes.value||"",u=ve(i,"timescale",ln)||1,a=ve(i,"presentationTimeOffset",ln)||0;i=g(Ge(i,"Event"));for(var l=i.next();!l.done;l=i.next()){l=l.value;var c=ve(l,"presentationTime",ln)||0,d=ve(l,"duration",ln)||0;c=Math.max((c-a)/u+t,t),d=c+d/u,n!=null&&(c=Math.min(c,t+n),d=Math.min(d,t+n)),d<r||(l={schemeIdUri:o,value:s,startTime:c,endTime:d,id:l.attributes.id||"",timescale:u,eventElement:Cg(l),eventNode:xd(l)},e.j.onTimelineRegionAdded(l))}}function W0(e,t,n,i,r){var o,s,u,a;return C(function(l){return l.g==1?(o=Ai,s=r?0:1,u=Ru(t,n,i,e.g.retryParameters),S(l,Rf(e,u,o,{type:s}),2)):(a=l.h,l.return(a.data))})}function q0(e,t){return t=Tt(e,t),ns(t)?Ce:e.split("/")[0]}
38function Rf(e,t,n,i){return i||(i={}),i.isPreload=e.ea(),t=e.j.networkingEngine.request(n,t,i),mo(e.O,t),t.promise}function LI(e){var t=e.l.Id;if(!e.l.qe||!t||!e.F.length)return[];var n=Date.now()/1e3,i=e.F.filter(function(r){return r=ln(r.attributes.ttl),!r||t+r>n}).map(Wn).filter(jr);return i.length?Gt(e.A,i):[]}Y("shaka.dash.DashParser",fc),yo("application/dash+xml",function(){return new fc}),yo("video/vnd.mpeg.dash.mpd",function(){return new fc});function gc(){}Y("shaka.dependencies",gc),gc.has=function(e){return Lf.has(e)},gc.add=function(e,t){if(!Y0[e])throw Error(e+" is not supported");e==z0?Ue("mux.js","mux.js is no longer used in Shaka Player."):Lf.set(e,function(){return t})};var z0="muxjs",Y0={Tk:z0,ISOBoxer:"ISOBoxer"};gc.Allowed=Y0;var Lf=new Map([["ISOBoxer",function(){return j.ISOBoxer}]]);function Q0(e,t,n){this.type=e,this.ca=t,this.segments=n||null}function mc(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=i===void 0?null:i}mc.prototype.toString=function(e){function t(r){return r.name+"="+(isNaN(Number(r.value))?'"'+r.value+'"':r.value)}var n="#"+this.name,i=this.attributes?this.attributes.filter(function(r){return e?!e.has(r.name):!0}).map(t):[];return this.value&&i.unshift(this.value),0<i.length&&(n+=":"+i.join(",")),n};function $0(e,t){return t?e.toString():(t=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function bs(e,t){return e=e.attributes.filter(function(n){return n.name==t}),e.length?e[0]:null}function ne(e,t,n){return(e=bs(e,t))?e.value:n||null}function Xe(e,t){if(e=bs(e,t),!e)throw new k(2,4,4023,t);return e.value}function J0(e,t,n){n=n===void 0?[]:n,this.ca=t,this.g=e,this.Jb=n}function vc(e,t){this.name=e,this.value=t}function li(e,t){return e.filter(function(n){return n.name==t})}function Z0(e,t){return e.filter(function(n){return Xe(n,"TYPE")==t})}function Yt(e,t){e=g(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function Fs(e,t,n){return n=n===void 0?0:n,(e=Yt(e,t))?Number(e.value):n}function Kr(e,t,n){return t?e1(e,[t],n):[]}function e1(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(r){return t1(r,n)})),Gt(e,i)}function t1(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=g(n);for(var i=n.next();!i.done;i=n.next()){i=i.value;var r=i.slice(2,i.length-1),o=t.get(r);if(o)e=e.replace(i,o);else throw new k(2,4,4039,r)}}return e}function NI(){this.g=0}function Nf(e,t){t=at(t),t=t.replace(/\r\n|\r(?=[^\n]|$)/gm,`
39`).trim();var n=t.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new k(2,4,4015);t=0;for(var i=!0,r=g(n),o=r.next();!o.done;o=r.next())if(o=o.value,/^#(?!EXT)/m.test(o)||i)i=!1;else if(o=jf(e,o),--e.g,n1.includes(o.name)){t=1;break}else o.name=="EXT-X-STREAM-INF"&&(i=!0);for(r=[],i=!0,o=0;o<n.length;o++){var s=n[o],u=n[o+1];if(/^#(?!EXT)/m.test(s)||i)i=!1;else{if(s=jf(e,s),jI.includes(s.name)){if(t!=1)throw new k(2,4,4017);s=n.splice(o,n.length-o),n=[],i=[],o=[],u=null,s=g(s);for(var a=s.next();!a.done;a=s.next())a=a.value,/^(#EXT)/.test(a)?(a=jf(e,a),n1.includes(a.name)?r.push(a):a.name=="EXT-X-MAP"?u=a:a.name=="EXT-X-PART"?o.push(a):a.name=="EXT-X-PRELOAD-HINT"?ne(a,"TYPE")=="PART"?o.push(a):ne(a,"TYPE")=="MAP"&&(a.name="EXT-X-MAP",u=a):i.push(a)):/^#(?!EXT)/m.test(a)||(a=a.trim(),u&&i.push(u),n.push(new J0(a,i,o)),i=[],o=[]);return o.length&&(u&&i.push(u),n.push(new J0("",i,o))),new Q0(t,r,n)}r.push(s),s.name=="EXT-X-STREAM-INF"&&(s.attributes.push(new vc("URI",u)),i=!0)}}return new Q0(t,r)}function jf(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new k(2,4,4016,t);t=n[1];var i=n[2];n=[];var r;if(i){i=new Qo(i);var o;(o=oo(i,/^([^,=]+)(?:,|$)/g))&&(r=o[1]);for(var s=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;o=oo(i,s);)n.push(new vc(o[1],o[2]||o[3])),$o(i)}return new mc(e,t,n,r)}var n1="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),jI="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function i1(){}function r1(e,t){try{var n=yc(e);return os({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(i){return go(i)}}function yc(e){var t=e.split(":");if(2>t.length||t[0]!="data")throw new k(2,1,1004,e);if(t=t.slice(1).join(":").split(","),2>t.length)throw new k(2,1,1004,e);var n=t[0];e=j.decodeURIComponent(t.slice(1).join(",")),t=n.split(";"),n=t[0];var i=!1;1<t.length&&t[t.length-1]=="base64"&&(i=!0,t.pop());var r;
39return i?r=oi(e):r=Si(e),{data:r,contentType:n}}Y("shaka.net.DataUriPlugin",i1),i1.parse=r1,ur("data",r1);function Tc(){var e=this;this.g=this.h=null,this.F=1,this.A=new Map,this.I=new Map,this.M=new Map,this.M.set("video",new Map),this.M.set("audio",new Map),this.M.set(Ce,new Map),this.M.set("image",new Map),this.Sb=new Map().set("com.apple.streamingkeydelivery",function(t,n,i){return rM(e,t,n,i)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=Xe(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=Xe(t,"URI"),n=yc(n.split("?")[0]),n=he(n.data),i=kr("com.widevine.alpha",i,[{initDataType:"cenc",initData:n}]),(t=ne(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}).set("com.microsoft.playready",function(t){var n=Xe(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),t=Xe(t,"URI"),t=yc(t.split("?")[0]),t=he(t.data),n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),n=Za(t,n,new Set,0),i=kr("com.microsoft.playready",i,[{initDataType:"cenc",initData:n}]),(t=ao(["<PLAYREADY>",Zi(t),"</PLAYREADY>"].join(`
40`)))&&(i.licenseServerUri=sc(t)),i=Promise.resolve(i)}else i=Promise.resolve(null);return i}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=Xe(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";n=="SAMPLE-AES"&&(i="cbcs"),n=Xe(t,"URI"),n=yc(n.split("?")[0]),n=he(n.data),i=kr("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:n}]),(t=ne(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}),this.Oa=new Set,this.i=new Map,this.l=null,this.C="",this.Ga=new NI,this.K=-1,this.ea=1/0,this.$=this.Ub=this.Na=!1,this.B=new ke(function(){if(e.W&&!e.g.continueLoadingWhenPaused&&(e.T.Ka(e.W,"timeupdate"),e.W.paused)){e.T.qa(e.W,"timeupdate",function(){return I1(e)});return}I1(e)}),this.Ea=Ac,this.m=null,this.Ma=0,this.o=1/0,this.Fa=this.Aa=this.P=0,this.Z=new ss,this.G=new Map,this.H=new Map,this.sa=new Map,this.ka=new Map,this.L=new Map,this.na=new Map,this.oa=new Map,this.Tb=this.fa=!1,this.Pb=new hn(5),this.j=null,this.O=!0,this.za=new Set,this.T=new Le,this.u=this.W=null,this.Qb=function(){return!1}}f=Tc.prototype,f.configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&0<=e.updatePeriod;this.g=e,t&&(this.Qb=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.U()&&this.B.sb()},f.start=function(e,t){var n=this,i;return C(function(r){return r.g==1?(n.h=t,n.fa=t.isLowLatencyMode(),S(r,Hf(n,[e]).promise,2)):r.g!=3?(i=r.h,n.C=i.uri,S(r,_I(n,i.data),3)):r.return(n.m)})},f.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.Z&&(e.push(this.Z.destroy()),this.Z=null),this.g=this.h=null,this.Oa.clear(),this.m=null,this.i.clear(),this.I.clear(),this.H.clear(),this.A.clear(),this.sa.clear(),this.ka.clear(),this.L.clear(),this.na.clear(),this.oa.clear(),this.za.clear(),this.j&&this.j.destroy(),this.T&&(this.T.release(),this.T=null),Promise.all(e)},f.update=function(){var e=this,t,n,i,r,o,s,u,a,l,c,d,p;return C(function(h){if(h.g==1){if(!Tn(e))return h.return();for(t=[],n=Array.from(e.i.values()),e.o=1/0,e.m.gapCount=0,i=n.filter(function(m){return m.stream.segmentIndex}),r=g(i),o=r.next();!o.done;o=r.next())s=o.value,t.push(UI(e,s));return S(h,Promise.all(t),2)}for(p1(e,i.map(function(m){return m.stream})),u=i.some(function(m){return m.rd==0}),i.length&&!u&&(a=lM,xc(e,a.Qh),l=i.map(function(m){return m.Vb}),e.l.bb(Math.min.apply(Math,W(l))),e.h.updateDuration()),u&&Of(e),c=g(i),d=c.next();!d.done;d=c.next())p=d.value,p.stream.isAudioMuxedInVideo||!p.stream.segmentIndex||Ni(p.stream.segmentIndex)||e.h.disableStream(p.stream);q(h)})};function Uf(e,t){return Tn(e)?e.M.get(t.type):t.ne}function UI(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X,K,pe,te,Be;return C(function(De){switch(De.g){case 1:if(t.stream.isAudioMuxedInVideo)return De.return();for(n=[],i=g(t.N()),r=i.next();!r.done;r=i.next())o=r.value,s=new vt(o),u=s.g,t.Wd&&(0<=t.Bb&&u.add("_HLS_msn",String(t.Bb)),0<=t.Cb&&u.add("_HLS_part",String(t.Cb))),t.Xd&&u.add("_HLS_skip","YES"),og(u)&&eo(s,Fo(u.toString())),n.push(s.toString());return ee(De,2),S(De,Hf(e,n,!0).promise,4);case 4:a=De.h,fe(De,3);break;case 2:throw l=re(De),e.h&&e.h.disableStream(t.stream),l;case 3:if(!t.stream.segmentIndex)return De.return();if(c=Nf(e.Ga,a.data),c.type!=1)throw new k(2,4,4017);return d=a.uri,d==a.originalUri||t.N().includes(d)||t.ye.push(d),p=li(c.ca,"EXT-X-DEFINE"),h=_f(e,p,d),m=t.stream,y=Uf(e,t),S(De,m1(e,c,m.mimeType,t.N,h),5);case 5:for(v=De.h,T=v.keyIds,w=v.drmInfos,I=v.encrypted,M=v.Dg,m.encrypted||!I||M||(m.encrypted=!0),R=function(xe,Ae){return xe.size===Ae.size&&[].concat(W(xe)).every(function(_e){return Ae.has(_e)})}
40,R(m.keyIds,T)||(m.keyIds=T,m.drmInfos=w,e.h.newDrmInfo(m)),A=x1(e,c,y,h,t.N,t.type),E=A.segments,(D=A.bandwidth)&&(m.bandwidth=D),P=ml(m),O=g(E),L=O.next();!L.done;L=O.next())U=L.value,U.Y&&(U.Y.Wc=P);m.segmentIndex.Bd(E,e.l.pb()),E.length&&(_=Fs(c.ca,"EXT-X-MEDIA-SEQUENCE",0),H=(F=Yt(c.ca,"EXT-X-SKIP"))?Number(ne(F,"SKIPPED-SEGMENTS")):0,V=h1(_,E),X=V.Bb,K=V.Cb,t.Bb=X+H,t.Cb=K,pe=y.get(_),m.segmentIndex.Pa(pe)),(te=Ni(m.segmentIndex))&&(t.Bc=te.startTime,Be=E[E.length-1],t.Vb=Be.endTime),Yt(c.ca,"EXT-X-ENDLIST")&&(t.rd=!0),Ff(e,c),Bf(e,c.ca,m.type,h,t.N),q(De)}})}f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(){},f.banLocation=function(e){this.j&&this.j.banLocation(e)},f.setMediaElement=function(e){this.W=e};function o1(e,t,n){n=n===void 0?!1:n;for(var i=e.K==-1,r=g(t),o=r.next();!o.done;o=r.next()){o=o.value;var s=o.stream.segmentIndex,u=Uf(e,o);if(s=Ni(s)){u=g(u);for(var a=u.next();!a.done;a=u.next()){a=g(a.value);var l=a.next().value;if(a.next().value==s.startTime){i&&(e.K=Math.max(e.K,l)),o.tf=l;break}}}}if(!(0>e.K))for(t=g(t),i=t.next();!i.done;i=t.next())i=i.value,(aa(e,i.type)||n)&&(r=i.stream.segmentIndex)&&(o=e.K-i.tf,0<o&&(r.g.splice(0,o),r=Ni(r))&&(r=-r.startTime,i.stream.segmentIndex.offset(r),s1(e,i,r)))}function OI(e,t){if(e.ea==1/0){t=g(t);for(var n=t.next();!n.done;n=t.next())n=Ni(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.ea=Math.min(e.ea,n.h))}if(t=e.ea,t!=1/0){n=g(e.i.values());for(var i=n.next();!i.done;i=n.next())if(i=i.value,!aa(e,i.type)){var r=i.stream.segmentIndex;if(r!=null){var o=Ni(r);if(o)if(o.h==null)En("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.N(),"Expect AV sync issues!");else for(s1(e,i,o.h-t-o.startTime),i=g(r),r=i.next();!r.done;r=i.next())r.value.sg(t)}}}}function s1(e,t,n){if(!(.001>Math.abs(n))){t.Bc+=n,t.Vb+=n,e=Uf(e,t);for(var i=g(e),r=i.next();!r.done;r=i.next()){var o=g(r.value);r=o.next().value,o=o.next().value,e.set(r,o+n)}t.N()}}function _I(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X,K,pe,te,Be,De,xe,Ae,_e,Se,Re;return C(function(ge){switch(ge.g){case 1:return n=Mt,i=Nf(e.Ga,t),r=li(i.ca,"EXT-X-DEFINE"),o=[],s=[],u=[],e.l=new se(null,0),e.l.Gc(!0),a=function(){return[e.C]},l=null,c=new Map,i.type==1?(e.O=!1,X=li(i.ca,"EXT-X-DEFINE"),c=_f(e,X,e.C),l=n.la,K="",pe=new Map,S(ge,f1(e,e.F++,c,i,a,"",l,K,!0,"Media Playlist",null,pe,null,!1,null,!1),7)):(FI(e,r),d=li(i.ca,"EXT-X-MEDIA"),p=li(i.ca,"EXT-X-STREAM-INF"),h=li(i.ca,"EXT-X-IMAGE-STREAM-INF"),m=li(i.ca,"EXT-X-I-FRAME-STREAM-INF"),y=li(i.ca,"EXT-X-SESSION-KEY"),v=li(i.ca,"EXT-X-SESSION-DATA"),T=li(i.ca,"EXT-X-CONTENT-STEERING"),VI(e,v),S(ge,HI(e,T),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(w=[],I=g(p),M=I.next(),R={};!M.done;R={Hh:void 0},M=I.next())A=M.value,(E=ne(A,"SUPPLEMENTAL-CODECS"))&&(R.Hh=E.split(/\s*,\s*/).map(function(we){return we.split("/")[0]}),D=A.attributes.map(function(we){return function(Qe){var Ft=Qe.name,pt=Qe.value;return Ft=="CODECS"&&(pt=we.Hh.join(","),Qe=Qe.value.split(","),1<Qe.length&&(Qe=Mn("audio",Qe))&&(pt+=","+Qe)),new vc(Ft,pt)}}(R)),w.push(new mc(A.id,A.name,D,null)));for(p.push.apply(p,W(w)),P=[],O=g(m),L=O.next(),U={};!L.done;U={Ih:void 0},L=O.next())_=L.value,(F=ne(_,"SUPPLEMENTAL-CODECS"))&&(U.Ih=F.split(/\s*,\s*/).map(function(we){return we.split("/")[0]}),H=_.attributes.map(function(we){return function(Qe){var Ft=Qe.name;return Qe=Qe.value,Ft=="CODECS"&&(Qe=we.Ih.join(",")),new vc(Ft,Qe)}}(U)),P.push(new mc(_.id,_.name,H,null)));m.push.apply(m,W(P))}return BI(e,p),QI(e,d),V=WI(e,m),S(ge,qI(e,p,y,d,a,e.A,V),5);case 5:return o=ge.h,s=GI(e,d),S(ge,XI(e,h,m),6);case 6:u=ge.h,ge.s(3);break;case 7:te=ge.h,e.i.set(e.C,te),te.stream&&(Be=ml(te.stream),te.stream.segmentIndex.xb(function(we){we.Y&&(we.Y.Wc=Be)})),l=te.stream.type,o.push({id:0,language:Ye(K||"und"),disabledUntilTime:0,primary:!0,audio:l=="audio"?te.stream:null,video:l=="video"?te.stream:null,bandwidth:te.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new k(2,7,7001);if(y1(e,i),i.type==1&&(Tn(e)&&(T1(e,i),De=e.o,e.B.da(De)),xe=Array.from(e.i.values()),bf(e,xe),Of(e),Bf(e,i.ca,l,c,a)),e.m={presentationTimeline:e.l,variants:o,textStreams:s,imageStreams:u,offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.u},e.$||!e.g.hls.disableCodecGuessing){ge.s(8);break}for(Ae=[],_e=g(e.m.variants),Se=_e.next();!Se.done;Se=_e.next())Re=Se.value,Re.audio&&Re.audio.codecs===""&&Ae.push(Re.audio.createSegmentIndex()),Re.video&&Re.video.codecs===""&&Ae.push(Re.video.createSegmentIndex());return S(ge,Promise.all(Ae),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),q(ge)}})}function bI(e,t){var n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w;return C(function(I){if(I.g==1)return n=Tp(e.g.hls.mediaPlaylistFullMimeType),t.length?(i=E1(e,t),r=i.segment,o=i.segmentIndex,s=r.N(),u=s[0],a=new vt(u),l=a.ab.split(".").pop(),(c=Gf.get(l))?I.return(Tp(c)):S(I,Promise.all([u1(e,r.Y,0),u1(e,r,o)]),2)):I.return(n);if(d=I.h,p=d[1].mimeType,h=d[0].data,m=d[1].data,y="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),v=["audio/mp4","video/mp4","video/iso.segment"],hs(he(m))){var M=m,R=e.g.disableAudio,A=e.g.disableVideo,E=e.g.disableText,D=he(M),P=new ot().parse(D),O=P.od();D=P.Mf();var L=[],U=!1,_=!1;if(!R)switch(O.audio){case"aac":case"aac-loas":P.fb().length&&(L.push("mp4a.40.2"),U=!0);break;case"mp3":P.fb().length&&(L.push("mp4a.40.34"),U=!0);break;case"ac3":P.fb().length&&(L.push("ac-3"),U=!0);break;case"ec3":P.fb().length&&(L.push("ec-3"),U=!0);break;case"opus":P.fb().length&&(L.push("opus"),U=!0)}if(!A)switch(O.video){case"avc":D.codec?L.push(D.codec):L.push("avc1.42E01E"),_=!0;break;case"hvc":D.codec?L.push(D.codec):L.push("hvc1.1.6.L93.90"),_=!0;break;case"av1":L.push("av01.0.01M.08"),_=!0}if(L.length){if(R=U&&!_,A=new Map,_&&!E){for(E=new Kn("video/mp2t"),E.i(M),M=g(E.j()),_=M.next();!_.done;_=M.next())_=_.value,A.set(_,_);E.g()}D={type:R?"audio":"video",mimeType:"video/mp2t",codecs:L.join(", "),language:null,height:D.height,width:D.width,channelCount:null,sampleRate:null,closedCaptions:A,Od:null,colorGamut:null,frameRate:D.frameRate}}else D=null;if(T=D)return I.return(T)}else if((r.Y||y.includes(l)||v.includes(p))&&(w=lE(h,m,e.g.disableText)))return I.return(w);return p?I.return(Tp(p)):I.return(n)})}function u1(e,t,n){var i,r,o,s,u,a;return C(function(l){switch(l.g){case 1:return t?(i=Ai,r=Ru(t.N(),t.uc(),t.tc(),e.g.retryParameters),o=t instanceof oe?1:0,S(l,wr(e,r,i,{type:o}).promise,2)):l.return({mimeType:null,data:null});case 2:if(s=l.h,u=s.data,!t.aesKey){l.s(3);break}return S(l,wp(u,t.aesKey,n),4);case 4:u=l.h;case 3:return t instanceof oe?t.Ld(u,!0):t.Ld(u),(a=s.headers["content-type"])&&(a=a.split(";")[0].toLowerCase()),l.return({mimeType:a,data:u})}})}function Of(e){if(Tn(e)){if(e.Ea==Ic){for(var t=1/0,n=1/0,i=g(e.i.values()),r=i.next();!r.done;r=i.next())r=r.value,r.stream.segmentIndex&&r.stream.type!="text"&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.Vb),n=Math.min(n,r.Bc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Fe(t)}}else e.l.bb(d1(e));if(!e.l.u)for(t=g(e.i.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=Ni(n.stream.segmentIndex))&&n.h&&e.l.yh(n.h);e.l.me()}function FI(e,t){var n=new vt(e.C).g;t=g(t);for(var i=t.next();!i.done;i=t.next()){var r=i.value;i=ne(r,"NAME");var o=ne(r,"VALUE");r=ne(r,"QUERYPARAM"),i&&o&&(e.A.has(i)||e.A.set(i,o)),r&&(i=n.get(r)[0])&&!e.A.has(i)&&e.A.set(r,i)}}function _f(e,t,n){n=new vt(n).g;var i=new Map;t=g(t);for(var r=t.next();!r.done;r=t.next()){var o=r.value,s=ne(o,"NAME"),u=ne(o,"VALUE");r=ne(o,"QUERYPARAM"),o=ne(o,"IMPORT"),s&&u&&(i.has(s)||i.set(s,u)),r&&(s=n.get(r)[0])&&!i.has(s)&&i.set(r,s),o&&(r=e.A.get(o))&&i.set(o,r)}return i}
40function BI(e,t){t=g(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=ne(i,"AUDIO");n=ne(i,"VIDEO");var o=ne(i,"SUBTITLES");if(i=a1(e,i),o){var s=Mn(Ce,i);e.H.set(o,s),wi(i,s)}r&&(o=Mn("audio",i),o||(o=e.g.hls.defaultAudioCodec),e.H.set(r,o)),n&&(r=Mn("video",i),r||(r=e.g.hls.defaultVideoCodec),e.H.set(n,r))}}function VI(e,t){t=g(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=ne(i,"DATA-ID");n=ne(i,"URI");var o=ne(i,"LANGUAGE");i=ne(i,"VALUE"),r=new Map().set("id",r),n&&r.set("uri",Kr([e.C],n,e.A)[0]),o&&r.set("language",o),i&&r.set("value",i),n=new z("sessiondata",r),e.h&&e.h.onEvent(n)}}function HI(e,t){var n,i,r,o,s,u;return C(function(a){if(!e.h||!e.g)return a.return();for(i=g(t),r=i.next();!r.done;r=i.next())if(o=r.value,s=ne(o,"PATHWAY-ID"),u=ne(o,"SERVER-URI"),s&&u){e.j=new Us(e.h),e.j.configure(e.g),e.j.i=[e.C],e.j.setManifestType("HLS"),e.j.h=s,n=ta(e.j,u);break}return S(a,n,0)})}function GI(e,t){var n=Z0(t,"SUBTITLES");t=n.map(function(s){if(e.g.disableText)return null;try{return l1(e,[s],new Map).stream}catch(u){if(e.g.hls.ignoreTextStreamFailures)return null;throw u}}),n=g(n);for(var i=n.next();!i.done;i=n.next()){var r=Xe(i.value,"GROUP-ID");if((i=e.H.get(r))&&(r=e.I.get(r))){r=g(r);for(var o=r.next();!o.done;o=r.next())o=o.value,o.stream.codecs=i,o.stream.mimeType=Vf(Ce,i)||wc(Ce),Po(o.stream)}}return t.filter(function(s){return s})}function Po(e){var t=new Set([Tt(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.xb(function(n){n.mimeType&&t.add(Tt(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function XI(e,t,n){var i,r;return C(function(o){return o.g==1?(i=t.map(function(s){var u,a;return C(function(l){if(l.g==1)return e.g.disableThumbnails?l.return(null):(ee(l,2),S(l,$I(e,s),4));if(l.g!=2)return u=l.h,l.return(u.stream);if(a=re(l),e.g.hls.ignoreImageStreamFailures)return l.return(null);throw a})}).concat(n.map(function(s){if(e.g.disableThumbnails)return null;try{var u=c1(e,s);return u.stream.type!=="image"?null:u.stream}catch(a){if(e.g.hls.ignoreImageStreamFailures)return null;throw a}})),S(o,Promise.all(i),2)):(r=o.h,o.return(r.filter(function(s){return s})))})}function KI(e,t,n){t=t.filter(function(u){var a=ne(u,"URI")||"";return u=ne(u,"TYPE"),u!="SUBTITLES"&&(a!=""||u=="AUDIO")});var i={};t=g(t);for(var r=t.next();!r.done;r=t.next()){r=r.value;var o=$0(r,!e.j);i[o]?i[o].push(r):i[o]=[r]}for(var s in i)l1(e,i[s],n,!1)}function WI(e,t){return t.map(function(n){return n=c1(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function qI(e,t,n,i,r,o,s){var u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X,K,pe,te,Be,De,xe,Ae,_e,Se;return C(function(Re){switch(Re.g){case 1:if(u=[],a=new Set,e.g.ignoreDrmInfo||!(0<n.length)){Re.s(2);break}l=g(n),c=l.next();case 3:if(c.done){Re.s(2);break}if(d=c.value,p=Xe(d,"METHOD"),h=ne(d,"KEYFORMAT")||"identity",m=null,p=="NONE"){Re.s(4);break}if(Ec(p)){y=Kr(r(),Xe(d,"URI"),o),v=y.sort().join(""),e.L.has(v)||(T=Ot(y,e.g.retryParameters),w=wr(e,T,6).promise,e.L.set(v,w)),Re.s(4);break}if(h=="identity")return S(Re,M1(e,d,"",r,null,o),12);if(I=e.Sb.get(h),!I){M=null,Re.s(10);break}return S(Re,I(d,"",null),11);case 11:M=Re.h;case 10:m=M,Re.s(6);break;case 12:m=Re.h;case 6:if(m){if(m.keyIds)for(R=g(m.keyIds),A=R.next();!A.done;A=R.next())E=A.value,a.add(E);u.push(m)}case 4:c=l.next(),Re.s(3);break;case 2:for(D={},P=g(t),O=P.next();!O.done;O=P.next())L=O.value,U=$0(L,!e.j),D[U]?D[U].push(L):D[U]=[L];_=[];for(F in D)H=D[F],V=H[0],X=ne(V,"FRAME-RATE"),K=Number(ne(V,"AVERAGE-BANDWIDTH"))||Number(Xe(V,"BANDWIDTH")),pe=ne(V,"RESOLUTION"),te=g(pe?pe.split("x"):[null,null]),Be=te.next().value,De=te.next().value,xe=ne(V,"VIDEO-RANGE"),(Ae=ne(V,"REQ-VIDEO-LAYOUT"))&&Ae.includes(",")&&(_e=Ae.split(",").filter(function(ge){return ge=="CH-STEREO"||ge=="CH-MONO"}),Ae=_e[0]),Ae=Ae||"CH-MONO",Se=zI(e,H,i),_.push.apply(_,W(YI(e,Se.audio,Se.video,K,Be,De,X,xe,Ae,u,a,s)));return Re.return(_.filter(function(ge){return ge!=null}))}})}function zI(e,t,n){for(var i={audio:[],video:[]},r=new Map,o=[],s=!1,u=!1,a=g(t),l=a.next();!l.done;l=a.next()){var c=l.value;l=ne(c,"AUDIO");var d=ne(c,"VIDEO"),p=l||d;p&&(o.includes(p)||o.push(p),(c=ne(c,"PATHWAY-ID"))&&r.set(p,c),l?s=!0:d&&(u=!0))}o.length&&n.length&&(n=n.filter(function(m){return o.includes(Xe(m,"GROUP-ID"))}),KI(e,n,r)),n=(r=o.sort().join(","))&&e.I.has(r)?e.I.get(r):[],s?i.audio.push.apply(i.audio,W(n)):u&&i.video.push.apply(i.video,W(n)),s=!1;var h=t.map(function(m){return Xe(m,"URI")});return l=i.audio.find(function(m){return m&&m.N().find(function(y){return h.includes(y)})}
40),u=a1(e,t[0]),n=Mn("video",u),(a=Mn("audio",u))&&!n?(l="audio",s=0<i.audio.length):!i.audio.length&&!i.video.length&&a&&n?(l="video",u=[[n,a].join()]):i.audio.length&&l?(l="audio",s=!0):l=i.video.length&&!i.audio.length?"audio":"video",s||(e=JI(e,t,u,l),r&&(e.stream.groupId=r),i[e.stream.type]=[e]),i}function a1(e,t){return t=ne(t,"CODECS")||"",e.$=0<t.length,e.$||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),Sp(t.split(/\s*,\s*/))}function YI(e,t,n,i,r,o,s,u,a,l,c,d){for(var p=g(n),h=p.next();!h.done;h=p.next())A1(h.value.stream,r,o,s,u,a,null);for(r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r=[],t=g(t),o=t.next();!o.done;o=t.next())for(o=o.value,s=g(n),u=s.next();!u.done;u=s.next()){var m=u.value;(u=o?o.stream:null)&&(u.drmInfos=l,u.keyIds=c),(a=m?m.stream:null)&&(a.drmInfos=l,a.keyIds=c,e.g.disableIFrames||Yg(a,d)),a&&!u&&(a.bandwidth=i),!a&&u&&(u.bandwidth=i),p=o?o.stream.drmInfos:null,h=m?m.stream.drmInfos:null,m=m?m.N().sort().join(","):"";var y=o?o.N().sort().join(","):"",v=[];u&&u.codecs&&v.push(u.codecs),a&&a.codecs&&v.push(a.codecs),m=[m,y,v.sort()].join("-"),u&&a&&!ug(p,h)||e.Oa.has(m)||(u={id:e.F++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!a&&a.primary,audio:u,video:a,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(u),e.Oa.add(m))}return r}function QI(e,t){t=Z0(t,"CLOSED-CAPTIONS"),e.O=t.length==0,t=g(t);for(var n=t.next();!n.done;n=t.next()){var i=n.value,r=ne(i,"LANGUAGE");n=Ye(r||"und"),r||(r=ne(i,"NAME"))&&(n=r),r=Xe(i,"GROUP-ID"),i=Xe(i,"INSTREAM-ID").replace("SERVICE","svc"),e.G.get(r)||e.G.set(r,new Map),e.G.get(r).set(i,n)}}function l1(e,t,n,i){i=i===void 0?!0:i;for(var r=[],o=[],s=new Map,u=g(t),a=u.next();!a.done;a=u.next()){var l=a.value;a=i?Xe(l,"URI"):ne(l,"URI")||"shaka://hls-muxed",l=Xe(l,"GROUP-ID"),r.push(a),o.push(l),s.set(l,a)}if(i=o.sort().join(","),a=t[0],t="",u=Xe(a,"TYPE").toLowerCase(),u=="subtitles"&&(u=Ce),u==Ce)t=ne(a,"CODECS")||"";else for(o=g(o),l=o.next();!l.done;l=o.next())if(l=l.value,e.H.has(l)){t=e.H.get(l);break}if(o=r.sort().join(","),e.i.has(o))return e.i.get(o);if(l=e.F++,e.j){s=g(s);for(var c=s.next();!c.done;c=s.next()){var d=g(c.value);c=d.next().value,d=d.next().value,(c=n.get(c))&&Os(e.j,l,c,d)}}n=ne(a,"LANGUAGE"),s=ne(a,"NAME"),c=ne(a,"DEFAULT")=="YES",u=="audio"?d=(d=ne(a,"CHANNELS"))?parseInt(d.split("/")[0],10):null:d=null;var p;u=="audio"&&(p=ne(a,"CHANNELS"))?(p=p.split("/"),p=p.length!=2?!1:p[1]==="JOC"||p[1].includes("ATMOS")):p=!1;var h=ne(a,"CHARACTERISTICS"),m=ne(a,"FORCED")=="YES";return u=="audio"?a=(a=ne(a,"SAMPLE-RATE"))?parseInt(a,10):null:a=null,r=Sc(e,l,r,t,u,n,c,s,d,null,h,m,a,p),r.stream&&(r.stream.groupId=i),e.I.has(i)?e.I.get(i).push(r):e.I.set(i,[r]),e.i.set(o,r),r}function $I(e,t){var n,i,r,o,s,u,a,l,c,d;return C(function(p){return p.g==1?(n=Xe(t,"URI"),i=ne(t,"CODECS","jpeg")||"",e.i.has(n)?p.return(e.i.get(n)):(r=ne(t,"LANGUAGE"),o=ne(t,"NAME"),s=ne(t,"CHARACTERISTICS"),u=Sc(e,e.F++,[n],i,"image",r,!1,o,null,null,s,!1,null,!1),(a=ne(t,"RESOLUTION"))?S(p,u.stream.createSegmentIndex(),3):p.s(2))):(p.g!=2&&(l=Ni(u.stream.segmentIndex),c=l.tilesLayout)&&(u.stream.width=Number(a.split("x")[0])*Number(c.split("x")[0]),u.stream.height=Number(a.split("x")[1])*Number(c.split("x")[1])),(d=ne(t,"BANDWIDTH"))&&(u.stream.bandwidth=Number(d)),e.i.set(n,u),p.return(u))})}function c1(e,t){var n="video",i=Xe(t,"URI"),r=ne(t,"CODECS")||"";if(r=="mjpg"&&(n="image"),e.i.has(i))return e.i.get(i);var o=ne(t,"LANGUAGE"),s=ne(t,"NAME"),u=ne(t,"CHARACTERISTICS");return n=Sc(e,e.F++,[i],r,n,o,!1,s,null,null,u,!1,null,!1),r=ne(t,"RESOLUTION"),o=g(r?r.split("x"):[null,null]),r=o.next().value,o=o.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(o)||void 0,(t=ne(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function JI(e,t,n,i){for(var r=e.F++,o=[],s=g(t),u=s.next();!u.done;u=s.next()){var a=u.value;u=Xe(a,"URI"),a=ne(a,"PATHWAY-ID"),e.j&&a&&Os(e.j,r,a,u),o.push(u)}if(s=o.sort().join(",")+n.sort().join(","),e.i.has(s))return e.i.get(s);u=o.join(",");e:{if(t=ne(t[0],"CLOSED-CAPTIONS"),i=="video"){if(e.g.disableText){e.O=!1,t=null;break e}if(t){if(t!="NONE"){t=e.G.get(t);break e}e.O=!1}else if(!t&&e.G.size)for(t=g(e.G.keys()).next();!t.done;){t=e.G.get(t.value);break e}}t=null}return n=qo(i,n),i=Sc(e,r,o,n,i,null,!1,u,null,t,null,!1,null,!1),e.i.set(s,i),i}function Sc(e,t,n,i,r,o,s,u,a,l,c,d,p,h){function m(M){var R,A,E,D,P,O,L,U,_,F,H,V,X,K,pe,te,Be,De,xe,Ae,_e,Se,Re;return C(function(ge){switch(ge.g){case 1:return R=Mt,ee(ge,2),S(ge,M.promise,4);case 4:if(A=ge.h,M.aborted)return ge.return();if(E=A.uri,E!=A.originalUri&&(D=T.N(),D.includes(E)||T.ye.push(E)),P=Nf(e.Ga,A.data),P.type!=1)throw new k(2,4,4017);return O=li(P.ca,"EXT-X-DEFINE"),L=_f(e,O,E),U=!1,(!e.$&&e.g.hls.disableCodecGuessing||e.O&&r==R.la&&!e.g.hls.disableClosedCaptionsDetection)&&0<P.segments.length&&(e.O=!1,U=!0),_=!e.$&&e.g.hls.disableCodecGuessing,F=Tn(e),S(ge,f1(e,0,L,P,y,i,r,o,s,u,a,l,c,d,p,h,void 0,U,_),5);case 5:if(H=ge.h,M.aborted)return ge.return();if(V=H.stream,y1(e,P),Tn(e)&&!F&&T1(e,P),T.Bc=H.Bc,T.Vb=H.Vb,T.Xd=H.Xd,T.Wd=H.Wd,T.rd=H.rd,T.ne=H.ne,T.Bb=H.Bb,T.Cb=H.Cb,T.Tf=!0,v.segmentIndex=V.segmentIndex,v.encrypted=V.encrypted,v.drmInfos=V.drmInfos,v.keyIds=V.keyIds,v.mimeType=V.mimeType,v.bandwidth=v.bandwidth||V.bandwidth,v.codecs=v.codecs||V.codecs,v.closedCaptions=v.closedCaptions||V.closedCaptions,v.width=v.width||V.width,v.height=v.height||V.height,v.hdr=v.hdr||V.hdr,v.colorGamut=v.colorGamut||V.colorGamut,v.frameRate=v.frameRate||V.frameRate,v.language=="und"&&V.language!="und"&&(v.language=V.language),v.language=v.language||V.language,v.channelsCount=v.channelsCount||V.channelsCount,v.audioSamplingRate=v.audioSamplingRate||V.audioSamplingRate,Po(v),v.drmInfos.length&&e.h.newDrmInfo(v),X=!1,(!l&&v.closedCaptions||l&&v.closedCaptions&&l.size!=v.closedCaptions.size)&&(X=!0),e.m&&X&&e.h.makeTextStreamsForClosedCaptions(e.m),r==R.la||r==R.V)for(K=g(e.i.values()),pe=K.next();!pe.done;pe=K.next())te=pe.value,te.Tf||te.type!=r||(te.stream.mimeType=V.mimeType,Po(te.stream));r==R.va&&(Be=Ni(V.segmentIndex))&&Be.Y&&(v.mimeType="application/mp4",Po(v)),De=ml(v),v.segmentIndex.xb(function(we){we.Y&&(we.Y.Wc=De)}
40),ZI(e)&&(e.Ub?bf(e,[T]):(e.Ub=!0,xe=Array.from(e.i.values()),Ae=xe.filter(function(we){return we.stream.segmentIndex}),bf(e,Ae),Of(e),_e=e.o,0<_e&&e.B.da(_e))),Bf(e,P.ca,v.type,L,y),e.m&&(e.m.startTime=e.u),fe(ge,0);break;case 2:if(Se=re(ge),v.closeSegmentIndex(),Se.code===7001)return ge.return();if(Re=e.h.disableStream(v),!Re)throw Se;q(ge)}})}function y(){return e.j&&1<n.length?na(e.j,t):T.ye.concat(e1([e.C],n,e.A))}var v=g1(e,i,r,o,s,u,a,l,c,d,p,h);n.includes("shaka://hls-muxed")&&(v.isAudioMuxedInVideo=!0,v.mimeType="video/mp2t",Po(v));var T={stream:v,type:r,ye:[],Bc:0,Vb:0,ne:new Map,Xd:!1,Wd:!1,rd:!1,tf:-1,Bb:-1,Cb:-1,Tf:!1,N:y},w=null,I;return v.createSegmentIndex=function(){return w||(v.isAudioMuxedInVideo?(v.segmentIndex=new Oe([]),Promise.resolve()):(I=Hf(e,T.N(),!0),w=new Promise(function(M){M(m(I))})))},v.closeSegmentIndex=function(){w&&!v.segmentIndex&&I.abort(),v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null),w=null},T}function d1(e){var t=1/0;e=g(e.i.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Vb));return t}function p1(e,t){var n=[];t=g(t);for(var i=t.next();!i.done;i=t.next())i=i.value,i.segmentIndex&&i.segmentIndex.xb(function(r){n.push(r)});e.l.Ed(n)}function bf(e,t){if(!Tn(e))for(var n=d1(e),i=g(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.Oc(0,n);p1(e,t.map(function(o){return o.stream})),i=Array.from(e.i.values()).filter(function(o){return o.stream.segmentIndex}),n=i.some(function(o){return o.stream.type=="audio"}),r=i.some(function(o){return o.stream.type=="video"}),i=Tn(e)&&!e.Na,n=!Tn(e)&&e.Na&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?o1(e,t,i):(OI(e,t),0<e.g.hls.ignoreManifestProgramDateTimeForTypes.length&&o1(e,t))}function aa(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function ZI(e){if(!e.m)return!1;var t=[],n=[];e=g(e.m.variants);for(var i=e.next();!i.done;i=e.next())i=i.value,i.video&&t.push(i.video),i.audio&&n.push(i.audio);return!(0<t.length&&!t.some(function(r){return r.segmentIndex})||0<n.length&&!n.some(function(r){return r.segmentIndex}))}function f1(e,t,n,i,r,o,s,u,a,l,c,d,p,h,m,y,v,T,w){T=T===void 0?!0:T,w=w===void 0?!0:w;var I,M,R,A,E,D,P,O,L,U,_,F,H,V,X,K,pe,te,Be,De,xe,Ae,_e,Se,Re,ge,we,Qe,Ft;return C(function(pt){switch(pt.g){case 1:if(I=i.segments||[],M=I.every(function(ht){return!!Yt(ht.ca,"EXT-X-GAP")}),!I.length||M)throw new k(2,4,4053);if(eM(e,i),Tn(e)&&Ff(e,i),R=Tn(e)?e.M.get(s):new Map,A=x1(e,i,R,n,r,s),E=A.segments,D=A.bandwidth,_=U=L=O=P=null,!(0<E.length&&T)){pt.s(2);break}return S(pt,bI(e,E),3);case 3:F=pt.h,s=F.type,u=F.language,c=F.channelCount,m=F.sampleRate,e.g.disableText||(d=F.closedCaptions),O=F.height,P=F.width,L=F.Od,U=F.colorGamut,_=F.frameRate,w&&(v=F.mimeType,o=F.codecs);case 2:if(v){pt.s(4);break}return S(pt,iM(e,s,o,E),5);case 5:v=pt.h,s!=Ce||o||v!="application/mp4"||!E[0]||E[0].Y||(v="text/vtt");case 4:return S(pt,m1(e,i,v,r,n),6);case 6:if(H=pt.h,V=H.drmInfos,X=H.keyIds,K=H.encrypted,pe=H.Dg,K&&!V.length&&!pe)throw new k(2,4,4026);return te=g1(e,o,s,u,a,l,c,d,p,h,m,y),te.encrypted=K&&!pe,te.drmInfos=V,te.keyIds=X,te.mimeType=v,D&&(te.bandwidth=D),Po(te),s=="video"&&(P||O||L||U)&&A1(te,P,O,_,L,null,U),Tn(e)&&Ff(e,i),Be=E[0].startTime,De=E[E.length-1],xe=De.endTime,Ae=new Oe(E),te.segmentIndex=Ae,Se=(_e=Yt(i.ca,"EXT-X-SERVER-CONTROL"))?bs(_e,"CAN-SKIP-UNTIL")!=null:!1,Re=_e?bs(_e,"CAN-BLOCK-RELOAD")!=null:!1,ge=Fs(i.ca,"EXT-X-MEDIA-SEQUENCE",0),we=h1(ge,E),Qe=we.Bb,Ft=we.Cb,pt.return({stream:te,type:s,ye:[],N:r,Bc:Be,Vb:xe,Xd:Se,Wd:Re,rd:!1,tf:-1,Bb:Qe,Cb:Ft,ne:R,Tf:!1})}})}function h1(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{Bb:e,Cb:n};t=t[t.length-1];var i=t.g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0),{Bb:e,Cb:n}):(e++,t.m&&(n=0),{Bb:e,Cb:n})}function g1(e,t,n,i,r,o,s,u,a,l,c,d){var p=Vf(n,t)||wc(n),h=[];if(a){a=g(a.split(","));for(var m=a.next();!m.done;m=a.next())h.push(m.value)}return a=void 0,m=null,n==Ce?a=h.includes("public.accessibility.transcribes-spoken-dialog")&&h.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":h.includes("public.accessibility.describes-video")&&(m="visually impaired"),h.length||a!=="subtitle"||h.push("subtitle"),e={id:e.F++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:t,kind:n==Ce?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Ye(i||"und"),originalLanguage:i,label:o,type:n,primary:r,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:h,forced:l,channelsCount:s,audioSamplingRate:c,spatialAudio:d,closedCaptions:u,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},Po(e),e}function m1(e,t,n,i,r){var o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X;return C(function(K){switch(K.g){case 1:if(o=new Map,!e.g.ignoreDrmInfo&&t.segments){for(s=g(t.segments),u=s.next();!u.done;u=s.next())if(a=u.value,l=li(a.ca,"EXT-X-KEY"),c=null,l.length)for(c=S1(e,t,a.ca,i,r),d=g(l),p=d.next();!p.done;p=d.next())h=p.value,o.set(h,c)}y=m=!1,v=[],T=new Set,w=g(o),I=w.next();case 2:if(I.done){K.s(4);break}if(M=I.value,R=g(M),A=R.next().value,E=R.next().value,D=A,P=E,O=Xe(D,"METHOD"),O=="NONE"){K.s(3);break}if(m=!0,L=ne(D,"KEYFORMAT")||"identity",U=null,Ec(O)){y=!0,K.s(3);break}if(L=="identity")return S(K,M1(e,D,n,i,P,r),11);if(_=e.Sb.get(L),!_){F=null,K.s(9);break}return S(K,_(D,n,P),10);case 10:F=K.h;case 9:U=F,K.s(6);break;case 11:U=K.h;case 6:if(U){if(U.keyIds)for(H=g(U.keyIds),V=H.next();!V.done;V=H.next())X=V.value,T.add(X);v.push(U)}case 3:I=w.next(),K.s(2);break;case 4:return K.return({drmInfos:v,keyIds:T,encrypted:m,Dg:y})}})}function v1(e,t,n,i,r){if(!j.crypto||!j.crypto.subtle)throw Pe("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new k(2,4,4042);var o=0,s=ne(t,"IV","");if(s){var u=no(s.substr(2));if(u.byteLength!=16)throw new k(2,4,4048)}else o=Fs(n.ca,"EXT-X-MEDIA-SEQUENCE",0);var a=Kr(i(),Xe(t,"URI"),r),l=a.sort().join("");if(n=t.toString()+"-"+o+"-"+l,!e.ka.has(n)){var c={bitsKey:128,blockCipherMode:"CBC",iv:u,f
40irstMediaSequenceNumber:o};switch(Xe(t,"METHOD")){case"AES-256":c.bitsKey=256;break;case"AES-256-CTR":c.bitsKey=256,c.blockCipherMode="CTR"}c.fetchKey=function(){var d,p,h,m;return C(function(y){if(y.g==1)return e.L.has(l)||(d=Ot(a,e.g.retryParameters),p=wr(e,d,6).promise,e.L.set(l,p)),S(y,e.L.get(l),2);if(y.g!=3){if(h=y.h,!h.data||h.data.byteLength!=c.bitsKey/8)throw new k(2,4,4049);return m={name:c.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:c.bitsKey},S(y,j.crypto.subtle.importKey("raw",h.data,m,!0,["decrypt"]),3)}c.cryptoKey=y.h,c.fetchKey=void 0,q(y)})},e.ka.set(n,c)}return e.ka.get(n)}function y1(e,t){e.u==null&&(t=Yt(t.ca,"EXT-X-START"))&&(e.u=Number(Xe(t,"TIME-OFFSET")))}function eM(e,t){var n=Yt(t.ca,"EXT-X-PLAYLIST-TYPE");t=Yt(t.ca,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?xc(e,Ac):n?xc(e,Ic):xc(e,D1)}function Ff(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;0<=r;){var o=Yt(i[r].ca,"EXTINF");if(o){n=Number(o.value.split(",")[0]);break}r--}if(i=Yt(t.ca,"EXT-X-TARGETDURATION"),!i)throw new k(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=Yt(t.ca,"EXT-X-PART-INF"))&&(e.P=Number(Xe(r,"PART-TARGET"))),t=Yt(t.ca,"EXT-X-SERVER-CONTROL"),e.fa&&e.P?(e.o=e.Tb?5*e.P<=n?Math.min(e.P,e.o):Math.min(n,e.o):Math.min(e.P,e.o),e.Fa=t?Number(Xe(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),n=t?bs(t,"HOLD-BACK"):null,e.Aa=n?Number(n.value):0),e.Ma=Math.max(i,e.Ma)}function T1(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Fa)n=e.Fa;else if(e.Aa)n=e.Aa;else{var i=t.segments.length,r=e.g.hls.liveSegmentsDelay;for(r>i-2&&(r=Math.max(1,i-2)),r=i-r;r<i;r++){var o=Yt(t.segments[r].ca,"EXTINF");n=o?n+Math.ceil(Number(o.value.split(",")[0])):n+e.Ma}}e.u&&0>e.u&&(n=Math.min(-e.u,n),e.u+=n),e.l.zh(0),e.l.lg(n),e.l.Gc(!1)}function S1(e,t,n,i,r){var o=Yt(n,"EXT-X-MAP");if(!o)return null;var s=Xe(o,"URI"),u=Kr(i(),s,r);if(s=[u.toString(),ne(o,"BYTERANGE","")].join("-"),!e.sa.has(s)){var a=void 0,l=null,c=!1;n=g(n);for(var d=n.next();!d.done;d=n.next())d=d.value,d.name=="EXT-X-KEY"?(c=Xe(d,"METHOD"),Ec(c)&&d.id<o.id?(c=!1,a=v1(e,d,t,i,r)):c=c!="NONE"):d.name=="EXT-X-BYTERANGE"&&d.id<o.id&&(l=d);t=tM(u,o,l,a,c),e.sa.set(s,t)}return e.sa.get(s)}function tM(e,t,n,i,r){var o=0,s=null;return t=ne(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(o=t.split("@"),s=Number(o[0]),o=Number(o[1]),s=o+s-1,i&&(n=s+1-o,n%16&&(s+=16-n%16))),new Cn(function(){return e},o,s,null,null,null,i,r)}function nM(e,t,n,i,r,o,s,u,a){function l(K){K=new vt(K).ab.split(".").pop();var pe=Xf.get(s).get(K);return pe||(pe=Gf.get(K)),pe}var c=i.ca,d=Yt(c,"EXTINF"),p=0,h=0,m=null;i.Jb.length&&(e.m.isLowLatency=!0);var y=null;if(!e.g.hls.ignoreManifestProgramDateTime){var v=Yt(c,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(y=Dr(v.value),e.Na=!0)}var T=cr;if(Yt(c,"EXT-X-GAP")&&(e.m.gapCount++,T=2),!d){if(i.Jb.length==0)throw new k(2,4,4024,"EXTINF");if(!e.fa)return null}var w=[];v=!1;var I=null,M=!1,R=!1;if(e.fa&&i.Jb.length){p=t&&j.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var A=y,E={},D=0;D<i.Jb.length;E={Oe:void 0,ve:void 0},D++){var P=i.Jb[D],O=D==0?n:w[w.length-1],L=D==0?r:O.endTime,U=Number(ne(P,"DURATION"))||e.P;if(U){var _=L+U,F=0,H=null;if(P.name=="EXT-X-PRELOAD-HINT"?(F=(F=ne(P,"BYTERANGE-START"))?Number(F):0,(O=ne(P,"BYTERANGE-LENGTH"))?H=F+Number(O)-1:F&&(H=Number.MAX_SAFE_INTEGER)):(F=ne(P,"BYTERANGE"),H=g(w1(O,F)),F=H.next().value,H=H.next().value),E.ve=ne(P,"URI"),E.ve){O=cr,ne(P,"GAP")=="YES"&&(e.m.gapCount++,O=2,M=!0),E.Oe=null;var V=function(K){return function(){return K.Oe==null&&(K.Oe=Kr(u(),K.ve,o)),K.Oe}}(E);p&&0<=F&&H!=null&&(I=V,v=!0),L=new oe(L,_,V,F,H,t,0,0,1/0,[],"",null,A,O,a),P.name=="EXT-X-PRELOAD-HINT"&&(L.Uf(),R=!0),ne(P,"INDEPENDENT")!="YES"&&0<D&&L.Vc(),(E=l(E.ve))&&(L.mimeType=E,k1.has(E)&&(L.Y=null)),w.push(L),A&&(A+=U)}}}}if(d){if(d=Number(d.value.split(",")[0]),d==0)return null;p=r+d}else if(w.length)p=w[w.length-1].endTime;else return null;v&&(M||w[0].Sa!=0?(v=!1,I=null):w=[]),(d=Yt(c,"EXT-X-BYTERANGE"))?(m=g(w1(n,d.value)),h=m.next().value,m=m.next().value):w.length&&(h=w[0].Sa,m=w[w.length-1].xa),n="",d=null,s=="image"&&(n="1x1",c=Yt(c,"EXT-X-TILES"))&&(n=Xe(c,"LAYOUT"),(c=ne(c,"DURATION"))&&(d=Number(c)));var X=null;return t=new oe(r,p,function(){return I?I():(X==null&&(X=Kr(u(),i.g,o)),X||[])},h,m,t,0,0,1/0,w,n,d,y,T,a,0<w.length&&!!i.g),(r=l(i.g))&&(t.mimeType=r,k1.has(r)&&(t.Y=null)),v&&(e.Tb=!0,t.eh(),R&&t.Uf()),t}function w1(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.xa+1,i=n+t-1),[n,i]}function Bf(e,t,n,i,r){if(n=="video"||n=="audio"){var o=e.l.m;if(o&&!aa(e,n))for(t=li(t,"EXT-X-DATERANGE"),t=t.filter(function(L){return bs(L,"START-DATE")!=null}).sort(function(L,U){return L=Xe(L,"START-DATE"),U=Xe(U,"START-DATE"),L<U?-1:L>U?1:0}),n=0;n<t.length;n++){var s=t[n];try{var u=Xe(s,"ID");if(!e.za.has(u)){var a=Xe(s,"START-DATE"),l=Dr(a);if(!isNaN(l)){var c=Math.max(0,l-o),d=null,p=ne(s,"END-DATE");if(p){var h=Dr(p);if(!isNaN(h)&&(d=h-o,0>d))continue}if(d==null){var m=ne(s,"DURATION")||ne(s,"PLANNED-DURATION");if(m){var y=parseFloat(m);if(isNaN(y)||(d=c+y),0>l-o+y)continue}}var v=ne(s,"CLASS")||"com.apple.quicktime.HLS",T=ne(s,"END-ON-NEXT")=="YES";if(d==null&&T){for(var w=n+1;w<t.length;w++){var I=ne(t[w],"CLASS")||"com.apple.quicktime.HLS";if(v==I){var M=Xe(t[w],"START-DATE"),R=Dr(M);if(!isNaN(R)&&R&&R>l){d=Math.max(0,R-o);break}}}if(d==null)continue}w=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var A=[],E=g(s.attributes),D=E.next();!D.done;D=E.next()){var P=D.value;if(!w.includes(P.name)){var O=t1(P.value,i);
40(P.name=="X-ASSET-URI"||P.name=="X-ASSET-LIST")&&(O=Kr(r(),P.value,i)[0]),A.push({key:P.name,description:"",data:O,mimeType:null,pictureType:null})}}1<A.length&&e.h.onMetadata(v,c,d,A),e.za.add(u)}}}catch{}}}}function x1(e,t,n,i,r,o){var s=t.segments,u=void 0,a=Fs(t.ca,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=Fs(t.ca,"EXT-X-MEDIA-SEQUENCE",0),c=Yt(t.ca,"EXT-X-SKIP"),d=c?Number(ne(c,"SKIPPED-SEGMENTS")):0,p=l+d,h=0;Tn(e)&&n.has(p)&&(h=n.get(p)),h===0&&e.Ea==Ic&&0<n.size&&!n.has(p)&&e.l.i!=null&&(h=e.l.pb());var m=[],y=null;c=[];for(var v=0;v<s.length;v++){var T=s[v],w=v==0?h:y.endTime;p=l+d+v,Yt(T.ca,"EXT-X-DISCONTINUITY")&&(a++,y&&y.Y&&(y.Y.g=w));for(var I=g(T.ca),M=I.next();!M.done;M=I.next())M=M.value,M.name=="EXT-X-KEY"&&(Ec(Xe(M,"METHOD"))?u=v1(e,M,t,r,i):u=void 0);n.set(p,w),I=S1(e,t,T.ca,r,i),(w=nM(e,I,y,T,w,i,o,r,u))&&((y=Fs(T.ca,"EXT-X-BITRATE"))?c.push({bitrate:y,duration:w.endTime-w.startTime}):c.length&&(y=c.pop(),y.duration+=w.endTime-w.startTime,c.push(y)),y=w,w.i=a,aa(e,o)&&e.K!=null&&p<e.K||m.push(w))}if(t=void 0,c.length&&(t=c.reduce(function(R,A){return R+A.duration},0),t=Math.round(c.reduce(function(R,A){return R+A.bitrate*A.duration},0)/t*1e3)),c=m.some(function(R){return R.h!=null})){for(n={},i=0;i<m.length;n={ae:void 0,$d:void 0,Td:void 0,Dc:void 0,Sd:void 0},i++)if(n.Dc=m[i],n.Dc.h==null)for(n.$d=0,n.ae=i,r=function(R){return function(){var A=m[R.ae];if(A){if(A.h!=null)return A.h+R.$d;R.$d-=A.endTime-A.startTime,R.ae+=1}return null}}(n),n.Sd=0,n.Td=i,s=function(R){return function(){var A=m[R.Td];if(A){if(A!=R.Dc&&(R.Sd+=A.endTime-A.startTime),A.h!=null)return A.h+R.Sd;--R.Td}return null}}(n);n.Dc.h==null;)n.Dc.h=s(),n.Dc.h==null&&(n.Dc.h=r())}if(c)for(n=g(m),i=n.next();!i.done;i=n.next())for(r=i.value,i=r.h,r=g(r.g),s=r.next();!s.done;s=r.next())s=s.value,s.h=i,i+=s.endTime-s.startTime;if(n=e.ea,c&&n!=1/0&&!aa(e,o))for(e=g(m),o=e.next();!o.done;o=e.next())o.value.sg(n);return{segments:m,bandwidth:t}}function Vf(e,t){if(e==Ce){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function wc(e){return e==Ce?"text/vtt":Xf.get(e).get("mp4")}function E1(e,t){e=Tn(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.dc()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function iM(e,t,n,i){var r,o,s,u,a,l,c,d,p,h,m,y,v;return C(function(T){switch(T.g){case 1:return r=Ai,o=E1(e,i),s=o.segment,s.status==2?T.return(wc(t)):(u=s.N(),a=new vt(u[0]),l=a.ab.split(".").pop(),c=Xf.get(t),(d=c.get(l))||(d=Gf.get(l))||(d=Vf(t,n))?T.return(d):(h=1,m=Ot(u,e.g.retryParameters),ee(T,2),m.method="HEAD",S(T,wr(e,m,r,{type:h}).promise,4)));case 4:y=T.h,p=y.headers["content-type"],fe(T,3);break;case 2:if(v=re(T),!v||v.code!=1002&&v.code!=1001){T.s(3);break}return m.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(m.headers.Range="bytes=0-0"),S(T,wr(e,m,r,{type:h}).promise,6);case 6:y=T.h,p=y.headers["content-type"];case 3:if(!p){T.s(7);break}if(d=p.toLowerCase().split(";")[0],d!="application/octet-stream"){T.s(8);break}if(y.data.byteLength){T.s(9);break}return m.method="GET",S(T,wr(e,m,r,{type:h}).promise,10);case 10:y=T.h;case 9:hs(he(y.data))&&(d="video/mp2t");case 8:if(d!="application/octet-stream")return T.return(d);case 7:return T.return(wc(t))}})}function A1(e,t,n,i,r,o,s){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=o||void 0,e.colorGamut=s||void 0)}function Hf(e,t,n){return wr(e,Ot(t,e.g.retryParameters),0,{type:n?2:3})}function I1(e){var t,n,i,r,o,s;return C(function(u){switch(u.g){case 1:return e.h?(ee(u,2),t=Date.now(),S(u,e.update(),4)):u.return();case 4:n=Date.now(),Tn(e)&&(i=(n-t)/1e3,e.Pb.sample(1,i),r=0<e.g.updatePeriod?e.g.updatePeriod:e.o,o=Math.max(0,r-Gn(e.Pb)),e.B.da(o)),fe(u,3);break;case 2:if(s=re(u),!e.h)return u.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(s),u.return();s.severity=1,e.h.onError(s),e.B.da(.1);case 3:if(!e.h)return u.return();e.h.onManifestUpdated(),q(u)}})}function Tn(e){return e.Ea!=Ac}function xc(e,t){e.Ea=t,e.l&&e.l.Gc(!Tn(e)),Tn(e)||e.B.stop()}function wr(e,t,n,i){if(!e.Z)throw new k(2,7,7001);
40return i||(i={}),i.isPreload=e.Qb(),t=e.h.networkingEngine.request(n,t,i),mo(e.Z,t),t}function Ec(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function rM(e,t,n,i){var r,o,s,u,a,l;return C(function(c){if(c.g==1){if(n=="video/mp2t")throw new k(2,4,4040);if(j.shakaMediaKeysPolyfill==="apple")throw new k(2,4,4041);if(r=Xe(t,"METHOD"),o=["SAMPLE-AES","SAMPLE-AES-CTR"],!o.includes(r))return c.return(null);s="cenc",r=="SAMPLE-AES"&&(s="cbcs"),u=Xe(t,"URI"),a=kr("com.apple.fps",s,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],u);var d=new vt(u).nb.replace(/-/g,"").toLowerCase();return(l=d.length===32&&/^[0-9a-f]+$/.test(d)?d:null)||!i?c.s(2):S(c,C1(e,i),3)}return c.g!=2&&(l=c.h),l&&a.keyIds.add(l),c.return(a)})}function M1(e,t,n,i,r,o){var s,u,a,l,c,d,p,h,m,y,v,T;return C(function(w){switch(w.g){case 1:if(n=="video/mp2t")throw new k(2,4,4040);if(j.shakaMediaKeysPolyfill==="apple")throw new k(2,4,4041);if(s=Xe(t,"METHOD"),u=["SAMPLE-AES","SAMPLE-AES-CTR"],!u.includes(s))return w.return(null);if(a=Kr(i(),Xe(t,"URI"),o),a[0].startsWith("data:text/plain;base64,")){l=er(oi(a[0].split("data:text/plain;base64,").pop())),w.s(2);break}return c=a.sort().join(""),e.na.has(c)||(d=Ot(a,e.g.retryParameters),p=wr(e,d,6).promise,e.na.set(c,p)),S(w,e.na.get(c),3);case 3:h=w.h,l=er(h.data);case 2:if(m="00000000000000000000000000000000",!r){w.s(4);break}return S(w,C1(e,r),5);case 5:(y=w.h)&&(m=y);case 4:return v=new Map,v.set(m,l),T="cenc",s=="SAMPLE-AES"&&(T="cbcs"),w.return(hg(v,T))}})}function C1(e,t){var n,i,r,o;return C(function(s){return s.g==1?(n=null,e.oa.has(t)?(n=e.oa.get(t),s.s(2)):(i=Ru(t.N(),t.uc(),t.tc(),e.g.retryParameters),r=Ai,S(s,wr(e,i,r,{type:0}).promise,3))):(s.g!=2&&(o=s.h,t.Ld(o.data),n=dE(o.data),e.oa.set(t,n)),s.return(n))})}Y("shaka.hls.HlsParser",Tc);var Gf=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),oM=new Map().set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),sM=new Map().set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),uM=new Map().set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),aM=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Xf=new Map().set("audio",oM).set("video",sM).set("text",uM).set("image",aM),k1=new Set(["video/mp2t"].concat(W(or))),Ac="VOD",D1="EVENT",Ic="LIVE",lM={Qh:Ac,ak:D1,ik:Ic};yo("application/x-mpegurl",function(){return new Tc}),yo("application/vnd.apple.mpegurl",function(){return new Tc});function Mc(e){return sc(e)}var cM=new Map().set("com.microsoft.playready",Mc).set("com.microsoft.playready.recommendation",Mc).set("com.microsoft.playready.software",Mc).set("com.microsoft.playready.hardware",Mc);function Kf(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.C=new hn(5),this.o=new ke(function(){dM(e)}),this.B=new ss,this.m=new Map,this.A=function(){return!1}}f=Kf.prototype,f.configure=function(e,t){this.g=e,t&&(this.A=t)},f.start=function(e,t){var n=this;return C(function(i){if(i.g==1)return n.l=[e],n.h=t,S(i,Wf(n),2);if(!n.h)throw new k(2,7,7001);return i.return(n.j)})};function dM(e){var t;C(function(n){switch(n.g){case 1:return ee(n,2),S(n,Wf(e),4);case 4:fe(n,3);break;case 2:t=re(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();q(n)}})}f.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,this.o!=null&&(this.o.stop(),this.o=null),this.m.clear(),this.B.destroy()},f.update=function(){var e=this,t;return C(function(n){if(n.g==1)return ee(n,2),S(n,Wf(e),4);if(n.g!=2)return fe(n,0);if(t=re(n),!e.h||!t)return n.return();e.h.onError(t),q(n)})},f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(){},f.banLocation=function(){},f.setMediaElement=function(){};function Wf(e){var t,n,i,r,o,s,u;
40return C(function(a){if(a.g==1)return t=Ot(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.A()}),mo(e.B,r),S(a,r.promise,2);if(o=a.h,!e.h)return a.return();o.uri&&!e.l.includes(o.uri)&&e.l.unshift(o.uri);var l=o.uri,c=o.data,d=e.g.mss.manifestPreprocessor;if(d!=Cl){if(Ue("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),c=_0(c,"SmoothStreamingMedia"),!c)throw new k(2,4,4046,l);d(c),c=Si(c.outerHTML)}var p=ru(c,"SmoothStreamingMedia");if(!p)throw new k(2,4,4046,l);if(l=e.g.mss.manifestPreprocessorTXml,l!=kl&&l(p),e.i||(e.i=new se(null,0)),l=ve(p,"IsLive",_a,!1))throw new k(2,4,4047);e.i.Gc(!l),d=ve(p,"TimeScale",ln,1e7),c=ve(p,"DVRWindowLength",ln),l&&(c===0||isNaN(c))&&(c=1/0);var h=ve(p,"CanSeek",_a,!1);c===0&&h&&(c=1/0),h=null,c&&0<c&&(h=c/d),l&&!isNaN(e.g.availabilityWindowOverride)&&(h=e.g.availabilityWindowOverride),h==null&&(h=1/0),e.i.Fe(h),c=ve(p,"Duration",ln,1/0),l||e.i.bb(c/d),l={variants:[],textStreams:[],timescale:d,duration:c/d};var m;for(h=Ge(p,"Protection"),d=e.g.mss.keySystemsBySystemId,c=[],h=g(h),m=h.next();!m.done;m=h.next())c=c.concat(Ge(m.value,"ProtectionHeader"));if(c.length){for(h=[],m=0;m<c.length;m++){var y=c[m],v=y.attributes.SystemID.toLowerCase(),T=d[v];if(T){var w;e:{if(w=h0(y)){w=g(Ri(w,"DATA"));for(var I=w.next();!I.done;I=w.next())if(I=Et(I.value,"KID")){w=oi(Ct(I)),w=new Uint8Array([w[3],w[2],w[1],w[0],w[5],w[4],w[7],w[6]].concat(W(w.slice(8)))),w=er(w);break e}}w=null}I=oi(Ct(y)),v=no(v.replace(/-/g,"")),v=[{initData:Za(I,v,new Set,0),initDataType:"cenc",keyId:w}],v=kr(T,"cenc",v),w&&v.keyIds.add(w),(T=cM.get(T))&&(v.licenseServerUri=T(y)),h.push(v)}}d=h}else d=[];for(m=d,h=[],d=[],c=[],p=Ge(p,"StreamIndex"),p=g(p),y=p.next();!y.done;y=p.next()){y=y.value,T=Ge(y,"QualityLevel"),v=l.timescale,w=l.duration,I=Ge(y,"c");for(var M=[],R=0,A=0;A<I.length;++A){var E=I[A],D=I[A+1],P=ve(E,"t",ln),O=ve(E,"d",ln);if(E=ve(E,"r",mn),!O)break;if(P=P??R,(E=E||0)&&E--,0>E)if(D){if(D=ve(D,"t",ln),D==null)break;if(P>=D)break;E=Math.ceil((D-P)/O)-1}else{if(w==1/0)break;if(P/v>=w)break;E=Math.ceil((w*v-P)/O)-1}for(D=0;D<=E;++D)R=P+O,M.push({start:P/v,end:R/v,zg:P}),P=R}for(v=M,T=g(T),w=T.next();!w.done;w=T.next())(w=pM(e,y,w.value,v,m,l))&&(w.type!="audio"||e.g.disableAudio?w.type!="video"||e.g.disableVideo?w.type!=Ce||e.g.disableText||c.push(w):d.push(w):h.push(w))}for(p=[],h=g(0<h.length?h:[null]),m=h.next();!m.done;m=h.next())for(m=m.value,y=g(0<d.length?d:[null]),M=y.next();!M.done;M=y.next())T=p,v=T.push,w=e,I=m,M=M.value,A=0,I&&I.bandwidth&&0<I.bandwidth&&(A+=I.bandwidth),M&&M.bandwidth&&0<M.bandwidth&&(A+=M.bandwidth),w={id:w.u++,language:I?I.language:"und",disabledUntilTime:0,primary:!!I&&I.primary||!!M&&M.primary,audio:I,video:M,bandwidth:A,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},v.call(T,w);l.variants=p,l.textStreams=c,e.j?(e.j.variants=l.variants,e.j.textStreams=l.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.me()),Promise.resolve(),s=Date.now(),u=(s-i)/1e3,e.C.sample(1,u),q(a)})}function pM(e,t,n,i,r,o){var s=t.attributes.Type;if(s!=="audio"&&s!=="video"&&s!=="text")return Pe("Ignoring unrecognized type:",s),null;var u=t.attributes.Language,a=e.u++,l=ve(n,"Bitrate",nr),c=ve(n,"MaxWidth",nr),d=ve(n,"MaxHeight",nr),p=ve(n,"Channels",nr),h=ve(n,"SamplingRate",nr),m=o.duration;i.length&&(m=i[i.length-1].end-i[0].start);var y=e.i.getDuration();e.i.bb(Math.min(m,y));var v={id:a,originalId:t.attributes.Name||String(a),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:c||void 0,height:d||void 0,kind:"",encrypted:0<r.length,drmInfos:r,keyIds:new Set,language:Ye(u||"und"),originalLanguage:u,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:h,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:m,timescale:o.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=yM.get(r))&&v.roles.push(r),r==="main"&&(v.primary=!0)),r
40=n.attributes.FourCC,(r===null||r==="")&&(r=t.attributes.FourCC),!r){if(s==="audio")r="AAC";else if(s==="video")return Pe('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!vM.includes(r.toUpperCase()))return Pe("Codec not supported:",r),null;switch(n=fM(n,s,r,v),v.mssPrivateData.codecPrivateData=n,s){case"audio":if(!n)return Pe("Quality unsupported without CodecPrivateData",s),null;v.type="audio",v.mimeType="mss/audio/mp4",v.codecs=hM(r,n);break;case"video":if(!n)return Pe("Quality unsupported without CodecPrivateData",s),null;v.type="video",v.mimeType="mss/video/mp4",v.codecs=gM(n);break;case"text":v.type=Ce,v.mimeType="application/mp4",(r==="TTML"||r==="DFXP")&&(v.codecs="stpp")}return v.fullMimeTypes.add(Tt(v.mimeType,v.codecs)),v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(e.m.has(v.id))var T=e.m.get(v.id);else T=[],v.type=="video"&&(T=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),T={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,lb:T,ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:null,stream:v},T=ds(new To([T])),e.m.set(v.id,T);return T=mM(e,new Cn(function(){return[]},0,null,ml(v),v.mssPrivateData.timescale,T,null,v.encrypted),v,t,i),v.segmentIndex=new Oe(T),Promise.resolve()},v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)},v}function fM(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if(t!=="audio")return null;t=i.channelsCount||2,e=i.audioSamplingRate||44100;var r={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return i=r[e],n==="AACH"?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|i>>
401,n[1]=i<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}function hM(e,t){var n=0;return e==="AACH"&&(n=5),t?n===0&&(n=(parseInt(t.substr(0,2),16)&248)>>3):(n=2,e==="AACH"&&(n=5)),"mp4a.40."+n}function gM(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function mM(e,t,n,i,r){var o=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[],r=g(r);for(var s=r.next(),u={};!s.done;u={Ie:void 0},s=r.next())u.Ie=s.value,i.push(new oe(u.Ie.start,u.Ie.end,function(a){return function(){return Gt(e.l,[o.replace("{start time}",String(a.Ie.zg))])}}(u),0,null,t,0,0,n.mssPrivateData.duration));return i}Y("shaka.mss.MssParser",Kf);var vM="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),yM=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");yo("application/vnd.ms-sstr+xml",function(){return new Kf});function P1(e,t,n,i,r,o,s){if(200<=n&&299>=n&&n!=202||n==304)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:o};o=null;try{o=Vi(t)}catch{}throw new k(n==401||n==403?2:1,1,1001,i,n,o,e,s,r||i)}function qf(){}function Cc(e,t,n,i,r,o){var s=new EM;vo(t.headers).forEach(function(c,d){s.append(d,c)});var u=new wM,a={Ig:!1,Kh:!1};if(e=TM(e,t,n,{body:t.body||void 0,headers:s,method:t.method,signal:u.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},a,i,r,t.streamDataCallback,o.minBytesForProgressEvents||0),e=new St(e,function(){return a.Ig=!0,u.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var l=new ke(function(){a.Kh=!0,u.abort()});l.da(t/1e3),e.finally(function(){l.stop()})}return e}function TM(e,t,n,i,r,o,s,u,a){var l,c,d,p,h,m,y,v,T,w,I,M,R,A;return C(function(E){switch(E.g){case 1:return l=SM,c=xM,p=new ArrayBuffer(0),m=h=0,y=Date.now(),ee(E,2),S(E,l(e,i),4);case 4:if(d=E.h,s(R1(d.headers)),i.method=="HEAD"){E.s(5);break}return T=(v=d.headers.get("Content-Length"))?parseInt(v,10):0,d.body?(w=d.clone().body.getReader(),I=function(D){function P(){var O,L,U,_;return C(function(F){switch(F.g){case 1:return ee(F,2),S(F,w.read(),4);case 4:O=F.h,fe(F,3);break;case 2:return re(F),F.return();case 3:if(O.done){F.s(5);break}if(h+=O.value.byteLength,!u){F.s(5);break}return S(F,u(O.value),5);case 5:L=Date.now(),U=h-m,(100<L-y&&U>=a||O.done)&&(_=O.done?0:T-h,o(L-y,U,_),m=h,y=L),O.done?D.close():(D.enqueue(O.value),P()),q(F)}})}P()},new c({start:I}),S(E,d.arrayBuffer(),8)):S(E,d.arrayBuffer(),9);case 8:p=E.h,E.s(5);break;case 9:p=E.h,M=Date.now(),o(M-y,p.byteLength,0);case 5:fe(E,3);break;case 2:throw R=re(E),r.Ig?new k(1,1,7001,e,n):r.Kh?new k(1,1,1003,e,n):new k(1,1,1002,e,R,n);case 3:return A=R1(d.headers),E.return(P1(A,p,d.status,e,d.url,t,n))}})}function R1(e){var t={};return e.forEach(function(n,i){t[i.trim()]=n}),t}function L1(){if(j.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(j.Response){if(!new Response("").body)return!1}else return!1;return!(!j.fetch||"polyfill"in j.fetch||!j.AbortController)}Y("shaka.net.HttpFetchPlugin",qf),qf.isSupported=L1,qf.parse=Cc;var SM=j.fetch,wM=j.AbortController,xM=j.ReadableStream,EM=j.Headers;L1()&&(ur("http",Cc,2,!0),ur("https",Cc,2,!0),ur("blob",Cc,2,!0));function N1(){}function kc(e,t,n,i,r,o){var s=new AM,u=Date.now(),a=0,l=new Promise(function(c,d){s.open(t.method,e,!0),s.responseType="arraybuffer",s.timeout=t.retryParameters.timeout,s.withCredentials=t.allowCrossSiteCredentials,s.onabort=function(){d(new k(1,1,7001,e,n))};var p=!1;s.onreadystatechange=function(){if(s.readyState==2&&!p){var m=j1(s);r(m),p=!0}},s.onload=function(m){var y=j1(s),v=s.response;try{i(Date.now()-u,m.loaded-a,0);var T=P1(y,v,s.status,e,s.responseURL,t,n);c(T)}catch(w){d(w)}},s.onerror=function(m){d(new k(1,1,1002,e,m,n))},s.ontimeout=function(){d(new k(1,1,1003,e,n))},s.onprogress=function(m){var y=Date.now(),v=o.minBytesForProgressEvents||0,T=m.loaded-a;(100<y-u&&T>=v||m.lengthComputable&&m.loaded==m.total)&&(i(y-u,T,s.readyState==4?0:m.total-m.loaded),a=m.loaded,u=y)};for(var h in t.headers)s.setRequestHeader(h.toLowerCase(),t.headers[h]);s.send(t.body)});return new St(l,function(){return s.abort(),Promise.resolve()})}function j1(e){var t=e.getAllResponseHeaders().trim().split(`\r
41`);e={},t=g(t);for(var n=t.next();!n.done;n=t.next())n=n.value.split(": "),e[n[0].toLowerCase()]=n.slice(1).join(": ");return e}Y("shaka.net.HttpXHRPlugin",N1),N1.parse=kc;var AM=j.XMLHttpRequest;ur("http",kc,1,!0),ur("https",kc,1,!0),ur("blob",kc,1,!0);function U1(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function zf(e){var t=e.Ib(!1);return t?Zi(t):e.N().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.Sa+":"+e.xa}function IM(e,t){return Ru(e.g.N(),e.g.Sa,e.g.xa,t.streaming.retryParameters)}function O1(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function _1(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}O1.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function b1(e){return e.i==0?0:e.j/e.i}function F1(e){var t=this;this.u=e,this.i=new Map,this.h=new us(function(){return Yf(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new O1,this.l=!1}F1.prototype.destroy=function(){return this.h.destroy()};
41function MM(e,t,n){e.o=t,e.m=n}function Yf(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}function CM(e,t,n,i,r,o){Je(e.h);var s=(e.i.get(t)||Promise.resolve()).then(function(){var u,a,l,c,d,p,h;return C(function(m){if(m.g==1)return S(m,PM(e,n),2);if(u=m.h,e.h.g)throw new k(2,9,7001);if(r)for(c in a=he(u),l=new Kd(a),l.data)d=Number(c),p=l.data[d],h=l.g[d],e.m(p,h);return e.g.close(i,u.byteLength),e.o(b1(e.g),e.g.g),m.return(o(u))})});e.i.set(t,s)}function kM(e,t,n,i,r,o){Je(e.h);var s=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new k(2,9,7001);if(r){var u=he(n);u=new Kd(u);for(var a in u.data){var l=Number(a);e.m(u.data[l],u.g[l])}}return e.g.close(i,n.byteLength),e.o(b1(e.g),e.g.g),o(n)});e.i.set(t,s)}function DM(e){return C(function(t){return t.g==1?S(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}function PM(e,t){var n,i,r,o;return C(function(s){return s.g==1?(n=Ai,i=e.u.request(n,t),r=function(){return i.abort()},e.j.push(r),S(s,i.promise,2)):(o=s.h,wi(e.j,r),s.return(o.data))})}function Dc(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new We,e.onabort=function(i){i.preventDefault(),n.g.reject()},e.onerror=function(i){i.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}Dc.prototype.abort=function(){var e=this;return C(function(t){if(t.g==1){try{e.i.abort()}catch{}return ee(t,2),S(t,e.g,4)}if(t.g!=2)return fe(t,0);re(t),q(t)})};function Qf(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var o;return C(function(s){if(s.g==1)return r.result==null?(n(),s.return()):(o=r.result,S(s,t(o.key,o.value,o),2));o.continue(),q(s)})}})}Dc.prototype.store=function(){return this.h},Dc.prototype.promise=function(){return this.g};function $f(e){this.h=e,this.g=[]}$f.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function Ro(e,t){return Pc(e,t,"readwrite")}function Pc(e,t,n){n=e.h.transaction([t],n);var i=new Dc(n,t);return e.g.push(i),i.promise().then(function(){wi(e.g,i)},function(){wi(e.g,i)}),i}function Lo(e,t,n){this.h=new $f(e),this.i=t,this.g=n}f=Lo.prototype,f.destroy=function(){return this.h.destroy()},f.hasFixedKeySpace=function(){return!0},f.addSegments=function(){return B1(this.i)},f.removeSegments=function(e,t){return V1(this,this.i,e,t)},f.getSegments=function(e){var t=this,n;return C(function(i){return i.g==1?S(i,H1(t,t.i,e),2):(n=i.h,i.return(n.map(function(r){return t.Kg(r)})))})},f.addManifests=function(){return B1(this.g)},f.updateManifest=function(){return Promise.reject(new k(2,9,9016,"Cannot modify values in "+this.g))};function RM(e,t,n){e=Ro(e.h,e.g);var i=e.store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}f.updateManifestExpiration=function(e,t){var n=Ro(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(r){(r=r.target.result)&&(r.expiration=t,i.put(r,e))},n.promise()},f.removeManifests=function(e,t){return V1(this,this.g,e,t)},f.getManifests=function(e){var t=this,n;return C(function(i){return i.g==1?S(i,H1(t,t.g,e),2):(n=i.h,i.return(Promise.all(n.map(function(r){return t.jd(r)}))))})},f.getAllManifests=function(){var e=this,t,n;return C(function(i){return i.g==1?(t=Pc(e.h,e.g,"readonly"),n=new Map,S(i,Qf(t,function(r,o){var s;return C(function(u){if(u.g==1)return S(u,e.jd(o),2);s=u.h,n.set(r,s),q(u)})}),2)):i.g!=3?S(i,t.promise(),3):i.return(n)})},f.Kg=function(e){return e},f.jd=function(e){return Promise.resolve(e)};function B1(e){return Promise.reject(new k(2,9,9011,"Cannot add new value to "+e))}f.add=function(e,t){var n=this,i,r,o,s,u,a,l;return C(function(c){if(c.g==1){for(i=Ro(n.h,e),r=i.store(),o=[],s=g(t),u=s.next(),a={};!u.done;a={eg:void 0},u=s.next())l=u.value,a.eg=r.add(l),a.eg.onsuccess=function(d){return function(){o.push(d.eg.result)}}(a);return S(c,i.promise(),2)}return c.return(o)})};function V1(e,t,n,i){e=Ro(e.h,t),t=e.store(),n=g(n);for(var r=n.next(),o={};!r.done;o={Sf:void 0},r=n.next())o.Sf=r.value,t.delete(o.Sf).onsuccess=function(s){return function(){return i(s.Sf)}}(o);return e.promise()}function H1(e,t,n){var i,r,o,s,u,a,l;return C(function(c){if(c.g==1){for(i=Pc(e.h,t,"readonly"),r=i.store(
41),o={},s=[],u=g(n),a=u.next(),l={};!a.done;l={ze:void 0,ie:void 0},a=u.next())l.ie=a.value,l.ze=r.get(l.ie),l.ze.onsuccess=function(d){return function(){d.ze.result==null&&s.push(d.ie),o[d.ie]=d.ze.result}}(l);return S(c,i.promise(),2)}if(s.length)throw new k(2,9,9012,"Could not find values for "+s);return c.return(n.map(function(d){return o[d]}))})}function la(e){this.g=new $f(e)}la.prototype.destroy=function(){return this.g.destroy()},la.prototype.getAll=function(){var e=this,t,n;return C(function(i){return i.g==1?(t=Pc(e.g,"session-ids","readonly"),n=[],S(i,Qf(t,function(r,o){n.push(o)}),2)):i.g!=3?S(i,t.promise(),3):i.return(n)})},la.prototype.add=function(e){var t=Ro(this.g,"session-ids"),n=t.store();e=g(e);for(var i=e.next();!i.done;i=e.next())n.add(i.value);return t.promise()},la.prototype.remove=function(e){var t=this,n;return C(function(i){return i.g==1?(n=Ro(t.g,"session-ids"),S(i,Qf(n,function(r,o,s){e.includes(o.sessionId)&&s.delete()}),2)):S(i,n.promise(),0)})};function Rn(){this.g=new Map}Rn.prototype.destroy=function(){for(var e=[],t=g(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Rn.prototype.init=function(){var e=this;ca.forEach(function(r,o){(r=r())&&e.g.set(o,r)});for(var t=[],n=g(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)};function G1(e){var t=null;
vendor: 4,800 bytes, line 41
41if(e.g.forEach(function(n,i){n.getCells().forEach(function(r,o){r.hasFixedKeySpace()||t||(t={path:{Ab:i,Ta:o},Ta:r})})}),t)return t;throw new k(2,9,9013,"Could not find a cell that supports add-operations")}function LM(e,t){e.g.forEach(function(n,i){n.getCells().forEach(function(r,o){t({Ab:i,Ta:o},r)})})}function Rc(e,t,n){if(e=e.g.get(t),!e)throw new k(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new k(2,9,9013,"Could not find cell with name "+n);return t}function NM(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function jM(e){var t=Array.from(e.g.keys());if(!t.length)throw new k(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function UM(e){var t,n,i;return C(function(r){return r.g==1?(t=Array.from(e.g.values()),n=0<t.length,n||(i=ca,i.forEach(function(o){(o=o())&&t.push(o)})),S(r,Promise.all(t.map(function(o){return o.erase()})),2)):n?r.s(0):S(r,Promise.all(t.map(function(o){return o.destroy()})),0)})}function X1(e,t){ca.set(e,t)}Y("shaka.offline.StorageMuxer",Rn),Rn.unregister=function(e){ca.delete(e)},Rn.register=X1,Rn.prototype.destroy=Rn.prototype.destroy;var ca=new Map;function da(){Lo.apply(this,arguments)}ct(da,Lo),da.prototype.updateManifestExpiration=function(e,t){var n=this,i,r,o;return C(function(s){return i=Ro(n.h,n.g),r=i.store(),o=new We,r.get(e).onsuccess=function(u){(u=u.target.result)?(u.expiration=t,r.put(u),o.resolve()):o.reject(new k(2,9,9012,"Could not find values for "+e))},S(s,Promise.all([i.promise(),o]),0)})},da.prototype.jd=function(e){var t,n,i,r,o,s;return C(function(u){if(u.g==1){for(t=[],n=0;n<e.periods.length;++n)i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime,o=OM(e.periods[n],r),t.push(o);return S(u,D0(t),2)}return s=u.h,u.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:s,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function OM(e,t){bM(e);for(var n=g(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(r){return _M(r,e.startTime,t)})}function _M(e,t,n){var i=e.initSegmentUri?K1(e.initSegmentUri):null,r=t+e.presentationTimeOffset,o=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(s){var u=K1(s.uri);return{startTime:t+s.startTime,endTime:t+s.endTime,dataKey:u,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:o,timestampOffset:r,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}da.prototype.Kg=function(e){return{data:e.data}};function K1(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new k(2,9,9004,"Could not parse uri "+e)}function bM(e){var t=e.streams.filter(function(u){return u.contentType=="audio"});if(e=e.streams.filter(function(u){return u.contentType=="video"}),!t.every(function(u){return u.variantIds})||!e.every(function(u){return u.variantIds})){for(var n=g(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(n=g(e),i=n.next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=g(e),o=r.next();!o.done;o=r.next())o.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,r=g(t),o=r.next();!o.done;o=r.next())o.value.variantIds.push(i);if(e.length&&t.length)for(t=g(t),i=t.next();!i.done;i=t.next())for(i=i.value,r=g(e),o=r.next();!o.done;o=r.next()){o=o.value;var s=n++;i.variantIds.push(s),o.variantIds.push(s)}}}function Lc(){Lo.apply(this,arguments)}ct(Lc,Lo),Lc.prototype.jd=function(e){var t,n,i,r,o,s;return C(function(u){if(u.g==1){for(t=[],n=0;n<e.periods.length;++n){i=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,r=i-e.periods[n].startTime;for(var a=e.periods[n],l=[],c=g(a.streams),d=c.next();!d.done;d=c.next())d=d.value,d.variantIds.length!=0&&l.push(FM(d,a.startTime,a.startTime+r));o=l,t.push(o)}return S(u,D0(t),2)}return s=u.h,u.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:s,sequenceMode:!1})})};
41function FM(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function Jf(){Lo.apply(this,arguments)}ct(Jf,Lo),f=Jf.prototype,f.hasFixedKeySpace=function(){return!1},f.addSegments=function(e){return this.add(this.i,e)},f.addManifests=function(e){return this.add(this.g,e)},f.updateManifest=function(e,t){return RM(this,e,t)},f.jd=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function W1(){this.m=this.j=this.i=this.h=this.g=this.l=null}f=W1.prototype,f.init=function(){var e=this,t=new We,n=!1,i=new ke(function(){n=!0,t.reject(new k(2,9,9017))});i.da(5);var r=j.indexedDB.open("shaka_offline_db",5);return r.onsuccess=function(){if(!n){var o=r.result;e.l=o;var s=o.objectStoreNames;s=s.contains("manifest")&&s.contains("segment")?new da(o,"segment","manifest"):null,e.g=s,s=o.objectStoreNames,s=s.contains("manifest-v2")&&s.contains("segment-v2")?new Lc(o,"segment-v2","manifest-v2"):null,e.h=s,s=o.objectStoreNames,s=s.contains("manifest-v3")&&s.contains("segment-v3")?new Lc(o,"segment-v3","manifest-v3"):null,e.i=s,s=o.objectStoreNames,s=s.contains("manifest-v5")&&s.contains("segment-v5")?new Jf(o,"segment-v5","manifest-v5"):null,e.j=s,o=o.objectStoreNames.contains("session-ids")?new la(o):null,e.m=o,i.stop(),t.resolve()}},r.onupgradeneeded=function(){for(var o=r.result,s=g(["segment-v5","manifest-v5","session-ids"]),u=s.next();!u.done;u=s.next())u=u.value,o.objectStoreNames.contains(u)||o.createObjectStore(u,{autoIncrement:!0})},r.onerror=function(o){n||(t.reject(new k(2,9,9001,r.error)),i.stop(),o.preventDefault())},t},f.destroy=function(){var e=this;return C(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return S(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return S(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return S(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return S(t,e.j.destroy(),8);case 8:if(!e.m){t.s(10);break}return S(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),q(t)}})},f.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},f.getEmeSessionCell=function(){return this.m},f.erase=function(){var e=this;return C(function(t){switch(t.g){case 1:if(!e.g){t.s(2);break}return S(t,e.g.destroy(),2);case 2:if(!e.h){t.s(4);break}return S(t,e.h.destroy(),4);case 4:if(!e.i){t.s(6);break}return S(t,e.i.destroy(),6);case 6:if(!e.j){t.s(8);break}return S(t,e.j.destroy(),8);case 8:return e.l&&e.l.close(),S(t,BM(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,S(t,e.init(),0)}})};function BM(){var e=new We,t=j.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new k(2,9,9001,t.error)),n.preventDefault()},e}X1("idb",function(){return(!Ti()||Ti()&&Mr())&&!ki()&&j.indexedDB?new W1:null});function Wi(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}Wi.prototype.Ab=function(){return this.i},Wi.prototype.Ta=function(){return this.h},Wi.prototype.key=function(){return this.l},Wi.prototype.toString=function(){return this.j};function Zf(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var i=e[3];return i&&t!=null?new Wi(t,n,i,Number(e[4])):null}function q1(e,t){this.h=e,this.g=t}function z1(e,t){var n=new se(null,0);n.bb(t.duration);var i=t.streams.filter(function(l){return l.type=="audio"}),r=t.streams.filter(function(l){return l.type=="video"});i=VM(e,i,r,n),r=t.streams.filter(function(l){return l.type==Ce}).map(function(l){return Nc(e,l,n)});var o=t.streams.filter(function(l){return l.type=="image"}).map(function(l){return Nc(e,l,n)}),s=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var u=g(i.values()),a=u.next();!a.done;a=u.next())a=a.value,a.audio&&a.audio.encrypted&&(a.audio.drmInfos=s),a.video&&a.video.encrypted&&(a.video.drmInfos=s);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,imageStreams:o,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}
vendor: 4,891 bytes, line 41
41function VM(e,t,n,i){for(var r=new Set,o=g(t),s=o.next();!s.done;s=o.next()){s=g(s.value.variantIds);for(var u=s.next();!u.done;u=s.next())r.add(u.value)}for(o=g(n),s=o.next();!s.done;s=o.next())for(s=g(s.value.variantIds),u=s.next();!u.done;u=s.next())r.add(u.value);for(o=new Map,r=g(r),s=r.next();!s.done;s=r.next())s=s.value,o.set(s,{id:s,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=g(t),r=t.next();!r.done;r=t.next())for(s=r.value,r=Nc(e,s,i),s=g(s.variantIds),u=s.next();!u.done;u=s.next())u=o.get(u.value),u.language=r.language,u.primary=u.primary||r.primary,u.audio=r;for(n=g(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=Nc(e,r,i),r=g(r.variantIds),s=r.next();!s.done;s=r.next())s=o.get(s.value),s.primary=s.primary||t.primary,s.video=t;return o}function Nc(e,t,n){var i=t.segments.map(function(r){return HM(e,r,t)});return n.Ed(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oe(i),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([Tt(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function HM(e,t,n){var i=new Wi("segment",e.h,e.g,t.dataKey);return e=new oe(t.startTime,t.endTime,function(){return[i.toString()]},0,null,t.initSegmentKey!=null?GM(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.Ge(t.thumbnailSprite),e}function GM(e,t){var n=new Wi("segment",e.h,e.g,t);return new Cn(function(){return[n.toString()]},0,null)}function Y1(){this.g=null}f=Y1.prototype,f.configure=function(){},f.start=function(e,t){var n=this,i,r,o,s,u,a,l;return C(function(c){switch(c.g){case 1:if(i=Zf(e),n.g=i,i==null||i.g!="manifest")throw new k(2,1,9004,e);return r=new Rn,It(c,2),S(c,r.init(),4);case 4:return S(c,Rc(r,i.Ab(),i.Ta()),5);case 5:return o=c.h,S(c,o.getManifests([i.key()]),6);case 6:return s=c.h,u=s[0],a=new q1(i.Ab(),i.Ta()),l=z1(a,u),t.makeTextStreamsForClosedCaptions(l),c.return(l);case 2:return qt(c),S(c,r.destroy(),7);case 7:jt(c,0)}})},f.stop=function(){return Promise.resolve()},f.update=function(){},f.onExpirationUpdated=function(e,t){var n=this,i,r,o,s,u,a,l;return C(function(c){switch(c.g){case 1:return i=n.g,r=new Rn,ee(c,2,3),S(c,r.init(),5);case 5:return S(c,Rc(r,i.Ab(),i.Ta()),6);case 6:return o=c.h,S(c,o.getManifests([i.key()]),7);case 7:if(s=c.h,u=s[0],a=u.sessionIds.includes(e),l=u.expiration==null||u.expiration>t,!a||!l){c.s(3);break}return S(c,o.updateManifestExpiration(i.key(),t),3);case 3:return qt(c),S(c,r.destroy(),10);case 10:jt(c,0);break;case 2:re(c),c.s(3)}})},f.onInitialVariantChosen=function(){},f.banLocation=function(){},f.setMediaElement=function(){},yo("application/x-offline-manifest",function(){return new Y1});function Q1(){}function $1(e,t){var n=Zf(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=os(e)):e=n&&n.g=="segment"?XM(n.key(),n,t):go(new k(2,1,9004,e)),e}function XM(e,t,n){var i=new Rn;return os(void 0).Ha(function(){return i.init()}).Ha(function(){return Rc(i,t.Ab(),t.Ta())}).Ha(function(r){return r.getSegments([t.key()])}).Ha(function(r){return{uri:t,data:r[0].data,headers:{},originalRequest:n}}).finally(function(){return i.destroy()})}Y("shaka.offline.OfflineScheme",Q1),Q1.plugin=$1,ur("offline",$1);function J1(e,t,n){var i,r,o,s,u,a;return C(function(l){switch(l.g){case 1:i=[];for(var c=[],d=g(n),p=d.next();!p.done;p=d.next()){p=p.value;for(var h=!1,m=g(c),y=m.next();!y.done;y=m.next())if(y=y.value,WM(y.info,p)){y.sessionIds.push(p.sessionId),h=!0;break}h||c.push({info:p,sessionIds:[p.sessionId]})}r=g(c),o=r.next();case 2:if(o.done){l.s(4);break}return s=o.value,u=KM(e,t,s),S(l,u,5);case 5:a=l.h,i=i.concat(a),o=r.next(),l.s(2);break;case 4:return l.return(i)}})}function KM(e,t,n){var i,r;return C(function(o){switch(o.g){case 1:return i=new el({Xb:t,onError:function(){},te:function(){},onExpirationUpdated:function(){},onEvent:function(){}}
41),ee(o,2),i.configure(e),S(o,zw(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:fe(o,3);break;case 2:return re(o),S(o,i.destroy(),5);case 5:return o.return([]);case 3:return r=[],S(o,Promise.all(n.sessionIds.map(function(s){return C(function(u){if(u.g==1)return ee(u,2),S(u,$w(i,s),4);if(u.g!=2)return r.push(s),fe(u,0);re(u),q(u)})})),6);case 6:return S(o,i.destroy(),7);case 7:return o.return(r)}})}function WM(e,t){function n(i,r){return i.robustness==r.robustness&&i.contentType==r.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Td(e.audioCapabilities,t.audioCapabilities,n)&&Td(e.videoCapabilities,t.videoCapabilities,n)}function qM(e,t,n){var i=t.presentationTimeline.getDuration();return t=Z1(t),{offlineUri:null,originalManifestUri:e,duration:i,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function eh(e,t){var n=z1(new q1(e.Ab(),e.Ta()),t),i=t.appMetadata||{};return n=Z1(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function Z1(e){var t=[],n=Ka(e.variants);n=g(n);for(var i=n.next();!i.done;i=n.next())t.push(fo(i.value));for(e=g(e.textStreams),n=e.next();!n.done;n=e.next())t.push(ho(n.value));return t}function zM(){this.g=new Map}function YM(e,t){var n=t.audio,i=t.video;
41if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(i.id,i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,o=i.bandwidth||t.bandwidth-r;0>=o&&(o=t.bandwidth),e.g.set(n.id,r),e.g.set(i.id,o)}}function QM(e,t){e.g.set(t.id,t.bandwidth||2048)}function eT(e,t){return e=e.g.get(t),e==null&&(e=0),e}function Qt(e){var t=this;if(e&&e.constructor!=G)throw new k(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.yb()):(this.h=Es(),this.g=new tt),this.i=[],this.l=[];var n=!e;this.j=new us(function(){var i,r,o,s,u;return C(function(a){switch(a.g){case 1:return S(a,Promise.all(t.l.map(function(l){return Yf(l)})),2);case 2:for(i=function(){},r=[],o=g(t.i),s=o.next();!s.done;s=o.next())u=s.value,r.push(u.then(i,i));return S(a,Promise.all(r),3);case 3:if(!n){a.s(4);break}return S(a,t.g.destroy(),4);case 4:t.h=null,t.g=null,q(a)}})}),this.m=1e9}function th(){if(Fi())e:{for(var e=g(ca.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}f=Qt.prototype,f.destroy=function(){return this.j.destroy()},f.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=Al(e,t)),br(this.h,e)},f.getConfiguration=function(){var e=Es();return br(e,this.h,Es()),e},f.yb=function(){return this.g},f.store=function(e,t,n,i,r){var o=this,s=this.getConfiguration(),u=new F1(this.g);return this.l.push(u),t=$M(this,e,t||{},i||[],r||[],function(){var a;return C(function(l){return l.g==1?n?l.s(2):S(l,Mo(e,o.g,s.manifest.retryParameters),3):(l.g!=2&&(n=l.h),a=Lm(e,n||null),l.return(a()))})},s,u),t=new St(t,function(){return Yf(u)}),t.finally(function(){wi(o.l,u)}),fC(this,t)};function $M(e,t,n,i,r,o,s,u){var a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H;return C(function(V){switch(V.g){case 1:return jc(),l=a=null,c=new Rn,h=p=d=null,ee(V,2,3),S(V,o(),5);case 5:return a=V.h,S(V,sC(e,t,a,s),6);case 6:if(m=V.h,zn(e),y=!m.presentationTimeline.U()&&!m.presentationTimeline.yc(),!y)throw new k(2,9,9005,t);v=g(i),T=v.next();case 7:if(T.done){V.s(9);break}return w=T.value,S(V,uC(e,w,m),10);case 10:I=V.h,m.imageStreams.push(I),zn(e),T=v.next(),V.s(7);break;case 9:M=g(r),R=M.next();case 11:return R.done?(Am(s.drm.clearKeys,m.variants),D=m.variants.some(function(X){if(X.audio){for(var K=g(X.audio.drmInfos),pe=K.next();!pe.done;pe=K.next())if(pe.value.licenseServerUri.startsWith("data:"))return!0}if(X.video){for(X=g(X.video.drmInfos),K=X.next();!K.done;K=X.next())if(K.value.licenseServerUri.startsWith("data:"))return!0}return!1}),P=s.offline.usePersistentLicense,D&&(P=!1),S(V,e.Lc(m,function(X){h=h||X},s,P),15)):(A=R.value,S(V,aC(e,m,A.uri,A.language,A.kind,A.mime,A.codecs),14));case 14:E=V.h,m.textStreams.push(E),zn(e),R=M.next(),V.s(11);break;case 15:if(l=V.h,zn(e),h)throw h;return S(V,ZM(m,l,s,P),16);case 16:return S(V,c.init(),17);case 17:return zn(e),S(V,G1(c),18);case 18:return d=V.h,zn(e),O=eC(l,m,t,n,s,u,P),L=O.$i,U=O.vg,S(V,d.Ta.addManifests([L]),19);case 19:if(_=V.h,zn(e),p=_[0],zn(e),h)throw h;return S(V,JM(e,U,p,L,u,s,d.Ta,m,l,P),20);case 20:return zn(e),rT(m,L,l,P),S(V,d.Ta.updateManifest(p,L),21);case 21:return zn(e),F=new Wi("manifest",d.path.Ab,d.path.Ta,p),V.return(eh(F,L));case 3:return qt(V),S(V,c.destroy(),22);case 22:if(!a){V.s(23);break}return S(V,a.stop(),23);case 23:if(!l){V.s(25);break}return S(V,l.destroy(),25);case 25:jt(V,0);break;case 2:if(H=re(V),p==null){V.s(27);break}return S(V,tT(p),27);case 27:throw h||H}})}function JM(e,t,n,i,r,o,s,u,a,l){var c,d,p,h,m,y,v,T,w,I,M;return C(function(R){switch(R.g){case 1:if(c={},d=0,p=function(){if(e.j.g||r.l)throw new k(2,9,7001)},h=function(A,E){var D,P,O,L,U,_,F,H,V;return C(function(X){if(X.g==1){for(D=g(A),P=D.next(),O={};!P.done;O={Nb:void 0},P=D.next())O.Nb=P.value,p(),L=IM(O.Nb,o),U=O.Nb.i,_=O.Nb.h,F=function(K){return function(pe){var te,Be,De,xe;return C(function(Ae){switch(Ae.g){case 1:if(te=K.Nb.g,Be=te.Ib(!1),!te.aesKey||Be){Ae.s(2);break}return S(Ae,wp(pe,te.aesKey,K.Nb.j),3);case 3:pe=Ae.h;case 2:return De=zf(te),S(Ae,s.addSegments([{data:pe}]),4);case 4:xe=Ae.h,p(),c[De]=xe[0],d+=pe.byteLength,q(Ae)}})}}(O),H=O.Nb.g,(V=H.Ib(!1))?kM(r,O.Nb.groupId,V,U,_,F):CM(r,O.Nb.groupId,L,U,_,F);return S(X,DM(r),2)}return p(),!E||r.l?X.s(0):(rT(u,i,a,l),S(X,s.updateManifest(n,i),0))})},m=!1,ee(R,2),!nh(u)||!m||iT(u)){R.s(4);break}return S(R,h(t.filter(function(A){return A.h}),!0),5);case 5:return p(),t=t.filter(function(A){return!A.h}),y=c,v=d,c={},d=0,S(R,nT(s,n,i,y,v,function(){return zn(e)}),6);case 6:p();case 4:if(m){R.s(7);break}return S(R,h(t,!1),8);case 8:return p(),T=c,w=d,c={},d=0,S(R,nT(s,n,i,T,w,function(){return p()}),9);case 9:p();case 7:fe(R,0);break;case 2:return I=re(R),M=Object.values(c),S(R,s.removeSegments(M,function(){}),10);case 10:throw I}})}function tT(e){var t,n,i,r;return C(function(o){switch(o.g){case 1:return t=new Rn,S(o,t.init(),2);case 2:return S(o,G1(t),3);case 3:return n=o.h,i=new Wi("manifest",n.path.Ab,n.path.Ta,e),S(o,t.destroy(),4);case 4:return r=new Qt,S(o,r.remove(i.toString()),0)}})}function nT(e,t,n,i,r,o){var s,u,a,l,c,d,p,h,m,y,v;return C(function(T){switch(T.g){case 1:for(s=!1,ee(T,2),u=!0,a=g(n.streams),l=a.next();!l.done;l=a.next())for(c=l.value,d=g(c.segments),p=d.next();!p.done;
41p=d.next())h=p.value,m=h.pendingSegmentRefId?i[h.pendingSegmentRefId]:null,m!=null&&(h.dataKey=m,h.pendingSegmentRefId=void 0),m=h.pendingInitSegmentRefId?i[h.pendingInitSegmentRefId]:null,m!=null&&(h.initSegmentKey=m,h.pendingInitSegmentRefId=void 0),h.pendingSegmentRefId&&(u=!1),h.pendingInitSegmentRefId&&(u=!1);return n.size+=r,u&&(n.isIncomplete=!1),S(T,e.updateManifest(t,n),4);case 4:s=!0,o(),fe(T,0);break;case 2:return y=re(T),S(T,tT(t),5);case 5:if(s){T.s(6);break}return v=Object.values(i),S(T,e.removeSegments(v,function(){}),6);case 6:throw y}})}function ZM(e,t,n,i){var r,o,s,u,a,l,c,d,p,h,m,y,v,T,w,I,M,R,A,E,D,P,O,L,U,_,F,H,V,X;return C(function(K){switch(K.g){case 1:return r={width:1/0,height:1/0},Dw(e,n.restrictions,r),S(K,Gg(t,e,i,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(o=[],s=n.preferredDecodingAttributes,u=n.preferredVideoCodecs,a=n.preferredAudioCodecs,l=n.preferredTextFormats,Hg(e,u,a,s,l),c=g(e.variants),d=c.next();!d.done;d=c.next())p=d.value,o.push(fo(p));for(h=g(e.textStreams),m=h.next();!m.done;m=h.next())y=m.value,o.push(ho(y));for(v=g(e.imageStreams),T=v.next();!T.done;T=v.next())w=T.value,o.push(bd(w));return S(K,n.offline.trackSelectionCallback(o),3);case 3:for(I=K.h,M=e.presentationTimeline.getDuration(),R=0,A=g(I),E=A.next();!E.done;E=A.next())D=E.value,P=D.bandwidth*M/8,R+=P;return ee(K,4),S(K,n.offline.downloadSizeCallback(R),6);case 6:if(O=K.h,!O)throw new k(2,9,9014);fe(K,5);break;case 4:throw L=re(K),L instanceof k?L:new k(2,9,9015);case 5:for(U=new Set,_=new Set,F=new Set,H=g(I),V=H.next();!V.done;V=H.next())X=V.value,X.type=="variant"&&U.add(X.id),X.type=="text"&&_.add(X.id),X.type=="image"&&F.add(X.id);e.variants=e.variants.filter(function(pe){return U.has(pe.id)}),e.textStreams=e.textStreams.filter(function(pe){return _.has(pe.id)}),e.imageStreams=e.imageStreams.filter(function(pe){return F.has(pe.id)}),mC(e),q(K)}})}function eC(e,t,n,i,r,o,s){var u=qM(n,t,i),a=r.offline.progressCallback;MM(o,function(m,y){u.size=y,a(u,m)},function(m,y){l&&s&&c==y&&mu(e,"cenc",m)});var l=nh(t)&&!iT(t),c=null;l&&(c=vC.get(e.h.keySystem));for(var d=new zM,p=g(t.textStreams),h=p.next();!h.done;h=p.next())d.g.set(h.value.id,52);for(p=g(t.imageStreams),h=p.next();!h.done;h=p.next())QM(d,h.value);for(p=g(t.variants),h=p.next();!h.done;h=p.next())YM(d,h.value);return o=cC(o,d,t,r),r=o.streams,o=o.vg,(d=e.h)&&s&&(d.initData=[]),{$i:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.pd(),streams:r,sessionIds:s?mm(e):[],drmInfo:d,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},vg:o}}function nh(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function iT(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function rT(e,t,n,i){if(t.expiration=n.pd(),n=mm(n),t.sessionIds=i?n:[],nh(e)&&i&&!n.length)throw new k(2,9,9007)}f.remove=function(e){return ih(this,tC(this,e))};function tC(e,t){var n,i,r,o,s,u;return C(function(a){switch(a.g){case 1:if(jc(),n=Zf(t),n==null||n.g!="manifest")throw new k(2,9,9004,t);return i=n,r=new Rn,It(a,2),S(a,r.init(),4);case 4:return S(a,Rc(r,i.Ab(),i.Ta()),5);case 5:return o=a.h,S(a,o.getManifests([i.key()]),6);case 6:return s=a.h,u=s[0],S(a,Promise.all([nC(e,u,r),iC(o,i,u)]),2);case 2:return qt(a),S(a,r.destroy(),8);case 8:jt(a,0)}})}function oT(e,t){for(var n=[],i=g(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&r.type=="video"?n.push({contentType:Tt(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||r.type!="audio"||n.push({contentType:Tt(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function nC(e,t,n){return C(function(i){return S(i,gC(e.g,e.h.drm,n,t),0)})}function iC(e,t,n){function i(){}var r=hC(n);return eh(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}f.sj=function(){return ih(this,rC(this))};function rC(e){var t,n,i,r,o,s,u,a,l,c;return C(function(d){switch(d.g){case 1:return jc(),t=e.g,n=e.h.drm,i=new Rn,r=!1,It(d,2),S(d,i.init(),4);case 4:o=[],NM(i,function(p){return o.push(p)}),s=g(o),u=s.next();case 5:if(u.done){d.s(2);break}return a=u.value,S(d,a.getAll(),8);case 8:return l=d.h,S(d,J1(n,t,l),9);case 9:return c=d.h,S(d,a.remove(c),10);case 10:c.length!=l.length&&(r=!0),u=s.next(),d.s(5);break;case 2:return qt(d),S(d,i.destroy(),11);case 11:jt(d,3);break;case 3:return d.return(!r)}})}f.list=function(){return ih(this,oC())};function oC(){var e,t,n;return C(function(i){switch(i.g){case 1:return jc(),e=[],t=new Rn,It(i,2),S(i,t.init(),4);case 4:return n=Promise.resolve(),LM(t,function(r,o){n=n.then(function(){var s;return C(function(u){if(u.g==1)return S(u,o.getAllManifests(),2);
41s=u.h,s.forEach(function(a,l){a=eh(new Wi("manifest",r.Ab,r.Ta,l),a),e.push(a)}),q(u)})})}),S(i,n,2);case 2:return qt(i),S(i,t.destroy(),6);case 6:jt(i,3);break;case 3:return i.return(e)}})}function sC(e,t,n,i){var r,o,s,u,a;return C(function(l){if(l.g==1)return r=null,o=e.g,s={networkingEngine:o,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(c){r=c},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return i.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(i.manifest),zn(e),S(l,n.start(t,s),2);if(l.g!=3)return u=l.h,zn(e),a=uT(u),S(l,Promise.all(Gd(a,function(c){return c.createSegmentIndex()})),3);if(zn(e),r)throw r;return l.return(u)})}function uC(e,t,n){var i,r,o,s,u,a,l,c,d,p,h,m,y,v,T;return C(function(w){switch(w.g){case 1:return S(w,sT(e,t),2);case 2:if(i=w.h,i!="text/vtt")throw new k(1,2,2017,t);return S(w,lC(t,e.g,e.h.streaming.retryParameters),3);case 3:if(r=w.h,o=cu(i),!o)throw new k(2,2,2014,i);for(s=o(),u={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},a=he(r),l=s.parseMedia(a,u,t,[]),c=[],d=g(l),p=d.next(),h={};!p.done;h={Pe:void 0,Nc:void 0},p=d.next())h.Nc=p.value,h.Pe=null,m=function(I){return function(){return I.Pe==null&&(I.Pe=Gt([t],[I.Nc.payload])),I.Pe||[]}}(h),y=new oe(h.Nc.startTime,h.Nc.endTime,m,0,null,null,0,0,1/0),h.Nc.payload.includes("#xywh")&&(v=h.Nc.payload.split("#xywh=")[1].split(","),v.length===4&&y.Ge({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),c.push(y);if(T=i,!c.length){w.s(4);break}return S(w,Mo(c[0].N()[0],e.g,e.h.manifest.retryParameters),5);case 5:T=w.h;case 4:return w.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oe(c),mimeType:T||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Tt(T||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}function aC(e,t,n,i,r,o,s){var u,a,l;return C(function(c){if(c.g==1)return o?c.s(2):S(c,sT(e,n),3);if(c.g!=2&&(o=c.h),u={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:hl(0,t.presentationTimeline.getDuration(),[n]),mimeType:o||"",codecs:s||"",kind:r,encrypted:!1,drmInfos:[],keyIds:new Set,language:i,originalLanguage:i,label:null,type:Ce,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Tt(o||"",s||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},a=Tt(u.mimeType,u.codecs),l=ns(a),!l)throw new k(2,2,2014,o);return c.return(u)})}function sT(e,t){var n;return C(function(i){switch(i.g){case 1:return ee(i,2),S(i,Mo(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,fe(i,3);break;case 2:re(i);case 3:if(n)return i.return(n);throw new k(1,2,2011,t)}})}function lC(e,t,n){var i,r,o;return C(function(s){return s.g==1?(i=Ai,r=Ot([e],n),r.method="GET",S(s,t.request(i,r).promise,2)):(o=s.h,s.return(o.data))})}f.Lc=function(e,t,n,i){var r=this,o;return C(function(s){return s.g==1?(o=new el({Xb:r.g,onError:t,te:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.configure(n.drm),S(s,qw(o,e.variants,i),2)):s.g!=3?S(s,gm(o),3):s.return(o)})};function cC(e,t,n,i){var r=new Map,o=uT(n),s=new Map;o=g(o);for(var u=o.next();!u.done;u=o.next()){u=u.value;var a=dC(e,t,n,u,i,r);s.set(u.id,a)}for(e=g(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&s.get(t.audio.id).variantIds.push(t.id),t.video&&s.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(s.values()),vg:Array.from(r.values())}}function dC(e,t,n,i,r,o){var s={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,mssPrivateData:i.mssPrivateData,external:i.external,fastSwitching:i.fastSwitching,isAudioMuxedInVideo:i.isAudioMuxedInVideo},u=r.offline.numberOfParallelDownloads,a=u===0?i.id:0;return pC(i,n.presentationTimeline.pb(),function(l,c){var d=zf(l),p=void 0;if(!o.has(d)){var h=l.endTime-l.startTime;h=eT(t,i.id)*h,h=_1(e.g,h),o.set(d,new U1(l,h,a,!1,c))}l.Y&&(p=zf(l.Y),o.has(p)||(h=.5*eT(t,i.id),h=_1(e.g,h),o.set(p,new U1(l.Y,h,a,!0,c)))),s.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:d,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite}),u!==0&&(a=(a+1)%u)}),s}function pC(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}function zn(e){if(e.j.g)throw new k(2,9,7001)}function jc(){if(!th())throw new k(2,9,9e3)}function ih(e,t){return C(function(n){return n.g==1?(e.i.push(t),It(n,2),S(n,t,4)):n.g!=2?n.return(n.h):(qt(n),wi(e.i,t),jt(n,0))})}function fC(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){wi(e.i,n)})}function hC(e){var t=new Set;e=g(e.streams);for(var n=e.next();!n.done;n=e.next()){n=g(n.value.segments);for(var i=n.next();!i.done;i=n.next())i=i.value,i.initSegmentKey!=null&&t.add(i.initSegmentKey),t.add(i.dataKey)}return Array.from(t)}function gC(e,t,n,i){var r,o,s;return C(function(u){return u.g==1?i.drmInfo?(r=jM(n),o=i.sessionIds.map(function(a){return{sessionId:a,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:oT(i,!1),videoCapabilities:oT(i,!0)}}),S(u,J1(t,e,o),2)):u.return():u.g!=3?(s=u.h,S(u,r.remove(s),3)):S(u,r.add(o.filter(function(a){return!s.includes(a.sessionId)})),0)})}function uT(e){for(var t=new Set,n=g(e.variants),i=n.next();!i.done;i=n.next())i=i.value,i.audio&&t.add(i.audio),i.video&&t.add(i.video);for(n=g(e.textStreams),i=n.next();!i.done;i=n.next())t.add(i.value);for(e=g(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function mC(e){e.variants.map(function(o){return o.video});var t=new Set(e.variants.map(function(o){return o.audio}));e=e.textStreams;for(var n=g(t),i=n.next();!i.done;i=n.next()){i=g(t);for(var r=i.next();!r.done;r=i.next());}for(t=g(e),n=t.next();!n.done;n=t.next())for(n=g(e),i=n.next();!i.done;i=n.next());}Y("shaka.offline.Storage",Qt),Qt.deleteAll=function(){var e;return C(function(t){return t.g==1?(e=new Rn,It(t,2),S(t,UM(e),2)):t.g!=5?(qt(t),S(t,e.destroy(),5)):jt(t,0)})},Qt.prototype.list=Qt.prototype.list,Qt.prototype.removeEmeSessions=Qt.prototype.sj,Qt.prototype.remove=Qt.prototype.remove,Qt.prototype.store=Qt.prototype.store,Qt.prototype.getNetworkingEngine=Qt.prototype.yb,Qt.prototype.getConfiguration=Qt.prototype.getConfiguration,Qt.prototype.configure=Qt.prototype.configure,Qt.prototype.destroy=Qt.prototype.destroy,Qt.support=th;var vC=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.softw
41are","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");Gv("offline",th);function pn(){}function Ln(e,t){for(e={priority:t||0,callback:e},t=0;t<pa.length;t++)if(pa[t].priority<e.priority){pa.splice(t,0,e);return}pa.push(e)}Y("shaka.polyfill",pn),pn.register=Ln,pn.installAll=function(){for(var e=g(pa),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){Pe("Error installing polyfill!",n)}}};var pa=[];function aT(){}function lT(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=g(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())yC(t.value)}function yC(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(n){n==null||n==null?this.removeAttribute(t):this.setAttribute(t,n)}})}pn.Aria=aT,aT.install=lT,Ln(lT);function cT(){}function dT(){Di()||xt("Sky_STB")||AS()}pn.EncryptionScheme=cT,cT.install=dT,Ln(dT,-2);function pT(){}function fT(){if(j.Document){var e=Element.prototype;e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,e=Document.prototype,e.exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Bs),document.addEventListener("webkitfullscreenerror",Bs),document.addEventListener("mozfullscreenchange",Bs),document.addEventListener("mozfullscreenerror",Bs),document.addEventListener("MSFullscreenChange",Bs),document.addEventListener("MSFullscreenError",Bs)}}function Bs(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}pn.Fullscreen=pT,pT.install=fT,Ln(fT);function rh(){}function hT(){var e=!0;(Ti()&&!Mr()&&!ad()||Jt()||Xo()||Di()||Ji()||Bi()||La()||Ko()&&!Jt())&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),gT=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=TC)}function TC(e){var t,n,i,r,o,s,u,a,l,c,d;return C(function(p){switch(p.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},n=e.video,i=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(r=n.contentType,o=Zs(r),!o)||i&&(s=i.contentType,u=Zs(s),!u))return p.return(t)}else return p.return(t);p.s(2);break}if(!Fi())return p.return(t);if(!n){p.s(3);break}return S(p,SC(n),4);case 4:if(a=p.h,!a)return p.return(t);case 3:if(i){var h=i.contentType;if(Ti()&&i.spatialRendering&&(h+="; spatialRendering=true"),l=Zt(h),!l)return p.return(t)}case 2:return e.keySystemConfiguration?(c=e.keySystemConfiguration,S(p,wC(n,i,c),6)):(t.supported=!0,p.return(t));case 6:(d=p.h)&&(t.supported=!0,t.keySystemAccess=d);case 5:return p.return(t)}})}function SC(e){var t;return C(function(n){return n.g==1?Ti()?S(n,xC(e),3):n.s(2):n.g!=2?(t=n.h,n.return(t)):n.return(Zt(e.contentType))})}function wC(e,t,n){var i,r,o,s,u,a,l,c,d,p,h;return C(function(m){switch(m.g){case 1:if(i=[],r=[],n.audio&&(o={robustness:n.audio.robustness||"",contentType:t.contentType},Bi()&&t.contentType.includes('codecs="ac-3"')&&(o.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(o.encryptionScheme=n.audio.encryptionScheme),i.push(o)),n.video&&(s={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(s.encryptionScheme=n.video.encryptionScheme),r.push(s)),u={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},i.length&&(u.audioCapabilities=i),r.length&&(u.videoCapabilities=r),a=e?e.contentType:"",l=t?t.contentType:"",c=On(a)+";"+Nr(a),d=On(l)+";"+Nr(l),p=n.keySystem,h=null,ee(m,2),Ho.has(c+"#"+d+"#"+p)){h=Ho.get(c+"#"+d+"#"+p)||null,m.s(4);break}return S(m,navigator.requestMediaKeySystemAccess(n.keySystem,[u]),5);case 5:h=m.h,Ho.set(c+"#"+d+"#"+p,h);case 4:fe(m,3);break;case 2:re(m);
41case 3:return m.return(h)}})}function xC(e){var t,n,i,r,o;return C(function(s){if(s.g==1){if(!(j.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return s.return(Zt(e.contentType));switch(t=e.contentType,e.width&&e.height&&1280<e.width&&720<e.height&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),24>n||30<n)&&(t+="; framerate="+e.framerate),i=e.transferFunction||"",i){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return s.return(!1)}return r=!1,o=EC,o.has(t)?(r=o.get(t),s.s(2)):S(s,cast.__platform__.canDisplayType(t),3)}return s.g!=2&&(r=s.h,o.set(t,r)),s.return(r)})}pn.MediaCapabilities=rh,rh.install=hT;var gT=null;rh.originalMcap=gT;var EC=new Map;Ln(hT,-1);function mT(){}function vT(){var e=lg();(j.MediaSource||j.ManagedMediaSource)&&(e&&j.MediaSource?12>=e?(oh(),yT()):15>=e&&oh():xt("DT_STB_BCM")?(oh(),yT()):(xt("Tizen 2")||$i()||xt("Tizen 4"))&&IC()),(j.MediaSource||j.ManagedMediaSource)&&AC(),j.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&MC()}function oh(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,mt.apply(0,arguments));return t.abort=function(){},t}}function yT(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function AC(){if(j.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return Ha(n)!="mp2t"&&e(n)}}if(j.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);j.ManagedMediaSource.isTypeSupported=function(n){return Ha(n)!="mp2t"&&t(n)}}}function IC(){var e=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(n){return Nr(n)!="opus"&&e(n)},j.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);j.ManagedMediaSource.isTypeSupported=function(n){return Nr(n)!="opus"&&t(n)}}}function MC(){var e=MediaSource.isTypeSupported;Ji()||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex(function(s){return s.startsWith("codecs=")});if(0>i)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),o=r.findIndex(function(s){return s.startsWith("vp09")});return 0<=o&&(r[o]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)})}pn.MediaSource=mT,mT.install=vT,Ln(vT);function TT(){}function ST(){screen.orientation&&screen.orientation.unlock||(screen.orientation!=null?CC():j.orientation!=null&&kC())}function CC(){screen.orientation.lock===void 0&&(screen.orientation.lock=function(){return Promise.resolve()}),screen.orientation.unlock===void 0&&(screen.orientation.unlock=function(){})}function kC(){function e(){switch(j.orientation){case-90:t.type="landscape-secondary",t.angle=270;break;case 0:t.type="portrait-primary",t.angle=0;break;case 90:t.type="landscape-primary",t.angle=90;break;case 180:t.type="portrait-secondary",t.angle=180}}var t=new Uc;screen.orientation=t,e(),j.addEventListener("orientationchange",function(){e();var n=new z("change");t.dispatchEvent(n)})}pn.Orientation=TT,TT.install=ST;function Uc(){qe.call(this),this.type="",this.angle=0}ct(Uc,qe),Uc.prototype.lock=function(e){function t(i){return screen.lockOrientation?screen.lockOrientation(i):screen.mozLockOrientation?screen.mozLockOrientation(i):screen.msLockOrientation?screen.msLockOrientation(i):!1}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():(e=Error("screen.orientation.lock() is not available on this device"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},Uc.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},Ln(ST);function sh(){}var uh,ah,lh,ch,dh,ph;function wT(e){j.HTMLVideoElement&&j.WebKitMediaKeys&&(e!==void 0&&e&&(uh=!0,ah=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),lh=HTMLMediaElement.prototype.setMediaKeys,ch=j.MediaKeys,dh=j.MediaKeySystemAccess,ph=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=PC,j.MediaKeys=fa,j.MediaKeySystemAccess=Oc,navigator.requestMediaKeySystemAccess=DC,j.shakaMediaKeysPolyfill=LC,Wa.clear(),Ho.clear())}function DC(e,t){try{var n=new Oc(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function PC(e){var t=this.mediaKeys;return t&&t!=e&&xT(t,null),delete this.mediaKeys,(this.mediaKeys=e)?xT(e,this):Promise.resolve()}function RC(e){if(e=he(e.initData),An(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Cr(e.subarray(4),!0),e=Si(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=ri(e),this.dispatchEvent(t)}pn.PatchedMediaKeysApple=sh,sh.uninstall=function(){uh&&(uh=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",ah),HTMLMediaElement.prototype.setMediaKeys=lh,j.MediaKeys=ch,j.MediaKeySystemAccess=dh,navigator.requestMediaKeySystemAccess=ph,ah=ph=lh=dh=ch=null,j.shakaMediaKeysPolyfill="",Wa.clear(),Ho.clear())},sh.install=wT;function Oc(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=g(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var o=g(n.audioCapabilities),s=o.next();!s.done;s=o.next())s=s.value,s.contentType&&(i=!0,WebKitMediaKeys.isTypeSupp
vendor: 6,504 bytes, line 41
41orted(this.keySystem,s.contentType.split(";")[0])&&(t.audioCapabilities.push(s),r=!0));if(n.videoCapabilities)for(n=g(n.videoCapabilities),o=n.next();!o.done;o=n.next())o=o.value,o.contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.videoCapabilities.push(o),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}Oc.prototype.createMediaKeys=function(){var e=new fa(this.keySystem);return Promise.resolve(e)},Oc.prototype.getConfiguration=function(){return this.g};function fa(e){this.h=new WebKitMediaKeys(e),this.g=new Le}fa.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new fh(this.h)},fa.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function xT(e,t){if(e.g.Ra(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",RC);try{return Ts(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}fa.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function fh(e){qe.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Le,this.sessionId="",this.expiration=NaN,this.closed=new We,this.keyStatuses=new ET}ct(fh,qe),f=fh.prototype,f.generateRequest=function(e,t){var n=this;this.h=new We;try{var i=this.l.createSession("video/mp4",he(t));this.i=i,this.sessionId=i.sessionId||"",this.j.D(this.i,"webkitkeymessage",function(r){n.h&&(n.h.resolve(),n.h=null),r=new Map().set("messageType",n.keyStatuses.dc()==null?"license-request":"license-renewal").set("message",ri(r.message)),r=new z("message",r),n.dispatchEvent(r)}),this.j.D(i,"webkitkeyadded",function(){n.g&&(_c(n,"usable"),n.g.resolve(),n.g=null)}),this.j.D(i,"webkitkeyerror",function(){var r=Error("EME PatchedMediaKeysApple key error");if(r.errorCode=n.i.error,n.h!=null)n.h.reject(r),n.h=null;else if(n.g!=null)n.g.reject(r),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:_c(n,"output-not-allowed");break;default:_c(n,"internal-error")}}),_c(this,"status-pending")}catch(r){this.h.reject(r)}return this.h},f.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},f.update=function(e){this.g=new We;try{this.i.update(he(e))}catch(t){this.g.reject(t)}return this.g},f.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(e){this.closed.reject(e)}return this.closed},f.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function _c(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new z("keystatuseschange"),e.dispatchEvent(t)}function ET(){this.size=0,this.g=void 0}f=ET.prototype,f.dc=function(){return this.g},f.forEach=function(e){this.g&&e(this.g,Pa.value())},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=Pa.value();return!!(this.g&&Qi(e,t))},f.entries=function(){},f.keys=function(){},f.values=function(){};var LC="apple";Ln(function(){j.HTMLVideoElement&&j.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||wT())});function AT(){}function IT(){j.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||$i()||xt("Tizen 4")||xt("Tizen 5.0")||Ra())&&(MediaKeys.prototype.setServerCertificate=NC)}function NC(){return Promise.resolve(!1)}pn.PatchedMediaKeysCert=AT,AT.install=IT,Ln(IT);function MT(){}function CT(){if(!(!j.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)yh="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=jC,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=UC,j.MediaKeys=ha,j.MediaKeySystemAccess=bc,j.shakaMediaKeysPolyfill=OC}}function hh(e){var t=yh;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function jC(e,t){try{var n=new bc(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function UC(e){var t=this.mediaKeys;return t&&t!=e&&kT(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&kT(e,this),Promise.resolve()}pn.PatchedMediaKeysWebkit=MT,MT.install=CT;function bc(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video"),t=g(t);for(var o=t.next();!o.done;o=t.next()){o=o.value;var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var a=g(o.audioCapabilities),l=a.next();!l.done;l=a.next())l=l.value,l.contentType&&(u=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(l),i=!0));if(o.videoCapabilities)for(a=g(o.videoCapabilities),l=a.next();!l.done;l=a.next())l=l.value,l.contentType&&(u=!0,r.canPlayType(l.contentType,this.g)&&(s.videoCapabilities.push(l),i=!0));if(u||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),o.persistentState=="required"&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):i=!1),i){this.h=s;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}bc.prototype.createMediaKeys=function(){var e=new ha(this.g);return Promise.resolve(e)},bc.prototype.getConfiguration=function(){return this.h};function ha(e){this.l=e,this.h=null,this.g=new Le,this.i=[],this.j=new Map}function kT(e,t){e.h=t,e.g.Ra();var n=yh;t&&(e.g.D(t,n+"needkey",function(i){var r=new CustomEvent("encrypted");r.initDataType="cenc",r.initData=ri(i.initData),e.h.dispatchEvent(r)}),e.g.D(t,n+"keymessage",function(i){var r=gh(e,i.sessionId);r&&(i=new Map().set("messageType",r.keyStatuses.dc()==null?"licenserequest":"licenserenewal").set("message",i.message),i=new z("message",i),r.h&&(r.h.resolve(),r.h=null),r.dispatchEvent(i))}
41),e.g.D(t,n+"keyadded",function(i){(i=gh(e,i.sessionId))&&i.ready()}),e.g.D(t,n+"keyerror",function(i){var r=gh(e,i.sessionId);if(r){var o=Error("EME v0.1b key error"),s=i.errorCode;s.systemCode=i.systemCode,o.errorCode=s,!i.sessionId&&r.h?(i.systemCode==45&&(o.message="Unsupported session type."),r.h.reject(o),r.h=null):i.sessionId&&r.g?(r.g.reject(o),r.g=null):(o=i.systemCode,i.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Fc(r,"output-restricted"):o==1?Fc(r,"expired"):Fc(r,"internal-error"))}}))}ha.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new mh(t,this.l,e),this.i.push(e),e},ha.prototype.setServerCertificate=function(){return Promise.resolve(!1)},ha.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function gh(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function mh(e,t,n){qe.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new We,this.keyStatuses=new PT}ct(mh,qe),f=mh.prototype,f.ready=function(){Fc(this,"usable"),this.g&&this.g.resolve(),this.g=null};function DT(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if(e.l=="persistent-license")if(n)var i=he(Si("LOAD_SESSION|"+n));else{var r=Si("PERSISTENT|");i=yt(r,t)}else i=he(t)}catch(s){return Promise.reject(s)}e.h=new We;var o=hh("generateKeyRequest");try{e.j[o](e.i,i)}catch(s){if(s.name!="InvalidStateError")return e.h=null,Promise.reject(s);new ke(function(){try{e.j[o](e.i,i)}catch(u){e.h.reject(u),e.h=null}}).da(.01)}return e.h}function vh(e,t,n){if(e.g)e.g.then(function(){return vh(e,t,n)}).catch(function(){return vh(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var i=at(n),r=JSON.parse(i);r.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=oi(r.keys[0].k),r=oi(r.keys[0].kid)}else i=he(n),r=null;var o=hh("addKey");try{e.j[o](e.i,i,r,e.sessionId)}catch(s){e.g.reject(s),e.g=null}}}function Fc(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new z("keystatuseschange"),e.dispatchEvent(t)}f.generateRequest=function(e,t){return DT(this,t,null)},f.load=function(e){return this.l=="persistent-license"?DT(this,null,e):Promise.reject(Error("Not a persistent session."))},f.update=function(e){var t=new We;return vh(this,t,e),t},f.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=hh("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},f.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function PT(){this.size=0,this.g=void 0}f=PT.prototype,f.dc=function(){return this.g},f.forEach=function(e){this.g&&e(this.g,Pa.value())},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=Pa.value();return!!(this.g&&Qi(e,t))},f.entries=function(){},f.keys=function(){},f.values=function(){};var yh="",OC="webkit";Ln(CT);function RT(){}function LT(){if(j.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=bC,Object.defineProperty(e,"disablePictureInPicture",{get:BC,set:VC,enumerable:!0,configurable:!0}),document.exitPictureInPicture=FC,document.addEventListener("webkitpresentationmodechanged",_C,!0))}}function _C(e){if(e=e.target,e.webkitPresentationMode=="picture-in-picture"){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function bC(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function FC(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function BC(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function VC(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}pn.PiPWebkit=RT,RT.install=LT,Ln(LT);function NT(){}function jT(){j.crypto&&("randomUUID"in j.crypto||(j.crypto.randomUUID=HC))}function HC(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}pn.RandomUUID=NT,NT.install=jT,Ln(jT);function UT(){}function OT(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:GC})}function GC(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}pn.Symbol=UT,UT.install=OT,Ln(OT);function _T(){}function bT(){if(j.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}
41pn.VideoPlayPromise=_T,_T.install=bT,Ln(bT);function FT(){}function BT(){if(j.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||Ra())&&(e.getVideoPlaybackQuality=XC)}}function XC(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}pn.VideoPlaybackQuality=FT,FT.install=BT,Ln(BT);function VT(){}function HT(){if(!j.VTTCue&&j.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=Th;else if(t==6)e=KC;else{try{var n=!!Th(1,2,"")}catch{n=!1}n&&(e=Th)}e&&(j.VTTCue=function(i,r,o){return e(i,r,o)})}}function Th(e,t,n){return new j.TextTrackCue(e,t,n)}function KC(e,t,n){return new j.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}pn.VTTCue=VT,VT.install=HT,Ln(HT);function Yn(){}Yn.prototype.parseInit=function(){},Yn.prototype.setSequenceMode=function(){},Yn.prototype.setManifestType=function(){},Yn.prototype.parseMedia=function(e,t){var n=null,i=[];e=at(e).split(/\r?\n/),e=g(e);for(var r=e.next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=WC.exec(r))){var o=qC.exec(r[1]);o=60*parseInt(o[1],10)+parseFloat(o[2].replace(",",".")),r=new it(o,t.segmentEnd?t.segmentEnd:o+2,r[2]),n&&(n.endTime=o,i.push(n)),n=r}return n&&i.push(n),i},Y("shaka.text.LrcTextParser",Yn),Yn.prototype.parseMedia=Yn.prototype.parseMedia,Yn.prototype.setManifestType=Yn.prototype.setManifestType,Yn.prototype.setSequenceMode=Yn.prototype.setSequenceMode,Yn.prototype.parseInit=Yn.prototype.parseInit;var WC=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,qC=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;en("application/x-subtitle-lrc",function(){return new Yn});function Vn(){}Vn.prototype.parseInit=function(){},Vn.prototype.setSequenceMode=function(){},Vn.prototype.setManifestType=function(){},Vn.prototype.parseMedia=function(e,t,n,i){var r=at(e);if(e=[],r=="")return e;var o=ao(r,"tt",!0);if(!o)throw new k(2,2,2005,"Failed to parse TTML.");if(r=Ri(o,"body")[0],!r)return[];var s=Hi(o,ga,"frameRate"),u=Hi(o,ga,"subFrameRate"),a=Hi(o,ga,"frameRateMultiplier"),l=Hi(o,ga,"tickRate"),c=Hi(o,ga,"cellResolution"),d=o.attributes["xml:space"]||"default",p=Hi(o,Hc,"extent");if(d!="default"&&d!="preserve")throw new k(2,2,2005,"Invalid xml:space value: "+d);d=d=="default",s=new JC(s,u,a,l),c=$C(c),u=Ri(o,"metadata")[0],u=(u?u.children:[]).filter(function(y){return y!=`
42`}),a=Ri(o,"style"),o=Ri(o,"region"),l=[];for(var h=g(o),m=h.next();!m.done;m=h.next())(m=zC(m.value,a,p))&&l.push(m);if(Ge(r,"p").length)throw new k(2,2,2001,"<p> can only be inside <div> in TTML");for(p=g(Ge(r,"div")),h=p.next();!h.done;h=p.next())if(Ge(h.value,"span").length)throw new k(2,2,2001,"<span> can only be inside <p> in TTML");return(t=GT(r,t,s,u,a,o,l,d,c,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function GT(e,t,n,i,r,o,s,u,a,l,c,d,p){var h=l;if(Ua(e)){if(!c)return null;var m={tagName:"span",children:[Ct(e)],attributes:{},parent:null}}else m=e;for(var y=null,v=g(ZT),T=v.next();!T.done&&!(y=Vc(m,"backgroundImage",i,"#",T.value)[0]);T=v.next());v=null,T=Hi(m,ZT,"backgroundImage");var w=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(T&&w.test(T)){if(v=parseInt(T.split(":").pop(),10)-1,v>=p.length)return null;v=p[v]}else d&&T&&!T.startsWith("#")&&(w=new vt(d),T=new vt(T),(T=w.resolve(T).toString())&&(v=T));if((e.tagName=="p"||y||v)&&(c=!0),e=c,T=(m.attributes["xml:space"]||(u?"default":"preserve"))=="default",w=m.children.every(Ua),u=[],!w)for(var I=g(m.children),M=I.next();!M.done;M=I.next())(M=GT(M.value,t,n,i,r,o,s,T,a,m,c,d,p))&&u.push(M);if(i=l!=null,d=Ct(m),d=m.children.length&&d&&/\S/.test(d),I=m.attributes.begin||m.attributes.end||m.attributes.dur,!(I||d||m.tagName=="br"||u.length!=0||i&&!T))return null;for(p=WT(m,n),d=p.start,p=p.end;h&&h.tagName&&h.tagName!="tt";)p=QC(h,n,d,p),d=p.start,p=p.end,h=h.parent;if(d==null&&(d=0),d+=t.periodStart,p=p==null?1/0:p+t.periodStart,d=Math.max(d,t.segmentStart),p=Math.min(p,t.segmentEnd),!I&&0<u.length)for(d=1/0,p=0,t=g(u),n=t.next();!n.done;n=t.next())n=n.value,d=Math.min(d,n.startTime),p=Math.max(p,n.endTime);if(m.tagName=="br")return r=new it(d,p,""),r.lineBreak=!0,r;if(t="",w&&(t=In(Ct(m)||""),T&&(t=t.replace(/\s+/g," "))),t=new it(d,p,t),t.nestedCues=u,c||(t.isContainer=!0),a&&(t.cellResolution=a),a=Vc(m,"region",o,"")[0],m.attributes.region&&a&&a.attributes["xml:id"]){var R=a.attributes["xml:id"];t.region=s.filter(function(A){return A.id==R})[0]}return s=a,l&&i&&!m.attributes.region&&!m.attributes.style&&(s=Vc(l,"region",o,"")[0]),YC(t,m,s,y,v,r,e,u.length==0),t}
42function zC(e,t,n){var i=new ro,r=e.attributes["xml:id"];if(!r)return null;i.id=r,r=null,n&&(r=Ah.exec(n)||Ih.exec(n)),n=r?Number(r[1]):null,r=r?Number(r[2]):null;var o,s=Bc(e,t,"extent");if(s){var u=(o=Ah.exec(s))||Ih.exec(s);u!=null&&(i.width=Number(u[1]),i.height=Number(u[2]),o||(n!=null&&(i.width=100*i.width/n),r!=null&&(i.height=100*i.height/r)),i.widthUnits=o||n!=null?Un:0,i.heightUnits=o||r!=null?Un:0)}return(e=Bc(e,t,"origin"))&&(u=(o=Ah.exec(e))||Ih.exec(e),u!=null&&(i.viewportAnchorX=Number(u[1]),i.viewportAnchorY=Number(u[2]),o?s||(i.width=100-i.viewportAnchorX,i.widthUnits=Un,i.height=100-i.viewportAnchorY,i.heightUnits=Un):(r!=null&&(i.viewportAnchorY=100*i.viewportAnchorY/r),n!=null&&(i.viewportAnchorX=100*i.viewportAnchorX/n)),i.viewportAnchorUnits=o||n!=null?Un:0)),i}function Sh(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function YC(e,t,n,i,r,o,s,u){if(s=s||u,an(t,n,o,"direction",s)=="rtl"&&(e.direction="rtl"),u=an(t,n,o,"writingMode",s),u=="tb"||u=="tblr"?e.writingMode="vertical-lr":u=="tbrl"?e.writingMode="vertical-rl":u=="rltb"||u=="rl"?e.direction="rtl":u&&(e.direction=au),(u=an(t,n,o,"textAlign",!0))?(e.positionAlign=tk.get(u),e.lineAlign=ek.get(u),e.textAlign=Id[u.toUpperCase()]):e.textAlign=Xi,(u=an(t,n,o,"displayAlign",!0))&&(e.displayAlign=Rg[u.toUpperCase()]),(u=an(t,n,o,"color",s))&&(e.color=Sh(u)),(u=an(t,n,o,"backgroundColor",s))&&(e.backgroundColor=Sh(u)),(u=an(t,n,o,"border",s))&&(e.border=u),u=an(t,n,o,"fontFamily",s))switch(u){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=u.split(",").filter(function(a){return a!="default"}).join(",")}switch((u=an(t,n,o,"fontWeight",s))&&u=="bold"&&(e.fontWeight=Zo),u=an(t,n,o,"wrapOption",s),e.wrapLine=!(u&&u=="noWrap"),(u=an(t,n,o,"lineHeight",s))&&u.match(Vs)&&(e.lineHeight=u),(u=an(t,n,o,"fontSize",s))&&(u.match(Vs)||u.match(ZC))&&(e.fontSize=u),(u=an(t,n,o,"fontStyle",s))&&(e.fontStyle=Ug[u.toUpperCase()]),i?(r=i.attributes.imageType||i.attributes.imagetype,u=i.attributes.encoding,i=Ct(i).trim(),r=="PNG"&&u=="Base64"&&i&&(e.backgroundImage="data:image/png;base64,"+i)):r&&(e.backgroundImage=r),(i=an(t,n,o,"textOutline",s))&&(i=i.split(" "),i[0].match(Vs)?e.textStrokeColor=e.color:(e.textStrokeColor=Sh(i[0]),i.shift()),i[0]&&i[0].match(Vs)?e.textStrokeWidth=i[0]:e.textStrokeColor=""),(i=an(t,n,o,"letterSpacing",s))&&i.match(Vs)&&(e.letterSpacing=i),(i=an(t,n,o,"linePadding",s))&&i.match(Vs)&&(e.linePadding=i),(i=an(t,n,o,"opacity",s))&&(e.opacity=parseFloat(i)),(i=Bc(n,o,"textDecoration"))&&XT(e,i),(i=wh(t,o,"textDecoration"))&&XT(e,i),(i=an(t,n,o,"textCombine",s))&&(e.textCombineUpright=i),an(t,n,o,"ruby",s)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}function XT(e,t){t=g(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(ir)||e.textDecoration.push(ir);break;case"noUnderline":e.textDecoration.includes(ir)&&wi(e.textDecoration,ir);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&wi(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&wi(e.textDecoration,"overline")}}function an(e,t,n,i,r){return r=r===void 0?!0:r,(e=wh(e,n,i))?e:r?Bc(t,n,i):null}function Bc(e,t,n){if(!e)return null;var i=Hi(e,Hc,n);return i||KT(e,t,n)}function wh(e,t,n){var i=Hi(e,Hc,n);return i||KT(e,t,n)}function KT(e,t,n){e=Vc(e,"style",t,"");for(var i=null,r=0;r<e.length;r++){var o=tr(e[r],"urn:ebu:tt:style",n);o||(o=Hi(e[r],Hc,n)),o||(o=wh(e[r],t,n)),o&&(i=o)}return i}function Vc(e,t,n,i,r){var o=[];if(!e||1>n.length)return o;var s=e;for(e=null;!e&&!(e=r?tr(s,r,t):s.attributes[t])&&(s=s.parent,s););
vendor: 5,098 bytes, lines 42-43
42if(t=e){for(t=g(t.split(" ")),r=t.next();!r.done;r=t.next())for(r=r.value,e=g(n),s=e.next();!s.done;s=e.next())if(s=s.value,i+s.attributes["xml:id"]==r){o.push(s);break}}return o}function QC(e,t,n,i){return e=WT(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),i==null?i=e.end:e.start!=null&&(i+=e.start),{start:n,end:i}}function WT(e,t){var n=xh(e.attributes.begin,t),i=xh(e.attributes.end,t);return e=xh(e.attributes.dur,t),i==null&&e!=null&&(i=n+e),{start:n,end:i}}function xh(e,t){var n=null;if(qT.test(e)){e=qT.exec(e),n=Number(e[1]);var i=Number(e[2]),r=Number(e[3]),o=Number(e[4]);o+=(Number(e[5])||0)/t.h,r+=o/t.frameRate,n=r+60*i+3600*n}else if(zT.test(e))n=Eh(zT,e);else if(YT.test(e))n=Eh(YT,e);else if(QT.test(e))e=QT.exec(e),n=Number(e[1])/t.frameRate;else if($T.test(e))e=$T.exec(e),n=Number(e[1])/t.g;else if(JT.test(e))n=Eh(JT,e);else if(e)throw new k(2,2,2001,"Could not parse cue time range in TTML");return n}function Eh(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function $C(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{oc:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}Y("shaka.text.TtmlTextParser",Vn),Vn.prototype.parseMedia=Vn.prototype.parseMedia,Vn.prototype.setManifestType=Vn.prototype.setManifestType,Vn.prototype.setSequenceMode=Vn.prototype.setSequenceMode,Vn.prototype.parseInit=Vn.prototype.parseInit;function JC(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var Ah=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ZC=/^(\d{1,4}(?:\.\d+)?|100)%$/,Vs=/^(\d+px|\d+em|\d*\.?\d+c)$/,Ih=/^(\d+)px (\d+)px$/,qT=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,zT=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,YT=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,QT=/^(\d*(?:\.\d*)?)f$/,$T=/^(\d*(?:\.\d*)?)t$/,JT=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ek=new Map().set("left",co).set("center","center").set("right","end").set("start",co).set("end","end"),tk=new Map().set("left","line-left").set("center","center").set("right","line-right"),ga=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Hc=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],ZT=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];en("application/ttml+xml",function(){return new Vn});function bt(){this.g=new Vn}bt.prototype.parseInit=function(e){var t=!1;if(new ze().box("moov",ye).box("trak",ye).box("mdia",ye).box("minf",ye).box("stbl",ye).R("stsd",lr).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new k(2,2,2007)},bt.prototype.setSequenceMode=function(){},bt.prototype.setManifestType=function(){},bt.prototype.parseMedia=function(e,t,n){var i=[],r=null,o=[],s=new Map,u=[];if(new ze().box("moof",ye).box("traf",ye).R("tfhd",function(T){r=nl(T.reader,T.flags).md}).R("trun",function(T){T=ol(T.reader,T.version,T.flags),T=g(T.hg);for(var w=T.next();!w.done;w=T.next())u.push(w.value.sampleSize||r||0)}).R("subs",function(T){for(var w=T.reader,I=w.S(),M=-1,R=0;R<I;R++){var A=w.S();M+=A,A=w.ma();for(var E=[],D=0;D<A;D++)T.version==1?E.push(w.S()):E.push(w.ma()),w.X(),w.X(),w.S();s.set(M,E)}}).box("mdat",as(function(T){o.push(T)})).parse(e,!1),o.length==0)throw new k(2,2,2007);for(var a=yt.apply(tn,W(o)),l=0,c=0;c<u.length;c++){var d=he(a,l,u[c]);l+=u[c];var p=s.get(c);if(p&&p.length){d=he(d,0,p[0]);for(var h=[],m=p[0],y=1;y<p.length;y++){var v=he(e,m,p[y]);v=ja(v),h.push("data:image/png;base64,"+v),m+=p[y]}i=i.concat(this.g.parseMedia(d,t,n,h))}else i=i.concat(this.g.parseMedia(d,t,n,[]))}return i},Y("shaka.text.Mp4TtmlParser",bt),bt.prototype.parseMedia=bt.prototype.parseMedia,bt.prototype.setManifestType=bt.prototype.setManifestType,bt.prototype.setSequenceMode=bt.prototype.setSequenceMode,bt.prototype.parseInit=bt.prototype.parseInit,en('application/mp4; codecs="stpp"',function(){return new bt}),en('application/mp4; codecs="stpp.ttml"',function(){return new bt}),en('application/mp4; codecs="stpp.ttml.im1i"',function(){return new bt}),en('application/mp4; codecs="stpp.ttml.im1t"',function(){return new bt}),en('application/mp4; codecs="stpp.ttml.im2i"',function(){return new bt}),en('application/mp4; codecs="stpp.ttml.im2t"',function(){return new bt}),en('application/mp4; codecs="stpp.ttml.etd1"',function(){return new bt}),en('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new bt}),en('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new bt}),en('application/mp4; codecs="stpp.TTML.im1t"',function(){return new bt});function Sn(){this.g="UNKNOWN"}Sn.prototype.parseInit=function(){},Sn.prototype.setSequenceMode=function(){},Sn.prototype.setManifestType=function(e){this.g=e},Sn.prototype.parseMedia=function(e,t){e=at(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
43`);var n=e.split(/\n{2,}/m);
43if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new k(2,2,2e3);if(e=t.vttOffset,this.g=="HLS")if(n[0].includes("X-TIMESTAMP-MAP")){var i=n[0];if(e=i.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=i.match(/MPEGTS:(\d+)/m),!e||!i)throw new k(2,2,2e3);if(e=Jo(e[1]),e==null)throw new k(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=8589934592;e=t.periodStart+i/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],i=g(n[0].split(`
44`)),r=i.next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new Qo(r);var o=new ro;so(r),$o(r);for(var s=so(r);s;){var u=o,a=s;(s=/^id=(.*)$/.exec(a))?u.id=s[1]:(s=/^width=(\d{1,2}|100)%$/.exec(a))?u.width=Number(s[1]):(s=/^lines=(\d+)$/.exec(a))?(u.height=Number(s[1]),u.heightUnits=2):(s=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(a))?(u.regionAnchorX=Number(s[1]),u.regionAnchorY=Number(s[2])):(s=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(a))?(u.viewportAnchorX=Number(s[1]),u.viewportAnchorY=Number(s[2])):/^scroll=up$/.exec(a)&&(u.scroll="up"),$o(r),s=so(r)}t.push(o)}for(i=new Map,Dg(i),r=[],n=g(n.slice(1)),o=n.next();!o.done;o=n.next()){if(o=o.value.split(`
45`),(o.length!=1||o[0])&&!/^NOTE($|[ \t])/.test(o[0])&&o[0]=="STYLE"){for(u=[],s=-1,a=1;a<o.length;
45a++)o[a].includes("::cue")&&(u.push([]),s=u.length-1),s!=-1&&(u[s].push(o[a]),o[a].includes("}")&&(s=-1));for(u=g(u),s=u.next();!s.done;s=u.next()){var l=s.value;s="global",(a=l[0].match(/\((.*)\)/))&&(s=a.pop()),a=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(a=l[1].split(";")),(l=i.get(s))||(l=new it(0,0,""));for(var c=!1,d=0;d<a.length;d++){var p=/^\s*([^:]+):\s*(.*)/.exec(a[d]);if(p){var h=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":case"background":c=!0,l.backgroundColor=h;break;case"color":c=!0,l.color=h;break;case"font-family":c=!0,l.fontFamily=h;break;case"font-size":c=!0,l.fontSize=h;break;case"font-weight":(700<=parseInt(h,10)||h=="bold")&&(c=!0,l.fontWeight=Zo);break;case"font-style":switch(h){case"normal":c=!0,l.fontStyle=Cd;break;case"italic":c=!0,l.fontStyle=es;break;case"oblique":c=!0,l.fontStyle="oblique"}break;case"opacity":c=!0,l.opacity=parseFloat(h);break;case"text-combine-upright":c=!0,l.textCombineUpright=h;break;case"text-shadow":c=!0,l.textShadow=h;break;case"white-space":c=!0,l.wrapLine=h!="noWrap"}}}c&&i.set(s,l)}}if(l=o,c=e,l.length==1&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")o=null;else if(o=null,l[0].includes("-->")||(o=l[0],l.splice(0,1)),u=new Qo(l[0]),s=iu(u),d=oo(u,/[ \t]+--\x3e[ \t]+/g),a=iu(u),s==null||d==null||a==null)Pe("Failed to parse VTT time code. Cue skipped:",o,l),o=null;else{for(s+=c,a+=c,c=l.slice(1).join(`
46`).trim(),i.has("global")?(l=i.get("global").clone(),l.startTime=s,l.endTime=a,l.payload=c):l=new it(s,a,c),$o(u),s=so(u);s;)eS(l,s,t),$o(u),s=so(u);Ba(l,i),o!=null&&(l.id=o),o=l}o&&r.push(o)}return r};function eS(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=i[1],t=="middle"?e.textAlign=Xi:e.textAlign=Id[t.toUpperCase()]):(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode=i[1]=="lr"?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(t=i[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":Va)):(i=/^region:(.*)$/.exec(t))?(t=nk(n,i[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=Md[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=lu,e.line=Number(n[1]),n[2]&&(e.lineAlign=Md[n[2].toUpperCase()]))}function nk(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}Y("shaka.text.VttTextParser",Sn),Sn.prototype.parseMedia=Sn.prototype.parseMedia,Sn.prototype.setManifestType=Sn.prototype.setManifestType,Sn.prototype.setSequenceMode=Sn.prototype.setSequenceMode,Sn.prototype.parseInit=Sn.prototype.parseInit,en("text/vtt",function(){return new Sn}),en('text/vtt; codecs="vtt"',function(){return new Sn}),en('text/vtt; codecs="wvtt"',function(){return new Sn});function Qn(){this.g=null}Qn.prototype.parseInit=function(e){var t=this,n=!1;if(new ze().box("moov",ye).box("trak",ye).box("mdia",ye).R("mdhd",function(i){i=rl(i.reader,i.version),t.g=i.timescale}).box("minf",ye).box("stbl",ye).R("stsd",lr).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new k(2,2,2008);if(!n)throw new k(2,2,2008)},Qn.prototype.setSequenceMode=function(){},Qn.prototype.setManifestType=function(){},Qn.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new k(2,2,2008);var n=0,i=[],r,o=[],s=!1,u=!1,a=!1,l=null;if(new ze().box("moof",ye).box("traf",ye).R("tfdt",function(I){s=!0,n=il(I.reader,I.version).baseMediaDecodeTime}).R("tfhd",function(I){l=nl(I.reader,I.flags).ld}).R("trun",function(I){u=!0,i=ol(I.reader,I.version,I.flags).hg}).box("mdat",as(function(I){a=!0,r=I})).parse(e,!1),!a&&!s&&!u)throw new k(2,2,2008);e=n;for(var c=new rt(r,0),d=g(i),p=d.next();!p.done;p=d.next()){p=p.value;var h=p.ig||l,m=p.Be?n+p.Be:e;e=m+(h||0);var y=0;do{var v=c.S();y+=v;var T=c.S(),w=null;Ja(T)=="vttc"?8<v&&(w=c.Db(v-8)):c.skip(v-8),h&&w&&(v=ik(w,t.periodStart+m/this.g,t.periodStart+e/this.g),o.push(v))}while(p.sampleSize&&y<p.sampleSize)}return o.filter(jr)};function ik(e,t,n){var i,r,o;return new ze().box("payl",as(function(s){i=at(s)})).box("iden",as(function(s){r=at(s)})).box("sttg",as(function(s){o=at(s)})).parse(e),i?rk(i,r,o,t,n):null}function rk(e,t,n,i,r){if(e=new it(i,r,e),Ba(e),t&&(e.id=t),n)for(t=new Qo(n),n=so(t);n;)eS(e,n,[]),$o(t),n=so(t);return e}Y("shaka.text.Mp4VttParser",Qn),Qn.prototype.parseMedia=Qn.prototype.parseMedia,Qn.prototype.setManifestType=Qn.prototype.setManifestType,Qn.prototype.setSequenceMode=Qn.prototype.setSequenceMode,Qn.prototype.parseInit=Qn.prototype.parseInit,en('application/mp4; codecs="wvtt"',function(){return new Qn});function $n(){}$n.prototype.parseInit=function(){},$n.prototype.setSequenceMode=function(){},$n.prototype.setManifestType=function(){},$n.prototype.parseMedia=function(e){var t=at(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=g(t.split(`
47
48`));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
49`);var i=new Qo(n[0]),r=iu(i),o=oo(i,/,/g);if(i=iu(i),r==null||o==null||i==null)throw new k(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new it(r,i,n.slice(1).join(`
50`).trim()))}return e},Y("shaka.text.SbvTextParser",$n),$n.prototype.parseMedia=$n.prototype.parseMedia,$n.prototype.setManifestType=$n.prototype.setManifestType,$n.prototype.setSequenceMode=$n.prototype.setSequenceMode,$n.prototype.parseInit=$n.prototype.parseInit,en("text/x-subviewer",function(){return new $n});function Hn(){this.g=new Sn}Hn.prototype.parseInit=function(){},Hn.prototype.setSequenceMode=function(){},Hn.prototype.setManifestType=function(){},Hn.prototype.parseMedia=function(e,t,n){return e=at(e),e=tS(e),e=he(Si(e)),this.g.parseMedia(e,t,n,[])};function tS(e){var t=`WEBVTT
51
52`;if(e=="")return t;e=e.replace(/\r+/g,""),e=e.trim(),e=g(e.split(`
53
54`));for(var n=e.next();!n.done;n=e.next())n=n.value.split(/\n/),n[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join(`
55`).replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+`
56
57`;return t}Y("shaka.text.SrtTextParser",Hn),Hn.srt2webvtt=tS,Hn.prototype.parseMedia=Hn.prototype.parseMedia,Hn.prototype.setManifestType=Hn.prototype.setManifestType,Hn.prototype.setSequenceMode=Hn.prototype.setSequenceMode,Hn.prototype.parseInit=Hn.prototype.parseInit,en("text/srt",function(){return new Hn});function Jn(){}Jn.prototype.parseInit=function(){},Jn.prototype.setSequenceMode=function(){},Jn.prototype.setManifestType=function(){},Jn.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=at(e).split(/\r?\n\s*\r?\n/),e=g(r),r=e.next();!r.done;r=e.next()){var o=r.value;
57r=o,(o=sk.exec(o))&&(i=o[1],r=o[2]),i=="V4 Styles"||i=="V4+ Styles"?(t=r,t=n?t+(`
58`+r):r):i=="Events"&&(n=n?n+(`
59`+r):r)}for(i=[],r=null,t=g(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(o=rS.exec(e))){if(e=o[1].trim(),o=o[2].trim(),e=="Format")r=o.split(Gc);else if(e=="Style"){e=o.split(Gc),o={};for(var s=0;s<r.length&&s<e.length;s++)o[r[s]]=e[s];i.push(o)}}for(r=[],t=null,n=g(n.split(/\r?\n/)),o=n.next(),e={};!o.done;e={Eh:void 0},o=n.next())if(o=o.value,!/^\s*;/.test(o)&&(s=rS.exec(o))){if(o=s[1].trim(),s=s[2].trim(),o=="Format")t=s.split(Gc);else if(o=="Dialogue"){s=s.split(Gc),o={};for(var u=0;u<t.length&&u<s.length;u++)o[t[u]]=s[u];u=iS(o.Start);var a=iS(o.End);s=new it(u,a,s.slice(t.length-1).join(",").replace(/\\N/g,`
60`).replace(/\{[^}]+\}/g,"")),e.Eh=o.Style,(e=i.find(function(l){return function(c){return c.Name==l.Eh}}(e)))&&ok(s,e),r.push(s)}}return r};function ok(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=nS(n))&&(e.color=n),(n=t.BackColour)&&(n=nS(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=Zo),t.Italic&&(e.fontStyle=es),t.Underline&&e.textDecoration.push(ir),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=uu,e.textAlign="start";break;case 2:e.displayAlign=uu,e.textAlign=Xi;break;case 3:e.displayAlign=uu,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Xi;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Xi;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function nS(e){return e=parseInt(e.replace("&H",""),16),0<=e?"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function iS(e){return e=uk.exec(e),3600*(e[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Y("shaka.text.SsaTextParser",Jn),Jn.prototype.parseMedia=Jn.prototype.parseMedia,Jn.prototype.setManifestType=Jn.prototype.setManifestType,Jn.prototype.setSequenceMode=Jn.prototype.setSequenceMode,Jn.prototype.parseInit=Jn.prototype.parseInit;var sk=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,rS=/^\s*([^:]+):\s*(.*)/,Gc=/\s*,\s*/,uk=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;en("text/x-ssa",function(){return new Jn});function oS(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,0<e)?{ud:n,ia:e}:null}function sS(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(e[t+2]&60)>>>2;if(i>n.length-1)return null;var r=((e[t+2]&192)>>>6)+1,o=(e[t+2]&1)<<2;return o|=(e[t+3]&192)>>>6,{sampleRate:n[i],channelCount:o,codec:"mp4a.40."+r}}function uS(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var i=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return i<=n?!1:(t+=i,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function ak(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||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])}return null}function Zn(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Zn.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?Zt(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(_n(t)||"mp4a.40.2")+'"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,i){for(var r=he(e),o=ps(r),s=o.length;s<r.length&&!uS(r,s);s++);if(e=1e3*n.endTime,o=wo(o),o.length&&n&&(o=o.find(function(c){return c.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=o.data),o=sS(r,s),!o)return Promise.reject(new k(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=o.sampleRate,t.channelsCount=o.channelCount;for(var u=[];s<r.length;){var a=oS(r,s);if(!a)return Promise.reject(new k(2,3,3018,n?n.N()[0]:null));var l=a.ud+a.ia;s+l<=r.length&&u.push({data:r.subarray(s+a.ud,s+l),size:a.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),s+=l}return r=o.sampleRate,e=Math.floor(e*r/1e3),i={id:t.id,type:"audio",codecs:o.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.h,baseMediaDecodeTime:e,jb:u},stream:t},i=new To([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ds(i),this.g.set(n,t)),n=this.i!==t,i=Eu(i),this.i=t,this.h++,n?(t=yt(t,i),Promise.resolve(t)):Promise.resolve(i)},Y("shaka.transmuxer.AacTransmuxer",Zn),Zn.prototype.transmux=Zn.prototype.transmux,Zn.prototype.getOriginalMimeType=Zn.prototype.getOriginalMimeType,Zn.prototype.convertCodecs=Zn.prototype.convertCodecs,Zn.prototype.isSupported=Zn.prototype.isSupported,Zn.prototype.destroy=Zn.prototype.destroy,rr("audio/aac",function(){return new Zn("audio/aac")},Lr);function aS(e,t){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return null;var n=e[t+4]>>6;if(3<=n)return null;var i=e[t+4]&63,r=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*i+n];if(t+r>e.length)return null;var o=e[t+6]>>5,s=0;o===2?s+=2:(o&1&&o!==1&&(s+=2),o&4&&(s+=2)),s=(e[t+6]<<8|e[t+7])>>12-s&1;var u=e[t+5]&7;return e=new Uint8Array([n<<6|e[t+5]>>3<<1|u>>2,(u&3)<<6|o<<3|s<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][o]+s,ra:e,ia:r}}function lk(e,t){if(e[t]===11&&e[t+1]===119){var n=0,i=5;t+=i;for(var r,o;0<i;){o=e[t];var s=Math.min(i,8),u=8-s;r=4278190080>>>24+u<<u,r=(o&r)>>u,n=n?n<<s|r:r,t+=1,i-=s}if(16>n)return!0}return!1}function ci(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=ci.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?Zt(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?$i()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,i){e=he(e);for(var r=ps(e),o=r.length;o<e.length&&!lk(e,o);o++);var s=1e3*n.endTime;r=wo(r),r.length&&n&&(r=r.find(function(c){return c.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=r.data),r=0;for(var u=new Uint8Array([]),a=[];o<e.length;){var l=aS(e,o);if(!l)return Promise.reject(new k(2,3,3018,n?n.N()[0]:null));
60t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,u=l.ra,a.push({data:e.subarray(o,o+l.ia),size:l.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),o+=l.ia}return e=Math.floor(s*r/1e3),i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:u,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.h,baseMediaDecodeTime:e,jb:a},stream:t},i=new To([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ds(i),this.g.set(n,t)),n=this.i!==t,i=Eu(i),this.i=t,this.h++,n?(t=yt(t,i),Promise.resolve(t)):Promise.resolve(i)},Y("shaka.transmuxer.Ac3Transmuxer",ci),ci.prototype.transmux=ci.prototype.transmux,ci.prototype.getOriginalMimeType=ci.prototype.getOriginalMimeType,ci.prototype.convertCodecs=ci.prototype.convertCodecs,ci.prototype.isSupported=ci.prototype.isSupported,ci.prototype.destroy=ci.prototype.destroy,rr("audio/ac3",function(){return new ci("audio/ac3")},Lr);function lS(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new pr(e.subarray(t+2));Bn(n,2),Bn(n,3);var i=Ne(n,11)+1<<1,r=Ne(n,2);if(r==3){r=Ne(n,2),r=[24e3,22060,16e3][r];var o=3}else r=[48e3,44100,32e3][r],o=Ne(n,2);var s=Ne(n,3),u=Ne(n,1);return n=Ne(n,5),t+i>e.byteLength?null:(e=Math.floor(i*r/(16*[1,2,3,6][o])),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,r<<6|n<<1|0,0|s<<1|u<<0,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][s]+u,ra:e,ia:i})}function di(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=di.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?Zt(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,i){e=he(e);for(var r=ps(e),o=r.length;o<e.length&&(e[o]<<8|e[o+1]<<0)!==2935;o++);var s=1e3*n.endTime;r=wo(r),r.length&&n&&(r=r.find(function(c){return c.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=r.data),r=0;for(var u=new Uint8Array([]),a=[];o<e.length;){var l=lS(e,o);if(!l)return Promise.reject(new k(2,3,3018,n?n.N()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,u=l.ra,a.push({data:e.subarray(o,o+l.ia),size:l.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),o+=l.ia}return e=Math.floor(s*r/1e3),i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:r,duration:i,lb:[],ra:u,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.h,baseMediaDecodeTime:e,jb:a},stream:t},i=new To([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ds(i),this.g.set(n,t)),n=this.i!==t,i=Eu(i),this.i=t,this.h++,n?(t=yt(t,i),Promise.resolve(t)):Promise.resolve(i)},Y("shaka.transmuxer.Ec3Transmuxer",di),di.prototype.transmux=di.prototype.transmux,di.prototype.getOriginalMimeType=di.prototype.getOriginalMimeType,di.prototype.convertCodecs=di.prototype.convertCodecs,di.prototype.isSupported=di.prototype.isSupported,di.prototype.destroy=di.prototype.destroy,rr("audio/ec3",function(){return new di("audio/ec3")},Lr);function ck(e){if(!e.length)return null;var t=e.find(function(y){return y.type==7});if(e=e.find(function(y){return y.type==8}),!t||!e)return null;var n=new pr(t.data),i=Ve(n);if(Ve(n),Ve(n),kn(n),pk.includes(i)&&(i=Q(n),i===3&&Bn(n,1),kn(n),kn(n),Bn(n,1),ie(n))){i=i!==3?8:12;for(var r=0;r<i;r++)ie(n)&&(6>r?ll(n,16):ll(n,64))}if(kn(n),i=Q(n),i===0)Q(n);else if(i===1)for(Bn(n,1),kn(n),kn(n),i=Q(n),r=0;r<i;r++)kn(n);kn(n),Bn(n,1);var o=Q(n),s=Q(n),u=Ne(n,1);u===0&&Bn(n,1),Bn(n,1);var a=0,l=0,c=0,d=0;if(ie(n)&&(a=Q(n),l=Q(n),c=Q(n),d=Q(n)),r=i=1,ie(n)&&ie(n)){var p=Ve(n),h=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],m=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(i=h[p-1],r=m[p-1]):p===255&&(i=Ne(n,16),r=Ne(n,16))}return n=(2-u)*(s+1)*16-2*c-2*d,o=16*(o+1)-2*a-2*l,a=[],t=t.fullData,a.push(t.byteLength>>>8&255),a.push(t.byteLength&255),a=a.concat.apply(a,W(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,W(e)),e=new Uint8Array([1,a[3],a[4],a[5],255,225].concat(a,[1],t)),{height:n,width:o,Ca:e,Ia:i,La:r}}function dk(e){function t(m){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:m.pts,dts:m.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var m=[],y=g(r.nalus),v=y.next();!v.done;v=y.next()){v=v.value;var T=v.fullData.byteLength,w=new Uint8Array(4);w[0]=T>>24&255,w[1]=T>>16&255,w[2]=T>>8&255,w[3]=T&255,m.push(w),m.push(v.fullData)}r.data=yt.apply(tn,W(m)),i.push(r)}}for(var i=[],r=null,o=!1,s=0;s<e.length;s++){var u=e[s],a=u.nalus,l=!1;r&&a.length&&!o&&(n(),t(u)),a=g(u.nalus);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=!1;switch(c.type){case 1:var p=!1;d=!0;var h=c.data;l&&4<h.length&&(h=Nx(new pr(h)),h===2||h===4||h===7||h===9)&&(p=!0),p&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=p;break;case 5:d=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=!0;break;case 6:d=!0;break;case 7:l=d=!0;break;case 8:d=!0;break;case 9:o=d=!0,r&&r.frame&&(n(),r=null),r||t(u);break;case 12:d=!0;break;default:d=!1}r&&d&&r.nalus.push(c)}}return n(),i}var pk=[100,110,122,244,44,83,86,118,128,138,139,134];function fk(e){if(!e.length)return null;var t=e.find(function(s){return s.type==32}),n=e.find(function(s){return s.type==33}),i=e.find(function(s){return s.type==34});if(!t||!n||!i)return null;var r=hk(t.fullData);e=gk(n.fullData);var o=mk(i.fullData);return t=vk(t.fullData,n.fullData,i.fullData,{Wf:r.Wf,tg:r.tg,Gf
60:e.Gf,Hf:e.Hf,Af:e.Af,Ff:e.Ff,Bf:e.Bf,Cf:e.Cf,Df:e.Df,Ef:e.Ef,uf:e.uf,vf:e.vf,wf:e.wf,xf:e.xf,yf:e.yf,zf:e.zf,kf:e.kf,pe:e.pe,hf:e.hf,gf:e.gf,ff:e.ff,Yf:o.Yf}),{height:e.height,width:e.width,Ca:t,Ia:e.xj,La:e.wj}}function hk(e){var t=new pr(e,!0);return Ve(t),Ve(t),Ne(t,4),Ne(t,2),Ne(t,6),e=Ne(t,3),t=ie(t),{Wf:e+1,tg:t}}function gk(e){e=new pr(e,!0),Ve(e),Ve(e);var t=0,n=0,i=0,r=0;Ne(e,4);var o=Ne(e,3);ie(e);for(var s=Ne(e,2),u=Ne(e,1),a=Ne(e,5),l=Ve(e),c=Ve(e),d=Ve(e),p=Ve(e),h=Ve(e),m=Ve(e),y=Ve(e),v=Ve(e),T=Ve(e),w=Ve(e),I=Ve(e),M=[],R=[],A=0;A<o;A++)M.push(ie(e)),R.push(ie(e));if(0<o)for(A=o;8>A;A++)Ne(e,2);for(A=0;A<o;A++)M[A]&&Ne(e,88),R[A]&&Ve(e);Q(e),M=Q(e),M==3&&Ne(e,1),R=Q(e),A=Q(e),ie(e)&&(t+=Q(e),n+=Q(e),i+=Q(e),r+=Q(e));var E=Q(e),D=Q(e),P=Q(e);if(ie(e))for(var O=0;O<=o;O++)Q(e),Q(e),Q(e);else Q(e),Q(e),Q(e);if(Q(e),Q(e),Q(e),Q(e),Q(e),Q(e),ie(e)&&ie(e))for(O=0;4>O;O++)for(var L=0;L<(O===3?2:6);L++)if(ie(e)){var U=Math.min(64,1<<4+(O<<1));1<O&&fs(e);for(var _=0;_<U;_++)fs(e)}else Q(e);for(ie(e),ie(e),ie(e)&&(Ve(e),Q(e),Q(e),ie(e)),O=Q(e),U=L=0;U<O;U++)if(_=!1,U!==0&&(_=ie(e)),_){U===O&&Q(e),ie(e),Q(e);for(var F=_=0;F<=L;F++){var H=ie(e),V=!1;H||(V=ie(e)),(H||V)&&_++}L=_}else{for(F=Q(e),_=Q(e),L=F+_,H=0;H<F;H++)Q(e),ie(e);for(F=0;F<_;F++)Q(e),ie(e)}if(ie(e))for(O=Q(e),L=0;L<O;L++){for(U=0;U<P+4;U++)Ne(e,1);Ne(e,1)}if(O=P=1,L=0,ie(e),ie(e),ie(e)){if(ie(e)&&(U=Ve(e),_=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],F=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<U&&16>=U?(P=_[U-1],O=F[U-1]):U===255&&(P=Ne(e,16),O=Ne(e,16))),ie(e)&&ie(e),ie(e)&&(Ne(e,3),ie(e),ie(e)&&(Ve(e),Ve(e),Ve(e))),ie(e)&&(Q(e),Q(e)),ie(e),ie(e),ie(e),(U=ie(e))&&(Q(e),Q(e),Q(e),Q(e)),ie(e)&&(Ne(e,32),Ne(e,32),ie(e)&&Q(e),ie(e)))for(F=!1,U=ie(e),_=ie(e),(U||_)&&((F=ie(e))&&(Ve(e),Ne(e,5),ie(e),Ne(e,5)),Ne(e,4),Ne(e,4),F&&Ne(e,4),Ne(e,5),Ne(e,5),Ne(e,5)),H=0;H<=o;H++){var X=!0;V=1,ie(e)||(X=ie(e));var K=!1;if(X?Q(e):K=ie(e),K||(V=Q(e)+1),U){for(X=0;X<V;X++)Q(e),Q(e),F&&(Q(e),Q(e));ie(e)}if(_){for(X=0;X<V;X++)Q(e),Q(e),F&&(Q(e),Q(e));ie(e)}}ie(e)&&(ie(e),ie(e),ie(e),L=Q(e),Q(e),Q(e),Q(e),Q(e))}return{Af:I,Gf:s,Hf:u,Ff:a,Bf:l,Cf:c,Df:d,Ef:p,uf:h,vf:m,wf:y,xf:v,yf:T,zf:w,pe:L,kf:0,hf:M,gf:E,ff:D,width:R-(t+n)*(M===1||M===2?2:1),height:A-(i+r)*(M===1?2:1),xj:P,wj:O}}function mk(e){var t=new pr(e,!0);Ve(t),Ve(t),Q(t),Q(t),ie(t),ie(t),Ne(t,3),ie(t),ie(t),Q(t),Q(t),fs(t),ie(t),ie(t),ie(t)&&Q(t),fs(t),fs(t),ie(t),ie(t),ie(t),ie(t),e=ie(t),t=ie(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Yf:n}}function vk(e,t,n,i){var r=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return r[0]=1,r[1]=(i.Gf&3)<<6|(i.Hf?1:0)<<5|i.Ff&31,r[2]=i.Bf,r[3]=i.Cf,r[4]=i.Df,r[5]=i.Ef,r[6]=i.uf,r[7]=i.vf,r[8]=i.wf,r[9]=i.xf,r[10]=i.yf,r[11]=i.zf,r[12]=i.Af,r[13]=240|(i.pe&3840)>>8,r[14]=i.pe&255,r[15]=252|i.Yf&3,r[16]=252|i.hf&3,r[17]=248|i.gf&7,r[18]=248|i.ff&7,r[19]=0,r[20]=0,r[21]=(i.kf&3)<<6|(i.Wf&7)<<3|(i.tg?1:0)<<2|3,r[22]=3,r[23]=160,r[24]=0,r[25]=1,r[26]=(e.byteLength&65280)>>8,r[27]=(e.byteLength&255)>>0,r.set(e,28),r[23+(5+e.byteLength)]=161,r[e.byteLength+29]=0,r[e.byteLength+30]=1,r[e.byteLength+31]=(t.byteLength&65280)>>8,r[e.byteLength+32]=(t.byteLength&255)>>0,r.set(t,e.byteLength+33),r[23+(e.byteLength+10+t.byteLength)]=162,r[e.byteLength+10+t.byteLength+24]=0,r[e.byteLength+10+t.byteLength+25]=1,r[e.byteLength+10+t.byteLength+26]=(n.byteLength&65280)>>8,r[e.byteLength+10+t.byteLength+27]=(n.byteLength&255)>>0,r.set(n,e.byteLength+10+t.byteLength+28),r}function Xc(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,o=e[t+2]>>2&3;if(n!==1&&r!==0&&r!==15&&o!==3){var s=e[t+3]>>6;r=1e3*yk[14*(n===3?3-i:i===3?3:4)+r-1],o=Tk[3*(n===3?0:n===2?1:2)+o],n=Sk[n][i];var u=wk[i],a=Math.floor(n*r/o+(e[t+2]>>1&1))*u,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&87>=l&&i===2&&224e3<=r&&s===0&&(e[t+3]|=128),{sampleRate:o,channelCount:s===3?1:2,ia:a,vj:8*n*u}}return null}function cS(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function dS(e,t){if(t+1<e.length&&cS(e,t)){var n=Xc(e,t),i=4;return n&&n.ia&&(i=n.ia),t+=i,t===e.length||t+1<e.length&&cS(e,t)}return!1}var yk=[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],Tk=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Sk=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],wk=[0,1,1,4];function pi(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=pi.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?Zt(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,i){for(var r=he(e),o=ps(r).length;o<r.length&&!dS(r,o);o++);var s;for(e=[];o<r.length;){var u=Xc(r,o);if(!u)return Promise.reject(new k(2,3,3018,n?n.N()[0]:null));s||(s=u),o+u.ia<=r.length&&e.push({data:r.subarray(o,o+u.ia),size:u.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}
60),o+=u.ia}return s?(r=9e4*s.vj/s.sampleRate*this.h,i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:s.sampleRate,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.h,baseMediaDecodeTime:r,jb:e},stream:t},i=new To([i]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=ds(i),this.g.set(n,t)),n=this.i!==t,i=Eu(i),this.i=t,this.h++,n?(t=yt(t,i),Promise.resolve(t)):Promise.resolve(i)):Promise.reject(new k(2,3,3018,n?n.N()[0]:null))},Y("shaka.transmuxer.Mp3Transmuxer",pi),pi.prototype.transmux=pi.prototype.transmux,pi.prototype.getOriginalMimeType=pi.prototype.getOriginalMimeType,pi.prototype.convertCodecs=pi.prototype.convertCodecs,pi.prototype.isSupported=pi.prototype.isSupported,pi.prototype.destroy=pi.prototype.destroy,rr("audio/mpeg",function(){return new pi("audio/mpeg")},Lr);function fi(e){this.h=e,this.g=null}f=fi.prototype,f.destroy=function(){},f.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=_n(e).split(","),n=Mn("audio",t);return t=Mn("video",t),!n||t||nn(n)!="mp3"?!1:Zt(this.convertCodecs("audio",e))},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},f.getOriginalMimeType=function(){return this.h},f.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new ot,e=he(e),e=this.g.parse(e),e.od().audio!="mp3"||r!="audio")return Promise.reject(new k(2,3,3018,n?n.N()[0]:null));for(n=new Uint8Array([]),r=g(e.fb()),e=r.next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=Xc(e,t))?(t+i.ia<=e.length&&(n=yt(n,e.subarray(t,t+i.ia))),t+=i.ia):t++;return Promise.resolve(n)},Y("shaka.transmuxer.MpegTsTransmuxer",fi),fi.prototype.transmux=fi.prototype.transmux,fi.prototype.getOriginalMimeType=fi.prototype.getOriginalMimeType,fi.prototype.convertCodecs=fi.prototype.convertCodecs,fi.prototype.isSupported=fi.prototype.isSupported,fi.prototype.destroy=fi.prototype.destroy,rr("video/mp2t",function(){return new fi("video/mp2t")},Dd);/*
61 @license
62 MSS Transmuxer
63 Copyright 2015 Dash Industry Forum
64 SPDX-License-Identifier: BSD-3-Clause
65*/function ei(e){this.h=e,(this.g=Lf.get("ISOBoxer")())&&xk(this)}function xk(e){function t(){this._procFullBox(),this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(n){this._procEntryField(n,"InitializationVector","data",8),this.flags&2&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(i){this._procEntryField(i,"BytesOfClearData","uint",16),this._procEntryField(i,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,i=0;16>i;i++)this.usertype[i]!==Ek[i]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}f=ei.prototype,f.destroy=function(){},f.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?Zt(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Zt(t)||Zt(e))},f.convertCodecs=function(e,t){return t.replace("mss/","")},f.getOriginalMimeType=function(){return this.h},f.transmux=function(e,t,n){if(!n)return Promise.resolve(he(e));if(!t.mssPrivateData)return Promise.reject(new k(2,3,3020,n?n.N()[0]:null));try{var i,r=this.g.parseBuffer(e),o=r.fetch("tfhd");o.track_ID=t.id+1;var s=r.fetch("tfdt"),u=r.fetch("traf");s===null&&(s=this.g.createFullBox("tfdt",u,o),s.version=1,s.flags=0,s.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var a=r.fetch("trun"),l=r.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var c=r.fetch("tfrf");c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1);var d=r.fetch("sepiff");if(d!==null){d.type="senc",d.usertype=void 0;var p=r.fetch("saio");if(p===null){p=this.g.createFullBox("saio",u),p.version=0,p.flags=0,p.entry_count=1,p.offset=[0];var h=this.g.createFullBox("saiz",u);if(h.version=0,h.flags=0,h.sample_count=d.sample_count,h.default_sample_info_size=0,h.sample_info_size=[],d.flags&2)for(i=0;i<d.sample_count;i+=1)h.sample_info_size[i]=10+6*d.entry[i].NumberOfEntries;else h.default_sample_info_size=8}}o.flags&=16777214,o.flags|=131072,a.flags|=1;var m=r.fetch("moof");a.data_offset=m.getLength()+8;var y=r.fetch("saio");y!==null&&(y.offset[0]=pS(m,"traf")+pS(u,"senc")+16);var v=he(r.write());return Promise.resolve(v)}catch(T){return T instanceof k?Promise.reject(T):Promise.reject(new k(2,3,3022,n?n.N()[0]:null))}};function pS(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}Y("shaka.transmuxer.MssTransmuxer",ei),ei.prototype.transmux=ei.prototype.transmux,ei.prototype.getOriginalMimeType=ei.prototype.getOriginalMimeType,ei.prototype.convertCodecs=ei.prototype.convertCodecs,ei.prototype.isSupported=ei.prototype.isSupported,ei.prototype.destroy=ei.prototype.destroy;var Ek=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);rr("mss/audio/mp4",function(){return new ei("mss/audio/mp4")},Lr),rr("mss/video/mp4",function(){return new ei("mss/video/mp4")},Lr);function hi(e){this.m=e,this.g=0,this.i=new Map,this.l=this.h=this.j=null}f=hi.prototype,f.destroy=function(){this.i.clear(),this.h&&this.h.destroy()},f.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=_n(n).split(",");return n=Mn("audio",i),i=Mn("video",i),n&&(n=nn(n),!Ak.includes(n))||i&&(n=nn(i),!Ik.includes(n))?!1:t?Zt(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Zt(t)||Zt(e))},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=_n(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return hu(n,"audio/mp4")}).map(_d).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},f.getOriginalMimeType=function(){return this.m},f.transmux=function(e,t,n,i,r){var o=he(e);if(r=="audio"&&!hs(o)){for(var s=ps(o),u=s.length;u<o.length;u++)if(dS(o,u))return Promise.reject(new k(2,3,3018,n?n.N()[0]:null));for(u=s.length;u<o.length;u++)if(uS(o,u))return this.h||(this.h=new Zn("audio/aac")),this.h.transmux(e,t,n,i,r);return Promise.reject(new k(2,3,3018,n?n.N()[0]:null))}this.j?this.j.clearData():this.j=new ot;var a=this.j.parse(o),l=[],c=a.od();try{var d=null;if(r=="video"){switch(c.video){case"avc":var p=[],h=null,m=a.wc(),y=dk(m);if(!y.length)throw new k(2,3,3023,n?n.N()[0]:null);for(var v=0;v<y.length;v++){var T=y[v];h==null&&(h=T.dts);var w=void 0;w=v+1<y.length?(y[v+1].dts||0)-(T.dts||0):1<y.length?(T.dts||0)-(y[v-1].dts||0):9e4*(n.endTime-n.startTime),p.push({data:T.data,size:T.data.byteLength,duration:w,eb:Math.round((T.pts||0)-(T.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:T.isKeyframe?2:1,ib:T.isKeyframe?0:1}})}for(var I=[],M=g(m),R=M.next();!R.done;R=M.next())I.push.apply(I,W(R.value.nalus));var A=ck(I);if(!A||h==null)throw new k(2,3,3018,n?n.N()[0]:null);t.height=A.height,t.width=A.width,d={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,lb:[],ra:new Uint8Array([]),Ca:A.Ca,Ia:A.Ia,La:A.La,data:{Eb:this.g,baseMediaDecodeTime:h,jb:p},stream:t};break;case"hvc":var E=[],D=null,P=[],O=a.wc();if(!O.length)throw new k(2,3,3023,n?n.N()[0]:null);for(var L=0;L<O.length;L++){var U=O[L],_=U.nalus;P.push.apply(P,W(_));for(var F=!1,H=[],V=!1,X=g(_),K=X.next();!K.done;K=X.next()){var pe=K.value;switch(pe.type){case 1:case 0:var te=V=!0;break;case 19:case 20:case 21:F=te=V=!0;break;case 32:te=!0;break;case 33:te=!0;break;case 34:te=!0;break;case 35:V=te=!0;break;case 39:case 40:te=!0;break;default:te=!1}if(V&&te){var Be=pe.fullData.byteLength,De=new Uint8Array(4);De[0]=Be>>24&255,De[1]=Be>>16&255,De[2]=Be>>8&255,De[3]=Be&255,H.push(De),H.push(pe.fullData)}}var xe=H.length?{data:yt.apply(tn,W(H)),isKeyframe:F}:null;if(xe){D==null&&U.dts!=null&&(D=U.dts);var Ae=void 0;Ae=L+1<O.length?(O[L+1].dts||0)-(U.dts||0):1<O.length?(U.dts||0)-(O[L-1].dts||0):9e4*(n.endTime-n.startTime),E.push({data:xe.data,size:xe.data.byteLength,duration:Ae,eb:Math.round((U.pts||0)-(U.dts||0)),flags:{hb:0,$a:0,Za:0,Xa:0,Ya:xe.isKeyframe?2:1,ib:xe.isKeyframe?0:1}})}}var _e=fk(P);if(!_e||D==null)throw new k(2,3,3018,n?n.N()[0]:null);t.height=_e.height,t.width=_e.width,d={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:i,lb:[],ra:new Uint8Array([]),Ca:_e.Ca,Ia:_e.Ia,La:_e.La,data:{Eb:this.g,baseMediaDecodeTime:D,jb:E},stream:t}}d&&(l.push(d),d=null)}if(r=="audio"){switch(c.audio){case"aac":for(var Se=[],Re,ge=null,we=null,Qe=null,Ft=g(a.fb()),pt=Ft.next();!pt.done;pt=Ft.next()){var ht=pt.value,Dt=ht.data;if(Dt){var Kt=0;if(we==-1&&Qe)Dt=yt(Qe,ht.data),we=null;else if(we!=null&&Qe){Kt=Math.max(0,we);var No=yt(Qe,Dt.subarray(0,Kt));Se.push({data:No,size:No.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),we=Qe=null}if(Re=sS(Dt,Kt),!Re)throw new k(2,3,3018,n?n.N()[0]:null);for(t.audioSamplingRate=Re.sampleRate,t.channelsCount=Re.channelCount,ge==null&&ht.pts!==null&&(ge=ht.pts);Kt<Dt.length;){var xr=oS(Dt,Kt);if(!xr){Qe=Dt.subarray(Kt,Dt.length),we=-1;break}var Wr=xr.ud+xr.ia;we=Math.max(0,Kt+Wr-Dt.length),we!=0?Qe=Dt.subarray(Kt+xr.ud,Kt+Wr):Kt+Wr<=Dt.length&&Se.push({data:Dt.subarray(Kt+xr.ud,Kt+Wr),size:xr.ia,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Kt+=Wr}}}if(!Re||ge==null){if(!a.wc().length)throw new k(2,3,3018,n?n.N()[0]:null);ge=9e4*n.startTime;var gi=Mn("audio",t.codecs.split(","));if(!gi||!t.channelsCount||!t.audioSamplingRate)throw new k(2,3,3018,n?n.N()[0]:null);Re={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:gi};var Dh=ak(gi,t.channelsCount);if(!Dh)throw new k(2,3,3018,n?n.N()[0]:null);for(var Rk=ge+9e4*(n.endTime-n.startTime),CS=ge;CS<Rk;)Se.push({data:Dh,size:Dh.byteLength,duration:1024,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),CS+=1024/Re.sampleRate*9e4}var kS=Re.sampleRate,Lk=ge/9e4*kS;d={id:t.id,type:"audio",codecs:Re.codec,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:kS,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:Lk,jb:Se},stream:t};break;case"ac3":for(var DS=[],Wc=0,Ph=new Uint8Array([]),qc=null,PS=g(a.fb()),Rh=PS.next();!Rh.done;Rh=PS.next()){var Lh=Rh.value,Nh=Lh.data;qc==null&&Lh.pts!==null&&(qc=Lh.pts);for(var Hs=0;Hs<Nh.length;){var qr=aS(Nh,Hs);qr?(t.audioSamplingRate=qr.sampleRate,t.channelsCount=qr.channelCount,Wc=qr.sampleRate,Ph=qr.ra,DS.push({data:Nh.subarray(Hs,Hs+qr.ia),size:qr.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Hs+=qr.ia):Hs++}}if(Wc==0||Ph.byteLength==0||qc==null)throw new k(2,3,3018,n?n.N()[0]:null);var Nk=qc/9e4*Wc;d={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:Wc,duration:i,lb:[],ra:Ph,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:Nk,jb:DS},stream:t};break;case"ec3":for(var RS=[],zc=0,jh=new Uint8Array([]),Yc=null,LS=g(a.fb()),Uh=LS.next();!Uh.done;Uh=LS.next()){var Oh=Uh.value,_h=Oh.data;Yc==null&&Oh.pts!==null&&(Yc=Oh.pts);for(var Gs=0;Gs<_h.length;){var zr=lS(_h,Gs);zr?(t.audioSamplingRate=zr.sampleRate,t.channelsCount=zr.channelCount,zc=zr.sampleRate,jh=zr.ra,RS.push({data:_h.subarray(Gs,Gs+zr.ia),size:zr.ia,duration:1536,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Gs+=zr.ia):Gs++}}if(zc==0||jh.byteLength==0||Yc==null)throw new k(2,3,3018,n?n.N()[0]:null);var jk=Yc/9e4*zc;d={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:zc,duration:i,lb:[],ra:jh,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:jk,jb:RS},stream:t};break;case"mp3":for(var NS=[],Qc,$c=null,jS=g(a.fb()),bh=jS.next();!bh.done;bh=jS.next()){var Fh=bh.value,ya=Fh.data;if(ya){$c==null&&Fh.pts!==null&&($c=Fh.pts);for(var jo=0;jo<ya.length;){var Xs=Xc(ya,jo);Xs?(Qc||(Qc=Xs),jo+Xs.ia<=ya.length&&NS.push({data:ya.subarray(jo,jo+Xs.ia),size:Xs.ia,duration:1152,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),jo+=Xs.ia):jo++}}}if(!Qc||$c==null)throw new k(2,3,3018,n?n.N()[0]:null);var US=Qc.sampleRate,Uk=$c/9e4*US;d={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:US,duration:i,lb:[],ra:new Uint8Array([]),Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:Uk,jb:NS},stream:t};break;case"opus":var OS=[],Jc=null,qi=a.F;if(!qi)throw new k(2,3,3018,n?n.N()[0]:null);var wn=[];switch(qi.$h){case 1:case 2:wn=[0];break;case 0:wn=[255,1,1,0,1];break;case 128:wn=[255,2,0,0,1];break;case 3:wn=[1,2,1,0,2,1];break;case 4:wn=[1,2,2,0,1,2,3];break;case 5:wn=[1,3,2,0,4,1,2,3];break;case 6:wn=[1,4,2,0,4,1,2,3,5];break;case 7:wn=[1,4,2,0,4,1,2,3,5,6];break;case 8:wn=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:wn=[1,1,2,0,1];break;case 131:wn=[1,1,3,0,1,2];break;case 132:wn=[1,1,4,0,1,2,3];break;case 133:wn=[1,1,5,0,1,2,3,4];break;case 134:wn=[1,1,6,0,1,2,3,4,5];break;case 135:wn=[1,1,7,0,1,2,3,4,5,6];break;case 136:wn=[1,1,8,0,1,2,3,4,5,6,7]}for(var _S=new Uint8Array([0,qi.channelCount,0,0,qi.sampleRate>>>24&255,qi.sampleRate>>>17&255,qi.sampleRate>>>8&255,qi.sampleRate>>>0&255,0,0].concat(W(wn))),bS=qi.sampleRate,FS=g(a.fb()),Bh=FS.next();!Bh.done;Bh=FS.next()){var Vh=Bh.value,Ks=Vh.data;Jc==null&&Vh.pts!==null&&(Jc=Vh.pts);for(var Ta=0;Ta<Ks.length;){for(var Ok=(Ks[Ta+1]&16)!==0,_k=(Ks[Ta+1]&8)!==0,Er=Ta+2,Zc=0;Ks[Er]===255;)Zc+=255,Er+=1;
65Zc+=Ks[Er],Er+=1,Er+=Ok?2:0,Er+=_k?2:0;var BS=Ks.slice(Er,Er+Zc);OS.push({data:BS,size:BS.byteLength,duration:960,eb:0,flags:{hb:0,$a:0,Za:0,Xa:0,Ya:2,ib:0}}),Ta=Er+Zc}}if(_S.byteLength==0||Jc==null)throw new k(2,3,3018,n?n.N()[0]:null);t.audioSamplingRate=qi.sampleRate,t.channelsCount=qi.channelCount;var bk=Jc/9e4*bS;d={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:bS,duration:i,lb:[],ra:_S,Ca:new Uint8Array([]),Ia:0,La:0,data:{Eb:this.g,baseMediaDecodeTime:bk,jb:OS},stream:t}}d&&(l.push(d),d=null)}}catch(Gh){return Gh&&Gh.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(Gh)}if(!l.length)return Promise.reject(new k(2,3,3018,n?n.N()[0]:null));var VS=new To(l),Hh=t.id+"_"+n.i;if(this.i.has(Hh))var Sa=this.i.get(Hh);else Sa=ds(VS),this.i.set(Hh,Sa);var Fk=this.l!==Sa,HS=Eu(VS);if(this.l=Sa,this.g++,Fk){var Bk=yt(Sa,HS);return Promise.resolve(Bk)}return Promise.resolve(HS)},Y("shaka.transmuxer.TsTransmuxer",hi),hi.prototype.transmux=hi.prototype.transmux,hi.prototype.getOriginalMimeType=hi.prototype.getOriginalMimeType,hi.prototype.convertCodecs=hi.prototype.convertCodecs,hi.prototype.isSupported=hi.prototype.isSupported,hi.prototype.destroy=hi.prototype.destroy;var Ak=["aac","ac-3","ec-3","mp3","opus"],Ik=["avc","hevc"];rr("video/mp2t",function(){return new hi("video/mp2t")},Pd);function fS(){}ct(fS,Dn),Y("shaka.util.FairPlayUtils",fS);/*
66 @license
67 EME Encryption Scheme Polyfill
68 Copyright 2019 Google LLC
69 SPDX-License-Identifier: Apache-2.0
70*/function hS(){}var ma;function gS(){ma||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(ma=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Mk,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function Mk(e,t){var n=this,i;return C(function(r){return r.g==1?(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),S(r,ma.call(n,e,t),2)):(i=r.h,ES(i)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=ma,r.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=mS,r.return(mS.call(n,e,t))))})}function mS(e,t){var n=this,i,r,o,s,u,a,l,c,d,p,h,m;return C(function(y){if(y.g==1){for(console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),i=xS(e),r=[],o=g(t),s=o.next();!s.done;s=o.next())u=s.value,a=vS(u.videoCapabilities,i),l=vS(u.audioCapabilities,i),u.videoCapabilities&&u.videoCapabilities.length&&!a.length||u.audioCapabilities&&u.audioCapabilities.length&&!l.length||(c=Object.assign({},u),c.videoCapabilities=a,c.audioCapabilities=l,r.push(c));if(!r.length)throw d=Error("Unsupported keySystem or supportedConfigurations."),d.name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return S(y,ma.call(n,e,r),2)}return p=y.h,m=h=null,r[0]&&(r[0].videoCapabilities&&(h=r[0].videoCapabilities[0].encryptionScheme),r[0].audioCapabilities&&(m=r[0].audioCapabilities[0].encryptionScheme)),y.return(new Kc(p,h,m))})}function vS(e,t){return e&&e.filter(function(n){return Mh(n.encryptionScheme,t)})}Y("EmeEncryptionSchemePolyfill",hS),hS.install=gS;function yS(){}var va;function TS(){va||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(va=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Ck,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function Ck(e){var t=this,n,i;return C(function(r){switch(r.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),S(r,va.call(t,e),2);case 2:if(n=r.h,!n.supported||!e.keySystemConfiguration)return r.return(n);if((i=n.keySystemAccess)&&ES(i))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=va,r.return(n);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=SS,i){r.s(3);break}return S(r,wS(e),4);case 4:return n.keySystemAccess=r.h,r.return(n);case 3:return r.return(SS.call(t,e))}})}function SS(e){var t=this,n,i,r,o,s,u,a;return C(function(l){switch(l.g){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),i=n=null,!e.keySystemConfiguration||(r=e.keySystemConfiguration,o=r.keySystem,i=r.audio&&r.audio.encryptionScheme,n=r.video&&r.video.encryptionScheme,s=xS(o),u={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},Mh(i,s)&&Mh(n,s))?S(l,va.call(t,e),2):l.return(u);case 2:if(a=l.h,a.keySystemAccess){a.keySystemAccess=new Kc(a.keySystemAccess,n,i),l.s(3);break}if(!e.keySystemConfiguration){l.s(3);break}return S(l,wS(e),5);case 5:a.keySystemAccess=l.h;case 3:return l.return(a)}})}function wS(e){var t,n;return C(function(i){if(i.g==1){var r=e.keySystemConfiguration,o=[],s=[];return r.audio&&o.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:r.audio.encryptionScheme}),r.video&&s.push({robustness:r.video.robustness||"",contentType:e.video.contentType,encryptionScheme:r.video.encryptionScheme}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},o.length&&(r.audioCapabilities=o),s.length&&(r.videoCapabilities=s),t=r,S(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=i.h,i.return(n)})}Y("McEncryptionSchemePolyfill",yS),yS.install=TS;function Kc(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}Kc.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=g(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=g(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},Kc.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function xS(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs":e.startsWith("com.huawei")?"cenc":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function ES(e){e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function Mh(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&(Dk||Pk||kk))}function Ch(){}function AS(){gS(),TS()}Y("EncryptionSchemePolyfills",Ch),Ch.install=AS;var kk=navigator.userAgent.includes("CrKey"),Dk=100<=parseInt(navigator.userAgent.
70split("Firefox/").pop(),10),kh,IS=navigator.userAgent||"";if(IS.includes("Web0S")){var MS=IS.match(/Chrome\/(\d+)/);kh=MS?79<=parseInt(MS[1],10):!1}else kh=!1;var Pk=kh;typeof Te<"u"&&Te.exports&&(Te.exports=Ch)}).call(B,N,N,void 0);for(var b in B.shaka)x[b]=B.shaka[b]})()})(zs);const Wh=1e-5,KS=_o(Hk,100),WS=_o(Gk,!1);function vD(){const x=new Audio;return x.crossOrigin="anonymous",x}function yD(){if(zs.media.ManifestParser.registerParserByMime("audio/x-mpegurl",()=>new zs.hls.HlsParser),zs.polyfill.installAll(),zs.Player.isBrowserSupported()){const x=new zs.Player;return x.configure("streaming.bufferingGoal",30),x.configure("streaming.bufferBehind",5),x.configure("streaming.segmentPrefetchLimit",1),x}else{console.error("Browser not supported!");return}}const Ws=yD();let wa;function TD(x,N){cancelAnimationFrame(wa);const B=()=>{N.ontimeupdate&&!x.paused&&N.ontimeupdate(),wa=requestAnimationFrame(B)};x.onplaying=()=>{cancelAnimationFrame(wa),B(),N.onplay&&N.onplay()},x.onpause=()=>{cancelAnimationFrame(wa),N.onpause&&N.onpause()},x.onended=()=>{cancelAnimationFrame(wa),N.onend&&N.onend()}}function SD(x,N){x.removeEventListener(Qr.LOADED,N.onload),x.removeEventListener(Qr.BUFFERING,N.onbuffering),x.removeEventListener(Qr.ERROR,N.onplayerror),x.removeEventListener(Qr.ADAPTATION,N.onadaptation)}function wD(x,N){x.addEventListener(Qr.LOADED,N.onload),x.addEventListener(Qr.BUFFERING,N.onbuffering),x.addEventListener(Qr.ERROR,N.onplayerror),x.addEventListener(Qr.ADAPTATION,N.onadaptation)}const qs={},xD=bo({id:"audio-shaka-module",state:()=>({opts:void 0,player:Ws,audio:void 0,loading:!1,buffering:!1,playing:!1,error:null,volume:KS.get(),muted:WS.get(),currentTime:0,duration:Wh,optsUnwrapped:void 0}),getters:{audioSrc(){return this.audio?.src??""},audioLoaded(){return this.audio?.readyState===4||this.audio?.readyState===3},audioPaused(){return this.audio?.paused??!0}},actions:{async init(x){this.audio||await this.resetAudio(),this.optsUnwrapped=x,this.loading=!0,this.playing=!1,this.error=null,this.setVolume(x.volume??this.volume),this.setMuted(x.muted??this.muted),this.opts&&SD(this.player,this.opts),this.opts=this._wrapOptions(x),TD(this.audio,this.opts),wD(this.player,this.opts);try{const N=Ws.getAssetUri();N==null?qs[x.src]=await Ws.preload(x.src):qs[N]=await Ws.unloadAndSavePreload();let B=x.src;qs[x.src]&&(B=qs[x.src]),await Ws.load(B)}catch(N){if(Uo.RECOVERABLE.map(B=>B.code).includes(N.code))return Promise.resolve();console.error(N),this.opts.onloaderror&&this.opts.onloaderror(N)}},async preload(x){if(!qs[x])try{qs[x]=await Ws.preload(x)}catch(N){console.error(N)}},async unload(){return this.loading=!1,this.playing=!1,this.error=null,this.player?.unload(!0)},async resetAudio(){this.pause();const x=vD();return await this.player.detach().catch(()=>{}),await this.player.attach(x).catch(()=>{}),this.audio=x,x},async play(){if(!!this.audio)if($r().isIOS()){if(this.audio.readyState===4)return this.audio?.play().catch(x=>Uo.PLAY_ABORT.code===x.code?Promise.resolve():Promise.reject(x));console.log("adding event listener for canplaythrough"),this.audio.addEventListener("canplaythrough",()=>{setTimeout(()=>this.audio?.play().catch(x=>Uo.PLAY_ABORT.code===x.code?Promise.resolve():Promise.reject(x)),10)},{once:!0})}else return this.audio?.play().catch(x=>Uo.PLAY_ABORT.code===x.code?Promise.resolve():Promise.reject(x))},async pause(){this.audio?.pause()},async seek(x){if($r().isIOS()){if(console.log("seeking on iOS"),!this.audio)return;const N=this.audio.paused;this.audio.pause(),this.audio.currentTime=x,this.opts?.ontimeupdate&&this.opts.ontimeupdate(),N||this.audio?.addEventListener("canplaythrough",()=>{setTimeout(()=>{this.audio?.play()},10)},{once:!0})}else{if(!this.audio)return;this.audio.currentTime=x,this.opts?.ontimeupdate&&this.opts.ontimeupdate()}},async stop(){this.pause(),this.seek(0)},setVolume(x){if(!!this.audio){if(x<0||x>100)throw new Error("Volume must be between 0 and 100");this.audio.volume=fD(x/100),KS.set(x),this.volume=x}},setMuted(x){!this.audio||(this.muted=x,this.audio.muted=x,WS.set(this.muted))},toggleMuted(){this.setMuted(!this.muted)},async _handleError(x){console.log(x);let N=!0;if("code"in x){const B=Number(x.code),b=Uo.RECOVERABLE.find(Te=>Te.code===B),j=Uo.AUDIO_ERROR.find(Te=>Te.code===B),Z=Uo.FLAC_NOT_SUPPORTED.find(Te=>Te.code===B);if(B===Xk.code&&this.optsUnwrapped){await this.init(this.optsUnwrapped);return}if(b)N=!1,console.warn(b.name);else if(j){N=!1,console.warn(j.name);const Te="We encountered an error. Click this message for support.";this.error={code:"AUDIO_ERROR",message:Te}}else Z&&(N=!1,console.warn(Z.name),this.error={code:"FLAC_NOT_SUPPORTED",message:"We encountered an error, try switching audio quality."})}N&&(console.error(x),this.error={code:"UNKNOWN_ERROR",message:"An unknown error has occurred."})},_wrapOptions(x){return{src:x.src,volume:this.volume,muted:this.muted,onload:()=>{this.loading=!1,this.buffering=!1,this.currentTime=0,this.duration=this.player?.seekRange().end??Wh,x.onload&&x.onload()},onloaderror:N=>{this._handleError(N),x.onloaderror&&x.onloaderror(N)},onbuffering:N=>{this.buffering=N.buffering,x.onbuffering&&x.onbuffering(N)},onpause:()=>{this.playing=!1,x.onpause&&x.onpause()},onend:()=>{x.onend?x.onend():this.playing=!1},onplay:()=>{this.playing=!0,this.duration===0&&(this.duration=this.player?.seekRange().end??Wh),x.onplay&&x.onplay()},onplayerror:N=>
70{this._handleError(N.detail),x.onplayerror&&x.onplayerror(N)},onadaptation:()=>{x.onadaptation&&x.onadaptation()},ontimeupdate:()=>{this.currentTime=this.audio?.currentTime??0,x.ontimeupdate&&x.ontimeupdate()}}}}});function ED(){return new(window.AudioContext||window.webkitAudioContext)}const Jh=bo("audio-context-module",()=>{const x=Rt(void 0),N=Rt(void 0),B=Rt(0),b=Rt(void 0);async function j(f){x.value&&N.value||(x.value=ED(),N.value=x.value.createGain(),Z(f),N.value.connect(x.value.destination))}function Z(f){let He;try{He=x.value?.createMediaElementSource(f)}catch{console.warn("Unable to create source node, may already be connected")}He!==void 0&&(b.value?.disconnect(),b.value=He,N.value&&b.value?.connect(N.value))}function Te(f){if(!x.value||!N.value)return;const He=mD(f);if(He<N.value.gain.minValue||He>N.value.gain.maxValue)throw new Error("Gain values must be within acceptable range");N.value.gain.cancelScheduledValues(x.value.currentTime),N.value.gain.setValueAtTime(N.value.gain.value,x.value.currentTime),N.value.gain.exponentialRampToValueAtTime(He,x.value.currentTime+.1),B.value=f}return{ctx:x,gain:N,gainInDecibels:B,source:b,init:j,swapSource:Z,applyGain:Te}});let Oi=null;try{Oi=new window.MediaMetadata({title:"",album:"",artist:"",artwork:[]})}catch(x){console.warn("MediaMetadata not supported",x)}function AD(x,N){if(x.length!==N.length)return!1;const B=x.map(j=>j.src),b=N.map(j=>j.src);return B.every(j=>b.includes(j))}function ID(x,N,B){if("mediaSession"in navigator&&navigator.mediaSession&&Oi){if(x){const b=x?.title??"";Oi.title!==b&&(Oi.title=b);const j=x?.album??"";Oi.album!==j&&(Oi.album=j);const Z=x.artist??"";Oi.artist!==Z&&(Oi.artist=Z);const Te=x.artwork??[];AD(Oi.artwork,Te)||(Oi.artwork=Te),navigator.mediaSession.metadata==null&&(navigator.mediaSession.metadata=Oi)}B&&navigator.mediaSession.setPositionState(B),N?.onplay&&navigator.mediaSession.setActionHandler("play",N.onplay),N?.onpause&&navigator.mediaSession.setActionHandler("pause",N.onpause),N?.onstop&&navigator.mediaSession.setActionHandler("stop",N.onstop),N?.onnext&&navigator.mediaSession.setActionHandler("nexttrack",N.onnext),N?.onprevious&&navigator.mediaSession.setActionHandler("previoustrack",N.onprevious),N?.onseekto&&navigator.mediaSession.setActionHandler("seekto",N.onseekto)}}function MD(){"mediaSession"in navigator&&navigator.mediaSession&&(navigator.mediaSession.metadata=null,navigator.mediaSession.setActionHandler("play",null),navigator.mediaSession.setActionHandler("pause",null),navigator.mediaSession.setActionHandler("stop",null),navigator.mediaSession.setActionHandler("nexttrack",null),navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("seekto",null))}const CD=bo("audio-metadata-module",()=>{const x=Rt(void 0),N=Rt(void 0),B=Rt(void 0);function b(Z,Te,f,He){x.value=Z,N.value=Te,B.value=f,ID(f,He?.handlers,He?.positionState)}function j(){x.value=void 0,N.value=void 0,B.value=void 0,MD()}return{id:x,audioboxid:N,metadata:B,load:b,clear:j}}),ng=bo("audio-queue-module",()=>{const x=Rt([]),N=Rt(void 0),B=Rt(-1),b=Rt(!1),j=ut(()=>B.value<=0?x.value.length-1:B.value-1),Z=ut(()=>B.value>=x.value.length-1?0:B.value+1),Te=ut(()=>{const Ie=[];for(const me of x.value){if(me.transition===void 0)return;Ie.push(me.transition)}return Ie}),f=ut(()=>x.value[B.value]),He=ut(()=>x.value[j.value]),Lt=ut(()=>x.value[Z.value]),Nt=ut(()=>x.value.slice(B.value+1)),At=ut(()=>B.value===x.value.length-1),be=ut(()=>!!f.value?.src.flac),Nn=ut(()=>x.value.some(Ie=>!!Ie.userAdded)),g=ut(()=>x.value.some(Ie=>!!Ie.src.spatialMp4)),W=ut(()=>!!Te.value&&!!N.value&&!g.value),Fe=ut(()=>!!N.value?.flac),ti=ut(()=>Ie=>{const me=x.value[B.value-1]?.transition;return Ie==="lossless"&&me?.flac?me.flac:me?.aac??0}),Wt=ut(()=>Ie=>{const me=x.value[B.value]?.transition;return Ie==="lossless"&&me?.flac?me.flac:me?.aac??0}),xn=ut(()=>Ie=>Wt.value(Ie)-ti.value(Ie)),Bt=ut(()=>Ie=>{const me=x.value[B.value]?.transition,Ze=x.value[x.value.length-1]?.transition;return Ie==="lossless"&&me?.flac&&Ze?.flac?me.flac===Ze.flac?0:me.flac??0:me?.aac===Ze?.aac?0:me?.aac??0}),Vt=ut(()=>Ie=>{const me=x.value[B.value-2]?.transition;return Ie==="lossless"&&me?.flac?me.flac??0:me?.aac??0}),ct=ut(()=>(Ie,me)=>{if(!Te.value)return;let Ze=0;const gt=.01;for(const C of Te.value){if((me==="lossless"&&C.flac?C.flac:C.aac)>=Ie+gt)break;Ze+=1}return x.value[Ze]??x.value[0]}),fn=ut(()=>(Ie,me)=>{if(!b.value)return;const Ze=.01,gt=x.value.findIndex(wt=>wt.transition===void 0);if(gt===-1)return;const C=x.value[gt-1]?.transition;if(!C)return;const mt=me==="lossless"&&C.flac?C.flac:C.aac;if(Ie+Ze>=mt)return x.value[gt]});function Ee(Ie){return x.value.map(me=>me.id).indexOf(Ie)}function Ht(Ie){return x.value.findIndex(me=>me.audioboxid===Ie&&!me.userAdded)}function S(Ie,me){b.value=!1,x.value=Ie,N.value=me?.gaplessSrc,me?.startId?B.value=Ee(me.startId):me?.startAudioId&&(B.value=Ht(me?.startAudioId)),B.value=B.value===-1?0:B.value}function q(){S(x.value,{startId:He.value?.id})}function ee(){S(x.value,{startId:Lt.value?.id})}function It(Ie){let me=B.value+1;for(;me<x.value.length&&x.value[me]?.userAdded;)me++;x.value.splice(me,0,Ie),N.value&&(b.value=!0)}function fe(Ie){const me=Ee(Ie);me!==-1&&(x.value.splice(me,1),N.value&&(b.value=!0),me<B.value&&(B.value-=1))}function re(){!Nt.value.some(Ie=>Ie.userAdded)||(x.value=[...x.value.slice(0,B.value+1),...Nt.value.filter(Ie=>!Ie.userAdded)],N.value&&(b.value=!1))}function qt(){!Nt.value.some(Ie=>!Ie.userAdded)||(x.value=[...x.value.slice(0,B.value+1),...Nt.value.filter(Ie=>Ie.userAdded)],N.value&&(b.value=!0))}function jt(Ie,me,Ze){if(Ie===me)return;const gt=Ee(Ie),C=Ee(me);if(gt===-1||C===-1||gt<C&&(Ze==="top"||Ze==="left")||gt>
70C&&(Ze==="bottom"||Ze==="right"))return;const mt=f.value?.id,[wt]=x.value.splice(gt,1);if(!wt)return;const mi=Ee(me),Ke=(gt<C?"after":"before")==="after"?mi+1:mi;if(wt.userAdded){const $t=x.value.findLastIndex(Y=>Y.userAdded)+1;if(Ke>$t){x.value.splice(gt,0,wt);return}}if(!wt.userAdded){let et=-1;for(let $t=0;$t<x.value.length;$t++){if($t<Z.value)continue;const Y=x.value[$t];if(!!Y&&!Y.userAdded){et=$t;break}}if(Ke<et){x.value.splice(gt,0,wt);return}}x.value.splice(Ke,0,wt),mt&&(B.value=Ee(mt)),N.value&&(b.value=!0)}function Jr(Ie){if(!!Ie)return x.value.find(me=>me.id===Ie)}Kk(B,(Ie,me)=>{if(me>0&&Ie===0){let Ze=-1;for(let gt=x.value.length-1;gt>=0;gt--)if(x.value[gt]?.userAdded){Ze=gt;break}if(Ze===-1)return;for(let gt=0;gt<Ze;gt++)x.value[gt]&&(x.value[gt].userAdded=!0)}});function Zr(){x.value=[],N.value=void 0,B.value=-1,b.value=!1}return{queue:x,upcoming:Nt,anyUserQueue:Nn,gaplessSrc:N,transitionToStandard:b,current:f,previous:He,next:Lt,atEnd:At,currentLosslessAvailable:be,someSpatial:g,gaplessAvailable:W,gaplessLosslessAvailable:Fe,gaplessCurrentStart:ti,gaplessCurrentEnd:Wt,gaplessCurrentDuration:xn,gaplessNextStart:Bt,gaplessPreviousStart:Vt,gaplessCurrent:ct,standardItemForTransition:fn,init:S,skipPrevious:q,skipNext:ee,insert:It,remove:fe,move:jt,clearQueue:re,clearSystemQueue:qt,get:Jr,reset:Zr}});function kD(x,N,B){return x.replace(new RegExp(N,"g"),B)}async function DD(x,N){const B=Wk(qk(),N).name,b=await Ea(N);return kD(x,B,b)}function PD(x){const N="#EXT-X-BYTERANGE:0@";if(!x.includes(N))return x;const B=x.split(`
71`);return B.splice(B.length-5,3),B.join(`
72`)}function Zh(x){return"data:audio/x-mpegurl;base64,"+btoa(x)}function qh(x,N){const B=[];for(const b of x){const j=b[N];j&&B.push(j)}return B}function RD(x){return new Promise((N,B)=>{const b=new FileReader;b.onload=j=>{N(j.target?.result)},b.onerror=B,b.readAsText(x)})}async function LD(x){const N=await Ea(x),b=await(await fetch(N)).blob();return await RD(b)}const zh={};async function ND(x){const N=x.playlist;if(N in zh){const Te=zh[N];if(Te)return Te}const B=await LD(N),b=x.media,j=await DD(B,b),Z=PD(j);return zh[N]=Z,Z}async function jD(x){const N=[];for(const B of x)N.push(ND(B));return Promise.all(N)}function Ia(){return!!navigator.vendor&&navigator.vendor.includes("Apple")}function UD(){if(!Ia())return null;let x=navigator.userAgent.match(/Version\/(\d+)/),N=x?.[1];return x&&N||(x=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/),N=x?.[1],x&&N)?parseInt(N,10):null}function eg(){if(Ia()){const x=(UD()??0)<14,{isInstagram:N}=$r();if(x||N())return console.warn("Browser does not support FLAC, falling back to AAC"),!1}return!0}function OD(x){const N=x.split(`
73`);let B=-1/0,b=-1;for(const j of N){if(b!==-1&&j.includes("#EXT-X-BYTERANGE")){const Z=Number(j.split(":").pop()?.split("@")[0]),Te=8*Z/b;Te>B&&(B=Te),b=-1}j.includes("#EXTINF")&&(b=Number(j.split(":").pop()?.slice(0,-1)))}if(B===-1/0)throw new Error("Bandwidth unable to be estimated from manifest");return Math.ceil(B)}function _D(x){const N=x.split(`
74`);let B=0;for(const b of N){if(!b.includes("#EXTINF"))continue;const j=b.split(":");if(j.length!==2)throw new Error("Error parsing EXTINF tag for track duration");const Z=j[1]?.split(",")[0];B+=Number(Z)}return B}function bD(x){return x.map(_D)}
74function FD(x){if(x.length<1)throw new Error("Must have at least one duration to calculate transitions");const N=[];let B=0;for(const b of x)B+=b,N.push(B);return N}function BD(x){const N=bD(x);return FD(N)}const VD=["#EXTM3U","#EXT-X-VERSION","#EXT-X-TARGETDURATION","#EXT-X-MEDIA-SEQUENCE","#EXT-X-PLAYLIST-TYPE"];function HD(x){if(x.length===0)return"";if(x.length===1)return x[0];let N="",B=0;for(const b of x){const j=b.split(`
75`);let Z="";for(const Te of j){const f=Te===`
76`||Te==="";if(Te.includes("#EXT-X-ENDLIST")||f)continue;const He=VD.some(Lt=>Te.includes(Lt));B>0&&He||(Z+=`${Te}
77`)}B<x.length-1&&(Z+=`#EXT-X-DISCONTINUITY
78`),N+=Z,B+=1}return N+=`#EXT-X-ENDLIST
79`,N}async function GD(x){const N=await jD(x),B=BD(N);return{manifest:HD(N)??"",transitions:B}}const XD=Ia()?"fLaC":"flac",KD="mp4a.40.2";function WD(x,N){const B=Zh(x),b=OD(x);return{uri:B,codec:N?XD:KD,bandwidth:b}}async function Yh(x,N){const{manifest:B,transitions:b}=await GD(x);return{variantStream:WD(B,N),transitions:b}}function qS(x){let N=`#EXTM3U
80`;for(const B of x){const{uri:b,codec:j,bandwidth:Z}=B;N+=`#EXT-X-STREAM-INF:BANDWIDTH=${Z},CODECS="${j}"
81`,N+=`${b}
82`}return N}async function zS(x,N){if(N){const f=qh(x,"flac");if(f.length===x.length){const{variantStream:He,transitions:Lt}=await Yh(f,!0);return{manifest:qS([He]),transitions:Lt}}}const B=[],b=qh(x,"aac128k");b.length===x.length&&B.push(Yh(b,!1));const j=qh(x,"aac256k");j.length===x.length&&B.push(Yh(j,!1));const Z=await Promise.all(B),Te=[];for(const f of Z)Te.push(f.variantStream);return{manifest:qS(Te),transitions:Z[0]?.transitions}}function sP(x,N){const{trackPath:B}=x,b=B.split("/")[1],j=B.split("/")[3];return{name:N?"player-file":"box",params:N?{playerid:N,boxid:j}:{projectid:b,boxid:j},query:N?{projectid:b}:{}}}function nw(){const{isApple:x,safariVersion:N}=$r();if(!x())return!1;const B=N().major;if(B==null)return!1;const b=B>=15;return b&&console.log("Spatial audio supported!"),b}async function qD(x,N){const B=eg(),b=$r();let j;if(x&&x.flac?.media&&x.flac.playlist&&B)if(x.masterFlac&&x.masterFlacSafari){const At=b.isApple()&&!b.hasMSE(),be=x.masterFlac.cdnUrl||x.masterFlac.url,Nn=x.masterFlacSafari.cdnUrl||x.masterFlacSafari.url;j=At?Nn:be}else{console.log("Generating single-track FLAC manifest client-side");const{manifest:At}=await zS([x],!0);j=Zh(At)}const Z=x?.aac128k?.media&&x?.aac128k?.playlist,Te=x?.aac256k?.media&&x?.aac256k?.playlist,f=Z||Te;let He;if(f&&x)if(x.masterAac)He=x.masterAac.cdnUrl||x.masterAac.url;else if(x.masterAac256k)He=x.masterAac256k.cdnUrl||x.masterAac256k.url;else{console.log("Generating single-track AAC manifest client-side");const{manifest:At}=await zS([x],!1);He=Zh(At)}const Lt=N;if(!He&&Lt)try{console.log("Falling back to MP3 for single-track src"),He=await Ea(Lt)}catch{}if(!He)return;const Nt={aac:He};return j&&(Nt.flac=j),Nt}function zD(x,N,B,b){const j=[{sizes:"200x200",src:Xh(b?.small)||GS().artwork.small.src,resolution:"small"},{sizes:"500x500",src:Xh(b?.medium)||GS().artwork.large.src,resolution:"medium"}],Z=Xh(b?.large);return Z&&j.push({sizes:"2000x2000",src:Z,resolution:"large"}),{title:x,album:N,artist:B,artwork:j}}async function YD(x,N,B){if(!!N)try{const{files:b}=await zk([x],{playerid:N,shareid:B},"playback");return b.find(j=>j.boxid===x)?.url}catch(b){console.warn("Could not mint a URL for the original asset",b);return}}async function QD(x){const{audioboxid:N,projectid:B,playerid:b,shareid:j,childBoxData:Z,mediaMetadata:Te,to:f,userAdded:He,playerName:Lt}=x,Nt=await qD(Z.audio?.hls,Z.audio?.src.compressed);if(!Nt)return;if(Z.audio?.spatial!==void 0&&nw()){const g=Z.audio?.hls?.masterDdpjoc?.cdnUrl??Z.audio?.hls?.ddpjoc?.playlistCdnUrl??Z.audio?.src.ddpjoc?.url;if(g)Nt.spatialMp4=g;else{const W=await YD(N,b,j);W&&(Nt.spatialMp4=W)}}try{if(Ia()){const g=Z.audio?.src.compressed;g&&(Nt.mp3=await Ea(g));const W=Z.asset.split(".").pop()==="wav"?Z.asset:void 0;W&&(Nt.wav=await Ea(W))}}catch(g){console.warn("Error fetching WAV/MP3",g)}const be={id:x.id??tw(),audioboxid:N,src:Nt,projectid:B,playerid:b||B,playerName:Lt,metadata:zD(Te.title,Te.album,Te.artist,Te.artwork)};f&&(be.to=f),He&&(be.userAdded=He);const Nn=Z.audio?.loudness;return Nn&&(be.loudness=Nn),be}const Yr=Yk(),YS=eD();function QS(x,N){return x.find(B=>B.resolution===N)}
82function ed(x,N){if(N?.platform!==void 0){const B=gD(N.platform,x?.loudness?.integratedLufs,x?.loudness?.truePeak);return Jh().applyGain(B)}else if(N?.targetLufs!==void 0){const B=hD(N.targetLufs,x?.loudness?.integratedLufs??void 0,x?.loudness?.truePeak??void 0);return Jh().applyGain(B)}}const iw=_o(Qk,!1),rw=_o($k,void 0),ow=_o(Zk,Jk),id=nd(),$D=id?iw.get():!1,JD=id?rw.get():void 0,ZD=id?ow.get():void 0,eP=3,$S=1e3;let td=!1;const sw=bo("audio-player-module",()=>{const x=xD(),N=Jh(),B=CD(),b=ng(),j=$r(),Z=$h(),{loading:Te,buffering:f,playing:He,error:Lt,volume:Nt,muted:At}=xa(x),{queue:be,current:Nn,gaplessSrc:g}=xa(b),W=Rt(_o(XS,"compressed").get()),Fe=Rt(void 0),ti=Rt(!1),Wt=Rt(!1),xn=Rt(!1),Bt=Rt(!1),Vt=Rt($D),ct=Rt(JD),fn=Rt(ZD),Ee=Rt(void 0),Ht=Rt(void 0),S=ut(()=>{const $=x.currentTime;if(!Bt.value||!Fe.value)return $;const Me=b.gaplessCurrentStart(Fe.value);return Math.max($-Me,0)}),q=ut(()=>YS.secondsToTimecode(S.value)),ee=ut(()=>{const $=x.duration;if(!Bt.value||!Fe.value)return $;const Me=b.gaplessCurrentStart(Fe.value),Ut=b.gaplessCurrentEnd(Fe.value);return Math.max(Ut-Me,0)}),It=ut(()=>YS.secondsToTimecode(ee.value)),fe=ut(()=>B.id),re=ut(()=>B.audioboxid),qt=ut(()=>B.metadata),jt=ut(()=>qt.value?.artwork),Jr=ut(()=>{if(!!jt.value)return QS(jt.value,"small")}),Zr=ut(()=>{if(!!jt.value)return QS(jt.value,"medium")}),Ie=ut(()=>b.current?.to),me=ut(()=>N.gainInDecibels);async function Ze($,Me){Ht.value=Me?.hideComments;const Ut=Me?.quality??W.value,gn=Bt.value?b.gaplessSrc:void 0,Le={startId:$.userAdded?Me?.queueOptions?.startId:void 0,startAudioId:$.userAdded?void 0:Me?.queueOptions?.startAudioId,gaplessSrc:Me?.queueOptions?.gaplessSrc??gn},yi=b.gaplessAvailable?gn?.aac!==Le.gaplessSrc?.aac||gn?.flac!==Le.gaplessSrc?.flac:gn===void 0&&Le.gaplessSrc!==void 0;if(Me?.queue&&b.init(Me.queue,Le),b.init(b.queue,{...Le,startId:$.userAdded?$.id:void 0,startAudioId:$.userAdded?void 0:$.audioboxid}),b.current?.id!==$.id&&b.current?.audioboxid!==$.audioboxid)b.init([$],{startId:$.userAdded?$.id:void 0,startAudioId:$.userAdded?void 0:$.audioboxid});else if(!Me?.forceReload){const Yi=$.id===B.id;if(Bt.value&&Fe.value&&b.gaplessAvailable&&!yi&&xn.value!=="one"){if(Yi||await x.seek(b.gaplessCurrentStart(Fe.value)),Ut===Fe.value||!g.value?.flac){Me?.autoplay&&await x.play();return}}else if(Yi&&Ut===Fe.value){Me?.autoplay&&await x.play();return}}if(!b.current){console.warn("No current item in queue to load");return}if(id?(Me?.loudnessMatch!==void 0&&vi(Me.loudnessMatch),Me?.targetLufs!==void 0&&ii(Me.targetLufs),Me?.loudnessPlatform&&Gn(Me.loudnessPlatform)):Me?.loudnessMatch&&Kh().show("Loudness matching bypassed",{details:"Loudness matching was requested, but it is not supported on this device.",variant:"default",dismissable:!0,action:{label:"Learn more",callback:()=>{tD().openHelpdesk(nD.LOUDNESS_MATCHING)}}}),Vt.value&&await N.init(x.audio),x.$patch({currentTime:0}),b.current.id&&Ir(b.current),b.gaplessAvailable&&!Vt.value)try{console.log("Loading Gapless..."),await gt($,{...Me,quality:Ut})}catch(Yi){console.error(Yi),console.warn("Falling back to standard transitions"),Bt.value=!1,await C($,{...Me,quality:Ut})}else Bt.value=!1,await C($,{...Me,quality:Ut});Me?.autoplay&&await x.play()}async function gt($,Me){const Ut=b.gaplessSrc;if(!Ut||!b.gaplessAvailable)throw new Error("Gapless requies gapless src and transitions");const yi=(Me?.quality==="lossless"&&eg()?"lossless":"compressed")==="lossless"&&Ut.flac?"lossless":"compressed",Yi=yi==="lossless"&&Ut.flac?Ut.flac:Ut.aac;return await wt(),x.init({src:Yi,onload:()=>{if(performance.mark("audio-load-end"),Fe.value=yi,!Fe.value)return;Bt.value=!0,x.currentTime!==b.gaplessCurrentStart(Fe.value)&&x.seek(b.gaplessCurrentStart(Fe.value)),b.current&&(j.isMobile()?Ir(b.current):Ir(b.current,{position:0,duration:ee.value}));const Xn=performance.measure("time-to-play","audio-load-start","audio-load-end");Yr.recordPlay($.audioboxid,$.metadata.title,ee.value,$.projectid,$.playerid),Z.playedNewAudio({timeToPlay:Xn.duration,gapless:!0,quality:Fe.value,qualityRequested:yi,duration:ee.value})},onloaderror:()=>{Fe.value=void 0,Bt.value=!1,yi!=="compressed"?Ze($,{...Me,quality:"compressed"}):Ze($,{...Me,queueOptions:{...Me?.queueOptions,gaplessSrc:void 0}})},onplay:()=>{Yr.onResume(),Wt.value=!0},onpause:()=>{Yr.onPause(),Wt.value=!1},onbuffering:Xn=>{if(!Xn.buffering)return;
82const zt=x.audio;zt?.paused||zt?.seeking||Fe.value==="lossless"&&setTimeout(()=>{zt?.playbackRate===0&&(td||(td=!0,Kh().show("Buffering detected",{details:"Switching to Adaptive quality may help to avoid buffering during playback.",variant:"default",action:{label:"Use Adaptive",callback:()=>{Ke("compressed",{inplace:!0,autoplay:!0})}}})))},$S)},onend:()=>{},ontimeupdate:()=>{const Xn=x.currentTime;if(!Fe.value)return;if(b.transitionToStandard){const jn=b.standardItemForTransition(Xn,Fe.value);if(jn&&fe.value!==jn.id){if(xn.value==="one"){x.seek(b.gaplessCurrentStart(Fe.value));return}b.transitionToStandard=!1,Ze(jn,{...Me,queue:b.queue,queueOptions:{...Me?.queueOptions,gaplessSrc:void 0}}),Ir(jn),Yr.recordPlay(jn.audioboxid,jn.metadata.title,ee.value,jn.projectid,jn.playerid);return}}const zt=b.gaplessCurrent(Xn,Fe.value);zt&&fe.value!==zt.id&&(xn.value==="one"?x.seek(b.gaplessCurrentStart(Fe.value)):(b.init(b.queue,{startId:zt.userAdded?zt.id:void 0,startAudioId:zt.userAdded?void 0:zt.audioboxid,gaplessSrc:b.gaplessSrc}),Ir(zt,{position:0,duration:b.gaplessCurrentDuration(Fe.value)}),Yr.recordPlay(zt.audioboxid,zt.metadata.title,ee.value,zt.projectid,zt.playerid)))}})}async function C($,Me){if(!b.current)throw new Error("No current item in queue");const Ut=$.loudness?.integratedLufs!==void 0&&$.loudness.truePeak!==void 0,gn=!Ia()||!Ut||!Vt.value,Le={compressed:gn?$.src.aac:$.src.mp3||$.src.aac,lossless:gn?$.src.flac:$.src.wav||$.src.flac},yi=Me?.quality==="lossless"&&eg()?"lossless":"compressed",Xn=yi==="lossless"&&Le.lossless?"lossless":"compressed",zt=Xn==="lossless"&&Le.lossless?Le.lossless:Le.compressed,jn=$.src.spatialMp4&&nw()?$.src.spatialMp4:void 0;if(ti.value=!!jn,!zt)throw new Error("Load source available");return await wt(),x.init({src:jn??zt,onload:()=>{performance.mark("audio-load-end");const Ue=performance.measure("time-to-play","audio-load-start","audio-load-end");Fe.value=Xn,Yr.recordPlay($.audioboxid,$.metadata.title,ee.value,$.projectid,$.playerid),Z.playedNewAudio({timeToPlay:Ue.duration,gapless:!1,quality:yi,qualityRequested:Xn,duration:ee.value})},onloaderror:()=>{Fe.value=void 0,Xn!=="compressed"&&Ze($,{...Me,quality:"compressed"})},onplayerror:()=>{Fe.value=void 0,Xn!=="compressed"&&Ze($,{...Me,quality:"compressed",autoplay:!0})},onplay:()=>{Yr.onResume(),Wt.value=!0},onpause:()=>{Yr.onPause(),Wt.value=!1},onbuffering:Ue=>{if(!Ue.buffering)return;const Ys=x.audio;Ys?.paused||Ys?.seeking||Fe.value==="lossless"&&setTimeout(()=>{Ys?.playbackRate===0&&(td||(td=!0,Kh().show("Buffering detected",{details:"Switching to Adaptive quality may help to avoid buffering during playback.",variant:"default",action:{label:"Use Adaptive",callback:()=>{Ke("compressed",{inplace:!0,autoplay:!0})}}})))},$S)},onend:()=>{if(xn.value==="one")return x.play();if(b.next&&!b.atEnd)return Ze(b.next,{...Me,autoplay:!0})}})}function mt(){return Wt.value=!1,x.unload()}async function wt(){const $=await x.resetAudio();Vt.value&&N.swapSource($)}function mi($){if(!!Fe.value)if(xn.value=!1,b.next)if(Bt.value){if(b.transitionToStandard){b.transitionToStandard=!1,Ze(b.next,{autoplay:$??Wt.value,queue:b.queue,queueOptions:{gaplessSrc:void 0}});return}x.seek(b.gaplessNextStart(Fe.value))}else return Ze(b.next,{autoplay:$??Wt.value});else x.stop()}function bi($){if(!!Fe.value)if(xn.value=!1,S.value>eP)Bt.value?x.seek(b.gaplessCurrentStart(Fe.value)):x.seek(0);else if(b.previous)if(Bt.value){if(b.transitionToStandard){b.transitionToStandard=!1,Ze(b.previous,{autoplay:$??Wt.value,queue:b.queue,queueOptions:{gaplessSrc:void 0}});return}x.seek(b.gaplessPreviousStart(Fe.value))}else return Ze(b.previous,{autoplay:$??Wt.value});else x.seek(b.gaplessCurrentStart(Fe.value))}async function Ke($,Me){if(W.value=$,_o(XS,"compressed").set($),Fe.value===$)return;const Ut=x.currentTime;b.current&&(await Ze(b.current,{queue:b.queue,queueOptions:{gaplessSrc:b.gaplessSrc},autoplay:Me?.autoplay||x.playing,quality:$}),Me?.inplace&&x.seek(Ut))}function et($){xn.value=$}function $t($){if(!Fe.value)return;if(!Bt.value)return x.seek($);const Me=b.gaplessCurrentStart(Fe.value);return x.seek(Me+$)}function Y($=5){const Me=S.value-$;Me>0?$t(Me):$t(0)}function vi($){!nd()||(Vt.value=$)}function ni($){if(vi($),console.log("setLoudnessMatch",Vt.value),iw.set(Vt.value),Vt.value){N.init(x.audio);const Me=b.current;ed(Me,{targetLufs:fn.value,platform:ct.value})}else N.applyGain(0)}function hn(){ni(!Vt.value)}function Gn($){!nd()||(ct.value=$)}function $e($){if(Gn($),rw.set(ct.value),Vt.value){const Me=b.current;ed(Me,{targetLufs:fn.value,platform:$})}}function ii($){!nd()||($!==void 0&&Gn(void 0),fn.value=$)}function En($){if(ii($),ow.set(fn.value),Vt.value){const Me=b.current;ed(Me,{targetLufs:$})}}function Pe($){Ee.value=$}function zi(){Ee.value=void 0}function Ir($,Me){const Ut=!j.isMobile();B.load($.id,$.audioboxid,$.metadata,{handlers:{onplay:()=>x.play(),onpause:()=>x.pause(),onstop:()=>x.stop(),onnext:()=>mi(),onprevious:()=>bi(),onseekto:gn=>{!gn.seekTime||(Ut?$t(gn.seekTime):x.seek(gn.seekTime))}},positionState:Me&&Ut?Me:void 0}),Vt.value&&ed($,{targetLufs:fn.value,platform:ct.value}),Ee.value&&(console.log("Running callback onnewqueueitem"),Ee.value($))}return{qualityPreferred:W,qualityLoaded:Fe,spatialAudio:ti,autoplayOnSkip:Wt,repeat:xn,gapless:Bt,loudnessMatch:Vt,loudnessPlatform:ct,targetLufs:fn,onNewQueueItem:Ee,hideComments:Ht,loading:Te,buffering:f,playing:He,error:Lt,volume:Nt,muted:At,currentTime:S,currentTimeString:q,duration:ee,durationString:It,queue:be,current:Nn,id:fe,audioboxid:re,metadata:qt,artwork:jt,artworkSmall:Jr,artworkMedium:Zr,gaplessSrc:g,trackLocation:Ie,appliedGain:me,load:Ze,unload:mt,preload:x.preload,reset:wt,skipNext:mi,skipPrevious:bi,selectQuality:Ke,setRepeat:et,play:x.play,pause:x.pause,seek:$t,jumpBack:Y,stop,setVolume:
82x.setVolume,toggleMuted:x.toggleMuted,setLoudnessMatch:ni,toggleLoudnessMatch:hn,setLoudnessPlatform:$e,setTargetLufs:En,attachOnNewQueueItem:Pe,removeOnNewQueueItem:zi,newQueueItem:Ir}});var Pt=(x=>(x.LOAD="load",x.SKIP_NEXT="skip-next",x.SKIP_PREVIOUS="skip-previous",x.PLAY="play",x.PAUSE="pause",x.SEEK="seek",x.JUMP_BACK="jump-back",x.STOP="stop",x.SET_REPEAT="set-repeat",x.ADD_TO_QUEUE="add-to-queue",x.ADD_QI_TO_QUEUE="add-qi-to-queue",x.REMOVE_FROM_QUEUE="remove-from-queue",x))(Pt||{});const Qh=tw(),tP=bo("audio-sync-module",()=>{const x=sw(),N=ng(),B=Rt(void 0),b=Rt(!1),j=Rt(Qh),Z=ut(()=>{if(!!B.value)return iD(B.value)});function Te(Ee){return JSON.parse(JSON.stringify(Ee))}function f(Ee,Ht){if(!Z.value)return;console.log("Publishing action",Ee);const S=Te({clientid:Qh,name:Ee,args:Ht,timestamp:Date.now()});return rD(Z.value,S)}function He(){if(!Z.value)return;const Ee=x;oD(Z.value,async Ht=>{const S=Ht.val();if(!S)return;const{clientid:q,name:ee,args:It}=S;if(q===Qh){console.log("Received own action, skipping...");return}switch(ee){case Pt.LOAD:Ee.load(It[0],It[1]);break;case Pt.SKIP_NEXT:Ee.skipNext();break;case Pt.SKIP_PREVIOUS:Ee.skipPrevious();break;case Pt.PAUSE:Ee.pause();break;case Pt.PLAY:Ee.play();break;case Pt.SEEK:Ee.seek(It[0]);break;case Pt.STOP:Ee.stop();break;case Pt.SET_REPEAT:Ee.setRepeat(It[0]);break;case Pt.JUMP_BACK:Ee.jumpBack();break;case Pt.ADD_TO_QUEUE:{const fe=await Aa(It[0],It[0].to,It[1]);fe&&N.insert(fe);break}case Pt.ADD_QI_TO_QUEUE:N.insert(It[0]);break;case Pt.REMOVE_FROM_QUEUE:N.remove(It[0]);break}})}function Lt(){!Z.value||sD(Z.value)}function Nt(Ee,Ht){B.value=Ee,b.value=Ht,He(),$h().sessionJoined({sessionid:Ee})}function At(){Lt();const Ee=B.value??"";B.value=void 0,b.value=!1,$h().sessionLeft({sessionid:Ee})}function be(Ee,Ht){if(!(B.value&&!b.value))return f(Pt.LOAD,[Ee,Ht]),x.load(Ee,Ht)}function Nn(){if(!(B.value&&!b.value))return f(Pt.SKIP_NEXT,[]),x.skipNext()}function g(){if(!(B.value&&!b.value))return f(Pt.SKIP_PREVIOUS,[]),x.skipPrevious()}function W(){if(!(B.value&&!b.value))return f(Pt.PLAY,[]),x.play()}function Fe(){B.value&&!b.value||(f(Pt.PAUSE,[]),x.pause())}function ti(Ee){B.value&&!b.value||(f(Pt.SEEK,[Ee]),x.seek(Ee))}function Wt(){B.value&&!b.value||(f(Pt.JUMP_BACK,[]),x.jumpBack())}function xn(){B.value&&!b.value||(f(Pt.STOP,[]),x.stop())}function Bt(Ee){B.value&&!b.value||(f(Pt.SET_REPEAT,[Ee]),x.setRepeat(Ee))}async function Vt(Ee,Ht){if(B.value&&!b.value)return;f(Pt.ADD_TO_QUEUE,[Ee,Ht]);const S=await Aa(Ee,Ee.to,Ht);S&&N.insert(S)}async function ct(Ee){B.value&&!b.value||(f(Pt.ADD_QI_TO_QUEUE,[Ee]),N.insert(Ee))}function fn(Ee){B.value&&!b.value||(f(Pt.REMOVE_FROM_QUEUE,[Ee]),N.remove(Ee))}return{sessionid:B,canPublish:b,clientid:j,roomActionRef:Z,join:Nt,leave:At,load:be,skipNext:Nn,skipPrevious:g,play:W,pause:Fe,seek:ti,jumpBack:Wt,stop:xn,setRepeat:Bt,addQueueItemToQueue:ct,addToQueue:Vt,removeFromQueue:fn}}),nP=100,JS=window.md5;function tg(x){if(!x)return;const N=lD();return x===N.playerid?N.shareid:cD().getItemData(x)?.shareid}function Aa(x,N,B,b){const j={title:x.name||x.data.name||"",album:B?.player?.data.name||B?.project?.data?.name||"",artwork:B?.player?.data.artwork||B?.project?.data.artwork},Z=x.data.audio?.metadata?.original;Z&&B?.player?.data.config?.preferMetadata&&(Z?.title&&(j.title=Z.title),Z?.album&&(j.album=Z.album),Z?.artist&&(j.artist=Z.artist));const Te=B?.player?.data.name||B?.project?.data.name||"";return QD({id:b,audioboxid:x.id,projectid:B?.project?.id??"",playerid:B?.player?.id,shareid:tg(B?.player?.id),childBoxData:x.data,mediaMetadata:j,to:N,userAdded:B?.userAdded,playerName:Te}).catch(f=>{console.error(f)})}async function ZS(x){const N=[],B={};if(!x.audioBoxes)return{queue:N,queueItems:B};const b=[];for(const Z of x.audioBoxes)b.push(Aa(Z,Z.to,x,Z.id));const j=await Promise.all(b);for(const Z of j)Z&&(N.push(Z),B[Z.id]=Z);return{queue:N,queueItems:B}}function ew(x,N){if(!N?.masterAac)return x;const B=N.masterAac.transitions,b=N.masterFlac?.transitions;return x.map((Z,Te)=>{const f={aac:B[Te]??0};return b&&b[Te]&&(f.flac=b[Te]),{...Z,transition:f}})}function iP(x){const N=x.slice();for(let B=N.length-1;B>0;B--){const b=Math.floor(Math.random()*(B+1)),j=N[B],Z=N[b];if(j===void 0||Z===void 0)return console.warn("Undefined value in shuffleArray, skipping shuffle"),x;[N[B],N[b]]=[Z,j]}return N}const uP=bo("audio-module",()=>{const x=sw(),N=tP(),B=ng(),b=$r(),{loading:j,buffering:Z,playing:Te,error:f,currentTime:He,currentTimeString:Lt,duration:Nt,durationString:At,volume:be,muted:Nn,qualityPreferred:g,qualityLoaded:W,repeat:Fe,queue:ti,current:Wt,id:xn,audioboxid:Bt,metadata:Vt,artwork:ct,artworkSmall:fn,artworkMedium:Ee,ga
82pless:Ht,gaplessSrc:S,trackLocation:q,loudnessMatch:ee,targetLufs:It,loudnessPlatform:fe,appliedGain:re,spatialAudio:qt,hideComments:jt}=xa(x),{sessionid:Jr,clientid:Zr}=xa(N),{anyUserQueue:Ie}=xa(B),me=uD({});async function Ze(Ke,et,$t,Y){if(!et){console.error("Project ID required for fetching gapless manifests");return}let vi;if(JS&&(vi=JS(Ke.join("")+($t??"")),me[vi]))return me[vi];const ni=b.hasMSE(),hn=b.safariVersion(),Gn=hn?.major?hn.major<16:!1;try{const $e=await aD().findGaplessManifests(Ke,et,ni&&!Gn?"v2":"v1",$t,Y);if($e.manifests)return vi&&(me[vi]=$e.manifests),await mi({masterAac:$e.manifests.masterAac,masterFlac:$e.manifests.masterFlac,masterFlacSafari:$e.manifests.masterFlacSafari}),$e.manifests}catch($e){console.error("Error fetching gapless manifest",$e)}}async function gt(Ke){N.addQueueItemToQueue(Ke)}async function C(Ke,et){N.addToQueue(Ke,et)}async function mt(Ke){N.removeFromQueue(Ke)}async function wt(Ke,et){if(performance.clearMarks(),performance.clearMeasures(),performance.mark("audio-load-start"),et.shuffle&&et.audioBoxes){et.audioBoxes=iP(et.audioBoxes);const $e=et.audioBoxes[0];$e&&(Ke=$e),console.log("Shuffled audio boxes")}const $t=x.queue.find($e=>$e.audioboxid===Ke.id);if($t&&!et?.forceReload){let $e;if(et){let{queue:ii}=await ZS(et);if(x.gapless){const En=await Ze(ii.map(Pe=>Pe.audioboxid),et.project?.id,et.player?.id,tg(et.player?.id));ii=ew(ii,En)}$e={...et,queue:ii}}N.load($t,$e);return}if(!et?.audioBoxes){const $e=await Aa(Ke,Ke.to,et);if($e)return console.log("Loading single item"),N.load($e,et);console.warn("Unable to load audio item");return}const Y=await ZS(et),vi=Y.queueItems;let ni=Y.queue,hn=Object.values(vi).find($e=>$e.audioboxid===Ke.id&&!$e.userAdded);if(!hn){if(console.warn("Item not in queue, loading single track queue"),hn=await Aa(Ke,Ke.to,et),!hn){console.error("Unable to load audio item");return}ni=[hn]}const Gn={queue:ni,...et};if(!et.skipGapless&&ni.length>1&&ni.length<nP&&et.project?.id){const $e=await Ze(ni.map(ii=>ii.audioboxid),et.project.id,et.player?.id,tg(et.player?.id));if($e&&$e.masterAac){const ii=ew(ni,$e),En=b.isApple()&&!b.hasMSE()?$e.masterFlacSafari?.url:$e.masterFlac?.url;Gn.queue=ii,Gn.queueOptions={gaplessSrc:{aac:$e.masterAac.url,flac:En}}}}return N.load(hn,Gn)}async function mi(Ke){Ke.masterAac&&await x.preload(Ke.masterAac.cdnUrl??Ke.masterAac.url),b.isApple()&&!b.hasMSE()&&Ke.masterFlacSafari?await x.preload(Ke.masterFlacSafari.cdnUrl??Ke.masterFlacSafari.url):Ke.masterFlac&&await x.preload(Ke.masterFlac.cdnUrl??Ke.masterFlac.url)}function bi(Ke){N.seek(Ke*(Nt.value||0))}return{gaplessManifests:me,loading:j,buffering:Z,playing:Te,error:f,currentTime:He,currentTimeString:Lt,duration:Nt,durationString:At,volume:be,muted:Nn,qualityPreferred:g,qualityLoaded:W,repeat:Fe,queue:ti,current:Wt,id:xn,audioboxid:Bt,metadata:Vt,artwork:ct,artworkSmall:fn,artworkMedium:Ee,gapless:Ht,gaplessSrc:S,sessionid:Jr,clientid:Zr,trackLocation:q,loudnessMatch:ee,targetLufs:It,loudnessPlatform:fe,appliedGain:re,spatialAudio:qt,hideComments:jt,anyUserQueue:Ie,fetchGaplessManifests:Ze,addQueueItemToQueue:gt,addToQueue:C,removeFromQueue:mt,loadBox:wt,load:N.load,unload:x.unload,preload:mi,skipNext:N.skipNext,skipPrevious:N.skipPrevious,selectQuality:x.selectQuality,setRepeat:N.setRepeat,play:N.play,pause:N.pause,seek:N.seek,seekFraction:bi,jumpBack:N.jumpBack,stop:N.stop,setVolume:x.setVolume,toggleMuted:x.toggleMuted,join:N.join,leave:N.leave,toggleLoudnessMatch:x.toggleLoudnessMatch,setTargetLufs:x.setTargetLufs,setLoudnessPlatform:x.setLoudnessPlatform,attachOnNewQueueItem:x.attachOnNewQueueItem,removeOnNewQueueItem:x.removeOnNewQueueItem}});export{Ar as S,ng as a,eg as b,nd as c,nw as d,sP as e,QD as f,Jh as g,xD as h,uP as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.