shaka-player 4.2.5 → 4.2.7

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.
Files changed (45) hide show
  1. package/.github/workflows/build-and-test.yaml +13 -0
  2. package/AUTHORS +1 -0
  3. package/CHANGELOG.md +31 -0
  4. package/CONTRIBUTORS +1 -0
  5. package/dist/deps.js +1 -1
  6. package/dist/locales.js +31 -31
  7. package/dist/shaka-player.compiled.d.ts +10 -0
  8. package/dist/shaka-player.compiled.debug.d.ts +10 -0
  9. package/dist/shaka-player.compiled.debug.externs.js +12 -0
  10. package/dist/shaka-player.compiled.debug.js +252 -246
  11. package/dist/shaka-player.compiled.debug.map +3 -3
  12. package/dist/shaka-player.compiled.externs.js +12 -0
  13. package/dist/shaka-player.compiled.js +713 -708
  14. package/dist/shaka-player.compiled.map +3 -3
  15. package/dist/shaka-player.ui.d.ts +10 -0
  16. package/dist/shaka-player.ui.debug.d.ts +10 -0
  17. package/dist/shaka-player.ui.debug.externs.js +12 -0
  18. package/dist/shaka-player.ui.debug.js +266 -260
  19. package/dist/shaka-player.ui.debug.map +3 -3
  20. package/dist/shaka-player.ui.externs.js +12 -0
  21. package/dist/shaka-player.ui.js +844 -840
  22. package/dist/shaka-player.ui.map +3 -3
  23. package/lib/ads/ad_manager.js +2 -2
  24. package/lib/hls/hls_parser.js +63 -18
  25. package/lib/media/media_source_engine.js +49 -3
  26. package/lib/media/segment_index.js +5 -10
  27. package/lib/media/segment_reference.js +42 -0
  28. package/lib/media/streaming_engine.js +47 -12
  29. package/lib/player.js +12 -2
  30. package/lib/text/ui_text_displayer.js +24 -4
  31. package/lib/text/web_vtt_generator.js +21 -9
  32. package/lib/util/dom_utils.js +3 -1
  33. package/lib/util/stream_utils.js +6 -0
  34. package/lib/util/timer.js +17 -0
  35. package/package.json +1 -1
  36. package/test/hls/hls_live_unit.js +8 -30
  37. package/test/hls/hls_parser_unit.js +30 -0
  38. package/test/media/segment_index_unit.js +28 -0
  39. package/test/player_integration.js +37 -3
  40. package/test/player_unit.js +4 -2
  41. package/test/test/boot.js +29 -11
  42. package/test/test/util/manifest_parser_util.js +4 -3
  43. package/test/test/util/test_scheme.js +2 -2
  44. package/test/text/ui_text_displayer_unit.js +70 -0
  45. package/ui/controls.js +5 -1
@@ -13,33 +13,33 @@ var q;function ba(a){var b=0;return function(){return b<a.length?{done:!1,value:
13
13
  function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var fa=da(this);function ha(a,b){if(b)a:{var c=fa;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
14
14
  ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
15
  ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ba(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
- function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function ja(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var la="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
16
+ function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function ja(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ma;
17
17
  if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ma;
18
- function u(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(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.fj=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
19
- function ta(a,b){a.i={rf:b,Cf:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function B(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function C(a){a.g=0}function E(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function I(a){a.m=0;var b=a.i.rf;a.i=null;return b}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Cf?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ca(a)}
21
- function Aa(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.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Cf)throw b.rf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
18
+ function u(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(qa)qa(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.hj=b.prototype}function ra(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.C=this.i=null}function sa(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}ra.prototype.B=function(a){this.h=a};
19
+ function ta(a,b){a.i={uf:b,Ef:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function A(a,b,c){a.g=c;return{value:b}}ra.prototype.D=function(a){this.g=a};function B(a){a.g=0}function E(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b,c){a.g=b;a.m=c||0}function J(a,b){a.m=b||0;b=a.i.uf;a.i=null;return b}function wa(a){a.C=[a.i];a.m=0;a.j=0}
20
+ function xa(a,b){var c=a.C.splice(0)[0];(c=a.i=a.i||c)?c.Ef?a.g=a.m||a.j:void 0!=c.D&&a.j<c.D?(a.g=c.D,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new ra;this.h=a}function za(a,b){sa(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ca(a)}
21
+ function Aa(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.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ef)throw b.uf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
22
22
  function Da(a){this.next=function(b){sa(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.B):(a.g.B(b),b=Ca(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.B):(ta(a.g,b),b=Ca(a));return b};this.return=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}function Ea(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 K(a){return Ea(new Da(new ya(a)))}function Fa(){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.A=!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=
25
25
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.G(g):this.m(g)}};
26
26
  b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.m=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.C()};b.prototype.I=function(){var g=this;e(function(){if(g.F()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.F=
27
27
  function(){if(this.A)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=fa.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.C=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
28
- b.prototype.J=function(g){var h=this.j();g.jd(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,t){return"function"==typeof n?function(x){try{l(n(x))}catch(y){m(y)}}:t}var l,m,p=new b(function(n,t){l=n;m=t});this.jd(k(g,l),k(h,m));return p};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.jd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
29
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).jd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(x){return function(y){n[x]=y;t--;0==t&&l(n)}}var n=[],t=0;do n.push(void 0),t++,d(k.value).jd(p(n.length-1),m),k=h.next();
28
+ b.prototype.J=function(g){var h=this.j();g.kd(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,t){return"function"==typeof n?function(y){try{l(n(y))}catch(x){m(x)}}:t}var l,m,p=new b(function(n,t){l=n;m=t});this.kd(k(g,l),k(h,m));return p};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.kd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
29
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).kd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(y){return function(x){n[y]=x;t--;0==t&&l(n)}}var n=[],t=0;do n.push(void 0),t++,d(k.value).kd(p(n.length-1),m),k=h.next();
30
30
  while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
31
31
  ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(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(!Ga(k,g)){var l=new c;ca(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(p){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(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ga(k,
33
33
  g)&&Ga(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ga(k,g)&&Ga(k[g],this.g)?delete k[g][this.g]:!1};return b});
34
- ha("Map",function(a){function b(){var h={};return h.ob=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.ob;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.h[l];if(m&&Ga(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,wa:p}}return{id:l,
35
- list:m,index:-1,wa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[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!=m.value[0].x||
36
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(p){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.h[l.id]=[]);l.wa?l.wa.value=k:(l.wa={next:this.g,ob:this.g.ob,head:this.g,key:h,value:k},l.list.push(l.wa),this.g.ob.next=l.wa,this.g.ob=l.wa,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.wa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.wa.ob.next=h.wa.next,h.wa.next.ob=h.wa.ob,
37
- h.wa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.ob=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).wa};e.prototype.get=function(h){return(h=d(this,h).wa)&&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=function(h,k){for(var l=this.entries(),
34
+ ha("Map",function(a){function b(){var h={};return h.pb=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)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.h[l];if(m&&Ga(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,xa:p}}return{id:l,
35
+ list:m,index:-1,xa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(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(r([[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!=m.value[0].x||
36
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(p){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.h[l.id]=[]);l.xa?l.xa.value=k:(l.xa={next:this.g,pb:this.g.pb,head:this.g,key:h,value:k},l.list.push(l.xa),this.g.pb.next=l.xa,this.g.pb=l.xa,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.xa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.xa.pb.next=h.xa.next,h.xa.next.pb=h.xa.pb,
37
+ h.xa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.pb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).xa};e.prototype.get=function(h){return(h=d(this,h).xa)&&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=function(h,k){for(var l=this.entries(),
38
38
  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});function Ha(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 Ha(this,function(b){return b})}});
39
39
  ha("Set",function(a){function b(c){this.g=new Map;if(c){c=r(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(r([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});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}});
42
- function Ka(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{Af:e,v:f}}return{Af:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Af}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
42
+ function Ka(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{Cf:e,v:f}}return{Cf:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Cf}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
43
  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}});function La(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+""}
44
44
  ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=La(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}});
45
45
  var Ma="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)Ga(d,e)&&(a[e]=d[e])}return a};ha("Object.assign",function(a){return a||Ma});ha("Array.prototype.values",function(a){return a?a:function(){return Ha(this,function(b,c){return c})}});
@@ -54,9 +54,9 @@ function M(a,b){a=a.split(".");var c=Pa;a[0]in c||"undefined"==typeof c.execScri
54
54
  */
55
55
  function O(a,b){if(b)if(b instanceof Map)for(var c=r(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}
56
56
  function Qa(a){var b=new O(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.g=!0};O.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",O);
57
- var Ra={Ih:"abrstatuschanged",Jh:"adaptation",Kh:"buffering",Oh:"downloadfailed",Ph:"downloadheadersreceived",Qh:"drmsessionupdate",Xh:"emsg",Error:"error",Yh:"expirationupdated",ai:"gapjumped",ei:"loaded",gi:"loading",mi:"manifestparsed",ni:"mediaqualitychanged",Metadata:"metadata",ti:"onstatechange",wi:"onstateidle",Gi:"ratechange",Mi:"sessiondata",Ni:"stalldetected",Oi:"streaming",Pi:"textchanged",Qi:"texttrackvisibility",Ri:"timelineregionadded",Si:"timelineregionenter",Ti:"timelineregionexit",
58
- Ui:"trackschanged",Zi:"unloading",aj:"variantchanged"};function Sa(){}function Ta(){}function Ua(){}function Wa(a){var b=Fa.apply(1,arguments);Xa.has(a)||(Xa.add(a),Ua.apply(Sa,ja(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Ua=cb[2];Ta=cb[1]};function db(){this.g={}}q=db.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])};function eb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function fb(){this.ua=new db;this.vd=this}fb.prototype.addEventListener=function(a,b){this.ua&&this.ua.push(a,b)};fb.prototype.removeEventListener=function(a,b){this.ua&&this.ua.remove(a,b)};fb.prototype.dispatchEvent=function(a){if(!this.ua)return!0;var b=this.ua.get(a.type)||[],c=this.ua.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.vd;a.currentTarget=this.vd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
59
- fb.prototype.release=function(){this.ua=null};function gb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function hb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function ib(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function jb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
57
+ var Ra={Kh:"abrstatuschanged",Lh:"adaptation",Mh:"buffering",Qh:"downloadfailed",Rh:"downloadheadersreceived",Sh:"drmsessionupdate",Zh:"emsg",Error:"error",$h:"expirationupdated",ci:"gapjumped",ii:"loaded",ji:"loading",oi:"manifestparsed",pi:"mediaqualitychanged",Metadata:"metadata",xi:"onstatechange",zi:"onstateidle",Ii:"ratechange",Oi:"sessiondata",Pi:"stalldetected",Qi:"streaming",Ri:"textchanged",Si:"texttrackvisibility",Ti:"timelineregionadded",Ui:"timelineregionenter",Vi:"timelineregionexit",
58
+ Wi:"trackschanged",aj:"unloading",cj:"variantchanged"};function Sa(){}function Ta(){}function Ua(){}function Wa(a){var b=Fa.apply(1,arguments);Xa.has(a)||(Xa.add(a),Ua.apply(Sa,ja(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Ua=cb[2];Ta=cb[1]};function db(){this.g={}}q=db.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])};function eb(a,b){for(var c in a.g)b(c,a.g[c])}q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function fb(){this.va=new db;this.wd=this}fb.prototype.addEventListener=function(a,b){this.va&&this.va.push(a,b)};fb.prototype.removeEventListener=function(a,b){this.va&&this.va.remove(a,b)};fb.prototype.dispatchEvent=function(a){if(!this.va)return!0;var b=this.va.get(a.type)||[],c=this.va.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.wd;a.currentTarget=this.wd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
59
+ fb.prototype.release=function(){this.va=null};function gb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function hb(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function ib(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function jb(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
60
60
  @license
61
61
  Copyright 2008 The Closure Library Authors
62
62
  SPDX-License-Identifier: Apache-2.0
@@ -66,13 +66,13 @@ var kb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
66
66
  Copyright 2006 The Closure Library Authors
67
67
  SPDX-License-Identifier: Apache-2.0
68
68
  */
69
- function lb(a){var b;a instanceof lb?(mb(this,a.Wa),this.Ub=a.Ub,this.Za=a.Za,nb(this,a.pc),this.Ka=a.Ka,ob(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(kb))?(mb(this,b[1]||"",!0),this.Ub=pb(b[2]||""),this.Za=pb(b[3]||"",!0),nb(this,b[4]),this.Ka=pb(b[5]||"",!0),ob(this,b[6]||"",!0),this.Ib=pb(b[7]||"")):this.g=new qb(null)}q=lb.prototype;q.Wa="";q.Ub="";q.Za="";q.pc=null;q.Ka="";q.Ib="";
70
- q.toString=function(){var a=[],b=this.Wa;b&&a.push(rb(b,sb,!0),":");if(b=this.Za){a.push("//");var c=this.Ub;c&&a.push(rb(c,sb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.pc;null!=b&&a.push(":",String(b))}if(b=this.Ka)this.Za&&"/"!=b.charAt(0)&&a.push("/"),a.push(rb(b,"/"==b.charAt(0)?tb:ub,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",rb(b,vb));return a.join("")};
71
- q.resolve=function(a){var b=this.clone();"data"===b.Wa&&(b=new lb);var c=!!a.Wa;c?mb(b,a.Wa):c=!!a.Ub;c?b.Ub=a.Ub:c=!!a.Za;c?b.Za=a.Za:c=null!=a.pc;var d=a.Ka;if(c)nb(b,a.pc);else if(c=!!a.Ka){if("/"!=d.charAt(0))if(this.Za&&!this.Ka)d="/"+d;else{var e=b.Ka.lastIndexOf("/");-1!=e&&(d=b.Ka.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(""):".."==
72
- 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.Ka=d:c=""!==a.g.toString();c?ob(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a.Wa=c?pb(b,!0):b;a.Wa&&(a.Wa=a.Wa.replace(/:$/,""))}function nb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.pc=b}else a.pc=null}function ob(a,b,c){b instanceof qb?a.g=b:(c||(b=rb(b,wb)),a.g=new qb(b))}
69
+ function lb(a){var b;a instanceof lb?(mb(this,a.Ya),this.Ub=a.Ub,this.bb=a.bb,nb(this,a.pc),this.Na=a.Na,ob(this,a.g.clone()),this.Ib=a.Ib):a&&(b=String(a).match(kb))?(mb(this,b[1]||"",!0),this.Ub=pb(b[2]||""),this.bb=pb(b[3]||"",!0),nb(this,b[4]),this.Na=pb(b[5]||"",!0),ob(this,b[6]||"",!0),this.Ib=pb(b[7]||"")):this.g=new qb(null)}q=lb.prototype;q.Ya="";q.Ub="";q.bb="";q.pc=null;q.Na="";q.Ib="";
70
+ q.toString=function(){var a=[],b=this.Ya;b&&a.push(rb(b,sb,!0),":");if(b=this.bb){a.push("//");var c=this.Ub;c&&a.push(rb(c,sb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.pc;null!=b&&a.push(":",String(b))}if(b=this.Na)this.bb&&"/"!=b.charAt(0)&&a.push("/"),a.push(rb(b,"/"==b.charAt(0)?tb:ub,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Ib)&&a.push("#",rb(b,vb));return a.join("")};
71
+ q.resolve=function(a){var b=this.clone();"data"===b.Ya&&(b=new lb);var c=!!a.Ya;c?mb(b,a.Ya):c=!!a.Ub;c?b.Ub=a.Ub:c=!!a.bb;c?b.bb=a.bb:c=null!=a.pc;var d=a.Na;if(c)nb(b,a.pc);else if(c=!!a.Na){if("/"!=d.charAt(0))if(this.bb&&!this.Na)d="/"+d;else{var e=b.Na.lastIndexOf("/");-1!=e&&(d=b.Na.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(""):".."==
72
+ 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.Na=d:c=""!==a.g.toString();c?ob(b,a.g.clone()):c=!!a.Ib;c&&(b.Ib=a.Ib);return b};q.clone=function(){return new lb(this)};function mb(a,b,c){a.Ya=c?pb(b,!0):b;a.Ya&&(a.Ya=a.Ya.replace(/:$/,""))}function nb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.pc=b}else a.pc=null}function ob(a,b,c){b instanceof qb?a.g=b:(c||(b=rb(b,wb)),a.g=new qb(b))}
73
73
  function pb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function rb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,xb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function xb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var sb=/[#\/\?@]/g,ub=/[#\?:]/g,tb=/[#\?]/g,wb=/[#\?@]/g,vb=/#/g;function qb(a){this.g=a||null}
74
- function yb(a){if(!a.Da&&(a.Da={},a.ld=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=qb.prototype;q.Da=null;q.ld=null;q.add=function(a,b){yb(this);this.g=null;var c=this.Da.hasOwnProperty(a)&&this.Da[a];c||(this.Da[a]=c=[]);c.push(b);this.ld++;return this};
75
- q.set=function(a,b){yb(this);this.g=null;this.Da.hasOwnProperty(a)?this.Da[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Da)return"";var a=[],b;for(b in this.Da)for(var c=encodeURIComponent(b),d=this.Da[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new qb;a.g=this.g;if(this.Da){var b={},c;for(c in this.Da)b[c]=this.Da[c].concat();a.Da=b;a.ld=this.ld}return a};function P(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
74
+ function yb(a){if(!a.Ea&&(a.Ea={},a.md=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=qb.prototype;q.Ea=null;q.md=null;q.add=function(a,b){yb(this);this.g=null;var c=this.Ea.hasOwnProperty(a)&&this.Ea[a];c||(this.Ea[a]=c=[]);c.push(b);this.md++;return this};
75
+ q.set=function(a,b){yb(this);this.g=null;this.Ea.hasOwnProperty(a)?this.Ea[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.Ea)return"";var a=[],b;for(b in this.Ea)for(var c=encodeURIComponent(b),d=this.Ea[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new qb;a.g=this.g;if(this.Ea){var b={},c;for(c in this.Ea)b[c]=this.Ea[c].concat();a.Ea=b;a.md=this.md}return a};function P(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}P.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",P);P.Severity={RECOVERABLE:1,CRITICAL:2};P.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
76
76
  P.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,
77
77
  CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
78
78
  WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
@@ -82,7 +82,7 @@ FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_RE
82
82
  ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,
83
83
  MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function zb(a,b){return a.concat(b)}function Ab(){}function Bb(a){return null!=a};function Cb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new lb(d)});return a.map(function(d){return new lb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(zb,[]).map(function(d){return d.toString()})}function Eb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
84
84
  function Fb(a,b){if(1==b.length)return b[0];a=Gb(a,b);if(null!=a)return a;throw new P(2,4,4025,b);}function Gb(a,b){for(var c=r(Hb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Ib?"":null}
85
- var Ib="text",Jb={Ia:"video",Gb:"audio",ha:Ib,Bc:"image",Fh:"application"},Hb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Kb(){}function Lb(a,b){a=Mb(a);b=Mb(b);return a.split("-")[0]==b.split("-")[0]}function Nb(a,b){a=Mb(a);b=Mb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Ob(a,b){a=Mb(a);b=Mb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Mb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Pb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Qb(a,b){var c=Rb(a),d=Rb(b);return a!=c&&b!=d&&c==d}
85
+ var Ib="text",Jb={La:"video",Gb:"audio",ha:Ib,Bc:"image",Hh:"application"},Hb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Kb(){}function Lb(a,b){a=Mb(a);b=Mb(b);return a.split("-")[0]==b.split("-")[0]}function Nb(a,b){a=Mb(a);b=Mb(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Ob(a,b){a=Mb(a);b=Mb(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Mb(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Pb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Qb(a,b){var c=Rb(a),d=Rb(b);return a!=c&&b!=d&&c==d}
86
86
  function Sb(a,b){a=Mb(a);b=Mb(b);return b==a?4:Nb(b,a)?3:Ob(b,a)?2:Nb(a,b)?1:0}function Rb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Pb.get(a)||a}function Tb(a){return a.language?Mb(a.language):a.audio&&a.audio.language?Mb(a.audio.language):a.video&&a.video.language?Mb(a.video.language):"und"}
87
87
  function Ub(a,b){a=Mb(a);var c=new Set,d=r(b);for(b=d.next();!b.done;b=d.next())c.add(Mb(b.value));d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Nb(b,a))return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Ob(b,a))return b;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Nb(a,b))return b;return null}M("shaka.util.LanguageUtils",Kb);Kb.findClosestLocale=Ub;Kb.getLocaleForVariant=Tb;
88
88
  Kb.getLocaleForText=function(a){return Mb(a.language||"und")};Kb.getBase=Rb;Kb.relatedness=Sb;Kb.areSiblings=Qb;Kb.normalize=Mb;Kb.isSiblingOf=Ob;Kb.isParentOf=Nb;Kb.areLanguageCompatible=Lb;Kb.areLocaleCompatible=function(a,b){a=Mb(a);b=Mb(b);return a==b};
@@ -92,21 +92,21 @@ var Pb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
92
92
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
93
93
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
94
94
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Vb(a){fb.call(this);this.j=Mb(a);this.i=new Map;this.g=new Set;this.h=new Map}u(Vb,fb);q=Vb.prototype;q.release=function(){fb.prototype.release.call(this)};
95
- q.jf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Mb(c.value));Wb(this);a=jb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new O("unknown-locales",(new Map).set("locales",a)));a=jb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new O("locale-changed",a))};
96
- q.ia=function(a,b,c){a=Mb(a);void 0===c&&(c=Xb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Xb||d.set(f,e)});this.h.set(a,d);Wb(this);this.dispatchEvent(new O("locale-updated"));return this};q.mh=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
95
+ q.lf=function(a){var b=this;this.g.clear();a=r(a);for(var c=a.next();!c.done;c=a.next())this.g.add(Mb(c.value));Wb(this);a=jb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new O("unknown-locales",(new Map).set("locales",a)));a=jb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new O("locale-changed",a))};
96
+ q.ia=function(a,b,c){a=Mb(a);void 0===c&&(c=Xb);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=Xb||d.set(f,e)});this.h.set(a,d);Wb(this);this.dispatchEvent(new O("locale-updated"));return this};q.oh=function(a){for(var b=r(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new O("unknown-localization",a));return""};
97
97
  function Wb(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Yb:f.Yb},h=g.next()){f.Yb=h.value;e.add(f.Yb);e.add(Rb(f.Yb));h=jb(b.keys(),function(l){return function(m){return Qb(m,l.Yb)}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=jb(b.keys(),function(l){return function(m){return Rb(m)==l.Yb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=b.get(h.value))&&c.push(h);
98
98
  c.reverse();a.i.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=r(a.g);for(h=c.next();!h.done;h=c.next())h=a.h.get(h.value)||new Map,Yb(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new O("missing-localizations",d)))}function Yb(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}M("shaka.ui.Localization",Vb);Vb.prototype.resolve=Vb.prototype.resolve;
99
- Vb.prototype.resolveDictionary=Vb.prototype.mh;Vb.prototype.insert=Vb.prototype.ia;Vb.prototype.changeLocale=Vb.prototype.jf;Vb.prototype.release=Vb.prototype.release;var Xb=1;Vb.ConflictResolution={USE_OLD:0,USE_NEW:Xb};Vb.UNKNOWN_LOCALES="unknown-locales";Vb.UNKNOWN_LOCALIZATION="unknown-localization";Vb.MISSING_LOCALIZATIONS="missing-localizations";Vb.LOCALE_CHANGED="locale-changed";Vb.LOCALE_UPDATED="locale-updated";var Zb={Wf:"SUBTITLE_FORCED",di:"LOOP",$i:"VOLUME",Rh:"ENTER_LOOP_MODE",Ii:"SKIP_AD",ri:"ON",Xi:"UNMUTE",ki:"MULTIPLE_LANGUAGES",zi:"PICTURE_IN_PICTURE",Ch:"AD_DURATION",Uh:"EXIT_FULL_SCREEN",Li:"STATISTICS",Lh:"CAPTIONS",Gh:"AUTO_QUALITY",ci:"LANGUAGE",Dh:"AD_TIME",ji:"MORE_SETTINGS",Hi:"SEEK",Di:"REPLAY",Zh:"FAST_FORWARD",li:"MUTE",$e:"LIVE",oi:"NOT_APPLICABLE",pi:"OFF",Wh:"EXIT_PICTURE_IN_PICTURE",Ji:"SKIP_TO_LIVE",Wi:"UNDETERMINED_LANGUAGE",Eh:"AIRPLAY",Sh:"ENTER_PICTURE_IN_PICTURE",AD_PROGRESS:"AD_PROGRESS",
100
- Yi:"UNRECOGNIZED_LANGUAGE",Mh:"CAST",$h:"FULL_SCREEN",BACK:"BACK",Fi:"REWIND",Ei:"RESOLUTION",Vh:"EXIT_LOOP_MODE",xi:"PAUSE",Ci:"QUALITY",Ai:"PLAY",Bi:"PLAYBACK_RATE"};function $b(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}$b.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 ac(a){return a.h/(1-Math.pow(a.g,a.i))};function bc(){this.h=new $b(2);this.j=new $b(5);this.g=0;this.i=128E3;this.l=16E3}bc.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)};bc.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)}};bc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(ac(this.h),ac(this.j))};function cc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function dc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function ec(a,b,c){c||(c=cc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Qd:d.Qd},e=a.next()){d.Qd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Qd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
99
+ Vb.prototype.resolveDictionary=Vb.prototype.oh;Vb.prototype.insert=Vb.prototype.ia;Vb.prototype.changeLocale=Vb.prototype.lf;Vb.prototype.release=Vb.prototype.release;var Xb=1;Vb.ConflictResolution={USE_OLD:0,USE_NEW:Xb};Vb.UNKNOWN_LOCALES="unknown-locales";Vb.UNKNOWN_LOCALIZATION="unknown-localization";Vb.MISSING_LOCALIZATIONS="missing-localizations";Vb.LOCALE_CHANGED="locale-changed";Vb.LOCALE_UPDATED="locale-updated";var Zb={Yf:"SUBTITLE_FORCED",Ih:"AUTO_QUALITY",Yi:"UNDETERMINED_LANGUAGE",cf:"LIVE",Li:"SKIP_TO_LIVE",bi:"FULL_SCREEN",Fh:"AD_TIME",BACK:"BACK",Th:"ENTER_LOOP_MODE",Di:"PLAYBACK_RATE",si:"OFF",$i:"UNRECOGNIZED_LANGUAGE",Gi:"RESOLUTION",bj:"VOLUME",Ei:"QUALITY",gi:"LOOP",mi:"MULTIPLE_LANGUAGES",ai:"FAST_FORWARD",Zi:"UNMUTE",Ni:"STATISTICS",Uh:"ENTER_PICTURE_IN_PICTURE",AD_PROGRESS:"AD_PROGRESS",ei:"LANGUAGE",Oh:"CAST",Hi:"REWIND",Fi:"REPLAY",Bi:"PICTURE_IN_PICTURE",li:"MORE_SETTINGS",Yh:"EXIT_PICTURE_IN_PICTURE",
100
+ Ai:"PAUSE",Ji:"SEEK",Wh:"EXIT_FULL_SCREEN",Gh:"AIRPLAY",Eh:"AD_DURATION",Ki:"SKIP_AD",Xh:"EXIT_LOOP_MODE",Ci:"PLAY",Nh:"CAPTIONS",ri:"NOT_APPLICABLE",ti:"ON",ni:"MUTE"};function $b(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}$b.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 ac(a){return a.h/(1-Math.pow(a.g,a.i))};function bc(){this.h=new $b(2);this.j=new $b(5);this.g=0;this.i=128E3;this.l=16E3}bc.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)};bc.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)}};bc.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(ac(this.h),ac(this.j))};function cc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function dc(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function ec(a,b,c){c||(c=cc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Qd:d.Qd},e=a.next()){d.Qd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Qd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
101
101
  function fc(a,b,c){c||(c=cc);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 gc(a,b,c){this.startTime=a;this.direction=hc;this.endTime=b;this.payload=c;this.region=new ic;this.position=null;this.positionAlign=jc;this.size=0;this.textAlign=kc;this.writingMode=lc;this.lineInterpretation=mc;this.line=null;this.lineHeight="";this.lineAlign=nc;this.displayAlign=oc;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=pc;this.fontStyle=qc;this.linePadding=this.letterSpacing=
102
102
  this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}gc.prototype.clone=function(){var a=new gc(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
103
103
  function rc(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(!fc(a.nestedCues,b.nestedCues,rc))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(!fc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",gc);var jc="auto";
104
104
  gc.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:jc};var kc="center",sc={LEFT:"left",RIGHT:"right",CENTER:kc,START:"start",END:"end"};gc.textAlign=sc;var oc="after",tc={BEFORE:"before",CENTER:"center",AFTER:oc};gc.displayAlign=tc;var hc="ltr";gc.direction={HORIZONTAL_LEFT_TO_RIGHT:hc,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var lc="horizontal-tb";gc.writingMode={HORIZONTAL_TOP_TO_BOTTOM:lc,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var mc=0;
105
- gc.lineInterpretation={LINE_NUMBER:mc,PERCENTAGE:1};var nc="start",uc={CENTER:"center",START:nc,END:"end"};gc.lineAlign=uc;var wc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};gc.defaultTextColor=wc;var xc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};gc.defaultTextBackgroundColor=xc;var pc=400;gc.fontWeight={NORMAL:pc,BOLD:700};
105
+ gc.lineInterpretation={LINE_NUMBER:mc,PERCENTAGE:1};var nc="start",vc={CENTER:"center",START:nc,END:"end"};gc.lineAlign=vc;var wc={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};gc.defaultTextColor=wc;var xc={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};gc.defaultTextBackgroundColor=xc;var pc=400;gc.fontWeight={NORMAL:pc,BOLD:700};
106
106
  var qc="normal",yc={NORMAL:qc,ITALIC:"italic",OBLIQUE:"oblique"};gc.fontStyle=yc;gc.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function ic(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=zc;this.scroll=Ac}M("shaka.text.CueRegion",ic);var zc=1;ic.units={PX:0,PERCENTAGE:zc,LINES:2};var Ac="";ic.scrollMode={NONE:Ac,UP:"up"};function Bc(){}function Cc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Dc(a)==Dc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Ec(a);b=Ec(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Dc(a){return a instanceof ArrayBuffer?a:a.buffer}function Fc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
107
- function Ec(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,Uint8Array)}function Hc(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,DataView)}function Gc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Dc(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Bc);Bc.toDataView=Hc;Bc.toUint8=Ec;Bc.toArrayBuffer=Fc;Bc.equal=Cc;function Ic(){}M("shaka.dependencies",Ic);Ic.has=function(a){return Jc.has(a)};Ic.add=function(a,b){if(!Kc[a])throw Error(a+" is not supported");Jc.set(a,function(){return b})};var Kc={muxjs:"muxjs"};Ic.Allowed=Kc;var Jc=new Map([["muxjs",function(){return window.muxjs}]]);function Lc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Lc.prototype.resolve=function(){};Lc.prototype.reject=function(){};function Mc(a){this.h=a;this.g=void 0}Mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Nc(a){this.h=a;this.g=null}Nc.prototype.S=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};Nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.ya=function(){this.stop();this.h();return this};Q.prototype.S=function(a){var b=this;this.stop();this.g=(new Nc(function(){b.h()})).S(a);return this};Q.prototype.ka=function(a){var b=this;this.stop();this.g=(new Nc(function(){b.g.S(a);b.h()})).S(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.ka;Q.prototype.tickAfter=Q.prototype.S;
108
- Q.prototype.tickNow=Q.prototype.ya;function Oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Pc(a){return""!=Qc().canPlayType(a)}function Rc(){return Vc("Xbox One")}function Wc(){return Vc("Tizen")}function Xc(){return Vc("Web0S")&&Vc("Chrome/38.0.2125.122 Safari/537.36")}function Yc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Wc()&&!Vc("PC=EOS")&&!Vc("VirginMedia")&&!Zc()&&!Vc("AFT")}function Zc(){return Vc("PlayStation 4")}
109
- function $c(){if(!Yc())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 Vc(a){return(navigator.userAgent||"").includes(a)}function Qc(){if(ad)return ad;bd||(bd=new Q(function(){ad=null}));(ad=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ad=document.createElement("video"));bd.S(1);return ad}var bd=null,ad=null;function cd(){}
107
+ function Ec(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,Uint8Array)}function Hc(a,b,c){c=void 0===c?Infinity:c;return Gc(a,void 0===b?0:b,c,DataView)}function Gc(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(Dc(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Bc);Bc.toDataView=Hc;Bc.toUint8=Ec;Bc.toArrayBuffer=Fc;Bc.equal=Cc;function Ic(){}M("shaka.dependencies",Ic);Ic.has=function(a){return Jc.has(a)};Ic.add=function(a,b){if(!Kc[a])throw Error(a+" is not supported");Jc.set(a,function(){return b})};var Kc={muxjs:"muxjs"};Ic.Allowed=Kc;var Jc=new Map([["muxjs",function(){return window.muxjs}]]);function Lc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Lc.prototype.resolve=function(){};Lc.prototype.reject=function(){};function Mc(a){this.h=a;this.g=void 0}Mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function Nc(a){this.h=a;this.g=null}Nc.prototype.S=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};Nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.za=function(){this.stop();this.h();return this};Q.prototype.S=function(a){var b=this;this.stop();this.g=(new Nc(function(){b.h()})).S(a);return this};Q.prototype.ka=function(a){var b=this;this.stop();this.g=(new Nc(function(){b.g.S(a);b.h()})).S(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.ka;Q.prototype.tickAfter=Q.prototype.S;
108
+ Q.prototype.tickNow=Q.prototype.za;function Oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Pc(a){return""!=Qc().canPlayType(a)}function Rc(){return Sc("Xbox One")}function Wc(){return Sc("Tizen")}function Xc(){return Sc("Web0S")&&Sc("Chrome/38.0.2125.122 Safari/537.36")}function Yc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Wc()&&!Sc("PC=EOS")&&!Sc("VirginMedia")&&!Zc()&&!Sc("AFT")}function Zc(){return Sc("PlayStation 4")}
109
+ function $c(){if(!Yc())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(a){return(navigator.userAgent||"").includes(a)}function Qc(){if(ad)return ad;bd||(bd=new Q(function(){ad=null}));(ad=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ad=document.createElement("video"));bd.S(1);return ad}var bd=null,ad=null;function cd(){}
110
110
  function dd(a){if(!a)return"";a=Ec(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!Zc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ta('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==
111
111
  (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}
112
112
  function ed(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new P(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Hc(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return fd.value()(d)}
@@ -119,8 +119,8 @@ function td(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","au
119
119
  function yd(a){var b=zd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===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"===a&&"b2"===b:return"dtsx";
120
120
  case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Ad(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function zd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",vd);vd.getFullType=wd;
121
121
  (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Bd(a){this.j=null;this.i=a;this.C=!1;this.l=this.B=0;this.m=Infinity;this.h=this.g=null;this.F="";this.A=new Map}function Cd(a){return Dd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Bd.prototype.destroy=function(){this.i=this.j=null;this.A.clear();return Promise.resolve()};
122
- function Ed(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return B(k,Promise.resolve(),2);if(!a.j||!a.i)return k.return();if(null==c||null==d)return a.j.parseInit(Ec(b)),k.return();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Ec(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);C(k)})}
123
- Bd.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return B(d,Promise.resolve(),2);!c.i||!c.i.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));C(d)})};function Fd(a,b,c){a.l=b;a.m=c}function Gd(a,b,c){a.F=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
122
+ function Ed(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return A(k,Promise.resolve(),2);if(!a.j||!a.i)return k.return();if(null==c||null==d)return a.j.parseInit(Ec(b)),k.return();e=a.C?c:a.B;f={periodStart:a.B,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Ec(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);B(k)})}
123
+ Bd.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return A(d,Promise.resolve(),2);!c.i||!c.i.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));B(d)})};function Fd(a,b,c){a.l=b;a.m=c}function Gd(a,b,c){a.F=b;if(b=a.A.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
124
124
  function Hd(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new gc(c.startTime,c.endTime,c.text)});return b}function Id(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())Id(a,d.value,c)}
125
125
  function Ld(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(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,[]);Id(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.F&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.A.has(f)||a.A.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.A.get(f).set(h,k);a.g=null==a.g?Math.max(c,
126
126
  a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",Bd);Bd.prototype.destroy=Bd.prototype.destroy;Bd.findParser=function(a){return Dd[a]};Bd.unregisterParser=function(a){delete Dd[a]};Bd.registerParser=function(a,b){Dd[a]=b};var Dd={};function Nd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Od(f,b,c);f=Pd(f,d);b=Qd(f);b=Rd(b);var g=Sd(b,e);a.variants=a.variants.filter(function(h){return Td(h)==g?!0:!1})}function Qd(a){var b=new db;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Td(c);b.push(d,c)}return b}
@@ -129,17 +129,17 @@ function Od(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={ae:d.ae},e=b.ne
129
129
  function Sd(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Ud||c==Vd){if(a=Wd(a,c),1==a.size())return a.keys()[0]}else if(c==Xd)break;return Yd(a)}function Wd(a,b){var c=0,d=new db;eb(a,function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
130
130
  function Yd(a){var b="",c=Infinity;eb(a,function(d,e){var f=0,g=0;e=r(e);for(var h=e.next();!h.done;h=e.next())f+=h.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Td(a){var b="";a.video&&(b=yd(a.video.codecs));var c="";a.audio&&(c=yd(a.audio.codecs));return b+"-"+c}function Zd(a,b,c){a.variants=a.variants.filter(function(d){return $d(d,b,c)})}
131
131
  function $d(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
132
- function ae(a,b,c){var d=!1;a=r(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=$d(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function be(a,b){return K(function(c){if(1==c.g)return B(c,ce(b,0<b.offlineSessionIds.length),2);de(a,b);ee(b);return B(c,fe(b),0)})}
133
- function ce(a,b){return K(function(c){if(1==c.g)return B(c,ge(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=he(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Fb("video",g);f=he(f);g=Fb("audio",g);g=ie(g);g=xd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=xd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=ie(f.codecs),f=xd(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;
134
- if(Rc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(je(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(je(d));return e});C(c)})}
135
- function ge(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return K(function(x){if(d=a.some(function(y){return y.decodingInfos.length}))return x.return();e=navigator.mediaCapabilities;f=[];g=function(y,v){var w;return K(function(A){if(1==A.g)return E(A,2),B(A,e.decodingInfo(v),4);if(2!=A.g)return w=A.h,y.decodingInfos.push(w),va(A,0);I(A);JSON.stringify(v);C(A)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ke(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return B(x,Promise.all(f),
132
+ function ae(a,b,c){var d=!1;a=r(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=$d(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function be(a,b){return K(function(c){if(1==c.g)return A(c,ce(b,0<b.offlineSessionIds.length),2);de(a,b);ee(b);return A(c,fe(b),0)})}
133
+ function ce(a,b){return K(function(c){if(1==c.g)return A(c,ge(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=he(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Fb("video",g);f=he(f);g=Fb("audio",g);g=ie(g);var h=xd(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;f=[f,g].join()}g=xd(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(g))return!1;e.codecs=f}if(f=d.audio){g=ie(f.codecs);h=xd(f.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;
134
+ f.codecs=g}if(Rc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(je(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Za(je(d));return e});B(c)})}
135
+ function ge(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(d=a.some(function(x){return x.decodingInfos.length}))return y.return();e=navigator.mediaCapabilities;f=[];g=function(x,v){var w;return K(function(C){if(1==C.g)return E(C,2),A(C,e.decodingInfo(v),4);if(2!=C.g)return w=C.h,x.decodingInfos.push(w),va(C,0);J(C);JSON.stringify(v);B(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=ke(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return A(y,Promise.all(f),
136
136
  0)})}
137
137
  function ke(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Fb("video",g);f=he(f);g=Fb("audio",g);g=xd(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=he(f);f=xd(e.mimeType,f,"video");c.video={contentType:f,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":c.video.transferFunction="srgb";
138
138
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=ie(d.codecs),f=xd(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
139
- f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),x=t.next();!x.done;x=t.next())n.add(x.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
139
+ f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),y=t.next();!y.done;y=t.next())n.add(y.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
140
140
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function ie(a){return Wc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
141
141
  function he(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function de(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!le(d,a.audio)||c&&a&&a.video&&!le(c,a.video)?!1:!0})}function ee(a){a.textStreams=a.textStreams.filter(function(b){return Cd(wd(b.mimeType,b.codecs))})}
142
- function fe(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(me.has(f)){l.D(5);break}g=ne.get(f);if(!g){me.set(f,!1);l.D(5);break}return B(l,oe(g),7);case 7:h=l.h,me.set(f,h);case 5:(k=me.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,C(l)}})}
142
+ function fe(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.D(4);break}e=d.value;f=e.mimeType;if(me.has(f)){l.D(5);break}g=ne.get(f);if(!g){me.set(f,!1);l.D(5);break}return A(l,oe(g),7);case 7:h=l.h,me.set(f,h);case 5:(k=me.get(f))&&b.push(e);d=c.next();l.D(2);break;case 4:a.imageStreams=b,B(l)}})}
143
143
  function oe(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function le(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
144
144
  function pe(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
145
145
  kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
@@ -162,33 +162,33 @@ k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidt
162
162
  q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.B&&this.l)a:{if(!this.F){a=this.i;if(!(a.g>=a.i))break a;this.F=!0}else if(Date.now()-this.B<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(Ee(this));a&&this.m(a)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(Ee(this))};q.setVariants=function(a){this.A=a};q.playbackRateChanged=function(a){this.C=a};
163
163
  q.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.G.S(Fe)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function Ee(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
164
164
  function De(a,b,c,d){a&&(b=b.filter(function(e){return $d(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}M("shaka.abr.SimpleAbrManager",Ce);Ce.prototype.configure=Ce.prototype.configure;Ce.prototype.setMediaElement=Ce.prototype.setMediaElement;Ce.prototype.playbackRateChanged=Ce.prototype.playbackRateChanged;Ce.prototype.setVariants=Ce.prototype.setVariants;Ce.prototype.getBandwidthEstimate=Ce.prototype.getBandwidthEstimate;Ce.prototype.segmentDownloaded=Ce.prototype.segmentDownloaded;
165
- Ce.prototype.disable=Ce.prototype.disable;Ce.prototype.enable=Ce.prototype.enable;Ce.prototype.chooseVariant=Ce.prototype.chooseVariant;Ce.prototype.init=Ce.prototype.init;Ce.prototype.stop=Ce.prototype.stop;var Fe=1;function Ge(a,b){this.g=a;this.h=b}Ge.prototype.toString=function(){return"v"+this.g+"."+this.h};function He(){var a=new Ge(5,0),b=Ie,c=b.g,d=a.h-c.h;(0<(a.g-c.g||d)?b.i:b.h)(b.g,a,"AbrManager","Please use an AbrManager with setMediaElement function.")}function Je(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Le(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ie=null;function Me(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=r(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}Me.prototype.add=function(a){return Ne(this.h,a)?(this.g.add(a),!0):!1};
165
+ Ce.prototype.disable=Ce.prototype.disable;Ce.prototype.enable=Ce.prototype.enable;Ce.prototype.chooseVariant=Ce.prototype.chooseVariant;Ce.prototype.init=Ce.prototype.init;Ce.prototype.stop=Ce.prototype.stop;var Fe=1;function Ge(a,b){this.g=a;this.h=b}Ge.prototype.toString=function(){return"v"+this.g+"."+this.h};function He(){var a=new Ge(5,0),b=Ie,c=b.g,d=a.h-c.h;(0<(a.g-c.g||d)?b.i:b.h)(b.g,a,"AbrManager","Please use an AbrManager with setMediaElement function.")}function Je(a,b,c,d){Ua([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Ke(a,b,c,d){Ta([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Ie=null;function Me(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=r(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}Me.prototype.add=function(a){return Ne(this.h,a)?(this.g.add(a),!0):!1};
166
166
  function Ne(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&Oe(c,d)&&Pe(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(Oe(a,b)&&Pe(a.roles,b.roles)));return c?!1:!0}Me.prototype.values=function(){return this.g.values()};
167
167
  function Oe(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return zd(d)[0]});b=b.codecs.split(",").map(function(d){return zd(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function Pe(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function Qe(a){this.g=a;this.h=new Re(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Qe.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ne(b.g,d)});return c.length?new Me(c[0],c):this.h.create(a)};function Re(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
168
168
  Re.prototype.create=function(a){var b=[];b=Se(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Te(b,this.j);a.length&&(b=a);this.g&&(a=Pd(b,this.g),a.length&&(b=a));this.h&&(a=Ue(b,this.h),a.length&&(b=a));a=new Me(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ne(a.h,c)&&a.add(c);return a};function Se(a,b){b=Mb(b);var c=Ub(b,a.map(function(d){return Tb(d)}));return c?a.filter(function(d){return c==Tb(d)}):[]}
169
169
  function Te(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ue(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ve(){this.g=We;this.h=(new Map).set(We,2).set(Xe,1)}function Ye(a,b,c){a.h.set(We,c).set(Xe,b)}var Xe=0,We=1;function Ze(a,b){var c=$e();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=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}
170
- function af(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.A);return B(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;C(d)})}function $e(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function bf(a,b){this.promise=a;this.i=b;this.g=!1}function cf(a){return new bf(Promise.reject(a),function(){return Promise.resolve()})}function df(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new bf(a,function(){return Promise.resolve()})}function ef(a){return new bf(Promise.resolve(a),function(){return Promise.resolve()})}function ff(a){return new bf(a,function(){return a.catch(function(){})})}bf.prototype.abort=function(){this.g=!0;return this.i()};
170
+ function af(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new P(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.A);return A(d,new Promise(function(e){(new Q(e)).S(c/1E3)}),2)}a.h*=a.m;B(d)})}function $e(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function bf(a,b){this.promise=a;this.i=b;this.g=!1}function cf(a){return new bf(Promise.reject(a),function(){return Promise.resolve()})}function df(){var a=Promise.reject(new P(2,7,7001));a.catch(function(){});return new bf(a,function(){return Promise.resolve()})}function ef(a){return new bf(Promise.resolve(a),function(){return Promise.resolve()})}function ff(a){return new bf(a,function(){return a.catch(function(){})})}bf.prototype.abort=function(){this.g=!0;return this.i()};
171
171
  function gf(a){return new bf(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}bf.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
172
172
  bf.prototype.na=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=hf(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Lc,g=new P(2,7,7001);this.promise.then(c(!0),c(!1));return new bf(f,function(){return d()})};
173
- function hf(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()}}}M("shaka.util.AbortableOperation",bf);bf.prototype.chain=bf.prototype.na;bf.prototype["finally"]=bf.prototype.finally;bf.all=gf;bf.prototype.abort=bf.prototype.abort;bf.notAbortable=ff;bf.completed=ef;bf.aborted=df;bf.failed=cf;function jf(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)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 Set;return b(a)}function kf(a){var b={},c;for(c in a)b[c]=a[c];return b};function lf(){this.g=[]}function mf(a,b){a.g.push(b.finally(function(){dc(a.g,b)}))}lf.prototype.destroy=function(){for(var a=[],b=r(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 nf(a,b,c){fb.call(this);this.i=!1;this.m=new lf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(nf,fb);q=nf.prototype;q.Ge=function(a){this.A=a};function of(a,b,c,d){c=c||pf;var e=qf[a];if(!e||c>=e.priority)qf[a]={priority:c,dh:b,eh:void 0===d?!1:d}}q.fh=function(a){this.g.add(a)};q.wh=function(a){this.g.delete(a)};q.eg=function(){this.g.clear()};q.gh=function(a){this.h.add(a)};q.xh=function(a){this.h.delete(a)};q.fg=function(){this.h.clear()};
173
+ function hf(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()}}}M("shaka.util.AbortableOperation",bf);bf.prototype.chain=bf.prototype.na;bf.prototype["finally"]=bf.prototype.finally;bf.all=gf;bf.prototype.abort=bf.prototype.abort;bf.notAbortable=ff;bf.completed=ef;bf.aborted=df;bf.failed=cf;function jf(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)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 Set;return b(a)}function kf(a){var b={},c;for(c in a)b[c]=a[c];return b};function lf(){this.g=[]}function mf(a,b){a.g.push(b.finally(function(){dc(a.g,b)}))}lf.prototype.destroy=function(){for(var a=[],b=r(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 nf(a,b,c){fb.call(this);this.i=!1;this.m=new lf;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.B=c||null;this.A=!1}u(nf,fb);q=nf.prototype;q.He=function(a){this.A=a};function of(a,b,c,d){c=c||pf;var e=qf[a];if(!e||c>=e.priority)qf[a]={priority:c,fh:b,gh:void 0===d?!1:d}}q.hh=function(a){this.g.add(a)};q.yh=function(a){this.g.delete(a)};q.gg=function(){this.g.clear()};q.ih=function(a){this.h.add(a)};q.Ah=function(a){this.h.delete(a)};q.hg=function(){this.h.clear()};
174
174
  function rf(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();fb.prototype.release.call(this);return this.m.destroy()};
175
175
  q.request=function(a,b){var c=this,d=new sf;if(this.i){var e=Promise.reject(new P(2,7,7001));e.catch(function(){});return new tf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?jf(b.retryParameters):$e();b.uris=jf(b.uris);e=uf(this,a,b);var f=e.na(function(){return vf(c,a,b,new Ze(b.retryParameters,!1),0,null,d)}),g=f.na(function(p){return wf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
176
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Qg||!c.l||t.fromCache||a!=xf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new tf(m.promise,function(){return m.abort()},d);mf(this.m,e);return e};
176
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.na(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Sg||!c.l||t.fromCache||a!=xf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new tf(m.promise,function(){return m.abort()},d);mf(this.m,e);return e};
177
177
  function uf(a,b,c){var d=ef(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Wd:e.Wd},f=a.next())e.Wd=f.value,d=d.na(function(g){return function(){c.body&&(c.body=Fc(c.body));return g.Wd(b,c)}}(e));return d.na(void 0,function(g){if(g instanceof P&&7001==g.code)throw g;throw new P(2,1,1006,g);})}
178
- function vf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new lb(c.uris[e]),k=h.Wa,l=!1;k||(k=location.protocol,k=k.slice(0,-1),mb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=qf[k])?k.dh:null;if(!m)return cf(new P(2,1,1E3,h));var p=k.eh,n=null,t=null,x=!1,y=!1,v;return ff(af(d)).na(function(){if(a.i)return df();v=Date.now();var w=m(c.uris[e],c,b,function(D,G,F){n&&n.stop();t&&t.S(z/1E3);a.l&&b==xf&&(a.l(D,G),l=!0,g.g=F)},function(D){a.j&&a.j(D,c,b);y=!0});
179
- if(!p)return w;var A=c.retryParameters.connectionTimeout;A&&(n=new Q(function(){x=!0;w.abort()}),n.S(A/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new Q(function(){x=!0;w.abort()}));return w}).na(function(w){n&&n.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-v);var A={response:w,Qg:l};!y&&a.j&&a.j(w.headers,c,b);return A},function(w){n&&n.stop();t&&t.stop();if(a.B){var A=null,z=0;w instanceof P&&(A=w,1001==w.code&&(z=w.data[1]));a.B(c,A,z,x)}if(a.i)return df();x&&(w=new P(1,1,1003,
180
- c.uris[e],b));if(w instanceof P){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return A=(new Map).set("error",w),A=new O("retry",A),a.dispatchEvent(A),e=(e+1)%c.uris.length,vf(a,b,c,d,e,w,g)}throw w;})}
178
+ function vf(a,b,c,d,e,f,g){a.A&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new lb(c.uris[e]),k=h.Ya,l=!1;k||(k=location.protocol,k=k.slice(0,-1),mb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=qf[k])?k.fh:null;if(!m)return cf(new P(2,1,1E3,h));var p=k.gh,n=null,t=null,y=!1,x=!1,v;return ff(af(d)).na(function(){if(a.i)return df();v=Date.now();var w=m(c.uris[e],c,b,function(D,G,F){n&&n.stop();t&&t.S(z/1E3);a.l&&b==xf&&(a.l(D,G),l=!0,g.g=F)},function(D){a.j&&a.j(D,c,b);x=!0});
179
+ if(!p)return w;var C=c.retryParameters.connectionTimeout;C&&(n=new Q(function(){y=!0;w.abort()}),n.S(C/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new Q(function(){y=!0;w.abort()}));return w}).na(function(w){n&&n.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-v);var C={response:w,Sg:l};!x&&a.j&&a.j(w.headers,c,b);return C},function(w){n&&n.stop();t&&t.stop();if(a.B){var C=null,z=0;w instanceof P&&(C=w,1001==w.code&&(z=w.data[1]));a.B(c,C,z,y)}if(a.i)return df();y&&(w=new P(1,1,1003,
180
+ c.uris[e],b));if(w instanceof P){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return C=(new Map).set("error",w),C=new O("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,vf(a,b,c,d,e,w,g)}throw w;})}
181
181
  function wf(a,b,c){var d=ef(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Xd:e.Xd},f=a.next())e.Xd=f.value,d=d.na(function(g){return function(){var h=c.response;h.data&&(h.data=Fc(h.data));return g.Xd(b,h)}}(e));return d.na(function(){return c},function(g){var h=2;if(g instanceof P){if(7001==g.code)throw g;h=g.severity}throw new P(h,1,1007,g);})}M("shaka.net.NetworkingEngine",nf);nf.prototype.request=nf.prototype.request;nf.prototype.destroy=nf.prototype.destroy;nf.makeRequest=rf;
182
- nf.defaultRetryParameters=function(){return $e()};nf.prototype.clearAllResponseFilters=nf.prototype.fg;nf.prototype.unregisterResponseFilter=nf.prototype.xh;nf.prototype.registerResponseFilter=nf.prototype.gh;nf.prototype.clearAllRequestFilters=nf.prototype.eg;nf.prototype.unregisterRequestFilter=nf.prototype.wh;nf.prototype.registerRequestFilter=nf.prototype.fh;nf.unregisterScheme=function(a){delete qf[a]};nf.registerScheme=of;nf.prototype.setForceHTTPS=nf.prototype.Ge;function sf(){this.g=0}
183
- nf.NumBytesRemainingClass=sf;function tf(a,b,c){bf.call(this,a,b);this.h=c}u(tf,bf);nf.PendingRequest=tf;var xf=1;nf.RequestType={MANIFEST:0,SEGMENT:xf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var pf=3;nf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:pf};var qf={};function yf(a){this.g=!1;this.h=new Lc;this.i=a}yf.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 zf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Af(){this.g=new db}q=Af.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new Bf(a,b,c,d),this.g.push(b,a))};q.Ea=function(a,b,c,d){function e(g){f.sc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.sc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.sc(),this.g.remove(b,e))}};
184
- q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.sc();this.g.g={}}};M("shaka.util.EventManager",Af);Af.prototype.removeAll=Af.prototype.Sb;Af.prototype.unlisten=Af.prototype.sc;Af.prototype.listenOnce=Af.prototype.Ea;Af.prototype.listen=Af.prototype.o;Af.prototype.release=Af.prototype.release;function Bf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Cf(a,d);this.target.addEventListener(b,c,this.g)}
182
+ nf.defaultRetryParameters=function(){return $e()};nf.prototype.clearAllResponseFilters=nf.prototype.hg;nf.prototype.unregisterResponseFilter=nf.prototype.Ah;nf.prototype.registerResponseFilter=nf.prototype.ih;nf.prototype.clearAllRequestFilters=nf.prototype.gg;nf.prototype.unregisterRequestFilter=nf.prototype.yh;nf.prototype.registerRequestFilter=nf.prototype.hh;nf.unregisterScheme=function(a){delete qf[a]};nf.registerScheme=of;nf.prototype.setForceHTTPS=nf.prototype.He;function sf(){this.g=0}
183
+ nf.NumBytesRemainingClass=sf;function tf(a,b,c){bf.call(this,a,b);this.h=c}u(tf,bf);nf.PendingRequest=tf;var xf=1;nf.RequestType={MANIFEST:0,SEGMENT:xf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var pf=3;nf.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:pf};var qf={};function yf(a){this.g=!1;this.h=new Lc;this.i=a}yf.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 zf(a,b){if(a.g){if(b instanceof P&&7003==b.code)throw b;throw new P(2,7,7003,b);}};function Af(){this.g=new db}q=Af.prototype;q.release=function(){this.Sb();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new Bf(a,b,c,d),this.g.push(b,a))};q.Fa=function(a,b,c,d){function e(g){f.sc(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.sc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.sc(),this.g.remove(b,e))}};
184
+ q.Sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ja(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.sc();this.g.g={}}};M("shaka.util.EventManager",Af);Af.prototype.removeAll=Af.prototype.Sb;Af.prototype.unlisten=Af.prototype.sc;Af.prototype.listenOnce=Af.prototype.Fa;Af.prototype.listen=Af.prototype.o;Af.prototype.release=Af.prototype.release;function Bf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Cf(a,d);this.target.addEventListener(b,c,this.g)}
185
185
  Bf.prototype.sc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Cf(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 Df(a)?b:b.capture||!1}
186
- function Df(a){var b=Ef;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}Ef=b}return b||!1}var Ef=void 0;function Ff(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Gf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Hf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function If(a,b){this.W=Hc(a);this.h=b==Jf;this.g=0}q=If.prototype;q.Ca=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.xg=function(){return this.W.byteLength};q.pb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Kf();}};q.ve=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Kf();}};q.R=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Kf();}};
187
- q.Hf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Kf();}};q.qc=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw Kf();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.W.byteLength)throw Kf();var b=Ec(this.W,this.g,a);this.g+=a;return b};
188
- q.skip=function(a){if(this.g+a>this.W.byteLength)throw Kf();this.g+=a};q.nh=function(a){if(this.g<a)throw Kf();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Kf();this.g=a};q.Tc=function(){for(var a=this.g;this.Ca()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Ec(this.W,a,this.g-a);this.g+=1;return dd(a)};function Kf(){return new P(2,3,3E3)}M("shaka.util.DataViewReader",If);If.prototype.readTerminatedString=If.prototype.Tc;If.prototype.seek=If.prototype.seek;If.prototype.rewind=If.prototype.nh;
189
- If.prototype.skip=If.prototype.skip;If.prototype.readBytes=If.prototype.Cb;If.prototype.readUint64=If.prototype.qc;If.prototype.readInt32=If.prototype.Hf;If.prototype.readUint32=If.prototype.R;If.prototype.readUint16=If.prototype.ve;If.prototype.readUint8=If.prototype.pb;If.prototype.getLength=If.prototype.xg;If.prototype.getPosition=If.prototype.oa;If.prototype.hasMoreData=If.prototype.Ca;var Jf=1;If.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Jf};function Lf(){this.i=[];this.h=[];this.g=!1}q=Lf.prototype;q.box=function(a,b){a=Mf(a);this.i[a]=Nf;this.h[a]=b;return this};q.X=function(a,b){a=Mf(a);this.i[a]=Of;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new If(a,0);for(this.g=!1;a.Ca()&&!this.g;)this.Dd(0,a,b,c)};
186
+ function Df(a){var b=Ef;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}Ef=b}return b||!1}var Ef=void 0;function Ff(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Gf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function Hf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function If(a,b){this.W=Hc(a);this.h=b==Jf;this.g=0}q=If.prototype;q.Da=function(){return this.g<this.W.byteLength};q.oa=function(){return this.g};q.zg=function(){return this.W.byteLength};q.qb=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Kf();}};q.we=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Kf();}};q.R=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Kf();}};
187
+ q.Jf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Kf();}};q.qc=function(){try{if(this.h){var a=this.W.getUint32(this.g,!0);var b=this.W.getUint32(this.g+4,!0)}else b=this.W.getUint32(this.g,!1),a=this.W.getUint32(this.g+4,!1)}catch(c){throw Kf();}if(2097151<b)throw new P(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Cb=function(a){if(this.g+a>this.W.byteLength)throw Kf();var b=Ec(this.W,this.g,a);this.g+=a;return b};
188
+ q.skip=function(a){if(this.g+a>this.W.byteLength)throw Kf();this.g+=a};q.ph=function(a){if(this.g<a)throw Kf();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Kf();this.g=a};q.Uc=function(){for(var a=this.g;this.Da()&&0!=this.W.getUint8(this.g);)this.g+=1;a=Ec(this.W,a,this.g-a);this.g+=1;return dd(a)};function Kf(){return new P(2,3,3E3)}M("shaka.util.DataViewReader",If);If.prototype.readTerminatedString=If.prototype.Uc;If.prototype.seek=If.prototype.seek;If.prototype.rewind=If.prototype.ph;
189
+ If.prototype.skip=If.prototype.skip;If.prototype.readBytes=If.prototype.Cb;If.prototype.readUint64=If.prototype.qc;If.prototype.readInt32=If.prototype.Jf;If.prototype.readUint32=If.prototype.R;If.prototype.readUint16=If.prototype.we;If.prototype.readUint8=If.prototype.qb;If.prototype.getLength=If.prototype.zg;If.prototype.getPosition=If.prototype.oa;If.prototype.hasMoreData=If.prototype.Da;var Jf=1;If.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Jf};function Lf(){this.i=[];this.h=[];this.g=!1}q=Lf.prototype;q.box=function(a,b){a=Mf(a);this.i[a]=Nf;this.h[a]=b;return this};q.X=function(a,b){a=Mf(a);this.i[a]=Of;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new If(a,0);for(this.g=!1;a.Da()&&!this.g;)this.Dd(0,a,b,c)};
190
190
  q.Dd=function(a,b,c,d){var e=b.oa();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.R(),g=b.R(),h=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.oa()+8>b.W.byteLength){this.g=!0;return}f=b.qc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Of){if(d&&b.oa()+4>b.W.byteLength){this.g=!0;return}m=b.R();l=m>>>24;m&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.oa(),b=0<d?b.Cb(d):new Uint8Array(0),b=new If(b,0),k({parser:this,partialOkay:c||
191
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.oa(),b.W.byteLength-b.oa()))}};function Pf(a){for(var b=Qf(a);a.reader.Ca()&&!a.parser.g;)a.parser.Dd(a.start+b,a.reader,a.partialOkay)}function Rf(a){for(var b=Qf(a),c=a.reader.R(),d=0;d<c&&(a.parser.Dd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Sf(a){return function(b){a(b.reader.Cb(b.reader.W.byteLength-b.reader.oa()))}}
191
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.oa(),b.W.byteLength-b.oa()))}};function Pf(a){for(var b=Qf(a);a.reader.Da()&&!a.parser.g;)a.parser.Dd(a.start+b,a.reader,a.partialOkay)}function Rf(a){for(var b=Qf(a),c=a.reader.R(),d=0;d<c&&(a.parser.Dd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Sf(a){return function(b){a(b.reader.Cb(b.reader.W.byteLength-b.reader.oa()))}}
192
192
  function Mf(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Tf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Qf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Lf);Lf.headerSize=Qf;Lf.typeToString=Tf;Lf.allData=Sf;Lf.sampleDescription=Rf;Lf.children=Pf;Lf.prototype.parseNext=Lf.prototype.Dd;Lf.prototype.parse=Lf.prototype.parse;Lf.prototype.stop=Lf.prototype.stop;
193
193
  Lf.prototype.fullBox=Lf.prototype.X;Lf.prototype.box=Lf.prototype.box;var Nf=0,Of=1;function Uf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Lf).box("moov",Pf).box("moof",Pf).X("pssh",function(c){if(!(1<c.version)){var d=Ec(c.reader.W,-12,c.size);b.data.push(d);b.g.push(od(c.reader.Cb(16)));if(0<c.version){d=c.reader.R();for(var e=0;e<d;e++){var f=od(c.reader.Cb(16));b.h.push(f)}}}}).parse(a)}
194
194
  function Vf(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=Hc(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=r(c),c=b.next();!c.done;c=b.next())c=nd(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Wf(a,b){a=Xf(a,b);return 1!=a.length?null:a[0]}function Yf(a,b,c){a=Zf(a,b,c);return 1!=a.length?null:a[0]}function Xf(a,b){var c=[];a=r(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function $f(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
@@ -197,738 +197,742 @@ function dg(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
197
197
  function gg(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}
198
198
  function hg(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 ig(a){a=Number(a);return 0===a%1?a:null}function jg(a){a=Number(a);return 0===a%1&&0<a?a:null}function kg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function lg(a){a=Number(a);return isNaN(a)?null:a}function mg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
199
199
  function ng(a,b){var c=new DOMParser,d=og.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;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function pg(a,b){try{var c=dd(a);return ng(c,b)}catch(d){return null}}
200
- var og=new Mc(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 sg(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.ba=this.$=!1;this.J=0;this.g=null;this.B=new Af;this.i=new Map;this.F=[];this.A=new Lc;this.h=null;this.m=function(d){c.A.reject(d);a.onError(d)};this.ea=new Map;this.ua=new Map;this.T=new Q(function(){return tg(c)});this.N=!1;this.K=[];this.P=!1;this.aa=(new Q(function(){ug(c)})).ka(b);this.A.catch(function(){});this.j=new yf(function(){return vg(c)});this.Y=!1;this.H=null}q=sg.prototype;q.destroy=function(){return this.j.destroy()};
201
- function vg(a){return K(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.A.reject(),a.aa.stop(),a.aa=null,a.T.stop(),a.T=null,B(b,wg(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return B(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:I(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.Y=!1,a.H=null,C(b)}})}q.configure=function(a){this.h=a};function xg(a,b,c){a.ba=!0;a.F=[];a.N=c;return yg(a,b)}
200
+ var og=new Mc(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 qg(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.I=new Set;this.l=this.C=null;this.ba=this.$=!1;this.J=0;this.g=null;this.B=new Af;this.i=new Map;this.F=[];this.A=new Lc;this.h=null;this.m=function(d){c.A.reject(d);a.onError(d)};this.ea=new Map;this.va=new Map;this.T=new Q(function(){return rg(c)});this.N=!1;this.K=[];this.P=!1;this.aa=(new Q(function(){ug(c)})).ka(b);this.A.catch(function(){});this.j=new yf(function(){return vg(c)});this.Y=!1;this.H=null}q=qg.prototype;q.destroy=function(){return this.j.destroy()};
201
+ function vg(a){return K(function(b){switch(b.g){case 1:return a.B.release(),a.B=null,a.A.reject(),a.aa.stop(),a.aa=null,a.T.stop(),a.T=null,A(b,wg(a),2);case 2:if(!a.l){b.D(3);break}E(b,4);return A(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:J(b);case 5:a.l=null;case 3:a.g=null,a.I.clear(),a.C=null,a.F=[],a.h=null,a.m=function(){},a.G=null,a.Y=!1,a.H=null,B(b)}})}q.configure=function(a){this.h=a};function xg(a,b,c){a.ba=!0;a.F=[];a.N=c;return yg(a,b)}
202
202
  function zg(a,b,c){a.F=c;a.N=0<c.length;return yg(a,b)}function Ag(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 Bg(a,g,[])}
203
- function yg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,y;return K(function(v){if(1==v.g){if(c=Cg(a))for(d=r(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(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=Ff(a.h.servers),Dg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Eg(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,Fg(t,Ff(a.h.servers),Ff(a.h.advanced||{}),a.h.keySystemsMapping);
204
- return B(v,ge(b,a.N,a.Y),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.$=!0,v.return(Promise.resolve());y=Bg(a,void 0,b);return v.return(g?y:y.catch(function(){}))})}function Gg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return B(c,a.H,3);case 3:return zf(a.j),c.return();case 2:return E(c,4),a.H=a.l.setMediaKeys(a.C),B(c,a.H,6);case 6:va(c,5);break;case 4:b=I(c),a.m(new P(2,6,6003,b.message));case 5:zf(a.j),C(c)}})}
205
- function Hg(a,b){return K(function(c){if(1==c.g)return B(c,Gg(a),2);Ig(a,b.initDataType,Ec(b.initData));C(c)})}
206
- q.Cc=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.C)return b.B.Ea(a,"encrypted",function(){b.m(new P(2,6,6010))}),d.return();b.l=a;b.B.Ea(b.l,"play",function(){for(var e=r(b.K),f=e.next();!f.done;f=e.next())Jg(b,f.value);b.P=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return wg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.F.length?B(d,
207
- Gg(b),2):d.D(2)}Kg(b);c||b.F.length||b.h.parseInbandPsshEnabled||b.B.o(b.l,"encrypted",function(e){return Hg(b,e)});C(d)})};
208
- function Lg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=rf([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Pb.request(5,b);return B(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ec(d.data);va(g,4);break;case 3:throw e=I(g),new P(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();
209
- E(g,6);return B(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=I(g),new P(2,6,6004,f.message);}})}function Mg(a,b){var c,d,e;return K(function(f){if(1==f.g)return B(f,Ng(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.cb=new Lc,d.push(e.cb);d.push(c.remove());return B(f,Promise.all(d),3)}a.i.delete(c);C(f)})}
210
- function Kg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Ig(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Ng(a,d.value);b.length||a.F.length||a.A.resolve();return a.A}function Ig(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Cc(c,e.value.initData)&&!Vc("Tizen 2"))return;0<a.i.size&&Og(a)&&(a.A.resolve(),a.A=new Lc,a.A.catch(function(){}));Pg(a,b,c,a.g.sessionType)}}
211
- function Qg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Rg(a){a=a.i.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}q.Hc=function(){var a=Infinity,b=this.i.keys();b=r(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.od=function(){return Gf(this.ua)};
212
- function Bg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x,y;return K(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=Sg(a,c,d);v.D(2);break}return B(v,Tg(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new P(2,6,6001);zf(a.j);E(v,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.I.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var w=
213
- f.keySystem;var A=d.get(f.keySystem);var z=[],D=[],G=[],F=[],H=new Set;Ug(A,z,G,D,F,H);var J=a.N?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:A[0].distinctiveIdentifierRequired,persistentStateRequired:A[0].persistentStateRequired,sessionType:A[0].sessionType||J,audioRobustness:A[0].audioRobustness||"",videoRobustness:A[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:D[0],initData:F,keyIds:H};A=r(A);for(z=A.next();!z.done;z=
214
- A.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);A=w}else A=f.keySystem,w=b.get(f.keySystem),z=[],D=[],G=[],F=[],H=new Set,Ug(w.drmInfos,z,G,D,F,H),A={keySystem:A,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
215
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:D[0],initData:F,keyIds:H};a.g=A;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return B(v,f.createMediaKeys(),6);case 6:return x=v.h,zf(a.j),a.C=x,a.$=!0,B(v,Lg(a),7);case 7:zf(a.j);va(v,0);break;case 4:y=I(v);zf(a.j,y);a.g=null;a.I.clear();if(y instanceof P)throw y;throw new P(2,6,6002,y.message);}})}
203
+ function yg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g){if(c=Cg(a))for(d=r(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(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=Ff(a.h.servers),Dg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Eg(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,Fg(t,Ff(a.h.servers),Ff(a.h.advanced||{}),a.h.keySystemsMapping);
204
+ return A(v,ge(b,a.N,a.Y),2)}y=g||Object.keys(a.h.servers).length;if(!y)return a.$=!0,v.return(Promise.resolve());x=Bg(a,void 0,b);return v.return(g?x:x.catch(function(){}))})}function Gg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.H){c.D(2);break}return A(c,a.H,3);case 3:return zf(a.j),c.return();case 2:return E(c,4),a.H=a.l.setMediaKeys(a.C),A(c,a.H,6);case 6:va(c,5);break;case 4:b=J(c),a.m(new P(2,6,6003,b.message));case 5:zf(a.j),B(c)}})}
205
+ function Hg(a,b){return K(function(c){if(1==c.g)return A(c,Gg(a),2);Ig(a,b.initDataType,Ec(b.initData));B(c)})}
206
+ q.Cc=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.C)return b.B.Fa(a,"encrypted",function(){b.m(new P(2,6,6010))}),d.return();b.l=a;b.B.Fa(b.l,"play",function(){for(var e=r(b.K),f=e.next();!f.done;f=e.next())Jg(b,f.value);b.P=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.B.o(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return wg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.F.length?A(d,
207
+ Gg(b),2):d.D(2)}Kg(b);c||b.F.length||b.h.parseInbandPsshEnabled||b.B.o(b.l,"encrypted",function(e){return Hg(b,e)});B(d)})};
208
+ function Lg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.C||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.D(2);break}b=rf([a.g.serverCertificateUri],a.h.retryParameters);E(g,3);c=a.G.Pb.request(5,b);return A(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Ec(d.data);va(g,4);break;case 3:throw e=J(g),new P(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();
209
+ E(g,6);return A(g,a.C.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=J(g),new P(2,6,6004,f.message);}})}function Mg(a,b){var c,d,e;return K(function(f){if(1==f.g)return A(f,Ng(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.eb=new Lc,d.push(e.eb);d.push(c.remove());return A(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
210
+ function Kg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Ig(a,d.initDataType,d.initData);c=r(a.F);for(d=c.next();!d.done;d=c.next())Ng(a,d.value);b.length||a.F.length||a.A.resolve();return a.A}function Ig(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Cc(c,e.value.initData)&&!Sc("Tizen 2"))return;0<a.i.size&&Og(a)&&(a.A.resolve(),a.A=new Lc,a.A.catch(function(){}));Pg(a,b,c,a.g.sessionType)}}
211
+ function Qg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Rg(a){a=a.i.keys();a=gb(a,function(b){return b.sessionId});return Array.from(a)}q.Hc=function(){var a=Infinity,b=this.i.keys();b=r(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.pd=function(){return Gf(this.va)};
212
+ function Bg(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){switch(v.g){case 1:d=new Map;if(c.length){e=Sg(a,c,d);v.D(2);break}return A(v,Tg(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new P(2,6,6001);zf(a.j);E(v,4);a.I.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.I.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.I.add(t.contentType.toLowerCase());if(c.length){var w=
213
+ f.keySystem;var C=d.get(f.keySystem);var z=[],D=[],G=[],F=[],H=new Set;Ug(C,z,G,D,F,H);var I=a.N?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||I,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:D[0],initData:F,keyIds:H};C=r(C);for(z=C.next();!z.done;z=
214
+ C.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),z=[],D=[],G=[],F=[],H=new Set,Ug(w.drmInfos,z,G,D,F,H),C={keySystem:C,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
215
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:D[0],initData:F,keyIds:H};a.g=C;if(!a.g.licenseServerUri)throw new P(2,6,6012,a.g.keySystem);return A(v,f.createMediaKeys(),6);case 6:return y=v.h,zf(a.j),a.C=y,a.$=!0,A(v,Lg(a),7);case 7:zf(a.j);va(v,0);break;case 4:x=J(v);zf(a.j,x);a.g=null;a.I.clear();if(x instanceof P)throw x;throw new P(2,6,6002,x.message);}})}
216
216
  function Sg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Eg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new P(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Ud:d.Ud},e=a.next())for(d.Ud=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
217
217
  l.Ud}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
218
- function Tg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,y,v;return K(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(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=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.D(4);break}k=h.value;if(!b.has(k)){w.D(3);break}l=b.get(k);E(w,6);return B(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
219
- w.h,w.return(c);case 6:I(w);case 7:zf(a.j);case 3:h=g.next();w.D(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){w.D(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();w.D(9);break}x=h.value;y=b.get(x);v=y.drmInfos.some(function(A){return!!A.licenseServerUri});if(v!=n){w.D(13);break}E(w,15);return B(w,navigator.requestMediaKeySystemAccess(x,[y]),17);case 17:return c=w.h,w.return(c);case 15:I(w);case 16:zf(a.j);case 13:h=t.next();w.D(12);break;case 11:return w.return(c)}})}
218
+ function Tg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v;return K(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new P(2,6,6E3);d=r(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=r(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.D(4);break}k=h.value;if(!b.has(k)){w.D(3);break}l=b.get(k);E(w,6);return A(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
219
+ w.h,w.return(c);case 6:J(w);case 7:zf(a.j);case 3:h=g.next();w.D(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){w.D(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();w.D(9);break}y=h.value;x=b.get(y);v=x.drmInfos.some(function(C){return!!C.licenseServerUri});if(v!=n){w.D(13);break}E(w,15);return A(w,navigator.requestMediaKeySystemAccess(y,[x]),17);case 17:return c=w.h,w.return(c);case 15:J(w);case 16:zf(a.j);case 13:h=t.next();w.D(12);break;case 11:return w.return(c)}})}
220
220
  function Cg(a){a=Ff(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){f=nd(f);e=nd(e);e={kty:"oct",kid:ld(f,!1),k:ld(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Ec(hd(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
221
221
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
222
- function Ng(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.B.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(k):Jg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Vg(a,k)});e={initData:null,initDataType:null,loaded:!1,re:Infinity,cb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return B(h,c.load(b),4);case 4:f=
223
- h.h;zf(a.j);if(!f)return a.i.delete(c),a.m(new P(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Og(a)&&a.A.resolve();return h.return(c);case 2:g=I(h),zf(a.j,g),a.i.delete(c),a.m(new P(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
224
- function Pg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.B.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(f):Jg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Vg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,re:Infinity,cb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&ld(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
222
+ function Ng(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.C.createSession("persistent-license")}catch(k){return d=new P(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.B.o(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(k):Jg(a,k)});a.B.o(c,"keystatuseschange",function(k){return Vg(a,k)});e={initData:null,initDataType:null,loaded:!1,se:Infinity,eb:null,type:"persistent-license"};a.i.set(c,e);E(h,2);return A(h,c.load(b),4);case 4:f=
223
+ h.h;zf(a.j);if(!f)return a.i.delete(c),a.m(new P(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Og(a)&&a.A.resolve();return h.return(c);case 2:g=J(h),zf(a.j,g),a.i.delete(c),a.m(new P(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
224
+ function Pg(a,b,c,d){try{var e=a.C.createSession(d)}catch(f){a.m(new P(2,6,6005,f.message));return}a.B.o(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.K.push(f):Jg(a,f)});a.B.o(e,"keystatuseschange",function(f){return Vg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,se:Infinity,eb:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof P||(b=new P(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&ld(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
225
225
  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.m(new P(2,6,6006,f.message,f,h))}})}
226
- function Jg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,y;K(function(v){switch(v.g){case 1:return c=b.target,a.h.logLicenseExchange&&ld(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=rf([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),
227
- Qg(a.g.keySystem)&&Wg(g),h=Date.now(),E(v,2),l=a.G.Pb.request(2,g),B(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=I(v),p=new P(2,6,6007,m),a.m(p),d&&d.cb&&d.cb.reject(p),v.return();case 3:if(a.j.g)return v.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ld(k.data);E(v,5);return B(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return n=I(v),t=new P(2,6,6008,n.message),a.m(t),d&&d.cb&&d.cb.reject(t),v.return();case 6:if(a.j.g)return v.return();x=new O("drmsessionupdate");a.G.onEvent(x);
228
- d&&(d.cb&&d.cb.resolve(),y=new Q(function(){d.loaded=!0;Og(a)&&a.A.resolve()}),y.S(Xg));C(v)}})}
226
+ function Jg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;K(function(v){switch(v.g){case 1:return c=b.target,a.h.logLicenseExchange&&ld(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=rf([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),
227
+ Qg(a.g.keySystem)&&Wg(g),h=Date.now(),E(v,2),l=a.G.Pb.request(2,g),A(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=J(v),p=new P(2,6,6007,m),a.m(p),d&&d.eb&&d.eb.reject(p),v.return();case 3:if(a.j.g)return v.return();a.J+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&ld(k.data);E(v,5);return A(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return n=J(v),t=new P(2,6,6008,n.message),a.m(t),d&&d.eb&&d.eb.reject(t),v.return();case 6:if(a.j.g)return v.return();y=new O("drmsessionupdate");a.G.onEvent(y);
228
+ d&&(d.eb&&d.eb.resolve(),x=new Q(function(){d.loaded=!0;Og(a)&&a.A.resolve()}),x.S(Xg));B(v)}})}
229
229
  function Wg(a){var b=ed(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=ng(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=md(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
230
- function Vg(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(Qg(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||Zc())){h=Hc(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=od(g).slice(0,32);a.ea.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.cb&&(a.i.delete(b),
231
- b.close().catch(function(){}));Og(a)&&(a.A.resolve(),a.T.S(Yg))}function tg(a){var b=a.ea,c=a.ua;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.m(new P(2,6,6014));a.G.Bd(Gf(c))}
230
+ function Vg(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(Qg(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||Zc())){h=Hc(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=od(g).slice(0,32);a.ea.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.eb&&(a.i.delete(b),
231
+ b.close().catch(function(){}));Og(a)&&(a.A.resolve(),a.T.S(Yg))}function rg(a){var b=a.ea,c=a.va;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.m(new P(2,6,6014));a.G.Bd(Gf(c))}
232
232
  function Zg(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
233
- n;return K(function(t){switch(t.g){case 1:E(t,2);if("org.w3.clearkey"===l&&$c())throw Error("Unsupported keySystem");return B(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Vc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),B(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:I(t),f.set(l,null),C(t)}})},h=a.map(function(l){return g(l)}),B(k,Promise.all(h),2)):k.return(Gf(f))})}
234
- function $g(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).S(ah)}),E(c,2),B(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);I(c);C(c)})}
235
- function wg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return B(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return E(g,2),a.ba||a.F.includes(e.sessionId)||"persistent-license"!==f.type?B(g,$g(e),5):B(g,e.remove(),5);if(2!=g.g)return va(g,0);I(g);C(g)})})),0)})}
236
- function bh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Ua:e.Ua},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Ua=[];e.Ua=e.Ua.concat(d.initData||[]);e.Ua=e.Ua.concat(g.initData||[]);e.Ua=e.Ua.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Ua.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ja(d.keyIds),ja(g.keyIds))):
233
+ n;return K(function(t){switch(t.g){case 1:E(t,2);if("org.w3.clearkey"===l&&$c())throw Error("Unsupported keySystem");return A(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,Sc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),A(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:J(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),A(k,Promise.all(h),2)):k.return(Gf(f))})}
234
+ function $g(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).S(ah)}),E(c,2),A(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);J(c);B(c)})}
235
+ function wg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return A(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return E(g,2),a.ba||a.F.includes(e.sessionId)||"persistent-license"!==f.type?A(g,$g(e),5):A(g,e.remove(),5);if(2!=g.g)return va(g,0);J(g);B(g)})})),0)})}
236
+ function bh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Wa:e.Wa},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Wa=[];e.Wa=e.Wa.concat(d.initData||[]);e.Wa=e.Wa.concat(g.initData||[]);e.Wa=e.Wa.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Wa.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ja(d.keyIds),ja(g.keyIds))):
237
237
  d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
238
- initData:e.Ua,keyIds:f});break}}return c}function Eg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function ug(a){a.i.forEach(function(b,c){var d=b.re,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.re=e)})}function Og(a){a=a.i.values();return hb(a,function(b){return b.loaded})}
238
+ initData:e.Wa,keyIds:f});break}}return c}function Eg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function ug(a){a.i.forEach(function(b,c){var d=b.se,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.se=e)})}function Og(a){a=a.i.values();return hb(a,function(b){return b.loaded})}
239
239
  function Dg(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=r(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)}
240
- function Ug(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ga:g.Ga},h=a.next()){g.Ga=h.value;b.includes(g.Ga.licenseServerUri)||b.push(g.Ga.licenseServerUri);d.includes(g.Ga.serverCertificateUri)||d.push(g.Ga.serverCertificateUri);g.Ga.serverCertificate&&(c.some(function(m){return function(p){return Cc(p,m.Ga.serverCertificate)}}(g))||c.push(g.Ga.serverCertificate));if(g.Ga.initData){h={};for(var k=r(g.Ga.initData),l=k.next();!l.done;h={bd:h.bd},l=k.next())h.bd=l.value,e.some(function(m){return function(p){var n=
241
- m.bd;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Cc(p.initData,n.initData)}}(h))||e.push(h.bd)}if(g.Ga.keyIds)for(h=r(g.Ga.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
240
+ function Ug(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={Ha:g.Ha},h=a.next()){g.Ha=h.value;b.includes(g.Ha.licenseServerUri)||b.push(g.Ha.licenseServerUri);d.includes(g.Ha.serverCertificateUri)||d.push(g.Ha.serverCertificateUri);g.Ha.serverCertificate&&(c.some(function(m){return function(p){return Cc(p,m.Ha.serverCertificate)}}(g))||c.push(g.Ha.serverCertificate));if(g.Ha.initData){h={};for(var k=r(g.Ha.initData),l=k.next();!l.done;h={cd:h.cd},l=k.next())h.cd=l.value,e.some(function(m){return function(p){var n=
241
+ m.cd;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Cc(p.initData,n.initData)}}(h))||e.push(h.cd)}if(g.Ha.keyIds)for(h=r(g.Ha.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
242
242
  function Fg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(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=
243
- 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 ah=1,Xg=5,Yg=.5,ch=new Mc(function(){return Fc(new Uint8Array([0]))});function dh(){}function eh(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=fh[d.toLowerCase()]))return k.return(e);if(f=gh(a))if(g=hh[f])return k.return(g);return d?k.D(2):B(k,ih(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=fh[d]))return k.return(h);throw new P(2,4,4E3,a);})}function ih(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=rf([a],c),d.method="HEAD",B(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
244
- function gh(a){a=(new lb(a)).Ka.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",dh);dh.unregisterParserByMime=function(a){delete fh[a]};dh.registerParserByMime=function(a,b){fh[a]=b};dh.registerParserByExtension=function(a,b){hh[a]=b};var fh={},hh={};function jh(a){function b(){d=!0}function c(l){f.push(l);Pf(l)}a=Ec(a);var d=!1,e,f=[],g=[];(new Lf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);Rf(l)}).X("encv",b).X("enca",b).X("hev1",function(l){g.push({box:l,Qb:1701733238})}).X("hvc1",function(l){g.push({box:l,Qb:1701733238})}).X("avc1",function(l){g.push({box:l,Qb:1701733238})}).X("avc3",function(l){g.push({box:l,Qb:1701733238})}).X("ac-3",function(l){g.push({box:l,Qb:1701733217})}).X("ec-3",
243
+ 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 ah=1,Xg=5,Yg=.5,ch=new Mc(function(){return Fc(new Uint8Array([0]))});function dh(){}function eh(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=fh[d.toLowerCase()]))return k.return(e);if(f=gh(a))if(g=hh[f])return k.return(g);return d?k.D(2):A(k,ih(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=fh[d]))return k.return(h);throw new P(2,4,4E3,a);})}function ih(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=rf([a],c),d.method="HEAD",A(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
244
+ function gh(a){a=(new lb(a)).Na.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",dh);dh.unregisterParserByMime=function(a){delete fh[a]};dh.registerParserByMime=function(a,b){fh[a]=b};dh.registerParserByExtension=function(a,b){hh[a]=b};var fh={},hh={};function jh(a){function b(){d=!0}function c(l){f.push(l);Pf(l)}a=Ec(a);var d=!1,e,f=[],g=[];(new Lf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).X("stsd",function(l){e=l;f.push(l);Rf(l)}).X("encv",b).X("enca",b).X("hev1",function(l){g.push({box:l,Qb:1701733238})}).X("hvc1",function(l){g.push({box:l,Qb:1701733238})}).X("avc1",function(l){g.push({box:l,Qb:1701733238})}).X("avc3",function(l){g.push({box:l,Qb:1701733238})}).X("ac-3",function(l){g.push({box:l,Qb:1701733217})}).X("ec-3",
245
245
  function(l){g.push({box:l,Qb:1701733217})}).X("mp4a",function(l){g.push({box:l,Qb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ab(od(a)),new P(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=kh(a,e,k.box,f,k.Qb);return a}
246
246
  function kh(a,b,c,d,e){var f=lh.value(),g=a.subarray(c.start,c.start+c.size),h=Hc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Hc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);mh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Rc()?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=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,mh(e,d.start,d.size+k.byteLength);k=Hc(e,b.start);b=Qf(b);a=k.getUint32(b);
247
- k.setUint32(b,a+1);return e}function mh(a,b,c){a=Hc(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 lh=new Mc(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 nh(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(D){return null!=D&&""!=D.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(D){return null!=D&&""!=D.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=oh(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],t=-1,x=-1,y=0;y<n.length;y++)if(null!=n[y]&&""!==n[y].g.trim()){t=y;break}for(y=n.length-1;0<=y;y--)if(null!=n[y]&&""!==n[y].g.trim()){x=y;break}if(-1===
248
- t||-1===x)n=ph(d,e),a.nestedCues.push(n);else{for(;t<=x;t++)if(y=n[t]){var v=y.l,w=y.i,A=y.j,z=y.h;if(v!=h||w!=k||A!=l||z!=m)p.payload&&a.nestedCues.push(p),p=oh(d,e,v,w,A,z),h=v,k=w,l=A,m=z;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=ph(d,e),a.nestedCues.push(p));p=oh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
247
+ k.setUint32(b,a+1);return e}function mh(a,b,c){a=Hc(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 lh=new Mc(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 nh(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(D){return null!=D&&""!=D.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(D){return null!=D&&""!=D.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=oh(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],t=-1,y=-1,x=0;x<n.length;x++)if(null!=n[x]&&""!==n[x].g.trim()){t=x;break}for(x=n.length-1;0<=x;x--)if(null!=n[x]&&""!==n[x].g.trim()){y=x;break}if(-1===
248
+ t||-1===y)n=ph(d,e),a.nestedCues.push(n);else{for(;t<=y;t++)if(x=n[t]){var v=x.l,w=x.i,C=x.j,z=x.h;if(v!=h||w!=k||C!=l||z!=m)p.payload&&a.nestedCues.push(p),p=oh(d,e,v,w,C,z),h=v,k=w,l=C,m=z;p.payload+=x.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=ph(d,e),a.nestedCues.push(p));p=oh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
249
249
  function oh(a,b,c,d,e,f){a=new gc(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function ph(a,b){a=new gc(a,b,"");a.lineBreak=!0;return a}function qh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function rh(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.A="black";sh(this)}function th(a,b,c){return nh(new gc(b,c,""),"CC"+(a.C<<1|a.B+1),a.i,b,c)}function sh(a){uh(a,0,15);a.g=1}function vh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case wh:d=xh.has(c)?xh.get(c):String.fromCharCode(c);break;case yh:d=zh.get(c);break;case Ah:a.i[a.g].pop();d=Bh.get(c);break;case Ch:a.i[a.g].pop(),d=Dh.get(c)}d&&a.i[a.g].push(new qh(d,a.m,a.j,a.A,a.l))}}
250
250
  function Eh(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 uh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
251
251
  var wh=0,yh=1,Ah=2,Ch=3,xh=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"]]),zh=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Bh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
252
252
  [35,"\u00da"],[36,"\u00dc"],[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"]]),Dh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
253
253
  [39,"\u00d5"],[40,"\u00f5"],[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"]]);function Fh(a,b){this.h=Gh;this.A=new rh(a,b);this.i=new rh(a,b);this.l=new rh(a,b);this.g=this.i;this.j=0;this.m=null}function Hh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Ih&&a.h!==Jh&&(e=th(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,uh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,uh(c,0,15),d.g=15);a.h=Ih;d.h=b;return e}function Kh(a){a.h=Lh;a.g=a.l;a.g.h=0}function Mh(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=Jh}
254
254
  var Gh=0,Lh=1,Ih=3,Jh=4,Nh="black green blue cyan red yellow magenta black".split(" "),Oh="white green blue cyan red yellow magenta white_italics".split(" ");function Ph(){this.l=!1;this.F=this.H=0;this.G=Qh;this.i=[];this.g=this.h=this.j=0;this.C=this.A=!1;this.B="white";this.m="black";Rh(this)}function Rh(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Sh())}function Sh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Th(a,b){Uh(a)&&(a.i[a.h][a.g]=new qh(b,a.C,a.A,a.m,a.B),a.g++)}function Uh(a){var b=a.g<a.F&&0<=a.g;return a.h<a.H&&0<=a.h&&b}Ph.prototype.isVisible=function(){return this.l};
255
- function Vh(a,b,c){var d=new gc(a.j,b,"");d.textAlign=a.G===Wh?"left":a.G===Xh?"right":kc;if(c=nh(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Wh=0,Xh=1,Qh=2;function Yh(){this.i=[];this.h=null;this.g=0}function Zh(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 $h(a.h)),a.h=null,a.g=0))}function $h(a){this.g=0;this.h=a}$h.prototype.Ca=function(){return this.g<this.h.length};$h.prototype.oa=function(){return this.g};function ai(a){if(!a.Ca())throw new P(2,2,3E3);return a.h[a.g++]}$h.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function bi(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
255
+ function Vh(a,b,c){var d=new gc(a.j,b,"");d.textAlign=a.G===Wh?"left":a.G===Xh?"right":kc;if(c=nh(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Wh=0,Xh=1,Qh=2;function Yh(){this.i=[];this.h=null;this.g=0}function Zh(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 $h(a.h)),a.h=null,a.g=0))}function $h(a){this.g=0;this.h=a}$h.prototype.Da=function(){return this.g<this.h.length};$h.prototype.oa=function(){return this.g};function ai(a){if(!a.Da())throw new P(2,2,3E3);return a.h[a.g++]}$h.prototype.skip=function(a){if(this.g+a>this.h.length)throw new P(2,2,3E3);this.g+=a};function bi(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
256
256
  function ci(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=ai(b).value;b=null;c=r(di(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Vh(e,d,a.i)),Rh(e);return b}if(137===c)for(b=ai(b).value,b=r(di(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=ai(b).value;b=null;c=r(di(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Vh(e,d,a.i)),e.l=!1;return b}if(139===c){c=ai(b).value;
257
257
  b=null;c=r(di(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Vh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=ai(b).value,ei(a,b,d);if(143===c)return d=ei(a,255,d),fi(a),d;if(144===c)b.skip(1),d=ai(b).value,a.g&&(a.g.A=0<(d&128),a.g.C=0<(d&64));else if(145===c)d=ai(b).value,c=ai(b).value,b.skip(1),a.g&&(b=gi((c&48)>>4,(c&12)>>2,c&3),a.g.B=gi((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=ai(b).value,b=ai(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
258
258
  b.skip(1),d=ai(b).value,b.skip(1),a.g&&(a.g.G=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Ph;f.j=d;a.h[c]=f}d=ai(b).value;ai(b);ai(b);f=ai(b).value;var g=ai(b).value;b=ai(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.m="black");b=a.h[c];b.l=0<(d&32);b.H=(f&15)+1;b.F=(g&63)+1;a.g=a.h[c]}}}return null}function di(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
259
259
  function ei(a,b,c){var d=null;b=r(di(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Vh(f,c,a.i));a.h[e]=null}return d}function fi(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function gi(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return hi[a<<2|b<<1|c]}
260
260
  var ii=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"]]),hi="black blue green cyan red magenta yellow white".split(" ");function ji(){this.h=[];this.g=[];this.i=new Yh;this.l=0;this.B=new Map([["CC1",new Fh(0,0)],["CC2",new Fh(0,1)],["CC3",new Fh(1,0)],["CC4",new Fh(1,1)]]);this.A=this.m=0;this.j=new Map;ki(this)}function ki(a){a.m=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,sh(b.i),sh(b.l),sh(b.A)}
261
261
  function li(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=mi(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Zh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=ni(a,e.value),c.push.apply(c,ja(e));a.i.i=[];a.h=[];a.g=[];return c}
262
- function mi(a,b){var c=b.type;if(16===(b.Oa&112)){var d=b.Oa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Oa&&255===b.ib||!b.Oa&&!b.ib||!oi(b.Oa)||!oi(b.ib))return 45<=++a.l&&ki(a),null;a.l=0;b.Oa&=127;b.ib&=127;if(!b.Oa&&!b.ib)return null;a=null;if(16===(b.Oa&112))a:{d=b.Oa;a=b.ib;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];var e=(a&30)>>1;d="white";var f=!1;7>e?d=Oh[e]:7===e&&(f=!0);
262
+ function mi(a,b){var c=b.type;if(16===(b.Qa&112)){var d=b.Qa>>3&1;0===c?a.m=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.m)+1));if(255===b.Qa&&255===b.jb||!b.Qa&&!b.jb||!oi(b.Qa)||!oi(b.jb))return 45<=++a.l&&ki(a),null;a.l=0;b.Qa&=127;b.jb&=127;if(!b.Qa&&!b.jb)return null;a=null;if(16===(b.Qa&112))a:{d=b.Qa;a=b.jb;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];var e=(a&30)>>1;d="white";var f=!1;7>e?d=Oh[e]:7===e&&(f=!0);
263
263
  a=1===(a&1);if(c.h!==Jh){e=c.g;if(c.h===Ih&&b!==e.g){var g=1+b-e.h;Eh(e,g,1+e.g-e.h,e.h);uh(e,0,g-1);uh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.A="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",vh(c.g,wh,32),d=!1,b=Oh[(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=Nh[(a&14)>>1]),c.g.A=b;else if(17===(d&247)&&48===(a&240))vh(c.g,yh,a);else if(18===
264
- (d&246)&&32===(a&224))vh(c.g,d&1?Ch:Ah,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.ib){case 32:Kh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Hh(c,2,a);break;case 38:d=Hh(c,3,a);break;case 39:d=Hh(c,4,a);break;case 40:vh(c.g,wh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:sh(c.A);Mh(c);break;case 43:Mh(c);break;case 44:b=c.i;d=null;c.h!==Jh&&(d=th(b,c.j,a));uh(b,0,15);break;case 45:b=c.g;c.h!==Ih?d=null:(d=th(b,c.j,a),f=b.g-b.h+1,Eh(b,f-1,f,b.h),uh(b,0,
265
- f-1),uh(b,b.g,15-b.g),c.j=a);break;case 46:uh(c.l,0,15);break;case 47:b=null,c.h!==Jh&&(b=th(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Kh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.ib,vh(c.g,wh,b.Oa),vh(c.g,wh,d);return a}
266
- function ni(a,b){var c=[];try{for(;b.Ca();){var d=ai(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=ai(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new bi(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=ai(e),l=k.value,m=k.pts;if(16===l){var p=ai(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Uh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Vh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var x=0,y=1;16>y;y++,
267
- x++)n.i[x]=n.i[y];for(y=0;1>y;y++,x++)n.i[x]=Sh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Vh(t,n,g.i));t.i[t.h]=Sh();t.g=0;break;case 12:t.isVisible()&&(e=Vh(t,n,g.i)),Rh(t),n=t,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=ci(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Th(g.g,"\u266a"):Th(g.g,
268
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Th(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ii.has(e)){var w=ii.get(e);Th(g.g,w)}else Th(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Th(g.g,"_"):Th(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(A){if(A instanceof P&&3E3===A.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw A;}return c}function oi(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function pi(a,b){var c=null,d=null,e=a.R();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:e,pf:c,ig:d}}function qi(a,b){return{cf:1==b?a.qc():a.R()}}function ri(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
269
- function si(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={ze:null,sampleSize:null,Hd:null};c&256&&(g.ze=a.R());c&512&&(g.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(g.Hd=0==b?a.R():a.Hf());e.push(g)}return{ej:d,Jf:e}};function ti(){this.i=new Map;this.h=this.g=0}
264
+ (d&246)&&32===(a&224))vh(c.g,d&1?Ch:Ah,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.jb){case 32:Kh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Hh(c,2,a);break;case 38:d=Hh(c,3,a);break;case 39:d=Hh(c,4,a);break;case 40:vh(c.g,wh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:sh(c.A);Mh(c);break;case 43:Mh(c);break;case 44:b=c.i;d=null;c.h!==Jh&&(d=th(b,c.j,a));uh(b,0,15);break;case 45:b=c.g;c.h!==Ih?d=null:(d=th(b,c.j,a),f=b.g-b.h+1,Eh(b,f-1,f,b.h),uh(b,0,
265
+ f-1),uh(b,b.g,15-b.g),c.j=a);break;case 46:uh(c.l,0,15);break;case 47:b=null,c.h!==Jh&&(b=th(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Kh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.jb,vh(c.g,wh,b.Qa),vh(c.g,wh,d);return a}
266
+ function ni(a,b){var c=[];try{for(;b.Da();){var d=ai(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=ai(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new bi(e));for(var g=a.j.get(e),h=b.oa();b.oa()-h<f;){e=b;var k=ai(e),l=k.value,m=k.pts;if(16===l){var p=ai(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Uh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.F-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Vh(t,n,g.i));if(t.h+1>=t.H){n=t;for(var y=0,x=1;16>x;x++,
267
+ y++)n.i[y]=n.i[x];for(x=0;1>x;x++,y++)n.i[y]=Sh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Vh(t,n,g.i));t.i[t.h]=Sh();t.g=0;break;case 12:t.isVisible()&&(e=Vh(t,n,g.i)),Rh(t),n=t,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=ci(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Th(g.g,"\u266a"):Th(g.g,
268
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Th(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(ii.has(e)){var w=ii.get(e);Th(g.g,w)}else Th(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Th(g.g,"_"):Th(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(C){if(C instanceof P&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function oi(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function pi(a,b){var c=null,d=null,e=a.R();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.R());b&16&&(d=a.R());return{trackId:e,rf:c,kg:d}}function qi(a,b){return{ef:1==b?a.qc():a.R()}}function ri(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.R()}}
269
+ function si(a,b,c){var d=a.R(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Ae:null,sampleSize:null,Hd:null};c&256&&(g.Ae=a.R());c&512&&(g.sampleSize=a.R());c&1024&&a.skip(4);c&2048&&(g.Hd=0==b?a.R():a.Jf());e.push(g)}return{gj:d,Lf:e}};function ti(){this.i=new Map;this.h=this.g=0}
270
270
  ti.prototype.init=function(a){var b=this,c=[],d=[];(new Lf).box("moov",Pf).box("mvex",Pf).X("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.R();f=f.R();b.g=e;b.h=f}).box("trak",Pf).X("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.R();c.push(e)}).box("mdia",Pf).X("mdhd",function(e){e=ri(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new P(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
271
- ti.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Lf).box("moof",Pf).box("traf",Pf).X("trun",function(k){f=si(k.reader,k.version,k.flags).Jf}).X("tfhd",function(k){k=pi(k.reader,k.flags);d=k.pf||b.g;e=k.ig||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=qi(k.reader,k.version).cf}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,t=f,x=0,y=n;for(t.length&&(y=t[0].sampleSize||n);k.Ca();){var v=k.R();if(6==
272
- (k.pb()&31)){var w=0;t.length>x&&(w=t[x].Hd||0);w=(l+w)/m;for(var A=[],z,D=k.Cb(v-1),G=z=0;G<D.length;)2==z&&3==D[G]?(z=0,D=[].concat(ja(D)),D.splice(G,1),D=new Uint8Array(D)):0==D[G]?z++:z=0,G++;z=D;for(G=0;G<z.length;){for(D=0;255==z[G];)D+=255,G++;D+=z[G++];for(var F=0;255==z[G];)F+=255,G++;F+=z[G++];4==D&&A.push(z.subarray(G,G+F));G+=F}A=r(A);for(z=A.next();!z.done;z=A.next())c.push({bh:z.value,pts:w})}else try{k.skip(v-1)}catch(H){break}y-=v+4;0==y&&(l=t.length>x?l+(t[x].ze||p):l+p,x++,y=t.length>
273
- x?t[x].sampleSize||n:n)}}).parse(a,!1);return c};function ui(){this.h=new ti;this.g=new ji}ui.prototype.init=function(a){this.h.init(a)};
274
- function vi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Ec(d.bh);if(0<e.length&&(c=a.g,d=d.pts,e=new If(e,0),181===e.pb()&&49===e.ve()&&1195456820===e.R()&&3===e.pb())){var f=e.pb();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.pb(),k=(h&4)>>2,l=e.pb(),m=e.pb();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Oa:l,ib:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return li(a.g)}
275
- ;function wi(a,b,c,d){this.Pa=a;this.Ta=b;this.Ba=c;this.me=void 0===d?null:d}wi.prototype.Kc=function(){return this.Ta};wi.prototype.Gc=function(){return this.Ba};function xi(a,b){return a&&b?a.Kc()==b.Kc()&&a.Gc()==b.Gc()&&fc(a.Pa(),b.Pa()):a==b}M("shaka.media.InitSegmentReference",wi);wi.prototype.getEndByte=wi.prototype.Gc;wi.prototype.getStartByte=wi.prototype.Kc;
276
- function yi(a,b,c,d,e,f,g,h,k,l,m,p,n,t,x){l=void 0===l?[]:l;t=void 0===t?zi:t;this.startTime=a;this.j=this.endTime=b;this.A=c;this.Ta=d;this.Ba=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.m=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.l=void 0===x?null:x}q=yi.prototype;q.Pa=function(){return this.A()};q.getStartTime=function(){return this.startTime};q.vg=function(){return this.endTime};q.Kc=function(){return this.Ta};
277
- q.Gc=function(){return this.Ba};q.Ng=function(){return this.tilesLayout};q.Mg=function(){return this.m};q.fc=function(){return this.status};q.Wg=function(){this.status=Ai};M("shaka.media.SegmentReference",yi);yi.prototype.markAsUnavailable=yi.prototype.Wg;yi.prototype.getStatus=yi.prototype.fc;yi.prototype.getTileDuration=yi.prototype.Mg;yi.prototype.getTilesLayout=yi.prototype.Ng;yi.prototype.getEndByte=yi.prototype.Gc;yi.prototype.getStartByte=yi.prototype.Kc;yi.prototype.getEndTime=yi.prototype.vg;
278
- yi.prototype.getStartTime=yi.prototype.getStartTime;yi.prototype.getUris=yi.prototype.Pa;var zi=0,Ai=1;yi.Status={Hh:zi,Vi:Ai,ii:2};function Bi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Di(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
271
+ ti.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Lf).box("moof",Pf).box("traf",Pf).X("trun",function(k){f=si(k.reader,k.version,k.flags).Lf}).X("tfhd",function(k){k=pi(k.reader,k.flags);d=k.rf||b.g;e=k.kg||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).X("tfdt",function(k){g=qi(k.reader,k.version).ef}).box("mdat",function(k){if(null===g)throw new P(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,t=f,y=0,x=n;for(t.length&&(x=t[0].sampleSize||n);k.Da();){var v=k.R();if(6==
272
+ (k.qb()&31)){var w=0;t.length>y&&(w=t[y].Hd||0);w=(l+w)/m;for(var C=[],z,D=k.Cb(v-1),G=z=0;G<D.length;)2==z&&3==D[G]?(z=0,D=[].concat(ja(D)),D.splice(G,1),D=new Uint8Array(D)):0==D[G]?z++:z=0,G++;z=D;for(G=0;G<z.length;){for(D=0;255==z[G];)D+=255,G++;D+=z[G++];for(var F=0;255==z[G];)F+=255,G++;F+=z[G++];4==D&&C.push(z.subarray(G,G+F));G+=F}C=r(C);for(z=C.next();!z.done;z=C.next())c.push({eh:z.value,pts:w})}else try{k.skip(v-1)}catch(H){break}x-=v+4;0==x&&(l=t.length>y?l+(t[y].Ae||p):l+p,y++,x=t.length>
273
+ y?t[y].sampleSize||n:n)}}).parse(a,!1);return c};function ui(){this.h=new ti;this.g=new ji}ui.prototype.init=function(a){this.h.init(a)};
274
+ function vi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Ec(d.eh);if(0<e.length&&(c=a.g,d=d.pts,e=new If(e,0),181===e.qb()&&49===e.we()&&1195456820===e.R()&&3===e.qb())){var f=e.qb();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.qb(),k=(h&4)>>2,l=e.qb(),m=e.qb();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Qa:l,jb:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return li(a.g)}
275
+ ;function wi(a,b,c,d){this.Ra=a;this.Va=b;this.Ca=c;this.me=void 0===d?null:d}wi.prototype.Kc=function(){return this.Va};wi.prototype.Gc=function(){return this.Ca};function xi(a,b){return a&&b?a.Kc()==b.Kc()&&a.Gc()==b.Gc()&&fc(a.Ra(),b.Ra()):a==b}M("shaka.media.InitSegmentReference",wi);wi.prototype.getEndByte=wi.prototype.Gc;wi.prototype.getStartByte=wi.prototype.Kc;
276
+ function yi(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){l=void 0===l?[]:l;t=void 0===t?zi:t;this.startTime=a;this.j=this.endTime=b;this.B=c;this.Va=d;this.Ca=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.A=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.l=void 0===y?null:y;this.m=0}q=yi.prototype;q.Ra=function(){return this.B()};q.getStartTime=function(){return this.startTime};q.xg=function(){return this.endTime};
277
+ q.Kc=function(){return this.Va};q.Gc=function(){return this.Ca};q.Pg=function(){return this.tilesLayout};q.Og=function(){return this.A};q.fc=function(){return this.status};q.Yg=function(){this.status=Ai};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=r(this.h),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};q.Pe=function(a){null==this.g?Ta("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};
278
+ M("shaka.media.SegmentReference",yi);yi.prototype.syncAgainst=yi.prototype.Pe;yi.prototype.offset=yi.prototype.offset;yi.prototype.markAsUnavailable=yi.prototype.Yg;yi.prototype.getStatus=yi.prototype.fc;yi.prototype.getTileDuration=yi.prototype.Og;yi.prototype.getTilesLayout=yi.prototype.Pg;yi.prototype.getEndByte=yi.prototype.Gc;yi.prototype.getStartByte=yi.prototype.Kc;yi.prototype.getEndTime=yi.prototype.xg;yi.prototype.getStartTime=yi.prototype.getStartTime;yi.prototype.getUris=yi.prototype.Ra;
279
+ var zi=0,Ai=1;yi.Status={Jh:zi,Xi:Ai,ki:2};function Bi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Ci(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Di(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
279
280
  function Ei(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(Fi(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}function Gi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Fi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
280
- function Fi(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};function Hi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.T=d||function(){};this.i={};this.B=new Af;this.A={};this.F=b;this.I=new Lc;this.l=Ii(this,this.I);this.G=new yf(function(){return Ji(e)});this.J="";this.C=!1;this.P=new Lc}function Ii(a,b){var c=new MediaSource;a.B.Ea(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=Ki(c);a.j.src=a.J;return c}q=Hi.prototype;q.destroy=function(){return this.G.destroy()};
281
- function Ji(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(Ab)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.A)b.push(a.A[k].destroy());return B(l,Promise.all(b),2)}a.B&&(a.B.release(),a.B=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.A={};a.F=null;a.i={};
282
- C(l)})}
283
- q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(p){if(1==p.g)return e=Jb,B(p,d.I,2);d.C=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Fa:f.Fa},h=g.next())f.Fa=h.value,k=a.get(f.Fa),l=wd(k.mimeType,k.codecs),f.Fa==e.ha?Li(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!rd(l,f.Fa)||(d.A[f.Fa]=new qd,l=td(f.Fa,l)),m=d.l.addSourceBuffer(l),d.B.o(m,"error",function(n){return function(){d.i[n.Fa][0].p.reject(new P(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.B.o(m,"updateend",
284
- function(n){return function(){return Mi(d,n.Fa)}}(f)),d.h[f.Fa]=m,d.N[f.Fa]=l,d.i[f.Fa]=[],d.K[f.Fa]=!!k.drmInfos.length);C(p)})};function Li(a,b,c){a.g||(a.g=new Bd(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Dd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function Ni(a){return a.l?"ended"==a.l.readyState:!0}function Oi(a,b){return b==Ib?a.g.g:Bi(Pi(a,b))}
285
- function Qi(a,b){return b==Ib?a.g.h:Ci(Pi(a,b))}function Ri(a,b,c){if(b==Ib)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Pi(a,b);return Ei(a,c)}q.jb=function(){var a={total:Fi(this.j.buffered),audio:Fi(Pi(this,"audio")),video:Fi(Pi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Pi(a,b){try{return a.h[b].buffered}catch(c){return null}}
286
- function Si(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,x,y,v,w,A,z,D,G,F;return K(function(H){switch(H.g){case 1:h=Jb;if(b!=h.ha){H.D(2);break}if(!a.C){H.D(3);break}return B(H,a.P,4);case 4:k=H.h,a.g.B=k;case 3:return B(H,Ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return H.return();case 2:if(!a.A[b]){e&&(a.g||Li(a,"text/vtt",a.C),d?(l=vi(a.F,c),l.length&&(m=a.h[h.Ia].timestampOffset,Ld(a.g,l,d.startTime,d.endTime,m))):a.F.init(c));H.D(6);break}f&&a.A[b].g.resetCaptions();
287
- return B(H,ud(a.A[b],c),7);case 7:p=H.h,a.g||Li(a,"text/vtt",a.C),p.metadata&&(n=a.h[b].timestampOffset,a.T(p.metadata,n,d?d.endTime:null)),p.captions&&p.captions.length&&(t=a.h[h.Ia].timestampOffset,x=Hd(p.captions),Ld(a.g,x,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ti(a,c,d?d.startTime:null,b);y=a.h[b];v=Ui;if(!a.C||y.mode==v||!d){H.D(8);break}w=b==h.Ia||!(h.Ia in a.h);if(!w){H.D(9);break}A=[y.appendWindowStart,y.appendWindowEnd];y.appendWindowStart=0;y.appendWindowEnd=Infinity;
288
- z=y.timestampOffset;y.timestampOffset=0;return B(H,Vi(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return B(H,Vi(a,b,function(){return Wi(a,b)}),11);case 11:return y.timestampOffset=z,y.appendWindowStart=A[0],y.appendWindowEnd=A[1],D=Bi(Pi(a,b)),G=(d.startTime||0)-(D||0),a.P.resolve(G),B(H,Vi(a,b,function(){return Xi(a,b,0,a.l.duration)}),12);case 12:if(b!=h.Ia){H.D(9);break}return B(H,Vi(a,b,function(){a.j.currentTime-=.001;Mi(a,b)}),9);case 9:y.mode=v;case 8:return d&&a.C&&b!=h.ha&&(f||g)&&
289
- (F=d.startTime,Vi(a,b,function(){return Wi(a,b)}),Vi(a,b,function(){var J=F;0>J&&(J+=.001);a.h[b].timestampOffset=J;Mi(a,b)})),B(H,Vi(a,b,function(){a.h[b].appendBuffer(c)}),15);case 15:C(H)}})}function Yi(a,b){var c=Qi(a,"video")||0;Gd(a.g,b,c)}function Zi(a){a.g&&Gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=Jb;return a==e.ha?B(f,d.g.remove(b,c),0):B(f,Vi(d,a,function(){return Xi(d,a,b,c)}),0)})};
290
- function $i(a,b){var c;return K(function(d){c=Jb;return b==c.ha?a.g?B(d,a.g.remove(0,Infinity),0):d.return():B(d,Vi(a,b,function(){return Xi(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=Jb;return a==c.ha?d.return():B(d,Vi(b,a,function(){b.j.currentTime-=.001;Mi(b,a)}),0)})};
291
- function aj(a,b,c,d,e,f){var g;return K(function(h){g=Jb;return b==g.ha?(f||(a.g.B=c),Fd(a.g,d,e),h.return()):B(h,Promise.all([Vi(a,b,function(){return Wi(a,b)}),f?Promise.resolve():Vi(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Mi(a,b)}),Vi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Mi(a,b)})]),0)})}
292
- q.endOfStream=function(a){var b=this;return K(function(c){return B(c,bj(b,function(){Ni(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.bb=function(a){var b=this;return K(function(c){return B(c,bj(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Lc};b.i[d].unshift(e)}b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function Xi(a,b,c,d){d<=c?Mi(a,b):a.h[b].remove(c,d)}
293
- function Wi(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Mi(a,b)}function Mi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),cj(a,b))}function Vi(a,b,c){zf(a.G);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&dj(a,b);return c.p}
294
- function bj(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:zf(a.G);c=[];d={};for(e in a.h)d.zc=new Lc,f={start:function(l){return function(){return l.zc.resolve()}}(d),p:d.zc},a.i[e].push(f),c.push(d.zc),1==a.i[e].length&&f.start(),d={zc:d.zc};E(k,2);return B(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=I(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)cj(a,h)}C(k)}})}function cj(a,b){a.i[b].shift();dj(a,b)}
295
- function dj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),cj(a,b)}}function Ti(a,b,c,d){var e=a.K[d];null==c&&e&&(Wc()||Rc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=jh(b));return b}var Ki=window.URL.createObjectURL,Ui="sequence",ej=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function R(a,b,c){this.l=a;this.Ed=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=R.prototype;q.getDuration=function(){return this.i};q.Dg=function(){return this.g};q.bb=function(a){this.i=a};q.Hg=function(){return this.l};q.Lf=function(a){this.A=a};q.Yc=function(a){this.B=a};q.Ke=function(a){this.m=a};q.uh=function(a){this.Ed=a};q.ug=function(){return this.Ed};
296
- q.mc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.qe(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.le=function(){this.H=!0};q.qe=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.pe=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
297
- q.U=function(){return Infinity==this.i&&!this.B};q.Mb=function(){return Infinity!=this.i&&!this.B};q.mb=function(){return Math.max(this.C,this.Jb()-this.m)};q.Of=function(a){this.C=a};q.Jb=function(){return this.U()||this.Mb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Jc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Jb()-this.m+a,this.kb()))};q.ec=function(){return this.Jc(0)};
298
- q.kb=function(){return Math.max(0,this.Jb()-(this.U()||this.Mb()?this.Ed:0))};q.Sf=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Kf=function(a){this.G=a};M("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.Kf;R.prototype.usingPresentationStartTime=R.prototype.Sf;R.prototype.getSeekRangeEnd=R.prototype.kb;R.prototype.getSeekRangeStart=R.prototype.ec;R.prototype.getSafeSeekRangeStart=R.prototype.Jc;R.prototype.getSegmentAvailabilityEnd=R.prototype.Jb;
299
- R.prototype.setUserSeekStart=R.prototype.Of;R.prototype.getSegmentAvailabilityStart=R.prototype.mb;R.prototype.isInProgress=R.prototype.Mb;R.prototype.isLive=R.prototype.U;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.pe;R.prototype.notifyMinSegmentStartTime=R.prototype.qe;R.prototype.lockStartTime=R.prototype.le;R.prototype.notifySegments=R.prototype.mc;R.prototype.getDelay=R.prototype.ug;R.prototype.setDelay=R.prototype.uh;
300
- R.prototype.setSegmentAvailabilityDuration=R.prototype.Ke;R.prototype.setStatic=R.prototype.Yc;R.prototype.setClockOffset=R.prototype.Lf;R.prototype.getPresentationStartTime=R.prototype.Hg;R.prototype.setDuration=R.prototype.bb;R.prototype.getMaxSegmentDuration=R.prototype.Dg;R.prototype.getDuration=R.prototype.getDuration;function fj(a,b,c){this.l=c;this.j=a;this.B=gj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.A=0;this.C=b;this.i=function(){}}fj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function hj(a,b){a.i=b}function ij(a){this.g=a}function gj(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Fi(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 jj(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.G=c;this.i=new Af;this.m=!1;this.F=a.readyState;this.C=0;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return kj(f)});this.j=(new Q(function(){kj(f)})).ka(.25)}jj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};jj.prototype.se=function(){this.l=!0;kj(this)};
301
- function kj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=gj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.A++,b.l(new O("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Gi(c,b,a.G.gapDetectionThreshold),null==
302
- d||0==d&&!a.l||(e=c.start(d),e>=a.B.kb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.C++,a.A(new O("gapjumped")))))}}};function lj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=mj.value().get(b),c.Ea(a,b,d))}var mj=new Mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function nj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new Af;this.i=new oj(a);lj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){pj(d,d.j)})}nj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function qj(a){return a.m?a.g.currentTime:a.j}function rj(a,b){0<a.g.readyState?sj(a.i,b):lj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){pj(a,a.j)})}
303
- function pj(a,b){.001>Math.abs(a.g.currentTime-b)?tj(a):(a.h.Ea(a.g,"seeking",function(){tj(a)}),sj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function tj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function oj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}oj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
304
- function sj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function uj(a){this.g=a;this.j=!1;this.h=null;this.i=new Af}q=uj.prototype;q.be=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Ea(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;lj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.ce=function(a){this.h=this.j?this.h:a};q.fd=function(){return(this.j?this.g.currentTime:this.h)||0};q.Ze=function(){return 0};
305
- q.Ye=function(){return 0};q.Ff=function(){};
306
- function vj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.A=wj(a,c,f);this.j=new jj(a,b.presentationTimeline,c,this.A,f);this.h=new nj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=qj(g.h);h=xj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;rj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},yj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=qj(g.h),k=g.g.ec(),l=g.g.kb();3>
307
- l-k&&(k=l-3);h<k&&(h=xj(g,h),g.i.currentTime=h)}})}q=vj.prototype;q.be=function(){this.m.ka(.25)};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.C=function(){}};q.ce=function(a){rj(this.h,a)};q.fd=function(){var a=qj(this.h);return 0<this.i.readyState&&!this.i.paused?zj(this,a):a};q.Ze=function(){return this.A?this.A.A:0};q.Ye=function(){return this.j.C};
308
- function yj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ec():a.g.kb():0>b&&(b=a.g.kb()+b);return Aj(a,zj(a,b))}q.Ff=function(){this.j.se()};function Aj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function xj(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.ec(),f=a.g.kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jc(c),k=a.g.Jc(d);c=a.g.Jc(c+d);return b>=g?Aj(a,b):b>f?f:b<e?Di(a.i.buffered,k)?k:c:b>=h||Di(a.i.buffered,b)?b:c}
309
- function zj(a,b){var c=a.g.ec();if(b<c)return c;a=a.g.kb();return b>a?a:b}function wj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new fj(new ij(a),b.stallThreshold,c);hj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Bj(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=Bj.prototype;q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.Xg=function(){this.i=!0};q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};
310
- q.offset=function(a){if(!this.i)for(var b=r(this.M),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=r(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};q.Rc=function(a){!this.i&&a.length&&(this.M=this.M.filter(function(b){return b.startTime<a[0].startTime}),this.M.push.apply(this.M,ja(a)))};q.lc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.Rc(a);this.Hb(b)};
281
+ function Fi(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};function Hi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.N={};this.K={};this.g=null;this.H=!1;this.T=d||function(){};this.i={};this.B=new Af;this.A={};this.F=b;this.I=new Lc;this.l=Ii(this,this.I);this.G=new yf(function(){return Ji(e)});this.J="";this.C=!1;this.P=new Lc}function Ii(a,b){var c=new MediaSource;a.B.Fa(c,"sourceopen",function(){URL.revokeObjectURL(a.J);b.resolve()});a.J=Ki(c);a.j.src=a.J;return c}q=Hi.prototype;q.destroy=function(){return this.G.destroy()};
282
+ function Ji(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(Ab)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new P(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.A)b.push(a.A[k].destroy());return A(l,Promise.all(b),2)}a.B&&(a.B.release(),a.B=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.A={};a.F=null;a.i={};
283
+ B(l)})}
284
+ q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(p){if(1==p.g)return e=Jb,A(p,d.I,2);d.C=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={Ga:f.Ga},h=g.next())f.Ga=h.value,k=a.get(f.Ga),l=wd(k.mimeType,k.codecs),f.Ga==e.ha?Li(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!rd(l,f.Ga)||(d.A[f.Ga]=new qd,l=td(f.Ga,l)),m=d.l.addSourceBuffer(l),d.B.o(m,"error",function(n){return function(){d.i[n.Ga][0].p.reject(new P(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.B.o(m,"updateend",
285
+ function(n){return function(){return Mi(d,n.Ga)}}(f)),d.h[f.Ga]=m,d.N[f.Ga]=l,d.i[f.Ga]=[],d.K[f.Ga]=!!k.drmInfos.length);B(p)})};function Li(a,b,c){a.g||(a.g=new Bd(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,Dd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Ua('Text parsers should have a "setSequenceMode" method!'),d.C=a)}function Ni(a){return a.l?"ended"==a.l.readyState:!0}function Oi(a,b){return b==Ib?a.g.g:Bi(Pi(a,b))}
286
+ function Qi(a,b){return b==Ib?a.g.h:Ci(Pi(a,b))}function Ri(a,b,c){if(b==Ib)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Pi(a,b);return Ei(a,c)}q.kb=function(){var a={total:Fi(this.j.buffered),audio:Fi(Pi(this,"audio")),video:Fi(Pi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Pi(a,b){try{return a.h[b].buffered}catch(c){return null}}
287
+ function Si(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H;return K(function(I){switch(I.g){case 1:h=Jb;if(b!=h.ha){I.D(2);break}if(!a.C){I.D(3);break}return A(I,a.P,4);case 4:k=I.h,a.g.B=k;case 3:return A(I,Ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return I.return();case 2:if(!a.A[b]){e&&(a.g||Li(a,"text/vtt",a.C),d?(l=vi(a.F,c),l.length&&(m=a.h[h.La].timestampOffset,Ld(a.g,l,d.startTime,d.endTime,m))):a.F.init(c));I.D(6);break}f&&a.A[b].g.resetCaptions();
288
+ return A(I,ud(a.A[b],c),7);case 7:p=I.h,a.g||Li(a,"text/vtt",a.C),p.metadata&&(n=a.h[b].timestampOffset,a.T(p.metadata,n,d?d.endTime:null)),p.captions&&p.captions.length&&(t=a.h[h.La].timestampOffset,y=Hd(p.captions),Ld(a.g,y,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ti(a,c,d?d.startTime:null,b);x=a.h[b];v=Ui;if(!a.C||x.mode==v||!d){I.D(8);break}w=a.l.duration;C=b==h.La||!(h.La in a.h);if(!C){I.D(9);break}z=[x.appendWindowStart,x.appendWindowEnd];x.appendWindowStart=0;x.appendWindowEnd=
289
+ Infinity;D=x.timestampOffset;x.timestampOffset=0;return A(I,Vi(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return A(I,Vi(a,b,function(){return Wi(a,b)}),11);case 11:return x.timestampOffset=D,x.appendWindowStart=z[0],x.appendWindowEnd=z[1],G=Bi(Pi(a,b)),F=(d.startTime||0)-(G||0),a.P.resolve(F),A(I,Vi(a,b,function(){return Xi(a,b,0,w)}),12);case 12:if(b!=h.La){I.D(9);break}return A(I,Vi(a,b,function(){a.j.currentTime-=.001;Mi(a,b)}),9);case 9:return x.mode=v,A(I,a.Ua(w),8);case 8:return d&&
290
+ a.C&&b!=h.ha&&(f||g)&&(H=d.startTime,Vi(a,b,function(){return Wi(a,b)}),Vi(a,b,function(){return Yi(a,b,H)})),A(I,Vi(a,b,function(){a.h[b].appendBuffer(c)}),16);case 16:B(I)}})}function Zi(a,b){var c=Qi(a,"video")||0;Gd(a.g,b,c)}function $i(a){a.g&&Gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=Jb;return a==e.ha?A(f,d.g.remove(b,c),0):A(f,Vi(d,a,function(){return Xi(d,a,b,c)}),0)})};
291
+ function aj(a,b){var c;return K(function(d){c=Jb;return b==c.ha?a.g?A(d,a.g.remove(0,Infinity),0):d.return():A(d,Vi(a,b,function(){return Xi(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=Jb;return a==c.ha?d.return():A(d,Vi(b,a,function(){b.j.currentTime-=.001;Mi(b,a)}),0)})};
292
+ function bj(a,b,c,d,e,f){var g;return K(function(h){g=Jb;return b==g.ha?(f||(a.g.B=c),Fd(a.g,d,e),h.return()):A(h,Promise.all([Vi(a,b,function(){return Wi(a,b)}),f?Promise.resolve():Vi(a,b,function(){return Yi(a,b,c)}),Vi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Mi(a,b)})]),0)})}
293
+ function cj(a,b,c){var d;return K(function(e){d=Jb;if(b==d.ha)return e.return();Vi(a,b,function(){return Wi(a,b)});return A(e,Vi(a,b,function(){return Yi(a,b,c)}),0)})}q.endOfStream=function(a){var b=this;return K(function(c){return A(c,dj(b,function(){Ni(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.Ua=function(a){var b=this;return K(function(c){return A(c,dj(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new Lc};b.i[d].unshift(e)}b.l.duration=a}),0)})};
294
+ q.getDuration=function(){return this.l.duration};function Xi(a,b,c,d){d<=c?Mi(a,b):a.h[b].remove(c,d)}function Wi(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Mi(a,b)}function Yi(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Mi(a,b)}function Mi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),ej(a,b))}function Vi(a,b,c){zf(a.G);c={start:c,p:new Lc};a.i[b].push(c);1==a.i[b].length&&fj(a,b);return c.p}
295
+ function dj(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:zf(a.G);c=[];d={};for(e in a.h)d.zc=new Lc,f={start:function(l){return function(){return l.zc.resolve()}}(d),p:d.zc},a.i[e].push(f),c.push(d.zc),1==a.i[e].length&&f.start(),d={zc:d.zc};E(k,2);return A(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=J(k),g;case 3:try{b()}catch(l){throw new P(2,3,3015,l);}finally{for(h in a.h)ej(a,h)}B(k)}})}function ej(a,b){a.i[b].shift();fj(a,b)}
296
+ function fj(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new P(2,3,3017,b)):c.p.reject(new P(2,3,3015,d)),ej(a,b)}}function Ti(a,b,c,d){var e=a.K[d];null==c&&e&&(Wc()||Rc())&&"mp4"==a.N[d].split(";")[0].split("/")[1]&&(b=jh(b));return b}var Ki=window.URL.createObjectURL,Ui="sequence",gj=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function R(a,b,c){this.l=a;this.Ed=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.A=0;this.B=!0;this.C=0;this.F=void 0===c?!0:c;this.G=0;this.H=!1}q=R.prototype;q.getDuration=function(){return this.i};q.Fg=function(){return this.g};q.Ua=function(a){this.i=a};q.Jg=function(){return this.l};q.Nf=function(a){this.A=a};q.Zc=function(a){this.B=a};q.Le=function(a){this.m=a};q.wh=function(a){this.Ed=a};q.wg=function(){return this.Ed};
297
+ q.mc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.re(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.F&&!this.H&&(this.l=(Date.now()+this.A)/1E3-this.h-this.g)}};q.le=function(){this.H=!0};q.re=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.qe=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
298
+ q.U=function(){return Infinity==this.i&&!this.B};q.Mb=function(){return Infinity!=this.i&&!this.B};q.ob=function(){return Math.max(this.C,this.Jb()-this.m)};q.Qf=function(a){this.C=a};q.Jb=function(){return this.U()||this.Mb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.l)+this.G,this.i):this.h?Math.min(this.h,this.i):this.i};q.Jc=function(a){var b=Math.max(this.j,this.C);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Jb()-this.m+a,this.mb()))};q.ec=function(){return this.Jc(0)};
299
+ q.mb=function(){return Math.max(0,this.Jb()-(this.U()||this.Mb()?this.Ed:0))};q.Uf=function(){return null==this.l||null!=this.h&&this.F?!1:!0};q.Mf=function(a){this.G=a};M("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.Mf;R.prototype.usingPresentationStartTime=R.prototype.Uf;R.prototype.getSeekRangeEnd=R.prototype.mb;R.prototype.getSeekRangeStart=R.prototype.ec;R.prototype.getSafeSeekRangeStart=R.prototype.Jc;R.prototype.getSegmentAvailabilityEnd=R.prototype.Jb;
300
+ R.prototype.setUserSeekStart=R.prototype.Qf;R.prototype.getSegmentAvailabilityStart=R.prototype.ob;R.prototype.isInProgress=R.prototype.Mb;R.prototype.isLive=R.prototype.U;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.qe;R.prototype.notifyMinSegmentStartTime=R.prototype.re;R.prototype.lockStartTime=R.prototype.le;R.prototype.notifySegments=R.prototype.mc;R.prototype.getDelay=R.prototype.wg;R.prototype.setDelay=R.prototype.wh;
301
+ R.prototype.setSegmentAvailabilityDuration=R.prototype.Le;R.prototype.setStatic=R.prototype.Zc;R.prototype.setClockOffset=R.prototype.Nf;R.prototype.getPresentationStartTime=R.prototype.Jg;R.prototype.setDuration=R.prototype.Ua;R.prototype.getMaxSegmentDuration=R.prototype.Fg;R.prototype.getDuration=R.prototype.getDuration;function hj(a,b,c){this.l=c;this.j=a;this.B=ij(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.A=0;this.C=b;this.i=function(){}}hj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function jj(a,b){a.i=b}function kj(a){this.g=a}function ij(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Fi(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 lj(a,b,c,d,e){var f=this;this.A=e;this.g=a;this.B=b;this.G=c;this.i=new Af;this.m=!1;this.F=a.readyState;this.C=0;this.h=d;this.l=!1;this.i.o(a,"waiting",function(){return mj(f)});this.j=(new Q(function(){mj(f)})).ka(.25)}lj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.B=this.A=null};lj.prototype.ue=function(){this.l=!0;mj(this)};
302
+ function mj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ij(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.B!=d)b.m=f,b.g=e,b.B=d,b.h=!1;e=f-b.m;if(d=e>=b.C&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.A++,b.l(new O("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Gi(c,b,a.G.gapDetectionThreshold),null==
303
+ d||0==d&&!a.l||(e=c.start(d),e>=a.B.mb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.C++,a.A(new O("gapjumped")))))}}};function nj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=oj.value().get(b),c.Fa(a,b,d))}var oj=new Mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function pj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new Af;this.i=new qj(a);nj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){rj(d,d.j)})}pj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function sj(a){return a.m?a.g.currentTime:a.j}function tj(a,b){0<a.g.readyState?uj(a.i,b):nj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){rj(a,a.j)})}
304
+ function rj(a,b){.001>Math.abs(a.g.currentTime-b)?vj(a):(a.h.Fa(a.g,"seeking",function(){vj(a)}),uj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function vj(a){a.m=!0;a.h.o(a.g,"seeking",function(){return a.l()})}function qj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}qj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
305
+ function uj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.ka(.1)};function wj(a){this.g=a;this.j=!1;this.h=null;this.i=new Af}q=wj.prototype;q.be=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.Fa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;nj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.ce=function(a){this.h=this.j?this.h:a};q.gd=function(){return(this.j?this.g.currentTime:this.h)||0};q.bf=function(){return 0};
306
+ q.$e=function(){return 0};q.Hf=function(){};
307
+ function xj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.B=null;this.A=yj(a,c,f);this.j=new lj(a,b.presentationTimeline,c,this.A,f);this.h=new pj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=sj(g.h);h=zj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;tj(g.h,h);h=void 0;break a}g.C();h=void 0}return h},Aj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=sj(g.h),k=g.g.ec(),l=g.g.mb();3>
308
+ l-k&&(k=l-3);h<k&&(h=zj(g,h),g.i.currentTime=h)}})}q=xj.prototype;q.be=function(){this.m.ka(.25)};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.C=function(){}};q.ce=function(a){tj(this.h,a)};q.gd=function(){var a=sj(this.h);return 0<this.i.readyState&&!this.i.paused?Bj(this,a):a};q.bf=function(){return this.A?this.A.A:0};q.$e=function(){return this.j.C};
309
+ function Aj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.ec():a.g.mb():0>b&&(b=a.g.mb()+b);return Cj(a,Bj(a,b))}q.Hf=function(){this.j.ue()};function Cj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function zj(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.ec(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Jc(c),k=a.g.Jc(d);c=a.g.Jc(c+d);return b>=g?Cj(a,b):b>f?f:b<e?Di(a.i.buffered,k)?k:c:b>=h||Di(a.i.buffered,b)?b:c}
310
+ function Bj(a,b){var c=a.g.ec();if(b<c)return c;a=a.g.mb();return b>a?a:b}function yj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new hj(new kj(a),b.stallThreshold,c);jj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Dj(a){this.M=a;this.g=null;this.h=0;this.i=!1}q=Dj.prototype;q.release=function(){this.i||(this.M=[],this.g&&this.g.stop(),this.g=null)};q.Zg=function(){this.i=!0};q.find=function(a){for(var b=this.M.length-1,c=b;0<=c;--c){var d=this.M[c],e=c<b?this.M[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.M.length&&a<this.M[0].startTime?this.h:null};q.get=function(a){if(0==this.M.length)return null;a-=this.h;return 0>a||a>=this.M.length?null:this.M[a]};
311
+ q.offset=function(a){if(!this.i)for(var b=r(this.M),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.Sc=function(a){if(!this.i&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.M=this.M.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.M.push.apply(this.M,ja(a))}};q.lc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.M.length||d.endTime>c.M[0].startTime)});this.Sc(a);this.Hb(b)};
311
312
  q.Hb=function(a){if(!this.i){var b=this.M.length;this.M=this.M.filter(function(c){return c.endTime>a});this.h+=b-this.M.length}};
312
- q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new yi(a.startTime,b,a.A,a.Ta,a.Ba,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.m,a.g,a.status,a.l))}};
313
- q.Jd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.M.push.apply(c.M,ja(d)):(c.g.stop(),c.g=null)}),this.g.ka(a))};Bj.prototype[Symbol.iterator]=function(){return this.cc(0)};Bj.prototype.cc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Cj(this,b,d)};
314
- function Dj(a,b,c){return new Bj([new yi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Bj);Bj.forSingleSegment=Dj;Bj.prototype.getIteratorForTime=Bj.prototype.cc;Bj.prototype.updateEvery=Bj.prototype.Jd;Bj.prototype.fit=Bj.prototype.yb;Bj.prototype.evict=Bj.prototype.Hb;Bj.prototype.mergeAndEvict=Bj.prototype.lc;Bj.prototype.offset=Bj.prototype.offset;Bj.prototype.get=Bj.prototype.get;Bj.prototype.find=Bj.prototype.find;Bj.prototype.markImmutable=Bj.prototype.Xg;
315
- Bj.prototype.release=Bj.prototype.release;function Cj(a,b,c){this.i=a;this.g=b;this.h=c}Cj.prototype.hg=function(){return this.g};Cj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.Pa().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
316
- Cj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.Pa().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Cj);Cj.prototype.next=Cj.prototype.next;Cj.prototype.current=Cj.prototype.current;Cj.prototype.currentPosition=Cj.prototype.hg;function Ej(){Bj.call(this,[]);this.j=[]}u(Ej,Bj);q=Ej.prototype;q.clone=function(){var a=new Ej;a.j=this.j.slice();return a};
317
- q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.M.length}return null};q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.M.length}return null};q.offset=function(){};q.Rc=function(){};q.Hb=function(){};q.lc=function(){};q.yb=function(){};q.Jd=function(){};
318
- M("shaka.media.MetaSegmentIndex",Ej);Ej.prototype.updateEvery=Ej.prototype.Jd;Ej.prototype.fit=Ej.prototype.yb;Ej.prototype.mergeAndEvict=Ej.prototype.lc;Ej.prototype.evict=Ej.prototype.Hb;Ej.prototype.merge=Ej.prototype.Rc;Ej.prototype.offset=Ej.prototype.offset;Ej.prototype.get=Ej.prototype.get;Ej.prototype.find=Ej.prototype.find;Ej.prototype.release=Ej.prototype.release;function Fj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.qd();this.h=new Q(function(){b.g.Ef(.25*b.i)})}Fj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Fj.prototype.set=function(a){this.i=a;Gj(this)};Fj.prototype.nd=function(){return this.g.nd()};function Gj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.qd()!=b&&a.g.Ie(b);return}catch(c){}a.h.ka(.25);0!=a.g.qd()&&a.g.Ie(0)};function Hj(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Ij(b,!1)})).ka(.25)}Hj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Ij(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Jj(a){fb.call(this);this.g=new Map;this.h=a}u(Jj,fb);Jj.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function Kj(a,b){var c=a.g.get(b);c||(c={Sc:[],mf:null,contentType:b},a.g.set(b,c));return c}function Lj(a,b,c){var d=Kj(a,b.contentType);Mj(a,d);a={me:b,position:c};d=d.Sc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
319
- Jj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Sc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.me;break a}}d=null}if(e=d)e=c.mf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
320
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.mf=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Mj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Sc;b.Sc=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.Sc=[]};function Nj(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}u(Nj,fb);Nj.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function Oj(a){fb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Wb:null,Vb:Pj,Lb:function(c,d){return Qj(b,"enter",c,d)}},{Wb:Rj,Vb:Pj,Lb:function(c,d){return Qj(b,"enter",c,d)}},{Wb:Sj,Vb:Pj,Lb:function(c,d){return Qj(b,"enter",c,d)}},{Wb:Pj,Vb:Rj,Lb:function(c,d){return Qj(b,"exit",c,d)}},{Wb:Pj,Vb:Sj,Lb:function(c,d){return Qj(b,"exit",c,d)}},{Wb:Rj,Vb:Sj,Lb:function(c,d){return Qj(b,"skip",c,d)}},{Wb:Sj,Vb:Rj,Lb:function(c,d){return Qj(b,"skip",c,d)}}];this.h=new Af;this.h.o(this.i,"regionremove",
321
- function(c){b.g.delete(c.region)})}u(Oj,fb);Oj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.prototype.release.call(this)};Oj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Rj:a>d.endTime?Sj:Pj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Wb==e&&h.Vb==f&&h.Lb(d,b)}};
322
- function Qj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Rj=1,Pj=2,Sj=3;function Tj(a,b,c,d,e){a=rf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Uj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.C=1;this.A=this.l=null;this.i=new Map;this.F=!1;this.G=null;this.B=!1;this.h=new yf(function(){return Vj(c)})}q=Uj.prototype;q.destroy=function(){return this.h.destroy()};function Vj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Wj(e),b.push(Xj(e));return B(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;C(f)})}
323
- q.configure=function(a){this.j=a;this.G=new Ze({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)};q.start=function(){var a=this;return K(function(b){if(1==b.g)return B(b,Yj(a),2);zf(a.h);a.F=!0;C(b)})};
324
- function Zj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=Jb,E(k,2),B(k,$i(a.g.V,c.ha),4);case 4:va(k,3);break;case 2:if(d=I(k),a.g)a.g.onError(d);case 3:e=wd(b.mimeType,b.codecs);Li(a.g.V,e,a.m.sequenceMode);f=a.g.V.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=ak(b),a.i.set(c.ha,h),bk(a,h,0);C(k)}})}function ck(a){var b=a.i.get(Ib);b&&(Wj(b),Xj(b).catch(function(){}),a.i.delete(Ib));a.A=null}
325
- function dk(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Tb&&(ek(a,b,!1,0,!1),c.Tb=d);else if(d=c.Tb)c.Tb=null,ek(a,d,!0,0,!1)}}function fk(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.l=b;a.F&&(b.video&&ek(a,b.video,c,d,e,f),b.audio&&ek(a,b.audio,c,d,e,f))}function gk(a,b){a.A=b;a.F&&ek(a,b,!0,0,!1)}
326
- function ek(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ib?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Ib&&Li(a.g.V,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.sa=null,g.bf=!!f,c&&(g.Dc?g.Md=!0:g.ab?(g.Eb=!0,g.kd=d,g.Md=!0):(Wj(g),hk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),ik(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Zj(a,b)}
327
- function ik(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Ja)return e.return();c=b.stream;d=b.Ja;return c.segmentIndex?e.D(2):B(e,c.createSegmentIndex(),2)}if(b.Ja!=d||b.stream!=c)return e.return();var f=a.g.pd();var g=Qi(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ra?b.Ra.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ba?k.Ba-k.Ta:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.Ba?k.Ba-k.Ta:null)||0),k=a.g.getBandwidthEstimate(),
328
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.Ja.h.g>h?!0:!1):f=!1;f&&b.Ja.abort();C(e)})}
329
- q.Vc=function(){for(var a=this.g.pd(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.sa=null;var e=this.g.V;d==Ib?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Pi(e,d),e=Di(e,a));if(!e){(null!=Qi(this.g.V,d)||c.ab)&&jk(this,c);c.Ja&&(c.Ja.abort(),c.Ja=null);if(d===Ib)for(d=this.g.V.F.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ki(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())fi(e.value);c.Vc=!0}}};
330
- function jk(a,b){b.Dc||b.Eb||(b.ab?(b.Eb=!0,b.kd=0):null==Oi(a.g.V,b.type)?null==b.rb&&bk(a,b,0):(Wj(b),hk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
331
- function Yj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){if(1==p.g){b=Jb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.Ia,a.l.video),d.add(a.l.video));a.A&&(c.set(b.ha,a.A),d.add(a.A));e=a.g.V;f=a.j.forceTransmuxTS;return B(p,e.init(c,f,a.m.sequenceMode),2)}zf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||(m=ak(l),a.i.set(k,m),bk(a,m,0));C(p)})}
332
- function ak(a){return{stream:a,type:a.type,sa:null,Ra:null,ud:null,ke:null,je:null,ie:null,Tb:null,endOfStream:!1,ab:!1,rb:null,Eb:!1,kd:0,Md:!1,Dc:!1,Vc:!0,we:!1,Mc:!1,Ja:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.V.bb(a):this.g.V.bb(Math.pow(2,32))};
333
- function kk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:zf(a.h);if(b.ab||null==b.rb||b.Dc)return h.return();b.rb=null;if(!b.Eb){h.D(2);break}return B(h,hk(a,b,b.Md,b.kd),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return B(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.rb&&bk(a,b,0),h.return();case 4:E(h,6);d=lk(a,b);null!=d&&(bk(a,b,d),b.Mc=!1);va(h,7);break;case 6:return e=
334
- I(h),B(h,mk(a,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return B(h,a.g.V.endOfStream(),10);case 10:zf(a.h),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.bb(g),C(h)}})}
335
- function lk(a,b){if(nk(b))return Yi(a.g.V,b.stream.originalId||""),null;b.type==Ib&&Zi(a.g.V);var c=a.g.pd(),d=b.Ra?b.Ra.endTime:c,e=Ri(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=Qi(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Ib))&&nk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=ok(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
336
- f=Infinity;g=Array.from(a.i.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,nk(h)||h.sa&&!h.sa.current()||(f=Math.min(f,h.Ra?h.Ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;pk(a,b,c,e).catch(function(){});return null}
337
- function ok(a,b,c,d){if(b.sa)return b.sa.current();if(b.Ra||d)return b.sa=b.stream.segmentIndex.cc(b.Ra?b.Ra.endTime:d),b.sa&&b.sa.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.sa=b.stream.segmentIndex.cc(d),e=b.sa&&b.sa.next().value);e||(b.sa=b.stream.segmentIndex.cc(c),e=b.sa&&b.sa.next().value);return e}
338
- function pk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,x,y,v,w,A;return K(function(z){switch(z.g){case 1:e=Jb;f=b.stream;g=b.sa;b.ab=!0;E(z,2);if(2==d.fc())throw new P(1,1,1011);return B(z,qk(a,b,d),4);case 4:zf(a.h);if(a.B)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h&&!d.l)return p=new Uint8Array(0),t=n=!1,x=function(D){var G,F,H;return K(function(J){if(n)return J.return();t=!0;zf(a.h);if(a.B)return J.return();p=rk(p,D);G=!1;F=0;(new Lf).box("mdat",
339
- function(L){F=L.size+L.start;G=!0}).parse(p,!1,!0);if(!G)return J.D(0);H=p.subarray(0,F);p=p.subarray(F);return B(J,sk(a,b,c,f,d,H),0)})},B(z,tk(a,b,d,x),11);l=tk(a,b,d);return B(z,l,7);case 7:m=z.h;zf(a.h);if(a.B)return z.return();if(!d.l){z.D(8);break}return B(z,uk(m,d,g),9);case 9:m=z.h;case 8:return zf(a.h),b.Eb?(b.ab=!1,bk(a,b,0),z.return()):B(z,sk(a,b,c,f,d,m),6);case 11:y=z.h;if(t){z.D(6);break}n=!0;zf(a.h);return a.B?z.return():b.Eb?(b.ab=!1,bk(a,b,0),z.return()):B(z,sk(a,b,c,f,d,y),6);case 6:zf(a.h);
340
- if(a.B)return z.return();b.Ra=d;g.next();b.ab=!1;b.we=!1;v=a.g.V.jb();w=v[b.type];$a(JSON.stringify(w));b.Eb||a.g.se();bk(a,b,0);va(z,0);break;case 2:A=I(z);zf(a.h,A);if(a.B)return z.return();b.ab=!1;if(7001==A.code)b.ab=!1,b.rb=null,bk(a,b,0),z.D(0);else if(b.type==e.ha&&a.j.ignoreTextStreamFailures)a.i.delete(e.ha),z.D(0);else if(3017==A.code)vk(a,b,A),z.D(0);else return b.Mc=!0,A.severity=2,B(z,mk(a,A),0)}})}
341
- function uk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.D(2):B(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ec(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function rk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
342
- function vk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.we})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Mc=!0;a.B=!0;a.g.onError(c);return}b.we=!0}bk(a,b,4)}
343
- function qk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.ke||e!=b.je||f!=b.ie)h=function(){var p;return K(function(n){if(1==n.g)return E(n,2),b.je=e,b.ie=f,b.ke=g,B(n,aj(a.g.V,b.type,g,e,f,a.m.sequenceMode),4);if(2!=n.g)return va(n,0);p=I(n);b.je=null;b.ie=null;b.ke=null;throw p;})},d.push(h());!xi(c.i,b.ud)&&(b.ud=c.i)&&(k=tk(a,b,c.i),l=function(){var p,n,t;return K(function(x){switch(x.g){case 1:return E(x,
344
- 2),B(x,k,4);case 4:return p=x.h,zf(a.h),n=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,B(x,a.g.df(b.type,p),5);case 5:return B(x,Si(a.g.V,b.type,p,null,n),6);case 6:va(x,0);break;case 2:throw t=I(x),b.ud=null,t;}})},a.g.$g(c.startTime,c.i),d.push(l()));return B(m,Promise.all(d),0)})}
345
- function sk(a,b,c,d,e,f){var g,h,k;return K(function(l){switch(l.g){case 1:return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.j.dispatchAllEmsgBoxes)&&(new Lf).X("emsg",function(m){var p=d.emsgSchemeIdUris;if(0===m.version){var n=m.reader.Tc();var t=m.reader.Tc();var x=m.reader.R();var y=m.reader.R();var v=m.reader.R();var w=m.reader.R();var A=e.startTime+y/x}else x=m.reader.R(),A=m.reader.qc()/x+e.timestampOffset,y=A-e.startTime,v=m.reader.R(),
346
- w=m.reader.R(),n=m.reader.Tc(),t=m.reader.Tc();m=m.reader.Cb(m.reader.W.byteLength-m.reader.oa());if(p&&p.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.ah():(p=(new Map).set("detail",{startTime:A,endTime:A+v/x,schemeIdUri:n,value:t,timescale:x,presentationTimeDelta:y,eventDuration:v,id:w,messageData:m}),p=new O("emsg",p),a.g.onEvent(p))}).parse(f),B(l,wk(a,b,c),2);case 2:return zf(a.h),h=b.Vc,b.Vc=!1,k=b.bf,b.bf=!1,B(l,a.g.df(b.type,f),3);case 3:return B(l,Si(a.g.V,b.type,
347
- f,e,g,h,k),4);case 4:zf(a.h),C(l)}})}function wk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Oi(a.g.V,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():B(h,a.g.V.remove(b.type,e,e+g),2)}zf(a.h);C(h)})}function nk(a){return a&&a.type==Ib&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
348
- function tk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=xf,f=Tj(c.Pa(),c.Ta,c.Ba,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof wi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ja=h,B(l,h.promise,2);k=l.h;b.Ja=null;return l.return(k.data)})}
349
- function hk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Eb=!1,b.Md=!1,b.kd=0,b.Dc=!0,b.Ra=null,b.ud=null,b.sa=null,d?(e=a.g.pd(),f=a.g.V.getDuration(),B(g,a.g.V.remove(b.type,e+d,f),3)):B(g,$i(a.g.V,b.type),4);if(3!=g.g)return zf(a.h),c?B(g,a.g.V.flush(b.type),3):g.D(3);zf(a.h);b.Dc=!1;b.endOfStream=!1;bk(a,b,0);C(g)})}
350
- function bk(a,b,c){var d=b.type;if(d!=Ib||a.i.has(d))b.rb=(new Nc(function(){var e;return K(function(f){if(1==f.g)return E(f,2),B(f,kk(a,b),4);if(2!=f.g)return va(f,0);e=I(f);if(a.g)a.g.onError(e);C(f)})})).S(c)}function Wj(a){null!=a.rb&&(a.rb.stop(),a.rb=null)}function Xj(a){return K(function(b){return a.Ja?B(b,a.Ja.abort(),0):b.D(0)})}function mk(a,b){return K(function(c){if(1==c.g)return B(c,af(a.G),2);zf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);C(c)})};function xk(a,b){var c=yk(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return zk(d)});this.B=new yf(function(){return Ak(d)})}xk.prototype.destroy=function(){return this.B.destroy()};function Ak(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Bk(a),B(e,a.C,2);a.g&&a.g.$a.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.$a.Rb();a.g=null;a.m=[];a.j=null;C(e)})}
351
- function Ck(a,b){var c={nc:function(){},zd:function(){},Rb:function(){},onError:function(){},Cd:function(){},dj:function(){}};a.m.push({create:b,$a:c});a.h&&a.h.abort();Bk(a);return c}
352
- function zk(a){return K(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.$a.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.$a.nc(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,$a:c.$a}):c.$a.Cd();c=!0}c?c=Promise.resolve():a.g?c=Dk(a):(a.j.Zg(a.i),a.A=new Lc,c=a.A);b=B(b,c,1)}return b})}
353
- function Dk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Fg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.jg(a.i,a.l,a.g.payload),B(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.$a.zd(),a.g=null);va(d,0);break;case 2:b=I(d);if(7001==b.code)a.g.$a.Rb();else a.g.$a.onError(b);a.g=null;a.h=null;c=a;return B(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,C(d)}})}function Bk(a){a.A&&(a.A.resolve(),a.A=null)};function Ek(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Ek.prototype;q.remove=function(a,b){if(!this.g)return!1;Fk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
313
+ q.yb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.M.length;)if(this.M[this.M.length-1].startTime>=b)this.M.pop();else break;for(;this.M.length;)if(this.M[0].endTime<=a)this.M.shift(),c||this.h++;else break;0!=this.M.length&&(a=this.M[this.M.length-1],this.M[this.M.length-1]=new yi(a.startTime,b,a.B,a.Va,a.Ca,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.A,a.g,a.status,a.l))}};
314
+ q.Jd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new Q(function(){var d=b();d?c.M.push.apply(c.M,ja(d)):(c.g.stop(),c.g=null)}),this.g.ka(a))};Dj.prototype[Symbol.iterator]=function(){return this.cc(0)};Dj.prototype.cc=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ej(this,b,d)};
315
+ function Fj(a,b,c){return new Dj([new yi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Dj);Dj.forSingleSegment=Fj;Dj.prototype.getIteratorForTime=Dj.prototype.cc;Dj.prototype.updateEvery=Dj.prototype.Jd;Dj.prototype.fit=Dj.prototype.yb;Dj.prototype.evict=Dj.prototype.Hb;Dj.prototype.mergeAndEvict=Dj.prototype.lc;Dj.prototype.offset=Dj.prototype.offset;Dj.prototype.get=Dj.prototype.get;Dj.prototype.find=Dj.prototype.find;Dj.prototype.markImmutable=Dj.prototype.Zg;
316
+ Dj.prototype.release=Dj.prototype.release;function Ej(a,b,c){this.i=a;this.g=b;this.h=c}Ej.prototype.jg=function(){return this.g};Ej.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.Ra().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
317
+ Ej.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.Ra().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",Ej);Ej.prototype.next=Ej.prototype.next;Ej.prototype.current=Ej.prototype.current;Ej.prototype.currentPosition=Ej.prototype.jg;function Gj(){Dj.call(this,[]);this.j=[]}u(Gj,Dj);q=Gj.prototype;q.clone=function(){var a=new Gj;a.j=this.j.slice();return a};
318
+ q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.M.length}return null};q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.M.length}return null};q.offset=function(){};q.Sc=function(){};q.Hb=function(){};q.lc=function(){};q.yb=function(){};q.Jd=function(){};
319
+ M("shaka.media.MetaSegmentIndex",Gj);Gj.prototype.updateEvery=Gj.prototype.Jd;Gj.prototype.fit=Gj.prototype.yb;Gj.prototype.mergeAndEvict=Gj.prototype.lc;Gj.prototype.evict=Gj.prototype.Hb;Gj.prototype.merge=Gj.prototype.Sc;Gj.prototype.offset=Gj.prototype.offset;Gj.prototype.get=Gj.prototype.get;Gj.prototype.find=Gj.prototype.find;Gj.prototype.release=Gj.prototype.release;function Hj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.rd();this.h=new Q(function(){b.g.Gf(.25*b.i)})}Hj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Hj.prototype.set=function(a){this.i=a;Ij(this)};Hj.prototype.od=function(){return this.g.od()};function Ij(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.rd()!=b&&a.g.Je(b);return}catch(c){}a.h.ka(.25);0!=a.g.rd()&&a.g.Je(0)};function Jj(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Kj(b,!1)})).ka(.25)}Jj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Kj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Lj(a){fb.call(this);this.g=new Map;this.h=a}u(Lj,fb);Lj.prototype.release=function(){this.g.clear();fb.prototype.release.call(this)};function Mj(a,b){var c=a.g.get(b);c||(c={Tc:[],pf:null,contentType:b},a.g.set(b,c));return c}function Nj(a,b,c){var d=Mj(a,b.contentType);Oj(a,d);a={me:b,position:c};d=d.Tc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
320
+ Lj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Tc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.me;break a}}d=null}if(e=d)e=c.pf,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
321
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.pf=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Oj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Tc;b.Tc=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.Tc=[]};function Pj(a){fb.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).ka(2)}u(Pj,fb);Pj.prototype.release=function(){this.g.clear();this.h.stop();fb.prototype.release.call(this)};function Qj(a){fb.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{Wb:null,Vb:Rj,Lb:function(c,d){return Sj(b,"enter",c,d)}},{Wb:Tj,Vb:Rj,Lb:function(c,d){return Sj(b,"enter",c,d)}},{Wb:Uj,Vb:Rj,Lb:function(c,d){return Sj(b,"enter",c,d)}},{Wb:Rj,Vb:Tj,Lb:function(c,d){return Sj(b,"exit",c,d)}},{Wb:Rj,Vb:Uj,Lb:function(c,d){return Sj(b,"exit",c,d)}},{Wb:Tj,Vb:Uj,Lb:function(c,d){return Sj(b,"skip",c,d)}},{Wb:Uj,Vb:Tj,Lb:function(c,d){return Sj(b,"skip",c,d)}}];this.h=new Af;this.h.o(this.i,"regionremove",
322
+ function(c){b.g.delete(c.region)})}u(Qj,fb);Qj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;fb.prototype.release.call(this)};Qj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Tj:a>d.endTime?Uj:Rj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.Wb==e&&h.Vb==f&&h.Lb(d,b)}};
323
+ function Sj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Tj=1,Rj=2,Uj=3;function Vj(a,b,c,d,e){a=rf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Wj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.C=1;this.A=this.l=null;this.i=new Map;this.F=!1;this.G=null;this.B=!1;this.h=new yf(function(){return Xj(c)})}q=Wj.prototype;q.destroy=function(){return this.h.destroy()};function Xj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=r(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Yj(e),b.push(Zj(e));return A(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;B(f)})}
324
+ q.configure=function(a){this.j=a;this.G=new Ze({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)};q.start=function(){var a=this;return K(function(b){if(1==b.g)return A(b,ak(a),2);zf(a.h);a.F=!0;B(b)})};
325
+ function bk(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=Jb,E(k,2),A(k,aj(a.g.V,c.ha),4);case 4:va(k,3);break;case 2:if(d=J(k),a.g)a.g.onError(d);case 3:e=wd(b.mimeType,b.codecs);Li(a.g.V,e,a.m.sequenceMode);f=a.g.V.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=ck(b),a.i.set(c.ha,h),dk(a,h,0);B(k)}})}function ek(a){var b=a.i.get(Ib);b&&(Yj(b),Zj(b).catch(function(){}),a.i.delete(Ib));a.A=null}
326
+ function fk(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Tb&&(gk(a,b,!1,0,!1),c.Tb=d);else if(d=c.Tb)c.Tb=null,gk(a,d,!0,0,!1)}}function hk(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.l=b;a.F&&(b.video&&gk(a,b.video,c,d,e,f),b.audio&&gk(a,b.audio,c,d,e,f))}function ik(a,b){a.A=b;a.F&&gk(a,b,!0,0,!1)}
327
+ function gk(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=Ib?g&&(g.Tb&&(b.trickModeVideo?(g.Tb=b,b=b.trickModeVideo):g.Tb=null),g.stream!=b||e)&&(b.type==Ib&&Li(a.g.V,wd(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.sa=null,g.df=!!f,c&&(g.Dc?g.Md=!0:g.Ja?(g.Eb=!0,g.ld=d,g.Md=!0):(Yj(g),jk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),kk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):bk(a,b)}
328
+ function kk(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.Ma)return e.return();c=b.stream;d=b.Ma;return c.segmentIndex?e.D(2):A(e,c.createSegmentIndex(),2)}if(b.Ma!=d||b.stream!=c)return e.return();var f=a.g.qd();var g=Qi(a.g.V,b.type),h=b.stream.segmentIndex.find(b.Ia?b.Ia.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Ca?k.Ca-k.Va:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.Ca?k.Ca-k.Va:null)||0),k=a.g.getBandwidthEstimate(),
329
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.Ma.h.g>h?!0:!1):f=!1;f&&b.Ma.abort();B(e)})}
330
+ q.Wc=function(){if(this.g)for(var a=this.g.qd(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.sa=null;var e=this.g.V;d==Ib?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Pi(e,d),e=Di(e,a));if(!e){(null!=Qi(this.g.V,d)||c.Ja)&&lk(this,c);c.Ma&&(c.Ma.abort(),c.Ma=null);if(d===Ib)for(d=this.g.V.F.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ki(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())fi(e.value);c.Wc=!0}}};
331
+ function lk(a,b){b.Dc||b.Eb||(b.Ja?(b.Eb=!0,b.ld=0):null==Oi(a.g.V,b.type)?null==b.fb&&dk(a,b,0):(Yj(b),jk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
332
+ function ak(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){if(1==p.g){b=Jb;if(!a.l)throw new P(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.La,a.l.video),d.add(a.l.video));a.A&&(c.set(b.ha,a.A),d.add(a.A));e=a.g.V;f=a.j.forceTransmuxTS;return A(p,e.init(c,f,a.m.sequenceMode),2)}zf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||(m=ck(l),a.i.set(k,m),dk(a,m,0));B(p)})}
333
+ function ck(a){return{stream:a,type:a.type,sa:null,Ia:null,ud:null,ke:null,je:null,ie:null,Tb:null,endOfStream:!1,Ja:!1,fb:null,Eb:!1,ld:0,Md:!1,Dc:!1,Wc:!0,pe:!1,xe:!1,Mc:!1,Ma:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.V.Ua(a):this.g.V.Ua(Math.pow(2,32))};
334
+ function mk(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:zf(a.h);if(b.Ja||null==b.fb||b.Dc)return h.return();b.fb=null;if(!b.Eb){h.D(2);break}return A(h,jk(a,b,b.Md,b.ld),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.D(4);break}c=b.stream;return A(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.Ja||b.fb||dk(a,b,0),h.return();case 4:E(h,6);d=nk(a,b);null!=d&&(dk(a,b,d),b.Mc=!1);va(h,7);break;case 6:return e=
335
+ J(h),A(h,ok(a,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.F||!f.every(function(k){return k.endOfStream})){h.D(0);break}return A(h,a.g.V.endOfStream(),10);case 10:zf(a.h),g=a.g.V.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ua(g),B(h)}})}
336
+ function nk(a,b){if(pk(b))return Zi(a.g.V,b.stream.originalId||""),null;b.type==Ib&&$i(a.g.V);var c=a.g.qd(),d=b.Ia?b.Ia.endTime:c,e=Ri(a.g.V,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.C,g=a.m.presentationTimeline.getDuration()-d,h=Qi(a.g.V,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(Ib))&&pk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=qk(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
337
+ f=Infinity;g=Array.from(a.i.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,pk(h)||h.sa&&!h.sa.current()||(f=Math.min(f,h.Ia?h.Ia.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;rk(a,b,c,e).catch(function(){});return null}
338
+ function qk(a,b,c,d){if(b.sa)return b.sa.current();if(b.Ia||d)return c=b.Ia?b.Ia.endTime:d,b.pe=!0,b.sa=b.stream.segmentIndex.cc(c),b.sa&&b.sa.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.sa=b.stream.segmentIndex.cc(d),e=b.sa&&b.sa.next().value);e||(b.sa=b.stream.segmentIndex.cc(c),e=b.sa&&b.sa.next().value);return e}
339
+ function rk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,y,x,v,w,C;return K(function(z){switch(z.g){case 1:e=Jb;f=b.stream;g=b.sa;b.Ja=!0;E(z,2);if(2==d.fc())throw new P(1,1,1011);return A(z,sk(a,b,d),4);case 4:zf(a.h);if(a.B)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h&&!d.l)return p=new Uint8Array(0),t=n=!1,y=function(D){var G,F,H;return K(function(I){if(n)return I.return();t=!0;zf(a.h);if(a.B)return I.return();p=tk(p,D);G=!1;F=0;(new Lf).box("mdat",
340
+ function(L){F=L.size+L.start;G=!0}).parse(p,!1,!0);if(!G)return I.D(0);H=p.subarray(0,F);p=p.subarray(F);return A(I,uk(a,b,c,f,d,H),0)})},A(z,vk(a,b,d,y),11);l=vk(a,b,d);return A(z,l,7);case 7:m=z.h;zf(a.h);if(a.B)return z.return();if(!d.l){z.D(8);break}return A(z,wk(m,d,g),9);case 9:m=z.h;case 8:return zf(a.h),b.Eb?(b.Ja=!1,dk(a,b,0),z.return()):A(z,uk(a,b,c,f,d,m),6);case 11:x=z.h;if(t){z.D(6);break}n=!0;zf(a.h);return a.B?z.return():b.Eb?(b.Ja=!1,dk(a,b,0),z.return()):A(z,uk(a,b,c,f,d,x),6);case 6:zf(a.h);
341
+ if(a.B)return z.return();b.Ia=d;g.next();b.Ja=!1;b.xe=!1;v=a.g.V.kb();w=v[b.type];$a(JSON.stringify(w));b.Eb||a.g.ue();dk(a,b,0);va(z,0);break;case 2:C=J(z);zf(a.h,C);if(a.B)return z.return();b.Ja=!1;if(7001==C.code)b.Ja=!1,Yj(b),dk(a,b,0),z.D(0);else if(b.type==e.ha&&a.j.ignoreTextStreamFailures)a.i.delete(e.ha),z.D(0);else if(3017==C.code)xk(a,b,C),z.D(0);else return b.Mc=!0,C.severity=2,A(z,ok(a,C),0)}})}
342
+ function wk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.D(2):A(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Ec(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function tk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
343
+ function xk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.xe})){var d=Math.round(100*a.C);if(20<d)a.C-=.2;else if(4<d)a.C-=.04;else{b.Mc=!0;a.B=!0;a.g.onError(c);return}b.xe=!0}dk(a,b,4)}
344
+ function sk(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.ke||e!=b.je||f!=b.ie)h=function(){var n;return K(function(t){if(1==t.g)return E(t,2),b.je=e,b.ie=f,b.ke=g,A(t,bj(a.g.V,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return va(t,0);n=J(t);b.je=null;b.ie=null;b.ke=null;throw n;})},d.push(h());!xi(c.i,b.ud)&&(b.ud=c.i)&&(k=vk(a,b,c.i),l=function(){var n,t,y;return K(function(x){switch(x.g){case 1:return E(x,
345
+ 2),A(x,k,4);case 4:return n=x.h,zf(a.h),t=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,A(x,a.g.gf(b.type,n),5);case 5:return A(x,Si(a.g.V,b.type,n,null,t),6);case 6:va(x,0);break;case 2:throw y=J(x),b.ud=null,y;}})},a.g.bh(c.startTime,c.i),d.push(l()));a.m.sequenceMode&&(m=b.Ia?b.Ia.m:null,c.m!=m||b.pe)&&(b.pe=!1,d.push(cj(a.g.V,b.type,c.startTime)));return A(p,Promise.all(d),0)})}
346
+ function uk(a,b,c,d,e,f){var g,h,k;return K(function(l){switch(l.g){case 1:return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.j.dispatchAllEmsgBoxes)&&(new Lf).X("emsg",function(m){var p=d.emsgSchemeIdUris;if(0===m.version){var n=m.reader.Uc();var t=m.reader.Uc();var y=m.reader.R();var x=m.reader.R();var v=m.reader.R();var w=m.reader.R();var C=e.startTime+x/y}else y=m.reader.R(),C=m.reader.qc()/y+e.timestampOffset,x=C-e.startTime,v=m.reader.R(),
347
+ w=m.reader.R(),n=m.reader.Uc(),t=m.reader.Uc();m=m.reader.Cb(m.reader.W.byteLength-m.reader.oa());if(p&&p.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.dh():(p=(new Map).set("detail",{startTime:C,endTime:C+v/y,schemeIdUri:n,value:t,timescale:y,presentationTimeDelta:x,eventDuration:v,id:w,messageData:m}),p=new O("emsg",p),a.g.onEvent(p))}).parse(f),A(l,yk(a,b,c),2);case 2:return zf(a.h),h=b.Wc,b.Wc=!1,k=b.df,b.df=!1,A(l,a.g.gf(b.type,f),3);case 3:return A(l,Si(a.g.V,b.type,
348
+ f,e,g,h,k),4);case 4:zf(a.h),B(l)}})}function yk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Oi(a.g.V,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():A(h,a.g.V.remove(b.type,e,e+g),2)}zf(a.h);B(h)})}function pk(a){return a&&a.type==Ib&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
349
+ function vk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=xf,f=Vj(c.Ra(),c.Va,c.Ca,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof wi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.Pb.request(e,f),b.Ma=h,A(l,h.promise,2);k=l.h;b.Ma=null;return l.return(k.data)})}
350
+ function jk(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.Eb=!1,b.Md=!1,b.ld=0,b.Dc=!0,b.Ia=null,b.ud=null,b.sa=null,d?(e=a.g.qd(),f=a.g.V.getDuration(),A(g,a.g.V.remove(b.type,e+d,f),3)):A(g,aj(a.g.V,b.type),4);if(3!=g.g)return zf(a.h),c?A(g,a.g.V.flush(b.type),3):g.D(3);zf(a.h);b.Dc=!1;b.endOfStream=!1;b.Ja||b.fb||dk(a,b,0);B(g)})}
351
+ function dk(a,b,c){var d=b.type;if(d!=Ib||a.i.has(d))b.fb=(new Nc(function(){var e;return K(function(f){if(1==f.g)return E(f,2),A(f,mk(a,b),4);if(2!=f.g)return va(f,0);e=J(f);if(a.g)a.g.onError(e);B(f)})})).S(c)}function Yj(a){null!=a.fb&&(a.fb.stop(),a.fb=null)}function Zj(a){return K(function(b){return a.Ma?A(b,a.Ma.abort(),0):b.D(0)})}function ok(a,b){return K(function(c){if(1==c.g)return A(c,af(a.G),2);zf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);B(c)})};function zk(a,b){var c=Ak(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.m=[];this.h=this.g=null;this.C=Promise.resolve().then(function(){return Bk(d)});this.B=new yf(function(){return Ck(d)})}zk.prototype.destroy=function(){return this.B.destroy()};function Ck(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Dk(a),A(e,a.C,2);a.g&&a.g.cb.Rb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.cb.Rb();a.g=null;a.m=[];a.j=null;B(e)})}
352
+ function Ek(a,b){var c={nc:function(){},zd:function(){},Rb:function(){},onError:function(){},Cd:function(){},fj:function(){}};a.m.push({create:b,cb:c});a.h&&a.h.abort();Dk(a);return c}
353
+ function Bk(a){return K(function(b){if(a.B.g)b=b.D(0);else{if(0==a.m.length||a.g&&!a.g.Kb)var c=!1;else{a.g&&(a.g.cb.Rb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.cb.nc(),a.g={node:d.node,payload:d.payload,Kb:d.Kb,cb:c.cb}):c.cb.Cd();c=!0}c?c=Promise.resolve():a.g?c=Fk(a):(a.j.ah(a.i),a.A=new Lc,c=a.A);b=A(b,c,1)}return b})}
354
+ function Fk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Hg(a.i,a.l,a.g.node,a.g.payload),E(d,2),a.h=a.j.lg(a.i,a.l,a.g.payload),A(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.cb.zd(),a.g=null);va(d,0);break;case 2:b=J(d);if(7001==b.code)a.g.cb.Rb();else a.g.cb.onError(b);a.g=null;a.h=null;c=a;return A(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,B(d)}})}function Dk(a){a.A&&(a.A.resolve(),a.A=null)};function Gk(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Gk.prototype;q.remove=function(a,b){if(!this.g)return!1;Hk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
354
355
  q.append=function(a){function b(h,k){h=r(h);for(var l=h.next();!l.done;l=h.next())if(l=l.value,l.isContainer)b(l.nestedCues,k);else{var m=l.clone();m.nestedCues=[];m.payload=c(l);k.push(m)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,t){return n+"<"+t+">"},"");k=k.reduceRight(function(n,t){return n+"</"+t+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
355
- l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Xb:f.Xb},g=d.next())f.Xb=g.value,a.some(function(h){return function(k){return k.startTime==h.Xb.startTime&&k.endTime==h.Xb.endTime&&k.text==h.Xb.payload?!0:!1}}(f))||(g=Gk(f.Xb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
356
- e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(Fk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
357
- function Gk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
358
- function Fk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Ek);Ek.prototype.setTextVisibility=Ek.prototype.setTextVisibility;Ek.prototype.isTextVisible=Ek.prototype.isTextVisible;Ek.prototype.destroy=Ek.prototype.destroy;Ek.prototype.append=Ek.prototype.append;Ek.prototype.remove=Ek.prototype.remove;function Hk(){}function S(a){return document.createElement(a)}function Ik(){return document.createElement("button")}function Jk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Hk);Hk.removeAllChildren=Jk;function Kk(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=S("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.m.appendChild(this.g);this.C=(new Q(function(){Lk(c)})).ka(.25);this.h=new Map;this.B=new Af;this.B.o(document,"fullscreenchange",function(){Lk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){Lk(c,
359
- !0)}),this.l.observe(this.g));this.A=new Map}q=Kk.prototype;q.append=function(a){var b=[].concat(ja(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={$c:c.$c},d=a.next())c.$c=d.value,b.some(function(e){return function(f){return rc(f,e.$c)}}(c))||this.i.push(c.$c);Lk(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
360
- q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Lk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function Mk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
361
- function Nk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.Tf:null;l&&(g.push(l.ee),l.Uc&&g.push(l.Uc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Mk(a,p)||(f=!0):(Ok(a,k,e),l=a.h.get(k),p=l.Tf,f=!0));0<k.nestedCues.length&&p&&Nk(a,k.nestedCues,p,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(n,t){return n.startTime!=
362
- t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Uc?(c.appendChild(d.Uc),d.Uc.appendChild(d.ee)):c.appendChild(d.ee)}}function Lk(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.A.values());for(var d=b.next();!d.done;d=b.next())Jk(d.value);Jk(a.g);a.h.clear();a.A.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));Nk(a,a.i,a.g,c,[])}}}
363
- function Ok(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&Pk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.A.has(c.id))c=a.A.get(c.id);else{e=S("span");var g=c.heightUnits==zc?"%":"px",h=c.widthUnits==zc?"%":"px",k=c.viewportAnchorUnits==zc?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position="absolute";e.style.top=c.viewportAnchorY+
364
- k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(c.id,e);c=e}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{ee:f,Tf:e,Uc:c})}
365
- function Pk(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=Qk(c.linePadding,c,a.m);f.paddingRight=Qk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
366
- "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Rk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?
367
- "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;f.fontSize=Qk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==lc?(f.width="100%",c.lineAlign==nc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==nc?f.left=c.line+
356
+ l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=r(d);for(var g=d.next();!g.done;f={Xb:f.Xb},g=d.next())f.Xb=g.value,a.some(function(h){return function(k){return k.startTime==h.Xb.startTime&&k.endTime==h.Xb.endTime&&k.text==h.Xb.payload?!0:!1}}(f))||(g=Ik(f.Xb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
357
+ e.indexOf(k)});a=r(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};q.destroy=function(){this.g&&(Hk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.g.mode};q.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
358
+ function Ik(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
359
+ function Hk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Gk);Gk.prototype.setTextVisibility=Gk.prototype.setTextVisibility;Gk.prototype.isTextVisible=Gk.prototype.isTextVisible;Gk.prototype.destroy=Gk.prototype.destroy;Gk.prototype.append=Gk.prototype.append;Gk.prototype.remove=Gk.prototype.remove;function Jk(){}function S(a){return document.createElement(a)}function Kk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function Lk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Jk);Jk.removeAllChildren=Lk;function Mk(a,b){var c=this;this.j=!1;this.i=[];this.F=a;this.m=b;this.g=S("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.m.appendChild(this.g);this.C=(new Q(function(){Nk(c)})).ka(.25);this.h=new Map;this.B=new Af;this.B.o(document,"fullscreenchange",function(){Nk(c,!0)});this.l=null;"ResizeObserver"in window&&(this.l=new ResizeObserver(function(){Nk(c,
360
+ !0)}),this.l.observe(this.g));this.A=new Map}q=Mk.prototype;q.append=function(a){var b=[].concat(ja(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={bd:c.bd},d=a.next())c.bd=d.value,b.some(function(e){return function(f){return rc(f,e.bd)}}(c))||this.i.push(c.bd);Nk(this)};q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.C&&this.C.stop();this.h.clear();this.B&&(this.B.release(),this.B=null);this.l&&(this.l.disconnect(),this.l=null)};
361
+ q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Nk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};function Ok(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
362
+ function Pk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.Vf:null;l&&(g.push(l.ee),l.Vc&&g.push(l.Vc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Ok(a,p)||(f=!0):(Qk(a,k,e),l=a.h.get(k),p=l.Vf,f=!0));0<k.nestedCues.length&&p&&Pk(a,k.nestedCues,p,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(n,t){return n.startTime!=
363
+ t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Vc?(c.appendChild(d.Vc),d.Vc.appendChild(d.ee)):c.appendChild(d.ee)}}function Nk(a,b){if(a.g){var c=a.F.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.A.values());for(var d=b.next();!d.done;d=b.next())Lk(d.value);Lk(a.g);a.h.clear();a.A.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));Pk(a,a.i,a.g,c,[])}}}
364
+ function Qk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&Rk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==zc?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==zc?"%":"px"),a.A.has(e))c=a.A.get(e);else{var g=S("span"),h=c.heightUnits==zc?"%":"px",k=c.widthUnits==zc?"%":"px",l=c.viewportAnchorUnits==zc?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");
365
+ g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.A.set(e,g);c=g}e=f;d&&(e=S("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{ee:f,Vf:e,Vc:c})}
366
+ function Rk(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=Sk(c.linePadding,c,a.m);f.paddingRight=Sk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
367
+ "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Tk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?
368
+ "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;f.fontSize=Sk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==lc?(f.width="100%",c.lineAlign==nc?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==nc?f.left=c.line+
368
369
  "%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==nc?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==lc?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
369
- f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==lc?f.width=c.size+"%":f.height=c.size+"%")}function Qk(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}}
370
- function Rk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Kk);Kk.prototype.setTextVisibility=Kk.prototype.setTextVisibility;Kk.prototype.isTextVisible=Kk.prototype.isTextVisible;Kk.prototype.remove=Kk.prototype.remove;Kk.prototype.destroy=Kk.prototype.destroy;Kk.prototype.append=Kk.prototype.append;function Sk(a,b){function c(g){for(var h=g,k=r(b),l=k.next();!l.done;l=k.next())l=l.value,l.end&&l.start<g&&(h+=l.end-l.start);g=Math.floor(h/3600);k=Math.floor(h/60%60);l=Math.floor(h%60);h=Math.floor(1E3*h%1E3);return(10>g?"0":"")+g+":"+(10>k?"0":"")+k+":"+(10>l?"0":"")+l+"."+(100>h?10>h?"00":"0":"")+h}function d(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(p,n){return p+"<"+n+">"},
371
- "");h=h.reduceRight(function(p,n){return p+"</"+n+">"},"");return g.lineBreak?"\n":g.nestedCues.length?g.nestedCues.map(d).join(""):k+g.payload+h}var e=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=d(g);return h}return g});a="WEBVTT\n\n";e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,a+=c(f.startTime)+" --\x3e "+c(f.endTime)+function(g){var h=[];switch(g.textAlign){case "left":h.push("align:left");break;case "right":h.push("align:right");break;case kc:h.push("align:middle");
372
- break;case "start":h.push("align:start");break;case "end":h.push("align:end")}switch(g.writingMode){case "vertical-lr":h.push("vertical:lr");break;case "vertical-rl":h.push("vertical:rl")}return h.length?" "+h.join(" "):""}(f)+"\n",a+=f.payload+"\n\n";return a}M("shaka.text.WebVttGenerator",function(){});function Tk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function Uk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?Vk:Wk};d.ot=Xk(c);var e=d.ot===Yk||d.ot===Zk||d.ot===$k||d.ot===al;e&&(d.bl=bl(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==al&&(d.tb=cl(a,d.ot)/1E3);dl(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
373
- function el(a,b,c){try{if(!a.g.enabled)return b;var d=fl(a);a:{switch(c){case "video/webm":case "video/mp4":var e=$k;break a;case "application/x-mpegurl":e=gl;break a}e=void 0}d.ot=e;d.su=!0;var f=hl(d);return il(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function fl(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
374
- function dl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,fl(a));c.pr=a.h.zb();var e=c.ot===Yk||c.ot===$k;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=jl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=hl(c);f&&(b.uris=b.uris.map(function(g){return il(g,f)}))}}}
375
- function Xk(a){var b=a.type;if(a.init)return kl;if("video"==b)return a.codecs.includes(",")?$k:Yk;if("audio"==b)return Zk;if("text"==b)return"application/mp4"===a.mimeType?al:ll}function bl(a,b){b=a.h.jb()[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}
376
- function cl(a,b){var c=a.h.Qa();if(!c.length)return NaN;a=c[0];c=r(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 Yk:return a.videoBandwidth||NaN;case Zk:return a.audioBandwidth||NaN;default:return a.bandwidth}}
377
- function hl(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(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"===
378
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function jl(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=r(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=hl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
379
- function il(a,b){if(!b||a.includes("offline:"))return a;a=new lb(a);a.g.set("CMCD",b);return a.toString()}var gl="m",Zk="a",Yk="v",$k="av",kl="i",ll="c",al="tt",Wk="v",Vk="l";M("shaka.util.CmcdManager.StreamingFormat",{Nh:"d",bi:"h",Ki:"s",si:"o"});function ml(){}
380
- function nl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=jf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=jf(l)),k=nl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
381
- k),g=!1)}return g}function ol(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 pl(a,b){return a&&b}M("shaka.util.ConfigUtils",ml);ml.convertToConfigObject=ol;ml.mergeConfigObjects=nl;function ql(){}function rl(a){a=gd(a);return(new lb(a)).Za}function sl(a,b,c){function d(h){Hc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ec(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=id(b,!0):e=b;a=gd(a);a=id(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",ql);
382
- ql.commonFairPlayResponse=function(a,b){if(2===a){try{var c=dd(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=Fc(md(c)))}};ql.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};ql.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
383
- ql.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ec(b.body),a=ld(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=hd("spc="+a))};ql.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return sl(a,d,b)};
384
- ql.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split(";").pop();return sl(a,c,b)};ql.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split("skd://").pop();return sl(a,c,b)};ql.initDataTransform=sl;ql.defaultGetContentId=rl;
385
- ql.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},E(b,2),B(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);I(b);return b.return(!1)})};function tl(){}
386
- function ul(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:$e(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=rl(g),g=sl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc()},c={retryParameters:$e(),availabilityWindowOverride:NaN,disableAudio:!1,
370
+ f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==lc?f.width=c.size+"%":f.height=c.size+"%")}function Sk(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}}
371
+ function Tk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Mk);Mk.prototype.setTextVisibility=Mk.prototype.setTextVisibility;Mk.prototype.isTextVisible=Mk.prototype.isTextVisible;Mk.prototype.remove=Mk.prototype.remove;Mk.prototype.destroy=Mk.prototype.destroy;Mk.prototype.append=Mk.prototype.append;function Uk(a,b){function c(h,k){h=r(h);for(var l=h.next();!l.done;l=h.next())if(l=l.value,l.isContainer)c(l.nestedCues,k);else{var m=l.clone();m.nestedCues=[];m.payload=e(l);k.push(m)}return k}function d(h){for(var k=h,l=r(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function e(h){var k=
372
+ [],l=700<=h.fontWeight,m="italic"==h.fontStyle,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,t){return n+"<"+t+">"},"");k=k.reduceRight(function(n,t){return n+"</"+t+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(e).join(""):l+h.payload+k}var f=c(a,[]);a="WEBVTT\n\n";f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,a+=d(g.startTime)+" --\x3e "+d(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");
373
+ break;case "right":k.push("align:right");break;case kc:k.push("align:middle");break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",a+=g.payload+"\n\n";return a}M("shaka.text.WebVttGenerator",function(){});function Vk(a,b){this.h=a;this.g=b;this.j="";this.A=void 0;this.i=!1;this.m=!0;this.l=!1}function Wk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?Xk:Yk};d.ot=Zk(c);var e=d.ot===$k||d.ot===al||d.ot===bl||d.ot===cl;e&&(d.bl=dl(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==cl&&(d.tb=el(a,d.ot)/1E3);fl(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
374
+ function gl(a,b,c){try{if(!a.g.enabled)return b;var d=hl(a);a:{switch(c){case "video/webm":case "video/mp4":var e=bl;break a;case "application/x-mpegurl":e=il;break a}e=void 0}d.ot=e;d.su=!0;var f=jl(d);return kl(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function hl(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.A,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
375
+ function fl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,hl(a));c.pr=a.h.zb();var e=c.ot===$k||c.ot===bl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=ll(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=jl(c);f&&(b.uris=b.uris.map(function(g){return kl(g,f)}))}}}
376
+ function Zk(a){var b=a.type;if(a.init)return ml;if("video"==b)return a.codecs.includes(",")?bl:$k;if("audio"==b)return al;if("text"==b)return"application/mp4"===a.mimeType?cl:nl}function dl(a,b){b=a.h.kb()[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}
377
+ function el(a,b){var c=a.h.Sa();if(!c.length)return NaN;a=c[0];c=r(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 $k:return a.videoBandwidth||NaN;case al:return a.audioBandwidth||NaN;default:return a.bandwidth}}
378
+ function jl(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(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"===
379
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function ll(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=r(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=jl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
380
+ function kl(a,b){if(!b||a.includes("offline:"))return a;a=new lb(a);a.g.set("CMCD",b);return a.toString()}var il="m",al="a",$k="v",bl="av",ml="i",nl="c",cl="tt",Yk="v",Xk="l";M("shaka.util.CmcdManager.StreamingFormat",{Ph:"d",di:"h",Mi:"s",wi:"o"});function ol(){}
381
+ function pl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=jf(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=jf(l)),k=pl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ta("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ua("Unexpected number of arguments for "+k),a[h]=b[h]):(Ta("Invalid config, unrecognized key "+
382
+ k),g=!1)}return g}function ql(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 rl(a,b){return a&&b}M("shaka.util.ConfigUtils",ol);ol.convertToConfigObject=ql;ol.mergeConfigObjects=pl;function sl(){}function tl(a){a=gd(a);return(new lb(a)).bb}function ul(a,b,c){function d(h){Hc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Ec(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new P(2,6,6015);var e;"string"==typeof b?e=id(b,!0):e=b;a=gd(a);a=id(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",sl);
383
+ sl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=dd(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=Fc(md(c)))}};sl.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};sl.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
384
+ sl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Ec(b.body),a=ld(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=hd("spc="+a))};sl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return ul(a,d,b)};
385
+ sl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split(";").pop();return ul(a,c,b)};sl.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=gd(a).split("skd://").pop();return ul(a,c,b)};sl.initDataTransform=ul;sl.defaultGetContentId=tl;
386
+ sl.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},E(b,2),A(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);J(b);return b.return(!1)})};function vl(){}
387
+ function wl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:$e(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=tl(g),g=ul(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:Rc()},c={retryParameters:$e(),availabilityWindowOverride:NaN,disableAudio:!1,
387
388
  disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
388
- "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return pl([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},
389
- d={retryParameters:$e(),failureCallback:function(g){return pl([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,
390
- maxDisabledTime:30};if(Vc("Web0S")||Wc()||Vc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?B(k,navigator.storage.estimate(),3):k.return(!0);h=k.h;return k.return(h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return pl([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,
389
+ "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return rl([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},
390
+ d={retryParameters:$e(),failureCallback:function(g){return rl([g],void 0)},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,
391
+ maxDisabledTime:30};if(Sc("Web0S")||Wc()||Sc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?A(k,navigator.storage.estimate(),3):k.return(!0);h=k.h;return k.return(h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return rl([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,
391
392
  streaming:d,offline:e,abrFactory:function(){return new Ce},abr:{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},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,ignoreDevicePixelRatio:!1},
392
393
  preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,
393
- sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h.return(vl(g,f.preferredAudioLanguage))})};return f}function wl(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:""}};return nl(a,b,c||ul(),d,"")}
394
- function vl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Ub(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Mb(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
395
- 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Ib&&"image"!=d.type||b.push(d);return b}M("shaka.util.PlayerConfiguration",tl);tl.mergeConfigObjects=wl;tl.createDefault=ul;function xl(){this.g=null;this.h=[]}function yl(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function zl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
396
- function Al(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 Bl(){this.i=this.h=null;this.g=[]}function Cl(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 Dl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.P=this.T=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new xl;this.h=new Bl};function U(a,b){fb.call(this);var c=this;this.l=El;this.rd=this.g=null;this.ba=!1;this.wd=new Af;this.gb=new Af;this.B=new Af;this.ue=this.C=this.fb=this.i=this.yd=this.J=this.j=this.ea=this.T=this.Fd=this.N=this.td=this.I=this.Xa=this.F=this.K=this.m=this.H=null;this.Vf=1E9;this.h=Fl(this);this.Fc={width:Infinity,height:Infinity};this.A=null;this.za=new Re(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.La=this.h.preferredTextLanguage;this.wb=this.h.preferredTextRole;
397
- this.hb=this.h.preferForcedSubs;this.eb=[];this.Lc=null;b&&b(this);this.H=Gl(this);this.H.Ge(this.h.streaming.forceHTTPS);this.G=null;Hl&&(this.G=Hl());this.wd.o(window,"online",function(){c.xe()});this.P={name:"detach"};this.Y={name:"attach"};this.aa={name:"unload"};this.We={name:"manifest-parser"};this.Ve={name:"manifest"};this.Ma={name:"media-source"};this.ye={name:"drm-engine"};this.$={name:"load"};this.Xe={name:"src-equals-drm-engine"};this.Ya={name:"src-equals"};var d=new Map;d.set(this.Y,function(e,
398
- f){return ff(Il(c,e,f))});d.set(this.P,function(e){e.O&&(c.gb.Sb(),e.O=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return ff(e)});d.set(this.aa,function(e){return ff(Jl(c,e))});d.set(this.Ma,function(e){e=Kl(c,e);return ff(e)});d.set(this.We,function(e,f){e=Ll(c,e,f);return ff(e)});d.set(this.Ve,function(e){return Ml(c,e)});d.set(this.ye,function(e){e=Nl(c,e);return ff(e)});d.set(this.$,function(e,f){return ff(Ol(c,e,f))});d.set(this.Xe,function(e,f){e=Pl(c,e,f);return ff(e)});d.set(this.Ya,
399
- function(e,f){return Ql(c,e,f)});this.ma=new xk(this.P,{Fg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.Y);e==c.Y&&(k=g==c.P||f.O!=h.O?c.P:g==c.Y?c.Y:g==c.Ma||g==c.$?c.Ma:g==c.Ya?c.Xe:null);e==c.Ma&&(k=g==c.$&&f.O==h.O?c.We:c.aa);e==c.We&&(k=Rl(c.$,c.Ve,c.aa,g,f,h));e==c.Ve&&(k=Rl(c.$,c.ye,c.aa,g,f,h));e==c.ye&&(k=Rl(c.$,c.$,c.aa,g,f,h));e==c.Xe&&(k=g==c.Ya&&f.O==h.O?c.Ya:c.aa);if(e==c.$||e==c.Ya)k=c.aa;e==c.aa&&(k=h.O&&f.O==h.O?c.Y:c.P);return k},jg:function(e,f,g){c.dispatchEvent(Sl("onstatechange",
400
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?B(f,Jl(c,e),2):f.return(e.O?c.Y:c.P)})},Zg:function(e){c.dispatchEvent(Sl("onstateidle",(new Map).set("state",e.name)))}});this.Uf=new Q(function(){ae(c.i.variants,c.h.restrictions,c.Fc)&&Tl(c)});a&&this.Cc(a,!0)}u(U,fb);function Sl(a,b){return new O(a,b)}q=U.prototype;
401
- q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Ul)return c.return();a.l=Ul;b=Ck(a.ma,function(){return{node:a.P,payload:yk(),Kb:!1}});return B(c,new Promise(function(d){b.nc=function(){};b.zd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.Cd=function(){d()}}),2);case 2:return B(c,a.ma.destroy(),3);case 3:a.wd&&(a.wd.release(),a.wd=null);a.gb&&(a.gb.release(),a.gb=null);a.B&&(a.B.release(),a.B=null);a.ue=null;a.C=null;a.h=null;a.A=null;a.rd=null;
402
- a.T=null;if(!a.H){c.D(4);break}return B(c,a.H.destroy(),5);case 5:a.H=null;case 4:fb.prototype.release.call(a),C(c)}})};
403
- function Vl(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Vc("Trident/"))return!1;var a=$c();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Pc("application/x-mpegurl")}
404
- q.Cc=function(a,b){b=void 0===b?!0:b;if(this.l==Ul)return Promise.reject(Wl());var c=yk();c.O=a;Oc()||(b=!1);var d=b?this.Ma:this.Y;a=Ck(this.ma,function(){return{node:d,payload:c,Kb:!1}});a.nc=function(){};return Xl(a)};q.detach=function(){var a=this;if(this.l==Ul)return Promise.reject(Wl());var b=Ck(this.ma,function(){return{node:a.P,payload:yk(),Kb:!1}});b.nc=function(){};return Xl(b)};
405
- q.Te=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Ul)return Promise.reject(Wl());Oc()||(a=!1);var c=yk(),d=Ck(this.ma,function(e){var f=e.O&&a?b.Ma:e.O?b.Y:b.P;c.O=e.O;return{node:f,payload:c,Kb:!1}});d.nc=function(){};return Xl(d)};q.Bh=function(a){this.Lc=a};
406
- q.load=function(a,b,c){var d=this;this.Lc=null;if(this.l==Ul)return Promise.reject(Wl());this.dispatchEvent(Sl("loading"));var e=yk();e.uri=a;e.Ne=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Yl(this,e)?this.Ya:this.$,g=Ck(this.ma,function(h){if(null==h.O)return null;e.O=h.O;return{node:f,payload:e,Kb:!0}});this.A=new Dl;this.T=Zl(this);g.nc=function(){};return new Promise(function(h,k){g.Cd=function(){return k(new P(2,7,7002))};g.zd=function(){h();d.dispatchEvent(Sl("loaded"))};
407
- g.Rb=function(){return k(Wl())};g.onError=function(l){return k(l)}})};function Yl(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=gh(d),c=$l[c]);if(c){if(""==(b.O||Qc()).canPlayType(c))return!1;if(!Oc()||!(c in fh||gh(d)in hh)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Il(a,b,c){null==b.O&&(b.O=c.O,a.gb.o(b.O,"error",function(){var d=am(a);d&&bm(a,d)}));a.g=b.O;return Promise.resolve()}
408
- function Jl(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return a.l!=Ul&&(a.l=El),c=a.eb.map(function(n){return n()}),a.eb=[],B(p,Promise.all(c),2);case 2:a.dispatchEvent(Sl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.O&&a.B.Sb();a.Uf.stop();a.Xa&&(a.Xa.release(),a.Xa=null);a.td&&(a.td.stop(),a.td=null);if(!a.J){p.D(3);break}return B(p,a.J.stop(),4);case 4:a.J=null,a.yd=null;case 3:if(!a.C){p.D(5);break}return B(p,a.C.stop(),5);case 5:if(!a.j){p.D(7);break}return B(p,
409
- a.j.destroy(),8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.F&&(a.F.release(),a.F=null);if(!a.K){p.D(9);break}return B(p,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.O||!b.O.src){p.D(11);break}return B(p,new Promise(function(n){return(new Q(n)).S(.1)}),12);case 12:for(b.O.removeAttribute("src"),b.O.load();b.O.lastChild;)b.O.removeChild(b.O.firstChild);case 11:if(!a.m){p.D(13);break}return B(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.fb=null;a.N=null;if(a.i){d=
410
- r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.A=new Dl;a.Se=null;cm(a);C(p)}})}
411
- function Kl(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new ui,d=a.h.textDisplayFactory,e=d(),a.Se=d,f=dm(b.O,c,e,function(l,m,p){l=r(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var t=n.cueTime+m,x=p,y=r(n.frames),v=y.next();!v.done;v=y.next())em(a,t,x,"ID3",v.value);if(a.G)a.G.onHlsTimedMetadata(n,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.H=h,B(k,f.I,2);a.K=f;C(k)})}
412
- function Ll(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.fb=d,f=a,B(h,eh(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.yd=h.h;a.J=a.yd();g=jf(a.h.manifest);c.O&&"AUDIO"===c.O.nodeName&&(g.disableVideo=!0);a.J.configure(g);C(h)})}
413
- function Ml(a,b){var c=b.uri;b=a.H;a.Fd=new Nj(function(){return a.Ha()});a.Fd.addEventListener("regionadd",function(f){f=f.region;fm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ea=null;a.h.streaming.observeQualityChanges&&(a.ea=new Jj(function(){return a.jb()}),a.ea.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
414
- height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Sl("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.T;try{h.g.enabled&&(h.A=g.format,dl(h,f,{ot:gl,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){Uk(a.T,f,g)},filter:function(f){return gm(a,f)},makeTextStreamsForClosedCaptions:function(f){return hm(a,
415
- f)},onTimelineRegionAdded:function(f){var g=a.Fd;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new O("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return bm(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
416
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},e=Date.now()/1E3;return new bf(function(){var f,g,h,k;return K(function(l){if(1==l.g)return f=a,B(l,a.J.start(c,d),2);f.i=l.h;g=Sl("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new P(2,4,4036);im(a.i);h=Date.now()/1E3;k=h-e;a.A.H=k;C(l)})}(),function(){return a.J.stop()})}
417
- function Nl(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=jm(a,{Pb:a.H,onError:function(f){bm(a,f)},Bd:function(f){km(a,f)},onExpirationUpdated:function(f,g){lm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.A.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),B(e,zg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?B(e,a.m.Cc(b.O),3):B(e,gm(a,a.i),0)})}
418
- function Ol(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Lc&&(b.startTime=a.Lc,a.Lc=null);d=b.O;e=b.uri;a.fb=e;a.I=new Fj({qd:function(){return d.playbackRate},nd:function(){return d.defaultPlaybackRate},Ie:function(v){d.playbackRate=v},Ef:function(v){d.currentTime+=v}});f=function(){return mm(a)};g=function(){return nm(a)};a.B.o(d,"playing",f);a.B.o(d,"pause",f);a.B.o(d,"ended",f);a.B.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ue==h||
419
- (a.ue=h,a.C=h(),"function"!=typeof a.C.setMediaElement&&(He(),a.C.setMediaElement=function(){}),a.C.configure(a.h.abr));a.za=new Re(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.La=a.h.preferredTextLanguage;a.wb=a.h.preferredTextRole;a.hb=a.h.preferForcedSubs;om(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(v,w,A){a.j&&v!=a.j.l&&pm(a,v,!0,void 0===w?!1:w,void 0===A?0:A)});a.C.setMediaElement(d);a.F=qm(a,b.startTime);a.Xa=rm(a);
420
- k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);sm(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=tm(a);a.j.configure(a.h.streaming);a.l=um;d.textTracks&&a.B.o(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":vm(a,v)}});a.dispatchEvent(Sl("streaming"));l=null;if(m=a.Qa().find(function(v){return v.active})){y.D(2);break}l=Tl(a);pm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.D(3);
421
- break}p=a.F.fd();return B(y,wm(l,p),4);case 4:n=y.h,a.F.ce(n);case 3:xm(a,null,pe(l));case 2:return a.F.be(),t=a.Ab().find(function(v){return v.active}),t||((x=ze(a.i.textStreams,a.La,a.wb,a.hb)[0]||null)&&Cl(a.A.h,x,!0),l&&(x?(l.audio&&ym(a,l.audio,x)&&(a.ba=!0),a.ba&&a.K.m.setTextVisibility(!0),zm(a)):a.ba=!1),x&&(a.h.streaming.alwaysStreamText||a.Ob())&&gk(a.j,x)),B(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),Am(a)),de(a.j?a.j.l:null,a.i),Bm(a.i),Cm(a),Dm(a),a.i.variants.some(function(v){return v.primary}),
422
- a.B.Ea(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Ne}),C(y)}})}
423
- function Pl(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=Jb,e=Date.now()/1E3,f=!0,a.m=jm(a,{Pb:a.H,onError:function(p){bm(a,p)},Bd:function(p){km(a,p)},onExpirationUpdated:function(p,n){lm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=gh(g),k=$l[h],"application/x-mpegurl"==k&&Yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
424
- primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Ia,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
425
- a.m.Y=!0,B(m,zg(a.m,[l],[]),2)):B(m,a.m.Cc(b.O),0)})}
426
- function Ql(a,b,c){function d(){return mm(a)}b.uri=c.uri;b.startTime=c.startTime;a.fb=b.uri;var e=b.O;a.F=new uj(e);var f=!1;a.eb.push(function(){f=!0});null!=b.startTime&&a.F.ce(b.startTime);a.I=new Fj({qd:function(){return e.playbackRate},nd:function(){return e.defaultPlaybackRate},Ie:function(k){e.playbackRate=k},Ef:function(k){e.currentTime+=k}});sm(a,a.h.streaming.rebufferingGoal);a.B.o(e,"playing",d);a.B.o(e,"pause",d);a.B.o(e,"ended",d);a.B.o(e,"ratechange",function(){return nm(a)});"none"!=
427
- e.preload&&a.B.Ea(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Ne});e.audioTracks&&(a.B.o(e.audioTracks,"addtrack",function(){return Cm(a)}),a.B.o(e.audioTracks,"removetrack",function(){return Cm(a)}),a.B.o(e.audioTracks,"change",function(){return Cm(a)}));e.textTracks&&(a.B.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Em(a,k);break;case "chapters":vm(a,k);break;default:Cm(a)}}),a.B.o(e.textTracks,"removetrack",function(){return Cm(a)}),a.B.o(e.textTracks,
428
- "change",function(){return Cm(a)}));var g=gh(b.uri);e.src=el(a.T,b.uri,$l[g]);(Wc()||Vc("Web0S"))&&e.load();a.l=Fm;a.dispatchEvent(Sl("streaming"));var h=new Lc;lj(e,HTMLMediaElement.HAVE_METADATA,a.B,function(){a.F.be();h.resolve()});lj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.B,function(){var k;return K(function(l){if(1==l.g)return Gm(a),k=Hm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):B(l,new Promise(function(m){a.B.Ea(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l.return();
429
- Im(a);C(l)})});e.error?h.reject(am(a)):"none"==e.preload&&(Ua('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.'),h.resolve());a.B.Ea(e,"error",function(){h.reject(am(a))});return new bf(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
430
- function Gm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Id(b);var c=a.h.preferredVariantRole;""!=c&&a.Id(b,c)}}function Im(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Be(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Be(b,d,c)}}
431
- function Em(a,b){if("metadata"==b.kind){b.mode="hidden";a.B.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,em(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Jm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).ya().S(.5);a.eb.push(function(){c.stop()})}}
432
- function em(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Sl("metadata",b))}function vm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).ya().S(.5);a.eb.push(function(){c.stop()})}}function im(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))}function jm(a,b){return new sg(b,a.h.drm.updateExpirationTime)}
433
- function Gl(a){return new nf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Sl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Sl("downloadfailed",b))})}
434
- function qm(a,b){return new vj(a.g,a.i,a.h.streaming,b,function(){a.Xa&&Ij(a.Xa,!0);a.j&&a.j.Vc();a.N&&Km(a)},function(c){return a.dispatchEvent(c)})}
435
- function rm(a){var b=new Oj(a.Fd);b.addEventListener("enter",function(d){fm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){fm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(fm(a,"timelineregionenter",e),fm(a,"timelineregionexit",e))});var c=new Hj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function sm(a,b){a.N=new Ve;a.N.g=Xe;Ye(a.N,b,Math.min(.5,b/2));cm(a);a.td=(new Q(function(){Km(a)})).ka(.25)}
436
- function Km(a){switch(a.l){case Fm:if(a.g.ended)var b=!0;else{var c=Ci(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case um:a:if(a.g.ended||Ni(a.K))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Jb();var d=Ci(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ei(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?We:Xe;c.g=d;b!=d&&cm(a)}function dm(a,b,c,d){return new Hi(a,b,c,d)}
437
- function Zl(a){return new Tk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},jb:function(){return a.jb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Qa:function(){return a.Qa()},zb:function(){return a.zb()},U:function(){return a.U()}},a.h.cmcd)}
438
- function tm(a){return new Uj(a.i,{pd:function(){return a.F.fd()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Uk(a.T,b,c)},V:a.K,Pb:a.H,onError:function(b){return bm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ah:function(){a.J&&a.J.update&&a.J.update()},se:function(){a.F&&a.F.Ff();Km(a)},$g:function(b,c){(c=c.me)&&a.ea&&Lj(a.ea,c,b)},df:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){c=new Uf(Ec(c));
394
+ sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h.return(xl(g,f.preferredAudioLanguage))})};return f}function yl(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:""}};return pl(a,b,c||wl(),d,"")}
395
+ function xl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=Ub(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Mb(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
396
+ 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=Ib&&"image"!=d.type||b.push(d);return b}M("shaka.util.PlayerConfiguration",vl);vl.mergeConfigObjects=yl;vl.createDefault=wl;function zl(){this.g=null;this.h=[]}function Al(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Bl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
397
+ function Cl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(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 Dl(){this.i=this.h=null;this.g=[]}function El(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 Fl(){this.C=this.F=this.I=this.G=this.B=this.j=this.H=this.m=this.i=this.P=this.T=this.J=this.K=this.N=this.l=this.A=NaN;this.g=new zl;this.h=new Dl};function T(a,b){fb.call(this);var c=this;this.l=Gl;this.td=this.g=null;this.ba=!1;this.yd=new Af;this.gb=new Af;this.B=new Af;this.ve=this.C=this.hb=this.i=this.Fd=this.J=this.j=this.ea=this.T=this.ma=this.N=this.vd=this.I=this.$a=this.F=this.K=this.m=this.H=null;this.Xf=1E9;this.h=Hl(this);this.Lc={width:Infinity,height:Infinity};this.A=null;this.Aa=new Re(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Oa=this.h.preferredTextLanguage;this.Fc=this.h.preferredTextRole;
398
+ this.wb=this.h.preferForcedSubs;this.ib=[];this.Nc=null;b&&b(this);this.H=Il(this);this.H.He(this.h.streaming.forceHTTPS);this.G=null;Jl&&(this.G=Jl());this.yd.o(window,"online",function(){c.ye()});this.P={name:"detach"};this.Y={name:"attach"};this.aa={name:"unload"};this.Ye={name:"manifest-parser"};this.Xe={name:"manifest"};this.Za={name:"media-source"};this.ze={name:"drm-engine"};this.$={name:"load"};this.Ze={name:"src-equals-drm-engine"};this.ab={name:"src-equals"};var d=new Map;d.set(this.Y,function(e,
399
+ f){return ff(Kl(c,e,f))});d.set(this.P,function(e){e.O&&(c.gb.Sb(),e.O=null);c.G&&c.G.release();c.g=null;e=Promise.resolve();return ff(e)});d.set(this.aa,function(e){return ff(Ll(c,e))});d.set(this.Za,function(e){e=Ml(c,e);return ff(e)});d.set(this.Ye,function(e,f){e=Nl(c,e,f);return ff(e)});d.set(this.Xe,function(e){return Ol(c,e)});d.set(this.ze,function(e){e=Pl(c,e);return ff(e)});d.set(this.$,function(e,f){return ff(Ql(c,e,f))});d.set(this.Ze,function(e,f){e=Rl(c,e,f);return ff(e)});d.set(this.ab,
400
+ function(e,f){return Sl(c,e,f)});this.ua=new zk(this.P,{Hg:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.Y);e==c.Y&&(k=g==c.P||f.O!=h.O?c.P:g==c.Y?c.Y:g==c.Za||g==c.$?c.Za:g==c.ab?c.Ze:null);e==c.Za&&(k=g==c.$&&f.O==h.O?c.Ye:c.aa);e==c.Ye&&(k=Tl(c.$,c.Xe,c.aa,g,f,h));e==c.Xe&&(k=Tl(c.$,c.ze,c.aa,g,f,h));e==c.ze&&(k=Tl(c.$,c.$,c.aa,g,f,h));e==c.Ze&&(k=g==c.ab&&f.O==h.O?c.ab:c.aa);if(e==c.$||e==c.ab)k=c.aa;e==c.aa&&(k=h.O&&f.O==h.O?c.Y:c.P);return k},lg:function(e,f,g){c.dispatchEvent(Ul("onstatechange",
401
+ (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?A(f,Ll(c,e),2):f.return(e.O?c.Y:c.P)})},ah:function(e){c.dispatchEvent(Ul("onstateidle",(new Map).set("state",e.name)))}});this.Wf=new Q(function(){ae(c.i.variants,c.h.restrictions,c.Lc)&&Vl(c)});a&&this.Cc(a,!0)}u(T,fb);function Ul(a,b){return new O(a,b)}q=T.prototype;
402
+ q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Wl)return c.return();a.l=Wl;b=Ek(a.ua,function(){return{node:a.P,payload:Ak(),Kb:!1}});return A(c,new Promise(function(d){b.nc=function(){};b.zd=function(){d()};b.Rb=function(){d()};b.onError=function(){d()};b.Cd=function(){d()}}),2);case 2:return A(c,a.ua.destroy(),3);case 3:a.yd&&(a.yd.release(),a.yd=null);a.gb&&(a.gb.release(),a.gb=null);a.B&&(a.B.release(),a.B=null);a.ve=null;a.C=null;a.h=null;a.A=null;a.td=null;
403
+ a.T=null;if(!a.H){c.D(4);break}return A(c,a.H.destroy(),5);case 5:a.H=null;case 4:fb.prototype.release.call(a),B(c)}})};
404
+ function Xl(){window.Promise||Ua("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||Sc("Trident/"))return!1;var a=$c();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:Oc()?!0:Pc("application/x-mpegurl")}
405
+ q.Cc=function(a,b){b=void 0===b?!0:b;if(this.l==Wl)return Promise.reject(Yl());var c=Ak();c.O=a;Oc()||(b=!1);var d=b?this.Za:this.Y;a=Ek(this.ua,function(){return{node:d,payload:c,Kb:!1}});a.nc=function(){};return Zl(a)};q.detach=function(){var a=this;if(this.l==Wl)return Promise.reject(Yl());var b=Ek(this.ua,function(){return{node:a.P,payload:Ak(),Kb:!1}});b.nc=function(){};return Zl(b)};
406
+ q.Ve=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Wl)return Promise.reject(Yl());Oc()||(a=!1);var c=Ak(),d=Ek(this.ua,function(e){var f=e.O&&a?b.Za:e.O?b.Y:b.P;c.O=e.O;return{node:f,payload:c,Kb:!1}});d.nc=function(){};return Zl(d)};q.Dh=function(a){this.Nc=a};
407
+ q.load=function(a,b,c){var d=this;this.Nc=null;if(this.l==Wl)return Promise.reject(Yl());this.dispatchEvent(Ul("loading"));var e=Ak();e.uri=a;e.Oe=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=$l(this,e)?this.ab:this.$,g=Ek(this.ua,function(h){if(null==h.O)return null;e.O=h.O;return{node:f,payload:e,Kb:!0}});this.A=new Fl;this.T=am(this);g.nc=function(){};return new Promise(function(h,k){g.Cd=function(){return k(new P(2,7,7002))};g.zd=function(){h();d.dispatchEvent(Ul("loaded"))};
408
+ g.Rb=function(){return k(Yl())};g.onError=function(l){return k(l)}})};function $l(a,b){if(!Oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=gh(d),c=bm[c]);if(c){if(""==(b.O||Qc()).canPlayType(c))return!1;if(!Oc()||!(c in fh||gh(d)in hh)||a.h.streaming.preferNativeHls)return!0;if(Yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Kl(a,b,c){null==b.O&&(b.O=c.O,a.gb.o(b.O,"error",function(){var d=cm(a);d&&dm(a,d)}));a.g=b.O;return Promise.resolve()}
409
+ function Ll(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return a.l!=Wl&&(a.l=Gl),c=a.ib.map(function(n){return n()}),a.ib=[],A(p,Promise.all(c),2);case 2:a.dispatchEvent(Ul("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.ma&&(a.ma.release(),a.ma=null);b.O&&a.B.Sb();a.Wf.stop();a.$a&&(a.$a.release(),a.$a=null);a.vd&&(a.vd.stop(),a.vd=null);if(!a.J){p.D(3);break}return A(p,a.J.stop(),4);case 4:a.J=null,a.Fd=null;case 3:if(!a.C){p.D(5);break}return A(p,a.C.stop(),5);
410
+ case 5:if(!a.j){p.D(7);break}return A(p,a.j.destroy(),8);case 8:a.j=null;case 7:a.I&&(a.I.release(),a.I=null);a.F&&(a.F.release(),a.F=null);if(!a.K){p.D(9);break}return A(p,a.K.destroy(),10);case 10:a.K=null;case 9:if(a.G)a.G.onAssetUnload();if(!b.O||!b.O.src){p.D(11);break}return A(p,new Promise(function(n){return(new Q(n)).S(.1)}),12);case 12:for(b.O.removeAttribute("src"),b.O.load();b.O.lastChild;)b.O.removeChild(b.O.firstChild);case 11:if(!a.m){p.D(13);break}return A(p,a.m.destroy(),14);case 14:a.m=
411
+ null;case 13:a.hb=null;a.N=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.A=new Fl;a.Ue=null;em(a);B(p)}})}
412
+ function Ml(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new ui,d=a.h.textDisplayFactory,e=d(),a.Ue=d,f=fm(b.O,c,e,function(l,m,p){l=r(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var t=n.cueTime+m,y=p,x=r(n.frames),v=x.next();!v.done;v=x.next())gm(a,t,y,"ID3",v.value);if(a.G)a.G.onHlsTimedMetadata(n,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.H=h,A(k,f.I,2);a.K=f;B(k)})}
413
+ function Nl(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.H,a.hb=d,f=a,A(h,eh(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Fd=h.h;a.J=a.Fd();g=jf(a.h.manifest);c.O&&"AUDIO"===c.O.nodeName&&(g.disableVideo=!0);a.J.configure(g);B(h)})}
414
+ function Ol(a,b){var c=b.uri;b=a.H;a.ma=new Pj(function(){return a.Ka()});a.ma.addEventListener("regionadd",function(f){f=f.region;hm(a,"timelineregionadded",f);if(a.G)a.G.onDashTimedMetadata(f)});a.ea=null;a.h.streaming.observeQualityChanges&&(a.ea=new Lj(function(){return a.kb()}),a.ea.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
415
+ height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Ul("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.T;try{h.g.enabled&&(h.A=g.format,fl(h,f,{ot:il,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){Wk(a.T,f,g)},filter:function(f){return im(a,f)},makeTextStreamsForClosedCaptions:function(f){return jm(a,
416
+ f)},onTimelineRegionAdded:function(f){var g=a.ma;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new O("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return dm(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
417
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},e=Date.now()/1E3;return new bf(function(){var f,g,h,k;return K(function(l){if(1==l.g)return f=a,A(l,a.J.start(c,d),2);f.i=l.h;g=Ul("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new P(2,4,4036);km(a.i);h=Date.now()/1E3;k=h-e;a.A.H=k;B(l)})}(),function(){return a.J.stop()})}
418
+ function Pl(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=lm(a,{Pb:a.H,onError:function(f){dm(a,f)},Bd:function(f){mm(a,f)},onExpirationUpdated:function(f,g){nm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.A.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),A(e,zg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?A(e,a.m.Cc(b.O),3):A(e,im(a,a.i),0)})}
419
+ function Ql(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y;return K(function(x){switch(x.g){case 1:b.startTime=c.startTime;null!=a.Nc&&(b.startTime=a.Nc,a.Nc=null);d=b.O;e=b.uri;a.hb=e;a.I=new Hj({rd:function(){return d.playbackRate},od:function(){return d.defaultPlaybackRate},Je:function(v){d.playbackRate=v},Gf:function(v){d.currentTime+=v}});f=function(){return om(a)};g=function(){return pm(a)};a.B.o(d,"playing",f);a.B.o(d,"pause",f);a.B.o(d,"ended",f);a.B.o(d,"ratechange",g);h=a.h.abrFactory;a.C&&a.ve==h||
420
+ (a.ve=h,a.C=h(),"function"!=typeof a.C.setMediaElement&&(He(),a.C.setMediaElement=function(){}),a.C.configure(a.h.abr));a.Aa=new Re(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Oa=a.h.preferredTextLanguage;a.Fc=a.h.preferredTextRole;a.wb=a.h.preferForcedSubs;qm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.C.init(function(v,w,C){a.j&&v!=a.j.l&&rm(a,v,!0,void 0===w?!1:w,void 0===C?0:C)});a.C.setMediaElement(d);a.F=sm(a,b.startTime);a.$a=tm(a);
421
+ k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);um(a,k);Nd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=vm(a);a.j.configure(a.h.streaming);a.l=wm;d.textTracks&&a.B.o(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":xm(a,v)}});a.dispatchEvent(Ul("streaming"));l=null;if(m=a.Sa().find(function(v){return v.active})){x.D(2);break}l=Vl(a);rm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.D(3);
422
+ break}p=a.F.gd();return A(x,ym(l,p),4);case 4:n=x.h,a.F.ce(n);case 3:zm(a,null,pe(l));case 2:return a.F.be(),t=a.Ab().find(function(v){return v.active}),t||((y=ze(a.i.textStreams,a.Oa,a.Fc,a.wb)[0]||null)&&El(a.A.h,y,!0),l&&(y?(l.audio&&Am(a,l.audio,y)&&(a.ba=!0),a.ba&&a.K.m.setTextVisibility(!0),Bm(a)):a.ba=!1),y&&(a.h.streaming.alwaysStreamText||a.Ob())&&ik(a.j,y)),A(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.C.enable(),Cm(a)),de(a.j?a.j.l:null,a.i),Dm(a.i),Em(a),Fm(a),a.i.variants.some(function(v){return v.primary}),
423
+ a.B.Fa(d,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Oe}),B(x)}})}
424
+ function Rl(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=Jb,e=Date.now()/1E3,f=!0,a.m=lm(a,{Pb:a.H,onError:function(p){dm(a,p)},Bd:function(p){mm(a,p)},onExpirationUpdated:function(p,n){nm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.A.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=gh(g),k=bm[h],"application/x-mpegurl"==k&&Yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
425
+ primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?Ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.La,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
426
+ a.m.Y=!0,A(m,zg(a.m,[l],[]),2)):A(m,a.m.Cc(b.O),0)})}
427
+ function Sl(a,b,c){function d(){return om(a)}b.uri=c.uri;b.startTime=c.startTime;a.hb=b.uri;var e=b.O;a.F=new wj(e);var f=!1;a.ib.push(function(){f=!0});null!=b.startTime&&a.F.ce(b.startTime);a.I=new Hj({rd:function(){return e.playbackRate},od:function(){return e.defaultPlaybackRate},Je:function(k){e.playbackRate=k},Gf:function(k){e.currentTime+=k}});um(a,a.h.streaming.rebufferingGoal);a.B.o(e,"playing",d);a.B.o(e,"pause",d);a.B.o(e,"ended",d);a.B.o(e,"ratechange",function(){return pm(a)});"none"!=
428
+ e.preload&&a.B.Fa(e,"loadedmetadata",function(){a.A.m=Date.now()/1E3-c.Oe});e.audioTracks&&(a.B.o(e.audioTracks,"addtrack",function(){return Em(a)}),a.B.o(e.audioTracks,"removetrack",function(){return Em(a)}),a.B.o(e.audioTracks,"change",function(){return Em(a)}));e.textTracks&&(a.B.o(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Gm(a,k);break;case "chapters":xm(a,k);break;default:Em(a)}}),a.B.o(e.textTracks,"removetrack",function(){return Em(a)}),a.B.o(e.textTracks,
429
+ "change",function(){return Em(a)}));var g=gh(b.uri);e.src=gl(a.T,b.uri,bm[g]);(Wc()||Sc("Web0S"))&&e.load();a.l=Hm;a.dispatchEvent(Ul("streaming"));var h=new Lc;nj(e,HTMLMediaElement.HAVE_METADATA,a.B,function(){a.F.be();h.resolve()});nj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.B,function(){var k;return K(function(l){if(1==l.g)return Im(a),k=Jm(a),k.find(function(m){return"disabled"!=m.mode})?l.D(2):A(l,new Promise(function(m){a.B.Fa(e.textTracks,"change",m);(new Q(m)).S(1)}),2);if(f)return l.return();
430
+ Km(a);B(l)})});e.error?h.reject(cm(a)):"none"==e.preload&&(Ua('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.'),h.resolve());a.B.Fa(e,"error",function(){h.reject(cm(a))});return new bf(h,function(){h.reject(new P(2,7,7001));return Promise.resolve()})}
431
+ function Im(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Id(b);var c=a.h.preferredVariantRole;""!=c&&a.Id(b,c)}}function Km(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Ce(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Ce(b,d,c)}}
432
+ function Gm(a,b){if("metadata"==b.kind){b.mode="hidden";a.B.o(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,gm(a,e.startTime,e.endTime,e.type,e.value),a.G)a.G.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Lm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).za().S(.5);a.ib.push(function(){c.stop()})}}
433
+ function gm(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ul("metadata",b))}function xm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).za().S(.5);a.ib.push(function(){c.stop()})}}function km(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))}function lm(a,b){return new qg(b,a.h.drm.updateExpirationTime)}
434
+ function Il(a){return new nf(function(b,c){a.C&&a.C.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Ul("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Ul("downloadfailed",b))})}
435
+ function sm(a,b){return new xj(a.g,a.i,a.h.streaming,b,function(){a.$a&&Kj(a.$a,!0);a.j&&a.j.Wc();a.N&&Mm(a)},function(c){return a.dispatchEvent(c)})}
436
+ function tm(a){var b=new Qj(a.ma);b.addEventListener("enter",function(d){hm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){hm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(hm(a,"timelineregionenter",e),hm(a,"timelineregionexit",e))});var c=new Jj(a.g);c.g.add(b);a.ea&&c.g.add(a.ea);return c}function um(a,b){a.N=new Ve;a.N.g=Xe;Ye(a.N,b,Math.min(.5,b/2));em(a);a.vd=(new Q(function(){Mm(a)})).ka(.25)}
437
+ function Mm(a){switch(a.l){case Hm:if(a.g.ended)var b=!0;else{var c=Ci(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case wm:a:if(a.g.ended||Ni(a.K))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.Jb();var d=Ci(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ei(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?We:Xe;c.g=d;b!=d&&em(a)}function fm(a,b,c,d){return new Hi(a,b,c,d)}
438
+ function am(a){return new Vk({getBandwidthEstimate:function(){return a.C?a.C.getBandwidthEstimate():NaN},kb:function(){return a.kb()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Sa:function(){return a.Sa()},zb:function(){return a.zb()},U:function(){return a.U()}},a.h.cmcd)}
439
+ function vm(a){return new Wj(a.i,{qd:function(){return a.F.gd()},getBandwidthEstimate:function(){return a.C.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Wk(a.T,b,c)},V:a.K,Pb:a.H,onError:function(b){return dm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},dh:function(){a.J&&a.J.update&&a.J.update()},ue:function(){a.F&&a.F.Hf();Mm(a)},bh:function(b,c){(c=c.me)&&a.ea&&Nj(a.ea,c,b)},gf:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){c=new Uf(Ec(c));
439
440
  var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Ig(d,"cenc",e);d=d.A}}else d=Promise.resolve();return d}})}
440
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ol(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=wl(this.h,a,Fl(this));Lm(this);return c};
441
- function Lm(a){if(a.J){var b=jf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Mm(a,a.i)}catch(f){bm(a,f)}a.C&&Dm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Nm(a)}a.H&&a.H.Ge(a.h.streaming.forceHTTPS);if(a.K&&(a.K.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Se!=b)){var c=b(),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
442
- c);a.Se=b;a.j&&(b=a.j,(c=b.i.get(Ib))&&ek(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Am(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ye(a.N,b,Math.min(.5,b/2)));a.i&&om(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Fl(this);wl(a,this.h,Fl(this));return a};
443
- q.mg=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ha().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.lh=function(){for(var a in this.h)delete this.h[a];wl(this.h,Fl(this),Fl(this));Lm(this)};q.wf=function(){return this.l};q.Eg=function(){return this.g};q.Ic=function(){return this.H};q.fe=function(){return this.fb};
444
- q.md=function(){return this.G?this.G:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.i?this.i.presentationTimeline.Mb():!1};q.ic=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
445
- q.Ha=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.ec(),end:a.kb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Pg=function(){this.U()&&(this.g.currentTime=this.Ha().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Hc=function(){return this.m?this.m.Hc():Infinity};q.od=function(){return this.m?this.m.od():{}};
446
- q.Oc=function(){return this.N?this.N.g==Xe:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Re=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==um&&(this.C.playbackRateChanged(a),dk(this.j,1<Math.abs(a))))};q.gf=function(){var a=this.I.nd();this.l==Fm&&this.I.set(a);this.l==um&&(this.I.set(a),this.C.playbackRateChanged(a),dk(this.j,!1))};
447
- q.Qa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,xe(e)){var f=pe(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.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return we(g)}):[]};
448
- q.Ab=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=qe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Hm(this).map(function(f){return ue(f)}):[]};q.wg=function(){return this.i?this.i.imageStreams.map(function(a){return re(a)}):[]};
449
- q.Lg=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,A,z,D;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(F){return F.id==a}))?d.segmentIndex?G.D(3):B(G,d.createSegmentIndex(),3):G.return(null):G.D(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;x=m*p;y=f.j-
450
- f.startTime;v=f.m||y/x;w=f.startTime;z=A=0;1<x&&(D=Math.floor((b-f.startTime)/v),w=f.startTime+D*v,A=D%m*n,z=Math.floor(D/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:A,positionY:z,startTime:w,duration:v,uris:f.Pa(),width:n})}return G.return(null)})};
451
- q.Ce=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(Cl(this.A.h,b,!1),gk(this.j,b),Om(this),this.La=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Hm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,se(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";Om(this)}};
452
- q.De=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&xe(d)&&(pm(this,d,!1,b,c),this.za=new Qe(d),Dm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
453
- se(c)==a.id){Pm(this,c);break}};q.lg=function(){return Qm(this.Qa())};q.Kg=function(){return Qm(this.Ab())};q.kg=function(){return Array.from(Rm(this.Qa()))};q.Jg=function(){return Array.from(Rm(this.Ab()))};
454
- q.Id=function(a,b){if(this.i&&this.F){this.za=new Re(a,b||"",0,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var c=this.za.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=pe(d),this.De(b,!0)):Nm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=Mb(a);c=d=null;e=
455
- r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=we(f);Mb(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Pm(this,c):d&&Pm(this,d)}};
456
- q.Be=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.La=a,this.wb=b||"",this.hb=c,(a=ze(this.i.textStreams,this.La,this.wb,this.hb)[0]||null)&&a!=this.j.A&&(Cl(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))gk(this.j,a),Om(this)}else{var d=Mb(a);(a=this.Ab().find(function(e){return Mb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ce(a)}};
457
- q.oh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.za=new Re(b.language,"",0,a),Nm(this))}};q.Ob=function(){var a=this.ba;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Hm(this).some(function(b){return"showing"==b.mode}):a};q.uf=function(){return this.g&&this.g.src&&this.g.textTracks?Sm(this).map(function(a){return ue(a)}):[]};
458
- q.og=function(a){var b=Mb(a),c=Sm(this).filter(function(g){return Mb(g.language)==b});if(!c||!c.length)return[];a=[];c=r(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=r(d.cues);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
459
- function Hm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Jm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Sm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
460
- q.Le=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==um)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ze(this.i.textStreams,this.La,this.wb,this.hb),0<a.length&&(gk(this.j,a[0]),Om(this))):ck(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Hm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}zm(this)}};
461
- q.Gg=function(){if(!this.U())return null;var a=this.ma.l,b=0;if(this.F)b=this.F.fd();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
462
- q.xf=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.jb=function(){if(this.l==um)return this.K.jb();var a={total:[],audio:[],video:[],text:[]};this.l==Fm&&(a.total=Fi(this.g.buffered));return a};
463
- q.getStats=function(){if(this.l!=um&&this.l!=Fm)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,switchHistory:[],stateHistory:[]};mm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.A;b=
464
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.A.P=this.F.Ye(),this.A.T=this.F.Ze());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.A.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.A.B=c;if(this.l==um){if(c=this.j.l)this.A.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.A,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.U()&&(c=this.xf().valueOf()+
465
- 1E3*this.Ha().end,this.A.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.A.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.A.C=c}this.l==Fm&&(c=this.A,b=a.videoHeight||NaN,c.A=a.videoWidth||NaN,c.l=b);var e=this.A;a=e.A;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.T,k=e.P,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,x=zl(e.g,"playing"),y=zl(e.g,"paused"),v=zl(e.g,"buffering"),w=e.B,A=e.G,z=e.I,D=Al(e.g),G=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,G.push({timestamp:F.timestamp,
466
- id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:x,pauseTime:y,bufferingTime:v,licenseTime:w,liveLatency:A,maxSegmentDuration:z,stateHistory:D,switchHistory:G}};
467
- q.$f=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,x,y,v,w,A;return K(function(z){switch(z.g){case 1:if(h.l!=um&&h.l!=Fm)throw new P(1,7,7004);if(d){z.D(2);break}return B(z,Tm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(D){}if(h.l!=Fm){z.D(4);break}g&&(c="forced");return B(z,Um(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(D){return D.language==b&&D.label==(f||"")&&D.kind==c}))return Cm(h),z.return(m);throw new P(1,2,2012);case 4:p=
468
- Jb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new P(1,4,4033);if(!k.length){z.D(6);break}return B(z,Vm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,x=Wm(h,t,d,k),y=new Blob([x],{type:"text/vtt"}),a=Ki(y),d="text/vtt";case 6:v={id:h.Vf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Dj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ha,primary:!1,trickModeVideo:null,
469
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=wd(v.mimeType,v.codecs);A=Cd(w);if(!A)throw new P(2,2,2014,d);h.i.textStreams.push(v);Cm(h);return z.return(qe(v))}})};
470
- q.Zf=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=um&&d.l!=Fm)throw new P(1,7,7004);if(c){k.D(2);break}return B(k,Tm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return B(k,Um(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.uf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return B(k,new Promise(function(l,m){d.B.Ea(f,"load",l);d.B.Ea(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k.return(h);
471
- case 5:throw new P(1,2,2012);}})};function Tm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=gh(b);if(d=Xm[c])return e.return(d);E(e,2);return B(e,ih(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:I(e);case 3:if(d)return e.return(d);throw new P(1,2,2011,c);}})}
472
- function Um(a,b,c,d,e,f,g){var h,k,l,m;return K(function(p){if(1==p.g)return"text/vtt"!=e||g.length?B(p,Vm(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=Wm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ki(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var x=fl(n);x.ot=ll;x.su=!0;var y=hl(x);var v=il(t,y)}else v=t}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=t}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
473
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Vm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=xf;f=rf([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&dl(k,f,{ot:ll,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return B(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
474
- function Wm(a,b,c,d){var e=Dd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Ec(b),b=c.parseMedia(b,a),Sk(b,d);throw new P(2,2,2014,c);}q.He=function(a,b){this.Fc.width=a;this.Fc.height=b};q.xe=function(a){if(this.l==um){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Mc&&(d.Mc=!1,bk(b,d,a));b=!0}}else b=!1;return b};
475
- q.Bg=function(){Ua("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.Cg=function(){return this.yd};
476
- function Fl(a){var b=ul();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.xe(d))}};b.textDisplayFactory=function(){return a.rd?new Kk(a.g,a.rd):new Ek(a.g)};return b}q.Me=function(a){this.rd=a};
477
- function hm(a,b){for(var c=new Set,d=r(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=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(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 Ej;h={id:a.Vf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
478
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function gm(a,b){return K(function(c){if(1==c.g)return B(c,Ym(a,b),2);Mm(a,b);C(c)})}
479
- function Ym(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,B(d,be(c,b),2);Bm(b);C(d)})}
480
- function Mm(a,b){if(a.l!=Ul){ae(b.variants,a.h.restrictions,a.Fc)&&a.j&&Cm(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=r(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,Ig(a.m,g.initDataType,g.initData)}}Zm(a,b)}}
481
- function wm(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return K(function(t){if(1==t.g)return k?B(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},B(h,e(c,b),2);if(3!=h.g)return f=h.h,B(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)})}
482
- function cm(a){var b=a.Oc();if(a.A&&a.N&&a.F){var c=a.I;c.j=b;Gj(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);mm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Sl("buffering",b))}function nm(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Sl("ratechange"),a.dispatchEvent(b))}function mm(a){if(a.A&&a.N){var b=a.A.g;a.N.g==Xe?yl(b,"buffering"):a.g.paused?yl(b,"paused"):a.g.ended?yl(b,"ended"):yl(b,"playing")}}
483
- function Dm(a){try{Zm(a,a.i)}catch(c){return bm(a,c),!1}var b=a.i.variants.filter(function(c){return xe(c)});b=a.za.create(b);a.C.setVariants(Array.from(b.values()));return!0}function Tl(a){return Dm(a)?a.C.chooseVariant():null}function Nm(a){var b=Tl(a);b&&pm(a,b,!0,!0,0)}
484
- function pm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&fk(a.j,b,d,e,!0);else{var g=a.A.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));fk(a.j,b,d,e,void 0,c);d=null;f&&(d=pe(f));b=pe(b);c?xm(a,d,b):$m(a,d,b)}}function Pm(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=we(c);b=we(b);$m(a,c,b)}
485
- function ym(a,b,c){a=Mb(a.h.preferredTextLanguage);b=Mb(b.language);c=Mb(c.language);return Lb(c,a)&&!Lb(b,c)}function xm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Sl("adaptation",b);an(a,b)}function Cm(a){var b=Sl("trackschanged");an(a,b)}function $m(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Sl("variantchanged",b);an(a,b)}function Om(a){var b=Sl("textchanged");an(a,b)}function zm(a){var b=Sl("texttrackvisibility");an(a,b)}
486
- function Am(a){var b=(new Map).set("newStatus",a.h.abr.enabled);an(a,Sl("abrstatuschanged",b))}
487
- function bn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Qa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);ae(d.variants,a.h.restrictions,a.Fc);b=Tl(a);if(!b)return!1;d=a.jb().video.reduce(function(g,h){return g+h.end-h.start},0);pm(a,b,!1,!0,d);a.Uf.S(c);return!0}
488
- function bm(a,b){if(a.l!=Ul)if(bn(a,b))b.handled=!0;else{var c=Sl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function fm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Sl(b,c))}
489
- function am(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
490
- function km(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!cn.includes(l)}h!=f.allowedByKeySystem&&
491
- (e=!0)}}}if(!e||Dm(a))(b=a.j.l)&&!b.allowedByKeySystem&&Nm(a),e&&Cm(a)}}function lm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Sl("expirationupdated");a.dispatchEvent(b)}function om(a,b,c){0<b&&(a.U()||a.Of(b));b=a.getDuration();c<b&&(a.U()||a.bb(c))}
492
- function Zm(a,b){a=a.m?a.m.od():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(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=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?cn.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
493
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a);}function Bm(a){if(!a.variants.some(xe))throw new P(2,4,4032);}function an(a,b){K(function(c){if(1==c.g)return B(c,Promise.resolve(),2);a.l!=Ul&&a.dispatchEvent(b);C(c)})}function Rm(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Mb(c.language)):b.add("und");return b}
494
- function Qm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Mb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(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=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
495
- h.push({language:l,role:m,label:p})}});return h}function Wl(){return new P(2,7,7E3)}function Rl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function yk(){return{O:null,mimeType:null,startTime:null,Ne:NaN,uri:null}}function Xl(a){return new Promise(function(b,c){a.Rb=function(){return c(Wl())};a.zd=function(){return b()};a.onError=function(d){return c(d)};a.Cd=function(){return c(Wl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Me;
496
- U.prototype.getManifestParserFactory=U.prototype.Cg;U.prototype.getManifest=U.prototype.Bg;U.prototype.retryStreaming=U.prototype.xe;U.prototype.setMaxHardwareResolution=U.prototype.He;U.prototype.addChaptersTrack=U.prototype.Zf;U.prototype.addTextTrackAsync=U.prototype.$f;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.jb;U.prototype.getPresentationStartTimeAsDate=U.prototype.xf;U.prototype.getPlayheadTimeAsDate=U.prototype.Gg;
497
- U.prototype.setTextTrackVisibility=U.prototype.Le;U.prototype.getChapters=U.prototype.og;U.prototype.getChaptersTracks=U.prototype.uf;U.prototype.isTextTrackVisible=U.prototype.Ob;U.prototype.selectVariantsByLabel=U.prototype.oh;U.prototype.selectTextLanguage=U.prototype.Be;U.prototype.selectAudioLanguage=U.prototype.Id;U.prototype.getTextLanguages=U.prototype.Jg;U.prototype.getAudioLanguages=U.prototype.kg;U.prototype.getTextLanguagesAndRoles=U.prototype.Kg;
498
- U.prototype.getAudioLanguagesAndRoles=U.prototype.lg;U.prototype.selectVariantTrack=U.prototype.De;U.prototype.selectTextTrack=U.prototype.Ce;U.prototype.getThumbnails=U.prototype.Lg;U.prototype.getImageTracks=U.prototype.wg;U.prototype.getTextTracks=U.prototype.Ab;U.prototype.getVariantTracks=U.prototype.Qa;U.prototype.cancelTrickPlay=U.prototype.gf;U.prototype.trickPlay=U.prototype.Re;U.prototype.getPlaybackRate=U.prototype.zb;U.prototype.isBuffering=U.prototype.Oc;U.prototype.getKeyStatuses=U.prototype.od;
499
- U.prototype.getExpiration=U.prototype.Hc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Pg;U.prototype.seekRange=U.prototype.Ha;U.prototype.isAudioOnly=U.prototype.ic;U.prototype.isInProgress=U.prototype.Mb;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.md;U.prototype.getAssetUri=U.prototype.fe;U.prototype.getNetworkingEngine=U.prototype.Ic;U.prototype.getMediaElement=U.prototype.Eg;
500
- U.prototype.getLoadMode=U.prototype.wf;U.prototype.resetConfiguration=U.prototype.lh;U.prototype.getBufferFullness=U.prototype.mg;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.Bh;U.prototype.unload=U.prototype.Te;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Cc;
501
- U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?B(h,Zg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Oc()){for(var l in fh)k[l]=!0;for(var m in hh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=Oc()?!!fh[p]:Pc(p);for(var n in l)k[n]=
502
- Oc()?!!hh[n]:Pc(l[n]);c=k;n='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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(ja(ej));
503
- k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Oc()?Cd(l)?!0:MediaSource.isTypeSupported(l)||rd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=dn;for(g in f)e[g]=f[g]();return h.return(e)})};U.isBrowserSupported=Vl;U.setAdManagerFactory=function(a){Hl=a};U.registerSupportPlugin=function(a,b){dn[a]=b};U.prototype.destroy=U.prototype.destroy;var Ul=0,El=1,um=2,Fm=3;U.LoadMode={DESTROYED:Ul,NOT_LOADED:El,MEDIA_SOURCE:um,SRC_EQUALS:Fm};U.version="v4.2.5";
504
- var en=["4","2"];Ie=new function(a){this.g=a;this.i=Je;this.h=Le}(new Ge(Number(en[0]),Number(en[1])));
505
- var cn=["output-restricted","internal-error"],dn={},Hl=null,$l={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",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Xm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
506
- ssa:"text/x-ssa",ass:"text/x-ssa"};function fn(){this.h=[];this.j=this.i=this.g=0};function gn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new Af;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=gn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
441
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ql(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=yl(this.h,a,Hl(this));Nm(this);return c};
442
+ function Nm(a){if(a.J){var b=jf(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Om(a,a.i)}catch(f){dm(a,f)}a.C&&Fm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Pm(a)}a.H&&a.H.He(a.h.streaming.forceHTTPS);if(a.K&&(a.K.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Ue!=b)){var c=b(),d=a.K,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
443
+ c);a.Ue=b;a.j&&(b=a.j,(c=b.i.get(Ib))&&gk(b,c.stream,!0,0,!0))}a.C&&(a.C.configure(a.h.abr),a.h.abr.enabled?a.C.enable():a.C.disable(),Cm(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ye(a.N,b,Math.min(.5,b/2)));a.i&&qm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Hl(this);yl(a,this.h,Hl(this));return a};
444
+ q.og=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.Ka().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.nh=function(){for(var a in this.h)delete this.h[a];yl(this.h,Hl(this),Hl(this));Nm(this)};q.yf=function(){return this.l};q.Gg=function(){return this.g};q.Ic=function(){return this.H};q.fe=function(){return this.hb};
445
+ q.nd=function(){return this.G?this.G:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Mb=function(){return this.i?this.i.presentationTimeline.Mb():!1};q.ic=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
446
+ q.Ka=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.ec(),end:a.mb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Rg=function(){this.U()&&(this.g.currentTime=this.Ka().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Hc=function(){return this.m?this.m.Hc():Infinity};q.pd=function(){return this.m?this.m.pd():{}};
447
+ q.Pc=function(){return this.N?this.N.g==Xe:!1};q.zb=function(){return this.g?this.I?this.I.i:1:0};q.Te=function(a){0==a?Ua("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(a),this.l==wm&&(this.C.playbackRateChanged(a),fk(this.j,1<Math.abs(a))))};q.jf=function(){var a=this.I.od();this.l==Hm&&this.I.set(a);this.l==wm&&(this.I.set(a),this.C.playbackRateChanged(a),fk(this.j,!1))};
448
+ q.Sa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,xe(e)){var f=pe(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.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return we(g)}):[]};
449
+ q.Ab=function(){if(this.i){for(var a=this.j?this.j.A:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=qe(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Jm(this).map(function(f){return ue(f)}):[]};q.yg=function(){return this.i?this.i.imageStreams.map(function(a){return re(a)}):[]};
450
+ q.Ng=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(F){return F.id==a}))?d.segmentIndex?G.D(3):A(G,d.createSegmentIndex(),3):G.return(null):G.D(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;y=m*p;x=f.j-
451
+ f.startTime;v=f.A||x/y;w=f.startTime;z=C=0;1<y&&(D=Math.floor((b-f.startTime)/v),w=f.startTime+D*v,C=D%m*n,z=Math.floor(D/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:w,duration:v,uris:f.Ra(),width:n})}return G.return(null)})};
452
+ q.De=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.A&&(El(this.A.h,b,!1),ik(this.j,b),Qm(this),this.Oa=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Jm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,se(c)==a.id?c.mode=this.ba?"showing":"hidden":c.mode="disabled";Qm(this)}};
453
+ q.Ee=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Ua("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&xe(d)&&(rm(this,d,!1,b,c),this.Aa=new Qe(d),Fm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
454
+ se(c)==a.id){Rm(this,c);break}};q.ng=function(){return Sm(this.Sa())};q.Mg=function(){return Sm(this.Ab())};q.mg=function(){return Array.from(Tm(this.Sa()))};q.Lg=function(){return Array.from(Tm(this.Ab()))};
455
+ q.Id=function(a,b){if(this.i&&this.F){this.Aa=new Re(a,b||"",0,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var c=this.Aa.create(this.i.variants),d=null;c=r(c.values());for(var e=c.next();!e.done;e=c.next())if(e=e.value,!d||b(d,a)>b(e,a))d=e;d?(b=pe(d),this.Ee(b,!0)):Pm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=Mb(a);c=d=null;e=
456
+ r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=we(f);Mb(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Rm(this,c):d&&Rm(this,d)}};
457
+ q.Ce=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.F){if(this.Oa=a,this.Fc=b||"",this.wb=c,(a=ze(this.i.textStreams,this.Oa,this.Fc,this.wb)[0]||null)&&a!=this.j.A&&(El(this.A.h,a,!1),this.h.streaming.alwaysStreamText||this.Ob()))ik(this.j,a),Qm(this)}else{var d=Mb(a);(a=this.Ab().find(function(e){return Mb(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.De(a)}};
458
+ q.qh=function(a){if(this.i&&this.F){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Aa=new Re(b.language,"",0,a),Pm(this))}};q.Ob=function(){var a=this.ba;return this.K?this.K.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Jm(this).some(function(b){return"showing"==b.mode}):a};q.wf=function(){return this.g&&this.g.src&&this.g.textTracks?Um(this).map(function(a){return ue(a)}):[]};
459
+ q.qg=function(a){var b=Mb(a),c=Um(this).filter(function(h){return Mb(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(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};
460
+ function Jm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Lm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Um(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
461
+ q.Me=function(a){a=!!a;if(this.ba!=a){this.ba=a;if(this.l==wm)this.K.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.A||(a=ze(this.i.textStreams,this.Oa,this.Fc,this.wb),0<a.length&&(ik(this.j,a[0]),Qm(this))):ek(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Jm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Bm(this)}};
462
+ q.Ig=function(){if(!this.U())return null;var a=this.ua.l,b=0;if(this.F)b=this.F.gd();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
463
+ q.zf=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.kb=function(){if(this.l==wm)return this.K.kb();var a={total:[],audio:[],video:[],text:[]};this.l==Hm&&(a.total=Fi(this.g.buffered));return a};
464
+ q.getStats=function(){if(this.l!=wm&&this.l!=Hm)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,switchHistory:[],stateHistory:[]};om(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.A;b=
465
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.F&&(this.A.P=this.F.$e(),this.A.T=this.F.bf());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.A;var d=Number(c.totalVideoFrames);b.N=Number(c.droppedVideoFrames);b.K=d;this.A.J=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.J?c.J:NaN):c=NaN;this.A.B=c;if(this.l==wm){if(c=this.j.l)this.A.F=(this.I?this.I.i:1)*c.bandwidth;c&&c.video&&(b=this.A,d=c.video.height||NaN,b.A=c.video.width||NaN,b.l=d);this.U()&&(c=this.zf().valueOf()+
466
+ 1E3*this.Ka().end,this.A.G=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.A.I=this.i.presentationTimeline.g);c=this.C.getBandwidthEstimate();this.A.C=c}this.l==Hm&&(c=this.A,b=a.videoHeight||NaN,c.A=a.videoWidth||NaN,c.l=b);var e=this.A;a=e.A;c=e.l;b=e.F;d=e.K;var f=e.N,g=e.J,h=e.T,k=e.P,l=e.C,m=e.i,p=e.m,n=e.H,t=e.j,y=Bl(e.g,"playing"),x=Bl(e.g,"paused"),v=Bl(e.g,"buffering"),w=e.B,C=e.G,z=e.I,D=Cl(e.g),G=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,G.push({timestamp:F.timestamp,
467
+ id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:y,pauseTime:x,bufferingTime:v,licenseTime:w,liveLatency:C,maxSegmentDuration:z,stateHistory:D,switchHistory:G}};
468
+ q.cg=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,y,x,v,w,C;return K(function(z){switch(z.g){case 1:if(h.l!=wm&&h.l!=Hm)throw new P(1,7,7004);if(d){z.D(2);break}return A(z,Vm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.G)try{k=h.G.getServerSideCuePoints()}catch(D){}if(h.l!=Hm){z.D(4);break}g&&(c="forced");return A(z,Wm(h,a,b,c,d,f||"",k),5);case 5:l=h.Ab();if(m=l.find(function(D){return D.language==b&&D.label==(f||"")&&D.kind==c}))return Em(h),z.return(m);throw new P(1,2,2012);case 4:p=
469
+ Jb;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new P(1,4,4033);if(!k.length){z.D(6);break}return A(z,Xm(h,a,h.H,h.h.streaming.retryParameters),7);case 7:t=z.h,y=Ym(h,t,d,k),x=new Blob([y],{type:"text/vtt"}),a=Ki(x),d="text/vtt";case 6:v={id:h.Xf++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Fj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.ha,primary:!1,trickModeVideo:null,
470
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=wd(v.mimeType,v.codecs);C=Cd(w);if(!C)throw new P(2,2,2014,d);h.i.textStreams.push(v);Em(h);return z.return(qe(v))}})};
471
+ q.ag=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=wm&&d.l!=Hm)throw new P(1,7,7004);if(c){k.D(2);break}return A(k,Vm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.G)try{e=d.G.getServerSideCuePoints()}catch(l){}return A(k,Wm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.wf();h=g.find(function(l){return l.language==b});if(!h){k.D(5);break}return A(k,new Promise(function(l,m){d.B.Fa(f,"load",l);d.B.Fa(f,"error",function(){m(new P(1,2,2015))})}),6);case 6:return k.return(h);
472
+ case 5:throw new P(1,2,2012);}})};function Vm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=gh(b);if(d=Zm[c])return e.return(d);E(e,2);return A(e,ih(b,a.H,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:J(e);case 3:if(d)return e.return(d);throw new P(1,2,2011,c);}})}
473
+ function Wm(a,b,c,d,e,f,g){var h,k,l,m;return K(function(p){if(1==p.g)return"text/vtt"!=e||g.length?A(p,Xm(a,b,a.H,a.h.streaming.retryParameters),3):p.D(2);2!=p.g&&(h=p.h,k=Ym(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ki(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var y=hl(n);y.ot=nl;y.su=!0;var x=jl(y);var v=kl(t,x)}else v=t}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),v=t}m.src=v;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
474
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Xm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=xf;f=rf([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&fl(k,f,{ot:nl,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return A(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
475
+ function Ym(a,b,c,d){var e=Dd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Ec(b),b=c.parseMedia(b,a),Uk(b,d);throw new P(2,2,2014,c);}q.Ie=function(a,b){this.Lc.width=a;this.Lc.height=b};q.ye=function(a){if(this.l==wm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.B)b=!1;else{for(var c=r(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Mc||d.Ja||d.fb||(d.Mc=!1,dk(b,d,a));b=!0}}else b=!1;return b};
476
+ q.Dg=function(){Ua("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.Eg=function(){return this.Fd};
477
+ function Hl(a){var b=wl();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.ye(d))}};b.textDisplayFactory=function(){return a.td?new Mk(a.g,a.td):new Gk(a.g)};return b}q.Ne=function(a){this.td=a};
478
+ function jm(a,b){for(var c=new Set,d=r(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=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(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 Gj;h={id:a.Xf++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
479
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function im(a,b){return K(function(c){if(1==c.g)return A(c,$m(a,b),2);Om(a,b);B(c)})}
480
+ function $m(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,A(d,be(c,b),2);Dm(b);B(d)})}
481
+ function Om(a,b){if(a.l!=Wl){ae(b.variants,a.h.restrictions,a.Lc)&&a.j&&Em(a);var c=a.m?a.m.g:null;if(c&&a.m.C)for(var d=r(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=r(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,Ig(a.m,g.initDataType,g.initData)}}an(a,b)}}
482
+ function ym(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return K(function(t){if(1==t.g)return k?A(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.cc(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},A(h,e(c,b),2);if(3!=h.g)return f=h.h,A(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)})}
483
+ function em(a){var b=a.Pc();if(a.A&&a.N&&a.F){var c=a.I;c.j=b;Ij(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);om(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Ul("buffering",b))}function pm(a){var b=a.g.playbackRate;0!=b&&(a.I&&a.I.set(b),b=Ul("ratechange"),a.dispatchEvent(b))}function om(a){if(a.A&&a.N){var b=a.A.g;a.N.g==Xe?Al(b,"buffering"):a.g.paused?Al(b,"paused"):a.g.ended?Al(b,"ended"):Al(b,"playing")}}
484
+ function Fm(a){try{an(a,a.i)}catch(c){return dm(a,c),!1}var b=a.i.variants.filter(function(c){return xe(c)});b=a.Aa.create(b);a.C.setVariants(Array.from(b.values()));return!0}function Vl(a){return Fm(a)?a.C.chooseVariant():null}function Pm(a){var b=Vl(a);b&&rm(a,b,!0,!0,0)}
485
+ function rm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&hk(a.j,b,d,e,!0);else{var g=a.A.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));hk(a.j,b,d,e,void 0,c);d=null;f&&(d=pe(f));b=pe(b);c?zm(a,d,b):bn(a,d,b)}}function Rm(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=we(c);b=we(b);bn(a,c,b)}
486
+ function Am(a,b,c){a=Mb(a.h.preferredTextLanguage);b=Mb(b.language);c=Mb(c.language);return Lb(c,a)&&!Lb(b,c)}function zm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Ul("adaptation",b);cn(a,b)}function Em(a){var b=Ul("trackschanged");cn(a,b)}function bn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Ul("variantchanged",b);cn(a,b)}function Qm(a){var b=Ul("textchanged");cn(a,b)}function Bm(a){var b=Ul("texttrackvisibility");cn(a,b)}
487
+ function Cm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);cn(a,Ul("abrstatuschanged",b))}
488
+ function dn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Sa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);ae(d.variants,a.h.restrictions,a.Lc);b=Vl(a);if(!b)return!1;d=a.kb().video.reduce(function(g,h){return g+h.end-h.start},0);rm(a,b,!1,!0,d);a.Wf.S(c);return!0}
489
+ function dm(a,b){if(a.l!=Wl)if(dn(a,b))b.handled=!0;else{var c=Ul("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function hm(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Ul(b,c))}
490
+ function cm(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new P(2,3,3016,b,c,a.g.error.message)}
491
+ function mm(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!en.includes(l)}h!=f.allowedByKeySystem&&
492
+ (e=!0)}}}if(!e||Fm(a))(b=a.j.l)&&!b.allowedByKeySystem&&Pm(a),e&&Em(a)}}function nm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=Ul("expirationupdated");a.dispatchEvent(b)}function qm(a,b,c){0<b&&(a.U()||a.Qf(b));b=a.getDuration();c<b&&(a.U()||a.Ua(c))}
493
+ function an(a,b){a=a.m?a.m.pd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(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=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?en.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
494
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new P(2,4,4012,a);}function Dm(a){if(!a.variants.some(xe))throw new P(2,4,4032);}function cn(a,b){K(function(c){if(1==c.g)return A(c,Promise.resolve(),2);a.l!=Wl&&a.dispatchEvent(b);B(c)})}function Tm(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Mb(c.language)):b.add("und");return b}
495
+ function Sm(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Mb(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(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=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
496
+ h.push({language:l,role:m,label:p})}});return h}function Yl(){return new P(2,7,7E3)}function Tl(a,b,c,d,e,f){return d==a&&e.O==f.O&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Ak(){return{O:null,mimeType:null,startTime:null,Oe:NaN,uri:null}}function Zl(a){return new Promise(function(b,c){a.Rb=function(){return c(Yl())};a.zd=function(){return b()};a.onError=function(d){return c(d)};a.Cd=function(){return c(Yl())}})}M("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.Ne;
497
+ T.prototype.getManifestParserFactory=T.prototype.Eg;T.prototype.getManifest=T.prototype.Dg;T.prototype.retryStreaming=T.prototype.ye;T.prototype.setMaxHardwareResolution=T.prototype.Ie;T.prototype.addChaptersTrack=T.prototype.ag;T.prototype.addTextTrackAsync=T.prototype.cg;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.kb;T.prototype.getPresentationStartTimeAsDate=T.prototype.zf;T.prototype.getPlayheadTimeAsDate=T.prototype.Ig;
498
+ T.prototype.setTextTrackVisibility=T.prototype.Me;T.prototype.getChapters=T.prototype.qg;T.prototype.getChaptersTracks=T.prototype.wf;T.prototype.isTextTrackVisible=T.prototype.Ob;T.prototype.selectVariantsByLabel=T.prototype.qh;T.prototype.selectTextLanguage=T.prototype.Ce;T.prototype.selectAudioLanguage=T.prototype.Id;T.prototype.getTextLanguages=T.prototype.Lg;T.prototype.getAudioLanguages=T.prototype.mg;T.prototype.getTextLanguagesAndRoles=T.prototype.Mg;
499
+ T.prototype.getAudioLanguagesAndRoles=T.prototype.ng;T.prototype.selectVariantTrack=T.prototype.Ee;T.prototype.selectTextTrack=T.prototype.De;T.prototype.getThumbnails=T.prototype.Ng;T.prototype.getImageTracks=T.prototype.yg;T.prototype.getTextTracks=T.prototype.Ab;T.prototype.getVariantTracks=T.prototype.Sa;T.prototype.cancelTrickPlay=T.prototype.jf;T.prototype.trickPlay=T.prototype.Te;T.prototype.getPlaybackRate=T.prototype.zb;T.prototype.isBuffering=T.prototype.Pc;T.prototype.getKeyStatuses=T.prototype.pd;
500
+ T.prototype.getExpiration=T.prototype.Hc;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Rg;T.prototype.seekRange=T.prototype.Ka;T.prototype.isAudioOnly=T.prototype.ic;T.prototype.isInProgress=T.prototype.Mb;T.prototype.isLive=T.prototype.U;T.prototype.getAdManager=T.prototype.nd;T.prototype.getAssetUri=T.prototype.fe;T.prototype.getNetworkingEngine=T.prototype.Ic;T.prototype.getMediaElement=T.prototype.Gg;
501
+ T.prototype.getLoadMode=T.prototype.yf;T.prototype.resetConfiguration=T.prototype.nh;T.prototype.getBufferFullness=T.prototype.og;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.Dh;T.prototype.unload=T.prototype.Ve;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.Cc;
502
+ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?A(h,Zg(),3):h.D(2);2!=h.g&&(b=h.h);var k={};if(Oc()){for(var l in fh)k[l]=!0;for(var m in hh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=Oc()?!!fh[p]:Pc(p);for(var n in l)k[n]=
503
+ Oc()?!!hh[n]:Pc(l[n]);c=k;n='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",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",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(ja(gj));
504
+ k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=Oc()?Cd(l)?!0:MediaSource.isTypeSupported(l)||rd(l):Pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=fn;for(g in f)e[g]=f[g]();return h.return(e)})};T.isBrowserSupported=Xl;T.setAdManagerFactory=function(a){Jl=a};T.registerSupportPlugin=function(a,b){fn[a]=b};T.prototype.destroy=T.prototype.destroy;var Wl=0,Gl=1,wm=2,Hm=3;T.LoadMode={DESTROYED:Wl,NOT_LOADED:Gl,MEDIA_SOURCE:wm,SRC_EQUALS:Hm};T.version="v4.2.7";
505
+ var gn=["4","2"];Ie=new function(a){this.g=a;this.i=Je;this.h=Ke}(new Ge(Number(gn[0]),Number(gn[1])));
506
+ var en=["output-restricted","internal-error"],fn={},Jl=null,bm={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",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Zm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
507
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function hn(){this.h=[];this.j=this.i=this.g=0};function jn(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new Af;this.j.o(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.o(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=jn.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
507
508
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
508
509
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
509
- q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",gn);gn.prototype.release=gn.prototype.release;gn.prototype.getPositionInSequence=gn.prototype.getPositionInSequence;gn.prototype.getSequenceLength=gn.prototype.getSequenceLength;gn.prototype.setMuted=gn.prototype.setMuted;gn.prototype.resize=gn.prototype.resize;gn.prototype.isLinear=gn.prototype.isLinear;gn.prototype.isMuted=gn.prototype.isMuted;
510
- gn.prototype.setVolume=gn.prototype.setVolume;gn.prototype.getVolume=gn.prototype.getVolume;gn.prototype.play=gn.prototype.play;gn.prototype.pause=gn.prototype.pause;gn.prototype.skip=gn.prototype.skip;gn.prototype.canSkipNow=gn.prototype.canSkipNow;gn.prototype.getTimeUntilSkippable=gn.prototype.getTimeUntilSkippable;gn.prototype.isSkippable=gn.prototype.isSkippable;gn.prototype.isPaused=gn.prototype.isPaused;gn.prototype.getRemainingTime=gn.prototype.getRemainingTime;
511
- gn.prototype.getMinSuggestedDuration=gn.prototype.getMinSuggestedDuration;gn.prototype.getDuration=gn.prototype.getDuration;function hn(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new Af;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.5");this.g=null;this.h.Ea(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){jn(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
512
- function(f){kn(e,f)});this.i.onended=function(){e.m.contentComplete()}}hn.prototype.stop=function(){this.g&&this.g.stop();this.A&&Jk(this.A)};hn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function kn(a,b){b.getError();ln(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
513
- function jn(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",b)))}mn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,nn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
514
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,nn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,nn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,nn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
515
- {once:!0})}catch(e){ln(a,null)}}function nn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
516
- function mn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new O(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){kn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){on(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){on(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
517
- function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){ln(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){ln(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
510
+ q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",jn);jn.prototype.release=jn.prototype.release;jn.prototype.getPositionInSequence=jn.prototype.getPositionInSequence;jn.prototype.getSequenceLength=jn.prototype.getSequenceLength;jn.prototype.setMuted=jn.prototype.setMuted;jn.prototype.resize=jn.prototype.resize;jn.prototype.isLinear=jn.prototype.isLinear;jn.prototype.isMuted=jn.prototype.isMuted;
511
+ jn.prototype.setVolume=jn.prototype.setVolume;jn.prototype.getVolume=jn.prototype.getVolume;jn.prototype.play=jn.prototype.play;jn.prototype.pause=jn.prototype.pause;jn.prototype.skip=jn.prototype.skip;jn.prototype.canSkipNow=jn.prototype.canSkipNow;jn.prototype.getTimeUntilSkippable=jn.prototype.getTimeUntilSkippable;jn.prototype.isSkippable=jn.prototype.isSkippable;jn.prototype.isPaused=jn.prototype.isPaused;jn.prototype.getRemainingTime=jn.prototype.getRemainingTime;
512
+ jn.prototype.getMinSuggestedDuration=jn.prototype.getMinSuggestedDuration;jn.prototype.getDuration=jn.prototype.getDuration;function kn(a,b,c,d){var e=this;this.A=a;this.i=b;this.B=null;this.C=NaN;this.l=d;this.j=null;this.h=new Af;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.A,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.7");this.g=null;this.h.Fa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){ln(e,f)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
513
+ function(f){mn(e,f)});this.i.onended=function(){e.m.contentComplete()}}kn.prototype.stop=function(){this.g&&this.g.stop();this.A&&Lk(this.A)};kn.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function mn(a,b){b.getError();nn(a,null);a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
514
+ function ln(a,b){a.l(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.C)));a.g=b.getAdsManager(a.i);a.l(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new O("ad-cue-points-changed",(new Map).set("cuepoints",b)))}on(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,pn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",
515
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,pn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,pn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,pn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
516
+ {once:!0})}catch(e){nn(a,null)}}function pn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
517
+ function on(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new O(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){mn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){qn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){qn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
518
+ function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){nn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){nn(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
518
519
  a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.o(a.g,
519
520
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,google.ima.AdEvent.Type.AD_METADATA,
520
- function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function on(a,b){var c=b.getAd();a.j=new gn(c,a.g,a.i);b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new O("ad-started",b));a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
521
- function ln(a,b){a.l(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function pn(a,b){this.i=a;this.h=null;this.g=b}q=pn.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
521
+ function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function qn(a,b){var c=b.getAd();a.j=new jn(c,a.g,a.i);b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new O("ad-started",b));a.j.isLinear()&&(a.A.setAttribute("ad-active","true"),a.i.pause())}
522
+ function nn(a,b){a.l(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.A.removeAttribute("ad-active"),a.i.play())};function rn(a,b){this.i=a;this.h=null;this.g=b}q=rn.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
522
523
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){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};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
523
- q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",pn);pn.prototype.release=pn.prototype.release;pn.prototype.getPositionInSequence=pn.prototype.getPositionInSequence;pn.prototype.getSequenceLength=pn.prototype.getSequenceLength;pn.prototype.setMuted=pn.prototype.setMuted;
524
- pn.prototype.resize=pn.prototype.resize;pn.prototype.isLinear=pn.prototype.isLinear;pn.prototype.isMuted=pn.prototype.isMuted;pn.prototype.setVolume=pn.prototype.setVolume;pn.prototype.getVolume=pn.prototype.getVolume;pn.prototype.play=pn.prototype.play;pn.prototype.pause=pn.prototype.pause;pn.prototype.skip=pn.prototype.skip;pn.prototype.canSkipNow=pn.prototype.canSkipNow;pn.prototype.getTimeUntilSkippable=pn.prototype.getTimeUntilSkippable;pn.prototype.isSkippable=pn.prototype.isSkippable;
525
- pn.prototype.isPaused=pn.prototype.isPaused;pn.prototype.getRemainingTime=pn.prototype.getRemainingTime;pn.prototype.getMinSuggestedDuration=pn.prototype.getMinSuggestedDuration;pn.prototype.getDuration=pn.prototype.getDuration;function qn(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new Af;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){rn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
526
- e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new pn(f,e.l);e.C&&(e.m.h=e.C);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
524
+ q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",rn);rn.prototype.release=rn.prototype.release;rn.prototype.getPositionInSequence=rn.prototype.getPositionInSequence;rn.prototype.getSequenceLength=rn.prototype.getSequenceLength;rn.prototype.setMuted=rn.prototype.setMuted;
525
+ rn.prototype.resize=rn.prototype.resize;rn.prototype.isLinear=rn.prototype.isLinear;rn.prototype.isMuted=rn.prototype.isMuted;rn.prototype.setVolume=rn.prototype.setVolume;rn.prototype.getVolume=rn.prototype.getVolume;rn.prototype.play=rn.prototype.play;rn.prototype.pause=rn.prototype.pause;rn.prototype.skip=rn.prototype.skip;rn.prototype.canSkipNow=rn.prototype.canSkipNow;rn.prototype.getTimeUntilSkippable=rn.prototype.getTimeUntilSkippable;rn.prototype.isSkippable=rn.prototype.isSkippable;
526
+ rn.prototype.isPaused=rn.prototype.isPaused;rn.prototype.getRemainingTime=rn.prototype.getRemainingTime;rn.prototype.getMinSuggestedDuration=rn.prototype.getMinSuggestedDuration;rn.prototype.getDuration=rn.prototype.getDuration;function sn(a,b,c,d){var e=this;this.B=a;this.l=b;this.j=null;this.I=NaN;this.i=d;this.H=!1;this.C=this.m=this.A=null;this.F="";this.G=[];this.h=new Af;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.B,a);this.i(new O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){tn(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.F.length?
527
+ e.j.resolve(e.F):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new rn(f,e.l);e.C&&(e.m.h=e.C);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.B.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
527
528
  var f=e.l.currentTime;e.A&&e.A>f&&(e.l.currentTime=e.A,e.A=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.C=f.getStreamData().adProgressData;e.m&&(e.m.h=e.C)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new O("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new O("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new O("ad-third-quartile"))});
528
529
  this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new O("ad-complete"));e.i(new O("ad-stopped"));e.B.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new O("ad-skipped"));e.i(new O("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
529
- f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}qn.prototype.stop=function(){this.F="";this.A=null;this.G=[]};qn.prototype.release=function(){this.stop();this.h&&this.h.release()};qn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
530
- function rn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.A=c,a.l.currentTime=d.start)}})};function V(){fb.call(this);this.g=this.i=null;this.h=new fn;this.j=navigator.language}u(V,fb);q=V.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new hn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
531
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);fb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new fn};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
532
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new qn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
533
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.2.5";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
534
- (c.H=!0),c.j=new Lc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ua('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.2.5";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
535
- q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,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)};M("shaka.ads.AdManager",V);
536
- V.prototype.onCueMetadataChange=V.prototype.onCueMetadataChange;V.prototype.onHlsTimedMetadata=V.prototype.onHlsTimedMetadata;V.prototype.onDashTimedMetadata=V.prototype.onDashTimedMetadata;V.prototype.getStats=V.prototype.getStats;V.prototype.getServerSideCuePoints=V.prototype.getServerSideCuePoints;V.prototype.replaceServerSideAdTagParameters=V.prototype.replaceServerSideAdTagParameters;V.prototype.requestServerSideStream=V.prototype.requestServerSideStream;V.prototype.initServerSide=V.prototype.initServerSide;
537
- V.prototype.requestClientSideAds=V.prototype.requestClientSideAds;V.prototype.onAssetUnload=V.prototype.onAssetUnload;V.prototype.release=V.prototype.release;V.prototype.initClientSide=V.prototype.initClientSide;V.prototype.setLocale=V.prototype.setLocale;V.ADS_LOADED="ads-loaded";V.AD_STARTED="ad-started";V.AD_FIRST_QUARTILE="ad-first-quartile";V.AD_MIDPOINT="ad-midpoint";V.AD_THIRD_QUARTILE="ad-third-quartile";V.AD_COMPLETE="ad-complete";V.AD_STOPPED="ad-stopped";V.AD_SKIPPED="ad-skipped";
538
- V.AD_VOLUME_CHANGED="ad-volume-changed";V.AD_MUTED="ad-muted";V.AD_PAUSED="ad-paused";V.AD_RESUMED="ad-resumed";V.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";V.CUEPOINTS_CHANGED="ad-cue-points-changed";V.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";V.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";V.AD_CLICKED="ad-clicked";V.AD_PROGRESS="ad-progress";V.AD_BUFFERING="ad-buffering";V.AD_IMPRESSION="ad-impression";V.AD_DURATION_CHANGED="ad-duration-changed";V.AD_CLOSED="ad-closed";
539
- V.AD_LOADED="ad-loaded";V.ALL_ADS_COMPLETED="all-ads-completed";V.AD_LINEAR_CHANGED="ad-linear-changed";V.AD_METADATA="ad-metadata";V.AD_RECOVERABLE_ERROR="ad-recoverable-error";V.AD_BREAK_READY="ad-break-ready";V.AD_INTERACTION="ad-interaction";Hl=function(){return new V};function sn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
530
+ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}sn.prototype.stop=function(){this.F="";this.A=null;this.G=[]};sn.prototype.release=function(){this.stop();this.h&&this.h.release()};sn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
531
+ function tn(a,b){a.i(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.H||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.A=c,a.l.currentTime=d.start)}})};function U(){fb.call(this);this.g=this.i=null;this.h=new hn;this.j=navigator.language}u(U,fb);q=U.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new P(2,10,1E4);this.i&&this.i.release();this.i=new kn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
532
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);fb.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.h=new hn};q.requestClientSideAds=function(a){if(!this.i)throw new P(1,10,10001);var b=this.i;b.C=Date.now()/1E3;b.m.requestAds(a)};
533
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new P(2,10,10002);this.g&&this.g.release();this.g=new sn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
534
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new P(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ua('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.2.7";c=this.g;c.j?a=Promise.reject(new P(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
535
+ (c.H=!0),c.j=new Lc,c.g.requestStream(a),c.F=b||"",c.I=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new P(1,10,10003);(a.mpt||a.mpv)&&Ua('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.2.7";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new P(1,10,10003);return this.g.G};
536
+ q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,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)};M("shaka.ads.AdManager",U);
537
+ U.prototype.onCueMetadataChange=U.prototype.onCueMetadataChange;U.prototype.onHlsTimedMetadata=U.prototype.onHlsTimedMetadata;U.prototype.onDashTimedMetadata=U.prototype.onDashTimedMetadata;U.prototype.getStats=U.prototype.getStats;U.prototype.getServerSideCuePoints=U.prototype.getServerSideCuePoints;U.prototype.replaceServerSideAdTagParameters=U.prototype.replaceServerSideAdTagParameters;U.prototype.requestServerSideStream=U.prototype.requestServerSideStream;U.prototype.initServerSide=U.prototype.initServerSide;
538
+ U.prototype.requestClientSideAds=U.prototype.requestClientSideAds;U.prototype.onAssetUnload=U.prototype.onAssetUnload;U.prototype.release=U.prototype.release;U.prototype.initClientSide=U.prototype.initClientSide;U.prototype.setLocale=U.prototype.setLocale;U.ADS_LOADED="ads-loaded";U.AD_STARTED="ad-started";U.AD_FIRST_QUARTILE="ad-first-quartile";U.AD_MIDPOINT="ad-midpoint";U.AD_THIRD_QUARTILE="ad-third-quartile";U.AD_COMPLETE="ad-complete";U.AD_STOPPED="ad-stopped";U.AD_SKIPPED="ad-skipped";
539
+ U.AD_VOLUME_CHANGED="ad-volume-changed";U.AD_MUTED="ad-muted";U.AD_PAUSED="ad-paused";U.AD_RESUMED="ad-resumed";U.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";U.CUEPOINTS_CHANGED="ad-cue-points-changed";U.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";U.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";U.AD_CLICKED="ad-clicked";U.AD_PROGRESS="ad-progress";U.AD_BUFFERING="ad-buffering";U.AD_IMPRESSION="ad-impression";U.AD_DURATION_CHANGED="ad-duration-changed";U.AD_CLOSED="ad-closed";
540
+ U.AD_LOADED="ad-loaded";U.ALL_ADS_COMPLETED="all-ads-completed";U.AD_LINEAR_CHANGED="ad-linear-changed";U.AD_METADATA="ad-metadata";U.AD_RECOVERABLE_ERROR="ad-recoverable-error";U.AD_BREAK_READY="ad-break-ready";U.AD_INTERACTION="ad-interaction";Jl=function(){return new U};function un(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
540
541
  TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(Fi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
541
- function tn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=un(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
542
- function un(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
543
- var vn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),wn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),xn=["loop","playbackRate"],yn=["pause","play"],zn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
544
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},An={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Bn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Cn=[["getConfiguration","configure"]],Dn=[["isTextTrackVisible","setTextTrackVisibility"]],En="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
545
- Fn=["attach","detach","load","unload"];function Gn(a,b,c,d,e,f,g){var h=this;this.I=a;this.P=g;this.j=new Q(b);this.T=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return Hn(h)};this.G=function(k,l){k=tn(l);switch(k.type){case "event":var m=k.targetName,p=Qa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.T(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new P(n.severity,n.category,
546
- n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;In.add(this)}q=Gn.prototype;q.destroy=function(){In.delete(this);Jn(this);Kn&&Ln(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.qa=function(){return this.h};q.Gd=function(){return this.N};
547
- q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.ya();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(In),d=c.next();!d.done;d=c.next())Mn(d.value,b)},function(b){for(var c=r(In),d=c.next();!d.done;d=c.next())d=d.value,Nn="available"==b,d.j.ya()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Nn&&this.j.S(On);(a=Kn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
548
- Mn(this,a):Kn=null}else window.__onGCastApiAvailable!==Pn&&(Qn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Pn)};q.Ee=function(a){this.A=a;this.h&&Rn(this,{type:"appData",appData:this.A})};q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new P(1,8,8E3);if(!Nn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return Sn(b,a,d)},function(d){return Tn(b,d)});return B(c,b.l,0)})};
549
- function Un(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Sn(a,b,c)},function(c){return Tn(a,c)})}}q.ac=function(){if(this.h){Jn(this);if(Kn){Ln(this);try{Kn.stop(function(){},function(){})}catch(a){}Kn=null}Hn(this)}};
550
- q.get=function(a,b){var c=this;if("video"==a){if(yn.includes(b))return function(){return c.If.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))}}else if("player"==a){if(Bn[b]&&!this.get("player","isLive")())return function(){};if(En.includes(b))return function(){return c.If.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))};if(Fn.includes(b))return function(){return c.ih.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))};if(zn[b]||An[b])return function(){return c.g[a][b]}}return this.g[a][b]};
551
- q.set=function(a,b,c){this.g[a][b]=c;Rn(this,{type:"set",targetName:a,property:b,value:c})};function Sn(a,b,c){Kn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Hn(a);Rn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Tn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new P(2,8,c,b))}
552
- q.If=function(a,b){Rn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.ih=function(a,b){var c=Fa.apply(2,arguments),d=new Lc,e=this.J.toString();this.J++;this.i[e]=d;try{Rn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Mn(a,b){var c=a.K();a.l=new Lc;a.C=!0;Sn(a,c,b)}function Ln(a){var b=Kn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
553
- function Hn(a){var b=Kn?"connected"==Kn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Jn(a)}a.h=b;a.N=b?Kn.receiver.friendlyName:"";a.j.ya()}function Jn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function Rn(a,b){b=sn(b);var c=Kn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new P(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.B("player",c),a.ac(),b;}}var On=.02,Nn=!1,Kn=null,Qn=null,In=new Set;
554
- function Pn(a){Qn?window.__onGCastApiAvailable=Qn:delete window.__onGCastApiAvailable;Qn=null;if(a)for(var b=r(In),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Vn(a,b,c,d){d=void 0===d?!1:d;fb.call(this);var e=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new Gn(c,function(){return Wn(e)},function(){return Xn(e)},function(f,g){return Yn(e,f,g)},function(){return Zn(e)},function(){return $n(e)},d);ao(this)}u(Vn,fb);q=Vn.prototype;
555
- q.destroy=function(a){a&&this.g.ac();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.B=this.l=this.i=null;fb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.dc=function(){return this.B};q.ef=function(){return this.g.m&&Nn};q.qa=function(){return this.g.qa()};q.Gd=function(){return this.g.Gd()};
556
- q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=$n(a),B(c,a.g.cast(b),2)):a.h?B(c,a.h.Te(),0):c.return()})};q.Ee=function(a){this.g.Ee(a)};q.Qf=function(){Un(this.g)};q.ac=function(){this.g.ac()};
557
- q.kf=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return B(d,c.g.destroy(),2)}c.g=null;c.g=new Gn(a,function(){return Wn(c)},function(){return Xn(c)},function(e,f){return Yn(c,e,f)},function(){return Zn(c)},function(){return $n(c)},b);c.g.init();C(d)})};
558
- function ao(a){a.g.init();a.m=new Af;for(var b=r(vn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.qa()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.o(a.h,Ra[d],function(f){a.g.qa()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return bo(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.qa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.B={};co(a,
559
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return eo(a,f)}})});fo(a);a.j=new fb;a.j.vd=a.l;a.A=new fb;a.A.vd=a.B}function fo(a){var b=new Map;co(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
560
- function co(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=r(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)}}
561
- function $n(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.fe(),startTime:null};a.i.pause();for(var c=r(xn),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=r(Cn);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=r(Dn);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 Wn(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
562
- function Xn(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
563
- function Zn(a){for(var b=r(Cn),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")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(xn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(xn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Dn);for(k=
542
+ function vn(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=wn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
543
+ function wn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
544
+ var xn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),yn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),zn=["loop","playbackRate"],An=["pause","play"],Bn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
545
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Cn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Dn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},En=[["getConfiguration","configure"]],Fn=[["isTextTrackVisible","setTextTrackVisibility"]],Gn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
546
+ Hn=["attach","detach","load","unload"];function In(a,b,c,d,e,f,g){var h=this;this.I=a;this.P=g;this.j=new Q(b);this.T=c;this.C=!1;this.B=d;this.H=e;this.K=f;this.h=this.m=!1;this.N="";this.A=null;this.F=function(){return Jn(h)};this.G=function(k,l){k=vn(l);switch(k.type){case "event":var m=k.targetName,p=Qa(k.event);h.B(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.C&&(h.T(),h.C=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new P(n.severity,n.category,
547
+ n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.i={};this.l=null;Kn.add(this)}q=In.prototype;q.destroy=function(){Kn.delete(this);Ln(this);Mn&&Nn(this);this.j&&(this.j.stop(),this.j=null);this.H=this.B=null;this.h=this.m=!1;this.G=this.F=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.qa=function(){return this.h};q.Gd=function(){return this.N};
548
+ q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.za();var a=new chrome.cast.SessionRequest(this.I,[],null,this.P,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Kn),d=c.next();!d.done;d=c.next())On(d.value,b)},function(b){for(var c=r(Kn),d=c.next();!d.done;d=c.next())d=d.value,Pn="available"==b,d.j.za()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Pn&&this.j.S(Qn);(a=Mn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
549
+ On(this,a):Mn=null}else window.__onGCastApiAvailable!==Rn&&(Sn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Rn)};q.Fe=function(a){this.A=a;this.h&&Tn(this,{type:"appData",appData:this.A})};q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new P(1,8,8E3);if(!Pn)throw new P(1,8,8001);if(b.h)throw new P(1,8,8002);b.l=new Lc;chrome.cast.requestSession(function(d){return Un(b,a,d)},function(d){return Vn(b,d)});return A(c,b.l,0)})};
550
+ function Wn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Un(a,b,c)},function(c){return Vn(a,c)})}}q.ac=function(){if(this.h){Ln(this);if(Mn){Nn(this);try{Mn.stop(function(){},function(){})}catch(a){}Mn=null}Jn(this)}};
551
+ q.get=function(a,b){var c=this;if("video"==a){if(An.includes(b))return function(){return c.Kf.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))}}else if("player"==a){if(Dn[b]&&!this.get("player","isLive")())return function(){};if(Gn.includes(b))return function(){return c.Kf.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))};if(Hn.includes(b))return function(){return c.kh.apply(c,[a,b].concat(ja(Fa.apply(0,arguments))))};if(Bn[b]||Cn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
552
+ q.set=function(a,b,c){this.g[a][b]=c;Tn(this,{type:"set",targetName:a,property:b,value:c})};function Un(a,b,c){Mn=c;c.addUpdateListener(a.F);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Jn(a);Tn(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}function Vn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new P(2,8,c,b))}
553
+ q.Kf=function(a,b){Tn(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.kh=function(a,b){var c=Fa.apply(2,arguments),d=new Lc,e=this.J.toString();this.J++;this.i[e]=d;try{Tn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function On(a,b){var c=a.K();a.l=new Lc;a.C=!0;Un(a,c,b)}function Nn(a){var b=Mn;b.removeUpdateListener(a.F);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
554
+ function Jn(a){var b=Mn?"connected"==Mn.status:!1;if(a.h&&!b){a.H();for(var c in a.g)a.g[c]={};Ln(a)}a.h=b;a.N=b?Mn.receiver.friendlyName:"";a.j.za()}function Ln(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new P(1,7,7E3))}}function Tn(a,b){b=un(b);var c=Mn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new P(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.B("player",c),a.ac(),b;}}var Qn=.02,Pn=!1,Mn=null,Sn=null,Kn=new Set;
555
+ function Rn(a){Sn?window.__onGCastApiAvailable=Sn:delete window.__onGCastApiAvailable;Sn=null;if(a)for(var b=r(Kn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Xn(a,b,c,d){d=void 0===d?!1:d;fb.call(this);var e=this;this.i=a;this.h=b;this.m=this.A=this.j=this.B=this.l=null;this.G=c;this.F=d;this.C=new Map;this.g=new In(c,function(){return Yn(e)},function(){return Zn(e)},function(f,g){return $n(e,f,g)},function(){return ao(e)},function(){return bo(e)},d);co(this)}u(Xn,fb);q=Xn.prototype;
556
+ q.destroy=function(a){a&&this.g.ac();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.B=this.l=this.i=null;fb.prototype.release.call(this);return Promise.all(a)};q.Bb=function(){return this.l};q.dc=function(){return this.B};q.hf=function(){return this.g.m&&Pn};q.qa=function(){return this.g.qa()};q.Gd=function(){return this.g.Gd()};
557
+ q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=bo(a),A(c,a.g.cast(b),2)):a.h?A(c,a.h.Ve(),0):c.return()})};q.Fe=function(a){this.g.Fe(a)};q.Sf=function(){Wn(this.g)};q.ac=function(){this.g.ac()};
558
+ q.mf=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.G&&b==c.F)return d.return();c.G=a;c.F=b;c.g.ac();return A(d,c.g.destroy(),2)}c.g=null;c.g=new In(a,function(){return Yn(c)},function(){return Zn(c)},function(e,f){return $n(c,e,f)},function(){return ao(c)},function(){return bo(c)},b);c.g.init();B(d)})};
559
+ function co(a){a.g.init();a.m=new Af;for(var b=r(xn),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.qa()||(f=Qa(f),a.j.dispatchEvent(f))});for(var d in Ra)a.m.o(a.h,Ra[d],function(f){a.g.qa()||a.A.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.wc=e,Object.defineProperty(a.l,b.wc,{configurable:!1,enumerable:!0,get:function(f){return function(){return eo(a,f.wc)}}(b),set:function(f){return function(g){var h=f.wc;a.g.qa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={wc:b.wc};a.B={};fo(a,
560
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return go(a,f)}})});ho(a);a.j=new fb;a.j.wd=a.l;a.A=new fb;a.A.wd=a.B}function ho(a){var b=new Map;fo(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.C.set(c,d):a.C.set(d,c)):b.set(d,c)})}
561
+ function fo(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=r(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)}}
562
+ function bo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.fe(),startTime:null};a.i.pause();for(var c=r(zn),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=r(En);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=r(Fn);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 Yn(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
563
+ function Zn(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
564
+ function ao(a){for(var b=r(En),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")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(zn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(zn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Fn);for(k=
564
565
  h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new O("error",h);a.h.dispatchEvent(h)})}
565
- function bo(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.qa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.qa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
566
- function eo(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.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.Ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.md()};
567
- if("setVideoContainer"==b)return function(c){return a.h.Me(c)};if(a.g.qa()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.qa()&&0==Object.keys(a.g.g.video).length&&(zn[b]||An[b])||!a.g.qa()?a.h[b].bind(a.h):a.g.get("player",b)}
568
- function Yn(a,b,c){a.g.qa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}M("shaka.cast.CastProxy",Vn);Vn.prototype.changeReceiverId=Vn.prototype.kf;Vn.prototype.forceDisconnect=Vn.prototype.ac;Vn.prototype.suggestDisconnect=Vn.prototype.Qf;Vn.prototype.setAppData=Vn.prototype.Ee;Vn.prototype.cast=Vn.prototype.cast;Vn.prototype.receiverName=Vn.prototype.Gd;Vn.prototype.isCasting=Vn.prototype.qa;Vn.prototype.canCast=Vn.prototype.ef;Vn.prototype.getPlayer=Vn.prototype.dc;
569
- Vn.prototype.getVideo=Vn.prototype.Bb;Vn.prototype.destroy=Vn.prototype.destroy;function go(a,b,c,d){fb.call(this);var e=this;this.g=a;this.h=b;this.j=new Af;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){ho(e)});io(this)}u(go,fb);q=go.prototype;q.isConnected=function(){return this.H};q.Sg=function(){return this.A};q.rh=function(a){this.i=a};q.gg=function(){this.i=null};
570
- q.sh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.qh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.ph=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
571
- q.destroy=function(){var a=this,b,c;return K(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.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.A=!0,a.l=null,a.B=null,fb.prototype.release.call(a),B(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();C(d)})};
572
- function io(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return jo(a)};b.onSenderDisconnected=function(){return jo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&ko(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);ko(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return lo(a,
573
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return mo(a,e)};b.start();b=r(vn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return no(a,"video",e)});for(var d in Ra)a.j.o(a.h,Ra[d],function(e){return no(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.He(3840,2160):a.h.He(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
574
- !1;oo(a)});a.j.o(a.g,"playing",function(){a.A=!1;oo(a)});a.j.o(a.g,"pause",function(){oo(a)});a.j.o(a.h,"unloading",function(){a.A=!0;oo(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,oo(a))})).S(po)})}function jo(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;oo(a)}
575
- function oo(a){var b;K(function(c){if(1==c.g)return B(c,Promise.resolve(),2);if(!a.h)return c.return();b=new O("caststatuschanged");a.dispatchEvent(b);qo(a)||ro(a);C(c)})}
576
- function so(a,b,c){var d,e,f,g,h,k,l,m,p,n;K(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,E(t,5),B(t,a.h.load(b.manifest,b.startTime),7)):B(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=I(t),h=(new Map).set("detail",g),k=new O("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
577
- a.g.autoplay=f;b.manifest&&(a.g.play(),ro(a));C(t)}})}function no(a,b,c){a.h&&(ho(a),ko(a,{type:"event",targetName:b,event:c},a.l))}
578
- function ho(a){a.I.S(to);for(var b={video:{},player:{}},c=r(wn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Bn)0==a.m%Bn[e]&&(b.player[e]=a.h[e]());for(var f in zn)0==a.m%zn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;ko(a,{type:"update",update:b},a.l);for(var g in An)0==a.m%An[g]&&(b={player:{}},b.player[g]=a.h[g](),ko(a,{type:"update",update:b},a.l));a.F&&(a.m+=
579
- 1);qo(a)}function qo(a){return a.C&&(a.g.duration||a.h.U())?(uo(a),a.C=!1,!0):!1}function uo(a,b){var c={contentId:a.h.fe(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);ro(a,void 0===b?0:b,c)}
580
- function mo(a,b){var c=tn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;so(a,c.initState,c.appData);ho(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
581
- "player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return vo(a,g,f,null)},function(h){return vo(a,g,f,h)})}}
582
- function lo(a,b){var c=tn(b.data);switch(c.type){case "PLAY":a.g.play();ro(a);break;case "PAUSE":a.g.pause();ro(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),ro(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),ro(a));break;case "STOP":a.h.Te().then(function(){a.h&&ro(a)});break;case "GET_STATUS":uo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
583
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||ro(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&uo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");ko(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:ko(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
584
- function vo(a,b,c,d){a.h&&ko(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function ko(a,b,c,d){a.H&&(a=sn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function ro(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?wo:a.h.Oc()?xo:a.g.paused?yo:zo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);ko(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
585
- M("shaka.cast.CastReceiver",go);go.prototype.destroy=go.prototype.destroy;go.prototype.setContentArtist=go.prototype.ph;go.prototype.setContentImage=go.prototype.qh;go.prototype.setContentTitle=go.prototype.sh;go.prototype.clearContentMetadata=go.prototype.gg;go.prototype.setContentMetadata=go.prototype.rh;go.prototype.isIdle=go.prototype.Sg;go.prototype.isConnected=go.prototype.isConnected;var to=.5,po=5,wo="IDLE",zo="PLAYING",xo="BUFFERING",yo="PAUSED";function Ao(a,b,c){var d=Bo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ae?(e=h.init||e,!1):!0}),f.length&&(a=Co(e,f,c,g),0==a.length&&(a=[Eb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Eb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
586
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{nf:g,bj:e,drmInfos:a,tf:!0}}function Do(a,b,c,d){var e=Ao(a,c,d);if(b.tf){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.tf=!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 P(2,4,4008);return e.nf||b.nf}
587
- function Eo(a){var b=0,c=Hc(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=Ec(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
588
- function Fo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Go(a){a=Yf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=md(a.textContent);a=Eo(a).filter(function(b){return b.type===Ho})[0];if(!a)return"";a=ed(a.value,!0);return(a=ng(a,"WRMHEADER"))?Fo(a):""}
589
- function Co(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Ae];if(g){var h;if(h=Yf(f.node,"urn:microsoft:playready","pro")){h=md(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Vf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ae)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
590
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Vf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=Io.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Bo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Jo(c.value))&&b.push(c);return b}
591
- function Jo(a){var b=a.getAttribute("schemeIdUri"),c=ag(a,"urn:mpeg:cenc:2013","default_KID"),d=Zf(a,"urn:mpeg:cenc:2013","pssh").map(cg);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:md(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,Ae:b,keyId:c,init:0<e.length?e:null}}
592
- var Ho=1,Io=(new Map).set("com.widevine.alpha",function(a){return(a=Yf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Go).set("com.microsoft.playready.recommendation",Go).set("com.microsoft.playready.software",Go).set("com.microsoft.playready.hardware",Go).set("org.w3.clearkey",function(a){return(a=Yf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Ko(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
566
+ function eo(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.qa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.qa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
567
+ function go(a,b){a.C.has(b)&&(b=a.C.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.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.Ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.nd()};
568
+ if("setVideoContainer"==b)return function(c){return a.h.Ne(c)};if(a.g.qa()){if("getManifest"==b||"drmInfo"==b)return function(){Ua(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ua(b+"() does not work while casting!");return Promise.resolve()}}return a.g.qa()&&0==Object.keys(a.g.g.video).length&&(Bn[b]||Cn[b])||!a.g.qa()?a.h[b].bind(a.h):a.g.get("player",b)}
569
+ function $n(a,b,c){a.g.qa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}M("shaka.cast.CastProxy",Xn);Xn.prototype.changeReceiverId=Xn.prototype.mf;Xn.prototype.forceDisconnect=Xn.prototype.ac;Xn.prototype.suggestDisconnect=Xn.prototype.Sf;Xn.prototype.setAppData=Xn.prototype.Fe;Xn.prototype.cast=Xn.prototype.cast;Xn.prototype.receiverName=Xn.prototype.Gd;Xn.prototype.isCasting=Xn.prototype.qa;Xn.prototype.canCast=Xn.prototype.hf;Xn.prototype.getPlayer=Xn.prototype.dc;
570
+ Xn.prototype.getVideo=Xn.prototype.Bb;Xn.prototype.destroy=Xn.prototype.destroy;function io(a,b,c,d){fb.call(this);var e=this;this.g=a;this.h=b;this.j=new Af;this.J={video:a,player:b};this.G=c||function(){};this.K=d||function(f){return f};this.i=null;this.H=!1;this.A=!0;this.m=0;this.F=!1;this.C=!0;this.B=this.l=null;this.I=new Q(function(){jo(e)});ko(this)}u(io,fb);q=io.prototype;q.isConnected=function(){return this.H};q.Ug=function(){return this.A};q.uh=function(a){this.i=a};q.ig=function(){this.i=null};
571
+ q.vh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.sh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.rh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
572
+ q.destroy=function(){var a=this,b,c;return K(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.I&&(a.I.stop(),a.I=null),a.g=null,a.J=null,a.G=null,a.H=!1,a.A=!0,a.l=null,a.B=null,fb.prototype.release.call(a),A(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
573
+ function ko(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return lo(a)};b.onSenderDisconnected=function(){return lo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&mo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);mo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return no(a,
574
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return oo(a,e)};b.start();b=r(xn);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return po(a,"video",e)});for(var d in Ra)a.j.o(a.h,Ra[d],function(e){return po(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Ie(3840,2160):a.h.Ie(1920,1080);a.j.o(a.g,"loadeddata",function(){a.F=!0});a.j.o(a.h,"loading",function(){a.A=
575
+ !1;qo(a)});a.j.o(a.g,"playing",function(){a.A=!1;qo(a)});a.j.o(a.g,"pause",function(){qo(a)});a.j.o(a.h,"unloading",function(){a.A=!0;qo(a)});a.j.o(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.A=!0,qo(a))})).S(ro)})}function lo(a){a.m=0;a.C=!0;a.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;qo(a)}
576
+ function qo(a){var b;K(function(c){if(1==c.g)return A(c,Promise.resolve(),2);if(!a.h)return c.return();b=new O("caststatuschanged");a.dispatchEvent(b);so(a)||to(a);B(c)})}
577
+ function uo(a,b,c){var d,e,f,g,h,k,l,m,p,n;K(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.G(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,E(t,5),A(t,a.h.load(b.manifest,b.startTime),7)):A(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=J(t),h=(new Map).set("detail",g),k=new O("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
578
+ a.g.autoplay=f;b.manifest&&(a.g.play(),to(a));B(t)}})}function po(a,b,c){a.h&&(jo(a),mo(a,{type:"event",targetName:b,event:c},a.l))}
579
+ function jo(a){a.I.S(vo);for(var b={video:{},player:{}},c=r(yn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Dn)0==a.m%Dn[e]&&(b.player[e]=a.h[e]());for(var f in Bn)0==a.m%Bn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;mo(a,{type:"update",update:b},a.l);for(var g in Cn)0==a.m%Cn[g]&&(b={player:{}},b.player[g]=a.h[g](),mo(a,{type:"update",update:b},a.l));a.F&&(a.m+=
580
+ 1);so(a)}function so(a){return a.C&&(a.g.duration||a.h.U())?(wo(a),a.C=!1,!0):!1}function wo(a,b){var c={contentId:a.h.fe(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);to(a,void 0===b?0:b,c)}
581
+ function oo(a,b){var c=vn(b.data);switch(c.type){case "init":a.m=0;a.F=!1;a.C=!0;uo(a,c.initState,c.appData);jo(a);break;case "appData":a.G(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
582
+ "player"==d&&"load"==e&&(a.m=0,a.F=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.C=!0}));c.then(function(){return xo(a,g,f,null)},function(h){return xo(a,g,f,h)})}}
583
+ function no(a,b){var c=vn(b.data);switch(c.type){case "PLAY":a.g.play();to(a);break;case "PAUSE":a.g.pause();to(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),to(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),to(a));break;case "STOP":a.h.Ve().then(function(){a.h&&to(a)});break;case "GET_STATUS":wo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
584
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||to(a);break;case "LOAD":a.m=0;a.F=!1;a.C=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.G(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&wo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");mo(a,{requestId:Number(c.requestId),type:h},a.B)});break;default:mo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
585
+ function xo(a,b,c,d){a.h&&mo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function mo(a,b,c,d){a.H&&(a=un(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function to(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?yo:a.h.Pc()?zo:a.g.paused?Ao:Bo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);mo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
586
+ M("shaka.cast.CastReceiver",io);io.prototype.destroy=io.prototype.destroy;io.prototype.setContentArtist=io.prototype.rh;io.prototype.setContentImage=io.prototype.sh;io.prototype.setContentTitle=io.prototype.vh;io.prototype.clearContentMetadata=io.prototype.ig;io.prototype.setContentMetadata=io.prototype.uh;io.prototype.isIdle=io.prototype.Ug;io.prototype.isConnected=io.prototype.isConnected;var vo=.5,ro=5,yo="IDLE",Bo="PLAYING",zo="BUFFERING",Ao="PAUSED";function Co(a,b,c){var d=Do(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g.delete(null);if(1<g.size)throw new P(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Be?(e=h.init||e,!1):!0}),f.length&&(a=Eo(e,f,c,g),0==a.length&&(a=[Eb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Eb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
587
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{qf:g,dj:e,drmInfos:a,vf:!0}}function Fo(a,b,c,d){var e=Co(a,c,d);if(b.vf){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.vf=!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 P(2,4,4008);return e.qf||b.qf}
588
+ function Go(a){var b=0,c=Hc(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=Ec(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
589
+ function Ho(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Io(a){a=Yf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=md(a.textContent);a=Go(a).filter(function(b){return b.type===Jo})[0];if(!a)return"";a=ed(a.value,!0);return(a=ng(a,"WRMHEADER"))?Ho(a):""}
590
+ function Eo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Be];if(g){var h;if(h=Yf(f.node,"urn:microsoft:playready","pro")){h=md(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Vf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Be)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
591
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Vf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=Eb(g,f.init||a||h||k);if(g=Ko.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Do(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Lo(c.value))&&b.push(c);return b}
592
+ function Lo(a){var b=a.getAttribute("schemeIdUri"),c=ag(a,"urn:mpeg:cenc:2013","default_KID"),d=Zf(a,"urn:mpeg:cenc:2013","pssh").map(cg);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new P(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:md(f),keyId:null}})}catch(f){throw new P(2,4,4007);}return{node:a,Be:b,keyId:c,init:0<e.length?e:null}}
593
+ var Jo=1,Ko=(new Map).set("com.widevine.alpha",function(a){return(a=Yf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Io).set("com.microsoft.playready.recommendation",Io).set("com.microsoft.playready.software",Io).set("com.microsoft.playready.hardware",Io).set("org.w3.clearkey",function(a){return(a=Yf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Mo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
593
594
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
594
- function Lo(a,b){var c=Mo(a,b,"timescale"),d=1;c&&(d=jg(c)||1);var e=Mo(a,b,"duration");c=jg(e||"");"image"==a.L.contentType&&(c=lg(e||""));c&&(c/=d);var f=Mo(a,b,"startNumber");e=Number(Mo(a,b,"presentationTimeOffset"))||0;var g=kg(f||"");if(null==f||null==g)g=1;f=No(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Z.duration||Infinity;f=Xf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=eg(m,"t",kg),t=eg(m,"d",kg);m=eg(m,"r",ig);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
595
- m)if(p){p=eg(p,"t",kg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,yh:n}),n=k}b=h}return{timescale:d,xa:c,rc:g,qb:e/d||0,Ue:e,timeline:b}}function Mo(a,b,c){return[b(a.L),b(a.va),b(a.ra)].filter(Bb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
596
- function No(a,b,c){return[b(a.L),b(a.va),b(a.ra)].filter(Bb).map(function(d){return Wf(d,c)}).reduce(function(d,e){return d||e})}
597
- function Oo(a,b,c,d,e,f){for(var g=ag(a,"http://www.w3.org/1999/xlink","href"),h=ag(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return cf(new P(2,4,4028));if("onLoad"!=h)return cf(new P(2,4,4027));var m=Cb([d],[g]);return e.request(0,rf(m,b)).na(function(p){p=pg(p.data,a.tagName);if(!p)return cf(new P(2,4,4001,g));
598
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Po(a,b,c,m[0],e,f+1)})}
599
- function Po(a,b,c,d,e,f){f=void 0===f?0:f;if(ag(a,"http://www.w3.org/1999/xlink","href")){var g=Oo(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return Po(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==ag(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Po(k,b,c,d,e,f)));return gf(g).na(function(){return a})};function Qo(a,b,c,d,e,f,g){var h,k=(new Lf).X("sidx",function(l){h=Ro(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
600
- function Ro(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.qc(),m=g.reader.qc();g.reader.skip(2);var p=g.reader.ve();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.R(),t=(n&2147483648)>>>31;n&=2147483647;var x=g.reader.R();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new yi(l/k+c,(l+x)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=x;a+=n}g.parser.stop();return h};function So(a){this.h=Hc(a);this.g=new If(this.h,0)}So.prototype.Ca=function(){return this.g.Ca()};
601
- function To(a){var b=Uo(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Uo(a);a:{d=r(Vo);for(var e=d.next();!e.done;e=d.next())if(Cc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.oa();else{if(8==b.length&&b[1]&224)throw new P(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.oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.oa();d=Hc(a.h,a.g.oa(),b);a.g.skip(b);return new Wo(c,
602
- d)}function Uo(a){var b=a.g.oa(),c=a.g.pb();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ec(a.h,b,c)}var Vo=[[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 Wo(a,b){this.id=a;this.g=b}
603
- function Xo(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(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 Yo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new So(a.g);for(var p=null,n=null;a.Ca();){var t=To(a);if(187==t.id){var x=Zo(t);x&&(t=c*x.Ah,x=b+x.hh,null!=p&&m.push(new yi(p+g,t+g,l,n,x-1,f,g,h,k)),p=t,n=x)}}null!=p&&m.push(new yi(p+g,d+g,l,n,null,f,g,h,k));return m}
604
- function Zo(a){var b=new So(a.g);a=To(b);if(179!=a.id)throw new P(2,3,3013);a=Xo(a);b=To(b);if(183!=b.id)throw new P(2,3,3012);b=new So(b.g);for(var c=0;b.Ca();){var d=To(b);if(241==d.id){c=Xo(d);break}}return{Ah:a,hh:c}};function $o(a,b){b=No(a,b,"Initialization");if(!b)return null;var c=a.L.Na,d=b.getAttribute("sourceURL");d&&(c=Cb(a.L.Na,[d]));d=0;var e=null;if(b=eg(b,"range",hg))d=b.start,e=b.end;return new wi(function(){return c},d,e,ap(a))}
605
- function bp(a,b){var c=Number(Mo(a,cp,"presentationTimeOffset"))||0,d=Mo(a,cp,"timescale"),e=1;d&&(e=jg(d)||1);var f=c/e||0,g=$o(a,cp);dp(a,g);var h=kf(a);return{bc:function(){var k=No(h,cp,"RepresentationIndex"),l=h.L.Na;k&&(k=k.getAttribute("sourceURL"))&&(l=Cb(h.L.Na,[k]));k=ep(h);return hp(h,b,g,l,k.start,k.end,f)}}}
606
- function hp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,x,y,v,w,A,z,D,G;return K(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.xb||!a.Z.Df,l=a.Z.start,m=a.Z.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,x=[n(d,e,f),"webm"==p?n(c.Pa(),c.Ta,c.Ba):null],n=null,B(F,Promise.all(x),2);y=F.h;v=y[0];w=y[1]||null;A=null;z=l-g;D=l;G=m?l+m:Infinity;if("mp4"==p)var H=Qo(v,e,d,c,z,D,G);else{H=new So(w);if(440786851!=To(H).id)throw new P(2,3,3008);var J=To(H);if(408125543!=J.id)throw new P(2,3,3009);H=J.g.byteOffset;
607
- J=new So(J.g);for(var L=null;J.Ca();){var N=To(J);if(357149030==N.id){L=N;break}}if(!L)throw new P(2,3,3010);L=new So(L.g);N=1E6;for(J=null;L.Ca();){var T=To(L);if(2807729==T.id)N=Xo(T);else if(17545==T.id)if(4==T.g.byteLength)J=T.g.getFloat32(0);else if(8==T.g.byteLength)J=T.g.getFloat64(0);else throw new P(2,3,3003);}if(null==J)throw new P(2,3,3011);L=N/1E9;J*=L;N=To(new So(v));if(475249515!=N.id)throw new P(2,3,3007);H=Yo(N,H,L,J,d,c,z,D,G)}A=H;h.mc(A);t=new Bj(A);k&&t.yb(D,G,!0);return F.return(t)})}
608
- function cp(a){return a.Wc}function ep(a){var b=No(a,cp,"RepresentationIndex");a=Mo(a,cp,"indexRange");a=hg(a||"");b&&(a=eg(b,"range",hg,a));return a}function dp(a,b){ip(a,b);if(!ep(a))throw new P(2,4,4002);}function ip(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Ib&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
609
- function ap(a){var b=a.L;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.xd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function jp(a,b){var c=$o(a,kp),d=lp(a);if(!d.xa&&!d.timeline&&1<d.kc.length)throw new P(2,4,4002);if(!d.xa&&!a.Z.duration&&!d.timeline&&1==d.kc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.ra.id&&a.L.id&&(f=b[a.ra.id+","+a.L.id])&&(e=f.segmentIndex);var g=mp(a.Z.start,a.Z.duration,a.L.Na,d,c);b=!e;e?e.lc(g,a.presentationTimeline.mb()):e=new Bj(g);a.presentationTimeline.mc(g);a.xb&&a.Z.Df||e.yb(a.Z.start,a.Z.duration?a.Z.start+a.Z.duration:
610
- Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.M.length||e.Rc(g);return Promise.resolve(e)}}}function kp(a){return a.Db}function lp(a){var b=np(a);a=Lo(a,kp);var c=a.rc;0==c&&(c=1);var d=0;a.xa?d=a.xa*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{xa:a.xa,startTime:d,rc:c,qb:a.qb,timeline:a.timeline,kc:b}}
611
- function mp(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Sd:m.Sd},p++){var n=d.kc[p];m.Sd=Cb(c,[n.Yg]);var t=void 0;t=null!=d.xa?l+d.xa:d.timeline?d.timeline[p].end:l+b;k.push(new yi(a+l,a+t,function(x){return function(){return x.Sd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
612
- function np(a){return[a.L.Db,a.va.Db,a.ra.Db].filter(Bb).map(function(b){return Xf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Bf&&(a.Bf=!0);var c=b.getAttribute("media");b=eg(b,"mediaRange",hg,{start:0,end:null});return{Yg:c,start:b.start,end:b.end}})};function op(a,b,c,d,e,f){var g=pp(a),h=qp(a);rp(h);var k=kf(a);if(h.Nc)return ip(a,g),{bc:function(){var t=Ko(h.Nc,k.L.id,null,k.bandwidth||null,null);t=Cb(k.L.Na,[t]);return hp(k,b,g,t,0,null,h.qb)}};if(h.xa)return d||"image"===a.va.contentType||(a.presentationTimeline.pe(h.xa),a.presentationTimeline.qe(a.Z.start)),{bc:function(){return sp(k,h,e,g,f)}};var l=null;d=d=null;a.ra.id&&a.L.id&&(d=a.ra.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=tp(k,h,g);c=a.Z.start;var p=a.Z.duration?a.Z.start+a.Z.duration:
613
- Infinity,n=Infinity!=p;l?(n&&(new Bj(m)).yb(c,p,!0),l.lc(m,a.presentationTimeline.mb())):l=new Bj(m);a.presentationTimeline.mc(m);n&&l.yb(c,p);d&&a.xb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.M.length||l.Rc(m);return Promise.resolve(l)}}}function up(a){return a.Xc}function qp(a){var b=Lo(a,up),c=Mo(a,up,"media");a=Mo(a,up,"index");return{xa:b.xa,timescale:b.timescale,rc:b.rc,qb:b.qb,Ue:b.Ue,timeline:b.timeline,oe:c,Nc:a}}
614
- function rp(a){var b=a.Nc?1:0;b+=a.timeline?1:0;b+=a.xa?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Nc&&(a.timeline=null),a.xa=null);if(!a.Nc&&!a.oe)throw new P(2,4,4002);}
615
- function sp(a,b,c,d,e){function f(L){var N=(L-t)*n,T=N+b.qb,aa=N+l;N=aa+n;var ea=Math.min(N,h());aa=new yi(aa,ea,function(){var ka=Ko(y,w,L,v,T*x);return Cb(A,[ka])},0,null,d,z,l,h());aa.j=N;return aa}function g(){var L=[Math.max(k.mb(),l),Math.min(k.Jb(),h())].map(function(N){return N-l});return[Math.ceil(L[0]/n),Math.ceil(L[1]/n)-1].map(function(N){return N+t})}function h(){var L=null!=m&&e[m]||p;return L?l+L:Infinity}var k=a.presentationTimeline,l=a.Z.start,m=a.ra.id,p=a.Z.duration,n=b.xa,t=b.rc,
616
- x=b.timescale,y=b.oe,v=a.bandwidth||null,w=a.L.id,A=a.L.Na,z=l-b.qb,D=g();a=a.xb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var G=a;G<=D;++G){var F=f(G);c.push(F)}var H=new Bj(c);c=k.Jb()<h();G=k.U();if(c||G){var J=Math.max(a,D+1);H.Jd(n,function(){var L=k.mb();H.Hb(L);var N=r(g());N.next();N=N.next().value;for(var T=[];J<=N;){var aa=f(J);T.push(aa);J++}return L>h()&&!T.length?null:T})}return Promise.resolve(H)}
617
- function tp(a,b,c){var d=a.Z.start,e=a.Z.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Rd:h.Rd,Vd:h.Vd,Yd:h.Yd,Od:h.Od,$d:h.$d,Pd:h.Pd},k++){var l=b.timeline[k],m=l.start,p=l.yh;l=l.end;h.Yd=k+b.rc;h.$d=p+b.Ue;h.Vd=a.L.id;h.Od=a.bandwidth||null;h.Rd=b.oe;h.Pd=a.L.Na;g.push(new yi(d+m,d+l,function(n){return function(){var t=Ko(n.Rd,n.Vd,n.Yd,n.Od||null,n.$d);return Cb(n.Pd,[t]).map(function(x){return x.toString()})}}(h),0,null,c,f,d,e))}return g}
618
- function pp(a){var b=Mo(a,up,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Na;return new wi(function(){var f=Ko(b,c,null,d,null);return Cb(e,[f])},0,null,ap(a))};function vp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}vp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
619
- function wp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,A,z,D,G,F,H,J,L,N,T,aa,ea,ka,Ba,Ia;return K(function(Ja){switch(Ja.g){case 1:d=Jb;xp(b);yp(b);zp(b);Ap(b);if(!c&&1==b.length){e=b[0];a.g=e.hd;a.h=e.Ld;a.j=e.textStreams;a.i=e.imageStreams;Ja.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ja.return();k=b.map(function(Na){return Na.hd});l=b.map(function(Na){return Na.Ld});m=b.map(function(Na){return Na.textStreams});p=b.map(function(Na){return Na.imageStreams});
620
- n=r(m);for(t=n.next();!t.done;t=n.next())x=t.value,x.push(Bp(d.ha));y=r(p);for(v=y.next();!v.done;v=y.next())w=v.value,w.push(Bp(d.Bc));return B(Ja,Cp(a.g,k,f,Dp,Ep),3);case 3:return B(Ja,Cp(a.h,l,f,Dp,Ep),4);case 4:return B(Ja,Cp(a.j,m,f,Dp,Ep),5);case 5:return B(Ja,Cp(a.i,p,f,Dp,Ep),2);case 2:A=0;z=[];if(a.h.length&&a.g.length)for(L=r(a.g),N=L.next();!N.done;N=L.next())for(T=N.value,aa=r(a.h),ea=aa.next();!ea.done;ea=aa.next())ka=ea.value,Ba=bh(T.drmInfos,ka.drmInfos),T.drmInfos.length&&ka.drmInfos.length&&
621
- !Ba.length||(Ia=A++,z.push({id:Ia,language:T.language,primary:T.primary,audio:T,video:ka,bandwidth:(T.bandwidth||0)+(ka.bandwidth||0),drmInfos:Ba,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=a.h.concat(a.g),G=r(D),F=G.next();!F.done;F=G.next())H=F.value,J=A++,z.push({id:J,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.Ia?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
622
- a.l=z;C(Ja)}})}function xp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.hd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&ec(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.hd=c}}
623
- function zp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&ec(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
624
- function yp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Ld),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&ec(e.roles,h.roles)&&Hf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Ld=c}}
625
- function Ap(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
626
- function Fp(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,A,z,D,G,F,H,J,L,N,T;return K(function(aa){switch(aa.g){case 1:b=Jb;if(1==a.length)return aa.return(a[0]);c=a.map(function(ea){return ea.filter(function(ka){return ka.type==b.Gb})});d=a.map(function(ea){return ea.filter(function(ka){return ka.type==b.Ia})});e=a.map(function(ea){return ea.filter(function(ka){return ka.type==b.ha})});f=a.map(function(ea){return ea.filter(function(ka){return ka.type==b.Bc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
627
- h.value,k.push(Gp(b.ha));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(Gp(b.Bc));return B(aa,Cp([],c,0,Hp,Ip),2);case 2:return n=aa.h,B(aa,Cp([],d,0,Hp,Ip),3);case 3:return t=aa.h,B(aa,Cp([],e,0,Hp,Ip),4);case 4:return x=aa.h,B(aa,Cp([],f,0,Hp,Ip),5);case 5:y=aa.h;v=0;if(t.length&&n.length)for(G=r(n),F=G.next();!F.done;F=G.next())for(H=F.value,J=r(t),L=J.next();!L.done;L=J.next())N=L.value,T=v++,N.variantIds.push(T),H.variantIds.push(T);else for(w=t.concat(n),A=r(w),z=A.next();!z.done;z=
628
- A.next())D=z.value,D.variantIds=[v++];return aa.return(t.concat(n).concat(x).concat(y))}})}
629
- function Cp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,x,y,v,w,A,z,D,G,F,H,J,L;return K(function(N){switch(N.g){case 1:f=Jb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){N.D(4);break}m=l.value;return B(N,Jp(m,b,c,e,g),5);case 5:p=N.h;if(!p)throw new P(2,4,4037);l=k.next();N.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(x=t.value,y=r(x),v=y.next();!v.done;v=y.next())w=v.value,(A=Kp(w,b,d,e,g))&&a.push(A);z=r(g);for(t=z.next();!t.done;t=
630
- z.next())for(D=t.value,G={},F=r(D),v=F.next();!v.done;G={vb:G.vb},v=F.next())if(G.vb=v.value,H=G.vb.type==f.ha&&!G.vb.language,J=G.vb.type==f.Bc&&!G.vb.tilesLayout,!H&&!J&&(L=a.some(function(T){return function(aa){return aa.mimeType==T.vb.mimeType&&yd(aa.codecs)==yd(T.vb.codecs)}}(G))))throw new P(2,4,4037);return N.return(a)}})}
631
- function Jp(a,b,c,d,e){return K(function(f){if(1==f.g)return Lp(b,a),a.matchedStreams?a.segmentIndex?B(f,Mp(a,c),2):f.D(2):f.return(!1);Np(a,c,d,e);return f.return(!0)})}
632
- function Mp(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return B(l,Promise.all(c),2)}if(a.segmentIndex instanceof Ej)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);C(l)})}
633
- function Kp(a,b,c,d,e){var f=c(a);Lp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Ej;return B(g,Mp(f,0),0)})});if(!f.matchedStreams)return null;Np(f,0,d,e);return f}function Np(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Sb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
634
- function Dp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
635
- function Hp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
636
- function Ep(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ja(f),ja(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=bh(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
637
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Dp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Ep(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Ep(a.trickModeVideo,b)}
638
- function Ip(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
639
- function Lp(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Op,video:Op,text:Pp,image:Qp}[e.type],g={audio:Rp,video:Sp,text:Tp,image:Up}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function Op(a,b){var c;!(c=b.mimeType!=a.mimeType||yd(b.codecs)!=yd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<bh(a,b).length:1));return c?!1:!0}
640
- function Pp(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Qp(a){return a.tilesLayout?!0:!1}
641
- function Rp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
642
- d=Vp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Wp)return!0;if(d==Xp)return!1;d=Vp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Wp?!0:d==Xp?!1:a.bandwidth&&Yp(a.bandwidth,b.bandwidth,c.bandwidth)==Wp?!0:!1}
643
- function Sp(a,b,c){if(a.id==c.id)return!0;var d=Vp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Wp)return!0;if(d==Xp)return!1;if(a.frameRate){d=Vp(a.frameRate,b.frameRate,c.frameRate);if(d==Wp)return!0;if(d==Xp)return!1}return a.bandwidth&&Yp(a.bandwidth,b.bandwidth,c.bandwidth)==Wp?!0:!1}
644
- function Tp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
645
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Up(a,b,c){return a.id==c.id?!0:Vp(a.width*a.height,b.width*b.height,c.width*c.height)==Wp?!0:!1}function Gp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
646
- function Bp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Bj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
647
- function Vp(a,b,c){if(b==a&&a!=c)return Xp;if(c==a&&a!=b)return Wp;if(b>a){if(c<=a||c-a<b-a)return Wp;if(c-a>b-a)return Xp}else{if(c>a)return Xp;if(a-c<a-b)return Wp;if(a-c>a-b)return Xp}return Zp}function Yp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Wp:b<a?Xp:Zp}var Wp=1,Zp=0,Xp=-1;function $p(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new vp;this.H=0;this.J=new $b(5);this.G=new Q(function(){aq(a)});this.A=new lf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=$p.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,B(e,bq(c),2);d=e.h;c.h&&cq(c,d);if(!c.h)throw new P(2,7,7001);return e.return(c.i)})};
648
- q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return E(c,2),B(c,bq(a),4);if(2!=c.g)return va(c,0);b=I(c);if(!a.h||!b)return c.return();a.h.onError(b);C(c)})};q.onExpirationUpdated=function(){};
649
- function bq(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=rf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),mf(a.A,e),B(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return B(k,dq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
650
- function dq(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=pg(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(eq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Po(d,a.g.retryParameters,f,c,a.h.networkingEngine);mf(a.A,g);return B(k,g.promise,2)}h=k.h;return k.return(eq(a,h,c))})}
651
- function eq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,A,z,D,G,F,H,J,L,N,T,aa,ea,ka,Ba,Ia,Ja,Na;return K(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Xf(b,"Location").map(cg).filter(Bb);0<f.length&&(g=Cb(e,f),e=a.m=g);h=Xf(b,"BaseURL");k=h.map(cg);l=Cb(e,k);m=0;h&&h.length&&(m=eg(h[0],"availabilityTimeOffset",lg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=eg(b,"minBufferTime",gg)||0);a.H=eg(b,"minimumUpdatePeriod",gg,-1);t=eg(b,"availabilityStartTime",fg);x=eg(b,
652
- "timeShiftBufferDepth",gg);y=a.g.dash.ignoreSuggestedPresentationDelay;v=null;y||(v=eg(b,"suggestedPresentationDelay",gg));w=a.g.dash.ignoreMaxSegmentDuration;A=null;w||(A=eg(b,"maxSegmentDuration",gg));z=b.getAttribute("type")||"static";if(a.i)for(D=a.i.presentationTimeline,G=r(Object.values(a.l)),F=G.next();!F.done;F=G.next())H=F.value,H.segmentIndex&&H.segmentIndex.Hb(D.mb());else J=a.g.defaultPresentationDelay||1.5*n,L=null!=v?v:J,D=new R(t,L,a.g.dash.autoCorrectDrift);D.Yc("static"==z);(N=D.U())&&
653
- !isNaN(a.g.availabilityWindowOverride)&&(x=a.g.availabilityWindowOverride);null==x&&(x=Infinity);D.Ke(x);T=b.getAttribute("profiles")||"";aa={xb:"static"!=z,presentationTimeline:D,ra:null,Z:null,va:null,L:null,bandwidth:0,Bf:!1,$b:m,profiles:T.split(",")};ea=fq(a,aa,l,b);ka=ea.duration;Ba=ea.periods;"static"!=z&&ea.qf||D.bb(ka||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?D.Kf(a.C):a.C&&Ua("Low-latency DASH 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.");
654
- D.pe(A||1);return B(Oa,wp(a.j,Ba,aa.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Oa.D(3);break}a.i={presentationTimeline:D,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!D.Sf()){Oa.D(4);break}Ja=Xf(b,"UTCTiming");return B(Oa,gq(a,l,Ja),5);case 5:Na=Oa.h;if(!a.h)return Oa.return();D.Lf(Na);case 4:D.le();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),C(Oa)}})}
655
- function fq(a,b,c,d){var e=eg(d,"mediaPresentationDuration",gg),f=[],g=0;d=Xf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=eg(k,"start",gg,g),p=k.id,n=eg(k,"duration",gg),t=null;if(l){var x=eg(l,"start",gg);null!=x&&(t=x-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=hq(a,b,c,{start:m,duration:t,node:k,Df:null==t||!l});f.push(g);b.ra.id&&t&&(a.N[b.ra.id]=t);if(null==t){g=
656
- null;break}g=m+t}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,qf:!1}:{periods:f,duration:g,qf:!0}}
657
- function hq(a,b,c,d){b.ra=iq(d.node,null,c);b.Z=d;b.ra.$b=b.$b;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=Xf(d.node,"EventStream");c=b.presentationTimeline.mb();e=r(e);for(var f=e.next();!f.done;f=e.next())jq(a,d.start,d.duration,f.value,c);c=Xf(d.node,"AdaptationSet").map(function(m){return kq(a,b,m)}).filter(Bb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.kh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
658
- }d=c.filter(function(m){return!m.Qe});c=c.filter(function(m){return m.Qe});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Qe.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={ed:h.ed},l=k.next())h.ed=l.value,h.ed.trickModeVideo=e.streams.find(function(m){return function(p){return yd(m.ed.codecs)==yd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:lq(d,"audio");g=a.g.disableVideo?[]:lq(d,"video");f=a.g.disableText?
659
- []:lq(d,Ib);c=a.g.disableThumbnails?[]:lq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.ra.id,hd:d,Ld:e,textStreams:g,imageStreams:f}}
660
- function lq(a,b){return a.filter(function(c){return c.contentType==b})}
661
- function kq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.va=iq(c,b.ra,null);var e=!1,f=Xf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(Bb),h=void 0,k=b.va.contentType==Ib;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
595
+ function No(a,b){var c=Oo(a,b,"timescale"),d=1;c&&(d=jg(c)||1);var e=Oo(a,b,"duration");c=jg(e||"");"image"==a.L.contentType&&(c=lg(e||""));c&&(c/=d);var f=Oo(a,b,"startNumber");e=Number(Oo(a,b,"presentationTimeOffset"))||0;var g=kg(f||"");if(null==f||null==g)g=1;f=Po(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.Z.duration||Infinity;f=Xf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=eg(m,"t",kg),t=eg(m,"d",kg);m=eg(m,"r",ig);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
596
+ m)if(p){p=eg(p,"t",kg);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Bh:n}),n=k}b=h}return{timescale:d,ya:c,rc:g,rb:e/d||0,We:e,timeline:b}}function Oo(a,b,c){return[b(a.L),b(a.wa),b(a.ra)].filter(Bb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
597
+ function Po(a,b,c){return[b(a.L),b(a.wa),b(a.ra)].filter(Bb).map(function(d){return Wf(d,c)}).reduce(function(d,e){return d||e})}
598
+ function Qo(a,b,c,d,e,f){for(var g=ag(a,"http://www.w3.org/1999/xlink","href"),h=ag(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return cf(new P(2,4,4028));if("onLoad"!=h)return cf(new P(2,4,4027));var m=Cb([d],[g]);return e.request(0,rf(m,b)).na(function(p){p=pg(p.data,a.tagName);if(!p)return cf(new P(2,4,4001,g));
599
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Ro(a,b,c,m[0],e,f+1)})}
600
+ function Ro(a,b,c,d,e,f){f=void 0===f?0:f;if(ag(a,"http://www.w3.org/1999/xlink","href")){var g=Qo(a,b,c,d,e,f);c&&(g=g.na(void 0,function(){return Ro(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==ag(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Ro(k,b,c,d,e,f)));return gf(g).na(function(){return a})};function So(a,b,c,d,e,f,g){var h,k=(new Lf).X("sidx",function(l){h=To(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new P(2,3,3004);}
601
+ function To(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.R();if(0==k)throw new P(2,3,3005);if(0==g.version){var l=g.reader.R();var m=g.reader.R()}else l=g.reader.qc(),m=g.reader.qc();g.reader.skip(2);var p=g.reader.we();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.R(),t=(n&2147483648)>>>31;n&=2147483647;var y=g.reader.R();g.reader.skip(4);if(1==t)throw new P(2,3,3006);h.push(new yi(l/k+c,(l+y)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=y;a+=n}g.parser.stop();return h};function Uo(a){this.h=Hc(a);this.g=new If(this.h,0)}Uo.prototype.Da=function(){return this.g.Da()};
602
+ function Vo(a){var b=Wo(a);if(7<b.length)throw new P(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Wo(a);a:{d=r(Xo);for(var e=d.next();!e.done;e=d.next())if(Cc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.oa();else{if(8==b.length&&b[1]&224)throw new P(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.oa()+b<=a.h.byteLength?b:a.h.byteLength-a.g.oa();d=Hc(a.h,a.g.oa(),b);a.g.skip(b);return new Yo(c,
603
+ d)}function Wo(a){var b=a.g.oa(),c=a.g.qb();if(0==c)throw new P(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Ec(a.h,b,c)}var Xo=[[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 Yo(a,b){this.id=a;this.g=b}
604
+ function Zo(a){if(8<a.g.byteLength)throw new P(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new P(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 $o(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Uo(a.g);for(var p=null,n=null;a.Da();){var t=Vo(a);if(187==t.id){var y=ap(t);y&&(t=c*y.Ch,y=b+y.jh,null!=p&&m.push(new yi(p+g,t+g,l,n,y-1,f,g,h,k)),p=t,n=y)}}null!=p&&m.push(new yi(p+g,d+g,l,n,null,f,g,h,k));return m}
605
+ function ap(a){var b=new Uo(a.g);a=Vo(b);if(179!=a.id)throw new P(2,3,3013);a=Zo(a);b=Vo(b);if(183!=b.id)throw new P(2,3,3012);b=new Uo(b.g);for(var c=0;b.Da();){var d=Vo(b);if(241==d.id){c=Zo(d);break}}return{Ch:a,jh:c}};function bp(a,b){b=Po(a,b,"Initialization");if(!b)return null;var c=a.L.Pa,d=b.getAttribute("sourceURL");d&&(c=Cb(a.L.Pa,[d]));d=0;var e=null;if(b=eg(b,"range",hg))d=b.start,e=b.end;return new wi(function(){return c},d,e,cp(a))}
606
+ function dp(a,b){var c=Number(Oo(a,ep,"presentationTimeOffset"))||0,d=Oo(a,ep,"timescale"),e=1;d&&(e=jg(d)||1);var f=c/e||0,g=bp(a,ep);fp(a,g);var h=kf(a);return{bc:function(){var k=Po(h,ep,"RepresentationIndex"),l=h.L.Pa;k&&(k=k.getAttribute("sourceURL"))&&(l=Cb(h.L.Pa,[k]));k=ip(h);return jp(h,b,g,l,k.start,k.end,f)}}}
607
+ function jp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,C,z,D,G;return K(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.xb||!a.Z.Ff,l=a.Z.start,m=a.Z.duration,p=a.L.mimeType.split("/")[1],n=b,t=null,y=[n(d,e,f),"webm"==p?n(c.Ra(),c.Va,c.Ca):null],n=null,A(F,Promise.all(y),2);x=F.h;v=x[0];w=x[1]||null;C=null;z=l-g;D=l;G=m?l+m:Infinity;if("mp4"==p)var H=So(v,e,d,c,z,D,G);else{H=new Uo(w);if(440786851!=Vo(H).id)throw new P(2,3,3008);var I=Vo(H);if(408125543!=I.id)throw new P(2,3,3009);H=I.g.byteOffset;
608
+ I=new Uo(I.g);for(var L=null;I.Da();){var N=Vo(I);if(357149030==N.id){L=N;break}}if(!L)throw new P(2,3,3010);L=new Uo(L.g);N=1E6;for(I=null;L.Da();){var V=Vo(L);if(2807729==V.id)N=Zo(V);else if(17545==V.id)if(4==V.g.byteLength)I=V.g.getFloat32(0);else if(8==V.g.byteLength)I=V.g.getFloat64(0);else throw new P(2,3,3003);}if(null==I)throw new P(2,3,3011);L=N/1E9;I*=L;N=Vo(new Uo(v));if(475249515!=N.id)throw new P(2,3,3007);H=$o(N,H,L,I,d,c,z,D,G)}C=H;h.mc(C);t=new Dj(C);k&&t.yb(D,G,!0);return F.return(t)})}
609
+ function ep(a){return a.Xc}function ip(a){var b=Po(a,ep,"RepresentationIndex");a=Oo(a,ep,"indexRange");a=hg(a||"");b&&(a=eg(b,"range",hg,a));return a}function fp(a,b){kp(a,b);if(!ip(a))throw new P(2,4,4002);}function kp(a,b){var c=a.L.mimeType.split("/")[1];if(a.L.contentType!=Ib&&"mp4"!=c&&"webm"!=c)throw new P(2,4,4006);if("webm"==c&&!b)throw new P(2,4,4005);}
610
+ function cp(a){var b=a.L;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.xd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function lp(a,b){var c=bp(a,mp),d=np(a);if(!d.ya&&!d.timeline&&1<d.kc.length)throw new P(2,4,4002);if(!d.ya&&!a.Z.duration&&!d.timeline&&1==d.kc.length)throw new P(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new P(2,4,4002);var e=null,f=null;a.ra.id&&a.L.id&&(f=b[a.ra.id+","+a.L.id])&&(e=f.segmentIndex);var g=op(a.Z.start,a.Z.duration,a.L.Pa,d,c);b=!e;e?e.lc(g,a.presentationTimeline.ob()):e=new Dj(g);a.presentationTimeline.mc(g);a.xb&&a.Z.Ff||e.yb(a.Z.start,a.Z.duration?a.Z.start+a.Z.duration:
611
+ Infinity,b);f&&(f.segmentIndex=e);return{bc:function(){e&&0!=e.M.length||e.Sc(g);return Promise.resolve(e)}}}function mp(a){return a.Db}function np(a){var b=pp(a);a=No(a,mp);var c=a.rc;0==c&&(c=1);var d=0;a.ya?d=a.ya*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ya:a.ya,startTime:d,rc:c,rb:a.rb,timeline:a.timeline,kc:b}}
612
+ function op(a,b,c,d,e){var f=d.kc.length;d.timeline&&d.timeline.length!=d.kc.length&&(f=Math.min(d.timeline.length,d.kc.length));for(var g=a-d.rb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={Sd:m.Sd},p++){var n=d.kc[p];m.Sd=Cb(c,[n.$g]);var t=void 0;t=null!=d.ya?l+d.ya:d.timeline?d.timeline[p].end:l+b;k.push(new yi(a+l,a+t,function(y){return function(){return y.Sd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
613
+ function pp(a){return[a.L.Db,a.wa.Db,a.ra.Db].filter(Bb).map(function(b){return Xf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Df&&(a.Df=!0);var c=b.getAttribute("media");b=eg(b,"mediaRange",hg,{start:0,end:null});return{$g:c,start:b.start,end:b.end}})};function qp(a,b,c,d,e,f){var g=rp(a),h=sp(a);tp(h);var k=kf(a);if(h.Oc)return kp(a,g),{bc:function(){var t=Mo(h.Oc,k.L.id,null,k.bandwidth||null,null);t=Cb(k.L.Pa,[t]);return jp(k,b,g,t,0,null,h.rb)}};if(h.ya)return d||"image"===a.wa.contentType||(a.presentationTimeline.qe(h.ya),a.presentationTimeline.re(a.Z.start)),{bc:function(){return up(k,h,e,g,f)}};var l=null;d=d=null;a.ra.id&&a.L.id&&(d=a.ra.id+","+a.L.id,d=c[d])&&(l=d.segmentIndex);var m=vp(k,h,g);c=a.Z.start;var p=a.Z.duration?a.Z.start+a.Z.duration:
614
+ Infinity,n=Infinity!=p;l?(n&&(new Dj(m)).yb(c,p,!0),l.lc(m,a.presentationTimeline.ob())):l=new Dj(m);a.presentationTimeline.mc(m);n&&l.yb(c,p);d&&a.xb&&(d.segmentIndex=l);return{bc:function(){l&&0!=l.M.length||l.Sc(m);return Promise.resolve(l)}}}function wp(a){return a.Yc}function sp(a){var b=No(a,wp),c=Oo(a,wp,"media");a=Oo(a,wp,"index");return{ya:b.ya,timescale:b.timescale,rc:b.rc,rb:b.rb,We:b.We,timeline:b.timeline,oe:c,Oc:a}}
615
+ function tp(a){var b=a.Oc?1:0;b+=a.timeline?1:0;b+=a.ya?1:0;if(0==b)throw new P(2,4,4002);1!=b&&(a.Oc&&(a.timeline=null),a.ya=null);if(!a.Oc&&!a.oe)throw new P(2,4,4002);}
616
+ function up(a,b,c,d,e){function f(L){var N=(L-t)*n,V=N+b.rb,aa=N+l;N=aa+n;var ea=Math.min(N,h());aa=new yi(aa,ea,function(){var la=Mo(x,w,L,v,V*y);return Cb(C,[la])},0,null,d,z,l,h());aa.j=N;return aa}function g(){var L=[Math.max(k.ob(),l),Math.min(k.Jb(),h())].map(function(N){return N-l});return[Math.ceil(L[0]/n),Math.ceil(L[1]/n)-1].map(function(N){return N+t})}function h(){var L=null!=m&&e[m]||p;return L?l+L:Infinity}var k=a.presentationTimeline,l=a.Z.start,m=a.ra.id,p=a.Z.duration,n=b.ya,t=b.rc,
617
+ y=b.timescale,x=b.oe,v=a.bandwidth||null,w=a.L.id,C=a.L.Pa,z=l-b.rb,D=g();a=a.xb?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var G=a;G<=D;++G){var F=f(G);c.push(F)}var H=new Dj(c);c=k.Jb()<h();G=k.U();if(c||G){var I=Math.max(a,D+1);H.Jd(n,function(){var L=k.ob();H.Hb(L);var N=r(g());N.next();N=N.next().value;for(var V=[];I<=N;){var aa=f(I);V.push(aa);I++}return L>h()&&!V.length?null:V})}return Promise.resolve(H)}
618
+ function vp(a,b,c){var d=a.Z.start,e=a.Z.duration,f=d-b.rb;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={Rd:h.Rd,Vd:h.Vd,Yd:h.Yd,Od:h.Od,$d:h.$d,Pd:h.Pd},k++){var l=b.timeline[k],m=l.start,p=l.Bh;l=l.end;h.Yd=k+b.rc;h.$d=p+b.We;h.Vd=a.L.id;h.Od=a.bandwidth||null;h.Rd=b.oe;h.Pd=a.L.Pa;g.push(new yi(d+m,d+l,function(n){return function(){var t=Mo(n.Rd,n.Vd,n.Yd,n.Od||null,n.$d);return Cb(n.Pd,[t]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
619
+ function rp(a){var b=Oo(a,wp,"initialization");if(!b)return null;var c=a.L.id,d=a.bandwidth||null,e=a.L.Pa;return new wi(function(){var f=Mo(b,c,null,d,null);return Cb(e,[f])},0,null,cp(a))};function xp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}xp.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
620
+ function yp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la,Ba,Ia;return K(function(Ja){switch(Ja.g){case 1:d=Jb;zp(b);Ap(b);Bp(b);Cp(b);if(!c&&1==b.length){e=b[0];a.g=e.jd;a.h=e.Ld;a.j=e.textStreams;a.i=e.imageStreams;Ja.D(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ja.return();k=b.map(function(Na){return Na.jd});l=b.map(function(Na){return Na.Ld});m=b.map(function(Na){return Na.textStreams});p=b.map(function(Na){return Na.imageStreams});
621
+ n=r(m);for(t=n.next();!t.done;t=n.next())y=t.value,y.push(Dp(d.ha));x=r(p);for(v=x.next();!v.done;v=x.next())w=v.value,w.push(Dp(d.Bc));return A(Ja,Ep(a.g,k,f,Fp,Gp),3);case 3:return A(Ja,Ep(a.h,l,f,Fp,Gp),4);case 4:return A(Ja,Ep(a.j,m,f,Fp,Gp),5);case 5:return A(Ja,Ep(a.i,p,f,Fp,Gp),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(L=r(a.g),N=L.next();!N.done;N=L.next())for(V=N.value,aa=r(a.h),ea=aa.next();!ea.done;ea=aa.next())la=ea.value,Ba=bh(V.drmInfos,la.drmInfos),V.drmInfos.length&&la.drmInfos.length&&
622
+ !Ba.length||(Ia=C++,z.push({id:Ia,language:V.language,primary:V.primary,audio:V,video:la,bandwidth:(V.bandwidth||0)+(la.bandwidth||0),drmInfos:Ba,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=a.h.concat(a.g),G=r(D),F=G.next();!F.done;F=G.next())H=F.value,I=C++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.Gb?H:null,video:H.type==d.La?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
623
+ a.l=z;B(Ja)}})}function zp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.jd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&ec(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.jd=c}}
624
+ function Bp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&ec(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
625
+ function Ap(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Ld),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&ec(e.roles,h.roles)&&Hf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Ld=c}}
626
+ function Cp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
627
+ function Hp(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V;return K(function(aa){switch(aa.g){case 1:b=Jb;if(1==a.length)return aa.return(a[0]);c=a.map(function(ea){return ea.filter(function(la){return la.type==b.Gb})});d=a.map(function(ea){return ea.filter(function(la){return la.type==b.La})});e=a.map(function(ea){return ea.filter(function(la){return la.type==b.ha})});f=a.map(function(ea){return ea.filter(function(la){return la.type==b.Bc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=
628
+ h.value,k.push(Ip(b.ha));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(Ip(b.Bc));return A(aa,Ep([],c,0,Jp,Kp),2);case 2:return n=aa.h,A(aa,Ep([],d,0,Jp,Kp),3);case 3:return t=aa.h,A(aa,Ep([],e,0,Jp,Kp),4);case 4:return y=aa.h,A(aa,Ep([],f,0,Jp,Kp),5);case 5:x=aa.h;v=0;if(t.length&&n.length)for(G=r(n),F=G.next();!F.done;F=G.next())for(H=F.value,I=r(t),L=I.next();!L.done;L=I.next())N=L.value,V=v++,N.variantIds.push(V),H.variantIds.push(V);else for(w=t.concat(n),C=r(w),z=C.next();!z.done;z=
629
+ C.next())D=z.value,D.variantIds=[v++];return aa.return(t.concat(n).concat(y).concat(x))}})}
630
+ function Ep(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L;return K(function(N){switch(N.g){case 1:f=Jb;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){N.D(4);break}m=l.value;return A(N,Lp(m,b,c,e,g),5);case 5:p=N.h;if(!p)throw new P(2,4,4037);l=k.next();N.D(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(y=t.value,x=r(y),v=x.next();!v.done;v=x.next())w=v.value,(C=Mp(w,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
631
+ z.next())for(D=t.value,G={},F=r(D),v=F.next();!v.done;G={vb:G.vb},v=F.next())if(G.vb=v.value,H=G.vb.type==f.ha&&!G.vb.language,I=G.vb.type==f.Bc&&!G.vb.tilesLayout,!H&&!I&&(L=a.some(function(V){return function(aa){return aa.mimeType==V.vb.mimeType&&yd(aa.codecs)==yd(V.vb.codecs)}}(G))))throw new P(2,4,4037);return N.return(a)}})}
632
+ function Lp(a,b,c,d,e){return K(function(f){if(1==f.g)return Np(b,a),a.matchedStreams?a.segmentIndex?A(f,Op(a,c),2):f.D(2):f.return(!1);Pp(a,c,d,e);return f.return(!0)})}
633
+ function Op(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return A(l,Promise.all(c),2)}if(a.segmentIndex instanceof Gj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);B(l)})}
634
+ function Mp(a,b,c,d,e){var f=c(a);Np(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.D(0);f.segmentIndex=new Gj;return A(g,Op(f,0),0)})});if(!f.matchedStreams)return null;Pp(f,0,d,e);return f}function Pp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==Sb(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
635
+ function Fp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
636
+ function Jp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
637
+ function Gp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ja(f),ja(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=bh(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new P(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
638
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Fp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Gp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Gp(a.trickModeVideo,b)}
639
+ function Kp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ja(a.keyIds),ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
640
+ function Np(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Qp,video:Qp,text:Rp,image:Sp}[e.type],g={audio:Tp,video:Up,text:Vp,image:Wp}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function Qp(a,b){var c;!(c=b.mimeType!=a.mimeType||yd(b.codecs)!=yd(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<bh(a,b).length:1));return c?!1:!0}
641
+ function Rp(a,b){return a.language?b.language?0==Sb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Sp(a){return a.tilesLayout?!0:!1}
642
+ function Tp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
643
+ d=Xp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Yp)return!0;if(d==Zp)return!1;d=Xp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Yp?!0:d==Zp?!1:a.bandwidth&&$p(a.bandwidth,b.bandwidth,c.bandwidth)==Yp?!0:!1}
644
+ function Up(a,b,c){if(a.id==c.id)return!0;var d=Xp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Yp)return!0;if(d==Zp)return!1;if(a.frameRate){d=Xp(a.frameRate,b.frameRate,c.frameRate);if(d==Yp)return!0;if(d==Zp)return!1}return a.bandwidth&&$p(a.bandwidth,b.bandwidth,c.bandwidth)==Yp?!0:!1}
645
+ function Vp(a,b,c){if(a.id==c.id)return!0;var d=Sb(a.language,b.language),e=Sb(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
646
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Wp(a,b,c){return a.id==c.id?!0:Xp(a.width*a.height,b.width*b.height,c.width*c.height)==Yp?!0:!1}function Ip(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
647
+ function Dp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
648
+ function Xp(a,b,c){if(b==a&&a!=c)return Zp;if(c==a&&a!=b)return Yp;if(b>a){if(c<=a||c-a<b-a)return Yp;if(c-a>b-a)return Zp}else{if(c>a)return Zp;if(a-c<a-b)return Yp;if(a-c>a-b)return Zp}return aq}function $p(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Yp:b<a?Zp:aq}var Yp=1,aq=0,Zp=-1;function bq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.I=1;this.l={};this.N={};this.j=new xp;this.H=0;this.J=new $b(5);this.G=new Q(function(){cq(a)});this.A=new lf;this.B=null;this.K=[];this.C=Infinity;this.F=!1}q=bq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.F=b.isLowLatencyMode(),c.m=[a],c.h=b,A(e,dq(c),2);d=e.h;c.h&&eq(c,d);if(!c.h)throw new P(2,7,7001);return e.return(c.i)})};
649
+ q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.G&&(this.G.stop(),this.G=null);return this.A.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return E(c,2),A(c,dq(a),4);if(2!=c.g)return va(c,0);b=J(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
650
+ function dq(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=rf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),mf(a.A,e),A(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return A(k,fq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.J.sample(1,h);return k.return(h)})}
651
+ function fq(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=pg(b,"MPD");if(!d)throw new P(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(gq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Ro(d,a.g.retryParameters,f,c,a.h.networkingEngine);mf(a.A,g);return A(k,g.promise,2)}h=k.h;return k.return(gq(a,h,c))})}
652
+ function gq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la,Ba,Ia,Ja,Na;return K(function(Oa){switch(Oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Xf(b,"Location").map(cg).filter(Bb);0<f.length&&(g=Cb(e,f),e=a.m=g);h=Xf(b,"BaseURL");k=h.map(cg);l=Cb(e,k);m=0;h&&h.length&&(m=eg(h[0],"availabilityTimeOffset",lg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=eg(b,"minBufferTime",gg)||0);a.H=eg(b,"minimumUpdatePeriod",gg,-1);t=eg(b,"availabilityStartTime",fg);y=eg(b,
653
+ "timeShiftBufferDepth",gg);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=eg(b,"suggestedPresentationDelay",gg));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=eg(b,"maxSegmentDuration",gg));z=b.getAttribute("type")||"static";if(a.i)for(D=a.i.presentationTimeline,G=r(Object.values(a.l)),F=G.next();!F.done;F=G.next())H=F.value,H.segmentIndex&&H.segmentIndex.Hb(D.ob());else I=a.g.defaultPresentationDelay||1.5*n,L=null!=v?v:I,D=new R(t,L,a.g.dash.autoCorrectDrift);D.Zc("static"==z);(N=D.U())&&
654
+ !isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);D.Le(y);V=b.getAttribute("profiles")||"";aa={xb:"static"!=z,presentationTimeline:D,ra:null,Z:null,wa:null,L:null,bandwidth:0,Df:!1,$b:m,profiles:V.split(",")};ea=hq(a,aa,l,b);la=ea.duration;Ba=ea.periods;"static"!=z&&ea.tf||D.Ua(la||Infinity);a.C&&!a.F&&(Ia=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.F=a.h.isLowLatencyMode());a.F?D.Mf(a.C):a.C&&Ua("Low-latency DASH 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.");
655
+ D.qe(C||1);return A(Oa,yp(a.j,Ba,aa.xb),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Oa.D(3);break}a.i={presentationTimeline:D,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!D.Uf()){Oa.D(4);break}Ja=Xf(b,"UTCTiming");return A(Oa,iq(a,l,Ja),5);case 5:Na=Oa.h;if(!a.h)return Oa.return();D.Nf(Na);case 4:D.le();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),B(Oa)}})}
656
+ function hq(a,b,c,d){var e=eg(d,"mediaPresentationDuration",gg),f=[],g=0;d=Xf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=eg(k,"start",gg,g),p=k.id,n=eg(k,"duration",gg),t=null;if(l){var y=eg(l,"start",gg);null!=y&&(t=y-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.B&&null!==p&&null!==m&&m<a.B)||a.K.includes(p)||h+1==d.length){null!==m&&(null===a.B||m>a.B)&&(a.B=m);g=jq(a,b,c,{start:m,duration:t,node:k,Ff:null==t||!l});f.push(g);b.ra.id&&t&&(a.N[b.ra.id]=t);if(null==t){g=
657
+ null;break}g=m+t}}a.K=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,tf:!1}:{periods:f,duration:g,tf:!0}}
658
+ function jq(a,b,c,d){b.ra=kq(d.node,null,c);b.Z=d;b.ra.$b=b.$b;b.ra.id||(b.ra.id="__shaka_period_"+d.start);var e=Xf(d.node,"EventStream");c=b.presentationTimeline.ob();e=r(e);for(var f=e.next();!f.done;f=e.next())lq(a,d.start,d.duration,f.value,c);c=Xf(d.node,"AdaptationSet").map(function(m){return mq(a,b,m)}).filter(Bb);if(b.xb){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.mh);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new P(2,4,4018);
659
+ }d=c.filter(function(m){return!m.Se});c=c.filter(function(m){return m.Se});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Se.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={fd:h.fd},l=k.next())h.fd=l.value,h.fd.trickModeVideo=e.streams.find(function(m){return function(p){return yd(m.fd.codecs)==yd(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:nq(d,"audio");g=a.g.disableVideo?[]:nq(d,"video");f=a.g.disableText?
660
+ []:nq(d,Ib);c=a.g.disableThumbnails?[]:nq(d,"image");if(!g.length&&!e.length)throw new P(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ja(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ja(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ja(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ja(h.value.streams));return{id:b.ra.id,jd:d,Ld:e,textStreams:g,imageStreams:f}}
661
+ function nq(a,b){return a.filter(function(c){return c.contentType==b})}
662
+ function mq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.wa=kq(c,b.ra,null);var e=!1,f=Xf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(Bb),h=void 0,k=b.wa.contentType==Ib;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
662
663
  l}}var p;m=Xf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Xf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
663
- 10)));m=Xf(c,"Accessibility");var x=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var y=r(t),v=y.next();!v.done;v=y.next()){var w=v.value,A=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],A=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,A=w);x.set(v,Mb(A))}}else x.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
664
- 1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=y=void 0,v.includes("=")?(v=v.split("="),y="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,w=v),x.set(y,Mb(w));else x.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Xf(c,"ContentProtection");var z=Ao(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),D=Mb(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Xf(c,"Label"))&&l.length&&
665
- (l=l[0],l.textContent&&(G=l.textContent));l=Xf(c,"Representation");c=l.map(function(F){if(F=mq(a,b,z,h,D,G,e,g,x,F))F.hdr=F.hdr||p;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.va.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.va.contentType||"application"==b.va.contentType)for(b.va.contentType=nq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.va.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
666
- m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ja(t.keyIds),ja(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(Bb);return{id:b.va.id||"__fake__"+a.I++,contentType:b.va.contentType,language:D,cj:e,streams:c,drmInfos:z.drmInfos,Qe:f,kh:k}}
667
- function mq(a,b,c,d,e,f,g,h,k,l){b.L=iq(l,b.va,null);a.C=Math.min(a.C,b.L.$b);if(!oq(b.L))return null;var m=b.Z.start;b.bandwidth=eg(l,"bandwidth",jg)||0;var p=b.L.contentType,n=p==Ib||"application"==p;p="image"==p;try{var t=function(H,J,L){return pq(a,H,J,L)};if(b.L.Wc)var x=bp(b,t);else if(b.L.Db)x=jp(b,a.l);else if(b.L.Xc)x=op(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var y=b.L.Na,v=b.Z.duration||0;x={bc:function(){return Promise.resolve(Dj(m,v,y))}}}}catch(H){if((n||p)&&4002==H.code)return null;
668
- throw H;}t=Xf(l,"ContentProtection");t=Do(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Xf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var A=!1;n&&(A=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Xf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
669
- (z=l.getAttribute("value")),!z))return null;var D;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(D="PQ");var G=b.L.id?b.ra.id+","+b.L.id:"",F={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,J,L;return K(function(N){if(1==N.g){J=(H=G&&b.xb&&a.l[G])?a.l[G]:F;if(J.segmentIndex)return N.D(0);L=J;return B(N,x.bc(),3)}L.segmentIndex=N.h;C(N)})},closeSegmentIndex:function(){F.segmentIndex&&
670
- (F.segmentIndex.release(),F.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.va.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:A,channelsCount:b.L.xd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
671
- hdr:D,tilesLayout:z,matchedStreams:[]};G&&b.xb&&!a.l[G]&&(a.l[G]=F);return F}function aq(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,E(d,2),B(d,bq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=I(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();cq(a,b);C(d)}})}function cq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,ac(a.J)))}
672
- function iq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xd:null,audioSamplingRate:null,$b:0};c=c||b.Na;var d=Xf(a,"BaseURL"),e=d.map(cg),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=eg(a,"frameRate",mg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Xf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
673
- m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Xf(a,"AudioChannelConfiguration");m=qq(m)||b.xd;n=eg(a,"audioSamplingRate",kg)||b.audioSamplingRate;f||(f=nq(g,h));var t=Wf(a,"SegmentBase"),x=Wf(a,"SegmentTemplate"),y=t?eg(t,"availabilityTimeOffset",lg)||0:0,v=x?eg(x,"availabilityTimeOffset",lg)||0:0;d=d&&d.length?eg(d[0],"availabilityTimeOffset",lg)||0:0;d=b.$b+d+y+v;return{Na:Cb(c,e),Wc:t||b.Wc,Db:Wf(a,"SegmentList")||b.Db,Xc:x||b.Xc,width:eg(a,"width",kg)||b.width,height:eg(a,
664
+ 10)));m=Xf(c,"Accessibility");var y=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var x=r(t),v=x.next();!v.done;v=x.next()){var w=v.value,C=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,C=w);y.set(v,Mb(C))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
665
+ 1,null!=t)for(t=r(t.split(";")),v=t.next();!v.done;v=t.next())v=v.value,w=x=void 0,v.includes("=")?(v=v.split("="),x="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(x="svc"+n,n++,w=v),y.set(x,Mb(w));else y.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Xf(c,"ContentProtection");var z=Co(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),D=Mb(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Xf(c,"Label"))&&l.length&&
666
+ (l=l[0],l.textContent&&(G=l.textContent));l=Xf(c,"Representation");c=l.map(function(F){if(F=oq(a,b,z,h,D,G,e,g,y,F))F.hdr=F.hdr||p;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.wa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new P(2,4,4003);}if(!b.wa.contentType||"application"==b.wa.contentType)for(b.wa.contentType=pq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.wa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
667
+ m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ja(t.keyIds),ja(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(Bb);return{id:b.wa.id||"__fake__"+a.I++,contentType:b.wa.contentType,language:D,ej:e,streams:c,drmInfos:z.drmInfos,Se:f,mh:k}}
668
+ function oq(a,b,c,d,e,f,g,h,k,l){b.L=kq(l,b.wa,null);a.C=Math.min(a.C,b.L.$b);if(!qq(b.L))return null;var m=b.Z.start;b.bandwidth=eg(l,"bandwidth",jg)||0;var p=b.L.contentType,n=p==Ib||"application"==p;p="image"==p;try{var t=function(H,I,L){return rq(a,H,I,L)};if(b.L.Xc)var y=dp(b,t);else if(b.L.Db)y=lp(b,a.l);else if(b.L.Yc)y=qp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.N);else{var x=b.L.Pa,v=b.Z.duration||0;y={bc:function(){return Promise.resolve(Fj(m,v,x))}}}}catch(H){if((n||p)&&4002==H.code)return null;
669
+ throw H;}t=Xf(l,"ContentProtection");t=Fo(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Xf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var C=!1;n&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Xf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
670
+ (z=l.getAttribute("value")),!z))return null;var D;l=b.L.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(D="PQ");var G=b.L.id?b.ra.id+","+b.L.id:"",F={id:a.I++,originalId:b.L.id,createSegmentIndex:function(){var H,I,L;return K(function(N){if(1==N.g){I=(H=G&&b.xb&&a.l[G])?a.l[G]:F;if(I.segmentIndex)return N.D(0);L=I;return A(N,y.bc(),3)}L.segmentIndex=N.h;B(N)})},closeSegmentIndex:function(){F.segmentIndex&&
671
+ (F.segmentIndex.release(),F.segmentIndex=null)},segmentIndex:null,mimeType:b.L.mimeType,codecs:b.L.codecs,frameRate:b.L.frameRate,pixelAspectRatio:b.L.pixelAspectRatio,bandwidth:b.bandwidth,width:b.L.width,height:b.L.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.wa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.L.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.L.xd,audioSamplingRate:b.L.audioSamplingRate,spatialAudio:w,closedCaptions:k,
672
+ hdr:D,tilesLayout:z,matchedStreams:[]};G&&b.xb&&!a.l[G]&&(a.l[G]=F);return F}function cq(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,E(d,2),A(d,dq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=J(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();eq(a,b);B(d)}})}function eq(a,b){0>a.H||a.G.S(Math.max(3,a.H-b,ac(a.J)))}
673
+ function kq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,xd:null,audioSamplingRate:null,$b:0};c=c||b.Pa;var d=Xf(a,"BaseURL"),e=d.map(cg),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=eg(a,"frameRate",mg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Xf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
674
+ m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Xf(a,"AudioChannelConfiguration");m=sq(m)||b.xd;n=eg(a,"audioSamplingRate",kg)||b.audioSamplingRate;f||(f=pq(g,h));var t=Wf(a,"SegmentBase"),y=Wf(a,"SegmentTemplate"),x=t?eg(t,"availabilityTimeOffset",lg)||0:0,v=y?eg(y,"availabilityTimeOffset",lg)||0:0;d=d&&d.length?eg(d[0],"availabilityTimeOffset",lg)||0:0;d=b.$b+d+x+v;return{Pa:Cb(c,e),Xc:t||b.Xc,Db:Wf(a,"SegmentList")||b.Db,Yc:y||b.Yc,width:eg(a,"width",kg)||b.width,height:eg(a,
674
675
  "height",kg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),xd:m,audioSamplingRate:n,$b:d}}
675
- function qq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
676
- parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function oq(a){var b=a.Wc?1:0;b+=a.Db?1:0;b+=a.Xc?1:0;if(0==b)return a.contentType==Ib||"application"==a.contentType?!0:!1;1!=b&&(a.Wc&&(a.Db=null),a.Xc=null);return!0}
677
- function rq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=Cb(b,[c]),f=rf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),mf(a.A,g),B(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=dd(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
678
- function gq(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.D(4);break}h=g.value;E(p,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 p.D(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 p.D(8);
679
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return B(p,rq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return B(p,rq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
680
- 3);break;case 5:I(p);case 3:g=f.next();p.D(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}})}
681
- function jq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=eg(d,"timescale",kg)||1;d=r(Xf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=eg(k,"presentationTime",kg)||0,m=eg(k,"duration",kg)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
682
- function pq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=xf,f=Tj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),mf(a.A,h),B(l,h.promise,2);k=l.h;return l.return(k.data)})}function nq(a,b){return Cd(wd(a,b))?Ib:a.split("/")[0]}M("shaka.dash.DashParser",$p);hh.mpd=function(){return new $p};fh["application/dash+xml"]=function(){return new $p};fh["video/vnd.mpeg.dash.mpd"]=function(){return new $p};function sq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function tq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}tq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
683
- tq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function uq(a,b){a=a.getAttribute(b);if(!a)throw new P(2,4,4023,b);return a.value}function vq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function wq(a,b){this.name=a;this.value=b};function xq(a,b){return a.filter(function(c){return c.name==b})}function yq(a,b){return a.filter(function(c){return uq(c,"TYPE")==b})}function zq(a,b){a=xq(a,b);return a.length?a[0]:null}function Aq(a){var b=0;b=void 0===b?0:b;return(a=zq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function Bq(a,b){return Cb([a],[b])[0]};function Cq(a){this.h=a;this.g=0}function Dq(a){Eq(a,/[ \t]+/gm)}function Eq(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 Fq(a){return a.g==a.h.length?null:(a=Eq(a,/[^ \t\n]*/gm))?a[0]:null};function Gq(){this.g=0}
684
- function Hq(a,b,c){b=dd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new P(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Iq(a,g),--a.g,Jq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Iq(a,h);if(Kq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
685
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Iq(a,m),Jq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==W(m,"TYPE")?k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Bq(d,m.trim()),h&&g.push(h),e.push(new vq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new vq("",g,k)));return new sq(c,b,f,e)}f.push(h);
686
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new wq("URI",k)),e=!0)}}return new sq(c,b,f)}function Iq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new P(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Cq(d);var f;(f=Eq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Eq(d,g);)c.push(new wq(f[1],f[2]||f[3])),Dq(d)}return new tq(a,b,c,e)}
687
- var Jq="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".split(" "),Kq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Lq(){}function Mq(a){try{var b=Nq(a);return ef({uri:a,Gf:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return cf(c)}}function Nq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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=md(a):e=hd(a);return{data:e,contentType:c}}
688
- M("shaka.net.DataUriPlugin",Lq);Lq.parse=Mq;of("data",Mq);function Oq(){var a=this;this.g=this.i=null;this.za=1;this.A=new Map;this.C=new Map;this.ma=new Set;this.h=new Map;this.j=null;this.N="";this.$=new Gq;this.ea=0;this.T=!1;this.P=null;this.F=new Q(function(){Pq(a)});this.m=Qq;this.J=null;this.aa=0;this.H=Infinity;this.Y=this.ba=0;this.G=new lf;this.I=[];this.K=new Map;this.B=new Map;this.ua=new Map;this.l=!1}q=Oq.prototype;q.configure=function(a){this.g=a};
689
- q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),B(f,Rq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,B(f,Sq(c,d.data,a),3);e=c.ea;0<e&&c.F.S(e);return f.return(c.J)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ma.clear();this.J=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
690
- q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==Qq)return h.return();b=[];c=Array.from(a.h.values());return c.length?B(h,Tq(a,c[0]),2):h.D(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Tq(a,c[d]));return B(h,Promise.all(b),4)}Uq(a);e=c.some(function(k){return 0==k.yf});e||(f=Vq,Wq(a,f.Xf),g=c.map(function(k){return k.Pc}),a.j.bb(Math.min.apply(Math,ja(g))),a.i.updateDuration());C(h)})};
691
- function Tq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(x){if(1==x.g)return c=b.Yf,d=new lb(c),a.l&&b.dg&&ob(d,new qb("_HLS_skip=YES")),B(x,Rq(a,d.toString()),2);e=x.h;f=Hq(a.$,e.data,e.uri);if(1!=f.type)throw new P(2,4,4017);g=xq(f.g,"EXT-X-DEFINE");h=Xq(a,g);k=b.stream;l=Yq(a,f,k.type,b.Qc,h);a.I.push(l);k.segmentIndex.lc(l,a.j.mb());l.length&&(m=Aq(f.g),p=b.Qc.get(m),k.segmentIndex.Hb(p));n=l[l.length-1];if(t=zq(f.g,"EXT-X-ENDLIST"))b.yf=!0,b.Pc=n.endTime;C(x)})}q.onExpirationUpdated=function(){};
692
- function Zq(a){if(!a.T){for(var b=-1,c=new Map,d=r(a.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.M[0]||null))for(var g=r(e.Qc),h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.P=b;b=r(a.h.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.P-c.get(d),e.M.splice(0,f),(e=e.M[0]||null)&&$q(d,-e.startTime);a.T=!0}}}
693
- function ar(a){if(!a.T){for(var b=Infinity,c=r(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.M[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=r(a.h.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.M[0]||null,null==e.g?Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Kd,"Expect AV sync issues!"):$q(d,e.g-b-e.startTime))}a.T=!0}}}
694
- function $q(a,b){a.stream.segmentIndex.offset(b);a.Pc+=b;for(var c=r(a.Qc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.Qc.set(d,e+b)}}
695
- function Sq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,A,z,D,G,F,H,J,L,N,T,aa,ea,ka,Ba,Ia,Ja,Na,Oa,Sc,Tc,vc,Jd,Db,Ke,Uc,Kd;return K(function(Va){switch(Va.g){case 1:d=Hq(a.$,b,a.N);e=xq(d.g,"EXT-X-DEFINE");br(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,F=G.split(";")[0],H=F.split("/")[0],J=Ad(G),L=new Map,B(Va,cr(a,d,c,c,J,H,"",!0,"Media Playlist",null,L,null,!1,!1,F),8);k=xq(d.g,"EXT-X-MEDIA");l=xq(d.g,"EXT-X-STREAM-INF");m=xq(d.g,"EXT-X-IMAGE-STREAM-INF");dr(a,l);p=
696
- xq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(x=t.value,y=W(x,"DATA-ID"),v=W(x,"URI"),w=W(x,"LANGUAGE"),A=W(x,"VALUE"),z=(new Map).set("id",y),v&&z.set("uri",Bq(a.N,v)),w&&z.set("language",w),A&&z.set("value",A),D=new O("sessiondata",z),a.i)a.i.onEvent(D);return B(Va,er(a,k),4);case 4:return fr(a,k),B(Va,gr(a,l),5);case 5:return f=Va.h,B(Va,hr(a,k),6);case 6:return g=Va.h,B(Va,ir(a,m),7);case 7:h=Va.h;Va.D(3);break;case 8:N=Va.h,a.h.set(c,N),f.push({id:0,language:"und",
697
- disabledUntilTime:0,primary:!0,audio:"audio"==H?N.stream:null,video:"video"==H?N.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new P(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Zq(a):ar(a);T=Infinity;aa=r(a.h.values());for(ea=aa.next();!ea.done;ea=aa.next())ka=ea.value,"text"!=ka.stream.type&&(T=Math.min(T,ka.Pc));a.m!=Qq?(a.j=new R(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.aa),a.j.Yc(!1)):(a.j=new R(null,
698
- 0),a.j.Yc(!0));if(a.m!=Qq)a.ea=a.H,Ba=Vq,a.m==Ba.$e&&(Ia=a.j.Ed,isNaN(a.g.availabilityWindowOverride)||(Ia=a.g.availabilityWindowOverride),a.j.Ke(Ia));else for(a.j.bb(T),Ja=r(a.h.values()),ea=Ja.next();!ea.done;ea=Ja.next())Na=ea.value,Na.stream.segmentIndex.yb(0,T);a.I=[];Oa=[];Sc=r(f);for(Tc=Sc.next();!Tc.done;Tc=Sc.next())for(vc=Tc.value,Jd=r([vc.video,vc.audio]),Db=Jd.next();!Db.done;Db=Jd.next())(Ke=Db.value)&&Oa.push(Ke);return B(Va,Promise.all(Oa.map(function(qg){return K(function(rg){return B(rg,
699
- qg.createSegmentIndex(),0)})})),9);case 9:Uc=r(Oa);for(Db=Uc.next();!Db.done;Db=Uc.next())Kd=Db.value,a.I.push(Kd.segmentIndex.M);Uq(a);a.j.le();a.J={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.J);C(Va)}})}function br(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=W(d,"NAME");d=W(d,"VALUE");c&&d&&(a.A.has(c)||a.A.set(c,d))}}
700
- function Xq(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.A.get(e))&&c.set(e,d)}return c}
701
- function dr(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"AUDIO");c=W(d,"VIDEO");var f=W(d,"SUBTITLES");d=jr(a,d);if(f){var g=Gb(Ib,d);a.B.set(f,g);dc(d,g)}e&&(f=Gb("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.B.set(e,f));c&&(e=Gb("video",d),e||(e=a.g.hls.defaultVideoCodec),a.B.set(c,e))}}
702
- function hr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(x){if(1==x.g)return c=yq(b,"SUBTITLES"),d=c.map(function(y){var v,w,A;return K(function(z){if(1==z.g){if(v=a.g.disableText)return z.return(null);E(z,2);return B(z,kr(a,y),4)}if(2!=z.g)return w=z.h,z.return(w.stream);A=I(z);if(a.g.hls.ignoreTextStreamFailures)return z.return(null);throw A;})}),B(x,Promise.all(d),2);e=x.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=uq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(p=r(m),n=p.next();!n.done;n=
703
- p.next())t=n.value,t.stream.codecs=l;return x.return(e.filter(function(y){return y}))})}function ir(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);E(l,2);return B(l,lr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=I(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),B(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
704
- function er(a,b){var c;return K(function(d){b=b.filter(function(e){var f=W(e,"URI")||"";return"SUBTITLES"!=W(e,"TYPE")&&""!=f});c=b.map(function(e){return kr(a,e)});return B(d,Promise.all(c),0)})}
705
- function gr(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,t,x;return K(function(y){if(1==y.g)return h=W(g,"FRAME-RATE"),k=Number(W(g,"AVERAGE-BANDWIDTH"))||Number(uq(g,"BANDWIDTH")),l=W(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=W(g,"VIDEO-RANGE"),B(y,mr(a,g),2);x=y.h;for(var v=y.return,w=x.audio,A=x.video,z=r(A),D=z.next();!D.done;D=z.next())if(D=D.value.stream)D.width=Number(p)||void 0,D.height=Number(n)||void 0,
706
- D.frameRate=Number(h)||void 0,D.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!A.length||z)A=[null];z=[];w=r(w);for(D=w.next();!D.done;D=w.next()){D=D.value;for(var G=r(A),F=G.next();!F.done;F=G.next()){var H=F.value;F=D?D.stream:null;var J=H?H.stream:null,L=D?D.stream.drmInfos:null,N=H?H.stream.drmInfos:null;H=(H?H.Kd:"")+" - "+(D?D.Kd:"");F&&J&&L.length&&N.length&&!(0<bh(L,N).length)||a.ma.has(H)||(F={id:a.za++,language:F?F.language:"und",primary:!!F&&F.primary||
707
- !!J&&J.primary,audio:F,video:J,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(F),a.ma.add(H))}}return v.call(y,z)})}),B(f,Promise.all(c),2);d=f.h;e=d.reduce(zb,[]);e=e.filter(function(g){return null!=g});return f.return(e)})}
708
- function mr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,y;return K(function(v){if(1==v.g)return c=Jb,d=jr(a,b),e=W(b,"AUDIO"),f=W(b,"VIDEO"),h=(g=e||f)&&a.C.has(g)?a.C.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=uq(b,"URI"),n=k.audio.find(function(w){return w&&w.Kd==p}),t=Gb(c.Ia,d),(x=Gb(c.Gb,d))&&!t?l=c.Gb:!h.length&&x&&t?(l=c.Ia,d=[[t,x].join()]):k.audio.length&&n?(l=c.Gb,m=!0):l=k.video.length&&!k.audio.length?c.Gb:c.Ia,m?v.D(2):B(v,nr(a,b,d,l),3);2!=v.g&&(y=v.h,k[y.stream.type]=[y]);or(k);return v.return(k)})}
709
- function jr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=zd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function pr(a){a=W(a,"LANGUAGE")||"und";return Mb(a)}
710
- function or(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function fr(a,b){b=yq(b,"CLOSED-CAPTIONS");b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=pr(d);var e=uq(d,"GROUP-ID");d=uq(d,"INSTREAM-ID");a.K.get(e)||a.K.set(e,new Map);a.K.get(e).set(d,c)}}
711
- function kr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,y;return K(function(v){if(1==v.g){c=uq(b,"GROUP-ID");d="";var w=uq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Ib);e=w;e!=Ib&&c&&a.B.has(c)&&(d=a.B.get(c));f=qr(uq(b,"URI"),a.A);if(a.h.has(f))return v.return(a.h.get(f));g=pr(b);h=W(b,"NAME");k=W(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=W(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=W(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=W(b,"CHARACTERISTICS");t=W(b,"FORCED");x=
712
- "YES"==t;return B(v,rr(a,f,d,e,g,l,h,m,null,n,x,p),2)}y=v.h;a.C.has(c)?a.C.get(c).push(y):a.C.set(c,[y]);if(a.h.has(f))return v.return(a.h.get(f));a.h.set(f,y);return v.return(y)})}
713
- function lr(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=qr(uq(b,"URI"),a.A);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=pr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");return B(n,rr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(a.h.has(c))return n.return(a.h.get(c));if(k=W(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*Number(m.split("x")[1]);
714
- if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function nr(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=qr(uq(b,"URI"),a.A);if(a.h.has(e))return k.return(a.h.get(e));var l=W(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Fb(d,c);return B(k,rr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k.return(a.h.get(e));a.h.set(e,h);return k.return(h)})}
715
- function rr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,x;return K(function(y){if(1==y.g)return n=Bq(a.N,b),B(y,Rq(a,n),2);t=y.h;n=t.uri;x=Hq(a.$,t.data,n);return y.return(cr(a,x,b,n,c,d,e,f,g,h,k,l,m,p))})}
716
- function cr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,x){var y,v,w,A,z,D,G,F,H,J,L,N,T,aa,ea,ka,Ba,Ia,Ja,Na,Oa,Sc,Tc,vc,Jd,Db,Ke,Uc,Kd,Va,qg,rg,fp,gp;return K(function(Md){if(1==Md.g){if(1!=b.type)throw new P(2,4,4017);y=xq(b.g,"EXT-X-DEFINE");v=Xq(a,y);sr(a,b);return x?Md.D(2):B(Md,tr(a,f,e,b,v),3)}2!=Md.g&&(x=Md.h);w=[];if(b.segments)for(A=r(b.segments),z=A.next();!z.done;z=A.next())D=z.value,G=xq(D.g,"EXT-X-KEY"),w.push.apply(w,ja(G));H=F=!1;J=[];L=new Set;N=r(w);for(T=N.next();!T.done;T=N.next())if(aa=T.value,
717
- ea=uq(aa,"METHOD"),"NONE"!=ea)if(F=!0,"AES-128"==ea)H=!0;else if(ka=uq(aa,"KEYFORMAT"),Ia=(Ba=ur[ka])?Ba(aa,x):null){if(Ia.keyIds)for(Ja=r(Ia.keyIds),Na=Ja.next();!Na.done;Na=Ja.next())Oa=Na.value,L.add(Oa);J.push(Ia)}if(F&&!J.length&&!H)throw new P(2,4,4026);ej.includes(x)&&(e="");Sc=new Map;Tc=a.l;vc=Yq(a,b,f,Sc,v);Tc!=a.l&&sr(a,b);Jd=vc[vc.length-1].endTime;Db=new Bj(vc);Ke=f==Ib?"subtitle":void 0;Uc=[];if(p)for(Kd=r(p.split(",")),Va=Kd.next();!Va.done;Va=Kd.next())qg=Va.value,Uc.push(qg);fp=(rg=
718
- zq(b.g,"EXT-X-SERVER-CONTROL"))?null!=rg.getAttribute("CAN-SKIP-UNTIL"):!1;gp={id:a.za++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Db,mimeType:x,codecs:e,kind:Ke,encrypted:F,drmInfos:J,keyIds:L,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Uc,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};
719
- return Md.return({stream:gp,Kd:c,Yf:d,Pc:Jd,Qc:Sc,dg:fp,yf:!1})})}
720
- function vr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=nd(e.substr(2));if(16!=f.byteLength)throw new P(2,4,4043);}else d=Aq(c.g);b=Bq(c.h,uq(b,"URI"));var g=rf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return K(function(p){if(1==p.g)return B(p,wr(a,g,6),2);if(3!=
721
- p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new P(2,4,4044);l={name:"AES-CBC"};m=h;return B(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;C(p)})}};return h}
722
- function sr(a,b){var c=zq(b.g,"EXT-X-PLAYLIST-TYPE"),d=zq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Wq(a,Qq);else{c?Wq(a,xr):Wq(a,yr);d=zq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=zq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ba=Number(uq(c,"PART-TARGET")),a.H=Math.min(a.ba,a.H),b=zq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=b?Number(uq(b,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.aa=Math.max(d,a.aa)}}
723
- function zr(a,b,c,d){c=zq(c,"EXT-X-MAP");if(!c)return null;var e=uq(c,"URI");d=qr(Bq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.ua.has(b)||(c=Ar(d,c),a.ua.set(b,c));return a.ua.get(b)}function Ar(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new wi(function(){return[a]},c,d)}
724
- function Br(a,b,c,d,e,f,g,h,k){var l=d.g,m=qr(d.i,f),p=zq(l,"EXTINF"),n=f=0,t=null;d.h.length&&!a.l&&Ua("Low-latency HLS 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.");var x=null;if(!a.g.hls.ignoreManifestProgramDateTime){var y=zq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(x=fg(y.value))}y=zi;zq(l,"EXT-X-GAP")&&(y=2);if(!p){if(0==d.h.length)throw new P(2,4,4024,"EXTINF");
725
- if(!a.l)return null}var v=[];if(a.l)for(var w={},A=0;A<d.h.length;w={Td:w.Td},A++){var z=d.h[A],D=0==A?c:v[v.length-1],G=0==A?e:D.endTime,F=Number(W(z,"DURATION"))||a.ba;if(F){F=G+F;var H=0,J=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),J=r(Cr(D,H)),H=J.next().value,J=J.next().value);if(D=W(z,"URI"))w.Td=Bq(g,D),D=zi,"YES"==W(z,"GAP")&&(D=2),v.push(new yi(G,F,function(L){return function(){return[L.Td]}}(w),H,J,b,0,0,Infinity,[],"",null,null,D))}}p?
726
- f=e+Number(p.value.split(",")[0]):f=v[v.length-1].endTime;(a=zq(l,"EXT-X-BYTERANGE"))?(t=r(Cr(c,a.value)),n=t.next().value,t=t.next().value):v.length&&(n=v[0].Ta,t=v[v.length-1].Ba);c="";a=null;"image"==h&&(c="1x1",h=zq(l,"EXT-X-TILES"))&&(c=uq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new yi(e,f,function(){return m.length?[m]:[]},n,t,b,0,0,Infinity,v,c,a,x,y,k)}function Cr(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ba+1,d=c+b-1);return[c,d]}
727
- function Uq(a){if(a.j){for(var b=r(a.I),c=b.next();!c.done;c=b.next())a.j.mc(c.value);a.I=[]}}
728
- function Yq(a,b,c,d,e){var f=b.segments,g=void 0,h=Aq(b.g),k=zq(b.g,"EXT-X-SKIP");k=k?Number(W(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;a.m!=Qq&&d.has(l)&&(m=d.get(l));for(var p=[],n=null,t=0;t<f.length;t++){var x=f[t],y=0==t?m:n.endTime;l=h+k+t;var v=r(x.g);for(var w=v.next();!w.done;w=v.next())w=w.value,"EXT-X-KEY"==w.name&&"AES-128"==uq(w,"METHOD")&&(g=vr(a,w,b));d.set(l,y);v=zr(a,b.h,x.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());(n=x=Br(a,v,n,x,
729
- y,e,b.h,c,g))&&(a.g.hls.ignoreManifestProgramDateTime&&null!=a.P&&l<a.P||p.push(x))}if(a=p.some(function(A){return null!=A.g}))for(b={},c=0;c<p.length;b={vc:b.vc,uc:b.uc,Zc:b.Zc,sb:b.sb,tc:b.tc},c++)if(b.sb=p[c],null==b.sb.g)for(b.uc=0,b.vc=c,d=function(A){return function(){var z=p[A.vc];if(z){if(null!=z.g)return z.g+A.uc;A.uc-=z.endTime-z.startTime;A.vc+=1}return null}}(b),b.tc=0,b.Zc=c,e=function(A){return function(){var z=p[A.Zc];if(z){z!=A.sb&&(A.tc+=z.endTime-z.startTime);if(null!=z.g)return z.g+
730
- A.tc;--A.Zc}return null}}(b);null==b.sb.g;)b.sb.g=e(),null==b.sb.g&&(b.sb.g=d());if(a)for(a=r(p),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.g,c=r(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return p}function qr(a,b){a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(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 P(2,4,4039,e);}}return a}
731
- function tr(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,x,y,v;return K(function(w){if(1==w.g){f=Jb;g=xf;h=Math.trunc((d.segments.length-1)/2);k=qr(d.segments[h].i,e);l=new lb(k);m=l.Ka.split(".").pop();p=Dr[b];if((n=p[m])||(n=Er[m]))return w.return(n);if(b==f.ha){if("vtt"==c||"wvtt"==c)return w.return("text/vtt");if(c&&""!==c)return w.return("application/mp4")}if(b==f.Bc&&(!c||"jpeg"==c))return w.return("image/jpeg");t=rf([k],a.g.retryParameters);t.method="HEAD";return B(w,wr(a,t,g),2)}x=w.h;y=x.headers["content-type"];
732
- if(!y){if(b==f.ha)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(y.split(";")[0])})}function Rq(a,b){b=rf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return wr(a,b,0)}function Pq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d.return();E(d,2);return B(d,a.update(),4)}if(2!=d.g)return a.m!=Qq&&(b=a.ea,a.F.S(b)),va(d,0);c=I(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.F.S(.1);C(d)})}
733
- function Wq(a,b){a.m=b;a.j&&a.j.Yc(a.m==Qq);a.m!=Qq||a.F.stop()}function wr(a,b,c){if(!a.G)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);mf(a.G,b);return b.promise}M("shaka.hls.HlsParser",Oq);
734
- var Er={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Dr={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"},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"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"txt/vtt",
735
- ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},ur={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);return Eb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=uq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=uq(a,
736
- "URI");b=Nq(b);b=Ec(b.data);b=Eb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=uq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=uq(a,"URI");a=Nq(a);a=Ec(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vf(a,b,new Set,0);return Eb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Qq="VOD",yr=
737
- "EVENT",xr="LIVE",Vq={Xf:Qq,Th:yr,$e:xr};Vc("Tizen 3")||Vc("Tizen 2")||Xc()||(hh.m3u8=function(){return new Oq},fh["application/x-mpegurl"]=function(){return new Oq},fh["application/vnd.apple.mpegurl"]=function(){return new Oq});function Fr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Gf:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Gr(){}function Hr(a,b,c,d,e){var f=new Ir;Ff(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Jr,h={hf:!1,Rf:!1};a=Kr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new bf(a,function(){h.hf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Rf=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
738
- function Kr(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,x,y,v,w,A,z;return K(function(D){switch(D.g){case 1:return h=Lr,k=Mr,n=p=0,t=Date.now(),E(D,2),B(D,h(a,c),4);case 4:return l=D.h,f(Nr(l.headers)),x=l.clone().body.getReader(),v=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(G){function F(){var H,J;return K(function(L){switch(L.g){case 1:return E(L,2),B(L,x.read(),4);case 4:H=L.h;va(L,3);break;case 2:return I(L),L.return();case 3:if(H.done){L.D(5);break}p+=H.value.byteLength;if(!g){L.D(5);
739
- break}return B(L,g(H.value),5);case 5:J=Date.now();if(100<J-t||H.done)e(J-t,p-n,v-p),n=p,t=J;H.done?G.close():(G.enqueue(H.value),F());C(L)}})}F()},new k({start:w}),B(D,l.arrayBuffer(),5);case 5:m=D.h;va(D,3);break;case 2:A=I(D);if(d.hf)throw new P(1,1,7001,a,b);if(d.Rf)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,A,b);case 3:return z=Nr(l.headers),D.return(Fr(z,m,l.status,a,l.url,b))}})}function Nr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
740
- function Or(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Gr);Gr.isSupported=Or;Gr.parse=Hr;var Lr=window.fetch,Jr=window.AbortController,Mr=window.ReadableStream,Ir=window.Headers;Or()&&(of("http",Hr,2,!0),of("https",Hr,2,!0),of("blob",Hr,2,!0));function Pr(){}
741
- function Qr(a,b,c,d,e){var f=new Rr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new P(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Sr(f);e(t);p=!0}};f.onload=function(){var t=Sr(f),x=f.response;try{var y=Fr(t,x,f.status,a,f.responseURL,c);l(y)}catch(v){m(v)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
742
- c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(t){var x=Date.now();if(100<x-g||t.lengthComputable&&t.loaded==t.total)d(x-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=x};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new bf(k,function(){f.abort();return Promise.resolve()})}
743
- function Sr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(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}M("shaka.net.HttpXHRPlugin",Pr);Pr.parse=Qr;var Rr=window.XMLHttpRequest;of("http",Qr,1,!0);of("https",Qr,1,!0);of("blob",Qr,1,!0);function Tr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ur(a){return a.Pa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ta+":"+a.Ba}function Vr(a,b){return Tj(a.g.Pa(),a.g.Ta,a.g.Ba,b.streaming.retryParameters)};function Wr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Xr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Wr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function Yr(a){var b=this;this.A=a;this.j=new Map;this.i=new yf(function(){return Zr(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Wr}Yr.prototype.destroy=function(){return this.i.destroy()};function $r(a,b,c){a.m=b;a.l=c}function Zr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
744
- function as(a,b,c,d,e,f){zf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return K(function(x){if(1==x.g)return B(x,bs(a,c),2);h=x.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ec(h),l=new Uf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return x.return(f(h))})});a.j.set(b,g)}function cs(a){return K(function(b){return 1==b.g?B(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
745
- function bs(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=xf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),B(g,d.promise,2);f=g.h;dc(a.h,e);return g.return(f.data)})};function ds(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ds.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return B(b,a.g,4)}if(2!=b.g)return va(b,0);I(b);C(b)})};
746
- function es(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return B(g,b(f.key,f.value,f),2)}f.continue();C(g)})}})}ds.prototype.store=function(){return this.h};ds.prototype.promise=function(){return this.g};function fs(a){this.h=a;this.g=[]}fs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function gs(a,b){return hs(a,b,"readwrite")}function hs(a,b,c){c=a.h.transaction([b],c);var d=new ds(c,b);a.g.push(d);d.promise().then(function(){dc(a.g,d)},function(){dc(a.g,d)});return d};function is(a,b,c){this.h=new fs(a);this.i=b;this.g=c}q=is.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return js(this.i)};q.removeSegments=function(a,b){return ks(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return B(d,ls(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.lf(e)}))})};q.addManifests=function(){return js(this.g)};
747
- q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function ms(a,b,c){a=gs(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=gs(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 ks(this,this.g,a,b)};
748
- q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return B(d,ls(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ec(e)})))})};q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=hs(a.h,a.g,"readonly"),c=new Map,B(d,es(b,function(e,f){var g;return K(function(h){if(1==h.g)return B(h,a.Ec(f),2);g=h.h;c.set(e,g);C(h)})}),2)):3!=d.g?B(d,b.promise(),3):d.return(c)})};q.lf=function(a){return a};q.Ec=function(a){return Promise.resolve(a)};
749
- function js(a){return Promise.reject(new P(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 K(function(m){if(1==m.g){d=gs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={dd:g.dd},k=h.next())l=k.value,g.dd=e.add(l),g.dd.onsuccess=function(p){return function(){f.push(p.dd.result)}}(g);return B(m,d.promise(),2)}return m.return(f)})};
750
- function ks(a,b,c,d){a=gs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={cd:e.cd},f=c.next())e.cd=f.value,b.delete(e.cd).onsuccess=function(g){return function(){return d(g.cd)}}(e);return a.promise()}
751
- function ls(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=hs(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ac:h.Ac,xc:h.xc},l=k.next())h.xc=l.value,h.Ac=e.get(h.xc),h.Ac.onsuccess=function(p){return function(){void 0==p.Ac.result&&g.push(p.xc);f[p.xc]=p.Ac.result}}(h);return B(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function ns(a){this.g=new fs(a)}ns.prototype.destroy=function(){return this.g.destroy()};ns.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=hs(a.g,"session-ids","readonly"),c=[],B(d,es(b,function(e,f){c.push(f)}),2)):3!=d.g?B(d,b.promise(),3):d.return(c)})};ns.prototype.add=function(a){var b=gs(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
752
- ns.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=gs(b.g,"session-ids"),B(d,es(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):B(d,c.promise(),0)})};function os(){this.g=new Map}os.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};os.prototype.init=function(){var a=this;ps.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
753
- function qs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Sa:d,Aa:f},Aa:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function rs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Sa:d,Aa:f},e)})})}
754
- function ss(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function ts(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function us(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
755
- function vs(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=ps,d.forEach(function(f){(f=f())&&b.push(f)})),B(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):B(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ws(a,b){ps.set(a,b)}M("shaka.offline.StorageMuxer",os);os.unregister=function(a){ps.delete(a)};os.register=ws;os.prototype.destroy=os.prototype.destroy;var ps=new Map;function xs(){is.apply(this,arguments)}u(xs,is);xs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=gs(c.h,c.g);e=d.store();f=new Lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return B(g,Promise.all([d.promise(),f]),0)})};
756
- xs.prototype.Ec=function(a){var b,c,d,e,f,g;return K(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=ys(a.periods[c],e),b.push(f);return B(h,Fp(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})})};
757
- function ys(a,b){zs(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return As(e,a.startTime,b)})}
758
- function As(a,b,c){var d=a.initSegmentUri?Bs(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,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=Bs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
759
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}xs.prototype.lf=function(a){return{data:a.data}};function Bs(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 P(2,9,9004,"Could not parse uri "+a);}
760
- function zs(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=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
761
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Cs(){is.apply(this,arguments)}u(Cs,is);
762
- Cs.prototype.Ec=function(a){var b,c,d,e,f,g;return K(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;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Ds(p,k.startTime,k.startTime+e));f=l;b.push(f)}return B(h,Fp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
676
+ function sq(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
677
+ parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function qq(a){var b=a.Xc?1:0;b+=a.Db?1:0;b+=a.Yc?1:0;if(0==b)return a.contentType==Ib||"application"==a.contentType?!0:!1;1!=b&&(a.Xc&&(a.Db=null),a.Yc=null);return!0}
678
+ function tq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=Cb(b,[c]),f=rf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),mf(a.A,g),A(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=dd(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
679
+ function iq(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.D(4);break}h=g.value;E(p,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 p.D(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 p.D(8);
680
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.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":Ua("NTP UTCTiming scheme is not supported");break;default:Ua("Unrecognized scheme in UTCTiming element",k)}p.D(9);break;case 7:return A(p,tq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return A(p,tq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
681
+ 3);break;case 5:J(p);case 3:g=f.next();p.D(2);break;case 4:return Ua("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}})}
682
+ function lq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=eg(d,"timescale",kg)||1;d=r(Xf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=eg(k,"presentationTime",kg)||0,m=eg(k,"duration",kg)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
683
+ function rq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=xf,f=Vj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),mf(a.A,h),A(l,h.promise,2);k=l.h;return l.return(k.data)})}function pq(a,b){return Cd(wd(a,b))?Ib:a.split("/")[0]}M("shaka.dash.DashParser",bq);hh.mpd=function(){return new bq};fh["application/dash+xml"]=function(){return new bq};fh["video/vnd.mpeg.dash.mpd"]=function(){return new bq};function uq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function vq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}vq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
684
+ vq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function W(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function wq(a,b){a=a.getAttribute(b);if(!a)throw new P(2,4,4023,b);return a.value}function xq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function yq(a,b){this.name=a;this.value=b};function zq(a,b){return a.filter(function(c){return c.name==b})}function Aq(a,b){return a.filter(function(c){return wq(c,"TYPE")==b})}function Bq(a,b){a=zq(a,b);return a.length?a[0]:null}function Cq(a,b){var c=0;c=void 0===c?0:c;return(a=Bq(a,b))?Number(a.value):c}function Dq(a,b){return Cb([a],[b])[0]};function Eq(a){this.h=a;this.g=0}function Fq(a){Gq(a,/[ \t]+/gm)}function Gq(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 Hq(a){return a.g==a.h.length?null:(a=Gq(a,/[^ \t\n]*/gm))?a[0]:null};function Iq(){this.g=0}
685
+ function Jq(a,b,c){b=dd(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new P(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Kq(a,g),--a.g,Lq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Kq(a,h);if(Mq.includes(h.name)){if(1!=b)throw new P(2,4,4017);
686
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Kq(a,m),Lq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==W(m,"TYPE")?k.push(m):"MAP"==W(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Dq(d,m.trim()),h&&g.push(h),e.push(new xq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new xq("",g,k)));return new uq(c,b,f,e)}f.push(h);
687
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new yq("URI",k)),e=!0)}}return new uq(c,b,f)}function Kq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new P(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Eq(d);var f;(f=Gq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Gq(d,g);)c.push(new yq(f[1],f[2]||f[3])),Fq(d)}return new vq(a,b,c,e)}
688
+ var Lq="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".split(" "),Mq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Nq(){}function Oq(a){try{var b=Pq(a);return ef({uri:a,If:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return cf(c)}}function Pq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new P(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new P(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=md(a):e=hd(a);return{data:e,contentType:c}}
689
+ M("shaka.net.DataUriPlugin",Nq);Nq.parse=Oq;of("data",Oq);function Qq(){var a=this;this.g=this.i=null;this.Aa=1;this.A=new Map;this.C=new Map;this.ua=new Set;this.h=new Map;this.j=null;this.N="";this.va=new Iq;this.ma=0;this.T=!1;this.P=null;this.$=Infinity;this.F=new Q(function(){Rq(a)});this.m=Sq;this.J=null;this.ba=0;this.H=Infinity;this.Y=this.ea=0;this.G=new lf;this.I=[];this.K=new Map;this.B=new Map;this.aa=new Map;this.l=!1}q=Qq.prototype;q.configure=function(a){this.g=a};
690
+ q.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.l=b.isLowLatencyMode(),A(f,Tq(c,a),2);if(3!=f.g)return d=f.h,c.N=d.uri,A(f,Uq(c,d.data,a),3);e=c.ma;0<e&&c.F.S(e);return f.return(c.J)})};q.stop=function(){this.F&&(this.F.stop(),this.F=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ua.clear();this.J=null;this.h.clear();this.C.clear();this.B.clear();this.A.clear();return Promise.all(a)};
691
+ q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==Sq)return h.return();b=[];c=Array.from(a.h.values());return c.length?A(h,Vq(a,c[0]),2):h.D(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Vq(a,c[d]));return A(h,Promise.all(b),4)}Wq(a);e=c.some(function(k){return 0==k.Af});e||(f=Xq,Yq(a,f.Zf),g=c.map(function(k){return k.Qc}),a.j.Ua(Math.min.apply(Math,ja(g))),a.i.updateDuration());B(h)})};
692
+ function Vq(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return c=b.$f,d=new lb(c),a.l&&b.fg&&ob(d,new qb("_HLS_skip=YES")),A(y,Tq(a,d.toString()),2);e=y.h;f=Jq(a.va,e.data,e.uri);if(1!=f.type)throw new P(2,4,4017);g=zq(f.g,"EXT-X-DEFINE");h=Zq(a,g);k=b.stream;l=$q(a,f,k.type,b.Rc,h);a.I.push(l);k.segmentIndex.lc(l,a.j.ob());l.length&&(m=Cq(f.g,"EXT-X-MEDIA-SEQUENCE"),p=b.Rc.get(m),k.segmentIndex.Hb(p));n=l[l.length-1];if(t=Bq(f.g,"EXT-X-ENDLIST"))b.Af=!0,b.Qc=n.endTime;B(y)})}
693
+ q.onExpirationUpdated=function(){};
694
+ function ar(a){if(!a.T){for(var b=-1,c=new Map,d=r(a.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.M[0]||null))for(var g=r(e.Rc),h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.P=b;b=r(a.h.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)if(f=a.P-c.get(d),e.M.splice(0,f),e=e.M[0]||null)e=-e.startTime,d.stream.segmentIndex.offset(e),
695
+ br(d,e);a.T=!0}}}
696
+ function cr(a){if(!a.T&&Infinity==a.$){for(var b=Infinity,c=r(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.M[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){a.$=b;c=r(a.h.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;if(null!=e){var f=e.M[0]||null;if(null==f.g)Ta("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Kd,"Expect AV sync issues!");else for(br(d,f.g-b-f.startTime),d=r(e),e=d.next();!e.done;e=d.next())e.value.Pe(b)}}a.T=
697
+ !0}}}function br(a,b){a.Qc+=b;for(var c=r(a.Rc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.Rc.set(d,e+b)}}
698
+ function Uq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la,Ba,Ia,Ja,Na,Oa,Tc,Uc,uc,Jd,Db,Le,Vc,Kd;return K(function(Va){switch(Va.g){case 1:d=Jq(a.va,b,a.N);e=zq(d.g,"EXT-X-DEFINE");dr(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,F=G.split(";")[0],H=F.split("/")[0],I=Ad(G),L=new Map,A(Va,er(a,d,c,c,I,H,"",!0,"Media Playlist",null,L,null,!1,!1,F),8);k=zq(d.g,"EXT-X-MEDIA");l=zq(d.g,"EXT-X-STREAM-INF");m=zq(d.g,"EXT-X-IMAGE-STREAM-INF");fr(a,l);
699
+ p=zq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(y=t.value,x=W(y,"DATA-ID"),v=W(y,"URI"),w=W(y,"LANGUAGE"),C=W(y,"VALUE"),z=(new Map).set("id",x),v&&z.set("uri",Dq(a.N,v)),w&&z.set("language",w),C&&z.set("value",C),D=new O("sessiondata",z),a.i)a.i.onEvent(D);return A(Va,gr(a,k),4);case 4:return hr(a,k),A(Va,ir(a,l),5);case 5:return f=Va.h,A(Va,jr(a,k),6);case 6:return g=Va.h,A(Va,kr(a,m),7);case 7:h=Va.h;Va.D(3);break;case 8:N=Va.h,a.h.set(c,N),f.push({id:0,language:"und",
700
+ disabledUntilTime:0,primary:!0,audio:"audio"==H?N.stream:null,video:"video"==H?N.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new P(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?ar(a):cr(a);V=Infinity;aa=r(a.h.values());for(ea=aa.next();!ea.done;ea=aa.next())la=ea.value,"text"!=la.stream.type&&(V=Math.min(V,la.Qc));a.m!=Sq?(a.j=new R(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.ba),a.j.Zc(!1)):(a.j=new R(null,
701
+ 0),a.j.Zc(!0));if(a.m!=Sq)a.ma=a.H,Ba=Xq,a.m==Ba.cf&&(Ia=a.j.Ed,isNaN(a.g.availabilityWindowOverride)||(Ia=a.g.availabilityWindowOverride),a.j.Le(Ia));else for(a.j.Ua(V),Ja=r(a.h.values()),ea=Ja.next();!ea.done;ea=Ja.next())Na=ea.value,Na.stream.segmentIndex.yb(0,V);a.I=[];Oa=[];Tc=r(f);for(Uc=Tc.next();!Uc.done;Uc=Tc.next())for(uc=Uc.value,Jd=r([uc.video,uc.audio]),Db=Jd.next();!Db.done;Db=Jd.next())(Le=Db.value)&&Oa.push(Le);return A(Va,Promise.all(Oa.map(function(sg){return K(function(tg){return A(tg,
702
+ sg.createSegmentIndex(),0)})})),9);case 9:Vc=r(Oa);for(Db=Vc.next();!Db.done;Db=Vc.next())Kd=Db.value,a.I.push(Kd.segmentIndex.M);Wq(a);a.j.le();a.J={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.J);B(Va)}})}function dr(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=W(d,"NAME");d=W(d,"VALUE");c&&d&&(a.A.has(c)||a.A.set(c,d))}}
703
+ function Zq(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=W(e,"NAME");var f=W(e,"VALUE");e=W(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.A.get(e))&&c.set(e,d)}return c}
704
+ function fr(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=W(d,"AUDIO");c=W(d,"VIDEO");var f=W(d,"SUBTITLES");d=lr(a,d);if(f){var g=Gb(Ib,d);a.B.set(f,g);dc(d,g)}e&&(f=Gb("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.B.set(e,f));c&&(e=Gb("video",d),e||(e=a.g.hls.defaultVideoCodec),a.B.set(c,e))}}
705
+ function jr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return c=Aq(b,"SUBTITLES"),d=c.map(function(x){var v,w,C;return K(function(z){if(1==z.g){if(v=a.g.disableText)return z.return(null);E(z,2);return A(z,mr(a,x),4)}if(2!=z.g)return w=z.h,z.return(w.stream);C=J(z);if(a.g.hls.ignoreTextStreamFailures)return z.return(null);throw C;})}),A(y,Promise.all(d),2);e=y.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=wq(h,"GROUP-ID"),l=a.B.get(k))if(m=a.C.get(k))for(p=r(m),n=p.next();!n.done;n=
706
+ p.next())t=n.value,t.stream.codecs=l;return y.return(e.filter(function(x){return x}))})}function kr(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);E(l,2);return A(l,nr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=J(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),A(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
707
+ function gr(a,b){var c;return K(function(d){b=b.filter(function(e){var f=W(e,"URI")||"";return"SUBTITLES"!=W(e,"TYPE")&&""!=f});c=b.map(function(e){return mr(a,e)});return A(d,Promise.all(c),0)})}
708
+ function ir(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,t,y;return K(function(x){if(1==x.g)return h=W(g,"FRAME-RATE"),k=Number(W(g,"AVERAGE-BANDWIDTH"))||Number(wq(g,"BANDWIDTH")),l=W(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=W(g,"VIDEO-RANGE"),A(x,or(a,g),2);y=x.h;for(var v=x.return,w=y.audio,C=y.video,z=r(C),D=z.next();!D.done;D=z.next())if(D=D.value.stream)D.width=Number(p)||void 0,D.height=Number(n)||void 0,
709
+ D.frameRate=Number(h)||void 0,D.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!C.length||z)C=[null];z=[];w=r(w);for(D=w.next();!D.done;D=w.next()){D=D.value;for(var G=r(C),F=G.next();!F.done;F=G.next()){var H=F.value;F=D?D.stream:null;var I=H?H.stream:null,L=D?D.stream.drmInfos:null,N=H?H.stream.drmInfos:null;H=(H?H.Kd:"")+" - "+(D?D.Kd:"");F&&I&&L.length&&N.length&&!(0<bh(L,N).length)||a.ua.has(H)||(F={id:a.Aa++,language:F?F.language:"und",primary:!!F&&F.primary||
710
+ !!I&&I.primary,audio:F,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(F),a.ua.add(H))}}return v.call(x,z)})}),A(f,Promise.all(c),2);d=f.h;e=d.reduce(zb,[]);e=e.filter(function(g){return null!=g});return f.return(e)})}
711
+ function or(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g)return c=Jb,d=lr(a,b),e=W(b,"AUDIO"),f=W(b,"VIDEO"),h=(g=e||f)&&a.C.has(g)?a.C.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=wq(b,"URI"),n=k.audio.find(function(w){return w&&w.Kd==p}),t=Gb(c.La,d),(y=Gb(c.Gb,d))&&!t?l=c.Gb:!h.length&&y&&t?(l=c.La,d=[[t,y].join()]):k.audio.length&&n?(l=c.Gb,m=!0):l=k.video.length&&!k.audio.length?c.Gb:c.La,m?v.D(2):A(v,pr(a,b,d,l),3);2!=v.g&&(x=v.h,k[x.stream.type]=[x]);qr(k);return v.return(k)})}
712
+ function lr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=W(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=zd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function rr(a){a=W(a,"LANGUAGE")||"und";return Mb(a)}
713
+ function qr(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function hr(a,b){b=Aq(b,"CLOSED-CAPTIONS");b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=rr(d);var e=wq(d,"GROUP-ID");d=wq(d,"INSTREAM-ID");a.K.get(e)||a.K.set(e,new Map);a.K.get(e).set(d,c)}}
714
+ function mr(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x;return K(function(v){if(1==v.g){c=wq(b,"GROUP-ID");d="";var w=wq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=Ib);e=w;e!=Ib&&c&&a.B.has(c)&&(d=a.B.get(c));f=sr(wq(b,"URI"),a.A);if(a.h.has(f))return v.return(a.h.get(f));g=rr(b);h=W(b,"NAME");k=W(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=W(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=W(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=W(b,"CHARACTERISTICS");t=W(b,"FORCED");y=
715
+ "YES"==t;return A(v,tr(a,f,d,e,g,l,h,m,null,n,y,p),2)}x=v.h;a.C.has(c)?a.C.get(c).push(x):a.C.set(c,[x]);if(a.h.has(f))return v.return(a.h.get(f));a.h.set(f,x);return v.return(x)})}
716
+ function nr(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=sr(wq(b,"URI"),a.A);d=W(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=rr(b);f=W(b,"NAME");g=W(b,"CHARACTERISTICS");return A(n,tr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(a.h.has(c))return n.return(a.h.get(c));if(k=W(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*Number(m.split("x")[1]);
717
+ if(p=W(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function pr(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=sr(wq(b,"URI"),a.A);if(a.h.has(e))return k.return(a.h.get(e));var l=W(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Fb(d,c);return A(k,tr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k.return(a.h.get(e));a.h.set(e,h);return k.return(h)})}
718
+ function tr(a,b,c,d,e,f,g,h,k,l,m,p){var n,t,y;return K(function(x){if(1==x.g)return n=Dq(a.N,b),A(x,Tq(a,n),2);t=x.h;n=t.uri;y=Jq(a.va,t.data,n);return x.return(er(a,y,b,n,c,d,e,f,g,h,k,l,m,p))})}
719
+ function er(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la,Ba,Ia,Ja,Na,Oa,Tc,Uc,uc,Jd,Db,Le,Vc,Kd,Va,sg,tg,gp,hp;return K(function(Md){if(1==Md.g){if(1!=b.type)throw new P(2,4,4017);x=zq(b.g,"EXT-X-DEFINE");v=Zq(a,x);ur(a,b);return y?Md.D(2):A(Md,vr(a,f,e,b,v),3)}2!=Md.g&&(y=Md.h);w=[];if(b.segments)for(C=r(b.segments),z=C.next();!z.done;z=C.next())D=z.value,G=zq(D.g,"EXT-X-KEY"),w.push.apply(w,ja(G));H=F=!1;I=[];L=new Set;N=r(w);for(V=N.next();!V.done;V=N.next())if(aa=V.value,
720
+ ea=wq(aa,"METHOD"),"NONE"!=ea)if(F=!0,"AES-128"==ea)H=!0;else if(la=wq(aa,"KEYFORMAT"),Ia=(Ba=wr[la])?Ba(aa,y):null){if(Ia.keyIds)for(Ja=r(Ia.keyIds),Na=Ja.next();!Na.done;Na=Ja.next())Oa=Na.value,L.add(Oa);I.push(Ia)}if(F&&!I.length&&!H)throw new P(2,4,4026);gj.includes(y)&&(e="");Tc=new Map;Uc=a.l;uc=$q(a,b,f,Tc,v);Uc!=a.l&&ur(a,b);Jd=uc[uc.length-1].endTime;Db=new Dj(uc);Le=f==Ib?"subtitle":void 0;Vc=[];if(p)for(Kd=r(p.split(",")),Va=Kd.next();!Va.done;Va=Kd.next())sg=Va.value,Vc.push(sg);gp=(tg=
721
+ Bq(b.g,"EXT-X-SERVER-CONTROL"))?null!=tg.getAttribute("CAN-SKIP-UNTIL"):!1;hp={id:a.Aa++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Db,mimeType:y,codecs:e,kind:Le,encrypted:F,drmInfos:I,keyIds:L,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Vc,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};
722
+ return Md.return({stream:hp,Kd:c,$f:d,Qc:Jd,Rc:Tc,fg:gp,Af:!1})})}
723
+ function xr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Ua("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new P(2,4,4042);var d=0,e=W(b,"IV","");if(e){var f=nd(e.substr(2));if(16!=f.byteLength)throw new P(2,4,4043);}else d=Cq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Dq(c.h,wq(b,"URI"));var g=rf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return K(function(p){if(1==p.g)return A(p,
724
+ yr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new P(2,4,4044);l={name:"AES-CBC"};m=h;return A(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
725
+ function ur(a,b){var c=Bq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Bq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Yq(a,Sq);else{c?Yq(a,zr):Yq(a,Ar);d=Bq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new P(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Bq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ea=Number(wq(c,"PART-TARGET")),a.H=Math.min(a.ea,a.H),b=Bq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=b?Number(wq(b,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ba=Math.max(d,a.ba)}}
726
+ function Br(a,b,c,d){c=Bq(c,"EXT-X-MAP");if(!c)return null;var e=wq(c,"URI");d=sr(Dq(b,e),d);b=[d,W(c,"BYTERANGE","")].join("-");a.aa.has(b)||(c=Cr(d,c),a.aa.set(b,c));return a.aa.get(b)}function Cr(a,b){var c=0,d=null;if(b=W(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new wi(function(){return[a]},c,d)}
727
+ function Dr(a,b,c,d,e,f,g,h,k){var l=d.g,m=sr(d.i,f),p=Bq(l,"EXTINF"),n=f=0,t=null;d.h.length&&!a.l&&Ua("Low-latency HLS 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.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var x=Bq(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=fg(x.value))}x=zi;Bq(l,"EXT-X-GAP")&&(x=2);if(!p){if(0==d.h.length)throw new P(2,4,4024,"EXTINF");
728
+ if(!a.l)return null}var v=[];if(a.l)for(var w={},C=0;C<d.h.length;w={Td:w.Td},C++){var z=d.h[C],D=0==C?c:v[v.length-1],G=0==C?e:D.endTime,F=Number(W(z,"DURATION"))||a.ea;if(F){F=G+F;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=W(z,"BYTERANGE-START"))?Number(H):0:(H=W(z,"BYTERANGE"),I=r(Er(D,H)),H=I.next().value,I=I.next().value);if(D=W(z,"URI"))w.Td=Dq(g,D),D=zi,"YES"==W(z,"GAP")&&(D=2),v.push(new yi(G,F,function(L){return function(){return[L.Td]}}(w),H,I,b,0,0,Infinity,[],"",null,null,D))}}p?
729
+ f=e+Number(p.value.split(",")[0]):f=v[v.length-1].endTime;(a=Bq(l,"EXT-X-BYTERANGE"))?(t=r(Er(c,a.value)),n=t.next().value,t=t.next().value):v.length&&(n=v[0].Va,t=v[v.length-1].Ca);c="";a=null;"image"==h&&(c="1x1",h=Bq(l,"EXT-X-TILES"))&&(c=wq(h,"LAYOUT"),(h=W(h,"DURATION"))&&(a=Number(h)));return new yi(e,f,function(){return m.length?[m]:[]},n,t,b,0,0,Infinity,v,c,a,y,x,k)}function Er(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Ca+1,d=c+b-1);return[c,d]}
730
+ function Wq(a){if(a.j){for(var b=r(a.I),c=b.next();!c.done;c=b.next())a.j.mc(c.value);a.I=[]}}
731
+ function $q(a,b,c,d,e){var f=b.segments,g=void 0,h=Cq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Cq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Bq(b.g,"EXT-X-SKIP");l=l?Number(W(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;a.m!=Sq&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,y=0;y<f.length;y++){var x=f[y],v=0==y?p:t.endTime;m=k+l+y;Bq(x.g,"EXT-X-DISCONTINUITY")&&h++;var w=r(x.g);for(var C=w.next();!C.done;C=w.next())C=C.value,"EXT-X-KEY"==C.name&&("AES-128"==wq(C,"METHOD")?g=xr(a,C,b):g=void 0);d.set(m,v);w=Br(a,b.h,x.g,e);
732
+ !a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(t=x=Dr(a,w,t,x,v,e,b.h,c,g))x.m=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.P&&m<a.P||n.push(x)}if(b=n.some(function(z){return null!=z.g}))for(c={},d=0;d<n.length;c={vc:c.vc,uc:c.uc,$c:c.$c,sb:c.sb,tc:c.tc},d++)if(c.sb=n[d],null==c.sb.g)for(c.uc=0,c.vc=d,e=function(z){return function(){var D=n[z.vc];if(D){if(null!=D.g)return D.g+z.uc;z.uc-=D.endTime-D.startTime;z.vc+=1}return null}}(c),c.tc=0,c.$c=d,
733
+ f=function(z){return function(){var D=n[z.$c];if(D){D!=z.sb&&(z.tc+=D.endTime-D.startTime);if(null!=D.g)return D.g+z.tc;--z.$c}return null}}(c);null==c.sb.g;)c.sb.g=f(),null==c.sb.g&&(c.sb.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.h),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.$;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.Pe(a);return n}
734
+ function sr(a,b){a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(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 P(2,4,4039,e);}}return a}
735
+ function vr(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v;return K(function(w){if(1==w.g){f=Jb;g=xf;h=Math.trunc((d.segments.length-1)/2);k=sr(d.segments[h].i,e);l=new lb(k);m=l.Na.split(".").pop();p=Fr[b];if((n=p[m])||(n=Gr[m]))return w.return(n);if(b==f.ha){if("vtt"==c||"wvtt"==c)return w.return("text/vtt");if(c&&""!==c)return w.return("application/mp4")}if(b==f.Bc&&(!c||"jpeg"==c))return w.return("image/jpeg");t=rf([k],a.g.retryParameters);t.method="HEAD";return A(w,yr(a,t,g),2)}y=w.h;x=y.headers["content-type"];
736
+ if(!x){if(b==f.ha)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(x.split(";")[0])})}function Tq(a,b){b=rf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return yr(a,b,0)}function Rq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d.return();E(d,2);return A(d,a.update(),4)}if(2!=d.g)return a.m!=Sq&&(b=a.ma,a.F.S(b)),va(d,0);c=J(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.F.S(.1);B(d)})}
737
+ function Yq(a,b){a.m=b;a.j&&a.j.Zc(a.m==Sq);a.m!=Sq||a.F.stop()}function yr(a,b,c){if(!a.G)throw new P(2,7,7001);b=a.i.networkingEngine.request(c,b);mf(a.G,b);return b.promise}M("shaka.hls.HlsParser",Qq);
738
+ var Gr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Fr={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"},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"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"txt/vtt",
739
+ ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},wr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new P(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new P(2,4,4041);return Eb("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=wq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=wq(a,
740
+ "URI");b=Pq(b);b=Ec(b.data);b=Eb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=W(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=wq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=wq(a,"URI");a=Pq(a);a=Ec(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Vf(a,b,new Set,0);return Eb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Sq="VOD",Ar=
741
+ "EVENT",zr="LIVE",Xq={Zf:Sq,Vh:Ar,cf:zr};Sc("Tizen 3")||Sc("Tizen 2")||Xc()||(hh.m3u8=function(){return new Qq},fh["application/x-mpegurl"]=function(){return new Qq},fh["application/vnd.apple.mpegurl"]=function(){return new Qq});function Hr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,If:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=gd(b)}catch(g){}throw new P(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Ir(){}function Jr(a,b,c,d,e){var f=new Kr;Ff(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Lr,h={kf:!1,Tf:!1};a=Mr(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new bf(a,function(){h.kf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.Tf=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
742
+ function Mr(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,C,z;return K(function(D){switch(D.g){case 1:return h=Nr,k=Or,n=p=0,t=Date.now(),E(D,2),A(D,h(a,c),4);case 4:return l=D.h,f(Pr(l.headers)),y=l.clone().body.getReader(),v=(x=l.headers.get("Content-Length"))?parseInt(x,10):0,w=function(G){function F(){var H,I;return K(function(L){switch(L.g){case 1:return E(L,2),A(L,y.read(),4);case 4:H=L.h;va(L,3);break;case 2:return J(L),L.return();case 3:if(H.done){L.D(5);break}p+=H.value.byteLength;if(!g){L.D(5);
743
+ break}return A(L,g(H.value),5);case 5:I=Date.now();if(100<I-t||H.done)e(I-t,p-n,v-p),n=p,t=I;H.done?G.close():(G.enqueue(H.value),F());B(L)}})}F()},new k({start:w}),A(D,l.arrayBuffer(),5);case 5:m=D.h;va(D,3);break;case 2:C=J(D);if(d.kf)throw new P(1,1,7001,a,b);if(d.Tf)throw new P(1,1,1003,a,b);throw new P(1,1,1002,a,C,b);case 3:return z=Pr(l.headers),D.return(Hr(z,m,l.status,a,l.url,b))}})}function Pr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
744
+ function Qr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",Ir);Ir.isSupported=Qr;Ir.parse=Jr;var Nr=window.fetch,Lr=window.AbortController,Or=window.ReadableStream,Kr=window.Headers;Qr()&&(of("http",Jr,2,!0),of("https",Jr,2,!0),of("blob",Jr,2,!0));function Rr(){}
745
+ function Sr(a,b,c,d,e){var f=new Tr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new P(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Ur(f);e(t);p=!0}};f.onload=function(){var t=Ur(f),y=f.response;try{var x=Hr(t,y,f.status,a,f.responseURL,c);l(x)}catch(v){m(v)}};f.onerror=function(t){m(new P(1,1,1002,a,t,
746
+ c))};f.ontimeout=function(){m(new P(1,1,1003,a,c))};f.onprogress=function(t){var y=Date.now();if(100<y-g||t.lengthComputable&&t.loaded==t.total)d(y-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=y};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new bf(k,function(){f.abort();return Promise.resolve()})}
747
+ function Ur(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(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}M("shaka.net.HttpXHRPlugin",Rr);Rr.parse=Sr;var Tr=window.XMLHttpRequest;of("http",Sr,1,!0);of("https",Sr,1,!0);of("blob",Sr,1,!0);function Vr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Wr(a){return a.Ra().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Va+":"+a.Ca}function Xr(a,b){return Vj(a.g.Ra(),a.g.Va,a.g.Ca,b.streaming.retryParameters)};function Yr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Zr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Yr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g.delete(a);this.j+=c;this.h+=b}};function $r(a){var b=this;this.A=a;this.j=new Map;this.i=new yf(function(){return as(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Yr}$r.prototype.destroy=function(){return this.i.destroy()};function bs(a,b,c){a.m=b;a.l=c}function as(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
748
+ function cs(a,b,c,d,e,f){zf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return K(function(y){if(1==y.g)return A(y,ds(a,c),2);h=y.h;if(a.i.g)throw new P(2,9,7001);if(e)for(m in k=Ec(h),l=new Uf(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return y.return(f(h))})});a.j.set(b,g)}function es(a){return K(function(b){return 1==b.g?A(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
749
+ function ds(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=xf,d=a.A.request(c,b),e=function(){return d.abort()},a.h.push(e),A(g,d.promise,2);f=g.h;dc(a.h,e);return g.return(f.data)})};function fs(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}fs.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}E(b,2);return A(b,a.g,4)}if(2!=b.g)return va(b,0);J(b);B(b)})};
750
+ function gs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return A(g,b(f.key,f.value,f),2)}f.continue();B(g)})}})}fs.prototype.store=function(){return this.h};fs.prototype.promise=function(){return this.g};function hs(a){this.h=a;this.g=[]}hs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function is(a,b){return js(a,b,"readwrite")}function js(a,b,c){c=a.h.transaction([b],c);var d=new fs(c,b);a.g.push(d);d.promise().then(function(){dc(a.g,d)},function(){dc(a.g,d)});return d};function ks(a,b,c){this.h=new hs(a);this.i=b;this.g=c}q=ks.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ls(this.i)};q.removeSegments=function(a,b){return ms(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return A(d,ns(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.nf(e)}))})};q.addManifests=function(){return ls(this.g)};
751
+ q.updateManifest=function(){return Promise.reject(new P(2,9,9016,"Cannot modify values in "+this.g))};function os(a,b,c){a=is(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=is(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 ms(this,this.g,a,b)};
752
+ q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return A(d,ns(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Ec(e)})))})};q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=js(a.h,a.g,"readonly"),c=new Map,A(d,gs(b,function(e,f){var g;return K(function(h){if(1==h.g)return A(h,a.Ec(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?A(d,b.promise(),3):d.return(c)})};q.nf=function(a){return a};q.Ec=function(a){return Promise.resolve(a)};
753
+ function ls(a){return Promise.reject(new P(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 K(function(m){if(1==m.g){d=is(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={ed:g.ed},k=h.next())l=k.value,g.ed=e.add(l),g.ed.onsuccess=function(p){return function(){f.push(p.ed.result)}}(g);return A(m,d.promise(),2)}return m.return(f)})};
754
+ function ms(a,b,c,d){a=is(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={dd:e.dd},f=c.next())e.dd=f.value,b.delete(e.dd).onsuccess=function(g){return function(){return d(g.dd)}}(e);return a.promise()}
755
+ function ns(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=js(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ac:h.Ac,xc:h.xc},l=k.next())h.xc=l.value,h.Ac=e.get(h.xc),h.Ac.onsuccess=function(p){return function(){void 0==p.Ac.result&&g.push(p.xc);f[p.xc]=p.Ac.result}}(h);return A(m,d.promise(),2)}if(g.length)throw new P(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function ps(a){this.g=new hs(a)}ps.prototype.destroy=function(){return this.g.destroy()};ps.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=js(a.g,"session-ids","readonly"),c=[],A(d,gs(b,function(e,f){c.push(f)}),2)):3!=d.g?A(d,b.promise(),3):d.return(c)})};ps.prototype.add=function(a){var b=is(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
756
+ ps.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=is(b.g,"session-ids"),A(d,gs(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):A(d,c.promise(),0)})};function qs(){this.g=new Map}qs.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};qs.prototype.init=function(){var a=this;rs.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
757
+ function ss(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ta:d,Ba:f},Ba:e})})});if(b)return b;throw new P(2,9,9013,"Could not find a cell that supports add-operations");}function ts(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ta:d,Ba:f},e)})})}
758
+ function us(a,b,c){a=a.g.get(b);if(!a)throw new P(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new P(2,9,9013,"Could not find cell with name "+c);return b}function vs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ws(a){var b=Array.from(a.g.keys());if(!b.length)throw new P(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
759
+ function xs(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=rs,d.forEach(function(f){(f=f())&&b.push(f)})),A(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.D(0):A(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ys(a,b){rs.set(a,b)}M("shaka.offline.StorageMuxer",qs);qs.unregister=function(a){rs.delete(a)};qs.register=ys;qs.prototype.destroy=qs.prototype.destroy;var rs=new Map;function zs(){ks.apply(this,arguments)}u(zs,ks);zs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=is(c.h,c.g);e=d.store();f=new Lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new P(2,9,9012,"Could not find values for "+a))};return A(g,Promise.all([d.promise(),f]),0)})};
760
+ zs.prototype.Ec=function(a){var b,c,d,e,f,g;return K(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=As(a.periods[c],e),b.push(f);return A(h,Hp(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})})};
761
+ function As(a,b){Bs(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Cs(e,a.startTime,b)})}
762
+ function Cs(a,b,c){var d=a.initSegmentUri?Ds(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,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=Ds(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
763
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}zs.prototype.nf=function(a){return{data:a.data}};function Ds(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 P(2,9,9004,"Could not parse uri "+a);}
764
+ function Bs(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=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
765
+ f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Es(){ks.apply(this,arguments)}u(Es,ks);
766
+ Es.prototype.Ec=function(a){var b,c,d,e,f,g;return K(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;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Fs(p,k.startTime,k.startTime+e));f=l;b.push(f)}return A(h,Hp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
763
767
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
764
- function Ds(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
765
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Es(){is.apply(this,arguments)}u(Es,is);q=Es.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return ms(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Fs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Fs.prototype;
766
- q.init=function(){var a=this,b=new Lc,c=!1,d=new Q(function(){c=!0;b.reject(new P(2,9,9017))});d.S(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new xs(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Cs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
767
- new Cs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Es(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ns(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new P(2,
768
- 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return B(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return B(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return B(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return B(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return B(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),C(b)}})};
768
+ function Fs(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
769
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Gs(){ks.apply(this,arguments)}u(Gs,ks);q=Gs.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return os(this,a,b)};q.Ec=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Hs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Hs.prototype;
770
+ q.init=function(){var a=this,b=new Lc,c=!1,d=new Q(function(){c=!0;b.reject(new P(2,9,9017))});d.S(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new zs(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Es(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
771
+ new Es(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Gs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ps(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new P(2,
772
+ 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:if(!a.m){b.D(10);break}return A(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
769
773
  q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
770
- q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return B(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return B(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return B(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return B(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),B(b,Gs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,B(b,a.init(),0)}})};
771
- function Gs(){var a=new Lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}ws("idb",function(){return Vc("CrKey")||Rc()||!window.indexedDB?null:new Fs});function Hs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Hs.prototype.Sa=function(){return this.i};Hs.prototype.Aa=function(){return this.h};Hs.prototype.key=function(){return this.l};Hs.prototype.toString=function(){return this.j};
772
- function Is(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Hs(b,c,d,Number(a[4])):null};function Js(a,b){this.h=a;this.g=b}
773
- function Ks(a,b){var c=new R(null,0);c.bb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ls(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ib}).map(function(l){return Ms(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ms(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
774
+ q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.D(2);break}return A(b,a.g.destroy(),2);case 2:if(!a.h){b.D(4);break}return A(b,a.h.destroy(),4);case 4:if(!a.i){b.D(6);break}return A(b,a.i.destroy(),6);case 6:if(!a.j){b.D(8);break}return A(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),A(b,Is(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,A(b,a.init(),0)}})};
775
+ function Is(){var a=new Lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new P(2,9,9001,b.error));c.preventDefault()};return a}ys("idb",function(){return Sc("CrKey")||Rc()||!window.indexedDB?null:new Hs});function Js(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Js.prototype.Ta=function(){return this.i};Js.prototype.Ba=function(){return this.h};Js.prototype.key=function(){return this.l};Js.prototype.toString=function(){return this.j};
776
+ function Ks(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Js(b,c,d,Number(a[4])):null};function Ls(a,b){this.h=a;this.g=b}
777
+ function Ms(a,b){var c=new R(null,0);c.Ua(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ns(a,d,e,c);e=b.streams.filter(function(l){return l.type==Ib}).map(function(l){return Os(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Os(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
774
778
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
775
- function Ls(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
776
- b.next())for(e=e.value,g=Ms(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ms(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
777
- function Ms(a,b,c){var d=b.segments.map(function(e){return Ns(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Bj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
778
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ns(a,b){var c=new Hs("segment",a.h,a.g,b.dataKey);return new yi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Os(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
779
- function Os(a,b){var c=new Hs("segment",a.h,a.g,b);return new wi(function(){return[c.toString()]},0,null)};function Ps(){this.g=null}q=Ps.prototype;q.configure=function(){};
780
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Is(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new os;ua(m);return B(m,e.init(),4);case 4:return B(m,ss(e,d.Sa(),d.Aa()),5);case 5:return f=m.h,B(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Js(d.Sa(),d.Aa()),l=Ks(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),B(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
781
- q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new os,E(m,2,3),B(m,e.init(),5);case 5:return B(m,ss(e,d.Sa(),d.Aa()),6);case 6:return f=m.h,B(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.D(3);break}return B(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),B(m,e.destroy(),10);case 10:xa(m,0);break;case 2:I(m),m.D(3)}})};
782
- fh["application/x-offline-manifest"]=function(){return new Ps};function Qs(){}function Rs(a){var b=Is(a);b&&"manifest"==b.g?(a={uri:a,Gf:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=ef(a)):a=b&&"segment"==b.g?Ss(b.key(),b):cf(new P(2,1,9004,a));return a}
783
- function Ss(a,b){var c=new os;return ef(void 0).na(function(){return c.init()}).na(function(){return ss(c,b.Sa(),b.Aa())}).na(function(d){return d.getSegments([b.key()])}).na(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Qs);Qs.plugin=Rs;of("offline",Rs);function Ts(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,x=r(m),y=x.next();!y.done;y=x.next())if(y=y.value,Us(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=Vs(a,b,g);return B(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l.return(d)}})}
784
- function Vs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new sg({Pb:b,onError:function(){},Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),B(f,Ag(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 I(f),B(f,d.destroy(),5);case 5:return f.return([]);case 3:return E(f,6),B(f,Lg(d),8);case 8:va(f,7);break;case 6:return I(f),B(f,d.destroy(),
785
- 9);case 9:return f.return([]);case 7:return e=[],B(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return E(h,2),B(h,Mg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);I(h);C(h)})})),10);case 10:return B(f,d.destroy(),11);case 11:return f.return(e)}})}
786
- function Us(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ec(a.audioCapabilities,b.audioCapabilities,c)&&ec(a.videoCapabilities,b.videoCapabilities,c)};function Ws(a,b,c){var d=b.presentationTimeline.getDuration();b=Xs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ys(a,b){var c=Ks(new Js(a.Sa(),a.Aa()),b),d=b.appMetadata||{};c=Xs(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}}
787
- function Xs(a){var b=[],c=ye(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(pe(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(qe(c.value));return b};function Zs(){this.g={}}function $s(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 at(a,b){a.g[b.id]=b.bandwidth||2048}function bt(a,b){a=a.g[b];null==a&&(a=0);return a};function ct(a){var b=this;if(a&&a.constructor!=U)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ic()):(this.h=ul(),this.g=new nf);this.i=[];this.j=[];var c=!a;this.l=new yf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return B(k,Promise.all(b.j.map(function(l){return Zr(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return B(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return B(k,b.g.destroy(),4);
788
- case 4:b.h=null,b.g=null,C(k)}})})}function dt(){if(Oc())a:{var a=r(ps.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=ct.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ol(a,b));return wl(this.h,a)};q.getConfiguration=function(){var a=ul();wl(a,this.h,ul());return a};q.Ic=function(){return this.g};
789
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Yr(this.g);this.j.push(f);b=et(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return B(h,eh(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new bf(b,function(){return Zr(f)});b.finally(function(){dc(d.j,f)});return ft(this,b)};
790
- function et(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,x,y,v,w,A,z;return K(function(D){switch(D.g){case 1:return gt(),h=g=null,k=new os,p=m=l=null,E(D,2,3),B(D,d(),5);case 5:return g=D.h,B(D,ht(a,b,g,e),6);case 6:n=D.h;it(a);t=!n.presentationTimeline.U()&&!n.presentationTimeline.Mb();if(!t)throw new P(2,9,9005,b);return B(D,jt(a,n,function(G){p=p||G},e),7);case 7:h=D.h;it(a);if(p)throw p;return B(D,kt(n,e),8);case 8:return B(D,k.init(),9);case 9:return it(a),B(D,qs(k),10);case 10:return l=D.h,it(a),x=lt(h,
791
- n,b,c,e,f),y=x.Vg,v=x.Oe,B(D,l.Aa.addManifests([y]),11);case 11:w=D.h;it(a);m=w[0];it(a);if(p)throw p;return B(D,mt(a,v,m,y,f,e,l.Aa,n,h),12);case 12:return it(a),A=new Hs("manifest",l.path.Sa,l.path.Aa,m),D.return(Ys(A,y));case 3:return wa(D),B(D,k.destroy(),13);case 13:if(!g){D.D(14);break}return B(D,g.stop(),14);case 14:if(!h){D.D(16);break}return B(D,h.destroy(),16);case 16:xa(D,0);break;case 2:z=I(D);if(null==m){D.D(18);break}return B(D,nt(m),18);case 18:throw p||z;}})}
792
- function mt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,x,y,v,w,A;return K(function(z){switch(z.g){case 1:l={};m=0;p=function(D,G){var F,H,J,L,N,T,aa;return K(function(ea){if(1==ea.g){F={};H=r(D);for(J=H.next();!J.done;F={Fb:F.Fb},J=H.next())F.Fb=J.value,L=Vr(F.Fb,f),N=F.Fb.i,T=F.Fb.h,aa=function(ka){return function(Ba){var Ia,Ja,Na;return K(function(Oa){if(1==Oa.g)return B(Oa,g.addSegments([{data:Ba}]),2);Ia=Oa.h;it(a);Ja=ka.Fb.g;Na=Ur(Ja);l[Na]=Ia[0];m+=Ba.byteLength;C(Oa)})}}(F),as(e,F.Fb.groupId,L,N,T,aa);
793
- return B(ea,cs(e),2)}if(!G)return ea.D(0);it(a);ot(h,d,k,f);return B(ea,g.updateManifest(c,d),0)})};n=!1;E(z,2);if(!pt(h)||!n||qt(h)){z.D(4);break}return B(z,p(b.filter(function(D){return D.h}),!0),5);case 5:return it(a),b=b.filter(function(D){return!D.h}),t=l,x=m,l={},m=0,B(z,rt(g,c,d,t,x,function(){return it(a)}),6);case 6:it(a);case 4:if(n){z.D(7);break}return B(z,p(b,!1),8);case 8:return it(a),y=l,v=m,l={},m=0,B(z,rt(g,c,d,y,v,function(){return it(a)}),9);case 9:it(a);case 7:va(z,0);break;case 2:return w=
794
- I(z),A=Object.values(l),B(z,g.removeSegments(A,function(){}),10);case 10:throw w;}})}function nt(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new os,B(f,b.init(),2);case 2:return B(f,qs(b),3);case 3:return c=f.h,d=new Hs("manifest",c.path.Sa,c.path.Aa,a),B(f,b.destroy(),4);case 4:return e=new ct,B(f,e.remove(d.toString()),0)}})}
795
- function rt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,x,y,v;return K(function(w){switch(w.g){case 1:g=!1;E(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,x=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=x&&(t.dataKey=x,t.pendingSegmentRefId=void 0),x=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=x&&(t.initSegmentKey=x,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
796
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return B(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=I(w),B(w,nt(b),5);case 5:if(g){w.D(6);break}v=Object.values(d);return B(w,a.removeSegments(v,function(){}),6);case 6:throw y;}})}
797
- function kt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,A,z,D,G,F,H,J,L,N,T,aa,ea,ka;return K(function(Ba){switch(Ba.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),B(Ba,ce(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(pe(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=
798
- n.value,d.push(qe(t));x=r(a.imageStreams);for(y=x.next();!y.done;y=x.next())v=y.value,d.push(re(v));return B(Ba,b.offline.trackSelectionCallback(d),3);case 3:w=Ba.h;A=a.presentationTimeline.getDuration();z=0;D=r(w);for(G=D.next();!G.done;G=D.next())F=G.value,H=F.bandwidth*A/8,z+=H;E(Ba,4);return B(Ba,b.offline.downloadSizeCallback(z),6);case 6:J=Ba.h;if(!J)throw new P(2,9,9014);va(Ba,5);break;case 4:L=I(Ba);if(L instanceof P)throw L;throw new P(2,9,9015);case 5:N=new Set;T=new Set;aa=new Set;ea=r(w);
799
- for(G=ea.next();!G.done;G=ea.next())ka=G.value,"variant"==ka.type&&N.add(ka.id),"text"==ka.type&&T.add(ka.id),"image"==ka.type&&aa.add(ka.id);a.variants=a.variants.filter(function(Ia){return N.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return T.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return aa.has(Ia.id)});st(a);C(Ba)}})}
800
- function lt(a,b,c,d,e,f){var g=Ws(c,b,d),h=e.offline.progressCallback;$r(f,function(t,x){g.size=x;h(g,t)},function(t,x){k&&e.offline.usePersistentLicense&&l==x&&Ig(a,"cenc",t)});var k=pt(b)&&!qt(b),l=null;k&&(l=tt.get(a.g.keySystem));for(var m=new Zs,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())at(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())$s(m,p.value);m=ut(f,m,b,e);f=m.streams;m=m.Oe;n=a.g;p=e.offline.usePersistentLicense;
801
- n&&p&&(n.initData=[]);return{Vg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Rg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Oe:m}}function pt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
802
- function qt(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 ot(a,b,c,d){b.expiration=c.Hc();c=Rg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(pt(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return vt(this,wt(this,a))};
803
- function wt(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:gt();c=Is(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new os;ua(k);return B(k,e.init(),4);case 4:return B(k,ss(e,d.Sa(),d.Aa()),5);case 5:return f=k.h,B(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],B(k,Promise.all([xt(a,h,e),yt(f,d,h)]),2);case 2:return wa(k),B(k,e.destroy(),8);case 8:xa(k,0)}})}
804
- function zt(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function xt(a,b,c){return K(function(d){return B(d,At(a.g,a.h.drm,c,b),0)})}
805
- function yt(a,b,c){function d(){}var e=Bt(c);Ys(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.jh=function(){return vt(this,Ct(this))};
806
- function Ct(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return gt(),b=a.g,c=a.h.drm,d=new os,e=!1,ua(p),B(p,d.init(),4);case 4:f=[],ts(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return B(p,k.getAll(),8);case 8:return l=p.h,B(p,Ts(c,b,l),9);case 9:return m=p.h,B(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return wa(p),B(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p.return(!e)}})}
807
- q.list=function(){return vt(this,Dt())};function Dt(){var a,b,c;return K(function(d){switch(d.g){case 1:return gt(),a=[],b=new os,ua(d),B(d,b.init(),4);case 4:return c=Promise.resolve(),rs(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return B(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Ys(new Hs("manifest",e.Sa,e.Aa,l),k);a.push(k)});C(h)})})}),B(d,c,2);case 2:return wa(d),B(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
808
- function ht(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},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(){}},c.configure(d.manifest),
809
- it(a),B(l,c.start(b,g),2);if(3!=l.g)return h=l.h,it(a),k=Et(h),B(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);it(a);if(e)throw e;return l.return(h)})}
810
- function jt(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new sg({Pb:a.g,onError:c,Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),B(f,xg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return B(f,Lg(e),3);case 3:return B(f,Kg(e),4);case 4:return f.return(e)}})}
811
- function ut(a,b,c,d){var e=new Map,f=Et(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Ft(a,b,c,h,d,e);g.set(h.id,k)}a=r(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()),Oe:Array.from(e.values())}}
812
- function Ft(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,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,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
813
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Gt(d,c.presentationTimeline.mb(),function(l){var m=Ur(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=bt(b,d.id)*n;n=Xr(a.g,n);f.set(m,new Tr(l,n,k,!1))}l.i&&(p=Ur(l.i),f.has(p)||(n=.5*bt(b,d.id),n=Xr(a.g,n),f.set(p,new Tr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
814
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Gt(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)}function it(a){if(a.l.g)throw new P(2,9,7001);}function gt(){if(!dt())throw new P(2,9,9E3);}function vt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),B(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);dc(a.i,b);return xa(c,0)})}
815
- function ft(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){dc(a.i,c)})}function Bt(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(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)}
816
- function At(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=us(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:zt(d,!1),videoCapabilities:zt(d,!0)}});return B(h,Ts(b,a,f),2)}return 3!=h.g?(g=h.h,B(h,e.remove(g),3)):B(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
817
- function Et(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
818
- function st(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=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",ct);ct.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new os,ua(b),B(b,vs(a),2)):5!=b.g?(wa(b),B(b,a.destroy(),5)):xa(b,0)})};ct.prototype.list=ct.prototype.list;
819
- ct.prototype.removeEmeSessions=ct.prototype.jh;ct.prototype.remove=ct.prototype.remove;ct.prototype.store=ct.prototype.store;ct.prototype.getNetworkingEngine=ct.prototype.Ic;ct.prototype.getConfiguration=ct.prototype.getConfiguration;ct.prototype.configure=ct.prototype.configure;ct.prototype.destroy=ct.prototype.destroy;ct.support=dt;
820
- var tt=(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").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
821
- dn.offline=dt;function Ht(){}function It(){for(var a=r(Jt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.cg()}catch(c){Ua("Error installing polyfill!",c)}}}function Kt(a,b){a={priority:b||0,cg:a};for(b=0;b<Jt.length;b++)if(Jt[b].priority<a.priority){Jt.splice(b,0,a);return}Jt.push(a)}M("shaka.polyfill",Ht);Ht.register=Kt;Ht.installAll=It;var Jt=[];function Lt(){this.g=new Mt}function Nt(){window.AbortController||(window.AbortController=Lt,window.AbortSignal=Mt)}Lt.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new O("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(Lt.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Ht.AbortController=Lt;Lt.install=Nt;
822
- function Mt(){fb.call(this);this.h=!1;this.g=void 0;this.onabort=null}u(Mt,fb);fa.Object.defineProperties(Mt.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Kt(Nt);function Ot(){}function Pt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Qt(b.value)}function Qt(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)}})}Ht.Aria=Ot;Ot.install=Pt;Kt(Pt);function Rt(){}function St(){Tt()}Ht.EncryptionScheme=Rt;Rt.install=St;Kt(St,-2);function Ut(){}
823
- function Vt(){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}}),
824
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Wt);document.addEventListener("webkitfullscreenerror",Wt);document.addEventListener("mozfullscreenchange",Wt);document.addEventListener("mozfullscreenerror",Wt);document.addEventListener("MSFullscreenChange",Wt);document.addEventListener("MSFullscreenError",Wt)}}
825
- function Wt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Ht.Fullscreen=Ut;Ut.install=Vt;Kt(Vt);function Xt(){}function Yt(){var a=!0;if(Yc()||Vc("PlayStation 5")||Zc()||Vc("Web0S")||Wc()||Vc("CrKey")||Vc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Zt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=$t)}
826
- function $t(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,x,y,v,w;return K(function(A){switch(A.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return A.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Oc())return A.return(b);if(c){if(Vc("CrKey")){if(!window.cast)throw new P(2,8,8E3);if(cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+
827
- c.framerate);"pq"===c.transferFunction&&(z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=MediaSource.isTypeSupported(c.contentType)}else z=MediaSource.isTypeSupported(c.contentType);e=z;if(!e)return A.return(b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return A.return(b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Pc(h),!k)||d&&(l=d.contentType,m=Pc(l),!m))return A.return(b)}else return A.return(b);if(!a.keySystemConfiguration)return b.supported=!0,A.return(Promise.resolve(b));
828
- p=a.keySystemConfiguration;n=[];t=[];p.audio&&(x={robustness:p.audio.robustness||"",contentType:a.audio.contentType},n.push(x));p.video&&(y={robustness:p.video.robustness||"",contentType:a.video.contentType},t.push(y));v={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};n.length&&(v.audioCapabilities=n);t.length&&(v.videoCapabilities=t);E(A,3);return B(A,navigator.requestMediaKeySystemAccess(p.keySystem,[v]),
829
- 5);case 5:w=A.h;va(A,4);break;case 3:I(A);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return A.return(b)}})}Ht.MediaCapabilities=Xt;Xt.install=Yt;var Zt=null;Xt.originalMcap=Zt;Kt(Yt,-1);function au(){}function bu(){var a=$c();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?cu():a?12>=a?(du(),eu()):du():(Vc("Tizen 2")||Vc("Tizen 3")||Vc("Tizen 4"))&&fu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&gu()}
830
- function du(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function eu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function fu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=zd(b)[0]&&a(b)}}
831
- function cu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
832
- function gu(){var a=MediaSource.isTypeSupported;Vc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Ht.MediaSource=au;au.install=bu;Kt(bu);function hu(){}function iu(){screen.orientation||void 0!=window.orientation&&ju()}function ju(){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 ku;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Ht.Orientation=hu;
833
- hu.install=iu;function ku(){fb.call(this);this.type="";this.angle=0}u(ku,fb);
834
- ku.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)};
835
- ku.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Kt(iu);function lu(){}function mu(a,b){try{var c=new nu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ou(a){var b=this.mediaKeys;b&&b!=a&&pu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?pu(a,this):Promise.resolve()}function qu(a){a=Ec(a.initData);if(Hc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=ed(a.subarray(4),!0);a=hd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Fc(a);this.dispatchEvent(b)}
836
- Ht.PatchedMediaKeysApple=lu;lu.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ou,window.MediaKeys=ru,window.MediaKeySystemAccess=nu,navigator.requestMediaKeySystemAccess=mu,window.shakaMediaKeysPolyfill=!0)};
837
- function nu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
779
+ function Ns(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
780
+ b.next())for(e=e.value,g=Os(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Os(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
781
+ function Os(a,b,c){var d=b.segments.map(function(e){return Ps(a,e)});c.mc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Dj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
782
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ps(a,b){var c=new Js("segment",a.h,a.g,b.dataKey);return new yi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Qs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
783
+ function Qs(a,b){var c=new Js("segment",a.h,a.g,b);return new wi(function(){return[c.toString()]},0,null)};function Rs(){this.g=null}q=Rs.prototype;q.configure=function(){};
784
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=Ks(a);c.g=d;if(null==d||"manifest"!=d.g)throw new P(2,1,9004,a);e=new qs;ua(m);return A(m,e.init(),4);case 4:return A(m,us(e,d.Ta(),d.Ba()),5);case 5:return f=m.h,A(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ls(d.Ta(),d.Ba()),l=Ms(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),A(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
785
+ q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new qs,E(m,2,3),A(m,e.init(),5);case 5:return A(m,us(e,d.Ta(),d.Ba()),6);case 6:return f=m.h,A(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.D(3);break}return A(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),A(m,e.destroy(),10);case 10:xa(m,0);break;case 2:J(m),m.D(3)}})};
786
+ fh["application/x-offline-manifest"]=function(){return new Rs};function Ss(){}function Ts(a){var b=Ks(a);b&&"manifest"==b.g?(a={uri:a,If:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=ef(a)):a=b&&"segment"==b.g?Us(b.key(),b):cf(new P(2,1,9004,a));return a}
787
+ function Us(a,b){var c=new qs;return ef(void 0).na(function(){return c.init()}).na(function(){return us(c,b.Ta(),b.Ba())}).na(function(d){return d.getSegments([b.key()])}).na(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Ss);Ss.plugin=Ts;of("offline",Ts);function Vs(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,y=r(m),x=y.next();!x.done;x=y.next())if(x=x.value,Ws(x.info,n)){x.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.D(4);break}g=f.value;h=Xs(a,b,g);return A(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.D(2);break;case 4:return l.return(d)}})}
788
+ function Xs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new qg({Pb:b,onError:function(){},Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),E(f,2),d.configure(a),A(f,Ag(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 J(f),A(f,d.destroy(),5);case 5:return f.return([]);case 3:return E(f,6),A(f,Lg(d),8);case 8:va(f,7);break;case 6:return J(f),A(f,d.destroy(),
789
+ 9);case 9:return f.return([]);case 7:return e=[],A(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return E(h,2),A(h,Mg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);J(h);B(h)})})),10);case 10:return A(f,d.destroy(),11);case 11:return f.return(e)}})}
790
+ function Ws(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ec(a.audioCapabilities,b.audioCapabilities,c)&&ec(a.videoCapabilities,b.videoCapabilities,c)};function Ys(a,b,c){var d=b.presentationTimeline.getDuration();b=Zs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function $s(a,b){var c=Ms(new Ls(a.Ta(),a.Ba()),b),d=b.appMetadata||{};c=Zs(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}}
791
+ function Zs(a){var b=[],c=ye(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(pe(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(qe(c.value));return b};function at(){this.g={}}function bt(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 ct(a,b){a.g[b.id]=b.bandwidth||2048}function dt(a,b){a=a.g[b];null==a&&(a=0);return a};function et(a){var b=this;if(a&&a.constructor!=T)throw new P(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.Ic()):(this.h=wl(),this.g=new nf);this.i=[];this.j=[];var c=!a;this.l=new yf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return A(k,Promise.all(b.j.map(function(l){return as(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return A(k,Promise.all(e),3);case 3:if(!c){k.D(4);break}return A(k,b.g.destroy(),4);
792
+ case 4:b.h=null,b.g=null,B(k)}})})}function ft(){if(Oc())a:{var a=r(rs.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=et.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ql(a,b));return yl(this.h,a)};q.getConfiguration=function(){var a=wl();yl(a,this.h,wl());return a};q.Ic=function(){return this.g};
793
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new $r(this.g);this.j.push(f);b=gt(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return A(h,eh(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new bf(b,function(){return as(f)});b.finally(function(){dc(d.j,f)});return ht(this,b)};
794
+ function gt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v,w,C,z;return K(function(D){switch(D.g){case 1:return it(),h=g=null,k=new qs,p=m=l=null,E(D,2,3),A(D,d(),5);case 5:return g=D.h,A(D,jt(a,b,g,e),6);case 6:n=D.h;kt(a);t=!n.presentationTimeline.U()&&!n.presentationTimeline.Mb();if(!t)throw new P(2,9,9005,b);return A(D,lt(a,n,function(G){p=p||G},e),7);case 7:h=D.h;kt(a);if(p)throw p;return A(D,mt(n,e),8);case 8:return A(D,k.init(),9);case 9:return kt(a),A(D,ss(k),10);case 10:return l=D.h,kt(a),y=nt(h,
795
+ n,b,c,e,f),x=y.Xg,v=y.Qe,A(D,l.Ba.addManifests([x]),11);case 11:w=D.h;kt(a);m=w[0];kt(a);if(p)throw p;return A(D,ot(a,v,m,x,f,e,l.Ba,n,h),12);case 12:return kt(a),C=new Js("manifest",l.path.Ta,l.path.Ba,m),D.return($s(C,x));case 3:return wa(D),A(D,k.destroy(),13);case 13:if(!g){D.D(14);break}return A(D,g.stop(),14);case 14:if(!h){D.D(16);break}return A(D,h.destroy(),16);case 16:xa(D,0);break;case 2:z=J(D);if(null==m){D.D(18);break}return A(D,pt(m),18);case 18:throw p||z;}})}
796
+ function ot(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,y,x,v,w,C;return K(function(z){switch(z.g){case 1:l={};m=0;p=function(D,G){var F,H,I,L,N,V,aa;return K(function(ea){if(1==ea.g){F={};H=r(D);for(I=H.next();!I.done;F={Fb:F.Fb},I=H.next())F.Fb=I.value,L=Xr(F.Fb,f),N=F.Fb.i,V=F.Fb.h,aa=function(la){return function(Ba){var Ia,Ja,Na;return K(function(Oa){if(1==Oa.g)return A(Oa,g.addSegments([{data:Ba}]),2);Ia=Oa.h;kt(a);Ja=la.Fb.g;Na=Wr(Ja);l[Na]=Ia[0];m+=Ba.byteLength;B(Oa)})}}(F),cs(e,F.Fb.groupId,L,N,V,aa);
797
+ return A(ea,es(e),2)}if(!G)return ea.D(0);kt(a);qt(h,d,k,f);return A(ea,g.updateManifest(c,d),0)})};n=!1;E(z,2);if(!rt(h)||!n||st(h)){z.D(4);break}return A(z,p(b.filter(function(D){return D.h}),!0),5);case 5:return kt(a),b=b.filter(function(D){return!D.h}),t=l,y=m,l={},m=0,A(z,tt(g,c,d,t,y,function(){return kt(a)}),6);case 6:kt(a);case 4:if(n){z.D(7);break}return A(z,p(b,!1),8);case 8:return kt(a),x=l,v=m,l={},m=0,A(z,tt(g,c,d,x,v,function(){return kt(a)}),9);case 9:kt(a);case 7:va(z,0);break;case 2:return w=
798
+ J(z),C=Object.values(l),A(z,g.removeSegments(C,function(){}),10);case 10:throw w;}})}function pt(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new qs,A(f,b.init(),2);case 2:return A(f,ss(b),3);case 3:return c=f.h,d=new Js("manifest",c.path.Ta,c.path.Ba,a),A(f,b.destroy(),4);case 4:return e=new et,A(f,e.remove(d.toString()),0)}})}
799
+ function tt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v;return K(function(w){switch(w.g){case 1:g=!1;E(w,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,y=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=y&&(t.dataKey=y,t.pendingSegmentRefId=void 0),y=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=y&&(t.initSegmentKey=y,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
800
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return A(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=J(w),A(w,pt(b),5);case 5:if(g){w.D(6);break}v=Object.values(d);return A(w,a.removeSegments(v,function(){}),6);case 6:throw x;}})}
801
+ function mt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,C,z,D,G,F,H,I,L,N,V,aa,ea,la;return K(function(Ba){switch(Ba.g){case 1:return c={width:Infinity,height:Infinity},Zd(a,b.restrictions,c),A(Ba,ce(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Nd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(pe(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=
802
+ n.value,d.push(qe(t));y=r(a.imageStreams);for(x=y.next();!x.done;x=y.next())v=x.value,d.push(re(v));return A(Ba,b.offline.trackSelectionCallback(d),3);case 3:w=Ba.h;C=a.presentationTimeline.getDuration();z=0;D=r(w);for(G=D.next();!G.done;G=D.next())F=G.value,H=F.bandwidth*C/8,z+=H;E(Ba,4);return A(Ba,b.offline.downloadSizeCallback(z),6);case 6:I=Ba.h;if(!I)throw new P(2,9,9014);va(Ba,5);break;case 4:L=J(Ba);if(L instanceof P)throw L;throw new P(2,9,9015);case 5:N=new Set;V=new Set;aa=new Set;ea=r(w);
803
+ for(G=ea.next();!G.done;G=ea.next())la=G.value,"variant"==la.type&&N.add(la.id),"text"==la.type&&V.add(la.id),"image"==la.type&&aa.add(la.id);a.variants=a.variants.filter(function(Ia){return N.has(Ia.id)});a.textStreams=a.textStreams.filter(function(Ia){return V.has(Ia.id)});a.imageStreams=a.imageStreams.filter(function(Ia){return aa.has(Ia.id)});ut(a);B(Ba)}})}
804
+ function nt(a,b,c,d,e,f){var g=Ys(c,b,d),h=e.offline.progressCallback;bs(f,function(t,y){g.size=y;h(g,t)},function(t,y){k&&e.offline.usePersistentLicense&&l==y&&Ig(a,"cenc",t)});var k=rt(b)&&!st(b),l=null;k&&(l=vt.get(a.g.keySystem));for(var m=new at,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())ct(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())bt(m,p.value);m=wt(f,m,b,e);f=m.streams;m=m.Qe;n=a.g;p=e.offline.usePersistentLicense;
805
+ n&&p&&(n.initData=[]);return{Xg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Hc(),streams:f,sessionIds:p?Rg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},Qe:m}}function rt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
806
+ function st(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 qt(a,b,c,d){b.expiration=c.Hc();c=Rg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(rt(a)&&d.offline.usePersistentLicense&&!c.length)throw new P(2,9,9007);}q.remove=function(a){return xt(this,yt(this,a))};
807
+ function yt(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:it();c=Ks(b);if(null==c||"manifest"!=c.g)throw new P(2,9,9004,b);d=c;e=new qs;ua(k);return A(k,e.init(),4);case 4:return A(k,us(e,d.Ta(),d.Ba()),5);case 5:return f=k.h,A(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],A(k,Promise.all([zt(a,h,e),At(f,d,h)]),2);case 2:return wa(k),A(k,e.destroy(),8);case 8:xa(k,0)}})}
808
+ function Bt(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:wd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function zt(a,b,c){return K(function(d){return A(d,Ct(a.g,a.h.drm,c,b),0)})}
809
+ function At(a,b,c){function d(){}var e=Dt(c);$s(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.lh=function(){return xt(this,Et(this))};
810
+ function Et(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return it(),b=a.g,c=a.h.drm,d=new qs,e=!1,ua(p),A(p,d.init(),4);case 4:f=[],vs(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.D(2);break}k=h.value;return A(p,k.getAll(),8);case 8:return l=p.h,A(p,Vs(c,b,l),9);case 9:return m=p.h,A(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.D(5);break;case 2:return wa(p),A(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p.return(!e)}})}
811
+ q.list=function(){return xt(this,Ft())};function Ft(){var a,b,c;return K(function(d){switch(d.g){case 1:return it(),a=[],b=new qs,ua(d),A(d,b.init(),4);case 4:return c=Promise.resolve(),ts(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return A(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=$s(new Js("manifest",e.Ta,e.Ba,l),k);a.push(k)});B(h)})})}),A(d,c,2);case 2:return wa(d),A(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
812
+ function jt(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},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(){}},c.configure(d.manifest),
813
+ kt(a),A(l,c.start(b,g),2);if(3!=l.g)return h=l.h,kt(a),k=Gt(h),A(l,Promise.all(gb(k,function(m){return m.createSegmentIndex()})),3);kt(a);if(e)throw e;return l.return(h)})}
814
+ function lt(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new qg({Pb:a.g,onError:c,Bd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),A(f,xg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return A(f,Lg(e),3);case 3:return A(f,Kg(e),4);case 4:return f.return(e)}})}
815
+ function wt(a,b,c,d){var e=new Map,f=Gt(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Ht(a,b,c,h,d,e);g.set(h.id,k)}a=r(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()),Qe:Array.from(e.values())}}
816
+ function Ht(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,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,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
817
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;It(d,c.presentationTimeline.ob(),function(l){var m=Wr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=dt(b,d.id)*n;n=Zr(a.g,n);f.set(m,new Vr(l,n,k,!1))}l.i&&(p=Wr(l.i),f.has(p)||(n=.5*dt(b,d.id),n=Zr(a.g,n),f.set(p,new Vr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
818
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function It(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)}function kt(a){if(a.l.g)throw new P(2,9,7001);}function it(){if(!ft())throw new P(2,9,9E3);}function xt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),A(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);dc(a.i,b);return xa(c,0)})}
819
+ function ht(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){dc(a.i,c)})}function Dt(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(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)}
820
+ function Ct(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=ws(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Bt(d,!1),videoCapabilities:Bt(d,!0)}});return A(h,Vs(b,a,f),2)}return 3!=h.g?(g=h.h,A(h,e.remove(g),3)):A(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
821
+ function Gt(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
822
+ function ut(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=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",et);et.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new qs,ua(b),A(b,xs(a),2)):5!=b.g?(wa(b),A(b,a.destroy(),5)):xa(b,0)})};et.prototype.list=et.prototype.list;
823
+ et.prototype.removeEmeSessions=et.prototype.lh;et.prototype.remove=et.prototype.remove;et.prototype.store=et.prototype.store;et.prototype.getNetworkingEngine=et.prototype.Ic;et.prototype.getConfiguration=et.prototype.getConfiguration;et.prototype.configure=et.prototype.configure;et.prototype.destroy=et.prototype.destroy;et.support=ft;
824
+ var vt=(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").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
825
+ fn.offline=ft;function Jt(){}function Kt(){for(var a=r(Lt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.eg()}catch(c){Ua("Error installing polyfill!",c)}}}function Mt(a,b){a={priority:b||0,eg:a};for(b=0;b<Lt.length;b++)if(Lt[b].priority<a.priority){Lt.splice(b,0,a);return}Lt.push(a)}M("shaka.polyfill",Jt);Jt.register=Mt;Jt.installAll=Kt;var Lt=[];function Nt(){this.g=new Ot}function Pt(){window.AbortController||(window.AbortController=Nt,window.AbortSignal=Ot)}Nt.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new O("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(Nt.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Jt.AbortController=Nt;Nt.install=Pt;
826
+ function Ot(){fb.call(this);this.h=!1;this.g=void 0;this.onabort=null}u(Ot,fb);fa.Object.defineProperties(Ot.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Mt(Pt);function Qt(){}function Rt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())St(b.value)}function St(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)}})}Jt.Aria=Qt;Qt.install=Rt;Mt(Rt);function Tt(){}function Ut(){Vt()}Jt.EncryptionScheme=Tt;Tt.install=Ut;Mt(Ut,-2);function Wt(){}
827
+ function Xt(){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}}),
828
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Yt);document.addEventListener("webkitfullscreenerror",Yt);document.addEventListener("mozfullscreenchange",Yt);document.addEventListener("mozfullscreenerror",Yt);document.addEventListener("MSFullscreenChange",Yt);document.addEventListener("MSFullscreenError",Yt)}}
829
+ function Yt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}Jt.Fullscreen=Wt;Wt.install=Xt;Mt(Xt);function Zt(){}function $t(){var a=!0;if(Yc()||Sc("PlayStation 5")||Zc()||Sc("Web0S")||Wc()||Sc("CrKey")||Sc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),au=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=bu)}
830
+ function bu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w;return K(function(C){switch(C.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return C.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!Oc())return C.return(b);if(c){if(Sc("CrKey")){if(!window.cast)throw new P(2,8,8E3);if(cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+
831
+ c.framerate);"pq"===c.transferFunction&&(z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=MediaSource.isTypeSupported(c.contentType)}else z=MediaSource.isTypeSupported(c.contentType);e=z;if(!e)return C.return(b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return C.return(b)}else if("file"==a.type){if(c&&(h=c.contentType,k=Pc(h),!k)||d&&(l=d.contentType,m=Pc(l),!m))return C.return(b)}else return C.return(b);if(!a.keySystemConfiguration)return b.supported=!0,C.return(Promise.resolve(b));
832
+ p=a.keySystemConfiguration;n=[];t=[];p.audio&&(y={robustness:p.audio.robustness||"",contentType:a.audio.contentType},n.push(y));p.video&&(x={robustness:p.video.robustness||"",contentType:a.video.contentType},t.push(x));v={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};n.length&&(v.audioCapabilities=n);t.length&&(v.videoCapabilities=t);E(C,3);return A(C,navigator.requestMediaKeySystemAccess(p.keySystem,[v]),
833
+ 5);case 5:w=C.h;va(C,4);break;case 3:J(C);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return C.return(b)}})}Jt.MediaCapabilities=Zt;Zt.install=$t;var au=null;Zt.originalMcap=au;Mt($t,-1);function cu(){}function du(){var a=$c();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?eu():a?12>=a?(fu(),gu()):fu():(Sc("Tizen 2")||Sc("Tizen 3")||Sc("Tizen 4"))&&hu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&iu()}
834
+ function fu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function gu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function hu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=zd(b)[0]&&a(b)}}
835
+ function eu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
836
+ function iu(){var a=MediaSource.isTypeSupported;Sc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Jt.MediaSource=cu;cu.install=du;Mt(du);function ju(){}function ku(){screen.orientation||void 0!=window.orientation&&lu()}function lu(){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 mu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Jt.Orientation=ju;
837
+ ju.install=ku;function mu(){fb.call(this);this.type="";this.angle=0}u(mu,fb);
838
+ mu.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)};
839
+ mu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Mt(ku);function nu(){}function ou(a,b){try{var c=new pu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function qu(a){var b=this.mediaKeys;b&&b!=a&&ru(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?ru(a,this):Promise.resolve()}function su(a){a=Ec(a.initData);if(Hc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=ed(a.subarray(4),!0);a=hd(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Fc(a);this.dispatchEvent(b)}
840
+ Jt.PatchedMediaKeysApple=nu;nu.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qu,window.MediaKeys=tu,window.MediaKeySystemAccess=pu,navigator.requestMediaKeySystemAccess=ou,window.shakaMediaKeysPolyfill=!0)};
841
+ function pu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
838
842
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.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;}
839
- nu.prototype.createMediaKeys=function(){var a=new ru(this.keySystem);return Promise.resolve(a)};nu.prototype.getConfiguration=function(){return this.g};function ru(a){this.h=new WebKitMediaKeys(a);this.g=new Af}ru.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new su(this.h,a)};ru.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
840
- function pu(a,b){a.g.Sb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",qu);try{return lj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function su(a){fb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Af;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new tu}u(su,fb);q=su.prototype;
841
- q.generateRequest=function(a,b){var c=this;this.h=new Lc;try{var d=this.l.createSession("video/mp4",Ec(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.fc()?"license-request":"license-renewal").set("message",Fc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(uu(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
842
- 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:uu(c,"output-not-allowed");break;default:uu(c,"internal-error")}});uu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
843
- q.update=function(a){this.g=new Lc;try{this.i.update(Ec(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}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 uu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
844
- function tu(){this.size=0;this.g=void 0}q=tu.prototype;q.fc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,ch.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ch.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function vu(){}function wu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=xu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yu,window.MediaKeys=zu,window.MediaKeySystemAccess=Au,window.shakaMediaKeysPolyfill=!0)}function xu(){return Promise.reject(Error("The key system specified is not supported."))}
845
- function yu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ht.PatchedMediaKeysNop=vu;vu.install=wu;function zu(){throw new TypeError("Illegal constructor.");}zu.prototype.createSession=function(){};zu.prototype.setServerCertificate=function(){};function Au(){this.keySystem="";throw new TypeError("Illegal constructor.");}Au.prototype.getConfiguration=function(){};Au.prototype.createMediaKeys=function(){};Kt(wu,-10);function Bu(){}
846
- function Cu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Du="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Eu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Fu;window.MediaKeys=Gu;window.MediaKeySystemAccess=Hu;window.shakaMediaKeysPolyfill=!0}}
847
- function Iu(a){var b=Du;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Eu(a,b){try{var c=new Hu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Fu(a){var b=this.mediaKeys;b&&b!=a&&Ju(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Ju(a,this);return Promise.resolve()}Ht.PatchedMediaKeysWebkit=Bu;Bu.install=Cu;
848
- function Hu(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=r(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=r(f.audioCapabilities),
843
+ pu.prototype.createMediaKeys=function(){var a=new tu(this.keySystem);return Promise.resolve(a)};pu.prototype.getConfiguration=function(){return this.g};function tu(a){this.h=new WebKitMediaKeys(a);this.g=new Af}tu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new uu(this.h,a)};tu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
844
+ function ru(a,b){a.g.Sb();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",su);try{return nj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function uu(a){fb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new Af;this.sessionId="";this.expiration=NaN;this.closed=new Lc;this.keyStatuses=new vu}u(uu,fb);q=uu.prototype;
845
+ q.generateRequest=function(a,b){var c=this;this.h=new Lc;try{var d=this.l.createSession("video/mp4",Ec(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.fc()?"license-request":"license-renewal").set("message",Fc(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(wu(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
846
+ 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:wu(c,"output-not-allowed");break;default:wu(c,"internal-error")}});wu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
847
+ q.update=function(a){this.g=new Lc;try{this.i.update(Ec(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sb()}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 wu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
848
+ function vu(){this.size=0;this.g=void 0}q=vu.prototype;q.fc=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,ch.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ch.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function xu(){}function yu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=zu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Au,window.MediaKeys=Bu,window.MediaKeySystemAccess=Cu,window.shakaMediaKeysPolyfill=!0)}function zu(){return Promise.reject(Error("The key system specified is not supported."))}
849
+ function Au(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Jt.PatchedMediaKeysNop=xu;xu.install=yu;function Bu(){throw new TypeError("Illegal constructor.");}Bu.prototype.createSession=function(){};Bu.prototype.setServerCertificate=function(){};function Cu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Cu.prototype.getConfiguration=function(){};Cu.prototype.createMediaKeys=function(){};Mt(yu,-10);function Du(){}
850
+ function Eu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Fu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Gu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Hu;window.MediaKeys=Iu;window.MediaKeySystemAccess=Ju;window.shakaMediaKeysPolyfill=!0}}
851
+ function Ku(a){var b=Fu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Gu(a,b){try{var c=new Ju(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Hu(a){var b=this.mediaKeys;b&&b!=a&&Lu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Lu(a,this);return Promise.resolve()}Jt.PatchedMediaKeysWebkit=Du;Du.install=Eu;
852
+ function Ju(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=r(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=r(f.audioCapabilities),
849
853
  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=r(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"]):
850
- 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;}Hu.prototype.createMediaKeys=function(){var a=new Gu(this.g);return Promise.resolve(a)};Hu.prototype.getConfiguration=function(){return this.h};function Gu(a){this.l=a;this.h=null;this.g=new Af;this.i=[];this.j=new Map}
851
- function Ju(a,b){a.h=b;a.g.Sb();var c=Du;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Fc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=Ku(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.fc()?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=Ku(a,d.sessionId))Lu(d,"usable"),
852
- d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=Ku(a,d.sessionId);e&&e.handleError(d)}))}Gu.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 Mu(b,this.l,a);this.i.push(a);return a};Gu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
853
- function Ku(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 Mu(a,b,c){fb.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 Lc;this.keyStatuses=new Nu}u(Mu,fb);q=Mu.prototype;
854
- q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Lu(this,"output-restricted"):1==b?Lu(this,"expired"):Lu(this,"internal-error"))};
855
- function Ou(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=Ec(hd("LOAD_SESSION|"+c));else{var e=hd("PERSISTENT|");d=pd(e,b)}else d=Ec(b)}catch(g){return Promise.reject(g)}a.h=new Lc;var f=Iu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
856
- function Pu(a,b,c){if(a.g)a.g.then(function(){return Pu(a,b,c)}).catch(function(){return Pu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=dd(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=md(e.keys[0].k);e=md(e.keys[0].kid)}else d=Ec(c),e=null;var f=Iu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
857
- function Lu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Ou(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Ou(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Lc;Pu(this,b,a);return b};
858
- 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=Iu("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 Nu(){this.size=0;this.g=void 0}q=Nu.prototype;q.fc=function(){return this.g};
859
- q.forEach=function(a){this.g&&a(this.g,ch.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ch.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Du="";Kt(Cu);function Qu(){}function Ru(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Su,Object.defineProperty(a,"disablePictureInPicture",{get:Tu,set:Uu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Vu,document.addEventListener("webkitpresentationmodechanged",Wu,!0))}}
860
- function Wu(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)}
861
- function Su(){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 Vu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
862
- function Tu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Uu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ht.PiPWebkit=Qu;Qu.install=Ru;Kt(Ru);function Xu(){}function Yu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Zu))}function Zu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Ht.RandomUUID=Xu;Xu.install=Yu;Kt(Yu);function $u(){}function av(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=bv)}function bv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ht.StorageEstimate=$u;$u.install=av;Kt(av);function cv(){}function dv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:ev})}function ev(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Ht.Symbol=cv;cv.install=dv;Kt(dv);function fv(){}function gv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Ht.VideoPlayPromise=fv;fv.install=gv;Kt(gv);function hv(){}function iv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc())&&(a.getVideoPlaybackQuality=jv)}}function jv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ht.VideoPlaybackQuality=hv;hv.install=iv;Kt(iv);function kv(){}function lv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=mv;else if(6==b)a=nv;else{try{var c=!!mv(1,2,"")}catch(d){c=!1}c&&(a=mv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function mv(a,b,c){return new window.TextTrackCue(a,b,c)}function nv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ht.VTTCue=kv;kv.install=lv;Kt(lv);function ov(){}ov.prototype.parseInit=function(){};ov.prototype.setSequenceMode=function(){};ov.prototype.parseMedia=function(a,b){var c=null,d=[];a=dd(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=pv.exec(e))){var f=qv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new gc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};M("shaka.text.LrcTextParser",ov);ov.prototype.parseMedia=ov.prototype.parseMedia;
863
- ov.prototype.setSequenceMode=ov.prototype.setSequenceMode;ov.prototype.parseInit=ov.prototype.parseInit;var pv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,qv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Dd["application/x-subtitle-lrc"]=function(){return new ov};function rv(){}rv.prototype.parseInit=function(){};rv.prototype.setSequenceMode=function(){};
864
- rv.prototype.parseMedia=function(a,b){var c=dd(a);a=[];if(""==c)return a;var d=ng(c,"tt");if(!d)throw new P(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=bg(d,sv,"frameRate"),f=bg(d,sv,"subFrameRate"),g=bg(d,sv,"frameRateMultiplier"),h=bg(d,sv,"tickRate"),k=bg(d,sv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=bg(d,tv,"extent");if("default"!=l&&"preserve"!=l)throw new P(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new uv(e,f,
865
- g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?$f(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new ic;var x=t.getAttribute("xml:id");if(x){n.id=x;var y=null;m&&(y=vv.exec(m)||wv.exec(m));x=y?Number(y[1]):null;y=y?Number(y[2]):null;var v,w;if(v=xv(t,g,"extent"))v=(w=vv.exec(v))||wv.exec(v),
866
- null!=v&&(n.width=Number(v[1]),n.height=Number(v[2]),w||(null!=x&&(n.width=100*n.width/x),null!=y&&(n.height=100*n.height/y)),n.widthUnits=w||null!=x?zc:0,n.heightUnits=w||null!=y?zc:0);if(t=xv(t,g,"origin"))v=(w=vv.exec(t))||wv.exec(t),null!=v&&(n.viewportAnchorX=Number(v[1]),n.viewportAnchorY=Number(v[2]),w||(null!=y&&(n.viewportAnchorY=100*n.viewportAnchorY/y),null!=x&&(n.viewportAnchorX=100*n.viewportAnchorX/x)),n.viewportAnchorUnits=w||null!=x?zc:0)}else n=null;n&&h.push(n)}if(Xf(c,"p").length)throw new P(2,
867
- 2,2001,"<p> can only be inside <div> in TTML");m=r(Xf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Xf(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=yv(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
868
- function yv(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,x=r(zv),y=x.next();!y.done&&!(t=Av(n,"backgroundImage",d,"#",y.value)[0]);y=x.next());x=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});
869
- a=[];if(!y)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=yv(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;v=/\S/.test(n.textContent);var A=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(A||v||"br"==n.tagName||0!=a.length||d&&!h))return null;w=Bv(n,c);v=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=Cv(p,c,v,w),v=w.start,w=w.end,p=p.parentNode;null==v&&(v=0);v+=b.periodStart;w=null==w?Infinity:w+b.periodStart;v=Math.max(v,b.segmentStart);
870
- w=Math.min(w,b.segmentEnd);if(!A&&0<a.length)for(v=Infinity,w=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new gc(v,w,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new gc(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Av(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==
871
- z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=Av(l,"region",f,"")[0]);Dv(b,n,g,t,e,x,0==a.length);return b}
872
- function Dv(a,b,c,d,e,f,g){f=f||g;"rtl"==Ev(b,c,e,"direction",f)&&(a.direction="rtl");g=Ev(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=hc);(g=Ev(b,c,e,"textAlign",!0))?(a.positionAlign=Fv[g],a.lineAlign=Gv[g],a.textAlign=sc[g.toUpperCase()]):a.textAlign=kc;if(g=Ev(b,c,e,"displayAlign",!0))a.displayAlign=tc[g.toUpperCase()];if(g=Ev(b,c,e,"color",f))a.color=g;if(g=Ev(b,c,e,"backgroundColor",
873
- f))a.backgroundColor=g;if(g=Ev(b,c,e,"border",f))a.border=g;if(g=Ev(b,c,e,"fontFamily",f))switch(g){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=g}(g=Ev(b,c,e,"fontWeight",f))&&
874
- "bold"==g&&(a.fontWeight=700);g=Ev(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Ev(b,c,e,"lineHeight",f))&&g.match(Hv)&&(a.lineHeight=g);(g=Ev(b,c,e,"fontSize",f))&&(g.match(Hv)||g.match(Iv))&&(a.fontSize=g);if(g=Ev(b,c,e,"fontStyle",f))a.fontStyle=yc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Ev(b,c,e,"textOutline",
875
- f))d=d.split(" "),d[0].match(Hv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Hv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Ev(b,c,e,"letterSpacing",f))&&d.match(Hv)&&(a.letterSpacing=d);(d=Ev(b,c,e,"linePadding",f))&&d.match(Hv)&&(a.linePadding=d);if(f=Ev(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=xv(c,e,"textDecoration"))&&Jv(a,c);(b=Kv(b,e,"textDecoration"))&&Jv(a,b)}
876
- function Jv(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&dc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&dc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
877
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&dc(a.textDecoration,"overline")}}function Ev(a,b,c,d,e){e=void 0===e?!0:e;return(a=Kv(a,c,d))?a:e?xv(b,c,d):null}function xv(a,b,c){if(!a)return null;var d=bg(a,tv,c);return d?d:Lv(a,b,c)}function Kv(a,b,c){var d=bg(a,tv,c);return d?d:Lv(a,b,c)}
878
- function Lv(a,b,c){a=Av(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ag(a[e],"urn:ebu:tt:style",c);f||(f=bg(a[e],tv,c));f||(f=Kv(a[e],b,c));f&&(d=f)}return d}
879
- function Av(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?ag(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Cv(a,b,c,d){a=Bv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
880
- function Bv(a,b){var c=Mv(a.getAttribute("begin"),b),d=Mv(a.getAttribute("end"),b);a=Mv(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
881
- function Mv(a,b){var c=null;if(Nv.test(a)){a=Nv.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(Ov.test(a))c=Pv(Ov,a);else if(Qv.test(a))c=Pv(Qv,a);else if(Rv.test(a))a=Rv.exec(a),c=Number(a[1])/b.frameRate;else if(Sv.test(a))a=Sv.exec(a),c=Number(a[1])/b.g;else if(Tv.test(a))c=Pv(Tv,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
882
- function Pv(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)}M("shaka.text.TtmlTextParser",rv);rv.prototype.parseMedia=rv.prototype.parseMedia;rv.prototype.setSequenceMode=rv.prototype.setSequenceMode;rv.prototype.parseInit=rv.prototype.parseInit;
883
- function uv(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]))}
884
- var vv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Iv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Hv=/^(\d+px|\d+em|\d*\.?\d+c)$/,wv=/^(\d+)px (\d+)px$/,Nv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ov=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Qv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Rv=/^(\d*(?:\.\d*)?)f$/,Sv=/^(\d*(?:\.\d*)?)t$/,Tv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Gv={left:nc,center:"center",right:"end",start:nc,
885
- end:"end"},Fv={left:"line-left",center:"center",right:"line-right"},sv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],tv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],zv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Dd["application/ttml+xml"]=function(){return new rv};function Uv(){this.g=new rv}Uv.prototype.parseInit=function(a){var b=!1;(new Lf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).box("minf",Pf).box("stbl",Pf).X("stsd",Rf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};Uv.prototype.setSequenceMode=function(){};Uv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Lf).box("mdat",Sf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};
886
- M("shaka.text.Mp4TtmlParser",Uv);Uv.prototype.parseMedia=Uv.prototype.parseMedia;Uv.prototype.setSequenceMode=Uv.prototype.setSequenceMode;Uv.prototype.parseInit=Uv.prototype.parseInit;Dd['application/mp4; codecs="stpp"']=function(){return new Uv};Dd['application/mp4; codecs="stpp.ttml"']=function(){return new Uv};Dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Uv};Dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Uv};function Vv(){this.g=!1}Vv.prototype.parseInit=function(){};Vv.prototype.setSequenceMode=function(a){this.g=a};
887
- Vv.prototype.parseMedia=function(a,b){a=dd(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 P(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Wv(new Cq(d[1]));if(null==a)throw new P(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
888
- e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Cq(d);var f=new ic;Fq(d);Dq(d);for(var g=Fq(d);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]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
889
- (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Dq(d);g=Fq(d)}b.push(f)}e=new Map;Xv(e);d=[];c=r(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]&&f[1].includes("::cue")){h="global";(g=f[1].match(/\((.*)\)/))&&(h=g.pop());g=f.slice(2,-1);f[1].includes("}")&&(k=/\{(.*?)\}/.exec(f[1]))&&(g=k[1].split(";"));k=new gc(0,0,"");for(var l=!1,m=0;m<g.length;m++){var p=
854
+ 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;}Ju.prototype.createMediaKeys=function(){var a=new Iu(this.g);return Promise.resolve(a)};Ju.prototype.getConfiguration=function(){return this.h};function Iu(a){this.l=a;this.h=null;this.g=new Af;this.i=[];this.j=new Map}
855
+ function Lu(a,b){a.h=b;a.g.Sb();var c=Fu;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Fc(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=Mu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.fc()?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){if(d=Mu(a,d.sessionId))Nu(d,"usable"),
856
+ d.g&&d.g.resolve(),d.g=null}),a.g.o(b,c+"keyerror",function(d){var e=Mu(a,d.sessionId);e&&e.handleError(d)}))}Iu.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 Ou(b,this.l,a);this.i.push(a);return a};Iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
857
+ function Mu(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 Ou(a,b,c){fb.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 Lc;this.keyStatuses=new Pu}u(Ou,fb);q=Ou.prototype;
858
+ q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Nu(this,"output-restricted"):1==b?Nu(this,"expired"):Nu(this,"internal-error"))};
859
+ function Qu(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=Ec(hd("LOAD_SESSION|"+c));else{var e=hd("PERSISTENT|");d=pd(e,b)}else d=Ec(b)}catch(g){return Promise.reject(g)}a.h=new Lc;var f=Ku("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
860
+ function Ru(a,b,c){if(a.g)a.g.then(function(){return Ru(a,b,c)}).catch(function(){return Ru(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=dd(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=md(e.keys[0].k);e=md(e.keys[0].kid)}else d=Ec(c),e=null;var f=Ku("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
861
+ function Nu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Qu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Qu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Lc;Ru(this,b,a);return b};
862
+ 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=Ku("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 Pu(){this.size=0;this.g=void 0}q=Pu.prototype;q.fc=function(){return this.g};
863
+ q.forEach=function(a){this.g&&a(this.g,ch.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ch.value();return this.g&&Cc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Fu="";Mt(Eu);function Su(){}function Tu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Uu,Object.defineProperty(a,"disablePictureInPicture",{get:Vu,set:Wu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Xu,document.addEventListener("webkitpresentationmodechanged",Yu,!0))}}
864
+ function Yu(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)}
865
+ function Uu(){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 Xu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
866
+ function Vu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Wu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Jt.PiPWebkit=Su;Su.install=Tu;Mt(Tu);function Zu(){}function $u(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=av))}function av(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Jt.RandomUUID=Zu;Zu.install=$u;Mt($u);function bv(){}function cv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=dv)}function dv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Jt.StorageEstimate=bv;bv.install=cv;Mt(cv);function ev(){}function fv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:gv})}function gv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Jt.Symbol=ev;ev.install=fv;Mt(fv);function hv(){}function iv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Jt.VideoPlayPromise=hv;hv.install=iv;Mt(iv);function jv(){}function kv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||Xc())&&(a.getVideoPlaybackQuality=lv)}}function lv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Jt.VideoPlaybackQuality=jv;jv.install=kv;Mt(kv);function mv(){}function nv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ov;else if(6==b)a=pv;else{try{var c=!!ov(1,2,"")}catch(d){c=!1}c&&(a=ov)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ov(a,b,c){return new window.TextTrackCue(a,b,c)}function pv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Jt.VTTCue=mv;mv.install=nv;Mt(nv);function qv(){}qv.prototype.parseInit=function(){};qv.prototype.setSequenceMode=function(){};qv.prototype.parseMedia=function(a,b){var c=null,d=[];a=dd(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=rv.exec(e))){var f=sv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new gc(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};M("shaka.text.LrcTextParser",qv);qv.prototype.parseMedia=qv.prototype.parseMedia;
867
+ qv.prototype.setSequenceMode=qv.prototype.setSequenceMode;qv.prototype.parseInit=qv.prototype.parseInit;var rv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,sv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Dd["application/x-subtitle-lrc"]=function(){return new qv};function tv(){}tv.prototype.parseInit=function(){};tv.prototype.setSequenceMode=function(){};
868
+ tv.prototype.parseMedia=function(a,b){var c=dd(a);a=[];if(""==c)return a;var d=ng(c,"tt");if(!d)throw new P(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=bg(d,uv,"frameRate"),f=bg(d,uv,"subFrameRate"),g=bg(d,uv,"frameRateMultiplier"),h=bg(d,uv,"tickRate"),k=bg(d,uv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=bg(d,vv,"extent");if("default"!=l&&"preserve"!=l)throw new P(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new wv(e,f,
869
+ g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?$f(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new ic;var y=t.getAttribute("xml:id");if(y){n.id=y;var x=null;m&&(x=xv.exec(m)||yv.exec(m));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var v,w;if(v=zv(t,g,"extent"))v=(w=xv.exec(v))||yv.exec(v),
870
+ null!=v&&(n.width=Number(v[1]),n.height=Number(v[2]),w||(null!=y&&(n.width=100*n.width/y),null!=x&&(n.height=100*n.height/x)),n.widthUnits=w||null!=y?zc:0,n.heightUnits=w||null!=x?zc:0);if(t=zv(t,g,"origin"))v=(w=xv.exec(t))||yv.exec(t),null!=v&&(n.viewportAnchorX=Number(v[1]),n.viewportAnchorY=Number(v[2]),w||(null!=x&&(n.viewportAnchorY=100*n.viewportAnchorY/x),null!=y&&(n.viewportAnchorX=100*n.viewportAnchorX/y)),n.viewportAnchorUnits=w||null!=y?zc:0)}else n=null;n&&h.push(n)}if(Xf(c,"p").length)throw new P(2,
871
+ 2,2001,"<p> can only be inside <div> in TTML");m=r(Xf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Xf(p.value,"span").length)throw new P(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Av(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
872
+ function Av(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,y=r(Bv),x=y.next();!x.done&&!(t=Cv(n,"backgroundImage",d,"#",x.value)[0]);x=y.next());y=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(n.childNodes).every(function(D){return D.nodeType==Node.TEXT_NODE});
873
+ a=[];if(!x)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=Av(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;v=/\S/.test(n.textContent);var C=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(C||v||"br"==n.tagName||0!=a.length||d&&!h))return null;w=Dv(n,c);v=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=Ev(p,c,v,w),v=w.start,w=w.end,p=p.parentNode;null==v&&(v=0);v+=b.periodStart;w=null==w?Infinity:w+b.periodStart;v=Math.max(v,b.segmentStart);
874
+ w=Math.min(w,b.segmentEnd);if(!C&&0<a.length)for(v=Infinity,w=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,v=Math.min(v,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new gc(v,w,""),e.lineBreak=!0,e;b="";x&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new gc(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Cv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(D){return D.id==
875
+ z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=Cv(l,"region",f,"")[0]);Fv(b,n,g,t,e,y,0==a.length);return b}
876
+ function Fv(a,b,c,d,e,f,g){f=f||g;"rtl"==Gv(b,c,e,"direction",f)&&(a.direction="rtl");g=Gv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=hc);(g=Gv(b,c,e,"textAlign",!0))?(a.positionAlign=Hv[g],a.lineAlign=Iv[g],a.textAlign=sc[g.toUpperCase()]):a.textAlign=kc;if(g=Gv(b,c,e,"displayAlign",!0))a.displayAlign=tc[g.toUpperCase()];if(g=Gv(b,c,e,"color",f))a.color=g;if(g=Gv(b,c,e,"backgroundColor",
877
+ f))a.backgroundColor=g;if(g=Gv(b,c,e,"border",f))a.border=g;if(g=Gv(b,c,e,"fontFamily",f))switch(g){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=g}(g=Gv(b,c,e,"fontWeight",f))&&
878
+ "bold"==g&&(a.fontWeight=700);g=Gv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Gv(b,c,e,"lineHeight",f))&&g.match(Jv)&&(a.lineHeight=g);(g=Gv(b,c,e,"fontSize",f))&&(g.match(Jv)||g.match(Kv))&&(a.fontSize=g);if(g=Gv(b,c,e,"fontStyle",f))a.fontStyle=yc[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Gv(b,c,e,"textOutline",
879
+ f))d=d.split(" "),d[0].match(Jv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Jv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Gv(b,c,e,"letterSpacing",f))&&d.match(Jv)&&(a.letterSpacing=d);(d=Gv(b,c,e,"linePadding",f))&&d.match(Jv)&&(a.linePadding=d);if(f=Gv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=zv(c,e,"textDecoration"))&&Lv(a,c);(b=Mv(b,e,"textDecoration"))&&Lv(a,b)}
880
+ function Lv(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&dc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&dc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
881
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&dc(a.textDecoration,"overline")}}function Gv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Mv(a,c,d))?a:e?zv(b,c,d):null}function zv(a,b,c){if(!a)return null;var d=bg(a,vv,c);return d?d:Nv(a,b,c)}function Mv(a,b,c){var d=bg(a,vv,c);return d?d:Nv(a,b,c)}
882
+ function Nv(a,b,c){a=Cv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ag(a[e],"urn:ebu:tt:style",c);f||(f=bg(a[e],vv,c));f||(f=Mv(a[e],b,c));f&&(d=f)}return d}
883
+ function Cv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?ag(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Ev(a,b,c,d){a=Dv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
884
+ function Dv(a,b){var c=Ov(a.getAttribute("begin"),b),d=Ov(a.getAttribute("end"),b);a=Ov(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
885
+ function Ov(a,b){var c=null;if(Pv.test(a)){a=Pv.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(Qv.test(a))c=Rv(Qv,a);else if(Sv.test(a))c=Rv(Sv,a);else if(Tv.test(a))a=Tv.exec(a),c=Number(a[1])/b.frameRate;else if(Uv.test(a))a=Uv.exec(a),c=Number(a[1])/b.g;else if(Vv.test(a))c=Rv(Vv,a);else if(a)throw new P(2,2,2001,"Could not parse cue time range in TTML");return c}
886
+ function Rv(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)}M("shaka.text.TtmlTextParser",tv);tv.prototype.parseMedia=tv.prototype.parseMedia;tv.prototype.setSequenceMode=tv.prototype.setSequenceMode;tv.prototype.parseInit=tv.prototype.parseInit;
887
+ function wv(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]))}
888
+ var xv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Kv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Jv=/^(\d+px|\d+em|\d*\.?\d+c)$/,yv=/^(\d+)px (\d+)px$/,Pv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Qv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Sv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Tv=/^(\d*(?:\.\d*)?)f$/,Uv=/^(\d*(?:\.\d*)?)t$/,Vv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Iv={left:nc,center:"center",right:"end",start:nc,
889
+ end:"end"},Hv={left:"line-left",center:"center",right:"line-right"},uv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],vv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Bv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Dd["application/ttml+xml"]=function(){return new tv};function Wv(){this.g=new tv}Wv.prototype.parseInit=function(a){var b=!1;(new Lf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).box("minf",Pf).box("stbl",Pf).X("stsd",Rf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new P(2,2,2007);};Wv.prototype.setSequenceMode=function(){};Wv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Lf).box("mdat",Sf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new P(2,2,2007);return e};
890
+ M("shaka.text.Mp4TtmlParser",Wv);Wv.prototype.parseMedia=Wv.prototype.parseMedia;Wv.prototype.setSequenceMode=Wv.prototype.setSequenceMode;Wv.prototype.parseInit=Wv.prototype.parseInit;Dd['application/mp4; codecs="stpp"']=function(){return new Wv};Dd['application/mp4; codecs="stpp.ttml"']=function(){return new Wv};Dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Wv};Dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Wv};function Xv(){this.g=!1}Xv.prototype.parseInit=function(){};Xv.prototype.setSequenceMode=function(a){this.g=a};
891
+ Xv.prototype.parseMedia=function(a,b){a=dd(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 P(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=Yv(new Eq(d[1]));if(null==a)throw new P(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
892
+ e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Eq(d);var f=new ic;Hq(d);Fq(d);for(var g=Hq(d);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]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
893
+ (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Fq(d);g=Hq(d)}b.push(f)}e=new Map;Zv(e);d=[];c=r(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]&&f[1].includes("::cue")){h="global";(g=f[1].match(/\((.*)\)/))&&(h=g.pop());g=f.slice(2,-1);f[1].includes("}")&&(k=/\{(.*?)\}/.exec(f[1]))&&(g=k[1].split(";"));k=new gc(0,0,"");for(var l=!1,m=0;m<g.length;m++){var p=
890
894
  /^\s*([^:]+):\s*(.*)/.exec(g[m]);if(p){var n=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":l=!0;k.backgroundColor=n;break;case "color":l=!0;k.color=n;break;case "font-family":l=!0;k.fontFamily=n;break;case "font-size":l=!0;k.fontSize=n;break;case "font-weight":700<=parseInt(n,10)&&(l=!0,k.fontWeight=700);break;case "font-style":switch(n){case "normal":l=!0;k.fontStyle=qc;break;case "italic":l=!0;k.fontStyle="italic";break;case "oblique":l=!0,k.fontStyle="oblique"}break;case "opacity":l=
891
- !0;k.opacity=parseFloat(n);break;case "text-shadow":l=!0;k.textShadow=n;break;case "white-space":l=!0,k.wrapLine="noWrap"!=n}}}l&&e.set(h,k)}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));g=new Cq(f[0]);k=Wv(g);p=Eq(g,/[ \t]+--\x3e[ \t]+/g);l=Wv(g);if(null==k||null==p||null==l)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),
892
- f.startTime=k,f.endTime=l,f.payload=""):f=new gc(k,l,"");Yv(m,f,e);Dq(g);for(k=Fq(g);k;)Zv(f,k,b),Dq(g),k=Fq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};function Xv(a){for(var b=r(Object.entries(wc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new gc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(xc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new gc(0,0,""),e.backgroundColor=d,a.set(c,e)}
893
- function Yv(a,b,c){0===c.size&&Xv(c);a=$v(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(aw)&&d.push(e),e=-1);d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=ng("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=r(f);for(f=a.next();!f.done;f=a.next())bw(f.value,b,d,c);b.nestedCues=
894
- d}else b.payload=a}function $v(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function cw(a,b){return a&&0<a.length?a:b}
895
- function bw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=cw(h.backgroundColor,e.backgroundColor),e.color=cw(h.color,e.color),e.fontFamily=cw(h.fontFamily,e.fontFamily),e.fontSize=cw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
896
- "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Wv(new Cq(g)))e.startTime=g}}if(dg(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())bw(a.value,e,c,d)}
897
- function Zv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=kc:a.textAlign=sc[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|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
898
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=dw(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=uc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=mc,a.line=Number(c[1]),c[2]&&(a.lineAlign=uc[c[2].toUpperCase()])}function dw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
899
- function Wv(a){a=Eq(a,aw);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",Vv);Vv.prototype.parseMedia=Vv.prototype.parseMedia;Vv.prototype.setSequenceMode=Vv.prototype.setSequenceMode;Vv.prototype.parseInit=Vv.prototype.parseInit;var aw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Dd["text/vtt"]=function(){return new Vv};Dd['text/vtt; codecs="vtt"']=function(){return new Vv};
900
- Dd['text/vtt; codecs="wvtt"']=function(){return new Vv};function ew(){this.g=null}ew.prototype.parseInit=function(a){var b=this,c=!1;(new Lf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).X("mdhd",function(d){d=ri(d.reader,d.version);b.g=d.timescale}).box("minf",Pf).box("stbl",Pf).X("stsd",Rf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};ew.prototype.setSequenceMode=function(){};
901
- ew.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Lf).box("moof",Pf).box("traf",Pf).X("tfdt",function(z){g=!0;c=qi(z.reader,z.version).cf}).X("tfhd",function(z){l=pi(z.reader,z.flags).pf}).X("trun",function(z){h=!0;d=si(z.reader,z.version,z.flags).Jf}).box("mdat",Sf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new If(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;var t=n.ze||l,x=n.Hd?
902
- c+n.Hd:a;a=x+(t||0);var y=0;do{var v=m.R();y+=v;var w=m.R(),A=null;"vttc"==Tf(w)?8<v&&(A=m.Cb(v-8)):m.skip(v-8);t&&A&&(v=fw(A,b.periodStart+x/this.g,b.periodStart+a/this.g),f.push(v))}while(n.sampleSize&&y<n.sampleSize)}return f.filter(Bb)};function fw(a,b,c){var d,e,f;(new Lf).box("payl",Sf(function(g){d=dd(g)})).box("iden",Sf(function(g){e=dd(g)})).box("sttg",Sf(function(g){f=dd(g)})).parse(a);return d?gw(d,e,f,b,c):null}
903
- function gw(a,b,c,d,e){d=new gc(d,e,"");Yv(a,d,new Map);b&&(d.id=b);if(c)for(a=new Cq(c),b=Fq(a);b;)Zv(d,b,[]),Dq(a),b=Fq(a);return d}M("shaka.text.Mp4VttParser",ew);ew.prototype.parseMedia=ew.prototype.parseMedia;ew.prototype.setSequenceMode=ew.prototype.setSequenceMode;ew.prototype.parseInit=ew.prototype.parseInit;Dd['application/mp4; codecs="wvtt"']=function(){return new ew};function hw(){}hw.prototype.parseInit=function(){};hw.prototype.setSequenceMode=function(){};hw.prototype.parseMedia=function(a){var b=dd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Cq(c[0]),e=iw(d),f=Eq(d,/,/g);d=iw(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new gc(e,d,c.slice(1).join("\n").trim()))}return a};
904
- function iw(a){a=Eq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",hw);hw.prototype.parseMedia=hw.prototype.parseMedia;hw.prototype.setSequenceMode=hw.prototype.setSequenceMode;hw.prototype.parseInit=hw.prototype.parseInit;Dd["text/x-subviewer"]=function(){return new hw};function jw(){this.g=new Vv}jw.prototype.parseInit=function(){};jw.prototype.setSequenceMode=function(){};jw.prototype.parseMedia=function(a,b){a=dd(a);a=kw(a);a=Ec(hd(a));return this.g.parseMedia(a,b)};function kw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(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")+"\n\n";return b}M("shaka.text.SrtTextParser",jw);
905
- jw.srt2webvtt=kw;jw.prototype.parseMedia=jw.prototype.parseMedia;jw.prototype.setSequenceMode=jw.prototype.setSequenceMode;jw.prototype.parseInit=jw.prototype.parseInit;Dd["text/srt"]=function(){return new jw};function lw(){}lw.prototype.parseInit=function(){};lw.prototype.setSequenceMode=function(){};
906
- lw.prototype.parseMedia=function(a){var b="",c="";a=dd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=mw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=nw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(ow);else if("Style"==e){e=f.split(ow);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
907
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Zd:e.Zd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=nw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(ow);else if("Dialogue"==f){g=g.split(ow);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=pw(f.Start);var k=pw(f.End);g=new gc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Zd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Zd}}(e)))&&qw(g,f);d.push(g)}return d};
908
- function qw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=rw(c))a.color=c;if(c=b.BackColour)if(c=rw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=oc;a.textAlign="start";break;case 2:a.displayAlign=oc;a.textAlign=kc;break;case 3:a.displayAlign=oc;a.textAlign="end";
895
+ !0;k.opacity=parseFloat(n);break;case "text-shadow":l=!0;k.textShadow=n;break;case "white-space":l=!0,k.wrapLine="noWrap"!=n}}}l&&e.set(h,k)}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));g=new Eq(f[0]);k=Yv(g);p=Gq(g,/[ \t]+--\x3e[ \t]+/g);l=Yv(g);if(null==k||null==p||null==l)throw new P(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),
896
+ f.startTime=k,f.endTime=l,f.payload=""):f=new gc(k,l,"");$v(m,f,e);Fq(g);for(k=Hq(g);k;)aw(f,k,b),Fq(g),k=Hq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};function Zv(a){for(var b=r(Object.entries(wc)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new gc(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(xc));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new gc(0,0,""),e.backgroundColor=d,a.set(c,e)}
897
+ function $v(a,b,c){0===c.size&&Zv(c);a=bw(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(cw)&&d.push(e),e=-1);d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=ng("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=r(f);for(f=a.next();!f.done;f=a.next())dw(f.value,b,d,c);b.nestedCues=
898
+ d}else b.payload=a}function bw(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function ew(a,b){return a&&0<a.length?a:b}
899
+ function dw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=ew(h.backgroundColor,e.backgroundColor),e.color=ew(h.color,e.color),e.fontFamily=ew(h.fontFamily,e.fontFamily),e.fontSize=ew(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
900
+ "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Yv(new Eq(g)))e.startTime=g}}if(dg(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())dw(a.value,e,c,d)}
901
+ function aw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=kc:a.textAlign=sc[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|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
902
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=fw(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=vc[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=mc,a.line=Number(c[1]),c[2]&&(a.lineAlign=vc[c[2].toUpperCase()])}function fw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
903
+ function Yv(a){a=Gq(a,cw);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",Xv);Xv.prototype.parseMedia=Xv.prototype.parseMedia;Xv.prototype.setSequenceMode=Xv.prototype.setSequenceMode;Xv.prototype.parseInit=Xv.prototype.parseInit;var cw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Dd["text/vtt"]=function(){return new Xv};Dd['text/vtt; codecs="vtt"']=function(){return new Xv};
904
+ Dd['text/vtt; codecs="wvtt"']=function(){return new Xv};function gw(){this.g=null}gw.prototype.parseInit=function(a){var b=this,c=!1;(new Lf).box("moov",Pf).box("trak",Pf).box("mdia",Pf).X("mdhd",function(d){d=ri(d.reader,d.version);b.g=d.timescale}).box("minf",Pf).box("stbl",Pf).X("stsd",Rf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new P(2,2,2008);if(!c)throw new P(2,2,2008);};gw.prototype.setSequenceMode=function(){};
905
+ gw.prototype.parseMedia=function(a,b){if(!this.g)throw new P(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Lf).box("moof",Pf).box("traf",Pf).X("tfdt",function(z){g=!0;c=qi(z.reader,z.version).ef}).X("tfhd",function(z){l=pi(z.reader,z.flags).rf}).X("trun",function(z){h=!0;d=si(z.reader,z.version,z.flags).Lf}).box("mdat",Sf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new P(2,2,2008);a=c;for(var m=new If(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;var t=n.Ae||l,y=n.Hd?
906
+ c+n.Hd:a;a=y+(t||0);var x=0;do{var v=m.R();x+=v;var w=m.R(),C=null;"vttc"==Tf(w)?8<v&&(C=m.Cb(v-8)):m.skip(v-8);t&&C&&(v=hw(C,b.periodStart+y/this.g,b.periodStart+a/this.g),f.push(v))}while(n.sampleSize&&x<n.sampleSize)}return f.filter(Bb)};function hw(a,b,c){var d,e,f;(new Lf).box("payl",Sf(function(g){d=dd(g)})).box("iden",Sf(function(g){e=dd(g)})).box("sttg",Sf(function(g){f=dd(g)})).parse(a);return d?iw(d,e,f,b,c):null}
907
+ function iw(a,b,c,d,e){d=new gc(d,e,"");$v(a,d,new Map);b&&(d.id=b);if(c)for(a=new Eq(c),b=Hq(a);b;)aw(d,b,[]),Fq(a),b=Hq(a);return d}M("shaka.text.Mp4VttParser",gw);gw.prototype.parseMedia=gw.prototype.parseMedia;gw.prototype.setSequenceMode=gw.prototype.setSequenceMode;gw.prototype.parseInit=gw.prototype.parseInit;Dd['application/mp4; codecs="wvtt"']=function(){return new gw};function jw(){}jw.prototype.parseInit=function(){};jw.prototype.setSequenceMode=function(){};jw.prototype.parseMedia=function(a){var b=dd(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Eq(c[0]),e=kw(d),f=Gq(d,/,/g);d=kw(d);if(null==e||null==f||null==d)throw new P(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new gc(e,d,c.slice(1).join("\n").trim()))}return a};
908
+ function kw(a){a=Gq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",jw);jw.prototype.parseMedia=jw.prototype.parseMedia;jw.prototype.setSequenceMode=jw.prototype.setSequenceMode;jw.prototype.parseInit=jw.prototype.parseInit;Dd["text/x-subviewer"]=function(){return new jw};function lw(){this.g=new Xv}lw.prototype.parseInit=function(){};lw.prototype.setSequenceMode=function(){};lw.prototype.parseMedia=function(a,b){a=dd(a);a=mw(a);a=Ec(hd(a));return this.g.parseMedia(a,b)};function mw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(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")+"\n\n";return b}M("shaka.text.SrtTextParser",lw);
909
+ lw.srt2webvtt=mw;lw.prototype.parseMedia=lw.prototype.parseMedia;lw.prototype.setSequenceMode=lw.prototype.setSequenceMode;lw.prototype.parseInit=lw.prototype.parseInit;Dd["text/srt"]=function(){return new lw};function nw(){}nw.prototype.parseInit=function(){};nw.prototype.setSequenceMode=function(){};
910
+ nw.prototype.parseMedia=function(a){var b="",c="";a=dd(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=ow.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=pw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(qw);else if("Style"==e){e=f.split(qw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
911
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Zd:e.Zd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=pw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(qw);else if("Dialogue"==f){g=g.split(qw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=rw(f.Start);var k=rw(f.End);g=new gc(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Zd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Zd}}(e)))&&sw(g,f);d.push(g)}return d};
912
+ function sw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=tw(c))a.color=c;if(c=b.BackColour)if(c=tw(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=oc;a.textAlign="start";break;case 2:a.displayAlign=oc;a.textAlign=kc;break;case 3:a.displayAlign=oc;a.textAlign="end";
909
913
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=kc;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=kc;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
910
- function rw(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}function pw(a){a=sw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",lw);lw.prototype.parseMedia=lw.prototype.parseMedia;lw.prototype.setSequenceMode=lw.prototype.setSequenceMode;lw.prototype.parseInit=lw.prototype.parseInit;
911
- var mw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,nw=/^\s*([^:]+):\s*(.*)/,ow=/\s*,\s*/,sw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Dd["text/x-ssa"]=function(){return new lw};/*
914
+ function tw(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}function rw(a){a=uw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",nw);nw.prototype.parseMedia=nw.prototype.parseMedia;nw.prototype.setSequenceMode=nw.prototype.setSequenceMode;nw.prototype.parseInit=nw.prototype.parseInit;
915
+ var ow=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,pw=/^\s*([^:]+):\s*(.*)/,qw=/\s*,\s*/,uw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Dd["text/x-ssa"]=function(){return new nw};/*
912
916
  @license
913
917
  EME Encryption Scheme Polyfill
914
918
  Copyright 2019 Google LLC
915
919
  SPDX-License-Identifier: Apache-2.0
916
920
  */
917
- function tw(){}var uw;function vw(){uw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(uw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=ww):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
918
- function ww(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),B(e,uw.call(c,a,b),2);d=e.h;if(xw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=uw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=yw;return e.return(yw.call(c,
921
+ function vw(){}var ww;function xw(){ww?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(ww=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=yw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
922
+ function yw(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),A(e,ww.call(c,a,b),2);d=e.h;if(zw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=ww,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Aw;return e.return(Aw.call(c,
919
923
  a,b))})}
920
- function yw(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return K(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=zw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Aw(h.videoCapabilities,d),l=Aw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
921
- p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return B(t,uw.call(c,a,e),2)}n=t.h;return t.return(new Bw(n,d))})}function Aw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",tw);tw.install=vw;function Cw(){}var Dw;
922
- function Ew(){Dw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Dw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Fw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
923
- function Fw(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),B(f,Dw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&xw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Dw,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
924
- navigator.mediaCapabilities.decodingInfo=Gw;if(d){f.D(3);break}e=c;return B(f,Hw(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(Gw.call(b,a))}})}
925
- function Gw(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=zw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):B(m,Dw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
926
- new Bw(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return B(m,Hw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
927
- function Hw(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return B(d,
928
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",Cw);Cw.install=Ew;function Bw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
929
- Bw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Bw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
930
- function zw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function xw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
931
- function Iw(){}function Tt(){vw();Ew()}M("EncryptionSchemePolyfills",Iw);Iw.install=Tt;"undefined"!==typeof module&&module.exports&&(module.exports=Iw);/*
924
+ function Aw(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return K(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Bw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Cw(h.videoCapabilities,d),l=Cw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
925
+ p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return A(t,ww.call(c,a,e),2)}n=t.h;return t.return(new Dw(n,d))})}function Cw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",vw);vw.install=xw;function Ew(){}var Fw;
926
+ function Gw(){Fw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Fw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Hw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
927
+ function Hw(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),A(f,Fw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&zw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Fw,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
928
+ navigator.mediaCapabilities.decodingInfo=Iw;if(d){f.D(3);break}e=c;return A(f,Jw(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(Iw.call(b,a))}})}
929
+ function Iw(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Bw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):A(m,Fw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
930
+ new Dw(k.keySystemAccess,c);m.D(3);break}if(!a.keySystemConfiguration){m.D(3);break}l=k;return A(m,Jw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
931
+ function Jw(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return A(d,
932
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",Ew);Ew.install=Gw;function Dw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
933
+ Dw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Dw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
934
+ function Bw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function zw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
935
+ function Kw(){}function Vt(){xw();Gw()}M("EncryptionSchemePolyfills",Kw);Kw.install=Vt;"undefined"!==typeof module&&module.exports&&(module.exports=Kw);/*
932
936
  @license
933
937
  Copyright 2013 Ali Al Dallal
934
938
 
@@ -952,7 +956,7 @@ function Iw(){}function Tt(){vw();Ew()}M("EncryptionSchemePolyfills",Iw);Iw.inst
952
956
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
953
957
  SOFTWARE.
954
958
  */
955
- for(var Jw={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
959
+ for(var Lw={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
956
960
  "ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
957
961
  u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
958
962
  u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -973,55 +977,55 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
973
977
  sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
974
978
  u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
975
979
  u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
976
- u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},Kw=r(Object.keys(Jw)),Lw=Kw.next();!Lw.done;Lw=
977
- Kw.next()){var Mw=Lw.value;Jw[Mw.toLowerCase()]=Jw[Mw]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Af;this.localization=this.controls.La;this.player=this.controls.dc();this.video=this.controls.Bb();this.adManager=this.player.md();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
978
- X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};M("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function Nw(a){return Ow(a,"shaka-back-to-overflow-button")}function Ow(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function Pw(a){a&&(a=Ow(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Qw(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
979
- function Rw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Sw(a,b){X.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Rw(e-d,!1)+" / "+Rw(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
980
- ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.ya();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.ya(),this.g.ka(.5))}u(Sw,X);Sw.prototype.release=function(){this.g.stop();this.g=null;X.prototype.release.call(this)};M("shaka.ui.AdCounter",Sw);function Tw(a,b){X.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Uw(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Uw(c)});this.eventManager.o(this.adManager,"ad-started",function(){Uw(c)});this.eventManager.o(this.adManager,
981
- "ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&Uw(this)}u(Tw,X);function Uw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));Y(a.g,!0)}}M("shaka.ui.AdPosition",Tw);function Vw(a,b){X.call(this,a,b);var c=this;this.button=Ik();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
982
- c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?Ww(c.controls):Xw(c.controls)});this.ad&&(this.g(),this.h())}u(Vw,X);Vw.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};Vw.prototype.g=function(){};Vw.prototype.h=function(){};
983
- M("shaka.ui.PlayButton",Vw);function Yw(a,b){Vw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u(Yw,Vw);Yw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};Yw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};M("shaka.ui.BigPlayButton",Yw);function Zw(a,b){X.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";Y(c.g,!0)}else Y(c.g,
984
- !1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});$w(this)}u(Zw,X);Zw.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function ax(a,b){bx.set(a,b)}function $w(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=bx.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}M("shaka.ui.ContextMenu",Zw);
985
- Zw.registerElement=ax;var bx=new Map;function cx(a,b,c,d){X.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ja(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ja(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
986
- this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,dx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(dx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,dx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
987
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(cx,X);q=cx.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
988
- q.setValue=function(a){this.g||(this.bar.value=a)};function dx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}M("shaka.ui.RangeElement",cx);cx.prototype.setValue=cx.prototype.setValue;cx.prototype.getValue=cx.prototype.getValue;cx.prototype.changeTo=cx.prototype.changeTo;cx.prototype.onChangeEnd=cx.prototype.onChangeEnd;
989
- cx.prototype.onChange=cx.prototype.onChange;cx.prototype.onChangeStart=cx.prototype.onChangeStart;cx.prototype.setRange=cx.prototype.setRange;function ex(a,b){cx.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){fx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return gx(c)});this.eventManager.o(this.localization,
990
- "locale-changed",function(){return gx(c)});this.eventManager.o(this.adManager,"ad-started",function(){hx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){hx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;ix(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];ix(c)});this.setValue(this.video.currentTime);this.update();gx(this);this.ad&&Y(this.container,!1)}u(ex,cx);q=ex.prototype;
991
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);cx.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Je(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.ya();this.controls.Je(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
992
- q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ha(),g=f.end-f.start;this.setRange(f.start,f.end);hx(this)?(Y(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
980
+ u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},Mw=r(Object.keys(Lw)),Nw=Mw.next();!Nw.done;Nw=
981
+ Mw.next()){var Ow=Nw.value;Lw[Ow.toLowerCase()]=Lw[Ow]};function X(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new Af;this.localization=this.controls.Aa;this.player=this.controls.dc();this.video=this.controls.Bb();this.adManager=this.player.nd();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
982
+ X.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};M("shaka.ui.Element",X);X.prototype.release=X.prototype.release;function Pw(a){return Qw(a,"shaka-back-to-overflow-button")}function Qw(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function Rw(a){a&&(a=Qw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function Sw(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function Y(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
983
+ function Tw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function Uw(a,b){X.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new Q(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=Tw(e-d,!1)+" / "+Tw(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
984
+ ""))});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.za();c.g.ka(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.za(),this.g.ka(.5))}u(Uw,X);Uw.prototype.release=function(){this.g.stop();this.g=null;X.prototype.release.call(this)};M("shaka.ui.AdCounter",Uw);function Vw(a,b){X.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");Y(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&Ww(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&Ww(c)});this.eventManager.o(this.adManager,"ad-started",function(){Ww(c)});this.eventManager.o(this.adManager,
985
+ "ad-stopped",function(){c.h.textContent="";Y(c.g,!1)});this.ad&&Ww(this)}u(Vw,X);function Ww(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));Y(a.g,!0)}}M("shaka.ui.AdPosition",Vw);function Xw(a,b){X.call(this,a,b);var c=this;this.button=Kk();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
986
+ c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.ad&&c.ad.isLinear()?Yw(c.controls):Zw(c.controls)});this.ad&&(this.g(),this.h())}u(Xw,X);Xw.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.A.paused&&!a.$;return a};Xw.prototype.g=function(){};Xw.prototype.h=function(){};
987
+ M("shaka.ui.PlayButton",Xw);function $w(a,b){Xw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}u($w,Xw);$w.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};$w.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};M("shaka.ui.BigPlayButton",$w);function ax(a,b){X.call(this,a,b);var c=this;this.j=this.controls.i;this.h=this.controls.g;this.i=[];this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";Y(c.g,!0)}else Y(c.g,
988
+ !1)});this.eventManager.o(window,"click",function(){Y(c.g,!1)});bx(this)}u(ax,X);ax.prototype.release=function(){this.h=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function cx(a,b){dx.set(a,b)}function bx(a){for(var b=r(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=dx.get(c);d?a.i.push(d.create(a.g,a.controls)):Ua("Unrecognized context menu element:",c)}}M("shaka.ui.ContextMenu",ax);
989
+ ax.registerElement=cx;var dx=new Map;function ex(a,b,c,d){X.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ja(c));this.g=!1;this.bar=document.createElement("input");this.l=new Q(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ja(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
990
+ this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(){e.controls.Nb()&&(e.g=!0,e.onChangeStart())});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Nb()&&(e.g=!0,fx(e,f),e.onChangeStart())});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.g&&(fx(e,f),e.onChange())});this.eventManager.o(this.bar,"touchend",function(f){e.g&&(e.g=!1,fx(e,f),e.onChangeEnd())});this.eventManager.o(this.bar,
991
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}u(ex,X);q=ex.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);X.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.S(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
992
+ q.setValue=function(a){this.g||(this.bar.value=a)};function fx(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}M("shaka.ui.RangeElement",ex);ex.prototype.setValue=ex.prototype.setValue;ex.prototype.getValue=ex.prototype.getValue;ex.prototype.changeTo=ex.prototype.changeTo;ex.prototype.onChangeEnd=ex.prototype.onChangeEnd;
993
+ ex.prototype.onChange=ex.prototype.onChange;ex.prototype.onChangeStart=ex.prototype.onChangeStart;ex.prototype.setRange=ex.prototype.setRange;function gx(a,b){ex.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.m=this.controls.i;this.h=new Q(function(){c.video.currentTime=c.getValue()});this.A=new Q(function(){hx(c)});this.B=!1;this.i=[];this.eventManager.o(this.localization,"locale-updated",function(){return ix(c)});this.eventManager.o(this.localization,
994
+ "locale-changed",function(){return ix(c)});this.eventManager.o(this.adManager,"ad-started",function(){jx(c)||Y(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){jx(c)&&Y(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;kx(c)});this.eventManager.o(this.player,"unloading",function(){c.i=[];kx(c)});this.setValue(this.video.currentTime);this.update();ix(this);this.ad&&Y(this.container,!1)}u(gx,ex);q=gx.prototype;
995
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.A.stop(),this.A=null);ex.prototype.release.call(this)};q.onChangeStart=function(){this.B=!this.video.paused;this.controls.Ke(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.S(.125))};q.onChangeEnd=function(){this.h.za();this.controls.Ke(!1);this.B&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
996
+ q.update=function(){var a=this.m.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Ka(),g=f.end-f.start;this.setRange(f.start,f.end);jx(this)?(Y(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.m.showUnbufferedStart?
993
997
  a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):Y(this.container,!1)};
994
- function fx(a){if(a.i.length){for(var b=a.player.Ha(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
995
- 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function ix(a){fx(a);var b=a.player.Ha();b=b.end-b.start;a.player.U()&&5<b&&a.A.ka(1)}function hx(a){var b=a.player.Ha();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function gx(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}M("shaka.ui.SeekBar",ex);function jx(){}
996
- jx.prototype.create=function(a,b){return new ex(a,b)};ex.Factory=jx;function Z(a,b,c,d){fb.call(this);var e=this;this.T=!0;this.i=d;this.C=new Vn(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.fb=!0;this.A=this.C.Bb();this.B=c;this.F=this.C.dc();this.za=a;this.j=b;this.Xa=this.F.md();this.l=this.m=null;this.$=!1;this.G=[];this.wb=[];this.hb=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.hb=!1;kx(e)});this.ea=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
997
- !1)});this.Ma=new Q(function(){e.Nb()&&lx(e)});this.J=null;this.H=[];this.La=mx();this.h=new Af;this.configure(this.i);nx(this);this.ma=new Set;ox(this);this.Ma.ka(.125);this.h.o(this.La,"locale-changed",function(f){e.Xa.setLocale(f.locales[0])})}u(Z,fb);q=Z.prototype;
998
- q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return B(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.Ma&&(a.Ma.stop(),a.Ma=null);px(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return B(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.za){b.D(6);break}return B(b,a.za.destroy(),7);case 7:a.za=
999
- null;case 6:a.F=null,a.B=null,a.A=null,a.La=null,a.ma.clear(),fb.prototype.release.call(a),C(b)}})};function px(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function qx(a,b){rx.set(a,b)}q.ag=function(a){this.fb=a;ox(this)};q.Ug=function(){kx(this)};
1000
- q.configure=function(a){this.i=a;this.C.kf(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.eb&&(this.eb=null);this.Ya&&(this.Ya=null);this.g?(Jk(this.g),px(this)):(sx(this),tx(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");ux(this);this.i.addBigPlayButton&&vx(this);this.i.customContextMenu&&(this.Ya=new Zw(this.Y,this),this.H.push(this.Ya));this.ba||wx(this);this.gb=S("div");this.gb.classList.add("shaka-server-side-ad-container");
1001
- this.g.appendChild(this.gb);xx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ja(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));yx(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));kx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",
1002
- c)}};q.Fe=function(a){(this.T=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");kx(this)};q.Mf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Fe(!1)};q.getAd=function(){return this.m};q.ng=function(){return this.C};q.Ag=function(){return this.La};q.Og=function(){return this.j};q.Bb=function(){return this.A};q.zg=function(){return this.B};q.dc=function(){return this.F};q.yg=function(){return this.za};
1003
- q.sg=function(){return this.g};q.Ig=function(){return this.gb};q.pg=function(){return this.P};q.qg=function(){return this.i};q.Tg=function(){return this.$};q.Je=function(a){this.$=a};q.Rg=function(){return this.fb};q.vf=function(){return this.l?this.l.getValue():this.A.currentTime};q.Nf=function(a){this.J=a};q.gd=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.hc=function(){this.I.ya()};
998
+ function hx(a){if(a.i.length){for(var b=a.player.Ka(),c=b.end-b.start,d=["to right"],e=[],f=a.m.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
999
+ 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function kx(a){hx(a);var b=a.player.Ka();b=b.end-b.start;a.player.U()&&5<b&&a.A.ka(1)}function jx(a){var b=a.player.Ka();b=b.end-b.start;return a.player.U()&&5>b?!1:null==a.ad||!a.ad.isLinear()}function ix(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}M("shaka.ui.SeekBar",gx);function lx(){}
1000
+ lx.prototype.create=function(a,b){return new gx(a,b)};gx.Factory=lx;function Z(a,b,c,d){fb.call(this);var e=this;this.T=!0;this.i=d;this.C=new Xn(c,a,this.i.castReceiverAppId,this.i.castAndroidReceiverCompatible);this.ab=!0;this.A=this.C.Bb();this.B=c;this.F=this.C.dc();this.ua=a;this.j=b;this.Za=this.F.nd();this.l=this.m=null;this.$=!1;this.G=[];this.wb=[];this.ib=!1;this.aa=new Q(function(){e.j.style.cursor="none";e.ib=!1;mx(e)});this.ea=new Q(function(){e.g.removeAttribute("shown");e.I.S(2)});this.I=new Q(function(){for(var f=r(e.G),g=f.next();!g.done;g=f.next())Y(g.value,
1001
+ !1)});this.Oa=new Q(function(){e.Nb()&&nx(e)});this.J=null;this.H=[];this.Aa=ox();this.h=new Af;this.configure(this.i);px(this);this.ma=new Set;qx(this);this.Oa.ka(.125);this.h.o(this.Aa,"locale-changed",function(f){e.Za.setLocale(f.locales[0])})}u(Z,fb);q=Z.prototype;
1002
+ q.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.D(2);break}return A(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.aa&&(a.aa.stop(),a.aa=null);a.ea&&(a.ea.stop(),a.ea=null);a.I&&(a.I.stop(),a.I=null);a.Oa&&(a.Oa.stop(),a.Oa=null);rx(a);a.g&&(a.j.removeChild(a.g),a.g=null);if(!a.C){b.D(4);break}return A(b,a.C.destroy(),5);case 5:a.C=null;case 4:if(!a.ua){b.D(6);break}return A(b,a.ua.destroy(),7);case 7:a.ua=
1003
+ null;case 6:a.F=null,a.B=null,a.A=null,a.Aa=null,a.ma.clear(),fb.prototype.release.call(a),B(b)}})};function rx(a){for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.release();a.H=[]}function sx(a,b){tx.set(a,b)}q.dg=function(a){this.ab=a;qx(this)};q.Wg=function(){mx(this)};
1004
+ q.configure=function(a){this.i=a;this.C.mf(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.l&&(this.l=null);this.gb&&(this.gb=null);this.$a&&(this.$a=null);this.g?(Lk(this.g),rx(this)):(ux(this),vx(this));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");wx(this);this.i.addBigPlayButton&&xx(this);this.i.customContextMenu&&(this.$a=new ax(this.Y,this),this.H.push(this.$a));this.ba||yx(this);this.hb=S("div");this.hb.classList.add("shaka-server-side-ad-container");
1005
+ this.g.appendChild(this.hb);zx(this);this.G=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.G.push.apply(this.G,ja(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Ax(this);this.wb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));mx(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.o(b,"click",c);this.h.o(b,"dblclick",
1006
+ c)}};q.Ge=function(a){(this.T=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");mx(this)};q.Of=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.Ge(!1)};q.getAd=function(){return this.m};q.pg=function(){return this.C};q.Cg=function(){return this.Aa};q.Qg=function(){return this.j};q.Bb=function(){return this.A};q.Bg=function(){return this.B};q.dc=function(){return this.F};q.Ag=function(){return this.ua};
1007
+ q.vg=function(){return this.g};q.Kg=function(){return this.hb};q.rg=function(){return this.P};q.sg=function(){return this.i};q.Vg=function(){return this.$};q.Ke=function(a){this.$=a};q.Tg=function(){return this.ab};q.xf=function(){return this.l?this.l.getValue():this.A.currentTime};q.Pf=function(a){this.J=a};q.hd=function(){return this.G.some(function(a){return!a.classList.contains("shaka-hidden")})};q.hc=function(){this.I.za()};
1004
1008
  q.sd=function(){return document.fullscreenEnabled||this.B.webkitSupportsFullscreen?!0:!1};q.jc=function(){if(document.fullscreenEnabled)return!!document.fullscreenElement;var a=this.B;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
1005
- function zx(a){var b,c;return K(function(d){switch(d.g){case 1:E(d,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();d.D(4);break}if(!document.pictureInPictureElement){d.D(5);break}return B(d,document.exitPictureInPicture(),5);case 5:return B(d,a.j.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(4);break}return B(d,screen.orientation.lock("landscape"),4);case 4:va(d,0);break;case 2:c=I(d),
1006
- a.dispatchEvent(new O("error",(new Map).set("detail",c))),C(d)}})}function Ax(a){var b;return K(function(c){if(!document.fullscreenEnabled)return b=a.B,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.D(0);screen.orientation&&screen.orientation.unlock();return B(c,document.exitFullscreen(),0)})}q.Pe=function(){var a=this;return K(function(b){return a.jc()?B(b,Ax(a),0):B(b,zx(a),0)})};q.Pf=function(){Y(this.K,!0);Y(this.P,!0);this.g.setAttribute("ad-active","true")};
1007
- q.zf=function(){Y(this.K,!1);Y(this.P,!1);this.g.removeAttribute("ad-active")};function Xw(a){a.T&&a.A.duration&&(a.F.gf(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function Ww(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
1008
- function sx(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Nb()?a.J=Date.now():(Bx(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Cx(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.sd()&&a.Pe()})}
1009
- function vx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.eb=new Yw(b,a);a.H.push(a.eb)}function ux(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Dx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();Y(a.K,b);a.N.appendChild(a.K);b=new Tw(a.K,a);a.H.push(b);b=new Sw(a.K,a);a.H.push(b)}
1010
- function wx(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
1009
+ function Bx(a){var b,c;return K(function(d){switch(d.g){case 1:E(d,2);if(!document.fullscreenEnabled){b=a.B;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();d.D(4);break}if(!document.pictureInPictureElement){d.D(5);break}return A(d,document.exitPictureInPicture(),5);case 5:return A(d,a.j.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.i.forceLandscapeOnFullscreen||!screen.orientation){d.D(4);break}E(d,9);return A(d,screen.orientation.lock("landscape"),11);case 11:va(d,4,2);break;case 9:J(d,
1010
+ 2);case 4:va(d,0);break;case 2:c=J(d),a.dispatchEvent(new O("error",(new Map).set("detail",c))),B(d)}})}function Cx(a){var b;return K(function(c){if(!document.fullscreenEnabled)return b=a.B,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.D(0);screen.orientation&&screen.orientation.unlock();return A(c,document.exitFullscreen(),0)})}q.Re=function(){var a=this;return K(function(b){return a.jc()?A(b,Cx(a),0):A(b,Bx(a),0)})};
1011
+ q.Rf=function(){Y(this.K,!0);Y(this.P,!0);this.g.setAttribute("ad-active","true")};q.Bf=function(){Y(this.K,!1);Y(this.P,!1);this.g.removeAttribute("ad-active")};function Zw(a){a.T&&a.A.duration&&(a.F.jf(),a.A.paused&&!a.$?a.A.play():a.A.pause())}function Yw(a){a.m&&a.m.isPaused()?a.m.play():a.m&&a.m.pause()}
1012
+ function ux(a){a.g=S("div");a.g.classList.add("shaka-controls-container");a.j.appendChild(a.g);a.j.setAttribute("shaka-controls","true");a.h.o(a.g,"touchstart",function(b){a.A.duration&&(a.Nb()?a.J=Date.now():(Dx(a,b),b.cancelable&&b.preventDefault()))},{passive:!1});a.h.o(a.g,"click",function(){Ex(a)});a.h.o(a.g,"dblclick",function(){a.i.doubleClickForFullscreen&&a.sd()&&a.Re()})}
1013
+ function xx(a){var b=S("div");b.classList.add("shaka-play-button-container");a.g.appendChild(b);a.gb=new $w(b,a);a.H.push(a.gb)}function wx(a){var b=S("div");b.classList.add("shaka-scrim-container");a.g.appendChild(b)}function Fx(a){a.K=S("div");a.K.classList.add("shaka-ad-controls");var b=null!=a.m&&a.m.isLinear();Y(a.K,b);a.N.appendChild(a.K);b=new Vw(a.K,a);a.H.push(b);b=new Uw(a.K,a);a.H.push(b)}
1014
+ function yx(a){a.ba=S("div");a.ba.classList.add("shaka-spinner-container");a.j.appendChild(a.ba);var b=S("div");b.classList.add("shaka-spinner");a.ba.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
1011
1015
  b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
1012
- function xx(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(d){d.target.closest(".shaka-overflow-button")||a.hc()});Dx(a);a.Y=S("div");a.Y.classList.add("shaka-controls-button-panel");a.Y.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Y.classList.add("shaka-tooltips-on");a.N.appendChild(a.Y);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,rx.get(c)?
1013
- (c=rx.get(c).create(a.Y,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function yx(a){if(a.i.addSeekBar)a.l=Ex.create(a.N,a),a.H.push(a.l);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function tx(a){a.P=S("div");a.P.classList.add("shaka-client-side-ad-container");Y(a.P,!1);a.h.o(a.P,"click",function(){Cx(a)});a.j.appendChild(a.P)}
1014
- function nx(a){a.h.o(a.F,"buffering",function(){a.T&&Y(a.ba,a.F.Oc())});a.T&&Y(a.ba,a.F.Oc());a.h.o(window,"keydown",function(b){Fx(a,b)});a.h.o(window,"click",function(){return a.hc()});a.h.o(a,"submenuopen",function(){a.hc()});a.h.o(a.A,"play",function(){kx(a)});a.h.o(a.A,"pause",function(){kx(a)});a.h.o(a.j,"mousemove",function(b){Bx(a,b)});a.h.o(a.j,"touchmove",function(b){Bx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Bx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.ya()});
1015
- a.h.o(a.C,"caststatuschanged",function(){ox(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Bx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),Gx(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),Gx(a,a.l.getValue()+c));break;case "Home":a.l&&
1016
- Gx(a,a.F.Ha().start);break;case "End":a.l&&Gx(a,a.F.Ha().end);break;case " ":e&&Hx(a)}});a.h.o(a.j,"keyup",function(b){a.ma.delete(b.key)});a.h.o(a.Xa,"ad-started",function(b){a.m=b.ad;a.Pf()});a.h.o(a.Xa,"ad-stopped",function(){a.m=null;a.zf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return K(function(b){return B(b,Ix(a),0)})})}
1017
- function Ix(a){return K(function(b){return a.A&&0!=a.A.readyState&&!a.C.qa()&&a.i.enableFullscreenOnRotation&&a.sd()?screen.orientation.type.includes("landscape")&&!a.jc()?B(b,zx(a),0):screen.orientation.type.includes("portrait")&&a.jc()?B(b,Ax(a),0):b.D(0):b.return()})}
1018
- function Bx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),kx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.hb=!0,a.I.stop(),a.Nb()||(lx(a),kx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function Jx(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1019
- function kx(a){var b=a.m?a.m.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.hb||d||Jx(a)?(lx(a),a.g.setAttribute("shown","true"),a.ea.stop()):a.ea.S(a.i.fadeDelay)}function Cx(a){a.T&&(a.gd()?a.I.ya():a.i.singleClickForPlayAndPause&&Hx(a))}function Hx(a){a.m&&a.m.isLinear()?Ww(a):Xw(a)}
1020
- function ox(a){var b=a.C.qa();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Nb=function(){return this.T?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function Gx(a,b){a.l.changeTo(b);a.Nb()&&lx(a)}
1021
- function lx(a){if(a.l)if(a.l.setValue(a.A.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1022
- function Fx(a,b){a.ma.add(b.key);var c=a.gd();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),kx(a),a.h.o(window,"mousedown",function(){a.h.sc(window,"mousedown")}));"Escape"==b.key&&a.I.ya();c&&a.ma.has("Tab")&&Kx(a,b)}
1023
- function Kx(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ma.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1024
- function mx(){var a=new Vb("en");a.ia("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1016
+ function zx(a){a.N=S("div");a.N.classList.add("shaka-bottom-controls");a.N.classList.add("shaka-no-propagation");a.g.appendChild(a.N);a.h.o(a.N,"click",function(d){d.target.closest(".shaka-overflow-button")||a.hc()});Fx(a);a.Y=S("div");a.Y.classList.add("shaka-controls-button-panel");a.Y.classList.add("shaka-show-controls-on-mouse-over");a.i.enableTooltips&&a.Y.classList.add("shaka-tooltips-on");a.N.appendChild(a.Y);for(var b=r(a.i.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,tx.get(c)?
1017
+ (c=tx.get(c).create(a.Y,a),a.H.push(c)):Ua("Unrecognized control panel element requested:",c)}function Ax(a){if(a.i.addSeekBar)a.l=Gx.create(a.N,a),a.H.push(a.l);else{a=r(a.G);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function vx(a){a.P=S("div");a.P.classList.add("shaka-client-side-ad-container");Y(a.P,!1);a.h.o(a.P,"click",function(){Ex(a)});a.j.appendChild(a.P)}
1018
+ function px(a){a.h.o(a.F,"buffering",function(){a.T&&Y(a.ba,a.F.Pc())});a.T&&Y(a.ba,a.F.Pc());a.h.o(window,"keydown",function(b){Hx(a,b)});a.h.o(window,"click",function(){return a.hc()});a.h.o(a,"submenuopen",function(){a.hc()});a.h.o(a.A,"play",function(){mx(a)});a.h.o(a.A,"pause",function(){mx(a)});a.h.o(a.j,"mousemove",function(b){Dx(a,b)});a.h.o(a.j,"touchmove",function(b){Dx(a,b)},{passive:!0});a.h.o(a.j,"touchend",function(b){Dx(a,b)},{passive:!0});a.h.o(a.j,"mouseleave",function(){a.J||a.aa.za()});
1019
+ a.h.o(a.C,"caststatuschanged",function(){qx(a)});a.h.o(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.g.contains(c)&&Dx(a,b);if(a.i.enableKeyboardPlaybackControls)switch(c=a.i.keyboardSeekDistance,b.key){case "ArrowLeft":a.l&&!d&&0<c&&(b.preventDefault(),Ix(a,a.l.getValue()-c));break;case "ArrowRight":a.l&&!d&&0<c&&(b.preventDefault(),Ix(a,a.l.getValue()+c));break;case "Home":a.l&&
1020
+ Ix(a,a.F.Ka().start);break;case "End":a.l&&Ix(a,a.F.Ka().end);break;case " ":e&&Jx(a)}});a.h.o(a.j,"keyup",function(b){a.ma.delete(b.key)});a.h.o(a.Za,"ad-started",function(b){a.m=b.ad;a.Rf()});a.h.o(a.Za,"ad-stopped",function(){a.m=null;a.Bf()});screen.orientation&&a.h.o(screen.orientation,"change",function(){return K(function(b){return A(b,Kx(a),0)})})}
1021
+ function Kx(a){return K(function(b){return a.A&&0!=a.A.readyState&&!a.C.qa()&&a.i.enableFullscreenOnRotation&&a.sd()?screen.orientation.type.includes("landscape")&&!a.jc()?A(b,Bx(a),0):screen.orientation.type.includes("portrait")&&a.jc()?A(b,Cx(a),0):b.D(0):b.return()})}
1022
+ function Dx(a,b){"mousemove"==b.type&&(a.g.classList.remove("shaka-keyboard-navigation"),mx(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.J=Date.now():a.J+1E3<Date.now()&&(a.J=null);a.J&&"mousemove"==b.type||(a.j.style.cursor="",a.ib=!0,a.I.stop(),a.Nb()||(nx(a),mx(a)),a.aa.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.J||a.aa.S(3))}function Lx(a){return window.matchMedia("hover: hover").matches?a.wb.some(function(b){return b.matches(":hover")}):!1}
1023
+ function mx(a){var b=a.m?a.m.isPaused():!1,c=a.A.paused&&!a.$,d=a.g.classList.contains("shaka-keyboard-navigation");b||(!a.m||!a.m.isLinear())&&c||a.ib||d||Lx(a)?(nx(a),a.g.setAttribute("shown","true"),a.ea.stop()):a.ea.S(a.i.fadeDelay)}function Ex(a){a.T&&(a.hd()?a.I.za():a.i.singleClickForPlayAndPause&&Jx(a))}function Jx(a){a.m&&a.m.isLinear()?Yw(a):Zw(a)}
1024
+ function qx(a){var b=a.C.qa();a.dispatchEvent(new O("caststatuschanged",(new Map).set("newStatus",b)));b?a.g.setAttribute("casting","true"):a.g.removeAttribute("casting")}q.Nb=function(){return this.T?null!=this.g.getAttribute("shown")||null!=this.g.getAttribute("casting"):!1};function Ix(a,b){a.l.changeTo(b);a.Nb()&&nx(a)}
1025
+ function nx(a){if(a.l)if(a.l.setValue(a.A.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.G),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new O("timeandseekrangeupdated"))}
1026
+ function Hx(a,b){a.ma.add(b.key);var c=a.hd();"Tab"==b.key&&(a.g.classList.add("shaka-keyboard-navigation"),mx(a),a.h.o(window,"mousedown",function(){a.h.sc(window,"mousedown")}));"Escape"==b.key&&a.I.za();c&&a.ma.has("Tab")&&Mx(a,b)}
1027
+ function Mx(a,b){var c=a.G.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.ma.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
1028
+ function ox(){var a=new Vb("en");a.ia("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
1025
1029
  ["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
1026
1030
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
1027
1031
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1079,77 +1083,77 @@ a.ia("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [
1079
1083
  ["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.ia("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],
1080
1084
  ["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],
1081
1085
  ["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],
1082
- ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.jf(navigator.languages||[]);return a}M("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Nb;Z.prototype.hideAdUI=Z.prototype.zf;Z.prototype.showAdUI=Z.prototype.Pf;
1083
- Z.prototype.toggleFullScreen=Z.prototype.Pe;Z.prototype.isFullScreenEnabled=Z.prototype.jc;Z.prototype.isFullScreenSupported=Z.prototype.sd;Z.prototype.hideSettingsMenus=Z.prototype.hc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.gd;Z.prototype.setLastTouchEventTime=Z.prototype.Nf;Z.prototype.getDisplayTime=Z.prototype.vf;Z.prototype.isCastAllowed=Z.prototype.Rg;Z.prototype.setSeeking=Z.prototype.Je;Z.prototype.isSeeking=Z.prototype.Tg;Z.prototype.getConfig=Z.prototype.qg;
1084
- Z.prototype.getClientSideAdContainer=Z.prototype.pg;Z.prototype.getServerSideAdContainer=Z.prototype.Ig;Z.prototype.getControlsContainer=Z.prototype.sg;Z.prototype.getLocalPlayer=Z.prototype.yg;Z.prototype.getPlayer=Z.prototype.dc;Z.prototype.getLocalVideo=Z.prototype.zg;Z.prototype.getVideo=Z.prototype.Bb;Z.prototype.getVideoContainer=Z.prototype.Og;Z.prototype.getLocalization=Z.prototype.Ag;Z.prototype.getCastProxy=Z.prototype.ng;Z.prototype.getAd=Z.prototype.getAd;
1085
- Z.prototype.setEnabledNativeControls=Z.prototype.Mf;Z.prototype.setEnabledShakaControls=Z.prototype.Fe;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Ug;Z.prototype.allowCast=Z.prototype.ag;Z.registerSeekBar=function(a){Ex=a};Z.registerElement=qx;Z.prototype.destroy=Z.prototype.destroy;var rx=new Map,Ex=new jx;function Lx(a,b){X.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Ik();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=S("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1086
- this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);Mx(this);this.eventManager.o(this.localization,"locale-updated",function(){Nx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Nx(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&Y(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Y(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){Y(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Nf(Date.now());
1087
- d.stopPropagation()});this.eventManager.o(this.g,"click",function(){Ox(c)});Nx(this);this.ad&&this.ad.isLinear()&&Y(this.g,!1)}u(Lx,X);Lx.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function Px(a,b){Qx.set(a,b)}
1088
- function Mx(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Qx.get(c)?(c=Qx.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function Ox(a){if(a.controls.gd())a.controls.hc();else{Y(a.h,!0);kx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};ib(a.h.childNodes,b)&&jb(a.h.childNodes,b)[0].focus()}}function Nx(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1089
- M("shaka.ui.OverflowMenu",Lx);Lx.registerElement=Px;function Rx(){}Rx.prototype.create=function(a,b){return new Lx(a,b)};qx("overflow_menu",new Rx);var Qx=new Map;function Sx(a,b){X.call(this,a,b);var c=this;this.g=Ik();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");a.appendChild(this.j);
1090
- this.i=S("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);Tx(this);Ux(this);this.eventManager.o(this.localization,"locale-updated",function(){Tx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Tx(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});a=this.controls.Bb();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1091
- c.player.wf()==Fm;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Ux(c)})}u(Sx,X);function Ux(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Tx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}M("shaka.ui.AirPlayButton",Sx);function Vx(){}Vx.prototype.create=function(a,b){return new Sx(a,b)};Px("airplay",new Vx);
1092
- qx("airplay",new Vx);function Wx(a,b,c){this.i=a;this.h=Xx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.ge()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.Me(b);b.ui=this;c.ui=this}q=Wx.prototype;q.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?B(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?B(b,a.i.destroy(),4):b.D(4);a.i=null;C(b)})};q.ge=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Yc()&&1<navigator.maxTouchPoints};
1093
- q.getConfiguration=function(){var a=Xx(this);nl(a,this.h,Xx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ol(a,b));nl(this.h,a,Xx(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.rg=function(){return this.g};q.vh=function(a){this.g.Fe(a)};
1094
- function Xx(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1086
+ ["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.lf(navigator.languages||[]);return a}M("shaka.ui.Controls",Z);Z.prototype.isOpaque=Z.prototype.Nb;Z.prototype.hideAdUI=Z.prototype.Bf;Z.prototype.showAdUI=Z.prototype.Rf;
1087
+ Z.prototype.toggleFullScreen=Z.prototype.Re;Z.prototype.isFullScreenEnabled=Z.prototype.jc;Z.prototype.isFullScreenSupported=Z.prototype.sd;Z.prototype.hideSettingsMenus=Z.prototype.hc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.hd;Z.prototype.setLastTouchEventTime=Z.prototype.Pf;Z.prototype.getDisplayTime=Z.prototype.xf;Z.prototype.isCastAllowed=Z.prototype.Tg;Z.prototype.setSeeking=Z.prototype.Ke;Z.prototype.isSeeking=Z.prototype.Vg;Z.prototype.getConfig=Z.prototype.sg;
1088
+ Z.prototype.getClientSideAdContainer=Z.prototype.rg;Z.prototype.getServerSideAdContainer=Z.prototype.Kg;Z.prototype.getControlsContainer=Z.prototype.vg;Z.prototype.getLocalPlayer=Z.prototype.Ag;Z.prototype.getPlayer=Z.prototype.dc;Z.prototype.getLocalVideo=Z.prototype.Bg;Z.prototype.getVideo=Z.prototype.Bb;Z.prototype.getVideoContainer=Z.prototype.Qg;Z.prototype.getLocalization=Z.prototype.Cg;Z.prototype.getCastProxy=Z.prototype.pg;Z.prototype.getAd=Z.prototype.getAd;
1089
+ Z.prototype.setEnabledNativeControls=Z.prototype.Of;Z.prototype.setEnabledShakaControls=Z.prototype.Ge;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Wg;Z.prototype.allowCast=Z.prototype.dg;Z.registerSeekBar=function(a){Gx=a};Z.registerElement=sx;Z.prototype.destroy=Z.prototype.destroy;var tx=new Map,Gx=new lx;function Nx(a,b){X.call(this,a,b);var c=this;this.l=this.controls.i;this.j=this.controls.g;this.i=[];this.g=Kk();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=S("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
1090
+ this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);Ox(this);this.eventManager.o(this.localization,"locale-updated",function(){Px(c)});this.eventManager.o(this.localization,"locale-changed",function(){Px(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&Y(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){Y(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){Y(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Pf(Date.now());
1091
+ d.stopPropagation()});this.eventManager.o(this.g,"click",function(){Qx(c)});Px(this);this.ad&&this.ad.isLinear()&&Y(this.g,!1)}u(Nx,X);Nx.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];X.prototype.release.call(this)};function Rx(a,b){Sx.set(a,b)}
1092
+ function Ox(a){for(var b=r(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Sx.get(c)?(c=Sx.get(c),a.i.push(c.create(a.h,a.controls))):Ua("Unrecognized overflow menu element requested:",c)}function Qx(a){if(a.controls.hd())a.controls.hc();else{Y(a.h,!0);mx(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};ib(a.h.childNodes,b)&&jb(a.h.childNodes,b)[0].focus()}}function Px(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
1093
+ M("shaka.ui.OverflowMenu",Nx);Nx.registerElement=Rx;function Tx(){}Tx.prototype.create=function(a,b){return new Nx(a,b)};sx("overflow_menu",new Tx);var Sx=new Map;function Ux(a,b){X.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");a.appendChild(this.j);
1094
+ this.i=S("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);Vx(this);Wx(this);this.eventManager.o(this.localization,"locale-updated",function(){Vx(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vx(c)});this.eventManager.o(this.g,"click",function(){c.controls.Bb().webkitShowPlaybackTargetPicker()});a=this.controls.Bb();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",function(d){var e=
1095
+ c.player.yf()==Hm;Y(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){Wx(c)})}u(Ux,X);function Wx(a){var b=a.controls.Bb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Vx(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}M("shaka.ui.AirPlayButton",Ux);function Xx(){}Xx.prototype.create=function(a,b){return new Ux(a,b)};Rx("airplay",new Xx);
1096
+ sx("airplay",new Xx);function Yx(a,b,c){this.i=a;this.h=Zx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.ge()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,this.h);this.configure({});c.controls||a.Ne(b);b.ui=this;c.ui=this}q=Yx.prototype;q.destroy=function(){var a=this;return K(function(b){if(1==b.g)return a.g?A(b,a.g.destroy(),2):b.D(2);if(4!=b.g)return a.g=null,a.i?A(b,a.i.destroy(),4):b.D(4);a.i=null;B(b)})};q.ge=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Yc()&&1<navigator.maxTouchPoints};
1097
+ q.getConfiguration=function(){var a=Zx(this);pl(a,this.h,Zx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=ql(a,b));pl(this.h,a,Zx(this),{},"");this.h.castReceiverAppId&&!this.h.overflowMenuButtons.includes("cast")&&this.h.overflowMenuButtons.push("cast");this.g.configure(this.h);this.g.dispatchEvent(new O("uiupdated"))};q.ug=function(){return this.g};q.xh=function(a){this.g.Ge(a)};
1098
+ function Zx(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent".split(" "),contextMenuElements:["loop",
1095
1099
  "picture_in_picture","statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",level:"rgb(255, 255, 255)"},
1096
- trackLabelFormat:Yx,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.ge()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1097
- function Zx(){var a,b,c,d,e,f,g,h,k,l,m,p,n;return K(function(t){switch(t.g){case 1:It();if(!Vl())return $x("shaka-ui-load-failed",ay),t.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),by(f,e));t.D(2);break}h=r(a);k=h.next();
1098
- case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;p=r(b);for(d=p.next();!d.done;d=p.next())if(n=d.value,n.parentElement==l){m=n;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return B(t,by(l,m),9);case 9:va(t,5);break;case 7:return I(t),$x("shaka-ui-load-failed",cy),t.return();case 5:k=h.next();t.D(4);break;case 2:$x("shaka-ui-loaded"),C(t)}})}
1099
- function $x(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1100
- function by(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:c=new U(b);d=new Wx(c,a,b);e="";f=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(e=a.dataset.shakaPlayerCastReceiverId,f="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId,f="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);e.length&&d.configure({castReceiverAppId:e,castAndroidReceiverCompatible:f});b.controls&&
1101
- d.g.Mf(!0);if(g=b.getAttribute("src"))h=document.createElement("source"),h.setAttribute("src",g),b.appendChild(h),b.removeAttribute("src");k=r(b.querySelectorAll("source"));l=k.next();case 2:if(l.done){p.D(0);break}m=l.value;E(p,5);return B(p,d.g.dc().load(m.getAttribute("src")),7);case 7:p.D(0);break;case 5:I(p);case 3:l=k.next(),p.D(2)}})}M("shaka.ui.Overlay",Wx);Wx.prototype.setEnabled=Wx.prototype.vh;Wx.prototype.getControls=Wx.prototype.rg;Wx.prototype.configure=Wx.prototype.configure;
1102
- Wx.prototype.getConfiguration=Wx.prototype.getConfiguration;Wx.prototype.isMobile=Wx.prototype.ge;Wx.prototype.destroy=Wx.prototype.destroy;var Yx=0;Wx.TrackLabelFormat={LANGUAGE:Yx,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var ay=0,cy=1;Wx.FailReasonCode={NO_BROWSER_SUPPORT:ay,PLAYER_FAILED_TO_LOAD:cy};"complete"==document.readyState?K(function(a){if(1==a.g)return B(a,Promise.resolve(),2);Zx();C(a)}):window.addEventListener("load",Zx);function dy(a,b,c,d,e,f,g){function h(z,D){return z+": "+D}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=Nw(b);Jk(b);b.appendChild(m);m=new Map;for(var p=r(a),n=p.next();!n.done;n=p.next())n=n.value,m.has(n.language)||m.set(n.language,new Set),m.get(n.language).add(k(n));m=new Set;l=l?h(l.language,k(l)):"";p={};a=r(a);for(n=a.next();!n.done;p={Va:p.Va},n=a.next()){p.Va=n.value;n=p.Va.language;var t=
1103
- p.Va.forced,x=f.resolve(Zb.Wf),y=k(p.Va),v=h(n,y);if(!m.has(v)){m.add(v);var w=Ik();w.addEventListener("click",function(z){return function(){c(z.Va)}}(p));var A=S("span");w.appendChild(A);A.textContent=ey(n,f);switch(g){case Yx:t&&(A.textContent+=" ("+x+")");break;case 1:y?A.textContent=y:(Ua("Track #"+p.Va.id+" does not have a role, but the UI is configured to only show role."),A.textContent="?");t&&(A.textContent+=" ("+x+")");break;case 2:y&&(A.textContent+=": "+y);t&&(A.textContent+=" ("+x+")");
1104
- break;case 3:p.Va.label?A.textContent=p.Va.label:(Ua("Track #"+p.Va.id+" does not have a label, but the UI is configured to only show labels."),A.textContent="?")}d&&v==l&&(w.appendChild(Qw()),A.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=A.textContent);b.appendChild(w)}}}
1105
- function ey(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Rb(a);return a in Jw?Jw[a].s:c in Jw?Jw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function fy(a,b,c){X.call(this,a,b);var d=this;gy(this,c);hy(this);iy(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),Y(d.menu,!0),Pw(d.menu)):Y(d.menu,!1)})}u(fy,X);
1106
- function gy(a,b){a.button=Ik();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=S("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");b.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1107
- function hy(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Ik();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.hc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1108
- S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function iy(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}Y(a.parent,!0);ib(a.parent.childNodes,b)&&jb(a.parent.childNodes,b)[0].focus();kx(a.controls)}))}M("shaka.ui.SettingsMenu",fy);function jy(a,b){fy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){ky(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Qa().length;Y(c.button,d);ly(c)});this.eventManager.o(this.player,"variantchanged",
1109
- function(){ly(c)});ky(this);ly(this)}u(jy,fy);function ly(a){var b=a.player.Qa();dy(b,a.menu,function(c){a.player.Id(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);Pw(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1110
- function ky(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}M("shaka.ui.AudioLanguageSelection",jy);function my(){}my.prototype.create=function(a,b){return new jy(a,b)};Px("language",new my);qx("language",new my);function ny(a,b){X.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Ik();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=S("span");a.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1111
- a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);oy(this);py(this);this.eventManager.o(this.localization,"locale-updated",function(){oy(c)});this.eventManager.o(this.localization,"locale-changed",function(){oy(c)});this.eventManager.o(this.g,"click",function(){qy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){py(c)})}u(ny,X);
1112
- function qy(a){var b;K(function(c){if(1==c.g){if(a.h.qa())return a.h.Qf(),c.D(0);E(c,3);a.g.disabled=!0;return B(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=I(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}function py(a){var b=a.h.ef()&&a.controls.fb,c=a.h.qa();Y(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");ry(a)}
1113
- function ry(a){a.j.textContent=a.h.qa()?a.h.Gd():a.localization.resolve("OFF")}function oy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");ry(a)}M("shaka.ui.CastButton",ny);function sy(){}sy.prototype.create=function(a,b){return new ny(a,b)};Px("cast",new sy);qx("cast",new sy);function ty(a,b){X.call(this,a,b);var c=this;this.g=Ik();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);uy(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){uy(c)});this.eventManager.o(this.localization,"locale-changed",function(){uy(c)});
1114
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Re(d);c.g.setAttribute("shaka-status",d+"x")}})}u(ty,X);function uy(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}M("shaka.ui.FastForwardButton",ty);function vy(){}vy.prototype.create=function(a,b){return new ty(a,b)};qx("fast_forward",new vy);function wy(a,b){X.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Ik();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");xy(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);yy(this);this.eventManager.o(this.localization,"locale-updated",function(){yy(c)});this.eventManager.o(this.localization,"locale-changed",function(){yy(c)});this.eventManager.o(this.g,"click",function(){return K(function(d){return B(d,
1115
- c.controls.Pe(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.jc()?"fullscreen_exit":"fullscreen";yy(c)});this.eventManager.o(this.h,"loadedmetadata",function(){xy(c)});this.eventManager.o(this.h,"loadeddata",function(){xy(c)})}u(wy,X);function xy(a){a.controls.sd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function yy(a){a.g.ariaLabel=a.localization.resolve(a.controls.jc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1116
- M("shaka.ui.FullscreenButton",wy);function zy(){}zy.prototype.create=function(a,b){return new wy(a,b)};qx("fullscreen",new zy);function Ay(a,b){X.call(this,a,b);var c=this;this.g=Ik();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
1117
- a.appendChild(this.l);this.g.appendChild(a);By(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){By(c)});this.eventManager.o(this.localization,"locale-changed",function(){By(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.ya();c.h.ka(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(By(c),c.m=c.video.loop)});this.h.ka(1)}u(Ay,X);Ay.prototype.release=function(){this.h.stop();this.h=null;X.prototype.release.call(this)};
1118
- function By(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}M("shaka.ui.LoopButton",Ay);function Cy(){}Cy.prototype.create=function(a,b){return new Ay(a,b)};Px("loop",new Cy);qx("loop",new Cy);ax("loop",new Cy);function Dy(a,b){X.call(this,a,b);var c=this;this.g=Ik();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Ey(this);Fy(this);this.eventManager.o(this.localization,"locale-updated",function(){Ey(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ey(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1119
- this.eventManager.o(this.video,"volumechange",function(){Ey(c);Fy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Ey(c);Fy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Ey(c);Fy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Ey(c);Fy(c)})}u(Dy,X);function Ey(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1120
- function Fy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}M("shaka.ui.MuteButton",Dy);function Gy(){}Gy.prototype.create=function(a,b){return new Dy(a,b)};qx("mute",new Gy);function Hy(a,b){X.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Ik();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1121
- S("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);Iy(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){Iy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Iy(c)});this.eventManager.o(this.g,"click",function(){Jy(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1100
+ trackLabelFormat:$x,fadeDelay:0,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.ge()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1101
+ function ay(){var a,b,c,d,e,f,g,h,k,l,m,p,n;return K(function(t){switch(t.g){case 1:Kt();if(!Xl())return by("shaka-ui-load-failed",cy),t.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.D(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),dy(f,e));t.D(2);break}h=r(a);k=h.next();
1102
+ case 4:if(k.done){t.D(2);break}l=k.value;if(l.ui){t.D(5);break}m=null;p=r(b);for(d=p.next();!d.done;d=p.next())if(n=d.value,n.parentElement==l){m=n;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));E(t,7);return A(t,dy(l,m),9);case 9:va(t,5);break;case 7:return J(t),by("shaka-ui-load-failed",ey),t.return();case 5:k=h.next();t.D(4);break;case 2:by("shaka-ui-loaded"),B(t)}})}
1103
+ function by(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
1104
+ function dy(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:c=new T(b);d=new Yx(c,a,b);e="";f=!1;a.dataset&&a.dataset.shakaPlayerCastReceiverId?(e=a.dataset.shakaPlayerCastReceiverId,f="true"===a.dataset.shakaPlayerCastAndroidReceiverCompatible):b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId,f="true"===b.dataset.shakaPlayerCastAndroidReceiverCompatible);e.length&&d.configure({castReceiverAppId:e,castAndroidReceiverCompatible:f});b.controls&&
1105
+ d.g.Of(!0);if(g=b.getAttribute("src"))h=document.createElement("source"),h.setAttribute("src",g),b.appendChild(h),b.removeAttribute("src");k=r(b.querySelectorAll("source"));l=k.next();case 2:if(l.done){p.D(0);break}m=l.value;E(p,5);return A(p,d.g.dc().load(m.getAttribute("src")),7);case 7:p.D(0);break;case 5:J(p);case 3:l=k.next(),p.D(2)}})}M("shaka.ui.Overlay",Yx);Yx.prototype.setEnabled=Yx.prototype.xh;Yx.prototype.getControls=Yx.prototype.ug;Yx.prototype.configure=Yx.prototype.configure;
1106
+ Yx.prototype.getConfiguration=Yx.prototype.getConfiguration;Yx.prototype.isMobile=Yx.prototype.ge;Yx.prototype.destroy=Yx.prototype.destroy;var $x=0;Yx.TrackLabelFormat={LANGUAGE:$x,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var cy=0,ey=1;Yx.FailReasonCode={NO_BROWSER_SUPPORT:cy,PLAYER_FAILED_TO_LOAD:ey};"complete"==document.readyState?K(function(a){if(1==a.g)return A(a,Promise.resolve(),2);ay();B(a)}):window.addEventListener("load",ay);function fy(a,b,c,d,e,f,g){function h(z,D){return z+": "+D}function k(z){return"variant"==z.type?z.audioRoles?z.audioRoles.join(", "):void 0:z.roles.join(", ")}var l=a.find(function(z){return 1==z.active}),m=Pw(b);Lk(b);b.appendChild(m);m=new Map;for(var p=r(a),n=p.next();!n.done;n=p.next())n=n.value,m.has(n.language)||m.set(n.language,new Set),m.get(n.language).add(k(n));m=new Set;l=l?h(l.language,k(l)):"";p={};a=r(a);for(n=a.next();!n.done;p={Xa:p.Xa},n=a.next()){p.Xa=n.value;n=p.Xa.language;var t=
1107
+ p.Xa.forced,y=f.resolve(Zb.Yf),x=k(p.Xa),v=h(n,x);if(!m.has(v)){m.add(v);var w=Kk();w.addEventListener("click",function(z){return function(){c(z.Xa)}}(p));var C=S("span");w.appendChild(C);C.textContent=gy(n,f);switch(g){case $x:t&&(C.textContent+=" ("+y+")");break;case 1:x?C.textContent=x:(Ua("Track #"+p.Xa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+y+")");break;case 2:x&&(C.textContent+=": "+x);t&&(C.textContent+=" ("+y+")");
1108
+ break;case 3:p.Xa.label?C.textContent=p.Xa.label:(Ua("Track #"+p.Xa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&v==l&&(w.appendChild(Sw()),C.classList.add("shaka-chosen-item"),w.ariaSelected="true",e.textContent=C.textContent);b.appendChild(w)}}}
1109
+ function gy(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Rb(a);return a in Lw?Lw[a].s:c in Lw?Lw[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function hy(a,b,c){X.call(this,a,b);var d=this;iy(this,c);jy(this);ky(this);this.eventManager.o(this.button,"click",function(){d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new O("submenuopen")),Y(d.menu,!0),Rw(d.menu)):Y(d.menu,!1)})}u(hy,X);
1110
+ function iy(a,b){a.button=Kk();a.button.classList.add("shaka-overflow-button");a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=S("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=S("span");b.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
1111
+ function jy(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Kk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.hc()});var b=S("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
1112
+ S("span");a.backButton.appendChild(a.backSpan);a.controls.g.appendChild(a.menu)}function ky(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.backButton,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}Y(a.parent,!0);ib(a.parent.childNodes,b)&&jb(a.parent.childNodes,b)[0].focus();mx(a.controls)}))}M("shaka.ui.SettingsMenu",hy);function ly(a,b){hy.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){my(c)});this.eventManager.o(this.localization,"locale-changed",function(){my(c)});this.eventManager.o(this.player,"trackschanged",function(){var d=0<c.player.Sa().length;Y(c.button,d);ny(c)});this.eventManager.o(this.player,"variantchanged",
1113
+ function(){ny(c)});my(this);ny(this)}u(ly,hy);function ny(a){var b=a.player.Sa();fy(b,a.menu,function(c){a.player.Id(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.i.trackLabelFormat);Rw(a.menu);a.controls.dispatchEvent(new O("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText)}
1114
+ function my(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}M("shaka.ui.AudioLanguageSelection",ly);function oy(){}oy.prototype.create=function(a,b){return new ly(a,b)};Rx("language",new oy);sx("language",new oy);function py(a,b){X.call(this,a,b);var c=this;this.h=this.controls.C;this.g=Kk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=S("span");a.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");
1115
+ a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);qy(this);ry(this);this.eventManager.o(this.localization,"locale-updated",function(){qy(c)});this.eventManager.o(this.localization,"locale-changed",function(){qy(c)});this.eventManager.o(this.g,"click",function(){sy(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){ry(c)})}u(py,X);
1116
+ function sy(a){var b;K(function(c){if(1==c.g){if(a.h.qa())return a.h.Sf(),c.D(0);E(c,3);a.g.disabled=!0;return A(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,va(c,0);b=J(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));B(c)})}function ry(a){var b=a.h.hf()&&a.controls.ab,c=a.h.qa();Y(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");ty(a)}
1117
+ function ty(a){a.j.textContent=a.h.qa()?a.h.Gd():a.localization.resolve("OFF")}function qy(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");ty(a)}M("shaka.ui.CastButton",py);function uy(){}uy.prototype.create=function(a,b){return new py(a,b)};Rx("cast",new uy);sx("cast",new uy);function vy(a,b){X.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);wy(this);this.h=this.controls.i.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){wy(c)});this.eventManager.o(this.localization,"locale-changed",function(){wy(c)});
1118
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Te(d);c.g.setAttribute("shaka-status",d+"x")}})}u(vy,X);function wy(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}M("shaka.ui.FastForwardButton",vy);function xy(){}xy.prototype.create=function(a,b){return new vy(a,b)};sx("fast_forward",new xy);function yy(a,b){X.call(this,a,b);var c=this;this.h=this.controls.B;this.g=Kk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");zy(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);Ay(this);this.eventManager.o(this.localization,"locale-updated",function(){Ay(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ay(c)});this.eventManager.o(this.g,"click",function(){return K(function(d){return A(d,
1119
+ c.controls.Re(),0)})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.jc()?"fullscreen_exit":"fullscreen";Ay(c)});this.eventManager.o(this.h,"loadedmetadata",function(){zy(c)});this.eventManager.o(this.h,"loadeddata",function(){zy(c)})}u(yy,X);function zy(a){a.controls.sd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function Ay(a){a.g.ariaLabel=a.localization.resolve(a.controls.jc()?"EXIT_FULL_SCREEN":"FULL_SCREEN")}
1120
+ M("shaka.ui.FullscreenButton",yy);function By(){}By.prototype.create=function(a,b){return new yy(a,b)};sx("fullscreen",new By);function Cy(a,b){X.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("LOOP");a.appendChild(this.j);this.l=S("span");this.l.classList.add("shaka-current-selection-span");
1121
+ a.appendChild(this.l);this.g.appendChild(a);Dy(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){Dy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Dy(c)});this.eventManager.o(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.za();c.h.ka(1)});this.m=this.video.loop;this.h=new Q(function(){c.m!=c.video.loop&&(Dy(c),c.m=c.video.loop)});this.h.ka(1)}u(Cy,X);Cy.prototype.release=function(){this.h.stop();this.h=null;X.prototype.release.call(this)};
1122
+ function Dy(a){a.j.textContent=a.localization.resolve("LOOP");a.l.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}M("shaka.ui.LoopButton",Cy);function Ey(){}Ey.prototype.create=function(a,b){return new Cy(a,b)};Rx("loop",new Ey);sx("loop",new Ey);cx("loop",new Ey);function Fy(a,b){X.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.parent.appendChild(this.g);Gy(this);Hy(this);this.eventManager.o(this.localization,"locale-updated",function(){Gy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Gy(c)});this.eventManager.o(this.g,"click",function(){c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});
1123
+ this.eventManager.o(this.video,"volumechange",function(){Gy(c);Hy(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){Gy(c);Hy(c)});this.eventManager.o(this.adManager,"ad-muted",function(){Gy(c);Hy(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;Gy(c);Hy(c)})}u(Fy,X);function Gy(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b)}
1124
+ function Hy(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}M("shaka.ui.MuteButton",Fy);function Iy(){}Iy.prototype.create=function(a,b){return new Fy(a,b)};sx("mute",new Iy);function Jy(a,b){X.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Kk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=S("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
1125
+ S("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);Ky(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){Ky(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ky(c)});this.eventManager.o(this.g,"click",function(){Ly(c)});this.eventManager.o(this.l,"enterpictureinpicture",function(){c.i.textContent=
1122
1126
  "branding_watermark";c.g.ariaLabel=c.localization.resolve("EXIT_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("ON")});this.eventManager.o(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.ariaLabel=c.localization.resolve("ENTER_PICTURE_IN_PICTURE");c.h.textContent=c.localization.resolve("OFF")});this.eventManager.o(this.controls,"caststatuschanged",function(d){d.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!1):
1123
- document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){Ky(c)})}u(Hy,X);function Jy(a){var b;K(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?B(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),B(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=I(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));C(c)})}
1124
- function Iy(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1125
- function Ky(a){K(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return Y(a.g,!1),b.D(0);if(!a.player||!a.player.ic())return Y(a.g,!0),b.D(0);Y(a.g,!1);return document.pictureInPictureElement?B(b,document.exitPictureInPicture(),0):b.D(0)})}M("shaka.ui.PipButton",Hy);function Ly(){}Ly.prototype.create=function(a,b){return new Hy(a,b)};Px("picture_in_picture",new Ly);qx("picture_in_picture",new Ly);ax("picture_in_picture",new Ly);function My(a,b){fy.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){Ny(c)});this.eventManager.o(this.localization,"locale-changed",function(){Ny(c)});this.eventManager.o(this.player,"ratechange",function(){Oy(c,c.player.zb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1126
- "x",d]}));Ny(this);Py(this);Oy(this,this.player.zb())}u(My,fy);function Ny(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1127
- function Oy(a,b){var c=Ow(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(Qw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1128
- "x")}function Py(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={yc:b.yc},d=c.next()){b.yc=d.value;d=Ik();var e=S("span");e.textContent=b.yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.yc);a.video.defaultPlaybackRate=a.g.get(f.yc)}}(b));a.menu.appendChild(d)}Pw(a.menu)}M("shaka.ui.PlaybackRateSelection",My);function Qy(){}Qy.prototype.create=function(a,b){return new My(a,b)};Px("playback_rate",new Qy);qx("playback_rate",new Qy);function Ry(a,b){X.call(this,a,b);var c=this;this.g=Ik();this.g.classList.add("shaka-current-time");Sy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Ha().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.vf(),f=c.video.duration,g=c.player.Ha(),h=g.end-g.start;c.player.U()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Sy(c,"- "+Rw(e,f)),c.g.disabled=
1129
- !1):(Sy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Rw(e,d),f&&(e+=" / "+Rw(f,d)),Sy(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(Ry,X);function Sy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}M("shaka.ui.PresentationTimeTracker",Ry);function Ty(){}Ty.prototype.create=function(a,b){return new Ry(a,b)};qx("time_and_duration",new Ty);function Uy(a,b){fy.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){Vy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Vy(c)});this.eventManager.o(this.player,"variantchanged",function(){Wy(c)});this.eventManager.o(this.player,"trackschanged",function(){Wy(c)});this.eventManager.o(this.player,
1130
- "abrstatuschanged",function(){Wy(c)});Wy(this)}u(Uy,fy);
1131
- function Wy(a){var b=a.player.Qa(),c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.ic()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ic()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Nw(a.menu);Jk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
1132
- for(var e={},f=r(b),g=f.next();!g.done;e={Zb:e.Zb},g=f.next()){e.Zb=g.value;g=Ik();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Zb;a.player.configure({abr:{enabled:!1}});a.player.De(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=a.player.ic()?Math.round(e.Zb.bandwidth/1E3)+" kbits/s":e.Zb.height+"p";g.appendChild(h);d||e.Zb!=c||(g.ariaSelected="true",g.appendChild(Qw()),h.classList.add("shaka-chosen-item"),
1133
- a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Ik();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});Wy(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(Qw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
1134
- a.currentSelection.textContent);a.menu.appendChild(e);Pw(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"));Vy(a)}
1135
- function Vy(a){var b=a.player.ic()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}M("shaka.ui.ResolutionSelection",Uy);function Xy(){}
1136
- Xy.prototype.create=function(a,b){return new Uy(a,b)};Px("quality",new Xy);qx("quality",new Xy);function Yy(a,b){X.call(this,a,b);var c=this;this.g=Ik();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);Zy(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){Zy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Zy(c)});
1137
- this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Re(d);c.g.setAttribute("shaka-status",d+"x")}})}u(Yy,X);function Zy(a){a.g.ariaLabel=a.localization.resolve("REWIND")}M("shaka.ui.RewindButton",Yy);function $y(){}$y.prototype.create=function(a,b){return new Yy(a,b)};qx("rewind",new $y);function az(a,b){X.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");Y(this.h,!1);this.j.appendChild(this.h);this.g=Ik();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Y(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);bz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1138
- d:(c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){bz(c)});this.eventManager.o(this.localization,"locale-changed",function(){bz(c)});this.eventManager.o(this.adManager,"ad-started",function(){cz(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Y(c.g,!1);Y(c.h,!1)});this.eventManager.o(this.g,
1139
- "click",function(){c.ad.skip()});this.ad&&cz(this)}u(az,X);az.prototype.release=function(){this.i.stop();this.i=null;X.prototype.release.call(this)};function bz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function cz(a){a.ad.isSkippable()&&(Y(a.g,!0),Y(a.h,!0),a.h.textContent="",a.i.ya(),a.i.ka(.5))}M("shaka.ui.SkipAdButton",az);function dz(a,b){Vw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}u(dz,Vw);dz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};dz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1140
- M("shaka.ui.SmallPlayButton",dz);function ez(){}ez.prototype.create=function(a,b){return new dz(a,b)};qx("play_pause",new ez);function fz(a,b){X.call(this,a,b);a=S("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}u(fz,X);M("shaka.ui.Spacer",fz);function gz(){}gz.prototype.create=function(a,b){return new fz(a,b)};qx("spacer",new gz);function hz(a,b){function c(k){return Rw(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}X.call(this,a,b);var h=this;this.i=Ik();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=S("label");a.classList.add("shaka-overflow-button-label");
1127
+ document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&Y(c.g,!0)});this.eventManager.o(this.player,"trackschanged",function(){My(c)})}u(Jy,X);function Ly(a){var b;K(function(c){if(1==c.g)return E(c,2),document.pictureInPictureElement?A(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),A(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return va(c,0);b=J(c);a.controls.dispatchEvent(new O("error",(new Map).set("detail",b)));B(c)})}
1128
+ function Ky(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.ariaLabel=a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1129
+ function My(a){K(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return Y(a.g,!1),b.D(0);if(!a.player||!a.player.ic())return Y(a.g,!0),b.D(0);Y(a.g,!1);return document.pictureInPictureElement?A(b,document.exitPictureInPicture(),0):b.D(0)})}M("shaka.ui.PipButton",Jy);function Ny(){}Ny.prototype.create=function(a,b){return new Jy(a,b)};Rx("picture_in_picture",new Ny);sx("picture_in_picture",new Ny);cx("picture_in_picture",new Ny);function Oy(a,b){hy.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){Py(c)});this.eventManager.o(this.localization,"locale-changed",function(){Py(c)});this.eventManager.o(this.player,"ratechange",function(){Qy(c,c.player.zb())});this.g=new Map(this.controls.i.playbackRates.map(function(d){return[d+
1130
+ "x",d]}));Py(this);Ry(this);Qy(this,this.player.zb())}u(Oy,hy);function Py(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1131
+ function Qy(a,b){var c=Qw(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(Sw()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",b+
1132
+ "x")}function Ry(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={yc:b.yc},d=c.next()){b.yc=d.value;d=Kk();var e=S("span");e.textContent=b.yc;d.appendChild(e);a.eventManager.o(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.yc);a.video.defaultPlaybackRate=a.g.get(f.yc)}}(b));a.menu.appendChild(d)}Rw(a.menu)}M("shaka.ui.PlaybackRateSelection",Oy);function Sy(){}Sy.prototype.create=function(a,b){return new Oy(a,b)};Rx("playback_rate",new Sy);sx("playback_rate",new Sy);function Ty(a,b){X.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("shaka-current-time");Uy(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.player.U()&&(c.video.currentTime=c.player.Ka().end)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.$,e=c.controls.xf(),f=c.video.duration,g=c.player.Ka(),h=g.end-g.start;c.player.U()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Uy(c,"- "+Tw(e,f)),c.g.disabled=
1133
+ !1):(Uy(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=Tw(e,d),f&&(e+=" / "+Tw(f,d)),Uy(c,e),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.U()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))})}u(Ty,X);function Uy(a,b){b!=a.g.textContent&&(a.g.textContent=b)}M("shaka.ui.PresentationTimeTracker",Ty);function Vy(){}Vy.prototype.create=function(a,b){return new Ty(a,b)};sx("time_and_duration",new Vy);function Wy(a,b){hy.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){Xy(c)});this.eventManager.o(this.localization,"locale-changed",function(){Xy(c)});this.eventManager.o(this.player,"variantchanged",function(){Yy(c)});this.eventManager.o(this.player,"trackschanged",function(){Yy(c)});this.eventManager.o(this.player,
1134
+ "abrstatuschanged",function(){Yy(c)});Yy(this)}u(Wy,hy);
1135
+ function Yy(a){var b=a.player.Sa(),c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return(a.player.ic()?b.findIndex(function(m){return m.bandwidth==k.bandwidth}):b.findIndex(function(m){return m.height==k.height}))==l});a.player.ic()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height-k.height});var d=Pw(a.menu);Lk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;
1136
+ for(var e={},f=r(b),g=f.next();!g.done;e={Zb:e.Zb},g=f.next()){e.Zb=g.value;g=Kk();g.classList.add("explicit-resolution");a.eventManager.o(g,"click",function(k){return function(){var l=k.Zb;a.player.configure({abr:{enabled:!1}});a.player.Ee(l,a.controls.i.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=a.player.ic()?Math.round(e.Zb.bandwidth/1E3)+" kbits/s":e.Zb.height+"p";g.appendChild(h);d||e.Zb!=c||(g.ariaSelected="true",g.appendChild(Sw()),h.classList.add("shaka-chosen-item"),
1137
+ a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Kk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});Yy(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(Sw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
1138
+ a.currentSelection.textContent);a.menu.appendChild(e);Rw(a.menu);a.controls.dispatchEvent(new O("resolutionselectionupdated"));Xy(a)}
1139
+ function Xy(a){var b=a.player.ic()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}M("shaka.ui.ResolutionSelection",Wy);function Zy(){}
1140
+ Zy.prototype.create=function(a,b){return new Wy(a,b)};Rx("quality",new Zy);sx("quality",new Zy);function $y(a,b){X.call(this,a,b);var c=this;this.g=Kk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);az(this);this.h=this.controls.i.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){az(c)});this.eventManager.o(this.localization,"locale-changed",function(){az(c)});
1141
+ this.eventManager.o(this.g,"click",function(){if(c.video.duration){var d=c.h.indexOf(c.player.zb())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.player.Te(d);c.g.setAttribute("shaka-status",d+"x")}})}u($y,X);function az(a){a.g.ariaLabel=a.localization.resolve("REWIND")}M("shaka.ui.RewindButton",$y);function bz(){}bz.prototype.create=function(a,b){return new $y(a,b)};sx("rewind",new bz);function cz(a,b){X.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");Y(this.h,!1);this.j.appendChild(this.h);this.g=Kk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;Y(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);dz(this);this.i=new Q(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1142
+ d:(c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.localization,"locale-updated",function(){dz(c)});this.eventManager.o(this.localization,"locale-changed",function(){dz(c)});this.eventManager.o(this.adManager,"ad-started",function(){ez(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),Y(c.h,!1))});this.eventManager.o(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;Y(c.g,!1);Y(c.h,!1)});this.eventManager.o(this.g,
1143
+ "click",function(){c.ad.skip()});this.ad&&ez(this)}u(cz,X);cz.prototype.release=function(){this.i.stop();this.i=null;X.prototype.release.call(this)};function dz(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function ez(a){a.ad.isSkippable()&&(Y(a.g,!0),Y(a.h,!0),a.h.textContent="",a.i.za(),a.i.ka(.5))}M("shaka.ui.SkipAdButton",cz);function fz(a,b){Xw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}u(fz,Xw);fz.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};fz.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1144
+ M("shaka.ui.SmallPlayButton",fz);function gz(){}gz.prototype.create=function(a,b){return new fz(a,b)};sx("play_pause",new gz);function hz(a,b){X.call(this,a,b);a=S("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}u(hz,X);M("shaka.ui.Spacer",hz);function iz(){}iz.prototype.create=function(a,b){return new hz(a,b)};sx("spacer",new iz);function jz(a,b){function c(k){return Tw(h.h[k],!1)+" (m)"}function d(k){return Math.round(h.h[k]/1E3)+" (kbits/s)"}function e(k){return h.h[k].toFixed(2)+" (s)"}function f(k){return h.h[k]+" (frames)"}function g(k){return h.h[k]+" (px)"}X.call(this,a,b);var h=this;this.i=Kk();this.i.classList.add("shaka-statistics-button");this.j=S("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=S("label");a.classList.add("shaka-overflow-button-label");
1141
1145
  this.A=S("span");a.appendChild(this.A);this.m=S("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.g=S("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-statistics-container");this.g.classList.add("shaka-hidden");this.controls.g.appendChild(this.g);this.F=[];this.G=["stateHistory","switchHistory"];this.h=this.player.getStats();
1142
1146
  this.B={};this.C={width:g,height:g,completionPercent:function(k){return h.h[k]+" (%)"},bufferingTime:e,drmTimeSeconds:e,licenseTime:e,liveLatency:e,loadLatency:e,manifestTimeSeconds:e,estimatedBandwidth:d,streamBandwidth:d,maxSegmentDuration:c,pauseTime:c,playTime:c,corruptedFrames:f,decodedFrames:f,droppedFrames:f,stallsDetected:function(k){return h.h[k]+" (stalls)"},gapsJumped:function(k){return h.h[k]+" (gaps)"}};this.l=new Q(function(){h.h=h.player.getStats();for(var k=r(h.F),l=k.next();!l.done;l=
1143
- k.next())l=l.value,h.B[l].textContent=h.C[l](l)});iz(this);jz(this);this.eventManager.o(this.localization,"locale-updated",function(){iz(h)});this.eventManager.o(this.localization,"locale-changed",function(){iz(h)});this.eventManager.o(this.i,"click",function(){Y(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),Y(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),Y(h.g,!1));iz(h)})}u(hz,X);
1144
- function iz(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1145
- function jz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ua("Unrecognized statistic element:",c)}hz.prototype.release=function(){this.l.stop();this.l=null;X.prototype.release.call(this)};M("shaka.ui.StatisticsButton",hz);function kz(){}
1146
- kz.prototype.create=function(a,b){return new hz(a,b)};Px("statistics",new kz);ax("statistics",new kz);function lz(a,b){fy.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ob()?this.button.ariaPressed="true":this.button.ariaPressed="false";mz(this);this.eventManager.o(this.localization,"locale-updated",function(){nz(c);oz(c)});this.eventManager.o(this.localization,"locale-changed",function(){nz(c);oz(c)});this.eventManager.o(this.player,
1147
- "texttrackvisibility",function(){pz(c);oz(c)});this.eventManager.o(this.player,"textchanged",function(){oz(c)});this.eventManager.o(this.player,"trackschanged",function(){qz(c)});pz(this);nz(this);oz(this);qz(this)}u(lz,fy);function mz(a){var b=Ik();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Qw());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1148
- function pz(a){a.player.Ob()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1149
- function oz(a){var b=a.player.Ab();dy(b,a.menu,function(c){return rz(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Ik();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Le(!1);oz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.ariaSelected="true",b.appendChild(Qw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1150
- a.currentSelection.textContent);Pw(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function rz(a,b){return K(function(c){a.player.Ce(b);return B(c,a.player.Le(!0),0)})}function nz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1151
- function qz(a){var b=0<a.player.Ab().length;Y(a.button,b);oz(a)}M("shaka.ui.TextSelection",lz);function sz(){}sz.prototype.create=function(a,b){return new lz(a,b)};Px("captions",new sz);qx("captions",new sz);function tz(a,b){cx.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return uz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return vz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return vz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return uz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return wz(c)});
1152
- this.eventManager.o(this.localization,"locale-changed",function(){return wz(c)});uz(this);wz(this);if(this.ad)this.onChange()}u(tz,cx);tz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function uz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);xz(a)}function vz(a){var b=a.ad.getVolume();a.setValue(b);xz(a)}
1153
- function xz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function wz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}M("shaka.ui.VolumeBar",tz);function yz(){}yz.prototype.create=function(a,b){return new tz(a,b)};qx("volume",new yz);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1147
+ k.next())l=l.value,h.B[l].textContent=h.C[l](l)});kz(this);lz(this);this.eventManager.o(this.localization,"locale-updated",function(){kz(h)});this.eventManager.o(this.localization,"locale-changed",function(){kz(h)});this.eventManager.o(this.i,"click",function(){Y(h.parent,!1);h.g.classList.contains("shaka-hidden")?(h.j.textContent="insert_chart",h.l.ka(.1),Y(h.g,!0)):(h.j.textContent="insert_chart_outlined",h.l.stop(),Y(h.g,!1));kz(h)})}u(jz,X);
1148
+ function kz(a){a.A.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}
1149
+ function lz(a){for(var b=r(a.controls.i.statisticsList),c=b.next();!c.done;c=b.next())if(c=c.value,c in a.h&&!a.G.includes(c)){var d=a.g,e=d.appendChild,f=a,g=S("div"),h=S("label");h.textContent=c+":";g.appendChild(h);h=S("span");h.textContent=f.C[c](c);g.appendChild(h);f.B[c]=h;e.call(d,g);a.F.push(c)}else Ua("Unrecognized statistic element:",c)}jz.prototype.release=function(){this.l.stop();this.l=null;X.prototype.release.call(this)};M("shaka.ui.StatisticsButton",jz);function mz(){}
1150
+ mz.prototype.create=function(a,b){return new jz(a,b)};Rx("statistics",new mz);cx("statistics",new mz);function nz(a,b){hy.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Ob()?this.button.ariaPressed="true":this.button.ariaPressed="false";oz(this);this.eventManager.o(this.localization,"locale-updated",function(){pz(c);qz(c)});this.eventManager.o(this.localization,"locale-changed",function(){pz(c);qz(c)});this.eventManager.o(this.player,
1151
+ "texttrackvisibility",function(){rz(c);qz(c)});this.eventManager.o(this.player,"textchanged",function(){qz(c)});this.eventManager.o(this.player,"trackschanged",function(){sz(c)});rz(this);pz(this);qz(this);sz(this)}u(nz,hy);function oz(a){var b=Kk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(Sw());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1152
+ function rz(a){a.player.Ob()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new O("captionselectionupdated"))}
1153
+ function qz(a){var b=a.player.Ab();fy(b,a.menu,function(c){return tz(a,c)},a.player.Ob(),a.currentSelection,a.localization,a.controls.i.trackLabelFormat);b=Kk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Me(!1);qz(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Ob()||(b.ariaSelected="true",b.appendChild(Sw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
1154
+ a.currentSelection.textContent);Rw(a.menu);a.controls.dispatchEvent(new O("captionselectionupdated"))}function tz(a,b){return K(function(c){a.player.De(b);return A(c,a.player.Me(!0),0)})}function pz(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1155
+ function sz(a){var b=0<a.player.Ab().length;Y(a.button,b);qz(a)}M("shaka.ui.TextSelection",nz);function uz(){}uz.prototype.create=function(a,b){return new nz(a,b)};Rx("captions",new uz);sx("captions",new uz);function vz(a,b){ex.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.h=this.controls.i;this.eventManager.o(this.video,"volumechange",function(){return wz(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return xz(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return xz(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return wz(c)});this.eventManager.o(this.localization,"locale-updated",function(){return yz(c)});
1156
+ this.eventManager.o(this.localization,"locale-changed",function(){return yz(c)});wz(this);yz(this);if(this.ad)this.onChange()}u(vz,ex);vz.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function wz(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);zz(a)}function xz(a){var b=a.ad.getVolume();a.setValue(b);zz(a)}
1157
+ function zz(a){var b=a.h.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function yz(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}M("shaka.ui.VolumeBar",vz);function Az(){}Az.prototype.create=function(a,b){return new vz(a,b)};sx("volume",new Az);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1154
1158
 
1155
1159
  //# sourceMappingURL=shaka-player.ui.map