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
@@ -10,42 +10,42 @@
10
10
  SPDX-License-Identifier: Apache-2.0
11
11
  */
12
12
  var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
13
- function ca(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 da=ca(this);function fa(a,b){if(b)a:{var c=da;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&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
14
- fa("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;ba(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
- fa("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=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
13
+ function ca(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 da=ca(this);function ea(a,b){if(b)a:{var c=da;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&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
14
+ ea("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;ba(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
+ ea("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=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(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 ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
17
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
18
- function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.hh=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
- function sa(a,b){a.i={ue:b,Ce:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function A(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.ue;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Ce?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(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 Ba(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.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ce)throw b.ue;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
18
+ function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.jh=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
+ function sa(a,b){a.i={we:b,Ee:!0};a.g=a.m||a.j}qa.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function A(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ta(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.we;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
+ function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Ee?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(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 Ba(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.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ee)throw b.we;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
22
22
  function Ea(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ba(a));return b};this.throw=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.s):(sa(a.g,b),b=Ba(a));return b};this.return=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}function Fa(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 Fa(new Ea(new ya(a)))}function Ia(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
24
- fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.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=
24
+ ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.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.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(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.D(g):this.m(g)}};
26
26
  b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=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.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
27
27
  function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.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=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=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.I=function(g){var h=this.j();g.Gc(h.resolve,h.reject)};b.prototype.L=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.Gc(k(g,l),k(h,m));return p};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Gc=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.o=!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).Gc(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).Gc(p(n.length-1),m),k=h.next();
28
+ b.prototype.I=function(g){var h=this.j();g.Hc(h.resolve,h.reject)};b.prototype.L=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.Hc(k(g,l),k(h,m));return p};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Hc=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.o=!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).Hc(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).Hc(p(n.length-1),m),k=h.next();
30
30
  while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
31
- fa("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(!Ja(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
31
+ ea("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(!Ja(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
32
32
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(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(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ja(k,
33
33
  g)&&Ja(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.g)?delete k[g][this.g]:!1};return b});
34
- fa("Map",function(a){function b(){var h={};return h.Pa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Pa;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&&Ja(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,ga:p}}return{id:l,
34
+ ea("Map",function(a){function b(){var h={};return h.Ra=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Ra;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&&Ja(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,ga:p}}return{id:l,
35
35
  list:m,index:-1,ga: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.ga?l.ga.value=k:(l.ga={next:this.g,Pa:this.g.Pa,head:this.g,key:h,value:k},l.list.push(l.ga),this.g.Pa.next=l.ga,this.g.Pa=l.ga,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ga&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ga.Pa.next=h.ga.next,h.ga.next.Pa=h.ga.Pa,
37
- h.ga.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Pa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ga};e.prototype.get=function(h){return(h=d(this,h).ga)&&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(),
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.ga?l.ga.value=k:(l.ga={next:this.g,Ra:this.g.Ra,head:this.g,key:h,value:k},l.list.push(l.ga),this.g.Ra.next=l.ga,this.g.Ra=l.ga,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ga&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ga.Ra.next=h.ga.next,h.ga.next.Ra=h.ga.Ra,
37
+ h.ga.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Ra=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ga};e.prototype.get=function(h){return(h=d(this,h).ga)&&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});
39
- fa("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||
39
+ ea("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
- b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(a,b,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{Ae:e,v:f}}return{Ae:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Ae}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
42
- fa("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+""}
43
- fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});fa("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}});
44
- function Ma(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}fa("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Oa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ja(d,e)&&(a[e]=d[e])}return a};
45
- fa("Object.assign",function(a){return a||Oa});fa("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}});fa("Array.prototype.values",function(a){return a?a:function(){return Ma(this,function(b,c){return c})}});
46
- fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});
47
- fa("String.prototype.repeat",function(a){return a?a:function(b){var c=La(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
48
- fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push([d,b[d]]);return c}});var Pa=this||self;
41
+ b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(a,b,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{Ce:e,v:f}}return{Ce:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Ce}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
42
+ ea("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+""}
43
+ ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});ea("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}});
44
+ function Ma(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}ea("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Oa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ja(d,e)&&(a[e]=d[e])}return a};
45
+ ea("Object.assign",function(a){return a||Oa});ea("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}});ea("Array.prototype.values",function(a){return a?a:function(){return Ma(this,function(b,c){return c})}});
46
+ ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ea("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});
47
+ ea("String.prototype.repeat",function(a){return a?a:function(b){var c=La(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
48
+ ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push([d,b[d]]);return c}});var Pa=this||self;
49
49
  function M(a,b){a=a.split(".");var c=Pa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
50
50
  @license
51
51
  Shaka Player
@@ -77,23 +77,23 @@ var Mb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
77
77
  Copyright 2006 The Closure Library Authors
78
78
  SPDX-License-Identifier: Apache-2.0
79
79
  */
80
- function Nb(a){var b;a instanceof Nb?(Ob(this,a.Ea),this.pb=a.pb,this.Fa=a.Fa,Pb(this,a.Jb),this.ua=a.ua,Qb(this,a.g.clone()),this.fb=a.fb):a&&(b=String(a).match(Mb))?(Ob(this,b[1]||"",!0),this.pb=Rb(b[2]||""),this.Fa=Rb(b[3]||"",!0),Pb(this,b[4]),this.ua=Rb(b[5]||"",!0),Qb(this,b[6]||"",!0),this.fb=Rb(b[7]||"")):this.g=new Sb(null)}q=Nb.prototype;q.Ea="";q.pb="";q.Fa="";q.Jb=null;q.ua="";q.fb="";
81
- q.toString=function(){var a=[],b=this.Ea;b&&a.push(Tb(b,Ub,!0),":");if(b=this.Fa){a.push("//");var c=this.pb;c&&a.push(Tb(c,Ub,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Jb;null!=b&&a.push(":",String(b))}if(b=this.ua)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Tb(b,"/"==b.charAt(0)?Vb:Wb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fb)&&a.push("#",Tb(b,Xb));return a.join("")};
82
- q.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Nb);var c=!!a.Ea;c?Ob(b,a.Ea):c=!!a.pb;c?b.pb=a.pb:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Jb;var d=a.ua;if(c)Pb(b,a.Jb);else if(c=!!a.ua){if("/"!=d.charAt(0))if(this.Fa&&!this.ua)d="/"+d;else{var e=b.ua.lastIndexOf("/");-1!=e&&(d=b.ua.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(""):".."==
83
- 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.ua=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};q.clone=function(){return new Nb(this)};function Ob(a,b,c){a.Ea=c?Rb(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function Pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Jb=b}else a.Jb=null}function Qb(a,b,c){b instanceof Sb?a.g=b:(c||(b=Tb(b,Yb)),a.g=new Sb(b))}
80
+ function Nb(a){var b;a instanceof Nb?(Ob(this,a.Ha),this.qb=a.qb,this.Ia=a.Ia,Pb(this,a.Kb),this.wa=a.wa,Qb(this,a.g.clone()),this.gb=a.gb):a&&(b=String(a).match(Mb))?(Ob(this,b[1]||"",!0),this.qb=Rb(b[2]||""),this.Ia=Rb(b[3]||"",!0),Pb(this,b[4]),this.wa=Rb(b[5]||"",!0),Qb(this,b[6]||"",!0),this.gb=Rb(b[7]||"")):this.g=new Sb(null)}q=Nb.prototype;q.Ha="";q.qb="";q.Ia="";q.Kb=null;q.wa="";q.gb="";
81
+ q.toString=function(){var a=[],b=this.Ha;b&&a.push(Tb(b,Ub,!0),":");if(b=this.Ia){a.push("//");var c=this.qb;c&&a.push(Tb(c,Ub,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Kb;null!=b&&a.push(":",String(b))}if(b=this.wa)this.Ia&&"/"!=b.charAt(0)&&a.push("/"),a.push(Tb(b,"/"==b.charAt(0)?Vb:Wb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.gb)&&a.push("#",Tb(b,Xb));return a.join("")};
82
+ q.resolve=function(a){var b=this.clone();"data"===b.Ha&&(b=new Nb);var c=!!a.Ha;c?Ob(b,a.Ha):c=!!a.qb;c?b.qb=a.qb:c=!!a.Ia;c?b.Ia=a.Ia:c=null!=a.Kb;var d=a.wa;if(c)Pb(b,a.Kb);else if(c=!!a.wa){if("/"!=d.charAt(0))if(this.Ia&&!this.wa)d="/"+d;else{var e=b.wa.lastIndexOf("/");-1!=e&&(d=b.wa.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(""):".."==
83
+ 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.wa=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.gb;c&&(b.gb=a.gb);return b};q.clone=function(){return new Nb(this)};function Ob(a,b,c){a.Ha=c?Rb(b,!0):b;a.Ha&&(a.Ha=a.Ha.replace(/:$/,""))}function Pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Kb=b}else a.Kb=null}function Qb(a,b,c){b instanceof Sb?a.g=b:(c||(b=Tb(b,Yb)),a.g=new Sb(b))}
84
84
  function Rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Tb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Zb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Zb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ub=/[#\/\?@]/g,Wb=/[#\?:]/g,Vb=/[#\?]/g,Yb=/[#\?@]/g,Xb=/#/g;function Sb(a){this.g=a||null}
85
- function $b(a){if(!a.na&&(a.na={},a.Ic=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=Sb.prototype;q.na=null;q.Ic=null;q.add=function(a,b){$b(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Ic++;return this};
86
- q.set=function(a,b){$b(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[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 Sb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Ic=this.Ic}return a};function ac(a,b){return a.concat(b)}function bc(){}function cc(a){return null!=a};function dc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Nb(d)});return a.map(function(d){return new Nb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(ac,[]).map(function(d){return d.toString()})}function ec(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
- function fc(a,b){if(1==b.length)return b[0];a=gc(a,b);if(null!=a)return a;throw new N(2,4,4025,b);}function gc(a,b){for(var c=r(hc[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==jc?"":null}
88
- var jc="text",kc={ra:"video",cb:"audio",X:jc,Vb:"image",tg:"application"},hc={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 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.P=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 O(a){this.h=a;this.g=null}O.prototype.Mb=function(){this.stop();this.h();return this};O.prototype.P=function(a){var b=this;this.stop();this.g=(new nc(function(){b.h()})).P(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new nc(function(){b.g.P(a);b.h()})).P(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ca;O.prototype.tickAfter=O.prototype.P;
89
- O.prototype.tickNow=O.prototype.Mb;function oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pc(a){return""!=qc().canPlayType(a)}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!sc("VirginMedia")&&!wc()&&!sc("AFT")}function wc(){return sc("PlayStation 4")}
90
- function xc(){if(!vc())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(yc)return yc;zc||(zc=new O(function(){yc=null}));(yc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yc=document.createElement("video"));zc.P(1);return yc}var zc=null,yc=null;function Ac(){}
85
+ function $b(a){if(!a.na&&(a.na={},a.Jc=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=Sb.prototype;q.na=null;q.Jc=null;q.add=function(a,b){$b(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Jc++;return this};
86
+ q.set=function(a,b){$b(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[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 Sb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Jc=this.Jc}return a};function ac(a,b){return a.concat(b)}function bc(){}function cc(a){return null!=a};function dc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Nb(d)});return a.map(function(d){return new Nb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(ac,[]).map(function(d){return d.toString()})}function ec(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
+ function fc(a,b){if(1==b.length)return b[0];a=gc(a,b);if(null!=a)return a;throw new N(2,4,4025,b);}function gc(a,b){for(var c=r(ic[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==jc?"":null}
88
+ var jc="text",kc={ta:"video",eb:"audio",X:jc,Wb:"image",vg:"application"},ic={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 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.R=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 O(a){this.h=a;this.g=null}O.prototype.Nb=function(){this.stop();this.h();return this};O.prototype.R=function(a){var b=this;this.stop();this.g=(new nc(function(){b.h()})).R(a);return this};O.prototype.Fa=function(a){var b=this;this.stop();this.g=(new nc(function(){b.g.R(a);b.h()})).R(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Fa;O.prototype.tickAfter=O.prototype.R;
89
+ O.prototype.tickNow=O.prototype.Nb;function oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pc(a){return""!=qc().canPlayType(a)}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!sc("VirginMedia")&&!wc()&&!sc("AFT")}function wc(){return sc("PlayStation 4")}
90
+ function xc(){if(!vc())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(yc)return yc;zc||(zc=new O(function(){yc=null}));(yc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yc=document.createElement("video"));zc.R(1);return yc}var zc=null,yc=null;function Ac(){}
91
91
  function Bc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!wc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('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==
92
92
  (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}
93
93
  function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Dc.value()(d)}
94
- function Hc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}
95
- function Ic(a){if(window.TextEncoder&&!wc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Jc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Jc;Ac.toUTF8=Ic;Ac.fromBytesAutoDetect=Hc;Ac.fromUTF16=Cc;
96
- Ac.fromUTF8=Bc;var Dc=new mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Kc(){}function Lc(a){a=Fb(a);a=Dc.value()(a);return btoa(a)}function Mc(a,b){b=void 0==b?!0:b;a=Lc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Nc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Oc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
94
+ function Ec(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}
95
+ function Ic(a){if(window.TextEncoder&&!wc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Jc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Jc;Ac.toUTF8=Ic;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;
96
+ Ac.fromUTF8=Bc;var Dc=new mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Va:65536};0<b.Va;b={Va:b.Va},b.Va/=2)if(a(b.Va))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Va)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Va));return e}}(b);return null});function Kc(){}function Lc(a){a=Fb(a);a=Dc.value()(a);return btoa(a)}function Mc(a,b){b=void 0==b?!0:b;a=Lc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Nc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Oc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
97
97
  function Pc(a){var b=Fb(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Qc(){for(var a=Ia.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Kc);Kc.concat=Qc;Kc.toHex=Pc;Kc.fromHex=Oc;Kc.fromBase64=Nc;Kc.toBase64=Mc;Kc.toStandardBase64=Lc;function Rc(){var a=this;this.o=Kb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Qc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Qc.apply(Kc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Rc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
98
98
  function Sc(a,b){if(!Kb.get("muxjs")()||!Tc(a))return!1;if(b)return MediaSource.isTypeSupported(Uc(b,a));b=Uc("audio",a);a=Uc("video",a);return MediaSource.isTypeSupported(b)||MediaSource.isTypeSupported(a)}function Tc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
99
99
  function Uc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function Vc(a,b){a.l=!0;a.h=new lc;a.m=[];a.j=[];a.i=[];b=Fb(b);a.g.push(b);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Wc(){}function Xc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Yc(a,b,c){a=Xc(a,b);if(Tc(a)){if(Kb.get("muxjs")())return Uc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
@@ -120,13 +120,13 @@ function Ed(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Gd
120
120
  function Kd(a){var b="",c=Infinity;yd(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 Fd(a){var b="";a.video&&(b=Zc(a.video.codecs));var c="";a.audio&&(c=Zc(a.audio.codecs));return b+"-"+c}function Ld(a,b,c){a.variants=a.variants.filter(function(d){return Md(d,b,c)})}
121
121
  function Md(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}
122
122
  function Nd(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=Md(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Od(a,b){return K(function(c){if(1==c.g)return u(c,Pd(b,0<b.offlineSessionIds.length),2);Qd(a,b);Rd(b);return u(c,Sd(b),0)})}
123
- function Pd(a,b){return K(function(c){if(1==c.g)return u(c,Td(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Ud(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=fc("video",g);f=Ud(f);g=fc("audio",g);g=Vd(g);g=Yc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Yc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Vd(f.codecs),f=Yc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;
124
- if(rc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(Wd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Wd(d));return e});A(c)})}
125
- function Td(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(B){if(1==B.g)return C(B,2),u(B,e.decodingInfo(v),4);if(2!=B.g)return w=B.h,y.decodingInfos.push(w),va(B,0);F(B);JSON.stringify(v);A(B)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Xd(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(x,Promise.all(f),
123
+ function Pd(a,b){return K(function(c){if(1==c.g)return u(c,Td(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Ud(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=fc("video",g);f=Ud(f);g=fc("audio",g);g=Vd(g);var h=Yc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;f=[f,g].join()}g=Yc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(g))return!1;e.codecs=f}if(f=d.audio){g=Vd(f.codecs);h=Yc(f.mimeType,g,"audio");if(!MediaSource.isTypeSupported(h))return!1;
124
+ 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(Wd(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||Za(Wd(d));return e});A(c)})}
125
+ function Td(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(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(v),4);if(2!=D.g)return w=D.h,x.decodingInfos.push(w),va(D,0);F(D);JSON.stringify(v);A(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Xd(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(y,Promise.all(f),
126
126
  0)})}
127
127
  function Xd(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=fc("video",g);f=Ud(f);g=fc("audio",g);g=Yc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Ud(f);f=Yc(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";
128
128
  break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Vd(d.codecs),f=Yc(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,[]);
129
- 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&&
129
+ 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&&
130
130
  (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 Vd(a){return tc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
131
131
  function Ud(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 Qd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Yd(d,a.audio)||c&&a&&a.video&&!Yd(c,a.video)?!1:!0})}function Rd(a){a.textStreams=a.textStreams.filter(function(b){return cd(Xc(b.mimeType,b.codecs))})}
132
132
  function Sd(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.A(4);break}e=d.value;f=e.mimeType;if(Zd.has(f)){l.A(5);break}g=$d.get(f);if(!g){Zd.set(f,!1);l.A(5);break}return u(l,ae(g),7);case 7:h=l.h,Zd.set(f,h);case 5:(k=Zd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,A(l)}})}
@@ -143,103 +143,103 @@ function he(a){return{id:ee(a),active:!1,type:"",bandwidth:0,language:md(a.langu
143
143
  originalTextId:null,originalImageId:null}}function je(a){return a.allowedByApplication&&a.allowedByKeySystem}function ke(a){return a.filter(function(b){return je(b)})}
144
144
  function Bd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;a=c.filter(function(g){return g<=b});return a.length?d.get(Math.max.apply(Math,ia(a))):d.get(Math.min.apply(Math,ia(c)))}
145
145
  function le(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=wd(md(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return md(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=me(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(ac,[]);return a.length?
146
- me(e,a[0]):e}function me(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Wd(a){var b=[];a.audio&&b.push(oe(a.audio));a.video&&b.push(oe(a.video));return b.join(", ")}
147
- function oe(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
146
+ me(e,a[0]):e}function me(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Wd(a){var b=[];a.audio&&b.push(ne(a.audio));a.video&&b.push(ne(a.video));return b.join(", ")}
147
+ function ne(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
148
148
  var fe=0,Gd="smooth",Hd="powerEfficient",Jd="bandwidth",Zd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),$d=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function pe(){var a=this;this.l=null;this.o=!1;this.i=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.o){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.m=[];this.u=1;this.B=!1;this.h=this.j=this.g=this.s=null;this.D=new O(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}q=pe.prototype;
149
149
  q.stop=function(){this.l=null;this.o=!1;this.m=[];this.u=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.D.stop()};q.init=function(a){this.l=a};
150
150
  q.chooseVariant=function(){var a=Infinity,b=Infinity;this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=qe(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(re(this));this.m.length&&!a.length&&(a=qe(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.u)?1:Math.abs(this.u),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},
151
151
  k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.s=Date.now();return c};q.enable=function(){this.o=!0};q.disable=function(){this.o=!1};
152
152
  q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.B){a=this.i;if(!(a.g>=a.i))break a;this.B=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(re(this));a&&this.l(a)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(re(this))};q.setVariants=function(a){this.m=a};q.playbackRateChanged=function(a){this.u=a};
153
- 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.D.P(se)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function re(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
153
+ 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.D.R(se)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function re(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
154
154
  function qe(a,b,c,d){a&&(b=b.filter(function(e){return Md(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}M("shaka.abr.SimpleAbrManager",pe);pe.prototype.configure=pe.prototype.configure;pe.prototype.setMediaElement=pe.prototype.setMediaElement;pe.prototype.playbackRateChanged=pe.prototype.playbackRateChanged;pe.prototype.setVariants=pe.prototype.setVariants;pe.prototype.getBandwidthEstimate=pe.prototype.getBandwidthEstimate;pe.prototype.segmentDownloaded=pe.prototype.segmentDownloaded;
155
155
  pe.prototype.disable=pe.prototype.disable;pe.prototype.enable=pe.prototype.enable;pe.prototype.chooseVariant=pe.prototype.chooseVariant;pe.prototype.init=pe.prototype.init;pe.prototype.stop=pe.prototype.stop;var se=1;function te(a,b){this.g=a;this.h=b}te.prototype.toString=function(){return"v"+this.g+"."+this.h};function ue(){var a=new te(5,0),b=ve,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 we(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function xe(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var ve=null;function ye(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)}ye.prototype.add=function(a){return ze(this.h,a)?(this.g.add(a),!0):!1};
156
156
  function ze(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)&&Ae(c,d)&&Be(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(Ae(a,b)&&Be(a.roles,b.roles)));return c?!1:!0}ye.prototype.values=function(){return this.g.values()};
157
157
  function Ae(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return $c(d)[0]});b=b.codecs.split(",").map(function(d){return $c(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 Be(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 Ce(a){this.g=a;this.h=new De(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Ce.prototype.create=function(a){var b=this,c=a.filter(function(d){return ze(b.g,d)});return c.length?new ye(c[0],c):this.h.create(a)};function De(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
158
158
  De.prototype.create=function(a){var b=[];b=Ee(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Fe(b,this.j);a.length&&(b=a);this.g&&(a=Bd(b,this.g),a.length&&(b=a));this.h&&(a=Ge(b,this.h),a.length&&(b=a));a=new ye(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,ze(a.h,c)&&a.add(c);return a};function Ee(a,b){b=md(b);var c=wd(b,a.map(function(d){return vd(d)}));return c?a.filter(function(d){return c==vd(d)}):[]}
159
159
  function Fe(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ge(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function He(){this.g=Ie;this.h=(new Map).set(Ie,2).set(Je,1)}function Ke(a,b,c){a.h.set(Ie,c).set(Je,b)}var Je=0,Ie=1;function Le(a,b){var c=Me();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
160
- function Ne(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 N(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).P(c/1E3)}),2)}a.h*=a.m;A(d)})}function Me(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Oe(a,b){this.promise=a;this.i=b;this.g=!1}function Pe(a){return new Oe(Promise.reject(a),function(){return Promise.resolve()})}function Qe(){var a=Promise.reject(new N(2,7,7001));a.catch(function(){});return new Oe(a,function(){return Promise.resolve()})}function Re(a){return new Oe(Promise.resolve(a),function(){return Promise.resolve()})}function Se(a){return new Oe(a,function(){return a.catch(function(){})})}Oe.prototype.abort=function(){this.g=!0;return this.i()};
160
+ function Ne(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 N(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).R(c/1E3)}),2)}a.h*=a.m;A(d)})}function Me(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Oe(a,b){this.promise=a;this.i=b;this.g=!1}function Pe(a){return new Oe(Promise.reject(a),function(){return Promise.resolve()})}function Qe(){var a=Promise.reject(new N(2,7,7001));a.catch(function(){});return new Oe(a,function(){return Promise.resolve()})}function Re(a){return new Oe(Promise.resolve(a),function(){return Promise.resolve()})}function Se(a){return new Oe(a,function(){return a.catch(function(){})})}Oe.prototype.abort=function(){this.g=!0;return this.i()};
161
161
  function Te(a){return new Oe(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Oe.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
162
162
  Oe.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ue(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 N(2,7,7001);this.promise.then(c(!0),c(!1));return new Oe(f,function(){return d()})};
163
163
  function Ue(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",Oe);Oe.prototype.chain=Oe.prototype.Z;Oe.prototype["finally"]=Oe.prototype.finally;Oe.all=Te;Oe.prototype.abort=Oe.prototype.abort;Oe.notAbortable=Se;Oe.completed=Re;Oe.aborted=Qe;Oe.failed=Pe;function Q(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}
164
164
  function Ve(a){var b=new Q(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}Q.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};Q.prototype.stopImmediatePropagation=function(){this.g=!0};Q.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",Q);
165
- var We={vg:"abrstatuschanged",wg:"adaptation",xg:"buffering",zg:"downloadfailed",Ag:"downloadheadersreceived",Bg:"drmsessionupdate",Dg:"emsg",Error:"error",Eg:"expirationupdated",Fg:"gapjumped",Hg:"loaded",Ig:"loading",Kg:"manifestparsed",Lg:"mediaqualitychanged",Metadata:"metadata",Ng:"onstatechange",Og:"onstateidle",Pg:"ratechange",Rg:"sessiondata",Sg:"stalldetected",Tg:"streaming",Ug:"textchanged",Vg:"texttrackvisibility",Wg:"timelineregionadded",Xg:"timelineregionenter",Yg:"timelineregionexit",
166
- Zg:"trackschanged",ah:"unloading",bh:"variantchanged"};function R(){this.da=new xd;this.Lc=this}R.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};R.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};R.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.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.Lc;a.currentTarget=this.Lc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
167
- R.prototype.release=function(){this.da=null};function Xe(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 Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b.finally(function(){eb(a.g,b)}))}Ze.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 af(a,b,c){R.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(af,R);q=af.prototype;q.ae=function(a){this.o=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Wf:b,Xf:void 0===d?!1:d}}q.Yf=function(a){this.g.add(a)};q.og=function(a){this.g.delete(a)};q.ef=function(){this.g.clear()};q.Zf=function(a){this.h.add(a)};q.pg=function(a){this.h.delete(a)};q.ff=function(){this.h.clear()};
165
+ var We={xg:"abrstatuschanged",yg:"adaptation",zg:"buffering",Bg:"downloadfailed",Cg:"downloadheadersreceived",Dg:"drmsessionupdate",Fg:"emsg",Error:"error",Gg:"expirationupdated",Hg:"gapjumped",Jg:"loaded",Kg:"loading",Mg:"manifestparsed",Ng:"mediaqualitychanged",Metadata:"metadata",Pg:"onstatechange",Qg:"onstateidle",Rg:"ratechange",Tg:"sessiondata",Ug:"stalldetected",Vg:"streaming",Wg:"textchanged",Xg:"texttrackvisibility",Yg:"timelineregionadded",Zg:"timelineregionenter",$g:"timelineregionexit",
166
+ ah:"trackschanged",dh:"unloading",eh:"variantchanged"};function R(){this.da=new xd;this.Rc=this}R.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};R.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};R.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.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.Rc;a.currentTarget=this.Rc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
167
+ R.prototype.release=function(){this.da=null};function Xe(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 Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b.finally(function(){eb(a.g,b)}))}Ze.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 af(a,b,c){R.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(af,R);q=af.prototype;q.be=function(a){this.o=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Yf:b,Zf:void 0===d?!1:d}}q.$f=function(a){this.g.add(a)};q.qg=function(a){this.g.delete(a)};q.gf=function(){this.g.clear()};q.ag=function(a){this.h.add(a)};q.rg=function(a){this.h.delete(a)};q.hf=function(){this.h.clear()};
168
168
  function ef(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();R.prototype.release.call(this);return this.m.destroy()};
169
169
  q.request=function(a,b){var c=this,d=new ff;if(this.i){var e=Promise.reject(new N(2,7,7001));e.catch(function(){});return new gf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):Me();b.uris=Xe(b.uris);e=hf(this,a,b);var f=e.Z(function(){return jf(c,a,b,new Le(b.retryParameters,!1),0,null,d)}),g=f.Z(function(p){return kf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
170
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Lf||!c.l||t.fromCache||a!=lf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new gf(m.promise,function(){return m.abort()},d);$e(this.m,e);return e};
170
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Nf||!c.l||t.fromCache||a!=lf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new gf(m.promise,function(){return m.abort()},d);$e(this.m,e);return e};
171
171
  function hf(a,b,c){var d=Re(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={pd:e.pd},f=a.next())e.pd=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.pd(b,c)}}(e));return d.Z(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
172
- function jf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Nb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=df[k])?k.Wf:null;if(!m)return Pe(new N(2,1,1E3,h));var p=k.Xf,n=null,t=null,x=!1,y=!1,v;return Se(Ne(d)).Z(function(){if(a.i)return Qe();v=Date.now();var w=m(c.uris[e],c,b,function(D,G,E){n&&n.stop();t&&t.P(z/1E3);a.l&&b==lf&&(a.l(D,G),l=!0,g.g=E)},function(D){a.j&&a.j(D,c,b);y=!0});
173
- if(!p)return w;var B=c.retryParameters.connectionTimeout;B&&(n=new O(function(){x=!0;w.abort()}),n.P(B/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new O(function(){x=!0;w.abort()}));return w}).Z(function(w){n&&n.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-v);var B={response:w,Lf:l};!y&&a.j&&a.j(w.headers,c,b);return B},function(w){n&&n.stop();t&&t.stop();if(a.s){var B=null,z=0;w instanceof N&&(B=w,1001==w.code&&(z=w.data[1]));a.s(c,B,z,x)}if(a.i)return Qe();x&&(w=new N(1,1,1003,
174
- c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return B=(new Map).set("error",w),B=new Q("retry",B),a.dispatchEvent(B),e=(e+1)%c.uris.length,jf(a,b,c,d,e,w,g)}throw w;})}
172
+ function jf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Nb(c.uris[e]),k=h.Ha,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=df[k])?k.Yf:null;if(!m)return Pe(new N(2,1,1E3,h));var p=k.Zf,n=null,t=null,y=!1,x=!1,v;return Se(Ne(d)).Z(function(){if(a.i)return Qe();v=Date.now();var w=m(c.uris[e],c,b,function(B,G,E){n&&n.stop();t&&t.R(z/1E3);a.l&&b==lf&&(a.l(B,G),l=!0,g.g=E)},function(B){a.j&&a.j(B,c,b);x=!0});
173
+ if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new O(function(){y=!0;w.abort()}),n.R(D/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new O(function(){y=!0;w.abort()}));return w}).Z(function(w){n&&n.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-v);var D={response:w,Nf:l};!x&&a.j&&a.j(w.headers,c,b);return D},function(w){n&&n.stop();t&&t.stop();if(a.s){var D=null,z=0;w instanceof N&&(D=w,1001==w.code&&(z=w.data[1]));a.s(c,D,z,y)}if(a.i)return Qe();y&&(w=new N(1,1,1003,
174
+ c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new Q("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,jf(a,b,c,d,e,w,g)}throw w;})}
175
175
  function kf(a,b,c){var d=Re(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={qd:e.qd},f=a.next())e.qd=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.qd(b,h)}}(e));return d.Z(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",af);af.prototype.request=af.prototype.request;af.prototype.destroy=af.prototype.destroy;af.makeRequest=ef;
176
- af.defaultRetryParameters=function(){return Me()};af.prototype.clearAllResponseFilters=af.prototype.ff;af.prototype.unregisterResponseFilter=af.prototype.pg;af.prototype.registerResponseFilter=af.prototype.Zf;af.prototype.clearAllRequestFilters=af.prototype.ef;af.prototype.unregisterRequestFilter=af.prototype.og;af.prototype.registerRequestFilter=af.prototype.Yf;af.unregisterScheme=function(a){delete df[a]};af.registerScheme=bf;af.prototype.setForceHTTPS=af.prototype.ae;function ff(){this.g=0}
177
- af.NumBytesRemainingClass=ff;function gf(a,b,c){Oe.call(this,a,b);this.h=c}pa(gf,Oe);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new lc;this.i=a}mf.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 nf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function of(){this.g=new xd}q=of.prototype;q.release=function(){this.nb();this.g=null};q.C=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};q.oa=function(a,b,c,d){function e(g){f.xc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};q.xc=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.xc(),this.g.remove(b,e))}};
178
- q.nb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.xc();this.g.g={}}};M("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.nb;of.prototype.unlisten=of.prototype.xc;of.prototype.listenOnce=of.prototype.oa;of.prototype.listen=of.prototype.C;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
179
- pf.prototype.xc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function qf(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 rf(a)?b:b.capture||!1}
180
- function rf(a){var b=sf;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}sf=b}return b||!1}var sf=void 0;function tf(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 uf(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function vf(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 wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(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 yf(a,b){this.S=Ib(a);this.h=b==zf;this.g=0}q=yf.prototype;q.ma=function(){return this.g<this.S.byteLength};q.$=function(){return this.g};q.uf=function(){return this.S.byteLength};q.Qa=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw Af();}};q.Sd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Af();}};q.N=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};
181
- q.Je=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};q.Kb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Af();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Za=function(a){if(this.g+a>this.S.byteLength)throw Af();var b=Fb(this.S,this.g,a);this.g+=a;return b};
182
- q.skip=function(a){if(this.g+a>this.S.byteLength)throw Af();this.g+=a};q.eg=function(a){if(this.g<a)throw Af();this.g-=a};q.seek=function(a){if(0>a||a>this.S.byteLength)throw Af();this.g=a};q.qc=function(){for(var a=this.g;this.ma()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Fb(this.S,a,this.g-a);this.g+=1;return Bc(a)};function Af(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",yf);yf.prototype.readTerminatedString=yf.prototype.qc;yf.prototype.seek=yf.prototype.seek;yf.prototype.rewind=yf.prototype.eg;
183
- yf.prototype.skip=yf.prototype.skip;yf.prototype.readBytes=yf.prototype.Za;yf.prototype.readUint64=yf.prototype.Kb;yf.prototype.readInt32=yf.prototype.Je;yf.prototype.readUint32=yf.prototype.N;yf.prototype.readUint16=yf.prototype.Sd;yf.prototype.readUint8=yf.prototype.Qa;yf.prototype.getLength=yf.prototype.uf;yf.prototype.getPosition=yf.prototype.$;yf.prototype.hasMoreData=yf.prototype.ma;var zf=1;yf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:zf};function Bf(){this.i=[];this.h=[];this.g=!1}q=Bf.prototype;q.box=function(a,b){a=Cf(a);this.i[a]=Df;this.h[a]=b;return this};q.U=function(a,b){a=Cf(a);this.i[a]=Ef;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new yf(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Zc(0,a,b,c)};
184
- q.Zc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.Kb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Ef){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.Za(d):new Uint8Array(0),b=new yf(b,0),k({parser:this,partialOkay:c||
185
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function Ff(a){for(var b=Gf(a);a.reader.ma()&&!a.parser.g;)a.parser.Zc(a.start+b,a.reader,a.partialOkay)}function Hf(a){for(var b=Gf(a),c=a.reader.N(),d=0;d<c&&(a.parser.Zc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function If(a){return function(b){a(b.reader.Za(b.reader.S.byteLength-b.reader.$()))}}
176
+ af.defaultRetryParameters=function(){return Me()};af.prototype.clearAllResponseFilters=af.prototype.hf;af.prototype.unregisterResponseFilter=af.prototype.rg;af.prototype.registerResponseFilter=af.prototype.ag;af.prototype.clearAllRequestFilters=af.prototype.gf;af.prototype.unregisterRequestFilter=af.prototype.qg;af.prototype.registerRequestFilter=af.prototype.$f;af.unregisterScheme=function(a){delete df[a]};af.registerScheme=bf;af.prototype.setForceHTTPS=af.prototype.be;function ff(){this.g=0}
177
+ af.NumBytesRemainingClass=ff;function gf(a,b,c){Oe.call(this,a,b);this.h=c}pa(gf,Oe);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new lc;this.i=a}mf.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 nf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function of(){this.g=new xd}q=of.prototype;q.release=function(){this.ob();this.g=null};q.C=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};q.oa=function(a,b,c,d){function e(g){f.yc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};q.yc=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.yc(),this.g.remove(b,e))}};
178
+ q.ob=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.yc();this.g.g={}}};M("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.ob;of.prototype.unlisten=of.prototype.yc;of.prototype.listenOnce=of.prototype.oa;of.prototype.listen=of.prototype.C;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
179
+ pf.prototype.yc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function qf(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 rf(a)?b:b.capture||!1}
180
+ function rf(a){var b=sf;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}sf=b}return b||!1}var sf=void 0;function tf(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 uf(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function vf(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 wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(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 yf(a,b){this.S=Ib(a);this.h=b==zf;this.g=0}q=yf.prototype;q.ma=function(){return this.g<this.S.byteLength};q.$=function(){return this.g};q.wf=function(){return this.S.byteLength};q.Sa=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw Af();}};q.Td=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Af();}};q.N=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};
181
+ q.Le=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};q.Lb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Af();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.$a=function(a){if(this.g+a>this.S.byteLength)throw Af();var b=Fb(this.S,this.g,a);this.g+=a;return b};
182
+ q.skip=function(a){if(this.g+a>this.S.byteLength)throw Af();this.g+=a};q.gg=function(a){if(this.g<a)throw Af();this.g-=a};q.seek=function(a){if(0>a||a>this.S.byteLength)throw Af();this.g=a};q.rc=function(){for(var a=this.g;this.ma()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Fb(this.S,a,this.g-a);this.g+=1;return Bc(a)};function Af(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",yf);yf.prototype.readTerminatedString=yf.prototype.rc;yf.prototype.seek=yf.prototype.seek;yf.prototype.rewind=yf.prototype.gg;
183
+ yf.prototype.skip=yf.prototype.skip;yf.prototype.readBytes=yf.prototype.$a;yf.prototype.readUint64=yf.prototype.Lb;yf.prototype.readInt32=yf.prototype.Le;yf.prototype.readUint32=yf.prototype.N;yf.prototype.readUint16=yf.prototype.Td;yf.prototype.readUint8=yf.prototype.Sa;yf.prototype.getLength=yf.prototype.wf;yf.prototype.getPosition=yf.prototype.$;yf.prototype.hasMoreData=yf.prototype.ma;var zf=1;yf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:zf};function Bf(){this.i=[];this.h=[];this.g=!1}q=Bf.prototype;q.box=function(a,b){a=Cf(a);this.i[a]=Df;this.h[a]=b;return this};q.U=function(a,b){a=Cf(a);this.i[a]=Ef;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new yf(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Zc(0,a,b,c)};
184
+ q.Zc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.Lb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Ef){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.$a(d):new Uint8Array(0),b=new yf(b,0),k({parser:this,partialOkay:c||
185
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function Ff(a){for(var b=Gf(a);a.reader.ma()&&!a.parser.g;)a.parser.Zc(a.start+b,a.reader,a.partialOkay)}function Hf(a){for(var b=Gf(a),c=a.reader.N(),d=0;d<c&&(a.parser.Zc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function If(a){return function(b){a(b.reader.$a(b.reader.S.byteLength-b.reader.$()))}}
186
186
  function Cf(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 Jf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Gf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Bf);Bf.headerSize=Gf;Bf.typeToString=Jf;Bf.allData=If;Bf.sampleDescription=Hf;Bf.children=Ff;Bf.prototype.parseNext=Bf.prototype.Zc;Bf.prototype.parse=Bf.prototype.parse;Bf.prototype.stop=Bf.prototype.stop;
187
- Bf.prototype.fullBox=Bf.prototype.U;Bf.prototype.box=Bf.prototype.box;var Df=0,Ef=1;function Kf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Bf).box("moov",Ff).box("moof",Ff).U("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Pc(c.reader.Za(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Pc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
188
- function Lf(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=Ib(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=Oc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Of(a,b){a=Pf(a,b);return 1!=a.length?null:a[0]}function Qf(a,b,c){a=Rf(a,b,c);return 1!=a.length?null:a[0]}function Pf(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 Sf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
187
+ Bf.prototype.fullBox=Bf.prototype.U;Bf.prototype.box=Bf.prototype.box;var Df=0,Ef=1;function Kf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Bf).box("moov",Ff).box("moof",Ff).U("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Pc(c.reader.$a(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Pc(c.reader.$a(16));b.h.push(f)}}}}).parse(a)}
188
+ function Lf(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=Ib(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=Oc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Mf(a,b){a=Nf(a,b);return 1!=a.length?null:a[0]}function Qf(a,b,c){a=Rf(a,b,c);return 1!=a.length?null:a[0]}function Nf(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 Sf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
189
189
  function Rf(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Tf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Uf(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Vf(a){return Array.from(a.childNodes).every(Wf)?a.textContent.trim():null}
190
190
  function Wf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Xf(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Yf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
191
191
  function Zf(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}
192
192
  function $f(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 ag(a){a=Number(a);return 0===a%1?a:null}function bg(a){a=Number(a);return 0===a%1&&0<a?a:null}function cg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function dg(a){a=Number(a);return isNaN(a)?null:a}function eg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
193
193
  function fg(a,b){var c=new DOMParser,d=gg.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 hg(a,b){try{var c=Bc(a);return fg(c,b)}catch(d){return null}}
194
- var gg=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 ig(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ia=this.ca=!1;this.I=0;this.g=null;this.s=new of;this.i=new Map;this.B=[];this.o=new lc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.T=new O(function(){return jg(c)});this.M=!1;this.L=[];this.O=!1;this.ea=(new O(function(){kg(c)})).Ca(b);this.o.catch(function(){});this.j=new mf(function(){return lg(c)});this.Y=!1;this.F=null}q=ig.prototype;q.destroy=function(){return this.j.destroy()};
194
+ var gg=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 ig(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ia=this.ca=!1;this.I=0;this.g=null;this.s=new of;this.i=new Map;this.B=[];this.o=new lc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ja=new Map;this.da=new Map;this.T=new O(function(){return jg(c)});this.M=!1;this.L=[];this.O=!1;this.ea=(new O(function(){kg(c)})).Fa(b);this.o.catch(function(){});this.j=new mf(function(){return lg(c)});this.Y=!1;this.F=null}q=ig.prototype;q.destroy=function(){return this.j.destroy()};
195
195
  function lg(a){return K(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,mg(a),2);case 2:if(!a.l){b.A(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,A(b)}})}q.configure=function(a){this.h=a};function ng(a,b,c){a.ia=!0;a.B=[];a.M=c;return og(a,b)}
196
196
  function pg(a,b,c){a.B=c;a.M=0<c.length;return og(a,b)}function qg(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 rg(a,g,[])}
197
- function og(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=sg(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=vf(a.h.servers),tg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=ug(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,vg(t,vf(a.h.servers),vf(a.h.advanced||{}),a.h.keySystemsMapping);
198
- return u(v,Td(b,a.M,a.Y),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.ca=!0,v.return(Promise.resolve());y=rg(a,void 0,b);return v.return(g?y:y.catch(function(){}))})}function wg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return nf(a.j),c.return();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new N(2,6,6003,b.message));case 5:nf(a.j),A(c)}})}
197
+ function og(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=sg(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=vf(a.h.servers),tg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=ug(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,vg(t,vf(a.h.servers),vf(a.h.advanced||{}),a.h.keySystemsMapping);
198
+ return u(v,Td(b,a.M,a.Y),2)}y=g||Object.keys(a.h.servers).length;if(!y)return a.ca=!0,v.return(Promise.resolve());x=rg(a,void 0,b);return v.return(g?x:x.catch(function(){}))})}function wg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return nf(a.j),c.return();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new N(2,6,6003,b.message));case 5:nf(a.j),A(c)}})}
199
199
  function xg(a,b){return K(function(c){if(1==c.g)return u(c,wg(a),2);yg(a,b.initDataType,Fb(b.initData));A(c)})}
200
200
  q.Zb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.u)return b.s.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d.return();b.l=a;b.s.oa(b.l,"play",function(){for(var e=r(b.L),f=e.next();!f.done;f=e.next())zg(b,f.value);b.O=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return mg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.B.length?u(d,
201
201
  wg(b),2):d.A(2)}Ag(b);c||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(e){return xg(b,e)});A(d)})};
202
- function Bg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=ef([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.kb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(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();
203
- C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Cg(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Dg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Ja=new lc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);A(f)})}
202
+ function Bg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=ef([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(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();
203
+ C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Cg(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Dg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Ka=new lc,d.push(e.Ka);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);A(f)})}
204
204
  function Ag(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,yg(a,d.initDataType,d.initData);c=r(a.B);for(d=c.next();!d.done;d=c.next())Dg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function yg(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(Db(c,e.value.initData)&&!sc("Tizen 2"))return;0<a.i.size&&Eg(a)&&(a.o.resolve(),a.o=new lc,a.o.catch(function(){}));Fg(a,b,c,a.g.sessionType)}}
205
- function Gg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Hg(a){a=a.i.keys();a=tf(a,function(b){return b.sessionId});return Array.from(a)}q.fc=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.Nc=function(){return wf(this.da)};
206
- function rg(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=Ig(a,c,d);v.A(2);break}return u(v,Jg(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new N(2,6,6001);nf(a.j);C(v,4);a.G.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.G.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.G.add(t.contentType.toLowerCase());if(c.length){var w=
207
- f.keySystem;var B=d.get(f.keySystem);var z=[],D=[],G=[],E=[],H=new Set;Kg(B,z,G,D,E,H);var I=a.M?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||I,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:D[0],initData:E,keyIds:H};B=r(B);for(z=B.next();!z.done;z=
208
- B.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);B=w}else B=f.keySystem,w=b.get(f.keySystem),z=[],D=[],G=[],E=[],H=new Set,Kg(w.drmInfos,z,G,D,E,H),B={keySystem:B,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
209
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:D[0],initData:E,keyIds:H};a.g=B;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(v,f.createMediaKeys(),6);case 6:return x=v.h,nf(a.j),a.u=x,a.ca=!0,u(v,Bg(a),7);case 7:nf(a.j);va(v,0);break;case 4:y=F(v);nf(a.j,y);a.g=null;a.G.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
205
+ function Gg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Hg(a){a=a.i.keys();a=tf(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.Nc=function(){return wf(this.da)};
206
+ function rg(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=Ig(a,c,d);v.A(2);break}return u(v,Jg(a,b),3);case 3:e=v.h;case 2:f=e;if(!f)throw new N(2,6,6001);nf(a.j);C(v,4);a.G.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.G.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.G.add(t.contentType.toLowerCase());if(c.length){var w=
207
+ f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],G=[],E=[],H=new Set;Kg(D,z,G,B,E,H);var I=a.M?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
208
+ D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],B=[],G=[],E=[],H=new Set,Kg(w.drmInfos,z,G,B,E,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
209
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(v,f.createMediaKeys(),6);case 6:return y=v.h,nf(a.j),a.u=y,a.ca=!0,u(v,Bg(a),7);case 7:nf(a.j);va(v,0);break;case 4:x=F(v);nf(a.j,x);a.g=null;a.G.clear();if(x instanceof N)throw x;throw new N(2,6,6002,x.message);}})}
210
210
  function Ig(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(ug(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 N(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={nd:d.nd},e=a.next())for(d.nd=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==
211
211
  l.nd}}(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}
212
- function Jg(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 N(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.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);C(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
213
- w.h,w.return(c);case 6:F(w);case 7:nf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){w.A(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();w.A(9);break}x=h.value;y=b.get(x);v=y.drmInfos.some(function(B){return!!B.licenseServerUri});if(v!=n){w.A(13);break}C(w,15);return u(w,navigator.requestMediaKeySystemAccess(x,[y]),17);case 17:return c=w.h,w.return(c);case 15:F(w);case 16:nf(a.j);case 13:h=t.next();w.A(12);break;case 11:return w.return(c)}})}
212
+ function Jg(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 N(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.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);C(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
213
+ w.h,w.return(c);case 6:F(w);case 7:nf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){w.A(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();w.A(9);break}y=h.value;x=b.get(y);v=x.drmInfos.some(function(D){return!!D.licenseServerUri});if(v!=n){w.A(13);break}C(w,15);return u(w,navigator.requestMediaKeySystemAccess(y,[x]),17);case 17:return c=w.h,w.return(c);case 15:F(w);case 16:nf(a.j);case 13:h=t.next();w.A(12);break;case 11:return w.return(c)}})}
214
214
  function sg(a){a=vf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){f=Oc(f);e=Oc(e);e={kty:"oct",kid:Mc(f,!1),k:Mc(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Ic(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
215
215
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
216
- function Dg(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(k):zg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Lg(a,k)});e={initData:null,initDataType:null,loaded:!1,Pd:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=
216
+ function Dg(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(k):zg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Lg(a,k)});e={initData:null,initDataType:null,loaded:!1,Qd:Infinity,Ka:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=
217
217
  h.h;nf(a.j);if(!f)return a.i.delete(c),a.m(new N(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Eg(a)&&a.o.resolve();return h.return(c);case 2:g=F(h),nf(a.j,g),a.i.delete(c),a.m(new N(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
218
- function Fg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(f):zg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Lg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Pd:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Mc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
218
+ function Fg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(f):zg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Lg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Qd:Infinity,Ka:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Mc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
219
219
  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 N(2,6,6006,f.message,f,h))}})}
220
- function zg(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&&Mc(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=ef([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),
221
- Gg(a.g.keySystem)&&Mg(g),h=Date.now(),C(v,2),l=a.D.kb.request(2,g),u(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=F(v),p=new N(2,6,6007,m),a.m(p),d&&d.Ja&&d.Ja.reject(p),v.return();case 3:if(a.j.g)return v.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Mc(k.data);C(v,5);return u(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return n=F(v),t=new N(2,6,6008,n.message),a.m(t),d&&d.Ja&&d.Ja.reject(t),v.return();case 6:if(a.j.g)return v.return();x=new Q("drmsessionupdate");a.D.onEvent(x);
222
- d&&(d.Ja&&d.Ja.resolve(),y=new O(function(){d.loaded=!0;Eg(a)&&a.o.resolve()}),y.P(Ng));A(v)}})}
220
+ function zg(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&&Mc(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=ef([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),
221
+ Gg(a.g.keySystem)&&Mg(g),h=Date.now(),C(v,2),l=a.D.lb.request(2,g),u(v,l.promise,4);case 4:k=v.h;va(v,3);break;case 2:return m=F(v),p=new N(2,6,6007,m),a.m(p),d&&d.Ka&&d.Ka.reject(p),v.return();case 3:if(a.j.g)return v.return();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Mc(k.data);C(v,5);return u(v,c.update(k.data),7);case 7:va(v,6);break;case 5:return n=F(v),t=new N(2,6,6008,n.message),a.m(t),d&&d.Ka&&d.Ka.reject(t),v.return();case 6:if(a.j.g)return v.return();y=new Q("drmsessionupdate");a.D.onEvent(y);
222
+ d&&(d.Ka&&d.Ka.resolve(),x=new O(function(){d.loaded=!0;Eg(a)&&a.o.resolve()}),x.R(Ng));A(v)}})}
223
223
  function Mg(a){var b=Cc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=fg(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=Nc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
224
- function Lg(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(Gg(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||wc())){h=Ib(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=Pc(g).slice(0,32);a.ja.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ja&&(a.i.delete(b),
225
- b.close().catch(function(){}));Eg(a)&&(a.o.resolve(),a.T.P(Og))}function jg(a){var b=a.ja,c=a.da;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 N(2,6,6014));a.D.Xc(wf(c))}
224
+ function Lg(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(Gg(a.g.keySystem)&&16==g.byteLength&&(navigator.userAgent.match(/Edge?\//)||wc())){h=Ib(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=Pc(g).slice(0,32);a.ja.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ka&&(a.i.delete(b),
225
+ b.close().catch(function(){}));Eg(a)&&(a.o.resolve(),a.T.R(Og))}function jg(a){var b=a.ja,c=a.da;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 N(2,6,6014));a.D.Xc(wf(c))}
226
226
  function Pg(){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,
227
227
  n;return K(function(t){switch(t.g){case 1:C(t,2);if("org.w3.clearkey"===l&&xc())throw Error("Unsupported keySystem");return u(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}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:F(t),f.set(l,null),A(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(wf(f))})}
228
- function Qg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).P(Rg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);A(c)})}
228
+ function Qg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).R(Rg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);A(c)})}
229
229
  function mg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return u(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 C(g,2),a.ia||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Qg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);A(g)})})),0)})}
230
- function Sg(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={Da:e.Da},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Da=[];e.Da=e.Da.concat(d.initData||[]);e.Da=e.Da.concat(g.initData||[]);e.Da=e.Da.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Da.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ia(d.keyIds),ia(g.keyIds))):
230
+ function Sg(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={Ga:e.Ga},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Ga=[];e.Ga=e.Ga.concat(d.initData||[]);e.Ga=e.Ga.concat(g.initData||[]);e.Ga=e.Ga.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Ga.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ia(d.keyIds),ia(g.keyIds))):
231
231
  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,
232
- initData:e.Da,keyIds:f});break}}return c}function ug(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function kg(a){a.i.forEach(function(b,c){var d=b.Pd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Pd=e)})}function Eg(a){a=a.i.values();return uf(a,function(b){return b.loaded})}
232
+ initData:e.Ga,keyIds:f});break}}return c}function ug(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function kg(a){a.i.forEach(function(b,c){var d=b.Qd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Qd=e)})}function Eg(a){a=a.i.values();return uf(a,function(b){return b.loaded})}
233
233
  function tg(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)}
234
- function Kg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(p){return Db(p,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=r(g.qa.initData),l=k.next();!l.done;h={Ac:h.Ac},l=k.next())h.Ac=l.value,e.some(function(m){return function(p){var n=
235
- m.Ac;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Db(p.initData,n.initData)}}(h))||e.push(h.Ac)}if(g.qa.keyIds)for(h=r(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
234
+ function Kg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(p){return Db(p,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=r(g.qa.initData),l=k.next();!l.done;h={Bc:h.Bc},l=k.next())h.Bc=l.value,e.some(function(m){return function(p){var n=
235
+ m.Bc;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Db(p.initData,n.initData)}}(h))||e.push(h.Bc)}if(g.qa.keyIds)for(h=r(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
236
236
  function vg(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=
237
237
  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 Rg=1,Ng=5,Og=.5,Tg=new mc(function(){return Gb(new Uint8Array([0]))});function Ug(){}function Vg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=Wg[d.toLowerCase()]))return k.return(e);if(f=Xg(a))if(g=Yg[f])return k.return(g);return d?k.A(2):u(k,Zg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Wg[d]))return k.return(h);throw new N(2,4,4E3,a);})}function Zg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=ef([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
238
- function Xg(a){a=(new Nb(a)).ua.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",Ug);Ug.unregisterParserByMime=function(a){delete Wg[a]};Ug.registerParserByMime=function(a,b){Wg[a]=b};Ug.registerParserByExtension=function(a,b){Yg[a]=b};var Wg={},Yg={};function $g(a){function b(){d=!0}function c(l){f.push(l);Ff(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new Bf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);Hf(l)}).U("encv",b).U("enca",b).U("hev1",function(l){g.push({box:l,lb:1701733238})}).U("hvc1",function(l){g.push({box:l,lb:1701733238})}).U("avc1",function(l){g.push({box:l,lb:1701733238})}).U("avc3",function(l){g.push({box:l,lb:1701733238})}).U("ac-3",function(l){g.push({box:l,lb:1701733217})}).U("ec-3",
239
- function(l){g.push({box:l,lb:1701733217})}).U("mp4a",function(l){g.push({box:l,lb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ab(Pc(a)),new N(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=ah(a,e,k.box,f,k.lb);return a}
238
+ function Xg(a){a=(new Nb(a)).wa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",Ug);Ug.unregisterParserByMime=function(a){delete Wg[a]};Ug.registerParserByMime=function(a,b){Wg[a]=b};Ug.registerParserByExtension=function(a,b){Yg[a]=b};var Wg={},Yg={};function $g(a){function b(){d=!0}function c(l){f.push(l);Ff(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new Bf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);Hf(l)}).U("encv",b).U("enca",b).U("hev1",function(l){g.push({box:l,mb:1701733238})}).U("hvc1",function(l){g.push({box:l,mb:1701733238})}).U("avc1",function(l){g.push({box:l,mb:1701733238})}).U("avc3",function(l){g.push({box:l,mb:1701733238})}).U("ac-3",function(l){g.push({box:l,mb:1701733217})}).U("ec-3",
239
+ function(l){g.push({box:l,mb:1701733217})}).U("mp4a",function(l){g.push({box:l,mb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw ab(Pc(a)),new N(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=ah(a,e,k.box,f,k.mb);return a}
240
240
  function ah(a,b,c,d,e){var f=bh.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);ch(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,ch(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=Gf(b);a=k.getUint32(b);
241
- k.setUint32(b,a+1);return e}function ch(a,b,c){a=Ib(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 bh=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 dh(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=eh(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===
242
- t||-1===x)n=fh(d,e),a.nestedCues.push(n);else{for(;t<=x;t++)if(y=n[t]){var v=y.l,w=y.i,B=y.j,z=y.h;if(v!=h||w!=k||B!=l||z!=m)p.payload&&a.nestedCues.push(p),p=eh(d,e,v,w,B,z),h=v,k=w,l=B,m=z;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=fh(d,e),a.nestedCues.push(p));p=eh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
241
+ k.setUint32(b,a+1);return e}function ch(a,b,c){a=Ib(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 bh=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 dh(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(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=eh(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===
242
+ t||-1===y)n=fh(d,e),a.nestedCues.push(n);else{for(;t<=y;t++)if(x=n[t]){var v=x.l,w=x.i,D=x.j,z=x.h;if(v!=h||w!=k||D!=l||z!=m)p.payload&&a.nestedCues.push(p),p=eh(d,e,v,w,D,z),h=v,k=w,l=D,m=z;p.payload+=x.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=fh(d,e),a.nestedCues.push(p));p=eh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
243
243
  function eh(a,b,c,d,e,f){a=new hb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function fh(a,b){a=new hb(a,b,"");a.lineBreak=!0;return a}function gh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function hh(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";ih(this)}function jh(a,b,c){return dh(new hb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function ih(a){kh(a,0,15);a.g=1}function lh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case mh:d=nh.has(c)?nh.get(c):String.fromCharCode(c);break;case oh:d=ph.get(c);break;case qh:a.i[a.g].pop();d=rh.get(c);break;case sh:a.i[a.g].pop(),d=th.get(c)}d&&a.i[a.g].push(new gh(d,a.m,a.j,a.o,a.l))}}
244
244
  function uh(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 kh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
245
245
  var mh=0,oh=1,qh=2,sh=3,nh=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"]]),ph=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"]]),rh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
@@ -253,674 +253,679 @@ b.skip(1),d=Rh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&
253
253
  function Vh(a,b,c){var d=null;b=r(Uh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Lh(f,c,a.i));a.h[e]=null}return d}function Wh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Xh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Yh[a<<2|b<<1|c]}
254
254
  var Zh=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"]]),Yh="black blue green cyan red magenta yellow white".split(" ");function $h(){this.h=[];this.g=[];this.i=new Oh;this.l=0;this.s=new Map([["CC1",new vh(0,0)],["CC2",new vh(0,1)],["CC3",new vh(1,0)],["CC4",new vh(1,1)]]);this.o=this.m=0;this.j=new Map;ai(this)}function ai(a){a.m=0;a.o=0;a=r(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,ih(b.i),ih(b.l),ih(b.o)}
255
255
  function bi(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=ci(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Ph(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=di(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
256
- function ci(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.La||!b.xa&&!b.La||!ei(b.xa)||!ei(b.La))return 45<=++a.l&&ai(a),null;a.l=0;b.xa&=127;b.La&=127;if(!b.xa&&!b.La)return null;a=null;if(16===(b.xa&112))a:{d=b.xa;a=b.La;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=Eh[e]:7===e&&(f=!0);
256
+ function ci(a,b){var c=b.type;if(16===(b.Aa&112)){var d=b.Aa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.Aa&&255===b.Na||!b.Aa&&!b.Na||!ei(b.Aa)||!ei(b.Na))return 45<=++a.l&&ai(a),null;a.l=0;b.Aa&=127;b.Na&=127;if(!b.Aa&&!b.Na)return null;a=null;if(16===(b.Aa&112))a:{d=b.Aa;a=b.Na;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=Eh[e]:7===e&&(f=!0);
257
257
  a=1===(a&1);if(c.h!==zh){e=c.g;if(c.h===yh&&b!==e.g){var g=1+b-e.h;uh(e,g,1+e.g-e.h,e.h);kh(e,0,g-1);kh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.o="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",lh(c.g,mh,32),d=!1,b=Eh[(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=Dh[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))lh(c.g,oh,a);else if(18===
258
- (d&246)&&32===(a&224))lh(c.g,d&1?sh:qh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.La){case 32:Ah(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=xh(c,2,a);break;case 38:d=xh(c,3,a);break;case 39:d=xh(c,4,a);break;case 40:lh(c.g,mh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:ih(c.o);Ch(c);break;case 43:Ch(c);break;case 44:b=c.i;d=null;c.h!==zh&&(d=jh(b,c.j,a));kh(b,0,15);break;case 45:b=c.g;c.h!==yh?d=null:(d=jh(b,c.j,a),f=b.g-b.h+1,uh(b,f-1,f,b.h),kh(b,0,
259
- f-1),kh(b,b.g,15-b.g),c.j=a);break;case 46:kh(c.l,0,15);break;case 47:b=null,c.h!==zh&&(b=jh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Ah(c),c.j=a,d=b}a=d;break a}a=null}else d=b.La,lh(c.g,mh,b.xa),lh(c.g,mh,d);return a}
260
- function di(a,b){var c=[];try{for(;b.ma();){var d=Rh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Rh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Sh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Rh(e),l=k.value,m=k.pts;if(16===l){var p=Rh(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:!Kh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.B-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Lh(t,n,g.i));if(t.h+1>=t.F){n=t;for(var x=0,y=1;16>y;y++,
261
- x++)n.i[x]=n.i[y];for(y=0;1>y;y++,x++)n.i[x]=Ih()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Lh(t,n,g.i));t.i[t.h]=Ih();t.g=0;break;case 12:t.isVisible()&&(e=Lh(t,n,g.i)),Hh(t),n=t,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=Th(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?Jh(g.g,"\u266a"):Jh(g.g,
262
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Jh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Zh.has(e)){var w=Zh.get(e);Jh(g.g,w)}else Jh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Jh(g.g,"_"):Jh(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(B){if(B instanceof N&&3E3===B.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw B;}return c}function ei(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function fi(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,se:c,jf:d}}function gi(a,b){return{me:1==b?a.Kb():a.N()}}function hi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
263
- function ii(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Wd:null,sampleSize:null,ad:null};c&256&&(g.Wd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.ad=0==b?a.N():a.Je());e.push(g)}return{gh:d,Le:e}};function ji(){this.i=new Map;this.h=this.g=0}
258
+ (d&246)&&32===(a&224))lh(c.g,d&1?sh:qh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.Na){case 32:Ah(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=xh(c,2,a);break;case 38:d=xh(c,3,a);break;case 39:d=xh(c,4,a);break;case 40:lh(c.g,mh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:ih(c.o);Ch(c);break;case 43:Ch(c);break;case 44:b=c.i;d=null;c.h!==zh&&(d=jh(b,c.j,a));kh(b,0,15);break;case 45:b=c.g;c.h!==yh?d=null:(d=jh(b,c.j,a),f=b.g-b.h+1,uh(b,f-1,f,b.h),kh(b,0,
259
+ f-1),kh(b,b.g,15-b.g),c.j=a);break;case 46:kh(c.l,0,15);break;case 47:b=null,c.h!==zh&&(b=jh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,Ah(c),c.j=a,d=b}a=d;break a}a=null}else d=b.Na,lh(c.g,mh,b.Aa),lh(c.g,mh,d);return a}
260
+ function di(a,b){var c=[];try{for(;b.ma();){var d=Rh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Rh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Sh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Rh(e),l=k.value,m=k.pts;if(16===l){var p=Rh(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:!Kh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.B-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Lh(t,n,g.i));if(t.h+1>=t.F){n=t;for(var y=0,x=1;16>x;x++,
261
+ y++)n.i[y]=n.i[x];for(x=0;1>x;x++,y++)n.i[y]=Ih()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Lh(t,n,g.i));t.i[t.h]=Ih();t.g=0;break;case 12:t.isVisible()&&(e=Lh(t,n,g.i)),Hh(t),n=t,n.h=0,n.g=0}var v=e}else v=null}else if(128<=l&&159>=l)v=Th(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?Jh(g.g,"\u266a"):Jh(g.g,
262
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Jh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Zh.has(e)){var w=Zh.get(e);Jh(g.g,w)}else Jh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Jh(g.g,"_"):Jh(g.g,"[CC]"));v=null}(e=v)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function ei(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function fi(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,ue:c,lf:d}}function gi(a,b){return{oe:1==b?a.Lb():a.N()}}function hi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
263
+ function ii(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Xd:null,sampleSize:null,ad:null};c&256&&(g.Xd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.ad=0==b?a.N():a.Le());e.push(g)}return{ih:d,Ne:e}};function ji(){this.i=new Map;this.h=this.g=0}
264
264
  ji.prototype.init=function(a){var b=this,c=[],d=[];(new Bf).box("moov",Ff).box("mvex",Ff).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",Ff).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",Ff).U("mdhd",function(e){e=hi(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
265
- ji.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Bf).box("moof",Ff).box("traf",Ff).U("trun",function(k){f=ii(k.reader,k.version,k.flags).Le}).U("tfhd",function(k){k=fi(k.reader,k.flags);d=k.se||b.g;e=k.jf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=gi(k.reader,k.version).me}).box("mdat",function(k){if(null===g)throw new N(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.ma();){var v=k.N();if(6==
266
- (k.Qa()&31)){var w=0;t.length>x&&(w=t[x].ad||0);w=(l+w)/m;for(var B=[],z,D=k.Za(v-1),G=z=0;G<D.length;)2==z&&3==D[G]?(z=0,D=[].concat(ia(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 E=0;255==z[G];)E+=255,G++;E+=z[G++];4==D&&B.push(z.subarray(G,G+E));G+=E}B=r(B);for(z=B.next();!z.done;z=B.next())c.push({Vf: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].Wd||p):l+p,x++,y=t.length>
267
- x?t[x].sampleSize||n:n)}}).parse(a,!1);return c};function ki(){this.h=new ji;this.g=new $h}ki.prototype.init=function(a){this.h.init(a)};
268
- function li(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=Fb(d.Vf);if(0<e.length&&(c=a.g,d=d.pts,e=new yf(e,0),181===e.Qa()&&49===e.Sd()&&1195456820===e.N()&&3===e.Qa())){var f=e.Qa();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.Qa(),k=(h&4)>>2,l=e.Qa(),m=e.Qa();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,xa:l,La: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 bi(a.g)}
269
- ;function mi(a,b,c,d){this.ya=a;this.Ba=b;this.la=c;this.Jd=void 0===d?null:d}mi.prototype.jc=function(){return this.Ba};mi.prototype.ec=function(){return this.la};function ni(a,b){return a&&b?a.jc()==b.jc()&&a.ec()==b.ec()&&gb(a.ya(),b.ya()):a==b}M("shaka.media.InitSegmentReference",mi);mi.prototype.getEndByte=mi.prototype.ec;mi.prototype.getStartByte=mi.prototype.jc;
270
- function oi(a,b,c,d,e,f,g,h,k,l,m,p,n,t,x){l=void 0===l?[]:l;t=void 0===t?pi:t;this.startTime=a;this.j=this.endTime=b;this.o=c;this.Ba=d;this.la=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=oi.prototype;q.ya=function(){return this.o()};q.getStartTime=function(){return this.startTime};q.rf=function(){return this.endTime};q.jc=function(){return this.Ba};
271
- q.ec=function(){return this.la};q.If=function(){return this.tilesLayout};q.Hf=function(){return this.m};q.Db=function(){return this.status};q.Pf=function(){this.status=qi};M("shaka.media.SegmentReference",oi);oi.prototype.markAsUnavailable=oi.prototype.Pf;oi.prototype.getStatus=oi.prototype.Db;oi.prototype.getTileDuration=oi.prototype.Hf;oi.prototype.getTilesLayout=oi.prototype.If;oi.prototype.getEndByte=oi.prototype.ec;oi.prototype.getStartByte=oi.prototype.jc;oi.prototype.getEndTime=oi.prototype.rf;
272
- oi.prototype.getStartTime=oi.prototype.getStartTime;oi.prototype.getUris=oi.prototype.ya;var pi=0,qi=1;oi.Status={ug:pi,$g:qi,Jg:2};function ri(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 si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(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)}
265
+ ji.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Bf).box("moof",Ff).box("traf",Ff).U("trun",function(k){f=ii(k.reader,k.version,k.flags).Ne}).U("tfhd",function(k){k=fi(k.reader,k.flags);d=k.ue||b.g;e=k.lf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=gi(k.reader,k.version).oe}).box("mdat",function(k){if(null===g)throw new N(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.ma();){var v=k.N();if(6==
266
+ (k.Sa()&31)){var w=0;t.length>y&&(w=t[y].ad||0);w=(l+w)/m;for(var D=[],z,B=k.$a(v-1),G=z=0;G<B.length;)2==z&&3==B[G]?(z=0,B=[].concat(ia(B)),B.splice(G,1),B=new Uint8Array(B)):0==B[G]?z++:z=0,G++;z=B;for(G=0;G<z.length;){for(B=0;255==z[G];)B+=255,G++;B+=z[G++];for(var E=0;255==z[G];)E+=255,G++;E+=z[G++];4==B&&D.push(z.subarray(G,G+E));G+=E}D=r(D);for(z=D.next();!z.done;z=D.next())c.push({Xf: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].Xd||p):l+p,y++,x=t.length>
267
+ y?t[y].sampleSize||n:n)}}).parse(a,!1);return c};function ki(){this.h=new ji;this.g=new $h}ki.prototype.init=function(a){this.h.init(a)};
268
+ function li(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=Fb(d.Xf);if(0<e.length&&(c=a.g,d=d.pts,e=new yf(e,0),181===e.Sa()&&49===e.Td()&&1195456820===e.N()&&3===e.Sa())){var f=e.Sa();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.Sa(),k=(h&4)>>2,l=e.Sa(),m=e.Sa();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,Aa:l,Na: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 bi(a.g)}
269
+ ;function mi(a,b,c,d){this.Ba=a;this.Ea=b;this.la=c;this.Jd=void 0===d?null:d}mi.prototype.kc=function(){return this.Ea};mi.prototype.fc=function(){return this.la};function ni(a,b){return a&&b?a.kc()==b.kc()&&a.fc()==b.fc()&&gb(a.Ba(),b.Ba()):a==b}M("shaka.media.InitSegmentReference",mi);mi.prototype.getEndByte=mi.prototype.fc;mi.prototype.getStartByte=mi.prototype.kc;
270
+ function oi(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){l=void 0===l?[]:l;t=void 0===t?pi:t;this.startTime=a;this.j=this.endTime=b;this.s=c;this.Ea=d;this.la=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.o=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=oi.prototype;q.Ba=function(){return this.s()};q.getStartTime=function(){return this.startTime};q.uf=function(){return this.endTime};
271
+ q.kc=function(){return this.Ea};q.fc=function(){return this.la};q.Kf=function(){return this.tilesLayout};q.Jf=function(){return this.o};q.Eb=function(){return this.status};q.Rf=function(){this.status=qi};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.ge=function(a){null==this.g?Ua("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};
272
+ M("shaka.media.SegmentReference",oi);oi.prototype.syncAgainst=oi.prototype.ge;oi.prototype.offset=oi.prototype.offset;oi.prototype.markAsUnavailable=oi.prototype.Rf;oi.prototype.getStatus=oi.prototype.Eb;oi.prototype.getTileDuration=oi.prototype.Jf;oi.prototype.getTilesLayout=oi.prototype.Kf;oi.prototype.getEndByte=oi.prototype.fc;oi.prototype.getStartByte=oi.prototype.kc;oi.prototype.getEndTime=oi.prototype.uf;oi.prototype.getStartTime=oi.prototype.getStartTime;oi.prototype.getUris=oi.prototype.Ba;
273
+ var pi=0,qi=1;oi.Status={wg:pi,bh:qi,Lg:2};function ri(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 si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(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)}
273
274
  function ui(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(vi(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 wi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=vi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
274
275
  function vi(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 xi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.s=new of;this.o={};this.B=b;this.G=new lc;this.l=yi(this,this.G);this.D=new mf(function(){return zi(e)});this.I="";this.u=!1;this.O=new lc}function yi(a,b){var c=new MediaSource;a.s.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Ai(c);a.j.src=a.I;return c}q=xi.prototype;q.destroy=function(){return this.D.destroy()};
275
276
  function zi(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(bc)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.o={};a.B=null;a.i={};
276
277
  A(l)})}
277
278
  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=kc,u(p,d.G,2);d.u=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={pa:f.pa},h=g.next())f.pa=h.value,k=a.get(f.pa),l=Xc(k.mimeType,k.codecs),f.pa==e.X?Bi(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Sc(l,f.pa)||(d.o[f.pa]=new Rc,l=Uc(f.pa,l)),m=d.l.addSourceBuffer(l),d.s.C(m,"error",function(n){return function(){d.i[n.pa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.s.C(m,"updateend",
278
279
  function(n){return function(){return Ci(d,n.pa)}}(f)),d.h[f.pa]=m,d.M[f.pa]=l,d.i[f.pa]=[],d.L[f.pa]=!!k.drmInfos.length);A(p)})};function Bi(a,b,c){a.g||(a.g=new bd(a.m));var d=a.g;a=a.F;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,dd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Di(a){return a.l?"ended"==a.l.readyState:!0}function Ei(a,b){return b==jc?a.g.g:ri(Fi(a,b))}
279
- function Gi(a,b){return b==jc?a.g.h:si(Fi(a,b))}function Hi(a,b,c){if(b==jc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Fi(a,b);return ui(a,c)}q.Ma=function(){var a={total:vi(this.j.buffered),audio:vi(Fi(this,"audio")),video:vi(Fi(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 Fi(a,b){try{return a.h[b].buffered}catch(c){return null}}
280
- function Ii(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,B,z,D,G,E;return K(function(H){switch(H.g){case 1:h=kc;if(b!=h.X){H.A(2);break}if(!a.u){H.A(3);break}return u(H,a.O,4);case 4:k=H.h,a.g.s=k;case 3:return u(H,ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return H.return();case 2:if(!a.o[b]){e&&(a.g||Bi(a,"text/vtt",a.u),d?(l=li(a.B,c),l.length&&(m=a.h[h.ra].timestampOffset,jd(a.g,l,d.startTime,d.endTime,m))):a.B.init(c));H.A(6);break}f&&a.o[b].g.resetCaptions();
281
- return u(H,Vc(a.o[b],c),7);case 7:p=H.h,a.g||Bi(a,"text/vtt",a.u),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.ra].timestampOffset,x=hd(p.captions),jd(a.g,x,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ji(a,c,d?d.startTime:null,b);y=a.h[b];v=Ki;if(!a.u||y.mode==v||!d){H.A(8);break}w=b==h.ra||!(h.ra in a.h);if(!w){H.A(9);break}B=[y.appendWindowStart,y.appendWindowEnd];y.appendWindowStart=0;y.appendWindowEnd=Infinity;
282
- z=y.timestampOffset;y.timestampOffset=0;return u(H,Li(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(H,Li(a,b,function(){return Mi(a,b)}),11);case 11:return y.timestampOffset=z,y.appendWindowStart=B[0],y.appendWindowEnd=B[1],D=ri(Fi(a,b)),G=(d.startTime||0)-(D||0),a.O.resolve(G),u(H,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),12);case 12:if(b!=h.ra){H.A(9);break}return u(H,Li(a,b,function(){a.j.currentTime-=.001;Ci(a,b)}),9);case 9:y.mode=v;case 8:return d&&a.u&&b!=h.X&&(f||g)&&
283
- (E=d.startTime,Li(a,b,function(){return Mi(a,b)}),Li(a,b,function(){var I=E;0>I&&(I+=.001);a.h[b].timestampOffset=I;Ci(a,b)})),u(H,Li(a,b,function(){a.h[b].appendBuffer(c)}),15);case 15:A(H)}})}function Oi(a,b){var c=Gi(a,"video")||0;gd(a.g,b,c)}function Pi(a){a.g&&gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=kc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Li(d,a,function(){return Ni(d,a,b,c)}),0)})};
284
- function Qi(a,b){var c;return K(function(d){c=kc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=kc;return a==c.X?d.return():u(d,Li(b,a,function(){b.j.currentTime-=.001;Ci(b,a)}),0)})};
285
- function Ri(a,b,c,d,e,f){var g;return K(function(h){g=kc;return b==g.X?(f||(a.g.s=c),fd(a.g,d,e),h.return()):u(h,Promise.all([Li(a,b,function(){return Mi(a,b)}),f?Promise.resolve():Li(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Ci(a,b)}),Li(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Ci(a,b)})]),0)})}
286
- q.endOfStream=function(a){var b=this;return K(function(c){return u(c,Si(b,function(){Di(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.Ia=function(a){var b=this;return K(function(c){return u(c,Si(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 Ni(a,b,c,d){d<=c?Ci(a,b):a.h[b].remove(c,d)}
287
- function Mi(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;Ci(a,b)}function Ci(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ti(a,b))}function Li(a,b,c){nf(a.D);c={start:c,p:new lc};a.i[b].push(c);1==a.i[b].length&&Ui(a,b);return c.p}
288
- function Si(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:nf(a.D);c=[];d={};for(e in a.h)d.Tb=new lc,f={start:function(l){return function(){return l.Tb.resolve()}}(d),p:d.Tb},a.i[e].push(f),c.push(d.Tb),1==a.i[e].length&&f.start(),d={Tb:d.Tb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)Ti(a,h)}A(k)}})}function Ti(a,b){a.i[b].shift();Ui(a,b)}
289
- function Ui(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ti(a,b)}}function Ji(a,b,c,d){var e=a.L[d];null==c&&e&&(tc()||rc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=$g(b));return b}var Ai=window.URL.createObjectURL,Ki="sequence",Vi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.$c=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.D=0;this.F=!1}q=T.prototype;q.getDuration=function(){return this.i};q.yf=function(){return this.g};q.Ia=function(a){this.i=a};q.Df=function(){return this.l};q.Pe=function(a){this.o=a};q.wc=function(a){this.s=a};q.de=function(a){this.m=a};q.kg=function(a){this.$c=a};q.qf=function(){return this.$c};
290
- q.Hb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Nd(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.B&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};q.Hd=function(){this.F=!0};q.Nd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.Md=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)};
291
- q.V=function(){return Infinity==this.i&&!this.s};q.jb=function(){return Infinity!=this.i&&!this.s};q.Oa=function(){return Math.max(this.u,this.gb()-this.m)};q.Qe=function(a){this.u=a};q.gb=function(){return this.V()||this.jb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};q.ic=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.gb()-this.m+a,this.Na()))};q.Cb=function(){return this.ic(0)};
292
- q.Na=function(){return Math.max(0,this.gb()-(this.V()||this.jb()?this.$c:0))};q.Te=function(){return null==this.l||null!=this.h&&this.B?!1:!0};q.Oe=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Oe;T.prototype.usingPresentationStartTime=T.prototype.Te;T.prototype.getSeekRangeEnd=T.prototype.Na;T.prototype.getSeekRangeStart=T.prototype.Cb;T.prototype.getSafeSeekRangeStart=T.prototype.ic;T.prototype.getSegmentAvailabilityEnd=T.prototype.gb;
293
- T.prototype.setUserSeekStart=T.prototype.Qe;T.prototype.getSegmentAvailabilityStart=T.prototype.Oa;T.prototype.isInProgress=T.prototype.jb;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Md;T.prototype.notifyMinSegmentStartTime=T.prototype.Nd;T.prototype.lockStartTime=T.prototype.Hd;T.prototype.notifySegments=T.prototype.Hb;T.prototype.getDelay=T.prototype.qf;T.prototype.setDelay=T.prototype.kg;
294
- T.prototype.setSegmentAvailabilityDuration=T.prototype.de;T.prototype.setStatic=T.prototype.wc;T.prototype.setClockOffset=T.prototype.Pe;T.prototype.getPresentationStartTime=T.prototype.Df;T.prototype.setDuration=T.prototype.Ia;T.prototype.getMaxSegmentDuration=T.prototype.yf;T.prototype.getDuration=T.prototype.getDuration;function Wi(a,b,c){this.l=c;this.j=a;this.s=Xi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Wi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Yi(a,b){a.i=b}function Zi(a){this.g=a}function Xi(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(vi(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 $i(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new of;this.m=!1;this.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return aj(f)});this.j=(new O(function(){aj(f)})).Ca(.25)}$i.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.s=this.o=null};$i.prototype.Qd=function(){this.l=!0;aj(this)};
295
- function aj(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.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Xi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.D.gapDetectionThreshold),null==
296
- d||0==d&&!a.l||(e=c.start(d),e>=a.s.Na()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new Q("gapjumped")))))}}};function bj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=cj.value().get(b),c.oa(a,b,d))}var cj=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 dj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new of;this.i=new ej(a);bj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){fj(d,d.j)})}dj.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 gj(a){return a.m?a.g.currentTime:a.j}function hj(a,b){0<a.g.readyState?ij(a.i,b):bj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){fj(a,a.j)})}
297
- function fj(a,b){.001>Math.abs(a.g.currentTime-b)?jj(a):(a.h.oa(a.g,"seeking",function(){jj(a)}),ij(a.i,0==a.g.currentTime?b:a.g.currentTime))}function jj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function ej(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ej.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
298
- function ij(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function kj(a){this.g=a;this.j=!1;this.h=null;this.i=new of}q=kj.prototype;q.vd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;bj(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.wd=function(a){this.h=this.j?this.h:a};q.Ec=function(){return(this.j?this.g.currentTime:this.h)||0};q.ke=function(){return 0};
299
- q.je=function(){return 0};q.Fe=function(){};
300
- function lj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=mj(a,c,f);this.j=new $i(a,b.presentationTimeline,c,this.o,f);this.h=new dj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=gj(g.h);h=nj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;hj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},oj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=gj(g.h),k=g.g.Cb(),l=g.g.Na();3>
301
- l-k&&(k=l-3);h<k&&(h=nj(g,h),g.i.currentTime=h)}})}q=lj.prototype;q.vd=function(){this.m.Ca(.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.u=function(){}};q.wd=function(a){hj(this.h,a)};q.Ec=function(){var a=gj(this.h);return 0<this.i.readyState&&!this.i.paused?pj(this,a):a};q.ke=function(){return this.o?this.o.o:0};q.je=function(){return this.j.u};
302
- function oj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Cb():a.g.Na():0>b&&(b=a.g.Na()+b);return qj(a,pj(a,b))}q.Fe=function(){this.j.Qd()};function qj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function nj(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Cb(),f=a.g.Na(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.ic(c),k=a.g.ic(d);c=a.g.ic(c+d);return b>=g?qj(a,b):b>f?f:b<e?ti(a.i.buffered,k)?k:c:b>=h||ti(a.i.buffered,b)?b:c}
303
- function pj(a,b){var c=a.g.Cb();if(b<c)return c;a=a.g.Na();return b>a?a:b}function mj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Wi(new Zi(a),b.stallThreshold,c);Yi(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function rj(a){this.J=a;this.g=null;this.h=0;this.i=!1}q=rj.prototype;q.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};q.Qf=function(){this.i=!0};q.find=function(a){for(var b=this.J.length-1,c=b;0<=c;--c){var d=this.J[c],e=c<b?this.J[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.J.length&&a<this.J[0].startTime?this.h:null};q.get=function(a){if(0==this.J.length)return null;a-=this.h;return 0>a||a>=this.J.length?null:this.J[a]};
304
- q.offset=function(a){if(!this.i)for(var b=r(this.J),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.oc=function(a){!this.i&&a.length&&(this.J=this.J.filter(function(b){return b.startTime<a[0].startTime}),this.J.push.apply(this.J,ia(a)))};q.Gb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.J.length||d.endTime>c.J[0].startTime)});this.oc(a);this.eb(b)};
305
- q.eb=function(a){if(!this.i){var b=this.J.length;this.J=this.J.filter(function(c){return c.endTime>a});this.h+=b-this.J.length}};
306
- q.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.J.length;)if(this.J[this.J.length-1].startTime>=b)this.J.pop();else break;for(;this.J.length;)if(this.J[0].endTime<=a)this.J.shift(),c||this.h++;else break;0!=this.J.length&&(a=this.J[this.J.length-1],this.J[this.J.length-1]=new oi(a.startTime,b,a.o,a.Ba,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.m,a.g,a.status,a.l))}};
307
- q.bd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.J.push.apply(c.J,ia(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};rj.prototype[Symbol.iterator]=function(){return this.Bb(0)};rj.prototype.Bb=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 sj(this,b,d)};
308
- function tj(a,b,c){return new rj([new oi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",rj);rj.forSingleSegment=tj;rj.prototype.getIteratorForTime=rj.prototype.Bb;rj.prototype.updateEvery=rj.prototype.bd;rj.prototype.fit=rj.prototype.Xa;rj.prototype.evict=rj.prototype.eb;rj.prototype.mergeAndEvict=rj.prototype.Gb;rj.prototype.offset=rj.prototype.offset;rj.prototype.get=rj.prototype.get;rj.prototype.find=rj.prototype.find;rj.prototype.markImmutable=rj.prototype.Qf;
309
- rj.prototype.release=rj.prototype.release;function sj(a,b,c){this.i=a;this.g=b;this.h=c}sj.prototype.hf=function(){return this.g};sj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.ya().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};
310
- sj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.ya().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",sj);sj.prototype.next=sj.prototype.next;sj.prototype.current=sj.prototype.current;sj.prototype.currentPosition=sj.prototype.hf;function uj(){rj.call(this,[]);this.j=[]}pa(uj,rj);q=uj.prototype;q.clone=function(){var a=new uj;a.j=this.j.slice();return a};
311
- 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.J.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.J.length}return null};q.offset=function(){};q.oc=function(){};q.eb=function(){};q.Gb=function(){};q.Xa=function(){};q.bd=function(){};
312
- M("shaka.media.MetaSegmentIndex",uj);uj.prototype.updateEvery=uj.prototype.bd;uj.prototype.fit=uj.prototype.Xa;uj.prototype.mergeAndEvict=uj.prototype.Gb;uj.prototype.evict=uj.prototype.eb;uj.prototype.merge=uj.prototype.oc;uj.prototype.offset=uj.prototype.offset;uj.prototype.get=uj.prototype.get;uj.prototype.find=uj.prototype.find;uj.prototype.release=uj.prototype.release;function vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Qc();this.h=new O(function(){b.g.Ee(.25*b.i)})}vj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};vj.prototype.set=function(a){this.i=a;wj(this)};vj.prototype.Mc=function(){return this.g.Mc()};function wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Qc()!=b&&a.g.ce(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Qc()&&a.g.ce(0)};function xj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){yj(b,!1)})).Ca(.25)}xj.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 yj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function zj(a){R.call(this);this.g=new Map;this.h=a}pa(zj,R);zj.prototype.release=function(){this.g.clear();R.prototype.release.call(this)};function Aj(a,b){var c=a.g.get(b);c||(c={pc:[],qe:null,contentType:b},a.g.set(b,c));return c}function Bj(a,b,c){var d=Aj(a,b.contentType);Cj(a,d);a={Jd:b,position:c};d=d.pc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
313
- zj.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.pc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Jd;break a}}d=null}if(e=d)e=c.qe,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);
314
- 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.qe=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Cj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.pc;b.pc=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.pc=[]};function Dj(a){R.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}pa(Dj,R);Dj.prototype.release=function(){this.g.clear();this.h.stop();R.prototype.release.call(this)};function Ej(a){R.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{rb:null,qb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{rb:Hj,qb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{rb:Ij,qb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{rb:Fj,qb:Hj,ib:function(c,d){return Gj(b,"exit",c,d)}},{rb:Fj,qb:Ij,ib:function(c,d){return Gj(b,"exit",c,d)}},{rb:Hj,qb:Ij,ib:function(c,d){return Gj(b,"skip",c,d)}},{rb:Ij,qb:Hj,ib:function(c,d){return Gj(b,"skip",c,d)}}];this.h=new of;this.h.C(this.i,"regionremove",
315
- function(c){b.g.delete(c.region)})}pa(Ej,R);Ej.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;R.prototype.release.call(this)};Ej.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?Hj:a>d.endTime?Ij:Fj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.rb==e&&h.qb==f&&h.ib(d,b)}};
316
- function Gj(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hj=1,Fj=2,Ij=3;function Jj(a,b,c,d,e){a=ef(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Kj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.i=new Map;this.B=!1;this.D=null;this.s=!1;this.h=new mf(function(){return Lj(c)})}q=Kj.prototype;q.destroy=function(){return this.h.destroy()};function Lj(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,Mj(e),b.push(Nj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;A(f)})}
317
- q.configure=function(a){this.j=a;this.D=new Le({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 u(b,Oj(a),2);nf(a.h);a.B=!0;A(b)})};
318
- function Pj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=kc,C(k,2),u(k,Qi(a.g.R,c.X),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Xc(b.mimeType,b.codecs);Bi(a.g.R,e,a.m.sequenceMode);f=a.g.R.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=Qj(b),a.i.set(c.X,h),Rj(a,h,0);A(k)}})}function Sj(a){var b=a.i.get(jc);b&&(Mj(b),Nj(b).catch(function(){}),a.i.delete(jc));a.o=null}
319
- function Tj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.ob&&(Uj(a,b,!1,0,!1),c.ob=d);else if(d=c.ob)c.ob=null,Uj(a,d,!0,0,!1)}}function Vj(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.B&&(b.video&&Uj(a,b.video,c,d,e,f),b.audio&&Uj(a,b.audio,c,d,e,f))}function Wj(a,b){a.o=b;a.B&&Uj(a,b,!0,0,!1)}
320
- function Uj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=jc?g&&(g.ob&&(b.trickModeVideo?(g.ob=b,b=b.trickModeVideo):g.ob=null),g.stream!=b||e)&&(b.type==jc&&Bi(a.g.R,Xc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.le=!!f,c&&(g.bc?g.ed=!0:g.Ha?(g.ab=!0,g.Hc=d,g.ed=!0):(Mj(g),Xj(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Yj(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Pj(a,b)}
321
- function Yj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.ta)return e.return();c=b.stream;d=b.ta;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ta!=d||b.stream!=c)return e.return();var f=a.g.Pc();var g=Gi(a.g.R,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.la?k.la-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.la?k.la-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
322
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.ta.h.g>h?!0:!1):f=!1;f&&b.ta.abort();A(e)})}
323
- q.tc=function(){for(var a=this.g.Pc(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.ba=null;var e=this.g.R;d==jc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Fi(e,d),e=ti(e,a));if(!e){(null!=Gi(this.g.R,d)||c.Ha)&&Zj(this,c);c.ta&&(c.ta.abort(),c.ta=null);if(d===jc)for(d=this.g.R.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ai(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())Wh(e.value);c.tc=!0}}};
324
- function Zj(a,b){b.bc||b.ab||(b.Ha?(b.ab=!0,b.Hc=0):null==Ei(a.g.R,b.type)?null==b.Sa&&Rj(a,b,0):(Mj(b),Xj(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
325
- function Oj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){if(1==p.g){b=kc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.cb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.ra,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.R;f=a.j.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}nf(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=Qj(l),a.i.set(k,m),Rj(a,m,0));A(p)})}
326
- function Qj(a){return{stream:a,type:a.type,ba:null,za:null,Uc:null,Gd:null,Fd:null,Ed:null,ob:null,endOfStream:!1,Ha:!1,Sa:null,ab:!1,Hc:0,ed:!1,bc:!1,tc:!0,Ud:!1,kc:!1,ta:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Ia(a):this.g.R.Ia(Math.pow(2,32))};
327
- function ak(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.h);if(b.Ha||null==b.Sa||b.bc)return h.return();b.Sa=null;if(!b.ab){h.A(2);break}return u(h,Xj(a,b,b.ed,b.Hc),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Sa&&Rj(a,b,0),h.return();case 4:C(h,6);d=bk(a,b);null!=d&&(Rj(a,b,d),b.kc=!1);va(h,7);break;case 6:return e=
328
- F(h),u(h,ck(a,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.R.endOfStream(),10);case 10:nf(a.h),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),A(h)}})}
329
- function bk(a,b){if(dk(b))return Oi(a.g.R,b.stream.originalId||""),null;b.type==jc&&Pi(a.g.R);var c=a.g.Pc(),d=b.za?b.za.endTime:c,e=Hi(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Gi(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(jc))&&dk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=ek(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
330
- f=Infinity;g=Array.from(a.i.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,dk(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.za?h.za.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;fk(a,b,c,e).catch(function(){});return null}
331
- function ek(a,b,c,d){if(b.ba)return b.ba.current();if(b.za||d)return b.ba=b.stream.segmentIndex.Bb(b.za?b.za.endTime:d),b.ba&&b.ba.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.Bb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.Bb(c),e=b.ba&&b.ba.next().value);return e}
332
- function fk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,x,y,v,w,B;return K(function(z){switch(z.g){case 1:e=kc;f=b.stream;g=b.ba;b.Ha=!0;C(z,2);if(2==d.Db())throw new N(1,1,1011);return u(z,gk(a,b,d),4);case 4:nf(a.h);if(a.s)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,E,H;return K(function(I){if(n)return I.return();t=!0;nf(a.h);if(a.s)return I.return();p=hk(p,D);G=!1;E=0;(new Bf).box("mdat",
333
- function(J){E=J.size+J.start;G=!0}).parse(p,!1,!0);if(!G)return I.A(0);H=p.subarray(0,E);p=p.subarray(E);return u(I,ik(a,b,c,f,d,H),0)})},u(z,jk(a,b,d,x),11);l=jk(a,b,d);return u(z,l,7);case 7:m=z.h;nf(a.h);if(a.s)return z.return();if(!d.l){z.A(8);break}return u(z,kk(m,d,g),9);case 9:m=z.h;case 8:return nf(a.h),b.ab?(b.Ha=!1,Rj(a,b,0),z.return()):u(z,ik(a,b,c,f,d,m),6);case 11:y=z.h;if(t){z.A(6);break}n=!0;nf(a.h);return a.s?z.return():b.ab?(b.Ha=!1,Rj(a,b,0),z.return()):u(z,ik(a,b,c,f,d,y),6);case 6:nf(a.h);
334
- if(a.s)return z.return();b.za=d;g.next();b.Ha=!1;b.Ud=!1;v=a.g.R.Ma();w=v[b.type];$a(JSON.stringify(w));b.ab||a.g.Qd();Rj(a,b,0);va(z,0);break;case 2:B=F(z);nf(a.h,B);if(a.s)return z.return();b.Ha=!1;if(7001==B.code)b.Ha=!1,b.Sa=null,Rj(a,b,0),z.A(0);else if(b.type==e.X&&a.j.ignoreTextStreamFailures)a.i.delete(e.X),z.A(0);else if(3017==B.code)lk(a,b,B),z.A(0);else return b.kc=!0,B.severity=2,u(z,ck(a,B),0)}})}
335
- function kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fb(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 hk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
336
- function lk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Ud})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.kc=!0;a.s=!0;a.g.onError(c);return}b.Ud=!0}Rj(a,b,4)}
337
- function gk(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.Gd||e!=b.Fd||f!=b.Ed)h=function(){var p;return K(function(n){if(1==n.g)return C(n,2),b.Fd=e,b.Ed=f,b.Gd=g,u(n,Ri(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=n.g)return va(n,0);p=F(n);b.Fd=null;b.Ed=null;b.Gd=null;throw p;})},d.push(h());!ni(c.i,b.Uc)&&(b.Uc=c.i)&&(k=jk(a,b,c.i),l=function(){var p,n,t;return K(function(x){switch(x.g){case 1:return C(x,
338
- 2),u(x,k,4);case 4:return p=x.h,nf(a.h),n=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(x,a.g.ne(b.type,p),5);case 5:return u(x,Ii(a.g.R,b.type,p,null,n),6);case 6:va(x,0);break;case 2:throw t=F(x),b.Uc=null,t;}})},a.g.Tf(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
339
- function ik(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 Bf).U("emsg",function(m){var p=d.emsgSchemeIdUris;if(0===m.version){var n=m.reader.qc();var t=m.reader.qc();var x=m.reader.N();var y=m.reader.N();var v=m.reader.N();var w=m.reader.N();var B=e.startTime+y/x}else x=m.reader.N(),B=m.reader.Kb()/x+e.timestampOffset,y=B-e.startTime,v=m.reader.N(),
340
- w=m.reader.N(),n=m.reader.qc(),t=m.reader.qc();m=m.reader.Za(m.reader.S.byteLength-m.reader.$());if(p&&p.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.Uf():(p=(new Map).set("detail",{startTime:B,endTime:B+v/x,schemeIdUri:n,value:t,timescale:x,presentationTimeDelta:y,eventDuration:v,id:w,messageData:m}),p=new Q("emsg",p),a.g.onEvent(p))}).parse(f),u(l,mk(a,b,c),2);case 2:return nf(a.h),h=b.tc,b.tc=!1,k=b.le,b.le=!1,u(l,a.g.ne(b.type,f),3);case 3:return u(l,Ii(a.g.R,b.type,
341
- f,e,g,h,k),4);case 4:nf(a.h),A(l)}})}function mk(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=Ei(a.g.R,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.R.remove(b.type,e,e+g),2)}nf(a.h);A(h)})}function dk(a){return a&&a.type==jc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
342
- function jk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Jj(c.ya(),c.Ba,c.la,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof mi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.kb.request(e,f),b.ta=h,u(l,h.promise,2);k=l.h;b.ta=null;return l.return(k.data)})}
343
- function Xj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.ab=!1,b.ed=!1,b.Hc=0,b.bc=!0,b.za=null,b.Uc=null,b.ba=null,d?(e=a.g.Pc(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,Qi(a.g.R,b.type),4);if(3!=g.g)return nf(a.h),c?u(g,a.g.R.flush(b.type),3):g.A(3);nf(a.h);b.bc=!1;b.endOfStream=!1;Rj(a,b,0);A(g)})}
344
- function Rj(a,b,c){var d=b.type;if(d!=jc||a.i.has(d))b.Sa=(new nc(function(){var e;return K(function(f){if(1==f.g)return C(f,2),u(f,ak(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).P(c)}function Mj(a){null!=a.Sa&&(a.Sa.stop(),a.Sa=null)}function Nj(a){return K(function(b){return a.ta?u(b,a.ta.abort(),0):b.A(0)})}function ck(a,b){return K(function(c){if(1==c.g)return u(c,Ne(a.D),2);nf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);A(c)})};function nk(a,b){var c=ok(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return pk(d)});this.s=new mf(function(){return qk(d)})}nk.prototype.destroy=function(){return this.s.destroy()};function qk(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),rk(a),u(e,a.u,2);a.g&&a.g.Ga.mb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.mb();a.g=null;a.m=[];a.j=null;A(e)})}
345
- function sk(a,b){var c={Ib:function(){},Wc:function(){},mb:function(){},onError:function(){},Yc:function(){},fh:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();rk(a);return c}
346
- function pk(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.hb)var c=!1;else{a.g&&(a.g.Ga.mb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Ib(),a.g={node:d.node,payload:d.payload,hb:d.hb,Ga:c.Ga}):c.Ga.Yc();c=!0}c?c=Promise.resolve():a.g?c=tk(a):(a.j.Sf(a.i),a.o=new lc,c=a.o);b=u(b,c,1)}return b})}
347
- function tk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Af(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.kf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ga.Wc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ga.mb();else a.g.Ga.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function rk(a){a.o&&(a.o.resolve(),a.o=null)};function uk(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=uk.prototype;q.remove=function(a,b){if(!this.g)return!1;vk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
280
+ function Gi(a,b){return b==jc?a.g.h:si(Fi(a,b))}function Hi(a,b,c){if(b==jc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Fi(a,b);return ui(a,c)}q.Oa=function(){var a={total:vi(this.j.buffered),audio:vi(Fi(this,"audio")),video:vi(Fi(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 Fi(a,b){try{return a.h[b].buffered}catch(c){return null}}
281
+ function Ii(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,D,z,B,G,E,H;return K(function(I){switch(I.g){case 1:h=kc;if(b!=h.X){I.A(2);break}if(!a.u){I.A(3);break}return u(I,a.O,4);case 4:k=I.h,a.g.s=k;case 3:return u(I,ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return I.return();case 2:if(!a.o[b]){e&&(a.g||Bi(a,"text/vtt",a.u),d?(l=li(a.B,c),l.length&&(m=a.h[h.ta].timestampOffset,jd(a.g,l,d.startTime,d.endTime,m))):a.B.init(c));I.A(6);break}f&&a.o[b].g.resetCaptions();
282
+ return u(I,Vc(a.o[b],c),7);case 7:p=I.h,a.g||Bi(a,"text/vtt",a.u),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.ta].timestampOffset,y=hd(p.captions),jd(a.g,y,d?d.startTime:null,d?d.endTime:null,t)),c=p.data;case 6:c=Ji(a,c,d?d.startTime:null,b);x=a.h[b];v=Ki;if(!a.u||x.mode==v||!d){I.A(8);break}w=a.l.duration;D=b==h.ta||!(h.ta in a.h);if(!D){I.A(9);break}z=[x.appendWindowStart,x.appendWindowEnd];x.appendWindowStart=0;x.appendWindowEnd=
283
+ Infinity;B=x.timestampOffset;x.timestampOffset=0;return u(I,Li(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(I,Li(a,b,function(){return Mi(a,b)}),11);case 11:return x.timestampOffset=B,x.appendWindowStart=z[0],x.appendWindowEnd=z[1],G=ri(Fi(a,b)),E=(d.startTime||0)-(G||0),a.O.resolve(E),u(I,Li(a,b,function(){return Ni(a,b,0,w)}),12);case 12:if(b!=h.ta){I.A(9);break}return u(I,Li(a,b,function(){a.j.currentTime-=.001;Ci(a,b)}),9);case 9:return x.mode=v,u(I,a.Da(w),8);case 8:return d&&
284
+ a.u&&b!=h.X&&(f||g)&&(H=d.startTime,Li(a,b,function(){return Mi(a,b)}),Li(a,b,function(){return Oi(a,b,H)})),u(I,Li(a,b,function(){a.h[b].appendBuffer(c)}),16);case 16:A(I)}})}function Pi(a,b){var c=Gi(a,"video")||0;gd(a.g,b,c)}function Qi(a){a.g&&gd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return K(function(f){e=kc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Li(d,a,function(){return Ni(d,a,b,c)}),0)})};
285
+ function Ri(a,b){var c;return K(function(d){c=kc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return K(function(d){c=kc;return a==c.X?d.return():u(d,Li(b,a,function(){b.j.currentTime-=.001;Ci(b,a)}),0)})};
286
+ function Si(a,b,c,d,e,f){var g;return K(function(h){g=kc;return b==g.X?(f||(a.g.s=c),fd(a.g,d,e),h.return()):u(h,Promise.all([Li(a,b,function(){return Mi(a,b)}),f?Promise.resolve():Li(a,b,function(){return Oi(a,b,c)}),Li(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Ci(a,b)})]),0)})}function Ti(a,b,c){var d;return K(function(e){d=kc;if(b==d.X)return e.return();Li(a,b,function(){return Mi(a,b)});return u(e,Li(a,b,function(){return Oi(a,b,c)}),0)})}
287
+ q.endOfStream=function(a){var b=this;return K(function(c){return u(c,Ui(b,function(){Di(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.Da=function(a){var b=this;return K(function(c){return u(c,Ui(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 Ni(a,b,c,d){d<=c?Ci(a,b):a.h[b].remove(c,d)}
288
+ function Mi(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;Ci(a,b)}function Oi(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Ci(a,b)}function Ci(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Vi(a,b))}function Li(a,b,c){nf(a.D);c={start:c,p:new lc};a.i[b].push(c);1==a.i[b].length&&Wi(a,b);return c.p}
289
+ function Ui(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:nf(a.D);c=[];d={};for(e in a.h)d.Ub=new lc,f={start:function(l){return function(){return l.Ub.resolve()}}(d),p:d.Ub},a.i[e].push(f),c.push(d.Ub),1==a.i[e].length&&f.start(),d={Ub:d.Ub};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)Vi(a,h)}A(k)}})}function Vi(a,b){a.i[b].shift();Wi(a,b)}
290
+ function Wi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Vi(a,b)}}function Ji(a,b,c,d){var e=a.L[d];null==c&&e&&(tc()||rc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=$g(b));return b}var Ai=window.URL.createObjectURL,Ki="sequence",Xi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.$c=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.D=0;this.F=!1}q=T.prototype;q.getDuration=function(){return this.i};q.Af=function(){return this.g};q.Da=function(a){this.i=a};q.Ff=function(){return this.l};q.Re=function(a){this.o=a};q.xc=function(a){this.s=a};q.ee=function(a){this.m=a};q.mg=function(a){this.$c=a};q.tf=function(){return this.$c};
291
+ q.Ib=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Od(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.B&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};q.Hd=function(){this.F=!0};q.Od=function(a){this.j=null==this.j?a:Math.min(this.j,a)};q.Nd=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)};
292
+ q.V=function(){return Infinity==this.i&&!this.s};q.kb=function(){return Infinity!=this.i&&!this.s};q.Qa=function(){return Math.max(this.u,this.hb()-this.m)};q.Se=function(a){this.u=a};q.hb=function(){return this.V()||this.kb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};q.jc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.hb()-this.m+a,this.Pa()))};q.Db=function(){return this.jc(0)};
293
+ q.Pa=function(){return Math.max(0,this.hb()-(this.V()||this.kb()?this.$c:0))};q.Ve=function(){return null==this.l||null!=this.h&&this.B?!1:!0};q.Qe=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Qe;T.prototype.usingPresentationStartTime=T.prototype.Ve;T.prototype.getSeekRangeEnd=T.prototype.Pa;T.prototype.getSeekRangeStart=T.prototype.Db;T.prototype.getSafeSeekRangeStart=T.prototype.jc;T.prototype.getSegmentAvailabilityEnd=T.prototype.hb;
294
+ T.prototype.setUserSeekStart=T.prototype.Se;T.prototype.getSegmentAvailabilityStart=T.prototype.Qa;T.prototype.isInProgress=T.prototype.kb;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Nd;T.prototype.notifyMinSegmentStartTime=T.prototype.Od;T.prototype.lockStartTime=T.prototype.Hd;T.prototype.notifySegments=T.prototype.Ib;T.prototype.getDelay=T.prototype.tf;T.prototype.setDelay=T.prototype.mg;
295
+ T.prototype.setSegmentAvailabilityDuration=T.prototype.ee;T.prototype.setStatic=T.prototype.xc;T.prototype.setClockOffset=T.prototype.Re;T.prototype.getPresentationStartTime=T.prototype.Ff;T.prototype.setDuration=T.prototype.Da;T.prototype.getMaxSegmentDuration=T.prototype.Af;T.prototype.getDuration=T.prototype.getDuration;function Yi(a,b,c){this.l=c;this.j=a;this.s=Zi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Yi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function $i(a,b){a.i=b}function aj(a){this.g=a}function Zi(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(vi(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 bj(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new of;this.m=!1;this.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return cj(f)});this.j=(new O(function(){cj(f)})).Fa(.25)}bj.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.s=this.o=null};bj.prototype.Rd=function(){this.l=!0;cj(this)};
296
+ function cj(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.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Zi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new Q("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.D.gapDetectionThreshold),null==
297
+ d||0==d&&!a.l||(e=c.start(d),e>=a.s.Pa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new Q("gapjumped")))))}}};function dj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=ej.value().get(b),c.oa(a,b,d))}var ej=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 fj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new of;this.i=new gj(a);dj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){hj(d,d.j)})}fj.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 ij(a){return a.m?a.g.currentTime:a.j}function jj(a,b){0<a.g.readyState?kj(a.i,b):dj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){hj(a,a.j)})}
298
+ function hj(a,b){.001>Math.abs(a.g.currentTime-b)?lj(a):(a.h.oa(a.g,"seeking",function(){lj(a)}),kj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function lj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function gj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}gj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
299
+ function kj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Fa(.1)};function mj(a){this.g=a;this.j=!1;this.h=null;this.i=new of}q=mj.prototype;q.vd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;dj(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.wd=function(a){this.h=this.j?this.h:a};q.Fc=function(){return(this.j?this.g.currentTime:this.h)||0};q.me=function(){return 0};
300
+ q.le=function(){return 0};q.He=function(){};
301
+ function nj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=oj(a,c,f);this.j=new bj(a,b.presentationTimeline,c,this.o,f);this.h=new fj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=ij(g.h);h=pj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;jj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},qj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=ij(g.h),k=g.g.Db(),l=g.g.Pa();3>
302
+ l-k&&(k=l-3);h<k&&(h=pj(g,h),g.i.currentTime=h)}})}q=nj.prototype;q.vd=function(){this.m.Fa(.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.u=function(){}};q.wd=function(a){jj(this.h,a)};q.Fc=function(){var a=ij(this.h);return 0<this.i.readyState&&!this.i.paused?rj(this,a):a};q.me=function(){return this.o?this.o.o:0};q.le=function(){return this.j.u};
303
+ function qj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Db():a.g.Pa():0>b&&(b=a.g.Pa()+b);return sj(a,rj(a,b))}q.He=function(){this.j.Rd()};function sj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function pj(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Db(),f=a.g.Pa(),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?sj(a,b):b>f?f:b<e?ti(a.i.buffered,k)?k:c:b>=h||ti(a.i.buffered,b)?b:c}
304
+ function rj(a,b){var c=a.g.Db();if(b<c)return c;a=a.g.Pa();return b>a?a:b}function oj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Yi(new aj(a),b.stallThreshold,c);$i(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function tj(a){this.J=a;this.g=null;this.h=0;this.i=!1}q=tj.prototype;q.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};q.Sf=function(){this.i=!0};q.find=function(a){for(var b=this.J.length-1,c=b;0<=c;--c){var d=this.J[c],e=c<b?this.J[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.J.length&&a<this.J[0].startTime?this.h:null};q.get=function(a){if(0==this.J.length)return null;a-=this.h;return 0>a||a>=this.J.length?null:this.J[a]};
305
+ q.offset=function(a){if(!this.i)for(var b=r(this.J),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.pc=function(a){if(!this.i&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.J=this.J.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.J.push.apply(this.J,ia(a))}};q.Hb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.J.length||d.endTime>c.J[0].startTime)});this.pc(a);this.fb(b)};
306
+ q.fb=function(a){if(!this.i){var b=this.J.length;this.J=this.J.filter(function(c){return c.endTime>a});this.h+=b-this.J.length}};
307
+ q.Ya=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.J.length;)if(this.J[this.J.length-1].startTime>=b)this.J.pop();else break;for(;this.J.length;)if(this.J[0].endTime<=a)this.J.shift(),c||this.h++;else break;0!=this.J.length&&(a=this.J[this.J.length-1],this.J[this.J.length-1]=new oi(a.startTime,b,a.s,a.Ea,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.o,a.g,a.status,a.l))}};
308
+ q.bd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.J.push.apply(c.J,ia(d)):(c.g.stop(),c.g=null)}),this.g.Fa(a))};tj.prototype[Symbol.iterator]=function(){return this.Cb(0)};tj.prototype.Cb=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 uj(this,b,d)};
309
+ function vj(a,b,c){return new tj([new oi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",tj);tj.forSingleSegment=vj;tj.prototype.getIteratorForTime=tj.prototype.Cb;tj.prototype.updateEvery=tj.prototype.bd;tj.prototype.fit=tj.prototype.Ya;tj.prototype.evict=tj.prototype.fb;tj.prototype.mergeAndEvict=tj.prototype.Hb;tj.prototype.offset=tj.prototype.offset;tj.prototype.get=tj.prototype.get;tj.prototype.find=tj.prototype.find;tj.prototype.markImmutable=tj.prototype.Sf;
310
+ tj.prototype.release=tj.prototype.release;function uj(a,b,c){this.i=a;this.g=b;this.h=c}uj.prototype.kf=function(){return this.g};uj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.Ba().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};
311
+ uj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.Ba().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",uj);uj.prototype.next=uj.prototype.next;uj.prototype.current=uj.prototype.current;uj.prototype.currentPosition=uj.prototype.kf;function wj(){tj.call(this,[]);this.j=[]}pa(wj,tj);q=wj.prototype;q.clone=function(){var a=new wj;a.j=this.j.slice();return a};
312
+ 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.J.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.J.length}return null};q.offset=function(){};q.pc=function(){};q.fb=function(){};q.Hb=function(){};q.Ya=function(){};q.bd=function(){};
313
+ M("shaka.media.MetaSegmentIndex",wj);wj.prototype.updateEvery=wj.prototype.bd;wj.prototype.fit=wj.prototype.Ya;wj.prototype.mergeAndEvict=wj.prototype.Hb;wj.prototype.evict=wj.prototype.fb;wj.prototype.merge=wj.prototype.pc;wj.prototype.offset=wj.prototype.offset;wj.prototype.get=wj.prototype.get;wj.prototype.find=wj.prototype.find;wj.prototype.release=wj.prototype.release;function xj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Qc();this.h=new O(function(){b.g.Ge(.25*b.i)})}xj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};xj.prototype.set=function(a){this.i=a;yj(this)};xj.prototype.Mc=function(){return this.g.Mc()};function yj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Qc()!=b&&a.g.de(b);return}catch(c){}a.h.Fa(.25);0!=a.g.Qc()&&a.g.de(0)};function zj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Aj(b,!1)})).Fa(.25)}zj.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 Aj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Bj(a){R.call(this);this.g=new Map;this.h=a}pa(Bj,R);Bj.prototype.release=function(){this.g.clear();R.prototype.release.call(this)};function Cj(a,b){var c=a.g.get(b);c||(c={qc:[],se:null,contentType:b},a.g.set(b,c));return c}function Dj(a,b,c){var d=Cj(a,b.contentType);Ej(a,d);a={Jd:b,position:c};d=d.qc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
314
+ Bj.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.qc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Jd;break a}}d=null}if(e=d)e=c.se,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);
315
+ 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.se=d,JSON.stringify(d),c=new Q("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Ej(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.qc;b.qc=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.qc=[]};function Fj(a){R.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(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 Q("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Fa(2)}pa(Fj,R);Fj.prototype.release=function(){this.g.clear();this.h.stop();R.prototype.release.call(this)};function Gj(a){R.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{sb:null,rb:Hj,jb:function(c,d){return Ij(b,"enter",c,d)}},{sb:Jj,rb:Hj,jb:function(c,d){return Ij(b,"enter",c,d)}},{sb:Kj,rb:Hj,jb:function(c,d){return Ij(b,"enter",c,d)}},{sb:Hj,rb:Jj,jb:function(c,d){return Ij(b,"exit",c,d)}},{sb:Hj,rb:Kj,jb:function(c,d){return Ij(b,"exit",c,d)}},{sb:Jj,rb:Kj,jb:function(c,d){return Ij(b,"skip",c,d)}},{sb:Kj,rb:Jj,jb:function(c,d){return Ij(b,"skip",c,d)}}];this.h=new of;this.h.C(this.i,"regionremove",
316
+ function(c){b.g.delete(c.region)})}pa(Gj,R);Gj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;R.prototype.release.call(this)};Gj.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?Jj:a>d.endTime?Kj:Hj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.jb(d,b)}};
317
+ function Ij(a,b,c,d){b=new Q(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Jj=1,Hj=2,Kj=3;function Lj(a,b,c,d,e){a=ef(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Mj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.i=new Map;this.B=!1;this.D=null;this.s=!1;this.h=new mf(function(){return Nj(c)})}q=Mj.prototype;q.destroy=function(){return this.h.destroy()};function Nj(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,Oj(e),b.push(Pj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;A(f)})}
318
+ q.configure=function(a){this.j=a;this.D=new Le({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 u(b,Qj(a),2);nf(a.h);a.B=!0;A(b)})};
319
+ function Rj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=kc,C(k,2),u(k,Ri(a.g.P,c.X),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Xc(b.mimeType,b.codecs);Bi(a.g.P,e,a.m.sequenceMode);f=a.g.P.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=Sj(b),a.i.set(c.X,h),Tj(a,h,0);A(k)}})}function Uj(a){var b=a.i.get(jc);b&&(Oj(b),Pj(b).catch(function(){}),a.i.delete(jc));a.o=null}
320
+ function Vj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.pb&&(Wj(a,b,!1,0,!1),c.pb=d);else if(d=c.pb)c.pb=null,Wj(a,d,!0,0,!1)}}function Xj(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.B&&(b.video&&Wj(a,b.video,c,d,e,f),b.audio&&Wj(a,b.audio,c,d,e,f))}function Yj(a,b){a.o=b;a.B&&Wj(a,b,!0,0,!1)}
321
+ function Wj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=jc?g&&(g.pb&&(b.trickModeVideo?(g.pb=b,b=b.trickModeVideo):g.pb=null),g.stream!=b||e)&&(b.type==jc&&Bi(a.g.P,Xc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.ne=!!f,c&&(g.bc?g.ed=!0:g.sa?(g.bb=!0,g.Ic=d,g.ed=!0):(Oj(g),Zj(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),ak(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Rj(a,b)}
322
+ function ak(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.va)return e.return();c=b.stream;d=b.va;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.va!=d||b.stream!=c)return e.return();var f=a.g.Pc();var g=Gi(a.g.P,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.la?k.la-k.Ea:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.la?k.la-k.Ea:null)||0),k=a.g.getBandwidthEstimate(),
323
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.va.h.g>h?!0:!1):f=!1;f&&b.va.abort();A(e)})}
324
+ q.uc=function(){if(this.g)for(var a=this.g.Pc(),b=r(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.ba=null;var e=this.g.P;d==jc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Fi(e,d),e=ti(e,a));if(!e){(null!=Gi(this.g.P,d)||c.sa)&&bk(this,c);c.va&&(c.va.abort(),c.va=null);if(d===jc)for(d=this.g.P.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ai(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())Wh(e.value);c.uc=!0}}};
325
+ function bk(a,b){b.bc||b.bb||(b.sa?(b.bb=!0,b.Ic=0):null==Ei(a.g.P,b.type)?null==b.La&&Tj(a,b,0):(Oj(b),Zj(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
326
+ function Qj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){if(1==p.g){b=kc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.eb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.ta,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.P;f=a.j.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}nf(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=Sj(l),a.i.set(k,m),Tj(a,m,0));A(p)})}
327
+ function Sj(a){return{stream:a,type:a.type,ba:null,ra:null,Uc:null,Gd:null,Fd:null,Ed:null,pb:null,endOfStream:!1,sa:!1,La:null,bb:!1,Ic:0,ed:!1,bc:!1,uc:!0,Md:!1,Vd:!1,lc:!1,va:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.P.Da(a):this.g.P.Da(Math.pow(2,32))};
328
+ function ck(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.h);if(b.sa||null==b.La||b.bc)return h.return();b.La=null;if(!b.bb){h.A(2);break}return u(h,Zj(a,b,b.ed,b.Ic),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.sa||b.La||Tj(a,b,0),h.return();case 4:C(h,6);d=dk(a,b);null!=d&&(Tj(a,b,d),b.lc=!1);va(h,7);break;case 6:return e=
329
+ F(h),u(h,ek(a,e),8);case 8:return h.return();case 7:f=Array.from(a.i.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.P.endOfStream(),10);case 10:nf(a.h),g=a.g.P.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Da(g),A(h)}})}
330
+ function dk(a,b){if(fk(b))return Pi(a.g.P,b.stream.originalId||""),null;b.type==jc&&Qi(a.g.P);var c=a.g.Pc(),d=b.ra?b.ra.endTime:c,e=Hi(a.g.P,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Gi(a.g.P,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(jc))&&fk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=gk(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
331
+ f=Infinity;g=Array.from(a.i.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,fk(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.ra?h.ra.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;hk(a,b,c,e).catch(function(){});return null}
332
+ function gk(a,b,c,d){if(b.ba)return b.ba.current();if(b.ra||d)return c=b.ra?b.ra.endTime:d,b.Md=!0,b.ba=b.stream.segmentIndex.Cb(c),b.ba&&b.ba.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.Cb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.Cb(c),e=b.ba&&b.ba.next().value);return e}
333
+ function hk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,y,x,v,w,D;return K(function(z){switch(z.g){case 1:e=kc;f=b.stream;g=b.ba;b.sa=!0;C(z,2);if(2==d.Eb())throw new N(1,1,1011);return u(z,ik(a,b,d),4);case 4:nf(a.h);if(a.s)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(B){var G,E,H;return K(function(I){if(n)return I.return();t=!0;nf(a.h);if(a.s)return I.return();p=jk(p,B);G=!1;E=0;(new Bf).box("mdat",
334
+ function(J){E=J.size+J.start;G=!0}).parse(p,!1,!0);if(!G)return I.A(0);H=p.subarray(0,E);p=p.subarray(E);return u(I,kk(a,b,c,f,d,H),0)})},u(z,lk(a,b,d,y),11);l=lk(a,b,d);return u(z,l,7);case 7:m=z.h;nf(a.h);if(a.s)return z.return();if(!d.l){z.A(8);break}return u(z,mk(m,d,g),9);case 9:m=z.h;case 8:return nf(a.h),b.bb?(b.sa=!1,Tj(a,b,0),z.return()):u(z,kk(a,b,c,f,d,m),6);case 11:x=z.h;if(t){z.A(6);break}n=!0;nf(a.h);return a.s?z.return():b.bb?(b.sa=!1,Tj(a,b,0),z.return()):u(z,kk(a,b,c,f,d,x),6);case 6:nf(a.h);
335
+ if(a.s)return z.return();b.ra=d;g.next();b.sa=!1;b.Vd=!1;v=a.g.P.Oa();w=v[b.type];$a(JSON.stringify(w));b.bb||a.g.Rd();Tj(a,b,0);va(z,0);break;case 2:D=F(z);nf(a.h,D);if(a.s)return z.return();b.sa=!1;if(7001==D.code)b.sa=!1,Oj(b),Tj(a,b,0),z.A(0);else if(b.type==e.X&&a.j.ignoreTextStreamFailures)a.i.delete(e.X),z.A(0);else if(3017==D.code)nk(a,b,D),z.A(0);else return b.lc=!0,D.severity=2,u(z,ek(a,D),0)}})}
336
+ function mk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fb(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 jk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
337
+ function nk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Vd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.lc=!0;a.s=!0;a.g.onError(c);return}b.Vd=!0}Tj(a,b,4)}
338
+ function ik(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.Gd||e!=b.Fd||f!=b.Ed)h=function(){var n;return K(function(t){if(1==t.g)return C(t,2),b.Fd=e,b.Ed=f,b.Gd=g,u(t,Si(a.g.P,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return va(t,0);n=F(t);b.Fd=null;b.Ed=null;b.Gd=null;throw n;})},d.push(h());!ni(c.i,b.Uc)&&(b.Uc=c.i)&&(k=lk(a,b,c.i),l=function(){var n,t,y;return K(function(x){switch(x.g){case 1:return C(x,
339
+ 2),u(x,k,4);case 4:return n=x.h,nf(a.h),t=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(x,a.g.pe(b.type,n),5);case 5:return u(x,Ii(a.g.P,b.type,n,null,t),6);case 6:va(x,0);break;case 2:throw y=F(x),b.Uc=null,y;}})},a.g.Vf(c.startTime,c.i),d.push(l()));a.m.sequenceMode&&(m=b.ra?b.ra.m:null,c.m!=m||b.Md)&&(b.Md=!1,d.push(Ti(a.g.P,b.type,c.startTime)));return u(p,Promise.all(d),0)})}
340
+ function kk(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 Bf).U("emsg",function(m){var p=d.emsgSchemeIdUris;if(0===m.version){var n=m.reader.rc();var t=m.reader.rc();var y=m.reader.N();var x=m.reader.N();var v=m.reader.N();var w=m.reader.N();var D=e.startTime+x/y}else y=m.reader.N(),D=m.reader.Lb()/y+e.timestampOffset,x=D-e.startTime,v=m.reader.N(),
341
+ w=m.reader.N(),n=m.reader.rc(),t=m.reader.rc();m=m.reader.$a(m.reader.S.byteLength-m.reader.$());if(p&&p.includes(n)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==n?a.g.Wf():(p=(new Map).set("detail",{startTime:D,endTime:D+v/y,schemeIdUri:n,value:t,timescale:y,presentationTimeDelta:x,eventDuration:v,id:w,messageData:m}),p=new Q("emsg",p),a.g.onEvent(p))}).parse(f),u(l,ok(a,b,c),2);case 2:return nf(a.h),h=b.uc,b.uc=!1,k=b.ne,b.ne=!1,u(l,a.g.pe(b.type,f),3);case 3:return u(l,Ii(a.g.P,b.type,
342
+ f,e,g,h,k),4);case 4:nf(a.h),A(l)}})}function ok(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=Ei(a.g.P,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.P.remove(b.type,e,e+g),2)}nf(a.h);A(h)})}function fk(a){return a&&a.type==jc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
343
+ function lk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Lj(c.Ba(),c.Ea,c.la,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof mi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.lb.request(e,f),b.va=h,u(l,h.promise,2);k=l.h;b.va=null;return l.return(k.data)})}
344
+ function Zj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.bb=!1,b.ed=!1,b.Ic=0,b.bc=!0,b.ra=null,b.Uc=null,b.ba=null,d?(e=a.g.Pc(),f=a.g.P.getDuration(),u(g,a.g.P.remove(b.type,e+d,f),3)):u(g,Ri(a.g.P,b.type),4);if(3!=g.g)return nf(a.h),c?u(g,a.g.P.flush(b.type),3):g.A(3);nf(a.h);b.bc=!1;b.endOfStream=!1;b.sa||b.La||Tj(a,b,0);A(g)})}
345
+ function Tj(a,b,c){var d=b.type;if(d!=jc||a.i.has(d))b.La=(new nc(function(){var e;return K(function(f){if(1==f.g)return C(f,2),u(f,ck(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).R(c)}function Oj(a){null!=a.La&&(a.La.stop(),a.La=null)}function Pj(a){return K(function(b){return a.va?u(b,a.va.abort(),0):b.A(0)})}function ek(a,b){return K(function(c){if(1==c.g)return u(c,Ne(a.D),2);nf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);A(c)})};function pk(a,b){var c=qk(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return rk(d)});this.s=new mf(function(){return sk(d)})}pk.prototype.destroy=function(){return this.s.destroy()};function sk(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),tk(a),u(e,a.u,2);a.g&&a.g.Ja.nb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ja.nb();a.g=null;a.m=[];a.j=null;A(e)})}
346
+ function uk(a,b){var c={Jb:function(){},Wc:function(){},nb:function(){},onError:function(){},Yc:function(){},hh:function(){}};a.m.push({create:b,Ja:c});a.h&&a.h.abort();tk(a);return c}
347
+ function rk(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.ib)var c=!1;else{a.g&&(a.g.Ja.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ja.Jb(),a.g={node:d.node,payload:d.payload,ib:d.ib,Ja:c.Ja}):c.Ja.Yc();c=!0}c?c=Promise.resolve():a.g?c=vk(a):(a.j.Uf(a.i),a.o=new lc,c=a.o);b=u(b,c,1)}return b})}
348
+ function vk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Cf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.mf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ja.Wc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ja.nb();else a.g.Ja.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function tk(a){a.o&&(a.o.resolve(),a.o=null)};function wk(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=wk.prototype;q.remove=function(a,b){if(!this.g)return!1;xk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
348
349
  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(""):
349
- 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={sb:f.sb},g=d.next())f.sb=g.value,a.some(function(h){return function(k){return k.startTime==h.sb.startTime&&k.endTime==h.sb.endTime&&k.text==h.sb.payload?!0:!1}}(f))||(g=wk(f.sb))&&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)-
350
- 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&&(vk(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"};
351
- function wk(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}
352
- function vk(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",uk);uk.prototype.setTextVisibility=uk.prototype.setTextVisibility;uk.prototype.isTextVisible=uk.prototype.isTextVisible;uk.prototype.destroy=uk.prototype.destroy;uk.prototype.append=uk.prototype.append;uk.prototype.remove=uk.prototype.remove;function xk(){}function yk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",xk);xk.removeAllChildren=yk;function zk(a,b){var c=this;this.j=!1;this.i=[];this.B=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.u=(new O(function(){Ak(c)})).Ca(.25);this.h=new Map;this.s=new of;this.s.C(document,"fullscreenchange",function(){Ak(c,!0)});this.l=null;"ResizeObserver"in
353
- window&&(this.l=new ResizeObserver(function(){Ak(c,!0)}),this.l.observe(this.g));this.o=new Map}q=zk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={zc:c.zc},d=a.next())c.zc=d.value,b.some(function(e){return function(f){return sb(f,e.zc)}}(c))||this.i.push(c.zc);Ak(this)};
354
- q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};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});Ak(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
355
- function Bk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
356
- function Ck(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.Ue:null;l&&(g.push(l.xd),l.rc&&g.push(l.rc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Bk(a,p)||(f=!0):(Dk(a,k,e),l=a.h.get(k),p=l.Ue,f=!0));0<k.nestedCues.length&&p&&Ck(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!=
357
- 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.rc?(c.appendChild(d.rc),d.rc.appendChild(d.xd)):c.appendChild(d.xd)}}function Ak(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.o.values());for(var d=b.next();!d.done;d=b.next())yk(d.value);yk(a.g);a.h.clear();a.o.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));Ck(a,a.i,a.g,c,[])}}}
358
- function Dk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Ek(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.o.has(c.id))c=a.o.get(c.id);else{e=document.createElement("span");var g=c.heightUnits==Ab?"%":"px",h=c.widthUnits==Ab?"%":"px",k=c.viewportAnchorUnits==Ab?"%":"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=
359
- "absolute";e.style.top=c.viewportAnchorY+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.o.set(c.id,e);c=e}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{xd:f,Ue:e,rc:c})}
360
- function Ek(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=Fk(c.linePadding,c,a.m);f.paddingRight=Fk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
361
- "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Gk(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=
362
- "before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Fk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mb?(f.width="100%",c.lineAlign==ob?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==
350
+ 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={ub:f.ub},g=d.next())f.ub=g.value,a.some(function(h){return function(k){return k.startTime==h.ub.startTime&&k.endTime==h.ub.endTime&&k.text==h.ub.payload?!0:!1}}(f))||(g=yk(f.ub))&&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)-
351
+ 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&&(xk(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"};
352
+ function yk(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}
353
+ function xk(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",wk);wk.prototype.setTextVisibility=wk.prototype.setTextVisibility;wk.prototype.isTextVisible=wk.prototype.isTextVisible;wk.prototype.destroy=wk.prototype.destroy;wk.prototype.append=wk.prototype.append;wk.prototype.remove=wk.prototype.remove;function zk(){}function Ak(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",zk);zk.removeAllChildren=Ak;function Bk(a,b){var c=this;this.j=!1;this.i=[];this.B=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.u=(new O(function(){Ck(c)})).Fa(.25);this.h=new Map;this.s=new of;this.s.C(document,"fullscreenchange",function(){Ck(c,!0)});this.l=null;"ResizeObserver"in
354
+ window&&(this.l=new ResizeObserver(function(){Ck(c,!0)}),this.l.observe(this.g));this.o=new Map}q=Bk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Ac:c.Ac},d=a.next())c.Ac=d.value,b.some(function(e){return function(f){return sb(f,e.Ac)}}(c))||this.i.push(c.Ac);Ck(this)};
355
+ q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};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});Ck(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
356
+ function Dk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
357
+ function Ek(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.We:null;l&&(g.push(l.xd),l.sc&&g.push(l.sc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Dk(a,p)||(f=!0):(Fk(a,k,e),l=a.h.get(k),p=l.We,f=!0));0<k.nestedCues.length&&p&&Ek(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!=
358
+ 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.sc?(c.appendChild(d.sc),d.sc.appendChild(d.xd)):c.appendChild(d.xd)}}function Ck(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.o.values());for(var d=b.next();!d.done;d=b.next())Ak(d.value);Ak(a.g);a.h.clear();a.o.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));Ek(a,a.i,a.g,c,[])}}}
359
+ function Fk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Gk(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==Ab?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Ab?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.heightUnits==Ab?"%":"px",k=c.widthUnits==Ab?"%":"px",l=c.viewportAnchorUnits==Ab?"%":
360
+ "px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");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.o.set(e,g);c=g}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=
361
+ b.backgroundColor,f.appendChild(e));a.h.set(b,{xd:f,We:e,sc:c})}
362
+ function Gk(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=Hk(c.linePadding,c,a.m);f.paddingRight=Hk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
363
+ "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Ik(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=
364
+ "before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Hk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mb?(f.width="100%",c.lineAlign==ob?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==
363
365
  ob?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==ob?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==mb?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&&
364
- f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==mb?f.width=c.size+"%":f.height=c.size+"%")}function Fk(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}}
365
- function Gk(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",zk);zk.prototype.setTextVisibility=zk.prototype.setTextVisibility;zk.prototype.isTextVisible=zk.prototype.isTextVisible;zk.prototype.remove=zk.prototype.remove;zk.prototype.destroy=zk.prototype.destroy;zk.prototype.append=zk.prototype.append;function Hk(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+">"},
366
- "");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 lb:h.push("align:middle");
367
- 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 Ik(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Jk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.V()?Kk:Lk};d.ot=Mk(c);var e=d.ot===Nk||d.ot===Ok||d.ot===Pk||d.ot===Qk;e&&(d.bl=Rk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Qk&&(d.tb=Sk(a,d.ot)/1E3);Tk(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
368
- function Uk(a,b,c){try{if(!a.g.enabled)return b;var d=Vk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Pk;break a;case "application/x-mpegurl":e=Wk;break a}e=void 0}d.ot=e;d.su=!0;var f=Xk(d);return Yk(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Vk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
369
- function Tk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Vk(a));c.pr=a.h.Oc();var e=c.ot===Nk||c.ot===Pk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Zk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Xk(c);f&&(b.uris=b.uris.map(function(g){return Yk(g,f)}))}}}
370
- function Mk(a){var b=a.type;if(a.init)return $k;if("video"==b)return a.codecs.includes(",")?Pk:Nk;if("audio"==b)return Ok;if("text"==b)return"application/mp4"===a.mimeType?Qk:al}function Rk(a,b){b=a.h.Ma()[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}
371
- function Sk(a,b){var c=a.h.Ya();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 Nk:return a.videoBandwidth||NaN;case Ok:return a.audioBandwidth||NaN;default:return a.bandwidth}}
372
- function Xk(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"===
373
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Zk(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=Xk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
374
- function Yk(a,b){if(!b||a.includes("offline:"))return a;a=new Nb(a);a.g.set("CMCD",b);return a.toString()}var Wk="m",Ok="a",Nk="v",Pk="av",$k="i",al="c",Qk="tt",Lk="v",Kk="l";M("shaka.util.CmcdManager.StreamingFormat",{yg:"d",Gg:"h",Qg:"s",Mg:"o"});function bl(){}
375
- function cl(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]=Xe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Xe(l)),k=cl(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?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
376
- k),g=!1)}return g}function dl(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 el(a,b){return a&&b}M("shaka.util.ConfigUtils",bl);bl.convertToConfigObject=dl;bl.mergeConfigObjects=cl;function fl(){}function gl(a){a=Hc(a);return(new Nb(a)).Fa}function hl(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=Hc(a);a=Jc(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",fl);
377
- fl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(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=Gb(Nc(c)))}};fl.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};fl.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
378
- fl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Fb(b.body),a=Mc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ic("spc="+a))};fl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(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 hl(a,d,b)};
379
- fl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split(";").pop();return hl(a,c,b)};fl.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split("skd://").pop();return hl(a,c,b)};fl.initDataTransform=hl;fl.defaultGetContentId=gl;
380
- fl.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"'}]},C(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);F(b);return b.return(!1)})};function il(){}
381
- function jl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Me(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=gl(g),g=hl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:rc()},c={retryParameters:Me(),availabilityWindowOverride:NaN,disableAudio:!1,
366
+ f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==mb?f.width=c.size+"%":f.height=c.size+"%")}function Hk(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}}
367
+ function Ik(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",Bk);Bk.prototype.setTextVisibility=Bk.prototype.setTextVisibility;Bk.prototype.isTextVisible=Bk.prototype.isTextVisible;Bk.prototype.remove=Bk.prototype.remove;Bk.prototype.destroy=Bk.prototype.destroy;Bk.prototype.append=Bk.prototype.append;function Jk(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=
368
+ [],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");
369
+ break;case "right":k.push("align:right");break;case lb: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 Kk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Lk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.V()?Mk:Nk};d.ot=Ok(c);var e=d.ot===Pk||d.ot===Qk||d.ot===Rk||d.ot===Sk;e&&(d.bl=Tk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Sk&&(d.tb=Uk(a,d.ot)/1E3);Vk(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
370
+ function Wk(a,b,c){try{if(!a.g.enabled)return b;var d=Xk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Rk;break a;case "application/x-mpegurl":e=Yk;break a}e=void 0}d.ot=e;d.su=!0;var f=Zk(d);return $k(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Xk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
371
+ function Vk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Xk(a));c.pr=a.h.Oc();var e=c.ot===Pk||c.ot===Rk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=al(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Zk(c);f&&(b.uris=b.uris.map(function(g){return $k(g,f)}))}}}
372
+ function Ok(a){var b=a.type;if(a.init)return bl;if("video"==b)return a.codecs.includes(",")?Rk:Pk;if("audio"==b)return Qk;if("text"==b)return"application/mp4"===a.mimeType?Sk:cl}function Tk(a,b){b=a.h.Oa()[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}
373
+ function Uk(a,b){var c=a.h.Za();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 Pk:return a.videoBandwidth||NaN;case Qk:return a.audioBandwidth||NaN;default:return a.bandwidth}}
374
+ function Zk(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"===
375
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function al(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=Zk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
376
+ function $k(a,b){if(!b||a.includes("offline:"))return a;a=new Nb(a);a.g.set("CMCD",b);return a.toString()}var Yk="m",Qk="a",Pk="v",Rk="av",bl="i",cl="c",Sk="tt",Nk="v",Mk="l";M("shaka.util.CmcdManager.StreamingFormat",{Ag:"d",Ig:"h",Sg:"s",Og:"o"});function dl(){}
377
+ function el(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]=Xe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Xe(l)),k=el(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?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
378
+ k),g=!1)}return g}function fl(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 gl(a,b){return a&&b}M("shaka.util.ConfigUtils",dl);dl.convertToConfigObject=fl;dl.mergeConfigObjects=el;function hl(){}function il(a){a=Ec(a);return(new Nb(a)).Ia}function jl(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=Ec(a);a=Jc(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",hl);
379
+ hl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(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=Gb(Nc(c)))}};hl.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};hl.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
380
+ hl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=Fb(b.body),a=Mc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Ic("spc="+a))};hl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(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 jl(a,d,b)};
381
+ hl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split(";").pop();return jl(a,c,b)};hl.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop();return jl(a,c,b)};hl.initDataTransform=jl;hl.defaultGetContentId=il;
382
+ hl.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"'}]},C(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);F(b);return b.return(!1)})};function kl(){}
383
+ function ll(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Me(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=il(g),g=jl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:rc()},c={retryParameters:Me(),availabilityWindowOverride:NaN,disableAudio:!1,
382
384
  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",
383
- "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 el([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"'}},
384
- d={retryParameters:Me(),failureCallback:function(g){return el([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,
385
- maxDisabledTime:30};if(sc("Web0S")||tc()||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?u(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 el([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,
385
+ "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 gl([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"'}},
386
+ d={retryParameters:Me(),failureCallback:function(g){return gl([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,
387
+ maxDisabledTime:30};if(sc("Web0S")||tc()||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?u(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 gl([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,
386
388
  streaming:d,offline:e,abrFactory:function(){return new pe},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},
387
389
  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,
388
- sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h.return(kl(g,f.preferredAudioLanguage))})};return f}function ll(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 cl(a,b,c||jl(),d,"")}
389
- function kl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=wd(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return md(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/
390
- 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!=jc&&"image"!=d.type||b.push(d);return b}M("shaka.util.PlayerConfiguration",il);il.mergeConfigObjects=ll;il.createDefault=jl;function ml(){this.g=null;this.h=[]}function nl(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 ol(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}
391
- function pl(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 ql(){this.i=this.h=null;this.g=[]}function rl(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function sl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.I=this.L=this.M=this.l=this.o=NaN;this.g=new ml;this.h=new ql};function U(a,b){R.call(this);var c=this;this.l=tl;this.Jc=this.g=null;this.ia=!1;this.Rc=new of;this.Xb=new of;this.s=new of;this.Cd=this.u=this.Wb=this.i=this.Sc=this.I=this.j=this.ja=this.T=this.Tc=this.M=this.Kc=this.G=this.wb=this.B=this.L=this.m=this.F=null;this.Ie=1E9;this.h=ul(this);this.ac={width:Infinity,height:Infinity};this.o=null;this.Ka=new De(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.ub=this.h.preferredTextLanguage;this.$b=this.h.preferredTextRole;
392
- this.Yb=this.h.preferForcedSubs;this.Nb=[];this.dc=null;b&&b(this);this.F=vl(this);this.F.ae(this.h.streaming.forceHTTPS);this.D=null;wl&&(this.D=wl());this.Rc.C(window,"online",function(){c.Vd()});this.O={name:"detach"};this.Y={name:"attach"};this.ea={name:"unload"};this.Od={name:"manifest-parser"};this.Ld={name:"manifest"};this.vb={name:"media-source"};this.Dd={name:"drm-engine"};this.ca={name:"load"};this.Rd={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};var d=new Map;d.set(this.Y,
393
- function(e,f){return Se(xl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Xb.nb(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Se(e)});d.set(this.ea,function(e){return Se(yl(c,e))});d.set(this.vb,function(e){e=zl(c,e);return Se(e)});d.set(this.Od,function(e,f){e=Al(c,e,f);return Se(e)});d.set(this.Ld,function(e){return Bl(c,e)});d.set(this.Dd,function(e){e=Cl(c,e);return Se(e)});d.set(this.ca,function(e,f){return Se(Dl(c,e,f))});d.set(this.Rd,function(e,f){e=El(c,e,f);return Se(e)});
394
- d.set(this.xb,function(e,f){return Fl(c,e,f)});this.va=new nk(this.O,{Af:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Y);e==c.Y&&(k=g==c.O||f.K!=h.K?c.O:g==c.Y?c.Y:g==c.vb||g==c.ca?c.vb:g==c.xb?c.Rd:null);e==c.vb&&(k=g==c.ca&&f.K==h.K?c.Od:c.ea);e==c.Od&&(k=Gl(c.ca,c.Ld,c.ea,g,f,h));e==c.Ld&&(k=Gl(c.ca,c.Dd,c.ea,g,f,h));e==c.Dd&&(k=Gl(c.ca,c.ca,c.ea,g,f,h));e==c.Rd&&(k=g==c.xb&&f.K==h.K?c.xb:c.ea);if(e==c.ca||e==c.xb)k=c.ea;e==c.ea&&(k=h.K&&f.K==h.K?c.Y:c.O);return k},kf:function(e,f,g){c.dispatchEvent(Hl("onstatechange",
395
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,yl(c,e),2):f.return(e.K?c.Y:c.O)})},Sf:function(e){c.dispatchEvent(Hl("onstateidle",(new Map).set("state",e.name)))}});this.He=new O(function(){Nd(c.i.variants,c.h.restrictions,c.ac)&&Il(c)});a&&this.Zb(a,!0)}pa(U,R);function Hl(a,b){return new Q(a,b)}q=U.prototype;
396
- q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Jl)return c.return();a.l=Jl;b=sk(a.va,function(){return{node:a.O,payload:ok(),hb:!1}});return u(c,new Promise(function(d){b.Ib=function(){};b.Wc=function(){d()};b.mb=function(){d()};b.onError=function(){d()};b.Yc=function(){d()}}),2);case 2:return u(c,a.va.destroy(),3);case 3:a.Rc&&(a.Rc.release(),a.Rc=null);a.Xb&&(a.Xb.release(),a.Xb=null);a.s&&(a.s.release(),a.s=null);a.Cd=null;a.u=null;a.h=null;a.o=null;a.Jc=null;
397
- a.T=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:R.prototype.release.call(a),A(c)}})};q.Zb=function(a,b){b=void 0===b?!0:b;if(this.l==Jl)return Promise.reject(Kl());var c=ok();c.K=a;oc()||(b=!1);var d=b?this.vb:this.Y;a=sk(this.va,function(){return{node:d,payload:c,hb:!1}});a.Ib=function(){};return Ll(a)};q.detach=function(){var a=this;if(this.l==Jl)return Promise.reject(Kl());var b=sk(this.va,function(){return{node:a.O,payload:ok(),hb:!1}});b.Ib=function(){};return Ll(b)};
398
- q.he=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Jl)return Promise.reject(Kl());oc()||(a=!1);var c=ok(),d=sk(this.va,function(e){var f=e.K&&a?b.vb:e.K?b.Y:b.O;c.K=e.K;return{node:f,payload:c,hb:!1}});d.Ib=function(){};return Ll(d)};q.sg=function(a){this.dc=a};
399
- q.load=function(a,b,c){var d=this;this.dc=null;if(this.l==Jl)return Promise.reject(Kl());this.dispatchEvent(Hl("loading"));var e=ok();e.uri=a;e.ee=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ml(this,e)?this.xb:this.ca,g=sk(this.va,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,hb:!0}});this.o=new sl;this.T=Nl(this);g.Ib=function(){};return new Promise(function(h,k){g.Yc=function(){return k(new N(2,7,7002))};g.Wc=function(){h();d.dispatchEvent(Hl("loaded"))};
400
- g.mb=function(){return k(Kl())};g.onError=function(l){return k(l)}})};function Ml(a,b){if(!oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Xg(d),c=Ol[c]);if(c){if(""==(b.K||qc()).canPlayType(c))return!1;if(!oc()||!(c in Wg||Xg(d)in Yg)||a.h.streaming.preferNativeHls)return!0;if(vc())return a.h.streaming.useNativeHlsOnSafari}return!1}function xl(a,b,c){null==b.K&&(b.K=c.K,a.Xb.C(b.K,"error",function(){var d=Pl(a);d&&Ql(a,d)}));a.g=b.K;return Promise.resolve()}
401
- function yl(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return a.l!=Jl&&(a.l=tl),c=a.Nb.map(function(n){return n()}),a.Nb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(Hl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.s.nb();a.He.stop();a.wb&&(a.wb.release(),a.wb=null);a.Kc&&(a.Kc.stop(),a.Kc=null);if(!a.I){p.A(3);break}return u(p,a.I.stop(),4);case 4:a.I=null,a.Sc=null;case 3:if(!a.u){p.A(5);break}return u(p,a.u.stop(),5);case 5:if(!a.j){p.A(7);break}return u(p,
402
- a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.B&&(a.B.release(),a.B=null);if(!a.L){p.A(9);break}return u(p,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.K||!b.K.src){p.A(11);break}return u(p,new Promise(function(n){return(new O(n)).P(.1)}),12);case 12:for(b.K.removeAttribute("src"),b.K.load();b.K.lastChild;)b.K.removeChild(b.K.firstChild);case 11:if(!a.m){p.A(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.Wb=null;a.M=null;if(a.i){d=
403
- 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.o=new sl;a.Id=null;Rl(a);A(p)}})}
404
- function zl(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new ki,d=a.h.textDisplayFactory,e=d(),a.Id=d,f=Sl(b.K,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())Tl(a,t,x,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(n,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;A(k)})}
405
- function Al(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.F,a.Wb=d,f=a,u(h,Vg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Sc=h.h;a.I=a.Sc();g=Xe(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);A(h)})}
406
- function Bl(a,b){var c=b.uri;b=a.F;a.Tc=new Dj(function(){return a.sc()});a.Tc.addEventListener("regionadd",function(f){f=f.region;Ul(a,"timelineregionadded",f);if(a.D)a.D.onDashTimedMetadata(f)});a.ja=null;a.h.streaming.observeQualityChanges&&(a.ja=new zj(function(){return a.Ma()}),a.ja.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,
407
- height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Hl("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.T;try{h.g.enabled&&(h.o=g.format,Tk(h,f,{ot:Wk,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){Jk(a.T,f,g)},filter:function(f){return Vl(a,f)},makeTextStreamsForClosedCaptions:function(f){return Wl(a,
408
- f)},onTimelineRegionAdded:function(f){var g=a.Tc;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 Q("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return Ql(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
409
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},e=Date.now()/1E3;return new Oe(function(){var f,g,h,k;return K(function(l){if(1==l.g)return f=a,u(l,a.I.start(c,d),2);f.i=l.h;g=Hl("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new N(2,4,4036);Xl(a.i);h=Date.now()/1E3;k=h-e;a.o.F=k;A(l)})}(),function(){return a.I.stop()})}
410
- function Cl(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Yl(a,{kb:a.F,onError:function(f){Ql(a,f)},Xc:function(f){Zl(a,f)},onExpirationUpdated:function(f,g){$l(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,pg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Zb(b.K),3):u(e,Vl(a,a.i),0)})}
411
- function Dl(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.dc&&(b.startTime=a.dc,a.dc=null);d=b.K;e=b.uri;a.Wb=e;a.G=new vj({Qc:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},ce:function(v){d.playbackRate=v},Ee:function(v){d.currentTime+=v}});f=function(){return am(a)};g=function(){return bm(a)};a.s.C(d,"playing",f);a.s.C(d,"pause",f);a.s.C(d,"ended",f);a.s.C(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.Cd==h||
412
- (a.Cd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(ue(),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.Ka=new De(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.ub=a.h.preferredTextLanguage;a.$b=a.h.preferredTextRole;a.Yb=a.h.preferForcedSubs;cm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(v,w,B){a.j&&v!=a.j.l&&dm(a,v,!0,void 0===w?!1:w,void 0===B?0:B)});a.u.setMediaElement(d);a.B=em(a,b.startTime);a.wb=fm(a);
413
- k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);gm(a,k);zd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=hm(a);a.j.configure(a.h.streaming);a.l=im;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":jm(a,v)}});a.dispatchEvent(Hl("streaming"));l=null;if(m=a.Ya().find(function(v){return v.active})){y.A(2);break}l=Il(a);dm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);
414
- break}p=a.B.Ec();return u(y,km(l,p),4);case 4:n=y.h,a.B.wd(n);case 3:lm(a,null,be(l));case 2:return a.B.vd(),t=a.Eb().find(function(v){return v.active}),t||((x=le(a.i.textStreams,a.ub,a.$b,a.Yb)[0]||null)&&rl(a.o.h,x,!0),l&&(x?(l.audio&&mm(a,l.audio,x)&&(a.ia=!0),a.ia&&a.L.m.setTextVisibility(!0),nm(a)):a.ia=!1),x&&(a.h.streaming.alwaysStreamText||a.Bd())&&Wj(a.j,x)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),om(a)),Qd(a.j?a.j.l:null,a.i),pm(a.i),qm(a),rm(a),a.i.variants.some(function(v){return v.primary}),
415
- a.s.oa(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ee}),A(y)}})}
416
- function El(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=kc,e=Date.now()/1E3,f=!0,a.m=Yl(a,{kb:a.F,onError:function(p){Ql(a,p)},Xc:function(p){Zl(a,p)},onExpirationUpdated:function(p,n){$l(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Xg(g),k=Ol[h],"application/x-mpegurl"==k&&vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
417
- 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.ra,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
390
+ sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h.return(ml(g,f.preferredAudioLanguage))})};return f}function nl(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 el(a,b,c||ll(),d,"")}
391
+ function ml(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=wd(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return md(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/
392
+ 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!=jc&&"image"!=d.type||b.push(d);return b}M("shaka.util.PlayerConfiguration",kl);kl.mergeConfigObjects=nl;kl.createDefault=ll;function ol(){this.g=null;this.h=[]}function pl(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 ql(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}
393
+ function rl(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 sl(){this.i=this.h=null;this.g=[]}function tl(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 ul(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.I=this.L=this.M=this.l=this.o=NaN;this.g=new ol;this.h=new sl};function U(a,b){R.call(this);var c=this;this.l=vl;this.Kc=this.g=null;this.ia=!1;this.Sc=new of;this.Ob=new of;this.s=new of;this.Cd=this.u=this.Xb=this.i=this.Tc=this.I=this.j=this.ja=this.T=this.xa=this.M=this.Lc=this.G=this.xb=this.B=this.L=this.m=this.F=null;this.Ke=1E9;this.h=wl(this);this.dc={width:Infinity,height:Infinity};this.o=null;this.Ma=new De(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.vb=this.h.preferredTextLanguage;this.ac=this.h.preferredTextRole;
394
+ this.$b=this.h.preferForcedSubs;this.Yb=[];this.ec=null;b&&b(this);this.F=xl(this);this.F.be(this.h.streaming.forceHTTPS);this.D=null;yl&&(this.D=yl());this.Sc.C(window,"online",function(){c.Wd()});this.O={name:"detach"};this.Y={name:"attach"};this.ea={name:"unload"};this.Pd={name:"manifest-parser"};this.Ld={name:"manifest"};this.wb={name:"media-source"};this.Dd={name:"drm-engine"};this.ca={name:"load"};this.Sd={name:"src-equals-drm-engine"};this.yb={name:"src-equals"};var d=new Map;d.set(this.Y,
395
+ function(e,f){return Se(zl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Ob.ob(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Se(e)});d.set(this.ea,function(e){return Se(Al(c,e))});d.set(this.wb,function(e){e=Bl(c,e);return Se(e)});d.set(this.Pd,function(e,f){e=Cl(c,e,f);return Se(e)});d.set(this.Ld,function(e){return Dl(c,e)});d.set(this.Dd,function(e){e=El(c,e);return Se(e)});d.set(this.ca,function(e,f){return Se(Fl(c,e,f))});d.set(this.Sd,function(e,f){e=Gl(c,e,f);return Se(e)});
396
+ d.set(this.yb,function(e,f){return Hl(c,e,f)});this.ya=new pk(this.O,{Cf:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Y);e==c.Y&&(k=g==c.O||f.K!=h.K?c.O:g==c.Y?c.Y:g==c.wb||g==c.ca?c.wb:g==c.yb?c.Sd:null);e==c.wb&&(k=g==c.ca&&f.K==h.K?c.Pd:c.ea);e==c.Pd&&(k=Il(c.ca,c.Ld,c.ea,g,f,h));e==c.Ld&&(k=Il(c.ca,c.Dd,c.ea,g,f,h));e==c.Dd&&(k=Il(c.ca,c.ca,c.ea,g,f,h));e==c.Sd&&(k=g==c.yb&&f.K==h.K?c.yb:c.ea);if(e==c.ca||e==c.yb)k=c.ea;e==c.ea&&(k=h.K&&f.K==h.K?c.Y:c.O);return k},mf:function(e,f,g){c.dispatchEvent(Jl("onstatechange",
397
+ (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,Al(c,e),2):f.return(e.K?c.Y:c.O)})},Uf:function(e){c.dispatchEvent(Jl("onstateidle",(new Map).set("state",e.name)))}});this.Je=new O(function(){Nd(c.i.variants,c.h.restrictions,c.dc)&&Kl(c)});a&&this.Zb(a,!0)}pa(U,R);function Jl(a,b){return new Q(a,b)}q=U.prototype;
398
+ q.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Ll)return c.return();a.l=Ll;b=uk(a.ya,function(){return{node:a.O,payload:qk(),ib:!1}});return u(c,new Promise(function(d){b.Jb=function(){};b.Wc=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.Yc=function(){d()}}),2);case 2:return u(c,a.ya.destroy(),3);case 3:a.Sc&&(a.Sc.release(),a.Sc=null);a.Ob&&(a.Ob.release(),a.Ob=null);a.s&&(a.s.release(),a.s=null);a.Cd=null;a.u=null;a.h=null;a.o=null;a.Kc=null;
399
+ a.T=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:R.prototype.release.call(a),A(c)}})};q.Zb=function(a,b){b=void 0===b?!0:b;if(this.l==Ll)return Promise.reject(Ml());var c=qk();c.K=a;oc()||(b=!1);var d=b?this.wb:this.Y;a=uk(this.ya,function(){return{node:d,payload:c,ib:!1}});a.Jb=function(){};return Nl(a)};q.detach=function(){var a=this;if(this.l==Ll)return Promise.reject(Ml());var b=uk(this.ya,function(){return{node:a.O,payload:qk(),ib:!1}});b.Jb=function(){};return Nl(b)};
400
+ q.je=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Ll)return Promise.reject(Ml());oc()||(a=!1);var c=qk(),d=uk(this.ya,function(e){var f=e.K&&a?b.wb:e.K?b.Y:b.O;c.K=e.K;return{node:f,payload:c,ib:!1}});d.Jb=function(){};return Nl(d)};q.ug=function(a){this.ec=a};
401
+ q.load=function(a,b,c){var d=this;this.ec=null;if(this.l==Ll)return Promise.reject(Ml());this.dispatchEvent(Jl("loading"));var e=qk();e.uri=a;e.fe=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Ol(this,e)?this.yb:this.ca,g=uk(this.ya,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,ib:!0}});this.o=new ul;this.T=Pl(this);g.Jb=function(){};return new Promise(function(h,k){g.Yc=function(){return k(new N(2,7,7002))};g.Wc=function(){h();d.dispatchEvent(Jl("loaded"))};
402
+ g.nb=function(){return k(Ml())};g.onError=function(l){return k(l)}})};function Ol(a,b){if(!oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Xg(d),c=Ql[c]);if(c){if(""==(b.K||qc()).canPlayType(c))return!1;if(!oc()||!(c in Wg||Xg(d)in Yg)||a.h.streaming.preferNativeHls)return!0;if(vc())return a.h.streaming.useNativeHlsOnSafari}return!1}function zl(a,b,c){null==b.K&&(b.K=c.K,a.Ob.C(b.K,"error",function(){var d=Rl(a);d&&Sl(a,d)}));a.g=b.K;return Promise.resolve()}
403
+ function Al(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return a.l!=Ll&&(a.l=vl),c=a.Yb.map(function(n){return n()}),a.Yb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(Jl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.xa&&(a.xa.release(),a.xa=null);b.K&&a.s.ob();a.Je.stop();a.xb&&(a.xb.release(),a.xb=null);a.Lc&&(a.Lc.stop(),a.Lc=null);if(!a.I){p.A(3);break}return u(p,a.I.stop(),4);case 4:a.I=null,a.Tc=null;case 3:if(!a.u){p.A(5);break}return u(p,a.u.stop(),5);
404
+ case 5:if(!a.j){p.A(7);break}return u(p,a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.B&&(a.B.release(),a.B=null);if(!a.L){p.A(9);break}return u(p,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.K||!b.K.src){p.A(11);break}return u(p,new Promise(function(n){return(new O(n)).R(.1)}),12);case 12:for(b.K.removeAttribute("src"),b.K.load();b.K.lastChild;)b.K.removeChild(b.K.firstChild);case 11:if(!a.m){p.A(13);break}return u(p,a.m.destroy(),14);case 14:a.m=
405
+ null;case 13:a.Xb=null;a.M=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.o=new ul;a.Id=null;Tl(a);A(p)}})}
406
+ function Bl(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new ki,d=a.h.textDisplayFactory,e=d(),a.Id=d,f=Ul(b.K,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())Vl(a,t,y,"ID3",v.value);if(a.D)a.D.onHlsTimedMetadata(n,t)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;A(k)})}
407
+ function Cl(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.F,a.Xb=d,f=a,u(h,Vg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Tc=h.h;a.I=a.Tc();g=Xe(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);A(h)})}
408
+ function Dl(a,b){var c=b.uri;b=a.F;a.xa=new Fj(function(){return a.tc()});a.xa.addEventListener("regionadd",function(f){f=f.region;Wl(a,"timelineregionadded",f);if(a.D)a.D.onDashTimedMetadata(f)});a.ja=null;a.h.streaming.observeQualityChanges&&(a.ja=new Bj(function(){return a.Oa()}),a.ja.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,
409
+ height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Jl("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.T;try{h.g.enabled&&(h.o=g.format,Vk(h,f,{ot:Yk,su:!h.i}))}catch(k){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){Lk(a.T,f,g)},filter:function(f){return Xl(a,f)},makeTextStreamsForClosedCaptions:function(f){return Yl(a,
410
+ f)},onTimelineRegionAdded:function(f){var g=a.xa;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 Q("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return Sl(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
411
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},e=Date.now()/1E3;return new Oe(function(){var f,g,h,k;return K(function(l){if(1==l.g)return f=a,u(l,a.I.start(c,d),2);f.i=l.h;g=Jl("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new N(2,4,4036);Zl(a.i);h=Date.now()/1E3;k=h-e;a.o.F=k;A(l)})}(),function(){return a.I.stop()})}
412
+ function El(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=$l(a,{lb:a.F,onError:function(f){Sl(a,f)},Xc:function(f){am(a,f)},onExpirationUpdated:function(f,g){bm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,pg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Zb(b.K),3):u(e,Xl(a,a.i),0)})}
413
+ function Fl(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.ec&&(b.startTime=a.ec,a.ec=null);d=b.K;e=b.uri;a.Xb=e;a.G=new xj({Qc:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},de:function(v){d.playbackRate=v},Ge:function(v){d.currentTime+=v}});f=function(){return cm(a)};g=function(){return dm(a)};a.s.C(d,"playing",f);a.s.C(d,"pause",f);a.s.C(d,"ended",f);a.s.C(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.Cd==h||
414
+ (a.Cd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(ue(),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.Ma=new De(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.vb=a.h.preferredTextLanguage;a.ac=a.h.preferredTextRole;a.$b=a.h.preferForcedSubs;em(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(v,w,D){a.j&&v!=a.j.l&&fm(a,v,!0,void 0===w?!1:w,void 0===D?0:D)});a.u.setMediaElement(d);a.B=gm(a,b.startTime);a.xb=hm(a);
415
+ k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);im(a,k);zd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=jm(a);a.j.configure(a.h.streaming);a.l=km;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(v){if(v.track)switch(v=v.track,v.kind){case "chapters":lm(a,v)}});a.dispatchEvent(Jl("streaming"));l=null;if(m=a.Za().find(function(v){return v.active})){x.A(2);break}l=Kl(a);fm(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){x.A(3);
416
+ break}p=a.B.Fc();return u(x,mm(l,p),4);case 4:n=x.h,a.B.wd(n);case 3:nm(a,null,be(l));case 2:return a.B.vd(),t=a.Fb().find(function(v){return v.active}),t||((y=le(a.i.textStreams,a.vb,a.ac,a.$b)[0]||null)&&tl(a.o.h,y,!0),l&&(y?(l.audio&&om(a,l.audio,y)&&(a.ia=!0),a.ia&&a.L.m.setTextVisibility(!0),pm(a)):a.ia=!1),y&&(a.h.streaming.alwaysStreamText||a.Bd())&&Yj(a.j,y)),u(x,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),qm(a)),Qd(a.j?a.j.l:null,a.i),rm(a.i),sm(a),tm(a),a.i.variants.some(function(v){return v.primary}),
417
+ a.s.oa(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.fe}),A(x)}})}
418
+ function Gl(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=kc,e=Date.now()/1E3,f=!0,a.m=$l(a,{lb:a.F,onError:function(p){Sl(a,p)},Xc:function(p){am(a,p)},onExpirationUpdated:function(p,n){bm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Xg(g),k=Ql[h],"application/x-mpegurl"==k&&vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
419
+ 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.ta,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
418
420
  a.m.Y=!0,u(m,pg(a.m,[l],[]),2)):u(m,a.m.Zb(b.K),0)})}
419
- function Fl(a,b,c){function d(){return am(a)}b.uri=c.uri;b.startTime=c.startTime;a.Wb=b.uri;var e=b.K;a.B=new kj(e);var f=!1;a.Nb.push(function(){f=!0});null!=b.startTime&&a.B.wd(b.startTime);a.G=new vj({Qc:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},ce:function(k){e.playbackRate=k},Ee:function(k){e.currentTime+=k}});gm(a,a.h.streaming.rebufferingGoal);a.s.C(e,"playing",d);a.s.C(e,"pause",d);a.s.C(e,"ended",d);a.s.C(e,"ratechange",function(){return bm(a)});"none"!=
420
- e.preload&&a.s.oa(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ee});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return qm(a)}),a.s.C(e.audioTracks,"removetrack",function(){return qm(a)}),a.s.C(e.audioTracks,"change",function(){return qm(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":sm(a,k);break;case "chapters":jm(a,k);break;default:qm(a)}}),a.s.C(e.textTracks,"removetrack",function(){return qm(a)}),a.s.C(e.textTracks,
421
- "change",function(){return qm(a)}));var g=Xg(b.uri);e.src=Uk(a.T,b.uri,Ol[g]);(tc()||sc("Web0S"))&&e.load();a.l=tm;a.dispatchEvent(Hl("streaming"));var h=new lc;bj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.vd();h.resolve()});bj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return K(function(l){if(1==l.g)return um(a),k=vm(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.oa(e.textTracks,"change",m);(new O(m)).P(1)}),2);if(f)return l.return();
422
- wm(a);A(l)})});e.error?h.reject(Pl(a)):"none"==e.preload&&(Va('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.s.oa(e,"error",function(){h.reject(Pl(a))});return new Oe(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
423
- function um(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Yd(b);var c=a.h.preferredVariantRole;""!=c&&a.Yd(b,c)}}function wm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Zd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Zd(b,d,c)}}
424
- function sm(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Tl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=xm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Mb().P(.5);a.Nb.push(function(){c.stop()})}}
425
- function Tl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Hl("metadata",b))}function jm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Mb().P(.5);a.Nb.push(function(){c.stop()})}}function Xl(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 Yl(a,b){return new ig(b,a.h.drm.updateExpirationTime)}
426
- function vl(a){return new af(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Hl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Hl("downloadfailed",b))})}
427
- function em(a,b){return new lj(a.g,a.i,a.h.streaming,b,function(){a.wb&&yj(a.wb,!0);a.j&&a.j.tc();a.M&&ym(a)},function(c){return a.dispatchEvent(c)})}
428
- function fm(a){var b=new Ej(a.Tc);b.addEventListener("enter",function(d){Ul(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ul(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ul(a,"timelineregionenter",e),Ul(a,"timelineregionexit",e))});var c=new xj(a.g);c.g.add(b);a.ja&&c.g.add(a.ja);return c}function gm(a,b){a.M=new He;a.M.g=Je;Ke(a.M,b,Math.min(.5,b/2));Rl(a);a.Kc=(new O(function(){ym(a)})).Ca(.25)}
429
- function ym(a){switch(a.l){case tm:if(a.g.ended)var b=!0;else{var c=si(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case im:a:if(a.g.ended||Di(a.L))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.gb();var d=si(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ui(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ie:Je;c.g=d;b!=d&&Rl(a)}function Sl(a,b,c,d){return new xi(a,b,c,d)}
430
- function Nl(a){return new Ik({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ma:function(){return a.Ma()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ya:function(){return a.Ya()},Oc:function(){return a.Oc()},V:function(){return a.V()}},a.h.cmcd)}
431
- function hm(a){return new Kj(a.i,{Pc:function(){return a.B.Ec()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Jk(a.T,b,c)},R:a.L,kb:a.F,onError:function(b){return Ql(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Uf:function(){a.I&&a.I.update&&a.I.update()},Qd:function(){a.B&&a.B.Fe();ym(a)},Tf:function(b,c){(c=c.Jd)&&a.ja&&Bj(a.ja,c,b)},ne:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){c=new Kf(Fb(c));
421
+ function Hl(a,b,c){function d(){return cm(a)}b.uri=c.uri;b.startTime=c.startTime;a.Xb=b.uri;var e=b.K;a.B=new mj(e);var f=!1;a.Yb.push(function(){f=!0});null!=b.startTime&&a.B.wd(b.startTime);a.G=new xj({Qc:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},de:function(k){e.playbackRate=k},Ge:function(k){e.currentTime+=k}});im(a,a.h.streaming.rebufferingGoal);a.s.C(e,"playing",d);a.s.C(e,"pause",d);a.s.C(e,"ended",d);a.s.C(e,"ratechange",function(){return dm(a)});"none"!=
422
+ e.preload&&a.s.oa(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.fe});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return sm(a)}),a.s.C(e.audioTracks,"removetrack",function(){return sm(a)}),a.s.C(e.audioTracks,"change",function(){return sm(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":um(a,k);break;case "chapters":lm(a,k);break;default:sm(a)}}),a.s.C(e.textTracks,"removetrack",function(){return sm(a)}),a.s.C(e.textTracks,
423
+ "change",function(){return sm(a)}));var g=Xg(b.uri);e.src=Wk(a.T,b.uri,Ql[g]);(tc()||sc("Web0S"))&&e.load();a.l=vm;a.dispatchEvent(Jl("streaming"));var h=new lc;dj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.vd();h.resolve()});dj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return K(function(l){if(1==l.g)return wm(a),k=xm(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.oa(e.textTracks,"change",m);(new O(m)).R(1)}),2);if(f)return l.return();
424
+ ym(a);A(l)})});e.error?h.reject(Rl(a)):"none"==e.preload&&(Va('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.s.oa(e,"error",function(){h.reject(Rl(a))});return new Oe(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
425
+ function wm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Zd(b);var c=a.h.preferredVariantRole;""!=c&&a.Zd(b,c)}}function ym(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.$d(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.$d(b,d,c)}}
426
+ function um(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Vl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=zm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Nb().R(.5);a.Yb.push(function(){c.stop()})}}
427
+ function Vl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Jl("metadata",b))}function lm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Nb().R(.5);a.Yb.push(function(){c.stop()})}}function Zl(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 $l(a,b){return new ig(b,a.h.drm.updateExpirationTime)}
428
+ function xl(a){return new af(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Jl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Jl("downloadfailed",b))})}
429
+ function gm(a,b){return new nj(a.g,a.i,a.h.streaming,b,function(){a.xb&&Aj(a.xb,!0);a.j&&a.j.uc();a.M&&Am(a)},function(c){return a.dispatchEvent(c)})}
430
+ function hm(a){var b=new Gj(a.xa);b.addEventListener("enter",function(d){Wl(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Wl(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Wl(a,"timelineregionenter",e),Wl(a,"timelineregionexit",e))});var c=new zj(a.g);c.g.add(b);a.ja&&c.g.add(a.ja);return c}function im(a,b){a.M=new He;a.M.g=Je;Ke(a.M,b,Math.min(.5,b/2));Tl(a);a.Lc=(new O(function(){Am(a)})).Fa(.25)}
431
+ function Am(a){switch(a.l){case vm:if(a.g.ended)var b=!0;else{var c=si(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case km:a:if(a.g.ended||Di(a.L))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.hb();var d=si(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ui(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ie:Je;c.g=d;b!=d&&Tl(a)}function Ul(a,b,c,d){return new xi(a,b,c,d)}
432
+ function Pl(a){return new Kk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Oa:function(){return a.Oa()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Za:function(){return a.Za()},Oc:function(){return a.Oc()},V:function(){return a.V()}},a.h.cmcd)}
433
+ function jm(a){return new Mj(a.i,{Pc:function(){return a.B.Fc()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Lk(a.T,b,c)},P:a.L,lb:a.F,onError:function(b){return Sl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Wf:function(){a.I&&a.I.update&&a.I.update()},Rd:function(){a.B&&a.B.He();Am(a)},Vf:function(b,c){(c=c.Jd)&&a.ja&&Dj(a.ja,c,b)},pe:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){c=new Kf(Fb(c));
432
434
  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;yg(d,"cenc",e);d=d.o}}else d=Promise.resolve();return d}})}
433
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dl(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=ll(this.h,a,ul(this));zm(this);return c};
434
- function zm(a){if(a.I){var b=Xe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Am(a,a.i)}catch(f){Ql(a,f)}a.u&&rm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Bm(a)}a.F&&a.F.ae(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Id!=b)){var c=b(),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
435
- c);a.Id=b;a.j&&(b=a.j,(c=b.i.get(jc))&&Uj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),om(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ke(a.M,b,Math.min(.5,b/2)));a.i&&cm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=ul(this);ll(a,this.h,ul(this));return a};
436
- q.nf=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.sc().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.dg=function(){for(var a in this.h)delete this.h[a];ll(this.h,ul(this),ul(this));zm(this)};q.vf=function(){return this.l};q.zf=function(){return this.g};q.hc=function(){return this.F};q.yd=function(){return this.Wb};
437
- q.we=function(){return this.D?this.D:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};q.jb=function(){return this.i?this.i.presentationTimeline.jb():!1};q.Mf=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};
438
- q.sc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Cb(),end:a.Na()}}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.Kf=function(){this.V()&&(this.g.currentTime=this.sc().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.fc=function(){return this.m?this.m.fc():Infinity};q.Nc=function(){return this.m?this.m.Nc():{}};
439
- q.zd=function(){return this.M?this.M.g==Je:!1};q.Oc=function(){return this.g?this.G?this.G.i:1:0};q.ng=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==im&&(this.u.playbackRateChanged(a),Tj(this.j,1<Math.abs(a))))};q.cf=function(){var a=this.G.Mc();this.l==tm&&this.G.set(a);this.l==im&&(this.G.set(a),this.u.playbackRateChanged(a),Tj(this.j,!1))};
440
- q.Ya=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,je(e)){var f=be(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 ie(g)}):[]};
441
- q.Eb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ce(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?vm(this).map(function(f){return ge(f)}):[]};q.tf=function(){return this.i?this.i.imageStreams.map(function(a){return de(a)}):[]};
442
- q.Gf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,B,z,D;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G.return(null):G.A(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-
443
- f.startTime;v=f.m||y/x;w=f.startTime;z=B=0;1<x&&(D=Math.floor((b-f.startTime)/v),w=f.startTime+D*v,B=D%m*n,z=Math.floor(D/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:B,positionY:z,startTime:w,duration:v,uris:f.ya(),width:n})}return G.return(null)})};
444
- q.Me=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(rl(this.o.h,b,!1),Wj(this.j,b),Cm(this),this.ub=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=vm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ee(c)==a.id?c.mode=this.ia?"showing":"hidden":c.mode="disabled";Cm(this)}};
445
- q.Ne=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&&Va("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&&je(d)&&(dm(this,d,!1,b,c),this.Ka=new Ce(d),rm(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,
446
- ee(c)==a.id){Dm(this,c);break}};q.mf=function(){return Em(this.Ya())};q.Ff=function(){return Em(this.Eb())};q.lf=function(){return Array.from(Fm(this.Ya()))};q.Ef=function(){return Array.from(Fm(this.Eb()))};
447
- q.Yd=function(a,b){if(this.i&&this.B){this.Ka=new De(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.Ka.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=be(d),this.Ne(b,!0)):Bm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=md(a);c=d=null;e=
448
- r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ie(f);md(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Dm(this,c):d&&Dm(this,d)}};
449
- q.Zd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.ub=a,this.$b=b||"",this.Yb=c,(a=le(this.i.textStreams,this.ub,this.$b,this.Yb)[0]||null)&&a!=this.j.o&&(rl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Bd()))Wj(this.j,a),Cm(this)}else{var d=md(a);(a=this.Eb().find(function(e){return md(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Me(a)}};
450
- q.fg=function(a){if(this.i&&this.B){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.Ka=new De(b.language,"",0,a),Bm(this))}};q.Bd=function(){var a=this.ia;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?vm(this).some(function(b){return"showing"==b.mode}):a};q.xe=function(){return this.g&&this.g.src&&this.g.textTracks?Gm(this).map(function(a){return ge(a)}):[]};
451
- q.pf=function(a){var b=md(a),c=Gm(this).filter(function(g){return md(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};
452
- function vm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function xm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Gm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
453
- q.lg=function(a){a=!!a;if(this.ia!=a){this.ia=a;if(this.l==im)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.ub,this.$b,this.Yb),0<a.length&&(Wj(this.j,a[0]),Cm(this))):Sj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=vm(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")}nm(this)}};
454
- q.Cf=function(){if(!this.V())return null;var a=this.va.l,b=0;if(this.B)b=this.B.Ec();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};
455
- q.ye=function(){if(!this.V())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.Ma=function(){if(this.l==im)return this.L.Ma();var a={total:[],audio:[],video:[],text:[]};this.l==tm&&(a.total=vi(this.g.buffered));return a};
456
- q.getStats=function(){if(this.l!=im&&this.l!=tm)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:[]};am(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
457
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.O=this.B.je(),this.o.T=this.B.ke());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.L=d;this.o.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.o.s=c;if(this.l==im){if(c=this.j.l)this.o.B=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.ye().valueOf()+
458
- 1E3*this.sc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==tm&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.B;d=e.L;var f=e.M,g=e.I,h=e.T,k=e.O,l=e.u,m=e.i,p=e.m,n=e.F,t=e.j,x=ol(e.g,"playing"),y=ol(e.g,"paused"),v=ol(e.g,"buffering"),w=e.s,B=e.D,z=e.G,D=pl(e.g),G=[];e=r(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
459
- id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.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:B,maxSegmentDuration:z,stateHistory:D,switchHistory:G}};
460
- q.Ze=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,B;return K(function(z){switch(z.g){case 1:if(h.l!=im&&h.l!=tm)throw new N(1,7,7004);if(d){z.A(2);break}return u(z,Hm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(D){}if(h.l!=tm){z.A(4);break}g&&(c="forced");return u(z,Im(h,a,b,c,d,f||"",k),5);case 5:l=h.Eb();if(m=l.find(function(D){return D.language==b&&D.label==(f||"")&&D.kind==c}))return qm(h),z.return(m);throw new N(1,2,2012);case 4:p=
461
- kc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new N(1,4,4033);if(!k.length){z.A(6);break}return u(z,Jm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:t=z.h,x=Km(h,t,d,k),y=new Blob([x],{type:"text/vtt"}),a=Ai(y),d="text/vtt";case 6:v={id:h.Ie++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:tj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.X,primary:!1,trickModeVideo:null,
462
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Xc(v.mimeType,v.codecs);B=cd(w);if(!B)throw new N(2,2,2014,d);h.i.textStreams.push(v);qm(h);return z.return(ce(v))}})};
463
- q.Ye=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=im&&d.l!=tm)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,Hm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Im(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.xe();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.s.oa(f,"load",l);d.s.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k.return(h);
464
- case 5:throw new N(1,2,2012);}})};function Hm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=Xg(b);if(d=Lm[c])return e.return(d);C(e,2);return u(e,Zg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e.return(d);throw new N(1,2,2011,c);}})}
465
- function Im(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?u(p,Jm(a,b,a.F,a.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(h=p.h,k=Km(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ai(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var x=Vk(n);x.ot=al;x.su=!0;var y=Xk(x);var v=Yk(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")||
466
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Jm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=lf;f=ef([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&Tk(k,f,{ot:al,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
467
- function Km(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=Fb(b),b=c.parseMedia(b,a),Hk(b,d);throw new N(2,2,2014,c);}q.be=function(a,b){this.ac.width=a;this.ac.height=b};q.Vd=function(a){if(this.l==im){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=r(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,d.kc&&(d.kc=!1,Rj(b,d,a));b=!0}}else b=!1;return b};
468
- q.wf=function(){Va("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.xf=function(){return this.Sc};
469
- function ul(a){var b=jl();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Vd(d))}};b.textDisplayFactory=function(){return a.Jc?new zk(a.g,a.Jc):new uk(a.g)};return b}q.Re=function(a){this.Jc=a};
470
- function Wl(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 uj;h={id:a.Ie++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
471
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:jc,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 Vl(a,b){return K(function(c){if(1==c.g)return u(c,Mm(a,b),2);Am(a,b);A(c)})}
472
- function Mm(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Od(c,b),2);pm(b);A(d)})}
473
- function Am(a,b){if(a.l!=Jl){Nd(b.variants,a.h.restrictions,a.ac)&&a.j&&qm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)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,yg(a.m,g.initDataType,g.initData)}}Nm(a,b)}}
474
- function km(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?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.Bb(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(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)})}
475
- function Rl(a){var b=a.zd();if(a.o&&a.M&&a.B){var c=a.G;c.j=b;wj(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);am(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Hl("buffering",b))}function bm(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Hl("ratechange"),a.dispatchEvent(b))}function am(a){if(a.o&&a.M){var b=a.o.g;a.M.g==Je?nl(b,"buffering"):a.g.paused?nl(b,"paused"):a.g.ended?nl(b,"ended"):nl(b,"playing")}}
476
- function rm(a){try{Nm(a,a.i)}catch(c){return Ql(a,c),!1}var b=a.i.variants.filter(function(c){return je(c)});b=a.Ka.create(b);a.u.setVariants(Array.from(b.values()));return!0}function Il(a){return rm(a)?a.u.chooseVariant():null}function Bm(a){var b=Il(a);b&&dm(a,b,!0,!0,0)}
477
- function dm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Vj(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Vj(a.j,b,d,e,void 0,c);d=null;f&&(d=be(f));b=be(b);c?lm(a,d,b):Om(a,d,b)}}function Dm(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=ie(c);b=ie(b);Om(a,c,b)}
478
- function mm(a,b,c){a=md(a.h.preferredTextLanguage);b=md(b.language);c=md(c.language);return ld(c,a)&&!ld(b,c)}function lm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Hl("adaptation",b);Pm(a,b)}function qm(a){var b=Hl("trackschanged");Pm(a,b)}function Om(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Hl("variantchanged",b);Pm(a,b)}function Cm(a){var b=Hl("textchanged");Pm(a,b)}function nm(a){var b=Hl("texttrackvisibility");Pm(a,b)}
479
- function om(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Pm(a,Hl("abrstatuschanged",b))}
480
- function Qm(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.Ya().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);Nd(d.variants,a.h.restrictions,a.ac);b=Il(a);if(!b)return!1;d=a.Ma().video.reduce(function(g,h){return g+h.end-h.start},0);dm(a,b,!1,!0,d);a.He.P(c);return!0}
481
- function Ql(a,b){if(a.l!=Jl)if(Qm(a,b))b.handled=!0;else{var c=Hl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Ul(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(Hl(b,c))}
482
- function Pl(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 N(2,3,3016,b,c,a.g.error.message)}
483
- function Zl(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&&!Rm.includes(l)}h!=f.allowedByKeySystem&&
484
- (e=!0)}}}if(!e||rm(a))(b=a.j.l)&&!b.allowedByKeySystem&&Bm(a),e&&qm(a)}}function $l(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Hl("expirationupdated");a.dispatchEvent(b)}function cm(a,b,c){0<b&&(a.V()||a.Qe(b));b=a.getDuration();c<b&&(a.V()||a.Ia(c))}
485
- function Nm(a,b){a=a.m?a.m.Nc():{};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?Rm.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
486
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new N(2,4,4012,a);}function pm(a){if(!a.variants.some(je))throw new N(2,4,4032);}function Pm(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Jl&&a.dispatchEvent(b);A(c)})}function Fm(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(md(c.language)):b.add("und");return b}
487
- function Em(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=md(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));
488
- h.push({language:l,role:m,label:p})}});return h}function Kl(){return new N(2,7,7E3)}function Gl(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function ok(){return{K:null,mimeType:null,startTime:null,ee:NaN,uri:null}}function Ll(a){return new Promise(function(b,c){a.mb=function(){return c(Kl())};a.Wc=function(){return b()};a.onError=function(d){return c(d)};a.Yc=function(){return c(Kl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Re;
489
- U.prototype.getManifestParserFactory=U.prototype.xf;U.prototype.getManifest=U.prototype.wf;U.prototype.retryStreaming=U.prototype.Vd;U.prototype.setMaxHardwareResolution=U.prototype.be;U.prototype.addChaptersTrack=U.prototype.Ye;U.prototype.addTextTrackAsync=U.prototype.Ze;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ma;U.prototype.getPresentationStartTimeAsDate=U.prototype.ye;U.prototype.getPlayheadTimeAsDate=U.prototype.Cf;
490
- U.prototype.setTextTrackVisibility=U.prototype.lg;U.prototype.getChapters=U.prototype.pf;U.prototype.getChaptersTracks=U.prototype.xe;U.prototype.isTextTrackVisible=U.prototype.Bd;U.prototype.selectVariantsByLabel=U.prototype.fg;U.prototype.selectTextLanguage=U.prototype.Zd;U.prototype.selectAudioLanguage=U.prototype.Yd;U.prototype.getTextLanguages=U.prototype.Ef;U.prototype.getAudioLanguages=U.prototype.lf;U.prototype.getTextLanguagesAndRoles=U.prototype.Ff;
491
- U.prototype.getAudioLanguagesAndRoles=U.prototype.mf;U.prototype.selectVariantTrack=U.prototype.Ne;U.prototype.selectTextTrack=U.prototype.Me;U.prototype.getThumbnails=U.prototype.Gf;U.prototype.getImageTracks=U.prototype.tf;U.prototype.getTextTracks=U.prototype.Eb;U.prototype.getVariantTracks=U.prototype.Ya;U.prototype.cancelTrickPlay=U.prototype.cf;U.prototype.trickPlay=U.prototype.ng;U.prototype.getPlaybackRate=U.prototype.Oc;U.prototype.isBuffering=U.prototype.zd;U.prototype.getKeyStatuses=U.prototype.Nc;
492
- U.prototype.getExpiration=U.prototype.fc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Kf;U.prototype.seekRange=U.prototype.sc;U.prototype.isAudioOnly=U.prototype.Mf;U.prototype.isInProgress=U.prototype.jb;U.prototype.isLive=U.prototype.V;U.prototype.getAdManager=U.prototype.we;U.prototype.getAssetUri=U.prototype.yd;U.prototype.getNetworkingEngine=U.prototype.hc;U.prototype.getMediaElement=U.prototype.zf;
493
- U.prototype.getLoadMode=U.prototype.vf;U.prototype.resetConfiguration=U.prototype.dg;U.prototype.getBufferFullness=U.prototype.nf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.sg;U.prototype.unload=U.prototype.he;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Zb;
435
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=fl(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=nl(this.h,a,wl(this));Bm(this);return c};
436
+ function Bm(a){if(a.I){var b=Xe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Cm(a,a.i)}catch(f){Sl(a,f)}a.u&&tm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Dm(a)}a.F&&a.F.be(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Id!=b)){var c=b(),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
437
+ c);a.Id=b;a.j&&(b=a.j,(c=b.i.get(jc))&&Wj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),qm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ke(a.M,b,Math.min(.5,b/2)));a.i&&em(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=wl(this);nl(a,this.h,wl(this));return a};
438
+ q.qf=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.tc().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.fg=function(){for(var a in this.h)delete this.h[a];nl(this.h,wl(this),wl(this));Bm(this)};q.xf=function(){return this.l};q.Bf=function(){return this.g};q.ic=function(){return this.F};q.yd=function(){return this.Xb};
439
+ q.ye=function(){return this.D?this.D:null};q.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};q.kb=function(){return this.i?this.i.presentationTimeline.kb():!1};q.Of=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};
440
+ q.tc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Db(),end:a.Pa()}}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.Mf=function(){this.V()&&(this.g.currentTime=this.tc().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.Nc=function(){return this.m?this.m.Nc():{}};
441
+ q.zd=function(){return this.M?this.M.g==Je:!1};q.Oc=function(){return this.g?this.G?this.G.i:1:0};q.pg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==km&&(this.u.playbackRateChanged(a),Vj(this.j,1<Math.abs(a))))};q.ef=function(){var a=this.G.Mc();this.l==vm&&this.G.set(a);this.l==km&&(this.G.set(a),this.u.playbackRateChanged(a),Vj(this.j,!1))};
442
+ q.Za=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,je(e)){var f=be(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 ie(g)}):[]};
443
+ q.Fb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ce(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?xm(this).map(function(f){return ge(f)}):[]};q.vf=function(){return this.i?this.i.imageStreams.map(function(a){return de(a)}):[]};
444
+ q.If=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G.return(null):G.A(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-
445
+ f.startTime;v=f.o||x/y;w=f.startTime;z=D=0;1<y&&(B=Math.floor((b-f.startTime)/v),w=f.startTime+B*v,D=B%m*n,z=Math.floor(B/m)*t);return G.return({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:w,duration:v,uris:f.Ba(),width:n})}return G.return(null)})};
446
+ q.Oe=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(tl(this.o.h,b,!1),Yj(this.j,b),Em(this),this.vb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=xm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ee(c)==a.id?c.mode=this.ia?"showing":"hidden":c.mode="disabled";Em(this)}};
447
+ q.Pe=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&&Va("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&&je(d)&&(fm(this,d,!1,b,c),this.Ma=new Ce(d),tm(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,
448
+ ee(c)==a.id){Fm(this,c);break}};q.pf=function(){return Gm(this.Za())};q.Hf=function(){return Gm(this.Fb())};q.nf=function(){return Array.from(Hm(this.Za()))};q.Gf=function(){return Array.from(Hm(this.Fb()))};
449
+ q.Zd=function(a,b){if(this.i&&this.B){this.Ma=new De(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.Ma.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=be(d),this.Pe(b,!0)):Dm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);a=md(a);c=d=null;e=
450
+ r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ie(f);md(g.language)==a&&(d=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Fm(this,c):d&&Fm(this,d)}};
451
+ q.$d=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.vb=a,this.ac=b||"",this.$b=c,(a=le(this.i.textStreams,this.vb,this.ac,this.$b)[0]||null)&&a!=this.j.o&&(tl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Bd()))Yj(this.j,a),Em(this)}else{var d=md(a);(a=this.Fb().find(function(e){return md(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Oe(a)}};
452
+ q.hg=function(a){if(this.i&&this.B){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.Ma=new De(b.language,"",0,a),Dm(this))}};q.Bd=function(){var a=this.ia;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?xm(this).some(function(b){return"showing"==b.mode}):a};q.ze=function(){return this.g&&this.g.src&&this.g.textTracks?Im(this).map(function(a){return ge(a)}):[]};
453
+ q.rf=function(a){var b=md(a),c=Im(this).filter(function(h){return md(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};
454
+ function xm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function zm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Im(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
455
+ q.ng=function(a){a=!!a;if(this.ia!=a){this.ia=a;if(this.l==km)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.vb,this.ac,this.$b),0<a.length&&(Yj(this.j,a[0]),Em(this))):Uj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=xm(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")}pm(this)}};
456
+ q.Ef=function(){if(!this.V())return null;var a=this.ya.l,b=0;if(this.B)b=this.B.Fc();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};
457
+ q.Ae=function(){if(!this.V())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.Oa=function(){if(this.l==km)return this.L.Oa();var a={total:[],audio:[],video:[],text:[]};this.l==vm&&(a.total=vi(this.g.buffered));return a};
458
+ q.getStats=function(){if(this.l!=km&&this.l!=vm)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:[]};cm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
459
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.O=this.B.le(),this.o.T=this.B.me());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.L=d;this.o.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.o.s=c;if(this.l==km){if(c=this.j.l)this.o.B=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.Ae().valueOf()+
460
+ 1E3*this.tc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==vm&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.B;d=e.L;var f=e.M,g=e.I,h=e.T,k=e.O,l=e.u,m=e.i,p=e.m,n=e.F,t=e.j,y=ql(e.g,"playing"),x=ql(e.g,"paused"),v=ql(e.g,"buffering"),w=e.s,D=e.D,z=e.G,B=rl(e.g),G=[];e=r(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
461
+ id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.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:D,maxSegmentDuration:z,stateHistory:B,switchHistory:G}};
462
+ q.af=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,D;return K(function(z){switch(z.g){case 1:if(h.l!=km&&h.l!=vm)throw new N(1,7,7004);if(d){z.A(2);break}return u(z,Jm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=vm){z.A(4);break}g&&(c="forced");return u(z,Km(h,a,b,c,d,f||"",k),5);case 5:l=h.Fb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return sm(h),z.return(m);throw new N(1,2,2012);case 4:p=
463
+ kc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new N(1,4,4033);if(!k.length){z.A(6);break}return u(z,Lm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:t=z.h,y=Mm(h,t,d,k),x=new Blob([y],{type:"text/vtt"}),a=Ai(x),d="text/vtt";case 6:v={id:h.Ke++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:vj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.X,primary:!1,trickModeVideo:null,
464
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Xc(v.mimeType,v.codecs);D=cd(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(v);sm(h);return z.return(ce(v))}})};
465
+ q.$e=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=km&&d.l!=vm)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,Jm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Km(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.ze();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.s.oa(f,"load",l);d.s.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k.return(h);
466
+ case 5:throw new N(1,2,2012);}})};function Jm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=Xg(b);if(d=Nm[c])return e.return(d);C(e,2);return u(e,Zg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e.return(d);throw new N(1,2,2011,c);}})}
467
+ function Km(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?u(p,Lm(a,b,a.F,a.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(h=p.h,k=Mm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ai(l),e="text/vtt");m=document.createElement("track");var n=a.T,t=b;try{if(n.g.enabled){var y=Xk(n);y.ot=cl;y.su=!0;var x=Zk(y);var v=$k(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")||
468
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function Lm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=lf;f=ef([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&Vk(k,f,{ot:cl,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
469
+ function Mm(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=Fb(b),b=c.parseMedia(b,a),Jk(b,d);throw new N(2,2,2014,c);}q.ce=function(a,b){this.dc.width=a;this.dc.height=b};q.Wd=function(a){if(this.l==km){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=r(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.lc||d.sa||d.La||(d.lc=!1,Tj(b,d,a));b=!0}}else b=!1;return b};
470
+ q.yf=function(){Va("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.zf=function(){return this.Tc};
471
+ function wl(a){var b=ll();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Wd(d))}};b.textDisplayFactory=function(){return a.Kc?new Bk(a.g,a.Kc):new wk(a.g)};return b}q.Te=function(a){this.Kc=a};
472
+ function Yl(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 wj;h={id:a.Ke++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
473
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:jc,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 Xl(a,b){return K(function(c){if(1==c.g)return u(c,Om(a,b),2);Cm(a,b);A(c)})}
474
+ function Om(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Od(c,b),2);rm(b);A(d)})}
475
+ function Cm(a,b){if(a.l!=Ll){Nd(b.variants,a.h.restrictions,a.dc)&&a.j&&sm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)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,yg(a.m,g.initDataType,g.initData)}}Pm(a,b)}}
476
+ function mm(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?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.Cb(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(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)})}
477
+ function Tl(a){var b=a.zd();if(a.o&&a.M&&a.B){var c=a.G;c.j=b;yj(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);cm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Jl("buffering",b))}function dm(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Jl("ratechange"),a.dispatchEvent(b))}function cm(a){if(a.o&&a.M){var b=a.o.g;a.M.g==Je?pl(b,"buffering"):a.g.paused?pl(b,"paused"):a.g.ended?pl(b,"ended"):pl(b,"playing")}}
478
+ function tm(a){try{Pm(a,a.i)}catch(c){return Sl(a,c),!1}var b=a.i.variants.filter(function(c){return je(c)});b=a.Ma.create(b);a.u.setVariants(Array.from(b.values()));return!0}function Kl(a){return tm(a)?a.u.chooseVariant():null}function Dm(a){var b=Kl(a);b&&fm(a,b,!0,!0,0)}
479
+ function fm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Xj(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Xj(a.j,b,d,e,void 0,c);d=null;f&&(d=be(f));b=be(b);c?nm(a,d,b):Qm(a,d,b)}}function Fm(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=ie(c);b=ie(b);Qm(a,c,b)}
480
+ function om(a,b,c){a=md(a.h.preferredTextLanguage);b=md(b.language);c=md(c.language);return ld(c,a)&&!ld(b,c)}function nm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Jl("adaptation",b);Rm(a,b)}function sm(a){var b=Jl("trackschanged");Rm(a,b)}function Qm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Jl("variantchanged",b);Rm(a,b)}function Em(a){var b=Jl("textchanged");Rm(a,b)}function pm(a){var b=Jl("texttrackvisibility");Rm(a,b)}
481
+ function qm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Rm(a,Jl("abrstatuschanged",b))}
482
+ function Sm(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.Za().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);Nd(d.variants,a.h.restrictions,a.dc);b=Kl(a);if(!b)return!1;d=a.Oa().video.reduce(function(g,h){return g+h.end-h.start},0);fm(a,b,!1,!0,d);a.Je.R(c);return!0}
483
+ function Sl(a,b){if(a.l!=Ll)if(Sm(a,b))b.handled=!0;else{var c=Jl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Wl(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(Jl(b,c))}
484
+ function Rl(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 N(2,3,3016,b,c,a.g.error.message)}
485
+ function am(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&&!Tm.includes(l)}h!=f.allowedByKeySystem&&
486
+ (e=!0)}}}if(!e||tm(a))(b=a.j.l)&&!b.allowedByKeySystem&&Dm(a),e&&sm(a)}}function bm(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Jl("expirationupdated");a.dispatchEvent(b)}function em(a,b,c){0<b&&(a.V()||a.Se(b));b=a.getDuration();c<b&&(a.V()||a.Da(c))}
487
+ function Pm(a,b){a=a.m?a.m.Nc():{};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?Tm.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
488
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new N(2,4,4012,a);}function rm(a){if(!a.variants.some(je))throw new N(2,4,4032);}function Rm(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Ll&&a.dispatchEvent(b);A(c)})}function Hm(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(md(c.language)):b.add("und");return b}
489
+ function Gm(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=md(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));
490
+ h.push({language:l,role:m,label:p})}});return h}function Ml(){return new N(2,7,7E3)}function Il(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function qk(){return{K:null,mimeType:null,startTime:null,fe:NaN,uri:null}}function Nl(a){return new Promise(function(b,c){a.nb=function(){return c(Ml())};a.Wc=function(){return b()};a.onError=function(d){return c(d)};a.Yc=function(){return c(Ml())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Te;
491
+ U.prototype.getManifestParserFactory=U.prototype.zf;U.prototype.getManifest=U.prototype.yf;U.prototype.retryStreaming=U.prototype.Wd;U.prototype.setMaxHardwareResolution=U.prototype.ce;U.prototype.addChaptersTrack=U.prototype.$e;U.prototype.addTextTrackAsync=U.prototype.af;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Oa;U.prototype.getPresentationStartTimeAsDate=U.prototype.Ae;U.prototype.getPlayheadTimeAsDate=U.prototype.Ef;
492
+ U.prototype.setTextTrackVisibility=U.prototype.ng;U.prototype.getChapters=U.prototype.rf;U.prototype.getChaptersTracks=U.prototype.ze;U.prototype.isTextTrackVisible=U.prototype.Bd;U.prototype.selectVariantsByLabel=U.prototype.hg;U.prototype.selectTextLanguage=U.prototype.$d;U.prototype.selectAudioLanguage=U.prototype.Zd;U.prototype.getTextLanguages=U.prototype.Gf;U.prototype.getAudioLanguages=U.prototype.nf;U.prototype.getTextLanguagesAndRoles=U.prototype.Hf;
493
+ U.prototype.getAudioLanguagesAndRoles=U.prototype.pf;U.prototype.selectVariantTrack=U.prototype.Pe;U.prototype.selectTextTrack=U.prototype.Oe;U.prototype.getThumbnails=U.prototype.If;U.prototype.getImageTracks=U.prototype.vf;U.prototype.getTextTracks=U.prototype.Fb;U.prototype.getVariantTracks=U.prototype.Za;U.prototype.cancelTrickPlay=U.prototype.ef;U.prototype.trickPlay=U.prototype.pg;U.prototype.getPlaybackRate=U.prototype.Oc;U.prototype.isBuffering=U.prototype.zd;U.prototype.getKeyStatuses=U.prototype.Nc;
494
+ U.prototype.getExpiration=U.prototype.hc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Mf;U.prototype.seekRange=U.prototype.tc;U.prototype.isAudioOnly=U.prototype.Of;U.prototype.isInProgress=U.prototype.kb;U.prototype.isLive=U.prototype.V;U.prototype.getAdManager=U.prototype.ye;U.prototype.getAssetUri=U.prototype.yd;U.prototype.getNetworkingEngine=U.prototype.ic;U.prototype.getMediaElement=U.prototype.Bf;
495
+ U.prototype.getLoadMode=U.prototype.xf;U.prototype.resetConfiguration=U.prototype.fg;U.prototype.getBufferFullness=U.prototype.qf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.ug;U.prototype.unload=U.prototype.je;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Zb;
494
496
  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?u(h,Pg(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(oc()){for(var l in Wg)k[l]=!0;for(var m in Yg)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()?!!Wg[p]:pc(p);for(var n in l)k[n]=
495
- oc()?!!Yg[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(ia(Vi));
496
- 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)||Sc(l):pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Sm;for(g in f)e[g]=f[g]();return h.return(e)})};
497
- U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||sc("Trident/"))return!1;var a=xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:oc()?!0:pc("application/x-mpegurl")};U.setAdManagerFactory=function(a){wl=a};
498
- U.registerSupportPlugin=function(a,b){Sm[a]=b};U.prototype.destroy=U.prototype.destroy;var Jl=0,tl=1,im=2,tm=3;U.LoadMode={DESTROYED:Jl,NOT_LOADED:tl,MEDIA_SOURCE:im,SRC_EQUALS:tm};U.version="v4.2.5";var Tm=["4","2"];ve=new function(a){this.g=a;this.i=we;this.h=xe}(new te(Number(Tm[0]),Number(Tm[1])));
499
- var Rm=["output-restricted","internal-error"],Sm={},wl=null,Ol={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"},Lm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
500
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Um(){this.h=[];this.j=this.i=this.g=0};function V(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 of;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=V.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};
497
+ oc()?!!Yg[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(ia(Xi));
498
+ 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)||Sc(l):pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Um;for(g in f)e[g]=f[g]();return h.return(e)})};
499
+ U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||sc("Trident/"))return!1;var a=xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:oc()?!0:pc("application/x-mpegurl")};U.setAdManagerFactory=function(a){yl=a};
500
+ U.registerSupportPlugin=function(a,b){Um[a]=b};U.prototype.destroy=U.prototype.destroy;var Ll=0,vl=1,km=2,vm=3;U.LoadMode={DESTROYED:Ll,NOT_LOADED:vl,MEDIA_SOURCE:km,SRC_EQUALS:vm};U.version="v4.2.7";var Vm=["4","2"];ve=new function(a){this.g=a;this.i=we;this.h=xe}(new te(Number(Vm[0]),Number(Vm[1])));
501
+ var Tm=["output-restricted","internal-error"],Um={},yl=null,Ql={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"},Nm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
502
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Wm(){this.h=[];this.j=this.i=this.g=0};function V(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 of;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=V.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};
501
503
  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()};
502
504
  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()};
503
505
  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",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;
504
506
  V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;
505
- V.prototype.getDuration=V.prototype.getDuration;function Vm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,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.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Wm(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
506
- function(f){Xm(e,f)});this.i.onended=function(){e.m.contentComplete()}}Vm.prototype.stop=function(){this.g&&this.g.stop();this.o&&yk(this.o)};Vm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Xm(a,b){b.getError();Ym(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
507
- function Wm(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new Q("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 Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Zm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,$m(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
508
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,$m(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,$m(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,$m(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
509
- {once:!0})}catch(e){Ym(a,null)}}function $m(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
510
- function Zm(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new Q(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Xm(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){an(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){an(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
511
- function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Ym(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Ym(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
507
+ V.prototype.getDuration=V.prototype.getDuration;function Xm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,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.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Ym(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
508
+ function(f){Zm(e,f)});this.i.onended=function(){e.m.contentComplete()}}Xm.prototype.stop=function(){this.g&&this.g.stop();this.o&&Ak(this.o)};Xm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Zm(a,b){b.getError();$m(a,null);a.l(new Q("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
509
+ function Ym(a,b){a.l(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new Q("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 Q("ad-cue-points-changed",(new Map).set("cuepoints",b)))}an(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
510
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,bn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
511
+ {once:!0})}catch(e){$m(a,null)}}function bn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
512
+ function an(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new Q(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Zm(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){cn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){cn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
513
+ function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){$m(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){$m(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
512
514
  a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.C(a.g,
513
515
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,google.ima.AdEvent.Type.AD_METADATA,
514
- function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function an(a,b){var c=b.getAd();a.j=new V(c,a.g,a.i);b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new Q("ad-started",b));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
515
- function Ym(a,b){a.l(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}q=W.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)};
516
+ function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function cn(a,b){var c=b.getAd();a.j=new V(c,a.g,a.i);b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new Q("ad-started",b));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
517
+ function $m(a,b){a.l(new Q("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}q=W.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)};
516
518
  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};
517
519
  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",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;
518
520
  W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
519
- W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function bn(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.B="";this.D=[];this.h=new of;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){cn(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
521
+ W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function dn(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.B="";this.D=[];this.h=new of;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new Q("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){en(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
520
522
  e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new W(f,e.l);e.u&&(e.m.h=e.u);e.i(new Q("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
521
523
  var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new Q("ad-first-quartile"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new Q("ad-midpoint"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new Q("ad-third-quartile"))});
522
524
  this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new Q("ad-complete"));e.i(new Q("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new Q("ad-skipped"));e.i(new Q("ad-stopped"))});this.h.C(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.D=
523
- f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}bn.prototype.stop=function(){this.B="";this.o=null;this.D=[]};bn.prototype.release=function(){this.stop();this.h&&this.h.release()};bn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
524
- function cn(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(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.o=c,a.l.currentTime=d.start)}})};function X(){R.call(this);this.g=this.i=null;this.h=new Um;this.j=navigator.language}pa(X,R);q=X.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 N(2,10,1E4);this.i&&this.i.release();this.i=new Vm(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)})};
525
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);R.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Um};q.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
526
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new bn(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)})};
527
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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 N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
528
- (c.F=!0),c.j=new lc,c.g.requestStream(a),c.B=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('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 N(1,10,10003);return this.g.D};
525
+ f;e.i(new Q("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}dn.prototype.stop=function(){this.B="";this.o=null;this.D=[]};dn.prototype.release=function(){this.stop();this.h&&this.h.release()};dn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
526
+ function en(a,b){a.i(new Q("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(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.o=c,a.l.currentTime=d.start)}})};function X(){R.call(this);this.g=this.i=null;this.h=new Wm;this.j=navigator.language}pa(X,R);q=X.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 N(2,10,1E4);this.i&&this.i.release();this.i=new Xm(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)})};
527
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);R.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new Q("ad-stopped"));this.h=new Wm};q.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
528
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new dn(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)})};
529
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('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 N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
530
+ (c.F=!0),c.j=new lc,c.g.requestStream(a),c.B=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('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 N(1,10,10003);return this.g.D};
529
531
  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",X);
530
532
  X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
531
533
  X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
532
534
  X.AD_VOLUME_CHANGED="ad-volume-changed";X.AD_MUTED="ad-muted";X.AD_PAUSED="ad-paused";X.AD_RESUMED="ad-resumed";X.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";X.CUEPOINTS_CHANGED="ad-cue-points-changed";X.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";X.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";X.AD_CLICKED="ad-clicked";X.AD_PROGRESS="ad-progress";X.AD_BUFFERING="ad-buffering";X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";
533
- X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";wl=function(){return new X};function dn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof Q){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
535
+ X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";yl=function(){return new X};function fn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof Q){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
534
536
  TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(vi(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}})}
535
- function en(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=fn(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})}
536
- function fn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
537
- var gn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),hn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),jn=["loop","playbackRate"],kn=["pause","play"],ln={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
538
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},mn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},nn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},qn=[["getConfiguration","configure"]],rn=[["isTextTrackVisible","setTextTrackVisibility"]],sn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
539
- tn=["attach","detach","load","unload"];function un(a,b,c,d,e,f,g){var h=this;this.G=a;this.O=g;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return vn(h)};this.D=function(k,l){k=en(l);switch(k.type){case "event":var m=k.targetName,p=Ve(k.event);h.s(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.u&&(h.T(),h.u=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new N(n.severity,n.category,
540
- n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;wn.add(this)}q=un.prototype;q.destroy=function(){wn.delete(this);xn(this);yn&&zn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.sa=function(){return this.h};q.Td=function(){return this.M};
541
- q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Mb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(wn),d=c.next();!d.done;d=c.next())An(d.value,b)},function(b){for(var c=r(wn),d=c.next();!d.done;d=c.next())d=d.value,Bn="available"==b,d.j.Mb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Bn&&this.j.P(Cn);(a=yn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
542
- An(this,a):yn=null}else window.__onGCastApiAvailable!==Dn&&(En=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Dn)};q.$d=function(a){this.o=a;this.h&&Fn(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!Bn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new lc;chrome.cast.requestSession(function(d){return Gn(b,a,d)},function(d){return Hn(b,d)});return u(c,b.l,0)})};
543
- function In(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return Gn(a,b,c)},function(c){return Hn(a,c)})}}q.zb=function(){if(this.h){xn(this);if(yn){zn(this);try{yn.stop(function(){},function(){})}catch(a){}yn=null}vn(this)}};
544
- q.get=function(a,b){var c=this;if("video"==a){if(kn.includes(b))return function(){return c.Ke.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(nn[b]&&!this.get("player","isLive")())return function(){};if(sn.includes(b))return function(){return c.Ke.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(tn.includes(b))return function(){return c.ag.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(ln[b]||mn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
545
- q.set=function(a,b,c){this.g[a][b]=c;Fn(this,{type:"set",targetName:a,property:b,value:c})};function Gn(a,b,c){yn=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);vn(a);Fn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Hn(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 N(2,8,c,b))}
546
- q.Ke=function(a,b){Fn(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};q.ag=function(a,b){var c=Ia.apply(2,arguments),d=new lc,e=this.I.toString();this.I++;this.i[e]=d;try{Fn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function An(a,b){var c=a.L();a.l=new lc;a.u=!0;Gn(a,c,b)}function zn(a){var b=yn;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
547
- function vn(a){var b=yn?"connected"==yn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};xn(a)}a.h=b;a.M=b?yn.receiver.friendlyName:"";a.j.Mb()}function xn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Fn(a,b){b=dn(b);var c=yn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new N(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.zb(),b;}}var Cn=.02,Bn=!1,yn=null,En=null,wn=new Set;
548
- function Dn(a){En?window.__onGCastApiAvailable=En:delete window.__onGCastApiAvailable;En=null;if(a)for(var b=r(wn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Jn(a,b,c,d){d=void 0===d?!1:d;R.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.B=d;this.u=new Map;this.g=new un(c,function(){return Kn(e)},function(){return Ln(e)},function(f,g){return Mn(e,f,g)},function(){return Nn(e)},function(){return On(e)},d);Pn(this)}pa(Jn,R);q=Jn.prototype;
549
- q.destroy=function(a){a&&this.g.zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;R.prototype.release.call(this);return Promise.all(a)};q.Jf=function(){return this.l};q.Bf=function(){return this.s};q.af=function(){return this.g.m&&Bn};q.sa=function(){return this.g.sa()};q.Td=function(){return this.g.Td()};
550
- q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=On(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.he(),0):c.return()})};q.$d=function(a){this.g.$d(a)};q.mg=function(){In(this.g)};q.zb=function(){this.g.zb()};
551
- q.df=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.D&&b==c.B)return d.return();c.D=a;c.B=b;c.g.zb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new un(a,function(){return Kn(c)},function(){return Ln(c)},function(e,f){return Mn(c,e,f)},function(){return Nn(c)},function(){return On(c)},b);c.g.init();A(d)})};
552
- function Pn(a){a.g.init();a.m=new of;for(var b=r(gn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.sa()||(f=Ve(f),a.j.dispatchEvent(f))});for(var d in We)a.m.C(a.h,We[d],function(f){a.g.sa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Rb=e,Object.defineProperty(a.l,b.Rb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Qn(a,f.Rb)}}(b),set:function(f){return function(g){var h=f.Rb;a.g.sa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Rb:b.Rb};a.s={};Rn(a,
553
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Sn(a,f)}})});Tn(a);a.j=new R;a.j.Lc=a.l;a.o=new R;a.o.Lc=a.s}function Tn(a){var b=new Map;Rn(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
554
- function Rn(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)}}
555
- function On(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yd(),startTime:null};a.i.pause();for(var c=r(jn),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(qn);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(rn);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 Kn(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
556
- function Ln(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
557
- function Nn(a){for(var b=r(qn),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(jn);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(jn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(rn);for(k=
537
+ function gn(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=hn(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})}
538
+ function hn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
539
+ var jn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),kn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),ln=["loop","playbackRate"],mn=["pause","play"],nn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
540
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},on={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},rn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},sn=[["getConfiguration","configure"]],tn=[["isTextTrackVisible","setTextTrackVisibility"]],un="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
541
+ vn=["attach","detach","load","unload"];function wn(a,b,c,d,e,f,g){var h=this;this.G=a;this.O=g;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return xn(h)};this.D=function(k,l){k=gn(l);switch(k.type){case "event":var m=k.targetName,p=Ve(k.event);h.s(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.u&&(h.T(),h.u=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new N(n.severity,n.category,
542
+ n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;yn.add(this)}q=wn.prototype;q.destroy=function(){yn.delete(this);zn(this);An&&Bn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.ua=function(){return this.h};q.Ud=function(){return this.M};
543
+ q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Nb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(yn),d=c.next();!d.done;d=c.next())Cn(d.value,b)},function(b){for(var c=r(yn),d=c.next();!d.done;d=c.next())d=d.value,Dn="available"==b,d.j.Nb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Dn&&this.j.R(En);(a=An)&&a.status!=chrome.cast.SessionStatus.STOPPED?
544
+ Cn(this,a):An=null}else window.__onGCastApiAvailable!==Fn&&(Gn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Fn)};q.ae=function(a){this.o=a;this.h&&Hn(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!Dn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new lc;chrome.cast.requestSession(function(d){return In(b,a,d)},function(d){return Jn(b,d)});return u(c,b.l,0)})};
545
+ function Kn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return In(a,b,c)},function(c){return Jn(a,c)})}}q.Ab=function(){if(this.h){zn(this);if(An){Bn(this);try{An.stop(function(){},function(){})}catch(a){}An=null}xn(this)}};
546
+ q.get=function(a,b){var c=this;if("video"==a){if(mn.includes(b))return function(){return c.Me.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(rn[b]&&!this.get("player","isLive")())return function(){};if(un.includes(b))return function(){return c.Me.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(vn.includes(b))return function(){return c.cg.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(nn[b]||on[b])return function(){return c.g[a][b]}}return this.g[a][b]};
547
+ q.set=function(a,b,c){this.g[a][b]=c;Hn(this,{type:"set",targetName:a,property:b,value:c})};function In(a,b,c){An=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);xn(a);Hn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Jn(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 N(2,8,c,b))}
548
+ q.Me=function(a,b){Hn(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};q.cg=function(a,b){var c=Ia.apply(2,arguments),d=new lc,e=this.I.toString();this.I++;this.i[e]=d;try{Hn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Cn(a,b){var c=a.L();a.l=new lc;a.u=!0;In(a,c,b)}function Bn(a){var b=An;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
549
+ function xn(a){var b=An?"connected"==An.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};zn(a)}a.h=b;a.M=b?An.receiver.friendlyName:"";a.j.Nb()}function zn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Hn(a,b){b=fn(b);var c=An;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Ya)}catch(d){throw b=new N(2,8,8005,d),c=new Q("error",(new Map).set("detail",b)),a.s("player",c),a.Ab(),b;}}var En=.02,Dn=!1,An=null,Gn=null,yn=new Set;
550
+ function Fn(a){Gn?window.__onGCastApiAvailable=Gn:delete window.__onGCastApiAvailable;Gn=null;if(a)for(var b=r(yn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Ln(a,b,c,d){d=void 0===d?!1:d;R.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.B=d;this.u=new Map;this.g=new wn(c,function(){return Mn(e)},function(){return Nn(e)},function(f,g){return On(e,f,g)},function(){return Pn(e)},function(){return Qn(e)},d);Rn(this)}pa(Ln,R);q=Ln.prototype;
551
+ q.destroy=function(a){a&&this.g.Ab();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;R.prototype.release.call(this);return Promise.all(a)};q.Lf=function(){return this.l};q.Df=function(){return this.s};q.cf=function(){return this.g.m&&Dn};q.ua=function(){return this.g.ua()};q.Ud=function(){return this.g.Ud()};
552
+ q.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Qn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.je(),0):c.return()})};q.ae=function(a){this.g.ae(a)};q.og=function(){Kn(this.g)};q.Ab=function(){this.g.Ab()};
553
+ q.ff=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.D&&b==c.B)return d.return();c.D=a;c.B=b;c.g.Ab();return u(d,c.g.destroy(),2)}c.g=null;c.g=new wn(a,function(){return Mn(c)},function(){return Nn(c)},function(e,f){return On(c,e,f)},function(){return Pn(c)},function(){return Qn(c)},b);c.g.init();A(d)})};
554
+ function Rn(a){a.g.init();a.m=new of;for(var b=r(jn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.ua()||(f=Ve(f),a.j.dispatchEvent(f))});for(var d in We)a.m.C(a.h,We[d],function(f){a.g.ua()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Sb=e,Object.defineProperty(a.l,b.Sb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Sn(a,f.Sb)}}(b),set:function(f){return function(g){var h=f.Sb;a.g.ua()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Sb:b.Sb};a.s={};Tn(a,
555
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Un(a,f)}})});Vn(a);a.j=new R;a.j.Rc=a.l;a.o=new R;a.o.Rc=a.s}function Vn(a){var b=new Map;Tn(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
556
+ function Tn(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)}}
557
+ function Qn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yd(),startTime:null};a.i.pause();for(var c=r(ln),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(sn);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(tn);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 Mn(a){var b=new Q("caststatuschanged");a.dispatchEvent(b)}
558
+ function Nn(a){var b=new Q(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
559
+ function Pn(a){for(var b=r(sn),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(ln);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(ln),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(tn);for(k=
558
560
  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 Q("error",h);a.h.dispatchEvent(h)})}
559
- function Qn(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.sa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
560
- function Sn(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.hc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.we()};
561
- if("setVideoContainer"==b)return function(c){return a.h.Re(c)};if(a.g.sa()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.sa()&&0==Object.keys(a.g.g.video).length&&(ln[b]||mn[b])||!a.g.sa()?a.h[b].bind(a.h):a.g.get("player",b)}
562
- function Mn(a,b,c){a.g.sa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",Jn);Jn.prototype.changeReceiverId=Jn.prototype.df;Jn.prototype.forceDisconnect=Jn.prototype.zb;Jn.prototype.suggestDisconnect=Jn.prototype.mg;Jn.prototype.setAppData=Jn.prototype.$d;Jn.prototype.cast=Jn.prototype.cast;Jn.prototype.receiverName=Jn.prototype.Td;Jn.prototype.isCasting=Jn.prototype.sa;Jn.prototype.canCast=Jn.prototype.af;Jn.prototype.getPlayer=Jn.prototype.Bf;
563
- Jn.prototype.getVideo=Jn.prototype.Jf;Jn.prototype.destroy=Jn.prototype.destroy;function Un(a,b,c,d){R.call(this);var e=this;this.g=a;this.h=b;this.j=new of;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Vn(e)});Wn(this)}pa(Un,R);q=Un.prototype;q.isConnected=function(){return this.F};q.Nf=function(){return this.o};q.ig=function(a){this.i=a};q.gf=function(){this.i=null};
564
- q.jg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.hg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.gg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
561
+ function Sn(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.ua()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ua()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
562
+ function Un(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ye()};
563
+ if("setVideoContainer"==b)return function(c){return a.h.Te(c)};if(a.g.ua()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ua()&&0==Object.keys(a.g.g.video).length&&(nn[b]||on[b])||!a.g.ua()?a.h[b].bind(a.h):a.g.get("player",b)}
564
+ function On(a,b,c){a.g.ua()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",Ln);Ln.prototype.changeReceiverId=Ln.prototype.ff;Ln.prototype.forceDisconnect=Ln.prototype.Ab;Ln.prototype.suggestDisconnect=Ln.prototype.og;Ln.prototype.setAppData=Ln.prototype.ae;Ln.prototype.cast=Ln.prototype.cast;Ln.prototype.receiverName=Ln.prototype.Ud;Ln.prototype.isCasting=Ln.prototype.ua;Ln.prototype.canCast=Ln.prototype.cf;Ln.prototype.getPlayer=Ln.prototype.Df;
565
+ Ln.prototype.getVideo=Ln.prototype.Lf;Ln.prototype.destroy=Ln.prototype.destroy;function Wn(a,b,c,d){R.call(this);var e=this;this.g=a;this.h=b;this.j=new of;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Xn(e)});Yn(this)}pa(Wn,R);q=Wn.prototype;q.isConnected=function(){return this.F};q.Pf=function(){return this.o};q.kg=function(a){this.i=a};q.jf=function(){this.i=null};
566
+ q.lg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.jg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.ig=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
565
567
  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.G&&(a.G.stop(),a.G=null),a.g=null,a.I=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,R.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
566
- function Wn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Xn(a)};b.onSenderDisconnected=function(){return Xn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Yn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Yn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Zn(a,
567
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return $n(a,e)};b.start();b=r(gn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return ao(a,"video",e)});for(var d in We)a.j.C(a.h,We[d],function(e){return ao(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.be(3840,2160):a.h.be(1920,1080);a.j.C(a.g,"loadeddata",function(){a.B=!0});a.j.C(a.h,"loading",function(){a.o=
568
- !1;bo(a)});a.j.C(a.g,"playing",function(){a.o=!1;bo(a)});a.j.C(a.g,"pause",function(){bo(a)});a.j.C(a.h,"unloading",function(){a.o=!0;bo(a)});a.j.C(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,bo(a))})).P(co)})}function Xn(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;bo(a)}
569
- function bo(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new Q("caststatuschanged");a.dispatchEvent(b);eo(a)||fo(a);A(c)})}
570
- function go(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.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=F(t),h=(new Map).set("detail",g),k=new Q("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);
571
- a.g.autoplay=f;b.manifest&&(a.g.play(),fo(a));A(t)}})}function ao(a,b,c){a.h&&(Vn(a),Yn(a,{type:"event",targetName:b,event:c},a.l))}
572
- function Vn(a){a.G.P(ho);for(var b={video:{},player:{}},c=r(hn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in nn)0==a.m%nn[e]&&(b.player[e]=a.h[e]());for(var f in ln)0==a.m%ln[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Yn(a,{type:"update",update:b},a.l);for(var g in mn)0==a.m%mn[g]&&(b={player:{}},b.player[g]=a.h[g](),Yn(a,{type:"update",update:b},a.l));a.B&&(a.m+=
573
- 1);eo(a)}function eo(a){return a.u&&(a.g.duration||a.h.V())?(io(a),a.u=!1,!0):!1}function io(a,b){var c={contentId:a.h.yd(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);fo(a,void 0===b?0:b,c)}
574
- function $n(a,b){var c=en(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;go(a,c.initState,c.appData);Vn(a);break;case "appData":a.D(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.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
575
- "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.I[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return jo(a,g,f,null)},function(h){return jo(a,g,f,h)})}}
576
- function Zn(a,b){var c=en(b.data);switch(c.type){case "PLAY":a.g.play();fo(a);break;case "PAUSE":a.g.pause();fo(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(),fo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),fo(a));break;case "STOP":a.h.he().then(function(){a.h&&fo(a)});break;case "GET_STATUS":io(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));
577
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||fo(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.L(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&io(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");Yn(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:Yn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
578
- function jo(a,b,c,d){a.h&&Yn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Yn(a,b,c,d){a.F&&(a=dn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function fo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?ko:a.h.zd()?lo:a.g.paused?mo:no,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Yn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
579
- M("shaka.cast.CastReceiver",Un);Un.prototype.destroy=Un.prototype.destroy;Un.prototype.setContentArtist=Un.prototype.gg;Un.prototype.setContentImage=Un.prototype.hg;Un.prototype.setContentTitle=Un.prototype.jg;Un.prototype.clearContentMetadata=Un.prototype.gf;Un.prototype.setContentMetadata=Un.prototype.ig;Un.prototype.isIdle=Un.prototype.Nf;Un.prototype.isConnected=Un.prototype.isConnected;var ho=.5,co=5,ko="IDLE",no="PLAYING",lo="BUFFERING",mo="PAUSED";function oo(a,b,c){var d=po(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 N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Xd?(e=h.init||e,!1):!0}),f.length&&(a=qo(e,f,c,g),0==a.length&&(a=[ec("",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(ec(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
580
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{re:g,dh:e,drmInfos:a,ve:!0}}function ro(a,b,c,d){var e=oo(a,c,d);if(b.ve){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.ve=!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 N(2,4,4008);return e.re||b.re}
581
- function so(a){var b=0,c=Ib(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
582
- function to(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 uo(a){a=Qf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Nc(a.textContent);a=so(a).filter(function(b){return b.type===vo})[0];if(!a)return"";a=Cc(a.value,!0);return(a=fg(a,"WRMHEADER"))?to(a):""}
583
- function qo(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.Xd];if(g){var h;if(h=Qf(f.node,"urn:microsoft:playready","pro")){h=Nc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Lf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Xd)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,
584
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Lf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=ec(g,f.init||a||h||k);if(g=wo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function po(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=xo(c.value))&&b.push(c);return b}
585
- function xo(a){var b=a.getAttribute("schemeIdUri"),c=Tf(a,"urn:mpeg:cenc:2013","default_KID"),d=Rf(a,"urn:mpeg:cenc:2013","pssh").map(Vf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Nc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Xd:b,keyId:c,init:0<e.length?e:null}}
586
- var vo=1,wo=(new Map).set("com.widevine.alpha",function(a){return(a=Qf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",uo).set("com.microsoft.playready.recommendation",uo).set("com.microsoft.playready.software",uo).set("com.microsoft.playready.hardware",uo).set("org.w3.clearkey",function(a){return(a=Qf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function yo(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=
568
+ function Yn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Zn(a)};b.onSenderDisconnected=function(){return Zn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&$n(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);$n(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return ao(a,
569
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return bo(a,e)};b.start();b=r(jn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return co(a,"video",e)});for(var d in We)a.j.C(a.h,We[d],function(e){return co(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ce(3840,2160):a.h.ce(1920,1080);a.j.C(a.g,"loadeddata",function(){a.B=!0});a.j.C(a.h,"loading",function(){a.o=
570
+ !1;eo(a)});a.j.C(a.g,"playing",function(){a.o=!1;eo(a)});a.j.C(a.g,"pause",function(){eo(a)});a.j.C(a.h,"unloading",function(){a.o=!0;eo(a)});a.j.C(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,eo(a))})).R(fo)})}function Zn(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;eo(a)}
571
+ function eo(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new Q("caststatuschanged");a.dispatchEvent(b);go(a)||ho(a);A(c)})}
572
+ function io(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.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=F(t),h=(new Map).set("detail",g),k=new Q("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);
573
+ a.g.autoplay=f;b.manifest&&(a.g.play(),ho(a));A(t)}})}function co(a,b,c){a.h&&(Xn(a),$n(a,{type:"event",targetName:b,event:c},a.l))}
574
+ function Xn(a){a.G.R(jo);for(var b={video:{},player:{}},c=r(kn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in rn)0==a.m%rn[e]&&(b.player[e]=a.h[e]());for(var f in nn)0==a.m%nn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;$n(a,{type:"update",update:b},a.l);for(var g in on)0==a.m%on[g]&&(b={player:{}},b.player[g]=a.h[g](),$n(a,{type:"update",update:b},a.l));a.B&&(a.m+=
575
+ 1);go(a)}function go(a){return a.u&&(a.g.duration||a.h.V())?(ko(a),a.u=!1,!0):!1}function ko(a,b){var c={contentId:a.h.yd(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);ho(a,void 0===b?0:b,c)}
576
+ function bo(a,b){var c=gn(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;io(a,c.initState,c.appData);Xn(a);break;case "appData":a.D(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.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
577
+ "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.I[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return lo(a,g,f,null)},function(h){return lo(a,g,f,h)})}}
578
+ function ao(a,b){var c=gn(b.data);switch(c.type){case "PLAY":a.g.play();ho(a);break;case "PAUSE":a.g.pause();ho(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(),ho(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),ho(a));break;case "STOP":a.h.je().then(function(){a.h&&ho(a)});break;case "GET_STATUS":ko(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));
579
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||ho(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.L(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&ko(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");$n(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:$n(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
580
+ function lo(a,b,c,d){a.h&&$n(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function $n(a,b,c,d){a.F&&(a=fn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function ho(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?mo:a.h.zd()?no:a.g.paused?oo:po,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);$n(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
581
+ M("shaka.cast.CastReceiver",Wn);Wn.prototype.destroy=Wn.prototype.destroy;Wn.prototype.setContentArtist=Wn.prototype.ig;Wn.prototype.setContentImage=Wn.prototype.jg;Wn.prototype.setContentTitle=Wn.prototype.lg;Wn.prototype.clearContentMetadata=Wn.prototype.jf;Wn.prototype.setContentMetadata=Wn.prototype.kg;Wn.prototype.isIdle=Wn.prototype.Pf;Wn.prototype.isConnected=Wn.prototype.isConnected;var jo=.5,fo=5,mo="IDLE",po="PLAYING",no="BUFFERING",oo="PAUSED";function qo(a,b,c){var d=ro(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 N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Yd?(e=h.init||e,!1):!0}),f.length&&(a=so(e,f,c,g),0==a.length&&(a=[ec("",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(ec(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
582
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{te:g,fh:e,drmInfos:a,xe:!0}}function to(a,b,c,d){var e=qo(a,c,d);if(b.xe){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.xe=!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 N(2,4,4008);return e.te||b.te}
583
+ function uo(a){var b=0,c=Ib(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=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
584
+ function vo(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 wo(a){a=Qf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Nc(a.textContent);a=uo(a).filter(function(b){return b.type===xo})[0];if(!a)return"";a=Cc(a.value,!0);return(a=fg(a,"WRMHEADER"))?vo(a):""}
585
+ function so(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.Yd];if(g){var h;if(h=Qf(f.node,"urn:microsoft:playready","pro")){h=Nc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Lf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Yd)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,
586
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Lf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=ec(g,f.init||a||h||k);if(g=yo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function ro(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=zo(c.value))&&b.push(c);return b}
587
+ function zo(a){var b=a.getAttribute("schemeIdUri"),c=Tf(a,"urn:mpeg:cenc:2013","default_KID"),d=Rf(a,"urn:mpeg:cenc:2013","pssh").map(Vf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Nc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Yd:b,keyId:c,init:0<e.length?e:null}}
588
+ var xo=1,yo=(new Map).set("com.widevine.alpha",function(a){return(a=Qf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",wo).set("com.microsoft.playready.recommendation",wo).set("com.microsoft.playready.software",wo).set("com.microsoft.playready.hardware",wo).set("org.w3.clearkey",function(a){return(a=Qf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Ao(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=
587
589
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
588
- function zo(a,b){var c=Ao(a,b,"timescale"),d=1;c&&(d=bg(c)||1);var e=Ao(a,b,"duration");c=bg(e||"");"image"==a.H.contentType&&(c=dg(e||""));c&&(c/=d);var f=Ao(a,b,"startNumber");e=Number(Ao(a,b,"presentationTimeOffset"))||0;var g=cg(f||"");if(null==f||null==g)g=1;f=Bo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.W.duration||Infinity;f=Pf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=Xf(m,"t",cg),t=Xf(m,"d",cg);m=Xf(m,"r",ag);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
589
- m)if(p){p=Xf(p,"t",cg);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,qg:n}),n=k}b=h}return{timescale:d,ha:c,Lb:g,Ra:e/d||0,ie:e,timeline:b}}function Ao(a,b,c){return[b(a.H),b(a.fa),b(a.aa)].filter(cc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
590
- function Bo(a,b,c){return[b(a.H),b(a.fa),b(a.aa)].filter(cc).map(function(d){return Of(d,c)}).reduce(function(d,e){return d||e})}
591
- function Co(a,b,c,d,e,f){for(var g=Tf(a,"http://www.w3.org/1999/xlink","href"),h=Tf(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 Pe(new N(2,4,4028));if("onLoad"!=h)return Pe(new N(2,4,4027));var m=dc([d],[g]);return e.request(0,ef(m,b)).Z(function(p){p=hg(p.data,a.tagName);if(!p)return Pe(new N(2,4,4001,g));
592
- 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 Do(a,b,c,m[0],e,f+1)})}
593
- function Do(a,b,c,d,e,f){f=void 0===f?0:f;if(Tf(a,"http://www.w3.org/1999/xlink","href")){var g=Co(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return Do(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"==Tf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Do(k,b,c,d,e,f)));return Te(g).Z(function(){return a})};function Eo(a,b,c,d,e,f,g){var h,k=(new Bf).U("sidx",function(l){h=Fo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
594
- function Fo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Kb(),m=g.reader.Kb();g.reader.skip(2);var p=g.reader.Sd();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.N(),t=(n&2147483648)>>>31;n&=2147483647;var x=g.reader.N();g.reader.skip(4);if(1==t)throw new N(2,3,3006);h.push(new oi(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 Go(a){this.h=Ib(a);this.g=new yf(this.h,0)}Go.prototype.ma=function(){return this.g.ma()};
595
- function Ho(a){var b=Io(a);if(7<b.length)throw new N(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=Io(a);a:{d=r(Jo);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(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.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Ib(a.h,a.g.$(),b);a.g.skip(b);return new Ko(c,d)}
596
- function Io(a){var b=a.g.$(),c=a.g.Qa();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Jo=[[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 Ko(a,b){this.id=a;this.g=b}
597
- function Lo(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(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 Mo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Go(a.g);for(var p=null,n=null;a.ma();){var t=Ho(a);if(187==t.id){var x=No(t);x&&(t=c*x.rg,x=b+x.$f,null!=p&&m.push(new oi(p+g,t+g,l,n,x-1,f,g,h,k)),p=t,n=x)}}null!=p&&m.push(new oi(p+g,d+g,l,n,null,f,g,h,k));return m}
598
- function No(a){var b=new Go(a.g);a=Ho(b);if(179!=a.id)throw new N(2,3,3013);a=Lo(a);b=Ho(b);if(183!=b.id)throw new N(2,3,3012);b=new Go(b.g);for(var c=0;b.ma();){var d=Ho(b);if(241==d.id){c=Lo(d);break}}return{rg:a,$f:c}};function Oo(a,b){b=Bo(a,b,"Initialization");if(!b)return null;var c=a.H.wa,d=b.getAttribute("sourceURL");d&&(c=dc(a.H.wa,[d]));d=0;var e=null;if(b=Xf(b,"range",$f))d=b.start,e=b.end;return new mi(function(){return c},d,e,Po(a))}
599
- function Qo(a,b){var c=Number(Ao(a,Ro,"presentationTimeOffset"))||0,d=Ao(a,Ro,"timescale"),e=1;d&&(e=bg(d)||1);var f=c/e||0,g=Oo(a,Ro);So(a,g);var h=Ye(a);return{Ab:function(){var k=Bo(h,Ro,"RepresentationIndex"),l=h.H.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=dc(h.H.wa,[k]));k=To(h);return Uo(h,b,g,l,k.start,k.end,f)}}}
600
- function Uo(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,x,y,v,w,B,z,D,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wa||!a.W.De,l=a.W.start,m=a.W.duration,p=a.H.mimeType.split("/")[1],n=b,t=null,x=[n(d,e,f),"webm"==p?n(c.ya(),c.Ba,c.la):null],n=null,u(E,Promise.all(x),2);y=E.h;v=y[0];w=y[1]||null;B=null;z=l-g;D=l;G=m?l+m:Infinity;if("mp4"==p)var H=Eo(v,e,d,c,z,D,G);else{H=new Go(w);if(440786851!=Ho(H).id)throw new N(2,3,3008);var I=Ho(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
601
- I=new Go(I.g);for(var J=null;I.ma();){var L=Ho(I);if(357149030==L.id){J=L;break}}if(!J)throw new N(2,3,3010);J=new Go(J.g);L=1E6;for(I=null;J.ma();){var P=Ho(J);if(2807729==P.id)L=Lo(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=L/1E9;I*=J;L=Ho(new Go(v));if(475249515!=L.id)throw new N(2,3,3007);H=Mo(L,H,J,I,d,c,z,D,G)}B=H;h.Hb(B);t=new rj(B);k&&t.Xa(D,G,!0);return E.return(t)})}
602
- function Ro(a){return a.uc}function To(a){var b=Bo(a,Ro,"RepresentationIndex");a=Ao(a,Ro,"indexRange");a=$f(a||"");b&&(a=Xf(b,"range",$f,a));return a}function So(a,b){Vo(a,b);if(!To(a))throw new N(2,4,4002);}function Vo(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=jc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
603
- function Po(a){var b=a.H;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.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Wo(a,b){var c=Oo(a,Xo),d=Yo(a);if(!d.ha&&!d.timeline&&1<d.Fb.length)throw new N(2,4,4002);if(!d.ha&&!a.W.duration&&!d.timeline&&1==d.Fb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=Zo(a.W.start,a.W.duration,a.H.wa,d,c);b=!e;e?e.Gb(g,a.presentationTimeline.Oa()):e=new rj(g);a.presentationTimeline.Hb(g);a.Wa&&a.W.De||e.Xa(a.W.start,a.W.duration?a.W.start+a.W.duration:
604
- Infinity,b);f&&(f.segmentIndex=e);return{Ab:function(){e&&0!=e.J.length||e.oc(g);return Promise.resolve(e)}}}function Xo(a){return a.$a}function Yo(a){var b=$o(a);a=zo(a,Xo);var c=a.Lb;0==c&&(c=1);var d=0;a.ha?d=a.ha*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ha:a.ha,startTime:d,Lb:c,Ra:a.Ra,timeline:a.timeline,Fb:b}}
605
- function Zo(a,b,c,d,e){var f=d.Fb.length;d.timeline&&d.timeline.length!=d.Fb.length&&(f=Math.min(d.timeline.length,d.Fb.length));for(var g=a-d.Ra,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={ld:m.ld},p++){var n=d.Fb[p];m.ld=dc(c,[n.Rf]);var t=void 0;t=null!=d.ha?l+d.ha:d.timeline?d.timeline[p].end:l+b;k.push(new oi(a+l,a+t,function(x){return function(){return x.ld}}(m),n.start,n.end,e,g,a,h));l=t}return k}
606
- function $o(a){return[a.H.$a,a.fa.$a,a.aa.$a].filter(cc).map(function(b){return Pf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Be&&(a.Be=!0);var c=b.getAttribute("media");b=Xf(b,"mediaRange",$f,{start:0,end:null});return{Rf:c,start:b.start,end:b.end}})};function ap(a,b,c,d,e,f){var g=bp(a),h=cp(a);dp(h);var k=Ye(a);if(h.lc)return Vo(a,g),{Ab:function(){var t=yo(h.lc,k.H.id,null,k.bandwidth||null,null);t=dc(k.H.wa,[t]);return Uo(k,b,g,t,0,null,h.Ra)}};if(h.ha)return d||"image"===a.fa.contentType||(a.presentationTimeline.Md(h.ha),a.presentationTimeline.Nd(a.W.start)),{Ab:function(){return ep(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=fp(k,h,g);c=a.W.start;var p=a.W.duration?a.W.start+a.W.duration:
607
- Infinity,n=Infinity!=p;l?(n&&(new rj(m)).Xa(c,p,!0),l.Gb(m,a.presentationTimeline.Oa())):l=new rj(m);a.presentationTimeline.Hb(m);n&&l.Xa(c,p);d&&a.Wa&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.J.length||l.oc(m);return Promise.resolve(l)}}}function gp(a){return a.vc}function cp(a){var b=zo(a,gp),c=Ao(a,gp,"media");a=Ao(a,gp,"index");return{ha:b.ha,timescale:b.timescale,Lb:b.Lb,Ra:b.Ra,ie:b.ie,timeline:b.timeline,Kd:c,lc:a}}
608
- function dp(a){var b=a.lc?1:0;b+=a.timeline?1:0;b+=a.ha?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.lc&&(a.timeline=null),a.ha=null);if(!a.lc&&!a.Kd)throw new N(2,4,4002);}
609
- function ep(a,b,c,d,e){function f(J){var L=(J-t)*n,P=L+b.Ra,S=L+l;L=S+n;var Y=Math.min(L,h());S=new oi(S,Y,function(){var ea=yo(y,w,J,v,P*x);return dc(B,[ea])},0,null,d,z,l,h());S.j=L;return S}function g(){var J=[Math.max(k.Oa(),l),Math.min(k.gb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/n),Math.ceil(J[1]/n)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||p;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.aa.id,p=a.W.duration,n=b.ha,t=b.Lb,x=b.timescale,
610
- y=b.Kd,v=a.bandwidth||null,w=a.H.id,B=a.H.wa,z=l-b.Ra,D=g();a=a.Wa?Math.max(D[0],D[1]-c+1):D[0];D=D[1];c=[];for(var G=a;G<=D;++G){var E=f(G);c.push(E)}var H=new rj(c);c=k.gb()<h();G=k.V();if(c||G){var I=Math.max(a,D+1);H.bd(n,function(){var J=k.Oa();H.eb(J);var L=r(g());L.next();L=L.next().value;for(var P=[];I<=L;){var S=f(I);P.push(S);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
611
- function fp(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Ra;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={kd:h.kd,od:h.od,rd:h.rd,gd:h.gd,td:h.td,hd:h.hd},k++){var l=b.timeline[k],m=l.start,p=l.qg;l=l.end;h.rd=k+b.Lb;h.td=p+b.ie;h.od=a.H.id;h.gd=a.bandwidth||null;h.kd=b.Kd;h.hd=a.H.wa;g.push(new oi(d+m,d+l,function(n){return function(){var t=yo(n.kd,n.od,n.rd,n.gd||null,n.td);return dc(n.hd,[t]).map(function(x){return x.toString()})}}(h),0,null,c,f,d,e))}return g}
612
- function bp(a){var b=Ao(a,gp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.wa;return new mi(function(){var f=yo(b,c,null,d,null);return dc(e,[f])},0,null,Po(a))};function hp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}hp.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=[]};
613
- function ip(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,B,z,D,G,E,H,I,J,L,P,S,Y,ea,ua,Ca;return K(function(Da){switch(Da.g){case 1:d=kc;jp(b);kp(b);lp(b);mp(b);if(!c&&1==b.length){e=b[0];a.g=e.Fc;a.h=e.dd;a.j=e.textStreams;a.i=e.imageStreams;Da.A(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 Da.return();k=b.map(function(Ga){return Ga.Fc});l=b.map(function(Ga){return Ga.dd});m=b.map(function(Ga){return Ga.textStreams});p=b.map(function(Ga){return Ga.imageStreams});
614
- n=r(m);for(t=n.next();!t.done;t=n.next())x=t.value,x.push(np(d.X));y=r(p);for(v=y.next();!v.done;v=y.next())w=v.value,w.push(np(d.Vb));return u(Da,op(a.g,k,f,pp,qp),3);case 3:return u(Da,op(a.h,l,f,pp,qp),4);case 4:return u(Da,op(a.j,m,f,pp,qp),5);case 5:return u(Da,op(a.i,p,f,pp,qp),2);case 2:B=0;z=[];if(a.h.length&&a.g.length)for(J=r(a.g),L=J.next();!L.done;L=J.next())for(P=L.value,S=r(a.h),Y=S.next();!Y.done;Y=S.next())ea=Y.value,ua=Sg(P.drmInfos,ea.drmInfos),P.drmInfos.length&&ea.drmInfos.length&&
615
- !ua.length||(Ca=B++,z.push({id:Ca,language:P.language,primary:P.primary,audio:P,video:ea,bandwidth:(P.bandwidth||0)+(ea.bandwidth||0),drmInfos:ua,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(D=a.h.concat(a.g),G=r(D),E=G.next();!E.done;E=G.next())H=E.value,I=B++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.cb?H:null,video:H.type==d.ra?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
616
- a.l=z;A(Da)}})}function jp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Fc),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&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Fc=c}}
617
- function lp(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&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
618
- function kp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.dd),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&&fb(e.roles,h.roles)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.dd=c}}
619
- function mp(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}}
620
- function rp(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,B,z,D,G,E,H,I,J,L,P;return K(function(S){switch(S.g){case 1:b=kc;if(1==a.length)return S.return(a[0]);c=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.cb})});d=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.ra})});e=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.X})});f=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.Vb})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
621
- k.push(sp(b.X));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(sp(b.Vb));return u(S,op([],c,0,tp,up),2);case 2:return n=S.h,u(S,op([],d,0,tp,up),3);case 3:return t=S.h,u(S,op([],e,0,tp,up),4);case 4:return x=S.h,u(S,op([],f,0,tp,up),5);case 5:y=S.h;v=0;if(t.length&&n.length)for(G=r(n),E=G.next();!E.done;E=G.next())for(H=E.value,I=r(t),J=I.next();!J.done;J=I.next())L=J.value,P=v++,L.variantIds.push(P),H.variantIds.push(P);else for(w=t.concat(n),B=r(w),z=B.next();!z.done;z=B.next())D=z.value,
622
- D.variantIds=[v++];return S.return(t.concat(n).concat(x).concat(y))}})}
623
- function op(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,x,y,v,w,B,z,D,G,E,H,I,J;return K(function(L){switch(L.g){case 1:f=kc;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){L.A(4);break}m=l.value;return u(L,vp(m,b,c,e,g),5);case 5:p=L.h;if(!p)throw new N(2,4,4037);l=k.next();L.A(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,(B=wp(w,b,d,e,g))&&a.push(B);z=r(g);for(t=z.next();!t.done;t=
624
- z.next())for(D=t.value,G={},E=r(D),v=E.next();!v.done;G={Va:G.Va},v=E.next())if(G.Va=v.value,H=G.Va.type==f.X&&!G.Va.language,I=G.Va.type==f.Vb&&!G.Va.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(S){return S.mimeType==P.Va.mimeType&&Zc(S.codecs)==Zc(P.Va.codecs)}}(G))))throw new N(2,4,4037);return L.return(a)}})}function vp(a,b,c,d,e){return K(function(f){if(1==f.g)return xp(b,a),a.matchedStreams?a.segmentIndex?u(f,yp(a,c),2):f.A(2):f.return(!1);zp(a,c,d,e);return f.return(!0)})}
625
- function yp(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 u(l,Promise.all(c),2)}if(a.segmentIndex instanceof uj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
626
- function wp(a,b,c,d,e){var f=c(a);xp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new uj;return u(g,yp(f,0),0)})});if(!f.matchedStreams)return null;zp(f,0,d,e);return f}function zp(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==sd(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
627
- function pp(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}
628
- function tp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
629
- function qp(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(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Sg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
630
- (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=pp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),qp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&qp(a.trickModeVideo,b)}
631
- function up(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(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)}}
632
- function xp(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Ap,video:Ap,text:Bp,image:Cp}[e.type],g={audio:Dp,video:Ep,text:Fp,image:Gp}[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 Ap(a,b){var c;!(c=b.mimeType!=a.mimeType||Zc(b.codecs)!=Zc(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Sg(a,b).length:1));return c?!1:!0}
633
- function Bp(a,b){return a.language?b.language?0==sd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Cp(a){return a.tilesLayout?!0:!1}
634
- function Dp(a,b,c){if(a.id==c.id)return!0;var d=sd(a.language,b.language),e=sd(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;
635
- d=Hp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Ip)return!0;if(d==Jp)return!1;d=Hp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Ip?!0:d==Jp?!1:a.bandwidth&&Kp(a.bandwidth,b.bandwidth,c.bandwidth)==Ip?!0:!1}
636
- function Ep(a,b,c){if(a.id==c.id)return!0;var d=Hp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Ip)return!0;if(d==Jp)return!1;if(a.frameRate){d=Hp(a.frameRate,b.frameRate,c.frameRate);if(d==Ip)return!0;if(d==Jp)return!1}return a.bandwidth&&Kp(a.bandwidth,b.bandwidth,c.bandwidth)==Ip?!0:!1}
637
- function Fp(a,b,c){if(a.id==c.id)return!0;var d=sd(a.language,b.language),e=sd(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!=
638
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Gp(a,b,c){return a.id==c.id?!0:Hp(a.width*a.height,b.width*b.height,c.width*c.height)==Ip?!0:!1}function sp(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}}
639
- function np(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new rj([]),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}}
640
- function Hp(a,b,c){if(b==a&&a!=c)return Jp;if(c==a&&a!=b)return Ip;if(b>a){if(c<=a||c-a<b-a)return Ip;if(c-a>b-a)return Jp}else{if(c>a)return Jp;if(a-c<a-b)return Ip;if(a-c>a-b)return Jp}return Lp}function Kp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ip:b<a?Jp:Lp}var Ip=1,Lp=0,Jp=-1;function Mp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new hp;this.F=0;this.I=new Qa(5);this.D=new O(function(){Np(a)});this.o=new Ze;this.s=null;this.L=[];this.u=Infinity;this.B=!1}q=Mp.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.B=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Op(c),2);d=e.h;c.h&&Pp(c,d);if(!c.h)throw new N(2,7,7001);return e.return(c.i)})};
641
- 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.D&&(this.D.stop(),this.D=null);return this.o.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return C(c,2),u(c,Op(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c.return();a.h.onError(b);A(c)})};q.onExpirationUpdated=function(){};
642
- function Op(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=ef(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),$e(a.o,e),u(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 u(k,Qp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k.return(h)})}
643
- function Qp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=hg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Rp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Do(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.o,g);return u(k,g.promise,2)}h=k.h;return k.return(Rp(a,h,c))})}
644
- function Rp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,B,z,D,G,E,H,I,J,L,P,S,Y,ea,ua,Ca,Da,Ga;return K(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Pf(b,"Location").map(Vf).filter(cc);0<f.length&&(g=dc(e,f),e=a.m=g);h=Pf(b,"BaseURL");k=h.map(Vf);l=dc(e,k);m=0;h&&h.length&&(m=Xf(h[0],"availabilityTimeOffset",dg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=Xf(b,"minBufferTime",Zf)||0);a.F=Xf(b,"minimumUpdatePeriod",Zf,-1);t=Xf(b,"availabilityStartTime",Yf);x=Xf(b,
645
- "timeShiftBufferDepth",Zf);y=a.g.dash.ignoreSuggestedPresentationDelay;v=null;y||(v=Xf(b,"suggestedPresentationDelay",Zf));w=a.g.dash.ignoreMaxSegmentDuration;B=null;w||(B=Xf(b,"maxSegmentDuration",Zf));z=b.getAttribute("type")||"static";if(a.i)for(D=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.eb(D.Oa());else I=a.g.defaultPresentationDelay||1.5*n,J=null!=v?v:I,D=new T(t,J,a.g.dash.autoCorrectDrift);D.wc("static"==z);(L=D.V())&&
646
- !isNaN(a.g.availabilityWindowOverride)&&(x=a.g.availabilityWindowOverride);null==x&&(x=Infinity);D.de(x);P=b.getAttribute("profiles")||"";S={Wa:"static"!=z,presentationTimeline:D,aa:null,W:null,fa:null,H:null,bandwidth:0,Be:!1,yb:m,profiles:P.split(",")};Y=Sp(a,S,l,b);ea=Y.duration;ua=Y.periods;"static"!=z&&Y.te||D.Ia(ea||Infinity);a.u&&!a.B&&(Ca=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?D.Oe(a.u):a.u&&Va("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.");
647
- D.Md(B||1);return u(Ha,ip(a.j,ua,S.Wa),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);Ha.A(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.Te()){Ha.A(4);break}Da=Pf(b,"UTCTiming");return u(Ha,Tp(a,l,Da),5);case 5:Ga=Ha.h;if(!a.h)return Ha.return();D.Pe(Ga);case 4:D.Hd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ha)}})}
648
- function Sp(a,b,c,d){var e=Xf(d,"mediaPresentationDuration",Zf),f=[],g=0;d=Pf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Xf(k,"start",Zf,g),p=k.id,n=Xf(k,"duration",Zf),t=null;if(l){var x=Xf(l,"start",Zf);null!=x&&(t=x-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.L.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Up(a,b,c,{start:m,duration:t,node:k,De:null==t||!l});f.push(g);b.aa.id&&t&&(a.M[b.aa.id]=t);if(null==t){g=
649
- null;break}g=m+t}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,te:!1}:{periods:f,duration:g,te:!0}}
650
- function Up(a,b,c,d){b.aa=Vp(d.node,null,c);b.W=d;b.aa.yb=b.yb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Pf(d.node,"EventStream");c=b.presentationTimeline.Oa();e=r(e);for(var f=e.next();!f.done;f=e.next())Wp(a,d.start,d.duration,f.value,c);c=Pf(d.node,"AdaptationSet").map(function(m){return Xp(a,b,m)}).filter(cc);if(b.Wa){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.cg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
651
- }d=c.filter(function(m){return!m.ge});c=c.filter(function(m){return m.ge});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ge.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={Dc:h.Dc},l=k.next())h.Dc=l.value,h.Dc.trickModeVideo=e.streams.find(function(m){return function(p){return Zc(m.Dc.codecs)==Zc(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:Yp(d,"audio");g=a.g.disableVideo?[]:Yp(d,"video");f=a.g.disableText?
652
- []:Yp(d,jc);c=a.g.disableThumbnails?[]:Yp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Fc:d,dd:e,textStreams:g,imageStreams:f}}
653
- function Yp(a,b){return a.filter(function(c){return c.contentType==b})}
654
- function Xp(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.fa=Vp(c,b.aa,null);var e=!1,f=Pf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(cc),h=void 0,k=b.fa.contentType==jc;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=
655
- l}}var p;m=Pf(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=Pf(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"),
656
- 10)));m=Pf(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,B=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],B=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,B=w);x.set(v,md(B))}}else x.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
657
- 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,md(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=Pf(c,"ContentProtection");var z=oo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),D=md(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Pf(c,"Label"))&&l.length&&
658
- (l=l[0],l.textContent&&(G=l.textContent));l=Pf(c,"Representation");c=l.map(function(E){if(E=Zp(a,b,z,h,D,G,e,g,x,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.fa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.fa.contentType||"application"==b.fa.contentType)for(b.fa.contentType=$p(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.fa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
659
- 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(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(cc);return{id:b.fa.id||"__fake__"+a.G++,contentType:b.fa.contentType,language:D,eh:e,streams:c,drmInfos:z.drmInfos,ge:f,cg:k}}
660
- function Zp(a,b,c,d,e,f,g,h,k,l){b.H=Vp(l,b.fa,null);a.u=Math.min(a.u,b.H.yb);if(!aq(b.H))return null;var m=b.W.start;b.bandwidth=Xf(l,"bandwidth",bg)||0;var p=b.H.contentType,n=p==jc||"application"==p;p="image"==p;try{var t=function(H,I,J){return bq(a,H,I,J)};if(b.H.uc)var x=Qo(b,t);else if(b.H.$a)x=Wo(b,a.l);else if(b.H.vc)x=ap(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.H.wa,v=b.W.duration||0;x={Ab:function(){return Promise.resolve(tj(m,v,y))}}}}catch(H){if((n||p)&&4002==H.code)return null;
661
- throw H;}t=Pf(l,"ContentProtection");t=ro(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Pf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var B=!1;n&&(B=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Pf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
662
- (z=l.getAttribute("value")),!z))return null;var D;l=b.H.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.H.id?b.aa.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,I,J;return K(function(L){if(1==L.g){I=(H=G&&b.Wa&&a.l[G])?a.l[G]:E;if(I.segmentIndex)return L.A(0);J=I;return u(L,x.Ab(),3)}J.segmentIndex=L.h;A(L)})},closeSegmentIndex:function(){E.segmentIndex&&
663
- (E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.fa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:B,channelsCount:b.H.Vc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:w,closedCaptions:k,
664
- hdr:D,tilesLayout:z,matchedStreams:[]};G&&b.Wa&&!a.l[G]&&(a.l[G]=E);return E}function Np(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Op(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();Pp(a,b);A(d)}})}function Pp(a,b){0>a.F||a.D.P(Math.max(3,a.F-b,Ra(a.I)))}
665
- function Vp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vc:null,audioSamplingRate:null,yb:0};c=c||b.wa;var d=Pf(a,"BaseURL"),e=d.map(Vf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Xf(a,"frameRate",eg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Pf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
666
- m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Pf(a,"AudioChannelConfiguration");m=cq(m)||b.Vc;n=Xf(a,"audioSamplingRate",cg)||b.audioSamplingRate;f||(f=$p(g,h));var t=Of(a,"SegmentBase"),x=Of(a,"SegmentTemplate"),y=t?Xf(t,"availabilityTimeOffset",dg)||0:0,v=x?Xf(x,"availabilityTimeOffset",dg)||0:0;d=d&&d.length?Xf(d[0],"availabilityTimeOffset",dg)||0:0;d=b.yb+d+y+v;return{wa:dc(c,e),uc:t||b.uc,$a:Of(a,"SegmentList")||b.$a,vc:x||b.vc,width:Xf(a,"width",cg)||b.width,height:Xf(a,
667
- "height",cg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Vc:m,audioSamplingRate:n,yb:d}}
668
- function cq(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=
669
- 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 aq(a){var b=a.uc?1:0;b+=a.$a?1:0;b+=a.vc?1:0;if(0==b)return a.contentType==jc||"application"==a.contentType?!0:!1;1!=b&&(a.uc&&(a.$a=null),a.vc=null);return!0}
670
- function dq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=dc(b,[c]),f=ef(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),$e(a.o,g),u(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=Bc(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
671
- function Tp(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.A(4);break}h=g.value;C(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.A(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.A(8);
672
- 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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}p.A(9);break;case 7:return u(p,dq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,dq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
590
+ function Bo(a,b){var c=Co(a,b,"timescale"),d=1;c&&(d=bg(c)||1);var e=Co(a,b,"duration");c=bg(e||"");"image"==a.H.contentType&&(c=dg(e||""));c&&(c/=d);var f=Co(a,b,"startNumber");e=Number(Co(a,b,"presentationTimeOffset"))||0;var g=cg(f||"");if(null==f||null==g)g=1;f=Do(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.W.duration||Infinity;f=Nf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=Xf(m,"t",cg),t=Xf(m,"d",cg);m=Xf(m,"r",ag);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
591
+ m)if(p){p=Xf(p,"t",cg);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,sg:n}),n=k}b=h}return{timescale:d,ha:c,Mb:g,Ta:e/d||0,ke:e,timeline:b}}function Co(a,b,c){return[b(a.H),b(a.fa),b(a.aa)].filter(cc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
592
+ function Do(a,b,c){return[b(a.H),b(a.fa),b(a.aa)].filter(cc).map(function(d){return Mf(d,c)}).reduce(function(d,e){return d||e})}
593
+ function Eo(a,b,c,d,e,f){for(var g=Tf(a,"http://www.w3.org/1999/xlink","href"),h=Tf(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 Pe(new N(2,4,4028));if("onLoad"!=h)return Pe(new N(2,4,4027));var m=dc([d],[g]);return e.request(0,ef(m,b)).Z(function(p){p=hg(p.data,a.tagName);if(!p)return Pe(new N(2,4,4001,g));
594
+ 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 Fo(a,b,c,m[0],e,f+1)})}
595
+ function Fo(a,b,c,d,e,f){f=void 0===f?0:f;if(Tf(a,"http://www.w3.org/1999/xlink","href")){var g=Eo(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return Fo(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"==Tf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Fo(k,b,c,d,e,f)));return Te(g).Z(function(){return a})};function Go(a,b,c,d,e,f,g){var h,k=(new Bf).U("sidx",function(l){h=Ho(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
596
+ function Ho(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Lb(),m=g.reader.Lb();g.reader.skip(2);var p=g.reader.Td();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.N(),t=(n&2147483648)>>>31;n&=2147483647;var y=g.reader.N();g.reader.skip(4);if(1==t)throw new N(2,3,3006);h.push(new oi(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 Io(a){this.h=Ib(a);this.g=new yf(this.h,0)}Io.prototype.ma=function(){return this.g.ma()};
597
+ function Jo(a){var b=Ko(a);if(7<b.length)throw new N(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=Ko(a);a:{d=r(Lo);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(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.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Ib(a.h,a.g.$(),b);a.g.skip(b);return new Mo(c,d)}
598
+ function Ko(a){var b=a.g.$(),c=a.g.Sa();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Lo=[[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 Mo(a,b){this.id=a;this.g=b}
599
+ function No(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(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 Oo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Io(a.g);for(var p=null,n=null;a.ma();){var t=Jo(a);if(187==t.id){var y=Po(t);y&&(t=c*y.tg,y=b+y.bg,null!=p&&m.push(new oi(p+g,t+g,l,n,y-1,f,g,h,k)),p=t,n=y)}}null!=p&&m.push(new oi(p+g,d+g,l,n,null,f,g,h,k));return m}
600
+ function Po(a){var b=new Io(a.g);a=Jo(b);if(179!=a.id)throw new N(2,3,3013);a=No(a);b=Jo(b);if(183!=b.id)throw new N(2,3,3012);b=new Io(b.g);for(var c=0;b.ma();){var d=Jo(b);if(241==d.id){c=No(d);break}}return{tg:a,bg:c}};function Qo(a,b){b=Do(a,b,"Initialization");if(!b)return null;var c=a.H.za,d=b.getAttribute("sourceURL");d&&(c=dc(a.H.za,[d]));d=0;var e=null;if(b=Xf(b,"range",$f))d=b.start,e=b.end;return new mi(function(){return c},d,e,Ro(a))}
601
+ function So(a,b){var c=Number(Co(a,To,"presentationTimeOffset"))||0,d=Co(a,To,"timescale"),e=1;d&&(e=bg(d)||1);var f=c/e||0,g=Qo(a,To);Uo(a,g);var h=Ye(a);return{Bb:function(){var k=Do(h,To,"RepresentationIndex"),l=h.H.za;k&&(k=k.getAttribute("sourceURL"))&&(l=dc(h.H.za,[k]));k=Vo(h);return Wo(h,b,g,l,k.start,k.end,f)}}}
602
+ function Wo(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,D,z,B,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Xa||!a.W.Fe,l=a.W.start,m=a.W.duration,p=a.H.mimeType.split("/")[1],n=b,t=null,y=[n(d,e,f),"webm"==p?n(c.Ba(),c.Ea,c.la):null],n=null,u(E,Promise.all(y),2);x=E.h;v=x[0];w=x[1]||null;D=null;z=l-g;B=l;G=m?l+m:Infinity;if("mp4"==p)var H=Go(v,e,d,c,z,B,G);else{H=new Io(w);if(440786851!=Jo(H).id)throw new N(2,3,3008);var I=Jo(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
603
+ I=new Io(I.g);for(var J=null;I.ma();){var L=Jo(I);if(357149030==L.id){J=L;break}}if(!J)throw new N(2,3,3010);J=new Io(J.g);L=1E6;for(I=null;J.ma();){var P=Jo(J);if(2807729==P.id)L=No(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=L/1E9;I*=J;L=Jo(new Io(v));if(475249515!=L.id)throw new N(2,3,3007);H=Oo(L,H,J,I,d,c,z,B,G)}D=H;h.Ib(D);t=new tj(D);k&&t.Ya(B,G,!0);return E.return(t)})}
604
+ function To(a){return a.vc}function Vo(a){var b=Do(a,To,"RepresentationIndex");a=Co(a,To,"indexRange");a=$f(a||"");b&&(a=Xf(b,"range",$f,a));return a}function Uo(a,b){Xo(a,b);if(!Vo(a))throw new N(2,4,4002);}function Xo(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=jc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
605
+ function Ro(a){var b=a.H;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.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Yo(a,b){var c=Qo(a,Zo),d=$o(a);if(!d.ha&&!d.timeline&&1<d.Gb.length)throw new N(2,4,4002);if(!d.ha&&!a.W.duration&&!d.timeline&&1==d.Gb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=ap(a.W.start,a.W.duration,a.H.za,d,c);b=!e;e?e.Hb(g,a.presentationTimeline.Qa()):e=new tj(g);a.presentationTimeline.Ib(g);a.Xa&&a.W.Fe||e.Ya(a.W.start,a.W.duration?a.W.start+a.W.duration:
606
+ Infinity,b);f&&(f.segmentIndex=e);return{Bb:function(){e&&0!=e.J.length||e.pc(g);return Promise.resolve(e)}}}function Zo(a){return a.ab}function $o(a){var b=bp(a);a=Bo(a,Zo);var c=a.Mb;0==c&&(c=1);var d=0;a.ha?d=a.ha*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ha:a.ha,startTime:d,Mb:c,Ta:a.Ta,timeline:a.timeline,Gb:b}}
607
+ function ap(a,b,c,d,e){var f=d.Gb.length;d.timeline&&d.timeline.length!=d.Gb.length&&(f=Math.min(d.timeline.length,d.Gb.length));for(var g=a-d.Ta,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={ld:m.ld},p++){var n=d.Gb[p];m.ld=dc(c,[n.Tf]);var t=void 0;t=null!=d.ha?l+d.ha:d.timeline?d.timeline[p].end:l+b;k.push(new oi(a+l,a+t,function(y){return function(){return y.ld}}(m),n.start,n.end,e,g,a,h));l=t}return k}
608
+ function bp(a){return[a.H.ab,a.fa.ab,a.aa.ab].filter(cc).map(function(b){return Nf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.De&&(a.De=!0);var c=b.getAttribute("media");b=Xf(b,"mediaRange",$f,{start:0,end:null});return{Tf:c,start:b.start,end:b.end}})};function cp(a,b,c,d,e,f){var g=dp(a),h=ep(a);fp(h);var k=Ye(a);if(h.mc)return Xo(a,g),{Bb:function(){var t=Ao(h.mc,k.H.id,null,k.bandwidth||null,null);t=dc(k.H.za,[t]);return Wo(k,b,g,t,0,null,h.Ta)}};if(h.ha)return d||"image"===a.fa.contentType||(a.presentationTimeline.Nd(h.ha),a.presentationTimeline.Od(a.W.start)),{Bb:function(){return gp(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=hp(k,h,g);c=a.W.start;var p=a.W.duration?a.W.start+a.W.duration:
609
+ Infinity,n=Infinity!=p;l?(n&&(new tj(m)).Ya(c,p,!0),l.Hb(m,a.presentationTimeline.Qa())):l=new tj(m);a.presentationTimeline.Ib(m);n&&l.Ya(c,p);d&&a.Xa&&(d.segmentIndex=l);return{Bb:function(){l&&0!=l.J.length||l.pc(m);return Promise.resolve(l)}}}function ip(a){return a.wc}function ep(a){var b=Bo(a,ip),c=Co(a,ip,"media");a=Co(a,ip,"index");return{ha:b.ha,timescale:b.timescale,Mb:b.Mb,Ta:b.Ta,ke:b.ke,timeline:b.timeline,Kd:c,mc:a}}
610
+ function fp(a){var b=a.mc?1:0;b+=a.timeline?1:0;b+=a.ha?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.mc&&(a.timeline=null),a.ha=null);if(!a.mc&&!a.Kd)throw new N(2,4,4002);}
611
+ function gp(a,b,c,d,e){function f(J){var L=(J-t)*n,P=L+b.Ta,S=L+l;L=S+n;var Y=Math.min(L,h());S=new oi(S,Y,function(){var fa=Ao(x,w,J,v,P*y);return dc(D,[fa])},0,null,d,z,l,h());S.j=L;return S}function g(){var J=[Math.max(k.Qa(),l),Math.min(k.hb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/n),Math.ceil(J[1]/n)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||p;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.aa.id,p=a.W.duration,n=b.ha,t=b.Mb,y=b.timescale,
612
+ x=b.Kd,v=a.bandwidth||null,w=a.H.id,D=a.H.za,z=l-b.Ta,B=g();a=a.Xa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var G=a;G<=B;++G){var E=f(G);c.push(E)}var H=new tj(c);c=k.hb()<h();G=k.V();if(c||G){var I=Math.max(a,B+1);H.bd(n,function(){var J=k.Qa();H.fb(J);var L=r(g());L.next();L=L.next().value;for(var P=[];I<=L;){var S=f(I);P.push(S);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
613
+ function hp(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Ta;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={kd:h.kd,od:h.od,rd:h.rd,gd:h.gd,td:h.td,hd:h.hd},k++){var l=b.timeline[k],m=l.start,p=l.sg;l=l.end;h.rd=k+b.Mb;h.td=p+b.ke;h.od=a.H.id;h.gd=a.bandwidth||null;h.kd=b.Kd;h.hd=a.H.za;g.push(new oi(d+m,d+l,function(n){return function(){var t=Ao(n.kd,n.od,n.rd,n.gd||null,n.td);return dc(n.hd,[t]).map(function(y){return y.toString()})}}(h),0,null,c,f,d,e))}return g}
614
+ function dp(a){var b=Co(a,ip,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.za;return new mi(function(){var f=Ao(b,c,null,d,null);return dc(e,[f])},0,null,Ro(a))};function jp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}jp.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=[]};
615
+ function kp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa,ua,Ca;return K(function(Da){switch(Da.g){case 1:d=kc;lp(b);mp(b);np(b);op(b);if(!c&&1==b.length){e=b[0];a.g=e.Gc;a.h=e.dd;a.j=e.textStreams;a.i=e.imageStreams;Da.A(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 Da.return();k=b.map(function(Ga){return Ga.Gc});l=b.map(function(Ga){return Ga.dd});m=b.map(function(Ga){return Ga.textStreams});p=b.map(function(Ga){return Ga.imageStreams});
616
+ n=r(m);for(t=n.next();!t.done;t=n.next())y=t.value,y.push(pp(d.X));x=r(p);for(v=x.next();!v.done;v=x.next())w=v.value,w.push(pp(d.Wb));return u(Da,qp(a.g,k,f,rp,sp),3);case 3:return u(Da,qp(a.h,l,f,rp,sp),4);case 4:return u(Da,qp(a.j,m,f,rp,sp),5);case 5:return u(Da,qp(a.i,p,f,rp,sp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(J=r(a.g),L=J.next();!L.done;L=J.next())for(P=L.value,S=r(a.h),Y=S.next();!Y.done;Y=S.next())fa=Y.value,ua=Sg(P.drmInfos,fa.drmInfos),P.drmInfos.length&&fa.drmInfos.length&&
617
+ !ua.length||(Ca=D++,z.push({id:Ca,language:P.language,primary:P.primary,audio:P,video:fa,bandwidth:(P.bandwidth||0)+(fa.bandwidth||0),drmInfos:ua,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),G=r(B),E=G.next();!E.done;E=G.next())H=E.value,I=D++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.eb?H:null,video:H.type==d.ta?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
618
+ a.l=z;A(Da)}})}function lp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Gc),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&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Gc=c}}
619
+ function np(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&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
620
+ function mp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.dd),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&&fb(e.roles,h.roles)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.dd=c}}
621
+ function op(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}}
622
+ function tp(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,J,L,P;return K(function(S){switch(S.g){case 1:b=kc;if(1==a.length)return S.return(a[0]);c=a.map(function(Y){return Y.filter(function(fa){return fa.type==b.eb})});d=a.map(function(Y){return Y.filter(function(fa){return fa.type==b.ta})});e=a.map(function(Y){return Y.filter(function(fa){return fa.type==b.X})});f=a.map(function(Y){return Y.filter(function(fa){return fa.type==b.Wb})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
623
+ k.push(up(b.X));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(up(b.Wb));return u(S,qp([],c,0,vp,wp),2);case 2:return n=S.h,u(S,qp([],d,0,vp,wp),3);case 3:return t=S.h,u(S,qp([],e,0,vp,wp),4);case 4:return y=S.h,u(S,qp([],f,0,vp,wp),5);case 5:x=S.h;v=0;if(t.length&&n.length)for(G=r(n),E=G.next();!E.done;E=G.next())for(H=E.value,I=r(t),J=I.next();!J.done;J=I.next())L=J.value,P=v++,L.variantIds.push(P),H.variantIds.push(P);else for(w=t.concat(n),D=r(w),z=D.next();!z.done;z=D.next())B=z.value,
624
+ B.variantIds=[v++];return S.return(t.concat(n).concat(y).concat(x))}})}
625
+ function qp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,J;return K(function(L){switch(L.g){case 1:f=kc;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){L.A(4);break}m=l.value;return u(L,xp(m,b,c,e,g),5);case 5:p=L.h;if(!p)throw new N(2,4,4037);l=k.next();L.A(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,(D=yp(w,b,d,e,g))&&a.push(D);z=r(g);for(t=z.next();!t.done;t=
626
+ z.next())for(B=t.value,G={},E=r(B),v=E.next();!v.done;G={Wa:G.Wa},v=E.next())if(G.Wa=v.value,H=G.Wa.type==f.X&&!G.Wa.language,I=G.Wa.type==f.Wb&&!G.Wa.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(S){return S.mimeType==P.Wa.mimeType&&Zc(S.codecs)==Zc(P.Wa.codecs)}}(G))))throw new N(2,4,4037);return L.return(a)}})}function xp(a,b,c,d,e){return K(function(f){if(1==f.g)return zp(b,a),a.matchedStreams?a.segmentIndex?u(f,Ap(a,c),2):f.A(2):f.return(!1);Bp(a,c,d,e);return f.return(!0)})}
627
+ function Ap(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 u(l,Promise.all(c),2)}if(a.segmentIndex instanceof wj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
628
+ function yp(a,b,c,d,e){var f=c(a);zp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new wj;return u(g,Ap(f,0),0)})});if(!f.matchedStreams)return null;Bp(f,0,d,e);return f}function Bp(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==sd(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
629
+ function rp(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}
630
+ function vp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
631
+ function sp(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(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Sg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
632
+ (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=rp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),sp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&sp(a.trickModeVideo,b)}
633
+ function wp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(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)}}
634
+ function zp(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Cp,video:Cp,text:Dp,image:Ep}[e.type],g={audio:Fp,video:Gp,text:Hp,image:Ip}[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 Cp(a,b){var c;!(c=b.mimeType!=a.mimeType||Zc(b.codecs)!=Zc(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Sg(a,b).length:1));return c?!1:!0}
635
+ function Dp(a,b){return a.language?b.language?0==sd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Ep(a){return a.tilesLayout?!0:!1}
636
+ function Fp(a,b,c){if(a.id==c.id)return!0;var d=sd(a.language,b.language),e=sd(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;
637
+ d=Jp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Kp)return!0;if(d==Lp)return!1;d=Jp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Kp?!0:d==Lp?!1:a.bandwidth&&Mp(a.bandwidth,b.bandwidth,c.bandwidth)==Kp?!0:!1}
638
+ function Gp(a,b,c){if(a.id==c.id)return!0;var d=Jp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Kp)return!0;if(d==Lp)return!1;if(a.frameRate){d=Jp(a.frameRate,b.frameRate,c.frameRate);if(d==Kp)return!0;if(d==Lp)return!1}return a.bandwidth&&Mp(a.bandwidth,b.bandwidth,c.bandwidth)==Kp?!0:!1}
639
+ function Hp(a,b,c){if(a.id==c.id)return!0;var d=sd(a.language,b.language),e=sd(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!=
640
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Ip(a,b,c){return a.id==c.id?!0:Jp(a.width*a.height,b.width*b.height,c.width*c.height)==Kp?!0:!1}function up(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}}
641
+ function pp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new tj([]),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}}
642
+ function Jp(a,b,c){if(b==a&&a!=c)return Lp;if(c==a&&a!=b)return Kp;if(b>a){if(c<=a||c-a<b-a)return Kp;if(c-a>b-a)return Lp}else{if(c>a)return Lp;if(a-c<a-b)return Kp;if(a-c>a-b)return Lp}return Np}function Mp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Kp:b<a?Lp:Np}var Kp=1,Np=0,Lp=-1;function Op(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new jp;this.F=0;this.I=new Qa(5);this.D=new O(function(){Pp(a)});this.o=new Ze;this.s=null;this.L=[];this.u=Infinity;this.B=!1}q=Op.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.B=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Qp(c),2);d=e.h;c.h&&Rp(c,d);if(!c.h)throw new N(2,7,7001);return e.return(c.i)})};
643
+ 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.D&&(this.D.stop(),this.D=null);return this.o.destroy()};q.update=function(){var a=this,b;return K(function(c){if(1==c.g)return C(c,2),u(c,Qp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c.return();a.h.onError(b);A(c)})};q.onExpirationUpdated=function(){};
644
+ function Qp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=ef(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),$e(a.o,e),u(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 u(k,Sp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k.return(h)})}
645
+ function Sp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=hg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(Tp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Fo(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.o,g);return u(k,g.promise,2)}h=k.h;return k.return(Tp(a,h,c))})}
646
+ function Tp(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa,ua,Ca,Da,Ga;return K(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Nf(b,"Location").map(Vf).filter(cc);0<f.length&&(g=dc(e,f),e=a.m=g);h=Nf(b,"BaseURL");k=h.map(Vf);l=dc(e,k);m=0;h&&h.length&&(m=Xf(h[0],"availabilityTimeOffset",dg)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=Xf(b,"minBufferTime",Zf)||0);a.F=Xf(b,"minimumUpdatePeriod",Zf,-1);t=Xf(b,"availabilityStartTime",Yf);y=Xf(b,
647
+ "timeShiftBufferDepth",Zf);x=a.g.dash.ignoreSuggestedPresentationDelay;v=null;x||(v=Xf(b,"suggestedPresentationDelay",Zf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Xf(b,"maxSegmentDuration",Zf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=r(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.fb(B.Qa());else I=a.g.defaultPresentationDelay||1.5*n,J=null!=v?v:I,B=new T(t,J,a.g.dash.autoCorrectDrift);B.xc("static"==z);(L=B.V())&&
648
+ !isNaN(a.g.availabilityWindowOverride)&&(y=a.g.availabilityWindowOverride);null==y&&(y=Infinity);B.ee(y);P=b.getAttribute("profiles")||"";S={Xa:"static"!=z,presentationTimeline:B,aa:null,W:null,fa:null,H:null,bandwidth:0,De:!1,zb:m,profiles:P.split(",")};Y=Up(a,S,l,b);fa=Y.duration;ua=Y.periods;"static"!=z&&Y.ve||B.Da(fa||Infinity);a.u&&!a.B&&(Ca=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Qe(a.u):a.u&&Va("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.");
649
+ B.Nd(D||1);return u(Ha,kp(a.j,ua,S.Xa),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);Ha.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!B.Ve()){Ha.A(4);break}Da=Nf(b,"UTCTiming");return u(Ha,Vp(a,l,Da),5);case 5:Ga=Ha.h;if(!a.h)return Ha.return();B.Re(Ga);case 4:B.Hd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ha)}})}
650
+ function Up(a,b,c,d){var e=Xf(d,"mediaPresentationDuration",Zf),f=[],g=0;d=Nf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Xf(k,"start",Zf,g),p=k.id,n=Xf(k,"duration",Zf),t=null;if(l){var y=Xf(l,"start",Zf);null!=y&&(t=y-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.L.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Wp(a,b,c,{start:m,duration:t,node:k,Fe:null==t||!l});f.push(g);b.aa.id&&t&&(a.M[b.aa.id]=t);if(null==t){g=
651
+ null;break}g=m+t}}a.L=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,ve:!1}:{periods:f,duration:g,ve:!0}}
652
+ function Wp(a,b,c,d){b.aa=Xp(d.node,null,c);b.W=d;b.aa.zb=b.zb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Nf(d.node,"EventStream");c=b.presentationTimeline.Qa();e=r(e);for(var f=e.next();!f.done;f=e.next())Yp(a,d.start,d.duration,f.value,c);c=Nf(d.node,"AdaptationSet").map(function(m){return Zp(a,b,m)}).filter(cc);if(b.Xa){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.eg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
653
+ }d=c.filter(function(m){return!m.ie});c=c.filter(function(m){return m.ie});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ie.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={Ec:h.Ec},l=k.next())h.Ec=l.value,h.Ec.trickModeVideo=e.streams.find(function(m){return function(p){return Zc(m.Ec.codecs)==Zc(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:$p(d,"audio");g=a.g.disableVideo?[]:$p(d,"video");f=a.g.disableText?
654
+ []:$p(d,jc);c=a.g.disableThumbnails?[]:$p(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Gc:d,dd:e,textStreams:g,imageStreams:f}}
655
+ function $p(a,b){return a.filter(function(c){return c.contentType==b})}
656
+ function Zp(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.fa=Xp(c,b.aa,null);var e=!1,f=Nf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(cc),h=void 0,k=b.fa.contentType==jc;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=
657
+ l}}var p;m=Nf(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=Nf(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"),
658
+ 10)));m=Nf(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,D=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(v="CC"+n,2==t.length?n+=2:n++,D=w);y.set(v,md(D))}}else y.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
659
+ 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,md(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=Nf(c,"ContentProtection");var z=qo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=md(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Nf(c,"Label"))&&l.length&&
660
+ (l=l[0],l.textContent&&(G=l.textContent));l=Nf(c,"Representation");c=l.map(function(E){if(E=aq(a,b,z,h,B,G,e,g,y,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.fa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.fa.contentType||"application"==b.fa.contentType)for(b.fa.contentType=bq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.fa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
661
+ 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(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(cc);return{id:b.fa.id||"__fake__"+a.G++,contentType:b.fa.contentType,language:B,gh:e,streams:c,drmInfos:z.drmInfos,ie:f,eg:k}}
662
+ function aq(a,b,c,d,e,f,g,h,k,l){b.H=Xp(l,b.fa,null);a.u=Math.min(a.u,b.H.zb);if(!cq(b.H))return null;var m=b.W.start;b.bandwidth=Xf(l,"bandwidth",bg)||0;var p=b.H.contentType,n=p==jc||"application"==p;p="image"==p;try{var t=function(H,I,J){return dq(a,H,I,J)};if(b.H.vc)var y=So(b,t);else if(b.H.ab)y=Yo(b,a.l);else if(b.H.wc)y=cp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var x=b.H.za,v=b.W.duration||0;y={Bb:function(){return Promise.resolve(vj(m,v,x))}}}}catch(H){if((n||p)&&4002==H.code)return null;
663
+ throw H;}t=Nf(l,"ContentProtection");t=to(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var w=!1;Nf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Nf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
664
+ (z=l.getAttribute("value")),!z))return null;var B;l=b.H.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"))&&(B="PQ");var G=b.H.id?b.aa.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,I,J;return K(function(L){if(1==L.g){I=(H=G&&b.Xa&&a.l[G])?a.l[G]:E;if(I.segmentIndex)return L.A(0);J=I;return u(L,y.Bb(),3)}J.segmentIndex=L.h;A(L)})},closeSegmentIndex:function(){E.segmentIndex&&
665
+ (E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.fa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Vc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:w,closedCaptions:k,
666
+ hdr:B,tilesLayout:z,matchedStreams:[]};G&&b.Xa&&!a.l[G]&&(a.l[G]=E);return E}function Pp(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Qp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();Rp(a,b);A(d)}})}function Rp(a,b){0>a.F||a.D.R(Math.max(3,a.F-b,Ra(a.I)))}
667
+ function Xp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vc:null,audioSamplingRate:null,zb:0};c=c||b.za;var d=Nf(a,"BaseURL"),e=d.map(Vf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Xf(a,"frameRate",eg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Nf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
668
+ m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Nf(a,"AudioChannelConfiguration");m=eq(m)||b.Vc;n=Xf(a,"audioSamplingRate",cg)||b.audioSamplingRate;f||(f=bq(g,h));var t=Mf(a,"SegmentBase"),y=Mf(a,"SegmentTemplate"),x=t?Xf(t,"availabilityTimeOffset",dg)||0:0,v=y?Xf(y,"availabilityTimeOffset",dg)||0:0;d=d&&d.length?Xf(d[0],"availabilityTimeOffset",dg)||0:0;d=b.zb+d+x+v;return{za:dc(c,e),vc:t||b.vc,ab:Mf(a,"SegmentList")||b.ab,wc:y||b.wc,width:Xf(a,"width",cg)||b.width,height:Xf(a,
669
+ "height",cg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Vc:m,audioSamplingRate:n,zb:d}}
670
+ function eq(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=
671
+ 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 cq(a){var b=a.vc?1:0;b+=a.ab?1:0;b+=a.wc?1:0;if(0==b)return a.contentType==jc||"application"==a.contentType?!0:!1;1!=b&&(a.vc&&(a.ab=null),a.wc=null);return!0}
672
+ function fq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=dc(b,[c]),f=ef(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),$e(a.o,g),u(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=Bc(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
673
+ function Vp(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.A(4);break}h=g.value;C(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.A(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.A(8);
674
+ 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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}p.A(9);break;case 7:return u(p,fq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,fq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
673
675
  3);break;case 5:F(p);case 3:g=f.next();p.A(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}})}
674
- function Wp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Xf(d,"timescale",cg)||1;d=r(Pf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Xf(k,"presentationTime",cg)||0,m=Xf(k,"duration",cg)||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))}}
675
- function bq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Jj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),$e(a.o,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function $p(a,b){return cd(Xc(a,b))?jc:a.split("/")[0]}M("shaka.dash.DashParser",Mp);Yg.mpd=function(){return new Mp};Wg["application/dash+xml"]=function(){return new Mp};Wg["video/vnd.mpeg.dash.mpd"]=function(){return new Mp};function eq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function fq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}fq.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};
676
- fq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function gq(a,b){a=a.getAttribute(b);if(!a)throw new N(2,4,4023,b);return a.value}function hq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function iq(a,b){this.name=a;this.value=b};function jq(a,b){return a.filter(function(c){return c.name==b})}function kq(a,b){return a.filter(function(c){return gq(c,"TYPE")==b})}function lq(a,b){a=jq(a,b);return a.length?a[0]:null}function mq(a){var b=0;b=void 0===b?0:b;return(a=lq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function nq(a,b){return dc([a],[b])[0]};function oq(a){this.h=a;this.g=0}function pq(a){qq(a,/[ \t]+/gm)}function qq(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 rq(a){return a.g==a.h.length?null:(a=qq(a,/[^ \t\n]*/gm))?a[0]:null};function sq(){this.g=0}
677
- function tq(a,b,c){b=Bc(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 N(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=uq(a,g),--a.g,vq.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=uq(a,h);if(wq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
678
- 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=uq(a,m),vq.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"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=nq(d,m.trim()),h&&g.push(h),e.push(new hq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new hq("",g,k)));return new eq(c,b,f,e)}f.push(h);
679
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new iq("URI",k)),e=!0)}}return new eq(c,b,f)}function uq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new oq(d);var f;(f=qq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=qq(d,g);)c.push(new iq(f[1],f[2]||f[3])),pq(d)}return new fq(a,b,c,e)}
680
- var vq="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(" "),wq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function xq(){}function yq(a){try{var b=zq(a);return Re({uri:a,Ge:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Pe(c)}}function zq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(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=Nc(a):e=Ic(a);return{data:e,contentType:c}}
681
- M("shaka.net.DataUriPlugin",xq);xq.parse=yq;bf("data",yq);function Aq(){var a=this;this.g=this.i=null;this.Ka=1;this.o=new Map;this.u=new Map;this.va=new Set;this.h=new Map;this.j=null;this.M="";this.ca=new sq;this.ja=0;this.T=!1;this.O=null;this.B=new O(function(){Bq(a)});this.m=Cq;this.I=null;this.ea=0;this.F=Infinity;this.Y=this.ia=0;this.D=new Ze;this.G=[];this.L=new Map;this.s=new Map;this.da=new Map;this.l=!1}q=Aq.prototype;q.configure=function(a){this.g=a};
682
- 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(),u(f,Dq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,Eq(c,d.data,a),3);e=c.ja;0<e&&c.B.P(e);return f.return(c.I)})};q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.i=null;this.va.clear();this.I=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
683
- q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==Cq)return h.return();b=[];c=Array.from(a.h.values());return c.length?u(h,Fq(a,c[0]),2):h.A(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Fq(a,c[d]));return u(h,Promise.all(b),4)}Gq(a);e=c.some(function(k){return 0==k.ze});e||(f=Hq,Iq(a,f.We),g=c.map(function(k){return k.mc}),a.j.Ia(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
684
- function Fq(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.Xe,d=new Nb(c),a.l&&b.bf&&Qb(d,new Sb("_HLS_skip=YES")),u(x,Dq(a,d.toString()),2);e=x.h;f=tq(a.ca,e.data,e.uri);if(1!=f.type)throw new N(2,4,4017);g=jq(f.g,"EXT-X-DEFINE");h=Jq(a,g);k=b.stream;l=Kq(a,f,k.type,b.nc,h);a.G.push(l);k.segmentIndex.Gb(l,a.j.Oa());l.length&&(m=mq(f.g),p=b.nc.get(m),k.segmentIndex.eb(p));n=l[l.length-1];if(t=lq(f.g,"EXT-X-ENDLIST"))b.ze=!0,b.mc=n.endTime;A(x)})}q.onExpirationUpdated=function(){};
685
- function Lq(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.J[0]||null))for(var g=r(e.nc),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.O=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.O-c.get(d),e.J.splice(0,f),(e=e.J[0]||null)&&Mq(d,-e.startTime);a.T=!0}}}
686
- function Nq(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.J[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.J[0]||null,null==e.g?Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.cd,"Expect AV sync issues!"):Mq(d,e.g-b-e.startTime))}a.T=!0}}}
687
- function Mq(a,b){a.stream.segmentIndex.offset(b);a.mc+=b;for(var c=r(a.nc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.nc.set(d,e+b)}}
688
- function Eq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,B,z,D,G,E,H,I,J,L,P,S,Y,ea,ua,Ca,Da,Ga,Ha,Ec,Fc,ic,qd,tb,ne,Gc,rd;return K(function(Na){switch(Na.g){case 1:d=tq(a.ca,b,a.M);e=jq(d.g,"EXT-X-DEFINE");Oq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],I=ad(G),J=new Map,u(Na,Pq(a,d,c,c,I,H,"",!0,"Media Playlist",null,J,null,!1,!1,E),8);k=jq(d.g,"EXT-X-MEDIA");l=jq(d.g,"EXT-X-STREAM-INF");m=jq(d.g,"EXT-X-IMAGE-STREAM-INF");Qq(a,l);p=
689
- jq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(x=t.value,y=Z(x,"DATA-ID"),v=Z(x,"URI"),w=Z(x,"LANGUAGE"),B=Z(x,"VALUE"),z=(new Map).set("id",y),v&&z.set("uri",nq(a.M,v)),w&&z.set("language",w),B&&z.set("value",B),D=new Q("sessiondata",z),a.i)a.i.onEvent(D);return u(Na,Rq(a,k),4);case 4:return Sq(a,k),u(Na,Tq(a,l),5);case 5:return f=Na.h,u(Na,Uq(a,k),6);case 6:return g=Na.h,u(Na,Vq(a,m),7);case 7:h=Na.h;Na.A(3);break;case 8:L=Na.h,a.h.set(c,L),f.push({id:0,language:"und",
690
- disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Lq(a):Nq(a);P=Infinity;S=r(a.h.values());for(Y=S.next();!Y.done;Y=S.next())ea=Y.value,"text"!=ea.stream.type&&(P=Math.min(P,ea.mc));a.m!=Cq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.ea),a.j.wc(!1)):(a.j=new T(null,0),
691
- a.j.wc(!0));if(a.m!=Cq)a.ja=a.F,ua=Hq,a.m==ua.Ve&&(Ca=a.j.$c,isNaN(a.g.availabilityWindowOverride)||(Ca=a.g.availabilityWindowOverride),a.j.de(Ca));else for(a.j.Ia(P),Da=r(a.h.values()),Y=Da.next();!Y.done;Y=Da.next())Ga=Y.value,Ga.stream.segmentIndex.Xa(0,P);a.G=[];Ha=[];Ec=r(f);for(Fc=Ec.next();!Fc.done;Fc=Ec.next())for(ic=Fc.value,qd=r([ic.video,ic.audio]),tb=qd.next();!tb.done;tb=qd.next())(ne=tb.value)&&Ha.push(ne);return u(Na,Promise.all(Ha.map(function(Mf){return K(function(Nf){return u(Nf,
692
- Mf.createSegmentIndex(),0)})})),9);case 9:Gc=r(Ha);for(tb=Gc.next();!tb.done;tb=Gc.next())rd=tb.value,a.G.push(rd.segmentIndex.J);Gq(a);a.j.Hd();a.I={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.I);A(Na)}})}function Oq(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=Z(d,"NAME");d=Z(d,"VALUE");c&&d&&(a.o.has(c)||a.o.set(c,d))}}
693
- function Jq(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
694
- function Qq(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Wq(a,d);if(f){var g=gc(jc,d);a.s.set(f,g);eb(d,g)}e&&(f=gc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.s.set(e,f));c&&(e=gc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.s.set(c,e))}}
695
- function Uq(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=kq(b,"SUBTITLES"),d=c.map(function(y){var v,w,B;return K(function(z){if(1==z.g){if(v=a.g.disableText)return z.return(null);C(z,2);return u(z,Xq(a,y),4)}if(2!=z.g)return w=z.h,z.return(w.stream);B=F(z);if(a.g.hls.ignoreTextStreamFailures)return z.return(null);throw B;})}),u(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=gq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(p=r(m),n=p.next();!n.done;n=
696
- p.next())t=n.value,t.stream.codecs=l;return x.return(e.filter(function(y){return y}))})}function Vq(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);C(l,2);return u(l,Yq(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
697
- function Rq(a,b){var c;return K(function(d){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});c=b.map(function(e){return Xq(a,e)});return u(d,Promise.all(c),0)})}
698
- function Tq(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=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(gq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=Z(g,"VIDEO-RANGE"),u(y,Zq(a,g),2);x=y.h;for(var v=y.return,w=x.audio,B=x.video,z=r(B),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,
699
- 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(!B.length||z)B=[null];z=[];w=r(w);for(D=w.next();!D.done;D=w.next()){D=D.value;for(var G=r(B),E=G.next();!E.done;E=G.next()){var H=E.value;E=D?D.stream:null;var I=H?H.stream:null,J=D?D.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.cd:"")+" - "+(D?D.cd:"");E&&I&&J.length&&L.length&&!(0<Sg(J,L).length)||a.va.has(H)||(E={id:a.Ka++,language:E?E.language:"und",primary:!!E&&E.primary||
700
- !!I&&I.primary,audio:E,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(E),a.va.add(H))}}return v.call(y,z)})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(ac,[]);e=e.filter(function(g){return null!=g});return f.return(e)})}
701
- function Zq(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=kc,d=Wq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=gq(b,"URI"),n=k.audio.find(function(w){return w&&w.cd==p}),t=gc(c.ra,d),(x=gc(c.cb,d))&&!t?l=c.cb:!h.length&&x&&t?(l=c.ra,d=[[t,x].join()]):k.audio.length&&n?(l=c.cb,m=!0):l=k.video.length&&!k.audio.length?c.cb:c.ra,m?v.A(2):u(v,$q(a,b,d,l),3);2!=v.g&&(y=v.h,k[y.stream.type]=[y]);ar(k);return v.return(k)})}
702
- function Wq(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=Z(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=$c(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function br(a){a=Z(a,"LANGUAGE")||"und";return md(a)}
703
- function ar(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 Sq(a,b){b=kq(b,"CLOSED-CAPTIONS");b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=br(d);var e=gq(d,"GROUP-ID");d=gq(d,"INSTREAM-ID");a.L.get(e)||a.L.set(e,new Map);a.L.get(e).set(d,c)}}
704
- function Xq(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=gq(b,"GROUP-ID");d="";var w=gq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=jc);e=w;e!=jc&&c&&a.s.has(c)&&(d=a.s.get(c));f=cr(gq(b,"URI"),a.o);if(a.h.has(f))return v.return(a.h.get(f));g=br(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=Z(b,"CHARACTERISTICS");t=Z(b,"FORCED");x=
705
- "YES"==t;return u(v,dr(a,f,d,e,g,l,h,m,null,n,x,p),2)}y=v.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(a.h.has(f))return v.return(a.h.get(f));a.h.set(f,y);return v.return(y)})}
706
- function Yq(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=cr(gq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=br(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,dr(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=Z(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]);
707
- if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function $q(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=cr(gq(b,"URI"),a.o);if(a.h.has(e))return k.return(a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.L.get(l):null;g=fc(d,c);return u(k,dr(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)})}
708
- function dr(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=nq(a.M,b),u(y,Dq(a,n),2);t=y.h;n=t.uri;x=tq(a.ca,t.data,n);return y.return(Pq(a,x,b,n,c,d,e,f,g,h,k,l,m,p))})}
709
- function Pq(a,b,c,d,e,f,g,h,k,l,m,p,n,t,x){var y,v,w,B,z,D,G,E,H,I,J,L,P,S,Y,ea,ua,Ca,Da,Ga,Ha,Ec,Fc,ic,qd,tb,ne,Gc,rd,Na,Mf,Nf,on,pn;return K(function(td){if(1==td.g){if(1!=b.type)throw new N(2,4,4017);y=jq(b.g,"EXT-X-DEFINE");v=Jq(a,y);er(a,b);return x?td.A(2):u(td,fr(a,f,e,b,v),3)}2!=td.g&&(x=td.h);w=[];if(b.segments)for(B=r(b.segments),z=B.next();!z.done;z=B.next())D=z.value,G=jq(D.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;I=[];J=new Set;L=r(w);for(P=L.next();!P.done;P=L.next())if(S=P.value,
710
- Y=gq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(ea=gq(S,"KEYFORMAT"),Ca=(ua=gr[ea])?ua(S,x):null){if(Ca.keyIds)for(Da=r(Ca.keyIds),Ga=Da.next();!Ga.done;Ga=Da.next())Ha=Ga.value,J.add(Ha);I.push(Ca)}if(E&&!I.length&&!H)throw new N(2,4,4026);Vi.includes(x)&&(e="");Ec=new Map;Fc=a.l;ic=Kq(a,b,f,Ec,v);Fc!=a.l&&er(a,b);qd=ic[ic.length-1].endTime;tb=new rj(ic);ne=f==jc?"subtitle":void 0;Gc=[];if(p)for(rd=r(p.split(",")),Na=rd.next();!Na.done;Na=rd.next())Mf=Na.value,Gc.push(Mf);on=(Nf=lq(b.g,
711
- "EXT-X-SERVER-CONTROL"))?null!=Nf.getAttribute("CAN-SKIP-UNTIL"):!1;pn={id:a.Ka++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:tb,mimeType:x,codecs:e,kind:ne,encrypted:E,drmInfos:I,keyIds:J,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:Gc,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};
712
- return td.return({stream:pn,cd:c,Xe:d,mc:qd,nc:Ec,bf:on,ze:!1})})}
713
- function hr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Oc(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=mq(c.g);b=nq(c.h,gq(b,"URI"));var g=ef([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 u(p,ir(a,g,6),2);if(3!=
714
- p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;A(p)})}};return h}
715
- function er(a,b){var c=lq(b.g,"EXT-X-PLAYLIST-TYPE"),d=lq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Iq(a,Cq);else{c?Iq(a,jr):Iq(a,kr);d=lq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=lq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ia=Number(gq(c,"PART-TARGET")),a.F=Math.min(a.ia,a.F),b=lq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=b?Number(gq(b,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ea=Math.max(d,a.ea)}}
716
- function lr(a,b,c,d){c=lq(c,"EXT-X-MAP");if(!c)return null;var e=gq(c,"URI");d=cr(nq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=mr(d,c),a.da.set(b,c));return a.da.get(b)}function mr(a,b){var c=0,d=null;if(b=Z(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new mi(function(){return[a]},c,d)}
717
- function nr(a,b,c,d,e,f,g,h,k){var l=d.g,m=cr(d.i,f),p=lq(l,"EXTINF"),n=f=0,t=null;d.h.length&&!a.l&&Va("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=lq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(x=Yf(y.value))}y=pi;lq(l,"EXT-X-GAP")&&(y=2);if(!p){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
718
- if(!a.l)return null}var v=[];if(a.l)for(var w={},B=0;B<d.h.length;w={md:w.md},B++){var z=d.h[B],D=0==B?c:v[v.length-1],G=0==B?e:D.endTime,E=Number(Z(z,"DURATION"))||a.ia;if(E){E=G+E;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=r(or(D,H)),H=I.next().value,I=I.next().value);if(D=Z(z,"URI"))w.md=nq(g,D),D=pi,"YES"==Z(z,"GAP")&&(D=2),v.push(new oi(G,E,function(J){return function(){return[J.md]}}(w),H,I,b,0,0,Infinity,[],"",null,null,D))}}p?
719
- f=e+Number(p.value.split(",")[0]):f=v[v.length-1].endTime;(a=lq(l,"EXT-X-BYTERANGE"))?(t=r(or(c,a.value)),n=t.next().value,t=t.next().value):v.length&&(n=v[0].Ba,t=v[v.length-1].la);c="";a=null;"image"==h&&(c="1x1",h=lq(l,"EXT-X-TILES"))&&(c=gq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new oi(e,f,function(){return m.length?[m]:[]},n,t,b,0,0,Infinity,v,c,a,x,y,k)}function or(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.la+1,d=c+b-1);return[c,d]}
720
- function Gq(a){if(a.j){for(var b=r(a.G),c=b.next();!c.done;c=b.next())a.j.Hb(c.value);a.G=[]}}
721
- function Kq(a,b,c,d,e){var f=b.segments,g=void 0,h=mq(b.g),k=lq(b.g,"EXT-X-SKIP");k=k?Number(Z(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;a.m!=Cq&&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"==gq(w,"METHOD")&&(g=hr(a,w,b));d.set(l,y);v=lr(a,b.h,x.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());(n=x=nr(a,v,n,x,
722
- y,e,b.h,c,g))&&(a.g.hls.ignoreManifestProgramDateTime&&null!=a.O&&l<a.O||p.push(x))}if(a=p.some(function(B){return null!=B.g}))for(b={},c=0;c<p.length;b={Qb:b.Qb,Pb:b.Pb,yc:b.yc,Ta:b.Ta,Ob:b.Ob},c++)if(b.Ta=p[c],null==b.Ta.g)for(b.Pb=0,b.Qb=c,d=function(B){return function(){var z=p[B.Qb];if(z){if(null!=z.g)return z.g+B.Pb;B.Pb-=z.endTime-z.startTime;B.Qb+=1}return null}}(b),b.Ob=0,b.yc=c,e=function(B){return function(){var z=p[B.yc];if(z){z!=B.Ta&&(B.Ob+=z.endTime-z.startTime);if(null!=z.g)return z.g+
723
- B.Ob;--B.yc}return null}}(b);null==b.Ta.g;)b.Ta.g=e(),null==b.Ta.g&&(b.Ta.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 cr(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 N(2,4,4039,e);}}return a}
724
- function fr(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=kc;g=lf;h=Math.trunc((d.segments.length-1)/2);k=cr(d.segments[h].i,e);l=new Nb(k);m=l.ua.split(".").pop();p=pr[b];if((n=p[m])||(n=qr[m]))return w.return(n);if(b==f.X){if("vtt"==c||"wvtt"==c)return w.return("text/vtt");if(c&&""!==c)return w.return("application/mp4")}if(b==f.Vb&&(!c||"jpeg"==c))return w.return("image/jpeg");t=ef([k],a.g.retryParameters);t.method="HEAD";return u(w,ir(a,t,g),2)}x=w.h;y=x.headers["content-type"];
725
- if(!y){if(b==f.X)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(y.split(";")[0])})}function Dq(a,b){b=ef([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return ir(a,b,0)}function Bq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d.return();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return a.m!=Cq&&(b=a.ja,a.B.P(b)),va(d,0);c=F(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.B.P(.1);A(d)})}
726
- function Iq(a,b){a.m=b;a.j&&a.j.wc(a.m==Cq);a.m!=Cq||a.B.stop()}function ir(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);$e(a.D,b);return b.promise}M("shaka.hls.HlsParser",Aq);
727
- var qr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},pr={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",
728
- ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},gr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return ec("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=gq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=gq(a,
729
- "URI");b=zq(b);b=Fb(b.data);b=ec("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=gq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=gq(a,"URI");a=zq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Lf(a,b,new Set,0);return ec("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Cq="VOD",kr=
730
- "EVENT",jr="LIVE",Hq={We:Cq,Cg:kr,Ve:jr};sc("Tizen 3")||sc("Tizen 2")||uc()||(Yg.m3u8=function(){return new Aq},Wg["application/x-mpegurl"]=function(){return new Aq},Wg["application/vnd.apple.mpegurl"]=function(){return new Aq});function rr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ge:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Hc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function sr(){}function tr(a,b,c,d,e){var f=new ur;vf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new vr,h={oe:!1,Se:!1};a=wr(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 Oe(a,function(){h.oe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Se=!0;g.abort()});k.P(b/1E3);a.finally(function(){k.stop()})}return a}
731
- function wr(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,x,y,v,w,B,z;return K(function(D){switch(D.g){case 1:return h=xr,k=yr,n=p=0,t=Date.now(),C(D,2),u(D,h(a,c),4);case 4:return l=D.h,f(zr(l.headers)),x=l.clone().body.getReader(),v=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(G){function E(){var H,I;return K(function(J){switch(J.g){case 1:return C(J,2),u(J,x.read(),4);case 4:H=J.h;va(J,3);break;case 2:return F(J),J.return();case 3:if(H.done){J.A(5);break}p+=H.value.byteLength;if(!g){J.A(5);
732
- break}return u(J,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),E());A(J)}})}E()},new k({start:w}),u(D,l.arrayBuffer(),5);case 5:m=D.h;va(D,3);break;case 2:B=F(D);if(d.oe)throw new N(1,1,7001,a,b);if(d.Se)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,B,b);case 3:return z=zr(l.headers),D.return(rr(z,m,l.status,a,l.url,b))}})}function zr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
733
- function Ar(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",sr);sr.isSupported=Ar;sr.parse=tr;var xr=window.fetch,vr=window.AbortController,yr=window.ReadableStream,ur=window.Headers;Ar()&&(bf("http",tr,2,!0),bf("https",tr,2,!0),bf("blob",tr,2,!0));function Br(){}
734
- function Cr(a,b,c,d,e){var f=new Dr,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 N(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Er(f);e(t);p=!0}};f.onload=function(){var t=Er(f),x=f.response;try{var y=rr(t,x,f.status,a,f.responseURL,c);l(y)}catch(v){m(v)}};f.onerror=function(t){m(new N(1,1,1002,a,t,
735
- c))};f.ontimeout=function(){m(new N(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 Oe(k,function(){f.abort();return Promise.resolve()})}
736
- function Er(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",Br);Br.parse=Cr;var Dr=window.XMLHttpRequest;bf("http",Cr,1,!0);bf("https",Cr,1,!0);bf("blob",Cr,1,!0);function Fr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Gr(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.la}function Hr(a,b){return Jj(a.g.ya(),a.g.Ba,a.g.la,b.streaming.retryParameters)};function Ir(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Jr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Ir.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 Kr(a){var b=this;this.o=a;this.j=new Map;this.i=new mf(function(){return Lr(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Ir}Kr.prototype.destroy=function(){return this.i.destroy()};function Mr(a,b,c){a.m=b;a.l=c}function Lr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
737
- function Nr(a,b,c,d,e,f){nf(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 u(x,Or(a,c),2);h=x.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new Kf(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 Pr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
738
- function Or(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=lf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g.return(f.data)})};function Qr(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()}}Qr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);A(b)})};
739
- function Rr(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 u(g,b(f.key,f.value,f),2)}f.continue();A(g)})}})}Qr.prototype.store=function(){return this.h};Qr.prototype.promise=function(){return this.g};function Sr(a){this.h=a;this.g=[]}Sr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Tr(a,b){return Ur(a,b,"readwrite")}function Ur(a,b,c){c=a.h.transaction([b],c);var d=new Qr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Vr(a,b,c){this.h=new Sr(a);this.i=b;this.g=c}q=Vr.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Wr(this.i)};q.removeSegments=function(a,b){return Xr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Yr(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.pe(e)}))})};q.addManifests=function(){return Wr(this.g)};
740
- q.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function Zr(a,b,c){a=Tr(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=Tr(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 Xr(this,this.g,a,b)};
741
- q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Yr(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.cc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Ur(a.h,a.g,"readonly"),c=new Map,u(d,Rr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.cc(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.pe=function(a){return a};q.cc=function(a){return Promise.resolve(a)};
742
- function Wr(a){return Promise.reject(new N(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=Tr(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Cc:g.Cc},k=h.next())l=k.value,g.Cc=e.add(l),g.Cc.onsuccess=function(p){return function(){f.push(p.Cc.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
743
- function Xr(a,b,c,d){a=Tr(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Bc:e.Bc},f=c.next())e.Bc=f.value,b.delete(e.Bc).onsuccess=function(g){return function(){return d(g.Bc)}}(e);return a.promise()}
744
- function Yr(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Ur(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Ub:h.Ub,Sb:h.Sb},l=k.next())h.Sb=l.value,h.Ub=e.get(h.Sb),h.Ub.onsuccess=function(p){return function(){void 0==p.Ub.result&&g.push(p.Sb);f[p.Sb]=p.Ub.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function $r(a){this.g=new Sr(a)}$r.prototype.destroy=function(){return this.g.destroy()};$r.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Ur(a.g,"session-ids","readonly"),c=[],u(d,Rr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};$r.prototype.add=function(a){var b=Tr(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()};
745
- $r.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Tr(b.g,"session-ids"),u(d,Rr(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function as(){this.g=new Map}as.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)};as.prototype.init=function(){var a=this;bs.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)};
746
- function cs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Aa:d,ka:f},ka:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ds(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,ka:f},e)})})}
747
- function es(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function fs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function gs(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
748
- function hs(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=bs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function is(a,b){bs.set(a,b)}M("shaka.offline.StorageMuxer",as);as.unregister=function(a){bs.delete(a)};as.register=is;as.prototype.destroy=as.prototype.destroy;var bs=new Map;function js(){Vr.apply(this,arguments)}pa(js,Vr);js.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Tr(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 N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
749
- js.prototype.cc=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=ks(a.periods[c],e),b.push(f);return u(h,rp(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})})};
750
- function ks(a,b){ls(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return ms(e,a.startTime,b)})}
751
- function ms(a,b,c){var d=a.initSegmentUri?ns(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=ns(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
752
- 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}}js.prototype.pe=function(a){return{data:a.data}};function ns(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 N(2,9,9004,"Could not parse uri "+a);}
753
- function ls(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++,
754
- 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 os(){Vr.apply(this,arguments)}pa(os,Vr);
755
- os.prototype.cc=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(ps(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,rp(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 Yp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Xf(d,"timescale",cg)||1;d=r(Nf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Xf(k,"presentationTime",cg)||0,m=Xf(k,"duration",cg)||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))}}
677
+ function dq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Lj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),$e(a.o,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function bq(a,b){return cd(Xc(a,b))?jc:a.split("/")[0]}M("shaka.dash.DashParser",Op);Yg.mpd=function(){return new Op};Wg["application/dash+xml"]=function(){return new Op};Wg["video/vnd.mpeg.dash.mpd"]=function(){return new Op};function gq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function hq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}hq.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};
678
+ hq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function iq(a,b){a=a.getAttribute(b);if(!a)throw new N(2,4,4023,b);return a.value}function jq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function kq(a,b){this.name=a;this.value=b};function lq(a,b){return a.filter(function(c){return c.name==b})}function mq(a,b){return a.filter(function(c){return iq(c,"TYPE")==b})}function nq(a,b){a=lq(a,b);return a.length?a[0]:null}function oq(a,b){var c=0;c=void 0===c?0:c;return(a=nq(a,b))?Number(a.value):c}function pq(a,b){return dc([a],[b])[0]};function qq(a){this.h=a;this.g=0}function rq(a){sq(a,/[ \t]+/gm)}function sq(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 tq(a){return a.g==a.h.length?null:(a=sq(a,/[^ \t\n]*/gm))?a[0]:null};function uq(){this.g=0}
679
+ function vq(a,b,c){b=Bc(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 N(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=wq(a,g),--a.g,xq.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=wq(a,h);if(yq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
680
+ 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=wq(a,m),xq.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"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=pq(d,m.trim()),h&&g.push(h),e.push(new jq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new jq("",g,k)));return new gq(c,b,f,e)}f.push(h);
681
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new kq("URI",k)),e=!0)}}return new gq(c,b,f)}function wq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new N(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new qq(d);var f;(f=sq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=sq(d,g);)c.push(new kq(f[1],f[2]||f[3])),rq(d)}return new hq(a,b,c,e)}
682
+ var xq="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(" "),yq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function zq(){}function Aq(a){try{var b=Bq(a);return Re({uri:a,Ie:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Pe(c)}}function Bq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(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=Nc(a):e=Ic(a);return{data:e,contentType:c}}
683
+ M("shaka.net.DataUriPlugin",zq);zq.parse=Aq;bf("data",Aq);function Cq(){var a=this;this.g=this.i=null;this.Ma=1;this.o=new Map;this.u=new Map;this.ya=new Set;this.h=new Map;this.j=null;this.M="";this.da=new uq;this.xa=0;this.T=!1;this.O=null;this.ca=Infinity;this.B=new O(function(){Dq(a)});this.m=Eq;this.I=null;this.ia=0;this.F=Infinity;this.Y=this.ja=0;this.D=new Ze;this.G=[];this.L=new Map;this.s=new Map;this.ea=new Map;this.l=!1}q=Cq.prototype;q.configure=function(a){this.g=a};
684
+ 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(),u(f,Fq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,Gq(c,d.data,a),3);e=c.xa;0<e&&c.B.R(e);return f.return(c.I)})};q.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.i=null;this.ya.clear();this.I=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
685
+ q.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.m==Eq)return h.return();b=[];c=Array.from(a.h.values());return c.length?u(h,Hq(a,c[0]),2):h.A(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Hq(a,c[d]));return u(h,Promise.all(b),4)}Iq(a);e=c.some(function(k){return 0==k.Be});e||(f=Jq,Kq(a,f.Ye),g=c.map(function(k){return k.nc}),a.j.Da(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
686
+ function Hq(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.Ze,d=new Nb(c),a.l&&b.df&&Qb(d,new Sb("_HLS_skip=YES")),u(y,Fq(a,d.toString()),2);e=y.h;f=vq(a.da,e.data,e.uri);if(1!=f.type)throw new N(2,4,4017);g=lq(f.g,"EXT-X-DEFINE");h=Lq(a,g);k=b.stream;l=Mq(a,f,k.type,b.oc,h);a.G.push(l);k.segmentIndex.Hb(l,a.j.Qa());l.length&&(m=oq(f.g,"EXT-X-MEDIA-SEQUENCE"),p=b.oc.get(m),k.segmentIndex.fb(p));n=l[l.length-1];if(t=nq(f.g,"EXT-X-ENDLIST"))b.Be=!0,b.nc=n.endTime;A(y)})}
687
+ q.onExpirationUpdated=function(){};
688
+ function Nq(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.J[0]||null))for(var g=r(e.oc),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.O=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.O-c.get(d),e.J.splice(0,f),e=e.J[0]||null)e=-e.startTime,d.stream.segmentIndex.offset(e),
689
+ Oq(d,e);a.T=!0}}}
690
+ function Pq(a){if(!a.T&&Infinity==a.ca){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.J[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){a.ca=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.J[0]||null;if(null==f.g)Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.cd,"Expect AV sync issues!");else for(Oq(d,f.g-b-f.startTime),d=r(e),e=d.next();!e.done;e=d.next())e.value.ge(b)}}a.T=
691
+ !0}}}function Oq(a,b){a.nc+=b;for(var c=r(a.oc),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.oc.set(d,e+b)}}
692
+ function Gq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa,ua,Ca,Da,Ga,Ha,Fc,Gc,hc,qd,tb,oe,Hc,rd;return K(function(Na){switch(Na.g){case 1:d=vq(a.da,b,a.M);e=lq(d.g,"EXT-X-DEFINE");Qq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],I=ad(G),J=new Map,u(Na,Rq(a,d,c,c,I,H,"",!0,"Media Playlist",null,J,null,!1,!1,E),8);k=lq(d.g,"EXT-X-MEDIA");l=lq(d.g,"EXT-X-STREAM-INF");m=lq(d.g,"EXT-X-IMAGE-STREAM-INF");Sq(a,l);p=
693
+ lq(d.g,"EXT-X-SESSION-DATA");n=r(p);for(t=n.next();!t.done;t=n.next())if(y=t.value,x=Z(y,"DATA-ID"),v=Z(y,"URI"),w=Z(y,"LANGUAGE"),D=Z(y,"VALUE"),z=(new Map).set("id",x),v&&z.set("uri",pq(a.M,v)),w&&z.set("language",w),D&&z.set("value",D),B=new Q("sessiondata",z),a.i)a.i.onEvent(B);return u(Na,Tq(a,k),4);case 4:return Uq(a,k),u(Na,Vq(a,l),5);case 5:return f=Na.h,u(Na,Wq(a,k),6);case 6:return g=Na.h,u(Na,Xq(a,m),7);case 7:h=Na.h;Na.A(3);break;case 8:L=Na.h,a.h.set(c,L),f.push({id:0,language:"und",
694
+ disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Nq(a):Pq(a);P=Infinity;S=r(a.h.values());for(Y=S.next();!Y.done;Y=S.next())fa=Y.value,"text"!=fa.stream.type&&(P=Math.min(P,fa.nc));a.m!=Eq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.ia),a.j.xc(!1)):(a.j=new T(null,0),
695
+ a.j.xc(!0));if(a.m!=Eq)a.xa=a.F,ua=Jq,a.m==ua.Xe&&(Ca=a.j.$c,isNaN(a.g.availabilityWindowOverride)||(Ca=a.g.availabilityWindowOverride),a.j.ee(Ca));else for(a.j.Da(P),Da=r(a.h.values()),Y=Da.next();!Y.done;Y=Da.next())Ga=Y.value,Ga.stream.segmentIndex.Ya(0,P);a.G=[];Ha=[];Fc=r(f);for(Gc=Fc.next();!Gc.done;Gc=Fc.next())for(hc=Gc.value,qd=r([hc.video,hc.audio]),tb=qd.next();!tb.done;tb=qd.next())(oe=tb.value)&&Ha.push(oe);return u(Na,Promise.all(Ha.map(function(Of){return K(function(Pf){return u(Pf,
696
+ Of.createSegmentIndex(),0)})})),9);case 9:Hc=r(Ha);for(tb=Hc.next();!tb.done;tb=Hc.next())rd=tb.value,a.G.push(rd.segmentIndex.J);Iq(a);a.j.Hd();a.I={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.I);A(Na)}})}function Qq(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=Z(d,"NAME");d=Z(d,"VALUE");c&&d&&(a.o.has(c)||a.o.set(c,d))}}
697
+ function Lq(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
698
+ function Sq(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=Z(d,"AUDIO");c=Z(d,"VIDEO");var f=Z(d,"SUBTITLES");d=Yq(a,d);if(f){var g=gc(jc,d);a.s.set(f,g);eb(d,g)}e&&(f=gc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.s.set(e,f));c&&(e=gc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.s.set(c,e))}}
699
+ function Wq(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=mq(b,"SUBTITLES"),d=c.map(function(x){var v,w,D;return K(function(z){if(1==z.g){if(v=a.g.disableText)return z.return(null);C(z,2);return u(z,Zq(a,x),4)}if(2!=z.g)return w=z.h,z.return(w.stream);D=F(z);if(a.g.hls.ignoreTextStreamFailures)return z.return(null);throw D;})}),u(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=iq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(p=r(m),n=p.next();!n.done;n=
700
+ p.next())t=n.value,t.stream.codecs=l;return y.return(e.filter(function(x){return x}))})}function Xq(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);C(l,2);return u(l,$q(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
701
+ function Tq(a,b){var c;return K(function(d){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});c=b.map(function(e){return Zq(a,e)});return u(d,Promise.all(c),0)})}
702
+ function Vq(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=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(iq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,t=Z(g,"VIDEO-RANGE"),u(x,ar(a,g),2);y=x.h;for(var v=x.return,w=y.audio,D=y.video,z=r(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(p)||void 0,B.height=Number(n)||void 0,
703
+ B.frameRate=Number(h)||void 0,B.hdr=t||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=r(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var G=r(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=B?B.stream:null;var I=H?H.stream:null,J=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.cd:"")+" - "+(B?B.cd:"");E&&I&&J.length&&L.length&&!(0<Sg(J,L).length)||a.ya.has(H)||(E={id:a.Ma++,language:E?E.language:"und",primary:!!E&&E.primary||
704
+ !!I&&I.primary,audio:E,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(E),a.ya.add(H))}}return v.call(x,z)})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(ac,[]);e=e.filter(function(g){return null!=g});return f.return(e)})}
705
+ function ar(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=kc,d=Yq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=iq(b,"URI"),n=k.audio.find(function(w){return w&&w.cd==p}),t=gc(c.ta,d),(y=gc(c.eb,d))&&!t?l=c.eb:!h.length&&y&&t?(l=c.ta,d=[[t,y].join()]):k.audio.length&&n?(l=c.eb,m=!0):l=k.video.length&&!k.audio.length?c.eb:c.ta,m?v.A(2):u(v,br(a,b,d,l),3);2!=v.g&&(x=v.h,k[x.stream.type]=[x]);cr(k);return v.return(k)})}
706
+ function Yq(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=Z(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=$c(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function dr(a){a=Z(a,"LANGUAGE")||"und";return md(a)}
707
+ function cr(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 Uq(a,b){b=mq(b,"CLOSED-CAPTIONS");b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value;c=dr(d);var e=iq(d,"GROUP-ID");d=iq(d,"INSTREAM-ID");a.L.get(e)||a.L.set(e,new Map);a.L.get(e).set(d,c)}}
708
+ function Zq(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=iq(b,"GROUP-ID");d="";var w=iq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=jc);e=w;e!=jc&&c&&a.s.has(c)&&(d=a.s.get(c));f=er(iq(b,"URI"),a.o);if(a.h.has(f))return v.return(a.h.get(f));g=dr(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=Z(b,"CHARACTERISTICS");t=Z(b,"FORCED");y=
709
+ "YES"==t;return u(v,fr(a,f,d,e,g,l,h,m,null,n,y,p),2)}x=v.h;a.u.has(c)?a.u.get(c).push(x):a.u.set(c,[x]);if(a.h.has(f))return v.return(a.h.get(f));a.h.set(f,x);return v.return(x)})}
710
+ function $q(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=er(iq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=dr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,fr(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=Z(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]);
711
+ if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function br(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=er(iq(b,"URI"),a.o);if(a.h.has(e))return k.return(a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.L.get(l):null;g=fc(d,c);return u(k,fr(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)})}
712
+ function fr(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=pq(a.M,b),u(x,Fq(a,n),2);t=x.h;n=t.uri;y=vq(a.da,t.data,n);return x.return(Rq(a,y,b,n,c,d,e,f,g,h,k,l,m,p))})}
713
+ function Rq(a,b,c,d,e,f,g,h,k,l,m,p,n,t,y){var x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa,ua,Ca,Da,Ga,Ha,Fc,Gc,hc,qd,tb,oe,Hc,rd,Na,Of,Pf,pn,qn;return K(function(td){if(1==td.g){if(1!=b.type)throw new N(2,4,4017);x=lq(b.g,"EXT-X-DEFINE");v=Lq(a,x);gr(a,b);return y?td.A(2):u(td,hr(a,f,e,b,v),3)}2!=td.g&&(y=td.h);w=[];if(b.segments)for(D=r(b.segments),z=D.next();!z.done;z=D.next())B=z.value,G=lq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;I=[];J=new Set;L=r(w);for(P=L.next();!P.done;P=L.next())if(S=P.value,
714
+ Y=iq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(fa=iq(S,"KEYFORMAT"),Ca=(ua=ir[fa])?ua(S,y):null){if(Ca.keyIds)for(Da=r(Ca.keyIds),Ga=Da.next();!Ga.done;Ga=Da.next())Ha=Ga.value,J.add(Ha);I.push(Ca)}if(E&&!I.length&&!H)throw new N(2,4,4026);Xi.includes(y)&&(e="");Fc=new Map;Gc=a.l;hc=Mq(a,b,f,Fc,v);Gc!=a.l&&gr(a,b);qd=hc[hc.length-1].endTime;tb=new tj(hc);oe=f==jc?"subtitle":void 0;Hc=[];if(p)for(rd=r(p.split(",")),Na=rd.next();!Na.done;Na=rd.next())Of=Na.value,Hc.push(Of);pn=(Pf=nq(b.g,
715
+ "EXT-X-SERVER-CONTROL"))?null!=Pf.getAttribute("CAN-SKIP-UNTIL"):!1;qn={id:a.Ma++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:tb,mimeType:y,codecs:e,kind:oe,encrypted:E,drmInfos:I,keyIds:J,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:Hc,forced:n,channelsCount:l,audioSamplingRate:null,spatialAudio:t,closedCaptions:m,hdr:void 0,tilesLayout:void 0};
716
+ return td.return({stream:qn,cd:c,Ze:d,nc:qd,oc:Fc,df:pn,Be:!1})})}
717
+ function jr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Oc(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=oq(c.g,"EXT-X-MEDIA-SEQUENCE");b=pq(c.h,iq(b,"URI"));var g=ef([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 u(p,
718
+ kr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;A(p)})}};return h}
719
+ function gr(a,b){var c=nq(b.g,"EXT-X-PLAYLIST-TYPE"),d=nq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Kq(a,Eq);else{c?Kq(a,lr):Kq(a,mr);d=nq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=nq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ja=Number(iq(c,"PART-TARGET")),a.F=Math.min(a.ja,a.F),b=nq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=b?Number(iq(b,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ia=Math.max(d,a.ia)}}
720
+ function nr(a,b,c,d){c=nq(c,"EXT-X-MAP");if(!c)return null;var e=iq(c,"URI");d=er(pq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=or(d,c),a.ea.set(b,c));return a.ea.get(b)}function or(a,b){var c=0,d=null;if(b=Z(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new mi(function(){return[a]},c,d)}
721
+ function pr(a,b,c,d,e,f,g,h,k){var l=d.g,m=er(d.i,f),p=nq(l,"EXTINF"),n=f=0,t=null;d.h.length&&!a.l&&Va("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=nq(l,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=Yf(x.value))}x=pi;nq(l,"EXT-X-GAP")&&(x=2);if(!p){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
722
+ if(!a.l)return null}var v=[];if(a.l)for(var w={},D=0;D<d.h.length;w={md:w.md},D++){var z=d.h[D],B=0==D?c:v[v.length-1],G=0==D?e:B.endTime,E=Number(Z(z,"DURATION"))||a.ja;if(E){E=G+E;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=r(qr(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))w.md=pq(g,B),B=pi,"YES"==Z(z,"GAP")&&(B=2),v.push(new oi(G,E,function(J){return function(){return[J.md]}}(w),H,I,b,0,0,Infinity,[],"",null,null,B))}}p?
723
+ f=e+Number(p.value.split(",")[0]):f=v[v.length-1].endTime;(a=nq(l,"EXT-X-BYTERANGE"))?(t=r(qr(c,a.value)),n=t.next().value,t=t.next().value):v.length&&(n=v[0].Ea,t=v[v.length-1].la);c="";a=null;"image"==h&&(c="1x1",h=nq(l,"EXT-X-TILES"))&&(c=iq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new oi(e,f,function(){return m.length?[m]:[]},n,t,b,0,0,Infinity,v,c,a,y,x,k)}function qr(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.la+1,d=c+b-1);return[c,d]}
724
+ function Iq(a){if(a.j){for(var b=r(a.G),c=b.next();!c.done;c=b.next())a.j.Ib(c.value);a.G=[]}}
725
+ function Mq(a,b,c,d,e){var f=b.segments,g=void 0,h=oq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=oq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=nq(b.g,"EXT-X-SKIP");l=l?Number(Z(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;a.m!=Eq&&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;nq(x.g,"EXT-X-DISCONTINUITY")&&h++;var w=r(x.g);for(var D=w.next();!D.done;D=w.next())D=D.value,"EXT-X-KEY"==D.name&&("AES-128"==iq(D,"METHOD")?g=jr(a,D,b):g=void 0);d.set(m,v);w=nr(a,b.h,x.g,e);
726
+ !a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(t=x=pr(a,w,t,x,v,e,b.h,c,g))x.m=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.O&&m<a.O||n.push(x)}if(b=n.some(function(z){return null!=z.g}))for(c={},d=0;d<n.length;c={Rb:c.Rb,Qb:c.Qb,zc:c.zc,Ua:c.Ua,Pb:c.Pb},d++)if(c.Ua=n[d],null==c.Ua.g)for(c.Qb=0,c.Rb=d,e=function(z){return function(){var B=n[z.Rb];if(B){if(null!=B.g)return B.g+z.Qb;z.Qb-=B.endTime-B.startTime;z.Rb+=1}return null}}(c),c.Pb=0,c.zc=d,
727
+ f=function(z){return function(){var B=n[z.zc];if(B){B!=z.Ua&&(z.Pb+=B.endTime-B.startTime);if(null!=B.g)return B.g+z.Pb;--z.zc}return null}}(c);null==c.Ua.g;)c.Ua.g=f(),null==c.Ua.g&&(c.Ua.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.ca;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.ge(a);return n}
728
+ function er(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 N(2,4,4039,e);}}return a}
729
+ function hr(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=kc;g=lf;h=Math.trunc((d.segments.length-1)/2);k=er(d.segments[h].i,e);l=new Nb(k);m=l.wa.split(".").pop();p=rr[b];if((n=p[m])||(n=sr[m]))return w.return(n);if(b==f.X){if("vtt"==c||"wvtt"==c)return w.return("text/vtt");if(c&&""!==c)return w.return("application/mp4")}if(b==f.Wb&&(!c||"jpeg"==c))return w.return("image/jpeg");t=ef([k],a.g.retryParameters);t.method="HEAD";return u(w,kr(a,t,g),2)}y=w.h;x=y.headers["content-type"];
730
+ if(!x){if(b==f.X)return w.return("text/vtt");v=p.mp4;return w.return(v)}return w.return(x.split(";")[0])})}function Fq(a,b){b=ef([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return kr(a,b,0)}function Dq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d.return();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return a.m!=Eq&&(b=a.xa,a.B.R(b)),va(d,0);c=F(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.B.R(.1);A(d)})}
731
+ function Kq(a,b){a.m=b;a.j&&a.j.xc(a.m==Eq);a.m!=Eq||a.B.stop()}function kr(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);$e(a.D,b);return b.promise}M("shaka.hls.HlsParser",Cq);
732
+ var sr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},rr={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",
733
+ ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},ir={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return ec("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=iq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=iq(a,
734
+ "URI");b=Bq(b);b=Fb(b.data);b=ec("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=iq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=iq(a,"URI");a=Bq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Lf(a,b,new Set,0);return ec("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Eq="VOD",mr=
735
+ "EVENT",lr="LIVE",Jq={Ye:Eq,Eg:mr,Xe:lr};sc("Tizen 3")||sc("Tizen 2")||uc()||(Yg.m3u8=function(){return new Cq},Wg["application/x-mpegurl"]=function(){return new Cq},Wg["application/vnd.apple.mpegurl"]=function(){return new Cq});function tr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ie:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ec(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function ur(){}function vr(a,b,c,d,e){var f=new wr;vf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new xr,h={qe:!1,Ue:!1};a=yr(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 Oe(a,function(){h.qe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Ue=!0;g.abort()});k.R(b/1E3);a.finally(function(){k.stop()})}return a}
736
+ function yr(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,y,x,v,w,D,z;return K(function(B){switch(B.g){case 1:return h=zr,k=Ar,n=p=0,t=Date.now(),C(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(Br(l.headers)),y=l.clone().body.getReader(),v=(x=l.headers.get("Content-Length"))?parseInt(x,10):0,w=function(G){function E(){var H,I;return K(function(J){switch(J.g){case 1:return C(J,2),u(J,y.read(),4);case 4:H=J.h;va(J,3);break;case 2:return F(J),J.return();case 3:if(H.done){J.A(5);break}p+=H.value.byteLength;if(!g){J.A(5);
737
+ break}return u(J,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),E());A(J)}})}E()},new k({start:w}),u(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=F(B);if(d.qe)throw new N(1,1,7001,a,b);if(d.Ue)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return z=Br(l.headers),B.return(tr(z,m,l.status,a,l.url,b))}})}function Br(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
738
+ function Cr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",ur);ur.isSupported=Cr;ur.parse=vr;var zr=window.fetch,xr=window.AbortController,Ar=window.ReadableStream,wr=window.Headers;Cr()&&(bf("http",vr,2,!0),bf("https",vr,2,!0),bf("blob",vr,2,!0));function Dr(){}
739
+ function Er(a,b,c,d,e){var f=new Fr,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 N(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=Gr(f);e(t);p=!0}};f.onload=function(){var t=Gr(f),y=f.response;try{var x=tr(t,y,f.status,a,f.responseURL,c);l(x)}catch(v){m(v)}};f.onerror=function(t){m(new N(1,1,1002,a,t,
740
+ c))};f.ontimeout=function(){m(new N(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 Oe(k,function(){f.abort();return Promise.resolve()})}
741
+ function Gr(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",Dr);Dr.parse=Er;var Fr=window.XMLHttpRequest;bf("http",Er,1,!0);bf("https",Er,1,!0);bf("blob",Er,1,!0);function Hr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ir(a){return a.Ba().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ea+":"+a.la}function Jr(a,b){return Lj(a.g.Ba(),a.g.Ea,a.g.la,b.streaming.retryParameters)};function Kr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Lr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Kr.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 Mr(a){var b=this;this.o=a;this.j=new Map;this.i=new mf(function(){return Nr(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Kr}Mr.prototype.destroy=function(){return this.i.destroy()};function Or(a,b,c){a.m=b;a.l=c}function Nr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
742
+ function Pr(a,b,c,d,e,f){nf(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 u(y,Qr(a,c),2);h=y.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new Kf(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 Rr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
743
+ function Qr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=lf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g.return(f.data)})};function Sr(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()}}Sr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);A(b)})};
744
+ function Tr(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 u(g,b(f.key,f.value,f),2)}f.continue();A(g)})}})}Sr.prototype.store=function(){return this.h};Sr.prototype.promise=function(){return this.g};function Ur(a){this.h=a;this.g=[]}Ur.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Vr(a,b){return Wr(a,b,"readwrite")}function Wr(a,b,c){c=a.h.transaction([b],c);var d=new Sr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Xr(a,b,c){this.h=new Ur(a);this.i=b;this.g=c}q=Xr.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Yr(this.i)};q.removeSegments=function(a,b){return Zr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,$r(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.re(e)}))})};q.addManifests=function(){return Yr(this.g)};
745
+ q.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function as(a,b,c){a=Vr(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=Vr(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 Zr(this,this.g,a,b)};
746
+ q.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,$r(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.cc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Wr(a.h,a.g,"readonly"),c=new Map,u(d,Tr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.cc(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.re=function(a){return a};q.cc=function(a){return Promise.resolve(a)};
747
+ function Yr(a){return Promise.reject(new N(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=Vr(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Dc:g.Dc},k=h.next())l=k.value,g.Dc=e.add(l),g.Dc.onsuccess=function(p){return function(){f.push(p.Dc.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
748
+ function Zr(a,b,c,d){a=Vr(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Cc:e.Cc},f=c.next())e.Cc=f.value,b.delete(e.Cc).onsuccess=function(g){return function(){return d(g.Cc)}}(e);return a.promise()}
749
+ function $r(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Wr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Vb:h.Vb,Tb:h.Tb},l=k.next())h.Tb=l.value,h.Vb=e.get(h.Tb),h.Vb.onsuccess=function(p){return function(){void 0==p.Vb.result&&g.push(p.Tb);f[p.Tb]=p.Vb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(p){return f[p]}))})};function bs(a){this.g=new Ur(a)}bs.prototype.destroy=function(){return this.g.destroy()};bs.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Wr(a.g,"session-ids","readonly"),c=[],u(d,Tr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};bs.prototype.add=function(a){var b=Vr(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()};
750
+ bs.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Vr(b.g,"session-ids"),u(d,Tr(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function cs(){this.g=new Map}cs.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)};cs.prototype.init=function(){var a=this;ds.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)};
751
+ function es(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ca:d,ka:f},ka:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function fs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ca:d,ka:f},e)})})}
752
+ function gs(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function hs(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function is(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
753
+ function js(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=ds,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ks(a,b){ds.set(a,b)}M("shaka.offline.StorageMuxer",cs);cs.unregister=function(a){ds.delete(a)};cs.register=ks;cs.prototype.destroy=cs.prototype.destroy;var ds=new Map;function ls(){Xr.apply(this,arguments)}pa(ls,Xr);ls.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Vr(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 N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
754
+ ls.prototype.cc=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=ms(a.periods[c],e),b.push(f);return u(h,tp(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})})};
755
+ function ms(a,b){ns(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return os(e,a.startTime,b)})}
756
+ function os(a,b,c){var d=a.initSegmentUri?ps(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=ps(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
757
+ 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}}ls.prototype.re=function(a){return{data:a.data}};function ps(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 N(2,9,9004,"Could not parse uri "+a);}
758
+ function ns(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++,
759
+ 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 qs(){Xr.apply(this,arguments)}pa(qs,Xr);
760
+ qs.prototype.cc=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(rs(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,tp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
756
761
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
757
- function ps(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,
758
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function qs(){Vr.apply(this,arguments)}pa(qs,Vr);q=qs.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 Zr(this,a,b)};q.cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function rs(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=rs.prototype;
759
- q.init=function(){var a=this,b=new lc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.P(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 js(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new os(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
760
- new os(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new qs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new $r(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 N(2,
762
+ function rs(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,
763
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ss(){Xr.apply(this,arguments)}pa(ss,Xr);q=ss.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 as(this,a,b)};q.cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ts(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=ts.prototype;
764
+ q.init=function(){var a=this,b=new lc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.R(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 ls(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new qs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
765
+ new qs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ss(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new bs(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 N(2,
761
766
  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.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
762
767
  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};
763
- q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,ss(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
764
- function ss(){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 N(2,9,9001,b.error));c.preventDefault()};return a}is("idb",function(){return sc("CrKey")||rc()||!window.indexedDB?null:new rs});function ts(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ts.prototype.Aa=function(){return this.i};ts.prototype.ka=function(){return this.h};ts.prototype.key=function(){return this.l};ts.prototype.toString=function(){return this.j};
765
- function us(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 ts(b,c,d,Number(a[4])):null};function vs(a,b){this.h=a;this.g=b}
766
- function ws(a,b){var c=new T(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=xs(a,d,e,c);e=b.streams.filter(function(l){return l.type==jc}).map(function(l){return ys(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ys(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=
768
+ q.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,us(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
769
+ function us(){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 N(2,9,9001,b.error));c.preventDefault()};return a}ks("idb",function(){return sc("CrKey")||rc()||!window.indexedDB?null:new ts});function vs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}vs.prototype.Ca=function(){return this.i};vs.prototype.ka=function(){return this.h};vs.prototype.key=function(){return this.l};vs.prototype.toString=function(){return this.j};
770
+ function ws(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 vs(b,c,d,Number(a[4])):null};function xs(a,b){this.h=a;this.g=b}
771
+ function ys(a,b){var c=new T(null,0);c.Da(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=zs(a,d,e,c);e=b.streams.filter(function(l){return l.type==jc}).map(function(l){return As(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return As(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=
767
772
  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}}
768
- function xs(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=
769
- b.next())for(e=e.value,g=ys(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=ys(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}
770
- function ys(a,b,c){var d=b.segments.map(function(e){return zs(a,e)});c.Hb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new rj(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,
771
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function zs(a,b){var c=new ts("segment",a.h,a.g,b.dataKey);return new oi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?As(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
772
- function As(a,b){var c=new ts("segment",a.h,a.g,b);return new mi(function(){return[c.toString()]},0,null)};function Bs(){this.g=null}q=Bs.prototype;q.configure=function(){};
773
- 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=us(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new as;ta(m);return u(m,e.init(),4);case 4:return u(m,es(e,d.Aa(),d.ka()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new vs(d.Aa(),d.ka()),l=ws(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
774
- 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 as,C(m,2,3),u(m,e.init(),5);case 5:return u(m,es(e,d.Aa(),d.ka()),6);case 6:return f=m.h,u(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.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
775
- Wg["application/x-offline-manifest"]=function(){return new Bs};function Cs(){}function Ds(a){var b=us(a);b&&"manifest"==b.g?(a={uri:a,Ge:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Re(a)):a=b&&"segment"==b.g?Es(b.key(),b):Pe(new N(2,1,9004,a));return a}function Es(a,b){var c=new as;return Re(void 0).Z(function(){return c.init()}).Z(function(){return es(c,b.Aa(),b.ka())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}
776
- M("shaka.offline.OfflineScheme",Cs);Cs.plugin=Ds;bf("offline",Ds);function Fs(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,Gs(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.A(4);break}g=f.value;h=Hs(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})}
777
- function Hs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new ig({kb:b,onError:function(){},Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,qg(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 F(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return C(f,6),u(f,Bg(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
773
+ function zs(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=
774
+ b.next())for(e=e.value,g=As(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=As(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}
775
+ function As(a,b,c){var d=b.segments.map(function(e){return Bs(a,e)});c.Ib(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new tj(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,
776
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Bs(a,b){var c=new vs("segment",a.h,a.g,b.dataKey);return new oi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Cs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
777
+ function Cs(a,b){var c=new vs("segment",a.h,a.g,b);return new mi(function(){return[c.toString()]},0,null)};function Ds(){this.g=null}q=Ds.prototype;q.configure=function(){};
778
+ 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=ws(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new cs;ta(m);return u(m,e.init(),4);case 4:return u(m,gs(e,d.Ca(),d.ka()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new xs(d.Ca(),d.ka()),l=ys(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};q.stop=function(){return Promise.resolve()};
779
+ 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 cs,C(m,2,3),u(m,e.init(),5);case 5:return u(m,gs(e,d.Ca(),d.ka()),6);case 6:return f=m.h,u(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.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
780
+ Wg["application/x-offline-manifest"]=function(){return new Ds};function Es(){}function Fs(a){var b=ws(a);b&&"manifest"==b.g?(a={uri:a,Ie:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Re(a)):a=b&&"segment"==b.g?Gs(b.key(),b):Pe(new N(2,1,9004,a));return a}function Gs(a,b){var c=new cs;return Re(void 0).Z(function(){return c.init()}).Z(function(){return gs(c,b.Ca(),b.ka())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}
781
+ M("shaka.offline.OfflineScheme",Es);Es.plugin=Fs;bf("offline",Fs);function Hs(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,Is(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.A(4);break}g=f.value;h=Js(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})}
782
+ function Js(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new ig({lb:b,onError:function(){},Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,qg(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 F(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return C(f,6),u(f,Bg(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
778
783
  9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return C(h,2),u(h,Cg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
779
- function Gs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function Is(a,b,c){var d=b.presentationTimeline.getDuration();b=Js(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ks(a,b){var c=ws(new vs(a.Aa(),a.ka()),b),d=b.appMetadata||{};c=Js(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}}
780
- function Js(a){var b=[],c=ke(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(be(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ce(c.value));return b};function Ls(){this.g={}}function Ms(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 Ns(a,b){a.g[b.id]=b.bandwidth||2048}function Os(a,b){a=a.g[b];null==a&&(a=0);return a};function Ps(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.hc()):(this.h=jl(),this.g=new af);this.i=[];this.j=[];var c=!a;this.l=new mf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Lr(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 u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
781
- case 4:b.h=null,b.g=null,A(k)}})})}function Qs(){if(oc())a:{var a=r(bs.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=Ps.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dl(a,b));return ll(this.h,a)};q.getConfiguration=function(){var a=jl();ll(a,this.h,jl());return a};q.hc=function(){return this.g};
782
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Kr(this.g);this.j.push(f);b=Rs(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,Vg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Oe(b,function(){return Lr(f)});b.finally(function(){eb(d.j,f)});return Ss(this,b)};
783
- function Rs(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,x,y,v,w,B,z;return K(function(D){switch(D.g){case 1:return Ts(),h=g=null,k=new as,p=m=l=null,C(D,2,3),u(D,d(),5);case 5:return g=D.h,u(D,Us(a,b,g,e),6);case 6:n=D.h;Vs(a);t=!n.presentationTimeline.V()&&!n.presentationTimeline.jb();if(!t)throw new N(2,9,9005,b);return u(D,Ws(a,n,function(G){p=p||G},e),7);case 7:h=D.h;Vs(a);if(p)throw p;return u(D,Xs(n,e),8);case 8:return u(D,k.init(),9);case 9:return Vs(a),u(D,cs(k),10);case 10:return l=D.h,Vs(a),x=Ys(h,
784
- n,b,c,e,f),y=x.Of,v=x.fe,u(D,l.ka.addManifests([y]),11);case 11:w=D.h;Vs(a);m=w[0];Vs(a);if(p)throw p;return u(D,Zs(a,v,m,y,f,e,l.ka,n,h),12);case 12:return Vs(a),B=new ts("manifest",l.path.Aa,l.path.ka,m),D.return(Ks(B,y));case 3:return wa(D),u(D,k.destroy(),13);case 13:if(!g){D.A(14);break}return u(D,g.stop(),14);case 14:if(!h){D.A(16);break}return u(D,h.destroy(),16);case 16:xa(D,0);break;case 2:z=F(D);if(null==m){D.A(18);break}return u(D,$s(m),18);case 18:throw p||z;}})}
785
- function Zs(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,x,y,v,w,B;return K(function(z){switch(z.g){case 1:l={};m=0;p=function(D,G){var E,H,I,J,L,P,S;return K(function(Y){if(1==Y.g){E={};H=r(D);for(I=H.next();!I.done;E={bb:E.bb},I=H.next())E.bb=I.value,J=Hr(E.bb,f),L=E.bb.i,P=E.bb.h,S=function(ea){return function(ua){var Ca,Da,Ga;return K(function(Ha){if(1==Ha.g)return u(Ha,g.addSegments([{data:ua}]),2);Ca=Ha.h;Vs(a);Da=ea.bb.g;Ga=Gr(Da);l[Ga]=Ca[0];m+=ua.byteLength;A(Ha)})}}(E),Nr(e,E.bb.groupId,J,L,P,S);return u(Y,
786
- Pr(e),2)}if(!G)return Y.A(0);Vs(a);at(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};n=!1;C(z,2);if(!bt(h)||!n||ct(h)){z.A(4);break}return u(z,p(b.filter(function(D){return D.h}),!0),5);case 5:return Vs(a),b=b.filter(function(D){return!D.h}),t=l,x=m,l={},m=0,u(z,dt(g,c,d,t,x,function(){return Vs(a)}),6);case 6:Vs(a);case 4:if(n){z.A(7);break}return u(z,p(b,!1),8);case 8:return Vs(a),y=l,v=m,l={},m=0,u(z,dt(g,c,d,y,v,function(){return Vs(a)}),9);case 9:Vs(a);case 7:va(z,0);break;case 2:return w=F(z),
787
- B=Object.values(l),u(z,g.removeSegments(B,function(){}),10);case 10:throw w;}})}function $s(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new as,u(f,b.init(),2);case 2:return u(f,cs(b),3);case 3:return c=f.h,d=new ts("manifest",c.path.Aa,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Ps,u(f,e.remove(d.toString()),0)}})}
788
- function dt(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;C(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&&
789
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=F(w),u(w,$s(b),5);case 5:if(g){w.A(6);break}v=Object.values(d);return u(w,a.removeSegments(v,function(){}),6);case 6:throw y;}})}
790
- function Xs(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,x,y,v,w,B,z,D,G,E,H,I,J,L,P,S,Y,ea;return K(function(ua){switch(ua.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(ua,Pd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;zd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(be(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
791
- d.push(ce(t));x=r(a.imageStreams);for(y=x.next();!y.done;y=x.next())v=y.value,d.push(de(v));return u(ua,b.offline.trackSelectionCallback(d),3);case 3:w=ua.h;B=a.presentationTimeline.getDuration();z=0;D=r(w);for(G=D.next();!G.done;G=D.next())E=G.value,H=E.bandwidth*B/8,z+=H;C(ua,4);return u(ua,b.offline.downloadSizeCallback(z),6);case 6:I=ua.h;if(!I)throw new N(2,9,9014);va(ua,5);break;case 4:J=F(ua);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:L=new Set;P=new Set;S=new Set;Y=r(w);for(G=
792
- Y.next();!G.done;G=Y.next())ea=G.value,"variant"==ea.type&&L.add(ea.id),"text"==ea.type&&P.add(ea.id),"image"==ea.type&&S.add(ea.id);a.variants=a.variants.filter(function(Ca){return L.has(Ca.id)});a.textStreams=a.textStreams.filter(function(Ca){return P.has(Ca.id)});a.imageStreams=a.imageStreams.filter(function(Ca){return S.has(Ca.id)});et(a);A(ua)}})}
793
- function Ys(a,b,c,d,e,f){var g=Is(c,b,d),h=e.offline.progressCallback;Mr(f,function(t,x){g.size=x;h(g,t)},function(t,x){k&&e.offline.usePersistentLicense&&l==x&&yg(a,"cenc",t)});var k=bt(b)&&!ct(b),l=null;k&&(l=ft.get(a.g.keySystem));for(var m=new Ls,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())Ns(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())Ms(m,p.value);m=gt(f,m,b,e);f=m.streams;m=m.fe;n=a.g;p=e.offline.usePersistentLicense;
794
- n&&p&&(n.initData=[]);return{Of:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.fc(),streams:f,sessionIds:p?Hg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},fe:m}}function bt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
795
- function ct(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 at(a,b,c,d){b.expiration=c.fc();c=Hg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(bt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}q.remove=function(a){return ht(this,it(this,a))};
796
- function it(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Ts();c=us(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new as;ta(k);return u(k,e.init(),4);case 4:return u(k,es(e,d.Aa(),d.ka()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([jt(a,h,e),kt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
797
- function lt(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:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function jt(a,b,c){return K(function(d){return u(d,mt(a.g,a.h.drm,c,b),0)})}
798
- function kt(a,b,c){function d(){}var e=nt(c);Ks(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.bg=function(){return ht(this,ot(this))};
799
- function ot(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return Ts(),b=a.g,c=a.h.drm,d=new as,e=!1,ta(p),u(p,d.init(),4);case 4:f=[],fs(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.A(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,Fs(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.A(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p.return(!e)}})}
800
- q.list=function(){return ht(this,pt())};function pt(){var a,b,c;return K(function(d){switch(d.g){case 1:return Ts(),a=[],b=new as,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ds(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Ks(new ts("manifest",e.Aa,e.ka,l),k);a.push(k)});A(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
801
- function Us(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),
802
- Vs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Vs(a),k=qt(h),u(l,Promise.all(tf(k,function(m){return m.createSegmentIndex()})),3);Vs(a);if(e)throw e;return l.return(h)})}
803
- function Ws(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new ig({kb:a.g,onError:c,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,ng(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Bg(e),3);case 3:return u(f,Ag(e),4);case 4:return f.return(e)}})}
804
- function gt(a,b,c,d){var e=new Map,f=qt(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=rt(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()),fe:Array.from(e.values())}}
805
- function rt(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,
806
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;st(d,c.presentationTimeline.Oa(),function(l){var m=Gr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Os(b,d.id)*n;n=Jr(a.g,n);f.set(m,new Fr(l,n,k,!1))}l.i&&(p=Gr(l.i),f.has(p)||(n=.5*Os(b,d.id),n=Jr(a.g,n),f.set(p,new Fr(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,
807
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function st(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 Vs(a){if(a.l.g)throw new N(2,9,7001);}function Ts(){if(!Qs())throw new N(2,9,9E3);}function ht(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);eb(a.i,b);return xa(c,0)})}
808
- function Ss(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){eb(a.i,c)})}function nt(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)}
809
- function mt(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=gs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:lt(d,!1),videoCapabilities:lt(d,!0)}});return u(h,Fs(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
810
- function qt(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}
811
- function et(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",Ps);Ps.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new as,ta(b),u(b,hs(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Ps.prototype.list=Ps.prototype.list;
812
- Ps.prototype.removeEmeSessions=Ps.prototype.bg;Ps.prototype.remove=Ps.prototype.remove;Ps.prototype.store=Ps.prototype.store;Ps.prototype.getNetworkingEngine=Ps.prototype.hc;Ps.prototype.getConfiguration=Ps.prototype.getConfiguration;Ps.prototype.configure=Ps.prototype.configure;Ps.prototype.destroy=Ps.prototype.destroy;Ps.support=Qs;
813
- var ft=(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");
814
- Sm.offline=Qs;function tt(){}function ut(a,b){a={priority:b||0,$e:a};for(b=0;b<vt.length;b++)if(vt[b].priority<a.priority){vt.splice(b,0,a);return}vt.push(a)}M("shaka.polyfill",tt);tt.register=ut;tt.installAll=function(){for(var a=r(vt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.$e()}catch(c){Va("Error installing polyfill!",c)}}};var vt=[];function wt(){this.g=new xt}function yt(){window.AbortController||(window.AbortController=wt,window.AbortSignal=xt)}wt.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 Q("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(wt.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});tt.AbortController=wt;wt.install=yt;
815
- function xt(){R.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(xt,R);da.Object.defineProperties(xt.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});ut(yt);function zt(){}function At(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Bt(b.value)}function Bt(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)}})}tt.Aria=zt;zt.install=At;ut(At);function Ct(){}function Dt(){Et()}tt.EncryptionScheme=Ct;Ct.install=Dt;ut(Dt,-2);function Ft(){}
816
- function Gt(){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}}),
817
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Ht);document.addEventListener("webkitfullscreenerror",Ht);document.addEventListener("mozfullscreenchange",Ht);document.addEventListener("mozfullscreenerror",Ht);document.addEventListener("MSFullscreenChange",Ht);document.addEventListener("MSFullscreenError",Ht)}}
818
- function Ht(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)}tt.Fullscreen=Ft;Ft.install=Gt;ut(Gt);function It(){}function Jt(){var a=!0;if(vc()||sc("PlayStation 5")||wc()||sc("Web0S")||tc()||sc("CrKey")||sc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Kt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Lt)}
819
- function Lt(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,x,y,v,w;return K(function(B){switch(B.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return B.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!oc())return B.return(b);if(c){if(sc("CrKey")){if(!window.cast)throw new N(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="+
820
- 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 B.return(b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return B.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 B.return(b)}else return B.return(b);if(!a.keySystemConfiguration)return b.supported=!0,B.return(Promise.resolve(b));
821
- 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);C(B,3);return u(B,navigator.requestMediaKeySystemAccess(p.keySystem,[v]),
822
- 5);case 5:w=B.h;va(B,4);break;case 3:F(B);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return B.return(b)}})}tt.MediaCapabilities=It;It.install=Jt;var Kt=null;It.originalMcap=Kt;ut(Jt,-1);function Mt(){}function Nt(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Ot():a?12>=a?(Pt(),Qt()):Pt():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&Rt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&St()}
823
- function Pt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function Qt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Rt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=$c(b)[0]&&a(b)}}
824
- function Ot(){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)}}
825
- function St(){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)})}tt.MediaSource=Mt;Mt.install=Nt;ut(Nt);function Tt(){}function Ut(){screen.orientation||void 0!=window.orientation&&Vt()}function Vt(){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 Wt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}tt.Orientation=Tt;
826
- Tt.install=Ut;function Wt(){R.call(this);this.type="";this.angle=0}pa(Wt,R);
827
- Wt.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)};
828
- Wt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};ut(Ut);function Xt(){}function Yt(a,b){try{var c=new Zt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function $t(a){var b=this.mediaKeys;b&&b!=a&&au(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?au(a,this):Promise.resolve()}function bu(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}
829
- tt.PatchedMediaKeysApple=Xt;Xt.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=$t,window.MediaKeys=cu,window.MediaKeySystemAccess=Zt,navigator.requestMediaKeySystemAccess=Yt,window.shakaMediaKeysPolyfill=!0)};
830
- function Zt(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,
784
+ function Is(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function Ks(a,b,c){var d=b.presentationTimeline.getDuration();b=Ls(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ms(a,b){var c=ys(new xs(a.Ca(),a.ka()),b),d=b.appMetadata||{};c=Ls(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}}
785
+ function Ls(a){var b=[],c=ke(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(be(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ce(c.value));return b};function Ns(){this.g={}}function Os(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 Ps(a,b){a.g[b.id]=b.bandwidth||2048}function Qs(a,b){a=a.g[b];null==a&&(a=0);return a};function Rs(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.ic()):(this.h=ll(),this.g=new af);this.i=[];this.j=[];var c=!a;this.l=new mf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Nr(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 u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
786
+ case 4:b.h=null,b.g=null,A(k)}})})}function Ss(){if(oc())a:{var a=r(ds.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=Rs.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=fl(a,b));return nl(this.h,a)};q.getConfiguration=function(){var a=ll();nl(a,this.h,ll());return a};q.ic=function(){return this.g};
787
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Mr(this.g);this.j.push(f);b=Ts(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,Vg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Oe(b,function(){return Nr(f)});b.finally(function(){eb(d.j,f)});return Us(this,b)};
788
+ function Ts(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,y,x,v,w,D,z;return K(function(B){switch(B.g){case 1:return Vs(),h=g=null,k=new cs,p=m=l=null,C(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,Ws(a,b,g,e),6);case 6:n=B.h;Xs(a);t=!n.presentationTimeline.V()&&!n.presentationTimeline.kb();if(!t)throw new N(2,9,9005,b);return u(B,Ys(a,n,function(G){p=p||G},e),7);case 7:h=B.h;Xs(a);if(p)throw p;return u(B,Zs(n,e),8);case 8:return u(B,k.init(),9);case 9:return Xs(a),u(B,es(k),10);case 10:return l=B.h,Xs(a),y=$s(h,
789
+ n,b,c,e,f),x=y.Qf,v=y.he,u(B,l.ka.addManifests([x]),11);case 11:w=B.h;Xs(a);m=w[0];Xs(a);if(p)throw p;return u(B,at(a,v,m,x,f,e,l.ka,n,h),12);case 12:return Xs(a),D=new vs("manifest",l.path.Ca,l.path.ka,m),B.return(Ms(D,x));case 3:return wa(B),u(B,k.destroy(),13);case 13:if(!g){B.A(14);break}return u(B,g.stop(),14);case 14:if(!h){B.A(16);break}return u(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=F(B);if(null==m){B.A(18);break}return u(B,bt(m),18);case 18:throw p||z;}})}
790
+ function at(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,y,x,v,w,D;return K(function(z){switch(z.g){case 1:l={};m=0;p=function(B,G){var E,H,I,J,L,P,S;return K(function(Y){if(1==Y.g){E={};H=r(B);for(I=H.next();!I.done;E={cb:E.cb},I=H.next())E.cb=I.value,J=Jr(E.cb,f),L=E.cb.i,P=E.cb.h,S=function(fa){return function(ua){var Ca,Da,Ga;return K(function(Ha){if(1==Ha.g)return u(Ha,g.addSegments([{data:ua}]),2);Ca=Ha.h;Xs(a);Da=fa.cb.g;Ga=Ir(Da);l[Ga]=Ca[0];m+=ua.byteLength;A(Ha)})}}(E),Pr(e,E.cb.groupId,J,L,P,S);return u(Y,
791
+ Rr(e),2)}if(!G)return Y.A(0);Xs(a);ct(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};n=!1;C(z,2);if(!dt(h)||!n||et(h)){z.A(4);break}return u(z,p(b.filter(function(B){return B.h}),!0),5);case 5:return Xs(a),b=b.filter(function(B){return!B.h}),t=l,y=m,l={},m=0,u(z,ft(g,c,d,t,y,function(){return Xs(a)}),6);case 6:Xs(a);case 4:if(n){z.A(7);break}return u(z,p(b,!1),8);case 8:return Xs(a),x=l,v=m,l={},m=0,u(z,ft(g,c,d,x,v,function(){return Xs(a)}),9);case 9:Xs(a);case 7:va(z,0);break;case 2:return w=F(z),
792
+ D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function bt(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new cs,u(f,b.init(),2);case 2:return u(f,es(b),3);case 3:return c=f.h,d=new vs("manifest",c.path.Ca,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Rs,u(f,e.remove(d.toString()),0)}})}
793
+ function ft(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;C(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&&
794
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return x=F(w),u(w,bt(b),5);case 5:if(g){w.A(6);break}v=Object.values(d);return u(w,a.removeSegments(v,function(){}),6);case 6:throw x;}})}
795
+ function Zs(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w,D,z,B,G,E,H,I,J,L,P,S,Y,fa;return K(function(ua){switch(ua.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(ua,Pd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;zd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(be(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
796
+ d.push(ce(t));y=r(a.imageStreams);for(x=y.next();!x.done;x=y.next())v=x.value,d.push(de(v));return u(ua,b.offline.trackSelectionCallback(d),3);case 3:w=ua.h;D=a.presentationTimeline.getDuration();z=0;B=r(w);for(G=B.next();!G.done;G=B.next())E=G.value,H=E.bandwidth*D/8,z+=H;C(ua,4);return u(ua,b.offline.downloadSizeCallback(z),6);case 6:I=ua.h;if(!I)throw new N(2,9,9014);va(ua,5);break;case 4:J=F(ua);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:L=new Set;P=new Set;S=new Set;Y=r(w);for(G=
797
+ Y.next();!G.done;G=Y.next())fa=G.value,"variant"==fa.type&&L.add(fa.id),"text"==fa.type&&P.add(fa.id),"image"==fa.type&&S.add(fa.id);a.variants=a.variants.filter(function(Ca){return L.has(Ca.id)});a.textStreams=a.textStreams.filter(function(Ca){return P.has(Ca.id)});a.imageStreams=a.imageStreams.filter(function(Ca){return S.has(Ca.id)});gt(a);A(ua)}})}
798
+ function $s(a,b,c,d,e,f){var g=Ks(c,b,d),h=e.offline.progressCallback;Or(f,function(t,y){g.size=y;h(g,t)},function(t,y){k&&e.offline.usePersistentLicense&&l==y&&yg(a,"cenc",t)});var k=dt(b)&&!et(b),l=null;k&&(l=ht.get(a.g.keySystem));for(var m=new Ns,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())Ps(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())Os(m,p.value);m=it(f,m,b,e);f=m.streams;m=m.he;n=a.g;p=e.offline.usePersistentLicense;
799
+ n&&p&&(n.initData=[]);return{Qf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.hc(),streams:f,sessionIds:p?Hg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},he:m}}function dt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
800
+ function et(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 ct(a,b,c,d){b.expiration=c.hc();c=Hg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(dt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}q.remove=function(a){return jt(this,kt(this,a))};
801
+ function kt(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Vs();c=ws(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new cs;ta(k);return u(k,e.init(),4);case 4:return u(k,gs(e,d.Ca(),d.ka()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([lt(a,h,e),mt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
802
+ function nt(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:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function lt(a,b,c){return K(function(d){return u(d,ot(a.g,a.h.drm,c,b),0)})}
803
+ function mt(a,b,c){function d(){}var e=pt(c);Ms(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.dg=function(){return jt(this,qt(this))};
804
+ function qt(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return Vs(),b=a.g,c=a.h.drm,d=new cs,e=!1,ta(p),u(p,d.init(),4);case 4:f=[],hs(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.A(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,Hs(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.A(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p.return(!e)}})}
805
+ q.list=function(){return jt(this,rt())};function rt(){var a,b,c;return K(function(d){switch(d.g){case 1:return Vs(),a=[],b=new cs,ta(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),fs(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Ms(new vs("manifest",e.Ca,e.ka,l),k);a.push(k)});A(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d.return(a)}})}
806
+ function Ws(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),
807
+ Xs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Xs(a),k=st(h),u(l,Promise.all(tf(k,function(m){return m.createSegmentIndex()})),3);Xs(a);if(e)throw e;return l.return(h)})}
808
+ function Ys(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new ig({lb:a.g,onError:c,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,ng(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Bg(e),3);case 3:return u(f,Ag(e),4);case 4:return f.return(e)}})}
809
+ function it(a,b,c,d){var e=new Map,f=st(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=tt(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()),he:Array.from(e.values())}}
810
+ function tt(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,
811
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;ut(d,c.presentationTimeline.Qa(),function(l){var m=Ir(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Qs(b,d.id)*n;n=Lr(a.g,n);f.set(m,new Hr(l,n,k,!1))}l.i&&(p=Ir(l.i),f.has(p)||(n=.5*Qs(b,d.id),n=Lr(a.g,n),f.set(p,new Hr(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,
812
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function ut(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 Xs(a){if(a.l.g)throw new N(2,9,7001);}function Vs(){if(!Ss())throw new N(2,9,9E3);}function jt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ta(c),u(c,b,4);if(2!=c.g)return c.return(c.h);wa(c);eb(a.i,b);return xa(c,0)})}
813
+ function Us(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){eb(a.i,c)})}function pt(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)}
814
+ function ot(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=is(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:nt(d,!1),videoCapabilities:nt(d,!0)}});return u(h,Hs(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
815
+ function st(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}
816
+ function gt(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",Rs);Rs.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new cs,ta(b),u(b,js(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Rs.prototype.list=Rs.prototype.list;
817
+ Rs.prototype.removeEmeSessions=Rs.prototype.dg;Rs.prototype.remove=Rs.prototype.remove;Rs.prototype.store=Rs.prototype.store;Rs.prototype.getNetworkingEngine=Rs.prototype.ic;Rs.prototype.getConfiguration=Rs.prototype.getConfiguration;Rs.prototype.configure=Rs.prototype.configure;Rs.prototype.destroy=Rs.prototype.destroy;Rs.support=Ss;
818
+ var ht=(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");
819
+ Um.offline=Ss;function vt(){}function wt(a,b){a={priority:b||0,bf:a};for(b=0;b<xt.length;b++)if(xt[b].priority<a.priority){xt.splice(b,0,a);return}xt.push(a)}M("shaka.polyfill",vt);vt.register=wt;vt.installAll=function(){for(var a=r(xt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.bf()}catch(c){Va("Error installing polyfill!",c)}}};var xt=[];function yt(){this.g=new zt}function At(){window.AbortController||(window.AbortController=yt,window.AbortSignal=zt)}yt.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 Q("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(yt.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});vt.AbortController=yt;yt.install=At;
820
+ function zt(){R.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(zt,R);da.Object.defineProperties(zt.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});wt(At);function Bt(){}function Ct(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Dt(b.value)}function Dt(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)}})}vt.Aria=Bt;Bt.install=Ct;wt(Ct);function Et(){}function Ft(){Gt()}vt.EncryptionScheme=Et;Et.install=Ft;wt(Ft,-2);function Ht(){}
821
+ function It(){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}}),
822
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Jt);document.addEventListener("webkitfullscreenerror",Jt);document.addEventListener("mozfullscreenchange",Jt);document.addEventListener("mozfullscreenerror",Jt);document.addEventListener("MSFullscreenChange",Jt);document.addEventListener("MSFullscreenError",Jt)}}
823
+ function Jt(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)}vt.Fullscreen=Ht;Ht.install=It;wt(It);function Kt(){}function Lt(){var a=!0;if(vc()||sc("PlayStation 5")||wc()||sc("Web0S")||tc()||sc("CrKey")||sc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Mt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Nt)}
824
+ function Nt(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,y,x,v,w;return K(function(D){switch(D.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return D.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!oc())return D.return(b);if(c){if(sc("CrKey")){if(!window.cast)throw new N(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="+
825
+ 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 D.return(b)}if(d&&(f=d.contentType,g=MediaSource.isTypeSupported(f),!g))return D.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 D.return(b)}else return D.return(b);if(!a.keySystemConfiguration)return b.supported=!0,D.return(Promise.resolve(b));
826
+ 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);C(D,3);return u(D,navigator.requestMediaKeySystemAccess(p.keySystem,[v]),
827
+ 5);case 5:w=D.h;va(D,4);break;case 3:F(D);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return D.return(b)}})}vt.MediaCapabilities=Kt;Kt.install=Lt;var Mt=null;Kt.originalMcap=Mt;wt(Lt,-1);function Ot(){}function Pt(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Qt():a?12>=a?(Rt(),St()):Rt():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&Tt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ut()}
828
+ function Rt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function St(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Tt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=$c(b)[0]&&a(b)}}
829
+ function Qt(){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)}}
830
+ function Ut(){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)})}vt.MediaSource=Ot;Ot.install=Pt;wt(Pt);function Vt(){}function Wt(){screen.orientation||void 0!=window.orientation&&Xt()}function Xt(){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 Yt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new Q("change");b.dispatchEvent(c)})}vt.Orientation=Vt;
831
+ Vt.install=Wt;function Yt(){R.call(this);this.type="";this.angle=0}pa(Yt,R);
832
+ Yt.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)};
833
+ Yt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};wt(Wt);function Zt(){}function $t(a,b){try{var c=new au(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function bu(a){var b=this.mediaKeys;b&&b!=a&&cu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?cu(a,this):Promise.resolve()}function du(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}
834
+ vt.PatchedMediaKeysApple=Zt;Zt.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=bu,window.MediaKeys=eu,window.MediaKeySystemAccess=au,navigator.requestMediaKeySystemAccess=$t,window.shakaMediaKeysPolyfill=!0)};
835
+ function au(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,
831
836
  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;}
832
- Zt.prototype.createMediaKeys=function(){var a=new cu(this.keySystem);return Promise.resolve(a)};Zt.prototype.getConfiguration=function(){return this.g};function cu(a){this.h=new WebKitMediaKeys(a);this.g=new of}cu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new du(this.h,a)};cu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
833
- function au(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",bu);try{return bj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function du(a){R.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new eu}pa(du,R);q=du.prototype;
834
- q.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Db()?"license-request":"license-renewal").set("message",Gb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(fu(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
835
- 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:fu(c,"output-not-allowed");break;default:fu(c,"internal-error")}});fu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
836
- q.update=function(a){this.g=new lc;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}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 fu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
837
- function eu(){this.size=0;this.g=void 0}q=eu.prototype;q.Db=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Tg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function gu(){}function hu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=iu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ju,window.MediaKeys=ku,window.MediaKeySystemAccess=lu,window.shakaMediaKeysPolyfill=!0)}function iu(){return Promise.reject(Error("The key system specified is not supported."))}
838
- function ju(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}tt.PatchedMediaKeysNop=gu;gu.install=hu;function ku(){throw new TypeError("Illegal constructor.");}ku.prototype.createSession=function(){};ku.prototype.setServerCertificate=function(){};function lu(){this.keySystem="";throw new TypeError("Illegal constructor.");}lu.prototype.getConfiguration=function(){};lu.prototype.createMediaKeys=function(){};ut(hu,-10);function mu(){}
839
- function nu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)ou="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=pu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=qu;window.MediaKeys=ru;window.MediaKeySystemAccess=su;window.shakaMediaKeysPolyfill=!0}}
840
- function tu(a){var b=ou;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function pu(a,b){try{var c=new su(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function qu(a){var b=this.mediaKeys;b&&b!=a&&uu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&uu(a,this);return Promise.resolve()}tt.PatchedMediaKeysWebkit=mu;mu.install=nu;
841
- function su(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),
837
+ au.prototype.createMediaKeys=function(){var a=new eu(this.keySystem);return Promise.resolve(a)};au.prototype.getConfiguration=function(){return this.g};function eu(a){this.h=new WebKitMediaKeys(a);this.g=new of}eu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new fu(this.h,a)};eu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
838
+ function cu(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",du);try{return dj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function fu(a){R.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new gu}pa(fu,R);q=fu.prototype;
839
+ q.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Eb()?"license-request":"license-renewal").set("message",Gb(e.message));e=new Q("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(hu(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
840
+ 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:hu(c,"output-not-allowed");break;default:hu(c,"internal-error")}});hu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
841
+ q.update=function(a){this.g=new lc;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}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 hu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}
842
+ function gu(){this.size=0;this.g=void 0}q=gu.prototype;q.Eb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Tg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function iu(){}function ju(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=ku,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=lu,window.MediaKeys=mu,window.MediaKeySystemAccess=nu,window.shakaMediaKeysPolyfill=!0)}function ku(){return Promise.reject(Error("The key system specified is not supported."))}
843
+ function lu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}vt.PatchedMediaKeysNop=iu;iu.install=ju;function mu(){throw new TypeError("Illegal constructor.");}mu.prototype.createSession=function(){};mu.prototype.setServerCertificate=function(){};function nu(){this.keySystem="";throw new TypeError("Illegal constructor.");}nu.prototype.getConfiguration=function(){};nu.prototype.createMediaKeys=function(){};wt(ju,-10);function ou(){}
844
+ function pu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)qu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=ru;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=su;window.MediaKeys=tu;window.MediaKeySystemAccess=uu;window.shakaMediaKeysPolyfill=!0}}
845
+ function vu(a){var b=qu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function ru(a,b){try{var c=new uu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function su(a){var b=this.mediaKeys;b&&b!=a&&wu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&wu(a,this);return Promise.resolve()}vt.PatchedMediaKeysWebkit=ou;ou.install=pu;
846
+ function uu(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),
842
847
  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"]):
843
- 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;}su.prototype.createMediaKeys=function(){var a=new ru(this.g);return Promise.resolve(a)};su.prototype.getConfiguration=function(){return this.h};function ru(a){this.l=a;this.h=null;this.g=new of;this.i=[];this.j=new Map}
844
- function uu(a,b){a.h=b;a.g.nb();var c=ou;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=vu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Db()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=vu(a,d.sessionId))wu(d,"usable"),
845
- d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=vu(a,d.sessionId);e&&e.handleError(d)}))}ru.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 xu(b,this.l,a);this.i.push(a);return a};ru.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
846
- function vu(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 xu(a,b,c){R.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 yu}pa(xu,R);q=xu.prototype;
847
- 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?wu(this,"output-restricted"):1==b?wu(this,"expired"):wu(this,"internal-error"))};
848
- function zu(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=Fb(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Qc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new lc;var f=tu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).P(.01)}return a.h}
849
- function Au(a,b,c){if(a.g)a.g.then(function(){return Au(a,b,c)}).catch(function(){return Au(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(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=Nc(e.keys[0].k);e=Nc(e.keys[0].kid)}else d=Fb(c),e=null;var f=tu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
850
- function wu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return zu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?zu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new lc;Au(this,b,a);return b};
851
- 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=tu("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 yu(){this.size=0;this.g=void 0}q=yu.prototype;q.Db=function(){return this.g};
852
- q.forEach=function(a){this.g&&a(this.g,Tg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var ou="";ut(nu);function Bu(){}function Cu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Du,Object.defineProperty(a,"disablePictureInPicture",{get:Eu,set:Fu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Gu,document.addEventListener("webkitpresentationmodechanged",Hu,!0))}}
853
- function Hu(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)}
854
- function Du(){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 Gu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
855
- function Eu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Fu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}tt.PiPWebkit=Bu;Bu.install=Cu;ut(Cu);function Iu(){}function Ju(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Ku))}function Ku(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}tt.RandomUUID=Iu;Iu.install=Ju;ut(Ju);function Lu(){}function Mu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Nu)}function Nu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}tt.StorageEstimate=Lu;Lu.install=Mu;ut(Mu);function Ou(){}function Pu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Qu})}function Qu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}tt.Symbol=Ou;Ou.install=Pu;ut(Pu);function Ru(){}function Su(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}tt.VideoPlayPromise=Ru;Ru.install=Su;ut(Su);function Tu(){}function Uu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||uc())&&(a.getVideoPlaybackQuality=Vu)}}function Vu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}tt.VideoPlaybackQuality=Tu;Tu.install=Uu;ut(Uu);function Wu(){}function Xu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Yu;else if(6==b)a=Zu;else{try{var c=!!Yu(1,2,"")}catch(d){c=!1}c&&(a=Yu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Yu(a,b,c){return new window.TextTrackCue(a,b,c)}function Zu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}tt.VTTCue=Wu;Wu.install=Xu;ut(Xu);function $u(){}$u.prototype.parseInit=function(){};$u.prototype.setSequenceMode=function(){};$u.prototype.parseMedia=function(a,b){var c=null,d=[];a=Bc(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=av.exec(e))){var f=bv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new hb(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",$u);$u.prototype.parseMedia=$u.prototype.parseMedia;
856
- $u.prototype.setSequenceMode=$u.prototype.setSequenceMode;$u.prototype.parseInit=$u.prototype.parseInit;var av=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,bv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;dd["application/x-subtitle-lrc"]=function(){return new $u};function cv(){}cv.prototype.parseInit=function(){};cv.prototype.setSequenceMode=function(){};
857
- cv.prototype.parseMedia=function(a,b){var c=Bc(a);a=[];if(""==c)return a;var d=fg(c,"tt");if(!d)throw new N(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Uf(d,dv,"frameRate"),f=Uf(d,dv,"subFrameRate"),g=Uf(d,dv,"frameRateMultiplier"),h=Uf(d,dv,"tickRate"),k=Uf(d,dv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Uf(d,ev,"extent");if("default"!=l&&"preserve"!=l)throw new N(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new fv(e,f,
858
- 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])?Sf(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 jb;var x=t.getAttribute("xml:id");if(x){n.id=x;var y=null;m&&(y=gv.exec(m)||hv.exec(m));x=y?Number(y[1]):null;y=y?Number(y[2]):null;var v,w;if(v=iv(t,g,"extent"))v=(w=gv.exec(v))||hv.exec(v),
859
- 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?Ab:0,n.heightUnits=w||null!=y?Ab:0);if(t=iv(t,g,"origin"))v=(w=gv.exec(t))||hv.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?Ab:0)}else n=null;n&&h.push(n)}if(Pf(c,"p").length)throw new N(2,
860
- 2,2001,"<p> can only be inside <div> in TTML");m=r(Pf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Pf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(b=jv(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
861
- function jv(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(kv),y=x.next();!y.done&&!(t=lv(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});
862
- a=[];if(!y)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=jv(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;v=/\S/.test(n.textContent);var B=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(B||v||"br"==n.tagName||0!=a.length||d&&!h))return null;w=mv(n,c);v=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=nv(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);
863
- w=Math.min(w,b.segmentEnd);if(!B&&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 hb(v,w,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=lv(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==
864
- z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=lv(l,"region",f,"")[0]);ov(b,n,g,t,e,x,0==a.length);return b}
865
- function ov(a,b,c,d,e,f,g){f=f||g;"rtl"==pv(b,c,e,"direction",f)&&(a.direction="rtl");g=pv(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=ib);(g=pv(b,c,e,"textAlign",!0))?(a.positionAlign=qv[g],a.lineAlign=rv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;if(g=pv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=pv(b,c,e,"color",f))a.color=g;if(g=pv(b,c,e,"backgroundColor",
866
- f))a.backgroundColor=g;if(g=pv(b,c,e,"border",f))a.border=g;if(g=pv(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=pv(b,c,e,"fontWeight",f))&&
867
- "bold"==g&&(a.fontWeight=700);g=pv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=pv(b,c,e,"lineHeight",f))&&g.match(sv)&&(a.lineHeight=g);(g=pv(b,c,e,"fontSize",f))&&(g.match(sv)||g.match(tv))&&(a.fontSize=g);if(g=pv(b,c,e,"fontStyle",f))a.fontStyle=zb[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=pv(b,c,e,"textOutline",
868
- f))d=d.split(" "),d[0].match(sv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(sv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=pv(b,c,e,"letterSpacing",f))&&d.match(sv)&&(a.letterSpacing=d);(d=pv(b,c,e,"linePadding",f))&&d.match(sv)&&(a.linePadding=d);if(f=pv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=iv(c,e,"textDecoration"))&&uv(a,c);(b=vv(b,e,"textDecoration"))&&uv(a,b)}
869
- function uv(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")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
870
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function pv(a,b,c,d,e){e=void 0===e?!0:e;return(a=vv(a,c,d))?a:e?iv(b,c,d):null}function iv(a,b,c){if(!a)return null;var d=Uf(a,ev,c);return d?d:wv(a,b,c)}function vv(a,b,c){var d=Uf(a,ev,c);return d?d:wv(a,b,c)}
871
- function wv(a,b,c){a=lv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Tf(a[e],"urn:ebu:tt:style",c);f||(f=Uf(a[e],ev,c));f||(f=vv(a[e],b,c));f&&(d=f)}return d}
872
- function lv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Tf(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 nv(a,b,c,d){a=mv(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}}
873
- function mv(a,b){var c=xv(a.getAttribute("begin"),b),d=xv(a.getAttribute("end"),b);a=xv(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
874
- function xv(a,b){var c=null;if(yv.test(a)){a=yv.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(zv.test(a))c=Av(zv,a);else if(Bv.test(a))c=Av(Bv,a);else if(Cv.test(a))a=Cv.exec(a),c=Number(a[1])/b.frameRate;else if(Dv.test(a))a=Dv.exec(a),c=Number(a[1])/b.g;else if(Ev.test(a))c=Av(Ev,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
875
- function Av(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",cv);cv.prototype.parseMedia=cv.prototype.parseMedia;cv.prototype.setSequenceMode=cv.prototype.setSequenceMode;cv.prototype.parseInit=cv.prototype.parseInit;
876
- function fv(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]))}
877
- var gv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,tv=/^(\d{1,2}(?:\.\d+)?|100)%$/,sv=/^(\d+px|\d+em|\d*\.?\d+c)$/,hv=/^(\d+)px (\d+)px$/,yv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,zv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Bv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Cv=/^(\d*(?:\.\d*)?)f$/,Dv=/^(\d*(?:\.\d*)?)t$/,Ev=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),rv={left:ob,center:"center",right:"end",start:ob,
878
- end:"end"},qv={left:"line-left",center:"center",right:"line-right"},dv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],ev=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],kv=["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 cv};function Fv(){this.g=new cv}Fv.prototype.parseInit=function(a){var b=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};Fv.prototype.setSequenceMode=function(){};Fv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Bf).box("mdat",If(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};
879
- M("shaka.text.Mp4TtmlParser",Fv);Fv.prototype.parseMedia=Fv.prototype.parseMedia;Fv.prototype.setSequenceMode=Fv.prototype.setSequenceMode;Fv.prototype.parseInit=Fv.prototype.parseInit;dd['application/mp4; codecs="stpp"']=function(){return new Fv};dd['application/mp4; codecs="stpp.ttml"']=function(){return new Fv};dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Fv};dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Fv};function Gv(){this.g=!1}Gv.prototype.parseInit=function(){};Gv.prototype.setSequenceMode=function(a){this.g=a};
880
- Gv.prototype.parseMedia=function(a,b){a=Bc(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 N(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=Hv(new oq(d[1]));if(null==a)throw new N(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
881
- 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 oq(d);var f=new jb;rq(d);pq(d);for(var g=rq(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))?
882
- (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");pq(d);g=rq(d)}b.push(f)}e=new Map;Iv(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 hb(0,0,"");for(var l=!1,m=0;m<g.length;m++){var p=
848
+ 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;}uu.prototype.createMediaKeys=function(){var a=new tu(this.g);return Promise.resolve(a)};uu.prototype.getConfiguration=function(){return this.h};function tu(a){this.l=a;this.h=null;this.g=new of;this.i=[];this.j=new Map}
849
+ function wu(a,b){a.h=b;a.g.ob();var c=qu;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=xu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Eb()?"licenserequest":"licenserenewal").set("message",d.message),d=new Q("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=xu(a,d.sessionId))yu(d,"usable"),
850
+ d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=xu(a,d.sessionId);e&&e.handleError(d)}))}tu.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 zu(b,this.l,a);this.i.push(a);return a};tu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
851
+ function xu(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 zu(a,b,c){R.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 Au}pa(zu,R);q=zu.prototype;
852
+ 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?yu(this,"output-restricted"):1==b?yu(this,"expired"):yu(this,"internal-error"))};
853
+ function Bu(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=Fb(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Qc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new lc;var f=vu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).R(.01)}return a.h}
854
+ function Cu(a,b,c){if(a.g)a.g.then(function(){return Cu(a,b,c)}).catch(function(){return Cu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(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=Nc(e.keys[0].k);e=Nc(e.keys[0].kid)}else d=Fb(c),e=null;var f=vu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
855
+ function yu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new Q("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Bu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Bu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new lc;Cu(this,b,a);return b};
856
+ 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=vu("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 Au(){this.size=0;this.g=void 0}q=Au.prototype;q.Eb=function(){return this.g};
857
+ q.forEach=function(a){this.g&&a(this.g,Tg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var qu="";wt(pu);function Du(){}function Eu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Fu,Object.defineProperty(a,"disablePictureInPicture",{get:Gu,set:Hu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Iu,document.addEventListener("webkitpresentationmodechanged",Ju,!0))}}
858
+ function Ju(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)}
859
+ function Fu(){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 Iu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
860
+ function Gu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Hu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}vt.PiPWebkit=Du;Du.install=Eu;wt(Eu);function Ku(){}function Lu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Mu))}function Mu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}vt.RandomUUID=Ku;Ku.install=Lu;wt(Lu);function Nu(){}function Ou(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Pu)}function Pu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}vt.StorageEstimate=Nu;Nu.install=Ou;wt(Ou);function Qu(){}function Ru(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Su})}function Su(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}vt.Symbol=Qu;Qu.install=Ru;wt(Ru);function Tu(){}function Uu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}vt.VideoPlayPromise=Tu;Tu.install=Uu;wt(Uu);function Vu(){}function Wu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||uc())&&(a.getVideoPlaybackQuality=Xu)}}function Xu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}vt.VideoPlaybackQuality=Vu;Vu.install=Wu;wt(Wu);function Yu(){}function Zu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=$u;else if(6==b)a=av;else{try{var c=!!$u(1,2,"")}catch(d){c=!1}c&&(a=$u)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function $u(a,b,c){return new window.TextTrackCue(a,b,c)}function av(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}vt.VTTCue=Yu;Yu.install=Zu;wt(Zu);function bv(){}bv.prototype.parseInit=function(){};bv.prototype.setSequenceMode=function(){};bv.prototype.parseMedia=function(a,b){var c=null,d=[];a=Bc(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=cv.exec(e))){var f=dv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new hb(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",bv);bv.prototype.parseMedia=bv.prototype.parseMedia;
861
+ bv.prototype.setSequenceMode=bv.prototype.setSequenceMode;bv.prototype.parseInit=bv.prototype.parseInit;var cv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,dv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;dd["application/x-subtitle-lrc"]=function(){return new bv};function ev(){}ev.prototype.parseInit=function(){};ev.prototype.setSequenceMode=function(){};
862
+ ev.prototype.parseMedia=function(a,b){var c=Bc(a);a=[];if(""==c)return a;var d=fg(c,"tt");if(!d)throw new N(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Uf(d,fv,"frameRate"),f=Uf(d,fv,"subFrameRate"),g=Uf(d,fv,"frameRateMultiplier"),h=Uf(d,fv,"tickRate"),k=Uf(d,fv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Uf(d,gv,"extent");if("default"!=l&&"preserve"!=l)throw new N(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new hv(e,f,
863
+ 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])?Sf(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 jb;var y=t.getAttribute("xml:id");if(y){n.id=y;var x=null;m&&(x=iv.exec(m)||jv.exec(m));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var v,w;if(v=kv(t,g,"extent"))v=(w=iv.exec(v))||jv.exec(v),
864
+ 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?Ab:0,n.heightUnits=w||null!=x?Ab:0);if(t=kv(t,g,"origin"))v=(w=iv.exec(t))||jv.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?Ab:0)}else n=null;n&&h.push(n)}if(Nf(c,"p").length)throw new N(2,
865
+ 2,2001,"<p> can only be inside <div> in TTML");m=r(Nf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Nf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(b=lv(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
866
+ function lv(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(mv),x=y.next();!x.done&&!(t=nv(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(B){return B.nodeType==Node.TEXT_NODE});
867
+ a=[];if(!x)for(var v=r(n.childNodes),w=v.next();!w.done;w=v.next())(w=lv(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;v=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||v||"br"==n.tagName||0!=a.length||d&&!h))return null;w=ov(n,c);v=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=pv(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);
868
+ w=Math.min(w,b.segmentEnd);if(!D&&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 hb(v,w,""),e.lineBreak=!0,e;b="";x&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(v,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=nv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==
869
+ z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=nv(l,"region",f,"")[0]);qv(b,n,g,t,e,y,0==a.length);return b}
870
+ function qv(a,b,c,d,e,f,g){f=f||g;"rtl"==rv(b,c,e,"direction",f)&&(a.direction="rtl");g=rv(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=ib);(g=rv(b,c,e,"textAlign",!0))?(a.positionAlign=sv[g],a.lineAlign=tv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;if(g=rv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=rv(b,c,e,"color",f))a.color=g;if(g=rv(b,c,e,"backgroundColor",
871
+ f))a.backgroundColor=g;if(g=rv(b,c,e,"border",f))a.border=g;if(g=rv(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=rv(b,c,e,"fontWeight",f))&&
872
+ "bold"==g&&(a.fontWeight=700);g=rv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=rv(b,c,e,"lineHeight",f))&&g.match(uv)&&(a.lineHeight=g);(g=rv(b,c,e,"fontSize",f))&&(g.match(uv)||g.match(vv))&&(a.fontSize=g);if(g=rv(b,c,e,"fontStyle",f))a.fontStyle=zb[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=rv(b,c,e,"textOutline",
873
+ f))d=d.split(" "),d[0].match(uv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(uv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=rv(b,c,e,"letterSpacing",f))&&d.match(uv)&&(a.letterSpacing=d);(d=rv(b,c,e,"linePadding",f))&&d.match(uv)&&(a.linePadding=d);if(f=rv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=kv(c,e,"textDecoration"))&&wv(a,c);(b=xv(b,e,"textDecoration"))&&wv(a,b)}
874
+ function wv(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")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
875
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function rv(a,b,c,d,e){e=void 0===e?!0:e;return(a=xv(a,c,d))?a:e?kv(b,c,d):null}function kv(a,b,c){if(!a)return null;var d=Uf(a,gv,c);return d?d:yv(a,b,c)}function xv(a,b,c){var d=Uf(a,gv,c);return d?d:yv(a,b,c)}
876
+ function yv(a,b,c){a=nv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Tf(a[e],"urn:ebu:tt:style",c);f||(f=Uf(a[e],gv,c));f||(f=xv(a[e],b,c));f&&(d=f)}return d}
877
+ function nv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Tf(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 pv(a,b,c,d){a=ov(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}}
878
+ function ov(a,b){var c=zv(a.getAttribute("begin"),b),d=zv(a.getAttribute("end"),b);a=zv(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
879
+ function zv(a,b){var c=null;if(Av.test(a)){a=Av.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(Bv.test(a))c=Cv(Bv,a);else if(Dv.test(a))c=Cv(Dv,a);else if(Ev.test(a))a=Ev.exec(a),c=Number(a[1])/b.frameRate;else if(Fv.test(a))a=Fv.exec(a),c=Number(a[1])/b.g;else if(Gv.test(a))c=Cv(Gv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
880
+ function Cv(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",ev);ev.prototype.parseMedia=ev.prototype.parseMedia;ev.prototype.setSequenceMode=ev.prototype.setSequenceMode;ev.prototype.parseInit=ev.prototype.parseInit;
881
+ function hv(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]))}
882
+ var iv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,vv=/^(\d{1,2}(?:\.\d+)?|100)%$/,uv=/^(\d+px|\d+em|\d*\.?\d+c)$/,jv=/^(\d+)px (\d+)px$/,Av=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Bv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Dv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Ev=/^(\d*(?:\.\d*)?)f$/,Fv=/^(\d*(?:\.\d*)?)t$/,Gv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),tv={left:ob,center:"center",right:"end",start:ob,
883
+ end:"end"},sv={left:"line-left",center:"center",right:"line-right"},fv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],gv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],mv=["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 ev};function Hv(){this.g=new ev}Hv.prototype.parseInit=function(a){var b=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};Hv.prototype.setSequenceMode=function(){};Hv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Bf).box("mdat",If(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};
884
+ M("shaka.text.Mp4TtmlParser",Hv);Hv.prototype.parseMedia=Hv.prototype.parseMedia;Hv.prototype.setSequenceMode=Hv.prototype.setSequenceMode;Hv.prototype.parseInit=Hv.prototype.parseInit;dd['application/mp4; codecs="stpp"']=function(){return new Hv};dd['application/mp4; codecs="stpp.ttml"']=function(){return new Hv};dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Hv};dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Hv};function Iv(){this.g=!1}Iv.prototype.parseInit=function(){};Iv.prototype.setSequenceMode=function(a){this.g=a};
885
+ Iv.prototype.parseMedia=function(a,b){a=Bc(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 N(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=Jv(new qq(d[1]));if(null==a)throw new N(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
886
+ 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 qq(d);var f=new jb;tq(d);rq(d);for(var g=tq(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))?
887
+ (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");rq(d);g=tq(d)}b.push(f)}e=new Map;Kv(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 hb(0,0,"");for(var l=!1,m=0;m<g.length;m++){var p=
883
888
  /^\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=rb;break;case "italic":l=!0;k.fontStyle="italic";break;case "oblique":l=!0,k.fontStyle="oblique"}break;case "opacity":l=
884
- !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 oq(f[0]);k=Hv(g);p=qq(g,/[ \t]+--\x3e[ \t]+/g);l=Hv(g);if(null==k||null==p||null==l)throw new N(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(),
885
- f.startTime=k,f.endTime=l,f.payload=""):f=new hb(k,l,"");Jv(m,f,e);pq(g);for(k=rq(g);k;)Kv(f,k,b),pq(g),k=rq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};function Iv(a){for(var b=r(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new hb(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new hb(0,0,""),e.backgroundColor=d,a.set(c,e)}
886
- function Jv(a,b,c){0===c.size&&Iv(c);a=Lv(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(Mv)&&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=fg("<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())Nv(f.value,b,d,c);b.nestedCues=
887
- d}else b.payload=a}function Lv(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 Ov(a,b){return a&&0<a.length?a:b}
888
- function Nv(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=Ov(h.backgroundColor,e.backgroundColor),e.color=Ov(h.color,e.color),e.fontFamily=Ov(h.fontFamily,e.fontFamily),e.fontSize=Ov(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=
889
- "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Hv(new oq(g)))e.startTime=g}}if(Wf(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())Nv(a.value,e,c,d)}
890
- function Kv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lb:a.textAlign=ub[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"==
891
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Pv(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=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=nb,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function Pv(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
892
- function Hv(a){a=qq(a,Mv);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",Gv);Gv.prototype.parseMedia=Gv.prototype.parseMedia;Gv.prototype.setSequenceMode=Gv.prototype.setSequenceMode;Gv.prototype.parseInit=Gv.prototype.parseInit;var Mv=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;dd["text/vtt"]=function(){return new Gv};dd['text/vtt; codecs="vtt"']=function(){return new Gv};
893
- dd['text/vtt; codecs="wvtt"']=function(){return new Gv};function Qv(){this.g=null}Qv.prototype.parseInit=function(a){var b=this,c=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).U("mdhd",function(d){d=hi(d.reader,d.version);b.g=d.timescale}).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};Qv.prototype.setSequenceMode=function(){};
894
- Qv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Bf).box("moof",Ff).box("traf",Ff).U("tfdt",function(z){g=!0;c=gi(z.reader,z.version).me}).U("tfhd",function(z){l=fi(z.reader,z.flags).se}).U("trun",function(z){h=!0;d=ii(z.reader,z.version,z.flags).Le}).box("mdat",If(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);a=c;for(var m=new yf(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;var t=n.Wd||l,x=n.ad?
895
- c+n.ad:a;a=x+(t||0);var y=0;do{var v=m.N();y+=v;var w=m.N(),B=null;"vttc"==Jf(w)?8<v&&(B=m.Za(v-8)):m.skip(v-8);t&&B&&(v=Rv(B,b.periodStart+x/this.g,b.periodStart+a/this.g),f.push(v))}while(n.sampleSize&&y<n.sampleSize)}return f.filter(cc)};function Rv(a,b,c){var d,e,f;(new Bf).box("payl",If(function(g){d=Bc(g)})).box("iden",If(function(g){e=Bc(g)})).box("sttg",If(function(g){f=Bc(g)})).parse(a);return d?Sv(d,e,f,b,c):null}
896
- function Sv(a,b,c,d,e){d=new hb(d,e,"");Jv(a,d,new Map);b&&(d.id=b);if(c)for(a=new oq(c),b=rq(a);b;)Kv(d,b,[]),pq(a),b=rq(a);return d}M("shaka.text.Mp4VttParser",Qv);Qv.prototype.parseMedia=Qv.prototype.parseMedia;Qv.prototype.setSequenceMode=Qv.prototype.setSequenceMode;Qv.prototype.parseInit=Qv.prototype.parseInit;dd['application/mp4; codecs="wvtt"']=function(){return new Qv};function Tv(){}Tv.prototype.parseInit=function(){};Tv.prototype.setSequenceMode=function(){};Tv.prototype.parseMedia=function(a){var b=Bc(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 oq(c[0]),e=Uv(d),f=qq(d,/,/g);d=Uv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hb(e,d,c.slice(1).join("\n").trim()))}return a};
897
- function Uv(a){a=qq(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",Tv);Tv.prototype.parseMedia=Tv.prototype.parseMedia;Tv.prototype.setSequenceMode=Tv.prototype.setSequenceMode;Tv.prototype.parseInit=Tv.prototype.parseInit;dd["text/x-subviewer"]=function(){return new Tv};function Vv(){this.g=new Gv}Vv.prototype.parseInit=function(){};Vv.prototype.setSequenceMode=function(){};Vv.prototype.parseMedia=function(a,b){a=Bc(a);a=Wv(a);a=Fb(Ic(a));return this.g.parseMedia(a,b)};function Wv(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",Vv);
898
- Vv.srt2webvtt=Wv;Vv.prototype.parseMedia=Vv.prototype.parseMedia;Vv.prototype.setSequenceMode=Vv.prototype.setSequenceMode;Vv.prototype.parseInit=Vv.prototype.parseInit;dd["text/srt"]=function(){return new Vv};function Xv(){}Xv.prototype.parseInit=function(){};Xv.prototype.setSequenceMode=function(){};
899
- Xv.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Yv.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=Zv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split($v);else if("Style"==e){e=f.split($v);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
900
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={sd:e.sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Zv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split($v);else if("Dialogue"==f){g=g.split($v);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=aw(f.Start);var k=aw(f.End);g=new hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.sd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.sd}}(e)))&&bw(g,f);d.push(g)}return d};
901
- function bw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=cw(c))a.color=c;if(c=b.BackColour)if(c=cw(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=pb;a.textAlign="start";break;case 2:a.displayAlign=pb;a.textAlign=lb;break;case 3:a.displayAlign=pb;a.textAlign="end";
889
+ !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 qq(f[0]);k=Jv(g);p=sq(g,/[ \t]+--\x3e[ \t]+/g);l=Jv(g);if(null==k||null==p||null==l)throw new N(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(),
890
+ f.startTime=k,f.endTime=l,f.payload=""):f=new hb(k,l,"");Lv(m,f,e);rq(g);for(k=tq(g);k;)Mv(f,k,b),rq(g),k=tq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};function Kv(a){for(var b=r(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new hb(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new hb(0,0,""),e.backgroundColor=d,a.set(c,e)}
891
+ function Lv(a,b,c){0===c.size&&Kv(c);a=Nv(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(Ov)&&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=fg("<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())Pv(f.value,b,d,c);b.nestedCues=
892
+ d}else b.payload=a}function Nv(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 Qv(a,b){return a&&0<a.length?a:b}
893
+ function Pv(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=Qv(h.backgroundColor,e.backgroundColor),e.color=Qv(h.color,e.color),e.fontFamily=Qv(h.fontFamily,e.fontFamily),e.fontSize=Qv(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=
894
+ "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Jv(new qq(g)))e.startTime=g}}if(Wf(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())Pv(a.value,e,c,d)}
895
+ function Mv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lb:a.textAlign=ub[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"==
896
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Rv(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=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=nb,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function Rv(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
897
+ function Jv(a){a=sq(a,Ov);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",Iv);Iv.prototype.parseMedia=Iv.prototype.parseMedia;Iv.prototype.setSequenceMode=Iv.prototype.setSequenceMode;Iv.prototype.parseInit=Iv.prototype.parseInit;var Ov=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;dd["text/vtt"]=function(){return new Iv};dd['text/vtt; codecs="vtt"']=function(){return new Iv};
898
+ dd['text/vtt; codecs="wvtt"']=function(){return new Iv};function Sv(){this.g=null}Sv.prototype.parseInit=function(a){var b=this,c=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).U("mdhd",function(d){d=hi(d.reader,d.version);b.g=d.timescale}).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};Sv.prototype.setSequenceMode=function(){};
899
+ Sv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Bf).box("moof",Ff).box("traf",Ff).U("tfdt",function(z){g=!0;c=gi(z.reader,z.version).oe}).U("tfhd",function(z){l=fi(z.reader,z.flags).ue}).U("trun",function(z){h=!0;d=ii(z.reader,z.version,z.flags).Ne}).box("mdat",If(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);a=c;for(var m=new yf(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;var t=n.Xd||l,y=n.ad?
900
+ c+n.ad:a;a=y+(t||0);var x=0;do{var v=m.N();x+=v;var w=m.N(),D=null;"vttc"==Jf(w)?8<v&&(D=m.$a(v-8)):m.skip(v-8);t&&D&&(v=Tv(D,b.periodStart+y/this.g,b.periodStart+a/this.g),f.push(v))}while(n.sampleSize&&x<n.sampleSize)}return f.filter(cc)};function Tv(a,b,c){var d,e,f;(new Bf).box("payl",If(function(g){d=Bc(g)})).box("iden",If(function(g){e=Bc(g)})).box("sttg",If(function(g){f=Bc(g)})).parse(a);return d?Uv(d,e,f,b,c):null}
901
+ function Uv(a,b,c,d,e){d=new hb(d,e,"");Lv(a,d,new Map);b&&(d.id=b);if(c)for(a=new qq(c),b=tq(a);b;)Mv(d,b,[]),rq(a),b=tq(a);return d}M("shaka.text.Mp4VttParser",Sv);Sv.prototype.parseMedia=Sv.prototype.parseMedia;Sv.prototype.setSequenceMode=Sv.prototype.setSequenceMode;Sv.prototype.parseInit=Sv.prototype.parseInit;dd['application/mp4; codecs="wvtt"']=function(){return new Sv};function Vv(){}Vv.prototype.parseInit=function(){};Vv.prototype.setSequenceMode=function(){};Vv.prototype.parseMedia=function(a){var b=Bc(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 qq(c[0]),e=Wv(d),f=sq(d,/,/g);d=Wv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hb(e,d,c.slice(1).join("\n").trim()))}return a};
902
+ function Wv(a){a=sq(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",Vv);Vv.prototype.parseMedia=Vv.prototype.parseMedia;Vv.prototype.setSequenceMode=Vv.prototype.setSequenceMode;Vv.prototype.parseInit=Vv.prototype.parseInit;dd["text/x-subviewer"]=function(){return new Vv};function Xv(){this.g=new Iv}Xv.prototype.parseInit=function(){};Xv.prototype.setSequenceMode=function(){};Xv.prototype.parseMedia=function(a,b){a=Bc(a);a=Yv(a);a=Fb(Ic(a));return this.g.parseMedia(a,b)};function Yv(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",Xv);
903
+ Xv.srt2webvtt=Yv;Xv.prototype.parseMedia=Xv.prototype.parseMedia;Xv.prototype.setSequenceMode=Xv.prototype.setSequenceMode;Xv.prototype.parseInit=Xv.prototype.parseInit;dd["text/srt"]=function(){return new Xv};function Zv(){}Zv.prototype.parseInit=function(){};Zv.prototype.setSequenceMode=function(){};
904
+ Zv.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=$v.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=aw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(bw);else if("Style"==e){e=f.split(bw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
905
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={sd:e.sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=aw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(bw);else if("Dialogue"==f){g=g.split(bw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=cw(f.Start);var k=cw(f.End);g=new hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.sd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.sd}}(e)))&&dw(g,f);d.push(g)}return d};
906
+ function dw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=ew(c))a.color=c;if(c=b.BackColour)if(c=ew(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=pb;a.textAlign="start";break;case 2:a.displayAlign=pb;a.textAlign=lb;break;case 3:a.displayAlign=pb;a.textAlign="end";
902
907
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=lb;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=lb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
903
- function cw(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 aw(a){a=dw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Xv);Xv.prototype.parseMedia=Xv.prototype.parseMedia;Xv.prototype.setSequenceMode=Xv.prototype.setSequenceMode;Xv.prototype.parseInit=Xv.prototype.parseInit;
904
- var Yv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Zv=/^\s*([^:]+):\s*(.*)/,$v=/\s*,\s*/,dw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;dd["text/x-ssa"]=function(){return new Xv};/*
908
+ function ew(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 cw(a){a=fw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Zv);Zv.prototype.parseMedia=Zv.prototype.parseMedia;Zv.prototype.setSequenceMode=Zv.prototype.setSequenceMode;Zv.prototype.parseInit=Zv.prototype.parseInit;
909
+ var $v=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,aw=/^\s*([^:]+):\s*(.*)/,bw=/\s*,\s*/,fw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;dd["text/x-ssa"]=function(){return new Zv};/*
905
910
  @license
906
911
  EME Encryption Scheme Polyfill
907
912
  Copyright 2019 Google LLC
908
913
  SPDX-License-Identifier: Apache-2.0
909
914
  */
910
- function ew(){}var fw;function gw(){fw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(fw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=hw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
911
- function hw(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,fw.call(c,a,b),2);d=e.h;if(iw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=fw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=jw;return e.return(jw.call(c,
915
+ function gw(){}var hw;function iw(){hw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(hw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=jw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
916
+ function jw(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,hw.call(c,a,b),2);d=e.h;if(kw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=hw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=lw;return e.return(lw.call(c,
912
917
  a,b))})}
913
- function jw(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=kw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=lw(h.videoCapabilities,d),l=lw(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."),
914
- p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,fw.call(c,a,e),2)}n=t.h;return t.return(new mw(n,d))})}function lw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",ew);ew.install=gw;function nw(){}var ow;
915
- function pw(){ow?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(ow=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=qw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
916
- function qw(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'),u(f,ow.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&iw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=ow,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
917
- navigator.mediaCapabilities.decodingInfo=rw;if(d){f.A(3);break}e=c;return u(f,sw(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(rw.call(b,a))}})}
918
- function rw(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=kw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,ow.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
919
- new mw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,sw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
920
- function sw(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 u(d,
921
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",nw);nw.install=pw;function mw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
922
- mw.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};mw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
923
- function kw(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 iw(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}
924
- function tw(){}function Et(){gw();pw()}M("EncryptionSchemePolyfills",tw);tw.install=Et;"undefined"!==typeof module&&module.exports&&(module.exports=tw);}).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})();
918
+ function lw(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=mw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=nw(h.videoCapabilities,d),l=nw(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."),
919
+ p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,hw.call(c,a,e),2)}n=t.h;return t.return(new ow(n,d))})}function nw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",gw);gw.install=iw;function pw(){}var qw;
920
+ function rw(){qw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(qw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=sw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
921
+ function sw(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'),u(f,qw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&kw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=qw,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
922
+ navigator.mediaCapabilities.decodingInfo=tw;if(d){f.A(3);break}e=c;return u(f,uw(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(tw.call(b,a))}})}
923
+ function tw(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=mw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,qw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
924
+ new ow(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,uw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
925
+ function uw(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 u(d,
926
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}M("McEncryptionSchemePolyfill",pw);pw.install=rw;function ow(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
927
+ ow.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};ow.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
928
+ function mw(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 kw(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}
929
+ function vw(){}function Gt(){iw();rw()}M("EncryptionSchemePolyfills",vw);vw.install=Gt;"undefined"!==typeof module&&module.exports&&(module.exports=vw);}).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})();
925
930
 
926
931
  //# sourceMappingURL=shaka-player.compiled.map