shaka-player 4.11.19 → 4.11.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,9 +16,9 @@ ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(v
16
16
  function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function x(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
17
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
18
18
  function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.rk=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.A=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
- function sa(a,b){a.i={wg:b,Jg:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function G(a,b,c){a.g=c;return{value:b}}qa.prototype.u=function(a){this.g=a};function I(a){a.g=0}function ta(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a,b){a.m=0;a.j=b||0}function va(a,b,c){a.g=b;a.m=c||0}function wa(a,b){a.m=b||0;b=a.i.wg;a.i=null;return b}function xa(a){a.A=[a.i];a.m=0;a.j=0}
20
- function ya(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Jg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new qa;this.h=a}function Ba(a,b){ra(a.g);var c=a.g.l;if(c)return Da(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ea(a)}
21
- function Da(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ea(a)}a.g.l=null;d.call(a.g,f);return Ea(a)}function Ea(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Jg)throw b.wg;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
19
+ function sa(a,b){a.i={ug:b,Hg:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function G(a,b,c){a.g=c;return{value:b}}qa.prototype.u=function(a){this.g=a};function I(a){a.g=0}function ta(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a,b){a.m=0;a.j=b||0}function va(a,b,c){a.g=b;a.m=c||0}function wa(a,b){a.m=b||0;b=a.i.ug;a.i=null;return b}function xa(a){a.A=[a.i];a.m=0;a.j=0}
20
+ function ya(a,b){var c=a.A.splice(0)[0];(c=a.i=a.i||c)?c.Hg?a.g=a.m||a.j:void 0!=c.u&&a.j<c.u?(a.g=c.u,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new qa;this.h=a}function Ba(a,b){ra(a.g);var c=a.g.l;if(c)return Da(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ea(a)}
21
+ function Da(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ea(a)}a.g.l=null;d.call(a.g,f);return Ea(a)}function Ea(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Hg)throw b.ug;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
22
22
  function Fa(a){this.next=function(b){ra(a.g);a.g.l?b=Da(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ea(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Da(a,a.g.l["throw"],b,a.g.s):(sa(a.g,b),b=Ea(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
23
23
  function P(a){return Ga(new Fa(new Aa(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
24
24
  ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=fa.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
@@ -31,38 +31,38 @@ while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProp
31
31
  ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
32
32
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ja(k,
33
33
  g)&&Ja(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.g)?delete k[g][this.g]:!1};return b});
34
- ha("Map",function(a){function b(){var h={};return h.Qb=h.next=h.head=h}function c(h,k){var l=h[1];return ia(function(){if(l){for(;l.head!=h[1];)l=l.Qb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Ja(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
34
+ ha("Map",function(a){function b(){var h={};return h.Pb=h.next=h.head=h}function c(h,k){var l=h[1];return ia(function(){if(l){for(;l.head!=h[1];)l=l.Pb;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h[0][l];if(m&&Ja(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
35
35
  list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=
36
- m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Qb:this[1].Qb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Qb.next=l.entry,this[1].Qb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Qb.next=
37
- h.entry.next,h.entry.next.Qb=h.entry.Qb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Qb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
36
+ m.value[0].x||"t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],Pb:this[1].Pb,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].Pb.next=l.entry,this[1].Pb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.Pb.next=
37
+ h.entry.next,h.entry.next.Pb=h.entry.Pb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].Pb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
38
38
  function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
39
39
  ha("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
40
40
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
41
41
  b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ha("Array.prototype.keys",function(a){return a?a:function(){return Ka(this,function(b){return b})}});
42
- function La(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Hg:e,v:f}}return{Hg:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).Hg}});
42
+ function La(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Fg:e,v:f}}return{Fg:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).Fg}});
43
43
  ha("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ha("Array.prototype.values",function(a){return a?a:function(){return Ka(this,function(b,c){return c})}});
44
44
  ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ha("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});
45
45
  function Ma(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ma(this,b,"includes").indexOf(b,c||0)}});
46
46
  ha("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
47
47
  ha("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
48
48
  ha("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ma(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push([d,b[d]]);return c}});
49
- var Oa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ja(d,e)&&(a[e]=d[e])}return a};ha("Object.assign",function(a){return a||Oa});ha("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
49
+ var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ja(d,e)&&(a[e]=d[e])}return a};ha("Object.assign",function(a){return a||Na});ha("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
50
50
  ha("Array.prototype.entries",function(a){return a?a:function(){return Ka(this,function(b,c){return[b,c]})}});ha("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ha("String.prototype.repeat",function(a){return a?a:function(b){var c=Ma(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ha("Number.EPSILON",function(){return Math.pow(2,-52)});
51
51
  ha("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ha("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
52
- ha("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ma(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});ha("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});var Pa=this||self;
53
- function S(a,b){a=a.split(".");var c=Pa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
52
+ ha("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Ma(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});ha("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});var Oa=this||self;
53
+ function S(a,b){a=a.split(".");var c=Oa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
54
54
  @license
55
55
  Shaka Player
56
56
  Copyright 2016 Google LLC
57
57
  SPDX-License-Identifier: Apache-2.0
58
58
  */
59
- function Qa(){}function Ra(){};function Sa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Sa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ta(a){return a.h/(1-Math.pow(a.g,a.i))};function Ua(){this.h=new Sa(2);this.j=new Sa(5);this.g=0;this.i=128E3;this.l=16E3}Ua.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ua.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Ua.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ta(this.h),Ta(this.j))};function Va(){}function Xa(){}function Za(){}function $a(a){var b=Ha.apply(1,arguments);ab.has(a)||(ab.add(a),Za.apply(Va,x(b)))}function bb(){}function cb(){}function eb(){}var ab=new Set;window.console&&(Za=function(){return console.warn.apply(console,x(Ha.apply(0,arguments)))},Xa=function(){console.error.apply(console,x(Ha.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.g=new fb}q=gb.prototype;q.release=function(){this.Wa();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new hb(a,b,c,d),this.g.push(b,a))};q.ua=function(a,b,c,d){function e(g){f.fb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.fb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.fb(),this.g.remove(b,e))}};
60
- q.Wa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.fb();this.g.g={}}};S("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Wa;gb.prototype.unlisten=gb.prototype.fb;gb.prototype.listenOnce=gb.prototype.ua;gb.prototype.listen=gb.prototype.D;gb.prototype.release=gb.prototype.release;function hb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ib(a,d);this.target.addEventListener(b,c,this.g)}
59
+ function Qa(){}function Ra(){};function Sa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Sa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ta(a){return a.h/(1-Math.pow(a.g,a.i))};function Ua(){this.h=new Sa(2);this.j=new Sa(5);this.g=0;this.i=128E3;this.l=16E3}Ua.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ua.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Ua.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ta(this.h),Ta(this.j))};function Va(){}function Ya(){}function Za(){}function $a(a){var b=Ha.apply(1,arguments);ab.has(a)||(ab.add(a),Za.apply(Va,x(b)))}function bb(){}function cb(){}function eb(){}var ab=new Set;window.console&&(Za=function(){return console.warn.apply(console,x(Ha.apply(0,arguments)))},Ya=function(){console.error.apply(console,x(Ha.apply(0,arguments)))});function fb(){this.g={}}q=fb.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function gb(){this.g=new fb}q=gb.prototype;q.release=function(){this.Wa();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new hb(a,b,c,d),this.g.push(b,a))};q.va=function(a,b,c,d){function e(g){f.fb(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.fb=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.fb(),this.g.remove(b,e))}};
60
+ q.Wa=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,x(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.fb();this.g.g={}}};S("shaka.util.EventManager",gb);gb.prototype.removeAll=gb.prototype.Wa;gb.prototype.unlisten=gb.prototype.fb;gb.prototype.listenOnce=gb.prototype.va;gb.prototype.listen=gb.prototype.D;gb.prototype.release=gb.prototype.release;function hb(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=ib(a,d);this.target.addEventListener(b,c,this.g)}
61
61
  hb.prototype.fb=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function ib(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return jb(a)?b:b.capture||!1}
62
- function jb(a){var b=kb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}kb=b}return b||!1}var kb=void 0;function lb(a){if(mb.has(a))return mb.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),mb.set(a,b),b):!1}function nb(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}var mb=new Map;function ob(a,b){this.g=a;this.h=b}ob.prototype.toString=function(){return"v"+this.g+"."+this.h};function pb(a,b){var c=new ob(5,0),d=qb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function rb(a,b,c,d){Za([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function sb(a,b,c,d){Xa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var qb=null;function tb(){}tb.prototype.extract=function(){};tb.prototype.decode=function(){return[]};tb.prototype.clear=function(){};tb.prototype.getStreams=function(){return[]};function ub(){}ub.prototype.init=function(){};ub.prototype.parse=function(){return[]};function vb(){}function wb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=xb(a);b=xb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Bb(a){return ArrayBuffer.isView(a)?0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
63
- function xb(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint8Array)}function Db(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,Uint16Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Cb(a,void 0===b?0:b,c,DataView)}
64
- function Cb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",vb);vb.toDataView=Eb;vb.toUint16=Db;vb.toUint8=xb;vb.toArrayBuffer=Bb;vb.equal=wb;function Fb(){}Fb.prototype.init=function(){};Fb.prototype.i=function(){};Fb.prototype.g=function(){};Fb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Fb);function Hb(a){this.l=new ub;if(a=Ib[a.toLowerCase()])this.l=a();this.h=new tb;if(a=Jb)this.h=a()}Hb.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Hb.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=xb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
65
- Hb.prototype.g=function(){this.h.clear()};Hb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Hb);Hb.findDecoder=function(){return Jb};Hb.unregisterDecoder=function(){Jb=null};Hb.registerDecoder=function(a){Jb=a};Hb.findParser=function(a){return Ib[a]};Hb.unregisterParser=function(a){delete Ib[a]};Hb.registerParser=function(a,b){Ib[a]=b};var Ib={},Jb=null;function Mb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Nb;this.scroll=Ob}S("shaka.text.CueRegion",Mb);var Nb=1;Mb.units={PX:0,PERCENTAGE:Nb,LINES:2};var Ob="";Mb.scrollMode={NONE:Ob,UP:"up"};function Pb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Qb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Rb(a,b,c){c||(c=Pb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Kg:void 0},d=a.next()){e.Kg=d.value;d=b.findIndex(function(f){return function(g){return c(f.Kg,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
62
+ function jb(a){var b=kb;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}kb=b}return b||!1}var kb=void 0;function lb(a){if(mb.has(a))return mb.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),mb.set(a,b),b):!1}function nb(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}var mb=new Map;function ob(a,b){this.g=a;this.h=b}ob.prototype.toString=function(){return"v"+this.g+"."+this.h};function pb(a,b){var c=new ob(5,0),d=qb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function sb(a,b,c,d){Za([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function tb(a,b,c,d){Ya([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var qb=null;function ub(){}ub.prototype.extract=function(){};ub.prototype.decode=function(){return[]};ub.prototype.clear=function(){};ub.prototype.getStreams=function(){return[]};function vb(){}vb.prototype.init=function(){};vb.prototype.parse=function(){return[]};function wb(){}function xb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=yb(a);b=yb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Ab(a){return ArrayBuffer.isView(a)?0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
63
+ function yb(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,Uint8Array)}function Cb(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,Uint16Array)}function Eb(a,b,c){c=void 0===c?Infinity:c;return Bb(a,void 0===b?0:b,c,DataView)}
64
+ function Bb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",wb);wb.toDataView=Eb;wb.toUint16=Cb;wb.toUint8=yb;wb.toArrayBuffer=Ab;wb.equal=xb;function Fb(){}Fb.prototype.init=function(){};Fb.prototype.i=function(){};Fb.prototype.g=function(){};Fb.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Fb);function Hb(a){this.l=new vb;if(a=Ib[a.toLowerCase()])this.l=a();this.h=new ub;if(a=Jb)this.h=a()}Hb.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Hb.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=yb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
65
+ Hb.prototype.g=function(){this.h.clear()};Hb.prototype.j=function(){return this.h.getStreams()};S("shaka.media.ClosedCaptionParser",Hb);Hb.findDecoder=function(){return Jb};Hb.unregisterDecoder=function(){Jb=null};Hb.registerDecoder=function(a){Jb=a};Hb.findParser=function(a){return Ib[a]};Hb.unregisterParser=function(a){delete Ib[a]};Hb.registerParser=function(a,b){Ib[a]=b};var Ib={},Jb=null;function Mb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Nb;this.scroll=Ob}S("shaka.text.CueRegion",Mb);var Nb=1;Mb.units={PX:0,PERCENTAGE:Nb,LINES:2};var Ob="";Mb.scrollMode={NONE:Ob,UP:"up"};function Pb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Qb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function Rb(a,b,c){c||(c=Pb);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={Jg:void 0},d=a.next()){e.Jg=d.value;d=b.findIndex(function(f){return function(g){return c(f.Jg,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
66
66
  function Sb(a,b,c){c||(c=Pb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function T(a,b,c){var d=Ha.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Tb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}T.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};S("shaka.util.Error",T);var Tb=!0;T.Severity={RECOVERABLE:1,CRITICAL:2};T.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
67
67
  T.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,
68
68
  CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,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,
@@ -75,7 +75,7 @@ CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SU
75
75
  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 Ub(a){this.h=a;this.g=void 0}Ub.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Vb(a,b){return a.length&&b.length&&a!==b?0<Wb(a,b).length:!0}
76
76
  function Wb(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(x(d.keyIds),x(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
77
77
  f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
78
- function Xb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Yb=new Ub(function(){return Bb(new Uint8Array([0]))}),Zb=new Map;function $b(a){this.h=a;this.g=null}$b.prototype.$=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};$b.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function ac(a){this.h=a;this.g=null}ac.prototype.zc=function(){this.stop();this.h();return this};ac.prototype.$=function(a){var b=this;this.stop();this.g=(new $b(function(){b.h()})).$(a);return this};ac.prototype.Oa=function(a){var b=this;this.stop();this.g=(new $b(function(){b.g.$(a);b.h()})).$(a);return this};ac.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",ac);ac.prototype.stop=ac.prototype.stop;ac.prototype.tickEvery=ac.prototype.Oa;
78
+ function Xb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}var Yb=new Ub(function(){return Ab(new Uint8Array([0]))}),Zb=new Map;function $b(a){this.h=a;this.g=null}$b.prototype.$=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};$b.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function ac(a){this.h=a;this.g=null}ac.prototype.zc=function(){this.stop();this.h();return this};ac.prototype.$=function(a){var b=this;this.stop();this.g=(new $b(function(){b.h()})).$(a);return this};ac.prototype.Oa=function(a){var b=this;this.stop();this.g=(new $b(function(){b.g.$(a);b.h()})).$(a);return this};ac.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",ac);ac.prototype.stop=ac.prototype.stop;ac.prototype.tickEvery=ac.prototype.Oa;
79
79
  ac.prototype.tickAfter=ac.prototype.$;ac.prototype.tickNow=ac.prototype.zc;function bc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function cc(a){return""!=dc().canPlayType(a)}function ec(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function fc(){return gc("Xbox One")}function hc(){return gc("Tizen")}function ic(){return gc("Tizen 3")}function jc(){return gc("Web0S")}function kc(){return gc("CrKey")}
80
80
  function lc(){if(!gc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function mc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!hc()&&!gc("PC=EOS")&&!gc("PC=APL")&&!gc("VirginMedia")&&!nc()&&!oc()&&!gc("AFT")&&!gc("WPE")&&!gc("DT_STB_BCM")&&!gc("Sky_STB")}function pc(){return gc("PlayStation 5")}function oc(){return gc("PlayStation 4")}function qc(){return gc("Hisense")||gc("VIDAA")}
81
81
  function nc(){return gc("SOPOpenBrowser")}function rc(){if(!mc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function sc(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}function tc(){return gc("Android")}
@@ -85,13 +85,13 @@ function yc(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u;return P(function(v){switch(v.g)
85
85
  a.width=b.width,a.height=b.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(w){Za("Tizen: Error detecting screen size, default screen size 1920x1080.")}v.u(3);break}if(jc()){try{c=JSON.parse(window.PalmSystem.deviceInfo),a.width=Math.max(1920,c.screenWidth),a.height=Math.max(1080,c.screenHeight)}catch(w){Za("WebOS: Error detecting screen size, default screen size 1920x1080."),
86
86
  a.width=1920,a.height=1080}v.u(3);break}if(qc()){window.Hisense_Get4KSupportState&&window.Hisense_Get4KSupportState()?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break}if(!oc()&&!pc()){d=void 0;try{d="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(w){}if(d){a.width=1920;a.height=1080;try{e=new d.Media.Protection.ProtectionCapabilities;f=d.Media.Protection.ProtectionCapabilityResult;g=null;do g=e.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"',
87
87
  "com.microsoft.playready.recommendation");while(g===f.maybe);g===f.probably&&(a.width=3840,a.height=2160)}catch(w){Za("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else fc()&&(a.width=1920,a.height=1080,Za("Xbox: Error detecting screen size, default screen size 1920x1080."));v.u(3);break}h=!1;ta(v,8);return G(v,window.msdk.device.getDisplayInfo(),10);case 10:k=v.h;h="4K"===k.resolution;va(v,9);break;case 8:return wa(v),ta(v,11),G(v,window.msdk.device.getDisplayInfoImmediate(),
88
- 13);case 13:l=v.h;h="4K"===l.resolution;va(v,9);break;case 11:m=wa(v),Za("PlayStation: Failed to get the display info:",m);case 9:h?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break;case 17:p=v.h;case 16:if(p){a.width=3840;a.height=2160;v.u(18);break}if(!(r=n)){v.u(19);break}return G(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:r=v.h;case 19:r&&(a.width=1920,a.height=1080);case 18:va(v,3);break;case 14:u=wa(v),Xa("Failed to check canDisplayType:",
88
+ 13);case 13:l=v.h;h="4K"===l.resolution;va(v,9);break;case 11:m=wa(v),Za("PlayStation: Failed to get the display info:",m);case 9:h?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);v.u(3);break;case 17:p=v.h;case 16:if(p){a.width=3840;a.height=2160;v.u(18);break}if(!(r=n)){v.u(19);break}return G(v,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:r=v.h;case 19:r&&(a.width=1920,a.height=1080);case 18:va(v,3);break;case 14:u=wa(v),Ya("Failed to check canDisplayType:",
89
89
  u);case 3:return v.return(a)}})}var wc=null,vc=null;function zc(){}
90
- function Ac(a){if(!a)return"";a=xb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!oc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Xa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
90
+ function Ac(a){if(!a)return"";a=yb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!oc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ya('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
91
91
  (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
92
92
  function Bc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new T(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Eb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Cc(d)}
93
- function Dc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=xb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Ac(c);if(254==c[0]&&255==c[1])return Bc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Bc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Bc(a,!1);if(0==c[1]&&0==c[3])return Bc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Ac(a);throw new T(2,2,2003);}
94
- function Ec(a){if(window.TextEncoder&&!oc()){var b=new TextEncoder;return Bb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Bb(b)}function Fc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function Cc(a){return Gc.value()(a)}
93
+ function Dc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=yb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Ac(c);if(254==c[0]&&255==c[1])return Bc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Bc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Bc(a,!1);if(0==c[1]&&0==c[3])return Bc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Ac(a);throw new T(2,2,2003);}
94
+ function Ec(a){if(window.TextEncoder&&!oc()){var b=new TextEncoder;return Ab(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Ab(b)}function Fc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function Cc(a){return Gc.value()(a)}
95
95
  function Hc(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",zc);zc.resetFromCharCode=function(){Gc.g=void 0};
96
96
  zc.toUTF16=Fc;zc.toUTF8=Ec;zc.fromBytesAutoDetect=Dc;zc.fromUTF16=Bc;zc.fromUTF8=Ac;var Gc=new Ub(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={ic:65536};0<b.ic;b={ic:b.ic},b.ic/=2)if(a(b.ic))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ic)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ic));return e}}(b);return null});function Ic(a){this.h=a||"";this.g=0}function Lc(a){Mc(a,/[ \t]+/gm)}function Mc(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Nc(a){return a.g==a.h.length?null:(a=Mc(a,/[^ \t\n]*/gm))?a[0]:null}
97
97
  function Oc(a){a=Mc(a,Pc);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:(Number(a[6])||0)/1E3+c+60*b+3600*(Number(a[1])||0)}function Qc(a){return a?Oc(new Ic(a)):null}var Pc=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Rc(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new WeakSet;return b(a)}function Sc(a){var b={},c;for(c in a)b[c]=a[c];return b}
@@ -108,28 +108,28 @@ r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);i
108
108
  0;n<m;n++)p=k[n],"string"!==typeof p?b&&(p.parent=l):n==m-1&&"\n"==p&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,x(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
109
109
  function $c(a){return"string"===typeof a}function ad(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function cd(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function ed(a){if("string"===typeof a)return Hc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Hc(a)}
110
110
  function fd(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=ed(a))&&(a=a.trim());return a}function gd(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())gd(d.value,b,c)}return c}function hd(a,b){a=cd(a,b);return 1!=a.length?null:a[0]}function id(a,b,c){a=jd(a,b,c);return 1!=a.length?null:a[0]}
111
- function kd(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function ld(a,b,c){b=Xc(b);return a.attributes[b+":"+c]||null}function jd(a,b,c){b=Xc(b);var d=[];if(a.children){a=t(a.children);for(var e=a.next();!e.done;e=a.next())(e=e.value)&&e.tagName===b+":"+c&&d.push(e)}return d}function md(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=ld(a,d.value,c))return d;return null}
111
+ function kd(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function ld(a,b,c){b=Xc(b);return a.attributes[b+":"+c]||null}function jd(a,b,c){var d=Xc(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function md(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=ld(a,d.value,c))return d;return null}
112
112
  function nd(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function od(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
113
113
  function pd(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function qd(a){a=Number(a);return 0===a%1?a:null}function rd(a){a=Number(a);return 0===a%1&&0<a?a:null}function sd(a){a=Number(a);return 0===a%1&&0<=a?a:null}function td(a){a=Number(a);return isNaN(a)?null:a}function ud(a){return a?"true"===a.toLowerCase():!1}
114
114
  function vd(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
115
- function wd(a){var b=[];a=Hc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Ub:c.split("/@")[1]||
116
- null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Ub=c.slice(1))}return b}
117
- function xd(a,b){var c=wd(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=yd(a,"t",d.t)),null!==d.n&&(c=yd(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Ub)&&a[c]?zd(a[c],e,d,fd(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
115
+ function wd(a){var b=[];a=Hc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,Tb:c.split("/@")[1]||
116
+ null})}else c.startsWith("@")&&b.length&&(b[b.length-1].Tb=c.slice(1))}return b}
117
+ function xd(a,b){var c=wd(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=yd(a,"t",d.t)),null!==d.n&&(c=yd(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.Tb)&&a[c]?zd(a[c],e,d,fd(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(x(b.children))))}}
118
118
  function yd(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function zd(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
119
119
  function Ad(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=Zc.has(b)?Zc.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Ad(d),b.appendChild(c);return b}
120
- function Bd(a){if(!a)return null;var b={tagName:a.tagName,attributes:Sc(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Bd(c),c.parent=b,b.children.push(c));return b}var Yc=new Map,Zc=new Map;function Dd(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Mb;this.position=null;this.positionAlign=Ed;this.size=0;this.textAlign=Fd;this.direction=Gd;this.writingMode=Hd;this.lineInterpretation=Id;this.line=null;this.lineHeight="";this.lineAlign=Jd;this.displayAlign=Kd;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ld;this.fontStyle=Md;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
121
- "";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={mc:32,rows:15}}function Nd(a,b){a=new Dd(a,b,"");a.lineBreak=!0;return a}Dd.prototype.clone=function(){var a=new Dd(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
122
- function Od(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Sb(a.nestedCues,b.nestedCues,Od))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Sb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
123
- function Pd(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&Qd(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(Sd)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&
120
+ function Cd(a){if(!a)return null;var b={tagName:a.tagName,attributes:Sc(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=Cd(c),c.parent=b,b.children.push(c));return b}var Yc=new Map,Zc=new Map;function Ed(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Mb;this.position=null;this.positionAlign=Fd;this.size=0;this.textAlign=Gd;this.direction=Hd;this.writingMode=Id;this.lineInterpretation=Jd;this.line=null;this.lineHeight="";this.lineAlign=Kd;this.displayAlign=Ld;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Md;this.fontStyle=Nd;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
121
+ "";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={mc:32,rows:15}}function Od(a,b){a=new Ed(a,b,"");a.lineBreak=!0;return a}Ed.prototype.clone=function(){var a=new Ed(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
122
+ function Pd(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Sb(a.nestedCues,b.nestedCues,Pd))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Sb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
123
+ function Qd(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&Rd(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(Sd)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&
124
124
  (l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=Td(c);a.payload="";try{var m=Vc("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=
125
- m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())Wd(c.value,a,b);else a.payload=Hc(c);else a.payload=Hc(c)}else a.payload=Hc(c)}function Qd(a){for(var b=t(Object.entries(Xd)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Dd(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Yd));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Dd(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
125
+ m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())Ud(c.value,a,b);else a.payload=Hc(c);else a.payload=Hc(c)}else a.payload=Hc(c)}function Rd(a){for(var b=t(Object.entries(Xd)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Ed(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(Yd));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Ed(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
126
126
  function Td(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
127
- function Wd(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Mb;d.position=null;d.size=0;d.textAlign=Fd;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=Zd(g.backgroundColor,h.backgroundColor),h.color=Zd(g.color,h.color),h.fontFamily=Zd(g.fontFamily,h.fontFamily),
128
- h.fontSize=Zd(g.fontSize,h.fontSize),h.textShadow=Zd(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Nd(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=$d;break;case "i":d.fontStyle=ae;break;case "u":d.textDecoration.push(be);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
129
- if(f=Qc(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if($c(a)||1==e.length&&$c(e[0]))for(c=ed(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Nd(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Hc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Wd(a.value,d,c)}function Zd(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",Dd);Dd.parseCuePayload=Pd;Dd.equal=Od;
130
- Dd.prototype.clone=Dd.prototype.clone;var Ed="auto";Dd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ed};var Fd="center",ce={LEFT:"left",RIGHT:"right",CENTER:Fd,START:"start",END:"end"};Dd.textAlign=ce;var Kd="after",de={BEFORE:"before",CENTER:"center",AFTER:Kd};Dd.displayAlign=de;var Gd="ltr";Dd.direction={HORIZONTAL_LEFT_TO_RIGHT:Gd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Hd="horizontal-tb";Dd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Hd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
131
- var Id=0;Dd.lineInterpretation={LINE_NUMBER:Id,PERCENTAGE:1};var Jd="start",ee={CENTER:"center",START:Jd,END:"end"};Dd.lineAlign=ee;var Xd={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Dd.defaultTextColor=Xd;var Yd={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Dd.defaultTextBackgroundColor=Yd;var Ld=400,$d=700;Dd.fontWeight={NORMAL:Ld,BOLD:$d};
132
- var Md="normal",ae="italic",fe={NORMAL:Md,ITALIC:ae,OBLIQUE:"oblique"};Dd.fontStyle=fe;var be="underline";Dd.textDecoration={UNDERLINE:be,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Sd=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function ge(){}ge.prototype.destroy=function(){};function he(a,b,c){ie[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,he:b}}function je(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([ke,le,me,ne]),e=d.next();!e.done;e=d.next())if(e=ie[c+"-"+e.value]){var f=e.he(),g=f.isSupported(a,b);f.destroy();if(g)return e.he}return null}S("shaka.transmuxer.TransmuxerEngine",ge);ge.findTransmuxer=je;ge.unregisterTransmuxer=function(a,b){delete ie[a.toLowerCase().split(";")[0]+"-"+b]};
127
+ function Ud(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Mb;d.position=null;d.size=0;d.textAlign=Gd;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=Zd(g.backgroundColor,h.backgroundColor),h.color=Zd(g.color,h.color),h.fontFamily=Zd(g.fontFamily,h.fontFamily),
128
+ h.fontSize=Zd(g.fontSize,h.fontSize),h.textShadow=Zd(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=Od(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=$d;break;case "i":d.fontStyle=ae;break;case "u":d.textDecoration.push(be);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
129
+ if(f=Qc(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if($c(a)||1==e.length&&$c(e[0]))for(c=ed(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=Od(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Hc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())Ud(a.value,d,c)}function Zd(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",Ed);Ed.parseCuePayload=Qd;Ed.equal=Pd;
130
+ Ed.prototype.clone=Ed.prototype.clone;var Fd="auto";Ed.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Fd};var Gd="center",ce={LEFT:"left",RIGHT:"right",CENTER:Gd,START:"start",END:"end"};Ed.textAlign=ce;var Ld="after",de={BEFORE:"before",CENTER:"center",AFTER:Ld};Ed.displayAlign=de;var Hd="ltr";Ed.direction={HORIZONTAL_LEFT_TO_RIGHT:Hd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Id="horizontal-tb";Ed.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Id,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
131
+ var Jd=0;Ed.lineInterpretation={LINE_NUMBER:Jd,PERCENTAGE:1};var Kd="start",ee={CENTER:"center",START:Kd,END:"end"};Ed.lineAlign=ee;var Xd={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ed.defaultTextColor=Xd;var Yd={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ed.defaultTextBackgroundColor=Yd;var Md=400,$d=700;Ed.fontWeight={NORMAL:Md,BOLD:$d};
132
+ var Nd="normal",ae="italic",fe={NORMAL:Nd,ITALIC:ae,OBLIQUE:"oblique"};Ed.fontStyle=fe;var be="underline";Ed.textDecoration={UNDERLINE:be,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var Sd=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function ge(){}ge.prototype.destroy=function(){};function he(a,b,c){ie[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,he:b}}function je(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([ke,le,me,ne]),e=d.next();!e.done;e=d.next())if(e=ie[c+"-"+e.value]){var f=e.he(),g=f.isSupported(a,b);f.destroy();if(g)return e.he}return null}S("shaka.transmuxer.TransmuxerEngine",ge);ge.findTransmuxer=je;ge.unregisterTransmuxer=function(a,b){delete ie[a.toLowerCase().split(";")[0]+"-"+b]};
133
133
  ge.registerTransmuxer=he;ge.prototype.destroy=ge.prototype.destroy;var ie={},ne=1,me=2,le=3,ke=4;ge.PluginPriority={FALLBACK:ne,PREFERRED_SECONDARY:me,PREFERRED:le,APPLICATION:ke};/*
134
134
  @license
135
135
  Copyright 2008 The Closure Library Authors
@@ -140,26 +140,26 @@ var oe=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
140
140
  Copyright 2006 The Closure Library Authors
141
141
  SPDX-License-Identifier: Apache-2.0
142
142
  */
143
- function pe(a){var b;a instanceof pe?(qe(this,a.Gb),this.Ac=a.Ac,se(this,a.Ib),te(this,a.Sc),this.Va=a.Va,ve(this,a.g.clone()),this.nc=a.nc):a&&(b=String(a).match(oe))?(qe(this,b[1]||"",!0),this.Ac=we(b[2]||""),se(this,b[3]||"",!0),te(this,b[4]),this.Va=we(b[5]||"",!0),ve(this,b[6]||"",!0),this.nc=we(b[7]||"")):this.g=new xe(null)}q=pe.prototype;q.Gb="";q.Ac="";q.Ib="";q.Sc=null;q.Va="";q.nc="";
144
- q.toString=function(){var a=[],b=this.Gb;b&&a.push(ye(b,ze,!0),":");if(b=this.Ib){a.push("//");var c=this.Ac;c&&a.push(ye(c,ze,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Sc;null!=b&&a.push(":",String(b))}if(b=this.Va)this.Ib&&"/"!=b.charAt(0)&&a.push("/"),a.push(ye(b,"/"==b.charAt(0)?Ae:Be,!0));(b=this.g.toString())&&a.push("?",b);(b=this.nc)&&a.push("#",ye(b,Ce));return a.join("")};
145
- q.resolve=function(a){var b=this.clone();"data"===b.Gb&&(b=new pe);var c=!!a.Gb;c?qe(b,a.Gb):c=!!a.Ac;c?b.Ac=a.Ac:c=!!a.Ib;c?se(b,a.Ib):c=null!=a.Sc;var d=a.Va;if(c)te(b,a.Sc);else if(c=!!a.Va){if("/"!=d.charAt(0))if(this.Ib&&!this.Va)d="/"+d;else{var e=b.Va.lastIndexOf("/");-1!=e&&(d=b.Va.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
146
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Va=d:c=""!==a.g.toString();c?ve(b,a.g.clone()):c=!!a.nc;c&&(b.nc=a.nc);return b};q.clone=function(){return new pe(this)};function qe(a,b,c){a.Gb=c?we(b,!0):b;a.Gb&&(a.Gb=a.Gb.replace(/:$/,""))}function se(a,b,c){a.Ib=c?we(b,!0):b}function te(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Sc=b}else a.Sc=null}
143
+ function pe(a){var b;a instanceof pe?(qe(this,a.Fb),this.Ac=a.Ac,se(this,a.Hb),te(this,a.Sc),this.Va=a.Va,ve(this,a.g.clone()),this.nc=a.nc):a&&(b=String(a).match(oe))?(qe(this,b[1]||"",!0),this.Ac=we(b[2]||""),se(this,b[3]||"",!0),te(this,b[4]),this.Va=we(b[5]||"",!0),ve(this,b[6]||"",!0),this.nc=we(b[7]||"")):this.g=new xe(null)}q=pe.prototype;q.Fb="";q.Ac="";q.Hb="";q.Sc=null;q.Va="";q.nc="";
144
+ q.toString=function(){var a=[],b=this.Fb;b&&a.push(ye(b,ze,!0),":");if(b=this.Hb){a.push("//");var c=this.Ac;c&&a.push(ye(c,ze,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Sc;null!=b&&a.push(":",String(b))}if(b=this.Va)this.Hb&&"/"!=b.charAt(0)&&a.push("/"),a.push(ye(b,"/"==b.charAt(0)?Ae:Be,!0));(b=this.g.toString())&&a.push("?",b);(b=this.nc)&&a.push("#",ye(b,Ce));return a.join("")};
145
+ q.resolve=function(a){var b=this.clone();"data"===b.Fb&&(b=new pe);var c=!!a.Fb;c?qe(b,a.Fb):c=!!a.Ac;c?b.Ac=a.Ac:c=!!a.Hb;c?se(b,a.Hb):c=null!=a.Sc;var d=a.Va;if(c)te(b,a.Sc);else if(c=!!a.Va){if("/"!=d.charAt(0))if(this.Hb&&!this.Va)d="/"+d;else{var e=b.Va.lastIndexOf("/");-1!=e&&(d=b.Va.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
146
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.Va=d:c=""!==a.g.toString();c?ve(b,a.g.clone()):c=!!a.nc;c&&(b.nc=a.nc);return b};q.clone=function(){return new pe(this)};function qe(a,b,c){a.Fb=c?we(b,!0):b;a.Fb&&(a.Fb=a.Fb.replace(/:$/,""))}function se(a,b,c){a.Hb=c?we(b,!0):b}function te(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Sc=b}else a.Sc=null}
147
147
  function ve(a,b,c){b instanceof xe?a.g=b:(c||(b=ye(b,De)),a.g=new xe(b))}function we(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function ye(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Ee),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ee(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ze=/[#\/\?@]/g,Be=/[#\?:]/g,Ae=/[#\?]/g,De=/[#\?@]/g,Ce=/#/g;function xe(a){this.g=a||null}
148
148
  function Fe(a){if(!a.La&&(a.La={},a.bd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=xe.prototype;q.La=null;q.bd=null;function Ge(a){Fe(a);return a.bd}q.add=function(a,b){Fe(this);this.g=null;var c=this.La.hasOwnProperty(a)?this.La[a]:null;c||(this.La[a]=c=[]);c.push(b);this.bd++;return this};
149
149
  q.set=function(a,b){Fe(this);this.g=null;this.La.hasOwnProperty(a)?this.La[a]=[b]:this.add(a,b);return this};q.get=function(a){Fe(this);return this.La[a]||[]};q.toString=function(){if(this.g)return this.g;if(!this.La)return"";var a=[],b;for(b in this.La)for(var c=encodeURIComponent(b),d=this.La[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};
150
- q.clone=function(){var a=new xe;a.g=this.g;if(this.La){var b={},c;for(c in this.La)b[c]=this.La[c].concat();a.La=b;a.bd=this.bd}return a};function He(){}function Ie(a){a=Cc(xb(a));return btoa(a)}function Je(a,b){b=void 0==b?!0:b;a=Ie(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Ke(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Le(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
151
- function Me(a){var b=xb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Ne(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&1===e.BYTES_PER_ELEMENT?b.set(e,c):b.set(xb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",He);He.concat=Ne;He.toHex=Me;He.fromHex=Le;He.fromBase64=Ke;He.toBase64=Je;
150
+ q.clone=function(){var a=new xe;a.g=this.g;if(this.La){var b={},c;for(c in this.La)b[c]=this.La[c].concat();a.La=b;a.bd=this.bd}return a};function He(){}function Ie(a){a=Cc(yb(a));return btoa(a)}function Je(a,b){b=void 0==b?!0:b;a=Ie(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Ke(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Le(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
151
+ function Me(a){var b=yb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Ne(){for(var a=Ha.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&1===e.BYTES_PER_ELEMENT?b.set(e,c):b.set(yb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",He);He.concat=Ne;He.toHex=Me;He.fromHex=Le;He.fromBase64=Ke;He.toBase64=Je;
152
152
  He.toStandardBase64=Ie;function Oe(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new pe(a[0]);b=new pe(b[0]);b=d.resolve(b);c&&ve(b,c);return[b.toString()]}b=b.map(function(h){return new pe(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new pe(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&ve(g,c),d.push(g.toString())}return d}
153
153
  function Pe(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
154
- function Qe(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Je(Le(h),!1));var l=g;22!=l.length&&(l=Je(Le(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:xb(Ec(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
154
+ function Qe(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Je(Le(h),!1));var l=g;22!=l.length&&(l=Je(Le(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:yb(Ec(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
155
155
  audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Re(a,b){if(1==b.length)return b[0];a=Se(a,b);if(null!=a)return a;throw new T(2,4,4025,b);}function Se(a,b){for(var c=t(Te[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ue?"":null}
156
- function Ve(a,b){var c=[];a=t(Te[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Ue="text",We={ka:"video",X:"audio",va:Ue,Fe:"image",mj:"application"},Xe=1/15,Te={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ye(){}function Ze(a,b){var c=a;b&&!$e.includes(a)&&(c+='; codecs="'+b+'"');return c}function af(a,b){b&&(a+='; codecs="'+b+'"');return a}function bf(a,b,c){var d=Ze(a,b);b=af(a,b);je(b)?(a=je(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
156
+ function Ve(a,b){var c=[];a=t(Te[a]);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}var Ue="text",We={ka:"video",X:"audio",wa:Ue,Fe:"image",mj:"application"},Xe=1/15,Te={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ye(){}function Ze(a,b){var c=a;b&&!$e.includes(a)&&(c+='; codecs="'+b+'"');return c}function af(a,b){b&&(a+='; codecs="'+b+'"');return a}function bf(a,b,c){var d=Ze(a,b);b=af(a,b);je(b)?(a=je(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
157
157
  function cf(a,b,c){var d=[b];df.forEach(function(e,f){var g=a[f];"codecs"==f?$e.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function ef(a){return a.split(";")[0].split("/")[1]}
158
158
  function ff(a){var b=gf(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
159
159
  a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "vp09"===a:return"vp9";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}
160
160
  function hf(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=gf(c.value),b.push(c[0]);return b.sort().join(",")}function jf(a){return a.split(";")[0]}function kf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function lf(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}function gf(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}
161
161
  S("shaka.util.MimeUtils",Ye);Ye.getFullTypeWithAllCodecs=af;Ye.getFullType=Ze;var df=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),$e=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function mf(a){this.i=null;this.j=a;this.B=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.A=function(){};this.o=new Map}function nf(a){return of[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!Jb:!1}mf.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
162
- function pf(a,b,c,d,e){var f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return G(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(xb(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(xb(b),g,e,[]);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);I(p)})}
162
+ function pf(a,b,c,d,e){var f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return G(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(yb(b)),p.return();f=a.B?c:a.s;g={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(yb(b),g,e,[]);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.A(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);I(p)})}
163
163
  mf.prototype.remove=function(a,b){var c=this;return P(function(d){if(1==d.g)return G(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));I(d)})};function qf(a,b,c){a.l=b;a.m=c}function rf(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
164
164
  function sf(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())sf(a,d.value,c)}
165
165
  function vf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);sf(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
@@ -178,7 +178,7 @@ function Pf(a,b,c,d){var e=a.variants;if(b.length||c.length)e=Qf(e,b,c);if(d.len
178
178
  e.next())g=g.value,g.audio&&c.add(g.audio),g.video&&b.add(g.video);c=Array.from(c).sort(function(v,w){return v.bandwidth-w.bandwidth});var h=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;var k=g.language+(g.channelsCount||0)+(g.audioSamplingRate||0)+g.roles.join(",")+g.label+g.groupId+g.fastSwitching,l=e.get(k)||[];if(l.length){var m=l[l.length-1],n=ff(m.codecs),p=ff(g.codecs);n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),h.push(g.id))}else l.push(g),h.push(g.id);
179
179
  e.set(k,l)}var r={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};c=Array.from(b).sort(function(v,w){if(!v.bandwidth||!w.bandwidth||v.bandwidth==w.bandwidth){if(v.codecs&&w.codecs&&v.codecs!=w.codecs&&v.width==w.width){var z=ff(v.codecs),y=ff(w.codecs);if(z!=y)return(r[z]||1)-(r[y]||1)}return v.width-w.width}return v.bandwidth-w.bandwidth});b=nb();var u=[];e=new Map;c=t(c);for(g=c.next();!g.done;g=c.next()){g=g.value;k=Math.round(g.frameRate||
180
180
  0)+(g.hdr||"")+g.fastSwitching;l=e.get(k)||[];if(l.length){m=l[l.length-1];if(!b&&(n=ff(m.codecs),p=ff(g.codecs),n!==p))continue;g.width>m.width||g.height>m.height?(l.push(g),u.push(g.id)):g.width==m.width&&g.height==m.height&&(n=ff(m.codecs),p=ff(g.codecs),n!=p||g.bandwidth&&m.bandwidth&&!(g.bandwidth>m.bandwidth)||(l.push(g),u.push(g.id)))}else l.push(g),u.push(g.id);e.set(k,l)}a.variants=a.variants.filter(function(v){var w=v.audio;v=v.video;return w&&!h.includes(w.id)||v&&!u.includes(v.id)?!1:
181
- !0})}function Qf(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={th:void 0},d=b.next())if(e.th=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.th)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={kg:void 0},b=c.next())if(d.kg=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.kg)}}(d)),b.length){a=b;break}return a}function Rf(a,b,c){a.variants=a.variants.filter(function(d){return Sf(d,b,c)})}
181
+ !0})}function Qf(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={th:void 0},d=b.next())if(e.th=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.th)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={ig:void 0},b=c.next())if(d.ig=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.ig)}}(d)),b.length){a=b;break}return a}function Rf(a,b,c){a.variants=a.variants.filter(function(d){return Sf(d,b,c)})}
182
182
  function Sf(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
183
183
  !d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function Tf(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return P(function(e){if(1==e.g)return G(e,Uf(a,b,0<b.offlineSessionIds.length,c,d),2);Vf(b);return G(e,Wf(b),0)})}
184
184
  function Uf(a,b,c,d,e){var f,g;return P(function(h){if(1==h.g)return fc()&&Xf(b.variants),G(h,Yf(b.variants,c,!1,d),2);f=null;a&&(g=a.g)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=Zf(k,f,e);if(!l){var m=[];k.audio&&m.push($f(k.audio));k.video&&m.push($f(k.video))}return l});I(h)})}
@@ -188,8 +188,8 @@ function ag(a,b){var c,d,e,f,g,h,k;return P(function(l){if(1==l.g){c=function(m,
188
188
  null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.cache[m.Dd]=p,d=c(d,p))}}(h)));return G(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);I(l)})}
189
189
  function cg(a){var b=[""];a.video&&(b=kf(a.video.contentType).split(","));var c=[""];a.audio&&(c=kf(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={Dc:void 0},g=f.next())g=g.value,h.Dc=Rc(a),a.video&&(h.Dc.video.contentType=Ze(jf(h.Dc.video.contentType),e)),a.audio&&(h.Dc.audio.contentType=Ze(jf(h.Dc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){zf(1,navigator.mediaCapabilities.decodingInfo(k.Dc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);
190
190
  return null})}
191
- function Yf(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H;return P(function(A){switch(A.g){case 1:if(e=a.some(function(D){return D.decodingInfos.length}))return A.return();f=t(d);g=f.next();h={};case 2:if(g.done){A.u(4);break}h.Ug=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){A.u(7);break}n=m.value;p=dg(n,b,c).filter(function(D){return function(F){F=F[0];return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===D.Ug}}(h));r=t(p);u=r.next();case 8:if(u.done){A.u(10);break}v=u.value;
192
- return G(A,ag(n,v),9);case 9:u=r.next();A.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();A.u(5);break;case 7:if(k)return A.return();h={Ug:void 0};g=f.next();A.u(2);break;case 4:w=t(a),z=w.next();case 12:if(z.done){A.u(0);break}y=z.value;B=dg(y,b,c).filter(function(D){D=D[0];D=D.keySystemConfiguration&&D.keySystemConfiguration.keySystem;return!D||!d.includes(D)});C=t(B);E=C.next();case 15:if(E.done){z=w.next();A.u(12);break}H=E.value;return G(A,ag(y,H),16);case 16:E=C.next(),A.u(15)}})}
191
+ function Yf(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H;return P(function(A){switch(A.g){case 1:if(e=a.some(function(D){return D.decodingInfos.length}))return A.return();f=t(d);g=f.next();h={};case 2:if(g.done){A.u(4);break}h.Tg=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){A.u(7);break}n=m.value;p=dg(n,b,c).filter(function(D){return function(F){F=F[0];return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===D.Tg}}(h));r=t(p);u=r.next();case 8:if(u.done){A.u(10);break}v=u.value;
192
+ return G(A,ag(n,v),9);case 9:u=r.next();A.u(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();A.u(5);break;case 7:if(k)return A.return();h={Tg:void 0};g=f.next();A.u(2);break;case 4:w=t(a),z=w.next();case 12:if(z.done){A.u(0);break}y=z.value;B=dg(y,b,c).filter(function(D){D=D[0];D=D.keySystemConfiguration&&D.keySystemConfiguration.keySystem;return!D||!d.includes(D)});C=t(B);E=C.next();case 15:if(E.done){z=w.next();A.u(12);break}H=E.value;return G(A,ag(y,H),16);case 16:E=C.next(),A.u(15)}})}
193
193
  function dg(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=kf(k);if(l.includes(",")&&!d){var m=l.split(","),n=jf(k);l=Re("video",m);m=Re("audio",m);m=eg(m,n);n=bf(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=fg(l);k={contentType:bf(jf(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
194
194
  "srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=jf(l),l=eg(kf(l),k),k=bf(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
195
195
  k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;l=[];n=t(h);for(m=n.next();!m.done;m=
@@ -221,7 +221,7 @@ for(var f=isNaN(this.B)?1:Math.abs(this.B),g=f*e.bandwidth/this.g.bandwidthDowng
221
221
  q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.i.sample(a,b),c&&null!=this.l&&this.j&&Ag(this))};q.trySuggestStreams=function(){null!=this.l&&this.j&&Ag(this)};
222
222
  q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.i.getBandwidthEstimate(a);return this.m?this.m.getBandwidthEstimate(a):a};q.setVariants=function(a){this.s=a};q.playbackRateChanged=function(a){this.B=a};
223
223
  q.setMediaElement=function(a){var b=this;this.o=a;this.h&&(this.h.disconnect(),this.h=null);this.o&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.C.$(Bg)}),this.h.observe(this.o))};q.setCmsdManager=function(a){this.m=a};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};
224
- function Ag(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function yg(a,b,c,d,e){if(a.m){var f=a.m.Dg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Sf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
224
+ function Ag(a){if(!a.G){var b=a.i;if(!(b.g>=b.i))return;a.G=!0;a.l-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.l<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.A(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}function yg(a,b,c,d,e){if(a.m){var f=a.m.Bg();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return Sf(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}
225
225
  function zg(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",xg);xg.prototype.configure=xg.prototype.configure;xg.prototype.setCmsdManager=xg.prototype.setCmsdManager;xg.prototype.setMediaElement=xg.prototype.setMediaElement;xg.prototype.playbackRateChanged=xg.prototype.playbackRateChanged;xg.prototype.setVariants=xg.prototype.setVariants;
226
226
  xg.prototype.getBandwidthEstimate=xg.prototype.getBandwidthEstimate;xg.prototype.trySuggestStreams=xg.prototype.trySuggestStreams;xg.prototype.segmentDownloaded=xg.prototype.segmentDownloaded;xg.prototype.disable=xg.prototype.disable;xg.prototype.enable=xg.prototype.enable;xg.prototype.chooseVariant=xg.prototype.chooseVariant;xg.prototype.init=xg.prototype.init;xg.prototype.release=xg.prototype.release;xg.prototype.stop=xg.prototype.stop;var Bg=1;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Cg(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c,d)}
227
227
  Cg.prototype.add=function(a,b,c){var d=this.h;b=void 0===b?!0:b;c=void 0===c?!1:c;var e;if(!(e=!!d.audio!=!!a.audio||!!d.video!=!!a.video||d.language!=a.language)&&(e=d.audio&&a.audio)){e=d.audio;var f=a.audio;e=!!((!e.channelsCount||!f.channelsCount||2<e.channelsCount||2<f.channelsCount)&&e.channelsCount!=f.channelsCount||e.spatialAudio!==f.spatialAudio||b&&!Dg(e,f)||!Eg(e.roles,f.roles)||c&&e.groupId!==f.groupId)}!(c=e)&&(c=d.video&&a.video)&&(d=d.video,c=a.video,c=!((!b||Dg(d,c))&&Eg(d.roles,c.roles)));
@@ -230,81 +230,81 @@ function Eg(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(
230
230
  Gg.prototype.create=function(a){var b=[];b=Hg(a,this.A);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ig(b,this.B);a.length&&(b=a);this.m&&(a=Jg(b,this.m),a.length&&(b=a));this.j&&(a=Kg(b,this.j),a.length&&(b=a));this.i&&(a=Lg(b,this.i),a.length&&(b=a));this.h&&(a=Mg(b,this.h),a.length&&(b=a));this.l&&(a=Ng(b,this.l),a.length&&(b=a));a=Og(b,this.C);a.length&&(b=a);this.g&&(a=Pg(b,this.g),a.length&&(b=a));return new Cg(b[0],b,!("smooth"==this.o&&nb()),this.s)};
231
231
  function Hg(a,b){b=Cf(b);var c=Nf(b,a.map(function(d){return Mf(d)}));return c?a.filter(function(d){return c==Mf(d)}):[]}function Ig(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Mg(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Ng(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}
232
232
  function Lg(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount!=b?!1:!0})}function Kg(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?a.some(function(c){return c.video&&c.video.hdr&&"HLG"==c.video.hdr?!0:!1})?"HLG":"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})}function Jg(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}
233
- function Og(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Pg(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Qg(){this.g=Sg;this.i=(new Map).set(Sg,2).set(Tg,1);this.h=0}function Ug(a,b,c){a.i.set(Sg,c).set(Tg,b)}var Tg=0,Sg=1;function Vg(a,b){var c=Wg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
234
- function Xg(a){var b,c;return P(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return G(d,new Promise(function(e){(new ac(e)).$(c/1E3)}),2)}a.h*=a.m;I(d)})}function Wg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Yg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Yg.prototype.resolve=function(){};Yg.prototype.reject=function(){};function Zg(a,b){this.promise=a;this.i=b;this.g=null}function $g(a){return new Zg(Promise.reject(a),function(){return Promise.resolve()})}function ah(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new Zg(a,function(){return Promise.resolve()})}function bh(a){return new Zg(Promise.resolve(a),function(){return Promise.resolve()})}function fh(a){return new Zg(a,function(){return a.catch(function(){})})}Zg.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
233
+ function Og(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Pg(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Qg(){this.g=Rg;this.i=(new Map).set(Rg,2).set(Tg,1);this.h=0}function Ug(a,b,c){a.i.set(Rg,c).set(Tg,b)}var Tg=0,Rg=1;function Vg(a,b){var c=Wg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
234
+ function Xg(a){var b,c;return P(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new T(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return G(d,new Promise(function(e){(new ac(e)).$(c/1E3)}),2)}a.h*=a.m;I(d)})}function Wg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Yg(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Yg.prototype.resolve=function(){};Yg.prototype.reject=function(){};function Zg(a,b){this.promise=a;this.i=b;this.g=null}function $g(a){return new Zg(Promise.reject(a),function(){return Promise.resolve()})}function ah(){var a=Promise.reject(new T(2,7,7001));a.catch(function(){});return new Zg(a,function(){return Promise.resolve()})}function bh(a){return new Zg(Promise.resolve(a),function(){return Promise.resolve()})}function ch(a){return new Zg(a,function(){return a.catch(function(){})})}Zg.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
235
235
  function gh(a){return new Zg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Zg.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
236
236
  Zg.prototype.Aa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=hh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Yg;f.catch(function(){});var g=new T(2,7,7001);this.promise.then(c(!0),c(!1));return new Zg(f,function(){return d()})};
237
237
  function hh(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}fa.Object.defineProperties(Zg.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});S("shaka.util.AbortableOperation",Zg);Zg.prototype.chain=Zg.prototype.Aa;Zg.prototype["finally"]=Zg.prototype.finally;
238
- Zg.all=gh;Zg.prototype.abort=Zg.prototype.abort;Zg.notAbortable=fh;Zg.completed=bh;Zg.aborted=ah;Zg.failed=$g;function W(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
238
+ Zg.all=gh;Zg.prototype.abort=Zg.prototype.abort;Zg.notAbortable=ch;Zg.completed=bh;Zg.aborted=ah;Zg.failed=$g;function W(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
239
239
  function ih(a){var b=new W(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}W.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};W.prototype.stopImmediatePropagation=function(){this.g=!0};W.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",W);
240
240
  var jh={oj:"abrstatuschanged",pj:"adaptation",qj:"audiotrackchanged",rj:"buffering",sj:"complete",tj:"downloadfailed",uj:"downloadheadersreceived",vj:"drmsessionupdate",xj:"emsg",Rj:"prft",Error:"error",yj:"expirationupdated",zj:"firstquartile",Aj:"gapjumped",Dj:"keystatuschanged",Hj:"loaded",Ij:"loading",Kj:"manifestparsed",Lj:"manifestupdated",Mj:"mediaqualitychanged",Nj:"mediasourcerecovered",Metadata:"metadata",Oj:"midpoint",Pj:"nospatialvideoinfo",Qj:"onstatechange",Sj:"ratechange",Uj:"segmentappended",
241
241
  Vj:"sessiondata",Wj:"spatialvideoinfo",Xj:"stalldetected",Yj:"started",Zj:"statechanged",$j:"streaming",ak:"textchanged",bk:"texttrackvisibility",ck:"thirdquartile",dk:"timelineregionadded",ek:"timelineregionenter",fk:"timelineregionexit",gk:"trackschanged",ik:"unloading",kk:"variantchanged"};function kh(){this.ra=new fb;this.le=this}kh.prototype.addEventListener=function(a,b){this.ra&&this.ra.push(a,b)};kh.prototype.removeEventListener=function(a,b){this.ra&&this.ra.remove(a,b)};kh.prototype.dispatchEvent=function(a){if(!this.ra)return!0;var b=this.ra.get(a.type)||[],c=this.ra.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.le;a.currentTarget=this.le;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
242
- kh.prototype.release=function(){this.ra=null};function lh(){this.g=[]}function mh(a,b){a.g.push(b.finally(function(){Qb(a.g,b)}))}lh.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function nh(a,b,c,d,e,f){kh.call(this);this.i=!1;this.o=new lh;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.C=d||null;this.G=e||null;this.F=f||null;this.s=this.A=!1;this.m=16E3}pa(nh,kh);q=nh.prototype;q.Sf=function(a){this.A=a};q.Tf=function(a){this.s=a};function oh(a,b,c,d){c=c||ph;var e=qh[a];if(!e||c>=e.priority)qh[a]={priority:c,he:b,Ji:void 0===d?!1:d}}
243
- function rh(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.Mi=function(a){this.g.add(a)};q.hj=function(a){this.g.delete(a)};q.pg=function(){this.g.clear()};q.Ni=function(a){this.h.add(a)};q.ij=function(a){this.h.delete(a)};q.qg=function(){this.h.clear()};
242
+ kh.prototype.release=function(){this.ra=null};function lh(){this.g=[]}function mh(a,b){a.g.push(b.finally(function(){Qb(a.g,b)}))}lh.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function nh(a,b,c,d,e,f){kh.call(this);this.i=!1;this.o=new lh;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.C=d||null;this.G=e||null;this.F=f||null;this.s=this.A=!1;this.m=16E3}pa(nh,kh);q=nh.prototype;q.Qf=function(a){this.A=a};q.Rf=function(a){this.s=a};function oh(a,b,c,d){c=c||ph;var e=qh[a];if(!e||c>=e.priority)qh[a]={priority:c,he:b,Ji:void 0===d?!1:d}}
243
+ function rh(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.Mi=function(a){this.g.add(a)};q.hj=function(a){this.g.delete(a)};q.ng=function(){this.g.clear()};q.Ni=function(a){this.h.add(a)};q.ij=function(a){this.h.delete(a)};q.og=function(){this.h.clear()};
244
244
  function sh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();kh.prototype.release.call(this);return this.o.destroy()};
245
245
  q.request=function(a,b,c){var d=this,e=new th;if(this.i){var f=Promise.reject(new T(2,7,7001));f.catch(function(){});return new uh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Rc(b.retryParameters):Wg();b.uris=Rc(b.uris);f=vh(this,a,b,c);var g=f.Aa(function(){return wh(d,a,b,c,new Vg(b.retryParameters,!1),0,null,e)}),h=g.Aa(function(p){return xh(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
246
246
  var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.Aa(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.oi||!d.l||u.fromCache||"HEAD"==b.method||a!=yh||d.l(u.timeMs,u.data.byteLength,zh(c));d.F&&d.F(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new uh(n.promise,function(){return n.abort()},e);mh(this.o,f);return f};
247
- function vh(a,b,c,d){function e(h){f=f.Aa(function(){c.body&&(c.body=Bb(c.body));return h(b,c,d)})}var f=bh(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Aa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
248
- function wh(a,b,c,d,e,f,g,h){a.A&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new pe(c.uris[f]),l=k.Gb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),qe(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=qh[l])?l.he:null;if(!n)return $g(new T(2,1,1E3,k));var p=l.Ji,r=null,u=null,v=!1,w=!1,z;return fh(Xg(e)).Aa(function(){if(a.i)return ah();z=Date.now();var y=0;c.requestStartTime=Date.now();
247
+ function vh(a,b,c,d){function e(h){f=f.Aa(function(){c.body&&(c.body=Ab(c.body));return h(b,c,d)})}var f=bh(void 0);a.C&&e(a.C);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.Aa(void 0,function(h){if(h instanceof T&&7001==h.code)throw h;throw new T(2,1,1006,h);})}
248
+ function wh(a,b,c,d,e,f,g,h){a.A&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.s&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.G&&a.G(b,d,c.uris[f],c.uris[f-1]);var k=new pe(c.uris[f]),l=k.Fb,m=!1;l||(l=location.protocol,l=l.slice(0,-1),qe(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=qh[l])?l.he:null;if(!n)return $g(new T(2,1,1E3,k));var p=l.Ji,r=null,u=null,v=!1,w=!1,z;return ch(Xg(e)).Aa(function(){if(a.i)return ah();z=Date.now();var y=0;c.requestStartTime=Date.now();
249
249
  var B=n(c.uris[f],c,b,function(H,A,D){r&&r.stop();u&&u.$(E/1E3);a.l&&b==yh&&(y++,c.packetNumber=y,a.l(H,A,zh(d),c),m=!0,h.g=D)},function(H){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.j&&a.j(H,c,b)},{minBytesForProgressEvents:a.m});if(!p)return B;var C=c.retryParameters.connectionTimeout;C&&(r=new ac(function(){v=!0;B.abort()}),r.$(C/1E3));var E=c.retryParameters.stallTimeout;E&&(u=new ac(function(){v=!0;B.abort()}));return B}).Aa(function(y){r&&r.stop();u&&u.stop();void 0==y.timeMs&&(y.timeMs=
250
250
  Date.now()-z);var B={response:y,oi:m};!w&&a.j&&a.j(y.headers,c,b);return B},function(y){r&&r.stop();u&&u.stop();if(a.B){var B=null,C=0;y instanceof T&&(B=y,1001==y.code&&(C=y.data[1]));a.B(c,B,C,v)}if(a.i)return ah();v&&(y=new T(1,1,1003,c.uris[f],b));if(y instanceof T){if(7001==y.code)throw y;if(1010==y.code)throw g;if(1==y.severity)return B=(new Map).set("error",y),B=new W("retry",B),a.dispatchEvent(B),f=(f+1)%c.uris.length,wh(a,b,c,d,e,f,y,h)}throw y;})}
251
- function xh(a,b,c,d){var e=bh(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Zg:void 0},f=a.next())g.Zg=f.value,e=e.Aa(function(h){return function(){var k=c.response;k.data&&(k.data=Bb(k.data));return(0,h.Zg)(b,k,d)}}(g));return e.Aa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function zh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.o)return!1}return!0}S("shaka.net.NetworkingEngine",nh);
252
- nh.prototype.request=nh.prototype.request;nh.prototype.destroy=nh.prototype.destroy;nh.makeRequest=sh;nh.defaultRetryParameters=function(){return Wg()};nh.prototype.clearAllResponseFilters=nh.prototype.qg;nh.prototype.unregisterResponseFilter=nh.prototype.ij;nh.prototype.registerResponseFilter=nh.prototype.Ni;nh.prototype.clearAllRequestFilters=nh.prototype.pg;nh.prototype.unregisterRequestFilter=nh.prototype.hj;nh.prototype.registerRequestFilter=nh.prototype.Mi;nh.unregisterScheme=function(a){delete qh[a]};
253
- nh.registerScheme=oh;nh.prototype.setForceHTTPS=nh.prototype.Tf;nh.prototype.setForceHTTP=nh.prototype.Sf;function th(){this.g=0}nh.NumBytesRemainingClass=th;function uh(a,b,c){Zg.call(this,a,b);this.h=c}pa(uh,Zg);nh.PendingRequest=uh;var yh=1;nh.RequestType={MANIFEST:0,SEGMENT:yh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
251
+ function xh(a,b,c,d){var e=bh(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Yg:void 0},f=a.next())g.Yg=f.value,e=e.Aa(function(h){return function(){var k=c.response;k.data&&(k.data=Ab(k.data));return(0,h.Yg)(b,k,d)}}(g));return e.Aa(function(){return c},function(h){var k=2;if(h instanceof T){if(7001==h.code)throw h;k=h.severity}throw new T(k,1,1007,h);})}function zh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.o)return!1}return!0}S("shaka.net.NetworkingEngine",nh);
252
+ nh.prototype.request=nh.prototype.request;nh.prototype.destroy=nh.prototype.destroy;nh.makeRequest=sh;nh.defaultRetryParameters=function(){return Wg()};nh.prototype.clearAllResponseFilters=nh.prototype.og;nh.prototype.unregisterResponseFilter=nh.prototype.ij;nh.prototype.registerResponseFilter=nh.prototype.Ni;nh.prototype.clearAllRequestFilters=nh.prototype.ng;nh.prototype.unregisterRequestFilter=nh.prototype.hj;nh.prototype.registerRequestFilter=nh.prototype.Mi;nh.unregisterScheme=function(a){delete qh[a]};
253
+ nh.registerScheme=oh;nh.prototype.setForceHTTPS=nh.prototype.Rf;nh.prototype.setForceHTTP=nh.prototype.Qf;function th(){this.g=0}nh.NumBytesRemainingClass=th;function uh(a,b,c){Zg.call(this,a,b);this.h=c}pa(uh,Zg);nh.PendingRequest=uh;var yh=1;nh.RequestType={MANIFEST:0,SEGMENT:yh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
254
254
  nh.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 ph=3;nh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:ph};var qh={};function Ah(a){this.g=!1;this.h=new Yg;this.i=a}Ah.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Bh(a,b){if(a.g){if(b instanceof T&&7003==b.code)throw b;throw new T(2,7,7003,b);}};function Ch(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function Dh(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function Eh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Fh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Gh(a,b){this.h=Eb(a);this.i=b==Hh;this.g=0}q=Gh.prototype;q.qa=function(){return this.g<this.h.byteLength};q.xa=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.T=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ih();}};q.la=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ih();}};q.P=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ih();}};
255
- q.Wg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ih();}};q.Tc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ih();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.wb=function(a){if(this.g+a>this.h.byteLength)throw Ih();var b=xb(this.h,this.g,a);this.g+=a;return b};
256
- q.skip=function(a){if(this.g+a>this.h.byteLength)throw Ih();this.g+=a};q.Mf=function(a){if(this.g<a)throw Ih();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Ih();this.g=a};q.vc=function(){for(var a=this.g;this.qa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=xb(this.h,a,this.g-a);this.g+=1;return Ac(a)};function Ih(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Gh);Gh.prototype.readTerminatedString=Gh.prototype.vc;Gh.prototype.seek=Gh.prototype.seek;Gh.prototype.rewind=Gh.prototype.Mf;
257
- Gh.prototype.skip=Gh.prototype.skip;Gh.prototype.readBytes=Gh.prototype.wb;Gh.prototype.readUint64=Gh.prototype.Tc;Gh.prototype.readInt32=Gh.prototype.Wg;Gh.prototype.readUint32=Gh.prototype.P;Gh.prototype.readUint16=Gh.prototype.la;Gh.prototype.readUint8=Gh.prototype.T;Gh.prototype.getLength=Gh.prototype.getLength;Gh.prototype.getPosition=Gh.prototype.xa;Gh.prototype.hasMoreData=Gh.prototype.qa;var Hh=1;Gh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hh};function Jh(){this.i=[];this.h=[];this.g=!1}q=Jh.prototype;q.box=function(a,b){a=Kh(a);this.i[a]=Lh;this.h[a]=b;return this};q.S=function(a,b){a=Kh(a);this.i[a]=Mh;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Gh(a,0);for(this.g=!1;a.qa()&&!this.g;)this.Qc(0,a,b,c)};
255
+ q.Vg=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ih();}};q.Tc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ih();}if(2097151<b)throw new T(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.wb=function(a){if(this.g+a>this.h.byteLength)throw Ih();var b=yb(this.h,this.g,a);this.g+=a;return b};
256
+ q.skip=function(a){if(this.g+a>this.h.byteLength)throw Ih();this.g+=a};q.Zg=function(a){if(this.g<a)throw Ih();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Ih();this.g=a};q.vc=function(){for(var a=this.g;this.qa()&&0!=this.h.getUint8(this.g);)this.g+=1;a=yb(this.h,a,this.g-a);this.g+=1;return Ac(a)};function Ih(){return new T(2,3,3E3)}S("shaka.util.DataViewReader",Gh);Gh.prototype.readTerminatedString=Gh.prototype.vc;Gh.prototype.seek=Gh.prototype.seek;Gh.prototype.rewind=Gh.prototype.Zg;
257
+ Gh.prototype.skip=Gh.prototype.skip;Gh.prototype.readBytes=Gh.prototype.wb;Gh.prototype.readUint64=Gh.prototype.Tc;Gh.prototype.readInt32=Gh.prototype.Vg;Gh.prototype.readUint32=Gh.prototype.P;Gh.prototype.readUint16=Gh.prototype.la;Gh.prototype.readUint8=Gh.prototype.T;Gh.prototype.getLength=Gh.prototype.getLength;Gh.prototype.getPosition=Gh.prototype.xa;Gh.prototype.hasMoreData=Gh.prototype.qa;var Hh=1;Gh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Hh};function Jh(){this.i=[];this.h=[];this.g=!1}q=Jh.prototype;q.box=function(a,b){a=Kh(a);this.i[a]=Lh;this.h[a]=b;return this};q.S=function(a,b){a=Kh(a);this.i[a]=Mh;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Gh(a,0);for(this.g=!1;a.qa()&&!this.g;)this.Qc(0,a,b,c)};
258
258
  q.Qc=function(a,b,c,d){var e=b.xa();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.P(),g=b.P(),h=Nh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.xa()+8>b.getLength()){this.g=!0;return}f=b.Tc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Mh){if(d&&b.xa()+4>b.getLength()){this.g=!0;return}n=b.P();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.xa(),b=0<d?b.wb(d):new Uint8Array(0),b=new Gh(b,0),l({name:h,parser:this,
259
259
  partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.xa(),b.getLength()-b.xa()))}};function Oh(a){for(var b=Ph(a);a.reader.qa()&&!a.parser.g;)a.parser.Qc(a.start+b,a.reader,a.partialOkay)}function Qh(a){for(var b=Ph(a),c=a.reader.P(),d=0;d<c&&(a.parser.Qc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Rh(a){var b=Ph(a);for(a.reader.skip(78);a.reader.qa()&&!a.parser.g;)a.parser.Qc(a.start+b,a.reader,a.partialOkay)}
260
260
  function Sh(a){var b=Ph(a);a.reader.skip(8);var c=a.reader.la();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.qa()&&!a.parser.g;)a.parser.Qc(a.start+b,a.reader,a.partialOkay)}function Th(a){return function(b){a(b.reader.wb(b.reader.getLength()-b.reader.xa()))}}function Kh(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Nh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
261
- function Ph(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Jh);Jh.headerSize=Ph;Jh.typeToString=Nh;Jh.allData=Th;Jh.audioSampleEntry=Sh;Jh.visualSampleEntry=Rh;Jh.sampleDescription=Qh;Jh.children=Oh;Jh.prototype.parseNext=Jh.prototype.Qc;Jh.prototype.parse=Jh.prototype.parse;Jh.prototype.stop=Jh.prototype.stop;Jh.prototype.fullBox=Jh.prototype.S;Jh.prototype.box=Jh.prototype.box;var Lh=0,Mh=1;function Uh(a){var b=this;this.g=[];this.h=[];this.data=[];(new Jh).box("moov",Oh).box("moof",Oh).S("pssh",function(c){if(!(1<c.version)){var d=xb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Me(c.reader.wb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=Me(c.reader.wb(16));b.h.push(f)}}}}).parse(a)}
261
+ function Ph(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Jh);Jh.headerSize=Ph;Jh.typeToString=Nh;Jh.allData=Th;Jh.audioSampleEntry=Sh;Jh.visualSampleEntry=Rh;Jh.sampleDescription=Qh;Jh.children=Oh;Jh.prototype.parseNext=Jh.prototype.Qc;Jh.prototype.parse=Jh.prototype.parse;Jh.prototype.stop=Jh.prototype.stop;Jh.prototype.fullBox=Jh.prototype.S;Jh.prototype.box=Jh.prototype.box;var Lh=0,Mh=1;function Uh(a){var b=this;this.g=[];this.h=[];this.data=[];(new Jh).box("moov",Oh).box("moof",Oh).S("pssh",function(c){if(!(1<c.version)){var d=yb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Me(c.reader.wb(16)));if(0<c.version){d=c.reader.P();for(var e=0;e<d;e++){var f=Me(c.reader.wb(16));b.h.push(f)}}}}).parse(a)}
262
262
  function Vh(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Eb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Le(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Wh(a){var b=this;this.C=a;this.l=this.A=null;this.fa=this.da=!1;this.H=0;this.g=null;this.o=new gb;this.i=new Map;this.B=new Map;this.m=new Yg;this.h=null;this.s=function(c){2==c.severity&&b.m.reject(c);a.onError(c)};this.Y=new Map;this.ea=new Map;this.K=new ac(function(){return Xh(b)});this.M=!1;this.L=[];this.R=!1;this.I=new ac(function(){Yh(b)});this.m.catch(function(){});this.j=new Ah(function(){return Zh(b)});this.aa=!1;this.F=this.G=null;this.O=function(){return!1}}q=Wh.prototype;
263
263
  q.destroy=function(){return this.j.destroy()};function Zh(a){return P(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.m.reject(),a.I.stop(),a.I=null,a.K.stop(),a.K=null,G(b,$h(a),2);case 2:if(!a.l){b.u(3);break}ta(b,4);return G(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.l=null;case 3:a.g=null,a.A=null,a.B=new Map,a.h=null,a.s=function(){},a.C=null,a.aa=!1,a.G=null,I(b)}})}q.configure=function(a,b){this.h=a;b&&(this.O=b);this.I&&this.I.Oa(this.h.updateExpirationTime)};
264
264
  function ai(a,b,c){a.fa=!0;a.B=new Map;a.M=c;return bi(a,b)}function ci(a,b,c){a.B=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.B.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.B.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.M=0<a.B.size;return bi(a,b)}
265
265
  function di(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return ei(a,g,[])}
266
266
  function bi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return P(function(E){if(1==E.g){if(c=fi(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(H){return H.video&&H.video.drmInfos.length||H.audio&&H.audio.drmInfos.length?!0:!1});g||(h=Eh(a.h.servers),gi(b,h));k=new Set;l=t(b);for(m=l.next();!m.done;m=l.next())for(n=m.value,p=hi(n),r=t(p),u=r.next();!u.done;u=r.next())v=u.value,k.add(v);w=t(k);for(z=w.next();!z.done;z=
267
267
  w.next())y=z.value,ii(y,Eh(a.h.servers),Eh(a.h.advanced||{}),a.h.keySystemsMapping);return G(E,Yf(b,a.M,a.aa,a.h.preferredKeySystems),2)}Bh(a.j);B=g||Object.keys(a.h.servers).length;if(!B)return a.da=!0,E.return(Promise.resolve());C=ei(a,void 0,b);return E.return(g?C:C.catch(function(){}))})}
268
- function ji(a){var b;return P(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.G){c.u(2);break}return G(c,a.G,3);case 3:return Bh(a.j),c.return();case 2:return ta(c,4),a.G=a.l.setMediaKeys(a.A),G(c,a.G,6);case 6:va(c,5);break;case 4:b=wa(c),a.s(new T(2,6,6003,b.message));case 5:Bh(a.j),I(c)}})}function ki(a,b){return P(function(c){if(1==c.g)return G(c,ji(a),2);li(a,b.initDataType,xb(b.initData));I(c)})}
269
- q.Tb=function(a){var b=this;return P(function(c){if(1==c.g){if(!b.A)return b.o.ua(a,"encrypted",function(){b.s(new T(2,6,6010))}),c.return();b.l=a;b.o.ua(b.l,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())mi(b,e.value);b.R=!0;b.L=[]});b.l.remote?(b.o.D(b.l.remote,"connect",function(){return $h(b)}),b.o.D(b.l.remote,"connecting",function(){return $h(b)}),b.o.D(b.l.remote,"disconnect",function(){return $h(b)})):"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.D(b.l,"webkitcurrentplaybacktargetiswirelesschanged",
268
+ function ji(a){var b;return P(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.G){c.u(2);break}return G(c,a.G,3);case 3:return Bh(a.j),c.return();case 2:return ta(c,4),a.G=a.l.setMediaKeys(a.A),G(c,a.G,6);case 6:va(c,5);break;case 4:b=wa(c),a.s(new T(2,6,6003,b.message));case 5:Bh(a.j),I(c)}})}function ki(a,b){return P(function(c){if(1==c.g)return G(c,ji(a),2);li(a,b.initDataType,yb(b.initData));I(c)})}
269
+ q.Sb=function(a){var b=this;return P(function(c){if(1==c.g){if(!b.A)return b.o.va(a,"encrypted",function(){b.s(new T(2,6,6010))}),c.return();b.l=a;b.o.va(b.l,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())mi(b,e.value);b.R=!0;b.L=[]});b.l.remote?(b.o.D(b.l.remote,"connect",function(){return $h(b)}),b.o.D(b.l.remote,"connecting",function(){return $h(b)}),b.o.D(b.l.remote,"disconnect",function(){return $h(b)})):"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.D(b.l,"webkitcurrentplaybacktargetiswirelesschanged",
270
270
  function(){return $h(b)});b.F=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.F||"com.apple.fps"!==b.g.keySystem||b.B.size?G(c,ji(b),2):c.u(2)}ni(b).catch(function(){});b.F||b.B.size||b.h.parseInbandPsshEnabled||b.o.D(b.l,"encrypted",function(d){return ki(b,d)});I(c)})};
271
- function oi(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=sh([a.g.serverCertificateUri],a.h.retryParameters);ta(g,3);c=a.C.Pb.request(5,b,{isPreload:a.O()});return G(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=xb(d.data);va(g,4);break;case 3:throw e=wa(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
272
- ta(g,6);return G(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new T(2,6,6004,f.message);}})}function pi(a,b){var c,d,e;return P(function(f){if(1==f.g)return G(f,qi(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.ob=new Yg,d.push(e.ob);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);I(f)})}
271
+ function oi(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:if(!a.A||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.u(2);break}b=sh([a.g.serverCertificateUri],a.h.retryParameters);ta(g,3);c=a.C.Ob.request(5,b,{isPreload:a.O()});return G(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=yb(d.data);va(g,4);break;case 3:throw e=wa(g),new T(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
272
+ ta(g,6);return G(g,a.A.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new T(2,6,6004,f.message);}})}function pi(a,b){var c,d,e;return P(function(f){if(1==f.g)return G(f,qi(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.pb=new Yg,d.push(e.pb);d.push(c.remove());return G(f,Promise.all(d),3)}a.i.delete(c);I(f)})}
273
273
  function ni(a){var b,c,d,e,f;return P(function(g){if(1==g.g){if(!a.B.size)return g.u(2);a.B.forEach(function(h,k){qi(a,k,h)});return G(g,a.m,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&ri(a))return g.return(a.m);a.m=new Yg;a.m.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,li(a,f.initDataType,f.initData);si(a)&&a.m.resolve();return g.return(a.m)})}
274
- function li(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(wb(c,e.value.initData))return;var f=!1;a.B.forEach(function(g){!f&&wb(c,g.initData)&&(f=!0)});if(f)return}0<a.i.size&&si(a)&&(a.m.resolve(),a.m=new Yg,a.m.catch(function(){}));ti(a,b,c,a.g.sessionType)}}function ui(a){a=a.i.keys();a=Ch(a,function(b){return b.sessionId});return Array.from(a)}
274
+ function li(a,b,c){if(c.length){if(a.h.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(xb(c,e.value.initData))return;var f=!1;a.B.forEach(function(g){!f&&xb(c,g.initData)&&(f=!0)});if(f)return}0<a.i.size&&si(a)&&(a.m.resolve(),a.m=new Yg,a.m.catch(function(){}));ti(a,b,c,a.g.sessionType)}}function ui(a){a=a.i.keys();a=Ch(a,function(b){return b.sessionId});return Array.from(a)}
275
275
  q.gf=function(){var a=this,b=this.i.keys();b=Ch(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.ed=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Ld=function(){return Fh(this.ea)};
276
276
  function ei(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=new Map;if(c.length){e=vi(a,c,d);n.u(2);break}return G(n,wi(a,b),3);case 3:e=n.h;case 2:f=e;if(!f)throw new T(2,6,6001);Bh(a.j);ta(n,4);f.getConfiguration();g=a.h.keySystemsMapping[f.keySystem]||f.keySystem;if(c.length){var p=g;var r=d.get(g);var u=[],v=[],w=[],z=[],y=[],B=new Set,C=new Set;xi(r,u,v,z,w,y,B,C);var E=a.M?"persistent-license":"temporary";p={keySystem:p,encryptionScheme:u[0],licenseServerUri:v[0],distinctiveIdentifierRequired:r[0].distinctiveIdentifierRequired,
277
277
  persistentStateRequired:r[0].persistentStateRequired,sessionType:r[0].sessionType||E,audioRobustness:r[0].audioRobustness||"",videoRobustness:r[0].videoRobustness||"",serverCertificate:z[0],serverCertificateUri:w[0],initData:y,keyIds:B};0<C.size&&(p.keySystemUris=C);r=t(r);for(C=r.next();!C.done;C=r.next())C=C.value,C.distinctiveIdentifierRequired&&(p.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(p.persistentStateRequired=C.persistentStateRequired);r=p}else r=
278
278
  g,C=b.get(g),p=[],u=[],v=[],w=[],z=[],y=new Set,xi(C.drmInfos,p,u,w,v,z,y),r={keySystem:r,encryptionScheme:p[0],licenseServerUri:u[0],distinctiveIdentifierRequired:"required"==C.distinctiveIdentifier,persistentStateRequired:"required"==C.persistentState,sessionType:C.sessionTypes[0]||"temporary",audioRobustness:(C.audioCapabilities?C.audioCapabilities[0].robustness:"")||"",videoRobustness:(C.videoCapabilities?C.videoCapabilities[0].robustness:"")||"",serverCertificate:w[0],serverCertificateUri:v[0],
279
279
  initData:z,keyIds:y};a.g=r;if(!a.g.licenseServerUri)throw new T(2,6,6012,a.g.keySystem);return G(n,f.createMediaKeys(),6);case 6:h=n.h;Bh(a.j);a.A=h;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.A)){n.u(7);break}ta(n,8);return G(n,a.A.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:k=n.h;if("usable"!=k)throw new T(2,6,6018);Bh(a.j);va(n,7,4);break;case 8:l=wa(n,4);if(l instanceof T)throw l;throw new T(2,6,6019,l.message);case 7:return a.da=!0,G(n,oi(a),11);case 11:Bh(a.j);
280
280
  va(n,0);break;case 4:m=wa(n);Bh(a.j,m);a.g=null;if(m instanceof T)throw m;throw new T(2,6,6002,m.message);}})}
281
- function vi(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(hi(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);d=t(a.h.preferredKeySystems);f=d.next();for(e={};!f.done;e={Vg:void 0},f=d.next()){e.Vg=f.value;f=t(b);for(var g=f.next();!g.done;g=f.next())if(g=g.value.decodingInfos.find(function(m){return function(n){return n.supported&&null!=n.keySystemAccess&&n.keySystemAccess.keySystem==
282
- m.Vg}}(e)))return g.keySystemAccess}d=t([!0,!1]);for(e=d.next();!e.done;e=d.next())for(e=e.value,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.decodingInfos);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.supported&&h.keySystemAccess){var k=h.keySystemAccess.keySystem,l=c.get(k);!l&&a.h.keySystemsMapping[k]&&(l=c.get(a.h.keySystemsMapping[k]));k=t(l);for(l=k.next();!l.done;l=k.next())if(!!l.value.licenseServerUri==e)return h.keySystemAccess}}return null}
281
+ function vi(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(hi(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new T(2,6,6E3);d=t(a.h.preferredKeySystems);f=d.next();for(e={};!f.done;e={Ug:void 0},f=d.next()){e.Ug=f.value;f=t(b);for(var g=f.next();!g.done;g=f.next())if(g=g.value.decodingInfos.find(function(m){return function(n){return n.supported&&null!=n.keySystemAccess&&n.keySystemAccess.keySystem==
282
+ m.Ug}}(e)))return g.keySystemAccess}d=t([!0,!1]);for(e=d.next();!e.done;e=d.next())for(e=e.value,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.decodingInfos);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.supported&&h.keySystemAccess){var k=h.keySystemAccess.keySystem,l=c.get(k);!l&&a.h.keySystemsMapping[k]&&(l=c.get(a.h.keySystemsMapping[k]));k=t(l);for(l=k.next();!l.done;l=k.next())if(!!l.value.licenseServerUri==e)return h.keySystemAccess}}return null}
283
283
  function wi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z;return P(function(y){switch(y.g){case 1:if(1==b.size&&b.has(""))throw new T(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){y.u(4);break}k=h.value;if(!b.has(k)){y.u(3);break}l=b.get(k);ta(y,6);return G(y,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
284
284
  y.h,y.return(c);case 6:wa(y);case 7:Bh(a.j);case 3:h=g.next();y.u(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){y.u(11);break}p=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();y.u(9);break}v=u.value;w=b.get(v);z=w.drmInfos.some(function(B){return!!B.licenseServerUri});if(z!=p){y.u(13);break}ta(y,15);return G(y,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=y.h,y.return(c);case 15:wa(y);case 16:Bh(a.j);case 13:u=r.next();y.u(12);break;case 11:return y.return(c)}})}
285
285
  function fi(a){a=Eh(a.h.clearKeys);return 0==a.size?null:Qe(a)}function yi(a){si(a)&&a.m.resolve()}function zi(a,b){(new ac(function(){b.loaded=!0;yi(a)})).$(Ai)}
286
- function qi(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:try{d=a.A.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.o.D(d,"message",function(n){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.R?a.L.push(n):mi(a,n)});a.o.D(d,"keystatuseschange",function(n){return Bi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Bf:Infinity,ob:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return G(m,
286
+ function qi(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:try{d=a.A.createSession("persistent-license")}catch(n){return e=new T(2,6,6005,n.message),a.s(e),m.return(Promise.reject(e))}a.o.D(d,"message",function(n){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.R?a.L.push(n):mi(a,n)});a.o.D(d,"keystatuseschange",function(n){return Bi(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Af:Infinity,pb:null,type:"persistent-license"};a.i.set(d,f);ta(m,2);return G(m,
287
287
  d.load(b),4);case 4:return g=m.h,Bh(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.s(new T(h,6,6013)),f.loaded=!0),zi(a,f),yi(a),m.return(d);case 2:k=wa(m),Bh(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.s(new T(l,6,6005,k.message)),f.loaded=!0,yi(a);case 3:return m.return(Promise.resolve())}})}
288
- function ti(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.s(new T(2,6,6005,f.message));return}a.o.D(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.R?a.L.push(f):mi(a,f)});a.o.D(e,"keystatuseschange",function(f){return Bi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Bf:Infinity,ob:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&Je(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
288
+ function ti(a,b,c,d){try{var e=a.A.createSession(d)}catch(f){a.s(new T(2,6,6005,f.message));return}a.o.D(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.R?a.L.push(f):mi(a,f)});a.o.D(e,"keystatuseschange",function(f){return Bi(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Af:Infinity,pb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof T||(b=new T(2,6,6016,f));a.s(b);return}a.h.logLicenseExchange&&Je(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
289
289
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.s(new T(2,6,6006,f.message,f,h))}})}
290
290
  function mi(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;P(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Je(b.message);d=a.i.get(c);e=a.g.licenseServerUri;f=a.h.advanced[a.g.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=sh([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
291
291
  f.headers[h];if("org.w3.clearkey"===a.g.keySystem){var z=g,y=a.g;try{var B=Dc(z.body);if(B){var C=JSON.parse(B);C.type||(C.type=y.sessionType,z.body=Ec(JSON.stringify(C)))}}catch(E){}}if(Xb(a.g.keySystem))if(z=Bc(g.body,!0,!0),z.includes("PlayReadyKeyMessage")){z=Vc(z,"PlayReadyKeyMessage");y=gd(z,"HttpHeader");y=t(y);for(B=y.next();!B.done;B=y.next())C=B.value,B=gd(C,"name")[0],C=gd(C,"value")[0],g.headers[ed(B)]=ed(C);z=gd(z,"Challenge")[0];g.body=Ke(ed(z))}else g.headers["Content-Type"]="text/xml; charset=utf-8";
292
- k=Date.now();ta(w,2);m=a.C.Pb.request(2,g,{isPreload:a.O()});return G(w,m.promise,4);case 4:l=w.h;va(w,3);break;case 2:n=wa(w);if(a.j.g)return w.return();p=new T(2,6,6007,n);1==a.i.size?(a.s(p),d&&d.ob&&d.ob.reject(p)):(d&&d.ob&&d.ob.reject(p),a.i.delete(c),si(a)&&(a.m.resolve(),a.K.$(.1)));return w.return();case 3:if(a.j.g)return w.return();a.H+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Je(l.data);ta(w,5);return G(w,c.update(l.data),7);case 7:va(w,6);break;case 5:return r=wa(w),u=new T(2,6,6008,
293
- r.message),a.s(u),d&&d.ob&&d.ob.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new W("drmsessionupdate");a.C.onEvent(v);d&&(d.ob&&d.ob.resolve(),zi(a,d));I(w)}})}
294
- function Bi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Xb(a.g.keySystem)&&16==g.byteLength&&(ec()||oc())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Me(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ob&&(a.i.delete(b),b.close().catch(function(){}));
292
+ k=Date.now();ta(w,2);m=a.C.Ob.request(2,g,{isPreload:a.O()});return G(w,m.promise,4);case 4:l=w.h;va(w,3);break;case 2:n=wa(w);if(a.j.g)return w.return();p=new T(2,6,6007,n);1==a.i.size?(a.s(p),d&&d.pb&&d.pb.reject(p)):(d&&d.pb&&d.pb.reject(p),a.i.delete(c),si(a)&&(a.m.resolve(),a.K.$(.1)));return w.return();case 3:if(a.j.g)return w.return();a.H+=(Date.now()-k)/1E3;a.h.logLicenseExchange&&Je(l.data);ta(w,5);return G(w,c.update(l.data),7);case 7:va(w,6);break;case 5:return r=wa(w),u=new T(2,6,6008,
293
+ r.message),a.s(u),d&&d.pb&&d.pb.reject(u),w.return();case 6:if(a.j.g)return w.return();v=new W("drmsessionupdate");a.C.onEvent(v);d&&(d.pb&&d.pb.resolve(),zi(a,d));I(w)}})}
294
+ function Bi(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Xb(a.g.keySystem)&&16==g.byteLength&&(ec()||oc())){h=Eb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Me(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.pb&&(a.i.delete(b),b.close().catch(function(){}));
295
295
  si(a)&&(a.m.resolve(),a.K.$(Ci))}function Xh(a){var b=a.Y,c=a.ea;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.s(new T(2,6,6014));a.C.de(Fh(c))}
296
296
  function Di(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L;return P(function(K){if(1==K.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.widevine.alpha.experiment":b,
297
- "com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(O,M){var N,R,Q,U,da,V,ea,Ia;return P(function(Ca){switch(Ca.g){case 1:return ta(Ca,2),G(Ca,M.createMediaKeys(),4);case 4:va(Ca,3);
298
- break;case 2:return wa(Ca),Ca.return();case 3:R=(N=M.getConfiguration().sessionTypes)?N.includes("persistent-license"):!1,ic()&&(R=!1),Q=M.getConfiguration().videoCapabilities,U=M.getConfiguration().audioCapabilities,da={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(O)&&k.get(O)?da=k.get(O):k.set(O,da),(V=Q[0].encryptionScheme)&&!da.encryptionSchemes.includes(V)&&da.encryptionSchemes.push(V),(ea=Q[0].robustness)&&!da.videoRobustnessLevels.includes(ea)&&
299
- da.videoRobustnessLevels.push(ea),(Ia=U[0].robustness)&&!da.audioRobustnessLevels.includes(Ia)&&da.audioRobustnessLevels.push(Ia),I(Ca)}})};m=function(O,M,N,R){var Q,U,da,V,ea,Ia,Ca,db,Wa,za;return P(function(Na){switch(Na.g){case 1:ta(Na,2);Q=Rc(g);U=t(Q.videoCapabilities);for(da=U.next();!da.done;da=U.next())V=da.value,V.encryptionScheme=M,V.robustness=N;ea=t(Q.audioCapabilities);for(Ia=ea.next();!Ia.done;Ia=ea.next())Ca=Ia.value,Ca.encryptionScheme=M,Ca.robustness=R;db=Rc(Q);db.persistentState=
300
- "required";db.sessionTypes=["persistent-license"];Wa=[db,Q];return G(Na,zf(1,navigator.requestMediaKeySystemAccess(O,Wa)),4);case 4:return za=Na.h,G(Na,l(O,za),5);case 5:va(Na,0);break;case 2:wa(Na),I(Na)}})};n=function(O,M,N,R){var Q,U,da;return P(function(V){switch(V.g){case 1:return ta(V,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:O,
301
- video:{encryptionScheme:M,robustness:N},audio:{encryptionScheme:M,robustness:R}}},G(V,zf(1,navigator.mediaCapabilities.decodingInfo(Q)),4);case 4:return U=V.h,da=U.keySystemAccess,G(V,l(O,da),5);case 5:va(V,0);break;case 2:wa(V),I(V)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(z=w.next();!z.done;z=w.next())for(y=z.value,B=t(a),C=B.next();!C.done;C=B.next())E=C.value,"org.w3.clearkey"===E&&rc()||(v.push(m(E,y,"","")),v.push(n(E,y,"","")));H=t(a);for(A=H.next();!A.done;A=
297
+ "com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(O,M){var N,R,Q,V,da,U,ea,Ia;return P(function(Ca){switch(Ca.g){case 1:return ta(Ca,2),G(Ca,M.createMediaKeys(),4);case 4:va(Ca,3);
298
+ break;case 2:return wa(Ca),Ca.return();case 3:R=(N=M.getConfiguration().sessionTypes)?N.includes("persistent-license"):!1,ic()&&(R=!1),Q=M.getConfiguration().videoCapabilities,V=M.getConfiguration().audioCapabilities,da={persistentState:R,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(O)&&k.get(O)?da=k.get(O):k.set(O,da),(U=Q[0].encryptionScheme)&&!da.encryptionSchemes.includes(U)&&da.encryptionSchemes.push(U),(ea=Q[0].robustness)&&!da.videoRobustnessLevels.includes(ea)&&
299
+ da.videoRobustnessLevels.push(ea),(Ia=V[0].robustness)&&!da.audioRobustnessLevels.includes(Ia)&&da.audioRobustnessLevels.push(Ia),I(Ca)}})};m=function(O,M,N,R){var Q,V,da,U,ea,Ia,Ca,db,Wa,za;return P(function(Pa){switch(Pa.g){case 1:ta(Pa,2);Q=Rc(g);V=t(Q.videoCapabilities);for(da=V.next();!da.done;da=V.next())U=da.value,U.encryptionScheme=M,U.robustness=N;ea=t(Q.audioCapabilities);for(Ia=ea.next();!Ia.done;Ia=ea.next())Ca=Ia.value,Ca.encryptionScheme=M,Ca.robustness=R;db=Rc(Q);db.persistentState=
300
+ "required";db.sessionTypes=["persistent-license"];Wa=[db,Q];return G(Pa,zf(1,navigator.requestMediaKeySystemAccess(O,Wa)),4);case 4:return za=Pa.h,G(Pa,l(O,za),5);case 5:va(Pa,0);break;case 2:wa(Pa),I(Pa)}})};n=function(O,M,N,R){var Q,V,da;return P(function(U){switch(U.g){case 1:return ta(U,2),Q={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:O,
301
+ video:{encryptionScheme:M,robustness:N},audio:{encryptionScheme:M,robustness:R}}},G(U,zf(1,navigator.mediaCapabilities.decodingInfo(Q)),4);case 4:return V=U.h,da=V.keySystemAccess,G(U,l(O,da),5);case 5:va(U,0);break;case 2:wa(U),I(U)}})};p=t(a);for(r=p.next();!r.done;r=p.next())u=r.value,k.set(u,null);v=[];w=t(h);for(z=w.next();!z.done;z=w.next())for(y=z.value,B=t(a),C=B.next();!C.done;C=B.next())E=C.value,"org.w3.clearkey"===E&&rc()||(v.push(m(E,y,"","")),v.push(n(E,y,"","")));H=t(a);for(A=H.next();!A.done;A=
302
302
  H.next())for(D=A.value,F=t(d[D]||[]),J=F.next();!J.done;J=F.next())L=J.value,v.push(m(D,null,L,"")),v.push(m(D,null,"",L)),v.push(n(D,null,L,"")),v.push(n(D,null,"",L));return G(K,Promise.all(v),2)}return K.return(Fh(k))})}function Ei(a){return P(function(b){if(1==b.g)return ta(b,2),G(b,zf(Fi,Promise.all([a.close(),a.closed])),4);if(2!=b.g)return va(b,0);wa(b);I(b)})}
303
303
  function $h(a){var b;return P(function(c){b=Array.from(a.i.entries());a.i.clear();return G(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return P(function(g){if(1==g.g)return ta(g,2),a.fa||a.B.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?G(g,Ei(e),5):G(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);I(g)})})),0)})}function hi(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
304
- function Yh(a){a.i.forEach(function(b,c){var d=b.Bf,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Bf=e)})}function si(a){a=a.i.values();return Dh(a,function(b){return b.loaded})}function ri(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Y.get(c.value))return!1;return!0}
304
+ function Yh(a){a.i.forEach(function(b,c){var d=b.Af,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.Af=e)})}function si(a){a=a.i.values();return Dh(a,function(b){return b.loaded})}function ri(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Y.get(c.value))return!1;return!0}
305
305
  function gi(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
306
- function xi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={sa:void 0},l=a.next()){m.sa=l.value;b.includes(m.sa.encryptionScheme)||b.push(m.sa.encryptionScheme);"org.w3.clearkey"==m.sa.keySystem&&m.sa.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.sa.licenseServerUri)||k.push(m.sa.licenseServerUri):c.includes(m.sa.licenseServerUri)||c.push(m.sa.licenseServerUri);e.includes(m.sa.serverCertificateUri)||e.push(m.sa.serverCertificateUri);m.sa.serverCertificate&&
307
- (d.some(function(r){return function(u){return wb(u,r.sa.serverCertificate)}}(m))||d.push(m.sa.serverCertificate));if(m.sa.initData){l=t(m.sa.initData);for(var n=l.next(),p={};!n.done;p={nf:void 0},n=l.next())p.nf=n.value,f.some(function(r){return function(u){var v=r.nf;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&wb(u.initData,v.initData)}}(p))||f.push(p.nf)}if(m.sa.keyIds)for(l=t(m.sa.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.sa.keySystemUris&&h)for(m=t(m.sa.keySystemUris),
306
+ function xi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={ta:void 0},l=a.next()){m.ta=l.value;b.includes(m.ta.encryptionScheme)||b.push(m.ta.encryptionScheme);"org.w3.clearkey"==m.ta.keySystem&&m.ta.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.ta.licenseServerUri)||k.push(m.ta.licenseServerUri):c.includes(m.ta.licenseServerUri)||c.push(m.ta.licenseServerUri);e.includes(m.ta.serverCertificateUri)||e.push(m.ta.serverCertificateUri);m.ta.serverCertificate&&
307
+ (d.some(function(r){return function(u){return xb(u,r.ta.serverCertificate)}}(m))||d.push(m.ta.serverCertificate));if(m.ta.initData){l=t(m.ta.initData);for(var n=l.next(),p={};!n.done;p={nf:void 0},n=l.next())p.nf=n.value,f.some(function(r){return function(u){var v=r.nf;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&xb(u.initData,v.initData)}}(p))||f.push(p.nf)}if(m.ta.keyIds)for(l=t(m.ta.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.ta.keySystemUris&&h)for(m=t(m.ta.keySystemUris),
308
308
  l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,x(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
309
309
  function ii(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
310
310
  c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Fi=1,Ai=5,Ci=.5;/*
@@ -317,18 +317,18 @@ function Gi(a,b,c){this.h=a;this.i=b;this.g=c}function Hi(a,b){return P(function
317
317
  function Ji(a,b){var c=a.h.restrictions;a=a.i;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Sf(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}function Ii(a,b){var c=Ji(a,b);if(b){var d=a.g?a.g.g:null;if(d&&a.g.A)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,Ki(a,d.keySystem,f.video),Ki(a,d.keySystem,f.audio);Li(a,b)}return c}
318
318
  function Ki(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,li(a.g,e.initDataType,e.initData)}}}
319
319
  function Li(a,b){a=a.g?a.g.Ld():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?Mi.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
320
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var Mi=["output-restricted","internal-error"];function Ni(){}function Oi(a,b){if(b){var c=Pi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Ni);Ni.unregisterParserByMime=function(a){delete Pi[a]};Ni.registerParserByMime=function(a,b){Pi[a]=b};Ni.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ni.AccessibilityPurpose={jk:"visually impaired",Bj:"hard of hearing"};var Pi={};function Qi(a,b){function c(){f=!0}function d(m){h.push(m);Oh(m)}var e=a=xb(a),f=!1,g,h=[],k=[];(new Jh).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).S("stsd",function(m){g=m;h.push(m);Qh(m)}).S("encv",c).S("enca",c).S("dvav",function(m){k.push({box:m,Ua:1701733238})}).S("dva1",function(m){k.push({box:m,Ua:1701733238})}).S("dvh1",function(m){k.push({box:m,Ua:1701733238})}).S("dvhe",function(m){k.push({box:m,Ua:1701733238})}).S("dvc1",function(m){k.push({box:m,Ua:1701733238})}).S("dvi1",
320
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new T(2,4,4012,a);}var Mi=["output-restricted","internal-error"];function Ni(){}function Oi(a,b){if(b){var c=Pi[b.toLowerCase()];if(c)return c}throw new T(2,4,4E3,a,b);}S("shaka.media.ManifestParser",Ni);Ni.unregisterParserByMime=function(a){delete Pi[a]};Ni.registerParserByMime=function(a,b){Pi[a]=b};Ni.registerParserByExtension=function(){pb("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};Ni.AccessibilityPurpose={jk:"visually impaired",Bj:"hard of hearing"};var Pi={};function Qi(a,b){function c(){f=!0}function d(m){h.push(m);Oh(m)}var e=a=yb(a),f=!1,g,h=[],k=[];(new Jh).box("moov",d).box("trak",d).box("mdia",d).box("minf",d).box("stbl",d).S("stsd",function(m){g=m;h.push(m);Qh(m)}).S("encv",c).S("enca",c).S("dvav",function(m){k.push({box:m,Ua:1701733238})}).S("dva1",function(m){k.push({box:m,Ua:1701733238})}).S("dvh1",function(m){k.push({box:m,Ua:1701733238})}).S("dvhe",function(m){k.push({box:m,Ua:1701733238})}).S("dvc1",function(m){k.push({box:m,Ua:1701733238})}).S("dvi1",
321
321
  function(m){k.push({box:m,Ua:1701733238})}).S("hev1",function(m){k.push({box:m,Ua:1701733238})}).S("hvc1",function(m){k.push({box:m,Ua:1701733238})}).S("avc1",function(m){k.push({box:m,Ua:1701733238})}).S("avc3",function(m){k.push({box:m,Ua:1701733238})}).S("ac-3",function(m){k.push({box:m,Ua:1701733217})}).S("ec-3",function(m){k.push({box:m,Ua:1701733217})}).S("ac-4",function(m){k.push({box:m,Ua:1701733217})}).S("mp4a",function(m){k.push({box:m,Ua:1701733217})}).parse(a);if(f)return a;if(0==k.length||
322
322
  !g)throw eb(Me(a)),new T(2,3,3019,b);k.reverse();b=t(k);for(var l=b.next();!l.done;l=b.next())l=l.value,e=Ri(e,g,l.box,h,l.Ua);return ec()&&sc()&&!fc()?(b=new Uint8Array(a.byteLength+e.byteLength),b.set(e),b.set(a,e.byteLength),b):e}
323
323
  function Ri(a,b,c,d,e){var f=Si.value(),g=a.subarray(c.start,c.start+c.size),h=Eb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Eb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ti(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=fc()||ec()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Ti(e,d.start,d.size+k.byteLength);k=Eb(e,b.start);b=Ph(b);
324
- a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ti(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Si=new Ub(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ui(a,b,c,d,e,f,g){this.N=a;this.Ha=b;this.ta=c;this.Oc=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Ui.prototype.$b=function(){return this.Ha};Ui.prototype.Yb=function(){return this.ta};Ui.prototype.Mb=function(){return this.g};function Vi(a,b){return a===b?!0:a&&b?a.$b()==b.$b()&&a.Yb()==b.Yb()&&Sb(a.N().sort(),b.N().sort())&&wb(a.Mb(),b.Mb()):a==b}S("shaka.media.InitSegmentReference",Ui);
325
- Ui.prototype.getEndByte=Ui.prototype.Yb;Ui.prototype.getStartByte=Ui.prototype.$b;
326
- function Wi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Xi:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ha=d;this.ta=e;this.Z=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=-1;this.s=void 0===v?!1:v;this.G=this.o=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Og();
327
- this.s&&this.g.length&&this.g[this.g.length-1].Ng();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=Wi.prototype;q.N=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Rh=function(){return this.endTime};q.$b=function(){return this.Ha};q.Yb=function(){return this.ta};q.ji=function(){return this.tilesLayout};q.ii=function(){return this.B};q.ac=function(){return this.status};q.Ci=function(){this.status=Yi};q.yf=function(){this.preload=!0};q.isPreload=function(){return this.preload};
328
- q.Nc=function(){this.l=!1};q.ui=function(){return this.l};q.Og=function(){this.o=!0};q.wi=function(){return this.o};q.Ng=function(){this.G=!0};q.vi=function(){return this.G};q.Mg=function(){this.m=!0};q.pi=function(){return this.m};q.jh=function(a){this.A=a};q.hi=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
329
- q.Xf=function(a){null==this.h?Xa("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.dj=function(a){this.C=a};q.Mb=function(){return this.C};function $i(a,b){a.Z=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())$i(c.value,b)}S("shaka.media.SegmentReference",Wi);Wi.prototype.getSegmentData=Wi.prototype.Mb;Wi.prototype.setSegmentData=Wi.prototype.dj;Wi.prototype.syncAgainst=Wi.prototype.Xf;Wi.prototype.offset=Wi.prototype.offset;
330
- Wi.prototype.getThumbnailSprite=Wi.prototype.hi;Wi.prototype.setThumbnailSprite=Wi.prototype.jh;Wi.prototype.hasByterangeOptimization=Wi.prototype.pi;Wi.prototype.markAsByterangeOptimization=Wi.prototype.Mg;Wi.prototype.isLastPartial=Wi.prototype.vi;Wi.prototype.markAsLastPartial=Wi.prototype.Ng;Wi.prototype.isPartial=Wi.prototype.wi;Wi.prototype.markAsPartial=Wi.prototype.Og;Wi.prototype.isIndependent=Wi.prototype.ui;Wi.prototype.markAsNonIndependent=Wi.prototype.Nc;Wi.prototype.isPreload=Wi.prototype.isPreload;
331
- Wi.prototype.markAsPreload=Wi.prototype.yf;Wi.prototype.markAsUnavailable=Wi.prototype.Ci;Wi.prototype.getStatus=Wi.prototype.ac;Wi.prototype.getTileDuration=Wi.prototype.ii;Wi.prototype.getTilesLayout=Wi.prototype.ji;Wi.prototype.getEndByte=Wi.prototype.Yb;Wi.prototype.getStartByte=Wi.prototype.$b;Wi.prototype.getEndTime=Wi.prototype.Rh;Wi.prototype.getStartTime=Wi.prototype.getStartTime;Wi.prototype.getUris=Wi.prototype.N;var Xi=0,Yi=1;Wi.Status={nj:Xi,hk:Yi,Jj:2};function aj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function bj(a){return!a||aj(a)?null:a.length?a.end(a.length-1):null}function cj(a,b){return!a||!a.length||aj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function dj(a,b){if(!a||!a.length||aj(a))return 0;var c=0;a=t(ej(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
324
+ a=k.getUint32(b);k.setUint32(b,a+1);return e}function Ti(a,b,c){a=Eb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var Si=new Ub(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ui(a,b,c,d,e,f,g){this.N=a;this.Ha=b;this.ua=c;this.Oc=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.mimeType=this.codecs=null}Ui.prototype.$b=function(){return this.Ha};Ui.prototype.Xb=function(){return this.ua};Ui.prototype.Lb=function(){return this.g};function Vi(a,b){return a===b?!0:a&&b?a.$b()==b.$b()&&a.Xb()==b.Xb()&&Sb(a.N().sort(),b.N().sort())&&xb(a.Lb(),b.Lb()):a==b}S("shaka.media.InitSegmentReference",Ui);
325
+ Ui.prototype.getEndByte=Ui.prototype.Xb;Ui.prototype.getStartByte=Ui.prototype.$b;
326
+ function Wi(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?Xi:r;this.startTime=a;this.j=this.endTime=b;this.F=c;this.Ha=d;this.ua=e;this.Z=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.B=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.A=null;this.i=-1;this.s=void 0===v?!1:v;this.G=this.o=!1;a=t(this.g);for(b=a.next();!b.done;b=a.next())b.value.Ng();
327
+ this.s&&this.g.length&&this.g[this.g.length-1].Mg();this.C=this.bandwidth=this.mimeType=this.codecs=null}q=Wi.prototype;q.N=function(){return this.F()};q.getStartTime=function(){return this.startTime};q.Rh=function(){return this.endTime};q.$b=function(){return this.Ha};q.Xb=function(){return this.ua};q.ji=function(){return this.tilesLayout};q.ii=function(){return this.B};q.ac=function(){return this.status};q.Ci=function(){this.status=Yi};q.xf=function(){this.preload=!0};q.isPreload=function(){return this.preload};
328
+ q.Nc=function(){this.l=!1};q.ui=function(){return this.l};q.Ng=function(){this.o=!0};q.wi=function(){return this.o};q.Mg=function(){this.G=!0};q.vi=function(){return this.G};q.Lg=function(){this.m=!0};q.pi=function(){return this.m};q.jh=function(a){this.A=a};q.hi=function(){return this.A};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
329
+ q.Vf=function(a){null==this.h?Ya("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.dj=function(a){this.C=a};q.Lb=function(){return this.C};function Zi(a,b){a.Z=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())Zi(c.value,b)}S("shaka.media.SegmentReference",Wi);Wi.prototype.getSegmentData=Wi.prototype.Lb;Wi.prototype.setSegmentData=Wi.prototype.dj;Wi.prototype.syncAgainst=Wi.prototype.Vf;Wi.prototype.offset=Wi.prototype.offset;
330
+ Wi.prototype.getThumbnailSprite=Wi.prototype.hi;Wi.prototype.setThumbnailSprite=Wi.prototype.jh;Wi.prototype.hasByterangeOptimization=Wi.prototype.pi;Wi.prototype.markAsByterangeOptimization=Wi.prototype.Lg;Wi.prototype.isLastPartial=Wi.prototype.vi;Wi.prototype.markAsLastPartial=Wi.prototype.Mg;Wi.prototype.isPartial=Wi.prototype.wi;Wi.prototype.markAsPartial=Wi.prototype.Ng;Wi.prototype.isIndependent=Wi.prototype.ui;Wi.prototype.markAsNonIndependent=Wi.prototype.Nc;Wi.prototype.isPreload=Wi.prototype.isPreload;
331
+ Wi.prototype.markAsPreload=Wi.prototype.xf;Wi.prototype.markAsUnavailable=Wi.prototype.Ci;Wi.prototype.getStatus=Wi.prototype.ac;Wi.prototype.getTileDuration=Wi.prototype.ii;Wi.prototype.getTilesLayout=Wi.prototype.ji;Wi.prototype.getEndByte=Wi.prototype.Xb;Wi.prototype.getStartByte=Wi.prototype.$b;Wi.prototype.getEndTime=Wi.prototype.Rh;Wi.prototype.getStartTime=Wi.prototype.getStartTime;Wi.prototype.getUris=Wi.prototype.N;var Xi=0,Yi=1;Wi.Status={nj:Xi,hk:Yi,Jj:2};function aj(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function bj(a){return!a||aj(a)?null:a.length?a.end(a.length-1):null}function cj(a,b){return!a||!a.length||aj(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function dj(a,b){if(!a||!a.length||aj(a))return 0;var c=0;a=t(ej(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
332
332
  function fj(a,b,c){if(!a||!a.length||aj(a))return null;a=ej(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function ej(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
333
333
  @license
334
334
  Shaka Player
@@ -336,12 +336,12 @@ function fj(a,b,c){if(!a||!a.length||aj(a))return null;a=ej(a).findIndex(functio
336
336
  SPDX-License-Identifier: Apache-2.0
337
337
  */
338
338
  function gj(){}function hj(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function ij(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function jj(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
339
- function kj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Ac(xb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Ac(xb(a.data,3+c,f)),h;"--\x3e"===d?h=Ac(xb(a.data,4+c+f)):h=Bb(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
340
- d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Ac(xb(a.data,1,d));a=Ac(xb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Ac(xb(a.data,1,d));a=Ac(xb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Ac(xb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
341
- c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Bb(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Ac(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Ac(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Bb(a.data),b):null}
339
+ function kj(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Ac(yb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Ac(yb(a.data,3+c,f)),h;"--\x3e"===d?h=Ac(yb(a.data,4+c+f)):h=Ab(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
340
+ d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Ac(yb(a.data,1,d));a=Ac(yb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Ac(yb(a.data,1,d));a=Ac(yb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Ac(yb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
341
+ c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Ab(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Ac(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Ac(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ab(a.data),b):null}
342
342
  function lj(a){for(var b=0,c=[];hj(a,b);){var d=jj(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=jj(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=kj(e))&&c.push(f);b+=e.size+10}ij(a,b)&&(b+=10)}return c}function mj(a,b){for(var c=b=void 0===b?0:b,d=0;hj(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=jj(a,b+6),ij(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",gj);gj.getID3Data=mj;
343
343
  gj.getID3Frames=lj;function nj(a,b){var c=null,d=null,e=null,f=a.P();b&1&&(e=a.Tc());b&2&&a.skip(4);b&8&&(c=a.P());b&16&&(d=a.P());return{trackId:f,cd:c,Id:d,lk:e}}function oj(a,b){return 1==b?(b=a.P(),a=a.P(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.P()}}function pj(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.P();a.skip(4);a=a.la();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
344
- function qj(a,b,c){var d=a.P(),e=[],f=null;c&1&&(f=a.P());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Nf:null,sampleSize:null,me:null};c&256&&(h.Nf=a.P());c&512&&(h.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(h.me=0==b?a.P():a.Wg());e.push(h)}return{qk:d,$g:e,Kh:f}}function rj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.la();a.skip(2);a.skip(2);a.skip(2);a=a.la()+a.la()/65536;return{channelCount:b,sampleRate:a}}function sj(a){a=a.P();return{codec:Nh(a)}}
344
+ function qj(a,b,c){var d=a.P(),e=[],f=null;c&1&&(f=a.P());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Lf:null,sampleSize:null,me:null};c&256&&(h.Lf=a.P());c&512&&(h.sampleSize=a.P());c&1024&&a.skip(4);c&2048&&(h.me=0==b?a.P():a.Vg());e.push(h)}return{qk:d,$g:e,Kh:f}}function rj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.la();a.skip(2);a.skip(2);a.skip(2);a=a.la()+a.la()/65536;return{channelCount:b,sampleRate:a}}function sj(a){a=a.P();return{codec:Nh(a)}}
345
345
  function tj(a){var b=null,c=null,d=a.wb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.la()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.la();a.la();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,yd:c}}
346
346
  function uj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function vj(a){return(10>a?"0":"")+a};/*
347
347
 
@@ -359,56 +359,56 @@ function uj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0
359
359
  See the License for the specific language governing permissions and
360
360
  limitations under the License.
361
361
  */
362
- function wj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=xb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function xj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Gh(c,0)).P(),a.g=8*d,a.i-=d)}function yj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;xj(a)}a.h<<=b;a.g-=b}
362
+ function wj(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=yb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function xj(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Gh(c,0)).P(),a.g=8*d,a.i-=d)}function yj(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;xj(a)}a.h<<=b;a.g-=b}
363
363
  function zj(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&xj(a);c=b-c;return 0<c?d<<c|zj(a,c):d}function Aj(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;xj(a);return b+Aj(a)}function Bj(a){yj(a,1+Aj(a))}function X(a){var b=Aj(a);return zj(a,b+1)-1}function Cj(a){a=X(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Dj(a){return 1===zj(a,1)}function Ej(a){return zj(a,8)}
364
- function Fj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Cj(a),d=(c+d+256)%256),c=0===d?c:d}function Oj(a){Ej(a);X(a);return X(a)}S("shaka.util.ExpGolomb",wj);function Pj(){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.s=null}q=Pj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
364
+ function Fj(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Cj(a),d=(c+d+256)%256),c=0===d?c:d}function Gj(a){Ej(a);X(a);return X(a)}S("shaka.util.ExpGolomb",wj);function Pj(){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.s=null}q=Pj.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
365
365
  q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Qj(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.G=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.G:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Pd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
366
366
  k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Cc(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
367
367
  null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.F={channelCount:0===(u&15)?2:u&15,Hh:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Pd&&(g.Pd=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
368
368
  break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.I=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.B=f.audio,this.A=f.audioCodec);-1!=f.Pd&&(this.C=f.Pd);d&&!this.H&&(d=!1,e=b-188);this.H=!0;break;case this.I:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.B:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
369
369
  break;case this.C:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
370
370
  function Rj(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.s&&(a.s=e);c.pts=Sj(e,a.s);a.s=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.o&&(a.o=d),c.dts=Sj(d,
371
- a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Ii=function(a){pb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Ef(a,{sd:null,state:null})};
372
- q.Ef=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(1===f)f=n?0:2;else if(n)if(1==n){n=h-f-1;if(0<=l)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.sd)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
371
+ a.o));a.o=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Ii=function(a){pb("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Df(a,{sd:null,state:null})};
372
+ q.Df=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(1===f)f=n?0:2;else if(n)if(1==n){n=h-f-1;if(0<=l)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.sd)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
373
373
  g)),0<n&&(n=a.subarray(0,n),f.data=Ne(f.data,n),f.fullData=Ne(f.fullData,n),f.state=0);h<d?(m="hvc"==this.m?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.sd&&(c=k.length?k[k.length-1]:b.sd)&&(c.data=Ne(c.data,a),c.fullData=Ne(c.fullData,a));b.state=f;return k};
374
374
  q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Ne.apply(He,x(c.value)),(c=Rj(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:lj(c.data),dts:c.dts,pts:c.pts});return a};
375
375
  q.$a=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Ne.apply(He,x(c.value)),e=Rj(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Ne(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
376
376
  q.rc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Ne.apply(He,x(d.value)),f=Rj(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Ne(d.data,e),this.g.push(d))}if(a){c={sd:null,state:null};d=[];e=t(this.g);for(f=e.next();!f.done;f=e.next())f=f.value,
377
- f.nalus=this.Ef(f,c),f.nalus.length&&(d.push(f),c.sd=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.$a();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.rc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.dd=function(){return{audio:this.A,video:this.m}};
377
+ f.nalus=this.Df(f,c),f.nalus.length&&(d.push(f),c.sd=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.$a();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.rc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.dd=function(){return{audio:this.A,video:this.m}};
378
378
  q.Od=function(){for(var a=[],b=t(this.rc()),c=b.next();!c.done;c=b.next())a.push.apply(a,x(c.value.nalus));return a};q.mi=function(){pb("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.lf();return{height:a.height,width:a.width}};q.lf=function(){return"hvc"==this.m?Tj(this):Uj(this)};function Vj(a){var b=a.rc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
379
379
  function Uj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Od();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new wj(c.data);var d=Ej(c),e=Ej(c),f=Ej(c);Bj(c);if(Wj.includes(d)){var g=X(c);3===g&&yj(c,1);Bj(c);Bj(c);yj(c,1);if(Dj(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Dj(c)&&(6>h?Fj(c,16):Fj(c,64))}}Bj(c);g=X(c);if(0===g)X(c);else if(1===g)for(yj(c,1),Bj(c),Bj(c),g=X(c),h=0;h<g;h++)Bj(c);Bj(c);yj(c,1);g=X(c);h=X(c);var k=zj(c,1);0===k&&yj(c,1);yj(c,
380
380
  1);var l=0,m=0,n=0,p=0;Dj(c)&&(l=X(c),m=X(c),n=X(c),p=X(c));b.height=String((2-k)*(h+1)*16-2*n-2*p);b.width=String(16*(g+1)-2*l-2*m);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Vj(a);return b}
381
381
  function Tj(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Od();if(!c.length)return b;c=c.find(function(E){return 33==E.type});if(!c)return b;var d=new wj(c.fullData,!0);Ej(d);Ej(d);zj(d,4);var e=zj(d,3);Dj(d);var f=zj(d,2),g=zj(d,1),h=zj(d,5),k=zj(d,32);c=Ej(d);for(var l=Ej(d),m=Ej(d),n=Ej(d),p=Ej(d),r=Ej(d),u=Ej(d),v=[],w=[],z=0;z<e;z++)v.push(Dj(d)),w.push(Dj(d));if(0<e)for(z=e;8>z;z++)zj(d,2);for(z=0;z<e;z++)v[z]&&zj(d,88),w[z]&&Ej(d);X(d);e=X(d);3==e&&zj(d,1);v=X(d);w=X(d);var y=
382
382
  z=0,B=0,C=0;Dj(d)&&(z+=X(d),y+=X(d),B+=X(d),C+=X(d));b.width=String(v-(z+y)*(1===e||2===e?2:1));b.height=String(w-(B+C)*(1===e?2:1));d=function(E){for(var H=0,A=0;32>A;A++)H|=(E>>A&1)<<31-A;return H>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
383
383
  c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Vj(a);return b}function Sj(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Xj(a){return 0>Qj(a)?!1:!0}function Qj(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",Pj);Pj.syncOffset=Qj;Pj.probe=Xj;Pj.prototype.getVideoInfo=Pj.prototype.lf;Pj.prototype.getVideoResolution=Pj.prototype.mi;
384
- Pj.prototype.getVideoNalus=Pj.prototype.Od;Pj.prototype.getCodecs=Pj.prototype.dd;Pj.prototype.getStartTime=Pj.prototype.getStartTime;Pj.prototype.getVideoData=Pj.prototype.rc;Pj.prototype.getAudioData=Pj.prototype.$a;Pj.prototype.getMetadata=Pj.prototype.getMetadata;Pj.prototype.parseNalus=Pj.prototype.Ef;Pj.prototype.parseAvcNalus=Pj.prototype.Ii;Pj.prototype.parse=Pj.prototype.parse;Pj.prototype.clearData=Pj.prototype.clearData;Pj.Timescale=9E4;
384
+ Pj.prototype.getVideoNalus=Pj.prototype.Od;Pj.prototype.getCodecs=Pj.prototype.dd;Pj.prototype.getStartTime=Pj.prototype.getStartTime;Pj.prototype.getVideoData=Pj.prototype.rc;Pj.prototype.getAudioData=Pj.prototype.$a;Pj.prototype.getMetadata=Pj.prototype.getMetadata;Pj.prototype.parseNalus=Pj.prototype.Df;Pj.prototype.parseAvcNalus=Pj.prototype.Ii;Pj.prototype.parse=Pj.prototype.parse;Pj.prototype.clearData=Pj.prototype.clearData;Pj.Timescale=9E4;
385
385
  var Wj=[100,110,122,244,44,83,86,118,128,138,139,134];function Yj(a,b,c){this.g=null;this.o=-1;this.l=a;this.i=b;this.m=c;this.j=!1;a:{"undefined"===typeof libDPIModule&&Za("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,pb("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{Za("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(Za("Could not find LCEVC Library on this page"),
386
386
  a=!1):(this.h.SupportObject.SupportStatus||Za(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!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 Zj(a){a.g&&a.i.classList.add("shaka-hidden")}
387
- Yj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ak(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Yj);Yj.prototype.release=Yj.prototype.release;function bk(a,b,c,d){var e=this;this.j=a;this.Y=c;this.A=null;this.aa=b;this.g={};this.C={};this.Ea={};this.h=null;this.fa=!1;this.R=d||null;this.m={};this.s=new gb;this.i={};this.H=null;this.F=new Yg;this.wa="";this.Fa=!1;this.l=ck(this,this.F);this.G=!1;this.I=new Ah(function(){return dk(e)});this.B=!1;this.L="UNKNOWN";this.za=this.Da=!1;this.oa=new Yg;this.o=!1;this.ea=!0;this.da=null;this.K={};this.ma=this.M=this.ra=this.O=null;this.ja=new Yg}
388
- function ck(a,b){a.ea=!0;if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ea=!0});a.s.D(c,"endstreaming",function(){a.ea=!1})}else c=new MediaSource;a.s.ua(c,"sourceopen",function(){URL.revokeObjectURL(a.wa);b.resolve()});a.s.ua(a.j,"playing",function(){a.Fa=!0});a.wa=ek(c);a.j.src=a.wa;return c}
389
- function fk(a,b){var c,d,e,f,g,h,k,l,m,n,p;return P(function(r){if(1==r.g)return a.createSegmentIndex?G(r,a.createSegmentIndex(),2):r.u(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=We;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",h!=a.mimeType||k!=a.codecs)if(l=h+":"+k,!d.has(l))if(d.add(l),b==c.va){if(m=Ze(h,k),!nf(m))return r.return(!1)}else if(b==c.ka?
387
+ Yj.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ak(a,b,c){var d=0,e=-1;switch(b.mimeType){case "video/webm":d=1;break;case "video/mp4":d=2}switch(c){case "DASH":e=1;break;case "HLS":e=0}a.g&&(a.o=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(d),a.j||a.g.setStreamingFormat(e))}S("shaka.lcevc.Dec",Yj);Yj.prototype.release=Yj.prototype.release;function bk(a,b,c,d){var e=this;this.j=a;this.Y=c;this.A=null;this.aa=b;this.g={};this.C={};this.Ea={};this.h=null;this.fa=!1;this.R=d||null;this.m={};this.s=new gb;this.i={};this.H=null;this.F=new Yg;this.sa="";this.Fa=!1;this.l=ck(this,this.F);this.G=!1;this.I=new Ah(function(){return dk(e)});this.B=!1;this.L="UNKNOWN";this.za=this.Da=!1;this.ra=new Yg;this.o=!1;this.ea=!0;this.da=null;this.K={};this.ma=this.M=this.oa=this.O=null;this.ja=new Yg}
388
+ function ck(a,b){a.ea=!0;if(window.ManagedMediaSource){a.j.disableRemotePlayback=!0;var c=new ManagedMediaSource;a.s.D(c,"startstreaming",function(){a.ea=!0});a.s.D(c,"endstreaming",function(){a.ea=!1})}else c=new MediaSource;a.s.va(c,"sourceopen",function(){URL.revokeObjectURL(a.sa);b.resolve()});a.s.va(a.j,"playing",function(){a.Fa=!0});a.sa=ek(c);a.j.src=a.sa;return c}
389
+ function fk(a,b){var c,d,e,f,g,h,k,l,m,n,p;return P(function(r){if(1==r.g)return a.createSegmentIndex?G(r,a.createSegmentIndex(),2):r.u(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=We;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",h!=a.mimeType||k!=a.codecs)if(l=h+":"+k,!d.has(l))if(d.add(l),b==c.wa){if(m=Ze(h,k),!nf(m))return r.return(!1)}else if(b==c.ka?
390
390
  k=fg(k):b==c.X&&(k=eg(k,h)),n=cf(a,h,k),p=af(h,k),!lb(n)&&!je(p))return r.return(!1);return r.return(!0)})}q=bk.prototype;q.destroy=function(){return this.I.destroy()};
391
391
  function dk(a){var b,c,d,e,f,g,h,k;return P(function(l){if(1==l.g){b=[];for(c in a.m)for(d=a.m[c],e=d[0],a.m[c]=d.slice(0,1),e&&b.push(e.p.catch(xf)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new T(2,7,7003,void 0));a.h&&b.push(a.h.destroy());for(k in a.i)b.push(a.i[k].destroy());return G(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.A=null;a.l=null;a.h=null;a.aa=null;a.g={};a.i={};a.H=null;a.m={};a.R=null;a.K={};
392
392
  a.Y=null;I(l)})}
393
- q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return f=We,G(m,e.F,2);case 2:if(!gk(e)&&(e.G||e.l&&"closed"!=e.l.readyState)){m.u(3);break}Xa("Expected MediaSource to be open during init(); reopening the media source.");e.F=new Yg;e.l=ck(e,e.F);return G(m,e.F,3);case 3:e.B=b,e.L=c,e.Da=d,e.za=!e.B&&"HLS"==e.L&&!e.Da,e.K={},g=t(a.keys()),h=g.next();case 5:if(h.done){m.u(0);break}k=h.value;l=a.get(k);
393
+ q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return f=We,G(m,e.F,2);case 2:if(!gk(e)&&(e.G||e.l&&"closed"!=e.l.readyState)){m.u(3);break}Ya("Expected MediaSource to be open during init(); reopening the media source.");e.F=new Yg;e.l=ck(e,e.F);return G(m,e.F,3);case 3:e.B=b,e.L=c,e.Da=d,e.za=!e.B&&"HLS"==e.L&&!e.Da,e.K={},g=t(a.keys()),h=g.next();case 5:if(h.done){m.u(0);break}k=h.value;l=a.get(k);
394
394
  return G(m,hk(e,k,l,l.codecs),8);case 8:e.o?(e.m[f.X]=[],e.m[f.ka]=[]):e.m[k]=[],h=g.next(),m.u(5)}})};
395
- function hk(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return P(function(w){switch(w.g){case 1:return e=We,f=Qa,g=Ra,G(w,fk(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Ze(c.mimeType,d);if(b==e.va){ik(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!lb(h)||!a.B&&$e.includes(h))k=!0;l=af(c.mimeType,d);if(!k){w.u(4);break}m=Se(e.X,(d||"").split(","));n=Se(e.ka,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return G(w,hk(a,e.X,c,m),6);case 6:return G(w,
395
+ function hk(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return P(function(w){switch(w.g){case 1:return e=We,f=Qa,g=Ra,G(w,fk(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");h=Ze(c.mimeType,d);if(b==e.wa){ik(a,h,a.B,c.external);w.u(0);break}k=a.A.forceTransmux;if(!lb(h)||!a.B&&$e.includes(h))k=!0;l=af(c.mimeType,d);if(!k){w.u(4);break}m=Se(e.X,(d||"").split(","));n=Se(e.ka,(d||"").split(","));if(!m||!n){w.u(5);break}a.o=!0;return G(w,hk(a,e.X,c,m),6);case 6:return G(w,
396
396
  hk(a,e.ka,c,n),7);case 7:return w.return();case 5:if(p=je(l))r=p(),a.i[b]=r,h=r.convertCodecs(b,l);case 4:u=h+a.A.addExtraFeaturesToSourceBuffer(h);Bh(a.I);try{v=a.l.addSourceBuffer(u)}catch(z){throw new T(2,3,3015,z,"The mediaSource_ status was "+a.l.readyState+" expected 'open'",null);}a.B&&(v.mode=jk);a.s.D(v,"error",function(){var z=a.m[b][0];z.p.reject(new T(2,3,3014,a.j.error?a.j.error.code:0,z.uri))});a.s.D(v,"updateend",function(){return kk(a,b)});a.g[b]=v;a.C[b]=h;a.Ea[b]=!!c.drmInfos.length;
397
397
  I(w)}})}q.configure=function(a){this.A=a;this.h&&(this.h.A=a.modifyCueCallback)};
398
398
  function ik(a,b,c,d){a.h||(a.h=new mf(a.aa),a.h&&(a.h.A=a.A.modifyCueCallback));var e=a.h;d=d||a.fa;a=a.L;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,of[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):pb("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):pb("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.B=d)}
399
399
  function gk(a){return a.G?!1:a.l?"ended"==a.l.readyState:!0}function lk(a,b){Object.keys(a.g).length?b==Ue?a=a.h.g:(a=mk(a,b),a=!a||aj(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function nk(a,b){return Object.keys(a.g).length?b==Ue?a.h.h:bj(mk(a,b)):null}function ok(a,b,c){if(b==Ue)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=mk(a,b);return dj(a,c)}
400
- q.Cb=function(){var a={total:this.G?[]:ej(this.j.buffered),audio:ej(mk(this,"audio")),video:ej(mk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function mk(a,b){if(a.G)return null;try{return a.g[b].buffered}catch(c){return null}}
401
- function pk(a,b,c,d,e){var f=null,g=[],h=xb(c);if($e.includes(e))b=lj(h),b.length&&d&&((c=b.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&(f=Math.round(c.data)/1E3),a.Y.onMetadata([{cueTime:d.startTime,data:h,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.Z&&d.Z.timescale){var k=d.Z.timescale;if(!isNaN(k)){var l=0,m=!1;(new Jh).box("moof",Oh).box("traf",Oh).S("tfdt",function(n){l=oj(n.reader,
400
+ q.Bb=function(){var a={total:this.G?[]:ej(this.j.buffered),audio:ej(mk(this,"audio")),video:ej(mk(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function mk(a,b){if(a.G)return null;try{return a.g[b].buffered}catch(c){return null}}
401
+ function pk(a,b,c,d,e){var f=null,g=[],h=yb(c);if($e.includes(e))b=lj(h),b.length&&d&&((c=b.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&(f=Math.round(c.data)/1E3),a.Y.onMetadata([{cueTime:d.startTime,data:h,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.Z&&d.Z.timescale){var k=d.Z.timescale;if(!isNaN(k)){var l=0,m=!1;(new Jh).box("moof",Oh).box("traf",Oh).S("tfdt",function(n){l=oj(n.reader,
402
402
  n.version).baseMediaDecodeTime/k;m=!0;n.parser.stop()}).parse(c,!0);m&&(f=l)}}else e.includes("/mp4")||e.includes("/webm")||!Xj(h)||(a.K[b]?a.K[b].clearData():a.K[b]=new Pj,a=a.K[b].parse(h),d=a.getStartTime(b),null!=d&&(f=d),g=a.getMetadata());return{timestamp:f,metadata:g}}
403
- function qk(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L;return P(function(K){switch(K.g){case 1:m=We;if(b!=m.va){K.u(2);break}if("HLS"!=a.L){K.u(3);break}return G(K,a.oa,4);case 4:n=K.h,a.h.s=n;case 3:return G(K,pf(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.N()[0]:null),5);case 5:return K.return();case 2:if(l||!a.o){K.u(6);break}return G(K,qk(a,m.X,c,d,e,f,g,h,k,!0),7);case 7:return G(K,qk(a,m.ka,c,d,e,f,g,
404
- h,k,!0),8);case 8:return K.return();case 6:if(!a.g[b])return K.return();p=a.g[b].timestampOffset;r=a.C[b];a.i[b]&&(r=a.i[b].getOriginalMimeType());if(d&&(u=pk(a,b,c,d,r),v=u.timestamp,w=u.metadata,null!=v&&(null==a.O&&b==m.ka&&(a.O=v,a.ra=d.startTime,null!=a.M&&(z=0,a.ra==a.ma&&(z=a.O-a.M),a.ja.resolve(z))),null==a.M&&b==m.X&&(a.M=v,a.ma=d.startTime,null!=a.O&&(y=0,a.ra==a.ma&&(y=a.O-a.M),a.ja.resolve(y))),B=v,C=$e,!a.B&&C.includes(a.C[b])&&(B=0),E=d.startTime-B,H=Math.abs(p-E),(.001<=H||g||h)&&(!k||
405
- 0<E||!p)&&(p=E,a.za&&(rk(a,b,function(){return sk(a,b)},null),rk(a,b,function(){return tk(a,b,p)},null))),(A=b==m.ka||!(m.ka in a.g))&&a.oa.resolve(p)),w.length))a.Y.onMetadata(w,p,d?d.endTime:null);f&&b==m.ka&&(a.h||ik(a,"application/cea-608",a.B,!1),a.H||(D=r.split(";",1)[0],a.H=new Hb(D)),d?(F=a.H.i(c),F.length&&vf(a.h,F,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.i[b]){K.u(9);break}return G(K,a.i[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=K.h;case 9:c=uk(a,c,d?d.startTime:null,b,d?d.N()[0]:
406
- null);if(!d||!a.B||b==m.va){K.u(11);break}if(!g&&!h){K.u(11);break}J=d.startTime;if("HLS"!=a.L||a.o||b!=m.X||!a.g[m.ka]){K.u(13);break}return G(K,a.ja,14);case 14:L=K.h,.1<Math.abs(L)&&(J-=L);case 13:rk(a,b,function(){return sk(a,b)},null),rk(a,b,function(){return tk(a,b,J)},null);case 11:return G(K,rk(a,b,function(){var O=c;if("video"==b&&a.R){var M=a.R;M.g&&M.g.appendBuffer(O,"video",M.o,-p)}a.g[b].appendBuffer(O)},d?d.N()[0]:null),15);case 15:I(K)}})}
407
- function vk(a,b){var c=nk(a,"video")||0;rf(a.h,b,c)}function wk(a){a.h&&rf(a.h,"",0)}q.remove=function(a,b,c){var d=this,e;return P(function(f){return 1==f.g?(e=We,a==e.va?G(f,d.h.remove(b,c),0):G(f,rk(d,a,function(){return xk(d,a,b,c)},null),4)):d.o?G(f,rk(d,e.X,function(){return xk(d,e.X,b,c)},null),0):f.u(0)})};
408
- function yk(a,b){var c;return P(function(d){return 1==d.g?(c=We,b==c.va?a.h?G(d,a.h.remove(0,Infinity),0):d.return():G(d,rk(a,b,function(){return xk(a,b,0,a.l.duration)},null),4)):a.o?G(d,rk(a,c.X,function(){return xk(a,c.X,0,a.l.duration)},null),0):d.u(0)})}q.flush=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=We,a==c.va?d.return():G(d,rk(b,a,function(){b.j.currentTime-=.001;kk(b,a)},null),2)):b.o?G(d,rk(b,c.X,function(){var e=c.X;b.j.currentTime-=.001;kk(b,e)},null),0):d.u(0)})};
409
- function zk(a,b,c,d,e,f,g,h,k){var l,m,n;return P(function(p){if(1==p.g){l=We;if(b==l.va)return f||(a.h.s=c),qf(a.h,d,e),p.return();m=[];return G(p,Ak(a,b,g,h,k),2)}n=p.h;n||(m.push(rk(a,b,function(){return sk(a,b)},null)),a.o&&m.push(rk(a,l.X,function(){return sk(a,l.X)},null)));f||(m.push(rk(a,b,function(){return tk(a,b,c)},null)),a.o&&m.push(rk(a,l.X,function(){return tk(a,l.X,c)},null)));m.push(rk(a,b,function(){a.g[b].appendWindowStart=0;a.g[b].appendWindowEnd=e;a.g[b].appendWindowStart=d;kk(a,
410
- b)},null));a.o&&m.push(rk(a,l.X,function(){var r=l.X;a.g[r].appendWindowStart=0;a.g[r].appendWindowEnd=e;a.g[r].appendWindowStart=d;kk(a,r)},null));return G(p,Promise.all(m),0)})}
411
- function Bk(a,b,c){var d,e;return P(function(f){if(1==f.g){d=We;if(b==d.va)return f.return();b==d.ka&&(a.oa=new Yg);if(!a.B||(e=nk(a,b))&&.1>Math.abs(e-c))return f.return();rk(a,b,function(){return sk(a,b)},null);a.o&&rk(a,d.X,function(){return sk(a,d.X)},null);return G(f,rk(a,b,function(){return tk(a,b,c)},null),2)}return a.o?G(f,rk(a,d.X,function(){return tk(a,d.X,c)},null),0):f.u(0)})}
403
+ function qk(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L;return P(function(K){switch(K.g){case 1:m=We;if(b!=m.wa){K.u(2);break}if("HLS"!=a.L){K.u(3);break}return G(K,a.ra,4);case 4:n=K.h,a.h.s=n;case 3:return G(K,pf(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.N()[0]:null),5);case 5:return K.return();case 2:if(l||!a.o){K.u(6);break}return G(K,qk(a,m.X,c,d,e,f,g,h,k,!0),7);case 7:return G(K,qk(a,m.ka,c,d,e,f,g,
404
+ h,k,!0),8);case 8:return K.return();case 6:if(!a.g[b])return K.return();p=a.g[b].timestampOffset;r=a.C[b];a.i[b]&&(r=a.i[b].getOriginalMimeType());if(d&&(u=pk(a,b,c,d,r),v=u.timestamp,w=u.metadata,null!=v&&(null==a.O&&b==m.ka&&(a.O=v,a.oa=d.startTime,null!=a.M&&(z=0,a.oa==a.ma&&(z=a.O-a.M),a.ja.resolve(z))),null==a.M&&b==m.X&&(a.M=v,a.ma=d.startTime,null!=a.O&&(y=0,a.oa==a.ma&&(y=a.O-a.M),a.ja.resolve(y))),B=v,C=$e,!a.B&&C.includes(a.C[b])&&(B=0),E=d.startTime-B,H=Math.abs(p-E),(.001<=H||g||h)&&(!k||
405
+ 0<E||!p)&&(p=E,a.za&&(rk(a,b,function(){return sk(a,b)},null),rk(a,b,function(){return tk(a,b,p)},null))),(A=b==m.ka||!(m.ka in a.g))&&a.ra.resolve(p)),w.length))a.Y.onMetadata(w,p,d?d.endTime:null);f&&b==m.ka&&(a.h||ik(a,"application/cea-608",a.B,!1),a.H||(D=r.split(";",1)[0],a.H=new Hb(D)),d?(F=a.H.i(c),F.length&&vf(a.h,F,d.startTime,d.endTime,p)):a.H.init(c,h));if(!a.i[b]){K.u(9);break}return G(K,a.i[b].transmux(c,e,d,a.l.duration,b),10);case 10:c=K.h;case 9:c=uk(a,c,d?d.startTime:null,b,d?d.N()[0]:
406
+ null);if(!d||!a.B||b==m.wa){K.u(11);break}if(!g&&!h){K.u(11);break}J=d.startTime;if("HLS"!=a.L||a.o||b!=m.X||!a.g[m.ka]){K.u(13);break}return G(K,a.ja,14);case 14:L=K.h,.1<Math.abs(L)&&(J-=L);case 13:rk(a,b,function(){return sk(a,b)},null),rk(a,b,function(){return tk(a,b,J)},null);case 11:return G(K,rk(a,b,function(){var O=c;if("video"==b&&a.R){var M=a.R;M.g&&M.g.appendBuffer(O,"video",M.o,-p)}a.g[b].appendBuffer(O)},d?d.N()[0]:null),15);case 15:I(K)}})}
407
+ function vk(a,b){var c=nk(a,"video")||0;rf(a.h,b,c)}function wk(a){a.h&&rf(a.h,"",0)}q.remove=function(a,b,c){var d=this,e;return P(function(f){return 1==f.g?(e=We,a==e.wa?G(f,d.h.remove(b,c),0):G(f,rk(d,a,function(){return xk(d,a,b,c)},null),4)):d.o?G(f,rk(d,e.X,function(){return xk(d,e.X,b,c)},null),0):f.u(0)})};
408
+ function yk(a,b){var c;return P(function(d){return 1==d.g?(c=We,b==c.wa?a.h?G(d,a.h.remove(0,Infinity),0):d.return():G(d,rk(a,b,function(){return xk(a,b,0,a.l.duration)},null),4)):a.o?G(d,rk(a,c.X,function(){return xk(a,c.X,0,a.l.duration)},null),0):d.u(0)})}q.flush=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=We,a==c.wa?d.return():G(d,rk(b,a,function(){b.j.currentTime-=.001;kk(b,a)},null),2)):b.o?G(d,rk(b,c.X,function(){var e=c.X;b.j.currentTime-=.001;kk(b,e)},null),0):d.u(0)})};
409
+ function zk(a,b,c,d,e,f,g,h,k){var l,m,n;return P(function(p){if(1==p.g){l=We;if(b==l.wa)return f||(a.h.s=c),qf(a.h,d,e),p.return();m=[];return G(p,Ak(a,b,g,h,k),2)}n=p.h;n||(m.push(rk(a,b,function(){return sk(a,b)},null)),a.o&&m.push(rk(a,l.X,function(){return sk(a,l.X)},null)));f||(m.push(rk(a,b,function(){return tk(a,b,c)},null)),a.o&&m.push(rk(a,l.X,function(){return tk(a,l.X,c)},null)));if(0!=d||Infinity!=e)m.push(rk(a,b,function(){a.g[b].appendWindowStart=0;a.g[b].appendWindowEnd=e;a.g[b].appendWindowStart=
410
+ d;kk(a,b)},null)),a.o&&m.push(rk(a,l.X,function(){var r=l.X;a.g[r].appendWindowStart=0;a.g[r].appendWindowEnd=e;a.g[r].appendWindowStart=d;kk(a,r)},null));return m.length?G(p,Promise.all(m),0):p.u(0)})}
411
+ function Bk(a,b,c){var d,e;return P(function(f){if(1==f.g){d=We;if(b==d.wa)return f.return();b==d.ka&&(a.ra=new Yg);if(!a.B||(e=nk(a,b))&&.1>Math.abs(e-c))return f.return();rk(a,b,function(){return sk(a,b)},null);a.o&&rk(a,d.X,function(){return sk(a,d.X)},null);return G(f,rk(a,b,function(){return tk(a,b,c)},null),2)}return a.o?G(f,rk(a,d.X,function(){return tk(a,d.X,c)},null),0):f.u(0)})}
412
412
  q.endOfStream=function(a){var b=this;return P(function(c){return G(c,Ck(b,function(){gk(b)||(b.G?0:b.l?"closed"==b.l.readyState:1)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.eb=function(a){var b=this;return P(function(c){return G(c,Ck(b,function(){if(a<b.l.duration)for(var d in b.g){var e={start:function(){},p:new Yg,uri:null};b.m[d].unshift(e)}b.l.duration=a;b.da=a}),0)})};q.getDuration=function(){return this.l.duration};function xk(a,b,c,d){d<=c?kk(a,b):a.g[b].remove(c,d)}
413
413
  function sk(a,b){var c=a.g[b].appendWindowStart,d=a.g[b].appendWindowEnd;a.g[b].abort();a.g[b].appendWindowStart=c;a.g[b].appendWindowEnd=d;kk(a,b)}function tk(a,b,c){0>c&&(c+=.001);a.g[b].timestampOffset=c;kk(a,b)}function kk(a,b){if(!a.G){var c=a.m[b][0];c&&(c.p.resolve(),Dk(a,b))}}function rk(a,b,c,d){Bh(a.I);c={start:c,p:new Yg,uri:d};a.m[b].push(c);1==a.m[b].length&&Ek(a,b);return c.p}
414
414
  function Ck(a,b){var c,d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:Bh(a.I);c=[];d={};for(e in a.g)d={ready:void 0},d.ready=new Yg,f={start:function(m){return function(){return m.ready.resolve()}}(d),p:d.ready,uri:null},a.m[e].push(f),c.push(d.ready),1==a.m[e].length&&f.start();ta(l,2);return G(l,Promise.all(c),4);case 4:va(l,3);break;case 2:throw g=wa(l),g;case 3:return ta(l,5,6),G(l,b(),6);case 6:xa(l);for(h in a.g)Dk(a,h);ya(l,0);break;case 5:throw k=wa(l),new T(2,3,3015,k,a.j.error||"No error in the media element",
@@ -416,45 +416,45 @@ null);}})}function Dk(a,b){a.m[b].shift();Ek(a,b)}function Ek(a,b){var c=a.m[b][
416
416
  function Fk(a,b,c,d){return rk(a,b,function(){b!==Ue&&(nb()&&(a.i[b]&&(a.i[b].destroy(),delete a.i[b]),d&&(a.i[b]=d),a.g[b].changeType(c+a.A.addExtraFeaturesToSourceBuffer(c)),a.C[b]=c),kk(a,b))},null)}
417
417
  function Gk(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J;return P(function(L){switch(L.g){case 1:c=We;a.G=!0;a.o=!1;d=a.j.currentTime;e=a.j.autoplay;f=a.j.paused;a.Fa&&(a.j.autoplay=!1);ua(L,2);a.s.Wa();g=[];for(h in a.i)g.push(a.i[h].destroy());for(k in a.m)for(l=a.m[k],m=l[0],a.m[k]=l.slice(0,1),m&&g.push(m.p.catch(xf)),n=t(l.slice(1)),p=n.next();!p.done;p=n.next())r=p.value,r.p.reject(new T(2,7,7003,void 0));for(u in a.g){v=a.g[u];try{a.l.removeSourceBuffer(v)}catch(K){}}return G(L,
418
418
  Promise.all(g),4);case 4:return a.i={},w=a.l.duration,a.F=new Yg,a.l=ck(a,a.F),G(L,a.F,5);case 5:!isNaN(w)&&w?a.l.duration=w:!isNaN(a.da)&&a.da&&(a.l.duration=a.da),z=new Yg,y=a.l.sourceBuffers,B=b.size,C=0,E=function(){C++;C===B&&(z.resolve(),a.s.fb(y,"addsourcebuffer",E))},a.s.D(y,"addsourcebuffer",E),H=t(b.keys()),A=H.next();case 6:if(A.done)return a.j.currentTime=d,G(L,z,2);D=A.value;F=a.g[D]?{timestampOffset:a.g[D].timestampOffset,appendWindowStart:a.g[D].appendWindowStart,appendWindowEnd:a.g[D].appendWindowEnd}:
419
- null;J=b.get(D);return G(L,hk(a,D,J,J.codecs),9);case 9:a.o?(a.m[c.X]=[],a.m[c.ka]=[]):a.m[D]=[];F&&a.g[D]&&(a.g[D].timestampOffset=F.timestampOffset,a.g[D].appendWindowEnd=F.appendWindowEnd,a.g[D].appendWindowStart=F.appendWindowStart);A=H.next();L.u(6);break;case 2:xa(L),a.G=!1,Bh(a.I),a.s.ua(a.j,"canplaythrough",function(){a.I.g||(a.j.autoplay=e,f||a.j.play())}),ya(L,0)}})}function Hk(a,b){return Ck(a,function(){return Gk(a,b)})}
420
- function Ik(a,b,c,d){var e=!1,f=Se("audio",(d||"").split(",")),g=Se("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=Ze(c,h);var k=a.A.forceTransmux;if(!lb(d)||!a.B&&$e.includes(d))k=!0;if(k&&(a=af(c,h),c=je(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=ff(kf(d));return{$f:l,fj:e,mg:jf(d),codec:b,mimeType:d}}
421
- function Ak(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,z,y;return P(function(B){if(1==B.g){f=We;if(b==f.va)return B.return(!1);g=ff(kf(a.C[b]));h=jf(a.C[b]);k=Ik(a,b,c,d);l=k.$f;m=k.fj;n=k.mg;p=k.codec;r=k.mimeType;u=!0;m&&(v=Ik(a,f.X,c,d),w=ff(kf(a.C[f.X])),z=jf(a.C[f.X]),u=w==v.codec&&z==v.mg,v.$f&&v.$f.destroy());if(g===p&&h===n&&u)return a.i[b]&&!l?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&l?a.i[b]=l:l&&(a.i[b]&&a.i[b].transmux!=l.transmux?(a.i[b].destroy(),delete a.i[b],a.i[b]=l):l.destroy()),B.return(!1);
419
+ null;J=b.get(D);return G(L,hk(a,D,J,J.codecs),9);case 9:a.o?(a.m[c.X]=[],a.m[c.ka]=[]):a.m[D]=[];F&&a.g[D]&&(a.g[D].timestampOffset=F.timestampOffset,a.g[D].appendWindowEnd=F.appendWindowEnd,a.g[D].appendWindowStart=F.appendWindowStart);A=H.next();L.u(6);break;case 2:xa(L),a.G=!1,Bh(a.I),a.s.va(a.j,"canplaythrough",function(){a.I.g||(a.j.autoplay=e,f||a.j.play())}),ya(L,0)}})}function Hk(a,b){return Ck(a,function(){return Gk(a,b)})}
420
+ function Ik(a,b,c,d){var e=!1,f=Se("audio",(d||"").split(",")),g=Se("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=Ze(c,h);var k=a.A.forceTransmux;if(!lb(d)||!a.B&&$e.includes(d))k=!0;if(k&&(a=af(c,h),c=je(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=ff(kf(d));return{Yf:l,fj:e,kg:jf(d),codec:b,mimeType:d}}
421
+ function Ak(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,z,y;return P(function(B){if(1==B.g){f=We;if(b==f.wa)return B.return(!1);g=ff(kf(a.C[b]));h=jf(a.C[b]);k=Ik(a,b,c,d);l=k.Yf;m=k.fj;n=k.kg;p=k.codec;r=k.mimeType;u=!0;m&&(v=Ik(a,f.X,c,d),w=ff(kf(a.C[f.X])),z=jf(a.C[f.X]),u=w==v.codec&&z==v.kg,v.Yf&&v.Yf.destroy());if(g===p&&h===n&&u)return a.i[b]&&!l?(a.i[b].destroy(),delete a.i[b]):!a.i[b]&&l?a.i[b]=l:l&&(a.i[b]&&a.i[b].transmux!=l.transmux?(a.i[b].destroy(),delete a.i[b],a.i[b]=l):l.destroy()),B.return(!1);
422
422
  y=!0;if(a.o||m&&l&&!a.i[b])y=!1;if(y&&"smooth"===a.A.codecSwitchingStrategy&&nb())return G(B,Fk(a,b,r,l),3);l&&l.destroy();return G(B,Hk(a,e),3)}return B.return(!0)})}function Jk(a,b,c,d){if(b==Ue)var e=!1;else{e=ff(kf(a.C[b]));var f=jf(a.C[b]),g=Ze(c,d),h=a.A.forceTransmux;if(!lb(g)||!a.B&&$e.includes(g))h=!0;c=af(c,d);h&&(h=je(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=ff(kf(g));g=jf(g);e=e!==b||f!==g}return e?"smooth"!==a.A.codecSwitchingStrategy||!nb()||a.o:!1}
423
423
  var ek=window.URL.createObjectURL,jk="sequence";function Kk(a,b,c){this.i=a;this.C=b;this.o=this.l=Infinity;this.h=1;this.g=this.j=null;this.A=0;this.B=!0;this.I=!1;this.H=0;this.F=void 0===c?!0:c;this.G=0;this.s=!1;this.m=a}q=Kk.prototype;q.getDuration=function(){return this.l};q.Yh=function(){return this.h};q.hh=function(a){this.i=a};q.eb=function(a){this.l=a};q.ci=function(){return this.i};q.fh=function(a){this.A=a};q.yc=function(a){a&&!this.B&&(this.I=!0);this.B=a};q.pe=function(a){this.o=a};q.Nd=function(){return this.o};
424
- q.Rf=function(a){this.C=a};q.Qh=function(){return this.C};q.Sg=function(a,b){if(0!=a.length){var c=(Date.now()+this.A)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.ae(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.F&&!this.s&&(this.i=c-this.g-this.h)}}};
425
- q.td=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.ae(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.s&&(this.i=d-this.g-this.h)}};q.Rg=function(a,b){this.ae(a);Infinity==b||this.U()||(this.g=Math.max(this.g,b))};q.Zh=function(){return this.g};q.Vd=function(){this.s=!0};
426
- q.xi=function(){return this.s};q.gh=function(a){this.m=a};q.Vh=function(){return this.m};q.ae=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};q.zf=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.U=function(){return Infinity==this.l&&!this.B};q.tc=function(){return Infinity!=this.l&&!this.B};q.rb=function(){return Math.max(this.H,this.Zb()-this.o)};q.lh=function(a){this.H=a};
427
- q.Zb=function(){return this.U()||this.tc()?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};q.gd=function(a){var b=Math.max(this.j,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Zb()-this.o+a,this.Eb()))};q.Lb=function(){return this.gd(0)};q.Eb=function(){return Math.max(0,this.Zb()-(this.U()||this.tc()?this.C:0))};q.sh=function(){return null==this.i||null!=this.g&&this.F?!1:!0};
428
- q.eh=function(a){this.G=a};q.Oh=function(){return this.G};S("shaka.media.PresentationTimeline",Kk);Kk.prototype.getAvailabilityTimeOffset=Kk.prototype.Oh;Kk.prototype.setAvailabilityTimeOffset=Kk.prototype.eh;Kk.prototype.usingPresentationStartTime=Kk.prototype.sh;Kk.prototype.getSeekRangeEnd=Kk.prototype.Eb;Kk.prototype.getSeekRangeStart=Kk.prototype.Lb;Kk.prototype.getSafeSeekRangeStart=Kk.prototype.gd;Kk.prototype.getSegmentAvailabilityEnd=Kk.prototype.Zb;Kk.prototype.setUserSeekStart=Kk.prototype.lh;
429
- Kk.prototype.getSegmentAvailabilityStart=Kk.prototype.rb;Kk.prototype.isInProgress=Kk.prototype.tc;Kk.prototype.isLive=Kk.prototype.U;Kk.prototype.offset=Kk.prototype.offset;Kk.prototype.notifyMaxSegmentDuration=Kk.prototype.zf;Kk.prototype.notifyMinSegmentStartTime=Kk.prototype.ae;Kk.prototype.getInitialProgramDateTime=Kk.prototype.Vh;Kk.prototype.setInitialProgramDateTime=Kk.prototype.gh;Kk.prototype.isStartTimeLocked=Kk.prototype.xi;Kk.prototype.lockStartTime=Kk.prototype.Vd;
430
- Kk.prototype.getMaxSegmentEndTime=Kk.prototype.Zh;Kk.prototype.notifyPeriodDuration=Kk.prototype.Rg;Kk.prototype.notifySegments=Kk.prototype.td;Kk.prototype.notifyTimeRange=Kk.prototype.Sg;Kk.prototype.getDelay=Kk.prototype.Qh;Kk.prototype.setDelay=Kk.prototype.Rf;Kk.prototype.getSegmentAvailabilityDuration=Kk.prototype.Nd;Kk.prototype.setSegmentAvailabilityDuration=Kk.prototype.pe;Kk.prototype.setStatic=Kk.prototype.yc;Kk.prototype.setClockOffset=Kk.prototype.fh;
431
- Kk.prototype.getPresentationStartTime=Kk.prototype.ci;Kk.prototype.setDuration=Kk.prototype.eb;Kk.prototype.setPresentationStartTime=Kk.prototype.hh;Kk.prototype.getMaxSegmentDuration=Kk.prototype.Yh;Kk.prototype.getDuration=Kk.prototype.getDuration;function Lk(a,b,c){this.j=c;this.l=a;this.s=Mk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}Lk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Nk(a,b){a.i=b}function Ok(a){this.g=a}function Mk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(ej(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Pk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.m=c;this.l=new gb;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.s=!1;this.l.D(a,"waiting",function(){return Qk(f)});this.o=(new ac(function(){Qk(f)})).Oa(this.m.gapJumpTimerTime)}Pk.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.o&&(this.o.stop(),this.o=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};Pk.prototype.Cf=function(){this.s=!0;Qk(this)};
432
- function Qk(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Mk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new W("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=fj(c,b,a.m.gapDetectionThreshold),
433
- null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||fc()||hc())e=Math.ceil(100*(e+a.m.gapPadding))/100;e>=a.B.Eb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.A(new W("gapjumped")))}}}};function Rk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Sk.value().get(b),c.ua(a,b,d))}var Sk=new Ub(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Tk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new gb;this.i=new Uk(a);Rk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Vk(e,e.j())})}Tk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Wk(a){return a.o?a.g.currentTime:a.j()}
434
- function Xk(a,b){0<a.g.readyState?Yk(a.i,b):Rk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Vk(a,a.j())})}function Vk(a,b){.001>Math.abs(a.g.currentTime-b)?Zk(a):(a.h.ua(a.g,"seeking",function(){Zk(a)}),Yk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Zk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
435
- function Uk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new ac(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Uk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Yk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Oa(.1)};function $k(a){this.h=a;this.j=!1;this.g=null;this.i=new gb}q=$k.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.ua(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Rk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Ge=function(a){this.g=this.j?this.g:a};
436
- q.zd=function(){return(this.j?this.h.currentTime:this.g)||0};q.ig=function(){return 0};q.hg=function(){return 0};q.Qg=function(){};
437
- function al(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=bl(a,c,f);this.j=new Pk(a,b.presentationTimeline,c,this.o,f);this.h=new Tk(a,function(){a:{var h=g.j;h.j=!0;h.s=!1;var k=Wk(g.h);h=cl(g,k);if(.001<Math.abs(h-k)){k=!1;if(!kc()||kc()&&tc())k=!0;else{var l=Date.now()/1E3,m=kc()&&gc("Fuchsia")?3:1;if(!g.s||g.s<l-m)g.s=l,k=!0}if(k){Xk(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&
438
- !k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Lb():g.g.Eb():0>h&&(h=g.g.Eb()+h);return dl(g,el(g,h))});this.m=new ac(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Wk(g.h),k=g.g.Lb(),l=g.g.Eb();3>l-k&&(k=l-3);h<k&&(h=cl(g,h),g.i.currentTime=h)}})}q=al.prototype;q.ready=function(){this.m.Oa(.25)};
439
- q.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.A=function(){}};q.Ge=function(a){Xk(this.h,a)};q.zd=function(){var a=Wk(this.h);return 0<this.i.readyState&&!this.i.paused?el(this,a):a};q.ig=function(){return this.o?this.o.o:0};q.hg=function(){return this.j.C};q.Qg=function(){this.j.Cf()};function dl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
440
- function cl(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Lb(),f=a.g.Eb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.gd(c),k=a.g.gd(d);c=a.g.gd(c+d);return b>=g?dl(a,b):b>f?f:b<e?cj(a.i.buffered,k)?k:c:b>=h||cj(a.i.buffered,b)?b:c}function el(a,b){var c=a.g.Lb();if(b<c)return c;a=a.g.Eb();return b>a?a:b}
441
- function bl(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Lk(new Ok(a),b.stallThreshold,c);Nk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function fl(a){this.g=a;this.m=null;this.i=0;this.o=!1}q=fl.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.Di=function(){this.o=!0};q.Bb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function mg(a){return a.g[0]||null}
424
+ q.Pf=function(a){this.C=a};q.Qh=function(){return this.C};q.Rg=function(a,b){if(0!=a.length){var c=(Date.now()+this.A)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.ae(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.F&&!this.s&&(this.i=c-this.g-this.h)}}};
425
+ q.td=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.A)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.ae(b);this.g=Math.max(this.g,c);null!=this.i&&this.F&&!this.s&&(this.i=d-this.g-this.h)}};q.Qg=function(a,b){this.ae(a);Infinity==b||this.U()||(this.g=Math.max(this.g,b))};q.Zh=function(){return this.g};q.Vd=function(){this.s=!0};
426
+ q.xi=function(){return this.s};q.gh=function(a){this.m=a};q.Vh=function(){return this.m};q.ae=function(a){null==this.j?this.j=a:this.I||(this.j=Math.min(this.j,a))};q.yf=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.U=function(){return Infinity==this.l&&!this.B};q.tc=function(){return Infinity!=this.l&&!this.B};q.mb=function(){return Math.max(this.H,this.Zb()-this.o)};q.lh=function(a){this.H=a};
427
+ q.Zb=function(){return this.U()||this.tc()?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};q.gd=function(a){var b=Math.max(this.j,this.H);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Zb()-this.o+a,this.Db()))};q.Yb=function(){return this.gd(0)};q.Db=function(){return Math.max(0,this.Zb()-(this.U()||this.tc()?this.C:0))};q.sh=function(){return null==this.i||null!=this.g&&this.F?!1:!0};
428
+ q.eh=function(a){this.G=a};q.Oh=function(){return this.G};S("shaka.media.PresentationTimeline",Kk);Kk.prototype.getAvailabilityTimeOffset=Kk.prototype.Oh;Kk.prototype.setAvailabilityTimeOffset=Kk.prototype.eh;Kk.prototype.usingPresentationStartTime=Kk.prototype.sh;Kk.prototype.getSeekRangeEnd=Kk.prototype.Db;Kk.prototype.getSeekRangeStart=Kk.prototype.Yb;Kk.prototype.getSafeSeekRangeStart=Kk.prototype.gd;Kk.prototype.getSegmentAvailabilityEnd=Kk.prototype.Zb;Kk.prototype.setUserSeekStart=Kk.prototype.lh;
429
+ Kk.prototype.getSegmentAvailabilityStart=Kk.prototype.mb;Kk.prototype.isInProgress=Kk.prototype.tc;Kk.prototype.isLive=Kk.prototype.U;Kk.prototype.offset=Kk.prototype.offset;Kk.prototype.notifyMaxSegmentDuration=Kk.prototype.yf;Kk.prototype.notifyMinSegmentStartTime=Kk.prototype.ae;Kk.prototype.getInitialProgramDateTime=Kk.prototype.Vh;Kk.prototype.setInitialProgramDateTime=Kk.prototype.gh;Kk.prototype.isStartTimeLocked=Kk.prototype.xi;Kk.prototype.lockStartTime=Kk.prototype.Vd;
430
+ Kk.prototype.getMaxSegmentEndTime=Kk.prototype.Zh;Kk.prototype.notifyPeriodDuration=Kk.prototype.Qg;Kk.prototype.notifySegments=Kk.prototype.td;Kk.prototype.notifyTimeRange=Kk.prototype.Rg;Kk.prototype.getDelay=Kk.prototype.Qh;Kk.prototype.setDelay=Kk.prototype.Pf;Kk.prototype.getSegmentAvailabilityDuration=Kk.prototype.Nd;Kk.prototype.setSegmentAvailabilityDuration=Kk.prototype.pe;Kk.prototype.setStatic=Kk.prototype.yc;Kk.prototype.setClockOffset=Kk.prototype.fh;
431
+ Kk.prototype.getPresentationStartTime=Kk.prototype.ci;Kk.prototype.setDuration=Kk.prototype.eb;Kk.prototype.setPresentationStartTime=Kk.prototype.hh;Kk.prototype.getMaxSegmentDuration=Kk.prototype.Yh;Kk.prototype.getDuration=Kk.prototype.getDuration;function Lk(a,b,c){this.j=c;this.l=a;this.s=Mk(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.A=b;this.i=function(){}}Lk.prototype.release=function(){this.j=this.l=null;this.i=function(){}};function Nk(a,b){a.i=b}function Ok(a){this.g=a}function Mk(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(ej(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Pk(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.C=b;this.o=c;this.m=new gb;this.l=this.B=!1;this.G=a.readyState;this.F=this.i=0;this.h=d;this.s=!1;this.m.D(a,"waiting",function(){return Qk(f)});this.j=new ac(function(){Qk(f)})}Pk.prototype.release=function(){this.m&&(this.m.release(),this.m=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.C=this.A=null};Pk.prototype.Bf=function(){this.s=!0;Qk(this)};
432
+ function Qk(a){if(0!=a.g.readyState&&a.B){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.G&&(a.G=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.l,d=Mk(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.j(new W("stalldetected"));b=!d}if(b&&(b=a.g.currentTime,c=a.g.buffered,d=fj(c,b,a.o.gapDetectionThreshold),
433
+ null!=d&&(0!=d||a.s))){e=c.start(d);if(navigator.userAgent.match(/Edge\//)||fc()||hc())e=Math.ceil(100*(e+a.o.gapPadding))/100;e>=a.C.Db()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.F++,a.A(new W("gapjumped")))}}}};function Rk(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Sk.value().get(b),c.va(a,b,d))}var Sk=new Ub(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Tk(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new gb;this.i=new Uk(a);Rk(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Vk(e,e.j())})}Tk.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Wk(a){return a.o?a.g.currentTime:a.j()}
434
+ function Xk(a,b){0<a.g.readyState?Yk(a.i,b):Rk(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Vk(a,a.j())})}function Vk(a,b){.001>Math.abs(a.g.currentTime-b)?Zk(a):(a.h.va(a.g,"seeking",function(){Zk(a)}),Yk(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Zk(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
435
+ function Uk(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new ac(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Uk.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Yk(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.Oa(.1)};function $k(a){this.h=a;this.j=!1;this.g=null;this.i=new gb}q=$k.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.va(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Rk(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Ge=function(a){this.g=this.j?this.g:a};
436
+ q.zd=function(){return(this.j?this.h.currentTime:this.g)||0};q.gg=function(){return 0};q.fg=function(){return 0};q.Pg=function(){};
437
+ function al(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.A=e;this.s=null;this.o=bl(a,c,f);this.j=new Pk(a,b.presentationTimeline,c,this.o,f);this.h=new Tk(a,function(){a:{var h=g.j;h.l=!0;h.s=!1;Qk(h);var k=Wk(g.h);h=cl(g,k);if(.001<Math.abs(h-k)){k=!1;if(!kc()||kc()&&tc())k=!0;else{var l=Date.now()/1E3,m=kc()&&gc("Fuchsia")?3:1;if(!g.s||g.s<l-m)g.s=l,k=!0}if(k){Xk(g.h,h);h=void 0;break a}}g.A();h=void 0}return h},function(h){var k=g.j;k.B=
438
+ !0;k.g.seeking&&!k.l&&(k.l=!0,k.i=h);k.j&&k.j.Oa(k.o.gapJumpTimerTime);Qk(k)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.Yb():g.g.Db():0>h&&(h=g.g.Db()+h);return dl(g,el(g,h))});this.m=new ac(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Wk(g.h),k=g.g.Yb(),l=g.g.Db();3>l-k&&(k=l-3);h<k&&(h=cl(g,h),g.i.currentTime=h)}})}q=al.prototype;q.ready=function(){this.m.Oa(.25)};
439
+ q.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.A=function(){}};q.Ge=function(a){Xk(this.h,a)};q.zd=function(){var a=Wk(this.h);return 0<this.i.readyState&&!this.i.paused?el(this,a):a};q.gg=function(){return this.o?this.o.o:0};q.fg=function(){return this.j.F};q.Pg=function(){this.j.Bf()};function dl(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
440
+ function cl(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Yb(),f=a.g.Db(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.gd(c),k=a.g.gd(d);c=a.g.gd(c+d);return b>=g?dl(a,b):b>f?f:b<e?cj(a.i.buffered,k)?k:c:b>=h||cj(a.i.buffered,b)?b:c}function el(a,b){var c=a.g.Yb();if(b<c)return c;a=a.g.Db();return b>a?a:b}
441
+ function bl(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Lk(new Ok(a),b.stallThreshold,c);Nk(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function fl(a){this.g=a;this.m=null;this.i=0;this.o=!1}q=fl.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.Di=function(){this.o=!0};q.Ab=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function mg(a){return a.g[0]||null}
442
442
  q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.o)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
443
443
  q.Xd=function(a){if(!this.o&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,x(a))}};q.rd=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Xd(a);this.Ga(b)};q.Ga=function(a){if(!this.o){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
444
- q.Gc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Wi(a.startTime,b,a.F,a.Ha,a.ta,a.Z,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
444
+ q.Gc=function(a,b,c){c=void 0===c?!1:c;if(!this.o){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Wi(a.startTime,b,a.F,a.Ha,a.ua,a.Z,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.B,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
445
445
  q.ue=function(a,b){var c=this;this.o||(this.m&&this.m.stop(),this.m=new ac(function(){var d=b();d?c.g.push.apply(c.g,x(d)):(c.m.stop(),c.m=null)}),this.m.Oa(a))};fl.prototype[Symbol.iterator]=function(){return this.Kb(0)};
446
- fl.prototype.Kb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Xa("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new gl(this,d,f,c)};function hl(a,b,c){a=new Wi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new fl([a])}
446
+ fl.prototype.Kb=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return Ya("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new gl(this,d,f,c)};function hl(a,b,c){a=new Wi(a,a+b,function(){return c},0,null,null,a,a,a+b);return new fl([a])}
447
447
  S("shaka.media.SegmentIndex",fl);fl.forSingleSegment=hl;fl.prototype.getIteratorForTime=fl.prototype.Kb;fl.prototype.updateEvery=fl.prototype.ue;fl.prototype.fit=fl.prototype.Gc;fl.prototype.evict=fl.prototype.Ga;fl.prototype.mergeAndEvict=fl.prototype.rd;fl.prototype.offset=fl.prototype.offset;fl.prototype.get=fl.prototype.get;fl.prototype.find=fl.prototype.find;fl.prototype.markImmutable=fl.prototype.Di;fl.prototype.release=fl.prototype.release;fl.prototype.getNumEvicted=fl.prototype.getNumEvicted;
448
448
  fl.prototype.getNumReferences=fl.prototype.getNumReferences;function gl(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}q=gl.prototype;q.Xc=function(a){this.reverse=a};q.Jh=function(){return this.h};q.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.s&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
449
- q.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.s&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};q.Kf=function(){var a=this.current();if(a.o&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
450
- S("shaka.media.SegmentIterator",gl);gl.prototype.resetToLastIndependent=gl.prototype.Kf;gl.prototype.next=gl.prototype.next;gl.prototype.current=gl.prototype.current;gl.prototype.currentPosition=gl.prototype.Jh;gl.prototype.setReverse=gl.prototype.Xc;function il(){fl.call(this,[]);this.h=[]}pa(il,fl);q=il.prototype;q.clone=function(){var a=new il;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
451
- q.Bb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Bb(a)};q.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Xd=function(){};
449
+ q.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.s&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};q.Jf=function(){var a=this.current();if(a.o&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
450
+ S("shaka.media.SegmentIterator",gl);gl.prototype.resetToLastIndependent=gl.prototype.Jf;gl.prototype.next=gl.prototype.next;gl.prototype.current=gl.prototype.current;gl.prototype.currentPosition=gl.prototype.Jh;gl.prototype.setReverse=gl.prototype.Xc;function il(){fl.call(this,[]);this.h=[]}pa(il,fl);q=il.prototype;q.clone=function(){var a=new il;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
451
+ q.Ab=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ab(a)};q.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.Xd=function(){};
452
452
  q.Ga=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Ga(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};q.rd=function(){};q.Gc=function(){};q.ue=function(){};S("shaka.media.MetaSegmentIndex",il);il.prototype.updateEvery=il.prototype.ue;il.prototype.fit=il.prototype.Gc;il.prototype.mergeAndEvict=il.prototype.rd;il.prototype.evict=il.prototype.Ga;il.prototype.merge=il.prototype.Xd;il.prototype.offset=il.prototype.offset;
453
- il.prototype.get=il.prototype.get;il.prototype.find=il.prototype.find;il.prototype.forEachTopLevelReference=il.prototype.Bb;il.prototype.release=il.prototype.release;function jl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Md();this.h=new ac(function(){b.g.Pg(.25*b.i)})}jl.prototype.release=function(){this.set(this.pc());this.h&&(this.h.stop(),this.h=null);this.g=null};jl.prototype.set=function(a){this.i=a;kl(this)};jl.prototype.pc=function(){return this.g.pc()};function kl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Md()!=b&&a.g.Uf(b);return}catch(c){}a.h.Oa(.25);0!=a.g.Md()&&a.g.Uf(0)};function ll(a){var b=this;this.h=a;this.g=new Set;this.i=(new ac(function(){ml(b,!1)})).Oa(.25)}ll.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function ml(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function nl(){this.g=null;this.h=[]}function ol(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function pl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ql(){this.i=this.h=null;this.g=[]}function rl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function sl(){this.lc=this.Lg=this.s=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.R=this.Y=this.L=this.M=this.O=this.l=this.m=NaN;this.K=0;this.F=this.G=NaN;this.g=new nl;this.h=new ql};function tl(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function ul(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
454
- function vl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Kb(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.isPreload()&&null!=b.ta&&(c=!1);2==b.ac()&&(c=!1);b.Mb()&&(c=!1);c&&b.Z&&wl(a,b.Z);c&&!a.h.has(b)&&(c=new xl(a.l),yl(c,b,a.i),a.h.set(b,c))}zl(a)}}function wl(a,b){if(a.i.segmentIndex&&!b.Mb()&&!Array.from(a.j.keys()).some(function(d){return Vi(d,b)})){var c=new xl(a.l);yl(c,b,a.i);a.j.set(b,c)}}
453
+ il.prototype.get=il.prototype.get;il.prototype.find=il.prototype.find;il.prototype.forEachTopLevelReference=il.prototype.Ab;il.prototype.release=il.prototype.release;function jl(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Md();this.h=new ac(function(){b.g.Og(.25*b.i)})}jl.prototype.release=function(){this.set(this.pc());this.h&&(this.h.stop(),this.h=null);this.g=null};jl.prototype.set=function(a){this.i=a;kl(this)};jl.prototype.pc=function(){return this.g.pc()};function kl(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Md()!=b&&a.g.Sf(b);return}catch(c){}a.h.Oa(.25);0!=a.g.Md()&&a.g.Sf(0)};function ll(a){var b=this;this.h=a;this.g=new Set;this.i=(new ac(function(){ml(b,!1)})).Oa(.25)}ll.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function ml(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function nl(){this.g=null;this.h=[]}function ol(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function pl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ql(){this.i=this.h=null;this.g=[]}function rl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function sl(){this.lc=this.Kg=this.s=this.A=this.I=this.B=this.o=this.j=this.H=this.C=this.i=this.R=this.Y=this.L=this.M=this.O=this.l=this.m=NaN;this.K=0;this.F=this.G=NaN;this.g=new nl;this.h=new ql};function tl(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.o=d}function ul(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
454
+ function vl(a,b,c){c=void 0===c?!1:c;if(a.i.segmentIndex&&(a.g||(a.g=a.i.segmentIndex.Kb(b,!0,a.o)),a.g)){for(c&&a.g.next();a.h.size<a.m;){b=a.g.next().value;if(!b)break;c=!0;b.isPreload()&&null!=b.ua&&(c=!1);2==b.ac()&&(c=!1);b.Lb()&&(c=!1);c&&b.Z&&wl(a,b.Z);c&&!a.h.has(b)&&(c=new xl(a.l),yl(c,b,a.i),a.h.set(b,c))}zl(a)}}function wl(a,b){if(a.i.segmentIndex&&!b.Lb()&&!Array.from(a.j.keys()).some(function(d){return Vi(d,b)})){var c=new xl(a.l);yl(c,b,a.i);a.j.set(b,c)}}
455
455
  function Al(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Bl(a,c)}function Cl(a){Al(a,a.h);Al(a,a.j);a.g=null}tl.prototype.Ga=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Bl(this,d);b&&zl(this)};tl.prototype.Xc=function(a){this.o=a;this.g&&this.g.Xc(a)};
456
- function zl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={pf:void 0},d=c.next())e.pf=d.value,b.some(function(f){return function(g){return Vi(g.Z,f.pf)}}(e))||Bl(a,e.pf)}function Dl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Bl(a,d)}zl(a)}function El(a,b){b&&b!==a.i&&(Cl(a),a.i=b)}function Bl(a,b){var c=a.h;b instanceof Ui&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function xl(a){this.g=a;this.ee=this.Wf=null}
457
- function yl(a,b,c){var d=new Uint8Array(0);a.ee=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0<d.byteLength?d=Ne(d,e):d=e,a.Wf?G(f,a.Wf(d),3):f.u(0);d=new Uint8Array(0);I(f)})})}xl.prototype.abort=function(){this.ee&&this.ee.abort()};function Fl(a){kh.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new ac(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new W("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Oa(2)}pa(Fl,kh);Fl.prototype.release=function(){this.g.clear();this.h.stop();kh.prototype.release.call(this)};function Gl(a){kh.call(this);this.g=new Map;this.h=a}pa(Gl,kh);Gl.prototype.release=function(){this.g.clear();kh.prototype.release.call(this)};function Hl(a,b){var c=a.g.get(b);c||(c={vd:[],Qe:null,contentType:b},a.g.set(b,c));return c}function Il(a,b,c){var d=Hl(a,b.contentType);Jl(a,d);a={Oc:b,position:c};d=d.vd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
456
+ function zl(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={pf:void 0},d=c.next())e.pf=d.value,b.some(function(f){return function(g){return Vi(g.Z,f.pf)}}(e))||Bl(a,e.pf)}function Dl(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Bl(a,d)}zl(a)}function El(a,b){b&&b!==a.i&&(Cl(a),a.i=b)}function Bl(a,b){var c=a.h;b instanceof Ui&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}function xl(a){this.g=a;this.ee=this.Uf=null}
457
+ function yl(a,b,c){var d=new Uint8Array(0);a.ee=a.g(b,c,function(e){return P(function(f){if(1==f.g)return 0<d.byteLength?d=Ne(d,e):d=e,a.Uf?G(f,a.Uf(d),3):f.u(0);d=new Uint8Array(0);I(f)})})}xl.prototype.abort=function(){this.ee&&this.ee.abort()};function Fl(a){kh.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new ac(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new W("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Oa(2)}pa(Fl,kh);Fl.prototype.release=function(){this.g.clear();this.h.stop();kh.prototype.release.call(this)};function Gl(a){kh.call(this);this.g=new Map;this.h=a}pa(Gl,kh);Gl.prototype.release=function(){this.g.clear();kh.prototype.release.call(this)};function Hl(a,b){var c=a.g.get(b);c||(c={vd:[],Qe:null,contentType:b},a.g.set(b,c));return c}function Il(a,b,c){var d=Hl(a,b.contentType);Jl(a,d);a={Oc:b,position:c};d=d.vd;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
458
458
  Gl.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.Qe;a:{var e=c.vd;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.Oc;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
459
459
  g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!Sb(d.roles,e.roles);(g||h||d)&&Kl(this,a,e.contentType)&&(c.Qe=e,d=new W("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&Kl(this,a,e.contentType)&&(c.Qe=e,JSON.stringify(e),c=new W("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
460
460
  function Kl(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function Jl(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.vd;b.vd=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.vd=[]}
@@ -471,61 +471,61 @@ Q[7]=vj(M),Q[8]=vj(N),Q[9]=String(R),J=Q.join("."))}L.seek(K)}return J});var D=t
471
471
  yd:v,colorGamut:w,frameRate:null}}function Ol(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=hf(d);b.has(e)||(c.push(d),b.add(e))}b=Ve("audio",c);d=Ve("video",c);a=Ve(Ue,c);d=Pl(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
472
472
  function Pl(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?lb('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
473
473
  function Ql(a){var b=null;(new Jh).box("moov",Oh).box("trak",Oh).box("mdia",Oh).box("minf",Oh).box("stbl",Oh).S("stsd",Qh).box("encv",Rh).box("enca",Sh).box("sinf",Oh).box("schi",Oh).S("tenc",function(c){c=c.reader;c.T();c.T();c.T();c.T();b=Me(c.wb(16))}).parse(a,!0);return b}
474
- function Rl(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):G(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=xb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Sl(a,b,c,d,e){a=sh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Tl(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.G=new Map;this.B=1;this.s=this.j=null;this.K=0;this.H=!1;this.i=new Map;this.F=!1;this.L=null;this.A=!1;this.m=new Ah(function(){return Ul(c)});this.M=Date.now()/1E3;this.o=new Map;this.I={projection:null,hfov:null};this.R=0;this.O=Infinity;this.C=null}q=Tl.prototype;q.destroy=function(){return this.m.destroy()};
474
+ function Rl(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g)return d=b,d.cryptoKey?k.u(2):G(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=yb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Sl(a,b,c,d,e){a=sh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Tl(a,b){var c=this;this.g=b;this.l=a;this.h=null;this.G=new Map;this.B=1;this.s=this.j=null;this.K=0;this.H=!1;this.i=new Map;this.F=!1;this.L=null;this.A=!1;this.m=new Ah(function(){return Ul(c)});this.M=Date.now()/1E3;this.o=new Map;this.I={projection:null,hfov:null};this.R=0;this.O=Infinity;this.C=null}q=Tl.prototype;q.destroy=function(){return this.m.destroy()};
475
475
  function Ul(a){var b,c,d,e,f,g,h;return P(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Vl(e),b.push(Wl(e)),e.V&&(Cl(e.V),e.V=null);f=t(a.o.values());for(g=f.next();!g.done;g=f.next())h=g.value,Cl(h);return G(k,Promise.all(b),2)}a.i.clear();a.o.clear();a.g=null;a.l=null;a.h=null;I(k)})}
476
476
  q.configure=function(a){this.h=a;this.L=new Vg({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.V&&(Cl(b.V),b.V=null);b=t(this.o.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Cl(this.o.get(c)),this.o.delete(c)}a.disableTextPrefetch&&(b=this.i.get(Ue))&&
477
477
  b.V&&(Cl(b.V),b.V=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.V&&(Cl(b.V),b.V=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.V?(Dl(c.V,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(Cl(c.V),c.V=null)):0<a.segmentPrefetchLimit&&(c.V=Xl(this,c.stream));a.disableAudioPrefetch||Yl(this)};function Zl(a,b,c){a.l.presentationTimeline.U()||(a.R=b,a.O=c)}
478
- q.start=function(a){var b=this;return P(function(c){if(1==c.g)return G(c,$l(b,a||new Map),2);Bh(b.m);b.F=!0;I(c)})};function am(a,b){var c,d,e,f,g,h,k;P(function(l){switch(l.g){case 1:return c=We,a.K++,d=a.K,ta(l,2),G(l,yk(a.g.ba,c.va),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=Ze(b.mimeType,b.codecs),ik(a.g.ba,f,a.l.sequenceMode,b.external),g=a.g.ba.aa,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.K==d&&(k=bm(a,b),a.i.set(c.va,k),cm(a,k,0)),I(l)}})}
478
+ q.start=function(a){var b=this;return P(function(c){if(1==c.g)return G(c,$l(b,a||new Map),2);Bh(b.m);b.F=!0;I(c)})};function am(a,b){var c,d,e,f,g,h,k;P(function(l){switch(l.g){case 1:return c=We,a.K++,d=a.K,ta(l,2),G(l,yk(a.g.ba,c.wa),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=Ze(b.mimeType,b.codecs),ik(a.g.ba,f,a.l.sequenceMode,b.external),g=a.g.ba.aa,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.K==d&&(k=bm(a,b),a.i.set(c.wa,k),cm(a,k,0)),I(l)}})}
479
479
  function dm(a){var b=a.i.get(Ue);b&&(Vl(b),Wl(b).catch(function(){}),a.C=a.i.get(Ue),a.i.delete(Ue));a.s=null}function em(a,b){for(var c=0>a.g.lb(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.ha&&e.ha.Xc(c),e.V&&e.V.Xc(c);d=t(a.o.values());for(e=d.next();!e.done;e=d.next())e.value.Xc(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.ec&&(fm(a,b,!1,0,!1),c.ec=d);else if(b=c.ec)c.ec=null,fm(a,b,!0,0,!1)}
480
480
  function gm(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.F&&(b.video&&fm(a,b.video,c,d,e,f),b.audio&&fm(a,b.audio,c,d,e,f))}function hm(a,b){P(function(c){if(1==c.g)return a.C=null,a.s=b,a.F?b.segmentIndex?c.u(2):G(c,b.createSegmentIndex(),2):c.return();fm(a,b,!0,0,!1);I(c)})}function im(a,b){for(var c=t(a.G.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.G.delete(d))}}
481
- function fm(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ue?g&&(g.ec&&(b.trickModeVideo?(g.ec=b,b=b.trickModeVideo):g.ec=null),g.stream!=b||e)&&(a.o.has(b)?g.V=a.o.get(b):g.V&&El(g.V,b),b.type==Ue&&(e=Ze(b.mimeType,b.codecs),ik(a.g.ba,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ma?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.ha=null,g.jg=!!f,c?g.$c?g.Ce=!0:g.Ma?(g.kc=!0,g.Hd=
481
+ function fm(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ue?g&&(g.ec&&(b.trickModeVideo?(g.ec=b,b=b.trickModeVideo):g.ec=null),g.stream!=b||e)&&(a.o.has(b)?g.V=a.o.get(b):g.V&&El(g.V,b),b.type==Ue&&(e=Ze(b.mimeType,b.codecs),ik(a.g.ba,e,a.l.sequenceMode,b.external)),!a.o.has(g.stream)&&g.stream.closeSegmentIndex&&(g.Ma?(e="("+g.type+":"+g.stream.id+")",a.G.has(e)||a.G.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),g.stream=b,g.ha=null,g.hg=!!f,c?g.$c?g.Ce=!0:g.Ma?(g.kc=!0,g.Hd=
482
482
  d,g.Ce=!0):(Vl(g),jm(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.Ma||g.yb||cm(a,g,0),km(a,g).catch(function(h){if(a.g)a.g.onError(h)})):am(a,b)}
483
- function km(a,b){var c,d;return P(function(e){if(1==e.g){if(!b.nb)return e.return();c=b.stream;d=b.nb;return c.segmentIndex?e.u(2):G(e,c.createSegmentIndex(),2)}if(b.nb!=d||b.stream!=c)return e.return();var f=a.g.fd();var g=nk(a.g.ba,b.type),h=b.stream.segmentIndex.find(b.Ta?b.Ta.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ta?k.ta-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.Z)&&(h+=(k.ta?k.ta-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
484
- f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.nb.h.g>h?!0:!1):f=!1;f&&b.nb.abort();I(e)})}
485
- q.Vc=function(){if(this.g)for(var a=this.g.fd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ba;d==Ue?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=mk(e,d),e=cj(e,a));if(!e){c.V&&(c.V.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.ha=null;(null!=nk(this.g.ba,d)||c.Ma)&&lm(this,c);c.nb&&(c.nb.abort(),c.nb=null);d===Ue&&(d=this.g.ba,d.H&&d.H.g());c.Vc=!0}}};
483
+ function km(a,b){var c,d;return P(function(e){if(1==e.g){if(!b.ob)return e.return();c=b.stream;d=b.ob;return c.segmentIndex?e.u(2):G(e,c.createSegmentIndex(),2)}if(b.ob!=d||b.stream!=c)return e.return();var f=a.g.fd();var g=nk(a.g.ba,b.type),h=b.stream.segmentIndex.find(b.Ta?b.Ta.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ua?k.ua-k.Ha:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.Z)&&(h+=(k.ua?k.ua-k.Ha:null)||0),k=a.g.getBandwidthEstimate(),
484
+ f=8*h/k<(g||0)-f-Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal)||b.ob.h.g>h?!0:!1):f=!1;f&&b.ob.abort();I(e)})}
485
+ q.Vc=function(){if(this.g)for(var a=this.g.fd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ba;d==Ue?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=mk(e,d),e=cj(e,a));if(!e){c.V&&(c.V.g=null);if("audio"===c.type){e=t(this.o.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.ha=null;(null!=nk(this.g.ba,d)||c.Ma)&&lm(this,c);c.ob&&(c.ob.abort(),c.ob=null);d===Ue&&(d=this.g.ba,d.H&&d.H.g());c.Vc=!0}}};
486
486
  function lm(a,b){b.$c||b.kc||(b.Ma?(b.kc=!0,b.Hd=0):null==lk(a.g.ba,b.type)?null==b.yb&&cm(a,b,0):(Vl(b),jm(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
487
- function $l(a,b){var c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g){c=We;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.X,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ka,a.j.video),e.add(a.j.video));a.s&&(d.set(c.va,a.s),e.add(a.s));f=a.g.ba;return G(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Bh(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=bm(a,l),b.has(l.id)&&(n=
488
- b.get(l.id),ul(n,function(r,u,v){return mm(r,u,v||null,a.h.retryParameters,a.g.Pb)}),m.V=n),a.i.set(k,m),cm(a,m,0));I(p)})}function bm(a,b){return{stream:b,type:b.type,ha:null,V:Xl(a,b),Ta:null,Mc:null,Ud:null,Td:null,Sd:null,ec:null,endOfStream:!1,Ma:!1,yb:null,kc:!1,Hd:0,Ce:!1,$c:!1,Vc:!0,If:!1,jd:!1,nb:null}}
489
- function Xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ue&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ue&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.V)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new tl(a.h.segmentPrefetchLimit,b,function(d,e,f){return mm(d,e,f||null,a.h.retryParameters,a.g.Pb)},0>a.g.lb()):null}
490
- function Yl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={qb:void 0},e=d.next())if(f.qb=e.value,f.qb.audio)if(a.o.has(f.qb.audio)){if(e=a.o.get(f.qb.audio),Dl(e,b),!(0<b&&c.some(function(h){return function(k){return Bf(h.qb.audio.language,k)}}(f)))){var g=a.i.get(f.qb.audio.type);e!==(g&&g.V)&&Cl(e);a.o.delete(f.qb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Bf(h.qb.audio.language,k)}}(f))||!(e=Xl(a,f.qb.audio))||
491
- (f.qb.audio.segmentIndex||f.qb.audio.createSegmentIndex(),a.o.set(f.qb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.ba.eb(a):this.g.ba.eb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
487
+ function $l(a,b){var c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g){c=We;if(!a.j)throw new T(2,5,5006);d=new Map;e=new Set;a.j.audio&&(d.set(c.X,a.j.audio),e.add(a.j.audio));a.j.video&&(d.set(c.ka,a.j.video),e.add(a.j.video));a.s&&(d.set(c.wa,a.s),e.add(a.s));f=a.g.ba;return G(p,f.init(d,a.l.sequenceMode,a.l.type,a.l.ignoreManifestTimestampsInSegmentsMode),2)}Bh(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=bm(a,l),b.has(l.id)&&(n=
488
+ b.get(l.id),ul(n,function(r,u,v){return mm(r,u,v||null,a.h.retryParameters,a.g.Ob)}),m.V=n),a.i.set(k,m),cm(a,m,0));I(p)})}function bm(a,b){return{stream:b,type:b.type,ha:null,V:Xl(a,b),Ta:null,Mc:null,Ud:null,Td:null,Sd:null,ec:null,endOfStream:!1,Ma:!1,yb:null,kc:!1,Hd:0,Ce:!1,$c:!1,Vc:!0,Hf:!1,jd:!1,ob:null}}
489
+ function Xl(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===Ue&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===Ue&&a.h.disableTextPrefetch)return null;if(a.o.has(b))return a.o.get(b);var c=a.i.get(b.type);return(c=c&&c.V)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new tl(a.h.segmentPrefetchLimit,b,function(d,e,f){return mm(d,e,f||null,a.h.retryParameters,a.g.Ob)},0>a.g.lb()):null}
490
+ function Yl(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.l.variants),e=d.next(),f={};!e.done;f={rb:void 0},e=d.next())if(f.rb=e.value,f.rb.audio)if(a.o.has(f.rb.audio)){if(e=a.o.get(f.rb.audio),Dl(e,b),!(0<b&&c.some(function(h){return function(k){return Bf(h.rb.audio.language,k)}}(f)))){var g=a.i.get(f.rb.audio.type);e!==(g&&g.V)&&Cl(e);a.o.delete(f.rb.audio)}}else 0>=b||!c.some(function(h){return function(k){return Bf(h.rb.audio.language,k)}}(f))||!(e=Xl(a,f.rb.audio))||
491
+ (f.rb.audio.segmentIndex||f.rb.audio.createSegmentIndex(),a.o.set(f.rb.audio,e))}q.updateDuration=function(){var a=this.l.presentationTimeline.getDuration();Infinity>a?this.g.ba.eb(a):this.g.ba.eb(this.h.infiniteLiveStreamDuration?Infinity:Math.pow(2,32))};
492
492
  function nm(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:Bh(a.m);if(b.Ma||null==b.yb||b.$c)return k.return();b.yb=null;if(!b.kc){k.u(2);break}return G(k,jm(a,b,b.Ce,b.Hd),3);case 3:return k.return();case 2:im(a,b);if(b.stream.segmentIndex){k.u(4);break}c=b.stream;ta(k,5);return G(k,b.stream.createSegmentIndex(),7);case 7:va(k,6);break;case 5:return d=wa(k),G(k,om(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ma||b.yb||
493
493
  cm(a,b,0),k.return();case 4:ta(k,9);e=pm(a,b);null!=e&&(cm(a,b,e),b.jd=!1);va(k,10);break;case 9:return f=wa(k),G(k,om(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.F||!g.every(function(l){return l.endOfStream})){k.u(0);break}return G(k,a.g.ba.endOfStream(),13);case 13:Bh(a.m),h=a.g.ba.getDuration(),0!=h&&h<a.l.presentationTimeline.getDuration()&&a.l.presentationTimeline.eb(h),I(k)}})}
494
494
  function pm(a,b){if(qm(b))return vk(a.g.ba,b.stream.originalId||""),null;b.type==Ue&&wk(a.g.ba);if(!a.g.ba.ea&&b.type!=Ue)return a.h.updateIntervalSeconds/2;var c=a.g.fd();if("audio"===b.type)for(var d=t(a.o.keys()),e=d.next();!e.done;e=d.next())e=a.o.get(e.value),e.Ga(c,!0),vl(e,c);d=b.Ta?b.Ta.endTime:c;var f=ok(a.g.ba,b.type,c),g=Math.max(1,Math.max(a.l.minBufferTime||0,a.h.rebufferingGoal,a.h.bufferingGoal)*a.B),h=a.l.presentationTimeline.getDuration()-d;e=nk(a.g.ba,b.type);if(1E-6>h&&e)return b.endOfStream=
495
- !0,"video"==b.type&&(a=a.i.get(Ue))&&qm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ha;e=rm(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.jg&&(f=!0,b.jg=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,qm(k)||k.ha&&!k.ha.current()||(g=Math.min(g,k.Ta?k.Ta.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.V&&b.ha&&!a.o.has(b.stream)&&(b.V.Ga(e.startTime),vl(b.V,
495
+ !0,"video"==b.type&&(a=a.i.get(Ue))&&qm(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(f>=g)return a.h.updateIntervalSeconds/2;g=!b.ha;e=rm(a,b,c,e);if(!e)return a.h.updateIntervalSeconds;f=!1;g&&b.hg&&(f=!0,b.hg=!1);g=Infinity;h=Array.from(a.i.values());h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,qm(k)||k.ha&&!k.ha.current()||(g=Math.min(g,k.Ta?k.Ta.endTime:c));if(d>=g+a.l.presentationTimeline.h)return a.h.updateIntervalSeconds;b.V&&b.ha&&!a.o.has(b.stream)&&(b.V.Ga(e.startTime),vl(b.V,
496
496
  e.startTime));sm(a,b,c,e,f).catch(function(){});return null}
497
497
  function rm(a,b,c,d){if(b.ha)return b.ha.current();if(b.Ta||d)return c=b.Ta?b.Ta.endTime:d,a=0>a.g.lb(),b.stream.segmentIndex&&(b.ha=b.stream.segmentIndex.Kb(c,!1,a)),b.ha&&b.ha.next().value;d=a.l.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.lb();var f=null;d&&(b.stream.segmentIndex&&(b.ha=b.stream.segmentIndex.Kb(e,!1,a)),f=b.ha&&b.ha.next().value);f||(b.stream.segmentIndex&&(b.ha=b.stream.segmentIndex.Kb(c,!1,a)),f=b.ha&&b.ha.next().value);return f}
498
498
  function sm(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E;return P(function(H){switch(H.g){case 1:f=We;g=b.stream;h=b.ha;b.Ma=!0;ta(H,2);if(2==d.ac())throw new T(1,1,1011);return G(H,tm(a,b,d,e),4);case 4:Bh(a.m);if(a.A)return H.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.l.isLowLatency)&&l&&k&&("HLS"!=a.l.type||d.m))return r=new Uint8Array(0),v=u=!1,z=function(A){var D,F,J,L;return P(function(K){switch(K.g){case 1:if(u)return K.return();
499
499
  v=!0;Bh(a.m);if(a.A)return K.return();ta(K,2);r=um(r,A);D=!1;F=0;(new Jh).box("mdat",function(O){F=O.size+O.start;D=!0}).parse(r,!1,!0);if(!D){K.u(4);break}J=r.subarray(0,F);r=r.subarray(F);return G(K,vm(a,b,c,g,d,J,!0,e),5);case 5:b.V&&b.ha&&vl(b.V,d.startTime,!0);case 4:va(K,0);break;case 2:w=L=wa(K),I(K)}})},G(H,wm(a,b,d,z),9);n=wm(a,b,d);return G(H,n,7);case 7:p=H.h;Bh(a.m);if(a.A)return H.return();Bh(a.m);return b.kc?(b.Ma=!1,cm(a,b,0),H.return()):G(H,vm(a,b,c,g,d,p,!1,e),6);case 9:y=H.h;if(w)throw w;
500
- if(v){H.u(10);break}u=!0;Bh(a.m);return a.A?H.return():b.kc?(b.Ma=!1,cm(a,b,0),H.return()):G(H,vm(a,b,c,g,d,y,!1,e),10);case 10:b.V&&b.ha&&vl(b.V,d.startTime,!0);case 6:Bh(a.m);if(a.A)return H.return();b.Ta=d;h.next();b.Ma=!1;b.If=!1;B=a.g.ba.Cb();C=B[b.type];cb(JSON.stringify(C));b.kc||a.g.Cf(d,b.stream);cm(a,b,0);va(H,0);break;case 2:E=wa(H);Bh(a.m,E);if(a.A)return H.return();b.Ma=!1;if(7001==E.code)b.Ma=!1,Vl(b),cm(a,b,0),H.u(0);else if(b.type==f.va&&a.h.ignoreTextStreamFailures)a.i.delete(f.va),
500
+ if(v){H.u(10);break}u=!0;Bh(a.m);return a.A?H.return():b.kc?(b.Ma=!1,cm(a,b,0),H.return()):G(H,vm(a,b,c,g,d,y,!1,e),10);case 10:b.V&&b.ha&&vl(b.V,d.startTime,!0);case 6:Bh(a.m);if(a.A)return H.return();b.Ta=d;h.next();b.Ma=!1;b.Hf=!1;B=a.g.ba.Bb();C=B[b.type];cb(JSON.stringify(C));b.kc||a.g.Bf(d,b.stream);cm(a,b,0);va(H,0);break;case 2:E=wa(H);Bh(a.m,E);if(a.A)return H.return();b.Ma=!1;if(7001==E.code)b.Ma=!1,Vl(b),cm(a,b,0),H.u(0);else if(b.type==f.wa&&a.h.ignoreTextStreamFailures)a.i.delete(f.wa),
501
501
  H.u(0);else{if(3017==E.code)return G(H,xm(a,b,E),0);b.jd=!0;1==E.category&&b.V&&Bl(b.V,d);E.severity=2;return G(H,om(a,b,E),0)}}})}function um(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
502
- function xm(a,b,c){var d,e,f,g,h,k;return P(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.If}))return l.u(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.B);if(20<h)a.B-=.2;else if(4<h)a.B-=.04;else return b.jd=!0,a.A=!0,a.g.onError(c),l.return();b.If=!0;k=a.g.fd();return G(l,ym(a,b,k),2)}cm(a,b,4);I(l)})}
503
- function tm(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B;return P(function(C){switch(C.g){case 1:e=We;f=null==b.Ta;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.R)-.1);k=Math.min(c.appendWindowEnd,a.O)+.01;l=c.codecs||b.stream.codecs;m=hf(l);n=jf(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Ud&&h==b.Td&&k==b.Sd&&m==b.vf&&n==b.wf){C.u(2);break}r=b.vf&&b.wf&&Jk(a.g.ba,b.type,n,l);if(!r){C.u(3);break}u=null;b.type===e.ka?u=a.i.get(e.X):b.type===e.X&&(u=a.i.get(e.ka));if(!u){C.u(3);break}return G(C,
502
+ function xm(a,b,c){var d,e,f,g,h,k;return P(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.Hf}))return l.u(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();h=Math.round(100*a.B);if(20<h)a.B-=.2;else if(4<h)a.B-=.04;else return b.jd=!0,a.A=!0,a.g.onError(c),l.return();b.Hf=!0;k=a.g.fd();return G(l,ym(a,b,k),2)}cm(a,b,4);I(l)})}
503
+ function tm(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B;return P(function(C){switch(C.g){case 1:e=We;f=null==b.Ta;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.R)-.1);k=Math.min(c.appendWindowEnd,a.O)+.01;l=c.codecs||b.stream.codecs;m=hf(l);n=jf(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.Ud&&h==b.Td&&k==b.Sd&&m==b.uf&&n==b.vf){C.u(2);break}r=b.uf&&b.vf&&Jk(a.g.ba,b.type,n,l);if(!r){C.u(3);break}u=null;b.type===e.ka?u=a.i.get(e.X):b.type===e.X&&(u=a.i.get(e.ka));if(!u){C.u(3);break}return G(C,
504
504
  Wl(u).catch(function(){}),5);case 5:u.Mc=null,lm(a,u);case 3:return G(C,zm(a,b,p,h,k,c,m,n),2);case 2:return Vi(c.Z,b.Mc)||(b.Mc=c.Z,c.l&&c.Z&&(v=wm(a,b,c.Z),w=function(){var E,H,A,D,F,J,L;return P(function(K){switch(K.g){case 1:return ta(K,2),G(K,v,4);case 4:return E=K.h,Bh(a.m),H=null,A=new Map,D={projection:null,hfov:null},F=new Jh,F.box("moov",Oh).box("trak",Oh).box("mdia",Oh).S("mdhd",function(O){H=pj(O.reader,O.version).timescale}).box("hdlr",function(O){O=O.reader;O.skip(8);switch(O.vc()){case "soun":A.set(e.X,
505
505
  H);break;case "vide":A.set(e.ka,H)}H=null}).box("minf",Oh).box("stbl",Oh).S("stsd",Qh).box("encv",Rh).box("avc1",Rh).box("avc3",Rh).box("hev1",Rh).box("hvc1",Rh).box("dvav",Rh).box("dva1",Rh).box("dvh1",Rh).box("dvhe",Rh).box("dvc1",Rh).box("dvi1",Rh).box("vexu",Oh).box("proj",Oh).S("prji",function(O){O=O.reader.vc();D.projection=O}).box("hfov",function(O){O=O.reader.P()/1E3;D.hfov=O}).parse(E),Am(a,D),A.has(b.type)?c.Z.timescale=A.get(b.type):null!=H&&(c.Z.timescale=H),J=b.stream.closedCaptions&&
506
- 0<b.stream.closedCaptions.size,G(K,a.g.ng(b.type,E),5);case 5:return G(K,qk(a.g.ba,b.type,E,null,b.stream,J,b.Vc,d),6);case 6:va(K,0);break;case 2:throw L=wa(K),b.Mc=null,L;}})},z=c.startTime,f&&(y=nk(a.g.ba,b.type),null!=y&&(z=y)),a.g.Gi(z,c.Z),g.push(w()))),B=b.Ta?b.Ta.i:null,c.i!=B&&g.push(Bk(a.g.ba,b.type,c.startTime)),G(C,Promise.all(g),0)}})}
507
- function zm(a,b,c,d,e,f,g,h){var k,l,m,n;return P(function(p){if(1==p.g)return k=We,l=new Map,a.j.audio&&l.set(k.X,a.j.audio),a.j.video&&l.set(k.ka,a.j.video),ta(p,2),b.Td=d,b.Sd=e,g&&(b.vf=g),h&&(b.wf=h),b.Ud=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(p,zk(a.g.ba,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return va(p,0);n=wa(p);b.Td=null;b.Sd=null;b.vf=null;b.wf=null;b.Ud=null;throw n;})}
506
+ 0<b.stream.closedCaptions.size,G(K,a.g.lg(b.type,E),5);case 5:return G(K,qk(a.g.ba,b.type,E,null,b.stream,J,b.Vc,d),6);case 6:va(K,0);break;case 2:throw L=wa(K),b.Mc=null,L;}})},z=c.startTime,f&&(y=nk(a.g.ba,b.type),null!=y&&(z=y)),a.g.Gi(z,c.Z),g.push(w()))),B=b.Ta?b.Ta.i:null,c.i!=B&&g.push(Bk(a.g.ba,b.type,c.startTime)),G(C,Promise.all(g),0)}})}
507
+ function zm(a,b,c,d,e,f,g,h){var k,l,m,n;return P(function(p){if(1==p.g)return k=We,l=new Map,a.j.audio&&l.set(k.X,a.j.audio),a.j.video&&l.set(k.ka,a.j.video),ta(p,2),b.Td=d,b.Sd=e,g&&(b.uf=g),h&&(b.vf=h),b.Ud=c,m=a.l.sequenceMode||"HLS"==a.l.type,G(p,zk(a.g.ba,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return va(p,0);n=wa(p);b.Td=null;b.Sd=null;b.uf=null;b.vf=null;b.Ud=null;throw n;})}
508
508
  function vm(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r,u,v;return P(function(w){switch(w.g){case 1:k=d.closedCaptions&&0<d.closedCaptions.size;m=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.h.dispatchAllEmsgBoxes;n=a.h.parsePrftBox&&!a.H;p="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType;r=null;e.Z&&(r=e.Z.timescale);u=p&&r&&"video"===d.type&&"DASH"==a.l.type&&a.h.shouldFixTimestampOffset;if(m||n||u)l=new Jh;m&&l.S("emsg",function(z){var y=d.emsgSchemeIdUris;
509
509
  if(0===z.version){var B=z.reader.vc();var C=z.reader.vc();var E=z.reader.P();var H=z.reader.P();var A=z.reader.P();var D=z.reader.P();var F=e.startTime+H/E}else E=z.reader.P(),F=z.reader.Tc()/E+e.timestampOffset,H=F-e.startTime,A=z.reader.P(),D=z.reader.P(),B=z.reader.vc(),C=z.reader.vc();z=z.reader.wb(z.reader.getLength()-z.reader.xa());if(y&&y.includes(B)||a.h.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==B)a.g.Hi();else if(y=F+A/E,E=(new Map).set("detail",{startTime:F,endTime:y,schemeIdUri:B,
510
510
  value:C,timescale:E,presentationTimeDelta:H,eventDuration:A,id:D,messageData:z}),E=new W("emsg",E),E.cancelable=!0,a.g.onEvent(E),!E.defaultPrevented&&("https://aomedia.org/emsg/ID3"==B||"https://developer.apple.com/streaming/emsg-id3"==B)&&(B=lj(z),B.length))a.g.onMetadata([{cueTime:F,data:z,frames:B,dts:F,pts:F}],0,y)});n&&l.S("prft",function(z){if(!a.H&&e.Z.timescale){var y=z.reader,B=z.version;y.P();z=y.P();var C=y.P();z=1E3*z+C/Math.pow(2,32)*1E3;0===B?y=y.P():(B=y.P(),y=y.P(),y=B*Math.pow(2,
511
511
  32)+y);z=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+z)).getTime();y=(new Map).set("detail",{wallClockTime:z,programStartDate:new Date(z-y/e.Z.timescale*1E3)});y=new W("prft",y);a.g.onEvent(y);a.H=!0}});u&&l.box("moof",Oh).box("traf",Oh).S("tfdt",function(z){var y,B,C,E,H,A;return P(function(D){y=oj(z.reader,z.version);B=y.baseMediaDecodeTime;if(!B)return D.return();C=-B/r;E=Number(b.Ud)||0;if(!(E<C))return D.u(0);H=b.Td;A=b.Sd;return G(D,zm(a,b,C,H,A,e),0)})});(m||n||u)&&l.parse(f,!1,
512
- g);return G(w,ym(a,b,c),2);case 2:return Bh(a.m),v=b.Vc,b.Vc=!1,G(w,a.g.ng(b.type,f),3);case 3:return G(w,qk(a.g.ba,b.type,f,e,d,k,v,h,g),4);case 4:Bh(a.m),I(w)}})}
513
- function ym(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof il&&d.Ga(a.l.presentationTimeline.Lb());e=Math.max(a.h.bufferBehind*a.B,a.l.presentationTimeline.h);f=lk(a.g.ba,b.type);if(null==f)return a.C==b&&(a.C=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():G(k,a.g.ba.remove(b.type,f,f+h),2)}if(4!=k.g)return Bh(a.m),a.C?G(k,ym(a,a.C,c),4):k.u(0);Bh(a.m);I(k)})}
512
+ g);return G(w,ym(a,b,c),2);case 2:return Bh(a.m),v=b.Vc,b.Vc=!1,G(w,a.g.lg(b.type,f),3);case 3:return G(w,qk(a.g.ba,b.type,f,e,d,k,v,h,g),4);case 4:Bh(a.m),I(w)}})}
513
+ function ym(a,b,c){var d,e,f,g,h;return P(function(k){if(1==k.g){d=b.stream.segmentIndex;d instanceof il&&d.Ga(a.l.presentationTimeline.mb());e=Math.max(a.h.bufferBehind*a.B,a.l.presentationTimeline.h);f=lk(a.g.ba,b.type);if(null==f)return a.C==b&&(a.C=null),k.return();g=c-f;h=g-e;return h<=a.h.evictionGoal?k.return():G(k,a.g.ba.remove(b.type,f,f+h),2)}if(4!=k.g)return Bh(a.m),a.C?G(k,ym(a,a.C,c),4):k.u(0);Bh(a.m);I(k)})}
514
514
  function qm(a){return a&&a.type==Ue&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
515
- function wm(a,b,c,d){var e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(e=c.Mb())return l.return(e);f=null;if(b.V){var m=b.V,n=m.h;c instanceof Ui&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Wf=d),f=m.ee):f=null}f||(f=mm(c,b.stream,d||null,a.h.retryParameters,a.g.Pb));g=0;b.ha&&(g=b.ha.h);b.nb=f;return G(l,f.promise,2);case 2:h=l.h;b.nb=null;k=h.data;if(!c.aesKey){l.u(3);break}return G(l,Rl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
516
- function mm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof Wi?a:void 0,h=g?1:0;a=Sl(a.N(),a.Ha,a.ta,d,c);a.contentType=b.type;return e.request(yh,a,{type:h,stream:b,segment:g,isPreload:f})}
515
+ function wm(a,b,c,d){var e,f,g,h,k;return P(function(l){switch(l.g){case 1:if(e=c.Lb())return l.return(e);f=null;if(b.V){var m=b.V,n=m.h;c instanceof Ui&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.Uf=d),f=m.ee):f=null}f||(f=mm(c,b.stream,d||null,a.h.retryParameters,a.g.Ob));g=0;b.ha&&(g=b.ha.h);b.ob=f;return G(l,f.promise,2);case 2:h=l.h;b.ob=null;k=h.data;if(!c.aesKey){l.u(3);break}return G(l,Rl(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
516
+ function mm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof Wi?a:void 0,h=g?1:0;a=Sl(a.N(),a.Ha,a.ua,d,c);a.contentType=b.type;return e.request(yh,a,{type:h,stream:b,segment:g,isPreload:f})}
517
517
  function jm(a,b,c,d){var e,f;return P(function(g){if(1==g.g)return b.kc=!1,b.Ce=!1,b.Hd=0,b.$c=!0,b.Ta=null,b.ha=null,b.V&&!a.o.has(b.stream)&&Cl(b.V),d?(e=a.g.fd(),f=a.g.ba.getDuration(),G(g,a.g.ba.remove(b.type,e+d,f),3)):G(g,yk(a.g.ba,b.type),4);if(3!=g.g)return Bh(a.m),c?G(g,a.g.ba.flush(b.type),3):g.u(3);Bh(a.m);b.$c=!1;b.endOfStream=!1;b.Ma||b.yb||cm(a,b,0);I(g)})}
518
- function cm(a,b,c){var d=b.type;if(d!=Ue||a.i.has(d))b.yb=(new $b(function(){var e;return P(function(f){if(1==f.g)return ta(f,2),G(f,nm(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);I(f)})})).$(c)}function Vl(a){null!=a.yb&&(a.yb.stop(),a.yb=null)}function Wl(a){return P(function(b){return a.nb?G(b,a.nb.abort(),0):b.u(0)})}
518
+ function cm(a,b,c){var d=b.type;if(d!=Ue||a.i.has(d))b.yb=(new $b(function(){var e;return P(function(f){if(1==f.g)return ta(f,2),G(f,nm(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);I(f)})})).$(c)}function Vl(a){null!=a.yb&&(a.yb.stop(),a.yb=null)}function Wl(a){return P(function(b){return a.ob?G(b,a.ob.abort(),0):b.u(0)})}
519
519
  function om(a,b,c){var d;return P(function(e){if(1==e.g)return G(e,Xg(a.L),2);Bh(a.m);if(1===c.category&&1003!=c.code){if(b.ec)return em(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);I(e)})}
520
- function Bm(a){var b,c,d,e,f,g;return P(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.M<c)return h.return(!1);a.M=b;d=We;if(e=a.i.get(d.X))e.Mc=null,lm(a,e),Wl(e).catch(function(){}),e.ha&&e.ha.Kf();if(f=a.i.get(d.ka))f.Mc=null,lm(a,f),Wl(f).catch(function(){}),f.ha&&f.ha.Kf();g=new Map;a.j.audio&&g.set(d.X,a.j.audio);a.j.video&&g.set(d.ka,a.j.video);return G(h,Hk(a.g.ba,g),2)}return h.return(!0)})}
520
+ function Bm(a){var b,c,d,e,f,g;return P(function(h){if(1==h.g){b=Date.now()/1E3;c=a.h.minTimeBetweenRecoveries;if(!a.h.allowMediaSourceRecoveries||b-a.M<c)return h.return(!1);a.M=b;d=We;if(e=a.i.get(d.X))e.Mc=null,lm(a,e),Wl(e).catch(function(){}),e.ha&&e.ha.Jf();if(f=a.i.get(d.ka))f.Mc=null,lm(a,f),Wl(f).catch(function(){}),f.ha&&f.ha.Jf();g=new Map;a.j.audio&&g.set(d.X,a.j.audio);a.j.video&&g.set(d.ka,a.j.video);return G(h,Hk(a.g.ba,g),2)}return h.return(!0)})}
521
521
  function Am(a,b){if(a.I.projection!=b.projection||a.I.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new W("spatialvideoinfo",c)}else c=new W("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.I=b}};function Cm(){}
522
- function Dm(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Rc(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Rc(n)),m=Dm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Xa("Invalid config, wrong type for "+m),
523
- k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Za("Unexpected number of arguments for "+m),a[l]=b[l]):(Xa("Invalid config, unrecognized key "+m),k=!1)}return k}function Em(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Fm(a,b){return a&&b}
522
+ function Dm(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=Rc(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=Rc(n)),m=Dm(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(Ya("Invalid config, wrong type for "+m),
523
+ k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&Za("Unexpected number of arguments for "+m),a[l]=b[l]):(Ya("Invalid config, unrecognized key "+m),k=!1)}return k}function Em(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Fm(a,b){return a&&b}
524
524
  function Gm(a,b){function c(g){for(var h=t(Object.keys(g)),k=h.next();!k.done;k=h.next())k=k.value,f(g[k])&&0===Object.keys(g[k]).length?delete g[k]:e(g[k])?delete g[k]:"function"==typeof g[k]?delete g[k]:f(g[k])&&(c(g[k]),0===Object.keys(g[k]).length&&delete g[k])}function d(g,h){return Object.keys(g).reduce(function(k,l){var m=g[l];if(h.hasOwnProperty(l))if(f(m)&&f(h[l])){if(m=d(m,h[l]),0<Object.keys(m).length||!f(m))k[l]=m}else e(m)&&e(h[l])||Number.isNaN(m)&&Number.isNaN(h[l])||m!==h[l]&&(k[l]=
525
- m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Cm);Cm.getDifferenceFromConfigObjects=Gm;Cm.convertToConfigObject=Em;Cm.mergeConfigObjects=Dm;function Hm(){}function Im(a){a=Dc(a);return(new pe(a)).Ib}function Jm(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(xb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Fc(b,!0):e=b;a=Dc(a);a=Fc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Km(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split("skd://").pop();return Jm(a,c,b)}
526
- function Lm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",Hm);Hm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Ac(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Bb(Ke(c)))}};Hm.expressplayFairPlayRequest=function(a,b){Lm(a,b)};
527
- Hm.conaxFairPlayRequest=function(a,b){Lm(a,b)};Hm.ezdrmFairPlayRequest=function(a,b){Lm(a,b)};Hm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=xb(b.body),a=Je(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ec("spc="+a))};Hm.expressplayInitDataTransform=function(a,b,c){return Km(a,b,c)};
528
- Hm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Db(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Jm(a,d,b)};Hm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split(";").pop();return Jm(a,c,b)};Hm.verimatrixInitDataTransform=function(a,b,c){return Km(a,b,c)};Hm.initDataTransform=Jm;
525
+ m);else k[l]=m;return k},{})}function e(g){return Array.isArray(g)&&0===g.length}function f(g){return g&&"object"===typeof g&&!Array.isArray(g)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Cm);Cm.getDifferenceFromConfigObjects=Gm;Cm.convertToConfigObject=Em;Cm.mergeConfigObjects=Dm;function Hm(){}function Im(a){a=Dc(a);return(new pe(a)).Hb}function Jm(a,b,c){function d(h){Eb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(yb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new T(2,6,6015);var e;"string"==typeof b?e=Fc(b,!0):e=b;a=Dc(a);a=Fc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Km(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split("skd://").pop();return Jm(a,c,b)}
526
+ function Lm(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.util.FairPlayUtils",Hm);Hm.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Ac(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Ab(Ke(c)))}};Hm.expressplayFairPlayRequest=function(a,b){Lm(a,b)};
527
+ Hm.conaxFairPlayRequest=function(a,b){Lm(a,b)};Hm.ezdrmFairPlayRequest=function(a,b){Lm(a,b)};Hm.verimatrixFairPlayRequest=function(a,b){2===a&&(a=yb(b.body),a=Je(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ec("spc="+a))};Hm.expressplayInitDataTransform=function(a,b,c){return Km(a,b,c)};
528
+ Hm.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Cb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Jm(a,d,b)};Hm.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Dc(a).split(";").pop();return Jm(a,c,b)};Hm.verimatrixInitDataTransform=function(a,b,c){return Km(a,b,c)};Hm.initDataTransform=Jm;
529
529
  Hm.defaultGetContentId=Im;Hm.isFairPlaySupported=function(){var a;return P(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ta(b,2),G(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);wa(b);return b.return(!1)})};function Mm(){}
530
530
  function Nm(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Wg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){xc()&&"skd"==n&&(n=p.serverCertificate,p=Im(m),m=Jm(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:fc(),minHdcpVersion:"",ignoreDuplicateInitData:!gc("Tizen 2")};
531
531
  (fc()||oc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!nb()||hc()||oc()||pc()||jc()&&79===lc()||!(!kc()||kc()&&tc()||kc()&&gc("Fuchsia"))||sc()&&ec()||(c="smooth",d=!0);d={retryParameters:Wg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,
@@ -534,17 +534,17 @@ manifestPreprocessor:Om,manifestPreprocessorTXml:Pm,sequenceMode:!1,enableAudioG
534
534
  jc()&&38===lc()||oc()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:Om,manifestPreprocessorTXml:Pm,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:Wg(),failureCallback:function(m){return Fm([m])},rebufferingGoal:2,bufferingGoal:10,
535
535
  bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:.01,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,
536
536
  parsePrftBox:!1,segmentPrefetchLimit:0,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,
537
- vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:oc()||pc(),dontChooseCodecs:!1,shouldFixTimestampOffset:jc()||hc()};if(jc()||hc()||kc()||qc())e.stallSkip=0;hc()&&(e.gapPadding=2);var f={trackSelectionCallback:function(m){return P(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return P(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?G(p,navigator.storage.estimate(),3):p.return(!0);
538
- n=p.h;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return Fm([m,n])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},
539
- advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:mc()?.5:0,preferNetworkInformationBandwidth:!1};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return Fm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return Fm([m,n])}};var g=!1,h=!1,k=!0;uc()&&(h=g=!0,k=!1);
540
- var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new xg},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,
541
- minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,
542
- logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return P(function(n){return n.return(Qm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
537
+ vodDynamicPlaybackRateBufferRatio:.5,infiniteLiveStreamDuration:!1,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:oc()||pc(),dontChooseCodecs:!1,shouldFixTimestampOffset:jc()||hc()},f=rc();f&&17<=f&&(e.infiniteLiveStreamDuration=!0);if(jc()||hc()||kc()||qc())e.stallSkip=0;hc()&&(e.gapPadding=2);f={trackSelectionCallback:function(m){return P(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return P(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?
538
+ G(p,navigator.storage.estimate(),3):p.return(!0);n=p.h;return p.return(n.usage+m<.95*n.quota)})},progressCallback:function(m,n){return Fm([m,n])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,
539
+ minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:mc()?.5:0,preferNetworkInformationBandwidth:!1};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return Fm([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return Fm([m,
540
+ n])}};var g=!1,h=!1,k=!0;uc()&&(h=g=!0,k=!1);var l={drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new xg},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],
541
+ restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},
542
+ lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k}};f.trackSelectionCallback=function(m){return P(function(n){return n.return(Qm(m,l.preferredAudioLanguage,l.preferredVideoHdrLevel))})};return l}
543
543
  function Rm(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Dm(a,b,c||Nm(),d,"")}
544
- function Qm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Nf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Cf(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
545
- h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ue&&"image"!=c.type||b.push(c);return b}function Om(a){return Fm([a],a)}function Pm(a){return Fm([a],a)}S("shaka.util.PlayerConfiguration",Mm);Mm.mergeConfigObjects=Rm;Mm.createDefault=Nm;function Sm(a,b,c,d){kh.call(this);this.M=a;this.Y=b;this.Ea=d.networkingEngine;this.B=c;this.o=null;this.za=0;this.ib=d.Ec;this.F=d.Ai;this.kb=d.Bi;this.g=d.config;this.j=this.G=this.h=null;this.ja=!1;this.H=d.Li;this.oa=!1;this.l=null;this.ea=!1;this.i=this.C=null;this.da=!1;this.L=new Map;this.wa=!1;this.Da=d.Ki;this.aa=new sl;this.fa=new Yg;this.m=new Yg;this.O=null;this.s=!1;this.hb=d.Dh;this.ma=null;this.Fa=d.Ch;this.R=!1;this.K=[];this.I=[];this.A=!0}pa(Sm,kh);
544
+ function Qm(a,b,c){var d=c;"AUTO"==d&&(d=window.matchMedia("(color-gamut: p3)").matches?a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1})?"HLG":"PQ":"SDR");var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=Nf(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return Cf(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&
545
+ 480>=h.height});g.length&&(g.sort(function(h,k){return k.height-h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=Ue&&"image"!=c.type||b.push(c);return b}function Om(a){return Fm([a],a)}function Pm(a){return Fm([a],a)}S("shaka.util.PlayerConfiguration",Mm);Mm.mergeConfigObjects=Rm;Mm.createDefault=Nm;function Sm(a,b,c,d){kh.call(this);this.M=a;this.Y=b;this.Ea=d.networkingEngine;this.B=c;this.o=null;this.za=0;this.ib=d.Ec;this.F=d.Ai;this.kb=d.Bi;this.g=d.config;this.j=this.G=this.h=null;this.ja=!1;this.H=d.Li;this.oa=!1;this.l=null;this.ea=!1;this.i=this.C=null;this.da=!1;this.L=new Map;this.sa=!1;this.Da=d.Ki;this.aa=new sl;this.fa=new Yg;this.m=new Yg;this.O=null;this.s=!1;this.hb=d.Dh;this.ma=null;this.Fa=d.Ch;this.R=!1;this.K=[];this.I=[];this.A=!0}pa(Sm,kh);
546
546
  function Tm(a,b,c){(a=b?a.I:a.K)?a.push(c):c()}function Um(a){if(a.I)for(var b=t(a.I),c=b.next();!c.done;c=b.next())c=c.value,c();a.I=null}function Vm(a,b){a.O=b;a.R=!0;if(a.K){b=t(a.K);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.K=null}q=Sm.prototype;q.getStartTime=function(){return this.B};q.Ic=function(){return this.M};q.hf=function(){return this.h};function Wm(a){a.da=!0;return a.i}function Xm(a){a.oa=!0;return a.H}q.getStats=function(){return this.aa};
547
- function Ym(a){a.ea=!0;return a.l}function Zm(a){a.wa=!0;return a.L}
547
+ function Ym(a){a.ea=!0;return a.l}function Zm(a){a.sa=!0;return a.L}
548
548
  q.start=function(){var a=this;(function(){var b;return P(function(c){switch(c.g){case 1:return G(c,Promise.resolve(),2);case 2:return ta(c,3),G(c,$m(a),5);case 5:return an(a),G(c,bn(a),6);case 6:an(a);a.o||(a.o=new Gg(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferSpatialAudio,a.g.preferredVideoLayout,a.g.preferredAudioLabel,a.g.preferredVideoLabel,a.g.mediaSource.codecSwitchingStrategy,a.g.manifest.dash.enableAudioGroups,""));
549
549
  if(a.Fa){var d=a.g.abrFactory;a.C=d;a.i=d();a.i.configure(a.g.abr)}if(a.hb){d=a.h.presentationTimeline.U();var e=tg(a.h.variants);e=a.o.create(e);a.i.configure(a.g.abr);a.i.setVariants(Array.from(e.values()));if(e=a.i.chooseVariant())a.ma=e,e.video&&cn(a,e.video,d),e.audio&&cn(a,e.audio,d)}return G(c,void 0,7);case 7:an(a);a.m.resolve();va(c,0);break;case 3:b=wa(c),b instanceof T&&(7001==b.code||7003==b.code)||a.m.reject(b),I(c)}})})()};
550
550
  q.dispatchEvent=function(a){return this.O?this.O.dispatchEvent(a):kh.prototype.dispatchEvent.call(this,a)};q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new W("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function an(a){if(a.s)throw new T(2,7,7003);}function dn(a,b){a.dispatchEvent(new W("onstatechange",(new Map).set("state",b)))}
@@ -552,26 +552,26 @@ function $m(a){var b,c,d,e;return P(function(f){switch(f.g){case 1:dn(a,"manifes
552
552
  function bn(a){var b,c,d,e,f;return P(function(g){switch(g.g){case 1:dn(a,"drm-engine");a.za=Date.now()/1E3;a.l=a.ib();a.F.g=a.l;a.l.configure(a.g.drm,function(){return a.A});b=Ji(a.F,a.h);if(!b){g.u(2);break}c=new W("trackschanged",void 0);return G(g,Promise.resolve(),3);case 3:an(a),a.dispatchEvent(c);case 2:return d=tg(a.h.variants),G(g,ci(a.l,d,a.h.offlineSessionIds),4);case 4:return an(a),G(g,Hi(a.F,a.h),5);case 5:e=g.h;if(!e){g.u(0);break}f=new W("trackschanged",void 0);return G(g,Promise.resolve(),
553
553
  7);case 7:a.dispatchEvent(f),I(g)}})}q.configure=function(a,b){a=Em(a,b);Rm(this.g,a)};q.getConfiguration=function(){return Rc(this.g)};
554
554
  function cn(a,b,c){var d,e,f,g,h;P(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new tl(d,b,function(l,m,n){return mm(l,m,n||null,a.g.streaming.retryParameters,a.Ea,a.A)},!1),a.L.set(b.id,e),G(k,b.createSegmentIndex(),2);f=a.B||0;(h=(g=b.segmentIndex.Kb(f))?g.current():null)||(h=mg(b.segmentIndex));h&&(c?h.Z&&wl(e,h.Z):vl(e,h.startTime));I(k)})}q.lj=function(){return this.m};
555
- q.destroy=function(){var a=this,b,c,d;return P(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ja){e.u(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.da){e.u(4);break}return G(e,a.i.stop(),4);case 4:a.H&&!a.oa&&a.H.release();if(!a.l||a.ea){e.u(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.L.size&&!a.wa)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,Cl(d);I(e)}})};
555
+ q.destroy=function(){var a=this,b,c,d;return P(function(e){switch(e.g){case 1:a.s=!0;if(!a.j||a.ja){e.u(2);break}return G(e,a.j.stop(),2);case 2:if(!a.i||a.da){e.u(4);break}return G(e,a.i.stop(),4);case 4:a.H&&!a.oa&&a.H.release();if(!a.l||a.ea){e.u(6);break}return G(e,a.l.destroy(),6);case 6:if(0<a.L.size&&!a.sa)for(b=t(a.L.values()),c=b.next();!c.done;c=b.next())d=c.value,Cl(d);I(e)}})};
556
556
  function en(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}S("shaka.media.PreloadManager",Sm);Sm.prototype.destroy=Sm.prototype.destroy;Sm.prototype.waitForFinish=Sm.prototype.lj;function fn(a,b){kh.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Cc:null,Bc:gn,sc:function(d,e){return hn(c,"enter",d,e)}},{Cc:jn,Bc:gn,sc:function(d,e){return hn(c,"enter",d,e)}},{Cc:kn,Bc:gn,sc:function(d,e){return hn(c,"enter",d,e)}},{Cc:gn,Bc:jn,sc:function(d,e){return hn(c,"exit",d,e)}},{Cc:gn,Bc:kn,sc:function(d,e){return hn(c,"exit",d,e)}},{Cc:jn,Bc:kn,sc:function(d,e){return hn(c,"skip",d,e)}},{Cc:kn,Bc:jn,sc:function(d,e){return hn(c,"skip",d,e)}}];this.h=new gb;this.h.D(this.i,
557
557
  "regionremove",function(d){c.g.delete(d.region)})}pa(fn,kh);fn.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;kh.prototype.release.call(this)};fn.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?jn:a>d.endTime?kn:gn;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Cc==e&&h.Bc==f&&h.sc(d,b)}}};
558
558
  function hn(a,b,c,d){b=new W(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var jn=1,gn=2,kn=3;function ln(a,b,c){var d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:var n=(new pe(a)).Va.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=mn[d])return m.return(e);f=0;g=sh([a],c);ta(m,2);g.method="HEAD";return G(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];va(m,3);break;case 2:k=wa(m);if(!k||1002!=k.code&&1001!=k.code){m.u(3);break}g.method="GET";return G(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
559
559
  e.toLowerCase().split(";").shift():"")}})}
560
- var mn={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa",
561
- jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function nn(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return nn(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=$d,e=a.fontStyle==ae,f=a.textDecoration.includes(be);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=on(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=on(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
560
+ var mn={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",mov:"video/quicktime",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
561
+ ssa:"text/x-ssa",ass:"text/x-ssa",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"};function nn(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return nn(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=$d,e=a.fontStyle==ae,f=a.textDecoration.includes(be);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=on(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=on(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
562
562
  k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
563
563
  function on(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){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";
564
564
  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 pn(a,b){var c=[];a=t(qn(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,x(pn(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=nn(d,b);c.push(e)}return c}
565
- function qn(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Ne:void 0},c=a.next())d.Ne=c.value,b.some(function(e){return function(f){return Od(e.Ne,f)}}(d))||b.push(d.Ne);return b}
565
+ function qn(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={Ne:void 0},c=a.next())d.Ne=c.value,b.some(function(e){return function(f){return Pd(e.Ne,f)}}(d))||b.push(d.Ne);return b}
566
566
  function rn(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
567
567
  (c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c}
568
- function sn(a){if(Infinity===a.endTime||a.endTime<a.startTime)return null;var b=new Dd(a.startTime,a.endTime,a.text);b.line="number"===typeof a.line?a.line:null;a.lineAlign&&(b.lineAlign=a.lineAlign);b.lineInterpretation=a.snapToLines?Id:1;b.position="number"===typeof a.position?a.position:null;a.positionAlign&&(b.positionAlign=a.positionAlign);b.size=a.size;b.textAlign=a.align;"lr"===a.vertical?b.writingMode="vertical-lr":"rl"===a.vertical&&(b.writingMode="vertical-rl");a.region&&(b.region.id=a.region.id,
569
- b.region.height=a.region.lines,b.region.heightUnits=2,b.region.regionAnchorX=a.region.regionAnchorX,b.region.regionAnchorY=a.region.regionAnchorY,b.region.scroll=a.region.scroll,b.region.viewportAnchorX=a.region.viewportAnchorX,b.region.viewportAnchorY=a.region.viewportAnchorY,b.region.viewportAnchorUnits=Nb,b.region.width=a.region.width,b.region.widthUnits=Nb);Pd(b);return b};function tn(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=tn.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;In(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
568
+ function sn(a){if(Infinity===a.endTime||a.endTime<a.startTime)return null;var b=new Ed(a.startTime,a.endTime,a.text);b.line="number"===typeof a.line?a.line:null;a.lineAlign&&(b.lineAlign=a.lineAlign);b.lineInterpretation=a.snapToLines?Jd:1;b.position="number"===typeof a.position?a.position:null;a.positionAlign&&(b.positionAlign=a.positionAlign);b.size=a.size;b.textAlign=a.align;"lr"===a.vertical?b.writingMode="vertical-lr":"rl"===a.vertical&&(b.writingMode="vertical-rl");a.region&&(b.region.id=a.region.id,
569
+ b.region.height=a.region.lines,b.region.heightUnits=2,b.region.regionAnchorX=a.region.regionAnchorX,b.region.regionAnchorY=a.region.regionAnchorY,b.region.scroll=a.region.scroll,b.region.viewportAnchorX=a.region.viewportAnchorX,b.region.viewportAnchorY=a.region.viewportAnchorY,b.region.viewportAnchorUnits=Nb,b.region.width=a.region.width,b.region.widthUnits=Nb);Qd(b);return b};function tn(a,b){this.g=null;for(var c=t(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.g=d));this.g||(this.g=a.addTextTrack("subtitles",b));this.g.mode="hidden"}q=tn.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;In(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
570
570
  q.append=function(a){if(this.g){var b=pn(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={Kc:void 0},d=b.next())e.Kc=d.value,!a.some(function(f){return function(g){return g.startTime==f.Kc.startTime&&g.endTime==f.Kc.endTime&&g.text==f.Kc.payload?!0:!1}}(e))&&e.Kc.payload&&(d=rn(e.Kc))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-
571
571
  c.indexOf(f):c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)}};q.destroy=function(){this.g&&(In(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};q.setTextVisibility=function(a){this.g&&(this.g.mode=a?"showing":"hidden")};
572
572
  function In(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",tn);tn.prototype.setTextVisibility=tn.prototype.setTextVisibility;tn.prototype.isTextVisible=tn.prototype.isTextVisible;tn.prototype.destroy=tn.prototype.destroy;tn.prototype.append=tn.prototype.append;tn.prototype.remove=tn.prototype.remove;tn.prototype.configure=tn.prototype.configure;function Jn(){}q=Jn.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};S("shaka.text.StubTextDisplayer",Jn);Jn.prototype.setTextVisibility=Jn.prototype.setTextVisibility;Jn.prototype.isTextVisible=Jn.prototype.isTextVisible;Jn.prototype.destroy=Jn.prototype.destroy;Jn.prototype.append=Jn.prototype.append;Jn.prototype.remove=Jn.prototype.remove;Jn.prototype.configure=Jn.prototype.configure;function Kn(){}function Ln(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",Kn);Kn.removeAllChildren=Ln;function Mn(a,b){var c=this;document.fullscreenEnabled||Za("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.m=!1;this.h=[];this.A=a;this.s=b;this.l=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.s.appendChild(this.g);
573
573
  this.C=(new ac(function(){c.A.paused||Nn(c)})).Oa(.25);this.i=new Map;this.j=new gb;this.j.D(document,"fullscreenchange",function(){Nn(c,!0)});this.j.D(this.A,"seeking",function(){Nn(c,!0)});this.j.D(this.A,"resize",function(){var d=c.A,e=d.videoWidth;d=d.videoHeight;e&&d?c.l=e/d:c.l=null});this.o=null;"ResizeObserver"in window&&(this.o=new ResizeObserver(function(){Nn(c,!0)}),this.o.observe(this.g));this.B=new Map}q=Mn.prototype;q.configure=function(a){this.C&&this.C.Oa(a.captionsUpdatePeriod)};
574
- q.append=function(a){var b=[].concat(x(this.h));a=t(qn(a));for(var c=a.next(),d={};!c.done;d={Oe:void 0},c=a.next())d.Oe=c.value,b.some(function(e){return function(f){return Od(f,e.Oe)}}(d))||this.h.push(d.Oe);Nn(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
574
+ q.append=function(a){var b=[].concat(x(this.h));a=t(qn(a));for(var c=a.next(),d={};!c.done;d={Oe:void 0},c=a.next())d.Oe=c.value,b.some(function(e){return function(f){return Pd(f,e.Oe)}}(d))||this.h.push(d.Oe);Nn(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.s.removeChild(this.g);this.g=null;this.m=!1;this.h=[];this.C&&this.C.stop();this.i.clear();this.j&&(this.j.release(),this.j=null);this.o&&(this.o.disconnect(),this.o=null);return Promise.resolve()};
575
575
  q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Nn(this,c>this.h.length);return!0};q.isTextVisible=function(){return this.m};q.setTextVisibility=function(a){this.m=a;Nn(this,!0)};function On(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
576
576
  function Pn(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.i.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.vh:null;l&&(g.push(l.Pe),l.xc&&g.push(l.xc),m||(f=!0,a.i.delete(k),l=null));m&&(h.push(k),l?On(a,n)||(f=!0):(Qn(a,k,e),l=a.i.get(k),n=l.vh,f=!0));0<k.nestedCues.length&&n&&Pn(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
577
577
  r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.i.get(d.value),d.xc?(d.xc.contains(c)&&d.xc.removeChild(c),c.appendChild(d.xc),d.xc.appendChild(d.Pe)):c.appendChild(d.Pe)}}function Nn(a,b){if(a.g){var c=a.A.currentTime;if(!a.m||(void 0===b?0:b)){b=t(a.B.values());for(var d=b.next();!d.done;d=b.next())Ln(d.value);Ln(a.g);a.i.clear();a.B.clear()}a.m&&Pn(a,a.h,a.g,c,[])}}
@@ -579,96 +579,96 @@ function Qn(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rub
579
579
  Nb?"%":"px",m=g.viewportAnchorUnits==Nb?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.l===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-
580
580
  g.regionAnchorY*n/100+m,e.style.left=g.viewportAnchorX-g.regionAnchorX*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent=
581
581
  "before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.B.set(c,e);c=e}}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.i.set(b,{Pe:f,vh:e,xc:c})}
582
- function Sn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Ed?c:"left"===a||"start"===a&&b===Gd||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Gd?"line-right":"center"}
582
+ function Sn(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==Fd?c:"left"===a||"start"===a&&b===Hd||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Hd?"line-right":"center"}
583
583
  function Rn(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Tn(c.linePadding,c,a.s);f.paddingRight=Tn(c.linePadding,c,a.s);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
584
584
  "url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Un(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-
585
585
  1].isContainer)f.display="inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;
586
- f.fontSize=Tn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Id&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Hd?(f.width="100%",c.lineAlign==Jd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Jd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Jd?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;
587
- a=Sn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Hd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Hd?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Hd?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=
588
- c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Hd?f.width=c.size+"%":f.height=c.size+"%")}
586
+ f.fontSize=Tn(c.fontSize,c,a.s);d=c.line;null!=d&&(g=c.lineInterpretation,g==Jd&&(g=1,h=16,a.l&&1>a.l&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==Id?(f.width="100%",c.lineAlign==Kd?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==Kd?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==Kd?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;
587
+ a=Sn(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==Id?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==Id?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==Id?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=
588
+ c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Id?f.width=c.size+"%":f.height=c.size+"%")}
589
589
  function Tn(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function Un(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",Mn);Mn.prototype.setTextVisibility=Mn.prototype.setTextVisibility;
590
590
  Mn.prototype.isTextVisible=Mn.prototype.isTextVisible;Mn.prototype.remove=Mn.prototype.remove;Mn.prototype.destroy=Mn.prototype.destroy;Mn.prototype.append=Mn.prototype.append;Mn.prototype.configure=Mn.prototype.configure;function Vn(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=pn(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
591
- break;case "right":g.push("align:right");break;case Fd:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Wn(a,b){this.h=a;this.g=b;this.i=void 0;this.l=!1;this.o=!0;this.j=this.m=!1}Wn.prototype.configure=function(a){this.g=a};function Xn(a){a.l=!1;a.o=!0;a.m=!1;a.j=!1}function Yn(a,b){a.j=b;a.j?a.i==Zn?a.i=$n:a.i==ao&&(a.i=bo):a.i==$n?a.i=Zn:a.i==bo&&(a.i=ao)}
591
+ break;case "right":g.push("align:right");break;case Gd:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Wn(a,b){this.h=a;this.g=b;this.i=void 0;this.l=!1;this.o=!0;this.j=this.m=!1}Wn.prototype.configure=function(a){this.g=a};function Xn(a){a.l=!1;a.o=!0;a.m=!1;a.j=!1}function Yn(a,b){a.j=b;a.j?a.i==Zn?a.i=$n:a.i==ao&&(a.i=bo):a.i==$n?a.i=Zn:a.i==bo&&(a.i=ao)}
592
592
  function co(a,b,c){try{if(!a.g.enabled)return b;var d=eo(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=fo;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=go;break a;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":e=ho;break a}e=void 0}d.ot=e;d.su=
593
593
  !0;var f=io(d);return jo(b,f)}catch(g){return $a("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function eo(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:1,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
594
594
  function ko(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,eo(a));c.pr=a.h.lb();var e=c.ot===lo||c.ot===go;a.m&&e&&(c.bs=!0,c.su=!0,a.m=!1);null==c.su&&(c.su=a.o);a=mo(a,c);if(d)d=no(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=io(a);f&&(b.uris=b.uris.map(function(g){return jo(g,f)}))}}}function mo(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}
595
- function oo(a){if(0===a.type)return po;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?go:lo;if("audio"==b)return fo;if("text"==b)return"application/mp4"===a.mimeType?qo:ro}}function so(a,b){b=a.h.Cb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
596
- function to(a,b){b=a.h.Cb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function uo(a,b){var c=a.h.qc();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case lo:return a.videoBandwidth||NaN;case fo:return a.audioBandwidth||NaN;default:return a.bandwidth}}
595
+ function oo(a){if(0===a.type)return po;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?go:lo;if("audio"==b)return fo;if("text"==b)return"application/mp4"===a.mimeType?qo:ro}}function so(a,b){b=a.h.Bb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
596
+ function to(a,b){b=a.h.Bb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}function uo(a,b){var c=a.h.qc();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case lo:return a.videoBandwidth||NaN;case fo:return a.audioBandwidth||NaN;default:return a.bandwidth}}
597
597
  function io(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
598
598
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function no(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=io(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
599
- function jo(a,b){if(!b||a.includes("offline:"))return a;a=new pe(a);a.g.set("CMCD",b);return a.toString()}var ho="m",fo="a",lo="v",go="av",po="i",ro="c",qo="tt",Zn="d",$n="ld",ao="h",bo="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:Zn,Fj:$n,HLS:ao,Gj:bo,Tj:"s",OTHER:"o"});function vo(a){this.h=a;this.g=null}q=vo.prototype;q.configure=function(a){this.h=a};q.Dg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(wo)?1E3*this.g.get(wo):null};q.Bg=function(){return this.h.enabled&&this.g&&this.g.has(xo)?1E3*this.g.get(xo):null};q.di=function(){return this.h.enabled&&this.g&&this.g.has(yo)?this.g.get(yo):null};q.ei=function(){return this.h.enabled&&this.g&&this.g.has(zo)?this.g.get(zo):null};
600
- q.getBandwidthEstimate=function(a){var b=this.Bg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Ao(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",vo);vo.prototype.getBandwidthEstimate=vo.prototype.getBandwidthEstimate;vo.prototype.getRoundTripTime=vo.prototype.ei;vo.prototype.getResponseDelay=vo.prototype.di;vo.prototype.getEstimatedThroughput=vo.prototype.Bg;
601
- vo.prototype.getMaxBitrate=vo.prototype.Dg;var xo="etp",wo="mb",yo="rd",zo="rtt";function Bo(){this.g=null;this.h=[]}function Co(a,b){return P(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;I(c)})}Bo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function Y(a,b,c){b=void 0===b?null:b;kh.call(this);var d=this;this.m=Do;this.h=null;this.ce=b;this.ma=!1;this.qe=new gb;this.cc=new gb;this.l=new gb;this.Fa=new gb;this.ib=new gb;this.G=this.I=this.B=this.F=null;this.ze=0;this.Y=new Bo;this.ja=this.eg=this.da=this.i=this.hb=this.H=this.j=this.Xb=this.L=this.gg=this.ea=this.O=this.bc=this.M=this.ge=this.K=this.Ab=null;this.Ea=!1;this.wa=this.o=null;this.fg=1E9;this.qd=[];this.dg=-1;this.g=Eo(this);this.R=null;this.Be=-1;this.Da=null;this.fa={width:Infinity,
602
- height:Infinity};this.$d=new Gi(this.g,this.fa,null);this.je=[];this.A=null;this.za=new Gg(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,"");this.kb=this.g.preferredTextLanguage;this.pd=this.g.preferredTextRole;this.od=this.g.preferForcedSubs;
603
- this.md=[];c&&c(this);this.O=Fo(this);this.ea=new vo(this.g.cmsd);this.F=Go(this);this.F.Sf(this.g.streaming.forceHTTP);this.F.Tf(this.g.streaming.forceHTTPS);this.F.m=this.g.streaming.minBytesForProgressEvents;this.Jb=this.aa=this.s=null;this.Ee=!1;this.De=new ac(function(){return P(function(e){if(1==e.g)return d.aa?G(e,d.Tb(d.Jb,!0),3):e.u(0);if(4!=e.g)return G(e,d.load(d.aa),4);d.Ee?d.Jb.pause():d.Jb.play();d.aa=null;d.Ee=!1;I(e)})});Ho&&(this.s=Ho(),this.s.configure(this.g.ads),this.ib.D(this.s,
604
- "ad-content-pause-requested",function(e){var f;return P(function(g){if(1==g.g){d.De.stop();if(d.aa)return g.u(0);d.Jb=d.h;d.Ee=d.Lc();f=e.saveLivePosition||!1;return G(g,d.ug(!0,f),3)}d.aa=g.h;I(g)})}),this.ib.D(this.s,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.aa){var f=d.aa;f.B&&e&&(f.B+=e)}d.De.$(.1)}),this.ib.D(this.s,"ad-content-attach-requested",function(){return P(function(e){return d.h||!d.Jb?e.u(0):G(e,d.Tb(d.Jb,!0),0)})}));this.qe.D(window,"online",function(){Io(d);d.Lf()});
605
- this.ie=new ac(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.ie.stop();f&&Jo(d,!1,void 0,!1,!1)});this.oa=null;a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Tb(a,!0));this.C=null}pa(Y,kh);
606
- function Ko(a){null!=a.L&&(Zj(a.L),a.L.release(),a.L=null)}function Lo(a,b){b.lcevc.enabled?(Ko(a),null==a.L&&(a.L=new Yj(a.h,a.gg,b.lcevc),a.I&&(a.I.R=a.L))):Ko(a)}function Mo(a,b){return new W(a,b)}q=Y.prototype;
607
- q.destroy=function(){var a=this,b;return P(function(c){switch(c.g){case 1:if(a.m==No)return c.return();Ko(a);b=a.detach();a.m=No;return G(c,b,2);case 2:return G(c,a.Re(),3);case 3:a.qe&&(a.qe.release(),a.qe=null);a.cc&&(a.cc.release(),a.cc=null);a.l&&(a.l.release(),a.l=null);a.Fa&&(a.Fa.release(),a.Fa=null);a.ib&&(a.ib.release(),a.ib=null);a.wa=null;a.g=null;a.A=null;a.ce=null;a.O=null;a.ea=null;if(!a.F){c.u(4);break}return G(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.o&&(a.o.release(),a.o=null),
599
+ function jo(a,b){if(!b||a.includes("offline:"))return a;a=new pe(a);a.g.set("CMCD",b);return a.toString()}var ho="m",fo="a",lo="v",go="av",po="i",ro="c",qo="tt",Zn="d",$n="ld",ao="h",bo="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:Zn,Fj:$n,HLS:ao,Gj:bo,Tj:"s",OTHER:"o"});function vo(a){this.h=a;this.g=null}q=vo.prototype;q.configure=function(a){this.h=a};q.Bg=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(wo)?1E3*this.g.get(wo):null};q.zg=function(){return this.h.enabled&&this.g&&this.g.has(xo)?1E3*this.g.get(xo):null};q.di=function(){return this.h.enabled&&this.g&&this.g.has(yo)?this.g.get(yo):null};q.ei=function(){return this.h.enabled&&this.g&&this.g.has(zo)?this.g.get(zo):null};
600
+ q.getBandwidthEstimate=function(a){var b=this.zg();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Ao(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",vo);vo.prototype.getBandwidthEstimate=vo.prototype.getBandwidthEstimate;vo.prototype.getRoundTripTime=vo.prototype.ei;vo.prototype.getResponseDelay=vo.prototype.di;vo.prototype.getEstimatedThroughput=vo.prototype.zg;
601
+ vo.prototype.getMaxBitrate=vo.prototype.Bg;var xo="etp",wo="mb",yo="rd",zo="rtt";function Bo(){this.g=null;this.h=[]}function Co(a,b){return P(function(c){if(1==c.g)return a.g?G(c,new Promise(function(d){return a.h.push(d)}),2):c.u(2);a.g=b;I(c)})}Bo.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function Y(a,b,c){b=void 0===b?null:b;kh.call(this);var d=this;this.m=Do;this.h=null;this.ce=b;this.ma=!1;this.qe=new gb;this.cc=new gb;this.l=new gb;this.Fa=new gb;this.ib=new gb;this.G=this.I=this.B=this.F=null;this.ze=0;this.Y=new Bo;this.ja=this.cg=this.da=this.i=this.hb=this.H=this.j=this.Wb=this.L=this.eg=this.ea=this.O=this.bc=this.M=this.ge=this.K=this.zb=null;this.oa=!1;this.za=this.o=null;this.dg=1E9;this.qd=[];this.bg=-1;this.g=Eo(this);this.R=null;this.Be=-1;this.Da=null;this.fa={width:Infinity,
602
+ height:Infinity};this.$d=new Gi(this.g,this.fa,null);this.je=[];this.A=null;this.Ea=new Gg(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel,this.g.preferSpatialAudio,this.g.preferredVideoLayout,this.g.preferredAudioLabel,this.g.preferredVideoLabel,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,"");this.kb=this.g.preferredTextLanguage;this.pd=this.g.preferredTextRole;this.od=this.g.preferForcedSubs;
603
+ this.md=[];c&&c(this);this.O=Fo(this);this.ea=new vo(this.g.cmsd);this.F=Go(this);this.F.Qf(this.g.streaming.forceHTTP);this.F.Rf(this.g.streaming.forceHTTPS);this.F.m=this.g.streaming.minBytesForProgressEvents;this.Jb=this.aa=this.s=null;this.Ee=!1;this.De=new ac(function(){return P(function(e){if(1==e.g)return d.aa?G(e,d.Sb(d.Jb,!0),3):e.u(0);if(4!=e.g)return G(e,d.load(d.aa),4);d.Ee?d.Jb.pause():d.Jb.play();d.aa=null;d.Ee=!1;I(e)})});Ho&&(this.s=Ho(),this.s.configure(this.g.ads),this.ib.D(this.s,
604
+ "ad-content-pause-requested",function(e){var f;return P(function(g){if(1==g.g){d.De.stop();if(d.aa)return g.u(0);d.Jb=d.h;d.Ee=d.Lc();f=e.saveLivePosition||!1;return G(g,d.sg(!0,f),3)}d.aa=g.h;I(g)})}),this.ib.D(this.s,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.aa){var f=d.aa;f.B&&e&&(f.B+=e)}d.De.$(.1)}),this.ib.D(this.s,"ad-content-attach-requested",function(){return P(function(e){return d.h||!d.Jb?e.u(0):G(e,d.Sb(d.Jb,!0),0)})}));this.qe.D(window,"online",function(){Io(d);d.Kf()});
605
+ this.ie=new ac(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.ie.stop();f&&Jo(d,!1,void 0,!1,!1)});this.sa=null;a&&(pb("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Sb(a,!0));this.C=null}pa(Y,kh);
606
+ function Ko(a){null!=a.L&&(Zj(a.L),a.L.release(),a.L=null)}function Lo(a,b){b.lcevc.enabled?(Ko(a),null==a.L&&(a.L=new Yj(a.h,a.eg,b.lcevc),a.I&&(a.I.R=a.L))):Ko(a)}function Mo(a,b){return new W(a,b)}q=Y.prototype;
607
+ q.destroy=function(){var a=this,b;return P(function(c){switch(c.g){case 1:if(a.m==No)return c.return();Ko(a);b=a.detach();a.m=No;return G(c,b,2);case 2:return G(c,a.Re(),3);case 3:a.qe&&(a.qe.release(),a.qe=null);a.cc&&(a.cc.release(),a.cc=null);a.l&&(a.l.release(),a.l=null);a.Fa&&(a.Fa.release(),a.Fa=null);a.ib&&(a.ib.release(),a.ib=null);a.za=null;a.g=null;a.A=null;a.ce=null;a.O=null;a.ea=null;if(!a.F){c.u(4);break}return G(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.o&&(a.o.release(),a.o=null),
608
608
  kh.prototype.release.call(a),I(c)}})};function Oo(a,b){a.dispatchEvent(Mo("onstatechange",(new Map).set("state",b)))}
609
- q.Tb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return P(function(g){switch(g.g){case 1:if(c.m==No)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return G(g,c.detach(),2);case 2:return G(g,Po(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(Oo(c,"attach"),e=function(){var h=Qo(c,!1);h&&Ro(c,h)},c.cc.D(a,"error",e),c.h=a);if(!b||!bc()||c.I){g.u(6);break}return G(g,So(c),6);case 6:xa(g);c.Y.release();ya(g,0);break;case 5:return f=wa(g),G(g,c.detach(),10);case 10:throw f;
610
- }})};q.Eh=function(a){this.gg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return P(function(c){if(1==c.g){if(b.m==No)throw new T(2,7,7E3);return G(c,b.jc(!1,a),2)}if(3!=c.g)return G(c,Po(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.cc.Wa(),b.h=null),Oo(b,"detach"),b.s&&!a&&b.s.release()}finally{b.Y.release()}I(c)})};function Po(a,b){var c;return P(function(d){return 1==d.g?(c=++a.ze,G(d,Co(a.Y,b),2)):c!=a.ze?(a.Y.release(),d.return(!0)):d.return(!1)})}
611
- q.jc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return P(function(r){switch(r.g){case 1:return c.m!=No&&(c.m=Do),G(r,Po(c,"unload"),2);case 2:if(r.h)return r.return();ua(r,3);c.Ea=!1;Oo(c,"unload");a&&!bc()&&(a=!1);Ko(c);d=c.md.map(function(u){return u()});c.md=[];return G(r,Promise.all(d),5);case 5:c.dispatchEvent(Mo("unloading"));c.bc&&(c.bc.release(),c.bc=null);c.h&&(c.l.Wa(),c.Fa.Wa());c.ie.stop();c.Ab&&(c.Ab.release(),c.Ab=null);c.ge&&(c.ge.stop(),c.ge=null);
609
+ q.Sb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return P(function(g){switch(g.g){case 1:if(c.m==No)throw new T(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.u(2);break}return G(g,c.detach(),2);case 2:return G(g,Po(c,"attach"),4);case 4:if(g.h)return g.return();ta(g,5,6);d||(Oo(c,"attach"),e=function(){var h=Qo(c,!1);h&&Ro(c,h)},c.cc.D(a,"error",e),c.h=a);if(!b||!bc()||c.I){g.u(6);break}return G(g,So(c),6);case 6:xa(g);c.Y.release();ya(g,0);break;case 5:return f=wa(g),G(g,c.detach(),10);case 10:throw f;
610
+ }})};q.Eh=function(a){this.eg=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return P(function(c){if(1==c.g){if(b.m==No)throw new T(2,7,7E3);return G(c,b.jc(!1,a),2)}if(3!=c.g)return G(c,Po(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.cc.Wa(),b.h=null),Oo(b,"detach"),b.s&&!a&&b.s.release()}finally{b.Y.release()}I(c)})};function Po(a,b){var c;return P(function(d){return 1==d.g?(c=++a.ze,G(d,Co(a.Y,b),2)):c!=a.ze?(a.Y.release(),d.return(!0)):d.return(!1)})}
611
+ q.jc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return P(function(r){switch(r.g){case 1:return c.m!=No&&(c.m=Do),G(r,Po(c,"unload"),2);case 2:if(r.h)return r.return();ua(r,3);c.oa=!1;Oo(c,"unload");a&&!bc()&&(a=!1);Ko(c);d=c.md.map(function(u){return u()});c.md=[];return G(r,Promise.all(d),5);case 5:c.dispatchEvent(Mo("unloading"));c.bc&&(c.bc.release(),c.bc=null);c.h&&(c.l.Wa(),c.Fa.Wa());c.ie.stop();c.zb&&(c.zb.release(),c.zb=null);c.ge&&(c.ge.stop(),c.ge=null);
612
612
  if(!c.H){r.u(6);break}return G(r,c.H.stop(),7);case 7:c.H=null,c.hb=null;case 6:if(!c.o){r.u(8);break}return G(r,c.o.stop(),8);case 8:if(!c.j){r.u(10);break}return G(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.K&&(c.K.release(),c.K=null);c.G&&(c.G.release(),c.G=null);if(!xc("webkit")||!c.B){r.u(12);break}return G(r,c.B.destroy(),13);case 13:c.B=null;case 12:if(!c.I){r.u(14);break}return G(r,c.I.destroy(),15);case 15:c.I=null;case 14:if(c.s&&!b)c.s.onAssetUnload();c.aa&&!b&&(c.aa.destroy(),c.aa=
613
- null);b||c.De.stop();c.O&&Xn(c.O);c.ea&&(c.ea.g=null);if(!c.C){r.u(16);break}return G(r,c.C.destroy(),17);case 17:c.C=null;case 16:c.h&&Ln(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.B){r.u(18);break}return G(r,c.B.destroy(),19);case 19:c.B=null;case 18:c.oa&&c.da!=c.oa.Ic()&&(c.oa.s||c.oa.destroy(),c.oa=null);c.da=null;c.eg=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&
614
- l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(bg={},Zb.clear());c.i=null;c.A=new sl;c.se=null;c.Da=null;c.R=null;c.Be=-1;c.qd=[];c.dg=-1;To(c);case 3:xa(r);c.Y.release();ya(r,4);break;case 4:if(a&&bc()&&!c.I&&c.h)return G(r,So(c),0);r.u(0)}})};q.kj=function(a){this.ja=a};
613
+ null);b||c.De.stop();c.O&&Xn(c.O);c.ea&&(c.ea.g=null);if(!c.C){r.u(16);break}return G(r,c.C.destroy(),17);case 17:c.C=null;case 16:c.h&&Ln(c.h);c.h&&c.h.src&&(c.h.removeAttribute("src"),c.h.load());if(!c.B){r.u(18);break}return G(r,c.B.destroy(),19);case 19:c.B=null;case 18:c.sa&&c.da!=c.sa.Ic()&&(c.sa.s||c.sa.destroy(),c.sa=null);c.da=null;c.cg=null;c.M=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),k=h.next();!k.done;k=h.next())(l=k.value)&&
614
+ l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(bg={},Zb.clear());c.i=null;c.A=new sl;c.se=null;c.Da=null;c.R=null;c.Be=-1;c.qd=[];c.bg=-1;To(c);case 3:xa(r);c.Y.release();ya(r,4);break;case 4:if(a&&bc()&&!c.I&&c.h)return G(r,So(c),0);r.u(0)}})};q.kj=function(a){this.ja=a};
615
615
  q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return P(function(z){switch(z.g){case 1:if(d.m==No)throw new T(2,7,7E3);e=null;f="";a instanceof Sm?(e=a,f=e.Ic()||""):f=a||"";return G(z,Co(d.Y,"load"),2);case 2:d.Y.release();if(!d.h)throw new T(2,7,7002);if(!d.da){z.u(3);break}d.da=f;return G(z,d.jc(!1),3);case 3:g=++d.ze;h=function(){return P(function(y){if(1==y.g)return d.ze==g?y.u(0):e?G(y,e.destroy(),3):y.u(3);throw new T(2,7,7E3);})};k=function(y,B){return P(function(C){switch(C.g){case 1:return ua(C,
616
- 2),G(C,Co(d.Y,B),4);case 4:return G(C,h(),5);case 5:return G(C,y(),6);case 6:return G(C,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:xa(C),d.Y.release(),ya(C,0)}})};ta(z,5,6);null==b&&e&&(b=e.getStartTime());d.ja=b;d.Ea=!1;d.dispatchEvent(Mo("loading"));if(e){c=e.Y;z.u(8);break}if(c){z.u(8);break}return G(z,k(function(){return P(function(y){if(1==y.g)return G(y,Uo(d,f),2);c=y.h;I(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Vm(e,d);d.A=e.getStats();z.u(11);break}return G(z,Vo(d,f,b,c,!0),12);case 12:(e=
617
- z.h)?(e.A=!1,Vm(e,d),d.A=e.getStats(),e.start(),e.m.catch(function(){})):d.A=new sl;case 11:return m=!e,n=Date.now()/1E3,d.A=e?e.getStats():new sl,d.da=f,d.eg=c||null,m?G(z,k(function(){return P(function(y){return G(y,Wo(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):G(z,k(function(){return P(function(y){if(1==y.g)return G(y,Promise.race([e.fa,e.m]),2);d.hb=e.G;var B=e;B.ja=!0;d.H=B.j;d.i=e.hf();I(y)})},"waitForFinish"),15);case 15:if(d.I){z.u(16);break}return G(z,k(function(){return P(function(y){return G(y,
618
- So(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return G(z,k(function(){return P(function(y){return G(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.$d=e.F;d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.bc=Xm(e);d.Xb=e.Da;if(p=e.o)d.za=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(Xo(d),d.configure("manifest.disableVideo",!0));d.B=Ym(e);return G(z,k(function(){return P(function(y){return G(y,d.B.Tb(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.C)||d.wa&&
619
- d.wa==r||(d.o=Wm(e),d.wa=e.C,"function"!=typeof d.o.setMediaElement&&(pb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(pb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(pb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),
620
- d.o.trySuggestStreams=function(){})),u=Zm(e),v=e.ma,G(z,k(function(){return P(function(y){return G(y,Yo(d,n,v,u),0)})},"loadInner_"),20);case 20:Um(e);z.u(14);break;case 21:return G(z,k(function(){return P(function(y){return G(y,Zo(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Mo("loaded"));case 6:xa(z);if(!e){z.u(23);break}return G(z,e.destroy(),23);case 23:d.oa=null;ya(z,0);break;case 5:w=wa(z);if(!w||7E3==w.code){z.u(25);break}return G(z,d.jc(!1),25);case 25:throw w;}})};
616
+ 2),G(C,Co(d.Y,B),4);case 4:return G(C,h(),5);case 5:return G(C,y(),6);case 6:return G(C,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:xa(C),d.Y.release(),ya(C,0)}})};ta(z,5,6);null==b&&e&&(b=e.getStartTime());d.ja=b;d.oa=!1;d.dispatchEvent(Mo("loading"));if(e){c=e.Y;z.u(8);break}if(c){z.u(8);break}return G(z,k(function(){return P(function(y){if(1==y.g)return G(y,Uo(d,f),2);c=y.h;I(y)})},"guessMimeType_"),8);case 8:l=!!e;if(e){Vm(e,d);d.A=e.getStats();z.u(11);break}return G(z,Vo(d,f,b,c,!0),12);case 12:(e=
617
+ z.h)?(e.A=!1,Vm(e,d),d.A=e.getStats(),e.start(),e.m.catch(function(){})):d.A=new sl;case 11:return m=!e,n=Date.now()/1E3,d.A=e?e.getStats():new sl,d.da=f,d.cg=c||null,m?G(z,k(function(){return P(function(y){return G(y,Wo(d,c),0)})},"initializeSrcEqualsDrmInner_"),21):G(z,k(function(){return P(function(y){if(1==y.g)return G(y,Promise.race([e.fa,e.m]),2);d.hb=e.G;var B=e;B.ja=!0;d.H=B.j;d.i=e.hf();I(y)})},"waitForFinish"),15);case 15:if(d.I){z.u(16);break}return G(z,k(function(){return P(function(y){return G(y,
618
+ So(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return G(z,k(function(){return P(function(y){return G(y,e.m,0)})},"waitForFinish"),18);case 18:d.g=e.getConfiguration();d.$d=e.F;d.H&&d.H.setMediaElement&&d.h&&d.H.setMediaElement(d.h);d.bc=Xm(e);d.Wb=e.Da;if(p=e.o)d.Ea=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(Xo(d),d.configure("manifest.disableVideo",!0));d.B=Ym(e);return G(z,k(function(){return P(function(y){return G(y,d.B.Sb(d.h),0)})},"drmEngine_.attach"),19);case 19:return!(r=e.C)||d.za&&
619
+ d.za==r||(d.o=Wm(e),d.za=e.C,"function"!=typeof d.o.setMediaElement&&(pb("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.o.setMediaElement=function(){}),"function"!=typeof d.o.setCmsdManager&&(pb("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.o.setCmsdManager=function(){}),"function"!=typeof d.o.trySuggestStreams&&(pb("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),
620
+ d.o.trySuggestStreams=function(){})),u=Zm(e),v=e.ma,G(z,k(function(){return P(function(y){return G(y,Yo(d,n,v,u),0)})},"loadInner_"),20);case 20:Um(e);z.u(14);break;case 21:return G(z,k(function(){return P(function(y){return G(y,Zo(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(Mo("loaded"));case 6:xa(z);if(!e){z.u(23);break}return G(z,e.destroy(),23);case 23:d.sa=null;ya(z,0);break;case 5:w=wa(z);if(!w||7E3==w.code){z.u(25);break}return G(z,d.jc(!1),25);case 25:throw w;}})};
621
621
  function Xo(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.gj=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,$o(c),2):3!=e.g?(d=e.h,G(e,c.jc(a,b),3)):e.return(d)})};
622
- q.ug=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,$o(c,b),2):3!=e.g?(d=e.h,G(e,c.detach(a),3)):e.return(d)})};
623
- function $o(a,b){b=void 0===b?!1:b;var c,d;return P(function(e){if(1==e.g){c=null;if(!(a.i&&a.H&&a.hb&&a.da))return e.u(2);d=a.h.currentTime;a.U()&&!b&&(d=null);return G(e,ap(a,a.da,d,a.eg,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.je.push(c);a.H&&a.H.setMediaElement&&a.H.setMediaElement(null);var f=c,g=a.H,h=a.hb;f.h=a.i;f.j=g;f.G=h;f=c;g=a.wa;f.i=a.o;f.C=g;c.o=a.za;c.start();a.i=null;a.H=null;a.hb=null;a.o=null;a.wa=null}return e.return(c)})}
622
+ q.sg=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return P(function(e){return 1==e.g?G(e,$o(c,b),2):3!=e.g?(d=e.h,G(e,c.detach(a),3)):e.return(d)})};
623
+ function $o(a,b){b=void 0===b?!1:b;var c,d;return P(function(e){if(1==e.g){c=null;if(!(a.i&&a.H&&a.hb&&a.da))return e.u(2);d=a.h.currentTime;a.U()&&!b&&(d=null);return G(e,ap(a,a.da,d,a.cg,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.je.push(c);a.H&&a.H.setMediaElement&&a.H.setMediaElement(null);var f=c,g=a.H,h=a.hb;f.h=a.i;f.j=g;f.G=h;f=c;g=a.za;f.i=a.o;f.C=g;c.o=a.Ea;c.start();a.i=null;a.H=null;a.hb=null;a.o=null;a.za=null}return e.return(c)})}
624
624
  q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return P(function(f){if(1==f.g)return G(f,Vo(d,a,b,c),2);(e=f.h)?e.start():Ro(d,new T(2,7,7005));return f.return(e)})};q.Re=function(){var a=this,b,c,d,e;return P(function(f){b=[];c=t(a.je);for(d=c.next();!d.done;d=c.next())e=d.value,e.s||b.push(e.destroy());a.je=[];return G(f,Promise.all(b),0)})};
625
- function Vo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return P(function(l){if(1==l.g)return d?l.u(2):G(l,Uo(a,b),3);2!=l.g&&(d=l.h);if(f=bp(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.wa==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=ap(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.A=!1;return m}):k.then(function(m){a.je.push(m);return m});return l.return(k)})}
625
+ function Vo(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return P(function(l){if(1==l.g)return d?l.u(2):G(l,Uo(a,b),3);2!=l.g&&(d=l.h);if(f=bp(a,d))return l.return(null);g=!1;h=!0;e&&(a.o&&a.za==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=ap(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.A=!1;return m}):k.then(function(m){a.je.push(m);return m});return l.return(k)})}
626
626
  function ap(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,v,w,z,y,B,C,E;return P(function(H){if(1==H.g)return h=null,k=Rc(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.R&&h.s?null:h},m=function(){return l()?l().getConfiguration():a.g},n=function(A,D){l()?h.configure(A,D):a.configure(A,D)},Infinity!=a.fa.width||Infinity!=a.fa.height?H.u(2):G(H,yc(),3);2!=H.g&&(p=H.h,a.fa.width=p.width,a.fa.height=p.height);r=new Gi(k,a.fa,null);u={networkingEngine:a.F,
627
627
  filter:function(A){var D,F;return P(function(J){if(1==J.g)return G(J,Hi(r,A),2);if(4!=J.g){D=J.h;if(!D)return J.u(0);F=Mo("trackschanged");return G(J,Promise.resolve(),4)}h.dispatchEvent(F);I(J)})},makeTextStreamsForClosedCaptions:function(A){return cp(a,A)},onTimelineRegionAdded:function(A){var D=h.H;a:{var F=t(D.g);for(var J=F.next();!J.done;J=F.next())if(J=J.value,J.schemeIdUri==A.schemeIdUri&&J.id==A.id&&J.startTime==A.startTime&&J.endTime==A.endTime){F=J;break a}F=null}null==F&&(D.g.add(A),A=
628
628
  new W("regionadd",new Map([["region",A]])),D.dispatchEvent(A))},onEvent:function(A){return h.dispatchEvent(A)},onError:function(A){return h.onError(A)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return m().streaming.autoLowLatencyMode},enableLowLatencyMode:function(){n("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&h.R&&a.j.updateDuration()},newDrmInfo:function(A){var D=h.l,F=D?D.g:null;F&&D.A&&Ki(r,F.keySystem,A)},onManifestUpdated:function(){var A=
629
- (new Map).set("isLive",a.U());h.dispatchEvent(Mo("manifestupdated",A));Tm(h,!1,function(){if(a.s)a.s.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(A,D,F,J){var L=A;if("com.apple.hls.interstitial"==A&&(L="com.apple.quicktime.HLS",A={startTime:D,endTime:F,values:J},a.s))a.s.onHLSInterstitialMetadata(a,a.h,A);J=t(J);A=J.next();for(var K={};!A.done;K={Gf:void 0},A=J.next())K.Gf=A.value,"ID"!=K.Gf.name&&Tm(h,!1,function(O){return function(){dp(a,
630
- D,F,L,O.Gf)}}(K))},disableStream:function(A){return a.disableStream(A,a.g.streaming.maxDisabledTime)},addFont:function(A,D){return a.addFont(A,D)}};v=new Fl(function(){return a.Xa()});v.addEventListener("regionadd",function(A){var D=A.region;ep(a,"timelineregionadded",D,h);Tm(h,!1,function(){a.s&&(a.s.onDashTimedMetadata(D),a.s.onDASHInterstitialMetadata(a,a.h,D))})});w=null;k.streaming.observeQualityChanges&&(w=new Gl(function(){return a.Cb()}),w.addEventListener("qualitychange",function(A){fp(a,
631
- A.quality,A.position)}),w.addEventListener("audiotrackchange",function(A){fp(a,A.quality,A.position,!0)}));z=!0;y={Pb:a.F,onError:function(A){return h.onError(A)},de:function(A){Tm(h,!0,function(){a:{var D=A,F=Mo("keystatuschanged");a.dispatchEvent(F);var J=Object.keys(D);1==J.length&&""==J[0]&&(J=["00"],D={"00":D[""]});F=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=t(a.i.variants);for(var K=J.next();!K.done;K=J.next()){K=K.value;var O=[];K.audio&&O.push(K.audio);K.video&&O.push(K.video);O=t(O);
629
+ (new Map).set("isLive",a.U());h.dispatchEvent(Mo("manifestupdated",A));Tm(h,!1,function(){if(a.s)a.s.onManifestUpdated(a.U())})},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},onMetadata:function(A,D,F,J){var L=A;if("com.apple.hls.interstitial"==A&&(L="com.apple.quicktime.HLS",A={startTime:D,endTime:F,values:J},a.s))a.s.onHLSInterstitialMetadata(a,a.h,A);J=t(J);A=J.next();for(var K={};!A.done;K={Ff:void 0},A=J.next())K.Ff=A.value,"ID"!=K.Ff.name&&Tm(h,!1,function(O){return function(){dp(a,
630
+ D,F,L,O.Ff)}}(K))},disableStream:function(A){return a.disableStream(A,a.g.streaming.maxDisabledTime)},addFont:function(A,D){return a.addFont(A,D)}};v=new Fl(function(){return a.Xa()});v.addEventListener("regionadd",function(A){var D=A.region;ep(a,"timelineregionadded",D,h);Tm(h,!1,function(){a.s&&(a.s.onDashTimedMetadata(D),a.s.onDASHInterstitialMetadata(a,a.h,D))})});w=null;k.streaming.observeQualityChanges&&(w=new Gl(function(){return a.Bb()}),w.addEventListener("qualitychange",function(A){fp(a,
631
+ A.quality,A.position)}),w.addEventListener("audiotrackchange",function(A){fp(a,A.quality,A.position,!0)}));z=!0;y={Ob:a.F,onError:function(A){return h.onError(A)},de:function(A){Tm(h,!0,function(){a:{var D=A,F=Mo("keystatuschanged");a.dispatchEvent(F);var J=Object.keys(D);1==J.length&&""==J[0]&&(J=["00"],D={"00":D[""]});F=1==J.length&&"00"==J[0];var L=!1;if(J.length){J=t(a.i.variants);for(var K=J.next();!K.done;K=J.next()){K=K.value;var O=[];K.audio&&O.push(K.audio);K.video&&O.push(K.video);O=t(O);
632
632
  for(var M=O.next();!M.done;M=O.next()){var N=M.value;M=K.allowedByKeySystem;if(N.keyIds.size){K.allowedByKeySystem=!0;N=t(N.keyIds);for(var R=N.next();!R.done;R=N.next())if(R=R.value,(R=D[F?"00":R])||a.B.F)K.allowedByKeySystem=K.allowedByKeySystem&&!!R&&!Mi.includes(R)}M!=K.allowedByKeySystem&&(L=!0)}}}if(L&&(gp(a),!hp(a)))break a;(D=a.j.j)&&!D.allowedByKeySystem&&Jo(a)}})},onExpirationUpdated:function(A,D){var F=Mo("expirationupdated");h.dispatchEvent(F);if((F=h.j)&&F.onExpirationUpdated)F.onExpirationUpdated(A,
633
633
  D)},onEvent:function(A){h.dispatchEvent(A);"drmsessionupdate"==A.type&&z&&(z=!1,A=Date.now()/1E3-h.za,(a.A||h.getStats()).j=A,a.L&&Zj(a.L))}};B=Go(a,l);rh(a.F,B);C=function(){return a.Ec(y)};E={config:k,Bi:u,Li:v,Ki:w,Ec:C,Ai:r,networkingEngine:B,Dh:e,Ch:g};h=new Sm(b,d,c,E);return H.return(h)})}
634
634
  function Uo(a,b){var c,d;return P(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,G(e,ln(b,a.F,c),2);d=e.h;"application/x-mpegurl"==d&&mc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}function bp(a,b){if(!bc())return!0;if(b){if(""==(a.h||dc()).canPlayType(b))return!1;if(!(bc()&&b in Pi))return!0;if(lf(b))return mc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls}return!1}
635
635
  function ip(a){var b=a.g.textDisplayFactory;b!==a.se&&(a.C=b(),a.C.configure?a.C.configure(a.g.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.se=b,a.C.setTextVisibility(a.ma))}
636
636
  function So(a){var b,c,d;return P(function(e){if(1==e.g)return Oo(a,"media-source"),ip(a),b=jp(a.h,a.C,{Wh:function(){return a.keySystem()},onMetadata:function(f,g,h){kp(a,f,g,h)}},a.L),b.configure(a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.fa=d,G(e,b.F,2);a.I=b;I(e)})}
637
637
  function lp(a,b,c){function d(){return mp(a)}a.l.D(b,"playing",d);a.l.D(b,"pause",d);a.l.D(b,"ended",d);a.l.D(b,"ratechange",function(){var e=a.h.playbackRate;0!=e&&(a.K&&a.K.set(e),e=Mo("ratechange"),a.dispatchEvent(e))});b.remote&&(a.l.D(b.remote,"connect",function(){return gp(a)}),a.l.D(b.remote,"connecting",function(){return gp(a)}),a.l.D(b.remote,"disconnect",function(){return P(function(e){if(1==e.g)return a.j&&"disconnected"==b.remote.state?G(e,Bm(a.j),2):e.u(2);gp(a);I(e)})}));b.audioTracks&&
638
- (a.l.D(b.audioTracks,"addtrack",function(){return gp(a)}),a.l.D(b.audioTracks,"removetrack",function(){return gp(a)}),a.l.D(b.audioTracks,"change",function(){return gp(a)}));b.textTracks&&(a.l.D(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":np(a,e);break;case "chapters":op(a,e);break;default:gp(a)}}),a.l.D(b.textTracks,"removetrack",function(){return gp(a)}),a.l.D(b.textTracks,"change",function(){return gp(a)}));"none"!=b.preload&&a.l.ua(b,"loadedmetadata",
638
+ (a.l.D(b.audioTracks,"addtrack",function(){return gp(a)}),a.l.D(b.audioTracks,"removetrack",function(){return gp(a)}),a.l.D(b.audioTracks,"change",function(){return gp(a)}));b.textTracks&&(a.l.D(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":np(a,e);break;case "chapters":op(a,e);break;default:gp(a)}}),a.l.D(b.textTracks,"removetrack",function(){return gp(a)}),a.l.D(b.textTracks,"change",function(){return gp(a)}));"none"!=b.preload&&a.l.va(b,"loadedmetadata",
639
639
  function(){a.A.C=Date.now()/1E3-c})}
640
- function Yo(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D;return P(function(F){switch(F.g){case 1:Oo(a,"load"),e=a.h,a.K=new jl({Md:function(){return e.playbackRate},pc:function(){return e.defaultPlaybackRate},Uf:function(J){e.playbackRate=J},Pg:function(J){e.currentTime+=J}}),lp(a,e,b),Lo(a,a.g),a.kb=a.g.preferredTextLanguage,a.pd=a.g.preferredTextRole,a.od=a.g.preferForcedSubs,pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(J,L,K){a.i&&a.j&&J!=a.j.j&&
640
+ function Yo(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D;return P(function(F){switch(F.g){case 1:Oo(a,"load"),e=a.h,a.K=new jl({Md:function(){return e.playbackRate},pc:function(){return e.defaultPlaybackRate},Sf:function(J){e.playbackRate=J},Og:function(J){e.currentTime+=J}}),lp(a,e,b),Lo(a,a.g),a.kb=a.g.preferredTextLanguage,a.pd=a.g.preferredTextRole,a.od=a.g.preferForcedSubs,pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd),a.o.init(function(J,L,K){a.i&&a.j&&J!=a.j.j&&
641
641
  qp(a,J,!0,void 0===L?!1:L,void 0===K?0:K)}),a.o.setMediaElement(e),a.o.setCmsdManager(a.ea),a.j=rp(a),a.j.configure(a.g.streaming),a.m=sp,a.dispatchEvent(Mo("streaming")),f=c;case 2:(h=a.j.j)||f||(f=hp(a)?a.o.chooseVariant():null);k=[];g=h||f;l=t([g.video,g.audio]);for(m=l.next();!m.done;m=l.next())(n=m.value)&&!n.segmentIndex&&k.push(n.createSegmentIndex());if(!(0<k.length)){F.u(4);break}return G(F,Promise.all(k),4);case 4:if(!g||0!=g.disabledUntilTime){F.u(2);break}if(a.H&&a.H.onInitialVariantChosen)a.H.onInitialVariantChosen(g);
642
- a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&Za("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.");a.O&&Yn(a.O,a.i.isLowLatency&&a.g.streaming.lowLatencyMode);pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Zl(a.j,a.g.playRangeStart,a.g.playRangeEnd);p=function(J){a.G=tp(a,J);a.Ab=up(a,J);vp(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};
643
- a.g.streaming.startAtSegmentBoundary||(r=a.ja,null==r&&a.i.startTime&&(r=a.i.startTime),p(r));if(h){F.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){F.u(8);break}u=a.i.presentationTimeline;v=a.ja||a.h.currentTime;null==a.ja&&a.i.startTime&&(v=a.i.startTime);w=u.Lb();z=u.Eb();v<w?v=w:v>z&&(v=z);return G(F,wp(f,v),9);case 9:y=F.h,p(y);case 8:qp(a,f,!0,!1,0);case 7:return a.G.ready(),B=a.Jc().find(function(J){return J.active}),B||((C=ug(a.i.textStreams,a.kb,a.pd,a.od)[0]||null)&&rl(a.A.h,C,!0),
644
- f&&(C?(xp(a,f.audio,C)&&(a.ma=!0),a.ma&&a.C.setTextVisibility(!0),yp(a)):a.ma=!1),C&&(a.g.streaming.alwaysStreamText||a.tf())&&hm(a.j,C)),G(F,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),zp(a));gp(a);hp(a);a.i.variants.some(function(J){return J.primary});if((E=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)H=function(){return Ap(a)},a.l.D(e,"timeupdate",H);E||(A=function(){return Bp(a)},
645
- a.l.D(e,"timeupdate",A),Bp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(D=function(){var J;return P(function(L){if(1==L.g){J=a.Xa().end-a.h.currentTime;if(isNaN(J)||!(J<=a.g.streaming.preloadNextUrlWindow))return L.u(0);a.l.fb(e,"timeupdate",D);return G(L,a.preload(a.i.nextUrl),4)}a.oa=L.h;I(L)})},a.l.D(e,"timeupdate",D)),a.l.D(e,"ended",function(){a.load(a.oa||a.i.nextUrl)})));if(a.s)a.s.onManifestUpdated(E);a.Ea=!0;I(F)}})}
646
- function Wo(a,b){var c,d,e,f,g;return P(function(h){return 1==h.g?(c=We,d=Date.now()/1E3,e=!0,a.B=a.Ec({Pb:a.F,onError:function(k){Ro(a,k)},de:function(){},onExpirationUpdated:function(){var k=Mo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.A.j=Date.now()/1E3-d)}}),a.B.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
642
+ a.i.isLowLatency&&!a.g.streaming.lowLatencyMode&&Za("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.");a.O&&Yn(a.O,a.i.isLowLatency&&a.g.streaming.lowLatencyMode);pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Zl(a.j,a.g.playRangeStart,a.g.playRangeEnd);p=function(J){a.G=tp(a,J);a.zb=up(a,J);vp(a,e,Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal))};
643
+ a.g.streaming.startAtSegmentBoundary||(r=a.ja,null==r&&a.i.startTime&&(r=a.i.startTime),p(r));if(h){F.u(7);break}if(!a.g.streaming.startAtSegmentBoundary){F.u(8);break}u=a.i.presentationTimeline;v=a.ja||a.h.currentTime;null==a.ja&&a.i.startTime&&(v=a.i.startTime);w=u.Yb();z=u.Db();v<w?v=w:v>z&&(v=z);return G(F,wp(f,v),9);case 9:y=F.h,p(y);case 8:qp(a,f,!0,!1,0);case 7:return a.G.ready(),B=a.Jc().find(function(J){return J.active}),B||((C=ug(a.i.textStreams,a.kb,a.pd,a.od)[0]||null)&&rl(a.A.h,C,!0),
644
+ f&&(C?(xp(a,f.audio,C)&&(a.ma=!0),a.ma&&a.C.setTextVisibility(!0),yp(a)):a.ma=!1),C&&(a.g.streaming.alwaysStreamText||a.rf())&&hm(a.j,C)),G(F,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.o.enable(),zp(a));gp(a);hp(a);a.i.variants.some(function(J){return J.primary});if((E=a.U())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)H=function(){return Ap(a)},a.l.D(e,"timeupdate",H);E||(A=function(){return Bp(a)},
645
+ a.l.D(e,"timeupdate",A),Bp(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(D=function(){var J;return P(function(L){if(1==L.g){J=a.Xa().end-a.h.currentTime;if(isNaN(J)||!(J<=a.g.streaming.preloadNextUrlWindow))return L.u(0);a.l.fb(e,"timeupdate",D);return G(L,a.preload(a.i.nextUrl),4)}a.sa=L.h;I(L)})},a.l.D(e,"timeupdate",D)),a.l.D(e,"ended",function(){a.load(a.sa||a.i.nextUrl)})));if(a.s)a.s.onManifestUpdated(E);a.oa=!0;I(F)}})}
646
+ function Wo(a,b){var c,d,e,f,g;return P(function(h){return 1==h.g?(c=We,d=Date.now()/1E3,e=!0,a.B=a.Ec({Ob:a.F,onError:function(k){Ro(a,k)},de:function(){},onExpirationUpdated:function(){var k=Mo("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.A.j=Date.now()/1E3-d)}}),a.B.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
647
647
  g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?jf(b):"",codecs:b?kf(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.ka,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set},g.fullMimeTypes.add(Ze(g.mimeType,
648
- g.codecs)),b.startsWith("audio/")?(g.type=c.X,f.audio=g):f.video=g,a.B.aa=!0,G(h,ci(a.B,[f],[]),2)):G(h,a.B.Tb(a.h),0)})}
649
- function Zo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g)return Oo(a,"src-equals"),d=a.h,a.G=new $k(d),e=!1,a.md.push(function(){e=!0}),null!=a.ja&&a.G.Ge(a.ja),a.K=new jl({Md:function(){return d.playbackRate},pc:function(){return d.defaultPlaybackRate},Uf:function(w){d.playbackRate=w},Pg:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,vp(a,d,f),d.textTracks&&(ip(a),g=function(){var w=Cp(a).find(function(z){return"disabled"!==z.mode});w&&(w.mode="showing")},h=
648
+ g.codecs)),b.startsWith("audio/")?(g.type=c.X,f.audio=g):f.video=g,a.B.aa=!0,G(h,ci(a.B,[f],[]),2)):G(h,a.B.Sb(a.h),0)})}
649
+ function Zo(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g)return Oo(a,"src-equals"),d=a.h,a.G=new $k(d),e=!1,a.md.push(function(){e=!0}),null!=a.ja&&a.G.Ge(a.ja),a.K=new jl({Md:function(){return d.playbackRate},pc:function(){return d.defaultPlaybackRate},Sf:function(w){d.playbackRate=w},Og:function(w){d.currentTime+=w}}),f=a.g.streaming.rebufferingGoal,vp(a,d,f),d.textTracks&&(ip(a),g=function(){var w=Cp(a).find(function(z){return"disabled"!==z.mode});w&&(w.mode="showing")},h=
650
650
  function(){var w=Cp(a).find(function(z){return"disabled"!==z.mode});w&&(w.mode="hidden")},a.l.D(d,"enterpictureinpicture",function(){return g()}),a.l.D(d,"leavepictureinpicture",function(){return h()}),d.remote?(a.l.D(d.remote,"connect",function(){return h()}),a.l.D(d.remote,"connecting",function(){return h()}),a.l.D(d.remote,"disconnect",function(){return h()})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.l.D(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return h()}),k=d,k.webkitSupportsFullscreen&&
651
651
  a.l.D(k,"webkitpresentationmodechanged",function(){"inline"!=k.webkitPresentationMode?g():h()})),lp(a,d,b),l=co(a.O,a.da,c),!l.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(l+="#t=",0<a.g.playRangeStart&&(l+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(l+=","+a.g.playRangeEnd)),d.src=l,a.I&&window.ManagedMediaSource&&(d.disableRemotePlayback=!1),(hc()||jc())&&d.load(),"none"!=d.preload&&!d.autoplay&&lf(c)&&rc()&&d.load(),a.m=Dp,a.dispatchEvent(Mo("streaming")),m=new Yg,
652
- Rk(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.G.ready();m.resolve()}),Rk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var w,z,y,B,C;return P(function(E){if(1==E.g)return Ep(a),w=Cp(a),w.find(function(H){return"disabled"!=H.mode})?(0<w.length&&(a.ma=!0,a.C.setTextVisibility(!0)),E.u(2)):G(E,new Promise(function(H){a.l.ua(d.textTracks,"change",H);(new ac(H)).$(1)}),2);if(e)return E.return();z=!1;y=t(w);for(B=y.next();!B.done;B=y.next())C=B.value,"disabled"!==C.mode&&(z?(C.mode="disabled",
653
- Za("Found more than one enabled text track, disabling it",C)):(Fp(a,C),z=!0));Gp(a);I(E)})}),d.error?m.reject(Qo(a)):"none"==d.preload&&(Za('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.'),m.resolve()),a.l.ua(d,"error",function(){m.reject(Qo(a))}),G(v,zf(a.g.streaming.loadTimeout,m),2);if((n=a.U())&&(a.g.streaming.liveSync&&
654
- a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return Ap(a)},a.l.D(d,"timeupdate",p);n||(r=function(){return Bp(a)},a.l.D(d,"timeupdate",r),Bp(a));a.s&&(a.s.onManifestUpdated(n),n&&(u=a.Xa().end,a.l.D(d,"progress",function(){var w=a.Xa().end;u!=w&&(a.s.onManifestUpdated(a.U()),u=w)})));a.Ea=!0;I(v)})}function Ep(a){var b=a.g.preferredAudioLanguage;""!=b&&a.ah(b,a.g.preferredVariantRole)}
655
- function Gp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Of(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
656
- function np(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,dp(a,e.startTime,e.endTime,e.type,e.value),a.s)a.s.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={Vb:void 0},f=e.next())g.Vb=f.value,"com.apple.quicktime.HLS"==g.Vb.type&&null!=g.Vb.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Vb.startTime&&k.endTime==h.Vb.endTime}}(g)),
657
- f||(f={startTime:g.Vb.startTime,endTime:g.Vb.endTime,values:[]},d.push(f)),f.values.push(g.Vb.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.s&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.s.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new ac(function(){var d=Hp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).zc().$(.5);
652
+ Rk(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.G.ready();m.resolve()}),Rk(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var w,z,y,B,C;return P(function(E){if(1==E.g)return Ep(a),w=Cp(a),w.find(function(H){return"disabled"!=H.mode})?(0<w.length&&(a.ma=!0,a.C.setTextVisibility(!0)),E.u(2)):G(E,new Promise(function(H){a.l.va(d.textTracks,"change",H);(new ac(H)).$(1)}),2);if(e)return E.return();z=!1;y=t(w);for(B=y.next();!B.done;B=y.next())C=B.value,"disabled"!==C.mode&&(z?(C.mode="disabled",
653
+ Za("Found more than one enabled text track, disabling it",C)):(Fp(a,C),z=!0));Gp(a);I(E)})}),d.error?m.reject(Qo(a)):"none"==d.preload&&(Za('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.'),m.resolve()),a.l.va(d,"error",function(){m.reject(Qo(a))}),G(v,zf(a.g.streaming.loadTimeout,m),2);if((n=a.U())&&(a.g.streaming.liveSync&&
654
+ a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return Ap(a)},a.l.D(d,"timeupdate",p);n||(r=function(){return Bp(a)},a.l.D(d,"timeupdate",r),Bp(a));a.s&&(a.s.onManifestUpdated(n),n&&(u=a.Xa().end,a.l.D(d,"progress",function(){var w=a.Xa().end;u!=w&&(a.s.onManifestUpdated(a.U()),u=w)})));a.oa=!0;I(v)})}function Ep(a){var b=a.g.preferredAudioLanguage;""!=b&&a.ah(b,a.g.preferredVariantRole)}
655
+ function Gp(a){var b=a.g.preferredTextLanguage;""!=b&&a.Mf(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
656
+ function np(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,dp(a,e.startTime,e.endTime,e.type,e.value),a.s)a.s.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={Ub:void 0},f=e.next())g.Ub=f.value,"com.apple.quicktime.HLS"==g.Ub.type&&null!=g.Ub.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.Ub.startTime&&k.endTime==h.Ub.endTime}}(g)),
657
+ f||(f={startTime:g.Ub.startTime,endTime:g.Ub.endTime,values:[]},d.push(f)),f.values.push(g.Ub.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.s&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.s.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new ac(function(){var d=Hp(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).zc().$(.5);
658
658
  a.md.push(function(){c.stop()})}}function kp(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&"number"==typeof e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())dp(a,f,g,"org.id3",k.value);if(a.s)a.s.onHlsTimedMetadata(e,f)}}function dp(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Mo("metadata",b))}
659
659
  function op(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new ac(function(){b.mode="hidden"})).zc().$(.5);a.md.push(function(){c.stop()})}}q.Pi=function(){for(var a=this.Y;a.g;)a.release()};q.Ec=function(a){return new Wh(a)};
660
660
  function Go(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?Tm(b(),!0,e):e()}b||(b=function(){return null});return new nh(function(e,f,g,h){var k=b()?b().i:a.o;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(Mo("downloadheadersreceived",f));d(function(){if(a.ea){var h=a.ea;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
661
661
  Ao(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],Ao(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(Mo("downloadfailed",e))},function(e,f,g){d(function(){var h=a.O,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)ko(h,f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=
662
662
  h.j?$n:Zn;break a;case 3:case 2:l=h.j?bo:ao;break a;case 5:l="s";break a}l=void 0}h.i=l}ko(h,f,{ot:ho,su:!h.l})}}catch(M){$a("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",M)}break;case yh:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.U()?"l":"v"};n.ot=oo(k);var p=n.ot===lo||n.ot===fo||n.ot===go||n.ot===qo,r=k.stream;if(r){var u=h.h.lb();if(p&&(n.bl=so(h,r.type),n.ot!==qo)){var v=to(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/
663
- 1E3);if(r.segmentIndex&&m){var w=r.segmentIndex.Kb(m.endTime,!0,0>u);if(w){var z=w.next().value;if(z&&z!=m){if(!Sb(m.N(),z.N())){var y=z.N()[0],B=f.uris[0],C=new URL(y),E=new URL(B);if(C.origin!==E.origin)var H=y;else{for(var A=C.pathname.split("/").slice(1),D=E.pathname.split("/").slice(1,-1);A[0]===D[0];)A.shift(),D.shift();for(;D.length;)D.shift(),A.unshift("..");H=A.join("/")}n.nor=H}if((z.Ha||z.ta)&&(m.Ha!=z.Ha||m.ta!=z.ta)){var F=z.Ha+"-";z.ta&&(F+=z.ta);n.nrr=F}}}var J=h.h.lb()||1,L=to(h,r.type)||
664
- 500,K=r.bandwidth;var O=K?K*(m.endTime-m.startTime)/1E3/(L/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}p&&n.ot!==qo&&(n.tb=uo(h,n.ot)/1E3);ko(h,f,n)}}catch(M){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:ko(h,f,{ot:"k"});break;case 4:ko(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.H)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.A;g&&(g.lc=isNaN(g.lc)?f:g.lc+f,0===e&&(g.Lg=f))}})}
665
- function tp(a,b){return new al(a.h,a.i,a.g.streaming,b,function(){a.Ab&&ml(a.Ab,!0);a.j&&a.j.Vc();a.M&&Ip(a)},function(c){return a.dispatchEvent(c)})}
666
- function up(a,b){b=new fn(a.bc,a.U()||0<b);b.addEventListener("enter",function(d){ep(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){ep(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ep(a,"timelineregionenter",e),ep(a,"timelineregionexit",e))});var c=new ll(a.h);c.g.add(b);a.Xb&&c.g.add(a.Xb);return c}
663
+ 1E3);if(r.segmentIndex&&m){var w=r.segmentIndex.Kb(m.endTime,!0,0>u);if(w){var z=w.next().value;if(z&&z!=m){if(!Sb(m.N(),z.N())){var y=z.N()[0],B=f.uris[0],C=new URL(y),E=new URL(B);if(C.origin!==E.origin)var H=y;else{for(var A=C.pathname.split("/").slice(1),D=E.pathname.split("/").slice(1,-1);A[0]===D[0];)A.shift(),D.shift();for(;D.length;)D.shift(),A.unshift("..");H=A.join("/")}n.nor=H}if((z.Ha||z.ua)&&(m.Ha!=z.Ha||m.ua!=z.ua)){var F=z.Ha+"-";z.ua&&(F+=z.ua);n.nrr=F}}}var J=h.h.lb()||1,L=to(h,r.type)||
664
+ 500,K=r.bandwidth;var O=K?K*(m.endTime-m.startTime)/1E3/(L/J/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(O)||(n.rtp=O)}}p&&n.ot!==qo&&(n.tb=uo(h,n.ot)/1E3);ko(h,f,n)}}catch(M){$a("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",M)}break;case 2:case 5:case 6:ko(h,f,{ot:"k"});break;case 4:ko(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().j:a.H)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=f.data.byteLength;var g=b()?b().getStats():a.A;g&&(g.lc=isNaN(g.lc)?f:g.lc+f,0===e&&(g.Kg=f))}})}
665
+ function tp(a,b){return new al(a.h,a.i,a.g.streaming,b,function(){a.zb&&ml(a.zb,!0);a.j&&a.j.Vc();a.M&&Ip(a)},function(c){return a.dispatchEvent(c)})}
666
+ function up(a,b){b=new fn(a.bc,a.U()||0<b);b.addEventListener("enter",function(d){ep(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){ep(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ep(a,"timelineregionenter",e),ep(a,"timelineregionexit",e))});var c=new ll(a.h);c.g.add(b);a.Wb&&c.g.add(a.Wb);return c}
667
667
  function vp(a,b,c){a.M=new Qg;a.M.g=Tg;Ug(a.M,c,Math.min(.5,c/2));To(a);a.ge=(new ac(function(){Ip(a)})).Oa(.25);a.l.D(b,"waiting",function(){return Ip(a)});a.l.D(b,"stalled",function(){return Ip(a)});a.l.D(b,"canplaythrough",function(){return Ip(a)});a.l.D(b,"progress",function(){return Ip(a)})}
668
- function Ip(a){switch(a.m){case Dp:if(a.Lc())var b=!0;else{var c=bj(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case sp:a:if(a.Lc()||gk(a.I))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Zb();var d=bj(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=dj(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Sg:Tg;c.g=d;(b=b!=d)&&d===Sg&&(c.h=Date.now());b&&To(a)}function jp(a,b,c,d){return new bk(a,b,c,d)}
669
- function Fo(a){return new Wn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},Cb:function(){return a.Cb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},lb:function(){return a.lb()},Db:function(){return a.Db()},qc:function(){return a.qc()},U:function(){return a.U()}},a.g.cmcd)}
670
- function rp(a){return new Tl(a.i,{fd:function(){return a.G?a.G.zd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},lb:function(){return a.lb()},ba:a.I,Pb:a.F,onError:function(b){return Ro(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Hi:function(){a.H&&a.H.update&&a.H.update()},Cf:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Ue){if(a.G){a.G.Qg();var f=lk(a.I,e);!a.U()&&a.h.paused&&null!=f&&0<f&&a.G.zd()<f&&a.G.Ge(f)}Ip(a)}d=
671
- (new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(Mo("segmentappended",d))},Gi:function(b,c){(c=c.Oc)&&a.Xb&&Il(a.Xb,c,b)},ng:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Uh(xb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;li(d,"cenc",c);d=
668
+ function Ip(a){switch(a.m){case Dp:if(a.Lc())var b=!0;else{var c=bj(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case sp:a:if(a.Lc()||gk(a.I))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Zb();var d=bj(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=dj(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f?Rg:Tg;c.g=d;(b=b!=d)&&d===Rg&&(c.h=Date.now());b&&To(a)}function jp(a,b,c,d){return new bk(a,b,c,d)}
669
+ function Fo(a){return new Wn({getBandwidthEstimate:function(){return a.o?a.o.getBandwidthEstimate():NaN},Bb:function(){return a.Bb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},lb:function(){return a.lb()},Cb:function(){return a.Cb()},qc:function(){return a.qc()},U:function(){return a.U()}},a.g.cmcd)}
670
+ function rp(a){return new Tl(a.i,{fd:function(){return a.G?a.G.zd():0},getBandwidthEstimate:function(){return a.o.getBandwidthEstimate()},lb:function(){return a.lb()},ba:a.I,Ob:a.F,onError:function(b){return Ro(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Hi:function(){a.H&&a.H.update&&a.H.update()},Bf:function(b,c){var d=b.startTime;b=b.endTime;var e=c.type;c=c.codecs.includes(",");if(e!=Ue){if(a.G){a.G.Pg();var f=lk(a.I,e);!a.U()&&a.h.paused&&null!=f&&0<f&&a.G.zd()<f&&a.G.Ge(f)}Ip(a)}d=
671
+ (new Map).set("start",d).set("end",b).set("contentType",e).set("isMuxed",c);a.dispatchEvent(Mo("segmentappended",d))},Gi:function(b,c){(c=c.Oc)&&a.Wb&&Il(a.Wb,c,b)},lg:function(b,c){var d=a.B;if(d.h.parseInbandPsshEnabled&&!d.F&&["audio","video"].includes(b)){b=new Uh(yb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;li(d,"cenc",c);d=
672
672
  d.m}}else d=Promise.resolve();return d},onMetadata:function(b,c,d){kp(a,b,c,d)},disableStream:function(b,c){return a.disableStream(b,c)}})}
673
673
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Em(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(pb("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(pb("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
674
674
  a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(pb("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&mc(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){pb("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
@@ -681,89 +681,89 @@ a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if
681
681
  "Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2),void 0==a.streaming.updateIntervalSeconds&&(a.streaming.updateIntervalSeconds=.1),void 0==a.streaming.maxDisabledTime&&
682
682
  (a.streaming.maxDisabledTime=1),void 0==a.streaming.retryParameters&&(a.streaming.retryParameters={}),void 0==a.streaming.retryParameters.baseDelay&&(a.streaming.retryParameters.baseDelay=100),void 0==a.manifest&&(a.manifest={}),void 0==a.manifest.dash&&(a.manifest.dash={}),void 0==a.manifest.dash.autoCorrectDrift&&(a.manifest.dash.autoCorrectDrift=!1),void 0==a.manifest.retryParameters&&(a.manifest.retryParameters={}),void 0==a.manifest.retryParameters.baseDelay&&(a.manifest.retryParameters.baseDelay=
683
683
  100),void 0==a.drm&&(a.drm={}),void 0==a.drm.retryParameters&&(a.drm.retryParameters={}),void 0==a.drm.retryParameters.baseDelay&&(a.drm.retryParameters.baseDelay=100));c=Rm(this.g,a,Eo(this));Jp(this);return c};
684
- function Jp(a){a.$d=new Gi(a.g,a.fa,a.B);if(a.H){var b=Rc(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=No&&Ii(a.$d,a.i)&&gp(a)}catch(e){Ro(a,e)}a.o&&hp(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Jo(a)}a.F&&(a.F.Sf(a.g.streaming.forceHTTP),a.F.Tf(a.g.streaming.forceHTTPS),a.F.m=a.g.streaming.minBytesForProgressEvents);a.I&&(a.I.configure(a.g.mediaSource),a.I.fa=a.g.manifest.segmentRelativeVttTiming);
684
+ function Jp(a){a.$d=new Gi(a.g,a.fa,a.B);if(a.H){var b=Rc(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.H.configure(b)}a.B&&a.B.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=No&&Ii(a.$d,a.i)&&gp(a)}catch(e){Ro(a,e)}a.o&&hp(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Jo(a)}a.F&&(a.F.Qf(a.g.streaming.forceHTTP),a.F.Rf(a.g.streaming.forceHTTPS),a.F.m=a.g.streaming.minBytesForProgressEvents);a.I&&(a.I.configure(a.g.mediaSource),a.I.fa=a.g.manifest.segmentRelativeVttTiming);
685
685
  if(a.C)if(b=a.g.textDisplayFactory,a.se!=b){var c=a.C;a.C=b();a.C.configure?a.C.configure(a.g.textDisplayer):pb("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.C.setTextVisibility(c.isTextVisible());c.destroy();if(a.I){c=a.I;var d=a.C;c.aa=d;c.h&&(c.h.j=d)}a.se=b;a.j&&(b=a.j,(c=b.i.get(Ue))&&fm(b,c.stream,!0,0,!0))}else a.C.configure&&a.C.configure(a.g.textDisplayer);a.o&&(a.o.configure(a.g.abr),a.g.abr.enabled?a.o.enable():a.o.disable(),zp(a));a.M&&(b=a.g.streaming.rebufferingGoal,
686
- a.i&&(b=Math.max(b,a.i.minBufferTime)),Ug(a.M,b,Math.min(.5,b/2)));a.i&&pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.s&&a.s.configure(a.g.ads);a.O&&a.O.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd)}q.getConfiguration=function(){var a=Eo(this);Rm(a,this.g,Eo(this));return a};q.Eg=function(){var a=Eo(this);Rm(a,this.g,Eo(this));return Gm(this.g,Eo(this))};
687
- q.zg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Xa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Ti=function(){for(var a in this.g)delete this.g[a];Rm(this.g,Eo(this),Eo(this));Jp(this)};q.Cg=function(){return this.m};q.jf=function(){return this.i?this.i.type:null};q.$h=function(){return this.h};
688
- q.Db=function(){return this.F};q.Ic=function(){return this.da};q.yg=function(){return this.s?this.s:null};q.U=function(){return this.i&&!this.Ka()?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};q.tc=function(){return this.i?this.i.presentationTimeline.tc():!1};q.ri=function(){if(this.i&&!this.Ka()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
689
- q.Xa=function(){if(this.i&&!this.Ka()){if(!this.Ea&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Lb(),end:a.Eb()}}if(this.h&&this.h.src&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};q.ni=function(){this.U()&&(this.h.currentTime=this.Xa().end)};q.si=function(){return this.Ea};
686
+ a.i&&(b=Math.max(b,a.i.minBufferTime)),Ug(a.M,b,Math.min(.5,b/2)));a.i&&pp(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.s&&a.s.configure(a.g.ads);a.O&&a.O.configure(a.g.cmcd);a.ea&&a.ea.configure(a.g.cmsd)}q.getConfiguration=function(){var a=Eo(this);Rm(a,this.g,Eo(this));return a};q.Cg=function(){var a=Eo(this);Rm(a,this.g,Eo(this));return Gm(this.g,Eo(this))};
687
+ q.xg=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.Xa().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.Ti=function(){for(var a in this.g)delete this.g[a];Rm(this.g,Eo(this),Eo(this));Jp(this)};q.Ag=function(){return this.m};q.jf=function(){return this.i?this.i.type:null};q.$h=function(){return this.h};
688
+ q.Cb=function(){return this.F};q.Ic=function(){return this.da};q.wg=function(){return this.s?this.s:null};q.U=function(){return this.i&&!this.Ka()?this.i.presentationTimeline.U():this.h&&this.h.src?Infinity==this.h.duration:!1};q.tc=function(){return this.i?this.i.presentationTimeline.tc():!1};q.ri=function(){if(this.i&&!this.Ka()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
689
+ q.Xa=function(){if(this.i&&!this.Ka()){if(!this.oa&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.Yb(),end:a.Db()}}if(this.h&&this.h.src&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};q.ni=function(){this.U()&&(this.h.currentTime=this.Xa().end)};q.si=function(){return this.oa};
690
690
  q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.B?this.B.g:null};q.ed=function(){return this.B?this.B.ed():Infinity};q.gf=function(){return this.B?this.B.gf():[]};q.Ld=function(){return this.B?this.B.Ld():{}};q.qf=function(){return this.M?this.M.g==Tg:!1};q.lb=function(){return this.h?this.K?this.K.i:1:0};
691
691
  q.xd=function(a,b){var c=this;b=void 0===b?!0:b;0==a?Za("A trick play rate of 0 is unsupported!"):(this.Fa.Wa(),this.K.set(a),this.m==sp&&(this.o.playbackRateChanged(a),em(this.j,b&&1<Math.abs(a))),this.U()&&this.Fa.D(this.h,"timeupdate",function(){var d=c.h.currentTime,e=c.Xa(),f=c.g.streaming.safeSeekOffset;0<a?Math.floor(d)>=Math.floor(e.end)&&c.Yc():Math.floor(d)<=Math.floor(e.start+f)&&c.Yc()}))};
692
692
  q.Yc=function(){var a=this.K.pc();this.m==Dp&&this.K.set(a);this.m==sp&&(this.K.set(a),this.o.playbackRateChanged(a),em(this.j,!1));this.Fa.Wa()};
693
693
  q.qc=function(){if(this.i&&!this.Ka()){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,sg(e)){var f=jg(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return rg(g)}):[]};
694
694
  q.Jc=function(){if(this.i&&!this.Ka()){for(var a=this.j?this.j.s:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=kg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Cp(this).map(function(f){return pg(f)}):[]};q.Uh=function(){var a=this.qd;this.i&&(a=this.i.imageStreams);return a.map(function(b){return lg(b)})};
695
- q.Lh=function(a){var b=this,c,d,e,f;return P(function(g){if(1==g.g){if(b.m!=sp&&b.m!=Dp)return g.return(null);c=b.qd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Bb(function(h){var k=Kp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.mc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Gg(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
695
+ q.Lh=function(a){var b=this,c,d,e,f;return P(function(g){if(1==g.g){if(b.m!=sp&&b.m!=Dp)return g.return(null);c=b.qd;b.i&&(c=b.i.imageStreams);return(d=c.find(function(h){return h.id==a}))?d.segmentIndex?g.u(2):G(g,d.createSegmentIndex(),2):g.return(null)}if(4!=g.g)return e=[],d.segmentIndex.Ab(function(h){var k=Kp(h.tilesLayout||d.tilesLayout);if(k){k=k.rows*k.mc;for(var l=h.j-h.startTime,m=0;m<k;m++)e.push(b.Eg(a,h.startTime+l*m/k))}}),G(g,Promise.all(e),4);f=g.h;return g.return(f.filter(function(h){return h}))})};
696
696
  function Kp(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{mc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
697
- q.Gg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return P(function(E){if(1==E.g){if(c.m!=sp&&c.m!=Dp)return E.return(null);d=c.qd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(H){return H.id==a}))?e.segmentIndex?E.u(2):G(E,e.createSegmentIndex(),2):E.return(null)}f=e.segmentIndex.find(b);if(null==f)return E.return(null);g=e.segmentIndex.get(f);h=Kp(g.tilesLayout||e.tilesLayout);if(!h)return E.return(null);k=e.width||0;l=e.height||0;m=k/h.mc;n=l/h.rows;p=h.mc*h.rows;r=g.j-g.startTime;
697
+ q.Eg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return P(function(E){if(1==E.g){if(c.m!=sp&&c.m!=Dp)return E.return(null);d=c.qd;c.i&&(d=c.i.imageStreams);return(e=d.find(function(H){return H.id==a}))?e.segmentIndex?E.u(2):G(E,e.createSegmentIndex(),2):E.return(null)}f=e.segmentIndex.find(b);if(null==f)return E.return(null);g=e.segmentIndex.get(f);h=Kp(g.tilesLayout||e.tilesLayout);if(!h)return E.return(null);k=e.width||0;l=e.height||0;m=k/h.mc;n=l/h.rows;p=h.mc*h.rows;r=g.j-g.startTime;
698
698
  u=g.B||r/p;v=g.startTime;z=w=0;1<p&&(y=Math.floor((b-g.startTime)/u),v=g.startTime+y*u,w=y%h.mc*m,z=Math.floor(y/h.mc)*n);B=!1;if(C=g.A)B=!0,n=C.height,w=C.positionX,z=C.positionY,m=C.width;return E.return({segment:g,imageHeight:l,imageWidth:k,height:n,positionX:w,positionY:z,startTime:v,duration:u,uris:g.N(),width:m,sprite:B})})};
699
699
  q.bh=function(a){if(this.i&&this.j&&!this.Ka()){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.s&&(rl(this.A.h,b,!1),hm(this.j,b),Lp(this),this.kb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){var c=Cp(this);b=c.find(function(d){return"disabled"!==d.mode});c=c.find(function(d){return ng(d)===a.id});b!==c&&(b&&(b.mode="disabled",this.l.fb(b,"cuechange"),this.C.remove(0,Infinity)),c&&Fp(this,c));Lp(this)}};
700
700
  function Fp(a,b){a.l.D(b,"cuechange",function(){a.C.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c=Array.from(b.activeCues||[]).map(sn).filter(yf);a.C.append(c)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
701
- q.Pf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j&&!this.Ka()){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sg(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Za("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");qp(this,d,!1,b,c);
702
- this.za=new Fg(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);hp(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,ng(c)==a.id){Mp(this,c);break}};q.Nh=function(){return Np(this.qc())};q.gi=function(){return Np(this.Jc())};q.Mh=function(){return Array.from(Op(this.qc()))};q.fi=function(){return Array.from(Op(this.Jc()))};
703
- q.ah=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.G&&!this.Ka()){this.za=new Gg(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;e=this.za.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=
704
- f.value,sg(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=jg(c),this.Pf(a,!0,d)):Jo(this))}else this.h&&this.h.audioTracks&&(d=ug(this.qc(),a,b||"",!1)[0])&&this.Pf(d)};q.Of=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G&&!this.Ka()){if(this.kb=a,this.pd=b||"",this.od=c,(a=ug(this.i.textStreams,this.kb,this.pd,this.od)[0]||null)&&a!=this.j.s&&(rl(this.A.h,a,!1),this.g.streaming.alwaysStreamText||this.tf()))hm(this.j,a),Lp(this)}else(a=ug(this.Jc(),a,b||"",c)[0])&&this.bh(a)};
705
- q.Yi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G&&!this.Ka()){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.za=new Gg(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,""),Jo(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Mp(this,
706
- b)}};q.tf=function(){var a=this.ma;return this.C?this.C.isTextVisible():a};q.Ag=function(){return this.h&&this.h.src&&this.h.textTracks?Pp(this).map(function(a){return pg(a)}):[]};
701
+ q.Nf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j&&!this.Ka()){var d=this.i.variants.find(function(f){return f.id==a.id});if(d&&sg(d)){var e=this.j.j;this.g.abr.enabled&&(e.video!=d.video||e.audio&&d.audio&&e.audio.language==d.audio.language&&e.audio.channelsCount==d.audio.channelsCount)&&Za("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");qp(this,d,!1,b,c);
702
+ this.Ea=new Fg(d,this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups);hp(this)}}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,ng(c)==a.id){Mp(this,c);break}};q.Nh=function(){return Np(this.qc())};q.gi=function(){return Np(this.Jc())};q.Mh=function(){return Array.from(Op(this.qc()))};q.fi=function(){return Array.from(Op(this.Jc()))};
703
+ q.ah=function(a,b,c,d,e){c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;if(this.i&&this.G&&!this.Ka()){this.Ea=new Gg(a,b||"",c,"",!1,"","","",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,e);a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;e=this.Ea.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())f=
704
+ f.value,sg(f)&&(!c||a(c,b)>a(f,b))&&(c=f);c!=b&&(c?(a=jg(c),this.Nf(a,!0,d)):Jo(this))}else this.h&&this.h.audioTracks&&(d=ug(this.qc(),a,b||"",!1)[0])&&this.Nf(d)};q.Mf=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.G&&!this.Ka()){if(this.kb=a,this.pd=b||"",this.od=c,(a=ug(this.i.textStreams,this.kb,this.pd,this.od)[0]||null)&&a!=this.j.s&&(rl(this.A.h,a,!1),this.g.streaming.alwaysStreamText||this.rf()))hm(this.j,a),Lp(this)}else(a=ug(this.Jc(),a,b||"",c)[0])&&this.bh(a)};
705
+ q.Yi=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.G&&!this.Ka()){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Ea=new Gg(d.language,"",0,"",!1,"",a,"",this.g.mediaSource.codecSwitchingStrategy,this.g.manifest.dash.enableAudioGroups,""),Jo(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Mp(this,
706
+ b)}};q.rf=function(){var a=this.ma;return this.C?this.C.isTextVisible():a};q.yg=function(){return this.h&&this.h.src&&this.h.textTracks?Pp(this).map(function(a){return pg(a)}):[]};
707
707
  q.Ph=function(a){if(!this.h||!this.h.src||!this.h.textTracks)return[];var b=Cf(a),c=Pp(this).filter(function(h){return Cf(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
708
708
  function Cp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Hp(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function Pp(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
709
709
  q.ih=function(a){a=!!a;this.ma!=a&&(this.ma=a,this.m==sp?(this.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.s||(a=ug(this.i.textStreams,this.kb,this.pd,this.od),0<a.length&&(hm(this.j,a[0]),Lp(this))):dm(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.C.setTextVisibility(a),yp(this))};
710
- q.bi=function(){if(this.G)var a=this.G.zd();else{if(null==this.ja)return new Date;a=this.ja}if(this.i&&!this.Ka()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.Fg=function(){if(this.i&&!this.Ka()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
711
- q.Nd=function(){return this.U()?this.i?this.i.presentationTimeline.Nd():null:null};q.Cb=function(){if(this.m==sp)return this.I.Cb();var a={total:[],audio:[],video:[],text:[]};this.m==Dp&&(a.total=ej(this.h.buffered));return a};
710
+ q.bi=function(){if(this.G)var a=this.G.zd();else{if(null==this.ja)return new Date;a=this.ja}if(this.i&&!this.Ka()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.Dg=function(){if(this.i&&!this.Ka()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
711
+ q.Nd=function(){return this.U()?this.i?this.i.presentationTimeline.Nd():null:null};q.Bb=function(){if(this.m==sp)return this.I.Bb();var a={total:[],audio:[],video:[],text:[]};this.m==Dp&&(a.total=ej(this.h.buffered));return a};
712
712
  q.getStats=function(){if(this.m!=sp&&this.m!=Dp)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:[],
713
- stateHistory:[]};mp(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.U()){var c=this.A;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.A.R=this.G.hg(),this.A.Y=this.G.ig());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.O=Number(c.droppedVideoFrames);b.M=d;this.A.L=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.H?c.H:NaN):c=NaN;this.A.o=c;if(this.m==sp){c=this.j.j;b=this.j.s;if(c){d=this.K?this.K.i:1;
714
- var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.A.A=e}c&&c.video&&(b=this.A,d=c.video.height||NaN,b.m=c.video.width||NaN,b.l=d);this.U()&&(c=this.Fg().valueOf()+1E3*a.currentTime,this.A.B=(Date.now()-c)/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));c=this.o.getBandwidthEstimate();this.A.s=c}this.m==Dp&&(c=this.A,c.lc=isNaN(c.lc)?NaN:c.lc+NaN,c=this.A,b=a.videoHeight||NaN,c.m=a.videoWidth||NaN,c.l=
715
- b);var f=this.A;a=f.m;c=f.l;b=f.A;d=f.M;e=f.O;var g=f.L,h=f.Y,k=f.R,l=f.s,m=f.i,n=f.C,p=f.H,r=f.j,u=ol(f.g,"playing"),v=ol(f.g,"paused"),w=ol(f.g,"buffering"),z=f.o,y=f.B,B=f.I,C=f.Lg,E=f.lc,H=f.K,A=f.G,D=f.F,F=pl(f.g),J=[];f=t(f.h.g);for(var L=f.next();!L.done;L=f.next())L=L.value,J.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,
713
+ stateHistory:[]};mp(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.U()){var c=this.A;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.G&&(this.A.R=this.G.fg(),this.A.Y=this.G.gg());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.O=Number(c.droppedVideoFrames);b.M=d;this.A.L=Number(c.corruptedVideoFrames)}this.B?(c=this.B,c=c.H?c.H:NaN):c=NaN;this.A.o=c;if(this.m==sp){c=this.j.j;b=this.j.s;if(c){d=this.K?this.K.i:1;
714
+ var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.A.A=e}c&&c.video&&(b=this.A,d=c.video.height||NaN,b.m=c.video.width||NaN,b.l=d);this.U()&&(c=this.Dg().valueOf()+1E3*a.currentTime,this.A.B=(Date.now()-c)/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));c=this.o.getBandwidthEstimate();this.A.s=c}this.m==Dp&&(c=this.A,c.lc=isNaN(c.lc)?NaN:c.lc+NaN,c=this.A,b=a.videoHeight||NaN,c.m=a.videoWidth||NaN,c.l=
715
+ b);var f=this.A;a=f.m;c=f.l;b=f.A;d=f.M;e=f.O;var g=f.L,h=f.Y,k=f.R,l=f.s,m=f.i,n=f.C,p=f.H,r=f.j,u=ol(f.g,"playing"),v=ol(f.g,"paused"),w=ol(f.g,"buffering"),z=f.o,y=f.B,B=f.I,C=f.Kg,E=f.lc,H=f.K,A=f.G,D=f.F,F=pl(f.g),J=[];f=t(f.h.g);for(var L=f.next();!L.done;L=f.next())L=L.value,J.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,
716
716
  estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:z,liveLatency:y,maxSegmentDuration:B,manifestSizeBytes:C,bytesDownloaded:E,nonFatalErrorCount:H,manifestPeriodCount:A,manifestGapCount:D,stateHistory:F,switchHistory:J}};
717
717
  q.zh=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,z,y,B,C;return P(function(E){switch(E.g){case 1:if(h.m!=sp&&h.m!=Dp)throw new T(1,7,7004);"subtitles"!=c&&"captions"!=c&&Za("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){E.u(2);break}return G(E,Qp(h,a),3);case 3:d=E.h;case 2:k=[];h.s&&(k=h.s.getCuePoints());if(h.m!=Dp){E.u(4);break}g&&(c="forced");return G(E,Rp(h,a,b,c,d,f||"",k),5);case 5:l=Cf(b);m=h.Jc();if(n=m.find(function(H){return Cf(H.language)==
718
- l&&H.label==(f||"")&&H.kind==c}))return gp(h),E.return(n);throw new T(1,2,2012);case 4:p=We;r=h.Xa();u=r.end-r.start;h.i&&(u=h.i.presentationTimeline.getDuration());if(Infinity==u)throw new T(1,4,4033);if(!k.length){E.u(6);break}return G(E,Sp(h,a,h.F,h.g.streaming.retryParameters),7);case 7:v=E.h,w=Tp(h,v,d,k),z=new Blob([w],{type:"text/vtt"}),a=ek(z),d="text/vtt";case 6:y={id:h.fg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:hl(0,u,[a]),mimeType:d||
719
- "",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Ze(d||"",e||"")])};B=Ze(y.mimeType,y.codecs);C=nf(B);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(y);gp(h);return E.return(kg(y))}})};
718
+ l&&H.label==(f||"")&&H.kind==c}))return gp(h),E.return(n);throw new T(1,2,2012);case 4:p=We;r=h.Xa();u=r.end-r.start;h.i&&(u=h.i.presentationTimeline.getDuration());if(Infinity==u)throw new T(1,4,4033);if(!k.length){E.u(6);break}return G(E,Sp(h,a,h.F,h.g.streaming.retryParameters),7);case 7:v=E.h,w=Tp(h,v,d,k),z=new Blob([w],{type:"text/vtt"}),a=ek(z),d="text/vtt";case 6:y={id:h.dg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:hl(0,u,[a]),mimeType:d||
719
+ "",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.wa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Ze(d||"",e||"")])};B=Ze(y.mimeType,y.codecs);C=nf(B);if(!C)throw new T(2,2,2014,d);h.i.textStreams.push(y);gp(h);return E.return(kg(y))}})};
720
720
  q.Ah=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return P(function(E){switch(E.g){case 1:if(c.m!=sp&&c.m!=Dp)throw new T(1,7,7004);if(b){E.u(2);break}return G(E,Qp(c,a),3);case 3:b=E.h;case 2:if("text/vtt"!=b)throw new T(1,2,2017,a);d=We;e=c.Xa();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(Infinity==f)throw new T(1,4,4045);return G(E,Sp(c,a,c.F,c.g.streaming.retryParameters),4);case 4:g=E.h;h=of[b];if(!h)throw new T(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
721
- segmentEnd:f,vttOffset:0};m=xb(g);n=k.parseMedia(m,l,a,[]);p=[];r=t(n);u=r.next();for(v={};!u.done;v={ye:void 0,Fc:void 0},u=r.next())v.Fc=u.value,v.ye=null,w=function(H){return function(){null==H.ye&&(H.ye=Oe([a],[H.Fc.payload]));return H.ye||[]}}(v),z=new Wi(v.Fc.startTime,v.Fc.endTime,w,0,null,null,0,0,Infinity),v.Fc.payload.includes("#xywh")&&(y=v.Fc.payload.split("#xywh=")[1].split(","),4===y.length&&z.jh({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
722
- 10)})),p.push(z);B=b;if(!p.length){E.u(5);break}return G(E,ln(p[0].N()[0],c.F,c.g.manifest.retryParameters),6);case 6:B=E.h;case 5:return C={id:c.fg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new fl(p),mimeType:B||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Fe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,
721
+ segmentEnd:f,vttOffset:0};m=yb(g);n=k.parseMedia(m,l,a,[]);p=[];r=t(n);u=r.next();for(v={};!u.done;v={ye:void 0,Fc:void 0},u=r.next())v.Fc=u.value,v.ye=null,w=function(H){return function(){null==H.ye&&(H.ye=Oe([a],[H.Fc.payload]));return H.ye||[]}}(v),z=new Wi(v.Fc.startTime,v.Fc.endTime,w,0,null,null,0,0,Infinity),v.Fc.payload.includes("#xywh")&&(y=v.Fc.payload.split("#xywh=")[1].split(","),4===y.length&&z.jh({height:parseInt(y[3],10),positionX:parseInt(y[0],10),positionY:parseInt(y[1],10),width:parseInt(y[2],
722
+ 10)})),p.push(z);B=b;if(!p.length){E.u(5);break}return G(E,ln(p[0].N()[0],c.F,c.g.manifest.retryParameters),6);case 6:B=E.h;case 5:return C={id:c.dg++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new fl(p),mimeType:B||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Fe,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,
723
723
  spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Ze(B||"","")])},c.m==Dp?c.qd.push(C):c.i.imageStreams.push(C),gp(c),E.return(lg(C))}})};
724
- q.yh=function(a,b,c){var d=this,e,f,g,h;return P(function(k){switch(k.g){case 1:if(d.m!=sp&&d.m!=Dp)throw new T(1,7,7004);if(c){k.u(2);break}return G(k,Qp(d,a),3);case 3:c=k.h;case 2:return e=[],d.s&&(e=d.s.getCuePoints()),G(k,Rp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ag();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return G(k,new Promise(function(l,m){d.l.ua(f,"load",l);d.l.ua(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return gp(d),k.return(h);case 5:throw new T(1,
724
+ q.yh=function(a,b,c){var d=this,e,f,g,h;return P(function(k){switch(k.g){case 1:if(d.m!=sp&&d.m!=Dp)throw new T(1,7,7004);if(c){k.u(2);break}return G(k,Qp(d,a),3);case 3:c=k.h;case 2:return e=[],d.s&&(e=d.s.getCuePoints()),G(k,Rp(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.yg();h=g.find(function(l){return l.language==b});if(!h){k.u(5);break}return G(k,new Promise(function(l,m){d.l.va(f,"load",l);d.l.va(f,"error",function(){m(new T(1,2,2015))})}),6);case 6:return gp(d),k.return(h);case 5:throw new T(1,
725
725
  2,2012);}})};function Qp(a,b){var c;return P(function(d){switch(d.g){case 1:return ta(d,2),G(d,ln(b,a.F,a.g.streaming.retryParameters),4);case 4:c=d.h;va(d,3);break;case 2:wa(d);case 3:if(c)return d.return(c);throw new T(1,2,2011,b);}})}
726
726
  function Rp(a,b,c,d,e,f,g){var h,k,l,m;return P(function(n){if(1==n.g)return"text/vtt"!=e||g.length?G(n,Sp(a,b,a.F,a.g.streaming.retryParameters),3):n.u(2);2!=n.g&&(h=n.h,k=Tp(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ek(l),e="text/vtt");m=document.createElement("track");var p=a.O,r=b;try{if(p.g.enabled){var u=eo(p);u.ot=ro;u.su=!0;var v=io(u);var w=jo(r,v)}else w=r}catch(z){$a("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",z),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
727
727
  a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function Sp(a,b,c,d){var e,f,g;return P(function(h){if(1==h.g){e=yh;f=sh([b],d);f.method="GET";var k=a.O;try{k.g.enabled&&ko(k,f,{ot:ro,su:!0})}catch(l){$a("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return G(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
728
- function Tp(a,b,c,d){var e=of[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=xb(b),b=c.parseMedia(b,a,null,[]),Vn(b,d);throw new T(2,2,2014,c);}q.cj=function(a,b){this.fa.width=a;this.fa.height=b};q.Lf=function(a){if(this.m==sp){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.jd||d.Ma||d.yb||(d.jd=!1,cm(b,d,a));b=!0}}else b=!1;return b};
728
+ function Tp(a,b,c,d){var e=of[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=yb(b),b=c.parseMedia(b,a,null,[]),Vn(b,d);throw new T(2,2,2014,c);}q.cj=function(a,b){this.fa.width=a;this.fa.height=b};q.Kf=function(a){if(this.m==sp){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.A)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.jd||d.Ma||d.yb||(d.jd=!1,cm(b,d,a));b=!0}}else b=!1;return b};
729
729
  q.hf=function(){Za("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.");return this.i};q.Xh=function(){return this.hb};
730
730
  q.Sh=function(){var a={video:null,audio:null,text:null};if(this.m!=sp)return a;var b=this.j.j,c=this.h.currentTime;b=t([b.video,b.audio,this.j.s]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==Ue&&(a.text=e)}return a};
731
- function Eo(a){var b=Nm();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Lf(d))}};b.textDisplayFactory=function(){return!a.ce||rc()&&!document.fullscreenEnabled?HTMLMediaElement.prototype.addTextTrack?new tn(a.h,"Shaka Player TextTrack"):new Jn:new Mn(a.h,a.ce)};return b}q.mh=function(a){this.ce=a};
732
- function cp(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new il,l=e.closedCaptions.get(g);h={id:a.fg++,originalId:g,groupId:null,
731
+ function Eo(a){var b=Nm();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Kf(d))}};b.textDisplayFactory=function(){return!a.ce||rc()&&!document.fullscreenEnabled?HTMLMediaElement.prototype.addTextTrack?new tn(a.h,"Shaka Player TextTrack"):new Jn:new Mn(a.h,a.ce)};return b}q.mh=function(a){this.ce=a};
732
+ function cp(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new il,l=e.closedCaptions.get(g);h={id:a.dg++,originalId:g,groupId:null,
733
733
  createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Ue,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Ze(h,"")])};b.textStreams.push(h);c.add(g)}}
734
734
  function wp(a,b){var c,d,e,f,g;return P(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return P(function(r){if(1==r.g)return k?G(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.Kb(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},G(h,e(c,b),2);if(3!=h.g)return f=h.h,G(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
735
735
  function To(a){var b=a.qf();if(a.A&&a.M&&a.G){var c=a.K;c.j=b;kl(c);a.O&&(c=a.O,b||c.l||(c.l=!0),c.l&&b&&(c.m=!0),c.o=b);mp(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Be<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.R&&(a.R=Math.min(a.R+ ++a.Be*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(Mo("buffering",
736
736
  b))}function mp(a){if(a.A&&a.M){var b=a.A.g,c="playing";a.M.g==Tg?c="buffering":a.Lc()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(Mo("statechanged",c)))}}
737
- function Ap(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.zg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.xd(d,!1):1==e&&b!==a.K.pc()&&a.Yc()}if(c&&(c=a.Xa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
737
+ function Ap(a){var b=a.h.playbackRate,c=a.U();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.xg();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.xd(d,!1):1==e&&b!==a.K.pc()&&a.Yc()}if(c&&(c=a.Xa(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
738
738
  if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?
739
739
  k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.R||"number"!==typeof g||(a.R=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Da&&null!==a.R&&"number"===typeof g&&a.Be<n&&Date.now()-a.Da>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
740
740
  a.R=Math.max(a.R-(g-f)/2,f+d),a.Da=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==Dp&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.M.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.xd(m,!1):void 0!=h&&l&&g-d>h?(b!=l&&a.xd(l,!1),a.Da=null):void 0!=k&&m&&g-d<k?(b!=m&&a.xd(m,!1),a.Da=null):b!==a.K.pc()&&(a.Yc(),a.Da=Date.now())}}
741
- function Bp(a){if(a.h){var b=function(e,f){var g=void 0===g?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.dg<e?(a.dg=e,!0):!1},c=a.Xa();c=c.end-c.start;c=0<c?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=Mo("started");else b(25,c)?d=Mo("firstquartile"):b(50,c)?d=Mo("midpoint"):b(75,c)?d=Mo("thirdquartile"):(b(100,c)&&(d=Mo("complete")),a.g&&Infinity!=a.g.playRangeEnd&&a.Lc()&&a.h.pause());d&&a.dispatchEvent(d)}}}
742
- function hp(a){try{Li(a.$d,a.i)}catch(c){return Ro(a,c),!1}var b=tg(a.i.variants);b=a.za.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Jo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=hp(a)?a.o.chooseVariant():null)&&qp(a,f,e,b,c,d)}
741
+ function Bp(a){if(a.h){var b=function(e,f){var g=void 0===g?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.bg<e?(a.bg=e,!0):!1},c=a.Xa();c=c.end-c.start;c=0<c?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=Mo("started");else b(25,c)?d=Mo("firstquartile"):b(50,c)?d=Mo("midpoint"):b(75,c)?d=Mo("thirdquartile"):(b(100,c)&&(d=Mo("complete")),a.g&&Infinity!=a.g.playRangeEnd&&a.Lc()&&a.h.pause());d&&a.dispatchEvent(d)}}}
742
+ function hp(a){try{Li(a.$d,a.i)}catch(c){return Ro(a,c),!1}var b=tg(a.i.variants);b=a.Ea.create(b);a.o.setVariants(Array.from(b.values()));return!0}function Jo(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=hp(a)?a.o.chooseVariant():null)&&qp(a,f,e,b,c,d)}
743
743
  function qp(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&gm(a.j,b,d,e,!0);else{var h=a.A.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));gm(a.j,b,d,e,f,c);d=null;g&&(d=jg(g));b=jg(b);b.active=!0;c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&ak(a.L,b,a.jf()),c=Mo("adaptation",c),Up(a,c)):Vp(a,d,b)}}
744
744
  function Mp(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=rg(c),b=rg(b),Vp(a,c,b))}function xp(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Cf(a.g.preferredTextLanguage);c=Cf(c.language);if(2==a.g.autoShowText)return Bf(c,d);if(3==a.g.autoShowText){if(!b)return!1;a=Cf(b.language);return Bf(c,d)&&!Bf(a,c)}Za("Invalid autoShowText setting!");return!1}
745
745
  function gp(a){var b=Mo("trackschanged");Up(a,b)}function Vp(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&ak(a.L,c,a.jf());c=Mo("variantchanged",b);Up(a,c)}function Lp(a){var b=Mo("textchanged");Up(a,b)}function yp(a){var b=Mo("texttrackvisibility");Up(a,b)}function zp(a){a.g.abr.enabled||Io(a);var b=(new Map).set("newStatus",a.g.abr.enabled);Up(a,Mo("abrstatuschanged",b))}
746
746
  function Io(a,b){b=void 0===b?!0:b;if(a.m==sp){a.ie.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&hp(a)}}
747
- q.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===No||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.ie.Oa(1);b=this.Cb().video.reduce(function(h,
747
+ q.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===No||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.ie.Oa(1);b=this.Bb().video.reduce(function(h,
748
748
  k){return h+k.end-k.start},0);Jo(this,!1,b,!0,!1);return!0}return!1};
749
- function Ro(a,b){var c,d,e,f;return P(function(g){switch(g.g){case 1:if(a.m==No)return g.return();1===b.severity&&a.A.K++;c=!0;if(!(a.Ea&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){g.u(2);break}ta(g,3);return G(g,Bm(a.j),5);case 5:d=g.h;c=!d;d&&(e=Mo("mediasourcerecovered"),a.dispatchEvent(e));va(g,2);break;case 3:wa(g),c=!0;case 2:if(!c)return g.return();2===b.severity&&Io(a,!1);f=Mo("error",(new Map).set("detail",b));a.dispatchEvent(f);f.defaultPrevented&&(b.handled=!0);
749
+ function Ro(a,b){var c,d,e,f;return P(function(g){switch(g.g){case 1:if(a.m==No)return g.return();1===b.severity&&a.A.K++;c=!0;if(!(a.oa&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){g.u(2);break}ta(g,3);return G(g,Bm(a.j),5);case 5:d=g.h;c=!d;d&&(e=Mo("mediasourcerecovered"),a.dispatchEvent(e));va(g,2);break;case 3:wa(g),c=!0;case 2:if(!c)return g.return();2===b.severity&&Io(a,!1);f=Mo("error",(new Map).set("detail",b));a.dispatchEvent(f);f.defaultPrevented&&(b.handled=!0);
750
750
  I(g)}})}q.addFont=function(a,b){var c,d,e,f,g;return P(function(h){if(1==h.g)return"fonts"in document&&"FontFace"in window?G(h,document.fonts.ready,3):h.u(0);if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();!1===m.done;)l.push(m.value),m=k.next();return l};d=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family==a&&"swap"==f.display)return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);I(h)})};
751
751
  function ep(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(Mo(b,a))}
752
752
  function fp(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(Mo(d?"audiotrackchanged":"mediaqualitychanged",b))}
753
753
  function Qo(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new T(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new T(2,3,3016,c,b,a.h.error.message)}function pp(a,b,c){0<b&&(a.U()||a.lh(b));b=a.getDuration();c<b&&(a.U()||a.eb(c))}function Up(a,b){P(function(c){if(1==c.g)return G(c,Promise.resolve(),2);a.m!=No&&a.dispatchEvent(b);I(c)})}
754
754
  function Op(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Cf(c.language)):b.add("und");return b}
755
755
  function Np(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Cf(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
756
- h.push({language:l,role:m,label:n})}});return h}q.Ka=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};q.Lc=function(){return!this.h||this.h.ended?!0:this.h.currentTime>=this.Xa().end};S("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.Lc;Y.prototype.isRemotePlayback=Y.prototype.Ka;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.mh;Y.prototype.getFetchedPlaybackInfo=Y.prototype.Sh;Y.prototype.getManifestParserFactory=Y.prototype.Xh;
757
- Y.prototype.getManifest=Y.prototype.hf;Y.prototype.retryStreaming=Y.prototype.Lf;Y.prototype.setMaxHardwareResolution=Y.prototype.cj;Y.prototype.addChaptersTrack=Y.prototype.yh;Y.prototype.addThumbnailsTrack=Y.prototype.Ah;Y.prototype.addTextTrackAsync=Y.prototype.zh;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.Cb;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Nd;Y.prototype.getPresentationStartTimeAsDate=Y.prototype.Fg;
758
- Y.prototype.getPlayheadTimeAsDate=Y.prototype.bi;Y.prototype.setTextTrackVisibility=Y.prototype.ih;Y.prototype.getChapters=Y.prototype.Ph;Y.prototype.getChaptersTracks=Y.prototype.Ag;Y.prototype.isTextTrackVisible=Y.prototype.tf;Y.prototype.selectVariantsByLabel=Y.prototype.Yi;Y.prototype.selectTextLanguage=Y.prototype.Of;Y.prototype.selectAudioLanguage=Y.prototype.ah;Y.prototype.getTextLanguages=Y.prototype.fi;Y.prototype.getAudioLanguages=Y.prototype.Mh;Y.prototype.getTextLanguagesAndRoles=Y.prototype.gi;
759
- Y.prototype.getAudioLanguagesAndRoles=Y.prototype.Nh;Y.prototype.selectVariantTrack=Y.prototype.Pf;Y.prototype.selectTextTrack=Y.prototype.bh;Y.prototype.getThumbnails=Y.prototype.Gg;Y.prototype.getAllThumbnails=Y.prototype.Lh;Y.prototype.getImageTracks=Y.prototype.Uh;Y.prototype.getTextTracks=Y.prototype.Jc;Y.prototype.getVariantTracks=Y.prototype.qc;Y.prototype.cancelTrickPlay=Y.prototype.Yc;Y.prototype.trickPlay=Y.prototype.xd;Y.prototype.getPlaybackRate=Y.prototype.lb;
760
- Y.prototype.isBuffering=Y.prototype.qf;Y.prototype.getKeyStatuses=Y.prototype.Ld;Y.prototype.getActiveSessionsMetadata=Y.prototype.gf;Y.prototype.getExpiration=Y.prototype.ed;Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.si;Y.prototype.goToLive=Y.prototype.ni;Y.prototype.seekRange=Y.prototype.Xa;Y.prototype.isAudioOnly=Y.prototype.ri;Y.prototype.isInProgress=Y.prototype.tc;Y.prototype.isLive=Y.prototype.U;
761
- Y.prototype.getAdManager=Y.prototype.yg;Y.prototype.getAssetUri=Y.prototype.Ic;Y.prototype.getNetworkingEngine=Y.prototype.Db;Y.prototype.getMediaElement=Y.prototype.$h;Y.prototype.getManifestType=Y.prototype.jf;Y.prototype.getLoadMode=Y.prototype.Cg;Y.prototype.resetConfiguration=Y.prototype.Ti;Y.prototype.getBufferFullness=Y.prototype.zg;Y.prototype.getNonDefaultConfiguration=Y.prototype.Eg;Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.configure=Y.prototype.configure;
762
- Y.prototype.releaseAllMutexes=Y.prototype.Pi;Y.prototype.destroyAllPreloads=Y.prototype.Re;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.ug;Y.prototype.unloadAndSavePreload=Y.prototype.gj;Y.prototype.load=Y.prototype.load;Y.prototype.updateStartTime=Y.prototype.kj;Y.prototype.unload=Y.prototype.jc;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.Eh;Y.prototype.attach=Y.prototype.Tb;
756
+ h.push({language:l,role:m,label:n})}});return h}q.Ka=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};q.Lc=function(){return!this.h||this.h.ended?!0:this.oa&&!this.U()&&this.h.currentTime>=this.Xa().end};S("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.Lc;Y.prototype.isRemotePlayback=Y.prototype.Ka;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.mh;Y.prototype.getFetchedPlaybackInfo=Y.prototype.Sh;
757
+ Y.prototype.getManifestParserFactory=Y.prototype.Xh;Y.prototype.getManifest=Y.prototype.hf;Y.prototype.retryStreaming=Y.prototype.Kf;Y.prototype.setMaxHardwareResolution=Y.prototype.cj;Y.prototype.addChaptersTrack=Y.prototype.yh;Y.prototype.addThumbnailsTrack=Y.prototype.Ah;Y.prototype.addTextTrackAsync=Y.prototype.zh;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.Bb;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Nd;
758
+ Y.prototype.getPresentationStartTimeAsDate=Y.prototype.Dg;Y.prototype.getPlayheadTimeAsDate=Y.prototype.bi;Y.prototype.setTextTrackVisibility=Y.prototype.ih;Y.prototype.getChapters=Y.prototype.Ph;Y.prototype.getChaptersTracks=Y.prototype.yg;Y.prototype.isTextTrackVisible=Y.prototype.rf;Y.prototype.selectVariantsByLabel=Y.prototype.Yi;Y.prototype.selectTextLanguage=Y.prototype.Mf;Y.prototype.selectAudioLanguage=Y.prototype.ah;Y.prototype.getTextLanguages=Y.prototype.fi;
759
+ Y.prototype.getAudioLanguages=Y.prototype.Mh;Y.prototype.getTextLanguagesAndRoles=Y.prototype.gi;Y.prototype.getAudioLanguagesAndRoles=Y.prototype.Nh;Y.prototype.selectVariantTrack=Y.prototype.Nf;Y.prototype.selectTextTrack=Y.prototype.bh;Y.prototype.getThumbnails=Y.prototype.Eg;Y.prototype.getAllThumbnails=Y.prototype.Lh;Y.prototype.getImageTracks=Y.prototype.Uh;Y.prototype.getTextTracks=Y.prototype.Jc;Y.prototype.getVariantTracks=Y.prototype.qc;Y.prototype.cancelTrickPlay=Y.prototype.Yc;
760
+ Y.prototype.trickPlay=Y.prototype.xd;Y.prototype.getPlaybackRate=Y.prototype.lb;Y.prototype.isBuffering=Y.prototype.qf;Y.prototype.getKeyStatuses=Y.prototype.Ld;Y.prototype.getActiveSessionsMetadata=Y.prototype.gf;Y.prototype.getExpiration=Y.prototype.ed;Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.si;Y.prototype.goToLive=Y.prototype.ni;Y.prototype.seekRange=Y.prototype.Xa;Y.prototype.isAudioOnly=Y.prototype.ri;
761
+ Y.prototype.isInProgress=Y.prototype.tc;Y.prototype.isLive=Y.prototype.U;Y.prototype.getAdManager=Y.prototype.wg;Y.prototype.getAssetUri=Y.prototype.Ic;Y.prototype.getNetworkingEngine=Y.prototype.Cb;Y.prototype.getMediaElement=Y.prototype.$h;Y.prototype.getManifestType=Y.prototype.jf;Y.prototype.getLoadMode=Y.prototype.Ag;Y.prototype.resetConfiguration=Y.prototype.Ti;Y.prototype.getBufferFullness=Y.prototype.xg;Y.prototype.getNonDefaultConfiguration=Y.prototype.Cg;Y.prototype.getConfiguration=Y.prototype.getConfiguration;
762
+ Y.prototype.configure=Y.prototype.configure;Y.prototype.releaseAllMutexes=Y.prototype.Pi;Y.prototype.destroyAllPreloads=Y.prototype.Re;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.sg;Y.prototype.unloadAndSavePreload=Y.prototype.gj;Y.prototype.load=Y.prototype.load;Y.prototype.updateStartTime=Y.prototype.kj;Y.prototype.unload=Y.prototype.jc;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.Eh;Y.prototype.attach=Y.prototype.Sb;
763
763
  Y.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:b={};if(!a){k.u(2);break}return G(k,Di(),3);case 3:b=k.h;case 2:var l={};if(bc())for(var m in Pi)l[m]=!0;m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,l[n]=bc()?!!Pi[n]:cc(n);c=l;m='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.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(x($e));
764
764
  l={};m=t(m);for(n=m.next();!n.done;n=m.next()){n=n.value;l[n]=nf(n)?!0:bc()?lb(n)||(je(n)?!0:!1):cc(n);var p=n.split(";")[0];l[p]=l[p]||l[n]}d=l;return G(k,yc(),4);case 4:e=k.h;f={manifest:c,media:d,drm:b,hardwareResolution:e};g=Wp;for(h in g)f[h]=g[h]();return k.return(f)}})};
765
765
  Y.isBrowserSupported=function(){window.Promise||Za("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||gc("Trident/"))return!1;var a=rc();return a&&9>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:bc()?!0:cc("application/x-mpegurl")};Y.setAdManagerFactory=function(a){Ho=a};
766
- Y.registerSupportPlugin=function(a,b){Wp[a]=b};Y.prototype.destroy=Y.prototype.destroy;var No=0,Do=1,sp=2,Dp=3;Y.LoadMode={DESTROYED:No,NOT_LOADED:Do,MEDIA_SOURCE:sp,SRC_EQUALS:Dp};Y.version="v4.11.19";var Xp=["4","11"];qb=new function(a){this.g=a;this.i=rb;this.h=sb}(new ob(Number(Xp[0]),Number(Xp[1])));var Wp={},Ho=null;function Yp(){this.g=[];this.i=this.l=this.j=this.h=0}function Zp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function $p(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new gb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=$p.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};
766
+ Y.registerSupportPlugin=function(a,b){Wp[a]=b};Y.prototype.destroy=Y.prototype.destroy;var No=0,Do=1,sp=2,Dp=3;Y.LoadMode={DESTROYED:No,NOT_LOADED:Do,MEDIA_SOURCE:sp,SRC_EQUALS:Dp};Y.version="v4.11.21";var Xp=["4","11"];qb=new function(a){this.g=a;this.i=sb;this.h=tb}(new ob(Number(Xp[0]),Number(Xp[1])));var Wp={},Ho=null;function Yp(){this.g=[];this.i=this.l=this.j=this.h=0}function Zp(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function $p(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new gb;this.m.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=$p.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};
767
767
  q.isPaused=function(){return this.i};q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};
768
768
  q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};
769
769
  q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
@@ -776,12 +776,12 @@ function bq(a,b){var c=[],d=0;null!=b&&(d=b);a=t(cd(a,"Ad"));for(var e=a.next();
776
776
  0)-(parseInt(k.attributes.height,10)||0)});g=t(g);for(h=g.next();!h.done;h=g.next())if(h=ed(h.value)){c.push({id:null,startTime:d,endTime:null,uri:h,isSkippable:null!=f,skipOffset:f,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1});break}}}}return c}S("shaka.ads.Utils",aq);aq.ADS_LOADED="ads-loaded";aq.AD_STARTED="ad-started";aq.AD_FIRST_QUARTILE="ad-first-quartile";aq.AD_MIDPOINT="ad-midpoint";aq.AD_THIRD_QUARTILE="ad-third-quartile";
777
777
  aq.AD_COMPLETE="ad-complete";aq.AD_STOPPED="ad-stopped";aq.AD_SKIPPED="ad-skipped";aq.AD_VOLUME_CHANGED="ad-volume-changed";aq.AD_MUTED="ad-muted";aq.AD_PAUSED="ad-paused";aq.AD_RESUMED="ad-resumed";aq.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";aq.CUEPOINTS_CHANGED="ad-cue-points-changed";aq.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";aq.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";aq.AD_CLICKED="ad-clicked";aq.AD_PROGRESS="ad-progress";aq.AD_BUFFERING="ad-buffering";
778
778
  aq.AD_IMPRESSION="ad-impression";aq.AD_DURATION_CHANGED="ad-duration-changed";aq.AD_CLOSED="ad-closed";aq.AD_LOADED="ad-loaded";aq.ALL_ADS_COMPLETED="all-ads-completed";aq.AD_LINEAR_CHANGED="ad-linear-changed";aq.AD_METADATA="ad-metadata";aq.AD_RECOVERABLE_ERROR="ad-recoverable-error";aq.AD_ERROR="ad-error";aq.AD_BREAK_READY="ad-break-ready";aq.AD_INTERACTION="ad-interaction";aq.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";aq.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";
779
- aq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function cq(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.19");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
780
- google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){dq(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){eq(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.ua(this.i,"play",function(){f.F=!0})}cq.prototype.configure=function(a){this.o=a};cq.prototype.stop=function(){this.g&&this.g.stop();this.s&&Ln(this.s)};
779
+ aq.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function cq(a,b,c,d,e){var f=this;this.s=a;this.i=b;this.F=!1;this.A=this.o=null;this.G=NaN;this.l=e;this.j=null;this.h=new gb;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.C=new google.ima.AdDisplayContainer(this.s,this.i);this.C.initialize();this.m=new google.ima.AdsLoader(this.C);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.11.21");this.g=null;this.B=d||new google.ima.AdsRenderingSettings;this.h.D(this.m,
780
+ google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){dq(f,g)});this.h.D(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){eq(f,g)});this.h.D(this.i,"ended",function(){f.m.contentComplete()});this.h.va(this.i,"play",function(){f.F=!0})}cq.prototype.configure=function(a){this.o=a};cq.prototype.stop=function(){this.g&&this.g.stop();this.s&&Ln(this.s)};
781
781
  cq.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 eq(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new W("ad-error",b));fq(a,null);a.l(new W("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
782
782
  function dq(a,b){a.l(new W("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));if(a.o.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.B);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.B);a.l(new W("ima-ad-manager-loaded",(new Map).set("imaAdManager",
783
783
  a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new W("ad-cue-points-changed",(new Map).set("cuepoints",b)))}gq(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,hq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,hq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.A=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
784
- a.i.offsetHeight,hq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,hq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.ua(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){fq(a,null)}}
784
+ a.i.offsetHeight,hq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,hq(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.F||a.o.skipPlayDetection?a.g.start():a.h.va(a.i,"play",function(){a.F=!0;a.g.start()})}catch(f){fq(a,null)}}
785
785
  function hq(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
786
786
  function gq(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new W(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){eq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){iq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){iq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
787
787
  function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){fq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){fq(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
@@ -796,7 +796,7 @@ q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.releas
796
796
  jq.prototype.getVastMediaWidth=jq.prototype.getVastMediaWidth;jq.prototype.getVastMediaHeight=jq.prototype.getVastMediaHeight;jq.prototype.getVastMediaBitrate=jq.prototype.getVastMediaBitrate;jq.prototype.getDescription=jq.prototype.getDescription;jq.prototype.getTitle=jq.prototype.getTitle;jq.prototype.getPositionInSequence=jq.prototype.getPositionInSequence;jq.prototype.getSequenceLength=jq.prototype.getSequenceLength;jq.prototype.setMuted=jq.prototype.setMuted;jq.prototype.resize=jq.prototype.resize;
797
797
  jq.prototype.isLinear=jq.prototype.isLinear;jq.prototype.isMuted=jq.prototype.isMuted;jq.prototype.setVolume=jq.prototype.setVolume;jq.prototype.getVolume=jq.prototype.getVolume;jq.prototype.play=jq.prototype.play;jq.prototype.pause=jq.prototype.pause;jq.prototype.skip=jq.prototype.skip;jq.prototype.canSkipNow=jq.prototype.canSkipNow;jq.prototype.getTimeUntilSkippable=jq.prototype.getTimeUntilSkippable;jq.prototype.isSkippable=jq.prototype.isSkippable;jq.prototype.isPaused=jq.prototype.isPaused;
798
798
  jq.prototype.getRemainingTime=jq.prototype.getRemainingTime;jq.prototype.getMinSuggestedDuration=jq.prototype.getMinSuggestedDuration;jq.prototype.getDuration=jq.prototype.getDuration;jq.prototype.isClientRendering=jq.prototype.isClientRendering;jq.prototype.needsSkipUI=jq.prototype.needsSkipUI;function kq(a,b,c,d){function e(){if(!f.H&&f.j&&!f.B.Ka()){f.j=f.g.currentTime;f.l&&!f.l.pre&&!f.l.post&&f.j<f.l.startTime&&(f.l=null);var k=lq(f);k&&mq(f,k,1,1,Date.now())}}var f=this;this.M=null;this.G=a;this.B=b;this.g=c;this.F=null;this.A=!0;this.m=this.g;this.i=d;this.I=new Set;this.C=new Set;this.s=new Map;this.h=new Y;nq(this);this.K=new gb;this.o=new gb;this.H=!1;this.l=this.j=null;this.K.D(this.g,"timeupdate",function(){if(!(f.H||f.j||f.B.Ka())){f.j=f.g.currentTime;var k=lq(f,!0);k&&mq(f,
799
- k,1,1,Date.now())}});this.K.D(this.g,"ended",function(){e()});this.L=new ac(e);if("requestVideoFrameCallback"in this.g&&!uc()){var g=this.g,h=function(){e();g.requestVideoFrameCallback(h)};g.requestVideoFrameCallback(h)}else this.L.Oa(.025);this.O=(new ac(function(){var k,l,m,n,p,r,u,v,w,z,y;return P(function(B){switch(B.g){case 1:if(!f.C.size||null==f.j){B.u(0);break}k=f.B.Cg();if(k==No||k==Do)return B.return();l=!1;m=Array.from(f.C);n=f.B.Xa();p=t(m);r=p.next();case 3:if(r.done){B.u(5);break}u=
799
+ k,1,1,Date.now())}});this.K.D(this.g,"ended",function(){e()});this.L=new ac(e);if("requestVideoFrameCallback"in this.g&&!uc()){var g=this.g,h=function(){e();g.requestVideoFrameCallback(h)};g.requestVideoFrameCallback(h)}else this.L.Oa(.025);this.O=(new ac(function(){var k,l,m,n,p,r,u,v,w,z,y;return P(function(B){switch(B.g){case 1:if(!f.C.size||null==f.j){B.u(0);break}k=f.B.Ag();if(k==No||k==Do)return B.return();l=!1;m=Array.from(f.C);n=f.B.Xa();p=t(m);r=p.next();case 3:if(r.done){B.u(5);break}u=
800
800
  r.value;if(u==f.l){B.u(4);break}v=u.endTime||u.startTime;if(!(1<=n.start-v)){w=u.startTime-f.j;0<w&&10>=w&&(f.s.has(u)||f.s.set(u,f.h.preload(u.uri)));B.u(4);break}if(!f.s.has(u)){B.u(7);break}return G(B,f.s.get(u),8);case 8:(z=B.h)&&z.destroy(),f.s.delete(u);case 7:y=JSON.stringify(u),f.I.has(y)&&f.I.delete(y),f.C.delete(u),l=!0;case 4:r=p.next();B.u(3);break;case 5:l&&oq(f),I(B)}})})).Oa(1)}kq.prototype.configure=function(a){this.M=a;pq(this)};
801
801
  function pq(a){if(a.G&&a.M&&!a.H){var b=a.M.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.A==b&&(a.A=!b,a.A?(a.m=a.g,a.F&&(a.F.parentElement&&a.G.removeChild(a.F),a.F=null)):(a.F||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.backgroundColor="rgb(0, 0, 0)",b.setAttribute("playsinline",""),a.F=b),a.m=a.F))}}
802
802
  kq.prototype.stop=function(){this.o&&this.o.Wa();this.I.clear();this.C.clear();this.h.Re();this.s.clear();this.h.detach();this.H=!1;this.l=this.j=null};kq.prototype.release=function(){this.stop();this.K&&this.K.release();this.o&&this.o.release();this.G&&Ln(this.G);this.L&&(this.L.stop(),this.L=null);this.O&&(this.O.stop(),this.O=null);this.h.destroy()};function qq(a,b){var c;P(function(d){if(1==d.g)return nq(a),G(d,rq(a,b),2);c=d.h;c.length?sq(a,c):Za("Unsupported HLS interstitial",b);I(d)})}
@@ -809,15 +809,15 @@ function mq(a,b,c,d,e,f){f=void 0===f?0:f;var g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E;P(
809
809
  D.g)return"detach"!=A.state?D.u(0):uc()?G(D,new Promise(function(F){return(new ac(F)).$(.1)}),3):D.u(3);h.resolve();a.o.fb(a.B,"onstatechange",k);I(D)})};a.o.D(a.B,"onstatechange",k);return G(H,h,2);case 2:return a.A||(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset)),l=!1,m=null,n=function(){if(!a.A&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!=b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var A=Date.now();a.g.currentTime+=
810
810
  (A-e)/1E3;e=A}},p=function(){var A,D;return P(function(F){if(1==F.g){n();m&&m.stop();if(A=lq(a,b.pre,d-f))return a.i(new W("ad-stopped")),a.o.Wa(),mq(a,A,c,++d,e,f),F.u(0);b.post&&(a.j=null,a.l=null);return a.A?G(F,a.h.detach(),4):G(F,a.h.jc(),4)}a.A&&(D=b.resumeOffset,null==D&&(D=b.timelineRange&&b.endTime&&Infinity!=b.endTime?b.endTime-(a.j||0):(Date.now()-e)/1E3),a.i(new W("ad-content-resume-requested",(new Map).set("offset",D))));a.i(new W("ad-stopped"));a.o.Wa();a.H=!1;a.A?oq(a):(n(),a.g.ended||
811
811
  a.g.play());pq(a);I(F)})},r=function(A){return P(function(D){if(l)return D.return();l=!0;a.i(new W("ad-error",(new Map).set("originalEvent",A)));return G(D,p(),0)})},u=function(){return P(function(A){if(1==A.g){if(l)return A.return();l=!0;return G(A,p(),2)}a.i(new W("ad-complete"));I(A)})},v=function(){return P(function(A){if(l)return A.return();l=!0;a.i(new W("ad-skipped"));return G(A,p(),0)})},w=new jq(a.m,b.isSkippable,b.skipOffset,v,c,d),a.A||(w.setMuted(a.g.muted),w.setVolume(a.g.volume)),a.i(new W("ad-started",
812
- (new Map).set("ad",w))),w.canSkipNow()&&a.i(new W("ad-skip-state-changed")),z=new Set,a.o.ua(a.h,"error",r),a.o.D(a.m,"timeupdate",function(){var A=a.m.duration;A&&(b.isSkippable&&b.skipOffset&&w.canSkipNow()&&0<w.getRemainingTime()&&0<w.getDuration()&&a.i(new W("ad-skip-state-changed")),A=100*a.m.currentTime/A,25<=A&&!z.has("firstquartile")?(n(),a.i(new W("ad-first-quartile")),z.add("firstquartile")):50<=A&&!z.has("midpoint")?(n(),a.i(new W("ad-midpoint")),z.add("midpoint")):75<=A&&!z.has("thirdquartile")&&
813
- (n(),a.i(new W("ad-third-quartile")),z.add("thirdquartile")))}),a.o.ua(a.h,"complete",u),a.o.D(a.m,"play",function(){a.i(new W("ad-resumed"))}),a.o.D(a.m,"pause",function(){var A=a.h.getConfiguration();a.m.currentTime>=A.playRangeEnd?u():a.i(new W("ad-paused"))}),a.o.D(a.m,"volumechange",function(){a.m.muted?a.i(new W("ad-muted")):a.i(new W("ad-volume-changed"))}),ta(H,4),nq(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(y=b.endTime-b.startTime,0<y&&a.h.configure("playRangeEnd",
814
- y)),b.playoutLimit&&(m=(new ac(function(){w.skip()})).$(b.playoutLimit),a.h.configure("playRangeEnd",b.playoutLimit)),G(H,a.h.Tb(a.m),6);case 6:return a.s.has(b)?G(H,a.s.get(b),10):G(H,a.h.load(b.uri),8);case 10:return B=H.h,a.s.delete(b),B?G(H,a.h.load(B),8):G(H,a.h.load(b.uri),8);case 8:b.playoutLimit&&(m&&m.stop(),m=(new ac(function(){w.skip()})).$(b.playoutLimit));C=(Date.now()-g)/1E3;a.i(new W("ads-loaded",(new Map).set("loadTime",C)));a.A&&a.g.play();va(H,0);break;case 4:E=wa(H),r(E),I(H)}})}
815
- function rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,U,da;return P(function(V){switch(V.g){case 1:c=[];if(!b)return V.return(c);d=b.values.find(function(ea){return"X-ASSET-URI"==ea.key});e=b.values.find(function(ea){return"X-ASSET-LIST"==ea.key});if(!d&&!e)return V.return(c);f=null;if(g=b.values.find(function(ea){return"ID"==ea.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"==typeof b.endTime&&(k=null==
812
+ (new Map).set("ad",w))),w.canSkipNow()&&a.i(new W("ad-skip-state-changed")),z=new Set,a.o.va(a.h,"error",r),a.o.D(a.m,"timeupdate",function(){var A=a.m.duration;A&&(b.isSkippable&&b.skipOffset&&w.canSkipNow()&&0<w.getRemainingTime()&&0<w.getDuration()&&a.i(new W("ad-skip-state-changed")),A=100*a.m.currentTime/A,25<=A&&!z.has("firstquartile")?(n(),a.i(new W("ad-first-quartile")),z.add("firstquartile")):50<=A&&!z.has("midpoint")?(n(),a.i(new W("ad-midpoint")),z.add("midpoint")):75<=A&&!z.has("thirdquartile")&&
813
+ (n(),a.i(new W("ad-third-quartile")),z.add("thirdquartile")))}),a.o.va(a.h,"complete",u),a.o.D(a.m,"play",function(){a.i(new W("ad-resumed"))}),a.o.D(a.m,"pause",function(){var A=a.h.getConfiguration();a.m.currentTime>=A.playRangeEnd?u():a.i(new W("ad-paused"))}),a.o.D(a.m,"volumechange",function(){a.m.muted?a.i(new W("ad-muted")):a.i(new W("ad-volume-changed"))}),ta(H,4),nq(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(y=b.endTime-b.startTime,0<y&&a.h.configure("playRangeEnd",
814
+ y)),b.playoutLimit&&(m=(new ac(function(){w.skip()})).$(b.playoutLimit),a.h.configure("playRangeEnd",b.playoutLimit)),G(H,a.h.Sb(a.m),6);case 6:return a.s.has(b)?G(H,a.s.get(b),10):G(H,a.h.load(b.uri),8);case 10:return B=H.h,a.s.delete(b),B?G(H,a.h.load(B),8):G(H,a.h.load(b.uri),8);case 8:b.playoutLimit&&(m&&m.stop(),m=(new ac(function(){w.skip()})).$(b.playoutLimit));C=(Date.now()-g)/1E3;a.i(new W("ads-loaded",(new Map).set("loadTime",C)));a.A&&a.g.play();va(H,0);break;case 4:E=wa(H),r(E),I(H)}})}
815
+ function rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,V,da;return P(function(U){switch(U.g){case 1:c=[];if(!b)return U.return(c);d=b.values.find(function(ea){return"X-ASSET-URI"==ea.key});e=b.values.find(function(ea){return"X-ASSET-LIST"==ea.key});if(!d&&!e)return U.return(c);f=null;if(g=b.values.find(function(ea){return"ID"==ea.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"==typeof b.endTime&&(k=null==
816
816
  f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(ea){return"X-RESTRICT"==ea.key});n=m=!0;l&&l.data&&(p=l.data,m=!p.includes("SKIP"),n=!p.includes("JUMP"));r=null;if(u=b.values.find(function(ea){return"X-RESUME-OFFSET"==ea.key}))v=u.data,r=parseFloat(v),isNaN(r)&&(r=null);w=null;if(z=b.values.find(function(ea){return"X-PLAYOUT-LIMIT"==ea.key}))y=z.data,w=parseFloat(y),isNaN(w)&&(w=null);E=C=B=!1;if(H=b.values.find(function(ea){return"CUE"==ea.key}))A=H.data,B=A.includes("ONCE"),C=
817
- A.includes("PRE"),E=A.includes("POST");D=!1;(F=b.values.find(function(ea){return"X-TIMELINE-OCCUPIES"==ea.key}))?(J=F.data,D=J.includes("RANGE")):!u&&a.B.U()&&(D=!C&&!E);if(d){L=d.data;if(!L)return V.return(c);c.push({id:f,startTime:h,endTime:k,uri:L,isSkippable:m,skipOffset:m?0:null,canJump:n,resumeOffset:r,playoutLimit:w,once:B,pre:C,post:E,timelineRange:D});V.u(2);break}if(!e){V.u(2);break}K=e.data;if(!K)return V.return(c);ta(V,4);O={type:11};return G(V,tq(a,K,O),6);case 6:M=V.h;N=Ac(M);R=JSON.parse(N);
818
- Q=t(R.ASSETS);for(U=Q.next();!U.done;U=Q.next())da=U.value,da.URI&&c.push({id:f,startTime:h,endTime:k,uri:da.URI,isSkippable:m,skipOffset:m?0:null,canJump:n,resumeOffset:r,playoutLimit:w,once:B,pre:C,post:E,timelineRange:D});va(V,2);break;case 4:wa(V);case 2:return V.return(c)}})}
819
- function oq(a){for(var b=[],c=t(a.C),d=c.next(),e={};!d.done;e={Sb:void 0},d=c.next())d=d.value,e.Sb={start:d.startTime,end:null},d.pre?(e.Sb.start=0,e.Sb.end=null):d.post?(e.Sb.start=-1,e.Sb.end=null):d.timelineRange&&(e.Sb.end=d.endTime),b.find(function(f){return function(g){return f.Sb.start==g.start&&f.Sb.end==g.end}}(e))||b.push(e.Sb);a.i(new W("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
820
- function nq(a){a.h.configure(a.B.Eg());a.h.configure("ads.disableHLSInterstitial",!0);a.h.configure("ads.disableDASHInterstitial",!0);var b=a.h.Db();b.pg();b.qg();rh(a.B.Db(),b)}function tq(a,b,c){var d,e,f;return P(function(g){if(1==g.g)return d=sh([b],Wg()),e=a.B.Db().request(7,d,c),G(g,e.promise,2);f=g.h;return g.return(f.data)})};function uq(a,b,c,d,e){this.h=a;this.j=Qc(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}q=uq.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};q.isPaused=function(){return this.g.paused};
817
+ A.includes("PRE"),E=A.includes("POST");D=!1;(F=b.values.find(function(ea){return"X-TIMELINE-OCCUPIES"==ea.key}))?(J=F.data,D=J.includes("RANGE")):!u&&a.B.U()&&(D=!C&&!E);if(d){L=d.data;if(!L)return U.return(c);c.push({id:f,startTime:h,endTime:k,uri:L,isSkippable:m,skipOffset:m?0:null,canJump:n,resumeOffset:r,playoutLimit:w,once:B,pre:C,post:E,timelineRange:D});U.u(2);break}if(!e){U.u(2);break}K=e.data;if(!K)return U.return(c);ta(U,4);O={type:11};return G(U,tq(a,K,O),6);case 6:M=U.h;N=Ac(M);R=JSON.parse(N);
818
+ Q=t(R.ASSETS);for(V=Q.next();!V.done;V=Q.next())da=V.value,da.URI&&c.push({id:f,startTime:h,endTime:k,uri:da.URI,isSkippable:m,skipOffset:m?0:null,canJump:n,resumeOffset:r,playoutLimit:w,once:B,pre:C,post:E,timelineRange:D});va(U,2);break;case 4:wa(U);case 2:return U.return(c)}})}
819
+ function oq(a){for(var b=[],c=t(a.C),d=c.next(),e={};!d.done;e={Rb:void 0},d=c.next())d=d.value,e.Rb={start:d.startTime,end:null},d.pre?(e.Rb.start=0,e.Rb.end=null):d.post?(e.Rb.start=-1,e.Rb.end=null):d.timelineRange&&(e.Rb.end=d.endTime),b.find(function(f){return function(g){return f.Rb.start==g.start&&f.Rb.end==g.end}}(e))||b.push(e.Rb);a.i(new W("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
820
+ function nq(a){a.h.configure(a.B.Cg());a.h.configure("ads.disableHLSInterstitial",!0);a.h.configure("ads.disableDASHInterstitial",!0);var b=a.h.Cb();b.ng();b.og();rh(a.B.Cb(),b)}function tq(a,b,c){var d,e,f;return P(function(g){if(1==g.g)return d=sh([b],Wg()),e=a.B.Cb().request(7,d,c),G(g,e.promise,2);f=g.h;return g.return(f.data)})};function uq(a,b,c,d,e){this.h=a;this.j=Qc(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.o=d;this.m=!1}q=uq.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};q.isPaused=function(){return this.g.paused};
821
821
  q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};
822
822
  q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.o};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};
823
823
  q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",uq);uq.prototype.release=uq.prototype.release;uq.prototype.getPodIndex=uq.prototype.getPodIndex;uq.prototype.getTimeOffset=uq.prototype.getTimeOffset;
@@ -858,8 +858,8 @@ q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!goo
858
858
  q.onAssetUnload=function(){this.h&&this.h.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new W("ad-stopped"));this.dispatchEvent(new W("ad-content-attach-requested"));this.m=new Yp};q.requestClientSideAds=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.G=Date.now()/1E3;b.m.requestAds(a)};
859
859
  q.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new T(1,10,10001);var b=this.j;b.B=a;b.g&&b.g.updateAdsRenderingSettings(b.B)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new vq(a,b,c,function(e){return Jq(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new T(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new T(1,10,10004)):(d.l=new Yg,yq(d,a,b),d.H=c||"",d.R=Date.now()/1E3,a=d.l);return a};
860
860
  q.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new T(1,10,10005);var b=this.i;b.G=a;b.i(new W("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new T(2,10,10002);this.g&&this.g.release();this.g=new Hq(a,b,this.o,function(d){return Jq(c,d)});this.g.configure(this.l)};
861
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Za('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 overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.11.19";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
862
- (c.G=!0),c.j=new Yg,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Za('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 overriden.');a.mpt="Shaka Player";a.mpv="v4.11.19";this.g.g.replaceAdTagParameters(a)};
861
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new T(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Za('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 overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.11.21";c=this.g;c.j?a=Promise.reject(new T(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
862
+ (c.G=!0),c.j=new Yg,c.g.requestStream(a),c.B=b||"",c.F=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new T(1,10,10003);(a.mpt||a.mpv)&&Za('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 overriden.');a.mpt="Shaka Player";a.mpv="v4.11.21";this.g.g.replaceAdTagParameters(a)};
863
863
  q.getServerSideCuePoints=function(){pb("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.g&&(a=a.concat(this.g.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:Zp(a),started:a.h,playedCompletely:a.j,skipped:a.l,errors:a.i}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
864
864
  q.onDashTimedMetadata=function(a){this.g&&"urn:google:dai:2018"==a.schemeIdUri&&this.g.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};q.onHLSInterstitialMetadata=function(a,b,c){this.h||this.initInterstitial(null,a,b);this.h&&qq(this.h,c)};
865
865
  q.onDASHInterstitialMetadata=function(a,b,c){if("urn:mpeg:dash:event:alternativeMPD:2022"==c.schemeIdUri&&(this.h||this.initInterstitial(null,a,b),this.h)){a=this.h;b=t(c.eventNode.children);for(var d=b.next();!d.done;d=b.next()){var e=d.value;if("AlternativeMPD"==e.tagName&&(d=e.attributes.uri,e=e.attributes.mode,d)){var f=d;var g=e;break}}f?(b="replace"==g,g="insert"==g,(b||g)&&sq(a,[{id:c.id,startTime:c.startTime,endTime:c.endTime,uri:f,isSkippable:!1,skipOffset:null,canJump:!0,resumeOffset:g?
@@ -877,29 +877,29 @@ function Mq(a){return{length:a.length,start:function(b){return a.start[b]},end:f
877
877
  var Nq="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Oq="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Pq=["loop","playbackRate"],Qq=["pause","play"],Rq={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
878
878
  isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10,isFullyLoaded:1,isEnded:1},Sq={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Tq={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20,getSegmentAvailabilityDuration:20},Uq=[["getConfiguration","configure"]],Vq=[["isTextTrackVisible","setTextTrackVisibility"]],Wq="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
879
879
  Xq=["attach","attachCanvas","detach","load","unload"];function Yq(a,b,c,d,e,f,g){var h=this;this.G=a;this.K=g;this.l=new ac(b);this.L=c;this.s=!1;this.A=d;this.F=e;this.M=f;this.h=this.m=!1;this.I="";this.o=null;this.B=function(){return Zq(h)};this.C=function(k,l){k=Lq(l);switch(k.type){case "event":var m=k.targetName,n=ih(k.event);h.A(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.s&&(h.L(),h.s=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new T(p.severity,p.category,
880
- p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;$q.add(this)}q=Yq.prototype;q.destroy=function(){$q.delete(this);ar(this);br&&cr(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};q.mb=function(){return this.h};q.Hf=function(){return this.I};
880
+ p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.j=null;$q.add(this)}q=Yq.prototype;q.destroy=function(){$q.delete(this);ar(this);br&&cr(this);this.l&&(this.l.stop(),this.l=null);this.F=this.A=null;this.h=this.m=!1;this.C=this.B=this.j=this.i=this.g=this.o=null;return Promise.resolve()};q.nb=function(){return this.h};q.Gf=function(){return this.I};
881
881
  q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.zc();var a=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t($q),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new Yg;d.s=!0;dr(d,e)}},function(b){for(var c=t($q),d=c.next();!d.done;d=c.next())d=d.value,er="available"==b,d.l.zc()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});er&&this.l.$(fr);(a=br)&&
882
- a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Yg,this.s=!0,dr(this,a)):br=null}else window.__onGCastApiAvailable!==gr&&(hr=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=gr)};q.Qf=function(a){this.o=a;this.h&&ir(this,{type:"appData",appData:this.o})};
882
+ a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new Yg,this.s=!0,dr(this,a)):br=null}else window.__onGCastApiAvailable!==gr&&(hr=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=gr)};q.Of=function(a){this.o=a;this.h&&ir(this,{type:"appData",appData:this.o})};
883
883
  q.cast=function(){var a=this;return P(function(b){if(!a.m)throw new T(1,8,8E3);if(!er)throw new T(1,8,8001);if(a.h)throw new T(1,8,8002);a.j=new Yg;chrome.cast.requestSession(function(c){return dr(a,c)},function(c){return jr(a,c)});return G(b,a.j,0)})};function kr(a){a.h&&chrome.cast.requestSession(function(b){return dr(a,b)},function(b){return jr(a,b)})}q.Hc=function(){if(this.h){ar(this);if(br){cr(this);try{br.stop(function(){},function(){})}catch(a){}br=null}Zq(this)}};
884
- q.get=function(a,b){var c=this;if("video"==a){if(Qq.includes(b))return function(){return c.Yg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))}}else if("player"==a){if(Tq[b]&&!this.get("player","isLive")())return function(){};if(Wq.includes(b))return function(){return c.Yg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(Xq.includes(b))return function(){return c.Qi.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(Rq[b]||Sq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
884
+ q.get=function(a,b){var c=this;if("video"==a){if(Qq.includes(b))return function(){return c.Xg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))}}else if("player"==a){if(Tq[b]&&!this.get("player","isLive")())return function(){};if(Wq.includes(b))return function(){return c.Xg.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(Xq.includes(b))return function(){return c.Qi.apply(c,[a,b].concat(x(Ha.apply(0,arguments))))};if(Rq[b]||Sq[b])return function(){return c.g[a][b]}}return this.g[a][b]};
885
885
  q.set=function(a,b,c){this.g[a][b]=c;ir(this,{type:"set",targetName:a,property:b,value:c})};function dr(a,b){var c=a.M();br=b;b.addUpdateListener(a.B);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);Zq(a);ir(a,{type:"init",initState:c,appData:a.o});a.j.resolve()}function jr(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new T(2,8,c,b))}
886
- q.Yg=function(a,b){ir(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.Qi=function(a,b){var c=Ha.apply(2,arguments),d=new Yg,e=this.H.toString();this.H++;this.i[e]=d;try{ir(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function cr(a){var b=br;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
886
+ q.Xg=function(a,b){ir(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};q.Qi=function(a,b){var c=Ha.apply(2,arguments),d=new Yg,e=this.H.toString();this.H++;this.i[e]=d;try{ir(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function cr(a){var b=br;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
887
887
  function Zq(a){var b=br?"connected"==br.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};ar(a)}a.h=b;a.I=b?br.receiver.friendlyName:"";a.l.zc()}function ar(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new T(1,7,7E3))}}function ir(a,b){b=Kq(b);var c=br;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},bb)}catch(d){throw b=new T(2,8,8005,d),c=new W("error",(new Map).set("detail",b)),a.A("player",c),a.Hc(),b;}}var fr=.02,er=!1,br=null,hr=null,$q=new Set;
888
888
  function gr(a){hr?window.__onGCastApiAvailable=hr:delete window.__onGCastApiAvailable;hr=null;if(a)for(var b=t($q),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function lr(a,b,c,d){d=void 0===d?!1:d;kh.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.B=d;this.A=new Map;this.g=new Yq(c,function(){return mr(e)},function(){return nr(e)},function(f,g){return or(e,f,g)},function(){return pr(e)},function(){return qr(e)},d);rr(this)}pa(lr,kh);q=lr.prototype;
889
- q.destroy=function(a){a&&this.g.Hc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;kh.prototype.release.call(this);return Promise.all(a)};q.li=function(){return this.l};q.ai=function(){return this.s};q.Fh=function(){return this.g.m&&er};q.mb=function(){return this.g.mb()};q.Hf=function(){return this.g.Hf()};
890
- q.cast=function(){var a=this;return P(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.jc(),0):b.return()})};q.Qf=function(a){this.g.Qf(a)};q.ej=function(){kr(this.g)};q.Hc=function(){this.g.Hc()};
889
+ q.destroy=function(a){a&&this.g.Hc();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;kh.prototype.release.call(this);return Promise.all(a)};q.li=function(){return this.l};q.ai=function(){return this.s};q.Fh=function(){return this.g.m&&er};q.nb=function(){return this.g.nb()};q.Gf=function(){return this.g.Gf()};
890
+ q.cast=function(){var a=this;return P(function(b){return 1==b.g?G(b,a.g.cast(),2):a.h?G(b,a.h.jc(),0):b.return()})};q.Of=function(a){this.g.Of(a)};q.ej=function(){kr(this.g)};q.Hc=function(){this.g.Hc()};
891
891
  q.Gh=function(a,b){b=void 0===b?!1:b;var c=this;return P(function(d){if(1==d.g){if(a==c.C&&b==c.B)return d.return();c.C=a;c.B=b;c.g.Hc();return G(d,c.g.destroy(),2)}c.g=null;c.g=new Yq(a,function(){return mr(c)},function(){return nr(c)},function(e,f){return or(c,e,f)},function(){return pr(c)},function(){return qr(c)},b);c.g.init();I(d)})};
892
- function rr(a){a.g.init();a.m=new gb;for(var b=t(Nq),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.mb()||(f=ih(f),a.j.dispatchEvent(f))});for(var d in jh)a.m.D(a.h,jh[d],function(f){a.g.mb()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={nd:b.nd},b.nd=e,Object.defineProperty(a.l,b.nd,{configurable:!1,enumerable:!0,get:function(f){return function(){return sr(a,f.nd)}}(b),set:function(f){return function(g){var h=f.nd;a.g.mb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};tr(a,
892
+ function rr(a){a.g.init();a.m=new gb;for(var b=t(Nq),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.nb()||(f=ih(f),a.j.dispatchEvent(f))});for(var d in jh)a.m.D(a.h,jh[d],function(f){a.g.nb()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b={nd:b.nd},b.nd=e,Object.defineProperty(a.l,b.nd,{configurable:!1,enumerable:!0,get:function(f){return function(){return sr(a,f.nd)}}(b),set:function(f){return function(g){var h=f.nd;a.g.nb()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.s={};tr(a,
893
893
  function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return ur(a,f)}})});vr(a);a.j=new kh;a.j.le=a.l;a.o=new kh;a.o.le=a.s}function vr(a){var b=new Map;tr(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.A.set(c,d):a.A.set(d,c)):b.set(d,c)})}
894
894
  function tr(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
895
895
  function qr(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Ic(),startTime:null};a.i.pause();for(var c=t(Pq),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Uq);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Vq);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function mr(a){var b=new W("caststatuschanged");a.dispatchEvent(b)}
896
896
  function nr(a){var b=new W(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
897
897
  function pr(a){for(var b=t(Uq),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Pq);for(d=c.next();!d.done;d=c.next())d=
898
- d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Pq),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Vq);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.ih(h);g&&a.h.Of(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new W("error",l);a.h.dispatchEvent(l)})}
899
- function sr(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.mb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.mb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
900
- function ur(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Db()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.yg()};
901
- if("setVideoContainer"==b)return function(c){return a.h.mh(c)};if(a.g.mb()){if("getManifest"==b||"drmInfo"==b)return function(){Za(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Za(b+"() does not work while casting!");return Promise.resolve()}}return a.g.mb()&&0==Object.keys(a.g.g.video).length&&(Rq[b]||Sq[b])||!a.g.mb()?a.h[b].bind(a.h):a.g.get("player",b)}
902
- function or(a,b,c){a.g.mb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",lr);lr.prototype.changeReceiverId=lr.prototype.Gh;lr.prototype.forceDisconnect=lr.prototype.Hc;lr.prototype.suggestDisconnect=lr.prototype.ej;lr.prototype.setAppData=lr.prototype.Qf;lr.prototype.cast=lr.prototype.cast;lr.prototype.receiverName=lr.prototype.Hf;lr.prototype.isCasting=lr.prototype.mb;lr.prototype.canCast=lr.prototype.Fh;lr.prototype.getPlayer=lr.prototype.ai;
898
+ d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Pq),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Vq);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.ih(h);g&&a.h.Mf(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new W("error",l);a.h.dispatchEvent(l)})}
899
+ function sr(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.nb()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.nb()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
900
+ function ur(a,b){a.A.has(b)&&(b=a.A.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Cb()};if("getDrmEngine"==b)return function(){return a.h.B};if("getAdManager"==b)return function(){return a.h.wg()};
901
+ if("setVideoContainer"==b)return function(c){return a.h.mh(c)};if(a.g.nb()){if("getManifest"==b||"drmInfo"==b)return function(){Za(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Za(b+"() does not work while casting!");return Promise.resolve()}}return a.g.nb()&&0==Object.keys(a.g.g.video).length&&(Rq[b]||Sq[b])||!a.g.nb()?a.h[b].bind(a.h):a.g.get("player",b)}
902
+ function or(a,b,c){a.g.nb()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}S("shaka.cast.CastProxy",lr);lr.prototype.changeReceiverId=lr.prototype.Gh;lr.prototype.forceDisconnect=lr.prototype.Hc;lr.prototype.suggestDisconnect=lr.prototype.ej;lr.prototype.setAppData=lr.prototype.Of;lr.prototype.cast=lr.prototype.cast;lr.prototype.receiverName=lr.prototype.Gf;lr.prototype.isCasting=lr.prototype.nb;lr.prototype.canCast=lr.prototype.Fh;lr.prototype.getPlayer=lr.prototype.ai;
903
903
  lr.prototype.getVideo=lr.prototype.li;lr.prototype.destroy=lr.prototype.destroy;function wr(a,b,c,d){kh.call(this);var e=this;this.g=a;this.h=b;this.j=new gb;this.H={video:a,player:b};this.F=c||function(){};this.I=d||function(f){return f};this.i=null;this.G=!1;this.o=!0;this.m=0;this.B=!1;this.A=!0;this.s=this.l=null;this.C=new ac(function(){xr(e)});yr(this)}pa(wr,kh);q=wr.prototype;q.isConnected=function(){return this.G};q.ti=function(){return this.o};q.aj=function(a){this.i=a};q.Ih=function(){this.i=null};
904
904
  q.bj=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.$i=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.Zi=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
905
905
  q.destroy=function(){var a=this,b,c;return P(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.C&&(a.C.stop(),a.C=null),a.g=null,a.H=null,a.F=null,a.G=!1,a.o=!0,a.l=null,a.s=null,kh.prototype.release.call(a),G(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();I(d)})};
@@ -916,44 +916,44 @@ function Br(a,b){var c=Lq(b.data);switch(c.type){case "PLAY":a.g.play();Hr(a);br
916
916
  null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Hr(a);break;case "LOAD":a.m=0;a.B=!1;a.A=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.F(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Kr(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Ar(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Ar(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
917
917
  function Lr(a,b,c,d){a.h&&Ar(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Ar(a,b,c,d){a.G&&(a=Kq(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Hr(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Mr:a.h.qf()?Nr:a.g.paused?Or:Pr,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Ar(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
918
918
  S("shaka.cast.CastReceiver",wr);wr.prototype.destroy=wr.prototype.destroy;wr.prototype.setContentArtist=wr.prototype.Zi;wr.prototype.setContentImage=wr.prototype.$i;wr.prototype.setContentTitle=wr.prototype.bj;wr.prototype.clearContentMetadata=wr.prototype.Ih;wr.prototype.setContentMetadata=wr.prototype.aj;wr.prototype.isIdle=wr.prototype.ti;wr.prototype.isConnected=wr.prototype.isConnected;var Jr=.5,Fr=5,Mr="IDLE",Pr="PLAYING",Nr="BUFFERING",Or="PAUSED";function Qr(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Rr(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
919
- r||-1===u)p=Sr(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,z=v.i,y=v.j,B=v.h;if(w!=h||z!=k||y!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Rr(d,e,w,z,y,B),h=w,k=z,l=y,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Sr(d,e),a.nestedCues.push(n));n=Rr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Rr(a,b,c,d,e,f){a=new Dd(a,b,"");c&&a.textDecoration.push(be);d&&(a.fontStyle=ae);a.color=e;a.backgroundColor=f;return a}
920
- function Sr(a,b){a=new Dd(a,b,"");a.lineBreak=!0;return a}function Tr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Ur(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.o="black";this.s=this.A=null;Vr(this)}function Wr(a,b,c){var d="CC"+((a.C<<1|a.B)+1),e=new Dd(b,c,"");e.lineInterpretation=1;var f=Xr.get(a.g);f&&(e.line=f);null!=a.s&&null!=a.A&&(e.position=10+Math.min(70,10*a.s)+2.5*a.A);(b=Qr(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=Xr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Vr(a){Yr(a,0,15);a.g=1}
919
+ r||-1===u)p=Sr(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,z=v.i,y=v.j,B=v.h;if(w!=h||z!=k||y!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Rr(d,e,w,z,y,B),h=w,k=z,l=y,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Sr(d,e),a.nestedCues.push(n));n=Rr(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Rr(a,b,c,d,e,f){a=new Ed(a,b,"");c&&a.textDecoration.push(be);d&&(a.fontStyle=ae);a.color=e;a.backgroundColor=f;return a}
920
+ function Sr(a,b){a=new Ed(a,b,"");a.lineBreak=!0;return a}function Tr(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Ur(a,b){this.i=[];this.g=1;this.h=0;this.C=a;this.B=b;this.j=this.m=!1;this.l="white";this.o="black";this.s=this.A=null;Vr(this)}function Wr(a,b,c){var d="CC"+((a.C<<1|a.B)+1),e=new Ed(b,c,"");e.lineInterpretation=1;var f=Xr.get(a.g);f&&(e.line=f);null!=a.s&&null!=a.A&&(e.position=10+Math.min(70,10*a.s)+2.5*a.A);(b=Qr(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=Xr.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function Vr(a){Yr(a,0,15);a.g=1}
921
921
  function Zr(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=$r.has(c)?$r.get(c):String.fromCharCode(c);break;case 1:d=as.get(c);break;case 2:a.i[a.g].pop();d=bs.get(c);break;case 3:a.i[a.g].pop(),d=cs.get(c)}d&&a.i[a.g].push(new Tr(d,a.m,a.j,a.o,a.l))}}function ds(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Yr(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
922
922
  var $r=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),as=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),bs=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],[35,"\u00da"],[36,"\u00dc"],
923
923
  [37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),cs=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],[39,"\u00d5"],[40,"\u00f5"],
924
924
  [41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),Xr=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 es(a,b){this.h=0;this.o=new Ur(a,b);this.i=new Ur(a,b);this.g=this.j=new Ur(a,b);this.l=0;this.m=null}function fs(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=Wr(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Yr(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Yr(c,0,15),d.g=15);a.h=3;d.h=b;return e}function gs(a){a.h=1;a.g=a.j;a.g.h=0}function hs(a){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=4}var is="black green blue cyan red yellow magenta black".split(" "),js="white green blue cyan red yellow magenta white_italics".split(" ");function ks(a,b){this.I=b;this.M=a;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.s="black";ls(this)}function ls(a){a.i=[];for(var b=0;16>b;b++)a.i.push(ms())}function ms(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function ns(a,b){os(a)&&(a.i[a.h][a.g]=new Tr(b,a.C,a.A,a.s,a.B),a.g++)}function os(a){var b=a.g<a.m&&0<=a.g;return a.h<a.o&&0<=a.h&&b}ks.prototype.isVisible=function(){return this.l};
925
925
  function ps(a){for(var b=0,c=1;16>c;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=ms()}
926
- function qs(a,b,c){var d=new Dd(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Fd;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.M;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Nb:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
926
+ function qs(a,b,c){var d=new Ed(a.j,b,"");d.textAlign=0===a.F?"left":1===a.F?"right":Gd;var e=d.region;a.I&&(e.id+="svc"+a.I);e.id+="win"+a.M;e.height=a.o;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.H;e.viewportAnchorY=a.L;e.viewportAnchorUnits=a.K?Nb:2;switch(a.G){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
927
927
  50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Qr(d,"svc"+c,a.i,a.j,b))a.j=b;return c}ks.prototype.display=function(){this.l=!0};function rs(){this.i=[];this.h=null;this.g=0}function ss(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new ts(a.h)),a.h=null,a.g=0))}function ts(a){this.g=0;this.h=a}ts.prototype.qa=function(){return this.g<this.h.length};ts.prototype.xa=function(){return this.g};function us(a){if(!a.qa())throw new T(2,2,3E3);return a.h[a.g++]}ts.prototype.skip=function(a){if(this.g+a>this.h.length)throw new T(2,2,3E3);this.g+=a};
928
- ts.prototype.Mf=function(a){if(0>this.g-a)throw new T(2,2,3E3);this.g-=a};function vs(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
929
- function ws(a,b,c,d){if(!a.g)return null;if(24==c){var e=us(b).value,f=us(b).value;if((32<=e&&127>=e||160<=e&&255>=e)&&(32<=f&&127>=f||160<=f&&255>=f))return c=function(g){return g.map(function(h){return("0"+(h&255).toString(16)).slice(-2)}).join("")}([e,f]),ns(a.g,String.fromCharCode(parseInt(c,16))),null;b.Mf(2)}b=a.g;e=null;switch(c){case 8:!os(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=qs(b,d,a.i));b.h+1>=b.o?ps(b):b.h++;b.g=0;break;
930
- case 14:b.isVisible()&&(e=qs(b,d,a.i));b.i[b.h]=ms();b.g=0;break;case 12:b.isVisible()&&(e=qs(b,d,a.i)),ls(b),b.h=0,b.g=0}return e}
928
+ ts.prototype.Zg=function(a){if(0>this.g-a)throw new T(2,2,3E3);this.g-=a};function vs(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
929
+ function ws(a,b,c,d){if(!a.g)return null;if(24==c)return c=us(b).value,d=us(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),ns(a.g,String.fromCharCode(parseInt(c,16))),null;b=a.g;var e=null;switch(c){case 8:!os(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=qs(b,d,a.i));b.h+1>=b.o?ps(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=qs(b,d,a.i));b.i[b.h]=ms();b.g=0;break;case 12:b.isVisible()&&
930
+ (e=qs(b,d,a.i)),ls(b),b.h=0,b.g=0}return e}
931
931
  function xs(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=us(b).value;b=null;c=t(ys(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=qs(e,d,a.i)),ls(e);return b}if(137===c)for(b=us(b).value,b=t(ys(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=us(b).value;b=null;c=t(ys(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=qs(e,d,a.i)),e.l=!1;return b}if(139===c){c=us(b).value;
932
932
  b=null;c=t(ys(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=qs(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=us(b).value,zs(a,b,d);if(143===c)return d=zs(a,255,d),As(a),d;if(144===c)b.skip(1),d=us(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=us(b).value,c=us(b).value,b.skip(1),a.g&&(b=Bs((c&48)>>4,(c&12)>>2,c&3),a.g.B=Bs((d&48)>>4,(d&12)>>2,d&3),a.g.s=b);else if(146===c)d=us(b).value,b=us(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
933
933
  b.skip(1),d=us(b).value,b.skip(1),a.g&&(a.g.F=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new ks(c,a.i);f.j=d;a.h[c]=f}d=us(b).value;f=us(b).value;var g=us(b).value,h=us(b).value,k=us(b).value;b=us(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.C=!1,b.A=!1,b.B="white",b.s="black");b=a.h[c];b.l=0<(d&32);b.L=f&127;b.H=g;b.G=(h&240)>>4;b.K=0<(f&128);b.o=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return null}
934
934
  function ys(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function zs(a,b,c){var d=null;b=t(ys(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=qs(f,c,a.i));a.h[e]=null}return d}function As(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Bs(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Cs[a<<2|b<<1|c]}
935
935
  var Ds=new Map([[32," "],[33,"\u00a0"],[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"]]),Cs="black blue green cyan red magenta yellow white".split(" ");function Es(){this.h=[];this.g=[];this.i=new rs;this.l=0;this.m=new Map([["CC1",new es(0,0)],["CC2",new es(0,1)],["CC3",new es(1,0)],["CC4",new es(1,1)]]);this.s=this.o=0;this.j=new Map;this.B=!0;this.A=new Set;Fs(this)}Es.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;Fs(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())As(b.value)};
936
936
  function Fs(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,Vr(c.i),Vr(c.j),Vr(c.o);a.B=!0}
937
- Es.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gh(a,0);if(!(8>a.getLength())&&181===a.T()&&49===a.la()&&1195456820===a.P()&&3===a.T()&&(c=a.T(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.T(),f=(e&4)>>2,g=a.T(),h=a.T();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,jb:g,Hb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
937
+ Es.prototype.extract=function(a,b){if(this.B){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.B=!1}a=new Gh(a,0);if(!(8>a.getLength())&&181===a.T()&&49===a.la()&&1195456820===a.P()&&3===a.T()&&(c=a.T(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.T(),f=(e&4)>>2,g=a.T(),h=a.T();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,jb:g,Gb:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
938
938
  Es.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=Gs(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())ss(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=Hs(this,d.value),b.push.apply(b,x(d));this.i.i=[];this.h=[];this.g=[];return b};
939
- function Gs(a,b){var c=b.type;if(16===(b.jb&112)){var d=b.jb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.jb&&255===b.Hb||!b.jb&&!b.Hb||!Is(b.jb)||!Is(b.Hb))return 45<=++a.l&&Fs(a),null;a.l=0;b.jb&=127;b.Hb&=127;var e=b.jb;if(1<=e&&15>=e||!b.jb&&!b.Hb)return null;e=null;if(16===(b.jb&112))a:{a.A.add(d),d=b.jb;a=b.Hb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
939
+ function Gs(a,b){var c=b.type;if(16===(b.jb&112)){var d=b.jb>>3&1;0===c?a.o=d:a.s=d}d="CC"+((c<<1|(c?a.s:a.o))+1);c=a.m.get(d);if(255===b.jb&&255===b.Gb||!b.jb&&!b.Gb||!Is(b.jb)||!Is(b.Gb))return 45<=++a.l&&Fs(a),null;a.l=0;b.jb&=127;b.Gb&=127;var e=b.jb;if(1<=e&&15>=e||!b.jb&&!b.Gb)return null;e=null;if(16===(b.jb&112))a:{a.A.add(d),d=b.jb;a=b.Gb;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
940
940
  null;var g=95<a?a-96:a-64;13>=g?d=js[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,ds(g,c,1+g.g-g.h,g.h),Yr(g,0,c-1),Yr(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.s=f,g.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Zr(c.g,0,32),d=!1,b=js[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=is[(a&
941
- 14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Zr(c.g,1,a);else if(18===(d&246)&&32===(a&224))Zr(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Hb){case 32:gs(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=fs(c,2,a);break;case 38:d=fs(c,3,a);break;case 39:d=fs(c,4,a);break;case 40:Zr(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Vr(c.o);hs(c);break;case 43:hs(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Wr(b,c.l,a));Yr(b,0,15);break;case 45:b=
942
- c.g;3!==c.h?d=null:(d=Wr(b,c.l,a),e=b.g-b.h+1,ds(b,e-1,e,b.h),Yr(b,0,e-1),Yr(b,b.g,15-b.g),c.l=a);break;case 46:Yr(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Wr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,gs(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.Hb,Zr(c.g,0,b.jb),Zr(c.g,0,a);return e}
941
+ 14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Zr(c.g,1,a);else if(18===(d&246)&&32===(a&224))Zr(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Gb){case 32:gs(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=fs(c,2,a);break;case 38:d=fs(c,3,a);break;case 39:d=fs(c,4,a);break;case 40:Zr(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:Vr(c.o);hs(c);break;case 43:hs(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Wr(b,c.l,a));Yr(b,0,15);break;case 45:b=
942
+ c.g;3!==c.h?d=null:(d=Wr(b,c.l,a),e=b.g-b.h+1,ds(b,e-1,e,b.h),Yr(b,0,e-1),Yr(b,b.g,15-b.g),c.l=a);break;case 46:Yr(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Wr(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,gs(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.A=a-32)}e=null}else a=b.Gb,Zr(c.g,0,b.jb),Zr(c.g,0,a);return e}
943
943
  function Hs(a,b){var c=[];try{for(;b.qa();){var d=us(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=us(b).value&63);if(0!=e){a.A.add("svc"+e);a.j.has(e)||a.j.set(e,new vs(e));for(var g=a.j.get(e),h=b.xa();b.xa()-h<f;){e=g;var k=b,l=us(k),m=l.value,n=l.pts;if(16===m){var p=us(k);m=m<<16|p.value}if(0<=m&&31>=m)var r=ws(e,k,m,n);else if(128<=m&&159>=m)r=xs(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&
944
944
  255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?ns(e.g,"\u266a"):ns(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&ns(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(Ds.has(k)){var u=Ds.get(k);ns(e.g,u)}else ns(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?ns(e.g,"_"):ns(e.g,"[CC]"));r=null}(e=r)&&c.push(e)}}}}catch(v){if(v instanceof T&&3E3===v.code)$a("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
945
945
  else throw v;}return c}function Is(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}Es.prototype.getStreams=function(){return Array.from(this.A)};S("shaka.cea.CeaDecoder",Es);Jb=function(){return new Es};function Js(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(x(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function Ks(){this.j=new Map;this.i=this.h=0;this.g=Ls}
946
946
  Ks.prototype.init=function(a){function b(f){f=f.name;f in Ms&&(c.g=Ms[f])}var c=this,d=[],e=[];(new Jh).box("moov",Oh).box("mvex",Oh).S("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.P();g=g.P();c.h=f;c.i=g}).box("trak",Oh).S("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.P();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.la();g.la();g.la();g.la();d.push(h)}).box("mdia",Oh).S("mdhd",
947
947
  function(f){f=pj(f.reader,f.version);e.push(f.timescale)}).box("minf",Oh).box("stbl",Oh).S("stsd",Qh).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Rh).box("sinf",Oh).box("frma",function(f){f=sj(f.reader).codec;f in Ms&&(c.g=Ms[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new T(2,2,2010);this.g==Ls&&Za("Unable to determine bitstream format for CEA parsing!");
948
948
  d.forEach(function(f,g){c.j.set(f,e[g])})};
949
- Ks.prototype.parse=function(a){var b=this;if(this.g==Ls)return[];var c=[],d=0,e=[];(new Jh).box("moof",function(f){d=f.start;e=[];Oh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,cd:b.h,Id:b.i,Tg:[],timescale:9E4});Oh(f)}).S("trun",function(f){var g=e[e.length-1];f=qj(f.reader,f.version,f.flags);g.Tg.push(f)}).S("tfhd",function(f){var g=e[e.length-1];f=nj(f.reader,f.flags);g.cd=f.cd||b.h;g.Id=f.Id||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).S("tfdt",function(f){var g=e[e.length-
950
- 1];f=oj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.xa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Za("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Ns(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.cd,l.Id,g,l.Tg,c)}}).parse(a,!1);return c};
949
+ Ks.prototype.parse=function(a){var b=this;if(this.g==Ls)return[];var c=[],d=0,e=[];(new Jh).box("moof",function(f){d=f.start;e=[];Oh(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,cd:b.h,Id:b.i,Sg:[],timescale:9E4});Oh(f)}).S("trun",function(f){var g=e[e.length-1];f=qj(f.reader,f.version,f.flags);g.Sg.push(f)}).S("tfhd",function(f){var g=e[e.length-1];f=nj(f.reader,f.flags);g.cd=f.cd||b.h;g.Id=f.Id||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).S("tfdt",function(f){var g=e[e.length-
950
+ 1];f=oj(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.xa(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw Za("Unable to find base media decode time for CEA captions!"),new T(2,2,2010);f.reader.seek(h);Ns(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.cd,l.Id,g,l.Sg,c)}}).parse(a,!1);return c};
951
951
  function Ns(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.$g});n=[].concat.apply([],x(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].Kh);b.qa();){g=b.P();var p=b.T(),r=null;r=!1;h=1;switch(a.g){case Os:r=p&31;r=6==r;break;case Ps:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case Qs:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].me||0),p=(c+p)/d,h=t(Js(b.wb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
952
- h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Nf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Ks);var Ls=0,Os=1,Ps=2,Qs=3,Ms={avc1:Os,avc3:Os,dvav:Os,dva1:Os,hev1:Ps,hvc1:Ps,dvh1:Ps,dvhe:Ps,vvc1:Qs,vvi1:Qs,dvc1:Qs,dvi1:Qs};Ib["video/mp4"]=function(){return new Ks};function Rs(){this.g=null}Rs.prototype.init=function(){};Rs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Pj;var b=[];a=xb(a);if(!Xj(a))return b;a=this.g.parse(a);var c=a.dd(),d=a.Od();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Js(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
952
+ h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].Lf||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",Ks);var Ls=0,Os=1,Ps=2,Qs=3,Ms={avc1:Os,avc3:Os,dvav:Os,dva1:Os,hev1:Ps,hvc1:Ps,dvh1:Ps,dvhe:Ps,vvc1:Qs,vvi1:Qs,dvc1:Qs,dvi1:Qs};Ib["video/mp4"]=function(){return new Ks};function Rs(){this.g=null}Rs.prototype.init=function(){};Rs.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Pj;var b=[];a=yb(a);if(!Xj(a))return b;a=this.g.parse(a);var c=a.dd(),d=a.Od();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(Js(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
953
953
  S("shaka.cea.TsCeaParser",Rs);Ib["video/mp2t"]=function(){return new Rs};function Ss(a,b,c){var d=Ts(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new T(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Uc});if(1<f.length)throw new T(2,4,4050);f.length&&(g=Us(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Uc}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Uc?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
954
- l.Uc});f.length&&(a=Vs(e,k,f,c,h),0==a.length&&(a=[Pe("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Pe(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{sg:h,mk:e,drmInfos:a,He:g,xg:!0}}
955
- function Ws(a,b,c,d){var e=Ss(a,c,d);if(b.xg){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.xg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.sg||b.sg}
956
- function Xs(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=xb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ys(a){a=t(gd(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return ed(c)}return""}
954
+ l.Uc});f.length&&(a=Vs(e,k,f,c,h),0==a.length&&(a=[Pe("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Pe(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{qg:h,mk:e,drmInfos:a,He:g,vg:!0}}
955
+ function Ws(a,b,c,d){var e=Ss(a,c,d);if(b.vg){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.vg=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new T(2,4,4008);return e.qg||b.qg}
956
+ function Xs(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=yb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ys(a){a=t(gd(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=b.value,b.children){b=t(b.children);for(var c=b.next();!c.done;c=b.next())if(c=c.value,"LA_URL"==c.tagName)return ed(c)}return""}
957
957
  function Zs(a){var b=id(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=ed(b)))return b;a=id(a.node,"urn:microsoft:playready","pro");if(!a||!ed(a))return"";a=ed(a);a=Ke(a);a=Xs(a).filter(function(c){return c.type===$s})[0];if(!a)return"";a=Bc(a.value,!0);return(a=Vc(a,"WRMHEADER"))?Ys(a):""}
958
958
  function Vs(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Uc];if(h){var k;if((k=id(g.node,"urn:microsoft:playready","pro"))&&ed(k)){k=ed(k);k=Ke(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:Vh(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Uc){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
959
959
  172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:Vh(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Pe(h,b,g.init||a||k||l);if(h=at.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Ts(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=bt(c.value))&&b.push(c);return b}
@@ -964,55 +964,56 @@ var $s=1,at=(new Map).set("com.widevine.alpha",function(a){var b=id(a.node,"http
964
964
  "Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=ed(a))?a:""});function ct(a,b,c,d,e,f){var g={RepresentationID:b,Number:c,SubNumber:d,Bandwidth:e,Time:f};return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g[k];if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&Za("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=n.toString();
965
965
  break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
966
966
  function dt(a,b){var c=et(a,b,"timescale"),d=1;c&&(d=rd(c)||1);c=et(a,b,"duration");var e=(c=rd(c||""))?c/d:null,f=et(a,b,"startNumber"),g=Number(et(a,b,"presentationTimeOffset"))||0,h=sd(f||"");if(null==f||null==h)h=1;f=null;if(b=ft(a,b,"SegmentTimeline")){b=cd(b,"S");f=d;a=a.ia.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var p=b[n],r=b[n+1],u=kd(p,"t",sd),v=kd(p,"d",sd),w=kd(p,"r",qd);p=kd(p,"k",qd)||0;null!=u&&(u-=g);if(v){u=null!=u?u:m;w=w||0;if(0>w)if(r){r=kd(r,"t",sd);if(null==
967
- r)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(Infinity==a)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}0<l.length&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=w;++r)m=u+v,l.push({start:u/f,end:m/f,cg:u,Fb:p,Xi:l.length+k}),u=m}}f=l}return{timescale:d,te:c,Na:e,wd:h,fc:g/d||0,bg:g,timeline:f}}function gt(a,b){return[b(a.J),b(a.ga),b(a.na)].filter(yf)}function et(a,b,c){b=gt(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
967
+ r)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(Infinity==a)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}0<l.length&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=w;++r)m=u+v,l.push({start:u/f,end:m/f,ag:u,Eb:p,Xi:l.length+k}),u=m}}f=l}return{timescale:d,te:c,Na:e,wd:h,fc:g/d||0,$f:g,timeline:f}}function gt(a,b){return[b(a.J),b(a.ga),b(a.na)].filter(yf)}function et(a,b,c){b=gt(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
968
968
  function ft(a,b,c){b=gt(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=hd(d.value,c));d=b.next());return a}
969
969
  function ht(a,b,c,d,e,f){for(var g=ld(a,"http://www.w3.org/1999/xlink","href"),h=ld(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=Xc("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return $g(new T(2,4,4028));if("onLoad"!=h)return $g(new T(2,4,4027));var p=Oe([d],[g]);return e.request(0,sh(p,b)).Aa(function(r){r=Uc(r.data,a.tagName);if(!r)return $g(new T(2,4,4001,g));for(a.children=
970
970
  [];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return it(a,b,c,p[0],e,f+1)})}
971
971
  function it(a,b,c,d,e,f){f=void 0===f?0:f;if(ld(a,"http://www.w3.org/1999/xlink","href")){var g=ht(a,b,c,d,e,f);c&&(g=g.Aa(void 0,function(){return it(a,b,c,d,e,f)}));return g}g=[];for(var h=t(ad(a)),k=h.next(),l={};!k.done;l={Zc:void 0},k=h.next())l.Zc=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==ld(l.Zc,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Zc}}(l)):"SegmentTimeline"!=l.Zc.tagName&&g.push(it(l.Zc,b,c,d,e,f));return gh(g).Aa(function(){return a})}
972
972
  ;function jt(a,b,c,d,e,f,g){var h,k=(new Jh).S("sidx",function(l){h=kt(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new T(2,3,3004);}
973
973
  function kt(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.P();if(0==k)throw new T(2,3,3005);if(0==g.version){var l=g.reader.P();var m=g.reader.P()}else l=g.reader.Tc(),m=g.reader.Tc();g.reader.skip(2);var n=g.reader.la();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.P(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.P();g.reader.skip(4);if(1==r)throw new T(2,3,3006);h.push(new Wi(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function lt(a){this.h=Eb(a);this.g=new Gh(this.h,0)}lt.prototype.qa=function(){return this.g.qa()};
974
- function mt(a){var b=nt(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=nt(a);a:{d=t(ot);for(var e=d.next();!e.done;e=d.next())if(wb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.xa();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.xa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.xa();d=Eb(a.h,a.g.xa(),b);a.g.skip(b);return new pt(c,
975
- d)}function nt(a){var b=a.g.xa(),c=a.g.T();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return xb(a.h,b,c)}var ot=[[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 pt(a,b){this.id=a;this.g=b}
974
+ function mt(a){var b=nt(a);if(7<b.length)throw new T(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=nt(a);a:{d=t(ot);for(var e=d.next();!e.done;e=d.next())if(xb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.xa();else{if(8==b.length&&b[1]&224)throw new T(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.xa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.xa();d=Eb(a.h,a.g.xa(),b);a.g.skip(b);return new pt(c,
975
+ d)}function nt(a){var b=a.g.xa(),c=a.g.T();if(0==c)throw new T(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return yb(a.h,b,c)}var ot=[[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 pt(a,b){this.id=a;this.g=b}
976
976
  function qt(a){if(8<a.g.byteLength)throw new T(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new T(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function rt(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new lt(a.g);for(var n=null,p=null;a.qa();){var r=mt(a);if(187==r.id){var u=st(r);u&&(r=c*u.jj,u=b+u.Oi,null!=n&&m.push(new Wi(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Wi(n+g,d+g,l,p,null,f,g,h,k));return m}
977
- function st(a){var b=new lt(a.g);a=mt(b);if(179!=a.id)throw new T(2,3,3013);a=qt(a);b=mt(b);if(183!=b.id)throw new T(2,3,3012);b=new lt(b.g);for(var c=0;b.qa();){var d=mt(b);if(241==d.id){c=qt(d);break}}return{jj:a,Oi:c}};function tt(a,b,c){b=ft(a,b,"Initialization");if(!b)return null;var d=a.J.Ja(),e=b.attributes.sourceURL;e&&(d=Oe(d,[Hc(e)],a.pb()));e=0;var f=null;if(b=kd(b,"range",pd))e=b.start,f=b.end;c=new Ui(function(){return d},e,f,ut(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
978
- function vt(a,b,c){var d=Number(et(a,wt,"presentationTimeOffset"))||0,e=et(a,wt,"timescale"),f=1;e&&(f=rd(e)||1);var g=d/f||0,h=tt(a,wt,c);xt(a,h);var k=Sc(a);return{oc:function(){var l=ft(k,wt,"RepresentationIndex");var m=k.J.Ja();l&&(l=Hc(l.attributes.sourceURL))&&(m=Oe(m,[l],k.pb()));l=yt(k);return zt(k,b,h,m,l.start,l.end,g)}}}
979
- function zt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D;return P(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.zb||!a.ia.rf,l=a.ia.start,m=a.ia.duration,n=a.J.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.N(),c.Ha,c.ta,!0):null],p=null,G(F,Promise.all(u),2);v=F.h;w=v[0];z=v[1]||null;y=null;B=l-g;C=l;E=m?l+m:Infinity;if("mp4"==n)var J=jt(w,e,d,c,B,C,E);else{J=w;var L=new lt(z);if(440786851!=mt(L).id)throw new T(2,3,3008);var K=mt(L);if(408125543!=K.id)throw new T(2,
977
+ function st(a){var b=new lt(a.g);a=mt(b);if(179!=a.id)throw new T(2,3,3013);a=qt(a);b=mt(b);if(183!=b.id)throw new T(2,3,3012);b=new lt(b.g);for(var c=0;b.qa();){var d=mt(b);if(241==d.id){c=qt(d);break}}return{jj:a,Oi:c}};function tt(a,b,c){b=ft(a,b,"Initialization");if(!b)return null;var d=a.J.Ja(),e=b.attributes.sourceURL;e&&(d=Oe(d,[Hc(e)],a.qb()));e=0;var f=null;if(b=kd(b,"range",pd))e=b.start,f=b.end;c=new Ui(function(){return d},e,f,ut(a),null,null,c);c.codecs=a.J.codecs;c.mimeType=a.J.mimeType;return c}
978
+ function vt(a,b,c){var d=Number(et(a,wt,"presentationTimeOffset"))||0,e=et(a,wt,"timescale"),f=1;e&&(f=rd(e)||1);var g=d/f||0,h=tt(a,wt,c);xt(a,h);var k=Sc(a);return{oc:function(){var l=ft(k,wt,"RepresentationIndex");var m=k.J.Ja();l&&(l=Hc(l.attributes.sourceURL))&&(m=Oe(m,[l],k.qb()));l=yt(k);return zt(k,b,h,m,l.start,l.end,g)}}}
979
+ function zt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D;return P(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Ib||!a.ia.Ig,l=a.ia.start,m=a.ia.duration,n=a.J.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.N(),c.Ha,c.ua,!0):null],p=null,G(F,Promise.all(u),2);v=F.h;w=v[0];z=v[1]||null;y=null;B=l-g;C=l;E=m?l+m:Infinity;if("mp4"==n)var J=jt(w,e,d,c,B,C,E);else{J=w;var L=new lt(z);if(440786851!=mt(L).id)throw new T(2,3,3008);var K=mt(L);if(408125543!=K.id)throw new T(2,
980
980
  3,3009);L=K.g.byteOffset;K=new lt(K.g);for(var O=null;K.qa();){var M=mt(K);if(357149030==M.id){O=M;break}}if(!O)throw new T(2,3,3010);O=new lt(O.g);M=1E6;for(K=null;O.qa();){var N=mt(O);if(2807729==N.id)M=qt(N);else if(17545==N.id)if(4==N.g.byteLength)K=N.g.getFloat32(0);else if(8==N.g.byteLength)K=N.g.getFloat64(0);else throw new T(2,3,3003);}if(null==K)throw new T(2,3,3011);O=M/1E9;K*=O;J=mt(new lt(J));if(475249515!=J.id)throw new T(2,3,3007);J=rt(J,L,O,K,d,c,B,C,E)}y=J;H=t(y);for(A=H.next();!A.done;A=
981
981
  H.next())D=A.value,D.codecs=a.J.codecs,D.mimeType=a.J.mimeType,D.bandwidth=a.bandwidth;h.td(y);r=new fl(y);k&&r.Gc(C,E,!0);return F.return(r)})}function wt(a){return a.Wc}function yt(a){var b=ft(a,wt,"RepresentationIndex");a=et(a,wt,"indexRange");a=pd(a||"");b&&(a=kd(b,"range",pd,a));return a}function xt(a,b){At(a,b);if(!yt(a))throw new T(2,4,4002);}
982
982
  function At(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=Ue&&"mp4"!=c&&"webm"!=c)throw new T(2,4,4006);if("webm"==c&&!b)throw new T(2,4,4005);}
983
- function ut(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.be,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ga.label||null,roles:a.roles||null,language:a.ga.language||null}};function Bt(a,b,c){var d=tt(a,Ct,c),e=Dt(a);if(!e.Na&&!e.timeline&&1<e.Pc.length)throw new T(2,4,4002);if(!e.Na&&!a.ia.duration&&!e.timeline&&1==e.Pc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.na.id&&a.J.id&&(g=b[a.na.id+","+a.J.id])&&(f=g.segmentIndex);var h=Et(a.ia.start,a.ia.duration,a.J.Ja,e,d,c,a.J.mimeType,a.J.codecs,a.bandwidth,a.pb);b=!f;f?f.rd(h,a.presentationTimeline.rb()):f=new fl(h);a.presentationTimeline.td(h);a.zb&&a.ia.rf||
984
- f.Gc(a.ia.start,a.ia.duration?a.ia.start+a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{oc:function(){f&&0!=f.getNumReferences()||f.Xd(h);return Promise.resolve(f)}}}function Ct(a){return a.Rb}function Dt(a){var b=Ft(a);a=dt(a,Ct);var c=a.wd;0==c&&(c=1);var d=0;a.Na?d=a.Na*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Na:a.Na,startTime:d,wd:c,fc:a.fc,timeline:a.timeline,Pc:b}}
983
+ function ut(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.be,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.ga.label||null,roles:a.roles||null,language:a.ga.language||null}};function Bt(a,b,c){var d=tt(a,Ct,c),e=Dt(a);if(!e.Na&&!e.timeline&&1<e.Pc.length)throw new T(2,4,4002);if(!e.Na&&!a.ia.duration&&!e.timeline&&1==e.Pc.length)throw new T(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new T(2,4,4002);var f=null,g=null;a.na.id&&a.J.id&&(g=b[a.na.id+","+a.J.id])&&(f=g.segmentIndex);var h=Et(a.ia.start,a.ia.duration,a.J.Ja,e,d,c,a.J.mimeType,a.J.codecs,a.bandwidth,a.qb);b=!f;f?f.rd(h,a.presentationTimeline.mb()):f=new fl(h);a.presentationTimeline.td(h);a.Ib&&a.ia.Ig||
984
+ f.Gc(a.ia.start,a.ia.duration?a.ia.start+a.ia.duration:Infinity,b);g&&(g.segmentIndex=f);return{oc:function(){f&&0!=f.getNumReferences()||f.Xd(h);return Promise.resolve(f)}}}function Ct(a){return a.Qb}function Dt(a){var b=Ft(a);a=dt(a,Ct);var c=a.wd;0==c&&(c=1);var d=0;a.Na?d=a.Na*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Na:a.Na,startTime:d,wd:c,fc:a.fc,timeline:a.timeline,Pc:b}}
985
985
  function Et(a,b,c,d,e,f,g,h,k,l){var m=d.Pc.length;d.timeline&&d.timeline.length!=d.Pc.length&&(m=Math.min(d.timeline.length,d.Pc.length));for(var n=a-d.fc,p=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={ve:void 0,ne:void 0},w++){v.ne=d.Pc[w];var z=u;u=void 0;u=null!=d.Na?z+d.Na:d.timeline?d.timeline[w].end:z+b;v.ve=null;v=new Wi(a+z,a+u,function(y){return function(){null==y.ve&&(y.ve=Oe(c(),[y.ne.Ei],l()));return y.ve}}(v),v.ne.start,v.ne.end,e,n,a,p,[],"",null,null,Xi,f);v.codecs=h;v.mimeType=
986
- g;v.bandwidth=k;r.push(v)}return r}function Ft(a){return[a.J.Rb,a.ga.Rb,a.na.Rb].filter(yf).map(function(b){return cd(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.mf&&(a.mf=!0);var c=Hc(b.attributes.media);b=kd(b,"mediaRange",pd,{start:0,end:null});return{Ei:c,start:b.start,end:b.end}})};function Gt(a,b,c,d,e,f,g,h,k){k||a.J.Qd||(a.J.Qd=et(a,Ht,"initialization"));var l=a.J.Qd?It(a,g):null,m=Jt(a);Kt(m);var n=Sc(a);if(m.ld)return At(a,l),{oc:function(){var w=ct(m.ld,n.J.id,null,null,n.bandwidth||null,null);w=Oe(n.J.Ja(),[w]);return zt(n,b,l,w,0,null,m.fc)}};if(m.Na)return d||"image"===a.ga.contentType||"text"===a.ga.contentType||(c=a.ia.start,d=a.na.id,k=a.ia.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.zf(m.Na),a.presentationTimeline.Rg(c,d)),{oc:function(){return Lt(n,
987
- m,e,l,f,g,h,a.J.oe)}};var p=null;d=d=null;a.na.id&&a.J.id&&(d=a.na.id+","+a.J.id,d=c[d])&&(p=d.segmentIndex);var r=a.ia.start,u=a.ia.duration?r+a.ia.duration:Infinity,v=!(a.zb&&a.ia.rf);p?(c=p,Mt(c,m,r,u,v,l),c.Ga(a.presentationTimeline.rb())):p=new Nt(m,a.J.id,a.bandwidth,a.J.Ja,a.pb,r,u,l,v,g,a.J.oe);m.timeline&&"image"!==a.ga.contentType&&"text"!==a.ga.contentType&&a.presentationTimeline.Sg(m.timeline,r);d&&a.zb&&(d.segmentIndex=p);return{oc:function(){p instanceof Nt&&0==p.getNumReferences()&&
988
- Mt(p,m,r,u,v,l);return Promise.resolve(p)}}}function Ht(a){return a.hc}function Jt(a){var b=dt(a,Ht),c=et(a,Ht,"media"),d=et(a,Ht,"index"),e=et(a,Ht,"k"),f=0;e&&(f=parseInt(e,10));return{te:b.te,Na:b.Na,timescale:b.timescale,wd:b.wd,fc:b.fc,bg:b.bg,timeline:b.timeline,dc:c&&Hc(c),ld:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,Fi:f}}
986
+ g;v.bandwidth=k;r.push(v)}return r}function Ft(a){return[a.J.Qb,a.ga.Qb,a.na.Qb].filter(yf).map(function(b){return cd(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.mf&&(a.mf=!0);var c=Hc(b.attributes.media);b=kd(b,"mediaRange",pd,{start:0,end:null});return{Ei:c,start:b.start,end:b.end}})};function Gt(a,b,c,d,e,f,g,h,k){k||a.J.Qd||(a.J.Qd=et(a,Ht,"initialization"));var l=a.J.Qd?It(a,g):null,m=Jt(a);Kt(m);var n=Sc(a);if(m.ld)return At(a,l),{oc:function(){var v=ct(m.ld,n.J.id,null,null,n.bandwidth||null,null);v=Oe(n.J.Ja(),[v]);return zt(n,b,l,v,0,null,m.fc)}};if(m.Na)return d||"image"===a.ga.contentType||"text"===a.ga.contentType||(c=a.ia.start,d=a.na.id,k=a.ia.duration,d=(d=null!=d&&f[d]||k)?c+d:Infinity,a.presentationTimeline.yf(m.Na),a.presentationTimeline.Qg(c,d)),{oc:function(){return Lt(n,
987
+ m,e,l,f,g,h,a.J.oe)}};var p=null;d=d=null;a.na.id&&a.J.id&&(d=a.na.id+","+a.J.id,d=c[d])&&(p=d.segmentIndex);var r=a.ia.start,u=a.ia.duration?r+a.ia.duration:Infinity;p?(c=p,Mt(c,m,r,u,l),c.Ga(a.presentationTimeline.mb())):p=new Nt(m,a.J.id,a.bandwidth,a.J.Ja,a.qb,r,u,l,g,a.J.oe);m.timeline&&"image"!==a.ga.contentType&&"text"!==a.ga.contentType&&a.presentationTimeline.Rg(p.h?p.h.timeline:[],r);d&&a.Ib&&(d.segmentIndex=p);return{oc:function(){p instanceof Nt&&0==p.getNumReferences()&&Mt(p,m,r,u,l);
988
+ return Promise.resolve(p)}}}function Ht(a){return a.hc}function Jt(a){var b=dt(a,Ht),c=et(a,Ht,"media"),d=et(a,Ht,"index"),e=et(a,Ht,"k"),f=0;e&&(f=parseInt(e,10));return{te:b.te,Na:b.Na,timescale:b.timescale,wd:b.wd,fc:b.fc,$f:b.$f,timeline:b.timeline,dc:c&&Hc(c),ld:d,mimeType:a.J.mimeType,codecs:a.J.codecs,bandwidth:a.bandwidth,Fi:f}}
989
989
  function Kt(a){var b=a.ld?1:0;b+=a.timeline?1:0;b+=a.Na?1:0;if(0==b)throw new T(2,4,4002);1!=b&&(a.ld&&(a.timeline=null),a.te=null,a.Na=null);if(!a.ld&&!a.dc)throw new T(2,4,4002);}
990
- function Lt(a,b,c,d,e,f,g,h){function k(K){var O=K-w,M=O*v,N=b.te,R=O*N;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(N));M+=p;O=M+v;N=Math.min(O,m());var Q=[],U=b.Fi;if(U)for(var da=(N-M)/U,V={},ea=0;ea<U;V={oh:void 0},ea++){var Ia=M+da*ea,Ca=Ia+da;V.oh=ea+1;V=new Wi(Ia,Ca,function(db){return function(){var Wa=ct(z,B,K,db.oh,y,R);return Oe(C(),[Wa],E())}}(V),0,null,d,H,p,m(),[],"",null,null,Xi,f);V.codecs=a.J.codecs;V.mimeType=a.J.mimeType;0==h?0<ea&&V.Nc():0!=ea%h&&V.Nc();Q.push(V)}M=
991
- new Wi(M,N,function(){if(U)return[];var db=ct(z,B,K,null,y,R);return Oe(C(),[db],E())},0,null,d,H,p,m(),Q,"",null,null,Xi,f,0<Q.length);M.codecs=a.J.codecs;M.mimeType=a.J.mimeType;M.bandwidth=a.bandwidth;M.j=O;return M}function l(){var K=[Math.max(n.rb(),p),Math.min(n.Zb(),m())].map(function(O){return O-p});K=[Math.ceil(K[0]/v),Math.ceil(K[1]/v)-1];a.J.Ya&&K[1]++;return K.map(function(O){return O+w})}function m(){var K=null!=r&&e[r]||u;return K?p+K:Infinity}var n=a.presentationTimeline,p=a.ia.start,
992
- r=a.na.id,u=a.ia.duration,v=b.Na,w=b.wd,z=b.dc,y=a.bandwidth||null,B=a.J.id,C=a.J.Ja,E=a.pb,H=p-b.fc,A=l();c=a.zb?Math.max(A[0],A[1]-c+1):A[0];g=g||A[1];A=[];for(var D=c;D<=g;++D){var F=k(D);A.push(F)}var J=new fl(A);A=n.Zb()<m();D=n.U();if(A||D){var L=Math.max(c,g+1);c=v;a.J.Ya&&(c=.1);J.ue(c,function(){var K=n.rb();J.Ga(K);var O=t(l());O.next();O=O.next().value;for(var M=[];L<=O;){var N=k(L);M.push(N);L++}return K>m()&&!M.length?null:M})}return Promise.resolve(J)}
993
- function It(a,b){var c=a.J.Qd;c||(c=et(a,Ht,"initialization"));if(!c)return null;c=Hc(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ja,g=a.pb;b=new Ui(function(){var h=ct(c,d,null,null,e,null);return Oe(f(),[h],g())},0,null,ut(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}function Nt(a,b,c,d,e,f,g,h,k,l,m){fl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.j=f;this.l=g;this.s=h;this.A=l;this.G=m;k&&Ot(this)}pa(Nt,fl);q=Nt.prototype;
990
+ function Lt(a,b,c,d,e,f,g,h){function k(K){var O=K-w,M=O*v,N=b.te,R=O*N;"BigInt"in window&&R>Number.MAX_SAFE_INTEGER&&(R=BigInt(O)*BigInt(N));M+=p;O=M+v;N=Math.min(O,m());var Q=[],V=b.Fi;if(V)for(var da=(N-M)/V,U={},ea=0;ea<V;U={oh:void 0},ea++){var Ia=M+da*ea,Ca=Ia+da;U.oh=ea+1;U=new Wi(Ia,Ca,function(db){return function(){var Wa=ct(z,B,K,db.oh,y,R);return Oe(C(),[Wa],E())}}(U),0,null,d,H,p,m(),[],"",null,null,Xi,f);U.codecs=a.J.codecs;U.mimeType=a.J.mimeType;0==h?0<ea&&U.Nc():0!=ea%h&&U.Nc();Q.push(U)}M=
991
+ new Wi(M,N,function(){if(V)return[];var db=ct(z,B,K,null,y,R);return Oe(C(),[db],E())},0,null,d,H,p,m(),Q,"",null,null,Xi,f,0<Q.length);M.codecs=a.J.codecs;M.mimeType=a.J.mimeType;M.bandwidth=a.bandwidth;M.j=O;return M}function l(){var K=[Math.max(n.mb(),p),Math.min(n.Zb(),m())].map(function(O){return O-p});K=[Math.ceil(K[0]/v),Math.ceil(K[1]/v)-1];a.J.Ya&&K[1]++;return K.map(function(O){return O+w})}function m(){var K=null!=r&&e[r]||u;return K?p+K:Infinity}var n=a.presentationTimeline,p=a.ia.start,
992
+ r=a.na.id,u=a.ia.duration,v=b.Na,w=b.wd,z=b.dc,y=a.bandwidth||null,B=a.J.id,C=a.J.Ja,E=a.qb,H=p-b.fc,A=l();c=a.Ib?Math.max(A[0],A[1]-c+1):A[0];g=g||A[1];A=[];for(var D=c;D<=g;++D){var F=k(D);A.push(F)}var J=new fl(A);A=n.Zb()<m();D=n.U();if(A||D){var L=Math.max(c,g+1);c=v;a.J.Ya&&(c=.1);J.ue(c,function(){var K=n.mb();J.Ga(K);var O=t(l());O.next();O=O.next().value;for(var M=[];L<=O;){var N=k(L);M.push(N);L++}return K>m()&&!M.length?null:M})}return Promise.resolve(J)}
993
+ function It(a,b){var c=a.J.Qd;c||(c=et(a,Ht,"initialization"));if(!c)return null;c=Hc(c);var d=a.J.id,e=a.bandwidth||null,f=a.J.Ja,g=a.qb;b=new Ui(function(){var h=ct(c,d,null,null,e,null);return Oe(f(),[h],g())},0,null,ut(a),null,null,b);b.codecs=a.J.codecs;b.mimeType=a.J.mimeType;return b}function Nt(a,b,c,d,e,f,g,h,k,l){fl.call(this,[]);this.h=a;this.F=b;this.B=c;this.C=d;this.H=e;this.j=f;this.l=g;this.s=h;this.A=k;this.G=l;Ot(this)}pa(Nt,fl);q=Nt.prototype;
994
994
  q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){fl.prototype.release.call(this);this.h=null};q.Ga=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
995
- function Mt(a,b,c,d,e,f){Pt(a,f);if(a.h){c=a.h.timeline;a.h.dc!==b.dc&&(a.h.dc=b.dc);if(c.length){var g=c[c.length-1];b=b.timeline.filter(function(h){return h.end>g.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;e&&Ot(a)}function Pt(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&$i(c,b)}}
996
- function Ot(a){if(!a.o){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.l)b.pop();else break;a.Ga(a.j)}}q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
997
- q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Xi,f=d.cg+this.h.bg;c=this.j-this.h.fc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Fb,r={},u=0;u<d.Fb;r={we:void 0,ph:void 0},u++){var v=d.start+p*u,w=v+p;r.ph=u+1;r.we=null;r=new Wi(this.j+v,this.j+w,function(z){return function(){if(!b.h)return[];
998
- null==z.we&&(z.we=Qt(b.h.dc,b.F,e,b.B,f,z.ph,b.C,b.H));return z.we}}(r),0,null,this.s,c,this.j,this.l,[],"",null,null,Xi,this.A);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.G?0<u&&r.Nc():0!=u%this.G&&r.Nc();n.push(r)}c=new Wi(this.j+d.start,h,function(){return 0<d.Fb||!b.h?[]:Qt(b.h.dc,b.F,e,b.B,f,null,b.C,b.H)},0,null,this.s,c,this.j,this.l,n,"",null,null,Xi,this.A,0<d.Fb);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
999
- q.Bb=function(a){Ot(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Qt(a,b,c,d,e,f,g,h){a=ct(a,b,c,f,d||null,e);return Oe(g(),[a],h()).map(function(k){return k.toString()})};function Rt(a){this.o=null;this.A=a;this.G=new lh;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.s="UNKNOWN"}Rt.prototype.configure=function(a){this.o=a};Rt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Rt.prototype.setManifestType=function(a){this.s=a};
995
+ function Mt(a,b,c,d,e){Pt(a,e);if(a.h){c=a.h.timeline;a.h.dc!==b.dc&&(a.h.dc=b.dc);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,x(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;Ot(a)}function Pt(a,b){if(a.s!==b){a.s=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&Zi(c,b)}}
996
+ function Ot(a){if(!a.o){for(var b=[],c=t(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.Ga(a.j)}}
997
+ q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
998
+ q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.Xi,f=d.ag+this.h.$f;c=this.j-this.h.fc;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.Eb,r={},u=0;u<d.Eb;r={we:void 0,ph:void 0},u++){var v=d.start+p*u,w=v+p;r.ph=u+1;r.we=null;r=new Wi(this.j+v,this.j+w,function(z){return function(){if(!b.h)return[];
999
+ null==z.we&&(z.we=Qt(b.h.dc,b.F,e,b.B,f,z.ph,b.C,b.H));return z.we}}(r),0,null,this.s,c,this.j,this.l,[],"",null,null,Xi,this.A);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.G?0<u&&r.Nc():0!=u%this.G&&r.Nc();n.push(r)}c=new Wi(this.j+d.start,h,function(){return 0<d.Eb||!b.h?[]:Qt(b.h.dc,b.F,e,b.B,f,null,b.C,b.H)},0,null,this.s,c,this.j,this.l,n,"",null,null,Xi,this.A,0<d.Eb);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
1000
+ q.Ab=function(a){Ot(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Qt(a,b,c,d,e,f,g,h){a=ct(a,b,c,f,d||null,e);return Oe(g(),[a],h()).map(function(k){return k.toString()})};function Rt(a){this.o=null;this.A=a;this.G=new lh;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.s="UNKNOWN"}Rt.prototype.configure=function(a){this.o=a};Rt.prototype.destroy=function(){this.A=this.o=null;this.i=[];this.h=null;this.m=[];this.F=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.G.destroy()};Rt.prototype.setManifestType=function(a){this.s=a};
1000
1001
  function St(a,b){var c,d,e,f,g,h,k;return P(function(l){if(1==l.g)return c=Oe(a.i,[Tt(a,b)]),d=sh(c,a.o.retryParameters),e=a.A.networkingEngine.request(8,d),mh(a.G,e),ta(l,2),G(l,e.promise,4);if(2!=l.g)return f=l.h,g=Ac(f.data),h=JSON.parse(g),1==h.VERSION&&Ut(a,h,f.uri),va(l,0);if((k=wa(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new ac(function(){St(a,b)});a.g.$(a.C);I(l)})}
1001
1002
  function Tt(a,b){if(!a.m.length)return b;b=new pe(b);var c=a.B||a.m[0],d=Math.round(a.A.getBandwidthEstimate()),e=b.g;"DASH"==a.s?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.s&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Ge(e)&&ve(b,e);return b.toString()}function Ut(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new ac(function(){St(a,d)});if(c=b.TTL)a.C=c;a.g.$(a.C);a.m=b["PATHWAY-PRIORITY"]||[];a.F=b["PATHWAY-CLONES"]||[]}
1002
1003
  function Vt(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Rt.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
1003
- function Wt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Rc:void 0},f=e.next())if(g.Rc=f.value,f=b.get(g.Rc))d.push({Ff:g.Rc,location:f});else if(f=a.F.find(function(k){return function(l){return l.Cj==k.Rc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].wh?(h=new pe(h),se(h,f["URI-REPLACEMENT"].wh),d.push({Ff:g.Rc,location:h.toString()})):d.push({Ff:g.Rc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
1004
- h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new pe(k.location)).Ib))return!1;return!0});d.length&&(a.B=d[0].Ff);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Oe(a.i,d)};function Xt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=Xt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.ki=function(){return this.l};q.kf=function(){return this.j.slice()};q.Th=function(){return this.i};
1005
- q.tg=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Ue)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
1004
+ function Wt(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Rc:void 0},f=e.next())if(g.Rc=f.value,f=b.get(g.Rc))d.push({Ef:g.Rc,location:f});else if(f=a.F.find(function(k){return function(l){return l.Cj==k.Rc}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].wh?(h=new pe(h),se(h,f["URI-REPLACEMENT"].wh),d.push({Ef:g.Rc,location:h.toString()})):d.push({Ef:g.Rc,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
1005
+ h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new pe(k.location)).Hb))return!1;return!0});d.length&&(a.B=d[0].Ef);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.B=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Oe(a.i,d)};function Xt(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.s=this.o=!1;this.m=new Set}q=Xt.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.s=this.o=!1;this.m.clear()};q.ki=function(){return this.l};q.kf=function(){return this.j.slice()};q.Th=function(){return this.i};
1006
+ q.rg=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a}));else if(a.type==Ue)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=
1006
1007
  d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
1007
- function Yt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Zt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[$t(n),n]})),l=new Map(h.textStreams.map(function(n){return[au(n),n]}));h=new Map(h.imageStreams.map(function(n){return[bu(n),n]}));if(b){var m=cu(Ue);l.set(au(m),m);m=cu("image");h.set(bu(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{lg:c,uh:d,qh:e,Ig:f}}
1008
- q.Le=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q;return P(function(U){if(1==U.g){e=We;if(!b&&1==a.length)return f=Yt(a,!1),g=f.lg,h=f.uh,k=f.qh,l=f.Ig,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),U.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return U.return();u=Yt(a,!0);v=u.lg;w=u.uh;z=u.qh;y=u.Ig;return G(U,
1008
+ function Yt(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Zt(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[$t(n),n]})),l=new Map(h.textStreams.map(function(n){return[au(n),n]}));h=new Map(h.imageStreams.map(function(n){return[bu(n),n]}));if(b){var m=cu(Ue);l.set(au(m),m);m=cu("image");h.set(bu(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{jg:c,uh:d,qh:e,Gg:f}}
1009
+ q.Le=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q;return P(function(V){if(1==V.g){e=We;if(!b&&1==a.length)return f=Yt(a,!1),g=f.jg,h=f.uh,k=f.qh,l=f.Gg,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),V.u(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return V.return();u=Yt(a,!0);v=u.jg;w=u.uh;z=u.qh;y=u.Gg;return G(V,
1009
1010
  Promise.all([du(d,d.h,v,n,eu,fu,m),du(d,d.g,w,n,eu,fu,m),du(d,d.j,z,n,eu,fu,m),du(d,d.i,y,n,eu,fu,m)]),2)}B=0;C=[];if(d.g.length&&d.h.length)for(J=t(d.h),L=J.next();!L.done;L=J.next())for(K=L.value,O=t(d.g),M=O.next();!M.done;M=O.next())N=M.value,R=Wb(K.drmInfos,N.drmInfos),K.drmInfos.length&&N.drmInfos.length&&!R.length||(Q=B++,C.push({id:Q,language:K.language,disabledUntilTime:0,primary:K.primary,audio:K,video:N,bandwidth:(K.bandwidth||0)+(N.bandwidth||0),drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,
1010
- decodingInfos:[]}));else for(E=d.g.length?d.g:d.h,H=t(E),A=H.next();!A.done;A=H.next())D=A.value,F=B++,C.push({id:F,language:D.language,disabledUntilTime:0,primary:D.primary,audio:D.type==e.X?D:null,video:D.type==e.ka?D:null,bandwidth:D.bandwidth||0,drmInfos:D.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=C;I(U)})};
1011
- function gu(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M;return P(function(N){switch(N.g){case 1:b=We;if(1==a.length)return N.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.X}).map(function(Q){return[Zt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ka}).map(function(Q){return[$t(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.va}).map(function(Q){return[au(Q),Q]}))});
1012
- f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Fe}).map(function(Q){return[bu(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=hu(b.va),k.set(au(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=hu(b.Fe),p.set(bu(r),r);u=new Xt;return G(N,du(u,[],c,0,iu,ju,0),2);case 2:return v=N.h,G(N,du(u,[],d,0,iu,ju,0),3);case 3:return w=N.h,G(N,du(u,[],e,0,iu,ju,0),4);case 4:return z=N.h,G(N,du(u,[],f,0,iu,ju,0),5);case 5:y=N.h;B=0;if(w.length&&v.length)for(D=
1011
+ decodingInfos:[]}));else for(E=d.g.length?d.g:d.h,H=t(E),A=H.next();!A.done;A=H.next())D=A.value,F=B++,C.push({id:F,language:D.language,disabledUntilTime:0,primary:D.primary,audio:D.type==e.X?D:null,video:D.type==e.ka?D:null,bandwidth:D.bandwidth||0,drmInfos:D.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});d.l=C;I(V)})};
1012
+ function gu(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M;return P(function(N){switch(N.g){case 1:b=We;if(1==a.length)return N.return(a[0]);c=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.X}).map(function(Q){return[Zt(Q),Q]}))});d=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.ka}).map(function(Q){return[$t(Q),Q]}))});e=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.wa}).map(function(Q){return[au(Q),Q]}))});
1013
+ f=a.map(function(R){return new Map(R.filter(function(Q){return Q.type===b.Fe}).map(function(Q){return[bu(Q),Q]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=hu(b.wa),k.set(au(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=hu(b.Fe),p.set(bu(r),r);u=new Xt;return G(N,du(u,[],c,0,iu,ju,0),2);case 2:return v=N.h,G(N,du(u,[],d,0,iu,ju,0),3);case 3:return w=N.h,G(N,du(u,[],e,0,iu,ju,0),4);case 4:return z=N.h,G(N,du(u,[],f,0,iu,ju,0),5);case 5:y=N.h;B=0;if(w.length&&v.length)for(D=
1013
1014
  t(v),F=D.next();!F.done;F=D.next())for(J=F.value,L=t(w),K=L.next();!K.done;K=L.next())O=K.value,M=B++,O.variantIds.push(M),J.variantIds.push(M);else for(C=w.concat(v),E=t(C),H=E.next();!H.done;H=E.next())A=H.value,A.variantIds=[B++];return N.return(w.concat(v).concat(z).concat(y))}})}
1014
1015
  function du(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J;return P(function(L){switch(L.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){L.u(4);break}n=m.value;return G(L,ku(a,n,c,d,f,h,g),5);case 5:p=L.h;if(!p)throw new T(2,4,4037);m=l.next();L.u(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),z=w.next();!z.done;z=w.next())y=z.value,(B=lu(a,y,c,e,f,h))&&b.push(B);C=t(h);for(E=C.next();!E.done;E=
1015
- C.next())for(H=E.value,A=t(H),D=A.next(),F={};!D.done;F={Vf:void 0},D=A.next())if(F.Vf=D.value,!mu(F.Vf)&&(J=b.some(function(K){return function(O){return nu(a,K.Vf,O)}}(F))))throw new T(2,4,4037);return L.return(b)}})}function ku(a,b,c,d,e,f,g){return P(function(h){if(1==h.g)return ou(a,c,b,0<g),b.matchedStreams?b.segmentIndex?G(h,pu(b,d+g),2):h.u(2):h.return(!1);qu(b,d,e,f,g);return h.return(!0)})}
1016
+ C.next())for(H=E.value,A=t(H),D=A.next(),F={};!D.done;F={Tf:void 0},D=A.next())if(F.Tf=D.value,!mu(F.Tf)&&(J=b.some(function(K){return function(O){return nu(a,K.Tf,O)}}(F))))throw new T(2,4,4037);return L.return(b)}})}function ku(a,b,c,d,e,f,g){return P(function(h){if(1==h.g)return ou(a,c,b,0<g),b.matchedStreams?b.segmentIndex?G(h,pu(b,d+g),2):h.u(2):h.return(!1);qu(b,d,e,f,g);return h.return(!0)})}
1016
1017
  function pu(a,b){var c,d,e,f,g,h;return P(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex());return G(k,Promise.all(c),2)}if(a.segmentIndex instanceof il)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);I(k)})}
1017
1018
  function lu(a,b,c,d,e,f){if(mu(b))return null;var g=d(b);ou(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return P(function(h){if(g.segmentIndex)return h.u(0);g.segmentIndex=new il;return G(h,pu(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;qu(g,0,e,f,0);return g}
1018
1019
  function qu(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==Kf(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
@@ -1034,120 +1035,121 @@ function hu(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType
1034
1035
  function cu(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new fl([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set}}
1035
1036
  function Au(a,b,c){if(b==a&&a!=c)return Cu;if(c==a&&a!=b)return Bu;if(b>a){if(c<=a||c-a<b-a)return Bu;if(c-a>b-a)return Cu}else{if(c>a)return Cu;if(a-c<a-b)return Bu;if(a-c>a-b)return Cu}return Eu}function Du(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Bu:b<a?Cu:Eu}function mu(a){switch(a.type){case Ue:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
1036
1037
  function $t(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,zu(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth])}function Zt(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,zu(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary])}function au(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}
1037
- function bu(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function zu(a){if(!Fu.has(a)){var b=ff(a);Fu.set(a,b)}return Fu.get(a)}S("shaka.util.PeriodCombiner",Xt);Xt.prototype.setUseStreamOnce=Xt.prototype.kh;Xt.prototype.setAllowMultiTypeVariants=Xt.prototype.dh;Xt.prototype.combinePeriods=Xt.prototype.Le;Xt.prototype.deleteStream=Xt.prototype.tg;Xt.prototype.getImageStreams=Xt.prototype.Th;Xt.prototype.getTextStreams=Xt.prototype.kf;Xt.prototype.getVariants=Xt.prototype.ki;
1038
+ function bu(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function zu(a){if(!Fu.has(a)){var b=ff(a);Fu.set(a,b)}return Fu.get(a)}S("shaka.util.PeriodCombiner",Xt);Xt.prototype.setUseStreamOnce=Xt.prototype.kh;Xt.prototype.setAllowMultiTypeVariants=Xt.prototype.dh;Xt.prototype.combinePeriods=Xt.prototype.Le;Xt.prototype.deleteStream=Xt.prototype.rg;Xt.prototype.getImageStreams=Xt.prototype.Th;Xt.prototype.getTextStreams=Xt.prototype.kf;Xt.prototype.getVariants=Xt.prototype.ki;
1038
1039
  var Bu=1,Eu=0,Cu=-1,Fu=new Map;function Gu(a,b){var c=new DOMParser,d=Hu.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function Iu(a,b){try{var c=Dc(a);return Gu(c,b)}catch(d){return null}}
1039
- var Hu=new Ub(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Ju(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.oa=1;this.F=[];this.l={Zd:"",type:"",profiles:[],Ob:null,Ya:0,Ja:null,ud:0};this.s=new Map;this.o={};this.B={};this.ma={};this.m=new Xt;this.K=0;this.ra=new Sa(5);this.L=new ac(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.fb(a.I,"timeupdate"),a.I.paused)){a.G.ua(a.I,"timeupdate",function(){return Ku(a)});return}Ku(a)});this.R=new lh;this.O=null;this.C=[];this.ea=Infinity;this.H=!1;this.h=null;this.M=0;this.ja=!1;this.G=
1040
+ var Hu=new Ub(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function Ju(){var a=this;this.j=this.g=null;this.A=[];this.i=null;this.ra=1;this.F=[];this.l={Zd:"",type:"",profiles:[],Nb:null,Ya:0,Ja:null,ud:0};this.s=new Map;this.o={};this.B={};this.ma={};this.m=new Xt;this.K=0;this.oa=new Sa(5);this.L=new ac(function(){if(a.I&&!a.g.continueLoadingWhenPaused&&(a.G.fb(a.I,"timeupdate"),a.I.paused)){a.G.va(a.I,"timeupdate",function(){return Ku(a)});return}Ku(a)});this.R=new lh;this.O=null;this.C=[];this.ea=Infinity;this.H=!1;this.h=null;this.M=0;this.ja=!1;this.G=
1040
1041
  new gb;this.I=null;this.Y=!1;this.da="";this.fa=function(){return!1};this.aa=[]}q=Ju.prototype;q.configure=function(a,b){var c=this.j&&a.dash.updatePeriod!=this.g.dash.updatePeriod&&0<=a.dash.updatePeriod;this.g=a;b&&(this.fa=b);c&&this.i&&this.i.presentationTimeline.U()&&this.L.zc();this.h&&this.h.configure(this.g);this.m&&(this.m.dh(this.g.dash.multiTypeVariantsAllowed&&nb()),this.m.kh(this.g.dash.useStreamOnceInPeriodFlattening))};
1041
1042
  q.start=function(a,b){var c=this,d;return P(function(e){if(1==e.g)return c.H=b.isLowLatencyMode(),c.A=[a],c.j=b,G(e,Lu(c),2);d=e.h;c.j&&Mu(c,d);if(!c.j)throw new T(2,7,7001);return e.return(c.i)})};
1042
- q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Zd:"",type:"",profiles:[],Ob:null,Ya:0,Ja:null,ud:0};this.m=null;null!=this.L&&(this.L.stop(),this.L=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.R.destroy()};
1043
+ q.stop=function(){for(var a=t(Object.values(this.o)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.A=[];this.i=null;this.o={};this.B={};this.s.clear();this.l={Zd:"",type:"",profiles:[],Nb:null,Ya:0,Ja:null,ud:0};this.m=null;null!=this.L&&(this.L.stop(),this.L=null);this.h&&this.h.destroy();this.G&&(this.G.release(),this.G=null);return this.R.destroy()};
1043
1044
  q.update=function(){var a=this,b;return P(function(c){if(1==c.g)return ta(c,2),G(c,Lu(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.j||!b)return c.return();a.j.onError(b);I(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.U()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.Zb();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Mu(this,0))}}};
1044
1045
  q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.I=a};
1045
- function Lu(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return b=4,c="MPD",d=Nu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Wt(a.h,"Location",!0),f.length&&(e=f)),g=sh(e,a.g.retryParameters),h=Date.now(),G(p,Ou(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new pe(k.uri);a.da=l.g.toString();return G(p,Pu(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.ra.sample(1,n);return p.return(n)})}
1046
+ function Lu(a){var b,c,d,e,f,g,h,k,l,m,n;return P(function(p){if(1==p.g)return b=4,c="MPD",d=Nu(a),e=a.A,d.length?(e=d,c="Patch",b=6):1<a.A.length&&a.h&&(f=Wt(a.h,"Location",!0),f.length&&(e=f)),g=sh(e,a.g.retryParameters),h=Date.now(),G(p,Ou(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.A.includes(k.uri)&&a.A.unshift(k.uri);l=new pe(k.uri);a.da=l.g.toString();return G(p,Pu(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.oa.sample(1,n);return p.return(n)})}
1046
1047
  function Pu(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return P(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=Om;if(f!=g){pb("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=Iu(e,d);if(!h)throw new T(2,4,4001,c);f(h);e=Ec(h.outerHTML)}k=Uc(e,d);if(!k)throw new T(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Pm;l!=m&&l(k);if("Patch"===d)return v.return(Qu(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Ru(a,k,c));
1047
1048
  p=a.g.dash.xlinkFailGracefully;r=it(k,a.g.retryParameters,p,c,a.j.networkingEngine);mh(a.R,r);return G(v,r.promise,2)}u=v.h;return v.return(Ru(a,u,c))})}
1048
- function Ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,U,da,V,ea,Ia,Ca,db,Wa,za,Na,yb,Ya,zb,Rd,Kb,bd,Lb,Ab,Rg,Jc,re,tf,uf,Zi;return P(function(Kc){switch(Kc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=cd(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=fd(l))p=Oe(d,[n])[0],m&&(a.h?Vt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Wt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Zd=b.attributes.id||
1049
+ function Ru(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,V,da,U,ea,Ia,Ca,db,Wa,za,Pa,Db,Xa,rb,Bd,Kb,bd,Lb,zb,Sg,Jc,re,tf,uf,$i;return P(function(Kc){switch(Kc.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=cd(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=fd(l))p=Oe(d,[n])[0],m&&(a.h?Vt(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Wt(a.h,"Location",!0),0<r.length&&(d=a.A=r)):e.length&&(d=a.A=e);a.l.Zd=b.attributes.id||
1049
1050
  "";a.l.ud=kd(b,"publishTime",nd)||0;a.F=cd(b,"PatchLocation");u=Promise.resolve();if((v=hd(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Rt(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,z=fd(v))(y=kd(v,"queryBeforeStart",ud,!1))?u=St(a.h,z):St(a.h,z);B=t(f.keys());for(C=B.next();!C.done;C=B.next())E=C.value,H=f.get(E),Vt(a.h,"Location",E,H)}A=cd(b,"BaseURL");D=!1;if(a.h)for(F=t(A),J=F.next();!J.done;J=F.next())L=J.value,
1050
- K=L.attributes.serviceLocation,O=fd(L),K&&O&&(Vt(a.h,"BaseURL",K,O),D=!0);a.aa=null;D&&a.h||(M=A.map(fd),a.aa=Oe(d,M));N=function(){return a.h&&D?Wt(a.h,"BaseURL"):a.aa?a.aa:[]};a.l.Ja=N;R=0;A&&A.length&&(R=kd(A[0],"availabilityTimeOffset",td)||0);a.l.Ya=R;Q=a.g.dash.ignoreMinBufferTime;U=0;Q||(U=kd(b,"minBufferTime",od)||0);a.K=kd(b,"minimumUpdatePeriod",od,-1);da=kd(b,"availabilityStartTime",nd);V=kd(b,"timeShiftBufferDepth",od);ea=a.g.dash.ignoreSuggestedPresentationDelay;Ia=null;ea||(Ia=kd(b,
1051
- "suggestedPresentationDelay",od));Ca=a.g.dash.ignoreMaxSegmentDuration;db=null;Ca||(db=kd(b,"maxSegmentDuration",od));Wa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.Y=a.i.presentationTimeline.U()&&"static"==Wa);a.l.type=Wa;Su(a);if(a.i)for(za=a.i.presentationTimeline,Na=t(Object.values(a.o)),yb=Na.next();!yb.done;yb=Na.next())Ya=yb.value,Ya.segmentIndex&&Ya.segmentIndex.Ga(za.rb());else zb=a.g.defaultPresentationDelay||1.5*U,Rd=null!=Ia?Ia:zb,za=new Kk(da,Rd,a.g.dash.autoCorrectDrift);
1052
- za.yc("static"==Wa);(Kb=za.U())&&!isNaN(a.g.availabilityWindowOverride)&&(V=a.g.availabilityWindowOverride);null==V&&(V=Infinity);za.pe(V);bd=b.attributes.profiles||"";a.l.profiles=bd.split(",");Lb={zb:"static"!=Wa,presentationTimeline:za,na:null,ia:null,ga:null,J:null,bandwidth:0,mf:!1,Ya:R,Ob:null,profiles:bd.split(","),roles:null,pb:function(){return""}};a.M=0;Ab=Tu(a,Lb,N,b,!1);Rg=Ab.duration;Jc=Ab.periods;("static"!=Wa||a.Y)&&Ab.vg||za.eb(Rg||Infinity);a.ja&&!a.H&&(re=a.j.isAutoLowLatencyMode())&&
1053
- (a.j.enableLowLatencyMode(),a.H=a.j.isLowLatencyMode());a.H&&za.eh(a.ea);za.zf(db||1);return G(Kc,u,2);case 2:a.H&&(U=0,tf=null!=Ia?Ia:a.g.defaultPresentationDelay,za.Rf(tf));if(!a.i)return G(Kc,a.m.Le(Jc,Lb.zb),6);a.i.periodCount=Jc.length;a.i.gapCount=a.M;return G(Kc,Uu(a,Jc,!1),4);case 6:a.i={presentationTimeline:za,variants:a.m.l,textStreams:a.m.kf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:U||0,sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",
1054
- serviceDescription:Vu(b),nextUrl:Wu(b),periodCount:Jc.length,gapCount:a.M,isLowLatency:a.ja,startTime:null};if(!za.sh()){Kc.u(7);break}uf=cd(b,"UTCTiming");return G(Kc,Xu(a,N,uf),8);case 8:Zi=Kc.h;if(!a.j)return Kc.return();za.fh(Zi);case 7:za.Vd();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),I(Kc)}})}function Uu(a,b,c){var d;return P(function(e){if(1==e.g)return G(e,a.m.Le(b,!0,c),2);a.i.variants=a.m.l;d=a.m.kf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);I(e)})}
1055
- function Qu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K;return P(function(O){if(1==O.g){c=b.attributes.mpdId;d=kd(b,"originalPublishTime",nd);if(!c||c!==a.l.Zd||d!==a.l.ud)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(ad(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=wd(l.attributes.sel||""),n=m[m.length-1],p=fd(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Ub){r=fd(l)||"";var M=od(r);if(null!=M){a.l.Ob=M;for(var N=t(a.s.values()),R=N.next();!R.done;R=N.next())R.value.Ob=
1056
- M}}else if("type"===n.Ub){a.i.presentationTimeline.yc("static"==p);a.l.type=p;M=t(a.s.values());for(N=M.next();!N.done;N=M.next())N.value.zb="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Ub?a.l.ud=nd(p)||0:null===n.Ub&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)xd(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Yu(a,n.id);else if("SegmentTemplate"===n.name){N=wd(l.attributes.sel||"");M=N[N.length-1];if(M.Ub){N=Zu(a,N);R=fd(l)||
1057
- "";for(var Q=t(N),U=Q.next();!U.done;U=Q.next())U=a.s.get(U.value),zd(U.J.hc,l.tagName,M.Ub,R);M=N}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())z=w.value,g.add(z)}else if("SegmentTimeline"===n.name||"S"===n.name){M=wd(l.attributes.sel||"");M=Zu(a,M);N=t(M);for(R=N.next();!R.done;R=N.next())R=a.s.get(R.value),R=ft(R,Ht,"SegmentTimeline"),Q=cd(R,"S"),xd(Q,l),R.children=Q;y=M;B=t(y);for(C=B.next();!C.done;C=B.next())E=C.value,g.add(E)}H=t(g);for(A=H.next();!A.done;A=H.next())D=A.value,$u(a,
1058
- D);F=t(f);for(J=F.next();!J.done;J=F.next())L=J.value,e.push.apply(e,x(av(a,L)));if(!e.length)return O.u(2);a.i.periodCount+=e.length;a.i.gapCount=a.M;return G(O,Uu(a,e,!0),2)}"static"==a.l.type&&(K=a.l.Ob,a.i.presentationTimeline.eb(K||Infinity));I(O)})}
1059
- function av(a,b){return Tu(a,{zb:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,na:null,ia:null,ga:null,J:null,bandwidth:0,mf:!1,Ya:a.l.Ya,profiles:a.l.profiles,Ob:a.l.Ob,roles:null,pb:function(){return""}},a.l.Ja,b,!0).periods}function Yu(a,b){a.i.periodCount--;for(var c=t(a.s.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.s.get(d);ft(e,Ht,"SegmentTimeline").children=[];$u(a,d);a.s.delete(d)}a.C=a.C.filter(function(f){return f!==b})}
1051
+ K=L.attributes.serviceLocation,O=fd(L),K&&O&&(Vt(a.h,"BaseURL",K,O),D=!0);a.aa=null;D&&a.h||(M=A.map(fd),a.aa=Oe(d,M));N=function(){return a.h&&D?Wt(a.h,"BaseURL"):a.aa?a.aa:[]};a.l.Ja=N;R=0;A&&A.length&&(R=kd(A[0],"availabilityTimeOffset",td)||0);a.l.Ya=R;Q=a.g.dash.ignoreMinBufferTime;V=0;Q||(V=kd(b,"minBufferTime",od)||0);a.K=kd(b,"minimumUpdatePeriod",od,-1);da=kd(b,"availabilityStartTime",nd);U=kd(b,"timeShiftBufferDepth",od);ea=a.g.dash.ignoreSuggestedPresentationDelay;Ia=null;ea||(Ia=kd(b,
1052
+ "suggestedPresentationDelay",od));Ca=a.g.dash.ignoreMaxSegmentDuration;db=null;Ca||(db=kd(b,"maxSegmentDuration",od));Wa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.Y=a.i.presentationTimeline.U()&&"static"==Wa);a.l.type=Wa;Su(a);if(a.i)for(za=a.i.presentationTimeline,Pa=za.mb(),Db=t(Object.values(a.o)),Xa=Db.next();!Xa.done;Xa=Db.next())rb=Xa.value,rb.segmentIndex&&rb.segmentIndex.Ga(Pa);else Bd=0,Bd=null!=Ia?Math.min(Ia,U||Infinity):0<a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:
1053
+ Math.min(1.5*V,U||Infinity),za=new Kk(da,Bd,a.g.dash.autoCorrectDrift);za.yc("static"==Wa);(Kb=za.U())&&!isNaN(a.g.availabilityWindowOverride)&&(U=a.g.availabilityWindowOverride);null==U&&(U=Infinity);za.pe(U);bd=b.attributes.profiles||"";a.l.profiles=bd.split(",");Lb={Ib:"static"!=Wa,presentationTimeline:za,na:null,ia:null,ga:null,J:null,bandwidth:0,mf:!1,Ya:R,Nb:null,profiles:bd.split(","),roles:null,qb:function(){return""}};a.M=0;zb=Tu(a,Lb,N,b,!1);Sg=zb.duration;Jc=zb.periods;("static"!=Wa||a.Y)&&
1054
+ zb.tg||za.eb(Sg||Infinity);a.ja&&!a.H&&(re=a.j.isAutoLowLatencyMode())&&(a.j.enableLowLatencyMode(),a.H=a.j.isLowLatencyMode());a.H&&za.eh(a.ea);za.yf(db||1);return G(Kc,u,2);case 2:a.H&&(V=0,tf=null!=Ia?Ia:a.g.defaultPresentationDelay,za.Pf(tf));if(!a.i)return G(Kc,a.m.Le(Jc,Lb.Ib),6);a.i.periodCount=Jc.length;a.i.gapCount=a.M;return G(Kc,Uu(a,Jc,!1),4);case 6:a.i={presentationTimeline:za,variants:a.m.l,textStreams:a.m.kf(),imageStreams:a.m.i,offlineSessionIds:[],minBufferTime:V||0,sequenceMode:a.g.dash.sequenceMode,
1055
+ ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Vu(b),nextUrl:Wu(b),periodCount:Jc.length,gapCount:a.M,isLowLatency:a.ja,startTime:null};if(!za.sh()){Kc.u(7);break}uf=cd(b,"UTCTiming");return G(Kc,Xu(a,N,uf),8);case 8:$i=Kc.h;if(!a.j)return Kc.return();za.fh($i);case 7:za.Vd();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),I(Kc)}})}
1056
+ function Uu(a,b,c){var d;return P(function(e){if(1==e.g)return G(e,a.m.Le(b,!0,c),2);a.i.variants=a.m.l;d=a.m.kf();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);I(e)})}
1057
+ function Qu(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K;return P(function(O){if(1==O.g){c=b.attributes.mpdId;d=kd(b,"originalPublishTime",nd);if(!c||c!==a.l.Zd||d!==a.l.ud)throw a.F=[],new T(1,4,4052);e=[];f=[];g=new Set;h=t(ad(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=wd(l.attributes.sel||""),n=m[m.length-1],p=fd(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.Tb){r=fd(l)||"";var M=od(r);if(null!=M){a.l.Nb=M;for(var N=t(a.s.values()),R=N.next();!R.done;R=N.next())R.value.Nb=
1058
+ M}}else if("type"===n.Tb){a.i.presentationTimeline.yc("static"==p);a.l.type=p;M=t(a.s.values());for(N=M.next();!N.done;N=M.next())N.value.Ib="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.Tb?a.l.ud=nd(p)||0:null===n.Tb&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)xd(a.F,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Yu(a,n.id);else if("SegmentTemplate"===n.name){N=wd(l.attributes.sel||"");M=N[N.length-1];if(M.Tb){N=Zu(a,N);R=fd(l)||
1059
+ "";for(var Q=t(N),V=Q.next();!V.done;V=Q.next())V=a.s.get(V.value),zd(V.J.hc,l.tagName,M.Tb,R);M=N}else M=[];u=M;v=t(u);for(w=v.next();!w.done;w=v.next())z=w.value,g.add(z)}else if("SegmentTimeline"===n.name||"S"===n.name){M=wd(l.attributes.sel||"");M=Zu(a,M);N=t(M);for(R=N.next();!R.done;R=N.next())R=a.s.get(R.value),R=ft(R,Ht,"SegmentTimeline"),Q=cd(R,"S"),xd(Q,l),R.children=Q;y=M;B=t(y);for(C=B.next();!C.done;C=B.next())E=C.value,g.add(E)}H=t(g);for(A=H.next();!A.done;A=H.next())D=A.value,$u(a,
1060
+ D);F=t(f);for(J=F.next();!J.done;J=F.next())L=J.value,e.push.apply(e,x(av(a,L)));if(!e.length)return O.u(2);a.i.periodCount+=e.length;a.i.gapCount=a.M;return G(O,Uu(a,e,!0),2)}"static"==a.l.type&&(K=a.l.Nb,a.i.presentationTimeline.eb(K||Infinity));I(O)})}
1061
+ function av(a,b){return Tu(a,{Ib:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,na:null,ia:null,ga:null,J:null,bandwidth:0,mf:!1,Ya:a.l.Ya,profiles:a.l.profiles,Nb:a.l.Nb,roles:null,qb:function(){return""}},a.l.Ja,b,!0).periods}function Yu(a,b){a.i.periodCount--;for(var c=t(a.s.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.s.get(d);ft(e,Ht,"SegmentTimeline").children=[];$u(a,d);a.s.delete(d)}a.C=a.C.filter(function(f){return f!==b})}
1060
1062
  function Zu(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.s.values()),a=e.next();!a.done;a=e.next())a=a.value,a.na.id===c&&a.ga.id===d&&a.J.id&&b.push(c+","+a.J.id);else if(-1<e)for(d=t(a.s.values()),a=d.next();!a.done;a=d.next())a=a.value,a.na.id===c&&a.ga.position===e&&a.J.id&&b.push(c+
1061
- ","+a.J.id);return b}function $u(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ga(a.i.presentationTimeline.rb());try{var e=Gt(c,function(f,g,h,k){return bv(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.ma,c.J.aesKey,null,!0);d.createSegmentIndex=function(){return P(function(f){if(1==f.g)return d.segmentIndex?f.u(0):G(f,e.oc(),3);d.segmentIndex=f.h;I(f)})}}catch(f){if(b=c.J.contentType,b!=Ue&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
1063
+ ","+a.J.id);return b}function $u(a,b){var c=a.s.get(b),d=a.o[b];d.segmentIndex&&d.segmentIndex.Ga(a.i.presentationTimeline.mb());try{var e=Gt(c,function(f,g,h,k){return bv(a,f,g,h,k)},a.o,!0,a.g.dash.initialSegmentLimit,a.ma,c.J.aesKey,null,!0);d.createSegmentIndex=function(){return P(function(f){if(1==f.g)return d.segmentIndex?f.u(0):G(f,e.oc(),3);d.segmentIndex=f.h;I(f)})}}catch(f){if(b=c.J.contentType,b!=Ue&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
1062
1064
  function Vu(a){var b=hd(a,"ServiceDescription");if(!b)return null;a=hd(b,"Latency");b=hd(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
1063
1065
  return c}function Wu(a){a=cd(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
1064
- function Tu(a,b,c,d,e){var f=b.Ob;f||(f=kd(d,"mediaPresentationDuration",od),a.l.Ob=f);var g=0;a.i&&a.i.presentationTimeline&&a.Y&&(g=a.i.presentationTimeline.Lb());var h=[],k=g;d=cd(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=kd(m,"start",od,k),r=m.attributes.id,u=kd(m,"duration",od);p=0==l&&0==p&&a.Y?g:p;var v=null;if(n){var w=kd(n,"start",od);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);w=Xe;v&&u&&Math.abs(v-u)>w&&v>u&&a.M++;null==v&&(v=u);if(!(null!==a.O&&null!==r&&null!==p&&p<
1065
- a.O)||a.C.includes(r)||l+1==d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=cv(a,b,c,{start:p,duration:v,node:m,rf:null==v||!n});h.push(k);b.na.id&&v&&(a.ma[b.na.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(z){return z.id});return null!=f?{periods:h,duration:f+g,vg:!1}:{periods:h,duration:k,vg:!0}}
1066
- function Su(a){var b=Object.keys(a.B).filter(function(f){return!a.C.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.B[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.tg(a.o[e],c),delete a.o[e];delete a.B[c]}}
1067
- function cv(a,b,c,d){b.na=sv(a,d.node,null,c);b.ia=d;b.na.Ya=b.Ya;b.na.id||(b.na.id="__shaka_period_"+d.start);var e=cd(d.node,"EventStream");c=b.presentationTimeline.rb();e=t(e);for(var f=e.next();!f.done;f=e.next())tv(a,d.start,d.duration,f.value,c);c=cd(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=uv(a,e)))b.pb=e;c=cd(d.node,"AdaptationSet").map(function(l,m){return vv(a,b,m,l)}).filter(yf);if(b.zb){d=
1068
- [];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Si);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);}d=c.filter(function(l){return!l.ag});c=c.filter(function(l){return l.ag});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ag.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next();!k.done;k=h.next())wg(k.value,e.streams)}}c=wv(a.g.disableAudio,d,"audio");e=wv(a.g.disableVideo,
1066
+ function Tu(a,b,c,d,e){var f=b.Nb;f||(f=kd(d,"mediaPresentationDuration",od),a.l.Nb=f);var g=0;a.i&&a.i.presentationTimeline&&a.Y&&(g=a.i.presentationTimeline.Yb());var h=[],k=g;d=cd(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=kd(m,"start",od,k),r=m.attributes.id,u=kd(m,"duration",od);p=0==l&&0==p&&a.Y?g:p;var v=null;if(n){var w=kd(n,"start",od);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);w=Xe;v&&u&&Math.abs(v-u)>w&&v>u&&a.M++;null==v&&(v=u);if(!(null!==a.O&&null!==r&&null!==p&&p<
1067
+ a.O)||a.C.includes(r)||l+1==d.length){null!==p&&(null===a.O||p>a.O)&&(a.O=p);k=cv(a,b,c,{start:p,duration:v,node:m,Ig:null==v||!n});h.push(k);b.na.id&&v&&(a.ma[b.na.id]=v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.C.includes(c)||a.C.push(c);else a.C=h.map(function(z){return z.id});return null!=f?{periods:h,duration:f+g,tg:!1}:{periods:h,duration:k,tg:!0}}
1068
+ function Su(a){var b=Object.keys(a.B).filter(function(f){return!a.C.includes(f)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=t(a.B[c]),e=d.next();!e.done;e=d.next())e=e.value,a.m&&a.m.rg(a.o[e],c),delete a.o[e];delete a.B[c]}}
1069
+ function cv(a,b,c,d){b.na=sv(a,d.node,null,c);b.ia=d;b.na.Ya=b.Ya;b.na.id||(b.na.id="__shaka_period_"+d.start);var e=cd(d.node,"EventStream");c=b.presentationTimeline.mb();e=t(e);for(var f=e.next();!f.done;f=e.next())tv(a,d.start,d.duration,f.value,c);c=cd(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=uv(a,e)))b.qb=e;c=cd(d.node,"AdaptationSet").map(function(l,m){return vv(a,b,m,l)}).filter(yf);if(b.Ib){d=
1070
+ [];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Si);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new T(2,4,4018);}d=c.filter(function(l){return!l.Zf});c=c.filter(function(l){return l.Zf});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Zf.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id)){h=t(h.streams);for(var k=h.next();!k.done;k=h.next())wg(k.value,e.streams)}}c=wv(a.g.disableAudio,d,"audio");e=wv(a.g.disableVideo,
1069
1071
  d,"video");f=wv(a.g.disableText,d,Ue);d=wv(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new T(2,4,4004);return{id:b.na.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}function wv(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,x(e.streams));return d},[])}
1070
- function vv(a,b,c,d){function e(L){var K=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];K&&L&&(L=Oe(b.ga.Ja(),[L],b.pb()),a.j.addFont(K,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=sv(a,d,b.na,null);b.ga.position=c;var h=!1;c=cd(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(yf),
1072
+ function vv(a,b,c,d){function e(L){var K=L.attributes["dvb:fontFamily"];L=L.attributes["dvb:url"];K&&L&&(L=Oe(b.ga.Ja(),[L],b.qb()),a.j.addFont(K,L[0]))}function f(L){switch(L){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(L){switch(L){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ga=sv(a,d,b.na,null);b.ga.position=c;var h=!1;c=cd(d,"Role");var k=c.map(function(L){return L.attributes.value}).filter(yf),
1071
1073
  l=void 0,m=b.ga.contentType==Ue;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var p=n.attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=cd(d,"EssentialProperty");c=null;var u=!1;n=null;p=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==w)c=v.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==
1072
1074
  w)var z=g(parseInt(v.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==w)var y=f(parseInt(v.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:"urn:dvb:dash:fontdownload:2014"==w?e(v):"urn:mpeg:dash:urlparam:2014"==w?(n=uv(a,v))||(p=!0):p=!0)}if(p)return null;var B=null;p=cd(d,"SupplementalProperty");p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==
1073
- v?B=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?z=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v?y=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==v?e(r):"urn:mpeg:dash:urlparam:2014"==v&&(n=uv(a,r));n&&(b.pb=n);n=cd(d,"Accessibility");var C=new Map,E;n=t(n);for(p=n.next();!p.done;p=n.next())if(r=p.value,p=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=p||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=
1075
+ v?B=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?z=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v?y=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==v?e(r):"urn:mpeg:dash:urlparam:2014"==v&&(n=uv(a,r));n&&(b.qb=n);n=cd(d,"Accessibility");var C=new Map,E;n=t(n);for(p=n.next();!p.done;p=n.next())if(r=p.value,p=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=p||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=
1074
1076
  p||a.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==r?E="visually impaired":"2"==r&&(E="hard of hearing"));else if(p=1,null!=r)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var H=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],H=w[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,H=w);C.set(v,Cf(H))}else C.set("svc1","und");else if(p=1,null!=r)for(r=r.split(";"),v=t(r),w=v.next();!w.done;w=
1075
1077
  v.next()){H=w.value;var A=w=void 0;H.includes("=")?(H=H.split("="),w=H[0].startsWith("CC")?H[0]:"CC"+H[0],A=H[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,A=H);C.set(w,Cf(A))}else C.set("CC1","und");n=cd(d,"ContentProtection");var D=Ss(n,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),F=Cf(b.ga.language||"und"),J=b.ga.label;n=cd(d,"Representation");d=n.map(function(L){if(L=xv(a,b,D,l,F,J,h,k,C,L,E,B))L.hdr=L.hdr||z,L.colorGamut=L.colorGamut||y,L.fastSwitching=u;return L}).filter(function(L){return!!L});
1076
- if(0==d.length){c="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new T(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=yv(d[0].mimeType,d[0].codecs),m=t(d),p=m.next();!p.done;p=m.next())p.value.type=b.ga.contentType;m=b.ga.id||"__fake__"+a.oa++;p=t(d);for(r=p.next();!r.done;r=p.next()){r=r.value;v=t(D.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(x(w.keyIds),x(r.keyIds))):
1077
- w.keyIds||r.keyIds;a.g.dash.enableAudioGroups&&(r.groupId=m)}n=n.map(function(L){return L.attributes.id}).filter(yf);return{id:m,contentType:b.ga.contentType,language:F,nk:h,streams:d,drmInfos:D.drmInfos,ag:c,Si:n}}
1078
+ if(0==d.length){c="image"==b.ga.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||m||c)return null;throw new T(2,4,4003);}if(!b.ga.contentType||"application"==b.ga.contentType)for(b.ga.contentType=yv(d[0].mimeType,d[0].codecs),m=t(d),p=m.next();!p.done;p=m.next())p.value.type=b.ga.contentType;m=b.ga.id||"__fake__"+a.ra++;p=t(d);for(r=p.next();!r.done;r=p.next()){r=r.value;v=t(D.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(x(w.keyIds),x(r.keyIds))):
1079
+ w.keyIds||r.keyIds;a.g.dash.enableAudioGroups&&(r.groupId=m)}n=n.map(function(L){return L.attributes.id}).filter(yf);return{id:m,contentType:b.ga.contentType,language:F,nk:h,streams:d,drmInfos:D.drmInfos,Zf:c,Si:n}}
1078
1080
  function uv(a,b){if((b=id(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&kd(b,"useMPDUrlQuery",ud,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.da:c.split("&").map(function(d){if("$querypart$"==d)return a.da;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new xe(a.da)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
1079
- function xv(a,b,c,d,e,f,g,h,k,l,m,n){b.J=sv(a,l,b.ga,null);var p=b.J.id;a.ea=Math.min(a.ea,b.J.Ya);a.ja=0<a.ea;if(!zv(b.J))return null;var r=b.ia.start;b.bandwidth=kd(l,"bandwidth",rd)||0;b.roles=h;var u=cd(l,"SupplementalProperty"),v=cd(l,"EssentialProperty"),w=null,z=v.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri});z?w=uv(a,z):(z=u.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri}))&&(w=uv(a,z));w&&(b.pb=w);z=b.J.contentType;w=z==Ue||
1080
- "application"==z;z="image"==z;try{var y=void 0;if(c.He){var B=b.J.Ja,C=b.pb,E=Oe(B(),[c.He.yi],C()),H=sh(E,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.He.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,R,Q;return P(function(U){if(1==U.g)return G(U,Ou(a,H,6),2);if(3!=U.g){N=U.h;if(!N.data||16!=N.data.byteLength)throw new T(2,4,4049);R={name:"AES-CBC"};Q=y;return G(U,window.crypto.subtle.importKey("raw",N.data,R,!0,["decrypt"]),3)}Q.cryptoKey=U.h;y.fetchKey=void 0;I(U)})}}}b.J.aesKey=
1081
- y;B=function(N,R,Q,U){return bv(a,N,R,Q,U)};if(b.J.Wc)var A=vt(b,B,y);else if(b.J.Rb)A=Bt(b,a.o,y);else if(b.J.hc)A=Gt(b,B,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.ma,y,n,!1);else{var D=b.ia.duration||0,F=b.J.Ja,J=b.J.mimeType,L=b.J.codecs;A={oc:function(){var N=hl(r,D,F());N.Bb(function(R){R.mimeType=J;R.codecs=L});return Promise.resolve(N)}}}}catch(N){if((w||z)&&4002==N.code)return null;throw N;}l=cd(l,"ContentProtection");l=Ws(l,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);l=new Set(l?[l]:
1081
+ function xv(a,b,c,d,e,f,g,h,k,l,m,n){b.J=sv(a,l,b.ga,null);var p=b.J.id;a.ea=Math.min(a.ea,b.J.Ya);a.ja=0<a.ea;if(!zv(b.J))return null;var r=b.ia.start;b.bandwidth=kd(l,"bandwidth",rd)||0;b.roles=h;var u=cd(l,"SupplementalProperty"),v=cd(l,"EssentialProperty"),w=null,z=v.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri});z?w=uv(a,z):(z=u.find(function(N){return"urn:mpeg:dash:urlparam:2014"==N.attributes.schemeIdUri}))&&(w=uv(a,z));w&&(b.qb=w);z=b.J.contentType;w=z==Ue||
1082
+ "application"==z;z="image"==z;try{var y=void 0;if(c.He){var B=b.J.Ja,C=b.qb,E=Oe(B(),[c.He.yi],C()),H=sh(E,a.g.retryParameters);y={bitsKey:128,blockCipherMode:"CBC",iv:c.He.iv,firstMediaSequenceNumber:0,fetchKey:function(){var N,R,Q;return P(function(V){if(1==V.g)return G(V,Ou(a,H,6),2);if(3!=V.g){N=V.h;if(!N.data||16!=N.data.byteLength)throw new T(2,4,4049);R={name:"AES-CBC"};Q=y;return G(V,window.crypto.subtle.importKey("raw",N.data,R,!0,["decrypt"]),3)}Q.cryptoKey=V.h;y.fetchKey=void 0;I(V)})}}}b.J.aesKey=
1083
+ y;B=function(N,R,Q,V){return bv(a,N,R,Q,V)};if(b.J.Wc)var A=vt(b,B,y);else if(b.J.Qb)A=Bt(b,a.o,y);else if(b.J.hc)A=Gt(b,B,a.o,!!a.i,a.g.dash.initialSegmentLimit,a.ma,y,n,!1);else{var D=b.ia.duration||0,F=b.J.Ja,J=b.J.mimeType,L=b.J.codecs;A={oc:function(){var N=hl(r,D,F());N.Ab(function(R){R.mimeType=J;R.codecs=L});return Promise.resolve(N)}}}}catch(N){if((w||z)&&4002==N.code)return null;throw N;}l=cd(l,"ContentProtection");l=Ws(l,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);l=new Set(l?[l]:
1082
1084
  []);B=u.some(function(N){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==N.attributes.schemeIdUri&&"JOC"==N.attributes.value});u=b.J.codecs;C=u.includes("ec-3")&&384E3<=b.bandwidth;n=!1;if(B||C)n=!0;B=!1;w&&(B=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var K;if(z&&((v=v.find(function(N){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(N.attributes.schemeIdUri)}))&&(K=v.attributes.value),!K))return null;var O;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&
1083
- (u.includes("hvc1.2.4.L153.B0")||u.includes("hev1.2.4.L153.B0"))&&(O="PQ");v=b.J.id?b.na.id+","+b.J.id:"";a.F.length&&p&&a.s.set(b.na.id+","+p,Av(b));var M=v&&a.o[v]?a.o[v]:{id:a.oa++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){M.segmentIndex&&(M.segmentIndex.release(),M.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:u,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,
1085
+ (u.includes("hvc1.2.4.L153.B0")||u.includes("hev1.2.4.L153.B0"))&&(O="PQ");v=b.J.id?b.na.id+","+b.J.id:"";a.F.length&&p&&a.s.set(b.na.id+","+p,Av(b));var M=v&&a.o[v]?a.o[v]:{id:a.ra++,originalId:b.J.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){M.segmentIndex&&(M.segmentIndex.release(),M.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:u,frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,
1084
1086
  height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:l,language:e,originalLanguage:b.ga.language,label:f,type:b.ga.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:B,channelsCount:b.J.be,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:n,closedCaptions:k,hdr:O,colorGamut:void 0,videoLayout:void 0,tilesLayout:K,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Ze(b.J.mimeType,b.J.codecs)])};M.createSegmentIndex=
1085
- function(){var N;return P(function(R){if(1==R.g){if(M.segmentIndex)return R.u(0);N=M;return G(R,A.oc(),3)}N.segmentIndex=R.h;I(R)})};v&&b.zb&&!a.o[v]&&(b=b.na.id||"",a.B[b]||(a.B[b]=[]),a.o[v]=M,a.B[b].push(v));return M}function Av(a){function b(c){if(!c)return null;c=Sc(c);c.Wc=null;c.Rb=null;c.hc=Bd(c.hc);return c}a=Sc(a);a.na=b(a.na);a.ga=b(a.ga);a.J=b(a.J);a.ia&&(a.ia=Sc(a.ia),a.ia.node=null);return a}
1086
- function Ku(a){var b,c;return P(function(d){switch(d.g){case 1:return b=0,ta(d,2),G(d,Lu(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Mu(a,b);I(d)}})}function Mu(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.L.$(Math.max(c-b,Ta(a.ra)))}}
1087
+ function(){var N;return P(function(R){if(1==R.g){if(M.segmentIndex)return R.u(0);N=M;return G(R,A.oc(),3)}N.segmentIndex=R.h;I(R)})};v&&b.Ib&&!a.o[v]&&(b=b.na.id||"",a.B[b]||(a.B[b]=[]),a.o[v]=M,a.B[b].push(v));return M}function Av(a){function b(c){if(!c)return null;c=Sc(c);c.Wc=null;c.Qb=null;c.hc=Cd(c.hc);return c}a=Sc(a);a.na=b(a.na);a.ga=b(a.ga);a.J=b(a.J);a.ia&&(a.ia=Sc(a.ia),a.ia.node=null);return a}
1088
+ function Ku(a){var b,c;return P(function(d){switch(d.g){case 1:return b=0,ta(d,2),G(d,Lu(a),4);case 4:b=d.h;va(d,3);break;case 2:if(c=wa(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Mu(a,b);I(d)}})}function Mu(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.dash.updatePeriod&&(c=a.g.dash.updatePeriod);a.L.$(Math.max(c-b,Ta(a.oa)))}}
1087
1089
  function sv(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,be:null,audioSamplingRate:null,Ya:0,oe:0};d=d||c.Ja;var e=b.attributes.id,f=cd(b,"BaseURL"),g,h=!1;if(a.h)for(var k=t(f),l=k.next();!l.done;l=k.next()){var m=l.value;l=m.attributes.serviceLocation;m=fd(m);l&&m&&(Vt(a.h,e,l,m),h=!0)}h&&a.h||(g=f.map(fd));k=b.attributes.contentType||c.contentType;l=b.attributes.mimeType||c.mimeType;m=[b.attributes.codecs||c.codecs];var n=ld(b,
1088
1090
  "urn:scte:dash:scte214-extensions","supplementalCodecs");n&&m.push(n);m=Ol(m).join(",");n=kd(b,"frameRate",vd)||c.frameRate;var p=b.attributes.sar||c.pixelAspectRatio,r=Bv(cd(b,"InbandEventStream"),c.emsgSchemeIdUris),u=cd(b,"AudioChannelConfiguration");u=Cv(u)||c.be;var v=kd(b,"audioSamplingRate",sd)||c.audioSamplingRate;k||(k=yv(l,m));var w=hd(b,"SegmentBase"),z=hd(b,"SegmentTemplate"),y=w?kd(w,"availabilityTimeOffset",td)||0:0,B=z?kd(z,"availabilityTimeOffset",td)||0:0,C=f&&f.length?kd(f[0],"availabilityTimeOffset",
1089
- td)||0:0;y=c.Ya+C+y+B;B=null;(C=hd(b,"SegmentSequenceProperties"))&&(C=hd(C,"SAP"))&&(B=kd(C,"cadence",qd));C=b.attributes.label;var E=cd(b,"Label");E&&E.length&&(E=E[0],ed(E)&&(C=ed(E)));return{Ja:function(){return Oe(d(),f.length?a.h&&h?Wt(a.h,e):g?g:[]:[])},Wc:w||c.Wc,Rb:hd(b,"SegmentList")||c.Rb,hc:z||c.hc,width:kd(b,"width",sd)||c.width,height:kd(b,"height",sd)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,be:u,audioSamplingRate:v,
1091
+ td)||0:0;y=c.Ya+C+y+B;B=null;(C=hd(b,"SegmentSequenceProperties"))&&(C=hd(C,"SAP"))&&(B=kd(C,"cadence",qd));C=b.attributes.label;var E=cd(b,"Label");E&&E.length&&(E=E[0],ed(E)&&(C=ed(E)));return{Ja:function(){return Oe(d(),f.length?a.h&&h?Wt(a.h,e):g?g:[]:[])},Wc:w||c.Wc,Qb:hd(b,"SegmentList")||c.Qb,hc:z||c.hc,width:kd(b,"width",sd)||c.width,height:kd(b,"height",sd)||c.height,contentType:k,mimeType:l,codecs:m,frameRate:n,pixelAspectRatio:p,emsgSchemeIdUris:r,id:e,language:b.attributes.lang,be:u,audioSamplingRate:v,
1090
1092
  Ya:y,Qd:null,oe:B||c.oe,label:C||null}}function Bv(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
1091
1093
  function Cv(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
1092
1094
  16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null}
1093
- function zv(a){var b=a.Wc?1:0;b+=a.Rb?1:0;b+=a.hc?1:0;if(0==b)return a.contentType==Ue||"application"==a.contentType?!0:!1;1!=b&&(a.Wc&&(a.Rb=null),a.hc=null);return!0}
1095
+ function zv(a){var b=a.Wc?1:0;b+=a.Qb?1:0;b+=a.hc?1:0;if(0==b)return a.contentType==Ue||"application"==a.contentType?!0:!1;1!=b&&(a.Wc&&(a.Qb=null),a.hc=null);return!0}
1094
1096
  function Dv(a,b,c,d){var e,f,g,h,k,l,m;return P(function(n){if(1==n.g)return e=[Hc(c)],f=Oe(b(),e),g=sh(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.fa()}),mh(a.R,h),G(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Ac(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
1095
1097
  function Xu(a,b,c){var d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.u(4);break}h=g.value;ta(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.u(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 n.u(8);
1096
1098
  case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Za("NTP UTCTiming scheme is not supported");break;default:Za("Unrecognized scheme in UTCTiming element",k)}n.u(9);break;case 7:return G(n,Dv(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return G(n,Dv(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:va(n,
1097
1099
  3);break;case 5:wa(n);case 3:g=f.next();n.u(2);break;case 4:return Za("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
1098
- function tv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=kd(d,"timescale",sd)||1,k=kd(d,"presentationTimeOffset",sd)||0;d=t(cd(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=kd(l,"presentationTime",sd)||0,n=kd(l,"duration",sd)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Ad(l),eventNode:Bd(l)},a.j.onTimelineRegionAdded(l))}}
1100
+ function tv(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=kd(d,"timescale",sd)||1,k=kd(d,"presentationTimeOffset",sd)||0;d=t(cd(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=kd(l,"presentationTime",sd)||0,n=kd(l,"duration",sd)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",eventElement:Ad(l),eventNode:Cd(l)},a.j.onTimelineRegionAdded(l))}}
1099
1101
  function bv(a,b,c,d,e){var f,g,h,k;return P(function(l){if(1==l.g)return f=yh,g=e?0:1,h=Sl(b,c,d,a.g.retryParameters),G(l,Ou(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function yv(a,b){b=Ze(a,b);return nf(b)?Ue:a.split("/")[0]}function Ou(a,b,c,d){d||(d={});d.isPreload=a.fa();b=a.j.networkingEngine.request(c,b,d);mh(a.R,b);return b.promise}
1100
1102
  function Nu(a){var b=a.l.ud;if(!a.l.Zd||!b||!a.F.length)return[];var c=Date.now()/1E3,d=a.F.filter(function(e){e=sd(e.attributes.ttl);return!e||b+e>c}).map(fd).filter(yf);return d.length?Oe(a.A,d):[]}S("shaka.dash.DashParser",Ju);Pi["application/dash+xml"]=function(){return new Ju};Pi["video/vnd.mpeg.dash.mpd"]=function(){return new Ju};function Ev(){}S("shaka.dependencies",Ev);Ev.has=function(a){return Fv.has(a)};Ev.add=function(a,b){if(!Gv[a])throw Error(a+" is not supported");a==Hv?pb("mux.js","mux.js is no longer used in Shaka Player."):Fv.set(a,function(){return b})};var Hv="muxjs",Gv={pk:Hv,ISOBoxer:"ISOBoxer"};Ev.Allowed=Gv;var Fv=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function Iv(a,b,c){this.type=a;this.W=b;this.segments=c||null}function Jv(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}Jv.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
1101
- function Kv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Lv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Mv(a,b,c){return(a=Lv(a,b))?a.value:c||null}function Nv(a,b){a=Lv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Ov(a,b,c){c=void 0===c?[]:c;this.W=b;this.g=a;this.Fb=c}function Pv(a,b){this.name=a;this.value=b};function Qv(a,b){return a.filter(function(c){return c.name==b})}function Rv(a,b){return a.filter(function(c){return Nv(c,"TYPE")==b})}function Sv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Tv(a,b,c){c=void 0===c?0:c;return(a=Sv(a,b))?Number(a.value):c}function Uv(a,b,c){return b?Vv(a,[b],c):[]}function Vv(a,b,c){if(!b.length)return[];b=Oe(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Wv(d.value,c));return a}
1103
+ function Kv(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function Lv(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function Mv(a,b,c){return(a=Lv(a,b))?a.value:c||null}function Nv(a,b){a=Lv(a,b);if(!a)throw new T(2,4,4023,b);return a.value}function Ov(a,b,c){c=void 0===c?[]:c;this.W=b;this.g=a;this.Eb=c}function Pv(a,b){this.name=a;this.value=b};function Qv(a,b){return a.filter(function(c){return c.name==b})}function Rv(a,b){return a.filter(function(c){return Nv(c,"TYPE")==b})}function Sv(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function Tv(a,b,c){c=void 0===c?0:c;return(a=Sv(a,b))?Number(a.value):c}function Uv(a,b,c){return b?Vv(a,[b],c):[]}function Vv(a,b,c){if(!b.length)return[];b=Oe(a,b);a=[];b=t(b);for(var d=b.next();!d.done;d=b.next())a.push(Wv(d.value,c));return a}
1102
1104
  function Wv(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new T(2,4,4039,e);}}return a};function Xv(){this.g=0}
1103
1105
  function Yv(a,b){b=Ac(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new T(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=Zv(a,f),--a.g,$v.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=Zv(a,g);if(aw.includes(g.name)){if(1!=b)throw new T(2,4,4017);g=
1104
1106
  c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=Zv(a,k),$v.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==Mv(k,"TYPE")?f.push(k):"MAP"==Mv(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new Ov(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new Ov("",d,f)));return new Iv(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
1105
1107
  g.name&&(g.attributes.push(new Pv("URI",h)),d=!0)}}return new Iv(b,e)}function Zv(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new T(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Ic(d);var f;(f=Mc(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Mc(d,g);)c.push(new Pv(f[1],f[2]||f[3])),Lc(d)}return new Jv(a,b,c,e)}
1106
- var $v="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(" "),aw="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");function bw(){}function cw(a){try{var b=dw(a);return bh({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return $g(c)}}
1107
- function dw(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Ke(a):e=Ec(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",bw);bw.parse=cw;oh("data",cw);function ew(){var a=this;this.g=this.h=null;this.C=1;this.A=new Map;this.H=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Ue,new Map);this.O.set("image",new Map);this.Ab=new Set;this.i=new Map;this.l=null;this.M="";this.hb=new Xv;this.I=-1;this.ja=Infinity;this.fa=this.cc=this.kb=!1;this.B=new ac(function(){if(a.da&&!a.g.continueLoadingWhenPaused&&(a.aa.fb(a.da,"timeupdate"),a.da.paused)){a.aa.ua(a.da,"timeupdate",function(){return fw(a)});return}fw(a)});
1108
- this.za=gw;this.m=null;this.ib=0;this.o=Infinity;this.Fa=this.Ea=this.Y=0;this.ea=new lh;this.F=new Map;this.G=new Map;this.wa=new Map;this.ma=new Map;this.L=new Map;this.ra=new Map;this.oa=new Map;this.bc=this.K=!1;this.Jb=new Sa(5);this.j=null;this.R=!0;this.Da=new Set;this.aa=new gb;this.s=this.da=null;this.Xb=function(){return!1}}q=ew.prototype;q.configure=function(a,b){this.g=a;b&&(this.Xb=b);this.j&&this.j.configure(this.g)};
1108
+ var $v="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(" "),aw="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 bw(){}function cw(a){try{var b=dw(a);return bh({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return $g(c)}}
1109
+ function dw(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new T(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new T(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Ke(a):e=Ec(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",bw);bw.parse=cw;oh("data",cw);function ew(){var a=this;this.g=this.h=null;this.C=1;this.A=new Map;this.H=new Map;this.O=new Map;this.O.set("video",new Map);this.O.set("audio",new Map);this.O.set(Ue,new Map);this.O.set("image",new Map);this.zb=new Set;this.i=new Map;this.l=null;this.M="";this.hb=new Xv;this.I=-1;this.ja=Infinity;this.fa=this.cc=this.kb=!1;this.B=new ac(function(){if(a.da&&!a.g.continueLoadingWhenPaused&&(a.aa.fb(a.da,"timeupdate"),a.da.paused)){a.aa.va(a.da,"timeupdate",function(){return fw(a)});return}fw(a)});
1110
+ this.za=gw;this.m=null;this.ib=0;this.o=Infinity;this.Fa=this.Ea=this.Y=0;this.ea=new lh;this.F=new Map;this.G=new Map;this.sa=new Map;this.ma=new Map;this.L=new Map;this.oa=new Map;this.ra=new Map;this.bc=this.K=!1;this.Jb=new Sa(5);this.j=null;this.R=!0;this.Da=new Set;this.aa=new gb;this.s=this.da=null;this.Wb=function(){return!1}}q=ew.prototype;q.configure=function(a,b){this.g=a;b&&(this.Wb=b);this.j&&this.j.configure(this.g)};
1109
1111
  q.start=function(a,b){var c=this,d;return P(function(e){return 1==e.g?(c.h=b,c.K=b.isLowLatencyMode(),G(e,hw(c,[a]).promise,2)):3!=e.g?(d=e.h,c.M=d.uri,G(e,iw(c,d.data,a),3)):e.return(c.m)})};
1110
- q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.ea&&(a.push(this.ea.destroy()),this.ea=null);this.g=this.h=null;this.Ab.clear();this.m=null;this.i.clear();this.H.clear();this.G.clear();this.A.clear();this.wa.clear();this.ma.clear();this.L.clear();this.ra.clear();this.oa.clear();this.Da.clear();this.j&&this.j.destroy();this.aa&&(this.aa.release(),this.aa=null);return Promise.all(a)};
1111
- q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return P(function(r){if(1==r.g){if(!jw(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(kw(a,g));return G(r,Promise.all(b),2)}lw(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.hd});d.length&&!h&&(k=mw,nw(a,k.xh),l=d.map(function(u){return u.Nb}),a.l.eb(Math.min.apply(Math,x(l))),
1112
+ q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.ea&&(a.push(this.ea.destroy()),this.ea=null);this.g=this.h=null;this.zb.clear();this.m=null;this.i.clear();this.H.clear();this.G.clear();this.A.clear();this.sa.clear();this.ma.clear();this.L.clear();this.oa.clear();this.ra.clear();this.Da.clear();this.j&&this.j.destroy();this.aa&&(this.aa.release(),this.aa=null);return Promise.all(a)};
1113
+ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return P(function(r){if(1==r.g){if(!jw(a))return r.return();b=[];c=Array.from(a.i.values());a.o=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(kw(a,g));return G(r,Promise.all(b),2)}lw(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.hd});d.length&&!h&&(k=mw,nw(a,k.xh),l=d.map(function(u){return u.Mb}),a.l.eb(Math.min.apply(Math,x(l))),
1112
1114
  a.h.updateDuration());h&&ow(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.segmentIndex&&!mg(p.stream.segmentIndex)&&a.h.disableStream(p.stream);I(r)})};function pw(a,b){return jw(a)?a.O.get(b.type):b.Wd}
1113
- function kw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,U,da,V;return P(function(ea){switch(ea.g){case 1:c=[];d=t(b.N());for(e=d.next();!e.done;e=d.next())f=e.value,g=new pe(f),h=g.g,b.Fd&&(0<=b.ub&&h.add("_HLS_msn",String(b.ub)),0<=b.vb&&h.add("_HLS_part",String(b.vb))),b.Gd&&h.add("_HLS_skip","YES"),Ge(h)&&ve(g,h),c.push(g.toString());ta(ea,2);return G(ea,hw(a,c,!0).promise,4);case 4:k=ea.h;va(ea,3);break;case 2:throw l=wa(ea),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ea.return();
1114
- m=Yv(a.hb,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.N().includes(n)||b.Xg.push(n);p=Qv(m.W,"EXT-X-DEFINE");r=qw(a,p,n);u=b.stream;v=pw(a,b);return G(ea,rw(a,m,u.mimeType,b.N,r),5);case 5:w=ea.h;z=w.keyIds;y=w.drmInfos;B=function(Ia,Ca){return Ia.size===Ca.size&&[].concat(x(Ia)).every(function(db){return Ca.has(db)})};B(u.keyIds,z)||(u.keyIds=z,u.drmInfos=y,a.h.newDrmInfo(u));C=sw(a,m,v,r,b.N,b.type);E=C.segments;if(H=C.bandwidth)u.bandwidth=H;A=Ll(u);D=t(E);for(F=D.next();!F.done;F=
1115
- D.next())J=F.value,J.Z&&(J.Z.Oc=A);u.segmentIndex.rd(E,a.l.rb());E.length&&(L=Tv(m.W,"EXT-X-MEDIA-SEQUENCE",0),O=(K=Sv(m.W,"EXT-X-SKIP"))?Number(Mv(K,"SKIPPED-SEGMENTS")):0,M=tw(L,E),N=M.ub,R=M.vb,b.ub=N+O,b.vb=R,Q=v.get(L),u.segmentIndex.Ga(Q));if(U=mg(u.segmentIndex))b.uc=U.startTime,da=E[E.length-1],b.Nb=da.endTime;if(V=Sv(m.W,"EXT-X-ENDLIST"))b.hd=!0;uw(a,m);vw(a,m.W,u.type,r,b.N);I(ea)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
1115
+ function kw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,V,da,U;return P(function(ea){switch(ea.g){case 1:c=[];d=t(b.N());for(e=d.next();!e.done;e=d.next())f=e.value,g=new pe(f),h=g.g,b.Fd&&(0<=b.ub&&h.add("_HLS_msn",String(b.ub)),0<=b.vb&&h.add("_HLS_part",String(b.vb))),b.Gd&&h.add("_HLS_skip","YES"),Ge(h)&&ve(g,h),c.push(g.toString());ta(ea,2);return G(ea,hw(a,c,!0).promise,4);case 4:k=ea.h;va(ea,3);break;case 2:throw l=wa(ea),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return ea.return();
1116
+ m=Yv(a.hb,k.data);if(1!=m.type)throw new T(2,4,4017);n=k.uri;n==k.originalUri||b.N().includes(n)||b.Wg.push(n);p=Qv(m.W,"EXT-X-DEFINE");r=qw(a,p,n);u=b.stream;v=pw(a,b);return G(ea,rw(a,m,u.mimeType,b.N,r),5);case 5:w=ea.h;z=w.keyIds;y=w.drmInfos;B=function(Ia,Ca){return Ia.size===Ca.size&&[].concat(x(Ia)).every(function(db){return Ca.has(db)})};B(u.keyIds,z)||(u.keyIds=z,u.drmInfos=y,a.h.newDrmInfo(u));C=sw(a,m,v,r,b.N,b.type);E=C.segments;if(H=C.bandwidth)u.bandwidth=H;A=Ll(u);D=t(E);for(F=D.next();!F.done;F=
1117
+ D.next())J=F.value,J.Z&&(J.Z.Oc=A);u.segmentIndex.rd(E,a.l.mb());E.length&&(L=Tv(m.W,"EXT-X-MEDIA-SEQUENCE",0),O=(K=Sv(m.W,"EXT-X-SKIP"))?Number(Mv(K,"SKIPPED-SEGMENTS")):0,M=tw(L,E),N=M.ub,R=M.vb,b.ub=N+O,b.vb=R,Q=v.get(L),u.segmentIndex.Ga(Q));if(V=mg(u.segmentIndex))b.uc=V.startTime,da=E[E.length-1],b.Mb=da.endTime;if(U=Sv(m.W,"EXT-X-ENDLIST"))b.hd=!0;uw(a,m);vw(a,m.W,u.type,r,b.N);I(ea)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};
1116
1118
  q.banLocation=function(a){this.j&&this.j.banLocation(a)};q.setMediaElement=function(a){this.da=a};
1117
1119
  function ww(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.I,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=pw(a,f);if(g=mg(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.I=Math.max(a.I,l));f.Se=l;break}}}}if(!(0>a.I))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,xw(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.I-d.Se,0<f&&(e.g.splice(0,f),e=mg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
1118
1120
  yw(a,d,e)}
1119
- function zw(a,b){if(Infinity==a.ja){b=t(b);for(var c=b.next();!c.done;c=b.next())c=mg(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ja=Math.min(a.ja,c.h))}b=a.ja;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!xw(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=mg(e);if(f)if(null==f.h)Xa("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.N(),"Expect AV sync issues!");else for(yw(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Xf(b)}}}}
1120
- function yw(a,b,c){b.uc+=c;b.Nb+=c;a=pw(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.N()}
1121
- function iw(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,U,da;return P(function(V){switch(V.g){case 1:d=We;e=Yv(a.hb,b);f=Qv(e.W,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new Kk(null,0);a.l.yc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.R=!1,C=Qv(e.W,"EXT-X-DEFINE"),n=qw(a,C,a.M),m=d.ka,E="",H=new Map,G(V,Aw(a,a.C++,n,e,l,"",m,E,!0,"Media Playlist",null,H,null,!1,null,!1),7);Bw(a,f);p=Qv(e.W,"EXT-X-MEDIA");r=Qv(e.W,"EXT-X-STREAM-INF");u=Qv(e.W,"EXT-X-IMAGE-STREAM-INF");
1122
- v=Qv(e.W,"EXT-X-I-FRAME-STREAM-INF");w=Qv(e.W,"EXT-X-SESSION-KEY");z=Qv(e.W,"EXT-X-SESSION-DATA");y=Qv(e.W,"EXT-X-CONTENT-STEERING");Cw(a,z);return G(V,Dw(a,y),4);case 4:return Ew(a,r),Fw(a,p),B=Gw(a,v),G(V,Hw(a,r,w,p,l,a.A,B),5);case 5:return g=V.h,h=Iw(a,p),G(V,Jw(a,u,v),6);case 6:k=V.h;V.u(3);break;case 7:A=V.h,a.i.set(c,A),A.stream&&(D=Ll(A.stream),A.stream.segmentIndex.Bb(function(ea){ea.Z&&(ea.Z.Oc=D)})),m=A.stream.type,g.push({id:0,language:Cf(E||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
1121
+ function zw(a,b){if(Infinity==a.ja){b=t(b);for(var c=b.next();!c.done;c=b.next())c=mg(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ja=Math.min(a.ja,c.h))}b=a.ja;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!xw(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=mg(e);if(f)if(null==f.h)Ya("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.N(),"Expect AV sync issues!");else for(yw(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.Vf(b)}}}}
1122
+ function yw(a,b,c){b.uc+=c;b.Mb+=c;a=pw(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.N()}
1123
+ function iw(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,V,da;return P(function(U){switch(U.g){case 1:d=We;e=Yv(a.hb,b);f=Qv(e.W,"EXT-X-DEFINE");g=[];h=[];k=[];a.l=new Kk(null,0);a.l.yc(!0);l=function(){return[c]};m=null;n=new Map;if(1==e.type)return a.R=!1,C=Qv(e.W,"EXT-X-DEFINE"),n=qw(a,C,a.M),m=d.ka,E="",H=new Map,G(U,Aw(a,a.C++,n,e,l,"",m,E,!0,"Media Playlist",null,H,null,!1,null,!1),7);Bw(a,f);p=Qv(e.W,"EXT-X-MEDIA");r=Qv(e.W,"EXT-X-STREAM-INF");u=Qv(e.W,"EXT-X-IMAGE-STREAM-INF");
1124
+ v=Qv(e.W,"EXT-X-I-FRAME-STREAM-INF");w=Qv(e.W,"EXT-X-SESSION-KEY");z=Qv(e.W,"EXT-X-SESSION-DATA");y=Qv(e.W,"EXT-X-CONTENT-STEERING");Cw(a,z);return G(U,Dw(a,y),4);case 4:return Ew(a,r),Fw(a,p),B=Gw(a,v),G(U,Hw(a,r,w,p,l,a.A,B),5);case 5:return g=U.h,h=Iw(a,p),G(U,Jw(a,u,v),6);case 6:k=U.h;U.u(3);break;case 7:A=U.h,a.i.set(c,A),A.stream&&(D=Ll(A.stream),A.stream.segmentIndex.Ab(function(ea){ea.Z&&(ea.Z.Oc=D)})),m=A.stream.type,g.push({id:0,language:Cf(E||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==
1123
1125
  m?A.stream:null,video:"video"==m?A.stream:null,bandwidth:A.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new T(2,7,7001);Kw(a,e);1==e.type&&(jw(a)&&(Lw(a,e),F=a.o,a.B.$(F)),J=Array.from(a.i.values()),Mw(a,J),ow(a),vw(a,e.W,m,n,l));a.m={presentationTimeline:a.l,variants:g,textStreams:h,imageStreams:k,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,
1124
- type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.s};if(a.fa||!a.g.hls.disableCodecGuessing){V.u(8);break}L=[];K=t(a.m.variants);for(O=K.next();!O.done;O=K.next())M=O.value,M.audio&&""===M.audio.codecs&&L.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&L.push(M.video.createSegmentIndex());return G(V,Promise.all(L),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];R=g[0];Q=t([R.video,R.audio]);for(U=Q.next();!U.done;U=
1125
- Q.next())(da=U.value)&&!da.segmentIndex&&N.push(da.createSegmentIndex());if(0<N.length)return G(V,Promise.all(N),0)}V.u(0)}})}
1126
- function Nw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D;return P(function(F){switch(F.g){case 1:c=Ml(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return F.return(c);d=Ow(a,b);e=d.segment;f=d.segmentIndex;g=e.N();h=g[0];k=new pe(h);l=k.Va.split(".").pop();if(m=Pw[l])return F.return(Ml(m));n=yh;r=p=null;u=e.Z;if(!u){F.u(2);break}v=Sl(u.N(),u.$b(),u.Yb(),a.g.retryParameters);return G(F,Qw(a,v,n,{type:0}).promise,3);case 3:w=F.h;p=w.data;if(!u.aesKey){F.u(4);break}return G(F,Rl(p,u.aesKey,
1127
- 0),5);case 5:p=F.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return z=Sl(e.N(),e.$b(),e.Yb(),a.g.retryParameters),G(F,Qw(a,z,n,{type:1}).promise,6);case 6:y=F.h;B=y.data;if(!e.aesKey){F.u(7);break}return G(F,Rl(B,e.aesKey,f),8);case 8:B=F.h;case 7:(C=y.headers["content-type"])&&(C=C.split(";")[0].toLowerCase());E="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");H=["audio/mp4","video/mp4","video/iso.segment"];if(Xj(xb(B))){var J=B,L=a.g.disableAudio,
1128
- K=a.g.disableVideo,O=a.g.disableText;var M=xb(J);var N=(new Pj).parse(M),R=N.dd();M=N.lf();var Q=[],U=!1,da=!1;if(!L)switch(R.audio){case "aac":case "aac-loas":N.$a().length&&(Q.push("mp4a.40.2"),U=!0);break;case "mp3":N.$a().length&&(Q.push("mp4a.40.34"),U=!0);break;case "ac3":N.$a().length&&(Q.push("ac-3"),U=!0);break;case "ec3":N.$a().length&&(Q.push("ec-3"),U=!0);break;case "opus":N.$a().length&&(Q.push("opus"),U=!0)}if(!K)switch(R.video){case "avc":M.codec?Q.push(M.codec):Q.push("avc1.42E01E");
1129
- da=!0;break;case "hvc":M.codec?Q.push(M.codec):Q.push("hvc1.1.6.L93.90");da=!0;break;case "av1":Q.push("av01.0.01M.08"),da=!0}if(Q.length){L=U&&!da;K=new Map;if(da&&!O){O=new Hb("video/mp2t");O.i(J);J=t(O.j());for(da=J.next();!da.done;da=J.next())da=da.value,K.set(da,da);O.g()}M={type:L?"audio":"video",mimeType:"video/mp2t",codecs:Q.join(", "),language:null,height:M.height,width:M.width,channelCount:null,sampleRate:null,closedCaptions:K,yd:null,colorGamut:null,frameRate:M.frameRate}}else M=null;if(A=
1126
+ type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.s};if(a.fa||!a.g.hls.disableCodecGuessing){U.u(8);break}L=[];K=t(a.m.variants);for(O=K.next();!O.done;O=K.next())M=O.value,M.audio&&""===M.audio.codecs&&L.push(M.audio.createSegmentIndex()),M.video&&""===M.video.codecs&&L.push(M.video.createSegmentIndex());return G(U,Promise.all(L),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m);if(1==g.length){N=[];R=g[0];Q=t([R.video,R.audio]);for(V=Q.next();!V.done;V=
1127
+ Q.next())(da=V.value)&&!da.segmentIndex&&N.push(da.createSegmentIndex());if(0<N.length)return G(U,Promise.all(N),0)}U.u(0)}})}
1128
+ function Nw(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D;return P(function(F){switch(F.g){case 1:c=Ml(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return F.return(c);d=Ow(a,b);e=d.segment;f=d.segmentIndex;g=e.N();h=g[0];k=new pe(h);l=k.Va.split(".").pop();if(m=Pw[l])return F.return(Ml(m));n=yh;r=p=null;u=e.Z;if(!u){F.u(2);break}v=Sl(u.N(),u.$b(),u.Xb(),a.g.retryParameters);return G(F,Qw(a,v,n,{type:0}).promise,3);case 3:w=F.h;p=w.data;if(!u.aesKey){F.u(4);break}return G(F,Rl(p,u.aesKey,
1129
+ 0),5);case 5:p=F.h;case 4:(r=w.headers["content-type"])&&(r=r.split(";")[0].toLowerCase());case 2:return z=Sl(e.N(),e.$b(),e.Xb(),a.g.retryParameters),G(F,Qw(a,z,n,{type:1}).promise,6);case 6:y=F.h;B=y.data;if(!e.aesKey){F.u(7);break}return G(F,Rl(B,e.aesKey,f),8);case 8:B=F.h;case 7:(C=y.headers["content-type"])&&(C=C.split(";")[0].toLowerCase());E="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");H=["audio/mp4","video/mp4","video/iso.segment"];if(Xj(yb(B))){var J=B,L=a.g.disableAudio,
1130
+ K=a.g.disableVideo,O=a.g.disableText;var M=yb(J);var N=(new Pj).parse(M),R=N.dd();M=N.lf();var Q=[],V=!1,da=!1;if(!L)switch(R.audio){case "aac":case "aac-loas":N.$a().length&&(Q.push("mp4a.40.2"),V=!0);break;case "mp3":N.$a().length&&(Q.push("mp4a.40.34"),V=!0);break;case "ac3":N.$a().length&&(Q.push("ac-3"),V=!0);break;case "ec3":N.$a().length&&(Q.push("ec-3"),V=!0);break;case "opus":N.$a().length&&(Q.push("opus"),V=!0)}if(!K)switch(R.video){case "avc":M.codec?Q.push(M.codec):Q.push("avc1.42E01E");
1131
+ da=!0;break;case "hvc":M.codec?Q.push(M.codec):Q.push("hvc1.1.6.L93.90");da=!0;break;case "av1":Q.push("av01.0.01M.08"),da=!0}if(Q.length){L=V&&!da;K=new Map;if(da&&!O){O=new Hb("video/mp2t");O.i(J);J=t(O.j());for(da=J.next();!da.done;da=J.next())da=da.value,K.set(da,da);O.g()}M={type:L?"audio":"video",mimeType:"video/mp2t",codecs:Q.join(", "),language:null,height:M.height,width:M.width,channelCount:null,sampleRate:null,closedCaptions:K,yd:null,colorGamut:null,frameRate:M.frameRate}}else M=null;if(A=
1130
1132
  M)return F.return(A)}else if(E.includes(l)||H.includes(C)||r&&H.includes(r))if(D=Nl(p,B,a.g.disableText))return F.return(D);return C?F.return(Ml(C)):r?F.return(Ml(r)):F.return(c)}})}
1131
- function ow(a){if(jw(a)){if(a.za==Rw){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Nb),c=Math.min(c,e.uc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.pe(b)}}else a.l.eb(Sw(a));if(!a.l.s)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=mg(c.stream.segmentIndex))&&c.h&&a.l.gh(c.h);
1133
+ function ow(a){if(jw(a)){if(a.za==Rw){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Mb),c=Math.min(c,e.uc));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.pe(b)}}else a.l.eb(Sw(a));if(!a.l.s)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=mg(c.stream.segmentIndex))&&c.h&&a.l.gh(c.h);
1132
1134
  a.l.Vd()}function Bw(a,b){var c=(new pe(a.M)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Mv(e,"NAME");var f=Mv(e,"VALUE");e=Mv(e,"QUERYPARAM");d&&f&&(a.A.has(d)||a.A.set(d,f));e&&(d=c.get(e)[0])&&!a.A.has(d)&&a.A.set(e,d)}}
1133
1135
  function qw(a,b,c){c=(new pe(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=Mv(f,"NAME"),h=Mv(f,"VALUE");e=Mv(f,"QUERYPARAM");f=Mv(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.A.get(f))&&d.set(f,e)}return d}
1134
1136
  function Ew(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Mv(d,"AUDIO");c=Mv(d,"VIDEO");var f=Mv(d,"SUBTITLES");d=Tw(a,d);if(f){var g=Se(Ue,d);a.G.set(f,g);Qb(d,g)}e&&(f=Se("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.G.set(e,f));c&&(e=Se("video",d),e||(e=a.g.hls.defaultVideoCodec),a.G.set(c,e))}}
1135
1137
  function Cw(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Mv(d,"DATA-ID");c=Mv(d,"URI");var f=Mv(d,"LANGUAGE");d=Mv(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",Uv([a.M],c,a.A)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new W("sessiondata",e);if(a.h)a.h.onEvent(c)}}
1136
1138
  function Dw(a,b){var c,d,e,f,g,h;return P(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=Mv(f,"PATHWAY-ID"),h=Mv(f,"SERVER-URI"),g&&h){a.j=new Rt(a.h);a.j.configure(a.g);a.j.i=[a.M];a.j.setManifestType("HLS");a.j.h=g;c=St(a.j,h);break}return G(k,c,0)})}
1137
1139
  function Iw(a,b){var c=Rv(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Uw(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=Nv(d.value,"GROUP-ID");if(d=a.G.get(e))if(e=a.H.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Vw(Ue,d)||Ww(Ue),Xw(f.stream)}}return b.filter(function(g){return g})}
1138
- function Xw(a){var b=new Set([Ze(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Bb(function(c){c.mimeType&&b.add(Ze(c.mimeType,a.codecs))});a.fullMimeTypes=b}
1140
+ function Xw(a){var b=new Set([Ze(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Ab(function(c){c.mimeType&&b.add(Ze(c.mimeType,a.codecs))});a.fullMimeTypes=b}
1139
1141
  function Jw(a,b,c){var d,e;return P(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return P(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);ta(m,2);return G(m,Yw(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=wa(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Zw(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
1140
1142
  throw k;}})),G(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function $w(a,b,c){b=b.filter(function(h){var k=Mv(h,"URI")||"";return"SUBTITLES"!=Mv(h,"TYPE")&&""!=k});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Kv(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)Uw(a,d[g],c)}function Gw(a,b){return b.map(function(c){c=Zw(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})}
1141
- function Hw(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,U,da,V,ea,Ia,Ca,db,Wa;return P(function(za){switch(za.g){case 1:h=[];k=new Set;if(!(0<c.length)){za.u(2);break}l=t(c);m=l.next();case 3:if(m.done){za.u(2);break}n=m.value;p=Nv(n,"METHOD");r=Mv(n,"KEYFORMAT")||"identity";u=null;if("NONE"==p){za.u(4);break}if(ax(p)){v=Uv(e(),Nv(n,"URI"),f);w=v.sort().join("");a.L.has(w)||(z=sh(v,a.g.retryParameters),y=Qw(a,z,6).promise,a.L.set(w,y));za.u(4);break}if("identity"!=r){u=
1142
- (B=bx[r])?B(n,""):null;za.u(6);break}return G(za,cx(a,n,"",e,null,f),9);case 9:u=za.h;case 6:if(u){if(u.keyIds)for(C=t(u.keyIds),E=C.next();!E.done;E=C.next())H=E.value,k.add(H);h.push(u)}case 4:m=l.next();za.u(3);break;case 2:A={};D=t(b);for(F=D.next();!F.done;F=D.next())J=F.value,L=Kv(J,!a.j),A[L]?A[L].push(J):A[L]=[J];K=[];for(O in A)M=A[O],N=M[0],R=Mv(N,"FRAME-RATE"),Q=Number(Mv(N,"AVERAGE-BANDWIDTH"))||Number(Nv(N,"BANDWIDTH")),U=Mv(N,"RESOLUTION"),da=t(U?U.split("x"):[null,null]),V=da.next().value,
1143
- ea=da.next().value,Ia=Mv(N,"VIDEO-RANGE"),(Ca=Mv(N,"REQ-VIDEO-LAYOUT"))&&Ca.includes(",")&&(db=Ca.split(",").filter(function(Na){return"CH-STEREO"==Na||"CH-MONO"==Na}),Ca=db[0]),Ca=Ca||"CH-MONO",Wa=dx(a,M,d),K.push.apply(K,x(ex(a,Wa.audio,Wa.video,Q,V,ea,R,Ia,Ca,h,k,g)));return za.return(K.filter(function(Na){return null!=Na}))}})}
1143
+ function Hw(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,V,da,U,ea,Ia,Ca,db,Wa;return P(function(za){switch(za.g){case 1:h=[];k=new Set;if(!(0<c.length)){za.u(2);break}l=t(c);m=l.next();case 3:if(m.done){za.u(2);break}n=m.value;p=Nv(n,"METHOD");r=Mv(n,"KEYFORMAT")||"identity";u=null;if("NONE"==p){za.u(4);break}if(ax(p)){v=Uv(e(),Nv(n,"URI"),f);w=v.sort().join("");a.L.has(w)||(z=sh(v,a.g.retryParameters),y=Qw(a,z,6).promise,a.L.set(w,y));za.u(4);break}if("identity"!=r){u=
1144
+ (B=bx[r])?B(n,""):null;za.u(6);break}return G(za,cx(a,n,"",e,null,f),9);case 9:u=za.h;case 6:if(u){if(u.keyIds)for(C=t(u.keyIds),E=C.next();!E.done;E=C.next())H=E.value,k.add(H);h.push(u)}case 4:m=l.next();za.u(3);break;case 2:A={};D=t(b);for(F=D.next();!F.done;F=D.next())J=F.value,L=Kv(J,!a.j),A[L]?A[L].push(J):A[L]=[J];K=[];for(O in A)M=A[O],N=M[0],R=Mv(N,"FRAME-RATE"),Q=Number(Mv(N,"AVERAGE-BANDWIDTH"))||Number(Nv(N,"BANDWIDTH")),V=Mv(N,"RESOLUTION"),da=t(V?V.split("x"):[null,null]),U=da.next().value,
1145
+ ea=da.next().value,Ia=Mv(N,"VIDEO-RANGE"),(Ca=Mv(N,"REQ-VIDEO-LAYOUT"))&&Ca.includes(",")&&(db=Ca.split(",").filter(function(Pa){return"CH-STEREO"==Pa||"CH-MONO"==Pa}),Ca=db[0]),Ca=Ca||"CH-MONO",Wa=dx(a,M,d),K.push.apply(K,x(ex(a,Wa.audio,Wa.video,Q,U,ea,R,Ia,Ca,h,k,g)));return za.return(K.filter(function(Pa){return null!=Pa}))}})}
1144
1146
  function dx(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=Mv(m,"AUDIO");var n=Mv(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=Mv(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(k=c.filter(function(v){return f.includes(Nv(v,"GROUP-ID"))}),$w(a,k,e));k=(e=f.sort().join(","))&&a.H.has(e)?a.H.get(e):[];g?d.audio.push.apply(d.audio,x(k)):h&&d.video.push.apply(d.video,x(k));l=!1;var r=b.map(function(v){return Nv(v,
1145
1147
  "URI")});h=d.audio.find(function(v){return v&&v.N().find(function(w){return r.includes(w)})});g=Tw(a,b[0]);n=Se("video",g);(p=Se("audio",g))&&!n?(h="audio",l=0<d.audio.length):!d.audio.length&&!d.video.length&&p&&n?(h="video",g=[[n,p].join()]):d.audio.length&&h?(h="audio",l=!0):h=d.video.length&&!d.audio.length?"audio":"video";if(!l){var u=m=p=n=l=null;!k.length&&(c=c.find(function(v){var w=Mv(v,"URI")||"",z=Mv(v,"TYPE");v=Nv(v,"GROUP-ID");return"SUBTITLES"!=z&&""==w&&f.includes(v)}))&&(l=Mv(c,"LANGUAGE"),
1146
1148
  n=Mv(c,"NAME"),p=fx(c),gx(c),m=Mv(c,"CHARACTERISTICS"),u=hx(c));a=ix(a,b,g,h,l,n,p,m,u);e&&(a.stream.groupId=e);d[a.stream.type]=[a]}return d}
1147
1149
  function Tw(a,b){var c=Mv(b,"CODECS")||"";b=Mv(b,"SUPPLEMENTAL-CODECS");a.fa=0<c.length;a.fa||a.g.hls.disableCodecGuessing||(c=[],a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec),c=c.join(","));a=c.split(/\s*,\s*/);b&&(b=b.split(/\s*,\s*/).map(function(d){return d.split("/")[0]}),a.push.apply(a,x(b)));return Ol(a)}function fx(a){return(a=Mv(a,"CHANNELS"))?parseInt(a.split("/")[0],10):null}
1148
1150
  function hx(a){return(a=Mv(a,"SAMPLE-RATE"))?parseInt(a,10):null}function gx(a){return(a=Mv(a,"CHANNELS"))?a.includes("/JOC"):!1}
1149
1151
  function ex(a,b,c,d,e,f,g,h,k,l,m,n){for(var p=t(c),r=p.next();!r.done;r=p.next())jx(r.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var u=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=u?u.stream:null)k.drmInfos=l,k.keyIds=m,wg(k,n);k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);p=f?f.stream.drmInfos:null;r=u?u.stream.drmInfos:
1150
- null;u=u?u.N().sort().join(","):"";var v=f?f.N().sort().join(","):"";u=u+" - "+v;h&&k&&!Vb(p,r)||a.Ab.has(u)||(h={id:a.C++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Ab.add(u))}return e}
1152
+ null;u=u?u.N().sort().join(","):"";var v=f?f.N().sort().join(","):"";u=u+" - "+v;h&&k&&!Vb(p,r)||a.zb.has(u)||(h={id:a.C++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.zb.add(u))}return e}
1151
1153
  function Fw(a,b){b=Rv(b,"CLOSED-CAPTIONS");a.R=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Mv(d,"LANGUAGE");c=Cf(e||"und");e||(e=Mv(d,"NAME"))&&(c=e);e=Nv(d,"GROUP-ID");d=Nv(d,"INSTREAM-ID").replace("SERVICE","svc");a.F.get(e)||a.F.set(e,new Map);a.F.get(e).set(d,c)}}
1152
1154
  function Uw(a,b,c){for(var d=[],e=[],f=new Map,g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=Nv(k,"URI");k=Nv(k,"GROUP-ID");d.push(h);e.push(k);f.set(k,h)}g=e.sort().join(",");h=b[0];b="";k=Nv(h,"TYPE").toLowerCase();"subtitles"==k&&(k=Ue);if(k==Ue)b=Mv(h,"CODECS")||"";else{e=t(e);for(var l=e.next();!l.done;l=e.next())if(l=l.value,a.G.has(l)){b=a.G.get(l);break}}e=d.sort().join(",");if(a.i.has(e))return a.i.get(e);l=a.C++;if(a.j){f=t(f);for(var m=f.next();!m.done;m=f.next()){var n=t(m.value);
1153
1155
  m=n.next().value;n=n.next().value;(m=c.get(m))&&Vt(a.j,l,m,n)}}c=Mv(h,"LANGUAGE");f=Mv(h,"NAME");m="YES"==Mv(h,"DEFAULT");n="audio"==k?fx(h):null;var p="audio"==k?gx(h):!1,r=Mv(h,"CHARACTERISTICS"),u="YES"==Mv(h,"FORCED");h="audio"==k?hx(h):null;d=kx(a,l,d,b,k,c,m,f,n,null,r,u,h,p);d.stream&&(d.stream.groupId=g);a.H.has(g)?a.H.get(g).push(d):a.H.set(g,[d]);a.i.set(e,d);return d}
@@ -1156,17 +1158,17 @@ Number(m.split("x")[1]));if(n=Mv(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i
1156
1158
  function Zw(a,b){var c="video",d=Nv(b,"URI"),e=Mv(b,"CODECS")||"";"mjpg"==e&&(c="image");if(a.i.has(d))return a.i.get(d);var f=Mv(b,"LANGUAGE"),g=Mv(b,"NAME"),h=Mv(b,"CHARACTERISTICS");c=kx(a,a.C++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=Mv(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=Mv(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
1157
1159
  function ix(a,b,c,d,e,f,g,h,k){for(var l=a.C++,m=[],n=t(b),p=n.next();!p.done;p=n.next()){var r=p.value;p=Nv(r,"URI");r=Mv(r,"PATHWAY-ID");a.j&&r&&Vt(a.j,l,r,p);m.push(p)}n=m.sort().join(",");if(a.i.has(n))return a.i.get(n);a:{b=Mv(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.R=!1;b=null;break a}if(b){if("NONE"!=b){b=a.F.get(b);break a}a.R=!1}else if(!b&&a.F.size)for(b=t(a.F.keys()).next();!b.done;){b=a.F.get(b.value);break a}}b=null}c=Re(d,c);d=kx(a,l,m,c,d,e,!1,f,g,b,h,!1,k,!1);
1158
1160
  a.i.set(n,d);return d}
1159
- function kx(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(E){var H,A,D,F,J,L,K,O,M,N,R,Q,U,da,V,ea,Ia,Ca,db,Wa,za,Na,yb;return P(function(Ya){switch(Ya.g){case 1:return H=We,ta(Ya,2),A=y.N(),G(Ya,E.promise,4);case 4:D=Ya.h;if(E.aborted)return Ya.return();F=D.uri;F==D.originalUri||A.includes(F)||z.push(F);J=Yv(a.hb,D.data);if(1!=J.type)throw new T(2,4,4017);L=Qv(J.W,"EXT-X-DEFINE");K=qw(a,L,F);O=!1;(!a.fa&&a.g.hls.disableCodecGuessing||a.R&&e==H.ka&&!a.g.hls.disableClosedCaptionsDetection)&&0<J.segments.length&&
1160
- (a.R=!1,O=!0);M=!a.fa&&a.g.hls.disableCodecGuessing;N=jw(a);return G(Ya,Aw(a,0,K,J,v,d,e,f,g,h,k,l,m,n,p,r,void 0,O,M),5);case 5:R=Ya.h;if(E.aborted)return Ya.return();Q=R.stream;Kw(a,J);jw(a)&&!N&&Lw(a,J);y.uc=R.uc;y.Nb=R.Nb;y.Gd=R.Gd;y.Fd=R.Fd;y.hd=R.hd;y.Wd=R.Wd;y.ub=R.ub;y.vb=R.vb;y.xf=!0;w.segmentIndex=Q.segmentIndex;w.encrypted=Q.encrypted;w.drmInfos=Q.drmInfos;w.keyIds=Q.keyIds;w.mimeType=Q.mimeType;w.bandwidth=w.bandwidth||Q.bandwidth;w.codecs=w.codecs||Q.codecs;w.closedCaptions=w.closedCaptions||
1161
- Q.closedCaptions;w.width=w.width||Q.width;w.height=w.height||Q.height;w.hdr=w.hdr||Q.hdr;w.colorGamut=w.colorGamut||Q.colorGamut;w.frameRate=w.frameRate||Q.frameRate;"und"==w.language&&"und"!=Q.language&&(w.language=Q.language);w.language=w.language||Q.language;w.channelsCount=w.channelsCount||Q.channelsCount;w.audioSamplingRate=w.audioSamplingRate||Q.audioSamplingRate;Xw(w);w.drmInfos.length&&a.h.newDrmInfo(w);U=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)U=!0;
1162
- a.m&&U&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==H.ka||e==H.X)for(da=t(a.i.values()),V=da.next();!V.done;V=da.next())ea=V.value,ea.xf||ea.type!=e||(ea.stream.mimeType=Q.mimeType,Xw(ea.stream));e==H.va&&(Ia=mg(Q.segmentIndex))&&Ia.Z&&(w.mimeType="application/mp4",Xw(w));Ca=Ll(w);w.segmentIndex.Bb(function(zb){zb.Z&&(zb.Z.Oc=Ca)});lx(a)&&(a.cc?Mw(a,[y]):(a.cc=!0,db=Array.from(a.i.values()),Wa=db.filter(function(zb){return zb.stream.segmentIndex}),Mw(a,Wa),ow(a),za=a.o,0<za&&a.B.$(za)));vw(a,
1163
- J.W,w.type,K,v);a.m&&(a.m.startTime=a.s);va(Ya,0);break;case 2:Na=wa(Ya);w.closeSegmentIndex();if(7001===Na.code)return Ya.return();yb=a.h.disableStream(w);if(!yb)throw Na;I(Ya)}})}function v(){return a.j&&1<c.length?Wt(a.j,b):z.concat(Vv([a.M],c,a.A))}var w=mx(a,d,e,f,g,h,k,l,m,n,p,r),z=[],y={stream:w,type:e,Xg:z,N:v,uc:0,Nb:0,Wd:new Map,Gd:!1,Fd:!1,hd:!1,Se:-1,ub:-1,vb:-1,xf:!1},B=null,C;w.createSegmentIndex=function(){if(B)return B;C=hw(a,y.N(),!0);return B=new Promise(function(E){E(u(C))})};w.closeSegmentIndex=
1164
- function(){B&&!w.segmentIndex&&C.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);B=null};return y}function Sw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Nb));return b}function lw(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Bb(function(e){c.push(e)});a.l.td(c)}
1161
+ function kx(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(E){var H,A,D,F,J,L,K,O,M,N,R,Q,V,da,U,ea,Ia,Ca,db,Wa,za,Pa,Db;return P(function(Xa){switch(Xa.g){case 1:return H=We,ta(Xa,2),A=y.N(),G(Xa,E.promise,4);case 4:D=Xa.h;if(E.aborted)return Xa.return();F=D.uri;F==D.originalUri||A.includes(F)||z.push(F);J=Yv(a.hb,D.data);if(1!=J.type)throw new T(2,4,4017);L=Qv(J.W,"EXT-X-DEFINE");K=qw(a,L,F);O=!1;(!a.fa&&a.g.hls.disableCodecGuessing||a.R&&e==H.ka&&!a.g.hls.disableClosedCaptionsDetection)&&0<J.segments.length&&
1162
+ (a.R=!1,O=!0);M=!a.fa&&a.g.hls.disableCodecGuessing;N=jw(a);return G(Xa,Aw(a,0,K,J,v,d,e,f,g,h,k,l,m,n,p,r,void 0,O,M),5);case 5:R=Xa.h;if(E.aborted)return Xa.return();Q=R.stream;Kw(a,J);jw(a)&&!N&&Lw(a,J);y.uc=R.uc;y.Mb=R.Mb;y.Gd=R.Gd;y.Fd=R.Fd;y.hd=R.hd;y.Wd=R.Wd;y.ub=R.ub;y.vb=R.vb;y.wf=!0;w.segmentIndex=Q.segmentIndex;w.encrypted=Q.encrypted;w.drmInfos=Q.drmInfos;w.keyIds=Q.keyIds;w.mimeType=Q.mimeType;w.bandwidth=w.bandwidth||Q.bandwidth;w.codecs=w.codecs||Q.codecs;w.closedCaptions=w.closedCaptions||
1163
+ Q.closedCaptions;w.width=w.width||Q.width;w.height=w.height||Q.height;w.hdr=w.hdr||Q.hdr;w.colorGamut=w.colorGamut||Q.colorGamut;w.frameRate=w.frameRate||Q.frameRate;"und"==w.language&&"und"!=Q.language&&(w.language=Q.language);w.language=w.language||Q.language;w.channelsCount=w.channelsCount||Q.channelsCount;w.audioSamplingRate=w.audioSamplingRate||Q.audioSamplingRate;Xw(w);w.drmInfos.length&&a.h.newDrmInfo(w);V=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)V=!0;
1164
+ a.m&&V&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==H.ka||e==H.X)for(da=t(a.i.values()),U=da.next();!U.done;U=da.next())ea=U.value,ea.wf||ea.type!=e||(ea.stream.mimeType=Q.mimeType,Xw(ea.stream));e==H.wa&&(Ia=mg(Q.segmentIndex))&&Ia.Z&&(w.mimeType="application/mp4",Xw(w));Ca=Ll(w);w.segmentIndex.Ab(function(rb){rb.Z&&(rb.Z.Oc=Ca)});lx(a)&&(a.cc?Mw(a,[y]):(a.cc=!0,db=Array.from(a.i.values()),Wa=db.filter(function(rb){return rb.stream.segmentIndex}),Mw(a,Wa),ow(a),za=a.o,0<za&&a.B.$(za)));vw(a,
1165
+ J.W,w.type,K,v);a.m&&(a.m.startTime=a.s);va(Xa,0);break;case 2:Pa=wa(Xa);w.closeSegmentIndex();if(7001===Pa.code)return Xa.return();Db=a.h.disableStream(w);if(!Db)throw Pa;I(Xa)}})}function v(){return a.j&&1<c.length?Wt(a.j,b):z.concat(Vv([a.M],c,a.A))}var w=mx(a,d,e,f,g,h,k,l,m,n,p,r),z=[],y={stream:w,type:e,Wg:z,N:v,uc:0,Mb:0,Wd:new Map,Gd:!1,Fd:!1,hd:!1,Se:-1,ub:-1,vb:-1,wf:!1},B=null,C;w.createSegmentIndex=function(){if(B)return B;C=hw(a,y.N(),!0);return B=new Promise(function(E){E(u(C))})};w.closeSegmentIndex=
1166
+ function(){B&&!w.segmentIndex&&C.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);B=null};return y}function Sw(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Mb));return b}function lw(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Ab(function(e){c.push(e)});a.l.td(c)}
1165
1167
  function Mw(a,b){if(!jw(a))for(var c=Sw(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Gc(0,c);lw(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return"audio"==f.stream.type});e=d.some(function(f){return"video"==f.stream.type});d=jw(a)&&!a.kb;c=!jw(a)&&a.kb&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?ww(a,b,d):(zw(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&ww(a,
1166
1168
  b))}function xw(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function lx(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
1167
- function Aw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y){z=void 0===z?!0:z;y=void 0===y?!0:y;var B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,U,da,V,ea,Ia,Ca,db,Wa,za,Na,yb,Ya,zb,Rd;return P(function(Kb){switch(Kb.g){case 1:B=d.segments||[];C=B.every(function(bd){return Sv(bd.W,"EXT-X-GAP")?!0:!1});if(!B.length||C)throw new T(2,4,4053);nx(a,d);jw(a)&&uw(a,d);E=jw(a)?a.O.get(g):new Map;H=sw(a,d,E,c,e,g);A=H.segments;D=H.bandwidth;O=K=L=J=F=null;if(!(0<A.length&&z)){Kb.u(2);break}return G(Kb,Nw(a,A),3);case 3:M=Kb.h,g=
1168
- M.type,h=M.language,m=M.channelCount,u=M.sampleRate,a.g.disableText||(n=M.closedCaptions),J=M.height,F=M.width,L=M.yd,K=M.colorGamut,O=M.frameRate,y&&(w=M.mimeType,f=M.codecs);case 2:if(w){Kb.u(4);break}return G(Kb,ox(a,g,f,A),5);case 5:w=Kb.h,g!=Ue||f||"application/mp4"!=w||!A[0]||A[0].Z||(w="text/vtt");case 4:return G(Kb,rw(a,d,w,e,c),6);case 6:N=Kb.h;R=N.drmInfos;Q=N.keyIds;U=N.encrypted;da=N.Bh;if(U&&!R.length&&!da)throw new T(2,4,4026);V=mx(a,f,g,h,k,l,m,n,p,r,u,v);V.encrypted=U;V.drmInfos=R;
1169
- V.keyIds=Q;V.mimeType=w;D&&(V.bandwidth=D);Xw(V);"video"==g&&(F||J||L||K)&&jx(V,F,J,O,L,null,K);jw(a)&&uw(a,d);ea=A[0].startTime;Ia=A[A.length-1];Ca=Ia.endTime;db=new fl(A);V.segmentIndex=db;za=(Wa=Sv(d.W,"EXT-X-SERVER-CONTROL"))?null!=Lv(Wa,"CAN-SKIP-UNTIL"):!1;Na=Wa?null!=Lv(Wa,"CAN-BLOCK-RELOAD"):!1;yb=Tv(d.W,"EXT-X-MEDIA-SEQUENCE",0);Ya=tw(yb,A);zb=Ya.ub;Rd=Ya.vb;return Kb.return({stream:V,type:g,Xg:[],N:e,uc:ea,Nb:Ca,Gd:za,Fd:Na,hd:!1,Se:-1,ub:zb,vb:Rd,Wd:E,xf:!1})}})}
1169
+ function Aw(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y){z=void 0===z?!0:z;y=void 0===y?!0:y;var B,C,E,H,A,D,F,J,L,K,O,M,N,R,Q,V,da,U,ea,Ia,Ca,db,Wa,za,Pa,Db,Xa,rb,Bd;return P(function(Kb){switch(Kb.g){case 1:B=d.segments||[];C=B.every(function(bd){return Sv(bd.W,"EXT-X-GAP")?!0:!1});if(!B.length||C)throw new T(2,4,4053);nx(a,d);jw(a)&&uw(a,d);E=jw(a)?a.O.get(g):new Map;H=sw(a,d,E,c,e,g);A=H.segments;D=H.bandwidth;O=K=L=J=F=null;if(!(0<A.length&&z)){Kb.u(2);break}return G(Kb,Nw(a,A),3);case 3:M=Kb.h,g=
1170
+ M.type,h=M.language,m=M.channelCount,u=M.sampleRate,a.g.disableText||(n=M.closedCaptions),J=M.height,F=M.width,L=M.yd,K=M.colorGamut,O=M.frameRate,y&&(w=M.mimeType,f=M.codecs);case 2:if(w){Kb.u(4);break}return G(Kb,ox(a,g,f,A),5);case 5:w=Kb.h,g!=Ue||f||"application/mp4"!=w||!A[0]||A[0].Z||(w="text/vtt");case 4:return G(Kb,rw(a,d,w,e,c),6);case 6:N=Kb.h;R=N.drmInfos;Q=N.keyIds;V=N.encrypted;da=N.Bh;if(V&&!R.length&&!da)throw new T(2,4,4026);U=mx(a,f,g,h,k,l,m,n,p,r,u,v);U.encrypted=V;U.drmInfos=R;
1171
+ U.keyIds=Q;U.mimeType=w;D&&(U.bandwidth=D);Xw(U);"video"==g&&(F||J||L||K)&&jx(U,F,J,O,L,null,K);jw(a)&&uw(a,d);ea=A[0].startTime;Ia=A[A.length-1];Ca=Ia.endTime;db=new fl(A);U.segmentIndex=db;za=(Wa=Sv(d.W,"EXT-X-SERVER-CONTROL"))?null!=Lv(Wa,"CAN-SKIP-UNTIL"):!1;Pa=Wa?null!=Lv(Wa,"CAN-BLOCK-RELOAD"):!1;Db=Tv(d.W,"EXT-X-MEDIA-SEQUENCE",0);Xa=tw(Db,A);rb=Xa.ub;Bd=Xa.vb;return Kb.return({stream:U,type:g,Wg:[],N:e,uc:ea,Mb:Ca,Gd:za,Fd:Pa,hd:!1,Se:-1,ub:rb,vb:Bd,Wd:E,wf:!1})}})}
1170
1172
  function tw(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{ub:a,vb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{ub:a,vb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{ub:a,vb:c}}
1171
1173
  function mx(a,b,c,d,e,f,g,h,k,l,m,n){var p=Vw(c,b)||Ww(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==Ue?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.C++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
1172
1174
  segmentIndex:null,mimeType:p,codecs:b,kind:c==Ue?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Cf(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,
@@ -1177,32 +1179,32 @@ function qx(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw Za("Web Cr
1177
1179
  256,k.blockCipherMode="CTR"}k.fetchKey=function(){var l,m,n,p,r,u;return P(function(v){if(1==v.g)return l=Uv(d(),Nv(b,"URI"),e),m=l.sort().join(""),a.L.has(m)||(n=sh(l,a.g.retryParameters),p=Qw(a,n,6).promise,a.L.set(m,p)),G(v,a.L.get(m),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=k.bitsKey/8)throw new T(2,4,4049);u={name:"CTR"==k.blockCipherMode?"AES-CTR":"AES-CBC",length:k.bitsKey};return G(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}k.cryptoKey=v.h;k.fetchKey=void 0;
1178
1180
  I(v)})};a.ma.set(c,k)}return a.ma.get(c)}function Kw(a,b){null==a.s&&(b=Sv(b.W,"EXT-X-START"))&&(a.s=Number(Nv(b,"TIME-OFFSET")))}function nx(a,b){var c=Sv(b.W,"EXT-X-PLAYLIST-TYPE");b=Sv(b.W,"EXT-X-ENDLIST");b=c&&"VOD"==c.value||b;c=c&&"EVENT"==c.value&&!b;c=!b&&!c;b?nw(a,gw):c?nw(a,Rw):nw(a,rx)}
1179
1181
  function uw(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Sv(d[e].W,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Sv(b.W,"EXT-X-TARGETDURATION");if(!d)throw new T(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Sv(b.W,"EXT-X-PART-INF"))a.Y=Number(Nv(e,"PART-TARGET"));b=Sv(b.W,"EXT-X-SERVER-CONTROL");a.K&&a.Y?(a.o=a.bc?5*a.Y<=c?Math.min(a.Y,a.o):Math.min(c,a.o):Math.min(a.Y,a.o),a.Fa=b?Number(Nv(b,"PART-HOLD-BACK")):0):(a.o=Math.min(c,a.o),c=b?
1180
- Lv(b,"HOLD-BACK"):null,a.Ea=c?Number(c.value):0);a.ib=Math.max(d,a.ib)}function Lw(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Fa)c=a.Fa;else if(a.Ea)c=a.Ea;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=Sv(b.segments[e].W,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.ib}}a.s&&0>a.s&&(c=Math.min(-a.s,c),a.s+=c);a.l.hh(0);a.l.Rf(c);a.l.yc(!1)}
1181
- function px(a,b,c,d,e){var f=Sv(c,"EXT-X-MAP");if(!f)return null;var g=Nv(f,"URI"),h=Uv(d(),g,e);g=[h.toString(),Mv(f,"BYTERANGE","")].join("-");if(!a.wa.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?ax(Nv(m,"METHOD"))&&m.id<f.id&&(k=qx(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=sx(h,f,l,k);a.wa.set(g,b)}return a.wa.get(g)}
1182
+ Lv(b,"HOLD-BACK"):null,a.Ea=c?Number(c.value):0);a.ib=Math.max(d,a.ib)}function Lw(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Fa)c=a.Fa;else if(a.Ea)c=a.Ea;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=Sv(b.segments[e].W,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.ib}}a.s&&0>a.s&&(c=Math.min(-a.s,c),a.s+=c);a.l.hh(0);a.l.Pf(c);a.l.yc(!1)}
1183
+ function px(a,b,c,d,e){var f=Sv(c,"EXT-X-MAP");if(!f)return null;var g=Nv(f,"URI"),h=Uv(d(),g,e);g=[h.toString(),Mv(f,"BYTERANGE","")].join("-");if(!a.sa.has(g)){var k=void 0,l=null;c=t(c);for(var m=c.next();!m.done;m=c.next())m=m.value,"EXT-X-KEY"==m.name?ax(Nv(m,"METHOD"))&&m.id<f.id&&(k=qx(a,m,b,d,e)):"EXT-X-BYTERANGE"==m.name&&m.id<f.id&&(l=m);b=sx(h,f,l,k);a.sa.set(g,b)}return a.sa.get(g)}
1182
1184
  function sx(a,b,c,d){var e=0,f=null;b=Mv(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new Ui(function(){return a},e,f,null,null,null,d)}
1183
- function tx(a,b,c,d,e,f,g,h,k){function l(U){U=(new pe(U)).Va.split(".").pop();var da=ux[g][U];da||(da=Pw[U]);return da}var m=d.W,n=Sv(m,"EXTINF"),p=0,r=0,u=null;d.Fb.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Sv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=nd(w.value),a.kb=!0)}var z=Xi;Sv(m,"EXT-X-GAP")&&(a.m.gapCount++,z=2);if(!n){if(0==d.Fb.length)throw new T(2,4,4024,"EXTINF");if(!a.K)return null}var y=[];w=!1;var B=null,C=!1,E=!1;if(a.K&&d.Fb.length){p=
1184
- b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var H=v,A={},D=0;D<d.Fb.length;A={xe:void 0,fe:void 0},D++){var F=d.Fb[D],J=0==D?c:y[y.length-1],L=0==D?e:J.endTime,K=Number(Mv(F,"DURATION"))||a.Y;if(K){var O=L+K,M=0,N=null;"EXT-X-PRELOAD-HINT"==F.name?(M=(M=Mv(F,"BYTERANGE-START"))?Number(M):0,(J=Mv(F,"BYTERANGE-LENGTH"))?N=M+Number(J)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Mv(F,"BYTERANGE"),N=t(vx(J,M)),M=N.next().value,N=N.next().value);A.fe=Mv(F,"URI");if(A.fe){J=Xi;"YES"==
1185
- Mv(F,"GAP")&&(a.m.gapCount++,J=2,C=!0);A.xe=null;var R=function(U){return function(){null==U.xe&&(U.xe=Uv(h(),U.fe,f));return U.xe}}(A);p&&0<=M&&null!=N&&(B=R,w=!0);L=new Wi(L,O,R,M,N,b,0,0,Infinity,[],"",null,H,J,k);"EXT-X-PRELOAD-HINT"==F.name&&(L.yf(),E=!0);"YES"!=Mv(F,"INDEPENDENT")&&0<D&&L.Nc();if(A=l(A.fe))L.mimeType=A,wx.has(A)&&(L.Z=null);y.push(L);H&&(H+=K)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;w&&(C||
1186
- 0!=y[0].Ha?(w=!1,B=null):y=[]);(n=Sv(m,"EXT-X-BYTERANGE"))?(u=t(vx(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].Ha,u=y[y.length-1].ta);c="";n=null;"image"==g&&(c="1x1",m=Sv(m,"EXT-X-TILES"))&&(c=Nv(m,"LAYOUT"),(m=Mv(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Wi(e,p,function(){if(B)return B();null==Q&&(Q=Uv(h(),d.g,f));return Q||[]},r,u,b,0,0,Infinity,y,c,n,v,z,k,0<y.length&&!!d.g);if(e=l(d.g))b.mimeType=e,wx.has(e)&&(b.Z=null);w&&(a.bc=!0,b.Mg(),E&&b.yf());return b}
1187
- function vx(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ta+1,d=c+b-1);return[c,d]}
1185
+ function tx(a,b,c,d,e,f,g,h,k){function l(V){V=(new pe(V)).Va.split(".").pop();var da=ux[g][V];da||(da=Pw[V]);return da}var m=d.W,n=Sv(m,"EXTINF"),p=0,r=0,u=null;d.Eb.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Sv(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=nd(w.value),a.kb=!0)}var z=Xi;Sv(m,"EXT-X-GAP")&&(a.m.gapCount++,z=2);if(!n){if(0==d.Eb.length)throw new T(2,4,4024,"EXTINF");if(!a.K)return null}var y=[];w=!1;var B=null,C=!1,E=!1;if(a.K&&d.Eb.length){p=
1186
+ b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var H=v,A={},D=0;D<d.Eb.length;A={xe:void 0,fe:void 0},D++){var F=d.Eb[D],J=0==D?c:y[y.length-1],L=0==D?e:J.endTime,K=Number(Mv(F,"DURATION"))||a.Y;if(K){var O=L+K,M=0,N=null;"EXT-X-PRELOAD-HINT"==F.name?(M=(M=Mv(F,"BYTERANGE-START"))?Number(M):0,(J=Mv(F,"BYTERANGE-LENGTH"))?N=M+Number(J)-1:M&&(N=Number.MAX_SAFE_INTEGER)):(M=Mv(F,"BYTERANGE"),N=t(vx(J,M)),M=N.next().value,N=N.next().value);A.fe=Mv(F,"URI");if(A.fe){J=Xi;"YES"==
1187
+ Mv(F,"GAP")&&(a.m.gapCount++,J=2,C=!0);A.xe=null;var R=function(V){return function(){null==V.xe&&(V.xe=Uv(h(),V.fe,f));return V.xe}}(A);p&&0<=M&&null!=N&&(B=R,w=!0);L=new Wi(L,O,R,M,N,b,0,0,Infinity,[],"",null,H,J,k);"EXT-X-PRELOAD-HINT"==F.name&&(L.xf(),E=!0);"YES"!=Mv(F,"INDEPENDENT")&&0<D&&L.Nc();if(A=l(A.fe))L.mimeType=A,wx.has(A)&&(L.Z=null);y.push(L);H&&(H+=K)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(y.length)p=y[y.length-1].endTime;else return null;w&&(C||
1188
+ 0!=y[0].Ha?(w=!1,B=null):y=[]);(n=Sv(m,"EXT-X-BYTERANGE"))?(u=t(vx(c,n.value)),r=u.next().value,u=u.next().value):y.length&&(r=y[0].Ha,u=y[y.length-1].ua);c="";n=null;"image"==g&&(c="1x1",m=Sv(m,"EXT-X-TILES"))&&(c=Nv(m,"LAYOUT"),(m=Mv(m,"DURATION"))&&(n=Number(m)));var Q=null;b=new Wi(e,p,function(){if(B)return B();null==Q&&(Q=Uv(h(),d.g,f));return Q||[]},r,u,b,0,0,Infinity,y,c,n,v,z,k,0<y.length&&!!d.g);if(e=l(d.g))b.mimeType=e,wx.has(e)&&(b.Z=null);w&&(a.bc=!0,b.Lg(),E&&b.xf());return b}
1189
+ function vx(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ua+1,d=c+b-1);return[c,d]}
1188
1190
  function vw(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!xw(a,c))for(b=Qv(b,"EXT-X-DATERANGE"),b=b.filter(function(L){return null!=Lv(L,"START-DATE")}).sort(function(L,K){L=Nv(L,"START-DATE");K=Nv(K,"START-DATE");return L<K?-1:L>K?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=Nv(g,"ID");if(!a.Da.has(h)){var k=Nv(g,"START-DATE"),l=nd(k);if(!isNaN(l)){var m=Math.max(0,l-f),n=null,p=Mv(g,"END-DATE");if(p){var r=nd(p);if(!isNaN(r)&&(n=r-f,0>n))continue}if(null==n){var u=Mv(g,"DURATION")||
1189
1191
  Mv(g,"PLANNED-DURATION");if(u){var v=parseFloat(u);isNaN(v)||(n=m+v);if(0>l-f+v)continue}}var w=Mv(g,"CLASS")||"com.apple.quicktime.HLS",z="YES"==Mv(g,"END-ON-NEXT");if(null==n&&z){for(var y=c+1;y<b.length;y++){var B=Mv(b[y],"CLASS")||"com.apple.quicktime.HLS";if(w==B){var C=Nv(b[y],"START-DATE"),E=nd(C);if(!isNaN(E)&&E&&E>l){n=Math.max(0,E-f);break}}}if(null==n)continue}y=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var H=[],A=t(g.attributes),D=A.next();!D.done;D=A.next()){var F=
1190
1192
  D.value;if(!y.includes(F.name)){var J=Wv(F.value,d);if("X-ASSET-URI"==F.name||"X-ASSET-LIST"==F.name)J=Uv(e(),F.value,d)[0];H.push({key:F.name,description:"",data:J,mimeType:null,pictureType:null})}}if(1<H.length)a.h.onMetadata(w,m,n,H);a.Da.add(h)}}}catch(L){}}}}
1191
- function sw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Tv(b.W,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=Tv(b.W,"EXT-X-MEDIA-SEQUENCE",0),m=Sv(b.W,"EXT-X-SKIP"),n=m?Number(Mv(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;jw(a)&&c.has(p)&&(r=c.get(p));0===r&&a.za==Rw&&0<c.size&&!c.has(p)&&null!=a.l.i&&(r=a.l.rb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var z=g[w],y=0==w?r:v.endTime;p=l+n+w;Sv(z.W,"EXT-X-DISCONTINUITY")&&k++;var B=t(z.W);for(var C=B.next();!C.done;C=B.next())C=C.value,"EXT-X-KEY"==C.name&&(ax(Nv(C,
1193
+ function sw(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Tv(b.W,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=Tv(b.W,"EXT-X-MEDIA-SEQUENCE",0),m=Sv(b.W,"EXT-X-SKIP"),n=m?Number(Mv(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;jw(a)&&c.has(p)&&(r=c.get(p));0===r&&a.za==Rw&&0<c.size&&!c.has(p)&&null!=a.l.i&&(r=a.l.mb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var z=g[w],y=0==w?r:v.endTime;p=l+n+w;Sv(z.W,"EXT-X-DISCONTINUITY")&&k++;var B=t(z.W);for(var C=B.next();!C.done;C=B.next())C=C.value,"EXT-X-KEY"==C.name&&(ax(Nv(C,
1192
1194
  "METHOD"))?h=qx(a,C,b,e,d):h=void 0);c.set(p,y);B=px(a,b,z.W,e,d);!a.K&&a.h.isAutoLowLatencyMode()&&(a.h.enableLowLatencyMode(),a.K=a.h.isLowLatencyMode());if(y=tx(a,B,v,z,y,d,f,e,h))(v=Tv(z.W,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:y.endTime-y.startTime}):m.length&&(v=m.pop(),v.duration+=y.endTime-y.startTime,m.push(v)),v=y,y.i=k,xw(a,f)&&null!=a.I&&p<a.I||u.push(y)}b=void 0;m.length&&(b=m.reduce(function(E,H){return E+H.duration},0),b=Math.round(m.reduce(function(E,H){return E+H.bitrate*H.duration},
1193
1195
  0)/b*1E3));if(m=u.some(function(E){return null!=E.h}))for(c={},d=0;d<u.length;c={Kd:void 0,Jd:void 0,Cd:void 0,wc:void 0,Bd:void 0},d++)if(c.wc=u[d],null==c.wc.h)for(c.Jd=0,c.Kd=d,e=function(E){return function(){var H=u[E.Kd];if(H){if(null!=H.h)return H.h+E.Jd;E.Jd-=H.endTime-H.startTime;E.Kd+=1}return null}}(c),c.Bd=0,c.Cd=d,g=function(E){return function(){var H=u[E.Cd];if(H){H!=E.wc&&(E.Bd+=H.endTime-H.startTime);if(null!=H.h)return H.h+E.Bd;--E.Cd}return null}}(c);null==c.wc.h;)c.wc.h=g(),null==
1194
- c.wc.h&&(c.wc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ja;if(m&&Infinity!=c&&!xw(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Xf(c);return{segments:u,bandwidth:b}}
1196
+ c.wc.h&&(c.wc.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ja;if(m&&Infinity!=c&&!xw(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.Vf(c);return{segments:u,bandwidth:b}}
1195
1197
  function Vw(a,b){if(a==Ue){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}function Ww(a){return a==Ue?"text/vtt":ux[a].mp4}function Ow(a,b){a=jw(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.ac()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
1196
1198
  function ox(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,z;return P(function(y){switch(y.g){case 1:e=yh;f=Ow(a,d);g=f.segment;if(2==g.status)return y.return(Ww(b));h=g.N();k=new pe(h[0]);l=k.Va.split(".").pop();m=ux[b];if((n=m[l])||(n=Pw[l])||(n=Vw(b,c)))return y.return(n);r=1;u=sh(h,a.g.retryParameters);ta(y,2);u.method="HEAD";return G(y,Qw(a,u,e,{type:r}).promise,4);case 4:v=y.h;p=v.headers["content-type"];va(y,3);break;case 2:w=wa(y);if(!w||1002!=w.code&&1001!=w.code){y.u(3);break}u.method="GET";return G(y,
1197
1199
  Qw(a,u,e,{type:r}).promise,6);case 6:z=y.h,p=z.headers["content-type"];case 3:return p?y.return(p.toLowerCase().split(";")[0]):y.return(Ww(b))}})}function jx(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function hw(a,b,c){return Qw(a,sh(b,a.g.retryParameters),0,{type:c?2:3})}
1198
1200
  function fw(a){var b,c,d,e,f,g;return P(function(h){switch(h.g){case 1:if(!a.h)return h.return();ta(h,2);b=Date.now();return G(h,a.update(),4);case 4:c=Date.now();jw(a)&&(d=(c-b)/1E3,a.Jb.sample(1,d),e=a.o,f=Math.max(0,e-Ta(a.Jb)),a.B.$(f));va(h,3);break;case 2:g=wa(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.B.$(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();I(h)}})}
1199
- function jw(a){return a.za!=gw}function nw(a,b){a.za=b;a.l&&a.l.yc(!jw(a));jw(a)||a.B.stop()}function Qw(a,b,c,d){if(!a.ea)throw new T(2,7,7001);d||(d={});d.isPreload=a.Xb();b=a.h.networkingEngine.request(c,b,d);mh(a.ea,b);return b}function ax(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1200
- function cx(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return P(function(E){switch(E.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(xc())throw new T(2,4,4041);g=Nv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return E.return(null);k=Uv(d(),Nv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Me(Ke(k[0].split("data:text/plain;base64,").pop()));E.u(2);break}m=k.sort().join("");a.ra.has(m)||(n=sh(k,a.g.retryParameters),p=Qw(a,n,6).promise,a.ra.set(m,p));return G(E,
1201
- a.ra.get(m),3);case 3:r=E.h,l=Me(r.data);case 2:u="00000000000000000000000000000000";if(!e){E.u(4);break}if(a.oa.has(e)){v=a.oa.get(e);E.u(5);break}w=Sl(e.N(),e.$b(),e.Yb(),a.g.retryParameters);z=yh;return G(E,Qw(a,w,z,{type:0}).promise,6);case 6:y=E.h,v=Ql(y.data),a.oa.set(e,v);case 5:v&&(u=v);case 4:return B=new Map,B.set(u,l),C="cenc","SAMPLE-AES"==g&&(C="cbcs"),E.return(Qe(B,C))}})}S("shaka.hls.HlsParser",ew);
1201
+ function jw(a){return a.za!=gw}function nw(a,b){a.za=b;a.l&&a.l.yc(!jw(a));jw(a)||a.B.stop()}function Qw(a,b,c,d){if(!a.ea)throw new T(2,7,7001);d||(d={});d.isPreload=a.Wb();b=a.h.networkingEngine.request(c,b,d);mh(a.ea,b);return b}function ax(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
1202
+ function cx(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,z,y,B,C;return P(function(E){switch(E.g){case 1:if("video/mp2t"==c)throw new T(2,4,4040);if(xc())throw new T(2,4,4041);g=Nv(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return E.return(null);k=Uv(d(),Nv(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Me(Ke(k[0].split("data:text/plain;base64,").pop()));E.u(2);break}m=k.sort().join("");a.oa.has(m)||(n=sh(k,a.g.retryParameters),p=Qw(a,n,6).promise,a.oa.set(m,p));return G(E,
1203
+ a.oa.get(m),3);case 3:r=E.h,l=Me(r.data);case 2:u="00000000000000000000000000000000";if(!e){E.u(4);break}if(a.ra.has(e)){v=a.ra.get(e);E.u(5);break}w=Sl(e.N(),e.$b(),e.Xb(),a.g.retryParameters);z=yh;return G(E,Qw(a,w,z,{type:0}).promise,6);case 6:y=E.h,v=Ql(y.data),a.ra.set(e,v);case 5:v&&(u=v);case 4:return B=new Map,B.set(u,l),C="cenc","SAMPLE-AES"==g&&(C="cbcs"),E.return(Qe(B,C))}})}S("shaka.hls.HlsParser",ew);
1202
1204
  var Pw={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},ux={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
1203
1205
  vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},wx=new Set(["video/mp2t"].concat(x($e))),bx={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new T(2,4,4040);if(xc())throw new T(2,4,4041);b=Nv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");return Pe("com.apple.fps",c,[{initDataType:"sinf",initData:new Uint8Array(0),
1204
- keyId:null}],Nv(a,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Nv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Nv(a,"URI");b=dw(b.split("?")[0]);b=xb(b.data);c=Pe("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Mv(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Nv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
1205
- var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Nv(a,"URI");a=dw(a.split("?")[0]);a=xb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vh(a,b,new Set,0);return Pe("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},gw="VOD",rx="EVENT",Rw="LIVE",mw={xh:gw,wj:rx,Ej:Rw};Pi["application/x-mpegurl"]=function(){return new ew};Pi["application/vnd.apple.mpegurl"]=function(){return new ew};function xx(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=xb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function yx(a){if(a=zx(a))a:{a=t(gd(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hd(b.value,"LA_URL")){a=ed(b);break a}a=""}else a="";return a}
1206
+ keyId:null}],Nv(a,"URI"))},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Nv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");b=Nv(a,"URI");b=dw(b.split("?")[0]);b=yb(b.data);c=Pe("com.widevine.alpha",c,[{initDataType:"cenc",initData:b}]);if(a=Mv(a,"KEYID"))c.keyIds=new Set([a.toLowerCase().substr(2)]);return c},"com.microsoft.playready":function(a){var b=Nv(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
1207
+ var c="cenc";"SAMPLE-AES"==b&&(c="cbcs");a=Nv(a,"URI");a=dw(a.split("?")[0]);a=yb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vh(a,b,new Set,0);return Pe("com.microsoft.playready",c,[{initDataType:"cenc",initData:a}])}},gw="VOD",rx="EVENT",Rw="LIVE",mw={xh:gw,wj:rx,Ej:Rw};Pi["application/x-mpegurl"]=function(){return new ew};Pi["application/vnd.apple.mpegurl"]=function(){return new ew};function xx(a){var b=0,c=Eb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=yb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function yx(a){if(a=zx(a))a:{a=t(gd(a,"DATA"));for(var b=a.next();!b.done;b=a.next())if(b=hd(b.value,"LA_URL")){a=ed(b);break a}a=""}else a="";return a}
1206
1208
  function zx(a){a=Ke(ed(a));a=xx(a).filter(function(b){return b.type===Ax})[0];if(!a)return null;a=Bc(a.value,!0);return(a=Vc(a,"WRMHEADER"))?a:null}var Ax=1,Bx=(new Map).set("com.microsoft.playready",yx).set("com.microsoft.playready.recommendation",yx).set("com.microsoft.playready.software",yx).set("com.microsoft.playready.hardware",yx);function Cx(a){if(!Dx){Dx=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);Ex=Fx("ftyp",b,d,b,c);b=Fx("dref",Gx);Hx=Fx("dinf",b)}this.g=a}
1207
1209
  function Ix(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=Fx;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(Jx+1));m=Math.floor(m%(Jx+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(x(Kx(h,4)),[0,0,0,0],x(Kx(n,4)),x(Kx(m,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],x(Kx(k,2)),[0,0],x(Kx(l,
1208
1210
  2)),[0,0]));h=Fx("tkhd",h);k=Fx;n=g.duration*g.timescale;l=Math.floor(n/(Jx+1));n=Math.floor(n%(Jx+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.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(x(Kx(g.timescale,4)),x(Kx(l,4)),x(Kx(n,4)),x(Kx(m,2)),[0,0]));l=Fx("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=Lx;break;case "audio":m=Mx}n=Fx("hdlr",m);a:{switch(g.type){case "video":g=Fx("minf",Fx("vmhd",Nx),Hx,Ox(g));break a;
@@ -1229,7 +1231,7 @@ function dy(a){var b,c,d,e,f,g,h;return P(function(k){if(1==k.g)return b=sh(a.l,
1229
1231
  4,4046,l);n(m);m=Ec(m.outerHTML)}var p=Uc(m,"SmoothStreamingMedia");if(!p)throw new T(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=Pm&&l(p);a.i||(a.i=new Kk(null,0));if(l=kd(p,"IsLive",ud,!1))throw new T(2,4,4047);a.i.yc(!l);n=kd(p,"TimeScale",sd,1E7);m=kd(p,"DVRWindowLength",sd);l&&(0===m||isNaN(m))&&(m=Infinity);var r=kd(p,"CanSeek",ud,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.pe(r);
1230
1232
  m=kd(p,"Duration",sd,Infinity);l||a.i.eb(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=cd(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(cd(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),z=n[w];if(z){var y=zx(v);if(y)a:{y=t(gd(y,"DATA"));for(var B=y.next();!B.done;B=y.next())if(B=hd(B.value,"KID")){y=Ke(ed(B));y=new Uint8Array([y[3],y[2],y[1],y[0],
1231
1233
  y[5],y[4],y[7],y[6]].concat(x(y.slice(8))));y=Me(y);break a}y=null}else y=null;B=Ke(ed(v));w=Le(w.replace(/-/g,""));w=[{initData:Vh(B,w,new Set,0),initDataType:"cenc",keyId:y}];w=Pe(z,"cenc",w);y&&w.keyIds.add(y);if(z=Bx.get(z))w.licenseServerUri=z(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=cd(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;z=cd(v,"QualityLevel");w=l.timescale;y=l.duration;B=cd(v,"c");for(var C=[],E=0,H=0;H<B.length;++H){var A=B[H],D=B[H+1],F=kd(A,"t",sd),
1232
- J=kd(A,"d",sd);A=kd(A,"r",qd);if(!J)break;F=null!=F?F:E;(A=A||0)&&A--;if(0>A)if(D){D=kd(D,"t",sd);if(null==D)break;else if(F>=D)break;A=Math.ceil((D-F)/J)-1}else{if(Infinity==y)break;else if(F/w>=y)break;A=Math.ceil((y*w-F)/J)-1}for(D=0;D<=A;++D)E=F+J,C.push({start:F/w,end:E/w,cg:F}),F=E}w=C;z=t(z);for(y=z.next();!y.done;y=z.next())(y=ey(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Ue||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r=t(0<
1234
+ J=kd(A,"d",sd);A=kd(A,"r",qd);if(!J)break;F=null!=F?F:E;(A=A||0)&&A--;if(0>A)if(D){D=kd(D,"t",sd);if(null==D)break;else if(F>=D)break;A=Math.ceil((D-F)/J)-1}else{if(Infinity==y)break;else if(F/w>=y)break;A=Math.ceil((y*w-F)/J)-1}for(D=0;D<=A;++D)E=F+J,C.push({start:F/w,end:E/w,ag:F}),F=E}w=C;z=t(z);for(y=z.next();!y.done;y=z.next())(y=ey(a,v,y.value,w,u,l))&&("audio"!=y.type||a.g.disableAudio?"video"!=y.type||a.g.disableVideo?y.type!=Ue||a.g.disableText||m.push(y):n.push(y):r.push(y))}p=[];r=t(0<
1233
1235
  r.length?r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),C=v.next();!C.done;C=v.next())z=p,w=z.push,y=a,B=u,C=C.value,H=0,B&&B.bandwidth&&0<B.bandwidth&&(H+=B.bandwidth),C&&C.bandwidth&&0<C.bandwidth&&(H+=C.bandwidth),y={id:y.s++,language:B?B.language:"und",disabledUntilTime:0,primary:!!B&&B.primary||!!C&&C.primary,audio:B,video:C,bandwidth:H,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(z,y);l.variants=p;l.textStreams=m;a.j?(a.j.variants=
1234
1236
  l.variants,a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.Vd());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.C.sample(1,h);I(k)})}
1235
1237
  function ey(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return Za("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.s++,l=kd(c,"Bitrate",rd),m=kd(c,"MaxWidth",rd),n=kd(c,"MaxHeight",rd),p=kd(c,"Channels",rd),r=kd(c,"SamplingRate",rd),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.eb(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
@@ -1240,24 +1242,24 @@ w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.
1240
1242
  z),w,b,d);w.segmentIndex=new fl(z);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
1241
1243
  function hy(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={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};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
1242
1244
  b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function iy(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function jy(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
1243
- function ky(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={re:void 0},g=e.next())h.re=g.value,d.push(new Wi(h.re.start,h.re.end,function(k){return function(){return Oe(a.l,[f.replace("{start time}",String(k.re.cg))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",by);var gy="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),fy={CAPT:"main",SUBT:"alternate",DESC:"main"};
1245
+ function ky(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={re:void 0},g=e.next())h.re=g.value,d.push(new Wi(h.re.start,h.re.end,function(k){return function(){return Oe(a.l,[f.replace("{start time}",String(k.re.ag))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",by);var gy="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),fy={CAPT:"main",SUBT:"alternate",DESC:"main"};
1244
1246
  Pi["application/vnd.ms-sstr+xml"]=function(){return new by};function ly(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};var g=null;try{g=Dc(b)}catch(h){}throw new T(401==c||403==c?2:1,1,1001,d,c,g,a,f,e||d);};function my(){}
1245
- function ny(a,b,c,d,e,f){var g=new oy;Eh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new py,k={og:!1,rh:!1};a=qy(a,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Zg(a,function(){k.og=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new ac(function(){k.rh=!0;h.abort()});l.$(b/1E3);a.finally(function(){l.stop()})}return a}
1247
+ function ny(a,b,c,d,e,f){var g=new oy;Eh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new py,k={mg:!1,rh:!1};a=qy(a,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new Zg(a,function(){k.mg=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new ac(function(){k.rh=!0;h.abort()});l.$(b/1E3);a.finally(function(){l.stop()})}return a}
1246
1248
  function qy(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,v,w,z,y,B,C;return P(function(E){switch(E.g){case 1:return k=ry,l=sy,n=new ArrayBuffer(0),r=p=0,u=Date.now(),ta(E,2),G(E,k(a,c),4);case 4:m=E.h;f(ty(m.headers));if("HEAD"==c.method){E.u(5);break}v=m.clone().body.getReader();z=(w=m.headers.get("Content-Length"))?parseInt(w,10):0;y=function(H){function A(){var D,F,J,L;return P(function(K){switch(K.g){case 1:return ta(K,2),G(K,v.read(),4);case 4:D=K.h;va(K,3);break;case 2:return wa(K),K.return();case 3:if(D.done){K.u(5);
1247
- break}p+=D.value.byteLength;if(!g){K.u(5);break}return G(K,g(D.value),5);case 5:F=Date.now();J=p-r;if(100<F-u&&J>=h||D.done)L=D.done?0:z-p,e(F-u,J,L),r=p,u=F;D.done?H.close():(H.enqueue(D.value),A());I(K)}})}A()};new l({start:y});return G(E,m.arrayBuffer(),6);case 6:n=E.h;case 5:va(E,3);break;case 2:B=wa(E);if(d.og)throw new T(1,1,7001,a,b);if(d.rh)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,B,b);case 3:return C=ty(m.headers),E.return(ly(C,n,m.status,a,m.url,b))}})}
1249
+ break}p+=D.value.byteLength;if(!g){K.u(5);break}return G(K,g(D.value),5);case 5:F=Date.now();J=p-r;if(100<F-u&&J>=h||D.done)L=D.done?0:z-p,e(F-u,J,L),r=p,u=F;D.done?H.close():(H.enqueue(D.value),A());I(K)}})}A()};new l({start:y});return G(E,m.arrayBuffer(),6);case 6:n=E.h;case 5:va(E,3);break;case 2:B=wa(E);if(d.mg)throw new T(1,1,7001,a,b);if(d.rh)throw new T(1,1,1003,a,b);throw new T(1,1,1002,a,B,b);case 3:return C=ty(m.headers),E.return(ly(C,n,m.status,a,m.url,b))}})}
1248
1250
  function ty(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function uy(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",my);my.isSupported=uy;my.parse=ny;var ry=window.fetch,py=window.AbortController,sy=window.ReadableStream,oy=window.Headers;
1249
1251
  uy()&&(oh("http",ny,2,!0),oh("https",ny,2,!0),oh("blob",ny,2,!0));function vy(){}
1250
1252
  function wy(a,b,c,d,e,f){var g=new xy,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;g.onabort=function(){n(new T(1,1,7001,a,c))};var p=!1;g.onreadystatechange=function(){if(2==g.readyState&&!p){var u=yy(g);e(u);p=!0}};g.onload=function(u){var v=yy(g),w=g.response;try{d(Date.now()-h,u.loaded-k,0);var z=ly(v,w,g.status,a,g.responseURL,c);m(z)}catch(y){n(y)}};g.onerror=
1251
1253
  function(u){n(new T(1,1,1002,a,u,c))};g.ontimeout=function(){n(new T(1,1,1003,a,c))};g.onprogress=function(u){var v=Date.now(),w=f.minBytesForProgressEvents||0,z=u.loaded-k;if(100<v-h&&z>=w||u.lengthComputable&&u.loaded==u.total)d(v-h,z,4==g.readyState?0:u.total-u.loaded),k=u.loaded,h=v};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new Zg(l,function(){g.abort();return Promise.resolve()})}
1252
- function yy(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",vy);vy.parse=wy;var xy=window.XMLHttpRequest;oh("http",wy,1,!0);oh("https",wy,1,!0);oh("blob",wy,1,!0);function zy(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ay(a){var b=a.Mb();return b?Je(b):a.N().map(function(c){return"{"+encodeURI(c)+"}"}).join("")+":"+a.Ha+":"+a.ta}function By(a,b){return Sl(a.g.N(),a.g.Ha,a.g.ta,b.streaming.retryParameters)};function Cy(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function Dy(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}Cy.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function Ey(a){return 0==a.i?0:a.j/a.i};function Fy(a){var b=this;this.o=a;this.i=new Map;this.h=new Ah(function(){return Gy(b).catch(function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new Cy}Fy.prototype.destroy=function(){return this.h.destroy()};function Hy(a,b,c){a.m=b;a.l=c}function Gy(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
1253
- function Iy(a,b,c,d,e,f){Bh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return P(function(u){if(1==u.g)return G(u,Jy(a,c),2);h=u.h;if(a.h.g)throw new T(2,9,7001);if(e)for(m in k=xb(h),l=new Uh(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);a.m(Ey(a.g),a.g.g);return u.return(f(h))})});a.i.set(b,g)}
1254
- function Ky(a,b,c,d,e,f){Bh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new T(2,9,7001);if(e){var h=xb(c);h=new Uh(h);for(var k in h.data){var l=Number(k);a.l(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.m(Ey(a.g),a.g.g);return f(c)});a.i.set(b,g)}function Ly(a){return P(function(b){return 1==b.g?G(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
1254
+ function yy(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",vy);vy.parse=wy;var xy=window.XMLHttpRequest;oh("http",wy,1,!0);oh("https",wy,1,!0);oh("blob",wy,1,!0);function zy(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ay(a){var b=a.Lb();return b?Je(b):a.N().map(function(c){return"{"+encodeURI(c)+"}"}).join("")+":"+a.Ha+":"+a.ua}function By(a,b){return Sl(a.g.N(),a.g.Ha,a.g.ua,b.streaming.retryParameters)};function Cy(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function Dy(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}Cy.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function Ey(a){return 0==a.i?0:a.j/a.i};function Fy(a){var b=this;this.o=a;this.i=new Map;this.h=new Ah(function(){return Gy(b).catch(function(){})});this.j=[];this.m=function(){};this.l=function(){};this.g=new Cy}Fy.prototype.destroy=function(){return this.h.destroy()};function Hy(a,b,c){a.m=b;a.l=c}function Gy(a){var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
1255
+ function Iy(a,b,c,d,e,f){Bh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return P(function(u){if(1==u.g)return G(u,Jy(a,c),2);h=u.h;if(a.h.g)throw new T(2,9,7001);if(e)for(m in k=yb(h),l=new Uh(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);a.m(Ey(a.g),a.g.g);return u.return(f(h))})});a.i.set(b,g)}
1256
+ function Ky(a,b,c,d,e,f){Bh(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new T(2,9,7001);if(e){var h=yb(c);h=new Uh(h);for(var k in h.data){var l=Number(k);a.l(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.m(Ey(a.g),a.g.g);return f(c)});a.i.set(b,g)}function Ly(a){return P(function(b){return 1==b.g?G(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
1255
1257
  function Jy(a,b){var c,d,e,f;return P(function(g){if(1==g.g)return c=yh,d=a.o.request(c,b),e=function(){return d.abort()},a.j.push(e),G(g,d.promise,2);f=g.h;Qb(a.j,e);return g.return(f.data)})};function My(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Yg;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}My.prototype.abort=function(){var a=this;return P(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ta(b,2);return G(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);I(b)})};
1256
- function Ny(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return P(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return G(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}My.prototype.store=function(){return this.h};My.prototype.promise=function(){return this.g};function Oy(a){this.h=a;this.g=[]}Oy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Py(a,b){return Qy(a,b,"readwrite")}function Qy(a,b,c){c=a.h.transaction([b],c);var d=new My(c,b);a.g.push(d);d.promise().then(function(){Qb(a.g,d)},function(){Qb(a.g,d)});return d};function Ry(a,b,c){this.h=new Oy(a);this.i=b;this.g=c}q=Ry.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Sy(this.i)};q.removeSegments=function(a,b){return Ty(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return P(function(d){if(1==d.g)return G(d,Uy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.rg(e)}))})};q.addManifests=function(){return Sy(this.g)};
1258
+ function Ny(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return P(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return G(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}My.prototype.store=function(){return this.h};My.prototype.promise=function(){return this.g};function Oy(a){this.h=a;this.g=[]}Oy.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Py(a,b){return Qy(a,b,"readwrite")}function Qy(a,b,c){c=a.h.transaction([b],c);var d=new My(c,b);a.g.push(d);d.promise().then(function(){Qb(a.g,d)},function(){Qb(a.g,d)});return d};function Ry(a,b,c){this.h=new Oy(a);this.i=b;this.g=c}q=Ry.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Sy(this.i)};q.removeSegments=function(a,b){return Ty(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return P(function(d){if(1==d.g)return G(d,Uy(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.pg(e)}))})};q.addManifests=function(){return Sy(this.g)};
1257
1259
  q.updateManifest=function(){return Promise.reject(new T(2,9,9016,"Cannot modify values in "+this.g))};function Vy(a,b,c){a=Py(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=Py(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Ty(this,this.g,a,b)};
1258
- q.getManifests=function(a){var b=this,c;return P(function(d){if(1==d.g)return G(d,Uy(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.ad(e)})))})};q.getAllManifests=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=Qy(a.h,a.g,"readonly"),c=new Map,G(d,Ny(b,function(e,f){var g;return P(function(h){if(1==h.g)return G(h,a.ad(f),2);g=h.h;c.set(e,g);I(h)})}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};q.rg=function(a){return a};q.ad=function(a){return Promise.resolve(a)};
1259
- function Sy(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=Py(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={Jf:void 0},h=g.next())l=h.value,k.Jf=e.add(l),k.Jf.onsuccess=function(n){return function(){f.push(n.Jf.result)}}(k);return G(m,d.promise(),2)}return m.return(f)})};
1260
- function Ty(a,b,c,d){a=Py(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={uf:void 0},e=c.next())f.uf=e.value,b.delete(f.uf).onsuccess=function(g){return function(){return d(g.uf)}}(f);return a.promise()}
1260
+ q.getManifests=function(a){var b=this,c;return P(function(d){if(1==d.g)return G(d,Uy(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.ad(e)})))})};q.getAllManifests=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=Qy(a.h,a.g,"readonly"),c=new Map,G(d,Ny(b,function(e,f){var g;return P(function(h){if(1==h.g)return G(h,a.ad(f),2);g=h.h;c.set(e,g);I(h)})}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};q.pg=function(a){return a};q.ad=function(a){return Promise.resolve(a)};
1261
+ function Sy(a){return Promise.reject(new T(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=Py(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={If:void 0},h=g.next())l=h.value,k.If=e.add(l),k.If.onsuccess=function(n){return function(){f.push(n.If.result)}}(k);return G(m,d.promise(),2)}return m.return(f)})};
1262
+ function Ty(a,b,c,d){a=Py(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={tf:void 0},e=c.next())f.tf=e.value,b.delete(f.tf).onsuccess=function(g){return function(){return d(g.tf)}}(f);return a.promise()}
1261
1263
  function Uy(a,b,c){var d,e,f,g,h,k,l;return P(function(m){if(1==m.g){d=Qy(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={ke:void 0,Rd:void 0},k=h.next())l.Rd=k.value,l.ke=e.get(l.Rd),l.ke.onsuccess=function(n){return function(){void 0==n.ke.result&&g.push(n.Rd);f[n.Rd]=n.ke.result}}(l);return G(m,d.promise(),2)}if(g.length)throw new T(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function Wy(a){this.g=new Oy(a)}Wy.prototype.destroy=function(){return this.g.destroy()};Wy.prototype.getAll=function(){var a=this,b,c;return P(function(d){return 1==d.g?(b=Qy(a.g,"session-ids","readonly"),c=[],G(d,Ny(b,function(e,f){c.push(f)}),2)):3!=d.g?G(d,b.promise(),3):d.return(c)})};Wy.prototype.add=function(a){var b=Py(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
1262
1264
  Wy.prototype.remove=function(a){var b=this,c;return P(function(d){return 1==d.g?(c=Py(b.g,"session-ids"),G(d,Ny(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):G(d,c.promise(),0)})};function Xy(){this.g=new Map}Xy.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Xy.prototype.init=function(){var a=this;Yy.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
1263
1265
  function Zy(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{sb:d,Ia:f},Ia:e})})});if(b)return b;throw new T(2,9,9013,"Could not find a cell that supports add-operations");}function $y(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({sb:d,Ia:f},e)})})}
@@ -1266,7 +1268,7 @@ function dz(a){var b,c,d;return P(function(e){return 1==e.g?(b=Array.from(a.g.va
1266
1268
  fz.prototype.ad=function(a){var b,c,d,e,f,g;return P(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=gz(a.periods[c],e),b.push(f);return G(h,gu(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
1267
1269
  function gz(a,b){hz(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return iz(e,a.startTime,b)})}
1268
1270
  function iz(a,b,c){var d=a.initSegmentUri?jz(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=
1269
- jz(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}fz.prototype.rg=function(a){return{data:a.data}};
1271
+ jz(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}fz.prototype.pg=function(a){return{data:a.data}};
1270
1272
  function jz(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new T(2,9,9004,"Could not parse uri "+a);}
1271
1273
  function hz(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
1272
1274
  e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function kz(){Ry.apply(this,arguments)}pa(kz,Ry);
@@ -1293,24 +1295,24 @@ q.update=function(){};
1293
1295
  q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return P(function(m){switch(m.g){case 1:return d=c.g,e=new Xy,ta(m,2,3),G(m,e.init(),5);case 5:return G(m,az(e,d.sb(),d.Ia()),6);case 6:return f=m.h,G(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.u(3);break}return G(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),G(m,e.destroy(),10);case 10:ya(m,0);break;case 2:wa(m),m.u(3)}})};
1294
1296
  q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};Pi["application/x-offline-manifest"]=function(){return new xz};function yz(){}function zz(a){var b=qz(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=bh(a)):a=b&&"segment"==b.g?Az(b.key(),b):$g(new T(2,1,9004,a));return a}
1295
1297
  function Az(a,b){var c=new Xy;return bh(void 0).Aa(function(){return c.init()}).Aa(function(){return az(c,b.sb(),b.Ia())}).Aa(function(d){return d.getSegments([b.key()])}).Aa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}S("shaka.offline.OfflineScheme",yz);yz.plugin=zz;oh("offline",zz);function Bz(a,b,c){var d,e,f,g,h,k;return P(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,Cz(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.u(4);break}g=f.value;h=Dz(a,b,g);return G(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.u(2);break;case 4:return l.return(d)}})}
1296
- function Dz(a,b,c){var d,e;return P(function(f){switch(f.g){case 1:return d=new Wh({Pb:b,onError:function(){},de:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),G(f,di(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return P(function(h){if(1==
1298
+ function Dz(a,b,c){var d,e;return P(function(f){switch(f.g){case 1:return d=new Wh({Ob:b,onError:function(){},de:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ta(f,2),d.configure(a),G(f,di(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),G(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],G(f,Promise.all(c.sessionIds.map(function(g){return P(function(h){if(1==
1297
1299
  h.g)return ta(h,2),G(h,pi(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);I(h)})})),6);case 6:return G(f,d.destroy(),7);case 7:return f.return(e)}})}function Cz(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Rb(a.audioCapabilities,b.audioCapabilities,c)&&Rb(a.videoCapabilities,b.videoCapabilities,c)};function Ez(a,b,c){var d=b.presentationTimeline.getDuration();b=Fz(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Gz(a,b){var c=sz(new rz(a.sb(),a.Ia()),b),d=b.appMetadata||{};c=Fz(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
1298
- function Fz(a){var b=[],c=tg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(jg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(kg(c.value));return b};function Hz(){this.g={}}function Iz(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Jz(a,b){a.g[b.id]=b.bandwidth||2048}function Kz(a,b){a=a.g[b];null==a&&(a=0);return a};function Lz(a){var b=this;if(a&&a.constructor!=Y)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Db()):(this.h=Nm(),this.g=new nh);this.i=[];this.j=[];var c=!a;this.l=new Ah(function(){var d,e,f,g,h;return P(function(k){switch(k.g){case 1:return G(k,Promise.all(b.j.map(function(l){return Gy(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return G(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return G(k,b.g.destroy(),4);
1299
- case 4:b.h=null,b.g=null,I(k)}})})}function Mz(){if(bc())a:{var a=t(Yy.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Lz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Em(a,b));return Rm(this.h,a)};q.getConfiguration=function(){var a=Nm();Rm(a,this.h,Nm());return a};q.Db=function(){return this.g};
1300
+ function Fz(a){var b=[],c=tg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(jg(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(kg(c.value));return b};function Hz(){this.g={}}function Iz(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Jz(a,b){a.g[b.id]=b.bandwidth||2048}function Kz(a,b){a=a.g[b];null==a&&(a=0);return a};function Lz(a){var b=this;if(a&&a.constructor!=Y)throw new T(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Cb()):(this.h=Nm(),this.g=new nh);this.i=[];this.j=[];var c=!a;this.l=new Ah(function(){var d,e,f,g,h;return P(function(k){switch(k.g){case 1:return G(k,Promise.all(b.j.map(function(l){return Gy(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return G(k,Promise.all(e),3);case 3:if(!c){k.u(4);break}return G(k,b.g.destroy(),4);
1301
+ case 4:b.h=null,b.g=null,I(k)}})})}function Mz(){if(bc())a:{var a=t(Yy.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=Lz.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Em(a,b));return Rm(this.h,a)};q.getConfiguration=function(){var a=Nm();Rm(a,this.h,Nm());return a};q.Cb=function(){return this.g};
1300
1302
  q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Fy(this.g);this.j.push(f);b=Nz(this,a,b||{},function(){var g;return P(function(h){if(1==h.g)return c?h.u(2):G(h,ln(a,d.g,e.manifest.retryParameters),3);2!=h.g&&(c=h.h);g=Oi(a,c||null);return h.return(g())})},e,f);b=new Zg(b,function(){return Gy(f)});b.finally(function(){Qb(d.j,f)});return Oz(this,b)};
1301
1303
  function Nz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,z,y,B;return P(function(C){switch(C.g){case 1:return Pz(),h=g=null,k=new Xy,n=m=l=null,ta(C,2,3),G(C,d(),5);case 5:return g=C.h,G(C,Qz(a,b,g,e),6);case 6:p=C.h;Rz(a);r=!p.presentationTimeline.U()&&!p.presentationTimeline.tc();if(!r)throw new T(2,9,9005,b);return G(C,a.Ec(p,function(E){n=n||E},e),7);case 7:h=C.h;Rz(a);if(n)throw n;return G(C,Sz(p,h,e),8);case 8:return G(C,k.init(),9);case 9:return Rz(a),G(C,Zy(k),10);case 10:return l=C.h,Rz(a),u=Tz(h,
1302
- p,b,c,e,f),v=u.zi,w=u.Zf,G(C,l.Ia.addManifests([v]),11);case 11:z=C.h;Rz(a);m=z[0];Rz(a);if(n)throw n;return G(C,Uz(a,w,m,v,f,e,l.Ia,p,h),12);case 12:return Rz(a),Vz(p,v,h,e),G(C,l.Ia.updateManifest(m,v),13);case 13:return Rz(a),y=new pz("manifest",l.path.sb,l.path.Ia,m),C.return(Gz(y,v));case 3:return xa(C),G(C,k.destroy(),14);case 14:if(!g){C.u(15);break}return G(C,g.stop(),15);case 15:if(!h){C.u(17);break}return G(C,h.destroy(),17);case 17:ya(C,0);break;case 2:B=wa(C);if(null==m){C.u(19);break}return G(C,
1304
+ p,b,c,e,f),v=u.zi,w=u.Xf,G(C,l.Ia.addManifests([v]),11);case 11:z=C.h;Rz(a);m=z[0];Rz(a);if(n)throw n;return G(C,Uz(a,w,m,v,f,e,l.Ia,p,h),12);case 12:return Rz(a),Vz(p,v,h,e),G(C,l.Ia.updateManifest(m,v),13);case 13:return Rz(a),y=new pz("manifest",l.path.sb,l.path.Ia,m),C.return(Gz(y,v));case 3:return xa(C),G(C,k.destroy(),14);case 14:if(!g){C.u(15);break}return G(C,g.stop(),15);case 15:if(!h){C.u(17);break}return G(C,h.destroy(),17);case 17:ya(C,0);break;case 2:B=wa(C);if(null==m){C.u(19);break}return G(C,
1303
1305
  Wz(m),19);case 19:throw n||B;}})}
1304
- function Uz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,z,y;return P(function(B){switch(B.g){case 1:l={};m=0;n=function(C,E){var H,A,D,F,J,L,K,O,M;return P(function(N){if(1==N.g){H=t(C);A=H.next();for(D={};!A.done;D={Wb:void 0},A=H.next())D.Wb=A.value,F=By(D.Wb,f),J=D.Wb.i,L=D.Wb.h,K=function(R){return function(Q){var U,da,V;return P(function(ea){if(1==ea.g)return G(ea,g.addSegments([{data:Q}]),2);U=ea.h;Rz(a);da=R.Wb.g;V=Ay(da);l[V]=U[0];m+=Q.byteLength;I(ea)})}}(D),O=D.Wb.g,(M=O.Mb())?Ky(e,D.Wb.groupId,
1305
- M,J,L,K):Iy(e,D.Wb.groupId,F,J,L,K);return G(N,Ly(e),2)}if(!E)return N.u(0);Rz(a);Vz(h,d,k,f);return G(N,g.updateManifest(c,d),0)})};p=!1;ta(B,2);if(!Xz(h)||!p||Yz(h)){B.u(4);break}return G(B,n(b.filter(function(C){return C.h}),!0),5);case 5:return Rz(a),b=b.filter(function(C){return!C.h}),r=l,u=m,l={},m=0,G(B,Zz(g,c,d,r,u,function(){return Rz(a)}),6);case 6:Rz(a);case 4:if(p){B.u(7);break}return G(B,n(b,!1),8);case 8:return Rz(a),v=l,w=m,l={},m=0,G(B,Zz(g,c,d,v,w,function(){return Rz(a)}),9);case 9:Rz(a);
1306
+ function Uz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,z,y;return P(function(B){switch(B.g){case 1:l={};m=0;n=function(C,E){var H,A,D,F,J,L,K,O,M;return P(function(N){if(1==N.g){H=t(C);A=H.next();for(D={};!A.done;D={Vb:void 0},A=H.next())D.Vb=A.value,F=By(D.Vb,f),J=D.Vb.i,L=D.Vb.h,K=function(R){return function(Q){var V,da,U;return P(function(ea){if(1==ea.g)return G(ea,g.addSegments([{data:Q}]),2);V=ea.h;Rz(a);da=R.Vb.g;U=Ay(da);l[U]=V[0];m+=Q.byteLength;I(ea)})}}(D),O=D.Vb.g,(M=O.Lb())?Ky(e,D.Vb.groupId,
1307
+ M,J,L,K):Iy(e,D.Vb.groupId,F,J,L,K);return G(N,Ly(e),2)}if(!E)return N.u(0);Rz(a);Vz(h,d,k,f);return G(N,g.updateManifest(c,d),0)})};p=!1;ta(B,2);if(!Xz(h)||!p||Yz(h)){B.u(4);break}return G(B,n(b.filter(function(C){return C.h}),!0),5);case 5:return Rz(a),b=b.filter(function(C){return!C.h}),r=l,u=m,l={},m=0,G(B,Zz(g,c,d,r,u,function(){return Rz(a)}),6);case 6:Rz(a);case 4:if(p){B.u(7);break}return G(B,n(b,!1),8);case 8:return Rz(a),v=l,w=m,l={},m=0,G(B,Zz(g,c,d,v,w,function(){return Rz(a)}),9);case 9:Rz(a);
1306
1308
  case 7:va(B,0);break;case 2:return z=wa(B),y=Object.values(l),G(B,g.removeSegments(y,function(){}),10);case 10:throw z;}})}function Wz(a){var b,c,d,e;return P(function(f){switch(f.g){case 1:return b=new Xy,G(f,b.init(),2);case 2:return G(f,Zy(b),3);case 3:return c=f.h,d=new pz("manifest",c.path.sb,c.path.Ia,a),G(f,b.destroy(),4);case 4:return e=new Lz,G(f,e.remove(d.toString()),0)}})}
1307
1309
  function Zz(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return P(function(z){switch(z.g){case 1:g=!1;ta(z,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
1308
1310
  (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return G(z,a.updateManifest(b,c),4);case 4:g=!0;f();va(z,0);break;case 2:return v=wa(z),G(z,Wz(b),5);case 5:if(g){z.u(6);break}w=Object.values(d);return G(z,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
1309
1311
  function Sz(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,z,y,B,C,E,H,A,D,F,J,L,K,O,M,N;return P(function(R){switch(R.g){case 1:return d={width:Infinity,height:Infinity},Rf(a,c.restrictions,d),G(R,Uf(b,a,c.offline.usePersistentLicense,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:e=[];f=c.preferredDecodingAttributes;g=c.preferredVideoCodecs;h=c.preferredAudioCodecs;Pf(a,g,h,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,e.push(jg(m));n=t(a.textStreams);for(p=n.next();!p.done;p=
1310
1312
  n.next())r=p.value,e.push(kg(r));u=t(a.imageStreams);for(v=u.next();!v.done;v=u.next())w=v.value,e.push(lg(w));return G(R,c.offline.trackSelectionCallback(e),3);case 3:z=R.h;y=a.presentationTimeline.getDuration();B=0;C=t(z);for(E=C.next();!E.done;E=C.next())H=E.value,A=H.bandwidth*y/8,B+=A;ta(R,4);return G(R,c.offline.downloadSizeCallback(B),6);case 6:D=R.h;if(!D)throw new T(2,9,9014);va(R,5);break;case 4:F=wa(R);if(F instanceof T)throw F;throw new T(2,9,9015);case 5:J=new Set;L=new Set;K=new Set;
1311
1313
  O=t(z);for(M=O.next();!M.done;M=O.next())N=M.value,"variant"==N.type&&J.add(N.id),"text"==N.type&&L.add(N.id),"image"==N.type&&K.add(N.id);a.variants=a.variants.filter(function(Q){return J.has(Q.id)});a.textStreams=a.textStreams.filter(function(Q){return L.has(Q.id)});a.imageStreams=a.imageStreams.filter(function(Q){return K.has(Q.id)});$z(a);I(R)}})}
1312
- function Tz(a,b,c,d,e,f){var g=Ez(c,b,d),h=e.offline.progressCallback;Hy(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&li(a,"cenc",r)});var k=Xz(b)&&!Yz(b),l=null;k&&(l=aA.get(a.g.keySystem));for(var m=new Hz,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Jz(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Iz(m,p.value);m=bA(f,m,b,e);f=m.streams;m=m.Zf;n=a.g;p=e.offline.usePersistentLicense;
1313
- n&&p&&(n.initData=[]);return{zi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ed(),streams:f,sessionIds:p?ui(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Zf:m}}function Xz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1314
+ function Tz(a,b,c,d,e,f){var g=Ez(c,b,d),h=e.offline.progressCallback;Hy(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&li(a,"cenc",r)});var k=Xz(b)&&!Yz(b),l=null;k&&(l=aA.get(a.g.keySystem));for(var m=new Hz,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Jz(m,p.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Iz(m,p.value);m=bA(f,m,b,e);f=m.streams;m=m.Xf;n=a.g;p=e.offline.usePersistentLicense;
1315
+ n&&p&&(n.initData=[]);return{zi:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ed(),streams:f,sessionIds:p?ui(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Xf:m}}function Xz(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
1314
1316
  function Yz(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Vz(a,b,c,d){b.expiration=c.ed();c=ui(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Xz(a)&&d.offline.usePersistentLicense&&!c.length)throw new T(2,9,9007);}q.remove=function(a){return cA(this,dA(this,a))};
1315
1317
  function dA(a,b){var c,d,e,f,g,h;return P(function(k){switch(k.g){case 1:Pz();c=qz(b);if(null==c||"manifest"!=c.g)throw new T(2,9,9004,b);d=c;e=new Xy;ua(k,2);return G(k,e.init(),4);case 4:return G(k,az(e,d.sb(),d.Ia()),5);case 5:return f=k.h,G(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],G(k,Promise.all([eA(a,h,e),fA(f,d,h)]),2);case 2:return xa(k),G(k,e.destroy(),8);case 8:ya(k,0)}})}
1316
1318
  function gA(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Ze(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Ze(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function eA(a,b,c){return P(function(d){return G(d,hA(a.g,a.h.drm,c,b),0)})}
@@ -1319,17 +1321,17 @@ function jA(a){var b,c,d,e,f,g,h,k,l,m;return P(function(n){switch(n.g){case 1:r
1319
1321
  q.list=function(){return cA(this,kA())};function kA(){var a,b,c;return P(function(d){switch(d.g){case 1:return Pz(),a=[],b=new Xy,ua(d,2),G(d,b.init(),4);case 4:return c=Promise.resolve(),$y(b,function(e,f){c=c.then(function(){var g;return P(function(h){if(1==h.g)return G(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Gz(new pz("manifest",e.sb,e.Ia,l),k);a.push(k)});I(h)})})}),G(d,c,2);case 2:return xa(d),G(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d.return(a)}})}
1320
1322
  function Qz(a,b,c,d){var e,f,g,h,k;return P(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},
1321
1323
  onMetadata:function(){},disableStream:function(){},addFont:function(){}},c.configure(d.manifest),Rz(a),G(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Rz(a),k=lA(h),G(l,Promise.all(Ch(k,function(m){return m.createSegmentIndex()})),3);Rz(a);if(e)throw e;return l.return(h)})}
1322
- q.Ec=function(a,b,c){var d=this,e;return P(function(f){return 1==f.g?(e=new Wh({Pb:d.g,onError:b,de:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),G(f,ai(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?G(f,ni(e),3):f.return(e)})};
1323
- function bA(a,b,c,d){var e=new Map,f=lA(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=mA(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Zf:Array.from(e.values())}}
1324
+ q.Ec=function(a,b,c){var d=this,e;return P(function(f){return 1==f.g?(e=new Wh({Ob:d.g,onError:b,de:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(c.drm),G(f,ai(e,a.variants,c.offline.usePersistentLicense),2)):3!=f.g?G(f,ni(e),3):f.return(e)})};
1325
+ function bA(a,b,c,d){var e=new Map,f=lA(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=mA(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Xf:Array.from(e.values())}}
1324
1326
  function mA(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
1325
- audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;nA(d,c.presentationTimeline.rb(),function(l){var m=Ay(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Kz(b,d.id)*p;p=Dy(a.g,p);f.set(m,new zy(l,p,k,!1))}l.Z&&(n=Ay(l.Z),f.has(n)||(p=.5*Kz(b,d.id),p=Dy(a.g,p),f.set(n,new zy(l.Z,p,k,!0))));
1327
+ audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;nA(d,c.presentationTimeline.mb(),function(l){var m=Ay(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Kz(b,d.id)*p;p=Dy(a.g,p);f.set(m,new zy(l,p,k,!1))}l.Z&&(n=Ay(l.Z),f.has(n)||(p=.5*Kz(b,d.id),p=Dy(a.g,p),f.set(n,new zy(l.Z,p,k,!0))));
1326
1328
  g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0,mimeType:l.mimeType,codecs:l.codecs});0!==h&&(k=(k+1)%h)});return g}function nA(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}
1327
1329
  function Rz(a){if(a.l.g)throw new T(2,9,7001);}function Pz(){if(!Mz())throw new T(2,9,9E3);}function cA(a,b){return P(function(c){if(1==c.g)return a.i.push(b),ua(c,2),G(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);Qb(a.i,b);return ya(c,0)})}function Oz(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){Qb(a.i,c)})}
1328
1330
  function iA(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
1329
1331
  function hA(a,b,c,d){var e,f,g;return P(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=cz(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:gA(d,!1),videoCapabilities:gA(d,!0)}});return G(h,Bz(b,a,f),2)}return 3!=h.g?(g=h.h,G(h,e.remove(g),3)):G(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
1330
1332
  function lA(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
1331
1333
  function $z(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",Lz);Lz.deleteAll=function(){var a;return P(function(b){return 1==b.g?(a=new Xy,ua(b,2),G(b,dz(a),2)):5!=b.g?(xa(b),G(b,a.destroy(),5)):ya(b,0)})};
1332
- Lz.prototype.list=Lz.prototype.list;Lz.prototype.removeEmeSessions=Lz.prototype.Ri;Lz.prototype.remove=Lz.prototype.remove;Lz.prototype.store=Lz.prototype.store;Lz.prototype.getNetworkingEngine=Lz.prototype.Db;Lz.prototype.getConfiguration=Lz.prototype.getConfiguration;Lz.prototype.configure=Lz.prototype.configure;Lz.prototype.destroy=Lz.prototype.destroy;Lz.support=Mz;
1334
+ Lz.prototype.list=Lz.prototype.list;Lz.prototype.removeEmeSessions=Lz.prototype.Ri;Lz.prototype.remove=Lz.prototype.remove;Lz.prototype.store=Lz.prototype.store;Lz.prototype.getNetworkingEngine=Lz.prototype.Cb;Lz.prototype.getConfiguration=Lz.prototype.getConfiguration;Lz.prototype.configure=Lz.prototype.configure;Lz.prototype.destroy=Lz.prototype.destroy;Lz.support=Mz;
1333
1335
  var aA=(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.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");Wp.offline=Mz;function oA(){}function pA(a,b){a={priority:b||0,callback:a};for(b=0;b<qA.length;b++)if(qA[b].priority<a.priority){qA.splice(b,0,a);return}qA.push(a)}S("shaka.polyfill",oA);oA.register=pA;oA.installAll=function(){for(var a=t(qA),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){Za("Error installing polyfill!",c)}}};var qA=[];function rA(){}function sA(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())tA(b.value)}function tA(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}oA.Aria=rA;rA.install=sA;pA(sA);function uA(){}function vA(){oc()||gc("Sky_STB")||wA()}oA.EncryptionScheme=uA;uA.install=vA;pA(vA,-2);function xA(){}
1334
1336
  function yA(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
1335
1337
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",zA);document.addEventListener("webkitfullscreenerror",zA);document.addEventListener("mozfullscreenchange",zA);document.addEventListener("mozfullscreenerror",zA);document.addEventListener("MSFullscreenChange",zA);document.addEventListener("MSFullscreenError",zA)}}
@@ -1349,7 +1351,7 @@ function OA(){var a=MediaSource.isTypeSupported;jc()||(MediaSource.isTypeSupport
1349
1351
  function SA(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new TA;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new W("change");b.dispatchEvent(c)})}oA.Orientation=PA;PA.install=QA;function TA(){kh.call(this);this.type="";this.angle=0}pa(TA,kh);
1350
1352
  TA.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
1351
1353
  TA.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};pA(QA);function UA(){}var VA,WA,XA,YA,ZA,$A;function aB(a,b){try{var c=new bB(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function cB(a){var b=this.mediaKeys;b&&b!=a&&dB(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?dB(a,this):Promise.resolve()}
1352
- function eB(a){a=xb(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Bc(a.subarray(4),!0);a=Ec(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Bb(a);this.dispatchEvent(b)}oA.PatchedMediaKeysApple=UA;
1354
+ function eB(a){a=yb(a.initData);if(Eb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Bc(a.subarray(4),!0);a=Ec(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ab(a);this.dispatchEvent(b)}oA.PatchedMediaKeysApple=UA;
1353
1355
  UA.uninstall=function(){VA&&(VA=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",WA),HTMLMediaElement.prototype.setMediaKeys=XA,window.MediaKeys=YA,window.MediaKeySystemAccess=ZA,navigator.requestMediaKeySystemAccess=$A,WA=$A=XA=ZA=YA=null,window.shakaMediaKeysPolyfill="")};
1354
1356
  UA.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)VA=!0,WA=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),XA=HTMLMediaElement.prototype.setMediaKeys,YA=window.MediaKeys,ZA=window.MediaKeySystemAccess,$A=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=cB;window.MediaKeys=fB;window.MediaKeySystemAccess=bB;navigator.requestMediaKeySystemAccess=
1355
1357
  aB;window.shakaMediaKeysPolyfill=gB}};
@@ -1357,10 +1359,10 @@ function bB(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=
1357
1359
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
1358
1360
  bB.prototype.createMediaKeys=function(){var a=new fB(this.keySystem);return Promise.resolve(a)};bB.prototype.getConfiguration=function(){return this.g};function fB(a){this.h=new WebKitMediaKeys(a);this.g=new gb}fB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new hB(this.h,a)};fB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1359
1361
  function dB(a,b){a.g.Wa();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",eB);try{return Rk(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}fB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function hB(a){kh.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new gb;this.sessionId="";this.expiration=NaN;this.closed=new Yg;this.keyStatuses=new iB}pa(hB,kh);q=hB.prototype;
1360
- q.generateRequest=function(a,b){var c=this;this.h=new Yg;try{var d=this.l.createSession("video/mp4",xb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.ac()?"license-request":"license-renewal").set("message",Bb(e.message));e=new W("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(jB(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1362
+ q.generateRequest=function(a,b){var c=this;this.h=new Yg;try{var d=this.l.createSession("video/mp4",yb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.ac()?"license-request":"license-renewal").set("message",Ab(e.message));e=new W("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(jB(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1361
1363
  function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:jB(c,"output-not-allowed");break;default:jB(c,"internal-error")}});jB(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1362
- q.update=function(a){this.g=new Yg;try{this.i.update(xb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Wa()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function jB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new W("keystatuseschange");a.dispatchEvent(b)}
1363
- function iB(){this.size=0;this.g=void 0}q=iB.prototype;q.ac=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Yb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yb.value();return this.g&&wb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var gB="apple";function kB(){}function lB(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ic()||gc("Tizen 4")||gc("Tizen 5.0")||jc()&&38===lc())&&(MediaKeys.prototype.setServerCertificate=mB)}function mB(){return Promise.resolve(!1)}oA.PatchedMediaKeysCert=kB;kB.install=lB;pA(lB);function nB(){}function oB(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=pB,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qB,window.MediaKeys=rB,window.MediaKeySystemAccess=sB,window.shakaMediaKeysPolyfill=tB)}function pB(){return Promise.reject(Error("The key system specified is not supported."))}
1364
+ q.update=function(a){this.g=new Yg;try{this.i.update(yb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Wa()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function jB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new W("keystatuseschange");a.dispatchEvent(b)}
1365
+ function iB(){this.size=0;this.g=void 0}q=iB.prototype;q.ac=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Yb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yb.value();return this.g&&xb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var gB="apple";function kB(){}function lB(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||ic()||gc("Tizen 4")||gc("Tizen 5.0")||jc()&&38===lc())&&(MediaKeys.prototype.setServerCertificate=mB)}function mB(){return Promise.resolve(!1)}oA.PatchedMediaKeysCert=kB;kB.install=lB;pA(lB);function nB(){}function oB(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=pB,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qB,window.MediaKeys=rB,window.MediaKeySystemAccess=sB,window.shakaMediaKeysPolyfill=tB)}function pB(){return Promise.reject(Error("The key system specified is not supported."))}
1364
1366
  function qB(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}oA.PatchedMediaKeysNop=nB;nB.install=oB;function rB(){throw new TypeError("Illegal constructor.");}rB.prototype.createSession=function(){};rB.prototype.setServerCertificate=function(){};rB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function sB(){this.keySystem="";throw new TypeError("Illegal constructor.");}sB.prototype.getConfiguration=function(){};
1365
1367
  sB.prototype.createMediaKeys=function(){};var tB="nop";pA(oB,-10);function uB(){}
1366
1368
  function vB(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)wB="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=xB;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=yB;window.MediaKeys=zB;window.MediaKeySystemAccess=AB;window.shakaMediaKeysPolyfill=BB}}
@@ -1368,29 +1370,29 @@ function CB(a){var b=wB;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}functi
1368
1370
  function AB(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
1369
1371
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
1370
1372
  d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}AB.prototype.createMediaKeys=function(){var a=new zB(this.g);return Promise.resolve(a)};AB.prototype.getConfiguration=function(){return this.h};function zB(a){this.l=a;this.h=null;this.g=new gb;this.i=[];this.j=new Map}
1371
- function DB(a,b){a.h=b;a.g.Wa();var c=wB;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Bb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=EB(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.ac()?"licenserequest":"licenserenewal").set("message",d.message),d=new W("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=EB(a,d.sessionId))&&d.ready()}),
1373
+ function DB(a,b){a.h=b;a.g.Wa();var c=wB;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ab(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=EB(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.ac()?"licenserequest":"licenserenewal").set("message",d.message),d=new W("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){(d=EB(a,d.sessionId))&&d.ready()}),
1372
1374
  a.g.D(b,c+"keyerror",function(d){var e=EB(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?FB(e,"output-restricted"):1==f?FB(e,"expired"):FB(e,"internal-error"))}}))}
1373
1375
  zB.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new GB(b,this.l,a);this.i.push(a);return a};zB.prototype.setServerCertificate=function(){return Promise.resolve(!1)};zB.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
1374
1376
  function EB(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function GB(a,b,c){kh.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Yg;this.keyStatuses=new HB}pa(GB,kh);q=GB.prototype;q.ready=function(){FB(this,"usable");this.g&&this.g.resolve();this.g=null};
1375
- function IB(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=xb(Ec("LOAD_SESSION|"+c));else{var e=Ec("PERSISTENT|");d=Ne(e,b)}else d=xb(b)}catch(g){return Promise.reject(g)}a.h=new Yg;var f=CB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new ac(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).$(.01)}return a.h}
1376
- function JB(a,b,c){if(a.g)a.g.then(function(){return JB(a,b,c)}).catch(function(){return JB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Ac(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Ke(e.keys[0].k);e=Ke(e.keys[0].kid)}else d=xb(c),e=null;var f=CB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1377
+ function IB(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=yb(Ec("LOAD_SESSION|"+c));else{var e=Ec("PERSISTENT|");d=Ne(e,b)}else d=yb(b)}catch(g){return Promise.reject(g)}a.h=new Yg;var f=CB("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new ac(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).$(.01)}return a.h}
1378
+ function JB(a,b,c){if(a.g)a.g.then(function(){return JB(a,b,c)}).catch(function(){return JB(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Ac(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Ke(e.keys[0].k);e=Ke(e.keys[0].kid)}else d=yb(c),e=null;var f=CB("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1377
1379
  function FB(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new W("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return IB(this,b,null)};q.load=function(a){return"persistent-license"==this.l?IB(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Yg;JB(this,b,a);return b};
1378
1380
  q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=CB("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function HB(){this.size=0;this.g=void 0}q=HB.prototype;q.ac=function(){return this.g};
1379
- q.forEach=function(a){this.g&&a(this.g,Yb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yb.value();return this.g&&wb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var wB="",BB="webkit";pA(vB);function KB(){}function LB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=MB,Object.defineProperty(a,"disablePictureInPicture",{get:NB,set:OB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=PB,document.addEventListener("webkitpresentationmodechanged",QB,!0))}}
1381
+ q.forEach=function(a){this.g&&a(this.g,Yb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yb.value();return this.g&&xb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var wB="",BB="webkit";pA(vB);function KB(){}function LB(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=MB,Object.defineProperty(a,"disablePictureInPicture",{get:NB,set:OB,enumerable:!0,configurable:!0}),document.exitPictureInPicture=PB,document.addEventListener("webkitpresentationmodechanged",QB,!0))}}
1380
1382
  function QB(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
1381
1383
  function MB(){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 PB(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1382
- function NB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function OB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}oA.PiPWebkit=KB;KB.install=LB;pA(LB);function RB(){}function SB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=TB))}function TB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}oA.RandomUUID=RB;RB.install=SB;pA(SB);function UB(){}function VB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:WB})}function WB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}oA.Symbol=UB;UB.install=VB;pA(VB);function XB(){}function YB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}oA.VideoPlayPromise=XB;XB.install=YB;pA(YB);function ZB(){}function $B(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||jc()&&38===lc())&&(a.getVideoPlaybackQuality=aC)}}function aC(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}oA.VideoPlaybackQuality=ZB;ZB.install=$B;pA($B);function bC(){}function cC(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=dC;else if(6==b)a=eC;else{try{var c=!!dC(1,2,"")}catch(d){c=!1}c&&(a=dC)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function dC(a,b,c){return new window.TextTrackCue(a,b,c)}function eC(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}oA.VTTCue=bC;bC.install=cC;pA(cC);function fC(){}fC.prototype.parseInit=function(){};fC.prototype.setSequenceMode=function(){};fC.prototype.setManifestType=function(){};fC.prototype.parseMedia=function(a,b){var c=null,d=[];a=Ac(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=gC.exec(e))){var f=hC.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Dd(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1384
+ function NB(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function OB(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}oA.PiPWebkit=KB;KB.install=LB;pA(LB);function RB(){}function SB(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=TB))}function TB(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}oA.RandomUUID=RB;RB.install=SB;pA(SB);function UB(){}function VB(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:WB})}function WB(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}oA.Symbol=UB;UB.install=VB;pA(VB);function XB(){}function YB(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}oA.VideoPlayPromise=XB;XB.install=YB;pA(YB);function ZB(){}function $B(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||jc()&&38===lc())&&(a.getVideoPlaybackQuality=aC)}}function aC(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}oA.VideoPlaybackQuality=ZB;ZB.install=$B;pA($B);function bC(){}function cC(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=dC;else if(6==b)a=eC;else{try{var c=!!dC(1,2,"")}catch(d){c=!1}c&&(a=dC)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function dC(a,b,c){return new window.TextTrackCue(a,b,c)}function eC(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}oA.VTTCue=bC;bC.install=cC;pA(cC);function fC(){}fC.prototype.parseInit=function(){};fC.prototype.setSequenceMode=function(){};fC.prototype.setManifestType=function(){};fC.prototype.parseMedia=function(a,b){var c=null,d=[];a=Ac(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=gC.exec(e))){var f=hC.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Ed(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1383
1385
  S("shaka.text.LrcTextParser",fC);fC.prototype.parseMedia=fC.prototype.parseMedia;fC.prototype.setManifestType=fC.prototype.setManifestType;fC.prototype.setSequenceMode=fC.prototype.setSequenceMode;fC.prototype.parseInit=fC.prototype.parseInit;var gC=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,hC=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;of["application/x-subtitle-lrc"]=function(){return new fC};function iC(){}iC.prototype.parseInit=function(){};iC.prototype.setSequenceMode=function(){};iC.prototype.setManifestType=function(){};
1384
1386
  iC.prototype.parseMedia=function(a,b,c,d){var e=Ac(a);a=[];if(""==e)return a;var f=Vc(e,"tt",!0);if(!f)throw new T(2,2,2005,"Failed to parse TTML.");e=gd(f,"body")[0];if(!e)return[];var g=md(f,jC,"frameRate"),h=md(f,jC,"subFrameRate"),k=md(f,jC,"frameRateMultiplier"),l=md(f,jC,"tickRate"),m=md(f,jC,"cellResolution"),n=f.attributes["xml:space"]||"default",p=md(f,kC,"extent");if("default"!=n&&"preserve"!=n)throw new T(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new lC(g,h,k,l);m=mC(m);
1385
1387
  h=gd(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return"\n"!=v});k=gd(f,"style");f=gd(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=nC(u.value,k,p))&&l.push(u);if(cd(e,"p").length)throw new T(2,2,2001,"<p> can only be inside <div> in TTML");p=t(cd(e,"div"));for(r=p.next();!r.done;r=p.next())if(cd(r.value,"span").length)throw new T(2,2,2001,"<span> can only be inside <p> in TTML");if(b=oC(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"),
1386
1388
  a.push(b);return a};
1387
1389
  function oC(a,b,c,d,e,f,g,h,k,l,m,n,p){var r=l;if($c(a)){if(!m)return null;var u={tagName:"span",children:[ed(a)],attributes:{},parent:null}}else u=a;for(var v=null,w=t(pC),z=w.next();!z.done&&!(v=qC(u,"backgroundImage",d,"#",z.value)[0]);z=w.next());w=null;z=md(u,pC,"backgroundImage");var y=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(z&&y.test(z)){w=parseInt(z.split(":").pop(),10)-1;if(w>=p.length)return null;w=p[w]}else n&&z&&!z.startsWith("#")&&(y=new pe(n),z=new pe(z),(z=y.resolve(z).toString())&&
1388
1390
  (w=z));if("p"==a.tagName||v||w)m=!0;a=m;z="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));y=u.children.every($c);h=[];if(!y)for(var B=t(u.children),C=B.next();!C.done;C=B.next())(C=oC(C.value,b,c,d,e,f,g,z,k,u,m,n,p))&&h.push(C);d=null!=l;n=ed(u);n=u.children.length&&n&&/\S/.test(n);B=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(B||n||"br"==u.tagName||0!=h.length||d&&!z))return null;p=rC(u,c);n=p.start;for(p=p.end;r&&r.tagName&&"tt"!=r.tagName;)p=sC(r,c,n,p),n=p.start,
1389
- p=p.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.periodStart;n=Math.max(n,b.segmentStart);p=Math.min(p,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,p=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),p=Math.max(p,c.endTime);if("br"==u.tagName)return e=new Dd(n,p,""),e.lineBreak=!0,e;b="";y&&(b=Hc(ed(u)||""),z&&(b=b.replace(/\s+/g," ")));b=new Dd(n,p,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=qC(u,"region",f,"")[0];if(u.attributes.region&&
1391
+ p=p.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.periodStart;n=Math.max(n,b.segmentStart);p=Math.min(p,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,p=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),p=Math.max(p,c.endTime);if("br"==u.tagName)return e=new Ed(n,p,""),e.lineBreak=!0,e;b="";y&&(b=Hc(ed(u)||""),z&&(b=b.replace(/\s+/g," ")));b=new Ed(n,p,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=qC(u,"region",f,"")[0];if(u.attributes.region&&
1390
1392
  k&&k.attributes["xml:id"]){var E=k.attributes["xml:id"];b.region=g.filter(function(H){return H.id==E})[0]}g=k;l&&d&&!u.attributes.region&&!u.attributes.style&&(g=qC(l,"region",f,"")[0]);tC(b,u,g,v,w,e,a,0==h.length);return b}
1391
1393
  function nC(a,b,c){var d=new Mb,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=uC.exec(c)||vC.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=wC(a,b,"extent");if(g){var h=(f=uC.exec(g))||vC.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?Nb:0,d.heightUnits=f||null!=e?Nb:0)}if(a=wC(a,b,"origin"))if(h=(f=uC.exec(a))||vC.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
1392
1394
  d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=Nb,d.height=100-d.viewportAnchorY,d.heightUnits=Nb):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?Nb:0;return d}function xC(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
1393
- function tC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==yC(b,c,f,"direction",g)&&(a.direction="rtl");h=yC(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Gd);(h=yC(b,c,f,"textAlign",!0))?(a.positionAlign=zC[h],a.lineAlign=AC[h],a.textAlign=ce[h.toUpperCase()]):a.textAlign=Fd;if(h=yC(b,c,f,"displayAlign",!0))a.displayAlign=de[h.toUpperCase()];if(h=yC(b,c,f,"color",g))a.color=xC(h);if(h=yC(b,c,f,"backgroundColor",
1395
+ function tC(a,b,c,d,e,f,g,h){g=g||h;"rtl"==yC(b,c,f,"direction",g)&&(a.direction="rtl");h=yC(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=Hd);(h=yC(b,c,f,"textAlign",!0))?(a.positionAlign=zC[h],a.lineAlign=AC[h],a.textAlign=ce[h.toUpperCase()]):a.textAlign=Gd;if(h=yC(b,c,f,"displayAlign",!0))a.displayAlign=de[h.toUpperCase()];if(h=yC(b,c,f,"color",g))a.color=xC(h);if(h=yC(b,c,f,"backgroundColor",
1394
1396
  g))a.backgroundColor=xC(h);if(h=yC(b,c,f,"border",g))a.border=h;if(h=yC(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
1395
1397
  k}).join(",")}(h=yC(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=$d);h=yC(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=yC(b,c,f,"lineHeight",g))&&h.match(BC)&&(a.lineHeight=h);(h=yC(b,c,f,"fontSize",g))&&(h.match(BC)||h.match(CC))&&(a.fontSize=h);if(h=yC(b,c,f,"fontStyle",g))a.fontStyle=fe[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=ed(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
1396
1398
  e);if(d=yC(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(BC)?a.textStrokeColor=a.color:(a.textStrokeColor=xC(d[0]),d.shift()),d[0]&&d[0].match(BC)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=yC(b,c,f,"letterSpacing",g))&&d.match(BC)&&(a.letterSpacing=d);(d=yC(b,c,f,"linePadding",g))&&d.match(BC)&&(a.linePadding=d);if(d=yC(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=wC(c,f,"textDecoration"))&&DC(a,d);(d=EC(b,f,"textDecoration"))&&DC(a,d);if(d=yC(b,c,f,"textCombine",g))a.textCombineUpright=
@@ -1402,67 +1404,67 @@ function sC(a,b,c,d){a=rC(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);nul
1402
1404
  function GC(a,b){var c=null;if(HC.test(a)){a=HC.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(IC.test(a))c=JC(IC,a);else if(KC.test(a))c=JC(KC,a);else if(LC.test(a))a=LC.exec(a),c=Number(a[1])/b.frameRate;else if(MC.test(a))a=MC.exec(a),c=Number(a[1])/b.g;else if(NC.test(a))c=JC(NC,a);else if(a)throw new T(2,2,2001,"Could not parse cue time range in TTML");return c}
1403
1405
  function JC(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function mC(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{mc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",iC);iC.prototype.parseMedia=iC.prototype.parseMedia;iC.prototype.setManifestType=iC.prototype.setManifestType;iC.prototype.setSequenceMode=iC.prototype.setSequenceMode;iC.prototype.parseInit=iC.prototype.parseInit;
1404
1406
  function lC(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
1405
- var uC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,CC=/^(\d{1,4}(?:\.\d+)?|100)%$/,BC=/^(\d+px|\d+em|\d*\.?\d+c)$/,vC=/^(\d+)px (\d+)px$/,HC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,IC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,KC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,LC=/^(\d*(?:\.\d*)?)f$/,MC=/^(\d*(?:\.\d*)?)t$/,NC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),AC={left:Jd,center:"center",right:"end",start:Jd,
1407
+ var uC=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,CC=/^(\d{1,4}(?:\.\d+)?|100)%$/,BC=/^(\d+px|\d+em|\d*\.?\d+c)$/,vC=/^(\d+)px (\d+)px$/,HC=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,IC=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,KC=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,LC=/^(\d*(?:\.\d*)?)f$/,MC=/^(\d*(?:\.\d*)?)t$/,NC=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),AC={left:Kd,center:"center",right:"end",start:Kd,
1406
1408
  end:"end"},zC={left:"line-left",center:"center",right:"line-right"},jC=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],kC=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],pC=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];of["application/ttml+xml"]=function(){return new iC};function OC(){this.g=new iC}OC.prototype.parseInit=function(a){var b=!1;(new Jh).box("moov",Oh).box("trak",Oh).box("mdia",Oh).box("minf",Oh).box("stbl",Oh).S("stsd",Qh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new T(2,2,2007);};OC.prototype.setSequenceMode=function(){};OC.prototype.setManifestType=function(){};
1407
- OC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[],g=[];(new Jh).box("moof",Oh).box("traf",Oh).S("subs",function(h){g=[];for(var k=h.reader,l=k.P(),m=0;m<l;m++){k.P();for(var n=k.la(),p=0;p<n;p++)1==h.version?g.push(k.P()):g.push(k.la()),k.T(),k.T(),k.P()}}).box("mdat",Th(function(h){e=!0;if(g.length){for(var k=xb(h,0,g[0]),l=[],m=g[0],n=1;n<g.length;n++){var p=xb(h,m,g[n]);p=Ie(p);l.push("data:image/png;base64,"+p);m+=g[n]}f=f.concat(d.g.parseMedia(k,b,c,l))}else f=f.concat(d.g.parseMedia(h,
1409
+ OC.prototype.parseMedia=function(a,b,c){var d=this,e=!1,f=[],g=[];(new Jh).box("moof",Oh).box("traf",Oh).S("subs",function(h){g=[];for(var k=h.reader,l=k.P(),m=0;m<l;m++){k.P();for(var n=k.la(),p=0;p<n;p++)1==h.version?g.push(k.P()):g.push(k.la()),k.T(),k.T(),k.P()}}).box("mdat",Th(function(h){e=!0;if(g.length){for(var k=yb(h,0,g[0]),l=[],m=g[0],n=1;n<g.length;n++){var p=yb(h,m,g[n]);p=Ie(p);l.push("data:image/png;base64,"+p);m+=g[n]}f=f.concat(d.g.parseMedia(k,b,c,l))}else f=f.concat(d.g.parseMedia(h,
1408
1410
  b,c,[]))})).parse(a,!1);if(!e)throw new T(2,2,2007);return f};S("shaka.text.Mp4TtmlParser",OC);OC.prototype.parseMedia=OC.prototype.parseMedia;OC.prototype.setManifestType=OC.prototype.setManifestType;OC.prototype.setSequenceMode=OC.prototype.setSequenceMode;OC.prototype.parseInit=OC.prototype.parseInit;of['application/mp4; codecs="stpp"']=function(){return new OC};of['application/mp4; codecs="stpp.ttml"']=function(){return new OC};of['application/mp4; codecs="stpp.ttml.im1i"']=function(){return new OC};
1409
1411
  of['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new OC};of['application/mp4; codecs="stpp.ttml.im2i"']=function(){return new OC};of['application/mp4; codecs="stpp.ttml.im2t"']=function(){return new OC};of['application/mp4; codecs="stpp.ttml.etd1"']=function(){return new OC};of['application/mp4; codecs="stpp.ttml.etd1|im1t"']=function(){return new OC};of['application/mp4; codecs="stpp.ttml.im1t|etd1"']=function(){return new OC};of['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new OC};function PC(){this.g="UNKNOWN"}PC.prototype.parseInit=function(){};PC.prototype.setSequenceMode=function(){};PC.prototype.setManifestType=function(a){this.g=a};
1410
1412
  PC.prototype.parseMedia=function(a,b){a=Ac(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new T(2,2,2E3);a=b.vttOffset;if("HLS"==this.g)if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new T(2,2,2E3);a=Qc(a[1]);if(null==a)throw new T(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,
1411
1413
  d+=8589934592;a=b.periodStart+d/9E4-a}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new Ic(e);var f=new Mb;Nc(e);Lc(e);for(var g=Nc(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),
1412
- h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Lc(e);g=Nc(e)}b.push(f)}d=new Map;Qd(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&
1413
- (g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Dd(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=
1414
- r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=$d;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Md;break;case "italic":m=!0;l.fontStyle=ae;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,
1415
- l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Ic(l[0]),g=Oc(h),n=Mc(h,/[ \t]+--\x3e[ \t]+/g),k=Oc(h),null==g||null==n||null==k)Za("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Dd(g,k,m);Lc(h);for(g=Nc(h);g;)QC(l,g,b),Lc(h),g=Nc(h);
1416
- Pd(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
1417
- function QC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Fd:a.textAlign=ce[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1418
- b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Ed);else if(d=/^region:(.*)$/.exec(b)){if(b=RC(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=ee[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Id,a.line=Number(c[1]),c[2]&&(a.lineAlign=ee[c[2].toUpperCase()])}
1414
+ h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Lc(e);g=Nc(e)}b.push(f)}d=new Map;Rd(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&
1415
+ (g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new Ed(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=
1416
+ r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=$d;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=Nd;break;case "italic":m=!0;l.fontStyle=ae;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,
1417
+ l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new Ic(l[0]),g=Oc(h),n=Mc(h,/[ \t]+--\x3e[ \t]+/g),k=Oc(h),null==g||null==n||null==k)Za("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new Ed(g,k,m);Lc(h);for(g=Nc(h);g;)QC(l,g,b),Lc(h),g=Nc(h);
1418
+ Qd(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
1419
+ function QC(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Gd:a.textAlign=ce[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==
1420
+ b||"end"==b?"line-right":"center"==b||"middle"==b?"center":Fd);else if(d=/^region:(.*)$/.exec(b)){if(b=RC(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=ee[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Jd,a.line=Number(c[1]),c[2]&&(a.lineAlign=ee[c[2].toUpperCase()])}
1419
1421
  function RC(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}S("shaka.text.VttTextParser",PC);PC.prototype.parseMedia=PC.prototype.parseMedia;PC.prototype.setManifestType=PC.prototype.setManifestType;PC.prototype.setSequenceMode=PC.prototype.setSequenceMode;PC.prototype.parseInit=PC.prototype.parseInit;of["text/vtt"]=function(){return new PC};of['text/vtt; codecs="vtt"']=function(){return new PC};of['text/vtt; codecs="wvtt"']=function(){return new PC};function SC(){this.g=null}SC.prototype.parseInit=function(a){var b=this,c=!1;(new Jh).box("moov",Oh).box("trak",Oh).box("mdia",Oh).S("mdhd",function(d){d=pj(d.reader,d.version);b.g=d.timescale}).box("minf",Oh).box("stbl",Oh).S("stsd",Qh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new T(2,2,2008);if(!c)throw new T(2,2,2008);};SC.prototype.setSequenceMode=function(){};SC.prototype.setManifestType=function(){};
1420
1422
  SC.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new T(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Jh).box("moof",Oh).box("traf",Oh).S("tfdt",function(B){g=!0;c=oj(B.reader,B.version).baseMediaDecodeTime}).S("tfhd",function(B){l=nj(B.reader,B.flags).cd}).S("trun",function(B){h=!0;d=qj(B.reader,B.version,B.flags).$g}).box("mdat",Th(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new T(2,2,2008);a=c;for(var m=new Gh(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1421
- p.value;var r=p.Nf||l,u=p.me?c+p.me:a;a=u+(r||0);var v=0;do{var w=m.P();v+=w;var z=m.P(),y=null;"vttc"==Nh(z)?8<w&&(y=m.wb(w-8)):m.skip(w-8);r&&y&&(w=TC(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(yf)};function TC(a,b,c){var d,e,f;(new Jh).box("payl",Th(function(g){d=Ac(g)})).box("iden",Th(function(g){e=Ac(g)})).box("sttg",Th(function(g){f=Ac(g)})).parse(a);return d?UC(d,e,f,b,c):null}
1422
- function UC(a,b,c,d,e){a=new Dd(d,e,a);Pd(a);b&&(a.id=b);if(c)for(b=new Ic(c),c=Nc(b);c;)QC(a,c,[]),Lc(b),c=Nc(b);return a}S("shaka.text.Mp4VttParser",SC);SC.prototype.parseMedia=SC.prototype.parseMedia;SC.prototype.setManifestType=SC.prototype.setManifestType;SC.prototype.setSequenceMode=SC.prototype.setSequenceMode;SC.prototype.parseInit=SC.prototype.parseInit;of['application/mp4; codecs="wvtt"']=function(){return new SC};function VC(){}VC.prototype.parseInit=function(){};VC.prototype.setSequenceMode=function(){};VC.prototype.setManifestType=function(){};VC.prototype.parseMedia=function(a){var b=Ac(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Ic(c[0]),e=Oc(d),f=Mc(d,/,/g);d=Oc(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Dd(e,d,c.slice(1).join("\n").trim()))}return a};
1423
- S("shaka.text.SbvTextParser",VC);VC.prototype.parseMedia=VC.prototype.parseMedia;VC.prototype.setManifestType=VC.prototype.setManifestType;VC.prototype.setSequenceMode=VC.prototype.setSequenceMode;VC.prototype.parseInit=VC.prototype.parseInit;of["text/x-subviewer"]=function(){return new VC};function WC(){this.g=new PC}WC.prototype.parseInit=function(){};WC.prototype.setSequenceMode=function(){};WC.prototype.setManifestType=function(){};WC.prototype.parseMedia=function(a,b,c){a=Ac(a);a=XC(a);a=xb(Ec(a));return this.g.parseMedia(a,b,c,[])};
1423
+ p.value;var r=p.Lf||l,u=p.me?c+p.me:a;a=u+(r||0);var v=0;do{var w=m.P();v+=w;var z=m.P(),y=null;"vttc"==Nh(z)?8<w&&(y=m.wb(w-8)):m.skip(w-8);r&&y&&(w=TC(y,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(yf)};function TC(a,b,c){var d,e,f;(new Jh).box("payl",Th(function(g){d=Ac(g)})).box("iden",Th(function(g){e=Ac(g)})).box("sttg",Th(function(g){f=Ac(g)})).parse(a);return d?UC(d,e,f,b,c):null}
1424
+ function UC(a,b,c,d,e){a=new Ed(d,e,a);Qd(a);b&&(a.id=b);if(c)for(b=new Ic(c),c=Nc(b);c;)QC(a,c,[]),Lc(b),c=Nc(b);return a}S("shaka.text.Mp4VttParser",SC);SC.prototype.parseMedia=SC.prototype.parseMedia;SC.prototype.setManifestType=SC.prototype.setManifestType;SC.prototype.setSequenceMode=SC.prototype.setSequenceMode;SC.prototype.parseInit=SC.prototype.parseInit;of['application/mp4; codecs="wvtt"']=function(){return new SC};function VC(){}VC.prototype.parseInit=function(){};VC.prototype.setSequenceMode=function(){};VC.prototype.setManifestType=function(){};VC.prototype.parseMedia=function(a){var b=Ac(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Ic(c[0]),e=Oc(d),f=Mc(d,/,/g);d=Oc(d);if(null==e||null==f||null==d)throw new T(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new Ed(e,d,c.slice(1).join("\n").trim()))}return a};
1425
+ S("shaka.text.SbvTextParser",VC);VC.prototype.parseMedia=VC.prototype.parseMedia;VC.prototype.setManifestType=VC.prototype.setManifestType;VC.prototype.setSequenceMode=VC.prototype.setSequenceMode;VC.prototype.parseInit=VC.prototype.parseInit;of["text/x-subviewer"]=function(){return new VC};function WC(){this.g=new PC}WC.prototype.parseInit=function(){};WC.prototype.setSequenceMode=function(){};WC.prototype.setManifestType=function(){};WC.prototype.parseMedia=function(a,b,c){a=Ac(a);a=XC(a);a=yb(Ec(a));return this.g.parseMedia(a,b,c,[])};
1424
1426
  function XC(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",WC);WC.srt2webvtt=XC;WC.prototype.parseMedia=WC.prototype.parseMedia;
1425
1427
  WC.prototype.setManifestType=WC.prototype.setManifestType;WC.prototype.setSequenceMode=WC.prototype.setSequenceMode;WC.prototype.parseInit=WC.prototype.parseInit;of["text/srt"]=function(){return new WC};function YC(){}YC.prototype.parseInit=function(){};YC.prototype.setSequenceMode=function(){};YC.prototype.setManifestType=function(){};
1426
1428
  YC.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Ac(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=ZC.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=$C.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(aD);else if("Style"==a){a=f.split(aD);f={};for(var g=0;g<e.length&&
1427
- g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={nh:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=$C.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(aD);else if("Dialogue"==f){g=g.split(aD);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=bD(f.Start);var k=bD(f.End);g=new Dd(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.nh=f.Style;(a=d.find(function(l){return function(m){return m.Name==
1429
+ g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={nh:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=$C.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(aD);else if("Dialogue"==f){g=g.split(aD);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=bD(f.Start);var k=bD(f.End);g=new Ed(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.nh=f.Style;(a=d.find(function(l){return function(m){return m.Name==
1428
1430
  l.nh}}(a)))&&cD(g,a);e.push(g)}return e};
1429
- function cD(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=dD(c))a.color=c;if(c=b.BackColour)if(c=dD(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=$d);b.Italic&&(a.fontStyle=ae);b.Underline&&a.textDecoration.push(be);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Kd;a.textAlign="start";break;case 2:a.displayAlign=Kd;a.textAlign=Fd;break;case 3:a.displayAlign=Kd;a.textAlign="end";break;case 5:a.displayAlign=
1430
- "before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Fd;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Fd;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function dD(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
1431
+ function cD(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=dD(c))a.color=c;if(c=b.BackColour)if(c=dD(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=$d);b.Italic&&(a.fontStyle=ae);b.Underline&&a.textDecoration.push(be);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=Ld;a.textAlign="start";break;case 2:a.displayAlign=Ld;a.textAlign=Gd;break;case 3:a.displayAlign=Ld;a.textAlign="end";break;case 5:a.displayAlign=
1432
+ "before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=Gd;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=Gd;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function dD(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}
1431
1433
  function bD(a){a=eD.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",YC);YC.prototype.parseMedia=YC.prototype.parseMedia;YC.prototype.setManifestType=YC.prototype.setManifestType;YC.prototype.setSequenceMode=YC.prototype.setSequenceMode;YC.prototype.parseInit=YC.prototype.parseInit;var ZC=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,$C=/^\s*([^:]+):\s*(.*)/,aD=/\s*,\s*/,eD=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
1432
1434
  of["text/x-ssa"]=function(){return new YC};function fD(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{kd:c,ca:a}:null}function gD(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
1433
1435
  function hD(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
1434
1436
  function iD(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)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(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
1435
1437
  2,0,178,0,32,8,224]);break;default:if(1===b)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(2===b||3===b)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 jD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=jD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(kf(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.j};
1436
- q.transmux=function(a,b,c,d){for(var e=xb(a),f=mj(e),g=f.length;g<e.length&&!hD(e,g);g++);a=1E3*c.endTime;f=lj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=gD(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=fD(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));var l=k.kd+k.ca;g+l<=e.length&&h.push({data:e.subarray(g+
1438
+ q.transmux=function(a,b,c,d){for(var e=yb(a),f=mj(e),g=f.length;g<e.length&&!hD(e,g);g++);a=1E3*c.endTime;f=lj(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=gD(e,g);if(!f)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=fD(e,g);if(!k)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));var l=k.kd+k.ca;g+l<=e.length&&h.push({data:e.subarray(g+
1437
1439
  k.kd,g+l),size:k.ca,duration:1024,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,gb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.h,baseMediaDecodeTime:a,cb:h},stream:b};d=new Cx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ix(d),this.g.set(c,b));c=this.i!==b;d=Zx(d);this.i=b;this.h++;return c?(b=Ne(b,d),Promise.resolve(b)):
1438
1440
  Promise.resolve(d)};S("shaka.transmuxer.AacTransmuxer",jD);jD.prototype.transmux=jD.prototype.transmux;jD.prototype.getOriginalMimeType=jD.prototype.getOriginalMimeType;jD.prototype.convertCodecs=jD.prototype.convertCodecs;jD.prototype.isSupported=jD.prototype.isSupported;jD.prototype.destroy=jD.prototype.destroy;he("audio/aac",function(){return new jD("audio/aac")},ne);function kD(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=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,
1439
1441
  1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,pa:a,ca:e}}
1440
1442
  function lD(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function mD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=mD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.j};
1441
- q.transmux=function(a,b,c,d){a=xb(a);for(var e=mj(a),f=e.length;f<a.length&&!lD(a,f);f++);var g=1E3*c.endTime;e=lj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=kD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),size:l.ca,duration:1536,
1443
+ q.transmux=function(a,b,c,d){a=yb(a);for(var e=mj(a),f=e.length;f<a.length&&!lD(a,f);f++);var g=1E3*c.endTime;e=lj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=kD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),size:l.ca,duration:1536,
1442
1444
  Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.ca}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,gb:[],pa:h,ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.h,baseMediaDecodeTime:a,cb:k},stream:b};d=new Cx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ix(d),this.g.set(c,b));c=this.i!==b;d=Zx(d);this.i=b;this.h++;return c?(b=Ne(b,d),Promise.resolve(b)):Promise.resolve(d)};S("shaka.transmuxer.Ac3Transmuxer",mD);
1443
1445
  mD.prototype.transmux=mD.prototype.transmux;mD.prototype.getOriginalMimeType=mD.prototype.getOriginalMimeType;mD.prototype.convertCodecs=mD.prototype.convertCodecs;mD.prototype.isSupported=mD.prototype.isSupported;mD.prototype.destroy=mD.prototype.destroy;he("audio/ac3",function(){return new mD("audio/ac3")},ne);function nD(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new wj(a.subarray(b+2));yj(c,2);yj(c,3);var d=zj(c,11)+1<<1,e=zj(c,2);if(3==e){e=zj(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=zj(c,2);var g=zj(c,3),h=zj(c,1);c=zj(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,pa:a,ca:d}};function oD(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=oD.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.j};
1444
- q.transmux=function(a,b,c,d){a=xb(a);for(var e=mj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=lj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=nD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),
1446
+ q.transmux=function(a,b,c,d){a=yb(a);for(var e=mj(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=lj(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=nD(a,f);if(!l)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.pa;k.push({data:a.subarray(f,f+l.ca),
1445
1447
  size:l.ca,duration:1536,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=l.ca}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,gb:[],pa:h,ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.h,baseMediaDecodeTime:a,cb:k},stream:b};d=new Cx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ix(d),this.g.set(c,b));c=this.i!==b;d=Zx(d);this.i=b;this.h++;return c?(b=Ne(b,d),Promise.resolve(b)):Promise.resolve(d)};
1446
1448
  S("shaka.transmuxer.Ec3Transmuxer",oD);oD.prototype.transmux=oD.prototype.transmux;oD.prototype.getOriginalMimeType=oD.prototype.getOriginalMimeType;oD.prototype.convertCodecs=oD.prototype.convertCodecs;oD.prototype.isSupported=oD.prototype.isSupported;oD.prototype.destroy=oD.prototype.destroy;he("audio/ec3",function(){return new oD("audio/ec3")},ne);function pD(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new wj(b.data),d=Ej(c);Ej(c);Ej(c);Bj(c);if(qD.includes(d)&&(d=X(c),3===d&&yj(c,1),Bj(c),Bj(c),yj(c,1),Dj(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Dj(c)&&(6>e?Fj(c,16):Fj(c,64))}Bj(c);d=X(c);if(0===d)X(c);else if(1===d)for(yj(c,1),Bj(c),Bj(c),d=X(c),e=0;e<d;e++)Bj(c);Bj(c);yj(c,1);var f=X(c),g=X(c),h=zj(c,1);0===h&&yj(c,1);yj(c,1);var k=0,l=0,m=0,n=0;
1447
1449
  Dj(c)&&(k=X(c),l=X(c),m=X(c),n=X(c));e=d=1;if(Dj(c)&&Dj(c)){var p=Ej(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=zj(c,16),e=zj(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,x(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,x(a));a=new Uint8Array([1,k[3],k[4],
1448
1450
  k[5],255,225].concat(k,[1],b));return{height:c,width:f,ya:a,Ba:d,Ca:e}}
1449
1451
  function rD(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],v=t(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var z=w.fullData.byteLength,y=new Uint8Array(4);y[0]=z>>24&255;y[1]=z>>16&255;y[2]=z>>8&255;y[3]=z&255;u.push(y);u.push(w.fullData)}e.data=Ne.apply(He,x(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=t(h.nalus);for(var m=
1450
- k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var p=!1;n=!0;var r=m.data;l&&4<r.length&&(r=Oj(new wj(r)),2===r||4===r||7===r||9===r)&&(p=!0);p&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=p;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
1451
- return d}var qD=[100,110,122,244,44,83,86,118,128,138,139,134];function sD(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=tD(b.fullData);a=uD(c.fullData);var f=vD(d.fullData);b=wD(b.fullData,c.fullData,d.fullData,{Af:e.Af,Yf:e.Yf,ef:a.ef,ff:a.ff,Ze:a.Ze,df:a.df,$e:a.$e,af:a.af,bf:a.bf,cf:a.cf,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Xe:a.Xe,Ye:a.Ye,Me:a.Me,Yd:a.Yd,Ke:a.Ke,Je:a.Je,Ie:a.Ie,Df:f.Df});return{height:a.height,width:a.width,
1452
- ya:b,Ba:a.Wi,Ca:a.Vi}}function tD(a){var b=new wj(a,!0);Ej(b);Ej(b);zj(b,4);zj(b,2);zj(b,6);a=zj(b,3);b=Dj(b);return{Af:a+1,Yf:b}}
1452
+ k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var p=!1;n=!0;var r=m.data;l&&4<r.length&&(r=Gj(new wj(r)),2===r||4===r||7===r||9===r)&&(p=!0);p&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=p;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
1453
+ return d}var qD=[100,110,122,244,44,83,86,118,128,138,139,134];function sD(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=tD(b.fullData);a=uD(c.fullData);var f=vD(d.fullData);b=wD(b.fullData,c.fullData,d.fullData,{zf:e.zf,Wf:e.Wf,ef:a.ef,ff:a.ff,Ze:a.Ze,df:a.df,$e:a.$e,af:a.af,bf:a.bf,cf:a.cf,Te:a.Te,Ue:a.Ue,Ve:a.Ve,We:a.We,Xe:a.Xe,Ye:a.Ye,Me:a.Me,Yd:a.Yd,Ke:a.Ke,Je:a.Je,Ie:a.Ie,Cf:f.Cf});return{height:a.height,width:a.width,
1454
+ ya:b,Ba:a.Wi,Ca:a.Vi}}function tD(a){var b=new wj(a,!0);Ej(b);Ej(b);zj(b,4);zj(b,2);zj(b,6);a=zj(b,3);b=Dj(b);return{zf:a+1,Wf:b}}
1453
1455
  function uD(a){a=new wj(a,!0);Ej(a);Ej(a);var b=0,c=0,d=0,e=0;zj(a,4);var f=zj(a,3);Dj(a);for(var g=zj(a,2),h=zj(a,1),k=zj(a,5),l=Ej(a),m=Ej(a),n=Ej(a),p=Ej(a),r=Ej(a),u=Ej(a),v=Ej(a),w=Ej(a),z=Ej(a),y=Ej(a),B=Ej(a),C=[],E=[],H=0;H<f;H++)C.push(Dj(a)),E.push(Dj(a));if(0<f)for(H=f;8>H;H++)zj(a,2);for(H=0;H<f;H++)C[H]&&zj(a,88),E[H]&&Ej(a);X(a);C=X(a);3==C&&zj(a,1);E=X(a);H=X(a);Dj(a)&&(b+=X(a),c+=X(a),d+=X(a),e+=X(a));var A=X(a),D=X(a),F=X(a);if(Dj(a))for(var J=0;J<=f;J++)X(a),X(a),X(a);else X(a),
1454
1456
  X(a),X(a);X(a);X(a);X(a);X(a);X(a);X(a);if(Dj(a)&&Dj(a))for(J=0;4>J;J++)for(var L=0;L<(3===J?2:6);L++)if(Dj(a)){var K=Math.min(64,1<<4+(J<<1));1<J&&Cj(a);for(var O=0;O<K;O++)Cj(a)}else X(a);Dj(a);Dj(a);Dj(a)&&(Ej(a),X(a),X(a),Dj(a));J=X(a);for(K=L=0;K<J;K++)if(O=!1,0!==K&&(O=Dj(a)),O){K===J&&X(a);Dj(a);X(a);for(var M=O=0;M<=L;M++){var N=Dj(a),R=!1;N||(R=Dj(a));(N||R)&&O++}L=O}else{M=X(a);O=X(a);L=M+O;for(N=0;N<M;N++)X(a),Dj(a);for(M=0;M<O;M++)X(a),Dj(a)}if(Dj(a))for(J=X(a),L=0;L<J;L++){for(K=0;K<
1455
1457
  F+4;K++)zj(a,1);zj(a,1)}J=F=1;L=0;Dj(a);Dj(a);if(Dj(a)){Dj(a)&&(K=Ej(a),O=[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<K&&16>=K?(F=O[K-1],J=M[K-1]):255===K&&(F=zj(a,16),J=zj(a,16)));Dj(a)&&Dj(a);Dj(a)&&(zj(a,3),Dj(a),Dj(a)&&(Ej(a),Ej(a),Ej(a)));Dj(a)&&(X(a),X(a));Dj(a);Dj(a);Dj(a);if(K=Dj(a))X(a),X(a),X(a),X(a);if(Dj(a)&&(zj(a,32),zj(a,32),Dj(a)&&X(a),Dj(a))){M=!1;K=Dj(a);O=Dj(a);if(K||O){if(M=Dj(a))Ej(a),zj(a,5),Dj(a),zj(a,5);zj(a,4);zj(a,4);M&&
1456
- zj(a,4);zj(a,5);zj(a,5);zj(a,5)}for(N=0;N<=f;N++){var Q=!0;R=1;Dj(a)||(Q=Dj(a));var U=!1;Q?X(a):U=Dj(a);U||(R=X(a)+1);if(K){for(Q=0;Q<R;Q++)X(a),X(a),M&&(X(a),X(a));Dj(a)}if(O){for(Q=0;Q<R;Q++)X(a),X(a),M&&(X(a),X(a));Dj(a)}}}Dj(a)&&(Dj(a),Dj(a),Dj(a),L=X(a),X(a),X(a),X(a),X(a))}return{Ze:B,ef:g,ff:h,df:k,$e:l,af:m,bf:n,cf:p,Te:r,Ue:u,Ve:v,We:w,Xe:z,Ye:y,Yd:L,Me:0,Ke:C,Je:A,Ie:D,width:E-(b+c)*(1===C||2===C?2:1),height:H-(d+e)*(1===C?2:1),Wi:F,Vi:J}}
1457
- function vD(a){var b=new wj(a,!0);Ej(b);Ej(b);X(b);X(b);Dj(b);Dj(b);zj(b,3);Dj(b);Dj(b);X(b);X(b);Cj(b);Dj(b);Dj(b);Dj(b)&&X(b);Cj(b);Cj(b);Dj(b);Dj(b);Dj(b);Dj(b);a=Dj(b);b=Dj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Df:c}}
1458
- function wD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ef&3)<<6|(d.ff?1:0)<<5|d.df&31;e[2]=d.$e;e[3]=d.af;e[4]=d.bf;e[5]=d.cf;e[6]=d.Te;e[7]=d.Ue;e[8]=d.Ve;e[9]=d.We;e[10]=d.Xe;e[11]=d.Ye;e[12]=d.Ze;e[13]=240|(d.Yd&3840)>>8;e[14]=d.Yd&255;e[15]=252|d.Df&3;e[16]=252|d.Ke&3;e[17]=248|d.Je&7;e[18]=248|d.Ie&7;e[19]=0;e[20]=0;e[21]=(d.Me&3)<<6|(d.Af&7)<<3|(d.Yf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1458
+ zj(a,4);zj(a,5);zj(a,5);zj(a,5)}for(N=0;N<=f;N++){var Q=!0;R=1;Dj(a)||(Q=Dj(a));var V=!1;Q?X(a):V=Dj(a);V||(R=X(a)+1);if(K){for(Q=0;Q<R;Q++)X(a),X(a),M&&(X(a),X(a));Dj(a)}if(O){for(Q=0;Q<R;Q++)X(a),X(a),M&&(X(a),X(a));Dj(a)}}}Dj(a)&&(Dj(a),Dj(a),Dj(a),L=X(a),X(a),X(a),X(a),X(a))}return{Ze:B,ef:g,ff:h,df:k,$e:l,af:m,bf:n,cf:p,Te:r,Ue:u,Ve:v,We:w,Xe:z,Ye:y,Yd:L,Me:0,Ke:C,Je:A,Ie:D,width:E-(b+c)*(1===C||2===C?2:1),height:H-(d+e)*(1===C?2:1),Wi:F,Vi:J}}
1459
+ function vD(a){var b=new wj(a,!0);Ej(b);Ej(b);X(b);X(b);Dj(b);Dj(b);zj(b,3);Dj(b);Dj(b);X(b);X(b);Cj(b);Dj(b);Dj(b);Dj(b)&&X(b);Cj(b);Cj(b);Dj(b);Dj(b);Dj(b);Dj(b);a=Dj(b);b=Dj(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Cf:c}}
1460
+ function wD(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.ef&3)<<6|(d.ff?1:0)<<5|d.df&31;e[2]=d.$e;e[3]=d.af;e[4]=d.bf;e[5]=d.cf;e[6]=d.Te;e[7]=d.Ue;e[8]=d.Ve;e[9]=d.We;e[10]=d.Xe;e[11]=d.Ye;e[12]=d.Ze;e[13]=240|(d.Yd&3840)>>8;e[14]=d.Yd&255;e[15]=252|d.Cf&3;e[16]=252|d.Ke&3;e[17]=248|d.Je&7;e[18]=248|d.Ie&7;e[19]=0;e[20]=0;e[21]=(d.Me&3)<<6|(d.zf&7)<<3|(d.Wf?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
1459
1461
  255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function xD(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*yD[14*(3===c?3-d:3===d?3:4)+e-1];f=zD[3*(3===c?0:2===c?1:2)+f];c=AD[c][d];var h=BD[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,ca:k,Ui:8*c*h}}return null}
1460
1462
  function CD(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function DD(a,b){if(b+1<a.length&&CD(a,b)){var c=xD(a,b),d=4;c&&c.ca&&(d=c.ca);b+=d;return b===a.length||b+1<a.length&&CD(a,b)}return!1}
1461
1463
  var yD=[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],zD=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],AD=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BD=[0,1,1,4];function ED(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=ED.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?lb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.j};
1462
- q.transmux=function(a,b,c,d){for(var e=xb(a),f=mj(e).length;f<e.length&&!DD(e,f);f++);var g;for(a=[];f<e.length;){var h=xD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));g||(g=h);f+h.ca<=e.length&&a.push({data:e.subarray(f,f+h.ca),size:h.ca,duration:1152,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=h.ca}if(!g)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));e=9E4*g.Ui/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1464
+ q.transmux=function(a,b,c,d){for(var e=yb(a),f=mj(e).length;f<e.length&&!DD(e,f);f++);var g;for(a=[];f<e.length;){var h=xD(e,f);if(!h)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));g||(g=h);f+h.ca<=e.length&&a.push({data:e.subarray(f,f+h.ca),size:h.ca,duration:1152,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});f+=h.ca}if(!g)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));e=9E4*g.Ui/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
1463
1465
  duration:d,gb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.h,baseMediaDecodeTime:e,cb:a},stream:b};d=new Cx([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=Ix(d),this.g.set(c,b));c=this.i!==b;d=Zx(d);this.i=b;this.h++;return c?(b=Ne(b,d),Promise.resolve(b)):Promise.resolve(d)};S("shaka.transmuxer.Mp3Transmuxer",ED);ED.prototype.transmux=ED.prototype.transmux;ED.prototype.getOriginalMimeType=ED.prototype.getOriginalMimeType;ED.prototype.convertCodecs=ED.prototype.convertCodecs;
1464
1466
  ED.prototype.isSupported=ED.prototype.isSupported;ED.prototype.destroy=ED.prototype.destroy;he("audio/mpeg",function(){return new ED("audio/mpeg")},ne);function FD(a){this.h=a;this.g=null}q=FD.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=kf(a).split(","),c=Se("audio",b);b=Se("video",b);return!c||b||"mp3"!=ff(c)?!1:lb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
1465
- q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Pj;a=xb(a);a=this.g.parse(a);if("mp3"!=a.dd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));c=new Uint8Array([]);e=t(a.$a());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=xD(a,b))?(b+d.ca<=a.length&&(c=Ne(c,a.subarray(b,b+d.ca))),b+=d.ca):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",FD);FD.prototype.transmux=FD.prototype.transmux;
1467
+ q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Pj;a=yb(a);a=this.g.parse(a);if("mp3"!=a.dd().audio||"audio"!=e)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));c=new Uint8Array([]);e=t(a.$a());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=xD(a,b))?(b+d.ca<=a.length&&(c=Ne(c,a.subarray(b,b+d.ca))),b+=d.ca):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",FD);FD.prototype.transmux=FD.prototype.transmux;
1466
1468
  FD.prototype.getOriginalMimeType=FD.prototype.getOriginalMimeType;FD.prototype.convertCodecs=FD.prototype.convertCodecs;FD.prototype.isSupported=FD.prototype.isSupported;FD.prototype.destroy=FD.prototype.destroy;he("video/mp2t",function(){return new FD("video/mp2t")},me);/*
1467
1469
  @license
1468
1470
  MSS Transmuxer
@@ -1474,29 +1476,29 @@ function HD(a){function b(){this._procFullBox();this.flags&1&&(this._procField("
1474
1476
  "uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.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",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
1475
1477
  "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==ID[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=GD.prototype;q.destroy=function(){};
1476
1478
  q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
1477
- q.transmux=function(a,b,c){if(!c)return Promise.resolve(xb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.N()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
1479
+ q.transmux=function(a,b,c){if(!c)return Promise.resolve(yb(a));if(!b.mssPrivateData)return Promise.reject(new T(2,3,3020,c?c.N()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
1478
1480
  m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
1479
- 8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=JD(u,"traf")+JD(h,"senc")+16);var w=xb(e.write());return Promise.resolve(w)}catch(z){return z instanceof T?Promise.reject(z):Promise.reject(new T(2,3,3022,c?c.N()[0]:null))}};function JD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",GD);GD.prototype.transmux=GD.prototype.transmux;
1481
+ 8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=JD(u,"traf")+JD(h,"senc")+16);var w=yb(e.write());return Promise.resolve(w)}catch(z){return z instanceof T?Promise.reject(z):Promise.reject(new T(2,3,3022,c?c.N()[0]:null))}};function JD(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",GD);GD.prototype.transmux=GD.prototype.transmux;
1480
1482
  GD.prototype.getOriginalMimeType=GD.prototype.getOriginalMimeType;GD.prototype.convertCodecs=GD.prototype.convertCodecs;GD.prototype.isSupported=GD.prototype.isSupported;GD.prototype.destroy=GD.prototype.destroy;var ID=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);he("mss/audio/mp4",function(){return new GD("mss/audio/mp4")},ne);he("mss/video/mp4",function(){return new GD("mss/video/mp4")},ne);function KD(a){this.m=a;this.g=0;this.i=new Map;this.l=this.h=this.j=null}q=KD.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
1481
1483
  q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=kf(c).split(",");c=Se("audio",d);d=Se("video",d);if(c&&(c=ff(c),!LD.includes(c))||d&&(c=ff(d),!MD.includes(c)))return!1;if(b)return lb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return lb(b)||lb(a)};
1482
1484
  q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=kf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return eg(c,"audio/mp4")}).map(fg).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.m};
1483
- q.transmux=function(a,b,c,d,e){var f=xb(a);if("audio"==e&&!Xj(f)){for(var g=mj(f),h=g.length;h<f.length;h++)if(DD(f,h))return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));for(h=g.length;h<f.length;h++)if(hD(f,h))return this.h||(this.h=new jD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.N()[0]:null))}this.j?this.j.clearData():this.j=new Pj;var k=this.j.parse(f),l=[],m=k.dd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=k.rc(),v=
1485
+ q.transmux=function(a,b,c,d,e){var f=yb(a);if("audio"==e&&!Xj(f)){for(var g=mj(f),h=g.length;h<f.length;h++)if(DD(f,h))return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));for(h=g.length;h<f.length;h++)if(hD(f,h))return this.h||(this.h=new jD("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new T(2,3,3018,c?c.N()[0]:null))}this.j?this.j.clearData():this.j=new Pj;var k=this.j.parse(f),l=[],m=k.dd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=k.rc(),v=
1484
1486
  rD(u);if(!v.length)throw new T(2,3,3023,c?c.N()[0]:null);for(var w=0;w<v.length;w++){var z=v[w];null==r&&(r=z.dts);var y=void 0;y=w+1<v.length?(v[w+1].dts||0)-(z.dts||0):1<v.length?(z.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:z.data,size:z.data.byteLength,duration:y,Za:Math.round((z.pts||0)-(z.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:z.isKeyframe?2:1,bb:z.isKeyframe?0:1}})}for(var B=[],C=t(u),E=C.next();!E.done;E=C.next())B.push.apply(B,x(E.value.nalus));var H=pD(B);if(!H||null==
1485
- r)throw new T(2,3,3018,c?c.N()[0]:null);b.height=H.height;b.width=H.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,gb:[],pa:new Uint8Array([]),ya:H.ya,Ba:H.Ba,Ca:H.Ca,data:{xb:this.g,baseMediaDecodeTime:r,cb:p},stream:b};break;case "hvc":var A=[],D=null,F=[],J=k.rc();if(!J.length)throw new T(2,3,3023,c?c.N()[0]:null);for(var L=0;L<J.length;L++){var K=J[L],O=K.nalus;F.push.apply(F,x(O));for(var M=!1,N=[],R=!1,Q=t(O),U=Q.next();!U.done;U=
1486
- Q.next()){var da=U.value;switch(da.type){case 1:case 0:var V=R=!0;break;case 19:case 20:case 21:M=V=R=!0;break;case 32:V=!0;break;case 33:V=!0;break;case 34:V=!0;break;case 35:R=V=!0;break;case 39:case 40:V=!0;break;default:V=!1}if(R&&V){var ea=da.fullData.byteLength,Ia=new Uint8Array(4);Ia[0]=ea>>24&255;Ia[1]=ea>>16&255;Ia[2]=ea>>8&255;Ia[3]=ea&255;N.push(Ia);N.push(da.fullData)}}var Ca=N.length?{data:Ne.apply(He,x(N)),isKeyframe:M}:null;if(Ca){null==D&&null!=K.dts&&(D=K.dts);var db=void 0;db=L+
1487
+ r)throw new T(2,3,3018,c?c.N()[0]:null);b.height=H.height;b.width=H.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,gb:[],pa:new Uint8Array([]),ya:H.ya,Ba:H.Ba,Ca:H.Ca,data:{xb:this.g,baseMediaDecodeTime:r,cb:p},stream:b};break;case "hvc":var A=[],D=null,F=[],J=k.rc();if(!J.length)throw new T(2,3,3023,c?c.N()[0]:null);for(var L=0;L<J.length;L++){var K=J[L],O=K.nalus;F.push.apply(F,x(O));for(var M=!1,N=[],R=!1,Q=t(O),V=Q.next();!V.done;V=
1488
+ Q.next()){var da=V.value;switch(da.type){case 1:case 0:var U=R=!0;break;case 19:case 20:case 21:M=U=R=!0;break;case 32:U=!0;break;case 33:U=!0;break;case 34:U=!0;break;case 35:R=U=!0;break;case 39:case 40:U=!0;break;default:U=!1}if(R&&U){var ea=da.fullData.byteLength,Ia=new Uint8Array(4);Ia[0]=ea>>24&255;Ia[1]=ea>>16&255;Ia[2]=ea>>8&255;Ia[3]=ea&255;N.push(Ia);N.push(da.fullData)}}var Ca=N.length?{data:Ne.apply(He,x(N)),isKeyframe:M}:null;if(Ca){null==D&&null!=K.dts&&(D=K.dts);var db=void 0;db=L+
1487
1489
  1<J.length?(J[L+1].dts||0)-(K.dts||0):1<J.length?(K.dts||0)-(J[L-1].dts||0):9E4*(c.endTime-c.startTime);A.push({data:Ca.data,size:Ca.data.byteLength,duration:db,Za:Math.round((K.pts||0)-(K.dts||0)),flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:Ca.isKeyframe?2:1,bb:Ca.isKeyframe?0:1}})}}var Wa=sD(F);if(!Wa||null==D)throw new T(2,3,3018,c?c.N()[0]:null);b.height=Wa.height;b.width=Wa.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,gb:[],pa:new Uint8Array([]),
1488
- ya:Wa.ya,Ba:Wa.Ba,Ca:Wa.Ca,data:{xb:this.g,baseMediaDecodeTime:D,cb:A},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var za=[],Na,yb=null,Ya=null,zb=null,Rd=t(k.$a()),Kb=Rd.next();!Kb.done;Kb=Rd.next()){var bd=Kb.value,Lb=bd.data;if(Lb){var Ab=0;if(-1==Ya&&zb)Lb=Ne(zb,bd.data),Ya=null;else if(null!=Ya&&zb){Ab=Math.max(0,Ya);var Rg=Ne(zb,Lb.subarray(0,Ab));za.push({data:Rg,size:Rg.byteLength,duration:1024,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Ya=zb=null}Na=gD(Lb,
1489
- Ab);if(!Na)throw new T(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=Na.sampleRate;b.channelsCount=Na.channelCount;null==yb&&null!==bd.pts&&(yb=bd.pts);for(;Ab<Lb.length;){var Jc=fD(Lb,Ab);if(!Jc){zb=Lb.subarray(Ab,Lb.length);Ya=-1;break}var re=Jc.kd+Jc.ca;Ya=Math.max(0,Ab+re-Lb.length);0!=Ya?zb=Lb.subarray(Ab+Jc.kd,Ab+re):Ab+re<=Lb.length&&za.push({data:Lb.subarray(Ab+Jc.kd,Ab+re),size:Jc.ca,duration:1024,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Ab+=re}}}if(!Na||null==yb){if(!k.rc().length)throw new T(2,
1490
- 3,3018,c?c.N()[0]:null);yb=9E4*c.startTime;var tf=Se("audio",b.codecs.split(","));if(!tf||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.N()[0]:null);Na={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:tf};var uf=iD(tf,b.channelsCount);if(!uf)throw new T(2,3,3018,c?c.N()[0]:null);for(var Zi=yb+9E4*(c.endTime-c.startTime),Kc=yb;Kc<Zi;)za.push({data:uf,size:uf.byteLength,duration:1024,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Kc+=1024/Na.sampleRate*9E4}var dv=Na.sampleRate,
1491
- eE=yb/9E4*dv;n={id:b.id,type:"audio",codecs:Na.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:dv,duration:d,gb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:eE,cb:za},stream:b};break;case "ac3":for(var ev=[],Gj=0,un=new Uint8Array([]),Hj=null,fv=t(k.$a()),vn=fv.next();!vn.done;vn=fv.next()){var wn=vn.value,xn=wn.data;null==Hj&&null!==wn.pts&&(Hj=wn.pts);for(var Df=0;Df<xn.length;){var Ud=kD(xn,Df);Ud?(b.audioSamplingRate=Ud.sampleRate,b.channelsCount=
1492
- Ud.channelCount,Gj=Ud.sampleRate,un=Ud.pa,ev.push({data:xn.subarray(Df,Df+Ud.ca),size:Ud.ca,duration:1536,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Df+=Ud.ca):Df++}}if(0==Gj||0==un.byteLength||null==Hj)throw new T(2,3,3018,c?c.N()[0]:null);var fE=Hj/9E4*Gj;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Gj,duration:d,gb:[],pa:un,ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:fE,cb:ev},stream:b};break;case "ec3":for(var gv=[],Ij=0,
1493
- yn=new Uint8Array([]),Jj=null,hv=t(k.$a()),zn=hv.next();!zn.done;zn=hv.next()){var An=zn.value,Bn=An.data;null==Jj&&null!==An.pts&&(Jj=An.pts);for(var Ef=0;Ef<Bn.length;){var Vd=nD(Bn,Ef);Vd?(b.audioSamplingRate=Vd.sampleRate,b.channelsCount=Vd.channelCount,Ij=Vd.sampleRate,yn=Vd.pa,gv.push({data:Bn.subarray(Ef,Ef+Vd.ca),size:Vd.ca,duration:1536,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Ef+=Vd.ca):Ef++}}if(0==Ij||0==yn.byteLength||null==Jj)throw new T(2,3,3018,c?c.N()[0]:null);var gE=Jj/9E4*Ij;
1494
- n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ij,duration:d,gb:[],pa:yn,ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:gE,cb:gv},stream:b};break;case "mp3":for(var iv=[],Kj,Lj=null,jv=t(k.$a()),Cn=jv.next();!Cn.done;Cn=jv.next()){var Dn=Cn.value,ch=Dn.data;if(ch){null==Lj&&null!==Dn.pts&&(Lj=Dn.pts);for(var ue=0;ue<ch.length;){var Ff=xD(ch,ue);Ff?(Kj||(Kj=Ff),ue+Ff.ca<=ch.length&&iv.push({data:ch.subarray(ue,ue+Ff.ca),size:Ff.ca,duration:1152,
1495
- Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),ue+=Ff.ca):ue++}}}if(!Kj||null==Lj)throw new T(2,3,3018,c?c.N()[0]:null);var kv=Kj.sampleRate,hE=Lj/9E4*kv;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:kv,duration:d,gb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:hE,cb:iv},stream:b};break;case "opus":var lv=[],Mj=null,dd=k.F;if(!dd)throw new T(2,3,3018,c?c.N()[0]:null);var Gb=[];switch(dd.Hh){case 1:case 2:Gb=
1490
+ ya:Wa.ya,Ba:Wa.Ba,Ca:Wa.Ca,data:{xb:this.g,baseMediaDecodeTime:D,cb:A},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var za=[],Pa,Db=null,Xa=null,rb=null,Bd=t(k.$a()),Kb=Bd.next();!Kb.done;Kb=Bd.next()){var bd=Kb.value,Lb=bd.data;if(Lb){var zb=0;if(-1==Xa&&rb)Lb=Ne(rb,bd.data),Xa=null;else if(null!=Xa&&rb){zb=Math.max(0,Xa);var Sg=Ne(rb,Lb.subarray(0,zb));za.push({data:Sg,size:Sg.byteLength,duration:1024,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});Xa=rb=null}Pa=gD(Lb,
1491
+ zb);if(!Pa)throw new T(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=Pa.sampleRate;b.channelsCount=Pa.channelCount;null==Db&&null!==bd.pts&&(Db=bd.pts);for(;zb<Lb.length;){var Jc=fD(Lb,zb);if(!Jc){rb=Lb.subarray(zb,Lb.length);Xa=-1;break}var re=Jc.kd+Jc.ca;Xa=Math.max(0,zb+re-Lb.length);0!=Xa?rb=Lb.subarray(zb+Jc.kd,zb+re):zb+re<=Lb.length&&za.push({data:Lb.subarray(zb+Jc.kd,zb+re),size:Jc.ca,duration:1024,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});zb+=re}}}if(!Pa||null==Db){if(!k.rc().length)throw new T(2,
1492
+ 3,3018,c?c.N()[0]:null);Db=9E4*c.startTime;var tf=Se("audio",b.codecs.split(","));if(!tf||!b.channelsCount||!b.audioSamplingRate)throw new T(2,3,3018,c?c.N()[0]:null);Pa={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:tf};var uf=iD(tf,b.channelsCount);if(!uf)throw new T(2,3,3018,c?c.N()[0]:null);for(var $i=Db+9E4*(c.endTime-c.startTime),Kc=Db;Kc<$i;)za.push({data:uf,size:uf.byteLength,duration:1024,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Kc+=1024/Pa.sampleRate*9E4}var dv=Pa.sampleRate,
1493
+ eE=Db/9E4*dv;n={id:b.id,type:"audio",codecs:Pa.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:dv,duration:d,gb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:eE,cb:za},stream:b};break;case "ac3":for(var ev=[],Hj=0,un=new Uint8Array([]),Ij=null,fv=t(k.$a()),vn=fv.next();!vn.done;vn=fv.next()){var wn=vn.value,xn=wn.data;null==Ij&&null!==wn.pts&&(Ij=wn.pts);for(var Df=0;Df<xn.length;){var Vd=kD(xn,Df);Vd?(b.audioSamplingRate=Vd.sampleRate,b.channelsCount=
1494
+ Vd.channelCount,Hj=Vd.sampleRate,un=Vd.pa,ev.push({data:xn.subarray(Df,Df+Vd.ca),size:Vd.ca,duration:1536,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Df+=Vd.ca):Df++}}if(0==Hj||0==un.byteLength||null==Ij)throw new T(2,3,3018,c?c.N()[0]:null);var fE=Ij/9E4*Hj;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Hj,duration:d,gb:[],pa:un,ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:fE,cb:ev},stream:b};break;case "ec3":for(var gv=[],Jj=0,
1495
+ yn=new Uint8Array([]),Kj=null,hv=t(k.$a()),zn=hv.next();!zn.done;zn=hv.next()){var An=zn.value,Bn=An.data;null==Kj&&null!==An.pts&&(Kj=An.pts);for(var Ef=0;Ef<Bn.length;){var Wd=nD(Bn,Ef);Wd?(b.audioSamplingRate=Wd.sampleRate,b.channelsCount=Wd.channelCount,Jj=Wd.sampleRate,yn=Wd.pa,gv.push({data:Bn.subarray(Ef,Ef+Wd.ca),size:Wd.ca,duration:1536,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),Ef+=Wd.ca):Ef++}}if(0==Jj||0==yn.byteLength||null==Kj)throw new T(2,3,3018,c?c.N()[0]:null);var gE=Kj/9E4*Jj;
1496
+ n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Jj,duration:d,gb:[],pa:yn,ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:gE,cb:gv},stream:b};break;case "mp3":for(var iv=[],Lj,Mj=null,jv=t(k.$a()),Cn=jv.next();!Cn.done;Cn=jv.next()){var Dn=Cn.value,dh=Dn.data;if(dh){null==Mj&&null!==Dn.pts&&(Mj=Dn.pts);for(var ue=0;ue<dh.length;){var Ff=xD(dh,ue);Ff?(Lj||(Lj=Ff),ue+Ff.ca<=dh.length&&iv.push({data:dh.subarray(ue,ue+Ff.ca),size:Ff.ca,duration:1152,
1497
+ Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}}),ue+=Ff.ca):ue++}}}if(!Lj||null==Mj)throw new T(2,3,3018,c?c.N()[0]:null);var kv=Lj.sampleRate,hE=Mj/9E4*kv;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:kv,duration:d,gb:[],pa:new Uint8Array([]),ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:hE,cb:iv},stream:b};break;case "opus":var lv=[],Nj=null,dd=k.F;if(!dd)throw new T(2,3,3018,c?c.N()[0]:null);var Gb=[];switch(dd.Hh){case 1:case 2:Gb=
1496
1498
  [0];break;case 0:Gb=[255,1,1,0,1];break;case 128:Gb=[255,2,0,0,1];break;case 3:Gb=[1,2,1,0,2,1];break;case 4:Gb=[1,2,2,0,1,2,3];break;case 5:Gb=[1,3,2,0,4,1,2,3];break;case 6:Gb=[1,4,2,0,4,1,2,3,5];break;case 7:Gb=[1,4,2,0,4,1,2,3,5,6];break;case 8:Gb=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Gb=[1,1,2,0,1];break;case 131:Gb=[1,1,3,0,1,2];break;case 132:Gb=[1,1,4,0,1,2,3];break;case 133:Gb=[1,1,5,0,1,2,3,4];break;case 134:Gb=[1,1,6,0,1,2,3,4,5];break;case 135:Gb=[1,1,7,0,1,2,3,4,5,6];break;case 136:Gb=
1497
- [1,1,8,0,1,2,3,4,5,6,7]}var mv=new Uint8Array([0,dd.channelCount,0,0,dd.sampleRate>>>24&255,dd.sampleRate>>>17&255,dd.sampleRate>>>8&255,dd.sampleRate>>>0&255,0,0].concat(x(Gb)));for(var nv=dd.sampleRate,ov=t(k.$a()),En=ov.next();!En.done;En=ov.next()){var Fn=En.value,Gf=Fn.data;null==Mj&&null!==Fn.pts&&(Mj=Fn.pts);for(var dh=0;dh<Gf.length;){for(var iE=0!==(Gf[dh+1]&16),jE=0!==(Gf[dh+1]&8),Cd=dh+2,Nj=0;255===Gf[Cd];)Nj+=255,Cd+=1;Nj+=Gf[Cd];Cd+=1;Cd+=iE?2:0;Cd+=jE?2:0;var pv=Gf.slice(Cd,Cd+Nj);lv.push({data:pv,
1498
- size:pv.byteLength,duration:960,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});dh=Cd+Nj}}if(0==mv.byteLength||null==Mj)throw new T(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=dd.sampleRate;b.channelsCount=dd.channelCount;var kE=Mj/9E4*nv;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:nv,duration:d,gb:[],pa:mv,ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:kE,cb:lv},stream:b}}n&&(l.push(n),n=null)}}catch(Gn){return Gn&&3023==Gn.code?
1499
- Promise.resolve(new Uint8Array([])):Promise.reject(Gn)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));var qv=new Cx(l),Hn=b.id+"_"+c.i;if(this.i.has(Hn))var eh=this.i.get(Hn);else eh=Ix(qv),this.i.set(Hn,eh);var lE=this.l!==eh,rv=Zx(qv);this.l=eh;this.g++;if(lE){var mE=Ne(eh,rv);return Promise.resolve(mE)}return Promise.resolve(rv)};S("shaka.transmuxer.TsTransmuxer",KD);KD.prototype.transmux=KD.prototype.transmux;KD.prototype.getOriginalMimeType=KD.prototype.getOriginalMimeType;
1499
+ [1,1,8,0,1,2,3,4,5,6,7]}var mv=new Uint8Array([0,dd.channelCount,0,0,dd.sampleRate>>>24&255,dd.sampleRate>>>17&255,dd.sampleRate>>>8&255,dd.sampleRate>>>0&255,0,0].concat(x(Gb)));for(var nv=dd.sampleRate,ov=t(k.$a()),En=ov.next();!En.done;En=ov.next()){var Fn=En.value,Gf=Fn.data;null==Nj&&null!==Fn.pts&&(Nj=Fn.pts);for(var eh=0;eh<Gf.length;){for(var iE=0!==(Gf[eh+1]&16),jE=0!==(Gf[eh+1]&8),Dd=eh+2,Oj=0;255===Gf[Dd];)Oj+=255,Dd+=1;Oj+=Gf[Dd];Dd+=1;Dd+=iE?2:0;Dd+=jE?2:0;var pv=Gf.slice(Dd,Dd+Oj);lv.push({data:pv,
1500
+ size:pv.byteLength,duration:960,Za:0,flags:{ab:0,Sa:0,Ra:0,Pa:0,Qa:2,bb:0}});eh=Dd+Oj}}if(0==mv.byteLength||null==Nj)throw new T(2,3,3018,c?c.N()[0]:null);b.audioSamplingRate=dd.sampleRate;b.channelsCount=dd.channelCount;var kE=Nj/9E4*nv;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:nv,duration:d,gb:[],pa:mv,ya:new Uint8Array([]),Ba:0,Ca:0,data:{xb:this.g,baseMediaDecodeTime:kE,cb:lv},stream:b}}n&&(l.push(n),n=null)}}catch(Gn){return Gn&&3023==Gn.code?
1501
+ Promise.resolve(new Uint8Array([])):Promise.reject(Gn)}if(!l.length)return Promise.reject(new T(2,3,3018,c?c.N()[0]:null));var qv=new Cx(l),Hn=b.id+"_"+c.i;if(this.i.has(Hn))var fh=this.i.get(Hn);else fh=Ix(qv),this.i.set(Hn,fh);var lE=this.l!==fh,rv=Zx(qv);this.l=fh;this.g++;if(lE){var mE=Ne(fh,rv);return Promise.resolve(mE)}return Promise.resolve(rv)};S("shaka.transmuxer.TsTransmuxer",KD);KD.prototype.transmux=KD.prototype.transmux;KD.prototype.getOriginalMimeType=KD.prototype.getOriginalMimeType;
1500
1502
  KD.prototype.convertCodecs=KD.prototype.convertCodecs;KD.prototype.isSupported=KD.prototype.isSupported;KD.prototype.destroy=KD.prototype.destroy;var LD=["aac","ac-3","ec-3","mp3","opus"],MD=["avc","hevc"];he("video/mp2t",function(){return new KD("video/mp2t")},le);/*
1501
1503
  @license
1502
1504
  EME Encryption Scheme Polyfill