shaka-player 4.4.0 → 4.4.1

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 (46) hide show
  1. package/.github/workflows/release-please.yaml +21 -13
  2. package/.github/workflows/report-incremental-coverage.yaml +2 -2
  3. package/.github/workflows/shaka-bot-commands/command-help.sh +27 -0
  4. package/.github/workflows/shaka-bot-commands/command-test.sh +56 -0
  5. package/.github/workflows/shaka-bot-commands/lib.sh +83 -0
  6. package/.github/workflows/shaka-bot-commands/main.sh +51 -0
  7. package/.github/workflows/talk-to-shaka-bot.yaml +29 -0
  8. package/.github/workflows/update-issues.yaml +2 -1
  9. package/.github/workflows/validate-pr-title.yaml +3 -11
  10. package/CHANGELOG.md +13 -0
  11. package/dist/deps.js +1 -1
  12. package/dist/locales.js +32 -32
  13. package/dist/shaka-player.compiled.d.ts +297 -297
  14. package/dist/shaka-player.compiled.debug.d.ts +297 -297
  15. package/dist/shaka-player.compiled.debug.externs.js +1 -1
  16. package/dist/shaka-player.compiled.debug.js +221 -222
  17. package/dist/shaka-player.compiled.debug.map +3 -3
  18. package/dist/shaka-player.compiled.externs.js +1 -1
  19. package/dist/shaka-player.compiled.js +947 -946
  20. package/dist/shaka-player.compiled.map +3 -3
  21. package/dist/shaka-player.ui.d.ts +341 -341
  22. package/dist/shaka-player.ui.debug.d.ts +341 -341
  23. package/dist/shaka-player.ui.debug.externs.js +1 -1
  24. package/dist/shaka-player.ui.debug.js +282 -283
  25. package/dist/shaka-player.ui.debug.map +3 -3
  26. package/dist/shaka-player.ui.externs.js +1 -1
  27. package/dist/shaka-player.ui.js +566 -564
  28. package/dist/shaka-player.ui.map +3 -3
  29. package/externs/shaka/namespace.js +2 -2
  30. package/externs/shaka/transmuxer.js +2 -1
  31. package/lib/hls/hls_parser.js +1 -0
  32. package/lib/media/media_source_engine.js +22 -2
  33. package/lib/mss/mss_parser.js +1 -0
  34. package/lib/player.js +1 -1
  35. package/lib/text/simple_text_displayer.js +0 -1
  36. package/lib/transmuxer/aac_transmuxer.js +1 -1
  37. package/lib/transmuxer/ac3_transmuxer.js +1 -0
  38. package/lib/transmuxer/ec3_transmuxer.js +1 -0
  39. package/lib/transmuxer/mp3_transmuxer.js +1 -0
  40. package/lib/transmuxer/ts_transmuxer.js +54 -71
  41. package/lib/util/mp4_generator.js +27 -20
  42. package/lib/util/ts_parser.js +73 -110
  43. package/package.json +1 -1
  44. package/test/hls/hls_parser_unit.js +12 -13
  45. package/test/media/media_source_engine_integration.js +2 -2
  46. package/test/mss/mss_player_integration.js +1 -1
@@ -10,74 +10,74 @@
10
10
  Copyright 2016 Google LLC
11
11
  SPDX-License-Identifier: Apache-2.0
12
12
  */
13
- var q;function ba(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="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};
14
- function ea(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var fa=ea(this);function ha(a,b){if(b)a:{var c=fa;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
15
- ha("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
16
- ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ba(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
17
- function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function v(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
18
- if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},pa={};try{pa.__proto__=na;ma=pa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=la;
19
- function ra(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.hi=b.prototype}function sa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ua(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}sa.prototype.s=function(a){this.h=a};
20
- function va(a,b){a.i={gf:b,rf:!0};a.g=a.m||a.j}sa.prototype.return=function(a){this.i={return:a};this.g=this.j};function C(a,b,c){a.g=c;return{value:b}}sa.prototype.B=function(a){this.g=a};function D(a){a.g=0}function wa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ya(a){a.m=0;a.j=2}function Aa(a,b,c){a.g=b;a.m=c||0}function Ba(a,b){a.m=b||0;b=a.i.gf;a.i=null;return b}function Ca(a){a.u=[a.i];a.m=0;a.j=0}
21
- function Ea(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.rf?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Fa(a){this.g=new sa;this.h=a}function Ga(a,b){ua(a.g);var c=a.g.l;if(c)return Ha(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ia(a)}
22
- function Ha(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,va(a.g,g),Ia(a)}a.g.l=null;d.call(a.g,f);return Ia(a)}function Ia(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,va(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.rf)throw b.gf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
23
- function Ja(a){this.next=function(b){ua(a.g);a.g.l?b=Ha(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ia(a));return b};this.throw=function(b){ua(a.g);a.g.l?b=Ha(a,a.g.l["throw"],b,a.g.s):(va(a.g,b),b=Ia(a));return b};this.return=function(b){return Ga(a,b)};this[Symbol.iterator]=function(){return this}}function Ka(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())})}
24
- function I(a){return Ka(new Ja(new Fa(a)))}function La(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
- ha("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=fa.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
13
+ var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="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};
14
+ function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
15
+ 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;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
16
+ 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=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(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}
17
+ function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function v(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
18
+ if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},ma={};try{ma.__proto__=la;ka=ma.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=ja;
19
+ function qa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(pa)pa(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.hi=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
20
+ function ta(a,b){a.i={hf:b,rf:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function C(a,b,c){a.g=c;return{value:b}}ra.prototype.B=function(a){this.g=a};function D(a){a.g=0}function ua(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function va(a){a.m=0;a.j=2}function xa(a,b,c){a.g=b;a.m=c||0}function za(a,b){a.m=b||0;b=a.i.hf;a.i=null;return b}function Aa(a){a.u=[a.i];a.m=0;a.j=0}
21
+ function Ba(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.rf?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Ca(a){this.g=new ra;this.h=a}function Ea(a,b){sa(a.g);var c=a.g.l;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ha(a)}
22
+ function Fa(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,ta(a.g,g),Ha(a)}a.g.l=null;d.call(a.g,f);return Ha(a)}function Ha(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,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.rf)throw b.hf;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
23
+ function Ia(a){this.next=function(b){sa(a.g);a.g.l?b=Fa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ha(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Fa(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Ha(a));return b};this.return=function(b){return Ea(a,b)};this[Symbol.iterator]=function(){return this}}function Ja(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())})}
24
+ function H(a){return Ja(new Ia(new Ca(a)))}function Ka(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
+ 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=ea.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=
26
26
  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.H(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.C(g):this.m(g)}};
27
- b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.I(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.A()){var h=fa.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.A=
28
- function(){if(this.o)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=fa.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.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;
27
+ b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.I(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.A()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.A=
28
+ function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.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=ea.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;
29
29
  b.prototype.H=function(g){var h=this.j();g.jd(h.resolve,h.reject)};b.prototype.I=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(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(w){m(w)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.jd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.jd=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
30
  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=t(g),m=l.next();!m.done;m=l.next())d(m.value).jd(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(w){p[u]=w;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).jd(n(p.length-1),m),k=h.next();
31
- while(!k.done)})};return b});function Ma(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
- ha("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ma(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
- m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ma(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ma(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ma(k,
34
- g)&&Ma(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ma(k,g)&&Ma(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- ha("Map",function(a){function b(){var h={};return h.jb=h.next=h.head=h}function c(h,k){var l=h.g;return ia(function(){if(l){for(;l.head!=h.g;)l=l.jb;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&&Ma(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
31
+ while(!k.done)})};return b});function La(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
+ fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!La(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
+ m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!La(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&La(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&La(k,
34
+ g)&&La(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&La(k,g)&&La(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
+ fa("Map",function(a){function b(){var h={};return h.jb=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.jb;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&&La(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
36
36
  list:m,index:-1,entry:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
37
  "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this.g,jb:this.g.jb,head:this.g,key:h,value:k},l.list.push(l.entry),this.g.jb.next=l.entry,this.g.jb=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.entry.jb.next=h.entry.next,
38
38
  h.entry.next.jb=h.entry.jb,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.jb=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=
39
39
  function(h,k){for(var l=this.entries(),m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
- ha("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
40
+ fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  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]=
42
- 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 Na(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{pf:e,v:f}}return{pf:-1,v:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Na(this,b,c).pf}});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
- ha("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Oa(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
44
- ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Oa(this,b,"includes").indexOf(b,c||0)}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Na(this,b,c).v}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Oa(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
45
- function Pa(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ha("Array.prototype.keys",function(a){return a?a:function(){return Pa(this,function(b){return b})}});var Qa="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)Ma(d,e)&&(a[e]=d[e])}return a};
46
- ha("Object.assign",function(a){return a||Qa});ha("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ha("Array.prototype.values",function(a){return a?a:function(){return Pa(this,function(b,c){return c})}});
47
- ha("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ha("Array.prototype.entries",function(a){return a?a:function(){return Pa(this,function(b,c){return[b,c]})}});
48
- ha("String.prototype.repeat",function(a){return a?a:function(b){var c=Oa(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ha("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ha("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});
49
- ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ma(b,d)&&c.push(b[d]);return c}});ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ha("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});ha("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});
50
- ha("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ma(b,d)&&c.push([d,b[d]]);return c}});/*
42
+ 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 Ma(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{pf:e,v:f}}return{pf:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ma(this,b,c).pf}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
+ 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 Na(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
44
+ fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Na(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ma(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Na(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
45
+ function Oa(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 Oa(this,function(b){return b})}});var Pa="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)La(d,e)&&(a[e]=d[e])}return a};
46
+ fa("Object.assign",function(a){return a||Pa});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 Oa(this,function(b,c){return c})}});
47
+ 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 Oa(this,function(b,c){return[b,c]})}});
48
+ fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Na(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("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});
49
+ fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});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}});
50
+ fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)La(b,d)&&c.push([d,b[d]]);return c}});/*
51
51
 
52
52
  Copyright The Closure Library Authors.
53
53
  SPDX-License-Identifier: Apache-2.0
54
54
  */
55
- var Ra=this||self;function L(a,b){a=a.split(".");var c=Ra;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};var shaka={};function Ta(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ta.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ua(a){return a.h/(1-Math.pow(a.g,a.i))};function Wa(){this.h=new Ta(2);this.j=new Ta(5);this.g=0;this.i=128E3;this.l=16E3}Wa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Wa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Wa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ua(this.h),Ua(this.j))};function Xa(){}function Ya(){}function $a(){}function ab(a){var b=La.apply(1,arguments);bb.has(a)||(bb.add(a),$a.apply(Xa,v(b)))}function cb(){}function db(){}function eb(){}function fb(){}var bb=new Set;window.console&&($a=function(){return console.warn.apply(console,v(La.apply(0,arguments)))},Ya=function(){console.error.apply(console,v(La.apply(0,arguments)))});function gb(a){if(hb.has(a))return hb.get(a);var b=MediaSource.isTypeSupported(a);hb.set(a,b);return b}var hb=new Map;function ib(){}ib.prototype.extract=function(){};ib.prototype.decode=function(){return[]};ib.prototype.clear=function(){};function jb(){}jb.prototype.init=function(){};jb.prototype.parse=function(){return[]};function kb(){}function lb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(mb(a)==mb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=M(a);b=M(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function mb(a){return a instanceof ArrayBuffer?a:a.buffer}function nb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
56
- function M(a,b,c){c=void 0===c?Infinity:c;return ob(a,void 0===b?0:b,c,Uint8Array)}function pb(a,b,c){c=void 0===c?Infinity:c;return ob(a,void 0===b?0:b,c,DataView)}function ob(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(mb(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",kb);kb.toDataView=pb;kb.toUint8=M;kb.toArrayBuffer=nb;kb.equal=lb;function qb(){}qb.prototype.init=function(){};qb.prototype.j=function(){};qb.prototype.i=function(){};L("shaka.media.IClosedCaptionParser",qb);function rb(a){this.h=new jb;if(a=sb[a.toLowerCase()])this.h=a();this.g=new ib;if(a=tb)this.g=a()}rb.prototype.init=function(a){this.h.init(a)};rb.prototype.j=function(a){a=this.h.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=M(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};rb.prototype.i=function(){this.g.clear()};
57
- L("shaka.media.ClosedCaptionParser",rb);rb.findDecoder=function(){return tb};rb.unregisterDecoder=function(){tb=null};rb.registerDecoder=function(a){tb=a};rb.findParser=function(a){return sb[a]};rb.unregisterParser=function(a){delete sb[a]};rb.registerParser=function(a,b){sb[a]=b};var sb={},tb=null;function ub(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function vb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function wb(a,b,c){c||(c=ub);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Rd:d.Rd},e=a.next()){d.Rd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Rd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
58
- function xb(a,b,c){c||(c=ub);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function yb(a,b,c){this.startTime=a;this.endTime=b;this.U=c;this.region=new zb;this.position=null;this.G=Ab;this.size=0;this.textAlign=Bb;this.direction=Cb;this.writingMode=Db;this.H=Eb;this.m=null;this.aa="";this.s=Fb;this.i=Gb;this.A=this.V=this.N=this.backgroundColor=this.j="";this.u=Hb;this.o=Ib;this.Z=this.W=this.l="";this.C=1;this.h=[];this.ga=this.L=this.I="";this.M=!0;this.id="";this.g=[];this.F=this.Y=!1;this.X={bg:32,rows:15}}
59
- yb.prototype.clone=function(){var a=new yb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
60
- function Jb(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.U!=b.U)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!xb(a.g,b.g,Jb))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!xb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",yb);yb.equal=Jb;yb.prototype.clone=yb.prototype.clone;var Ab="auto";
61
- yb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ab};var Bb="center",Kb={LEFT:"left",RIGHT:"right",CENTER:Bb,START:"start",END:"end"};yb.textAlign=Kb;var Gb="after",Lb={BEFORE:"before",CENTER:"center",AFTER:Gb};yb.displayAlign=Lb;var Cb="ltr";yb.direction={HORIZONTAL_LEFT_TO_RIGHT:Cb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Db="horizontal-tb";yb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Db,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Eb=0;
62
- yb.lineInterpretation={LINE_NUMBER:Eb,PERCENTAGE:1};var Fb="start",Mb={CENTER:"center",START:Fb,END:"end"};yb.lineAlign=Mb;var Nb={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};yb.defaultTextColor=Nb;var Ob={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};yb.defaultTextBackgroundColor=Ob;var Hb=400;yb.fontWeight={NORMAL:Hb,BOLD:700};
63
- var Ib="normal",Pb={NORMAL:Ib,ITALIC:"italic",OBLIQUE:"oblique"};yb.fontStyle=Pb;yb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function zb(){this.id="";this.o=this.m=this.h=this.g=0;this.height=this.width=100;this.j=this.l=this.i=Qb;this.s=Rb}L("shaka.text.CueRegion",zb);var Qb=1;zb.units={PX:0,PERCENTAGE:Qb,LINES:2};var Rb="";zb.scrollMode={NONE:Rb,UP:"up"};function Sb(){}Sb.prototype.destroy=function(){};function Tb(a,b,c){Ub[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,Kd:b}}function Vb(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([Wb,Xb,Zb,$b]),e=d.next();!e.done;e=d.next())if(e=Ub[c+"-"+e.value]){var f=e.Kd(),g=f.isSupported(a,b);f.destroy();if(g)return e.Kd}return null}L("shaka.transmuxer.TransmuxerEngine",Sb);Sb.findTransmuxer=Vb;Sb.unregisterTransmuxer=function(a,b){delete Ub[a.toLowerCase().split(";")[0]+"-"+b]};
64
- Sb.registerTransmuxer=Tb;Sb.prototype.destroy=Sb.prototype.destroy;var Ub={},$b=1,Zb=2,Xb=3,Wb=4;Sb.PluginPriority={FALLBACK:$b,PREFERRED_SECONDARY:Zb,PREFERRED:Xb,APPLICATION:Wb};/*
55
+ var Qa=this||self;function L(a,b){a=a.split(".");var c=Qa;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};var shaka={};function Ra(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ra.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Ta(a){return a.h/(1-Math.pow(a.g,a.i))};function Ua(){this.h=new Ra(2);this.j=new Ra(5);this.g=0;this.i=128E3;this.l=16E3}Ua.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ua.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Ua.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ta(this.h),Ta(this.j))};function Va(){}function Wa(){}function Xa(){}function Za(a){var b=Ka.apply(1,arguments);$a.has(a)||($a.add(a),Xa.apply(Va,v(b)))}function ab(){}function bb(){}function cb(){}function db(){}var $a=new Set;window.console&&(Xa=function(){return console.warn.apply(console,v(Ka.apply(0,arguments)))},Wa=function(){console.error.apply(console,v(Ka.apply(0,arguments)))});function eb(a){if(fb.has(a))return fb.get(a);var b=MediaSource.isTypeSupported(a);fb.set(a,b);return b}var fb=new Map;function gb(){}gb.prototype.extract=function(){};gb.prototype.decode=function(){return[]};gb.prototype.clear=function(){};function hb(){}hb.prototype.init=function(){};hb.prototype.parse=function(){return[]};function ib(){}function kb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(lb(a)==lb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=M(a);b=M(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function lb(a){return a instanceof ArrayBuffer?a:a.buffer}function mb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
56
+ function M(a,b,c){c=void 0===c?Infinity:c;return nb(a,void 0===b?0:b,c,Uint8Array)}function ob(a,b,c){c=void 0===c?Infinity:c;return nb(a,void 0===b?0:b,c,DataView)}function nb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(lb(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",ib);ib.toDataView=ob;ib.toUint8=M;ib.toArrayBuffer=mb;ib.equal=kb;function pb(){}pb.prototype.init=function(){};pb.prototype.j=function(){};pb.prototype.i=function(){};L("shaka.media.IClosedCaptionParser",pb);function qb(a){this.h=new hb;if(a=rb[a.toLowerCase()])this.h=a();this.g=new gb;if(a=sb)this.g=a()}qb.prototype.init=function(a){this.h.init(a)};qb.prototype.j=function(a){a=this.h.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=M(b.packet);0<c.length&&this.g.extract(c,b.pts)}return this.g.decode()};qb.prototype.i=function(){this.g.clear()};
57
+ L("shaka.media.ClosedCaptionParser",qb);qb.findDecoder=function(){return sb};qb.unregisterDecoder=function(){sb=null};qb.registerDecoder=function(a){sb=a};qb.findParser=function(a){return rb[a]};qb.unregisterParser=function(a){delete rb[a]};qb.registerParser=function(a,b){rb[a]=b};var rb={},sb=null;function tb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function ub(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function vb(a,b,c){c||(c=tb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={Sd:d.Sd},e=a.next()){d.Sd=e.value;e=b.findIndex(function(f){return function(g){return c(f.Sd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
58
+ function wb(a,b,c){c||(c=tb);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function xb(a,b,c){this.startTime=a;this.endTime=b;this.U=c;this.region=new yb;this.position=null;this.G=zb;this.size=0;this.textAlign=Ab;this.direction=Bb;this.writingMode=Cb;this.H=Db;this.m=null;this.aa="";this.s=Eb;this.i=Fb;this.A=this.V=this.N=this.backgroundColor=this.j="";this.u=Gb;this.o=Hb;this.Z=this.W=this.l="";this.C=1;this.h=[];this.ga=this.L=this.I="";this.M=!0;this.id="";this.g=[];this.F=this.Y=!1;this.X={bg:32,rows:15}}
59
+ xb.prototype.clone=function(){var a=new xb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
60
+ function Ib(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.U!=b.U)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!wb(a.g,b.g,Ib))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!wb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",xb);xb.equal=Ib;xb.prototype.clone=xb.prototype.clone;var zb="auto";
61
+ xb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:zb};var Ab="center",Jb={LEFT:"left",RIGHT:"right",CENTER:Ab,START:"start",END:"end"};xb.textAlign=Jb;var Fb="after",Kb={BEFORE:"before",CENTER:"center",AFTER:Fb};xb.displayAlign=Kb;var Bb="ltr";xb.direction={HORIZONTAL_LEFT_TO_RIGHT:Bb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Cb="horizontal-tb";xb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Cb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Db=0;
62
+ xb.lineInterpretation={LINE_NUMBER:Db,PERCENTAGE:1};var Eb="start",Lb={CENTER:"center",START:Eb,END:"end"};xb.lineAlign=Lb;var Mb={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};xb.defaultTextColor=Mb;var Nb={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};xb.defaultTextBackgroundColor=Nb;var Gb=400;xb.fontWeight={NORMAL:Gb,BOLD:700};
63
+ var Hb="normal",Ob={NORMAL:Hb,ITALIC:"italic",OBLIQUE:"oblique"};xb.fontStyle=Ob;xb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function yb(){this.id="";this.o=this.m=this.h=this.g=0;this.height=this.width=100;this.j=this.l=this.i=Pb;this.s=Qb}L("shaka.text.CueRegion",yb);var Pb=1;yb.units={PX:0,PERCENTAGE:Pb,LINES:2};var Qb="";yb.scrollMode={NONE:Qb,UP:"up"};function Rb(){}Rb.prototype.destroy=function(){};function Sb(a,b,c){Tb[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,Ld:b}}function Ub(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([Vb,Wb,Xb,Zb]),e=d.next();!e.done;e=d.next())if(e=Tb[c+"-"+e.value]){var f=e.Ld(),g=f.isSupported(a,b);f.destroy();if(g)return e.Ld}return null}L("shaka.transmuxer.TransmuxerEngine",Rb);Rb.findTransmuxer=Ub;Rb.unregisterTransmuxer=function(a,b){delete Tb[a.toLowerCase().split(";")[0]+"-"+b]};
64
+ Rb.registerTransmuxer=Sb;Rb.prototype.destroy=Rb.prototype.destroy;var Tb={},Zb=1,Xb=2,Wb=3,Vb=4;Rb.PluginPriority={FALLBACK:Zb,PREFERRED_SECONDARY:Xb,PREFERRED:Wb,APPLICATION:Vb};/*
65
65
  @license
66
66
  Copyright 2008 The Closure Library Authors
67
67
  SPDX-License-Identifier: Apache-2.0
68
68
  */
69
- var ac=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
69
+ var $b=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
70
70
  @license
71
71
  Copyright 2006 The Closure Library Authors
72
72
  SPDX-License-Identifier: Apache-2.0
73
73
  */
74
- function bc(a){var b;a instanceof bc?(cc(this,a.Ma),this.Lb=a.Lb,this.Sa=a.Sa,dc(this,a.cc),this.ta=a.ta,ec(this,a.g.clone()),this.xb=a.xb):a&&(b=String(a).match(ac))?(cc(this,b[1]||"",!0),this.Lb=fc(b[2]||""),this.Sa=fc(b[3]||"",!0),dc(this,b[4]),this.ta=fc(b[5]||"",!0),ec(this,b[6]||"",!0),this.xb=fc(b[7]||"")):this.g=new gc(null)}q=bc.prototype;q.Ma="";q.Lb="";q.Sa="";q.cc=null;q.ta="";q.xb="";
75
- q.toString=function(){var a=[],b=this.Ma;b&&a.push(hc(b,ic,!0),":");if(b=this.Sa){a.push("//");var c=this.Lb;c&&a.push(hc(c,ic,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.cc;null!=b&&a.push(":",String(b))}if(b=this.ta)this.Sa&&"/"!=b.charAt(0)&&a.push("/"),a.push(hc(b,"/"==b.charAt(0)?jc:kc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.xb)&&a.push("#",hc(b,mc));return a.join("")};
76
- q.resolve=function(a){var b=this.clone();"data"===b.Ma&&(b=new bc);var c=!!a.Ma;c?cc(b,a.Ma):c=!!a.Lb;c?b.Lb=a.Lb:c=!!a.Sa;c?b.Sa=a.Sa:c=null!=a.cc;var d=a.ta;if(c)dc(b,a.cc);else if(c=!!a.ta){if("/"!=d.charAt(0))if(this.Sa&&!this.ta)d="/"+d;else{var e=b.ta.lastIndexOf("/");-1!=e&&(d=b.ta.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(""):".."==
77
- 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.ta=d:c=""!==a.g.toString();c?ec(b,a.g.clone()):c=!!a.xb;c&&(b.xb=a.xb);return b};q.clone=function(){return new bc(this)};function cc(a,b,c){a.Ma=c?fc(b,!0):b;a.Ma&&(a.Ma=a.Ma.replace(/:$/,""))}function dc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.cc=b}else a.cc=null}function ec(a,b,c){b instanceof gc?a.g=b:(c||(b=hc(b,nc)),a.g=new gc(b))}
78
- function fc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function hc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,oc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function oc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var ic=/[#\/\?@]/g,kc=/[#\?:]/g,jc=/[#\?]/g,nc=/[#\?@]/g,mc=/#/g;function gc(a){this.g=a||null}
79
- function pc(a){if(!a.pa&&(a.pa={},a.Dc=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=gc.prototype;q.pa=null;q.Dc=null;q.add=function(a,b){pc(this);this.g=null;var c=this.pa.hasOwnProperty(a)?this.pa[a]:null;c||(this.pa[a]=c=[]);c.push(b);this.Dc++;return this};
80
- q.set=function(a,b){pc(this);this.g=null;this.pa.hasOwnProperty(a)?this.pa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.pa)return"";var a=[],b;for(b in this.pa)for(var c=encodeURIComponent(b),d=this.pa[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 gc;a.g=this.g;if(this.pa){var b={},c;for(c in this.pa)b[c]=this.pa[c].concat();a.pa=b;a.Dc=this.Dc}return a};function N(a,b,c){var d=La.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;if(qc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};L("shaka.util.Error",N);var qc=!0;N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
74
+ function ac(a){var b;a instanceof ac?(bc(this,a.Ma),this.Mb=a.Mb,this.Sa=a.Sa,cc(this,a.cc),this.ta=a.ta,dc(this,a.g.clone()),this.xb=a.xb):a&&(b=String(a).match($b))?(bc(this,b[1]||"",!0),this.Mb=ec(b[2]||""),this.Sa=ec(b[3]||"",!0),cc(this,b[4]),this.ta=ec(b[5]||"",!0),dc(this,b[6]||"",!0),this.xb=ec(b[7]||"")):this.g=new fc(null)}q=ac.prototype;q.Ma="";q.Mb="";q.Sa="";q.cc=null;q.ta="";q.xb="";
75
+ q.toString=function(){var a=[],b=this.Ma;b&&a.push(gc(b,hc,!0),":");if(b=this.Sa){a.push("//");var c=this.Mb;c&&a.push(gc(c,hc,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.cc;null!=b&&a.push(":",String(b))}if(b=this.ta)this.Sa&&"/"!=b.charAt(0)&&a.push("/"),a.push(gc(b,"/"==b.charAt(0)?ic:jc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.xb)&&a.push("#",gc(b,kc));return a.join("")};
76
+ q.resolve=function(a){var b=this.clone();"data"===b.Ma&&(b=new ac);var c=!!a.Ma;c?bc(b,a.Ma):c=!!a.Mb;c?b.Mb=a.Mb:c=!!a.Sa;c?b.Sa=a.Sa:c=null!=a.cc;var d=a.ta;if(c)cc(b,a.cc);else if(c=!!a.ta){if("/"!=d.charAt(0))if(this.Sa&&!this.ta)d="/"+d;else{var e=b.ta.lastIndexOf("/");-1!=e&&(d=b.ta.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(""):".."==
77
+ 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.ta=d:c=""!==a.g.toString();c?dc(b,a.g.clone()):c=!!a.xb;c&&(b.xb=a.xb);return b};q.clone=function(){return new ac(this)};function bc(a,b,c){a.Ma=c?ec(b,!0):b;a.Ma&&(a.Ma=a.Ma.replace(/:$/,""))}function cc(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.cc=b}else a.cc=null}function dc(a,b,c){b instanceof fc?a.g=b:(c||(b=gc(b,mc)),a.g=new fc(b))}
78
+ function ec(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function gc(a,b,c){return null!=a?(a=encodeURI(a).replace(b,nc),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function nc(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var hc=/[#\/\?@]/g,jc=/[#\?:]/g,ic=/[#\?]/g,mc=/[#\?@]/g,kc=/#/g;function fc(a){this.g=a||null}
79
+ function oc(a){if(!a.pa&&(a.pa={},a.Dc=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=fc.prototype;q.pa=null;q.Dc=null;q.add=function(a,b){oc(this);this.g=null;var c=this.pa.hasOwnProperty(a)?this.pa[a]:null;c||(this.pa[a]=c=[]);c.push(b);this.Dc++;return this};
80
+ q.set=function(a,b){oc(this);this.g=null;this.pa.hasOwnProperty(a)?this.pa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.pa)return"";var a=[],b;for(b in this.pa)for(var c=encodeURIComponent(b),d=this.pa[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 fc;a.g=this.g;if(this.pa){var b={},c;for(c in this.pa)b[c]=this.pa[c].concat();a.pa=b;a.Dc=this.Dc}return a};function N(a,b,c){var d=Ka.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;if(pc)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};L("shaka.util.Error",N);var pc=!0;N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
81
81
  N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
82
82
  CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_SRC_EQUALS:2016,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,
83
83
  WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,
@@ -86,183 +86,183 @@ HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORT
86
86
  CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,
87
87
  OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,
88
88
  STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,
89
- SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function rc(a,b){return a.concat(b)}function sc(){}function tc(a){return null!=a};function uc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new bc(d)});return a.map(function(d){return new bc(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(rc,[]).map(function(d){return d.toString()})}function vc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
90
- function wc(a,b){if(1==b.length)return b[0];a=xc(a,b);if(null!=a)return a;throw new N(2,4,4025,b);}function xc(a,b){for(var c=t(yc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==zc?"":null}
91
- var zc="text",Ac={va:"video",qb:"audio",da:zc,wc:"image",rh:"application"},yc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Bc(){}function Cc(a,b){var c=a;b&&!Ec.includes(a)&&(c+='; codecs="'+b+'"');return c}function Fc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Gc(a,b,c){var d=Cc(a,b);b=Fc(a,b);Vb(b)?(a=Vb(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
92
- function Hc(a){var b=Ic(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
93
- a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Jc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Ic(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}L("shaka.util.MimeUtils",Bc);Bc.getFullTypeWithAllCodecs=Fc;
94
- Bc.getFullType=Cc;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Ec=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Kc(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.A="";this.o=new Map}function Lc(a){return Mc[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!tb:!1}Kc.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
95
- function Nc(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g)return C(k,Promise.resolve(),2);if(!a.i||!a.j)return k.return();if(null==c||null==d)return a.i.parseInit(M(b)),k.return();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.i.parseMedia(M(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.j.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);D(k)})}
96
- Kc.prototype.remove=function(a,b){var c=this;return I(function(d){if(1==d.g)return C(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));D(d)})};function Oc(a,b,c){a.l=b;a.m=c}function Pc(a,b,c){a.A=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
97
- function Qc(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.g);for(var d=b.next();!d.done;d=b.next())Qc(a,d.value,c)}
98
- function Rc(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Qc(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.A&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
99
- a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}L("shaka.text.TextEngine",Kc);Kc.prototype.destroy=Kc.prototype.destroy;Kc.findParser=function(a){return Mc[a]};Kc.unregisterParser=function(a){delete Mc[a]};Kc.registerParser=function(a,b){Mc[a]=b};var Mc={};function Sc(){}function Tc(a,b){a=Uc(a);b=Uc(b);return a.split("-")[0]==b.split("-")[0]}function Vc(a,b){a=Uc(a);b=Uc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Wc(a,b){a=Uc(a);b=Uc(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Uc(a){var b=a.split("-x-"),c=b[0].split("-");a=c[0]||"";c=c[1]||"";b=b[1]?"x-"+b[1]:"";a=a.toLowerCase();a=Xc.get(a)||a;c=c.toUpperCase();return(c?a+"-"+c:a)+(b?"-"+b:"")}
100
- function Yc(a,b){a=Uc(a);b=Uc(b);return b==a?4:Vc(b,a)?3:Wc(b,a)?2:Vc(a,b)?1:0}function Zc(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Xc.get(a)||a}function $c(a){return a.language?Uc(a.language):a.audio&&a.audio.language?Uc(a.audio.language):a.video&&a.video.language?Uc(a.video.language):"und"}
101
- function ad(a,b){a=Uc(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(Uc(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Vc(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Wc(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Vc(a,b))return b;return null}L("shaka.util.LanguageUtils",Sc);Sc.findClosestLocale=ad;Sc.getLocaleForVariant=$c;
102
- Sc.getLocaleForText=function(a){return Uc(a.language||"und")};Sc.getBase=Zc;Sc.relatedness=Yc;Sc.areSiblings=function(a,b){var c=Zc(a),d=Zc(b);return a!=c&&b!=d&&c==d};Sc.normalize=Uc;Sc.isSiblingOf=Wc;Sc.isParentOf=Vc;Sc.areLanguageCompatible=Tc;Sc.areLocaleCompatible=function(a,b){a=Uc(a);b=Uc(b);return a==b};
103
- var Xc=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
89
+ SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function qc(a,b){return a.concat(b)}function rc(){}function sc(a){return null!=a};function tc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new ac(d)});return a.map(function(d){return new ac(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(qc,[]).map(function(d){return d.toString()})}function uc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
90
+ function vc(a,b){if(1==b.length)return b[0];a=wc(a,b);if(null!=a)return a;throw new N(2,4,4025,b);}function wc(a,b){for(var c=t(xc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==yc?"":null}
91
+ var yc="text",zc={va:"video",qb:"audio",da:yc,wc:"image",rh:"application"},xc={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Ac(){}function Bc(a,b){var c=a;b&&!Cc.includes(a)&&(c+='; codecs="'+b+'"');return c}function Ec(a,b){b&&(a+='; codecs="'+b+'"');return a}function Fc(a,b,c){var d=Bc(a,b);b=Ec(a,b);Ub(b)?(a=Ub(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
92
+ function Gc(a){var b=Hc(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===
93
+ a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function Ic(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Hc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}L("shaka.util.MimeUtils",Ac);Ac.getFullTypeWithAllCodecs=Ec;
94
+ Ac.getFullType=Bc;(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Cc=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Jc(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.A="";this.o=new Map}function Kc(a){return Lc[a]?!0:"application/cea-608"==a||"application/cea-708"==a?!!sb:!1}Jc.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
95
+ function Mc(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g)return C(k,Promise.resolve(),2);if(!a.i||!a.j)return k.return();if(null==c||null==d)return a.i.parseInit(M(b)),k.return();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.i.parseMedia(M(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.j.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);D(k)})}
96
+ Jc.prototype.remove=function(a,b){var c=this;return H(function(d){if(1==d.g)return C(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));D(d)})};function Nc(a,b,c){a.l=b;a.m=c}function Oc(a,b,c){a.A=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
97
+ function Pc(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.g);for(var d=b.next();!d.done;d=b.next())Pc(a,d.value,c)}
98
+ function Qc(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);Pc(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.A&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
99
+ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}L("shaka.text.TextEngine",Jc);Jc.prototype.destroy=Jc.prototype.destroy;Jc.findParser=function(a){return Lc[a]};Jc.unregisterParser=function(a){delete Lc[a]};Jc.registerParser=function(a,b){Lc[a]=b};var Lc={};function Rc(){}function Sc(a,b){a=Tc(a);b=Tc(b);return a.split("-")[0]==b.split("-")[0]}function Uc(a,b){a=Tc(a);b=Tc(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function Vc(a,b){a=Tc(a);b=Tc(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function Tc(a){var b=a.split("-x-"),c=b[0].split("-");a=c[0]||"";c=c[1]||"";b=b[1]?"x-"+b[1]:"";a=a.toLowerCase();a=Wc.get(a)||a;c=c.toUpperCase();return(c?a+"-"+c:a)+(b?"-"+b:"")}
100
+ function Xc(a,b){a=Tc(a);b=Tc(b);return b==a?4:Uc(b,a)?3:Vc(b,a)?2:Uc(a,b)?1:0}function Yc(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Wc.get(a)||a}function Zc(a){return a.language?Tc(a.language):a.audio&&a.audio.language?Tc(a.audio.language):a.video&&a.video.language?Tc(a.video.language):"und"}
101
+ function $c(a,b){a=Tc(a);var c=new Set,d=t(b);for(b=d.next();!b.done;b=d.next())c.add(Tc(b.value));d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Uc(b,a))return b;d=t(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,Vc(b,a))return b;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,Uc(a,b))return b;return null}L("shaka.util.LanguageUtils",Rc);Rc.findClosestLocale=$c;Rc.getLocaleForVariant=Zc;
102
+ Rc.getLocaleForText=function(a){return Tc(a.language||"und")};Rc.getBase=Yc;Rc.relatedness=Xc;Rc.areSiblings=function(a,b){var c=Yc(a),d=Yc(b);return a!=c&&b!=d&&c==d};Rc.normalize=Tc;Rc.isSiblingOf=Vc;Rc.isParentOf=Uc;Rc.areLanguageCompatible=Sc;Rc.areLocaleCompatible=function(a,b){a=Tc(a);b=Tc(b);return a==b};
103
+ var Wc=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
104
104
  "cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
105
105
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
106
106
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
107
107
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
108
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function bd(){this.g={}}q=bd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function cd(a){this.h=a;this.g=null}cd.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};cd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function dd(a){this.h=a;this.g=null}dd.prototype.ic=function(){this.stop();this.h();return this};dd.prototype.S=function(a){var b=this;this.stop();this.g=(new cd(function(){b.h()})).S(a);return this};dd.prototype.Ca=function(a){var b=this;this.stop();this.g=(new cd(function(){b.g.S(a);b.h()})).S(a);return this};dd.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",dd);dd.prototype.stop=dd.prototype.stop;dd.prototype.tickEvery=dd.prototype.Ca;
109
- dd.prototype.tickAfter=dd.prototype.S;dd.prototype.tickNow=dd.prototype.ic;function ed(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function fd(a){return""!=gd().canPlayType(a)}function hd(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function id(){return jd("Xbox One")}function kd(){return jd("Tizen")}function ld(){return jd("Web0S")&&jd("Chrome/38.0.2125.122 Safari/537.36")}function md(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!kd()&&!jd("PC=EOS")&&!jd("VirginMedia")&&!jd("SOPOpenBrowser")&&!nd()&&!jd("AFT")}
110
- function nd(){return jd("PlayStation 4")}function od(){if(!md())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 jd(a){return(navigator.userAgent||"").includes(a)}function gd(){if(pd)return pd;qd||(qd=new dd(function(){pd=null}));(pd=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pd=document.createElement("video"));qd.S(1);return pd}
111
- var qd=null,pd=null;function rd(){}function sd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=td(f,b,c);f=ud(f,d);b=vd(f);b=wd(b);var g=xd(b,e);a.variants=a.variants.filter(function(h){return yd(h)==g?!0:!1})}function vd(a){var b=new bd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=yd(c);b.push(d,c)}return b}
112
- function wd(a){var b=0,c=new Map,d=a.size();a.forEach(function(e,f){f=t(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.video;if(h&&h.width&&h.height){h=h.width*h.height*(h.frameRate||1);c.has(h)||c.set(h,new bd);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
113
- function td(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Wd:d.Wd},e=b.next())if(d.Wd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Wd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Qd:d.Qd},b=c.next())if(d.Qd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Qd)}}(d)),b.length){a=b;break}return a}
114
- function xd(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==zd||c==Ad){if(a=Bd(a,c),1==a.size())return a.keys()[0]}else if(c==Cd)break;return Dd(a)}function Bd(a,b){var c=0,d=new bd;a.forEach(function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
115
- function Dd(a){var b="",c=Infinity;a.forEach(function(d,e){var f=0,g=0;e=t(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 yd(a){var b="";a.video&&(b=Hc(a.video.codecs));var c="";a.audio&&(c=Hc(a.audio.codecs));return b+"-"+c}function Ed(a,b,c){a.variants=a.variants.filter(function(d){return Fd(d,b,c)})}
116
- function Fd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;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}
117
- function Gd(a,b){return I(function(c){if(1==c.g)return C(c,Hd(b,0<b.offlineSessionIds.length),2);Id(a,b);Jd(b);return C(c,Kd(b),0)})}
118
- function Hd(a,b){return I(function(c){if(1==c.g)return C(c,Ld(a.variants,b,!1,[]),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Md(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=wc("video",g);f=Md(f);g=wc("audio",g);g=Nd(g);var h=Gc(e.mimeType,g,"audio");if(!gb(h))return!1;f=[f,g].join()}g=Gc(e.mimeType,f,"video");if(!gb(g))return!1;e.codecs=f}if(f=d.audio){g=Nd(f.codecs);h=Gc(f.mimeType,g,"audio");if(!gb(h))return!1;f.codecs=g}if(id()&&e&&(e.width&&1920<
119
- e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return db(Od(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||db(Od(d));return e});D(c)})}function Pd(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=Pd(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
120
- function Qd(a,b){var c,d,e;return I(function(f){switch(f.g){case 1:c=Pd(b);wa(f,2);d=Rd;if(d[c]){a.decodingInfos.push(d[c]);f.B(4);break}return C(f,navigator.mediaCapabilities.decodingInfo(b),5);case 5:e=f.h,d[c]=e,a.decodingInfos.push(e);case 4:Aa(f,0);break;case 2:Ba(f),JSON.stringify(b),D(f)}})}
121
- function Ld(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B;return I(function(E){switch(E.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return E.return();f={};g=t(d);h=g.next();case 2:if(h.done){E.B(4);break}f.Sd=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){E.B(7);break}n=m.value;p=Sd(n,b,c).filter(function(F){return function(G){return(G.keySystemConfiguration&&G.keySystemConfiguration.keySystem)===F.Sd}}(f));r=t(p);u=r.next();case 8:if(u.done){E.B(10);break}w=u.value;return C(E,
122
- Qd(n,w),9);case 9:u=r.next();E.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();E.B(5);break;case 7:if(k)return E.return();f={Sd:f.Sd};h=g.next();E.B(2);break;case 4:y=t(a),m=y.next();case 12:if(m.done){E.B(0);break}x=m.value;A=Sd(x,b,c).filter(function(F){F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});z=t(A);u=z.next();case 15:if(u.done){m=y.next();E.B(12);break}B=u.value;return C(E,Qd(x,B),16);case 16:u=z.next(),E.B(15)}})}
123
- function Sd(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=wc("video",g);f=Md(f);g=wc("audio",g);g=Nd(g);g=Gc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Md(f);f=Gc(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=
124
- "srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Nd(d.codecs),f=Gc(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=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,
108
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function ad(){this.g={}}q=ad.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function bd(a){this.h=a;this.g=null}bd.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};bd.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function cd(a){this.h=a;this.g=null}cd.prototype.ic=function(){this.stop();this.h();return this};cd.prototype.S=function(a){var b=this;this.stop();this.g=(new bd(function(){b.h()})).S(a);return this};cd.prototype.Ca=function(a){var b=this;this.stop();this.g=(new bd(function(){b.g.S(a);b.h()})).S(a);return this};cd.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",cd);cd.prototype.stop=cd.prototype.stop;cd.prototype.tickEvery=cd.prototype.Ca;
109
+ cd.prototype.tickAfter=cd.prototype.S;cd.prototype.tickNow=cd.prototype.ic;function dd(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function ed(a){return""!=fd().canPlayType(a)}function gd(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function hd(){return id("Xbox One")}function jd(){return id("Tizen")}function kd(){return id("Web0S")&&id("Chrome/38.0.2125.122 Safari/537.36")}function ld(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!jd()&&!id("PC=EOS")&&!id("VirginMedia")&&!id("SOPOpenBrowser")&&!md()&&!id("AFT")}
110
+ function md(){return id("PlayStation 4")}function nd(){if(!ld())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 id(a){return(navigator.userAgent||"").includes(a)}function fd(){if(od)return od;pd||(pd=new cd(function(){od=null}));(od=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(od=document.createElement("video"));pd.S(1);return od}
111
+ var pd=null,od=null;function qd(){}function rd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=sd(f,b,c);f=td(f,d);b=ud(f);b=vd(b);var g=wd(b,e);a.variants=a.variants.filter(function(h){return xd(h)==g?!0:!1})}function ud(a){var b=new ad;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=xd(c);b.push(d,c)}return b}
112
+ function vd(a){var b=0,c=new Map,d=a.size();a.forEach(function(e,f){f=t(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.video;if(h&&h.width&&h.height){h=h.width*h.height*(h.frameRate||1);c.has(h)||c.set(h,new ad);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
113
+ function sd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={Xd:d.Xd},e=b.next())if(d.Xd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.Xd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={Rd:d.Rd},b=c.next())if(d.Rd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Rd)}}(d)),b.length){a=b;break}return a}
114
+ function wd(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==yd||c==zd){if(a=Ad(a,c),1==a.size())return a.keys()[0]}else if(c==Bd)break;return Cd(a)}function Ad(a,b){var c=0,d=new ad;a.forEach(function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
115
+ function Cd(a){var b="",c=Infinity;a.forEach(function(d,e){var f=0,g=0;e=t(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 xd(a){var b="";a.video&&(b=Gc(a.video.codecs));var c="";a.audio&&(c=Gc(a.audio.codecs));return b+"-"+c}function Dd(a,b,c){a.variants=a.variants.filter(function(d){return Ed(d,b,c)})}
116
+ function Ed(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;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}
117
+ function Fd(a,b){return H(function(c){if(1==c.g)return C(c,Gd(b,0<b.offlineSessionIds.length),2);Hd(a,b);Id(b);return C(c,Jd(b),0)})}
118
+ function Gd(a,b){return H(function(c){if(1==c.g)return C(c,Kd(a.variants,b,!1,[]),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Ld(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=vc("video",g);f=Ld(f);g=vc("audio",g);g=Md(g);var h=Fc(e.mimeType,g,"audio");if(!eb(h))return!1;f=[f,g].join()}g=Fc(e.mimeType,f,"video");if(!eb(g))return!1;e.codecs=f}if(f=d.audio){g=Md(f.codecs);h=Fc(f.mimeType,g,"audio");if(!eb(h))return!1;f.codecs=g}if(hd()&&e&&(e.width&&1920<
119
+ e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return bb(Nd(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||bb(Nd(d));return e});D(c)})}function Od(a){var b=[];for(c in a)b.push(c);b.sort();var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=JSON.stringify(e);e=a[e];e instanceof Object?(e=Od(e),c.push(d+":"+e)):(e=JSON.stringify(e),c.push(d+":"+e))}return"{"+c.join(",")+"}"}
120
+ function Pd(a,b){var c,d,e;return H(function(f){switch(f.g){case 1:c=Od(b);ua(f,2);d=Qd;if(d[c]){a.decodingInfos.push(d[c]);f.B(4);break}return C(f,navigator.mediaCapabilities.decodingInfo(b),5);case 5:e=f.h,d[c]=e,a.decodingInfos.push(e);case 4:xa(f,0);break;case 2:za(f),JSON.stringify(b),D(f)}})}
121
+ function Kd(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B;return H(function(E){switch(E.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return E.return();f={};g=t(d);h=g.next();case 2:if(h.done){E.B(4);break}f.Td=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){E.B(7);break}n=m.value;p=Rd(n,b,c).filter(function(F){return function(G){return(G.keySystemConfiguration&&G.keySystemConfiguration.keySystem)===F.Td}}(f));r=t(p);u=r.next();case 8:if(u.done){E.B(10);break}w=u.value;return C(E,
122
+ Pd(n,w),9);case 9:u=r.next();E.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();E.B(5);break;case 7:if(k)return E.return();f={Td:f.Td};h=g.next();E.B(2);break;case 4:y=t(a),m=y.next();case 12:if(m.done){E.B(0);break}x=m.value;A=Rd(x,b,c).filter(function(F){F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});z=t(A);u=z.next();case 15:if(u.done){m=y.next();E.B(12);break}B=u.value;return C(E,Pd(x,B),16);case 16:u=z.next(),E.B(15)}})}
123
+ function Rd(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=vc("video",g);f=Ld(f);g=vc("audio",g);g=Md(g);g=Fc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Ld(f);f=Fc(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=
124
+ "srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Md(d.codecs),f=Fc(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=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,
125
125
  []);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,r=t(h.initData),u=r.next();!u.done;u=r.next())p.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
126
126
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
127
- function Nd(a){return"fLaC"===a?"flac":"Opus"===a?"opus":kd()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function Md(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 Id(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Td(d,a.audio)||c&&a&&a.video&&!Td(c,a.video)?!1:!0})}
128
- function Jd(a){a.textStreams=a.textStreams.filter(function(b){b=Cc(b.mimeType,b.codecs);return Lc(b)})}function Kd(a){var b,c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;if(Ud.has(f)){l.B(5);break}g=Vd.get(f);if(!g){Ud.set(f,!1);l.B(5);break}return C(l,Wd(g),7);case 7:h=l.h,Ud.set(f,h);case 5:(k=Ud.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,D(l)}})}
129
- function Wd(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Td(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
130
- function Xd(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
127
+ function Md(a){return"fLaC"===a?"flac":"Opus"===a?"opus":jd()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function Ld(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 Hd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Sd(d,a.audio)||c&&a&&a.video&&!Sd(c,a.video)?!1:!0})}
128
+ function Id(a){a.textStreams=a.textStreams.filter(function(b){b=Bc(b.mimeType,b.codecs);return Kc(b)})}function Jd(a){var b,c,d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;if(Td.has(f)){l.B(5);break}g=Ud.get(f);if(!g){Td.set(f,!1);l.B(5);break}return C(l,Vd(g),7);case 7:h=l.h,Td.set(f,h);case 5:(k=Td.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,D(l)}})}
129
+ function Vd(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Sd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
130
+ function Wd(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
131
131
  kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null};
132
132
  c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null,a.hdr=c.hdr||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=
133
133
  b.originalLanguage);return a}
134
- function Yd(a){return{id:a.id,active:!1,type:zc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
134
+ function Xd(a){return{id:a.id,active:!1,type:yc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
135
135
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null,accessibilityPurpose:a.accessibilityPurpose,originalLanguage:a.originalLanguage}}
136
- function Zd(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
137
- audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId,accessibilityPurpose:null,originalLanguage:null}}function $d(a){a.__shaka_id||(a.__shaka_id=ae++);return a.__shaka_id}
138
- function be(a){var b=ce(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function de(a){var b=ce(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
139
- function ce(a){var b=a.language;return{id:$d(a),active:!1,type:"",bandwidth:0,language:Uc(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
140
- originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function ee(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function fe(a){return a.filter(function(b){return ee(b)})}
141
- function ud(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(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,v(a))):d.get(Math.min.apply(Math,v(c)))}
142
- function ge(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=ad(Uc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Uc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=he(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(rc,[]);return a.length?
143
- he(e,a[0]):e}function he(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Od(a){var b=[];a.audio&&b.push(ie(a.audio));a.video&&b.push(ie(a.video));return b.join(", ")}
144
- function ie(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"}L("shaka.util.StreamUtils",rd);rd.meetsRestrictions=Fd;
145
- var Rd={},ae=0,zd="smooth",Ad="powerEfficient",Cd="bandwidth",Ud=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Vd=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function je(){var a=this;this.l=null;this.o=!1;this.i=new Wa;this.u=null;navigator.connection&&navigator.connection.addEventListener&&(this.u=function(){if(a.o&&a.g.useNetworkInformation){a.i=new Wa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}},navigator.connection.addEventListener("change",this.u));this.m=[];this.A=1;this.F=!1;this.h=this.j=this.g=this.s=null;this.C=new dd(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
146
- b&&a.l(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}})}q=je.prototype;q.stop=function(){this.l=null;this.o=!1;this.m=[];this.A=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop()};q.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.u),this.u=null);this.C=null};q.init=function(a){this.l=a};
147
- q.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientHeight*b,b*=this.j.clientWidth);a=ke(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(le(this));this.m.length&&!a.length&&(a=ke(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
136
+ function Yd(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
137
+ audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId,accessibilityPurpose:null,originalLanguage:null}}function Zd(a){a.__shaka_id||(a.__shaka_id=$d++);return a.__shaka_id}
138
+ function ae(a){var b=be(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ce(a){var b=be(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
139
+ function be(a){var b=a.language;return{id:Zd(a),active:!1,type:"",bandwidth:0,language:Tc(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
140
+ originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function de(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function ee(a){return a.filter(function(b){return de(b)})}
141
+ function td(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(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,v(a))):d.get(Math.min.apply(Math,v(c)))}
142
+ function fe(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=$c(Tc(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Tc(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ge(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(qc,[]);return a.length?
143
+ ge(e,a[0]):e}function ge(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Nd(a){var b=[];a.audio&&b.push(he(a.audio));a.video&&b.push(he(a.video));return b.join(", ")}
144
+ function he(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"}L("shaka.util.StreamUtils",qd);qd.meetsRestrictions=Ed;
145
+ var Qd={},$d=0,yd="smooth",zd="powerEfficient",Bd="bandwidth",Td=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ud=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ie(){var a=this;this.l=null;this.o=!1;this.i=new Ua;this.u=null;navigator.connection&&navigator.connection.addEventListener&&(this.u=function(){if(a.o&&a.g.useNetworkInformation){a.i=new Ua;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}},navigator.connection.addEventListener("change",this.u));this.m=[];this.A=1;this.F=!1;this.h=this.j=this.g=this.s=null;this.C=new cd(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
146
+ b&&a.l(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}})}q=ie.prototype;q.stop=function(){this.l=null;this.o=!1;this.m=[];this.A=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.C.stop()};q.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.u),this.u=null);this.C=null};q.init=function(a){this.l=a};
147
+ q.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientHeight*b,b*=this.j.clientWidth);a=je(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(ke(this));this.m.length&&!a.length&&(a=je(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
148
148
  d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},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};
149
- q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.F){a=this.i;if(!(a.g>=a.i))break a;this.F=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(le(this));a&&this.l(a,this.g.clearBufferSwitch,this.g.safeMarginSwitch)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(le(this))};q.setVariants=function(a){this.m=a};q.playbackRateChanged=function(a){this.A=a};
150
- 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.C.S(me)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function le(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
151
- function ke(a,b,c,d){a&&(b=b.filter(function(e){return Fd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}L("shaka.abr.SimpleAbrManager",je);je.prototype.configure=je.prototype.configure;je.prototype.setMediaElement=je.prototype.setMediaElement;je.prototype.playbackRateChanged=je.prototype.playbackRateChanged;je.prototype.setVariants=je.prototype.setVariants;je.prototype.getBandwidthEstimate=je.prototype.getBandwidthEstimate;je.prototype.segmentDownloaded=je.prototype.segmentDownloaded;
152
- je.prototype.disable=je.prototype.disable;je.prototype.enable=je.prototype.enable;je.prototype.chooseVariant=je.prototype.chooseVariant;je.prototype.init=je.prototype.init;je.prototype.release=je.prototype.release;je.prototype.stop=je.prototype.stop;var me=1;function ne(a,b){this.g=a;this.h=b}ne.prototype.toString=function(){return"v"+this.g+"."+this.h};function oe(a,b){var c=new ne(5,0),d=pe,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function qe(a,b,c,d){$a([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function re(a,b,c,d){Ya([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var pe=null;L("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function se(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}se.prototype.add=function(a){return te(this.h,a)?(this.g.add(a),!0):!1};
153
- function te(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)&&ue(c,d)&&ve(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(ue(a,b)&&ve(a.roles,b.roles)));return c?!1:!0}se.prototype.values=function(){return this.g.values()};
154
- function ue(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Ic(d)[0]});b=b.codecs.split(",").map(function(d){return Ic(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 ve(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function we(a){this.g=a;this.h=new xe(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"","")}we.prototype.create=function(a){var b=this,c=a.filter(function(d){return te(b.g,d)});return c.length?new se(c[0],c):this.h.create(a)};function xe(a,b,c,d,e){this.j=a;this.l=b;this.g=c;this.h=d;this.i=void 0===e?"":e}
155
- xe.prototype.create=function(a){var b=[];b=ye(a,this.j);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ze(b,this.l);a.length&&(b=a);this.h&&(a=Ae(b,this.h),a.length&&(b=a));this.g&&(a=ud(b,this.g),a.length&&(b=a));this.i&&(a=Be(b,this.i),a.length&&(b=a));a=new se(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,te(a.h,c)&&a.add(c);return a};function ye(a,b){b=Uc(b);var c=ad(b,a.map(function(d){return $c(d)}));return c?a.filter(function(d){return c==$c(d)}):[]}
156
- function ze(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Be(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Ae(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})};function Ce(){this.g=De;this.h=(new Map).set(De,2).set(Ee,1)}function Fe(a,b,c){a.h.set(De,c).set(Ee,b)}var Ee=0,De=1;function Ge(a,b){var c=He();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}
157
- function Ie(a){var b,c;return I(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 C(d,new Promise(function(e){(new dd(e)).S(c/1E3)}),2)}a.h*=a.m;D(d)})}function He(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Je(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Je.prototype.resolve=function(){};Je.prototype.reject=function(){};function Ke(a,b){this.promise=a;this.i=b;this.g=!1}function Le(a){return new Ke(Promise.reject(a),function(){return Promise.resolve()})}function Me(){var a=Promise.reject(new N(2,7,7001));a.catch(function(){});return new Ke(a,function(){return Promise.resolve()})}function Ne(a){return new Ke(Promise.resolve(a),function(){return Promise.resolve()})}function Oe(a){return new Ke(a,function(){return a.catch(function(){})})}Ke.prototype.abort=function(){this.g=!0;return this.i()};
158
- function Pe(a){return new Ke(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ke.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
159
- Ke.prototype.fa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Qe(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Je,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ke(f,function(){return d()})};
160
- function Qe(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()}}}L("shaka.util.AbortableOperation",Ke);Ke.prototype.chain=Ke.prototype.fa;Ke.prototype["finally"]=Ke.prototype.finally;Ke.all=Pe;Ke.prototype.abort=Ke.prototype.abort;Ke.notAbortable=Oe;Ke.completed=Ne;Ke.aborted=Me;Ke.failed=Le;function P(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
161
- function Re(a){var b=new P(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}P.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};P.prototype.stopImmediatePropagation=function(){this.g=!0};P.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",P);
162
- var Se={th:"abrstatuschanged",uh:"adaptation",vh:"buffering",wh:"downloadfailed",xh:"downloadheadersreceived",yh:"drmsessionupdate",Ah:"emsg",Mh:"prft",Error:"error",Bh:"expirationupdated",Ch:"gapjumped",Fh:"loaded",Gh:"loading",Ih:"manifestparsed",Jh:"mediaqualitychanged",Metadata:"metadata",Kh:"onstatechange",Lh:"onstateidle",Nh:"ratechange",Ph:"segmentappended",Qh:"sessiondata",Rh:"stalldetected",Sh:"streaming",Th:"textchanged",Uh:"texttrackvisibility",Vh:"timelineregionadded",Wh:"timelineregionenter",
163
- Xh:"timelineregionexit",Yh:"trackschanged",$h:"unloading",bi:"variantchanged"};function Te(){this.Z=new bd;this.xd=this}Te.prototype.addEventListener=function(a,b){this.Z&&this.Z.push(a,b)};Te.prototype.removeEventListener=function(a,b){this.Z&&this.Z.remove(a,b)};Te.prototype.dispatchEvent=function(a){if(!this.Z)return!0;var b=this.Z.get(a.type)||[],c=this.Z.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.xd;a.currentTarget=this.xd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
164
- Te.prototype.release=function(){this.Z=null};function Ue(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 Ve(a){var b={},c;for(c in a)b[c]=a[c];return b};function We(){this.g=[]}function Xe(a,b){a.g.push(b.finally(function(){vb(a.g,b)}))}We.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Ye(a,b,c,d){Te.call(this);this.i=!1;this.m=new We;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.u=d||null;this.o=!1}ra(Ye,Te);q=Ye.prototype;q.Le=function(a){this.o=a};function Ze(a,b,c,d){c=c||$e;var e=af[a];if(!e||c>=e.priority)af[a]={priority:c,Kd:b,Wg:void 0===d?!1:d}}q.Xg=function(a){this.g.add(a)};q.nh=function(a){this.g.delete(a)};q.Zf=function(){this.g.clear()};q.Yg=function(a){this.h.add(a)};q.oh=function(a){this.h.delete(a)};q.$f=function(){this.h.clear()};
165
- function bf(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();Te.prototype.release.call(this);return this.m.destroy()};
166
- q.request=function(a,b,c){var d=this,e=new cf;if(this.i){var f=Promise.reject(new N(2,7,7001));f.catch(function(){});return new df(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ue(b.retryParameters):He();b.uris=Ue(b.uris);f=ef(this,a,b,c);var g=f.fa(function(){return ff(d,a,b,new Ge(b.retryParameters,!1),0,null,e)}),h=g.fa(function(p){return gf(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
167
- var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.fa(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Hg||!d.l||u.fromCache||"HEAD"==b.method||a!=hf||d.l(u.timeMs,u.data.byteLength);return u},function(p){p&&(p.severity=2);throw p;});f=new df(n.promise,function(){return n.abort()},e);Xe(this.m,f);return f};
168
- function ef(a,b,c,d){function e(h){f=f.fa(function(){c.body&&(c.body=nb(c.body));return h(b,c,d)})}var f=Ne(void 0);a.u&&e(a.u);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.fa(void 0,function(h){if(h instanceof N&&7001==h.code)throw h;throw new N(2,1,1006,h);})}
169
- function ff(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new bc(c.uris[e]),k=h.Ma,l=!1;k||(k=location.protocol,k=k.slice(0,-1),cc(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=af[k])?k.Kd:null;if(!m)return Le(new N(2,1,1E3,h));var n=k.Wg,p=null,r=null,u=!1,w=!1,y;return Oe(Ie(d)).fa(function(){if(a.i)return Me();y=Date.now();var x=m(c.uris[e],c,b,function(B,E,F){p&&p.stop();r&&r.S(z/1E3);a.l&&b==hf&&(a.l(B,E),l=!0,g.g=F)},function(B){a.j&&a.j(B,c,b);w=!0});
170
- if(!n)return x;var A=c.retryParameters.connectionTimeout;A&&(p=new dd(function(){u=!0;x.abort()}),p.S(A/1E3));var z=c.retryParameters.stallTimeout;z&&(r=new dd(function(){u=!0;x.abort()}));return x}).fa(function(x){p&&p.stop();r&&r.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);var A={response:x,Hg:l};!w&&a.j&&a.j(x.headers,c,b);return A},function(x){p&&p.stop();r&&r.stop();if(a.s){var A=null,z=0;x instanceof N&&(A=x,1001==x.code&&(z=x.data[1]));a.s(c,A,z,u)}if(a.i)return Me();u&&(x=new N(1,1,1003,
171
- c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return A=(new Map).set("error",x),A=new P("retry",A),a.dispatchEvent(A),e=(e+1)%c.uris.length,ff(a,b,c,d,e,x,g)}throw x;})}
172
- function gf(a,b,c,d){var e=Ne(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Ud:f.Ud},g=a.next())f.Ud=g.value,e=e.fa(function(h){return function(){var k=c.response;k.data&&(k.data=nb(k.data));return h.Ud(b,k,d)}}(f));return e.fa(function(){return c},function(h){var k=2;if(h instanceof N){if(7001==h.code)throw h;k=h.severity}throw new N(k,1,1007,h);})}L("shaka.net.NetworkingEngine",Ye);Ye.prototype.request=Ye.prototype.request;Ye.prototype.destroy=Ye.prototype.destroy;Ye.makeRequest=bf;
173
- Ye.defaultRetryParameters=function(){return He()};Ye.prototype.clearAllResponseFilters=Ye.prototype.$f;Ye.prototype.unregisterResponseFilter=Ye.prototype.oh;Ye.prototype.registerResponseFilter=Ye.prototype.Yg;Ye.prototype.clearAllRequestFilters=Ye.prototype.Zf;Ye.prototype.unregisterRequestFilter=Ye.prototype.nh;Ye.prototype.registerRequestFilter=Ye.prototype.Xg;Ye.unregisterScheme=function(a){delete af[a]};Ye.registerScheme=Ze;Ye.prototype.setForceHTTPS=Ye.prototype.Le;function cf(){this.g=0}
174
- Ye.NumBytesRemainingClass=cf;function df(a,b,c){Ke.call(this,a,b);this.h=c}ra(df,Ke);Ye.PendingRequest=df;var hf=1;Ye.RequestType={MANIFEST:0,SEGMENT:hf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};Ye.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var $e=3;Ye.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:$e};var af={};function jf(a){this.g=!1;this.h=new Je;this.i=a}jf.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 kf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function lf(){this.g=new bd}q=lf.prototype;q.release=function(){this.sb();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new mf(a,b,c,d),this.g.push(b,a))};q.la=function(a,b,c,d){function e(g){f.Yc(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.Yc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Yc(),this.g.remove(b,e))}};
175
- q.sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,v(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Yc();this.g.g={}}};L("shaka.util.EventManager",lf);lf.prototype.removeAll=lf.prototype.sb;lf.prototype.unlisten=lf.prototype.Yc;lf.prototype.listenOnce=lf.prototype.la;lf.prototype.listen=lf.prototype.D;lf.prototype.release=lf.prototype.release;function mf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=nf(a,d);this.target.addEventListener(b,c,this.g)}
176
- mf.prototype.Yc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function nf(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 of(a)?b:b.capture||!1}
177
- function of(a){var b=pf;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}pf=b}return b||!1}var pf=void 0;function qf(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function rf(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function sf(a){this.h=a;this.g=void 0}sf.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function tf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function uf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function vf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(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 wf(){}
178
- function xf(a){if(!a)return"";a=M(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!nd())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ya('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==(a[c+
149
+ q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.F){a=this.i;if(!(a.g>=a.i))break a;this.F=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(ke(this));a&&this.l(a,this.g.clearBufferSwitch,this.g.safeMarginSwitch)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(ke(this))};q.setVariants=function(a){this.m=a};q.playbackRateChanged=function(a){this.A=a};
150
+ 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.C.S(le)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function ke(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
151
+ function je(a,b,c,d){a&&(b=b.filter(function(e){return Ed(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}L("shaka.abr.SimpleAbrManager",ie);ie.prototype.configure=ie.prototype.configure;ie.prototype.setMediaElement=ie.prototype.setMediaElement;ie.prototype.playbackRateChanged=ie.prototype.playbackRateChanged;ie.prototype.setVariants=ie.prototype.setVariants;ie.prototype.getBandwidthEstimate=ie.prototype.getBandwidthEstimate;ie.prototype.segmentDownloaded=ie.prototype.segmentDownloaded;
152
+ ie.prototype.disable=ie.prototype.disable;ie.prototype.enable=ie.prototype.enable;ie.prototype.chooseVariant=ie.prototype.chooseVariant;ie.prototype.init=ie.prototype.init;ie.prototype.release=ie.prototype.release;ie.prototype.stop=ie.prototype.stop;var le=1;function me(a,b){this.g=a;this.h=b}me.prototype.toString=function(){return"v"+this.g+"."+this.h};function ne(a,b){var c=new me(5,0),d=oe,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function pe(a,b,c,d){Xa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function qe(a,b,c,d){Wa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var oe=null;L("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function re(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}re.prototype.add=function(a){return se(this.h,a)?(this.g.add(a),!0):!1};
153
+ function se(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)&&te(c,d)&&ue(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(te(a,b)&&ue(a.roles,b.roles)));return c?!1:!0}re.prototype.values=function(){return this.g.values()};
154
+ function te(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Hc(d)[0]});b=b.codecs.split(",").map(function(d){return Hc(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 ue(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function ve(a){this.g=a;this.h=new we(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"","")}ve.prototype.create=function(a){var b=this,c=a.filter(function(d){return se(b.g,d)});return c.length?new re(c[0],c):this.h.create(a)};function we(a,b,c,d,e){this.j=a;this.l=b;this.g=c;this.h=d;this.i=void 0===e?"":e}
155
+ we.prototype.create=function(a){var b=[];b=xe(a,this.j);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ye(b,this.l);a.length&&(b=a);this.h&&(a=ze(b,this.h),a.length&&(b=a));this.g&&(a=td(b,this.g),a.length&&(b=a));this.i&&(a=Ae(b,this.i),a.length&&(b=a));a=new re(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,se(a.h,c)&&a.add(c);return a};function xe(a,b){b=Tc(b);var c=$c(b,a.map(function(d){return Zc(d)}));return c?a.filter(function(d){return c==Zc(d)}):[]}
156
+ function ye(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ae(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function ze(a,b){"AUTO"==b&&(b=window.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");return a.filter(function(c){return c.video&&c.video.hdr&&c.video.hdr!=b?!1:!0})};function Be(){this.g=Ce;this.h=(new Map).set(Ce,2).set(De,1)}function Ee(a,b,c){a.h.set(Ce,c).set(De,b)}var De=0,Ce=1;function Fe(a,b){var c=Ge();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}
157
+ function He(a){var b,c;return H(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 C(d,new Promise(function(e){(new cd(e)).S(c/1E3)}),2)}a.h*=a.m;D(d)})}function Ge(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ie(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ie.prototype.resolve=function(){};Ie.prototype.reject=function(){};function Je(a,b){this.promise=a;this.i=b;this.g=!1}function Ke(a){return new Je(Promise.reject(a),function(){return Promise.resolve()})}function Le(){var a=Promise.reject(new N(2,7,7001));a.catch(function(){});return new Je(a,function(){return Promise.resolve()})}function Me(a){return new Je(Promise.resolve(a),function(){return Promise.resolve()})}function Ne(a){return new Je(a,function(){return a.catch(function(){})})}Je.prototype.abort=function(){this.g=!0;return this.i()};
158
+ function Oe(a){return new Je(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Je.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
159
+ Je.prototype.fa=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Pe(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ie,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Je(f,function(){return d()})};
160
+ function Pe(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()}}}L("shaka.util.AbortableOperation",Je);Je.prototype.chain=Je.prototype.fa;Je.prototype["finally"]=Je.prototype.finally;Je.all=Oe;Je.prototype.abort=Je.prototype.abort;Je.notAbortable=Ne;Je.completed=Me;Je.aborted=Le;Je.failed=Ke;function O(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
161
+ function Qe(a){var b=new O(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.g=!0};O.prototype.stopPropagation=function(){};L("shaka.util.FakeEvent",O);
162
+ var Re={th:"abrstatuschanged",uh:"adaptation",vh:"buffering",wh:"downloadfailed",xh:"downloadheadersreceived",yh:"drmsessionupdate",Ah:"emsg",Mh:"prft",Error:"error",Bh:"expirationupdated",Ch:"gapjumped",Fh:"loaded",Gh:"loading",Ih:"manifestparsed",Jh:"mediaqualitychanged",Metadata:"metadata",Kh:"onstatechange",Lh:"onstateidle",Nh:"ratechange",Ph:"segmentappended",Qh:"sessiondata",Rh:"stalldetected",Sh:"streaming",Th:"textchanged",Uh:"texttrackvisibility",Vh:"timelineregionadded",Wh:"timelineregionenter",
163
+ Xh:"timelineregionexit",Yh:"trackschanged",$h:"unloading",bi:"variantchanged"};function Se(){this.Z=new ad;this.yd=this}Se.prototype.addEventListener=function(a,b){this.Z&&this.Z.push(a,b)};Se.prototype.removeEventListener=function(a,b){this.Z&&this.Z.remove(a,b)};Se.prototype.dispatchEvent=function(a){if(!this.Z)return!0;var b=this.Z.get(a.type)||[],c=this.Z.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.yd;a.currentTarget=this.yd;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
164
+ Se.prototype.release=function(){this.Z=null};function Te(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 Ue(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ve(){this.g=[]}function We(a,b){a.g.push(b.finally(function(){ub(a.g,b)}))}Ve.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Xe(a,b,c,d){Se.call(this);this.i=!1;this.m=new Ve;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.u=d||null;this.o=!1}qa(Xe,Se);q=Xe.prototype;q.Me=function(a){this.o=a};function Ye(a,b,c,d){c=c||Ze;var e=$e[a];if(!e||c>=e.priority)$e[a]={priority:c,Ld:b,Wg:void 0===d?!1:d}}q.Xg=function(a){this.g.add(a)};q.nh=function(a){this.g.delete(a)};q.Zf=function(){this.g.clear()};q.Yg=function(a){this.h.add(a)};q.oh=function(a){this.h.delete(a)};q.$f=function(){this.h.clear()};
165
+ function af(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();Se.prototype.release.call(this);return this.m.destroy()};
166
+ q.request=function(a,b,c){var d=this,e=new bf;if(this.i){var f=Promise.reject(new N(2,7,7001));f.catch(function(){});return new cf(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Te(b.retryParameters):Ge();b.uris=Te(b.uris);f=df(this,a,b,c);var g=f.fa(function(){return ef(d,a,b,new Fe(b.retryParameters,!1),0,null,e)}),h=g.fa(function(p){return ff(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
167
+ var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.fa(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.Hg||!d.l||u.fromCache||"HEAD"==b.method||a!=gf||d.l(u.timeMs,u.data.byteLength);return u},function(p){p&&(p.severity=2);throw p;});f=new cf(n.promise,function(){return n.abort()},e);We(this.m,f);return f};
168
+ function df(a,b,c,d){function e(h){f=f.fa(function(){c.body&&(c.body=mb(c.body));return h(b,c,d)})}var f=Me(void 0);a.u&&e(a.u);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.fa(void 0,function(h){if(h instanceof N&&7001==h.code)throw h;throw new N(2,1,1006,h);})}
169
+ function ef(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new ac(c.uris[e]),k=h.Ma,l=!1;k||(k=location.protocol,k=k.slice(0,-1),bc(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=$e[k])?k.Ld:null;if(!m)return Ke(new N(2,1,1E3,h));var n=k.Wg,p=null,r=null,u=!1,w=!1,y;return Ne(He(d)).fa(function(){if(a.i)return Le();y=Date.now();var x=m(c.uris[e],c,b,function(B,E,F){p&&p.stop();r&&r.S(z/1E3);a.l&&b==gf&&(a.l(B,E),l=!0,g.g=F)},function(B){a.j&&a.j(B,c,b);w=!0});
170
+ if(!n)return x;var A=c.retryParameters.connectionTimeout;A&&(p=new cd(function(){u=!0;x.abort()}),p.S(A/1E3));var z=c.retryParameters.stallTimeout;z&&(r=new cd(function(){u=!0;x.abort()}));return x}).fa(function(x){p&&p.stop();r&&r.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-y);var A={response:x,Hg:l};!w&&a.j&&a.j(x.headers,c,b);return A},function(x){p&&p.stop();r&&r.stop();if(a.s){var A=null,z=0;x instanceof N&&(A=x,1001==x.code&&(z=x.data[1]));a.s(c,A,z,u)}if(a.i)return Le();u&&(x=new N(1,1,1003,
171
+ c.uris[e],b));if(x instanceof N){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return A=(new Map).set("error",x),A=new O("retry",A),a.dispatchEvent(A),e=(e+1)%c.uris.length,ef(a,b,c,d,e,x,g)}throw x;})}
172
+ function ff(a,b,c,d){var e=Me(void 0),f={};a=t(a.h);for(var g=a.next();!g.done;f={Vd:f.Vd},g=a.next())f.Vd=g.value,e=e.fa(function(h){return function(){var k=c.response;k.data&&(k.data=mb(k.data));return h.Vd(b,k,d)}}(f));return e.fa(function(){return c},function(h){var k=2;if(h instanceof N){if(7001==h.code)throw h;k=h.severity}throw new N(k,1,1007,h);})}L("shaka.net.NetworkingEngine",Xe);Xe.prototype.request=Xe.prototype.request;Xe.prototype.destroy=Xe.prototype.destroy;Xe.makeRequest=af;
173
+ Xe.defaultRetryParameters=function(){return Ge()};Xe.prototype.clearAllResponseFilters=Xe.prototype.$f;Xe.prototype.unregisterResponseFilter=Xe.prototype.oh;Xe.prototype.registerResponseFilter=Xe.prototype.Yg;Xe.prototype.clearAllRequestFilters=Xe.prototype.Zf;Xe.prototype.unregisterRequestFilter=Xe.prototype.nh;Xe.prototype.registerRequestFilter=Xe.prototype.Xg;Xe.unregisterScheme=function(a){delete $e[a]};Xe.registerScheme=Ye;Xe.prototype.setForceHTTPS=Xe.prototype.Me;function bf(){this.g=0}
174
+ Xe.NumBytesRemainingClass=bf;function cf(a,b,c){Je.call(this,a,b);this.h=c}qa(cf,Je);Xe.PendingRequest=cf;var gf=1;Xe.RequestType={MANIFEST:0,SEGMENT:gf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};Xe.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var Ze=3;Xe.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Ze};var $e={};function hf(a){this.g=!1;this.h=new Ie;this.i=a}hf.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 jf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function kf(){this.g=new ad}q=kf.prototype;q.release=function(){this.sb();this.g=null};q.D=function(a,b,c,d){this.g&&(a=new lf(a,b,c,d),this.g.push(b,a))};q.la=function(a,b,c,d){function e(g){f.Yc(a,b,e);c(g)}var f=this;this.D(a,b,e,d)};q.Yc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Yc(),this.g.remove(b,e))}};
175
+ q.sb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,v(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.Yc();this.g.g={}}};L("shaka.util.EventManager",kf);kf.prototype.removeAll=kf.prototype.sb;kf.prototype.unlisten=kf.prototype.Yc;kf.prototype.listenOnce=kf.prototype.la;kf.prototype.listen=kf.prototype.D;kf.prototype.release=kf.prototype.release;function lf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=mf(a,d);this.target.addEventListener(b,c,this.g)}
176
+ lf.prototype.Yc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function mf(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 nf(a)?b:b.capture||!1}
177
+ function nf(a){var b=of;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}of=b}return b||!1}var of=void 0;function pf(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function qf(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function rf(a){this.h=a;this.g=void 0}rf.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function sf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function tf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function uf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next()){var d=t(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 vf(){}
178
+ function wf(a){if(!a)return"";a=M(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!md())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Wa('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==(a[c+
179
179
  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}
180
- function yf(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=pb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return zf.value()(d)}
181
- function Af(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=M(a);if(239==c[0]&&187==c[1]&&191==c[2])return xf(c);if(254==c[0]&&255==c[1])return yf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return yf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return yf(a,!1);if(0==c[1]&&0==c[3])return yf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return xf(a);throw new N(2,2,2003);}
182
- function Bf(a){if(window.TextEncoder&&!nd()){var b=new TextEncoder;return nb(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 nb(b)}function Cf(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}L("shaka.util.StringUtils",wf);wf.resetFromCharCode=function(){zf.g=void 0};wf.toUTF16=Cf;wf.toUTF8=Bf;wf.fromBytesAutoDetect=Af;wf.fromUTF16=yf;
183
- wf.fromUTF8=xf;var zf=new sf(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={ob:65536};0<b.ob;b={ob:b.ob},b.ob/=2)if(a(b.ob))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ob)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ob));return e}}(b);return null});function Df(a,b){this.h=pb(a);this.i=b==Ef;this.g=0}q=Df.prototype;q.ja=function(){return this.g<this.h.byteLength};q.ha=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.qa=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ff();}};q.Ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ff();}};q.K=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ff();}};
184
- q.zf=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ff();}};q.dc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ff();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.kb=function(a){if(this.g+a>this.h.byteLength)throw Ff();var b=M(this.h,this.g,a);this.g+=a;return b};
185
- q.skip=function(a){if(this.g+a>this.h.byteLength)throw Ff();this.g+=a};q.eh=function(a){if(this.g<a)throw Ff();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Ff();this.g=a};q.Tc=function(){for(var a=this.g;this.ja()&&0!=this.h.getUint8(this.g);)this.g+=1;a=M(this.h,a,this.g-a);this.g+=1;return xf(a)};function Ff(){return new N(2,3,3E3)}L("shaka.util.DataViewReader",Df);Df.prototype.readTerminatedString=Df.prototype.Tc;Df.prototype.seek=Df.prototype.seek;Df.prototype.rewind=Df.prototype.eh;
186
- Df.prototype.skip=Df.prototype.skip;Df.prototype.readBytes=Df.prototype.kb;Df.prototype.readUint64=Df.prototype.dc;Df.prototype.readInt32=Df.prototype.zf;Df.prototype.readUint32=Df.prototype.K;Df.prototype.readUint16=Df.prototype.Ia;Df.prototype.readUint8=Df.prototype.qa;Df.prototype.getLength=Df.prototype.getLength;Df.prototype.getPosition=Df.prototype.ha;Df.prototype.hasMoreData=Df.prototype.ja;var Ef=1;Df.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ef};function Gf(){this.i=[];this.h=[];this.g=!1}q=Gf.prototype;q.box=function(a,b){a=Hf(a);this.i[a]=If;this.h[a]=b;return this};q.O=function(a,b){a=Hf(a);this.i[a]=Jf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Df(a,0);for(this.g=!1;a.ja()&&!this.g;)this.Rc(0,a,b,c)};
187
- q.Rc=function(a,b,c,d){var e=b.ha();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.K(),g=b.K(),h=Kf(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ha()+8>b.getLength()){this.g=!0;return}f=b.dc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Jf){if(d&&b.ha()+4>b.getLength()){this.g=!0;return}n=b.K();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.ha(),b=0<d?b.kb(d):new Uint8Array(0),b=new Df(b,0),l({name:h,parser:this,
188
- partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ha(),b.getLength()-b.ha()))}};function Lf(a){for(var b=Mf(a);a.reader.ja()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}function Nf(a){for(var b=Mf(a),c=a.reader.K(),d=0;d<c&&(a.parser.Rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Of(a){var b=Mf(a);for(a.reader.skip(78);a.reader.ja()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}
189
- function Pf(a){return function(b){a(b.reader.kb(b.reader.getLength()-b.reader.ha()))}}function Hf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Kf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Mf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",Gf);Gf.headerSize=Mf;Gf.typeToString=Kf;Gf.allData=Pf;Gf.visualSampleEntry=Of;Gf.sampleDescription=Nf;Gf.children=Lf;Gf.prototype.parseNext=Gf.prototype.Rc;
190
- Gf.prototype.parse=Gf.prototype.parse;Gf.prototype.stop=Gf.prototype.stop;Gf.prototype.fullBox=Gf.prototype.O;Gf.prototype.box=Gf.prototype.box;var If=0,Jf=1;function Qf(){}function Rf(a){a=M(a);a=zf.value()(a);return btoa(a)}function Sf(a,b){b=void 0==b?!0:b;a=Rf(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Tf(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 Uf(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}
191
- function Vf(a){var b=M(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Wf(){for(var a=La.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(M(d),c),c+=d.byteLength;return b}L("shaka.util.Uint8ArrayUtils",Qf);Qf.concat=Wf;Qf.toHex=Vf;Qf.fromHex=Uf;Qf.fromBase64=Tf;Qf.toBase64=Sf;Qf.toStandardBase64=Rf;function Xf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Gf).box("moov",Lf).box("moof",Lf).O("pssh",function(c){if(!(1<c.version)){var d=M(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Vf(c.reader.kb(16)));if(0<c.version){d=c.reader.K();for(var e=0;e<d;e++){var f=Vf(c.reader.kb(16));b.h.push(f)}}}}).parse(a)}
192
- function Yf(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=pb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Uf(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Zf(a,b){a=$f(a,b);return 1!=a.length?null:a[0]}function ag(a,b,c){a=bg(a,b,c);return 1!=a.length?null:a[0]}function $f(a,b){var c=[];a=t(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 cg(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
193
- function bg(a,b,c){var d=[];a=t(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 dg(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function eg(a,b,c){b=t(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 fg(a){return Array.from(a.childNodes).every(gg)?a.textContent.trim():null}
194
- function gg(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function hg(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 ig(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}
195
- function jg(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}
196
- function kg(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 lg(a){a=Number(a);return 0===a%1?a:null}function mg(a){a=Number(a);return 0===a%1&&0<a?a:null}function ng(a){a=Number(a);return 0===a%1&&0<=a?a:null}function og(a){a=Number(a);return isNaN(a)?null:a}function pg(a){return a?"true"===a.toLowerCase():!1}
197
- function qg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function rg(a,b){var c=new DOMParser,d=sg.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}
198
- function tg(a,b){try{var c=Af(a);return rg(c,b)}catch(d){return null}}var sg=new sf(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 ug(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.G=new Set;this.m=this.s=null;this.ga=this.Y=!1;this.H=0;this.g=null;this.A=new lf;this.i=new Map;this.u=new Map;this.l=new Je;this.h=null;this.o=function(d){2==d.severity&&c.l.reject(d);a.onError(d)};this.V=new Map;this.Z=new Map;this.W=new dd(function(){return vg(c)});this.M=!1;this.L=[];this.N=!1;this.aa=(new dd(function(){wg(c)})).Ca(b);this.l.catch(function(){});this.j=new jf(function(){return xg(c)});this.X=!1;this.I=this.F=null}q=ug.prototype;
199
- q.destroy=function(){return this.j.destroy()};function xg(a){return I(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.l.reject(),a.aa.stop(),a.aa=null,a.W.stop(),a.W=null,C(b,yg(a),2);case 2:if(!a.m){b.B(3);break}wa(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:Aa(b,5);break;case 4:Ba(b);case 5:a.m=null;case 3:a.g=null,a.G.clear(),a.s=null,a.u=new Map,a.h=null,a.o=function(){},a.C=null,a.X=!1,a.F=null,D(b)}})}q.configure=function(a){this.h=a};
200
- function zg(a,b,c){a.ga=!0;a.u=new Map;a.M=c;return Ag(a,b)}function Bg(a,b,c){a.u=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.u.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.u.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.M=0<a.u.size;return Ag(a,b)}
201
- function Cg(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 Dg(a,g,[])}
202
- function Ag(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A;return I(function(z){if(1==z.g){if(c=Eg(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=tf(a.h.servers),Fg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Gg(m),p=t(n),r=p.next();!r.done;r=p.next())u=r.value,k.add(u);w=t(k);for(r=w.next();!r.done;r=
203
- w.next())y=r.value,Hg(y,tf(a.h.servers),tf(a.h.advanced||{}),a.h.keySystemsMapping);return C(z,Ld(b,a.M,a.X,a.h.preferredKeySystems),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.Y=!0,z.return(Promise.resolve());A=Dg(a,void 0,b);return z.return(g?A:A.catch(function(){}))})}
204
- function Ig(a){var b;return I(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.F){c.B(2);break}return C(c,a.F,3);case 3:return kf(a.j),c.return();case 2:return wa(c,4),a.F=a.m.setMediaKeys(a.s),C(c,a.F,6);case 6:Aa(c,5);break;case 4:b=Ba(c),a.o(new N(2,6,6003,b.message));case 5:kf(a.j),D(c)}})}function Jg(a,b){return I(function(c){if(1==c.g)return C(c,Ig(a),2);Kg(a,b.initDataType,M(b.initData));D(c)})}
205
- q.yc=function(a){var b=this;return I(function(c){if(1==c.g){if(!b.s)return b.A.la(a,"encrypted",function(){b.o(new N(2,6,6010))}),c.return();b.m=a;b.A.la(b.m,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())Lg(b,e.value);b.N=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.A.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return yg(b)});b.I=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.I||"com.apple.fps"!==b.g.keySystem||
206
- b.u.size?C(c,Ig(b),2):c.B(2)}Mg(b).catch(function(){});b.I||b.u.size||b.h.parseInbandPsshEnabled||b.A.D(b.m,"encrypted",function(d){return Jg(b,d)});D(c)})};
207
- function Ng(a){var b,c,d,e,f;return I(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=bf([a.g.serverCertificateUri],a.h.retryParameters);wa(g,3);c=a.C.Hb.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=M(d.data);Aa(g,4);break;case 3:throw e=Ba(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();
208
- wa(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:Aa(g,0);break;case 6:throw f=Ba(g),new N(2,6,6004,f.message);}})}function Og(a,b){var c,d,e;return I(function(f){if(1==f.g)return C(f,Pg(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Xa=new Je,d.push(e.Xa);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);D(f)})}
209
- function Mg(a){var b,c,d,e,f;return I(function(g){if(1==g.g){if(!a.u.size)return g.B(2);a.u.forEach(function(h,k){Pg(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Qg(a))return g.return(a.l);a.l=new Je;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Kg(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
210
- function Kg(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(lb(c,e.value.initData)&&!jd("Tizen 2"))return;0<a.i.size&&Rg(a)&&(a.l.resolve(),a.l=new Je,a.l.catch(function(){}));Sg(a,b,c,a.g.sessionType)}}function Tg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Ug(a){a=a.i.keys();a=qf(a,function(b){return b.sessionId});return Array.from(a)}
211
- q.be=function(){var a=this,b=this.i.keys();b=qf(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Ic=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.qd=function(){return uf(this.Z)};
212
- function Dg(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,y,x;return I(function(A){switch(A.g){case 1:d=new Map;if(c.length){e=Vg(a,c,d);A.B(2);break}return C(A,Wg(a,b),3);case 3:e=A.h;case 2:f=e;if(!f)throw new N(2,6,6001);kf(a.j);wa(A,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.G.add(r.contentType.toLowerCase());if(c.length){var z=
213
- f.keySystem;var B=d.get(f.keySystem);var E=[],F=[],G=[],H=[],J=new Set;Xg(B,E,G,F,H,J);var K=a.M?"persistent-license":"temporary";z={keySystem:z,licenseServerUri:E[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||K,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:F[0],initData:H,keyIds:J};B=t(B);for(E=B.next();!E.done;E=
214
- B.next())E=E.value,E.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(z.persistentStateRequired=E.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),E=[],F=[],G=[],H=[],J=new Set,Xg(z.drmInfos,E,G,F,H,J),B={keySystem:B,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==z.distinctiveIdentifier,persistentStateRequired:"required"==z.persistentState,sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?
215
- z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:F[0],initData:H,keyIds:J};a.g=B;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return C(A,f.createMediaKeys(),6);case 6:u=A.h;kf(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){A.B(7);break}wa(A,8);return C(A,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:w=A.h;if("usable"!=w)throw new N(2,
216
- 6,6018);kf(a.j);Aa(A,7,4);break;case 8:y=Ba(A,4);if(y instanceof N)throw y;throw new N(2,6,6019,y.message);case 7:return a.Y=!0,C(A,Ng(a),11);case 11:kf(a.j);Aa(A,0);break;case 4:x=Ba(A);kf(a.j,x);a.g=null;a.G.clear();if(x instanceof N)throw x;throw new N(2,6,6002,x.message);}})}
217
- function Vg(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Gg(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=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Td:d.Td},e=a.next())for(d.Td=e.value,f=t(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==
218
- l.Td}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(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=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
219
- function Wg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y;return I(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.B(4);break}k=h.value;if(!b.has(k)){x.B(3);break}l=b.get(k);wa(x,6);return C(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
220
- x.h,x.return(c);case 6:Ba(x);case 7:kf(a.j);case 3:h=g.next();x.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){x.B(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();x.B(9);break}u=h.value;w=b.get(u);y=w.drmInfos.some(function(A){return!!A.licenseServerUri});if(y!=p){x.B(13);break}wa(x,15);return C(x,navigator.requestMediaKeySystemAccess(u,[w]),17);case 17:return c=x.h,x.return(c);case 15:Ba(x);case 16:kf(a.j);case 13:h=r.next();x.B(12);break;case 11:return x.return(c)}})}
221
- function Eg(a){a=tf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Sf(Uf(f),!1));f=e;22!=f.length&&(f=Sf(Uf(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:M(Bf(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
222
- videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}function Yg(a){Rg(a)&&a.l.resolve()}function Zg(a,b){(new dd(function(){b.loaded=!0;Yg(a)})).S($g)}
223
- function Pg(a,b,c){var d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new N(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.A.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.L.push(n):Lg(a,n)});a.A.D(d,"keystatuseschange",function(n){return ah(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,we:Infinity,Xa:null,type:"persistent-license"};a.i.set(d,f);wa(m,2);return C(m,
224
- d.load(b),4);case 4:return g=m.h,kf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new N(h,6,6013)),f.loaded=!0),Zg(a,f),Yg(a),m.return(d);case 2:k=Ba(m),kf(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new N(l,6,6005,k.message)),f.loaded=!0,Yg(a);case 3:return m.return(Promise.resolve())}})}
225
- function Sg(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new N(2,6,6005,f.message));return}a.A.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.L.push(f):Lg(a,f)});a.A.D(e,"keystatuseschange",function(f){return ah(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,we:Infinity,Xa: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.o(b);return}a.h.logLicenseExchange&&Sf(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
180
+ function xf(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=ob(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return yf.value()(d)}
181
+ function zf(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=M(a);if(239==c[0]&&187==c[1]&&191==c[2])return wf(c);if(254==c[0]&&255==c[1])return xf(c.subarray(2),!1);if(255==c[0]&&254==c[1])return xf(c.subarray(2),!0);if(0==c[0]&&0==c[2])return xf(a,!1);if(0==c[1]&&0==c[3])return xf(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return wf(a);throw new N(2,2,2003);}
182
+ function Af(a){if(window.TextEncoder&&!md()){var b=new TextEncoder;return mb(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 mb(b)}function Bf(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}L("shaka.util.StringUtils",vf);vf.resetFromCharCode=function(){yf.g=void 0};vf.toUTF16=Bf;vf.toUTF8=Af;vf.fromBytesAutoDetect=zf;vf.fromUTF16=xf;
183
+ vf.fromUTF8=wf;var yf=new rf(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={ob:65536};0<b.ob;b={ob:b.ob},b.ob/=2)if(a(b.ob))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.ob)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.ob));return e}}(b);return null});function Cf(a,b){this.h=ob(a);this.i=b==Df;this.g=0}q=Cf.prototype;q.ja=function(){return this.g<this.h.byteLength};q.ha=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.qa=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ef();}};q.Ia=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Ef();}};q.K=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Ef();}};
184
+ q.zf=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Ef();}};q.dc=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Ef();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.kb=function(a){if(this.g+a>this.h.byteLength)throw Ef();var b=M(this.h,this.g,a);this.g+=a;return b};
185
+ q.skip=function(a){if(this.g+a>this.h.byteLength)throw Ef();this.g+=a};q.eh=function(a){if(this.g<a)throw Ef();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Ef();this.g=a};q.Tc=function(){for(var a=this.g;this.ja()&&0!=this.h.getUint8(this.g);)this.g+=1;a=M(this.h,a,this.g-a);this.g+=1;return wf(a)};function Ef(){return new N(2,3,3E3)}L("shaka.util.DataViewReader",Cf);Cf.prototype.readTerminatedString=Cf.prototype.Tc;Cf.prototype.seek=Cf.prototype.seek;Cf.prototype.rewind=Cf.prototype.eh;
186
+ Cf.prototype.skip=Cf.prototype.skip;Cf.prototype.readBytes=Cf.prototype.kb;Cf.prototype.readUint64=Cf.prototype.dc;Cf.prototype.readInt32=Cf.prototype.zf;Cf.prototype.readUint32=Cf.prototype.K;Cf.prototype.readUint16=Cf.prototype.Ia;Cf.prototype.readUint8=Cf.prototype.qa;Cf.prototype.getLength=Cf.prototype.getLength;Cf.prototype.getPosition=Cf.prototype.ha;Cf.prototype.hasMoreData=Cf.prototype.ja;var Df=1;Cf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Df};function Ff(){this.i=[];this.h=[];this.g=!1}q=Ff.prototype;q.box=function(a,b){a=Gf(a);this.i[a]=Hf;this.h[a]=b;return this};q.O=function(a,b){a=Gf(a);this.i[a]=If;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Cf(a,0);for(this.g=!1;a.ja()&&!this.g;)this.Rc(0,a,b,c)};
187
+ q.Rc=function(a,b,c,d){var e=b.ha();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.K(),g=b.K(),h=Jf(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.ha()+8>b.getLength()){this.g=!0;return}f=b.dc();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==If){if(d&&b.ha()+4>b.getLength()){this.g=!0;return}n=b.K();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.ha(),b=0<d?b.kb(d):new Uint8Array(0),b=new Cf(b,0),l({name:h,parser:this,
188
+ partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.ha(),b.getLength()-b.ha()))}};function Kf(a){for(var b=Lf(a);a.reader.ja()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}function Mf(a){for(var b=Lf(a),c=a.reader.K(),d=0;d<c&&(a.parser.Rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Nf(a){var b=Lf(a);for(a.reader.skip(78);a.reader.ja()&&!a.parser.g;)a.parser.Rc(a.start+b,a.reader,a.partialOkay)}
189
+ function Of(a){return function(b){a(b.reader.kb(b.reader.getLength()-b.reader.ha()))}}function Gf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Jf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Lf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",Ff);Ff.headerSize=Lf;Ff.typeToString=Jf;Ff.allData=Of;Ff.visualSampleEntry=Nf;Ff.sampleDescription=Mf;Ff.children=Kf;Ff.prototype.parseNext=Ff.prototype.Rc;
190
+ Ff.prototype.parse=Ff.prototype.parse;Ff.prototype.stop=Ff.prototype.stop;Ff.prototype.fullBox=Ff.prototype.O;Ff.prototype.box=Ff.prototype.box;var Hf=0,If=1;function Pf(){}function Qf(a){a=M(a);a=yf.value()(a);return btoa(a)}function Rf(a,b){b=void 0==b?!0:b;a=Qf(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Sf(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 Tf(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}
191
+ function Uf(a){var b=M(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Vf(){for(var a=Ka.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(M(d),c),c+=d.byteLength;return b}L("shaka.util.Uint8ArrayUtils",Pf);Pf.concat=Vf;Pf.toHex=Uf;Pf.fromHex=Tf;Pf.fromBase64=Sf;Pf.toBase64=Rf;Pf.toStandardBase64=Qf;function Wf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Ff).box("moov",Kf).box("moof",Kf).O("pssh",function(c){if(!(1<c.version)){var d=M(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Uf(c.reader.kb(16)));if(0<c.version){d=c.reader.K();for(var e=0;e<d;e++){var f=Uf(c.reader.kb(16));b.h.push(f)}}}}).parse(a)}
192
+ function Xf(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=ob(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Tf(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Yf(a,b){a=Zf(a,b);return 1!=a.length?null:a[0]}function $f(a,b,c){a=ag(a,b,c);return 1!=a.length?null:a[0]}function Zf(a,b){var c=[];a=t(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 bg(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
193
+ function ag(a,b,c){var d=[];a=t(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 cg(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function dg(a,b,c){b=t(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 eg(a){return Array.from(a.childNodes).every(fg)?a.textContent.trim():null}
194
+ function fg(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function gg(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 hg(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}
195
+ function ig(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}
196
+ function jg(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 kg(a){a=Number(a);return 0===a%1?a:null}function lg(a){a=Number(a);return 0===a%1&&0<a?a:null}function mg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function ng(a){a=Number(a);return isNaN(a)?null:a}function og(a){return a?"true"===a.toLowerCase():!1}
197
+ function pg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}function qg(a,b){var c=new DOMParser,d=rg.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}
198
+ function sg(a,b){try{var c=zf(a);return qg(c,b)}catch(d){return null}}var rg=new rf(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 tg(a,b){var c=this;b=void 0===b?1:b;this.C=a;this.G=new Set;this.m=this.s=null;this.ga=this.Y=!1;this.H=0;this.g=null;this.A=new kf;this.i=new Map;this.u=new Map;this.l=new Ie;this.h=null;this.o=function(d){2==d.severity&&c.l.reject(d);a.onError(d)};this.V=new Map;this.Z=new Map;this.W=new cd(function(){return ug(c)});this.M=!1;this.L=[];this.N=!1;this.aa=(new cd(function(){vg(c)})).Ca(b);this.l.catch(function(){});this.j=new hf(function(){return wg(c)});this.X=!1;this.I=this.F=null}q=tg.prototype;
199
+ q.destroy=function(){return this.j.destroy()};function wg(a){return H(function(b){switch(b.g){case 1:return a.A.release(),a.A=null,a.l.reject(),a.aa.stop(),a.aa=null,a.W.stop(),a.W=null,C(b,xg(a),2);case 2:if(!a.m){b.B(3);break}ua(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:xa(b,5);break;case 4:za(b);case 5:a.m=null;case 3:a.g=null,a.G.clear(),a.s=null,a.u=new Map,a.h=null,a.o=function(){},a.C=null,a.X=!1,a.F=null,D(b)}})}q.configure=function(a){this.h=a};
200
+ function yg(a,b,c){a.ga=!0;a.u=new Map;a.M=c;return zg(a,b)}function Ag(a,b,c){a.u=new Map;c=t(c);for(var d=c.next();!d.done;d=c.next())a.u.set(d.value,{initData:null,initDataType:null});c=t(a.h.persistentSessionsMetadata);for(d=c.next();!d.done;d=c.next())d=d.value,a.u.set(d.sessionId,{initData:d.initData,initDataType:d.initDataType});a.M=0<a.u.size;return zg(a,b)}
201
+ function Bg(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 Cg(a,g,[])}
202
+ function zg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A;return H(function(z){if(1==z.g){if(c=Dg(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(B){return B.video&&B.video.drmInfos.length||B.audio&&B.audio.drmInfos.length?!0:!1});g||(h=sf(a.h.servers),Eg(b,h));k=new Set;l=t(b);for(e=l.next();!e.done;e=l.next())for(m=e.value,n=Fg(m),p=t(n),r=p.next();!r.done;r=p.next())u=r.value,k.add(u);w=t(k);for(r=w.next();!r.done;r=
203
+ w.next())y=r.value,Gg(y,sf(a.h.servers),sf(a.h.advanced||{}),a.h.keySystemsMapping);return C(z,Kd(b,a.M,a.X,a.h.preferredKeySystems),2)}x=g||Object.keys(a.h.servers).length;if(!x)return a.Y=!0,z.return(Promise.resolve());A=Cg(a,void 0,b);return z.return(g?A:A.catch(function(){}))})}
204
+ function Hg(a){var b;return H(function(c){switch(c.g){case 1:if(a.m.mediaKeys)return c.return();if(!a.F){c.B(2);break}return C(c,a.F,3);case 3:return jf(a.j),c.return();case 2:return ua(c,4),a.F=a.m.setMediaKeys(a.s),C(c,a.F,6);case 6:xa(c,5);break;case 4:b=za(c),a.o(new N(2,6,6003,b.message));case 5:jf(a.j),D(c)}})}function Ig(a,b){return H(function(c){if(1==c.g)return C(c,Hg(a),2);Jg(a,b.initDataType,M(b.initData));D(c)})}
205
+ q.yc=function(a){var b=this;return H(function(c){if(1==c.g){if(!b.s)return b.A.la(a,"encrypted",function(){b.o(new N(2,6,6010))}),c.return();b.m=a;b.A.la(b.m,"play",function(){for(var d=t(b.L),e=d.next();!e.done;e=d.next())Kg(b,e.value);b.N=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.m&&b.A.D(b.m,"webkitcurrentplaybacktargetiswirelesschanged",function(){return xg(b)});b.I=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.I||"com.apple.fps"!==b.g.keySystem||
206
+ b.u.size?C(c,Hg(b),2):c.B(2)}Lg(b).catch(function(){});b.I||b.u.size||b.h.parseInbandPsshEnabled||b.A.D(b.m,"encrypted",function(d){return Ig(b,d)});D(c)})};
207
+ function Mg(a){var b,c,d,e,f;return H(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=af([a.g.serverCertificateUri],a.h.retryParameters);ua(g,3);c=a.C.Ib.request(5,b);return C(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=M(d.data);xa(g,4);break;case 3:throw e=za(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();
208
+ ua(g,6);return C(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=za(g),new N(2,6,6004,f.message);}})}function Ng(a,b){var c,d,e;return H(function(f){if(1==f.g)return C(f,Og(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Xa=new Ie,d.push(e.Xa);d.push(c.remove());return C(f,Promise.all(d),3)}a.i.delete(c);D(f)})}
209
+ function Lg(a){var b,c,d,e,f;return H(function(g){if(1==g.g){if(!a.u.size)return g.B(2);a.u.forEach(function(h,k){Og(a,k,h)});return C(g,a.l,3)}if(2!=g.g){b=a.g&&a.g.keyIds||new Set([]);if(0<b.size&&Pg(a))return g.return(a.l);a.l=new Ie;a.l.catch(function(){})}c=(a.g?a.g.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,Jg(a,f.initDataType,f.initData);c.length||a.l.resolve();return g.return(a.l)})}
210
+ function Jg(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(kb(c,e.value.initData)&&!id("Tizen 2"))return;0<a.i.size&&Qg(a)&&(a.l.resolve(),a.l=new Ie,a.l.catch(function(){}));Rg(a,b,c,a.g.sessionType)}}function Sg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Tg(a){a=a.i.keys();a=pf(a,function(b){return b.sessionId});return Array.from(a)}
211
+ q.ce=function(){var a=this,b=this.i.keys();b=pf(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Ic=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.qd=function(){return tf(this.Z)};
212
+ function Cg(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,y,x;return H(function(A){switch(A.g){case 1:d=new Map;if(c.length){e=Ug(a,c,d);A.B(2);break}return C(A,Vg(a,b),3);case 3:e=A.h;case 2:f=e;if(!f)throw new N(2,6,6001);jf(a.j);ua(A,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())r=m.value,a.G.add(r.contentType.toLowerCase());if(c.length){var z=
213
+ f.keySystem;var B=d.get(f.keySystem);var E=[],F=[],G=[],I=[],J=new Set;Wg(B,E,G,F,I,J);var K=a.M?"persistent-license":"temporary";z={keySystem:z,licenseServerUri:E[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||K,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:F[0],initData:I,keyIds:J};B=t(B);for(E=B.next();!E.done;E=
214
+ B.next())E=E.value,E.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(z.persistentStateRequired=E.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),E=[],F=[],G=[],I=[],J=new Set,Wg(z.drmInfos,E,G,F,I,J),B={keySystem:B,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==z.distinctiveIdentifier,persistentStateRequired:"required"==z.persistentState,sessionType:z.sessionTypes[0]||"temporary",audioRobustness:(z.audioCapabilities?
215
+ z.audioCapabilities[0].robustness:"")||"",videoRobustness:(z.videoCapabilities?z.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:F[0],initData:I,keyIds:J};a.g=B;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return C(A,f.createMediaKeys(),6);case 6:u=A.h;jf(a.j);a.s=u;if(!(""!=a.h.minHdcpVersion&&"getStatusForPolicy"in a.s)){A.B(7);break}ua(A,8);return C(A,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:w=A.h;if("usable"!=w)throw new N(2,
216
+ 6,6018);jf(a.j);xa(A,7,4);break;case 8:y=za(A,4);if(y instanceof N)throw y;throw new N(2,6,6019,y.message);case 7:return a.Y=!0,C(A,Mg(a),11);case 11:jf(a.j);xa(A,0);break;case 4:x=za(A);jf(a.j,x);a.g=null;a.G.clear();if(x instanceof N)throw x;throw new N(2,6,6002,x.message);}})}
217
+ function Ug(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Fg(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=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={Ud:d.Ud},e=a.next())for(d.Ud=e.value,f=t(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==
218
+ l.Ud}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(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=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
219
+ function Vg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y;return H(function(x){switch(x.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.B(4);break}k=h.value;if(!b.has(k)){x.B(3);break}l=b.get(k);ua(x,6);return C(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
220
+ x.h,x.return(c);case 6:za(x);case 7:jf(a.j);case 3:h=g.next();x.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){x.B(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();x.B(9);break}u=h.value;w=b.get(u);y=w.drmInfos.some(function(A){return!!A.licenseServerUri});if(y!=p){x.B(13);break}ua(x,15);return C(x,navigator.requestMediaKeySystemAccess(u,[w]),17);case 17:return c=x.h,x.return(c);case 15:za(x);case 16:jf(a.j);case 13:h=r.next();x.B(12);break;case 11:return x.return(c)}})}
221
+ function Dg(a){a=sf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Rf(Tf(f),!1));f=e;22!=f.length&&(f=Rf(Tf(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:M(Af(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
222
+ videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}function Xg(a){Qg(a)&&a.l.resolve()}function Yg(a,b){(new cd(function(){b.loaded=!0;Xg(a)})).S(Zg)}
223
+ function Og(a,b,c){var d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:try{d=a.s.createSession("persistent-license")}catch(n){return e=new N(2,6,6005,n.message),a.o(e),m.return(Promise.reject(e))}a.A.D(d,"message",function(n){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.L.push(n):Kg(a,n)});a.A.D(d,"keystatuseschange",function(n){return $g(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,xe:Infinity,Xa:null,type:"persistent-license"};a.i.set(d,f);ua(m,2);return C(m,
224
+ d.load(b),4);case 4:return g=m.h,jf(a.j),g||(a.i.delete(d),h=a.h.persistentSessionOnlinePlayback?1:2,a.o(new N(h,6,6013)),f.loaded=!0),Yg(a,f),Xg(a),m.return(d);case 2:k=za(m),jf(a.j,k),a.i.delete(d),l=a.h.persistentSessionOnlinePlayback?1:2,a.o(new N(l,6,6005,k.message)),f.loaded=!0,Xg(a);case 3:return m.return(Promise.resolve())}})}
225
+ function Rg(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.o(new N(2,6,6005,f.message));return}a.A.D(e,"message",function(f){a.m&&a.h.delayLicenseRequestUntilPlayed&&a.m.paused&&!a.N?a.L.push(f):Kg(a,f)});a.A.D(e,"keystatuseschange",function(f){return $g(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,xe:Infinity,Xa: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.o(b);return}a.h.logLicenseExchange&&Rf(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
226
226
  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.o(new N(2,6,6006,f.message,f,h))}})}
227
- function Lg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u;I(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Sf(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=bf([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(Tg(a.g.keySystem)){var y=
228
- yf(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=rg(y,"PlayReadyKeyMessage");for(var x=t(y.getElementsByTagName("HttpHeader")),A=x.next();!A.done;A=x.next())A=A.value,g.headers[A.getElementsByTagName("name")[0].textContent]=A.getElementsByTagName("value")[0].textContent;g.body=Tf(y.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();wa(w,2);l=a.C.Hb.request(2,g);return C(w,l.promise,4);case 4:k=w.h;Aa(w,3);break;case 2:return m=
229
- Ba(w),n=new N(2,6,6007,m),a.o(n),d&&d.Xa&&d.Xa.reject(n),w.return();case 3:if(a.j.g)return w.return();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Sf(k.data);wa(w,5);return C(w,c.update(k.data),7);case 7:Aa(w,6);break;case 5:return p=Ba(w),r=new N(2,6,6008,p.message),a.o(r),d&&d.Xa&&d.Xa.reject(r),w.return();case 6:if(a.j.g)return w.return();u=new P("drmsessionupdate");a.C.onEvent(u);d&&(d.Xa&&d.Xa.resolve(),Zg(a,d));D(w)}})}
230
- function ah(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(Tg(a.g.keySystem)&&16==g.byteLength&&(hd()||nd())){h=pb(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=Vf(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Xa&&(a.i.delete(b),b.close().catch(function(){}));
231
- Rg(a)&&(a.l.resolve(),a.W.S(bh))}function vg(a){var b=a.V,c=a.Z;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.o(new N(2,6,6014));a.C.Id(uf(c))}
232
- function ch(){var a,b,c,d,e,f,g,h;return I(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,n,
233
- p;return I(function(r){switch(r.g){case 1:wa(r,2);if("org.w3.clearkey"===l&&od())throw Error("Unsupported keySystem");return C(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,jd("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),C(r,m.createMediaKeys(),5);case 5:Aa(r,0);break;case 2:Ba(r),f.set(l,null),D(r)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(uf(f))})}
234
- function dh(a){var b;return I(function(c){if(1==c.g)return b=new Promise(function(d,e){(new dd(e)).S(eh)}),wa(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return Aa(c,0);Ba(c);D(c)})}
235
- function yg(a){var b;return I(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return I(function(g){if(1==g.g)return wa(g,2),a.ga||a.u.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,dh(e),5):C(g,e.remove(),5);if(2!=g.g)return Aa(g,0);Ba(g);D(g)})})),0)})}function fh(a,b){return a.length&&b.length&&a!==b?0<gh(a,b).length:!0}
236
- function gh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=t(b),g=f.next();!g.done;e={La:e.La},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.La=[];e.La=e.La.concat(d.initData||[]);e.La=e.La.concat(g.initData||[]);e.La=e.La.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.La.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(v(d.keyIds),v(g.keyIds))):
227
+ function Kg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u;H(function(w){switch(w.g){case 1:c=b.target;a.h.logLicenseExchange&&Rf(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=af([e],a.h.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.g;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(Sg(a.g.keySystem)){var y=
228
+ xf(g.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){y=qg(y,"PlayReadyKeyMessage");for(var x=t(y.getElementsByTagName("HttpHeader")),A=x.next();!A.done;A=x.next())A=A.value,g.headers[A.getElementsByTagName("name")[0].textContent]=A.getElementsByTagName("value")[0].textContent;g.body=Sf(y.getElementsByTagName("Challenge")[0].textContent)}else g.headers["Content-Type"]="text/xml; charset=utf-8"}h=Date.now();ua(w,2);l=a.C.Ib.request(2,g);return C(w,l.promise,4);case 4:k=w.h;xa(w,3);break;case 2:return m=
229
+ za(w),n=new N(2,6,6007,m),a.o(n),d&&d.Xa&&d.Xa.reject(n),w.return();case 3:if(a.j.g)return w.return();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Rf(k.data);ua(w,5);return C(w,c.update(k.data),7);case 7:xa(w,6);break;case 5:return p=za(w),r=new N(2,6,6008,p.message),a.o(r),d&&d.Xa&&d.Xa.reject(r),w.return();case 6:if(a.j.g)return w.return();u=new O("drmsessionupdate");a.C.onEvent(u);d&&(d.Xa&&d.Xa.resolve(),Yg(a,d));D(w)}})}
230
+ function $g(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(Sg(a.g.keySystem)&&16==g.byteLength&&(gd()||md())){h=ob(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=Uf(g).slice(0,32);a.V.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Xa&&(a.i.delete(b),b.close().catch(function(){}));
231
+ Qg(a)&&(a.l.resolve(),a.W.S(ah))}function ug(a){var b=a.V,c=a.Z;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.o(new N(2,6,6014));a.C.Jd(tf(c))}
232
+ function bh(){var a,b,c,d,e,f,g,h;return H(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,n,
233
+ p;return H(function(r){switch(r.g){case 1:ua(r,2);if("org.w3.clearkey"===l&&nd())throw Error("Unsupported keySystem");return C(r,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=r.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,id("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),C(r,m.createMediaKeys(),5);case 5:xa(r,0);break;case 2:za(r),f.set(l,null),D(r)}})},h=a.map(function(l){return g(l)}),C(k,Promise.all(h),2)):k.return(tf(f))})}
234
+ function ch(a){var b;return H(function(c){if(1==c.g)return b=new Promise(function(d,e){(new cd(e)).S(dh)}),ua(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return xa(c,0);za(c);D(c)})}
235
+ function xg(a){var b;return H(function(c){b=Array.from(a.i.entries());a.i.clear();return C(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return H(function(g){if(1==g.g)return ua(g,2),a.ga||a.u.has(e.sessionId)||"persistent-license"!==f.type||a.h.persistentSessionOnlinePlayback?C(g,ch(e),5):C(g,e.remove(),5);if(2!=g.g)return xa(g,0);za(g);D(g)})})),0)})}function eh(a,b){return a.length&&b.length&&a!==b?0<fh(a,b).length:!0}
236
+ function fh(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=t(b),g=f.next();!g.done;e={La:e.La},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.La=[];e.La=e.La.concat(d.initData||[]);e.La=e.La.concat(g.initData||[]);e.La=e.La.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.La.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(v(d.keyIds),v(g.keyIds))):
237
237
  d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
238
- initData:e.La,keyIds:f});break}}return c}function Gg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function wg(a){a.i.forEach(function(b,c){var d=b.we,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.we=e)})}function Rg(a){a=a.i.values();return rf(a,function(b){return b.loaded})}function Qg(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.V.get(c.value))return!1;return!0}
239
- function Fg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
240
- function Xg(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(n){return lb(n,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={bd:h.bd},l=k.next())h.bd=l.value,e.some(function(m){return function(n){var p=
241
- m.bd;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&lb(n.initData,p.initData)}}(h))||e.push(h.bd)}if(g.ra.keyIds)for(h=t(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
242
- function Hg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
243
- c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var eh=1,$g=5,bh=.5,hh=new sf(function(){return nb(new Uint8Array([0]))});function ih(){}function jh(a,b,c,d){var e,f,g,h;return I(function(k){if(1==k.g){if(d&&(e=kh[d.toLowerCase()]))return k.return(e);if(f=lh(a))if(g=mh[f])return k.return(g);return d?k.B(2):C(k,nh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=kh[d]))return k.return(h);throw new N(2,4,4E3,a);})}function nh(a,b,c){var d,e,f;return I(function(g){if(1==g.g)return d=bf([a],c),d.method="HEAD",C(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
244
- function lh(a){a=(new bc(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}L("shaka.media.ManifestParser",ih);ih.unregisterParserByMime=function(a){delete kh[a]};ih.registerParserByMime=function(a,b){kh[a]=b};ih.registerParserByExtension=function(a,b){mh[a]=b};ih.AccessibilityPurpose={ai:"visually impaired",Dh:"hard of hearing"};var kh={},mh={};function oh(a){function b(){d=!0}function c(l){f.push(l);Lf(l)}a=M(a);var d=!1,e,f=[],g=[];(new Gf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);Nf(l)}).O("encv",b).O("enca",b).O("hev1",function(l){g.push({box:l,Ib:1701733238})}).O("hvc1",function(l){g.push({box:l,Ib:1701733238})}).O("avc1",function(l){g.push({box:l,Ib:1701733238})}).O("avc3",function(l){g.push({box:l,Ib:1701733238})}).O("ac-3",function(l){g.push({box:l,Ib:1701733217})}).O("ec-3",
245
- function(l){g.push({box:l,Ib:1701733217})}).O("mp4a",function(l){g.push({box:l,Ib:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw fb(Vf(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=ph(a,e,k.box,f,k.Ib);return a}
246
- function ph(a,b,c,d,e){var f=qh.value(),g=a.subarray(c.start,c.start+c.size),h=pb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=pb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);rh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=id()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,rh(e,d.start,d.size+k.byteLength);k=pb(e,b.start);b=Mf(b);a=k.getUint32(b);
247
- k.setUint32(b,a+1);return e}function rh(a,b,c){a=pb(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 qh=new sf(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 sh(a,b,c,d,e,f){this.wa=a;this.Ba=b;this.ka=c;this.qe=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f}sh.prototype.Lc=function(){return this.Ba};sh.prototype.Hc=function(){return this.ka};function th(a,b){return a&&b?a.Lc()==b.Lc()&&a.Hc()==b.Hc()&&xb(a.wa(),b.wa())&&lb(a.g,b.g):a==b}L("shaka.media.InitSegmentReference",sh);sh.prototype.getEndByte=sh.prototype.Hc;sh.prototype.getStartByte=sh.prototype.Lc;
248
- function Q(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u){l=void 0===l?[]:l;r=void 0===r?uh:r;this.startTime=a;this.l=this.endTime=b;this.F=c;this.Ba=d;this.ka=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.C=void 0===n?null:n;this.g=void 0===p?null:p;this.status=r;this.m=!1;this.s=!0;this.o=!1;this.u=void 0===u?null:u;this.A=null;this.j=0}q=Q.prototype;q.wa=function(){return this.F()};q.getStartTime=function(){return this.startTime};
249
- q.lg=function(){return this.endTime};q.Lc=function(){return this.Ba};q.Hc=function(){return this.ka};q.Dg=function(){return this.tilesLayout};q.Cg=function(){return this.C};q.Bb=function(){return this.status};q.Og=function(){this.status=vh};q.pe=function(){this.m=!0};q.Mg=function(){return this.m};q.vf=function(){this.s=!1};q.Lg=function(){return this.s};q.uf=function(){this.o=!0};q.Ig=function(){return this.o};q.If=function(a){this.A=a};q.Ag=function(){return this.A};
250
- q.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=t(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};q.Oe=function(a){null==this.g?Ya("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",Q);Q.prototype.syncAgainst=Q.prototype.Oe;Q.prototype.offset=Q.prototype.offset;Q.prototype.getThumbnailSprite=Q.prototype.Ag;Q.prototype.setThumbnailSprite=Q.prototype.If;
251
- Q.prototype.hasByterangeOptimization=Q.prototype.Ig;Q.prototype.markAsByterangeOptimization=Q.prototype.uf;Q.prototype.isIndependent=Q.prototype.Lg;Q.prototype.markAsNonIndependent=Q.prototype.vf;Q.prototype.isPreload=Q.prototype.Mg;Q.prototype.markAsPreload=Q.prototype.pe;Q.prototype.markAsUnavailable=Q.prototype.Og;Q.prototype.getStatus=Q.prototype.Bb;Q.prototype.getTileDuration=Q.prototype.Cg;Q.prototype.getTilesLayout=Q.prototype.Dg;Q.prototype.getEndByte=Q.prototype.Hc;
252
- Q.prototype.getStartByte=Q.prototype.Lc;Q.prototype.getEndTime=Q.prototype.lg;Q.prototype.getStartTime=Q.prototype.getStartTime;Q.prototype.getUris=Q.prototype.wa;var uh=0,vh=1;Q.Status={sh:uh,Zh:vh,Hh:2};function wh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function xh(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)}function yh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(zh(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}
253
- function Ah(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=zh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function zh(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};/*
238
+ initData:e.La,keyIds:f});break}}return c}function Fg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function vg(a){a.i.forEach(function(b,c){var d=b.xe,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.xe=e)})}function Qg(a){a=a.i.values();return qf(a,function(b){return b.loaded})}function Pg(a){for(var b=t(a.g&&a.g.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.V.get(c.value))return!1;return!0}
239
+ function Eg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
240
+ function Wg(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={ra:g.ra},h=a.next()){g.ra=h.value;b.includes(g.ra.licenseServerUri)||b.push(g.ra.licenseServerUri);d.includes(g.ra.serverCertificateUri)||d.push(g.ra.serverCertificateUri);g.ra.serverCertificate&&(c.some(function(m){return function(n){return kb(n,m.ra.serverCertificate)}}(g))||c.push(g.ra.serverCertificate));if(g.ra.initData){h={};for(var k=t(g.ra.initData),l=k.next();!l.done;h={bd:h.bd},l=k.next())h.bd=l.value,e.some(function(m){return function(n){var p=
241
+ m.bd;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&kb(n.initData,p.initData)}}(h))||e.push(h.bd)}if(g.ra.keyIds)for(h=t(g.ra.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
242
+ function Gg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
243
+ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var dh=1,Zg=5,ah=.5,gh=new rf(function(){return mb(new Uint8Array([0]))});function hh(){}function ih(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){if(d&&(e=jh[d.toLowerCase()]))return k.return(e);if(f=kh(a))if(g=lh[f])return k.return(g);return d?k.B(2):C(k,mh(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=jh[d]))return k.return(h);throw new N(2,4,4E3,a);})}function mh(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=af([a],c),d.method="HEAD",C(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g.return(f?f.toLowerCase().split(";").shift():"")})}
244
+ function kh(a){a=(new ac(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}L("shaka.media.ManifestParser",hh);hh.unregisterParserByMime=function(a){delete jh[a]};hh.registerParserByMime=function(a,b){jh[a]=b};hh.registerParserByExtension=function(a,b){lh[a]=b};hh.AccessibilityPurpose={ai:"visually impaired",Dh:"hard of hearing"};var jh={},lh={};function nh(a){function b(){d=!0}function c(l){f.push(l);Kf(l)}a=M(a);var d=!1,e,f=[],g=[];(new Ff).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).O("stsd",function(l){e=l;f.push(l);Mf(l)}).O("encv",b).O("enca",b).O("hev1",function(l){g.push({box:l,Jb:1701733238})}).O("hvc1",function(l){g.push({box:l,Jb:1701733238})}).O("avc1",function(l){g.push({box:l,Jb:1701733238})}).O("avc3",function(l){g.push({box:l,Jb:1701733238})}).O("ac-3",function(l){g.push({box:l,Jb:1701733217})}).O("ec-3",
245
+ function(l){g.push({box:l,Jb:1701733217})}).O("mp4a",function(l){g.push({box:l,Jb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw db(Uf(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=oh(a,e,k.box,f,k.Jb);return a}
246
+ function oh(a,b,c,d,e){var f=ph.value(),g=a.subarray(c.start,c.start+c.size),h=ob(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=ob(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);qh(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=hd()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,qh(e,d.start,d.size+k.byteLength);k=ob(e,b.start);b=Lf(b);a=k.getUint32(b);
247
+ k.setUint32(b,a+1);return e}function qh(a,b,c){a=ob(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 ph=new rf(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 rh(a,b,c,d,e,f){this.wa=a;this.Ba=b;this.ka=c;this.re=void 0===d?null:d;this.timescale=void 0===e?null:e;this.g=void 0===f?null:f}rh.prototype.Lc=function(){return this.Ba};rh.prototype.Hc=function(){return this.ka};function sh(a,b){return a&&b?a.Lc()==b.Lc()&&a.Hc()==b.Hc()&&wb(a.wa(),b.wa())&&kb(a.g,b.g):a==b}L("shaka.media.InitSegmentReference",rh);rh.prototype.getEndByte=rh.prototype.Hc;rh.prototype.getStartByte=rh.prototype.Lc;
248
+ function P(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u){l=void 0===l?[]:l;r=void 0===r?th:r;this.startTime=a;this.l=this.endTime=b;this.F=c;this.Ba=d;this.ka=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.C=void 0===n?null:n;this.g=void 0===p?null:p;this.status=r;this.m=!1;this.s=!0;this.o=!1;this.u=void 0===u?null:u;this.A=null;this.j=0}q=P.prototype;q.wa=function(){return this.F()};q.getStartTime=function(){return this.startTime};
249
+ q.lg=function(){return this.endTime};q.Lc=function(){return this.Ba};q.Hc=function(){return this.ka};q.Dg=function(){return this.tilesLayout};q.Cg=function(){return this.C};q.Cb=function(){return this.status};q.Og=function(){this.status=uh};q.qe=function(){this.m=!0};q.Mg=function(){return this.m};q.vf=function(){this.s=!1};q.Lg=function(){return this.s};q.uf=function(){this.o=!0};q.Ig=function(){return this.o};q.If=function(a){this.A=a};q.Ag=function(){return this.A};
250
+ q.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=t(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};q.Pe=function(a){null==this.g?Wa("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};L("shaka.media.SegmentReference",P);P.prototype.syncAgainst=P.prototype.Pe;P.prototype.offset=P.prototype.offset;P.prototype.getThumbnailSprite=P.prototype.Ag;P.prototype.setThumbnailSprite=P.prototype.If;
251
+ P.prototype.hasByterangeOptimization=P.prototype.Ig;P.prototype.markAsByterangeOptimization=P.prototype.uf;P.prototype.isIndependent=P.prototype.Lg;P.prototype.markAsNonIndependent=P.prototype.vf;P.prototype.isPreload=P.prototype.Mg;P.prototype.markAsPreload=P.prototype.qe;P.prototype.markAsUnavailable=P.prototype.Og;P.prototype.getStatus=P.prototype.Cb;P.prototype.getTileDuration=P.prototype.Cg;P.prototype.getTilesLayout=P.prototype.Dg;P.prototype.getEndByte=P.prototype.Hc;
252
+ P.prototype.getStartByte=P.prototype.Lc;P.prototype.getEndTime=P.prototype.lg;P.prototype.getStartTime=P.prototype.getStartTime;P.prototype.getUris=P.prototype.wa;var th=0,uh=1;P.Status={sh:th,Zh:uh,Hh:2};function vh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function wh(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)}function xh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=t(yh(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}
253
+ function zh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=yh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function yh(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};/*
254
254
  @license
255
255
  Shaka Player
256
256
  Copyright 2022 Google LLC
257
257
  SPDX-License-Identifier: Apache-2.0
258
258
  */
259
- function Bh(){}function Ch(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Dh(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Eh(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
260
- function Fh(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=xf(M(a.data,1,c));a=xf(M(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=xf(M(a.data,1,c));a=xf(M(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
261
- a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=xf(M(a.data,0,d));b.description=d;"com.apple.streaming.transportStreamTimestamp"==d?(d=a.data.subarray(d.length+1),a=d[3]&1,d=(d[4]<<23)+(d[5]<<15)+(d[6]<<7)+d[7],d/=45,a&&(d+=4.772185884E7),b.data=d):(a=nb(a.data.subarray(d.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=xf(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=xf(a.data).replace(/\0*$/,""),b.data=
262
- a,b):a.data?(b.data=nb(a.data),b):null}function Gh(a){for(var b=0,c=[];Ch(a,b);){var d=Eh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Eh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Fh(e))&&c.push(f);b+=e.size+10}Dh(a,b)&&(b+=10)}return c}function Hh(a,b){for(var c=b=void 0===b?0:b,d=0;Ch(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Eh(a,b+6),Dh(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}
263
- L("shaka.util.Id3Utils",Bh);Bh.getID3Data=Hh;Bh.getID3Frames=Gh;function Ih(a,b){var c=null,d=null,e=null,f=a.K();b&1&&(e=a.dc());b&2&&a.skip(4);b&8&&(c=a.K());b&16&&(d=a.K());return{trackId:f,ef:c,eg:d,ci:e}}function Jh(a,b){return 1==b?(b=a.K(),a=a.K(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.K()}}function Kh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.K();a.skip(4);a=a.Ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
264
- function Lh(a,b,c){var d=a.K(),e=[],f=null;c&1&&(f=a.K());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={Ge:null,sampleSize:null,Ld:null};c&256&&(h.Ge=a.K());c&512&&(h.sampleSize=a.K());c&1024&&a.skip(4);c&2048&&(h.Ld=0==b?a.K():a.zf());e.push(h)}return{gi:d,Bf:e,dg:f}}
265
- function Mh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.K();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ia()+a.Ia()/16;a=a.Ia()+a.Ia()/16;return{trackId:c,width:b,height:a}}function Nh(a){var b="mp4a";a.skip(11);b+="."+this.g(a.qa());b+="."+this.g(a.qa()>>>2&63).replace(/^0/,"");return{Pa:b}}function Oh(a,b){a.skip(87);return{Pa:b+"."+this.g(a.qa())+this.g(a.qa())+this.g(a.qa())}}function Ph(a){a=a.K();return{Pa:Kf(a)}};/*
259
+ function Ah(){}function Bh(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Ch(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function Dh(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
260
+ function Eh(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=wf(M(a.data,1,c));a=wf(M(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=wf(M(a.data,1,c));a=wf(M(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
261
+ a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=wf(M(a.data,0,d));b.description=d;"com.apple.streaming.transportStreamTimestamp"==d?(d=a.data.subarray(d.length+1),a=d[3]&1,d=(d[4]<<23)+(d[5]<<15)+(d[6]<<7)+d[7],d/=45,a&&(d+=4.772185884E7),b.data=d):(a=mb(a.data.subarray(d.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=wf(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=wf(a.data).replace(/\0*$/,""),b.data=
262
+ a,b):a.data?(b.data=mb(a.data),b):null}function Fh(a){for(var b=0,c=[];Bh(a,b);){var d=Dh(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Dh(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Eh(e))&&c.push(f);b+=e.size+10}Ch(a,b)&&(b+=10)}return c}function Gh(a,b){for(var c=b=void 0===b?0:b,d=0;Bh(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=Dh(a,b+6),Ch(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}
263
+ L("shaka.util.Id3Utils",Ah);Ah.getID3Data=Gh;Ah.getID3Frames=Fh;function Hh(a,b){var c=null,d=null,e=null,f=a.K();b&1&&(e=a.dc());b&2&&a.skip(4);b&8&&(c=a.K());b&16&&(d=a.K());return{trackId:f,ff:c,eg:d,ci:e}}function Ih(a,b){return 1==b?(b=a.K(),a=a.K(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.K()}}function Jh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.K();a.skip(4);a=a.Ia();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
264
+ function Kh(a,b,c){var d=a.K(),e=[],f=null;c&1&&(f=a.K());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={He:null,sampleSize:null,Md:null};c&256&&(h.He=a.K());c&512&&(h.sampleSize=a.K());c&1024&&a.skip(4);c&2048&&(h.Md=0==b?a.K():a.zf());e.push(h)}return{gi:d,Bf:e,dg:f}}
265
+ function Lh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.K();1==b?a.skip(8):a.skip(4);a.skip(4);a.skip(8);a.skip(2);a.skip(2);a.skip(2);a.skip(2);a.skip(36);b=a.Ia()+a.Ia()/16;a=a.Ia()+a.Ia()/16;return{trackId:c,width:b,height:a}}function Mh(a){var b="mp4a";a.skip(11);b+="."+this.g(a.qa());b+="."+this.g(a.qa()>>>2&63).replace(/^0/,"");return{Pa:b}}function Nh(a,b){a.skip(87);return{Pa:b+"."+this.g(a.qa())+this.g(a.qa())+this.g(a.qa())}}function Oh(a){a=a.K();return{Pa:Jf(a)}};/*
266
266
 
267
267
  Copyright Brightcove, Inc.
268
268
 
@@ -278,862 +278,863 @@ function Mh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.K();1=
278
278
  See the License for the specific language governing permissions and
279
279
  limitations under the License.
280
280
  */
281
- function Qh(a){this.j=a;this.i=a.byteLength;this.g=this.h=0}function Rh(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Df(c,0)).K(),a.g=8*d,a.i-=d)}function Sh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Rh(a)}a.h<<=b;a.g-=b}function Th(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Rh(a);c=b-c;return 0<c?d<<c|Th(a,c):d}
282
- function Uh(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Rh(a);return b+Uh(a)}function Vh(a){Sh(a,1+Uh(a))}function Wh(a){var b=Uh(a);return Th(a,b+1)-1}function Xh(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Wh(a),d=(c+(1&d?1+d>>>1:-1*(d>>>1))+256)%256),c=0===d?c:d}function Yh(a){Th(a,8);Wh(a);return Wh(a)}L("shaka.util.ExpGolomb",Qh);function Zh(){this.C=null;this.F=!1;this.s=this.u=this.i=null;this.g=[];this.A=this.m=this.h=null;this.j=[];this.o=null;this.l=[]}q=Zh.prototype;q.clearData=function(){this.i=null;this.g=[];this.h=null;this.j=[];this.l=[]};
283
- q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,$h(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.C=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.C:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,fe:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
284
- k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0<m)for(var n=h+5,p=m;2<p;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var r=f[n+1]+2;n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.fe&&(g.fe=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec=
285
- "hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;null==this.u&&(this.u=f.video,this.s=f.videoCodec);null==this.m&&(this.m=f.audio,this.A=f.audioCodec);null==this.o&&(this.o=f.fe);d&&!this.F&&(d=!1,e=b-188);this.F=!0;break;case this.u:f=a.subarray(h,e+188);(h=ai(f,!0))&&null!=h.pts&&(h=Math.min(h.dts,h.pts)/9E4,null==this.i||this.i>h)&&(this.i=h);this.g.push(f);break;case this.m:f=a.subarray(h,e+188);(h=
286
- ai(f))&&null!=h.pts&&(h=Math.min(h.dts,h.pts)/9E4,null==this.h||this.h>h)&&(this.h=h);this.j.push(f);break;case this.o:this.l.push(a.subarray(h,e+188));break;default:d=!0}}return this};
287
- function ai(a,b){b=void 0===b?!1:b;if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var c={data:new Uint8Array(0),Vg:a[4]<<8|a[5],pts:null,dts:null};if(b&&0!=c.Vg)return null;b=a[7];b&192&&(c.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,c.dts=c.pts,b&64&&(c.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));c.data=a.subarray(9+a[8]);return c}
288
- q.ze=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;for(var d=a.byteLength,e=0,f=[],g=-1,h=0,k=!1,l,m=0;m<d;++m){var n=a[m];if(n)if(2<=e&&1==n&&k){if(2>=m)break;l.data=Wf(l.data,a.subarray(0,m-2));l.bb=Wf(l.bb,a.subarray(0,m-2));break}else{if(2<=e&&1==n){0<=g&&(e=m-((3<e?3:e)+1),f.push({data:a.subarray(g+1,e+1),bb:a.subarray(g,e+1),type:h,time:c}));if(m>=d-1)return f;m++;g=m;h=a[m]&31}e=0}else e++;m>=d-1&&0<=g&&0<=e&&(k?(l.data=Wf(l.data,a),l.bb=Wf(l.bb,a)):(k=!0,l={data:a.subarray(g+1,d),bb:a.subarray(g,
289
- d),type:h,time:c},b&&(a=b.data,d=a.byteLength,m=-1)))}l&&f.push(l);return f};q.getMetadata=function(){for(var a=[],b=new Uint8Array(0),c=this.l.length-1;0<=c;c--){b=Wf(this.l[c],b);var d=ai(b);d&&(a.unshift({cueTime:d.pts?d.pts/9E4:null,data:d.data,frames:Gh(d.data),dts:d.dts,pts:d.pts}),b=new Uint8Array(0))}return a};q.Xb=function(){for(var a=[],b=new Uint8Array(0),c=this.j.length-1;0<=c;c--){b=Wf(this.j[c],b);var d=ai(b);d&&(a.unshift(d),b=new Uint8Array(0))}return a};
290
- q.mf=function(){for(var a=[],b=new Uint8Array(0),c=this.g.length-1;0<=c;c--){b=Wf(this.g[c],b);var d=ai(b,!0);d&&(a.unshift(d),b=new Uint8Array(0))}return a};q.getStartTime=function(){return{audio:this.h,video:this.i}};q.od=function(){return{audio:this.A,video:this.s}};q.ee=function(){for(var a=[],b=new Uint8Array(0),c=this.g.length-1;0<=c;c--){b=Wf(this.g[c],b);var d=ai(b);d&&("avc"==this.s&&(a=a.concat(this.ze(d))),b=new Uint8Array(0))}return a.reverse()};
291
- q.nf=function(){var a={height:null,width:null},b=this.ee();if(!b.length)return a;b=b.find(function(l){return 7==l.type});if(!b)return a;b=new Qh(b.data);var c=Th(b,8);Th(b,8);Th(b,8);Vh(b);if(bi.includes(c)&&(c=Wh(b),3===c&&Sh(b,1),Vh(b),Vh(b),Sh(b,1),1===Th(b,1))){c=3!==c?8:12;for(var d=0;d<c;d++)1===Th(b,1)&&(6>d?Xh(b,16):Xh(b,64))}Vh(b);c=Wh(b);if(0===c)Wh(b);else if(1===c)for(Sh(b,1),Vh(b),Vh(b),c=Wh(b),d=0;d<c;d++)Vh(b);Vh(b);Sh(b,1);c=Wh(b);d=Wh(b);var e=Th(b,1);0===e&&Sh(b,1);Sh(b,1);var f=
292
- 0,g=0,h=0,k=0;1===Th(b,1)&&(f=Wh(b),g=Wh(b),h=Wh(b),k=Wh(b));a.height=String((2-e)*(d+1)*16-2*h-2*k);a.width=String(16*(c+1)-2*f-2*g);return a};function ci(a){return 0>$h(a)?!1:!0}function $h(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}L("shaka.util.TsParser",Zh);Zh.syncOffset=$h;Zh.probe=ci;Zh.prototype.getVideoResolution=Zh.prototype.nf;Zh.prototype.getVideoNalus=Zh.prototype.ee;Zh.prototype.getCodecs=Zh.prototype.od;
293
- Zh.prototype.getStartTime=Zh.prototype.getStartTime;Zh.prototype.getVideoData=Zh.prototype.mf;Zh.prototype.getAudioData=Zh.prototype.Xb;Zh.prototype.getMetadata=Zh.prototype.getMetadata;Zh.prototype.parseAvcNalus=Zh.prototype.ze;Zh.prototype.parse=Zh.prototype.parse;Zh.prototype.clearData=Zh.prototype.clearData;Zh.Timescale=9E4;var bi=[100,110,122,244,44,83,86,118,128,138,139,134];function di(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&$a("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?$a("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||$a(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
294
- (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}di.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function ei(a,b){var c=fi;switch(b.mimeType){case "video/webm":c=gi;break;case "video/mp4":c=hi}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}L("shaka.lcevc.Dil",di);di.prototype.release=di.prototype.release;var fi=0,gi=1,hi=2;function ii(a,b,c,d){var e=this;this.j=a;this.C=null;this.u=b;this.h={};this.H={};this.W={};this.g=null;this.M=!1;this.Z=c||function(){};this.L=d||null;this.l={};this.A=new lf;this.m={};this.F=null;this.G=new Je;this.N="";this.i=ji(this,this.G);this.o=!1;this.I=new jf(function(){return ki(e)});this.s=!1;this.Y="UNKNOWN";this.V=this.X=!1;this.aa=new Je}function ji(a,b){var c=new MediaSource;a.A.la(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=li(c);a.j.src=a.N;return c}q=ii.prototype;
281
+ function Ph(a){this.j=a;this.i=a.byteLength;this.g=this.h=0}function Qh(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Cf(c,0)).K(),a.g=8*d,a.i-=d)}function Rh(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;Qh(a)}a.h<<=b;a.g-=b}function Sh(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&Qh(a);c=b-c;return 0<c?d<<c|Sh(a,c):d}
282
+ function Th(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;Qh(a);return b+Th(a)}function Uh(a){Rh(a,1+Th(a))}function Vh(a){var b=Th(a);return Sh(a,b+1)-1}function Wh(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Vh(a),d=(c+(1&d?1+d>>>1:-1*(d>>>1))+256)%256),c=0===d?c:d}function Xh(a){Sh(a,8);Vh(a);return Vh(a)}L("shaka.util.ExpGolomb",Ph);function Yh(){this.u=null;this.A=!1;this.m=this.o=null;this.i=[];this.s=this.j=null;this.g=[];this.l=null;this.h=[]}q=Yh.prototype;q.clearData=function(){this.i=[];this.g=[];this.h=[]};
283
+ q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Zh(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.u=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.u:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,ge:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
284
+ k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(-1==g.audio&&0<m)for(var n=h+5,p=m;2<p;){switch(f[n]){case 106:g.audio=l;g.audioCodec="ac3";break;case 122:g.audio=l,g.audioCodec="ec3"}var r=f[n+1]+2;n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1==g.ge&&(g.ge=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec=
285
+ "hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;null==this.o&&(this.o=f.video,this.m=f.videoCodec);null==this.j&&(this.j=f.audio,this.s=f.audioCodec);null==this.l&&(this.l=f.ge);d&&!this.A&&(d=!1,e=b-188);this.A=!0;break;case this.o:h=a.subarray(h,e+188);f?this.i.push(h):this.i.length&&(f=this.i[this.i.length-1])&&(this.i[this.i.length-1]=Vf(f,h));break;case this.j:h=a.subarray(h,e+188);f?this.g.push(h):
286
+ this.g.length&&(f=this.g[this.g.length-1])&&(this.g[this.g.length-1]=Vf(f,h));break;case this.l:h=a.subarray(h,e+188);f?this.h.push(h):this.h.length&&(f=this.h[this.h.length-1])&&(this.h[this.h.length-1]=Vf(f,h));break;default:d=!0}}return this};
287
+ function $h(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),Vg:a[4]<<8|a[5],pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
288
+ q.Ae=function(a,b){for(var c=a.pts?a.pts/9E4:null,d=a.data,e=d.byteLength,f=0,g=[],h=-1,k=0,l=!1,m,n=0;n<e;++n){var p=d[n];if(p)if(2<=f&&1==p&&l){a=n-(3<f?3:f);m.data=Vf(m.data,d.subarray(0,a));m.bb=Vf(m.bb,d.subarray(0,a));break}else{if(2<=f&&1==p){0<=h&&(f=n-((3<f?3:f)+1),g.push({data:d.subarray(h+1,f+1),bb:d.subarray(h,f+1),type:k,time:c}));if(n>=e-1)return g;n++;h=n;k=d[n]&31}f=0}else f++;n>=e-1&&0<=h&&0<=f&&(l?(m.data=Vf(m.data,d),m.bb=Vf(m.bb,d)):(l=!0,m={data:d.subarray(h+1,e),bb:d.subarray(h,
289
+ e),type:k,time:c},b&&0==a.Vg&&(d=b.data,e=d.byteLength,n=-1)))}m&&g.push(m);return g};q.getMetadata=function(){for(var a=[],b=t(this.h),c=b.next();!c.done;c=b.next())(c=$h(c.value))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:Fh(c.data),dts:c.dts,pts:c.pts});return a};q.yb=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())(c=$h(c.value))&&a.push(c);return a};q.ud=function(){for(var a=[],b=t(this.i),c=b.next();!c.done;c=b.next())(c=$h(c.value))&&a.push(c);return a};
290
+ q.getStartTime=function(){for(var a=null,b=t(this.yb()),c=b.next();!c.done;c=b.next()){var d=c.value;d&&null!=d.pts&&(d=Math.min(d.dts,d.pts)/9E4,null==a||a>d)&&(a=d)}b=null;d=t(this.ud());for(c=d.next();!c.done;c=d.next())(c=c.value)&&null!=c.pts&&(c=Math.min(c.dts,c.pts)/9E4,null==b||b>c)&&(b=c);return{audio:a,video:b}};q.od=function(){return{audio:this.s,video:this.m}};
291
+ q.fe=function(){var a=[];if("avc"!=this.m)return a;for(var b=this.ud(),c=0;c<b.length;c++){var d=b[c],e=void 0;c+1<b.length&&(e=b[c+1]);a.push.apply(a,v(this.Ae(d,e)))}return a};
292
+ q.nf=function(){var a={height:null,width:null},b=this.fe();if(!b.length)return a;b=b.find(function(l){return 7==l.type});if(!b)return a;b=new Ph(b.data);var c=Sh(b,8);Sh(b,8);Sh(b,8);Uh(b);if(ai.includes(c)&&(c=Vh(b),3===c&&Rh(b,1),Uh(b),Uh(b),Rh(b,1),1===Sh(b,1))){c=3!==c?8:12;for(var d=0;d<c;d++)1===Sh(b,1)&&(6>d?Wh(b,16):Wh(b,64))}Uh(b);c=Vh(b);if(0===c)Vh(b);else if(1===c)for(Rh(b,1),Uh(b),Uh(b),c=Vh(b),d=0;d<c;d++)Uh(b);Uh(b);Rh(b,1);c=Vh(b);d=Vh(b);var e=Sh(b,1);0===e&&Rh(b,1);Rh(b,1);var f=
293
+ 0,g=0,h=0,k=0;1===Sh(b,1)&&(f=Vh(b),g=Vh(b),h=Vh(b),k=Vh(b));a.height=String((2-e)*(d+1)*16-2*h-2*k);a.width=String(16*(c+1)-2*f-2*g);return a};function bi(a){return 0>Zh(a)?!1:!0}function Zh(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}L("shaka.util.TsParser",Yh);Yh.syncOffset=Zh;Yh.probe=bi;Yh.prototype.getVideoResolution=Yh.prototype.nf;Yh.prototype.getVideoNalus=Yh.prototype.fe;Yh.prototype.getCodecs=Yh.prototype.od;
294
+ Yh.prototype.getStartTime=Yh.prototype.getStartTime;Yh.prototype.getVideoData=Yh.prototype.ud;Yh.prototype.getAudioData=Yh.prototype.yb;Yh.prototype.getMetadata=Yh.prototype.getMetadata;Yh.prototype.parseAvcNalus=Yh.prototype.Ae;Yh.prototype.parse=Yh.prototype.parse;Yh.prototype.clearData=Yh.prototype.clearData;Yh.Timescale=9E4;var ai=[100,110,122,244,44,83,86,118,128,138,139,134];function ci(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Xa("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Xa("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Xa(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
295
+ (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}ci.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function di(a,b){var c=ei;switch(b.mimeType){case "video/webm":c=fi;break;case "video/mp4":c=gi}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}L("shaka.lcevc.Dil",ci);ci.prototype.release=ci.prototype.release;var ei=0,fi=1,gi=2;function hi(a,b,c,d){var e=this;this.l=a;this.C=null;this.u=b;this.h={};this.H={};this.W={};this.g=null;this.M=!1;this.Z=c||function(){};this.L=d||null;this.j={};this.A=new kf;this.m={};this.F=null;this.G=new Ie;this.N="";this.i=ii(this,this.G);this.o=!1;this.I=new hf(function(){return ji(e)});this.s=!1;this.Y="UNKNOWN";this.V=this.X=!1;this.aa=new Ie}function ii(a,b){var c=new MediaSource;a.A.la(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=ki(c);a.l.src=a.N;return c}q=hi.prototype;
295
296
  q.destroy=function(){return this.I.destroy()};
296
- function ki(a){var b,c,d,e,f,g,h,k;return I(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p.catch(sc)),f=t(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.u&&b.push(a.u.destroy());for(k in a.m)b.push(a.m[k].destroy());return C(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.C=null;a.i=null;a.g=null;a.u=null;a.h={};a.m={};a.F=null;
297
- a.l={};a.L=null;D(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k;return I(function(l){if(1==l.g)return C(l,e.G,2);e.s=b;e.Y=c;e.X=d;e.V=!e.s&&"HLS"==e.Y&&!e.X;f=t(a.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=a.get(h),mi(e,h,k),e.l[h]=[];D(l)})};
298
- function mi(a,b,c){var d=Cc(c.mimeType,c.codecs);if(b==zc)ni(a,d,a.s,c.external);else{var e=a.C.forceTransmux;if(!gb(d)||!a.s&&Ec.includes(d))e=!0;var f=Fc(c.mimeType,c.codecs);e&&(e=Vb(f))&&(d=e(),a.m[b]=d,d=d.convertCodecs(b,f));f=d+a.C.sourceBufferExtraFeatures;kf(a.I);try{var g=a.i.addSourceBuffer(f)}catch(h){throw new N(2,3,3015,h,"The mediaSource_ status was"+a.i.readyState+"expected 'open'");}a.s&&(g.mode=oi);a.A.D(g,"error",function(){a.l[b][0].p.reject(new N(2,3,3014,a.j.error?a.j.error.code:
299
- 0))});a.A.D(g,"updateend",function(){return pi(a,b)});a.h[b]=g;a.H[b]=d;a.W[b]=!!c.drmInfos.length}}q.configure=function(a){this.C=a};function ni(a,b,c,d){a.g||(a.g=new Kc(a.u));var e=a.g;a=d||a.M;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Mc[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):$a('Text parsers should have a "setSequenceMode" method!'),e.u=a)}function qi(a){return a.o?!1:a.i?"ended"==a.i.readyState:!0}
300
- function ri(a,b){a.o?a=null:b==zc?a=a.g.g:(a=si(a,b),a=!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);return a}function ti(a,b){return a.o?null:b==zc?a.g.h:wh(si(a,b))}function ui(a,b,c){if(a.o)return 0;if(b==zc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=si(a,b);return yh(a,c)}
301
- q.cb=function(){var a={total:this.o?[]:zh(this.j.buffered),audio:this.o?[]:zh(si(this,"audio")),video:this.o?[]:zh(si(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 si(a,b){try{return a.h[b].buffered}catch(c){return null}}
302
- function vi(a,b,c,d,e,f){var g=null,h=M(c);if(Ec.includes(e))f=Gh(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.Z([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.h&&d.h.timescale){var k=d.h.timescale;if(!isNaN(k)){var l=0,m=!1;(new Gf).box("moof",Lf).box("traf",Lf).O("tfdt",function(n){l=Jh(n.reader,n.version).baseMediaDecodeTime/
303
- k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!ci(h)||(h=(new Zh).parse(h),b=h.getStartTime()[b],null!=b&&(g=b),h=h.getMetadata(),h.length&&a.Z(h,f,d?d.endTime:null));return g}
304
- function wi(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r,u,w,y,x,A;return I(function(z){switch(z.g){case 1:k=Ac;if(b!=k.da){z.B(2);break}if(!a.s){z.B(3);break}return C(z,a.aa,4);case 4:l=z.h,a.g.s=l;case 3:return C(z,Nc(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return z.return();case 2:m=a.h[b].timestampOffset;n=a.H[b];a.m[b]&&(n=a.m[b].getOrginalMimeType());if(d&&(p=vi(a,b,c,d,n,m),null!=p)){r=d.startTime-p;u=Math.abs(m-r);if(.1<=u||g||h)m=r,a.V&&(xi(a,b,function(){return yi(a,
305
- b)}),xi(a,b,function(){return zi(a,b,m)}));w=b==k.va||!(k.va in a.h);a.s&&w&&a.aa.resolve(m)}f&&b==k.va&&(a.g||ni(a,"application/cea-608",a.s,!1),a.F||(y=n.split(";",1)[0],a.F=new rb(y)),d?(x=a.F.j(c),x.length&&Rc(a.g,x,d.startTime,d.endTime,m)):a.F.init(c));if(!a.m[b]){z.B(6);break}return C(z,a.m[b].transmux(c,e,d,a.i.duration),7);case 7:c=z.h;case 6:return c=Ai(a,c,d?d.startTime:null,b),d&&a.s&&b!=k.da&&(g||h)&&(A=d.startTime,xi(a,b,function(){return yi(a,b)}),xi(a,b,function(){return zi(a,b,A)})),
306
- C(z,xi(a,b,function(){var B=c;if("video"==b&&a.L){var E=a.L;E.g&&E.g.appendBuffer(B,"video",E.i)}a.h[b].appendBuffer(B)}),8);case 8:D(z)}})}function Bi(a,b){var c=ti(a,"video")||0;Pc(a.g,b,c)}function Ci(a){a.g&&Pc(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return I(function(f){e=Ac;return a==e.da?C(f,d.g.remove(b,c),0):C(f,xi(d,a,function(){c<=b?pi(d,a):d.h[a].remove(b,c)}),0)})};
307
- function Di(a,b){var c;return I(function(d){c=Ac;return b==c.da?a.g?C(d,a.g.remove(0,Infinity),0):d.return():C(d,xi(a,b,function(){var e=a.i.duration;0>=e?pi(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return I(function(d){c=Ac;return a==c.da?d.return():C(d,xi(b,a,function(){b.j.currentTime-=.001;pi(b,a)}),0)})};
308
- function Ei(a,b,c,d,e,f,g,h){var k,l,m;return I(function(n){if(1==n.g){k=Ac;if(b==k.da)return f||(a.g.s=c),Oc(a.g,d,e),n.return();l=[];return C(n,Fi(a,b,g,h),2)}(m=n.h)||l.push(xi(a,b,function(){return yi(a,b)}));f||l.push(xi(a,b,function(){return zi(a,b,c)}));l.push(xi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;pi(a,b)}));return C(n,Promise.all(l),0)})}
309
- function Gi(a,b,c){var d;return I(function(e){d=Ac;if(b==d.da)return e.return();xi(a,b,function(){return yi(a,b)});return C(e,xi(a,b,function(){return zi(a,b,c)}),0)})}q.endOfStream=function(a){var b=this;return I(function(c){return C(c,Hi(b,function(){qi(b)||"closed"===b.i.readyState||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};
310
- q.Aa=function(a){var b=this;return I(function(c){return C(c,Hi(b,function(){if(a<b.i.duration)for(var d in b.h){var e={start:function(){},p:new Je};b.l[d].unshift(e)}b.i.duration=a}),0)})};q.getDuration=function(){return this.i.duration};function yi(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;pi(a,b)}function zi(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;pi(a,b)}
311
- function pi(a,b){if(!a.o){var c=a.l[b][0];c&&(c.p.resolve(),Ii(a,b))}}function xi(a,b,c){kf(a.I);c={start:c,p:new Je};a.l[b].push(c);1==a.l[b].length&&Ji(a,b);return c.p}
312
- function Hi(a,b){var c,d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:kf(a.I);c=[];d={};for(e in a.h)d.rc=new Je,f={start:function(m){return function(){return m.rc.resolve()}}(d),p:d.rc},a.l[e].push(f),c.push(d.rc),1==a.l[e].length&&f.start(),d={rc:d.rc};wa(l,2);return C(l,Promise.all(c),4);case 4:Aa(l,3);break;case 2:throw g=Ba(l),g;case 3:return wa(l,5,6),C(l,b(),6);case 6:Ca(l);for(h in a.h)Ii(a,h);Ea(l,0);break;case 5:throw k=Ba(l),new N(2,3,3015,k,a.j.error||"No error in the media element");
313
- }})}function Ii(a,b){a.l[b].shift();Ji(a,b)}function Ji(a,b){var c=a.l[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,a.j.error||"No error in the media element")),Ii(a,b)}}function Ai(a,b,c,d){var e=a.W[d];a.C.insertFakeEncryptionInInit&&null==c&&e&&(kd()||id())&&"mp4"==a.H[d].split(";")[0].split("/")[1]&&(b=oh(b));return b}
314
- function Ki(a,b,c,d){return xi(a,b,function(){b!==zc&&(window.SourceBuffer&&SourceBuffer.prototype&&SourceBuffer.prototype.changeType&&(a.m[b]&&a.m[b].destroy(),d&&(a.m[b]=d),a.h[b].changeType(c+a.C.sourceBufferExtraFeatures),a.H[b]=c),pi(a,b))})}
315
- function Li(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w;return I(function(y){switch(y.g){case 1:a.o=!0;c=a.j.currentTime;ya(y);a.A.sb();a.h={};d=[];for(e in a.m)d.push(a.m[e].destroy());for(f in a.h){g=a.h[f];try{a.i.removeSourceBuffer(g)}catch(x){}}return C(y,Promise.all(d),4);case 4:return a.m={},h=a.i.duration,a.G=new Je,a.i=ji(a,a.G),C(y,a.G,5);case 5:a.i.duration=h;k=new Je;l=a.i.sourceBuffers;m=b.size;n=0;a.A.D(l,"addsourcebuffer",function(){n++;n===m&&k.resolve()});p=t(b.keys());for(r=p.next();!r.done;r=
316
- p.next())u=r.value,w=b.get(u),mi(a,u,w);a.j.currentTime=c;return C(y,k,2);case 2:Ca(y),a.o=!1,Ea(y,0)}})}function Mi(a,b){return Hi(a,function(){return Li(a,b)})}
317
- function Fi(a,b,c,d){var e,f,g,h,k,l,m,n,p;return I(function(r){if(1==r.g){e=Ic(Jc(a.H[b]))[0];f=a.H[b].split(";")[0];h=Cc(c.mimeType,c.codecs);k=a.C.forceTransmux;if(!gb(h)||!a.s&&Ec.includes(h))k=!0;l=Fc(c.mimeType,c.codecs);k&&(m=Vb(l))&&(g=m(),h=g.convertCodecs(b,l));n=Ic(Jc(h))[0];p=h.split(";")[0];if(e===n&&f===p)return r.return(!1);if(window.SourceBuffer&&SourceBuffer.prototype&&SourceBuffer.prototype.changeType)return C(r,Ki(a,b,h,g),3);g&&g.destroy();return C(r,Mi(a,d),3)}return r.return(!0)})}
318
- var li=window.URL.createObjectURL,oi="sequence";function R(a,b,c){this.i=a;this.m=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.o=0;this.C=!0;this.F=0;this.u=void 0===c?!0:c;this.G=0;this.A=!1}q=R.prototype;q.getDuration=function(){return this.j};q.sg=function(){return this.g};q.Hf=function(a){this.i=a};q.Aa=function(a){this.j=a};q.xg=function(){return this.i};q.Ff=function(a){this.o=a};q.fc=function(a){this.C=a};q.Md=function(a){this.s=a};q.Gf=function(a){this.m=a};q.kg=function(){return this.m};
319
- q.yf=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Fd(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.u&&!this.A&&(this.i=(Date.now()+this.o)/1E3-this.h-this.g)}};
320
- q.Qc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.o)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Fd(b);this.h=Math.max(this.h,c);null!=this.i&&this.u&&!this.A&&(this.i=d-this.h-this.g)}};q.Cd=function(){this.A=!0};q.Fd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.ue=function(a){this.g=Math.max(this.g,a)};
321
- q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.T=function(){return Infinity==this.j&&!this.C};q.Fb=function(){return Infinity!=this.j&&!this.C};q.fb=function(){return Math.max(this.F,this.Ab()-this.s)};q.Jf=function(a){this.F=a};q.Ab=function(){return this.T()||this.Fb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
322
- q.Kc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Ab()-this.s+a,this.eb()))};q.Yb=function(){return this.Kc(0)};q.eb=function(){return Math.max(0,this.Ab()-(this.T()||this.Fb()?this.m:0))};q.Of=function(){return null==this.i||null!=this.h&&this.u?!1:!0};q.Ef=function(a){this.G=a};L("shaka.media.PresentationTimeline",R);R.prototype.setAvailabilityTimeOffset=R.prototype.Ef;R.prototype.usingPresentationStartTime=R.prototype.Of;
323
- R.prototype.getSeekRangeEnd=R.prototype.eb;R.prototype.getSeekRangeStart=R.prototype.Yb;R.prototype.getSafeSeekRangeStart=R.prototype.Kc;R.prototype.getSegmentAvailabilityEnd=R.prototype.Ab;R.prototype.setUserSeekStart=R.prototype.Jf;R.prototype.getSegmentAvailabilityStart=R.prototype.fb;R.prototype.isInProgress=R.prototype.Fb;R.prototype.isLive=R.prototype.T;R.prototype.offset=R.prototype.offset;R.prototype.notifyMaxSegmentDuration=R.prototype.ue;R.prototype.notifyMinSegmentStartTime=R.prototype.Fd;
324
- R.prototype.lockStartTime=R.prototype.Cd;R.prototype.notifySegments=R.prototype.Qc;R.prototype.notifyTimeRange=R.prototype.yf;R.prototype.getDelay=R.prototype.kg;R.prototype.setDelay=R.prototype.Gf;R.prototype.setSegmentAvailabilityDuration=R.prototype.Md;R.prototype.setStatic=R.prototype.fc;R.prototype.setClockOffset=R.prototype.Ff;R.prototype.getPresentationStartTime=R.prototype.xg;R.prototype.setDuration=R.prototype.Aa;R.prototype.setPresentationStartTime=R.prototype.Hf;
325
- R.prototype.getMaxSegmentDuration=R.prototype.sg;R.prototype.getDuration=R.prototype.getDuration;function Ni(a,b,c){this.l=c;this.j=a;this.s=Oi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Ni.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Pi(a,b){a.i=b}function Qi(a){this.g=a}function Oi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(zh(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 Ri(a,b,c,d,e){var f=this;this.u=e;this.g=a;this.A=b;this.s=c;this.l=new lf;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return Si(f)});this.m=(new dd(function(){Si(f)})).Ca(this.s.gapJumpTimerTime)}Ri.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=this.u=null};Ri.prototype.xe=function(){this.o=!0;Si(this)};
326
- function Si(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Oi(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 P("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Ah(c,b,a.s.gapDetectionThreshold),null==
327
- d||0==d&&!a.o||(e=c.start(d),e>=a.A.eb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.u(new P("gapjumped")))))}}};function Ti(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ui.value().get(b),c.la(a,b,d))}var Ui=new sf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Vi(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new lf;this.i=new Wi(a);Ti(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Xi(e,e.j())})}Vi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Yi(a){return a.o?a.g.currentTime:a.j()}
328
- function Zi(a,b){0<a.g.readyState?$i(a.i,b):Ti(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Xi(a,a.j())})}function Xi(a,b){.001>Math.abs(a.g.currentTime-b)?aj(a):(a.h.la(a.g,"seeking",function(){aj(a)}),$i(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function aj(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
329
- function Wi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new dd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Wi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function $i(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function bj(a){this.g=a;this.j=!1;this.h=null;this.i=new lf}q=bj.prototype;q.Xd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.la(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Ti(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.Yd=function(a){this.h=this.j?this.h:a};q.gd=function(){return(this.j?this.g.currentTime:this.h)||0};q.We=function(){return 0};
330
- q.Ve=function(){return 0};q.xf=function(){};
331
- function cj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=dj(a,c,f);this.j=new Ri(a,b.presentationTimeline,c,this.o,f);this.h=new Vi(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Yi(g.h);h=ej(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Zi(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
332
- g.g.Yb():g.g.eb():0>h&&(h=g.g.eb()+h);return fj(g,gj(g,h))});this.m=new dd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Yi(g.h),k=g.g.Yb(),l=g.g.eb();3>l-k&&(k=l-3);h<k&&(h=ej(g,h),g.i.currentTime=h)}})}q=cj.prototype;q.Xd=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.Yd=function(a){Zi(this.h,a)};
333
- q.gd=function(){var a=Yi(this.h);return 0<this.i.readyState&&!this.i.paused?gj(this,a):a};q.We=function(){return this.o?this.o.o:0};q.Ve=function(){return this.j.C};q.xf=function(){this.j.xe()};function fj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
334
- function ej(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Yb(),f=a.g.eb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Kc(c),k=a.g.Kc(d);c=a.g.Kc(c+d);return b>=g?fj(a,b):b>f?f:b<e?xh(a.i.buffered,k)?k:c:b>=h||xh(a.i.buffered,b)?b:c}function gj(a,b){var c=a.g.Yb();if(b<c)return c;a=a.g.eb();return b>a?a:b}
335
- function dj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Ni(new Qi(a),b.stallThreshold,c);Pi(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function hj(a){this.g=a;this.l=null;this.i=0;this.m=!1}q=hj.prototype;q.Jc=function(){return this.g.length};q.release=function(){this.m||(this.g=[],this.l&&this.l.stop(),this.l=null)};q.Pg=function(){this.m=!0};function ij(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
336
- q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.m)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.Ed=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,v(a))}};
337
- q.Pc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Ed(a);this.Ta(b)};q.Ta=function(a){if(!this.m){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
338
- q.Ub=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new Q(a.startTime,b,a.F,a.Ba,a.ka,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.C,a.g,a.status,a.u),this.g[this.g.length-1].j=a.j)}};
339
- q.Od=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new dd(function(){var d=b();d?c.g.push.apply(c.g,v(d)):(c.l.stop(),c.l=null)}),this.l.Ca(a))};hj.prototype[Symbol.iterator]=function(){return this.yb(0)};
340
- hj.prototype.yb=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.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.s;)e--,f=c.i[e];if(!f.s)return Ya("No independent partial segment found!"),null;b++;d=e-1;break}}return new jj(this,b,d)};function kj(a,b,c){return new hj([new Q(a,a+b,function(){return c},0,null,null,a,a,a+b)])}L("shaka.media.SegmentIndex",hj);hj.forSingleSegment=kj;
341
- hj.prototype.getIteratorForTime=hj.prototype.yb;hj.prototype.updateEvery=hj.prototype.Od;hj.prototype.fit=hj.prototype.Ub;hj.prototype.evict=hj.prototype.Ta;hj.prototype.mergeAndEvict=hj.prototype.Pc;hj.prototype.offset=hj.prototype.offset;hj.prototype.get=hj.prototype.get;hj.prototype.find=hj.prototype.find;hj.prototype.markImmutable=hj.prototype.Pg;hj.prototype.release=hj.prototype.release;function jj(a,b,c){this.i=a;this.g=b;this.h=c}jj.prototype.cg=function(){return this.g};
342
- jj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.wa().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};jj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.wa().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};L("shaka.media.SegmentIterator",jj);jj.prototype.next=jj.prototype.next;jj.prototype.current=jj.prototype.current;
343
- jj.prototype.currentPosition=jj.prototype.cg;function lj(){hj.call(this,[]);this.h=[]}ra(lj,hj);q=lj.prototype;q.clone=function(){var a=new lj;a.h=this.h.slice();return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};
344
- q.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.Ed=function(){};q.Ta=function(){};q.Pc=function(){};q.Ub=function(){};q.Od=function(){};L("shaka.media.MetaSegmentIndex",lj);lj.prototype.updateEvery=lj.prototype.Od;lj.prototype.fit=lj.prototype.Ub;lj.prototype.mergeAndEvict=lj.prototype.Pc;lj.prototype.evict=lj.prototype.Ta;lj.prototype.merge=lj.prototype.Ed;
345
- lj.prototype.offset=lj.prototype.offset;lj.prototype.get=lj.prototype.get;lj.prototype.find=lj.prototype.find;lj.prototype.release=lj.prototype.release;function mj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.td();this.h=new dd(function(){b.g.wf(.25*b.i)})}mj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};mj.prototype.set=function(a){this.i=a;nj(this)};mj.prototype.pd=function(){return this.g.pd()};function nj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.td()!=b&&a.g.Ne(b);return}catch(c){}a.h.Ca(.25);0!=a.g.td()&&a.g.Ne(0)};function oj(a){var b=this;this.h=a;this.g=new Set;this.i=(new dd(function(){pj(b,!1)})).Ca(.25)}oj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function pj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function qj(a){Te.call(this);this.g=new Map;this.h=a}ra(qj,Te);qj.prototype.release=function(){this.g.clear();Te.prototype.release.call(this)};function rj(a,b){var c=a.g.get(b);c||(c={Sc:[],cf:null,contentType:b},a.g.set(b,c));return c}function sj(a,b,c){var d=rj(a,b.contentType);tj(a,d);a={qe:b,position:c};d=d.Sc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
346
- qj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Sc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.qe;break a}}d=null}if(e=d)e=c.cf,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);
347
- 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.cf=d,JSON.stringify(d),c=new P("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function tj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Sc;b.Sc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Sc=[]};function uj(a){Te.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new dd(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new P("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}ra(uj,Te);uj.prototype.release=function(){this.g.clear();this.h.stop();Te.prototype.release.call(this)};function vj(a,b){Te.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Nb:null,Mb:wj,Eb:function(d,e){return xj(c,"enter",d,e)}},{Nb:yj,Mb:wj,Eb:function(d,e){return xj(c,"enter",d,e)}},{Nb:zj,Mb:wj,Eb:function(d,e){return xj(c,"enter",d,e)}},{Nb:wj,Mb:yj,Eb:function(d,e){return xj(c,"exit",d,e)}},{Nb:wj,Mb:zj,Eb:function(d,e){return xj(c,"exit",d,e)}},{Nb:yj,Mb:zj,Eb:function(d,e){return xj(c,"skip",d,e)}},{Nb:zj,Mb:yj,Eb:function(d,e){return xj(c,"skip",d,e)}}];this.h=new lf;this.h.D(this.i,
348
- "regionremove",function(d){c.g.delete(d.region)})}ra(vj,Te);vj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Te.prototype.release.call(this)};vj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?yj:a>d.endTime?zj:wj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Nb==e&&h.Mb==f&&h.Eb(d,b)}}};
349
- function xj(a,b,c,d){b=new P(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var yj=1,wj=2,zj=3;function Aj(a,b,c){this.j=a;this.h=b;this.i=0;this.l=c;this.g=new Map}function Bj(a,b){if(a.h.segmentIndex){var c=a.h.segmentIndex.yb(Math.max(b.startTime,a.i));if(c)for(;a.g.size<a.j&&null!=b;){var d=!0;b.m&&null!=b.ka&&(d=!1);2==b.Bb()&&(d=!1);d&&!a.g.has(b)&&(d=new Cj(a.l),Dj(d,b,a.h),a.g.set(b,d));a.i=b.startTime;b=c.next().value}}}function Ej(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&Fj(a,c);a.i=0}}function Gj(a,b){b&&b!==a.h&&(Ej(a),a.h=b)}
350
- function Fj(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function Cj(a){this.i=a;this.g=this.h=null}function Dj(a,b,c){a.g=a.i(b,c,function(d){return I(function(e){return a.h?C(e,a.h(d),0):e.B(0)})})}Cj.prototype.abort=function(){this.g&&this.g.abort()};function Hj(a,b,c,d,e){a=bf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Ij(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.j=null;this.F=0;this.C=!1;this.h=new Map;this.A=!1;this.G=null;this.s=!1;this.l=new jf(function(){return Jj(c)})}q=Ij.prototype;q.destroy=function(){return this.l.destroy()};function Jj(a){var b,c,d,e;return I(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,Kj(e),b.push(Lj(e));return C(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;D(f)})}
351
- q.configure=function(a){this.i=a;this.G=new Ge({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);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=this.h.get(c.value),c.za){var d=c.za,e=a.segmentPrefetchLimit;d.j=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&Fj(d,g)}0<a.segmentPrefetchLimit||
352
- (c.za=null)}else 0<a.segmentPrefetchLimit&&(c.za=Mj(this,c.stream))};q.start=function(){var a=this;return I(function(b){if(1==b.g)return C(b,Nj(a),2);kf(a.l);a.A=!0;D(b)})};
353
- function Oj(a,b){var c,d,e,f,g,h,k;I(function(l){switch(l.g){case 1:return c=Ac,a.F++,d=a.F,wa(l,2),C(l,Di(a.g.R,c.da),4);case 4:Aa(l,3);break;case 2:if(e=Ba(l),a.g)a.g.onError(e);case 3:f=Cc(b.mimeType,b.codecs),ni(a.g.R,f,a.m.sequenceMode,b.external),g=a.g.R.u,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.F==d&&(k=Pj(a,b),a.h.set(c.da,k),Qj(a,k,0)),D(l)}})}function Rj(a){var b=a.h.get(zc);b&&(Kj(b),Lj(b).catch(function(){}),a.h.delete(zc));a.o=null}
354
- function Sj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Kb&&(Tj(a,b,!1,0,!1),c.Kb=d);else if(d=c.Kb)c.Kb=null,Tj(a,d,!0,0,!1)}}function Uj(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.A&&(b.video&&Tj(a,b.video,c,d,e,f),b.audio&&Tj(a,b.audio,c,d,e,f))}function Vj(a,b){I(function(c){if(1==c.g)return a.o=b,a.A?b.segmentIndex?c.B(2):C(c,b.createSegmentIndex(),2):c.return();Tj(a,b,!0,0,!1);D(c)})}
355
- function Tj(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=zc?g&&(g.Kb&&(b.trickModeVideo?(g.Kb=b,b=b.trickModeVideo):g.Kb=null),g.stream!=b||e)&&(g.za&&Gj(g.za,b),b.type==zc&&(e=Cc(b.mimeType,b.codecs),ni(a.g.R,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.Xe=!!f,c&&(g.Bc?g.Pd=!0:g.ua?(g.vb=!0,g.md=d,g.Pd=!0):(Kj(g),Wj(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Xj(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Oj(a,b)}
356
- function Xj(a,b){var c,d;return I(function(e){if(1==e.g){if(!b.ya)return e.return();c=b.stream;d=b.ya;return c.segmentIndex?e.B(2):C(e,c.createSegmentIndex(),2)}if(b.ya!=d||b.stream!=c)return e.return();var f=a.g.sd();var g=ti(a.g.R,b.type),h=b.stream.segmentIndex.find(b.sa?b.sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ka?k.ka-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ka?k.ka-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
297
+ function ji(a){var b,c,d,e,f,g,h,k;return H(function(l){if(1==l.g){b=[];for(c in a.j)for(d=a.j[c],e=d[0],a.j[c]=d.slice(0,1),e&&b.push(e.p.catch(rc)),f=t(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.u&&b.push(a.u.destroy());for(k in a.m)b.push(a.m[k].destroy());return C(l,Promise.all(b),2)}a.A&&(a.A.release(),a.A=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.C=null;a.i=null;a.g=null;a.u=null;a.h={};a.m={};a.F=null;
298
+ a.j={};a.L=null;D(l)})}q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k;return H(function(l){if(1==l.g)return C(l,e.G,2);e.s=b;e.Y=c;e.X=d;e.V=!e.s&&"HLS"==e.Y&&!e.X;f=t(a.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=a.get(h),li(e,h,k),e.j[h]=[];D(l)})};
299
+ function li(a,b,c){var d=Bc(c.mimeType,c.codecs);if(b==yc)mi(a,d,a.s,c.external);else{var e=a.C.forceTransmux;if(!eb(d)||!a.s&&Cc.includes(d))e=!0;var f=Ec(c.mimeType,c.codecs);e&&(e=Ub(f))&&(d=e(),a.m[b]=d,d=d.convertCodecs(b,f));f=d+a.C.sourceBufferExtraFeatures;jf(a.I);try{var g=a.i.addSourceBuffer(f)}catch(h){throw new N(2,3,3015,h,"The mediaSource_ status was"+a.i.readyState+"expected 'open'");}a.s&&(g.mode=ni);a.A.D(g,"error",function(){a.j[b][0].p.reject(new N(2,3,3014,a.l.error?a.l.error.code:
300
+ 0))});a.A.D(g,"updateend",function(){return oi(a,b)});a.h[b]=g;a.H[b]=d;a.W[b]=!!c.drmInfos.length}}q.configure=function(a){this.C=a};function mi(a,b,c,d){a.g||(a.g=new Jc(a.u));var e=a.g;a=d||a.M;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=(0,Lc[b])(),e.i.setSequenceMode?e.i.setSequenceMode(c):Xa('Text parsers should have a "setSequenceMode" method!'),e.u=a)}function pi(a){return a.o?!1:a.i?"ended"==a.i.readyState:!0}
301
+ function qi(a,b){a.o?a=null:b==yc?a=a.g.g:(a=ri(a,b),a=!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);return a}function si(a,b){return a.o?null:b==yc?a.g.h:vh(ri(a,b))}function ti(a,b,c){if(a.o)return 0;if(b==yc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=ri(a,b);return xh(a,c)}
302
+ q.cb=function(){var a={total:this.o?[]:yh(this.l.buffered),audio:this.o?[]:yh(ri(this,"audio")),video:this.o?[]:yh(ri(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 ri(a,b){try{return a.h[b].buffered}catch(c){return null}}
303
+ function ui(a,b,c,d,e,f){var g=null,h=M(c);if(Cc.includes(e))f=Fh(h),f.length&&d&&((b=f.find(function(n){return"com.apple.streaming.transportStreamTimestamp"===n.description}))&&b.data&&(g=Math.round(b.data)/1E3),a.Z([{cueTime:d.startTime,data:h,frames:f,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(e.includes("/mp4")&&d&&0==d.timestampOffset&&d.h&&d.h.timescale){var k=d.h.timescale;if(!isNaN(k)){var l=0,m=!1;(new Ff).box("moof",Kf).box("traf",Kf).O("tfdt",function(n){l=Ih(n.reader,n.version).baseMediaDecodeTime/
304
+ k;m=!0;n.parser.stop()}).parse(c,!0);m&&(g=l)}}else e.includes("/mp4")||e.includes("/webm")||!bi(h)||(h=(new Yh).parse(h),b=h.getStartTime()[b],null!=b&&(g=b),h=h.getMetadata(),h.length&&a.Z(h,f,d?d.endTime:null));return g}
305
+ function vi(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r,u,w,y,x,A;return H(function(z){switch(z.g){case 1:k=zc;if(b!=k.da){z.B(2);break}if(!a.s){z.B(3);break}return C(z,a.aa,4);case 4:l=z.h,a.g.s=l;case 3:return C(z,Mc(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return z.return();case 2:m=a.h[b].timestampOffset;n=a.H[b];a.m[b]&&(n=a.m[b].getOrginalMimeType());if(d&&(p=ui(a,b,c,d,n,m),null!=p)){r=d.startTime-p;u=Math.abs(m-r);if(.1<=u||g||h)m=r,a.V&&(wi(a,b,function(){return xi(a,
306
+ b)}),wi(a,b,function(){return yi(a,b,m)}));w=b==k.va||!(k.va in a.h);a.s&&w&&a.aa.resolve(m)}f&&b==k.va&&(a.g||mi(a,"application/cea-608",a.s,!1),a.F||(y=n.split(";",1)[0],a.F=new qb(y)),d?(x=a.F.j(c),x.length&&Qc(a.g,x,d.startTime,d.endTime,m)):a.F.init(c));if(!a.m[b]){z.B(6);break}return C(z,a.m[b].transmux(c,e,d,a.i.duration,b),7);case 7:c=z.h;case 6:return c=zi(a,c,d?d.startTime:null,b),d&&a.s&&b!=k.da&&(g||h)&&(A=d.startTime,wi(a,b,function(){return xi(a,b)}),wi(a,b,function(){return yi(a,b,
307
+ A)})),C(z,wi(a,b,function(){var B=c;if("video"==b&&a.L){var E=a.L;E.g&&E.g.appendBuffer(B,"video",E.i)}a.h[b].appendBuffer(B)}),8);case 8:D(z)}})}function Ai(a,b){var c=si(a,"video")||0;Oc(a.g,b,c)}function Bi(a){a.g&&Oc(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return H(function(f){e=zc;return a==e.da?C(f,d.g.remove(b,c),0):C(f,wi(d,a,function(){c<=b?oi(d,a):d.h[a].remove(b,c)}),0)})};
308
+ function Ci(a,b){var c;return H(function(d){c=zc;return b==c.da?a.g?C(d,a.g.remove(0,Infinity),0):d.return():C(d,wi(a,b,function(){var e=a.i.duration;0>=e?oi(a,b):a.h[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return H(function(d){c=zc;return a==c.da?d.return():C(d,wi(b,a,function(){b.l.currentTime-=.001;oi(b,a)}),0)})};
309
+ function Di(a,b,c,d,e,f,g,h){var k,l,m;return H(function(n){if(1==n.g){k=zc;if(b==k.da)return f||(a.g.s=c),Nc(a.g,d,e),n.return();l=[];return C(n,Ei(a,b,g,h),2)}(m=n.h)||l.push(wi(a,b,function(){return xi(a,b)}));f||l.push(wi(a,b,function(){return yi(a,b,c)}));l.push(wi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;oi(a,b)}));return C(n,Promise.all(l),0)})}
310
+ function Fi(a,b,c){var d;return H(function(e){d=zc;if(b==d.da)return e.return();wi(a,b,function(){return xi(a,b)});return C(e,wi(a,b,function(){return yi(a,b,c)}),0)})}q.endOfStream=function(a){var b=this;return H(function(c){return C(c,Gi(b,function(){pi(b)||"closed"===b.i.readyState||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};
311
+ q.Aa=function(a){var b=this;return H(function(c){return C(c,Gi(b,function(){if(a<b.i.duration)for(var d in b.h){var e={start:function(){},p:new Ie};b.j[d].unshift(e)}b.i.duration=a}),0)})};q.getDuration=function(){return this.i.duration};function xi(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;oi(a,b)}function yi(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;oi(a,b)}
312
+ function oi(a,b){if(!a.o){var c=a.j[b][0];c&&(c.p.resolve(),Hi(a,b))}}function wi(a,b,c){jf(a.I);c={start:c,p:new Ie};a.j[b].push(c);1==a.j[b].length&&Ii(a,b);return c.p}
313
+ function Gi(a,b){var c,d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:jf(a.I);c=[];d={};for(e in a.h)d.rc=new Ie,f={start:function(m){return function(){return m.rc.resolve()}}(d),p:d.rc},a.j[e].push(f),c.push(d.rc),1==a.j[e].length&&f.start(),d={rc:d.rc};ua(l,2);return C(l,Promise.all(c),4);case 4:xa(l,3);break;case 2:throw g=za(l),g;case 3:return ua(l,5,6),C(l,b(),6);case 6:Aa(l);for(h in a.h)Hi(a,h);Ba(l,0);break;case 5:throw k=za(l),new N(2,3,3015,k,a.l.error||"No error in the media element");
314
+ }})}function Hi(a,b){a.j[b].shift();Ii(a,b)}function Ii(a,b){var c=a.j[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,a.l.error||"No error in the media element")),Hi(a,b)}}function zi(a,b,c,d){var e=a.W[d];a.C.insertFakeEncryptionInInit&&null==c&&e&&(jd()||hd())&&"mp4"==a.H[d].split(";")[0].split("/")[1]&&(b=nh(b));return b}
315
+ function Ji(a,b,c,d){return wi(a,b,function(){b!==yc&&(window.SourceBuffer&&SourceBuffer.prototype&&SourceBuffer.prototype.changeType&&(a.m[b]&&a.m[b].destroy(),d&&(a.m[b]=d),a.h[b].changeType(c+a.C.sourceBufferExtraFeatures),a.H[b]=c),oi(a,b))})}
316
+ function Ki(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E;return H(function(F){switch(F.g){case 1:a.o=!0;c=a.l.currentTime;va(F);a.A.sb();d=[];for(e in a.m)d.push(a.m[e].destroy());for(f in a.j)for(g=a.j[f],h=g[0],a.j[f]=g.slice(0,1),h&&d.push(h.p.catch(rc)),k=t(g.slice(1)),l=k.next();!l.done;l=k.next())m=l.value,m.p.reject(new N(2,7,7003,void 0));for(n in a.h){p=a.h[n];try{a.i.removeSourceBuffer(p)}catch(G){}}return C(F,Promise.all(d),4);case 4:return a.m={},a.j={},a.h={},r=a.i.duration,a.G=new Ie,
317
+ a.i=ii(a,a.G),C(F,a.G,5);case 5:a.i.duration=r;u=new Ie;w=a.i.sourceBuffers;y=b.size;x=0;a.A.D(w,"addsourcebuffer",function(){x++;x===y&&u.resolve()});A=t(b.keys());for(z=A.next();!z.done;z=A.next())B=z.value,E=b.get(B),li(a,B,E);a.l.currentTime=c;return C(F,u,2);case 2:Aa(F),a.o=!1,Ba(F,0)}})}function Li(a,b){return Gi(a,function(){return Ki(a,b)})}
318
+ function Ei(a,b,c,d){var e,f,g,h,k,l,m,n,p;return H(function(r){if(1==r.g){e=Hc(Ic(a.H[b]))[0];f=a.H[b].split(";")[0];h=Bc(c.mimeType,c.codecs);k=a.C.forceTransmux;if(!eb(h)||!a.s&&Cc.includes(h))k=!0;l=Ec(c.mimeType,c.codecs);k&&(m=Ub(l))&&(g=m(),h=g.convertCodecs(b,l));n=Hc(Ic(h))[0];p=h.split(";")[0];if(e===n&&f===p)return r.return(!1);if(window.SourceBuffer&&SourceBuffer.prototype&&SourceBuffer.prototype.changeType)return C(r,Ji(a,b,h,g),3);g&&g.destroy();return C(r,Li(a,d),3)}return r.return(!0)})}
319
+ var ki=window.URL.createObjectURL,ni="sequence";function Q(a,b,c){this.i=a;this.m=b;this.s=this.j=Infinity;this.g=1;this.h=this.l=null;this.o=0;this.C=!0;this.F=0;this.u=void 0===c?!0:c;this.G=0;this.A=!1}q=Q.prototype;q.getDuration=function(){return this.j};q.sg=function(){return this.g};q.Hf=function(a){this.i=a};q.Aa=function(a){this.j=a};q.xg=function(){return this.i};q.Ff=function(a){this.o=a};q.fc=function(a){this.C=a};q.Nd=function(a){this.s=a};q.Gf=function(a){this.m=a};q.kg=function(){return this.m};
320
+ q.yf=function(a,b){if(0!=a.length){var c=a[a.length-1].end+b;this.Gd(a[0].start+b);this.g=a.reduce(function(d,e){return Math.max(d,e.end-e.start)},this.g);this.h=Math.max(this.h,c);null!=this.i&&this.u&&!this.A&&(this.i=(Date.now()+this.o)/1E3-this.h-this.g)}};
321
+ q.Qc=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.o)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Gd(b);this.h=Math.max(this.h,c);null!=this.i&&this.u&&!this.A&&(this.i=d-this.h-this.g)}};q.Dd=function(){this.A=!0};q.Gd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.ve=function(a){this.g=Math.max(this.g,a)};
322
+ q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.T=function(){return Infinity==this.j&&!this.C};q.Gb=function(){return Infinity!=this.j&&!this.C};q.fb=function(){return Math.max(this.F,this.Bb()-this.s)};q.Jf=function(a){this.F=a};q.Bb=function(){return this.T()||this.Gb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j};
323
+ q.Kc=function(a){var b=Math.max(this.l,this.F);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Bb()-this.s+a,this.eb()))};q.Yb=function(){return this.Kc(0)};q.eb=function(){return Math.max(0,this.Bb()-(this.T()||this.Gb()?this.m:0))};q.Of=function(){return null==this.i||null!=this.h&&this.u?!1:!0};q.Ef=function(a){this.G=a};L("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Ef;Q.prototype.usingPresentationStartTime=Q.prototype.Of;
324
+ Q.prototype.getSeekRangeEnd=Q.prototype.eb;Q.prototype.getSeekRangeStart=Q.prototype.Yb;Q.prototype.getSafeSeekRangeStart=Q.prototype.Kc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Bb;Q.prototype.setUserSeekStart=Q.prototype.Jf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.fb;Q.prototype.isInProgress=Q.prototype.Gb;Q.prototype.isLive=Q.prototype.T;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.ve;Q.prototype.notifyMinSegmentStartTime=Q.prototype.Gd;
325
+ Q.prototype.lockStartTime=Q.prototype.Dd;Q.prototype.notifySegments=Q.prototype.Qc;Q.prototype.notifyTimeRange=Q.prototype.yf;Q.prototype.getDelay=Q.prototype.kg;Q.prototype.setDelay=Q.prototype.Gf;Q.prototype.setSegmentAvailabilityDuration=Q.prototype.Nd;Q.prototype.setStatic=Q.prototype.fc;Q.prototype.setClockOffset=Q.prototype.Ff;Q.prototype.getPresentationStartTime=Q.prototype.xg;Q.prototype.setDuration=Q.prototype.Aa;Q.prototype.setPresentationStartTime=Q.prototype.Hf;
326
+ Q.prototype.getMaxSegmentDuration=Q.prototype.sg;Q.prototype.getDuration=Q.prototype.getDuration;function Mi(a,b,c){this.l=c;this.j=a;this.s=Ni(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Mi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Oi(a,b){a.i=b}function Pi(a){this.g=a}function Ni(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(yh(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 Qi(a,b,c,d,e){var f=this;this.u=e;this.g=a;this.A=b;this.s=c;this.l=new kf;this.j=!1;this.F=a.readyState;this.C=this.i=0;this.h=d;this.o=!1;this.l.D(a,"waiting",function(){return Ri(f)});this.m=(new cd(function(){Ri(f)})).Ca(this.s.gapJumpTimerTime)}Qi.prototype.release=function(){this.l&&(this.l.release(),this.l=null);null!=this.m&&(this.m.stop(),this.m=null);this.h&&(this.h.release(),this.h=null);this.g=this.A=this.u=null};Qi.prototype.ye=function(){this.o=!0;Ri(this)};
327
+ function Ri(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.j)return}else a.j=!1;if(!a.g.paused||a.g.currentTime==a.i&&(a.g.autoplay||a.g.currentTime!=a.i)){a.g.readyState!=a.F&&(a.F=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Ni(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 O("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=zh(c,b,a.s.gapDetectionThreshold),null==
328
+ d||0==d&&!a.o||(e=c.start(d),e>=a.A.eb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.i&&(a.i=e),a.C++,a.u(new O("gapjumped")))))}}};function Si(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ti.value().get(b),c.la(a,b,d))}var Ti=new rf(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ui(a,b,c,d){var e=this;this.g=a;this.m=b;this.s=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.o=!1;this.h=new kf;this.i=new Vi(a);Si(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Wi(e,e.j())})}Ui.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Xi(a){return a.o?a.g.currentTime:a.j()}
329
+ function Yi(a,b){0<a.g.readyState?Zi(a.i,b):Si(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Wi(a,a.j())})}function Wi(a,b){.001>Math.abs(a.g.currentTime-b)?$i(a):(a.h.la(a.g,"seeking",function(){$i(a)}),Zi(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function $i(a){a.o=!0;a.h.D(a.g,"seeking",function(){return a.m()});a.s(a.g.currentTime)}
330
+ function Vi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new cd(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Vi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};function Zi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function aj(a){this.g=a;this.j=!1;this.h=null;this.i=new kf}q=aj.prototype;q.Yd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.la(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;Si(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.Zd=function(a){this.h=this.j?this.h:a};q.gd=function(){return(this.j?this.g.currentTime:this.h)||0};q.Xe=function(){return 0};
331
+ q.We=function(){return 0};q.xf=function(){};
332
+ function bj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=cj(a,c,f);this.j=new Qi(a,b.presentationTimeline,c,this.o,f);this.h=new Ui(a,function(){a:{var h=g.j;h.j=!0;h.o=!1;var k=Xi(g.h);h=dj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;Yi(g.h,h);h=void 0;break a}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.j&&(k.j=!0,k.i=h)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?
333
+ g.g.Yb():g.g.eb():0>h&&(h=g.g.eb()+h);return ej(g,fj(g,h))});this.m=new cd(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Xi(g.h),k=g.g.Yb(),l=g.g.eb();3>l-k&&(k=l-3);h<k&&(h=dj(g,h),g.i.currentTime=h)}})}q=bj.prototype;q.Yd=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.Zd=function(a){Yi(this.h,a)};
334
+ q.gd=function(){var a=Xi(this.h);return 0<this.i.readyState&&!this.i.paused?fj(this,a):a};q.Xe=function(){return this.o?this.o.o:0};q.We=function(){return this.j.C};q.xf=function(){this.j.ye()};function ej(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
335
+ function dj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Yb(),f=a.g.eb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Kc(c),k=a.g.Kc(d);c=a.g.Kc(c+d);return b>=g?ej(a,b):b>f?f:b<e?wh(a.i.buffered,k)?k:c:b>=h||wh(a.i.buffered,b)?b:c}function fj(a,b){var c=a.g.Yb();if(b<c)return c;a=a.g.eb();return b>a?a:b}
336
+ function cj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Mi(new Pi(a),b.stallThreshold,c);Oi(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function gj(a){this.g=a;this.l=null;this.i=0;this.m=!1}q=gj.prototype;q.Jc=function(){return this.g.length};q.release=function(){this.m||(this.g=[],this.l&&this.l.stop(),this.l=null)};q.Pg=function(){this.m=!0};function hj(a,b){a=t(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
337
+ q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.m)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.Fd=function(a){if(!this.m&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,v(a))}};
338
+ q.Pc=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.Fd(a);this.Ta(b)};q.Ta=function(a){if(!this.m){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
339
+ q.Vb=function(a,b,c){c=void 0===c?!1:c;if(!this.m){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new P(a.startTime,b,a.F,a.Ba,a.ka,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.C,a.g,a.status,a.u),this.g[this.g.length-1].j=a.j)}};
340
+ q.Pd=function(a,b){var c=this;this.m||(this.l&&this.l.stop(),this.l=new cd(function(){var d=b();d?c.g.push.apply(c.g,v(d)):(c.l.stop(),c.l=null)}),this.l.Ca(a))};gj.prototype[Symbol.iterator]=function(){return this.zb(0)};
341
+ gj.prototype.zb=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.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){for(;e&&!f.s;)e--,f=c.i[e];if(!f.s)return Wa("No independent partial segment found!"),null;b++;d=e-1;break}}return new ij(this,b,d)};function jj(a,b,c){return new gj([new P(a,a+b,function(){return c},0,null,null,a,a,a+b)])}L("shaka.media.SegmentIndex",gj);gj.forSingleSegment=jj;
342
+ gj.prototype.getIteratorForTime=gj.prototype.zb;gj.prototype.updateEvery=gj.prototype.Pd;gj.prototype.fit=gj.prototype.Vb;gj.prototype.evict=gj.prototype.Ta;gj.prototype.mergeAndEvict=gj.prototype.Pc;gj.prototype.offset=gj.prototype.offset;gj.prototype.get=gj.prototype.get;gj.prototype.find=gj.prototype.find;gj.prototype.markImmutable=gj.prototype.Pg;gj.prototype.release=gj.prototype.release;function ij(a,b,c){this.i=a;this.g=b;this.h=c}ij.prototype.cg=function(){return this.g};
343
+ ij.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.wa().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};ij.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.wa().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};L("shaka.media.SegmentIterator",ij);ij.prototype.next=ij.prototype.next;ij.prototype.current=ij.prototype.current;
344
+ ij.prototype.currentPosition=ij.prototype.cg;function kj(){gj.call(this,[]);this.h=[]}qa(kj,gj);q=kj.prototype;q.clone=function(){var a=new kj;a.h=this.h.slice();return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};q.find=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};
345
+ q.get=function(a){for(var b=0,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.Fd=function(){};q.Ta=function(){};q.Pc=function(){};q.Vb=function(){};q.Pd=function(){};L("shaka.media.MetaSegmentIndex",kj);kj.prototype.updateEvery=kj.prototype.Pd;kj.prototype.fit=kj.prototype.Vb;kj.prototype.mergeAndEvict=kj.prototype.Pc;kj.prototype.evict=kj.prototype.Ta;kj.prototype.merge=kj.prototype.Fd;
346
+ kj.prototype.offset=kj.prototype.offset;kj.prototype.get=kj.prototype.get;kj.prototype.find=kj.prototype.find;kj.prototype.release=kj.prototype.release;function lj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.td();this.h=new cd(function(){b.g.wf(.25*b.i)})}lj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};lj.prototype.set=function(a){this.i=a;mj(this)};lj.prototype.pd=function(){return this.g.pd()};function mj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.td()!=b&&a.g.Oe(b);return}catch(c){}a.h.Ca(.25);0!=a.g.td()&&a.g.Oe(0)};function nj(a){var b=this;this.h=a;this.g=new Set;this.i=(new cd(function(){oj(b,!1)})).Ca(.25)}nj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function oj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function pj(a){Se.call(this);this.g=new Map;this.h=a}qa(pj,Se);pj.prototype.release=function(){this.g.clear();Se.prototype.release.call(this)};function qj(a,b){var c=a.g.get(b);c||(c={Sc:[],df:null,contentType:b},a.g.set(b,c));return c}function rj(a,b,c){var d=qj(a,b.contentType);sj(a,d);a={re:b,position:c};d=d.Sc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
347
+ pj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.Sc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.re;break a}}d=null}if(e=d)e=c.df,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);
348
+ 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.df=d,JSON.stringify(d),c=new O("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function sj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.Sc;b.Sc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.Sc=[]};function tj(a){Se.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new cd(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new O("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}qa(tj,Se);tj.prototype.release=function(){this.g.clear();this.h.stop();Se.prototype.release.call(this)};function uj(a,b){Se.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{Ob:null,Nb:vj,Fb:function(d,e){return wj(c,"enter",d,e)}},{Ob:xj,Nb:vj,Fb:function(d,e){return wj(c,"enter",d,e)}},{Ob:yj,Nb:vj,Fb:function(d,e){return wj(c,"enter",d,e)}},{Ob:vj,Nb:xj,Fb:function(d,e){return wj(c,"exit",d,e)}},{Ob:vj,Nb:yj,Fb:function(d,e){return wj(c,"exit",d,e)}},{Ob:xj,Nb:yj,Fb:function(d,e){return wj(c,"skip",d,e)}},{Ob:yj,Nb:xj,Fb:function(d,e){return wj(c,"skip",d,e)}}];this.h=new kf;this.h.D(this.i,
349
+ "regionremove",function(d){c.g.delete(d.region)})}qa(uj,Se);uj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Se.prototype.release.call(this)};uj.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?xj:a>d.endTime?yj:vj;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.Ob==e&&h.Nb==f&&h.Fb(d,b)}}};
350
+ function wj(a,b,c,d){b=new O(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var xj=1,vj=2,yj=3;function zj(a,b,c){this.j=a;this.h=b;this.i=0;this.l=c;this.g=new Map}function Aj(a,b){if(a.h.segmentIndex){var c=a.h.segmentIndex.zb(Math.max(b.startTime,a.i));if(c)for(;a.g.size<a.j&&null!=b;){var d=!0;b.m&&null!=b.ka&&(d=!1);2==b.Cb()&&(d=!1);d&&!a.g.has(b)&&(d=new Bj(a.l),Cj(d,b,a.h),a.g.set(b,d));a.i=b.startTime;b=c.next().value}}}function Dj(a){if(0!==a.g.size){for(var b=t(a.g.keys()),c=b.next();!c.done;c=b.next())(c=c.value)&&Ej(a,c);a.i=0}}function Fj(a,b){b&&b!==a.h&&(Dj(a),a.h=b)}
351
+ function Ej(a,b){var c=a.g.get(b);a.g.delete(b);c&&c.abort()}function Bj(a){this.i=a;this.g=this.h=null}function Cj(a,b,c){a.g=a.i(b,c,function(d){return H(function(e){return a.h?C(e,a.h(d),0):e.B(0)})})}Bj.prototype.abort=function(){this.g&&this.g.abort()};function Gj(a,b,c,d,e){a=af(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Hj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.j=null;this.F=0;this.C=!1;this.h=new Map;this.A=!1;this.G=null;this.s=!1;this.l=new hf(function(){return Ij(c)})}q=Hj.prototype;q.destroy=function(){return this.l.destroy()};function Ij(a){var b,c,d,e;return H(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,Jj(e),b.push(Kj(e));return C(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;D(f)})}
352
+ q.configure=function(a){this.i=a;this.G=new Fe({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);for(var b=t(this.h.keys()),c=b.next();!c.done;c=b.next())if(c=this.h.get(c.value),c.za){var d=c.za,e=a.segmentPrefetchLimit;d.j=e;for(var f=Array.from(d.g.keys());f.length>e;){var g=f.pop();g&&Ej(d,g)}0<a.segmentPrefetchLimit||
353
+ (c.za=null)}else 0<a.segmentPrefetchLimit&&(c.za=Lj(this,c.stream))};q.start=function(){var a=this;return H(function(b){if(1==b.g)return C(b,Mj(a),2);jf(a.l);a.A=!0;D(b)})};
354
+ function Nj(a,b){var c,d,e,f,g,h,k;H(function(l){switch(l.g){case 1:return c=zc,a.F++,d=a.F,ua(l,2),C(l,Ci(a.g.R,c.da),4);case 4:xa(l,3);break;case 2:if(e=za(l),a.g)a.g.onError(e);case 3:f=Bc(b.mimeType,b.codecs),mi(a.g.R,f,a.m.sequenceMode,b.external),g=a.g.R.u,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.F==d&&(k=Oj(a,b),a.h.set(c.da,k),Pj(a,k,0)),D(l)}})}function Qj(a){var b=a.h.get(yc);b&&(Jj(b),Kj(b).catch(function(){}),a.h.delete(yc));a.o=null}
355
+ function Rj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.Lb&&(Sj(a,b,!1,0,!1),c.Lb=d);else if(d=c.Lb)c.Lb=null,Sj(a,d,!0,0,!1)}}function Tj(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.j=b;a.A&&(b.video&&Sj(a,b.video,c,d,e,f),b.audio&&Sj(a,b.audio,c,d,e,f))}function Uj(a,b){H(function(c){if(1==c.g)return a.o=b,a.A?b.segmentIndex?c.B(2):C(c,b.createSegmentIndex(),2):c.return();Sj(a,b,!0,0,!1);D(c)})}
356
+ function Sj(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=yc?g&&(g.Lb&&(b.trickModeVideo?(g.Lb=b,b=b.trickModeVideo):g.Lb=null),g.stream!=b||e)&&(g.za&&Fj(g.za,b),b.type==yc&&(e=Bc(b.mimeType,b.codecs),mi(a.g.R,e,a.m.sequenceMode,b.external)),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.Ye=!!f,c&&(g.Bc?g.Qd=!0:g.ua?(g.vb=!0,g.md=d,g.Qd=!0):(Jj(g),Vj(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),Wj(a,g).catch(function(h){if(a.g)a.g.onError(h)})):Nj(a,b)}
357
+ function Wj(a,b){var c,d;return H(function(e){if(1==e.g){if(!b.ya)return e.return();c=b.stream;d=b.ya;return c.segmentIndex?e.B(2):C(e,c.createSegmentIndex(),2)}if(b.ya!=d||b.stream!=c)return e.return();var f=a.g.sd();var g=si(a.g.R,b.type),h=b.stream.segmentIndex.find(b.sa?b.sa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ka?k.ka-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ka?k.ka-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
357
358
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.ya.h.g>h?!0:!1):f=!1;f&&b.ya.abort();D(e)})}
358
- q.Vc=function(){if(this.g)for(var a=this.g.sd(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=null;c.ba&&(e=c.ba.current());if(!e||e.startTime>a||e.endTime<a)c.ba=null;e=this.g.R;e.o?e=!1:d==zc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=si(e,d),e=xh(e,a));e||((null!=ti(this.g.R,d)||c.ua)&&Yj(this,c),c.ya&&(c.ya.abort(),c.ya=null),d===zc&&(d=this.g.R,d.F&&d.F.i()),c.Vc=!0)}};
359
- function Yj(a,b){b.Bc||b.vb||(b.ua?(b.vb=!0,b.md=0):null==ri(a.g.R,b.type)?null==b.Ya&&Qj(a,b,0):(Kj(b),Wj(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
360
- function Nj(a){var b,c,d,e,f,g,h,k,l;return I(function(m){if(1==m.g){b=Ac;if(!a.j)throw new N(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.qb,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.va,a.j.video),d.add(a.j.video));a.o&&(c.set(b.da,a.o),d.add(a.o));e=a.g.R;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}kf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.h.has(h)||(l=Pj(a,k),a.h.set(h,l),Qj(a,l,
361
- 0));D(m)})}function Pj(a,b){return{stream:b,type:b.type,ba:null,za:Mj(a,b),sa:null,$b:null,me:null,ke:null,je:null,Kb:null,endOfStream:!1,ua:!1,Ya:null,vb:!1,md:0,Pd:!1,Bc:!1,Vc:!0,te:!1,De:!1,Nc:!1,ya:null}}function Mj(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new Aj(a.i.segmentPrefetchLimit,b,function(c,d,e){return Zj(a,c,d,e)}):null}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Aa(a):this.g.R.Aa(Math.pow(2,32))};
362
- function ak(a,b){var c,d,e,f,g;return I(function(h){switch(h.g){case 1:kf(a.l);if(b.ua||null==b.Ya||b.Bc)return h.return();b.Ya=null;if(!b.vb){h.B(2);break}return C(h,Wj(a,b,b.Pd,b.md),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ua||b.Ya||Qj(a,b,0),h.return();case 4:wa(h,6);d=bk(a,b);null!=d&&(Qj(a,b,d),b.Nc=!1);Aa(h,7);break;case 6:return e=
363
- Ba(h),C(h,ck(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.R.endOfStream(),10);case 10:kf(a.l),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Aa(g),D(h)}})}
364
- function bk(a,b){if(dk(b))return Bi(a.g.R,b.stream.originalId||""),null;b.type==zc&&Ci(a.g.R);var c=a.g.sd(),d=b.sa?b.sa.endTime:c,e=ui(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=ti(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(zc))&&dk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=ek(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
365
- f=Infinity;g=Array.from(a.h.values());g=t(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.sa?h.sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.za&&b.ba&&Bj(b.za,e);fk(a,b,c,e).catch(function(){});return null}
366
- function ek(a,b,c,d){if(b.ba)return b.ba.current();if(b.sa||d)return c=b.sa?b.sa.endTime:d,b.te=!0,b.ba=b.stream.segmentIndex.yb(c),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.yb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.yb(c),e=b.ba&&b.ba.next().value);return e}
367
- function fk(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,y,x,A;return I(function(z){switch(z.g){case 1:e=Ac;f=b.stream;g=b.ba;b.ua=!0;wa(z,2);if(2==d.Bb())throw new N(1,1,1011);return C(z,gk(a,b,d),4);case 4:kf(a.l);if(a.s)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.o))return n=new Uint8Array(0),r=p=!1,u=function(B){var E,F,G;return I(function(H){if(p)return H.return();r=!0;kf(a.l);if(a.s)return H.return();n=
368
- hk(n,B);E=!1;F=0;(new Gf).box("mdat",function(J){F=J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return H.B(0);G=n.subarray(0,F);n=n.subarray(F);return C(H,ik(a,b,c,f,d,G),0)})},C(z,jk(a,b,d,u),11);l=jk(a,b,d);return C(z,l,7);case 7:m=z.h;kf(a.l);if(a.s)return z.return();if(!d.u){z.B(8);break}return C(z,kk(m,d,g),9);case 9:m=z.h;case 8:return kf(a.l),b.vb?(b.ua=!1,Qj(a,b,0),z.return()):C(z,ik(a,b,c,f,d,m),6);case 11:w=z.h;if(r){z.B(6);break}p=!0;kf(a.l);return a.s?z.return():b.vb?(b.ua=!1,Qj(a,b,0),
369
- z.return()):C(z,ik(a,b,c,f,d,w),6);case 6:kf(a.l);if(a.s)return z.return();b.sa=d;g.next();b.ua=!1;b.De=!1;y=a.g.R.cb();x=y[b.type];eb(JSON.stringify(x));b.vb||a.g.xe(d.startTime,d.endTime,b.type);Qj(a,b,0);Aa(z,0);break;case 2:A=Ba(z);kf(a.l,A);if(a.s)return z.return();b.ua=!1;if(7001==A.code)b.ua=!1,Kj(b),Qj(a,b,0),z.B(0);else if(b.type==e.da&&a.i.ignoreTextStreamFailures)a.h.delete(e.da),z.B(0);else if(3017==A.code)lk(a,b,A),z.B(0);else return b.Nc=!0,A.severity=2,C(z,ck(a,b,A),0)}})}
370
- function kk(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return d=b.u,d.cryptoKey?h.B(2):C(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=M(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}
371
- function lk(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.De})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Nc=!0;a.s=!0;a.g.onError(c);return}b.De=!0}Qj(a,b,4)}
372
- function gk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w;return I(function(y){d=Ac;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Ic(b.stream.codecs)[0];k=b.stream.mimeType.split(";")[0];l=c.timestampOffset;if(l!=b.me||f!=b.ke||g!=b.je||h!=b.Bd||k!=b.le){if(b.Bd&&h!=b.Bd||b.le&&k!=b.le)if(b.type===d.va){if(m=a.h.get(d.qb))m.$b=null,Lj(m)}else b.type===d.qb&&(n=a.h.get(d.va))&&(n.$b=null,Lj(n));p=function(){var x,A,z;return I(function(B){if(1==B.g)return x=new Map,a.j.audio&&x.set(d.qb,
373
- a.j.audio),a.j.video&&x.set(d.va,a.j.video),wa(B,2),b.ke=f,b.je=g,b.Bd=h,b.le=k,b.me=l,A=a.m.sequenceMode||"HLS"==a.m.type,C(B,Ei(a.g.R,b.type,l,f,g,A,b.stream,x),4);if(2!=B.g)return Aa(B,0);z=Ba(B);b.ke=null;b.je=null;b.Bd=null;b.me=null;throw z;})};e.push(p())}!th(c.h,b.$b)&&(b.$b=c.h)&&(r=jk(a,b,c.h,void 0,!0),u=function(){var x,A,z,B,E,F;return I(function(G){switch(G.g){case 1:return wa(G,2),C(G,r,4);case 4:return x=G.h,kf(a.l),A=null,z=new Map,B=new Gf,B.box("moov",Lf).box("trak",Lf).box("mdia",
374
- Lf).O("mdhd",function(H){A=Kh(H.reader,H.version).timescale}).box("hdlr",function(H){H=H.reader;H.skip(8);H=H.kb(4);var J=String.fromCharCode(H[0]);J+=String.fromCharCode(H[1]);J+=String.fromCharCode(H[2]);J+=String.fromCharCode(H[3]);switch(J){case "soun":z.set(d.qb,A);break;case "vide":z.set(d.va,A)}A=null}).parse(x),z.has(b.type)?c.h.timescale=z.get(b.type):null!=A&&(c.h.timescale=A),E=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(G,a.g.Ye(b.type,x),5);case 5:return C(G,wi(a.g.R,b.type,
375
- x,null,b.stream,E),6);case 6:Aa(G,0);break;case 2:throw F=Ba(G),b.$b=null,F;}})},a.g.Sg(c.startTime,c.h),e.push(u()));w=b.sa?b.sa.j:null;if(a.m.sequenceMode){if(c.j!=w||b.te)b.te=!1,e.push(Gi(a.g.R,b.type,c.startTime))}else a.m.ignoreManifestTimestampsInSegmentsMode&&c.j!=w&&e.push(Gi(a.g.R,b.type,c.timestampOffset));return C(y,Promise.all(e),0)})}
376
- function ik(a,b,c,d,e,f){var g,h,k,l,m,n;return I(function(p){switch(p.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.C;if(k||l)h=new Gf;k&&h.O("emsg",function(r){var u=d.emsgSchemeIdUris;if(0===r.version){var w=r.reader.Tc();var y=r.reader.Tc();var x=r.reader.K();var A=r.reader.K();var z=r.reader.K();var B=r.reader.K();var E=e.startTime+A/x}else x=r.reader.K(),E=r.reader.dc()/x+e.timestampOffset,
377
- A=E-e.startTime,z=r.reader.K(),B=r.reader.K(),w=r.reader.Tc(),y=r.reader.Tc();r=r.reader.kb(r.reader.getLength()-r.reader.ha());if(u&&u.includes(w)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Tg():(u=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:w,value:y,timescale:x,presentationTimeDelta:A,eventDuration:z,id:B,messageData:r}),u=new P("emsg",u),u.cancelable=!0,a.g.onEvent(u),u.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
378
- w||(w=Gh(r),w.length&&e&&a.g.Ug([{cueTime:e.startTime,data:r,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});l&&h.O("prft",function(r){if(!a.C&&e.h.timescale){var u=r.reader,w=r.version;u.K();r=u.K();var y=u.K();r=1E3*r+y/Math.pow(2,32)*1E3;0===w?u=u.K():(w=u.K(),u=u.K(),u=w*Math.pow(2,32)+u);r=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+r)).getTime();u=(new Map).set("detail",{wallClockTime:r,programStartDate:new Date(r-u/e.h.timescale*1E3)});u=new P("prft",u);a.g.onEvent(u);
379
- a.C=!0}});(k||l)&&h.parse(f);return C(p,mk(a,b,c),2);case 2:return kf(a.l),m=b.Vc,b.Vc=!1,n=b.Xe,b.Xe=!1,C(p,a.g.Ye(b.type,f),3);case 3:return C(p,wi(a.g.R,b.type,f,e,d,g,m,n),4);case 4:kf(a.l),D(p)}})}function mk(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=ri(a.g.R,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():C(h,a.g.R.remove(b.type,e,e+g),2)}kf(a.l);D(h)})}
380
- function dk(a){return a&&a.type==zc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function jk(a,b,c,d,e){var f,g,h;return I(function(k){if(1==k.g){if(c instanceof sh&&(f=c.g))return k.return(f);g=null;if(b.za&&c instanceof Q){var l=b.za;if(l.g.has(c)){var m=l.g.get(c);d&&(m.h=d);l.g.delete(c);g=m.g}else g=null}g||(g=Zj(a,c,b.stream,d,e));b.ya=g;return C(k,g.promise,2)}h=k.h;b.ya=null;return k.return(h.data)})}
381
- function Zj(a,b,c,d,e){e=e?0:1;var f=b instanceof Q?b:void 0;b=Hj(b.wa(),b.Ba,b.ka,a.i.retryParameters,d);return a.g.Hb.request(hf,b,{type:e,stream:c,segment:f})}
382
- function Wj(a,b,c,d){var e,f;return I(function(g){if(1==g.g)return b.vb=!1,b.Pd=!1,b.md=0,b.Bc=!0,b.sa=null,b.$b=null,b.ba=null,b.za&&Ej(b.za),d?(e=a.g.sd(),f=a.g.R.getDuration(),C(g,a.g.R.remove(b.type,e+d,f),3)):C(g,Di(a.g.R,b.type),4);if(3!=g.g)return kf(a.l),c?C(g,a.g.R.flush(b.type),3):g.B(3);kf(a.l);b.Bc=!1;b.endOfStream=!1;b.ua||b.Ya||Qj(a,b,0);D(g)})}
383
- function Qj(a,b,c){var d=b.type;if(d!=zc||a.h.has(d))b.Ya=(new cd(function(){var e;return I(function(f){if(1==f.g)return wa(f,2),C(f,ak(a,b),4);if(2!=f.g)return Aa(f,0);e=Ba(f);if(a.g)a.g.onError(e);D(f)})})).S(c)}function Kj(a){null!=a.Ya&&(a.Ya.stop(),a.Ya=null)}function Lj(a){return I(function(b){return a.ya?C(b,a.ya.abort(),0):b.B(0)})}
384
- function ck(a,b,c){var d;return I(function(e){if(1==e.g)return C(e,Ie(a.G),2);kf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.$d(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);D(e)})};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 jf(function(){return qk(d)})}nk.prototype.destroy=function(){return this.s.destroy()};function qk(a){var b,c,d;return I(function(e){if(1==e.g)return a.h&&a.h.abort(),rk(a),C(e,a.u,2);a.g&&a.g.Wa.Jb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Wa.Jb();a.g=null;a.m=[];a.j=null;D(e)})}
385
- function sk(a,b){var c={bc:function(){},Hd:function(){},Jb:function(){},onError:function(){},Jd:function(){},fi:function(){}};a.m.push({create:b,Wa:c});a.h&&a.h.abort();rk(a);return c}
386
- function pk(a){return I(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.Db)var c=!1;else{a.g&&(a.g.Wa.Jb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Wa.bc(),a.g={node:d.node,U:d.U,Db:d.Db,Wa:c.Wa}):c.Wa.Jd();c=!0}c?c=Promise.resolve():a.g?c=tk(a):(a.j.Rg(a.i),a.o=new Je,c=a.o);b=C(b,c,1)}return b})}
387
- function tk(a){var b,c;return I(function(d){switch(d.g){case 1:return a.i=a.j.ug(a.i,a.l,a.g.node,a.g.U),wa(d,2),a.h=a.j.fg(a.i,a.l,a.g.U),C(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Wa.Hd(),a.g=null);Aa(d,0);break;case 2:b=Ba(d);if(7001==b.code)a.g.Wa.Jb();else a.g.Wa.onError(b);a.g=null;a.h=null;c=a;return C(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,D(d)}})}function rk(a){a.o&&(a.o.resolve(),a.o=null)};function uk(a){if(a.F)return"\n";if(a.g.length)return a.g.map(uk).join("");var b=[],c=700<=a.u,d="italic"==a.o,e=a.h.includes("underline");c&&b.push(["b"]);d&&b.push(["i"]);e&&b.push(["u"]);c="";(d=vk(a.j))&&(c+="."+d);(d=vk(a.backgroundColor))&&(c+=".bg_"+d);c&&b.push(["c",c]);return b.reduceRight(function(f,g){var h=t(g);g=h.next().value;h=h.next().value;return"<"+g+(void 0===h?"":h)+">"+f+"</"+g+">"},a.U)}
388
- function vk(a){switch(a.toLowerCase()){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}
389
- function wk(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.Y)wk(c.g,b);else{var d=c.clone();d.g=[];d.U=uk(c);b.push(d)}return b};function xk(a){this.g=null;for(var b=t(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"),console.log(this.g));this.g.mode="hidden"}q=xk.prototype;q.remove=function(a,b){if(!this.g)return!1;yk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
390
- q.append=function(a){var b=wk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={Ob:d.Ob},e=b.next())d.Ob=e.value,a.some(function(f){return function(g){return g.startTime==f.Ob.startTime&&g.endTime==f.Ob.endTime&&g.text==f.Ob.U?!0:!1}}(d))||(e=zk(d.Ob))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
391
- c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(yk(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"};
392
- function zk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.U);b.lineAlign=a.s;b.positionAlign=a.G;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.H&&(b.snapToLines=!1);null!=a.m&&(b.line=a.m);null!=a.position&&(b.position=a.position);return b}
393
- function yk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}L("shaka.text.SimpleTextDisplayer",xk);xk.prototype.setTextVisibility=xk.prototype.setTextVisibility;xk.prototype.isTextVisible=xk.prototype.isTextVisible;xk.prototype.destroy=xk.prototype.destroy;xk.prototype.append=xk.prototype.append;xk.prototype.remove=xk.prototype.remove;function Ak(){}function Bk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}L("shaka.util.Dom",Ak);Ak.removeAllChildren=Bk;function Ck(a,b){var c=this;this.j=!1;this.i=[];this.A=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 dd(function(){Dk(c)})).Ca(.25);this.h=new Map;this.s=new lf;this.s.D(document,"fullscreenchange",function(){Dk(c,!0)});this.l=null;"ResizeObserver"in
394
- window&&(this.l=new ResizeObserver(function(){Dk(c,!0)}),this.l.observe(this.g));this.o=new Map}q=Ck.prototype;q.append=function(a){var b=[].concat(v(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={ad:c.ad},d=a.next())c.ad=d.value,b.some(function(e){return function(f){return Jb(f,e.ad)}}(c))||this.i.push(c.ad);Dk(this)};
395
- 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});Dk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
396
- function Ek(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
397
- function Fk(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Pf:null;l&&(g.push(l.Zd),l.Uc&&g.push(l.Uc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Ek(a,n)||(f=!0):(Gk(a,k,e),l=a.h.get(k),n=l.Pf,f=!0));0<k.g.length&&n&&Fk(a,k.g,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=r.startTime?
398
- p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Uc?(c.appendChild(d.Uc),d.Uc.appendChild(d.Zd)):c.appendChild(d.Zd)}}function Dk(a,b){if(a.g){var c=a.A.currentTime;if(!a.j||(void 0===b?0:b)){b=t(a.o.values());for(var d=b.next();!d.done;d=b.next())Bk(d.value);Bk(a.g);a.h.clear();a.o.clear()}if(a.j){b=new Map;d=t(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));Fk(a,a.i,a.g,c,[])}}}
399
- function Gk(a,b,c){var d=1<c.length,e=d?"span":"div";b.F&&(e="br");d=!d&&0<b.g.length;var f=document.createElement(e);"br"!=e&&Hk(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.i==Qb?"%":"px")+"-"+c.g+"x"+c.h+(c.j==Qb?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.i==Qb?"%":"px",k=c.l==Qb?"%":"px",l=c.j==Qb?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=
400
- c.width+k;g.style.position="absolute";g.style.top=c.h+l;g.style.left=c.g+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.i?"flex-start":"center"==b.i?"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=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Zd:f,Pf:e,Uc:c})}
401
- function Hk(a,b,c,d,e){var f=b.style,g=0==c.g.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.U.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.L;f.webkitTextStrokeWidth=c.ga;f.color=c.j;f.direction=c.direction;f.opacity=c.C;f.paddingLeft=Ik(c.Z,c,a.m);f.paddingRight=Ik(c.Z,c,a.m);f.textShadow=c.I;if(c.N)f.backgroundImage="url('"+c.N+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";
402
- else{if(c.g.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.V&&(l.style.border=c.V);e||((b=Jk(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].Y?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.i?"flex-start":"center"==c.i?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.l;f.fontWeight=c.u.toString();
403
- f.fontStyle=c.o;f.letterSpacing=c.W;f.fontSize=Ik(c.A,c,a.m);null!=c.m&&1==c.H&&(f.position="absolute",c.writingMode==Db?(f.width="100%",c.s==Fb?f.top=c.m+"%":"end"==c.s&&(f.bottom=100-c.m+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.s==Fb?f.left=c.m+"%":"end"==c.s&&(f.right=100-c.m+"%")):(f.height="100%",c.s==Fb?f.right=c.m+"%":"end"==c.s&&(f.left=100-c.m+"%")));f.lineHeight=c.aa;null!=c.position&&(c.writingMode==Db?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.G?f.cssFloat=
404
- "left":"line-right"==c.G&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.h.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Db?f.width=c.size+"%":f.height=c.size+"%")}
405
- function Ik(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.X.rows+"px";case "c":return c.clientHeight*e/b.X.rows+"px";default:return a}}function Jk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}L("shaka.text.UITextDisplayer",Ck);Ck.prototype.setTextVisibility=Ck.prototype.setTextVisibility;Ck.prototype.isTextVisible=Ck.prototype.isTextVisible;
406
- Ck.prototype.remove=Ck.prototype.remove;Ck.prototype.destroy=Ck.prototype.destroy;Ck.prototype.append=Ck.prototype.append;function Kk(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=wk(a,[]);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
407
- break;case "right":g.push("align:right");break;case Bb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.U+"\n\n";return a}L("shaka.text.WebVttGenerator",function(){});function Lk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}Lk.prototype.configure=function(a){this.g=a};function Mk(a,b,c){try{if(!a.g.enabled)return b;var d=Nk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Ok;break a;case "application/x-mpegurl":e=Pk;break a}e=void 0}d.ot=e;d.su=!0;var f=Qk(d);return Rk(b,f)}catch(g){return ab("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
408
- function Nk(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}}function Sk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Nk(a));c.pr=a.h.rd();var e=c.ot===Tk||c.ot===Ok;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Uk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Qk(c);f&&(b.uris=b.uris.map(function(g){return Rk(g,f)}))}}}
409
- function Vk(a){if(0===a.type)return Wk;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?Ok:Tk;if("audio"==b)return Xk;if("text"==b)return"application/mp4"===a.mimeType?Yk:Zk}}function $k(a,b){b=a.h.cb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
410
- function al(a,b){var c=a.h.Cb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Tk:return a.videoBandwidth||NaN;case Xk:return a.audioBandwidth||NaN;default:return a.bandwidth}}
411
- function Qk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
412
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Uk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Qk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
413
- function Rk(a,b){if(!b||a.includes("offline:"))return a;a=new bc(a);a.g.set("CMCD",b);return a.toString()}var Pk="m",Xk="a",Tk="v",Ok="av",Wk="i",Zk="c",Yk="tt";L("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Oh:"s",OTHER:"o"});function bl(){}
414
- 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]=Ue(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ue(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?(Ya("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&$a("Unexpected number of arguments for "+k),a[h]=b[h]):(Ya("Invalid config, unrecognized key "+
415
- 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}L("shaka.util.ConfigUtils",bl);bl.convertToConfigObject=dl;bl.mergeConfigObjects=cl;function fl(){}function gl(a){a=Af(a);return(new bc(a)).Sa}function hl(a,b,c){function d(h){pb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(M(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Cf(b,!0):e=b;a=Af(a);a=Cf(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function il(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Af(a).split("skd://").pop();return hl(a,c,b)}
416
- function jl(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}L("shaka.util.FairPlayUtils",fl);fl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=xf(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=nb(Tf(c)))}};fl.expressplayFairPlayRequest=function(a,b){jl(a,b)};
417
- fl.conaxFairPlayRequest=function(a,b){jl(a,b)};fl.ezdrmFairPlayRequest=function(a,b){jl(a,b)};fl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=M(b.body),a=Sf(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Bf("spc="+a))};fl.expressplayInitDataTransform=function(a,b,c){return il(a,b,c)};
418
- fl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Af(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)};fl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Af(a).split(";").pop();return hl(a,c,b)};fl.verimatrixInitDataTransform=function(a,b,c){return il(a,b,c)};fl.initDataTransform=hl;
419
- fl.defaultGetContentId=gl;fl.isFairPlaySupported=function(){var a;return I(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},wa(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);Ba(b);return b.return(!1)})};function kl(){}
420
- function ll(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:He(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],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:id(),minHdcpVersion:""},
421
- c={retryParameters:He(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!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",
422
- "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return el([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",
423
- defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:jd("Tizen 3")||jd("Tizen 2")||ld()||nd()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1},mss:{manifestPreprocessor:function(g){return el([g],g)},sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
424
- d={retryParameters:He(),failureCallback:function(g){return el([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff: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,
425
- maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1};if(jd("Web0S")||kd()||jd("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return I(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return I(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?C(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,
426
- h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:e,abrFactory:function(){return new je},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,
359
+ q.Vc=function(){if(this.g)for(var a=this.g.sd(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);var e=null;c.ba&&(e=c.ba.current());if(!e||e.startTime>a||e.endTime<a)c.ba=null;e=this.g.R;e.o?e=!1:d==yc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=ri(e,d),e=wh(e,a));e||((null!=si(this.g.R,d)||c.ua)&&Xj(this,c),c.ya&&(c.ya.abort(),c.ya=null),d===yc&&(d=this.g.R,d.F&&d.F.i()),c.Vc=!0)}};
360
+ function Xj(a,b){b.Bc||b.vb||(b.ua?(b.vb=!0,b.md=0):null==qi(a.g.R,b.type)?null==b.Ya&&Pj(a,b,0):(Jj(b),Vj(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
361
+ function Mj(a){var b,c,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){b=zc;if(!a.j)throw new N(2,5,5006);c=new Map;d=new Set;a.j.audio&&(c.set(b.qb,a.j.audio),d.add(a.j.audio));a.j.video&&(c.set(b.va,a.j.video),d.add(a.j.video));a.o&&(c.set(b.da,a.o),d.add(a.o));e=a.g.R;return C(m,e.init(c,a.m.sequenceMode,a.m.type,a.m.ignoreManifestTimestampsInSegmentsMode),2)}jf(a.l);a.updateDuration();f=t(c.keys());for(g=f.next();!g.done;g=f.next())h=g.value,k=c.get(h),a.h.has(h)||(l=Oj(a,k),a.h.set(h,l),Pj(a,l,
362
+ 0));D(m)})}function Oj(a,b){return{stream:b,type:b.type,ba:null,za:Lj(a,b),sa:null,$b:null,ne:null,le:null,ke:null,Lb:null,endOfStream:!1,ua:!1,Ya:null,vb:!1,md:0,Qd:!1,Bc:!1,Vc:!0,ue:!1,Ee:!1,Nc:!1,ya:null}}function Lj(a,b){return"video"!==b.type&&"audio"!==b.type?null:0<a.i.segmentPrefetchLimit?new zj(a.i.segmentPrefetchLimit,b,function(c,d,e){return Yj(a,c,d,e)}):null}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Aa(a):this.g.R.Aa(Math.pow(2,32))};
363
+ function Zj(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:jf(a.l);if(b.ua||null==b.Ya||b.Bc)return h.return();b.Ya=null;if(!b.vb){h.B(2);break}return C(h,Vj(a,b,b.Qd,b.md),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return C(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ua||b.Ya||Pj(a,b,0),h.return();case 4:ua(h,6);d=ak(a,b);null!=d&&(Pj(a,b,d),b.Nc=!1);xa(h,7);break;case 6:return e=
364
+ za(h),C(h,bk(a,b,e),8);case 8:return h.return();case 7:f=Array.from(a.h.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return C(h,a.g.R.endOfStream(),10);case 10:jf(a.l),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Aa(g),D(h)}})}
365
+ function ak(a,b){if(ck(b))return Ai(a.g.R,b.stream.originalId||""),null;b.type==yc&&Bi(a.g.R);var c=a.g.sd(),d=b.sa?b.sa.endTime:c,e=ti(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=si(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.h.get(yc))&&ck(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=dk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
366
+ f=Infinity;g=Array.from(a.h.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,ck(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.sa?h.sa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.za&&b.ba&&Aj(b.za,e);ek(a,b,c,e).catch(function(){});return null}
367
+ function dk(a,b,c,d){if(b.ba)return b.ba.current();if(b.sa||d)return c=b.sa?b.sa.endTime:d,b.ue=!0,b.ba=b.stream.segmentIndex.zb(c),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.zb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.zb(c),e=b.ba&&b.ba.next().value);return e}
368
+ function ek(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,w,y,x,A;return H(function(z){switch(z.g){case 1:e=zc;f=b.stream;g=b.ba;b.ua=!0;ua(z,2);if(2==d.Cb())throw new N(1,1,1011);return C(z,fk(a,b,d),4);case 4:jf(a.l);if(a.s)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&("HLS"!=a.m.type||d.o))return n=new Uint8Array(0),r=p=!1,u=function(B){var E,F,G;return H(function(I){if(p)return I.return();r=!0;jf(a.l);if(a.s)return I.return();n=
369
+ gk(n,B);E=!1;F=0;(new Ff).box("mdat",function(J){F=J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return I.B(0);G=n.subarray(0,F);n=n.subarray(F);return C(I,hk(a,b,c,f,d,G),0)})},C(z,ik(a,b,d,u),11);l=ik(a,b,d);return C(z,l,7);case 7:m=z.h;jf(a.l);if(a.s)return z.return();if(!d.u){z.B(8);break}return C(z,jk(m,d,g),9);case 9:m=z.h;case 8:return jf(a.l),b.vb?(b.ua=!1,Pj(a,b,0),z.return()):C(z,hk(a,b,c,f,d,m),6);case 11:w=z.h;if(r){z.B(6);break}p=!0;jf(a.l);return a.s?z.return():b.vb?(b.ua=!1,Pj(a,b,0),
370
+ z.return()):C(z,hk(a,b,c,f,d,w),6);case 6:jf(a.l);if(a.s)return z.return();b.sa=d;g.next();b.ua=!1;b.Ee=!1;y=a.g.R.cb();x=y[b.type];cb(JSON.stringify(x));b.vb||a.g.ye(d.startTime,d.endTime,b.type);Pj(a,b,0);xa(z,0);break;case 2:A=za(z);jf(a.l,A);if(a.s)return z.return();b.ua=!1;if(7001==A.code)b.ua=!1,Jj(b),Pj(a,b,0),z.B(0);else if(b.type==e.da&&a.i.ignoreTextStreamFailures)a.h.delete(e.da),z.B(0);else if(3017==A.code)kk(a,b,A),z.B(0);else return b.Nc=!0,A.severity=2,C(z,bk(a,b,A),0)}})}
371
+ function jk(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g)return d=b.u,d.cryptoKey?h.B(2):C(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=M(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 gk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
372
+ function kk(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Ee})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.Nc=!0;a.s=!0;a.g.onError(c);return}b.Ee=!0}Pj(a,b,4)}
373
+ function fk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w;return H(function(y){d=zc;e=[];f=Math.max(0,c.appendWindowStart-.1);g=c.appendWindowEnd+.01;h=Hc(b.stream.codecs)[0];k=b.stream.mimeType.split(";")[0];l=c.timestampOffset;if(l!=b.ne||f!=b.le||g!=b.ke||h!=b.Cd||k!=b.me){if(b.Cd&&h!=b.Cd||b.me&&k!=b.me)if(b.type===d.va){if(m=a.h.get(d.qb))m.$b=null,Kj(m)}else b.type===d.qb&&(n=a.h.get(d.va))&&(n.$b=null,Kj(n));p=function(){var x,A,z;return H(function(B){if(1==B.g)return x=new Map,a.j.audio&&x.set(d.qb,
374
+ a.j.audio),a.j.video&&x.set(d.va,a.j.video),ua(B,2),b.le=f,b.ke=g,b.Cd=h,b.me=k,b.ne=l,A=a.m.sequenceMode||"HLS"==a.m.type,C(B,Di(a.g.R,b.type,l,f,g,A,b.stream,x),4);if(2!=B.g)return xa(B,0);z=za(B);b.le=null;b.ke=null;b.Cd=null;b.ne=null;throw z;})};e.push(p())}!sh(c.h,b.$b)&&(b.$b=c.h)&&(r=ik(a,b,c.h,void 0,!0),u=function(){var x,A,z,B,E,F;return H(function(G){switch(G.g){case 1:return ua(G,2),C(G,r,4);case 4:return x=G.h,jf(a.l),A=null,z=new Map,B=new Ff,B.box("moov",Kf).box("trak",Kf).box("mdia",
375
+ Kf).O("mdhd",function(I){A=Jh(I.reader,I.version).timescale}).box("hdlr",function(I){I=I.reader;I.skip(8);I=I.kb(4);var J=String.fromCharCode(I[0]);J+=String.fromCharCode(I[1]);J+=String.fromCharCode(I[2]);J+=String.fromCharCode(I[3]);switch(J){case "soun":z.set(d.qb,A);break;case "vide":z.set(d.va,A)}A=null}).parse(x),z.has(b.type)?c.h.timescale=z.get(b.type):null!=A&&(c.h.timescale=A),E=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(G,a.g.Ze(b.type,x),5);case 5:return C(G,vi(a.g.R,b.type,
376
+ x,null,b.stream,E),6);case 6:xa(G,0);break;case 2:throw F=za(G),b.$b=null,F;}})},a.g.Sg(c.startTime,c.h),e.push(u()));w=b.sa?b.sa.j:null;if(a.m.sequenceMode){if(c.j!=w||b.ue)b.ue=!1,e.push(Fi(a.g.R,b.type,c.startTime))}else a.m.ignoreManifestTimestampsInSegmentsMode&&c.j!=w&&e.push(Fi(a.g.R,b.type,c.timestampOffset));return C(y,Promise.all(e),0)})}
377
+ function hk(a,b,c,d,e,f){var g,h,k,l,m,n;return H(function(p){switch(p.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.C;if(k||l)h=new Ff;k&&h.O("emsg",function(r){var u=d.emsgSchemeIdUris;if(0===r.version){var w=r.reader.Tc();var y=r.reader.Tc();var x=r.reader.K();var A=r.reader.K();var z=r.reader.K();var B=r.reader.K();var E=e.startTime+A/x}else x=r.reader.K(),E=r.reader.dc()/x+e.timestampOffset,
378
+ A=E-e.startTime,z=r.reader.K(),B=r.reader.K(),w=r.reader.Tc(),y=r.reader.Tc();r=r.reader.kb(r.reader.getLength()-r.reader.ha());if(u&&u.includes(w)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==w?a.g.Tg():(u=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:w,value:y,timescale:x,presentationTimeDelta:A,eventDuration:z,id:B,messageData:r}),u=new O("emsg",u),u.cancelable=!0,a.g.onEvent(u),u.defaultPrevented||"https://aomedia.org/emsg/ID3"!=w&&"https://developer.apple.com/streaming/emsg-id3"!=
379
+ w||(w=Fh(r),w.length&&e&&a.g.Ug([{cueTime:e.startTime,data:r,frames:w,dts:e.startTime,pts:e.startTime}],0,e.endTime)))});l&&h.O("prft",function(r){if(!a.C&&e.h.timescale){var u=r.reader,w=r.version;u.K();r=u.K();var y=u.K();r=1E3*r+y/Math.pow(2,32)*1E3;0===w?u=u.K():(w=u.K(),u=u.K(),u=w*Math.pow(2,32)+u);r=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+r)).getTime();u=(new Map).set("detail",{wallClockTime:r,programStartDate:new Date(r-u/e.h.timescale*1E3)});u=new O("prft",u);a.g.onEvent(u);
380
+ a.C=!0}});(k||l)&&h.parse(f);return C(p,lk(a,b,c),2);case 2:return jf(a.l),m=b.Vc,b.Vc=!1,n=b.Ye,b.Ye=!1,C(p,a.g.Ze(b.type,f),3);case 3:return C(p,vi(a.g.R,b.type,f,e,d,g,m,n),4);case 4:jf(a.l),D(p)}})}function lk(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=qi(a.g.R,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():C(h,a.g.R.remove(b.type,e,e+g),2)}jf(a.l);D(h)})}
381
+ function ck(a){return a&&a.type==yc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function ik(a,b,c,d,e){var f,g,h;return H(function(k){if(1==k.g){if(c instanceof rh&&(f=c.g))return k.return(f);g=null;if(b.za&&c instanceof P){var l=b.za;if(l.g.has(c)){var m=l.g.get(c);d&&(m.h=d);l.g.delete(c);g=m.g}else g=null}g||(g=Yj(a,c,b.stream,d,e));b.ya=g;return C(k,g.promise,2)}h=k.h;b.ya=null;return k.return(h.data)})}
382
+ function Yj(a,b,c,d,e){e=e?0:1;var f=b instanceof P?b:void 0;b=Gj(b.wa(),b.Ba,b.ka,a.i.retryParameters,d);return a.g.Ib.request(gf,b,{type:e,stream:c,segment:f})}
383
+ function Vj(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.vb=!1,b.Qd=!1,b.md=0,b.Bc=!0,b.sa=null,b.$b=null,b.ba=null,b.za&&Dj(b.za),d?(e=a.g.sd(),f=a.g.R.getDuration(),C(g,a.g.R.remove(b.type,e+d,f),3)):C(g,Ci(a.g.R,b.type),4);if(3!=g.g)return jf(a.l),c?C(g,a.g.R.flush(b.type),3):g.B(3);jf(a.l);b.Bc=!1;b.endOfStream=!1;b.ua||b.Ya||Pj(a,b,0);D(g)})}
384
+ function Pj(a,b,c){var d=b.type;if(d!=yc||a.h.has(d))b.Ya=(new bd(function(){var e;return H(function(f){if(1==f.g)return ua(f,2),C(f,Zj(a,b),4);if(2!=f.g)return xa(f,0);e=za(f);if(a.g)a.g.onError(e);D(f)})})).S(c)}function Jj(a){null!=a.Ya&&(a.Ya.stop(),a.Ya=null)}function Kj(a){return H(function(b){return a.ya?C(b,a.ya.abort(),0):b.B(0)})}
385
+ function bk(a,b,c){var d;return H(function(e){if(1==e.g)return C(e,He(a.G),2);jf(a.l);d=0===a.i.maxDisabledTime&&1011==c.code?1:a.i.maxDisabledTime;1===c.category&&0<d&&(c.handled=a.g.ae(b.stream,d),c.handled&&(c.severity=1));a.g.onError(c);c.handled||a.i.failureCallback(c);D(e)})};function mk(a,b){var c=nk(),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 ok(d)});this.s=new hf(function(){return pk(d)})}mk.prototype.destroy=function(){return this.s.destroy()};function pk(a){var b,c,d;return H(function(e){if(1==e.g)return a.h&&a.h.abort(),qk(a),C(e,a.u,2);a.g&&a.g.Wa.Kb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Wa.Kb();a.g=null;a.m=[];a.j=null;D(e)})}
386
+ function rk(a,b){var c={bc:function(){},Id:function(){},Kb:function(){},onError:function(){},Kd:function(){},fi:function(){}};a.m.push({create:b,Wa:c});a.h&&a.h.abort();qk(a);return c}
387
+ function ok(a){return H(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.Eb)var c=!1;else{a.g&&(a.g.Wa.Kb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Wa.bc(),a.g={node:d.node,U:d.U,Eb:d.Eb,Wa:c.Wa}):c.Wa.Kd();c=!0}c?c=Promise.resolve():a.g?c=sk(a):(a.j.Rg(a.i),a.o=new Ie,c=a.o);b=C(b,c,1)}return b})}
388
+ function sk(a){var b,c;return H(function(d){switch(d.g){case 1:return a.i=a.j.ug(a.i,a.l,a.g.node,a.g.U),ua(d,2),a.h=a.j.fg(a.i,a.l,a.g.U),C(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Wa.Id(),a.g=null);xa(d,0);break;case 2:b=za(d);if(7001==b.code)a.g.Wa.Kb();else a.g.Wa.onError(b);a.g=null;a.h=null;c=a;return C(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,D(d)}})}function qk(a){a.o&&(a.o.resolve(),a.o=null)};function tk(a){if(a.F)return"\n";if(a.g.length)return a.g.map(tk).join("");var b=[],c=700<=a.u,d="italic"==a.o,e=a.h.includes("underline");c&&b.push(["b"]);d&&b.push(["i"]);e&&b.push(["u"]);c="";(d=uk(a.j))&&(c+="."+d);(d=uk(a.backgroundColor))&&(c+=".bg_"+d);c&&b.push(["c",c]);return b.reduceRight(function(f,g){var h=t(g);g=h.next().value;h=h.next().value;return"<"+g+(void 0===h?"":h)+">"+f+"</"+g+">"},a.U)}
389
+ function uk(a){switch(a.toLowerCase()){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}
390
+ function vk(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.Y)vk(c.g,b);else{var d=c.clone();d.g=[];d.U=tk(c);b.push(d)}return b};function wk(a){this.g=null;for(var b=t(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};
391
+ q.append=function(a){var b=vk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=t(b);for(var e=b.next();!e.done;d={Pb:d.Pb},e=b.next())d.Pb=e.value,a.some(function(f){return function(g){return g.startTime==f.Pb.startTime&&g.endTime==f.Pb.endTime&&g.text==f.Pb.U?!0:!1}}(d))||(e=yk(d.Pb))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
392
+ c.indexOf(g)});a=t(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.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"};
393
+ function yk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.U);b.lineAlign=a.s;b.positionAlign=a.G;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.H&&(b.snapToLines=!1);null!=a.m&&(b.line=a.m);null!=a.position&&(b.position=a.position);return b}
394
+ function xk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}L("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)}L("shaka.util.Dom",zk);zk.removeAllChildren=Ak;function Bk(a,b){var c=this;this.j=!1;this.i=[];this.A=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 cd(function(){Ck(c)})).Ca(.25);this.h=new Map;this.s=new kf;this.s.D(document,"fullscreenchange",function(){Ck(c,!0)});this.l=null;"ResizeObserver"in
395
+ 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(v(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={ad:c.ad},d=a.next())c.ad=d.value,b.some(function(e){return function(f){return Ib(f,e.ad)}}(c))||this.i.push(c.ad);Ck(this)};
396
+ 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};
397
+ function Dk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
398
+ function Ek(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Pf:null;l&&(g.push(l.$d),l.Uc&&g.push(l.Uc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Dk(a,n)||(f=!0):(Fk(a,k,e),l=a.h.get(k),n=l.Pf,f=!0));0<k.g.length&&n&&Ek(a,k.g,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=r.startTime?
399
+ p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.Uc?(c.appendChild(d.Uc),d.Uc.appendChild(d.$d)):c.appendChild(d.$d)}}function Ck(a,b){if(a.g){var c=a.A.currentTime;if(!a.j||(void 0===b?0:b)){b=t(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=t(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,[])}}}
400
+ function Fk(a,b,c){var d=1<c.length,e=d?"span":"div";b.F&&(e="br");d=!d&&0<b.g.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.i==Pb?"%":"px")+"-"+c.g+"x"+c.h+(c.j==Pb?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.i==Pb?"%":"px",k=c.l==Pb?"%":"px",l=c.j==Pb?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=
401
+ c.width+k;g.style.position="absolute";g.style.top=c.h+l;g.style.left=c.g+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.i?"flex-start":"center"==b.i?"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=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{$d:f,Pf:e,Uc:c})}
402
+ function Gk(a,b,c,d,e){var f=b.style,g=0==c.g.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.U.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.L;f.webkitTextStrokeWidth=c.ga;f.color=c.j;f.direction=c.direction;f.opacity=c.C;f.paddingLeft=Hk(c.Z,c,a.m);f.paddingRight=Hk(c.Z,c,a.m);f.textShadow=c.I;if(c.N)f.backgroundImage="url('"+c.N+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";
403
+ else{if(c.g.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.V&&(l.style.border=c.V);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].Y?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.i?"flex-start":"center"==c.i?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.l;f.fontWeight=c.u.toString();
404
+ f.fontStyle=c.o;f.letterSpacing=c.W;f.fontSize=Hk(c.A,c,a.m);null!=c.m&&1==c.H&&(f.position="absolute",c.writingMode==Cb?(f.width="100%",c.s==Eb?f.top=c.m+"%":"end"==c.s&&(f.bottom=100-c.m+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.s==Eb?f.left=c.m+"%":"end"==c.s&&(f.right=100-c.m+"%")):(f.height="100%",c.s==Eb?f.right=c.m+"%":"end"==c.s&&(f.left=100-c.m+"%")));f.lineHeight=c.aa;null!=c.position&&(c.writingMode==Cb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.G?f.cssFloat=
405
+ "left":"line-right"==c.G&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.h.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==Cb?f.width=c.size+"%":f.height=c.size+"%")}
406
+ 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.X.rows+"px";case "c":return c.clientHeight*e/b.X.rows+"px";default:return a}}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}L("shaka.text.UITextDisplayer",Bk);Bk.prototype.setTextVisibility=Bk.prototype.setTextVisibility;Bk.prototype.isTextVisible=Bk.prototype.isTextVisible;
407
+ Bk.prototype.remove=Bk.prototype.remove;Bk.prototype.destroy=Bk.prototype.destroy;Bk.prototype.append=Bk.prototype.append;function Jk(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=vk(a,[]);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
408
+ break;case "right":g.push("align:right");break;case Ab:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.U+"\n\n";return a}L("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}Kk.prototype.configure=function(a){this.g=a};function Lk(a,b,c){try{if(!a.g.enabled)return b;var d=Mk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Nk;break a;case "application/x-mpegurl":e=Ok;break a}e=void 0}d.ot=e;d.su=!0;var f=Pk(d);return Qk(b,f)}catch(g){return Za("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
409
+ function Mk(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}}function Rk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Mk(a));c.pr=a.h.rd();var e=c.ot===Sk||c.ot===Nk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Tk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Pk(c);f&&(b.uris=b.uris.map(function(g){return Qk(g,f)}))}}}
410
+ function Uk(a){if(0===a.type)return Vk;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?Nk:Sk;if("audio"==b)return Wk;if("text"==b)return"application/mp4"===a.mimeType?Xk:Yk}}function Zk(a,b){b=a.h.cb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
411
+ function $k(a,b){var c=a.h.Db();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Sk:return a.videoBandwidth||NaN;case Wk:return a.audioBandwidth||NaN;default:return a.bandwidth}}
412
+ function Pk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
413
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Tk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Pk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
414
+ function Qk(a,b){if(!b||a.includes("offline:"))return a;a=new ac(a);a.g.set("CMCD",b);return a.toString()}var Ok="m",Wk="a",Sk="v",Nk="av",Vk="i",Yk="c",Xk="tt";L("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",Oh:"s",OTHER:"o"});function al(){}
415
+ function bl(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]=Te(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Te(l)),k=bl(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?(Wa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Xa("Unexpected number of arguments for "+k),a[h]=b[h]):(Wa("Invalid config, unrecognized key "+
416
+ k),g=!1)}return g}function cl(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 dl(a,b){return a&&b}L("shaka.util.ConfigUtils",al);al.convertToConfigObject=cl;al.mergeConfigObjects=bl;function el(){}function fl(a){a=zf(a);return(new ac(a)).Sa}function gl(a,b,c){function d(h){ob(f).setUint32(g,h.byteLength,!0);g+=4;f.set(M(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Bf(b,!0):e=b;a=zf(a);a=Bf(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function hl(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zf(a).split("skd://").pop();return gl(a,c,b)}
417
+ function il(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")}L("shaka.util.FairPlayUtils",el);el.commonFairPlayResponse=function(a,b){if(2===a){try{var c=wf(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=mb(Sf(c)))}};el.expressplayFairPlayRequest=function(a,b){il(a,b)};
418
+ el.conaxFairPlayRequest=function(a,b){il(a,b)};el.ezdrmFairPlayRequest=function(a,b){il(a,b)};el.verimatrixFairPlayRequest=function(a,b){2===a&&(a=M(b.body),a=Rf(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Af("spc="+a))};el.expressplayInitDataTransform=function(a,b,c){return hl(a,b,c)};
419
+ el.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zf(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 gl(a,d,b)};el.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zf(a).split(";").pop();return gl(a,c,b)};el.verimatrixInitDataTransform=function(a,b,c){return hl(a,b,c)};el.initDataTransform=gl;
420
+ el.defaultGetContentId=fl;el.isFairPlaySupported=function(){var a;return H(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},ua(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);za(b);return b.return(!1)})};function jl(){}
421
+ function kl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ge(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=fl(g),g=gl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:hd(),minHdcpVersion:""},
422
+ c={retryParameters:Ge(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!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",
423
+ "urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return dl([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",
424
+ defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:id("Tizen 3")||id("Tizen 2")||kd()||md()?!1:!0,ignoreManifestTimestampsInSegmentsMode:!1},mss:{manifestPreprocessor:function(g){return dl([g],g)},sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
425
+ d={retryParameters:Ge(),failureCallback:function(g){return dl([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff: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,
426
+ maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1};if(id("Web0S")||jd()||id("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return H(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return H(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?C(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 dl([g,
427
+ h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:e,abrFactory:function(){return new ie},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,
427
428
  minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],
428
- 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,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=function(g){return I(function(h){return h.return(ml(g,
429
- 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 cl(a,b,c||ll(),d,"")}
430
- function ml(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=ad(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Uc(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/
431
- 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=zc&&"image"!=d.type||b.push(d);return b}L("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=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
432
- function rl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function 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.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.M=this.N=this.H=this.I=this.L=this.l=this.o=NaN;this.g=new ol;this.h=new sl};function T(a,b){Te.call(this);var c=this;this.l=vl;this.nd=this.h=null;this.Y=!1;this.yd=new lf;this.xc=new lf;this.o=new lf;this.jc=this.i=this.zd=this.I=this.j=this.ga=this.L=this.Nf=this.V=this.Na=this.M=this.ud=this.H=this.Rb=this.A=this.G=this.m=this.F=null;this.Fc=!1;this.oe=this.s=null;this.Be=1E9;this.g=wl(this);this.Ae={width:Infinity,height:Infinity};this.u=null;this.Za=new xe(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel);
433
- this.Pb=this.g.preferredTextLanguage;this.Ec=this.g.preferredTextRole;this.Ac=this.g.preferForcedSubs;this.zc=[];this.Gc=null;b&&b(this);this.V=xl(this);this.F=yl(this);this.F.Le(this.g.streaming.forceHTTPS);this.C=null;zl&&(this.C=zl());this.yd.D(window,"online",function(){Al(c);c.Ee()});this.N={name:"detach"};this.W={name:"attach"};this.aa={name:"unload"};this.Fe={name:"manifest-parser"};this.ye={name:"manifest"};this.Qb={name:"media-source"};this.se={name:"drm-engine"};this.X={name:"load"};this.Pe=
434
- {name:"src-equals-drm-engine"};this.Sb={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Oe(Bl(c,e,f))});d.set(this.N,function(e){e.mediaElement&&(c.xc.sb(),e.mediaElement=null);c.C&&c.C.release();c.h=null;e=Promise.resolve();return Oe(e)});d.set(this.aa,function(e){return Oe(Cl(c,e))});d.set(this.Qb,function(e){e=Dl(c,e);return Oe(e)});d.set(this.Fe,function(e,f){e=El(c,e,f);return Oe(e)});d.set(this.ye,function(e){return Fl(c,e)});d.set(this.se,function(e){e=Gl(c,e);return Oe(e)});
435
- d.set(this.X,function(e,f){return Oe(Hl(c,e,f))});d.set(this.Pe,function(e,f){e=Il(c,e,f);return Oe(e)});d.set(this.Sb,function(e,f){return Jl(c,e,f)});this.Oa=new nk(this.N,{ug:function(e,f,g,h){var k=null;e==c.N&&(k=g==c.N?c.N:c.W);e==c.W&&(k=g==c.N||f.mediaElement!=h.mediaElement?c.N:g==c.W?c.W:g==c.Qb||g==c.X?c.Qb:g==c.Sb?c.Pe:null);e==c.Qb&&(k=g==c.X&&f.mediaElement==h.mediaElement?c.Fe:c.aa);e==c.Fe&&(k=Kl(c.X,c.ye,c.aa,g,f,h));e==c.ye&&(k=Kl(c.X,c.se,c.aa,g,f,h));e==c.se&&(k=Kl(c.X,c.X,c.aa,
436
- g,f,h));e==c.Pe&&(k=g==c.Sb&&f.mediaElement==h.mediaElement?c.Sb:c.aa);if(e==c.X||e==c.Sb)k=c.aa;e==c.aa&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.W:c.N);return k},fg:function(e,f,g){c.dispatchEvent(Ll("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return I(function(f){return 1==f.g?C(f,Cl(c,e),2):f.return(e.mediaElement?c.W:c.N)})},Rg:function(e){c.dispatchEvent(Ll("onstateidle",(new Map).set("state",e.name)))}});this.wd=new dd(function(){return Ml(c)});
437
- a&&this.yc(a,!0)}ra(T,Te);function Nl(a){null!=a.L&&(a.L.release(),a.L=null)}function Ol(a,b){if(b.lcevc.enabled){var c=a.Cb();c&&c[0]&&c[0].videoMimeType==Pl.ts&&(hd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||$a("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Nl(a);null==a.L&&(a.L=new di(a.h,a.Nf,b.lcevc),a.G&&(a.G.L=a.L))}else Nl(a)}function Ll(a,b){return new P(a,b)}q=T.prototype;
438
- q.destroy=function(){var a=this,b;return I(function(c){switch(c.g){case 1:if(a.l==Ql)return c.return();Nl(a);a.l=Ql;b=sk(a.Oa,function(){return{node:a.N,U:ok(),Db:!1}});return C(c,new Promise(function(d){b.bc=function(){};b.Hd=function(){d()};b.Jb=function(){d()};b.onError=function(){d()};b.Jd=function(){d()}}),2);case 2:return C(c,a.Oa.destroy(),3);case 3:a.yd&&(a.yd.release(),a.yd=null);a.xc&&(a.xc.release(),a.xc=null);a.o&&(a.o.release(),a.o=null);a.oe=null;a.g=null;a.u=null;a.nd=null;a.V=null;
439
- if(!a.F){c.B(4);break}return C(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.s&&(a.s.release(),a.s=null),Te.prototype.release.call(a),D(c)}})};q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==Ql)return Promise.reject(Rl());var c=ok();c.mediaElement=a;ed()||(b=!1);var d=b?this.Qb:this.W;a=sk(this.Oa,function(){return{node:d,U:c,Db:!1}});a.bc=function(){};return Sl(a)};q.Vf=function(a){this.Nf=a};
440
- q.detach=function(){var a=this;if(this.l==Ql)return Promise.reject(Rl());var b=sk(this.Oa,function(){return{node:a.N,U:ok(),Db:!1}});b.bc=function(){};return Sl(b)};q.Se=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Ql)return Promise.reject(Rl());this.Fc=!1;ed()||(a=!1);Nl(this);var c=ok(),d=sk(this.Oa,function(e){var f=e.mediaElement&&a?b.Qb:e.mediaElement?b.W:b.N;c.mediaElement=e.mediaElement;return{node:f,U:c,Db:!1}});d.bc=function(){};return Sl(d)};q.qh=function(a){this.Gc=a};
441
- q.load=function(a,b,c){var d=this;this.Gc=null;this.Fc=!1;if(this.l==Ql)return Promise.reject(Rl());this.dispatchEvent(Ll("loading"));var e=ok();e.uri=a;e.Nd=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Tl(this,e)?this.Sb:this.X,g=sk(this.Oa,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,U:e,Db:!0}});this.u=new ul;g.bc=function(){};return new Promise(function(h,k){g.Jd=function(){return k(new N(2,7,7002))};g.Hd=function(){h();d.dispatchEvent(Ll("loaded"))};
442
- g.Jb=function(){return k(Rl())};g.onError=function(l){return k(l)}})};function Tl(a,b){if(!ed())return!0;var c=b.mimeType,d=b.uri||"";c||(c=lh(d),c=Pl[c]);if(c){if(""==(b.mediaElement||gd()).canPlayType(c))return!1;if(!ed()||!(c in kh||lh(d)in mh)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.g.streaming.preferNativeHls)return!0;if(md())return a.g.streaming.useNativeHlsOnSafari}return!1}
443
- function Bl(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.xc.D(b.mediaElement,"error",function(){var d=Ul(a);d&&Vl(a,d)}));a.h=b.mediaElement;return Promise.resolve()}
444
- function Cl(a,b){var c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return a.l!=Ql&&(a.l=vl),c=a.zc.map(function(p){return p()}),a.zc=[],C(n,Promise.all(c),2);case 2:a.dispatchEvent(Ll("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.Na&&(a.Na.release(),a.Na=null);b.mediaElement&&a.o.sb();a.wd.stop();a.Rb&&(a.Rb.release(),a.Rb=null);a.ud&&(a.ud.stop(),a.ud=null);if(!a.I){n.B(3);break}return C(n,a.I.stop(),4);case 4:a.I=null,a.zd=null;case 3:if(!a.s){n.B(5);break}return C(n,a.s.stop(),
445
- 5);case 5:if(!a.j){n.B(7);break}return C(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.A&&(a.A.release(),a.A=null);if(!a.G){n.B(9);break}return C(n,a.G.destroy(),10);case 10:a.G=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){n.B(11);break}return C(n,new Promise(function(p){return(new dd(p)).S(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
446
- case 11:if(!a.m){n.B(13);break}return C(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.jc=null;a.M=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.u=new ul;a.ve=null;Wl(a);D(n)}})}
447
- function Dl(a,b){var c,d,e,f,g;return I(function(h){if(1==h.g)return c=a.g.textDisplayFactory,d=c(),a.ve=c,e=Xl(b.mediaElement,d,function(k,l,m){Yl(a,k,l,m)},a.L),e.configure(a.g.mediaSource),f=a.g.manifest,g=f.segmentRelativeVttTiming,e.M=g,C(h,e.G,2);a.G=e;D(h)})}
448
- function El(a,b,c){var d,e,f,g;return I(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.jc=d,f=a,C(h,jh(d,e,a.g.manifest.retryParameters,b.mimeType),2);f.zd=h.h;a.I=a.zd();g=Ue(a.g.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.I.configure(g);D(h)})}
449
- function Fl(a,b){var c=b.uri;b=a.F;a.Na=new uj(function(){return a.ec()});a.Na.addEventListener("regionadd",function(f){f=f.region;Zl(a,"timelineregionadded",f);if(a.C)a.C.onDashTimedMetadata(f)});a.ga=null;a.g.streaming.observeQualityChanges&&(a.ga=new qj(function(){return a.cb()}),a.ga.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,
450
- height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Ll("mediaqualitychanged",g))}));var d={networkingEngine:b,filter:function(f){return $l(a,f)},makeTextStreamsForClosedCaptions:function(f){return am(a,f)},onTimelineRegionAdded:function(f){var g=a.Na;a:{var h=t(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=
451
- k;break a}h=null}null==h&&(g.g.add(f),f=new P("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return Vl(a,f)},isLowLatencyMode:function(){return a.g.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.g.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&
452
- a.m.s&&bm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ke(function(){var f,g,h,k;return I(function(l){if(1==l.g)return f=a,C(l,a.I.start(c,d),2);f.i=l.h;g=Ll("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new N(2,4,4036);cm(a.i);h=Date.now()/1E3;k=h-e;a.u.F=k;D(l)})}(),function(){return a.I.stop()})}
453
- function Gl(a,b){var c,d;return I(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=dm(a,{Hb:a.F,onError:function(f){Vl(a,f)},Id:function(f){em(a,f)},onExpirationUpdated:function(f,g){fm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.u.j=Date.now()/1E3-c,a.L&&(f=a.L,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.g.drm),C(e,Bg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?C(e,a.m.yc(b.mediaElement),3):C(e,$l(a,a.i),0)})}
454
- function Hl(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B;return I(function(E){switch(E.g){case 1:b.startTime=c.startTime;null!=a.Gc&&(b.startTime=a.Gc,a.Gc=null);d=b.mediaElement;e=b.uri;a.jc=e;a.H=new mj({td:function(){return d.playbackRate},pd:function(){return d.defaultPlaybackRate},Ne:function(F){d.playbackRate=F},wf:function(F){d.currentTime+=F}});f=function(){return gm(a)};g=function(){return hm(a)};a.o.D(d,"playing",f);a.o.D(d,"pause",f);a.o.D(d,"ended",f);a.o.D(d,"ratechange",g);Ol(a,a.g);
455
- h=a.g.abrFactory;a.s&&a.oe==h||(a.oe=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(oe("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.g.abr));a.Za=new xe(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferredAudioLabel);a.Pb=a.g.preferredTextLanguage;a.Ec=a.g.preferredTextRole;a.Ac=a.g.preferForcedSubs;im(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);
456
- a.s.init(function(F,G,H){a.j&&F!=a.j.j&&jm(a,F,!0,void 0===G?!1:G,void 0===H?0:H)});a.s.setMediaElement(d);sd(a.i,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredAudioChannelCount,a.g.preferredDecodingAttributes);a.j=km(a);a.j.configure(a.g.streaming);a.l=lm;d.textTracks&&a.o.D(d.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":mm(a,F)}});a.dispatchEvent(Ll("streaming"));k=null;(l=a.j.j)||(k=nm(a)?a.s.chooseVariant():null);m=[];n=l||k;p=t([n.video,
457
- n.audio]);for(r=p.next();!r.done;r=p.next())(u=r.value)&&!u.segmentIndex&&m.push(u.createSegmentIndex());if(!(0<m.length)){E.B(2);break}return C(E,Promise.all(m),2);case 2:im(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A=om(a,b.startTime);a.Rb=pm(a,b.Nd);w=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);qm(a,w);if(l){E.B(4);break}jm(a,k,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){E.B(4);break}y=a.A.gd();return C(E,rm(k,y),6);case 6:x=E.h,a.A.Yd(x);case 4:return a.A.Xd(),
458
- A=a.Zb().find(function(F){return F.active}),A||((z=ge(a.i.textStreams,a.Pb,a.Ec,a.Ac)[0]||null)&&tl(a.u.h,z,!0),k&&(z?(k.audio&&sm(a,k.audio,z)&&(a.Y=!0),a.Y&&a.G.u.setTextVisibility(!0),tm(a)):a.Y=!1),z&&(a.g.streaming.alwaysStreamText||a.ie())&&Vj(a.j,z)),C(E,a.j.start(),7);case 7:a.g.abr.enabled&&(a.s.enable(),um(a)),Id(a.j?a.j.j:null,a.i),vm(a.i),wm(a),nm(a),a.i.variants.some(function(F){return F.primary}),a.T()&&(a.g.streaming.liveSync||a.i.serviceDescription)&&(B=function(){return xm(a)},a.o.D(d,
459
- "timeupdate",B)),a.Fc=!0,a.o.la(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-c.Nd}),D(E)}})}
460
- function Il(a,b,c){var d,e,f,g,h,k,l;return I(function(m){return 1==m.g?(d=Ac,e=Date.now()/1E3,f=!0,a.m=dm(a,{Hb:a.F,onError:function(n){Vl(a,n)},Id:function(n){em(a,n)},onExpirationUpdated:function(n,p){fm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.u.j=Date.now()/1E3-e)}}),a.m.configure(a.g.drm),g=c.uri||"",h=lh(g),k=Pl[h],"application/x-mpegurl"==k&&md()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
461
- 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?Jc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1},bandwidth:100,
462
- allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,C(m,Bg(a.m,[l],[]),2)):C(m,a.m.yc(b.mediaElement),0)})}
463
- function Jl(a,b,c){function d(){return gm(a)}b.uri=c.uri;b.startTime=c.startTime;a.jc=b.uri;var e=b.mediaElement;a.A=new bj(e);var f=!1;a.zc.push(function(){f=!0});null!=b.startTime&&a.A.Yd(b.startTime);a.H=new mj({td:function(){return e.playbackRate},pd:function(){return e.defaultPlaybackRate},Ne:function(k){e.playbackRate=k},wf:function(k){e.currentTime+=k}});qm(a,a.g.streaming.rebufferingGoal);a.o.D(e,"playing",d);a.o.D(e,"pause",d);a.o.D(e,"ended",d);a.o.D(e,"ratechange",function(){return hm(a)});
464
- "none"!=e.preload&&a.o.la(e,"loadedmetadata",function(){a.u.m=Date.now()/1E3-c.Nd});e.audioTracks&&(a.o.D(e.audioTracks,"addtrack",function(){return wm(a)}),a.o.D(e.audioTracks,"removetrack",function(){return wm(a)}),a.o.D(e.audioTracks,"change",function(){return wm(a)}));e.textTracks&&(a.o.D(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":ym(a,k);break;case "chapters":mm(a,k);break;default:wm(a)}}),a.o.D(e.textTracks,"removetrack",function(){return wm(a)}),
465
- a.o.D(e.textTracks,"change",function(){return wm(a)}));var g=lh(b.uri);e.src=Mk(a.V,b.uri,Pl[g]);(kd()||jd("Web0S"))&&e.load();a.l=zm;a.dispatchEvent(Ll("streaming"));var h=new Je;Ti(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.A.Xd();h.resolve()});Ti(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return I(function(l){if(1==l.g)return Am(a),k=Bm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.Y=!0),l.B(2)):C(l,new Promise(function(m){a.o.la(e.textTracks,"change",m);
466
- (new dd(m)).S(1)}),2);if(f)return l.return();Cm(a);D(l)})});e.error?h.reject(Ul(a)):"none"==e.preload&&($a('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.o.la(e,"error",function(){h.reject(Ul(a))});return(new Ke(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})).fa(function(){a.T()&&
467
- a.g.streaming.liveSync&&a.o.D(e,"timeupdate",function(){return xm(a)});a.Fc=!0})}function Am(a){var b=a.g.preferredAudioLanguage;if(""!=b){a.Ie(b);var c=a.g.preferredVariantRole;""!=c&&a.Ie(b,c)}}function Cm(a){var b=a.g.preferredTextLanguage,c=a.g.preferForcedSubs;if(""!=b){a.Je(b,"",c);var d=a.g.preferredTextRole;""!=d&&a.Je(b,d,c)}}
468
- function ym(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Dm(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new dd(function(){var d=Em(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).ic().S(.5);a.zc.push(function(){c.stop()})}}
469
- function Yl(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Dm(a,f,g,"org.id3",k.value);if(a.C)a.C.onHlsTimedMetadata(e,f)}}function Dm(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ll("metadata",b))}
470
- function mm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new dd(function(){b.mode="hidden"})).ic().S(.5);a.zc.push(function(){c.stop()})}}function cm(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 dm(a,b){return new ug(b,a.g.drm.updateExpirationTime)}
471
- function yl(a){return new Ye(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Ll("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Ll("downloadfailed",b))},function(b,c,d){var e=a.V;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)Sk(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f=
472
- "d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.o=f}Sk(e,c,{ot:Pk,su:!e.i})}}catch(m){ab("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case hf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.T()?"l":"v"};h.ot=Vk(b);var k=h.ot===Tk||h.ot===Xk||h.ot===Ok||h.ot===Yk,l=b.stream;l&&(k&&(h.bl=$k(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==Yk&&(h.tb=al(e,h.ot)/1E3);Sk(e,c,h)}}catch(m){ab("CMCD_SEGMENT_ERROR",
473
- "Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:Sk(e,c,{ot:"k"});break;case 4:Sk(e,c,{ot:"o"})}})}function om(a,b){return new cj(a.h,a.i,a.g.streaming,b,function(){a.Rb&&pj(a.Rb,!0);a.j&&a.j.Vc();a.M&&Fm(a)},function(c){return a.dispatchEvent(c)})}
474
- function pm(a,b){b=new vj(a.Na,a.T()||0<b);b.addEventListener("enter",function(d){Zl(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Zl(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Zl(a,"timelineregionenter",e),Zl(a,"timelineregionexit",e))});var c=new oj(a.h);c.g.add(b);a.ga&&c.g.add(a.ga);return c}function qm(a,b){a.M=new Ce;a.M.g=Ee;Fe(a.M,b,Math.min(.5,b/2));Wl(a);a.ud=(new dd(function(){Fm(a)})).Ca(.25)}
475
- function Fm(a){switch(a.l){case zm:if(a.h.ended)var b=!0;else{var c=wh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case lm:a:if(a.h.ended||qi(a.G))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Ab();var d=wh(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=yh(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?De:Ee;c.g=d;b!=d&&Wl(a)}function Xl(a,b,c,d){return new ii(a,b,c,d)}
476
- function xl(a){return new Lk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},cb:function(){return a.cb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},rd:function(){return a.rd()},zb:function(){return a.zb()},Cb:function(){return a.Cb()},T:function(){return a.T()}},a.g.cmcd)}
477
- function km(a){return new Ij(a.i,{sd:function(){return a.A?a.A.gd():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},R:a.G,Hb:a.F,onError:function(b){return Vl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Tg:function(){a.I&&a.I.update&&a.I.update()},xe:function(b,c,d){a.A&&a.A.xf();Fm(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(Ll("segmentappended",b))},Sg:function(b,c){(c=c.qe)&&a.ga&&sj(a.ga,c,b)},Ye:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&
478
- !d.I&&["audio","video"].includes(b)){c=new Xf(M(c));var e=0,f=t(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=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Kg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Ug:function(b,c,d){Yl(a,b,c,d)},$d:function(b,c){return a.$d(b,c)}})}
479
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(oe("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(oe("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
480
- a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2));var c=nl(this.g,a,wl(this));Gm(this);return c};
481
- function Gm(a){if(a.I){var b=Ue(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{Hm(a,a.i)}catch(f){Vl(a,f)}a.s&&nm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Im(a)}a.F&&a.F.Le(a.g.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.g.mediaSource),a.G.M=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,a.ve!=b)){var c=b(),d=a.G,e=d.u;d.u=c;e&&(c.setTextVisibility(e.isTextVisible()),
482
- e.destroy());d.g&&(d.g.j=c);a.ve=b;a.j&&(b=a.j,(c=b.h.get(zc))&&Tj(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),um(a));a.M&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Fe(a.M,b,Math.min(.5,b/2)));a.i&&im(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C&&a.C.configure(a.g.ads);a.V&&a.V.configure(a.g.cmcd)}q.getConfiguration=function(){var a=wl(this);nl(a,this.g,wl(this));return a};
483
- q.ig=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.ec().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.dh=function(){for(var a in this.g)delete this.g[a];nl(this.g,wl(this),wl(this));Gm(this)};q.og=function(){return this.l};q.rg=function(){return this.i?this.i.type:null};q.tg=function(){return this.h};
484
- q.zb=function(){return this.F};q.ce=function(){return this.jc};q.jf=function(){return this.C?this.C:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Fb=function(){return this.i?this.i.presentationTimeline.Fb():!1};q.Jg=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
429
+ 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,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};e.trackSelectionCallback=function(g){return H(function(h){return h.return(ll(g,
430
+ f.preferredAudioLanguage))})};return f}function ml(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 bl(a,b,c||kl(),d,"")}
431
+ function ll(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=$c(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return Tc(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/
432
+ 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=yc&&"image"!=d.type||b.push(d);return b}L("shaka.util.PlayerConfiguration",jl);jl.mergeConfigObjects=ml;jl.createDefault=kl;function nl(){this.g=null;this.h=[]}function ol(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 pl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
433
+ function ql(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function rl(){this.i=this.h=null;this.g=[]}function sl(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 tl(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.M=this.N=this.H=this.I=this.L=this.l=this.o=NaN;this.g=new nl;this.h=new rl};function T(a,b){Se.call(this);var c=this;this.l=ul;this.nd=this.h=null;this.Y=!1;this.zd=new kf;this.xc=new kf;this.o=new kf;this.jc=this.i=this.Bd=this.I=this.j=this.ga=this.L=this.Nf=this.V=this.Na=this.M=this.vd=this.H=this.Sb=this.A=this.G=this.m=this.F=null;this.Fc=!1;this.pe=this.s=null;this.Ce=1E9;this.g=vl(this);this.Be={width:Infinity,height:Infinity};this.u=null;this.Za=new we(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel);
434
+ this.Qb=this.g.preferredTextLanguage;this.Ec=this.g.preferredTextRole;this.Ac=this.g.preferForcedSubs;this.zc=[];this.Gc=null;b&&b(this);this.V=wl(this);this.F=xl(this);this.F.Me(this.g.streaming.forceHTTPS);this.C=null;yl&&(this.C=yl());this.zd.D(window,"online",function(){zl(c);c.Fe()});this.N={name:"detach"};this.W={name:"attach"};this.aa={name:"unload"};this.Ge={name:"manifest-parser"};this.ze={name:"manifest"};this.Rb={name:"media-source"};this.te={name:"drm-engine"};this.X={name:"load"};this.Qe=
435
+ {name:"src-equals-drm-engine"};this.Tb={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Ne(Al(c,e,f))});d.set(this.N,function(e){e.mediaElement&&(c.xc.sb(),e.mediaElement=null);c.C&&c.C.release();c.h=null;e=Promise.resolve();return Ne(e)});d.set(this.aa,function(e){return Ne(Bl(c,e))});d.set(this.Rb,function(e){e=Cl(c,e);return Ne(e)});d.set(this.Ge,function(e,f){e=Dl(c,e,f);return Ne(e)});d.set(this.ze,function(e){return El(c,e)});d.set(this.te,function(e){e=Fl(c,e);return Ne(e)});
436
+ d.set(this.X,function(e,f){return Ne(Gl(c,e,f))});d.set(this.Qe,function(e,f){e=Hl(c,e,f);return Ne(e)});d.set(this.Tb,function(e,f){return Il(c,e,f)});this.Oa=new mk(this.N,{ug:function(e,f,g,h){var k=null;e==c.N&&(k=g==c.N?c.N:c.W);e==c.W&&(k=g==c.N||f.mediaElement!=h.mediaElement?c.N:g==c.W?c.W:g==c.Rb||g==c.X?c.Rb:g==c.Tb?c.Qe:null);e==c.Rb&&(k=g==c.X&&f.mediaElement==h.mediaElement?c.Ge:c.aa);e==c.Ge&&(k=Jl(c.X,c.ze,c.aa,g,f,h));e==c.ze&&(k=Jl(c.X,c.te,c.aa,g,f,h));e==c.te&&(k=Jl(c.X,c.X,c.aa,
437
+ g,f,h));e==c.Qe&&(k=g==c.Tb&&f.mediaElement==h.mediaElement?c.Tb:c.aa);if(e==c.X||e==c.Tb)k=c.aa;e==c.aa&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.W:c.N);return k},fg:function(e,f,g){c.dispatchEvent(Kl("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return H(function(f){return 1==f.g?C(f,Bl(c,e),2):f.return(e.mediaElement?c.W:c.N)})},Rg:function(e){c.dispatchEvent(Kl("onstateidle",(new Map).set("state",e.name)))}});this.xd=new cd(function(){return Ll(c)});
438
+ a&&this.yc(a,!0)}qa(T,Se);function Ml(a){null!=a.L&&(a.L.release(),a.L=null)}function Nl(a,b){if(b.lcevc.enabled){var c=a.Db();c&&c[0]&&c[0].videoMimeType==Ol.ts&&(gd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Xa("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Ml(a);null==a.L&&(a.L=new ci(a.h,a.Nf,b.lcevc),a.G&&(a.G.L=a.L))}else Ml(a)}function Kl(a,b){return new O(a,b)}q=T.prototype;
439
+ q.destroy=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(a.l==Pl)return c.return();Ml(a);a.l=Pl;b=rk(a.Oa,function(){return{node:a.N,U:nk(),Eb:!1}});return C(c,new Promise(function(d){b.bc=function(){};b.Id=function(){d()};b.Kb=function(){d()};b.onError=function(){d()};b.Kd=function(){d()}}),2);case 2:return C(c,a.Oa.destroy(),3);case 3:a.zd&&(a.zd.release(),a.zd=null);a.xc&&(a.xc.release(),a.xc=null);a.o&&(a.o.release(),a.o=null);a.pe=null;a.g=null;a.u=null;a.nd=null;a.V=null;
440
+ if(!a.F){c.B(4);break}return C(c,a.F.destroy(),5);case 5:a.F=null;case 4:a.s&&(a.s.release(),a.s=null),Se.prototype.release.call(a),D(c)}})};q.yc=function(a,b){b=void 0===b?!0:b;if(this.l==Pl)return Promise.reject(Ql());var c=nk();c.mediaElement=a;dd()||(b=!1);var d=b?this.Rb:this.W;a=rk(this.Oa,function(){return{node:d,U:c,Eb:!1}});a.bc=function(){};return Rl(a)};q.Vf=function(a){this.Nf=a};
441
+ q.detach=function(){var a=this;if(this.l==Pl)return Promise.reject(Ql());var b=rk(this.Oa,function(){return{node:a.N,U:nk(),Eb:!1}});b.bc=function(){};return Rl(b)};q.Te=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Pl)return Promise.reject(Ql());this.Fc=!1;dd()||(a=!1);Ml(this);var c=nk(),d=rk(this.Oa,function(e){var f=e.mediaElement&&a?b.Rb:e.mediaElement?b.W:b.N;c.mediaElement=e.mediaElement;return{node:f,U:c,Eb:!1}});d.bc=function(){};return Rl(d)};q.qh=function(a){this.Gc=a};
442
+ q.load=function(a,b,c){var d=this;this.Gc=null;this.Fc=!1;if(this.l==Pl)return Promise.reject(Ql());this.dispatchEvent(Kl("loading"));var e=nk();e.uri=a;e.Od=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Sl(this,e)?this.Tb:this.X,g=rk(this.Oa,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,U:e,Eb:!0}});this.u=new tl;g.bc=function(){};return new Promise(function(h,k){g.Kd=function(){return k(new N(2,7,7002))};g.Id=function(){h();d.dispatchEvent(Kl("loaded"))};
443
+ g.Kb=function(){return k(Ql())};g.onError=function(l){return k(l)}})};function Sl(a,b){if(!dd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=kh(d),c=Ol[c]);if(c){if(""==(b.mediaElement||fd()).canPlayType(c))return!1;if(!dd()||!(c in jh||kh(d)in lh)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.g.streaming.preferNativeHls)return!0;if(ld())return a.g.streaming.useNativeHlsOnSafari}return!1}
444
+ function Al(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.xc.D(b.mediaElement,"error",function(){var d=Tl(a);d&&Ul(a,d)}));a.h=b.mediaElement;return Promise.resolve()}
445
+ function Bl(a,b){var c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return a.l!=Pl&&(a.l=ul),c=a.zc.map(function(p){return p()}),a.zc=[],C(n,Promise.all(c),2);case 2:a.dispatchEvent(Kl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.Na&&(a.Na.release(),a.Na=null);b.mediaElement&&a.o.sb();a.xd.stop();a.Sb&&(a.Sb.release(),a.Sb=null);a.vd&&(a.vd.stop(),a.vd=null);if(!a.I){n.B(3);break}return C(n,a.I.stop(),4);case 4:a.I=null,a.Bd=null;case 3:if(!a.s){n.B(5);break}return C(n,a.s.stop(),
446
+ 5);case 5:if(!a.j){n.B(7);break}return C(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.A&&(a.A.release(),a.A=null);if(!a.G){n.B(9);break}return C(n,a.G.destroy(),10);case 10:a.G=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){n.B(11);break}return C(n,new Promise(function(p){return(new cd(p)).S(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
447
+ case 11:if(!a.m){n.B(13);break}return C(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.jc=null;a.M=null;if(a.i){d=t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.u=new tl;a.we=null;Vl(a);D(n)}})}
448
+ function Cl(a,b){var c,d,e,f,g;return H(function(h){if(1==h.g)return c=a.g.textDisplayFactory,d=c(),a.we=c,e=Wl(b.mediaElement,d,function(k,l,m){Xl(a,k,l,m)},a.L),e.configure(a.g.mediaSource),f=a.g.manifest,g=f.segmentRelativeVttTiming,e.M=g,C(h,e.G,2);a.G=e;D(h)})}
449
+ function Dl(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.jc=d,f=a,C(h,ih(d,e,a.g.manifest.retryParameters,b.mimeType),2);f.Bd=h.h;a.I=a.Bd();g=Te(a.g.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.I.configure(g);D(h)})}
450
+ function El(a,b){var c=b.uri;b=a.F;a.Na=new tj(function(){return a.ec()});a.Na.addEventListener("regionadd",function(f){f=f.region;Yl(a,"timelineregionadded",f);if(a.C)a.C.onDashTimedMetadata(f)});a.ga=null;a.g.streaming.observeQualityChanges&&(a.ga=new pj(function(){return a.cb()}),a.ga.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,
451
+ height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(Kl("mediaqualitychanged",g))}));var d={networkingEngine:b,filter:function(f){return Zl(a,f)},makeTextStreamsForClosedCaptions:function(f){return $l(a,f)},onTimelineRegionAdded:function(f){var g=a.Na;a:{var h=t(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=
452
+ k;break a}h=null}null==h&&(g.g.add(f),f=new O("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return Ul(a,f)},isLowLatencyMode:function(){return a.g.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.g.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&
453
+ a.m.s&&am(a,g.keySystem,f)}},e=Date.now()/1E3;return new Je(function(){var f,g,h,k;return H(function(l){if(1==l.g)return f=a,C(l,a.I.start(c,d),2);f.i=l.h;g=Kl("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new N(2,4,4036);bm(a.i);h=Date.now()/1E3;k=h-e;a.u.F=k;D(l)})}(),function(){return a.I.stop()})}
454
+ function Fl(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=cm(a,{Ib:a.F,onError:function(f){Ul(a,f)},Jd:function(f){dm(a,f)},onExpirationUpdated:function(f,g){em(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.u.j=Date.now()/1E3-c,a.L&&(f=a.L,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.g.drm),C(e,Ag(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?C(e,a.m.yc(b.mediaElement),3):C(e,Zl(a,a.i),0)})}
455
+ function Gl(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B;return H(function(E){switch(E.g){case 1:b.startTime=c.startTime;null!=a.Gc&&(b.startTime=a.Gc,a.Gc=null);d=b.mediaElement;e=b.uri;a.jc=e;a.H=new lj({td:function(){return d.playbackRate},pd:function(){return d.defaultPlaybackRate},Oe:function(F){d.playbackRate=F},wf:function(F){d.currentTime+=F}});f=function(){return fm(a)};g=function(){return gm(a)};a.o.D(d,"playing",f);a.o.D(d,"pause",f);a.o.D(d,"ended",f);a.o.D(d,"ratechange",g);Nl(a,a.g);
456
+ h=a.g.abrFactory;a.s&&a.pe==h||(a.pe=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(ne("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.g.abr));a.Za=new we(a.g.preferredAudioLanguage,a.g.preferredVariantRole,a.g.preferredAudioChannelCount,a.g.preferredVideoHdrLevel,a.g.preferredAudioLabel);a.Qb=a.g.preferredTextLanguage;a.Ec=a.g.preferredTextRole;a.Ac=a.g.preferForcedSubs;hm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);
457
+ a.s.init(function(F,G,I){a.j&&F!=a.j.j&&im(a,F,!0,void 0===G?!1:G,void 0===I?0:I)});a.s.setMediaElement(d);rd(a.i,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredAudioChannelCount,a.g.preferredDecodingAttributes);a.j=jm(a);a.j.configure(a.g.streaming);a.l=km;d.textTracks&&a.o.D(d.textTracks,"addtrack",function(F){if(F.track)switch(F=F.track,F.kind){case "chapters":lm(a,F)}});a.dispatchEvent(Kl("streaming"));k=null;(l=a.j.j)||(k=mm(a)?a.s.chooseVariant():null);m=[];n=l||k;p=t([n.video,
458
+ n.audio]);for(r=p.next();!r.done;r=p.next())(u=r.value)&&!u.segmentIndex&&m.push(u.createSegmentIndex());if(!(0<m.length)){E.B(2);break}return C(E,Promise.all(m),2);case 2:hm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A=nm(a,b.startTime);a.Sb=om(a,b.Od);w=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);pm(a,w);if(l){E.B(4);break}im(a,k,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){E.B(4);break}y=a.A.gd();return C(E,qm(k,y),6);case 6:x=E.h,a.A.Zd(x);case 4:return a.A.Yd(),
459
+ A=a.Zb().find(function(F){return F.active}),A||((z=fe(a.i.textStreams,a.Qb,a.Ec,a.Ac)[0]||null)&&sl(a.u.h,z,!0),k&&(z?(k.audio&&rm(a,k.audio,z)&&(a.Y=!0),a.Y&&a.G.u.setTextVisibility(!0),sm(a)):a.Y=!1),z&&(a.g.streaming.alwaysStreamText||a.je())&&Uj(a.j,z)),C(E,a.j.start(),7);case 7:a.g.abr.enabled&&(a.s.enable(),tm(a)),Hd(a.j?a.j.j:null,a.i),um(a.i),vm(a),mm(a),a.i.variants.some(function(F){return F.primary}),a.T()&&(a.g.streaming.liveSync||a.i.serviceDescription)&&(B=function(){return wm(a)},a.o.D(d,
460
+ "timeupdate",B)),a.Fc=!0,a.o.la(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-c.Od}),D(E)}})}
461
+ function Hl(a,b,c){var d,e,f,g,h,k,l;return H(function(m){return 1==m.g?(d=zc,e=Date.now()/1E3,f=!0,a.m=cm(a,{Ib:a.F,onError:function(n){Ul(a,n)},Jd:function(n){dm(a,n)},onExpirationUpdated:function(n,p){em(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.u.j=Date.now()/1E3-e)}}),a.m.configure(a.g.drm),g=c.uri||"",h=kh(g),k=Ol[h],"application/x-mpegurl"==k&&ld()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
462
+ 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?Ic(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1},bandwidth:100,
463
+ allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.X=!0,C(m,Ag(a.m,[l],[]),2)):C(m,a.m.yc(b.mediaElement),0)})}
464
+ function Il(a,b,c){function d(){return fm(a)}b.uri=c.uri;b.startTime=c.startTime;a.jc=b.uri;var e=b.mediaElement;a.A=new aj(e);var f=!1;a.zc.push(function(){f=!0});null!=b.startTime&&a.A.Zd(b.startTime);a.H=new lj({td:function(){return e.playbackRate},pd:function(){return e.defaultPlaybackRate},Oe:function(k){e.playbackRate=k},wf:function(k){e.currentTime+=k}});pm(a,a.g.streaming.rebufferingGoal);a.o.D(e,"playing",d);a.o.D(e,"pause",d);a.o.D(e,"ended",d);a.o.D(e,"ratechange",function(){return gm(a)});
465
+ "none"!=e.preload&&a.o.la(e,"loadedmetadata",function(){a.u.m=Date.now()/1E3-c.Od});e.audioTracks&&(a.o.D(e.audioTracks,"addtrack",function(){return vm(a)}),a.o.D(e.audioTracks,"removetrack",function(){return vm(a)}),a.o.D(e.audioTracks,"change",function(){return vm(a)}));e.textTracks&&(a.o.D(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":xm(a,k);break;case "chapters":lm(a,k);break;default:vm(a)}}),a.o.D(e.textTracks,"removetrack",function(){return vm(a)}),
466
+ a.o.D(e.textTracks,"change",function(){return vm(a)}));var g=kh(b.uri);e.src=Lk(a.V,b.uri,Ol[g]);(jd()||id("Web0S"))&&e.load();a.l=ym;a.dispatchEvent(Kl("streaming"));var h=new Ie;Si(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){a.A.Yd();h.resolve()});Si(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return H(function(l){if(1==l.g)return zm(a),k=Am(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.Y=!0),l.B(2)):C(l,new Promise(function(m){a.o.la(e.textTracks,"change",m);
467
+ (new cd(m)).S(1)}),2);if(f)return l.return();Bm(a);D(l)})});e.error?h.reject(Tl(a)):"none"==e.preload&&(Xa('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.o.la(e,"error",function(){h.reject(Tl(a))});return(new Je(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})).fa(function(){a.T()&&
468
+ a.g.streaming.liveSync&&a.o.D(e,"timeupdate",function(){return wm(a)});a.Fc=!0})}function zm(a){var b=a.g.preferredAudioLanguage;if(""!=b){a.Je(b);var c=a.g.preferredVariantRole;""!=c&&a.Je(b,c)}}function Bm(a){var b=a.g.preferredTextLanguage,c=a.g.preferForcedSubs;if(""!=b){a.Ke(b,"",c);var d=a.g.preferredTextRole;""!=d&&a.Ke(b,d,c)}}
469
+ function xm(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.D(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Cm(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new cd(function(){var d=Dm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).ic().S(.5);a.zc.push(function(){c.stop()})}}
470
+ function Xl(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Cm(a,f,g,"org.id3",k.value);if(a.C)a.C.onHlsTimedMetadata(e,f)}}function Cm(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Kl("metadata",b))}
471
+ function lm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new cd(function(){b.mode="hidden"})).ic().S(.5);a.zc.push(function(){c.stop()})}}function bm(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 cm(a,b){return new tg(b,a.g.drm.updateExpirationTime)}
472
+ function xl(a){return new Xe(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Kl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Kl("downloadfailed",b))},function(b,c,d){var e=a.V;d=void 0===d?{}:d;if(e.g.enabled)if("HEAD"===c.method)Rk(e,c);else switch(b){case 0:try{if(e.g.enabled){if(d.type){a:{switch(d.type){case 4:var f=
473
+ "d";break a;case 3:case 2:f="h";break a;case 5:f="s";break a}f=void 0}e.o=f}Rk(e,c,{ot:Ok,su:!e.i})}}catch(m){Za("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case gf:b=d;try{if(e.g.enabled){var g=b.segment;f=0;g&&(f=g.endTime-g.startTime);var h={d:1E3*f,st:e.h.T()?"l":"v"};h.ot=Uk(b);var k=h.ot===Sk||h.ot===Wk||h.ot===Nk||h.ot===Xk,l=b.stream;l&&(k&&(h.bl=Zk(e,l.type)),l.bandwidth&&(h.br=l.bandwidth/1E3));k&&h.ot!==Xk&&(h.tb=$k(e,h.ot)/1E3);Rk(e,c,h)}}catch(m){Za("CMCD_SEGMENT_ERROR",
474
+ "Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:Rk(e,c,{ot:"k"});break;case 4:Rk(e,c,{ot:"o"})}})}function nm(a,b){return new bj(a.h,a.i,a.g.streaming,b,function(){a.Sb&&oj(a.Sb,!0);a.j&&a.j.Vc();a.M&&Em(a)},function(c){return a.dispatchEvent(c)})}
475
+ function om(a,b){b=new uj(a.Na,a.T()||0<b);b.addEventListener("enter",function(d){Yl(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Yl(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Yl(a,"timelineregionenter",e),Yl(a,"timelineregionexit",e))});var c=new nj(a.h);c.g.add(b);a.ga&&c.g.add(a.ga);return c}function pm(a,b){a.M=new Be;a.M.g=De;Ee(a.M,b,Math.min(.5,b/2));Vl(a);a.vd=(new cd(function(){Em(a)})).Ca(.25)}
476
+ function Em(a){switch(a.l){case ym:if(a.h.ended)var b=!0;else{var c=vh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case km:a:if(a.h.ended||pi(a.G))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Bb();var d=vh(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=xh(a.h.buffered,a.h.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ce:De;c.g=d;b!=d&&Vl(a)}function Wl(a,b,c,d){return new hi(a,b,c,d)}
477
+ function wl(a){return new Kk({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},cb:function(){return a.cb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},rd:function(){return a.rd()},Ab:function(){return a.Ab()},Db:function(){return a.Db()},T:function(){return a.T()}},a.g.cmcd)}
478
+ function jm(a){return new Hj(a.i,{sd:function(){return a.A?a.A.gd():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},R:a.G,Ib:a.F,onError:function(b){return Ul(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Tg:function(){a.I&&a.I.update&&a.I.update()},ye:function(b,c,d){a.A&&a.A.xf();Em(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(Kl("segmentappended",b))},Sg:function(b,c){(c=c.re)&&a.ga&&rj(a.ga,c,b)},Ze:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&
479
+ !d.I&&["audio","video"].includes(b)){c=new Wf(M(c));var e=0,f=t(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=t(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;Jg(d,"cenc",e);d=d.l}}else d=Promise.resolve();return d},Ug:function(b,c,d){Xl(a,b,c,d)},ae:function(b,c){return a.ae(b,c)}})}
480
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(ne("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(ne("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
481
+ a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01),void 0==a.streaming.segmentPrefetchLimit&&(a.streaming.segmentPrefetchLimit=2));var c=ml(this.g,a,vl(this));Fm(this);return c};
482
+ function Fm(a){if(a.I){var b=Te(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{Gm(a,a.i)}catch(f){Ul(a,f)}a.s&&mm(a);b=a.j.j;!b||b.allowedByApplication&&b.allowedByKeySystem||Hm(a)}a.F&&a.F.Me(a.g.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.g.mediaSource),a.G.M=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,a.we!=b)){var c=b(),d=a.G,e=d.u;d.u=c;e&&(c.setTextVisibility(e.isTextVisible()),
483
+ e.destroy());d.g&&(d.g.j=c);a.we=b;a.j&&(b=a.j,(c=b.h.get(yc))&&Sj(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),tm(a));a.M&&(b=a.g.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ee(a.M,b,Math.min(.5,b/2)));a.i&&hm(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.C&&a.C.configure(a.g.ads);a.V&&a.V.configure(a.g.cmcd)}q.getConfiguration=function(){var a=vl(this);ml(a,this.g,vl(this));return a};
484
+ q.ig=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.ec().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.dh=function(){for(var a in this.g)delete this.g[a];ml(this.g,vl(this),vl(this));Fm(this)};q.og=function(){return this.l};q.rg=function(){return this.i?this.i.type:null};q.tg=function(){return this.h};
485
+ q.Ab=function(){return this.F};q.de=function(){return this.jc};q.kf=function(){return this.C?this.C:null};q.T=function(){return this.i?this.i.presentationTimeline.T():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Gb=function(){return this.i?this.i.presentationTimeline.Gb():!1};q.Jg=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
485
486
  q.ec=function(){if(!this.Fc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.Yb(),end:a.eb()}}return this.h&&this.h.src&&(a=this.h.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Gg=function(){this.T()&&(this.h.currentTime=this.ec().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.Ic=function(){return this.m?this.m.Ic():Infinity};
486
- q.be=function(){return this.m?this.m.be():[]};q.qd=function(){return this.m?this.m.qd():{}};q.ge=function(){return this.M?this.M.g==Ee:!1};q.rd=function(){return this.h?this.H?this.H.i:1:0};q.Mf=function(a){0==a?$a("A trick play rate of 0 is unsupported!"):(this.h.paused&&this.h.play(),this.H.set(a),this.l==lm&&(this.s.playbackRateChanged(a),Sj(this.j,1<Math.abs(a))))};q.Ze=function(){var a=this.H.pd();this.l==zm&&this.H.set(a);this.l==lm&&(this.H.set(a),this.s.playbackRateChanged(a),Sj(this.j,!1))};
487
- q.Cb=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ee(e)){var f=Xd(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return de(g)}):[]};
488
- q.Zb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Yd(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Bm(this).map(function(f){return be(f)}):[]};q.ng=function(){return this.i?this.i.imageStreams.map(function(a){return Zd(a)}):[]};
489
- q.Bg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F;return I(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(H){return H.id==a}))?d.segmentIndex?G.B(3):C(G,d.createSegmentIndex(),3):G.return(null):G.B(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);n=parseInt(h[2],10);p=k/m;r=l/n;u=m*n;
487
+ q.ce=function(){return this.m?this.m.ce():[]};q.qd=function(){return this.m?this.m.qd():{}};q.he=function(){return this.M?this.M.g==De:!1};q.rd=function(){return this.h?this.H?this.H.i:1:0};q.Mf=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.h.paused&&this.h.play(),this.H.set(a),this.l==km&&(this.s.playbackRateChanged(a),Rj(this.j,1<Math.abs(a))))};q.$e=function(){var a=this.H.pd();this.l==ym&&this.H.set(a);this.l==km&&(this.H.set(a),this.s.playbackRateChanged(a),Rj(this.j,!1))};
488
+ q.Db=function(){if(this.i){for(var a=this.j?this.j.j:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,de(e)){var f=Wd(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return ce(g)}):[]};
489
+ q.Zb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Xd(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Am(this).map(function(f){return ae(f)}):[]};q.ng=function(){return this.i?this.i.imageStreams.map(function(a){return Yd(a)}):[]};
490
+ q.Bg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F;return H(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?G.B(3):C(G,d.createSegmentIndex(),3):G.return(null):G.B(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);n=parseInt(h[2],10);p=k/m;r=l/n;u=m*n;
490
491
  w=f.l-f.startTime;y=f.C||w/u;x=f.startTime;z=A=0;1<u&&(B=Math.floor((b-f.startTime)/y),x=f.startTime+B*y,A=B%m*p,z=Math.floor(B/m)*r);E=!1;if(F=f.A)E=!0,r=F.height,A=F.positionX,z=F.positionY,p=F.width;return G.return({imageHeight:l,imageWidth:k,height:r,positionX:A,positionY:z,startTime:x,duration:y,uris:f.wa(),width:p,sprite:E})}return G.return(null)})};
491
- q.Cf=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.u.h,b,!1),Vj(this.j,b),Jm(this),this.Pb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Bm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,$d(c)==a.id?c.mode=this.Y?"showing":"hidden":c.mode="disabled";Jm(this)}};
492
- q.Df=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.g.abr.enabled&&$a("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&&ee(d)&&(jm(this,d,!1,b,c),this.Za=new we(d),nm(this))}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
493
- $d(c)==a.id){Km(this,c);break}};q.hg=function(){return Lm(this.Cb())};q.zg=function(){return Lm(this.Zb())};q.gg=function(){return Array.from(Mm(this.Cb()))};q.yg=function(){return Array.from(Mm(this.Zb()))};
494
- q.Ie=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.A){this.Za=new xe(a,b||"",c,"","");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.j;var e=this.Za.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||b(c,a)>b(f,a))c=f;c?(b=Xd(c),this.Df(b,!0,d)):Im(this)}else if(this.h&&this.h.audioTracks){e=Array.from(this.h.audioTracks);
495
- d=Uc(a);c=a=null;e=t(e);for(f=e.next();!f.done;f=e.next()){f=f.value;var g=de(f);Uc(g.language)==d&&(a=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Km(this,c):a&&Km(this,a)}};
496
- q.Je=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.A){if(this.Pb=a,this.Ec=b||"",this.Ac=c,(a=ge(this.i.textStreams,this.Pb,this.Ec,this.Ac)[0]||null)&&a!=this.j.o&&(tl(this.u.h,a,!1),this.g.streaming.alwaysStreamText||this.ie()))Vj(this.j,a),Jm(this)}else{var d=Uc(a);(a=this.Zb().find(function(e){return Uc(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Cf(a)}};
497
- q.gh=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.A){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Za=new xe(d.language,"",0,"",a),Im(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Km(this,b)}};
498
- q.ie=function(){var a=this.Y;return this.G?this.G.u.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Bm(this).some(function(b){return"showing"==b.mode}):a};q.kf=function(){return this.h&&this.h.src&&this.h.textTracks?Nm(this).map(function(a){return be(a)}):[]};
499
- q.jg=function(a){var b=Uc(a),c=Nm(this).filter(function(h){return Uc(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
500
- function Bm(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Em(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function Nm(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
501
- q.lh=function(a){a=!!a;if(this.Y!=a){this.Y=a;if(this.l==lm)this.G.u.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.o||(a=ge(this.i.textStreams,this.Pb,this.Ec,this.Ac),0<a.length&&(Vj(this.j,a[0]),Jm(this))):Rj(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Bm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}tm(this)}};
492
+ q.Cf=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&&(sl(this.u.h,b,!1),Uj(this.j,b),Im(this),this.Qb=b.language)}else if(this.h&&this.h.src&&this.h.textTracks){b=Am(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Zd(c)==a.id?c.mode=this.Y?"showing":"hidden":c.mode="disabled";Im(this)}};
493
+ q.Df=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.g.abr.enabled&&Xa("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&&de(d)&&(im(this,d,!1,b,c),this.Za=new ve(d),mm(this))}else if(this.h&&this.h.audioTracks)for(b=Array.from(this.h.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
494
+ Zd(c)==a.id){Jm(this,c);break}};q.hg=function(){return Km(this.Db())};q.zg=function(){return Km(this.Zb())};q.gg=function(){return Array.from(Lm(this.Db()))};q.yg=function(){return Array.from(Lm(this.Zb()))};
495
+ q.Je=function(a,b,c,d){c=void 0===c?0:c;d=void 0===d?0:d;if(this.i&&this.A){this.Za=new we(a,b||"",c,"","");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.j;var e=this.Za.create(this.i.variants);c=null;e=t(e.values());for(var f=e.next();!f.done;f=e.next())if(f=f.value,!c||b(c,a)>b(f,a))c=f;c?(b=Wd(c),this.Df(b,!0,d)):Hm(this)}else if(this.h&&this.h.audioTracks){e=Array.from(this.h.audioTracks);
496
+ d=Tc(a);c=a=null;e=t(e);for(f=e.next();!f.done;f=e.next()){f=f.value;var g=ce(f);Tc(g.language)==d&&(a=f,b?g.roles.includes(b)&&(c=f):0==g.roles.length&&(c=f))}c?Jm(this,c):a&&Jm(this,a)}};
497
+ q.Ke=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.A){if(this.Qb=a,this.Ec=b||"",this.Ac=c,(a=fe(this.i.textStreams,this.Qb,this.Ec,this.Ac)[0]||null)&&a!=this.j.o&&(sl(this.u.h,a,!1),this.g.streaming.alwaysStreamText||this.je()))Uj(this.j,a),Im(this)}else{var d=Tc(a);(a=this.Zb().find(function(e){return Tc(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Cf(a)}};
498
+ q.gh=function(a,b,c){b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.A){for(var d=null,e=t(this.i.variants),f=e.next();!f.done;f=e.next())if(f=f.value,f.audio.label==a){d=f;break}null!=d&&(this.Za=new we(d.language,"",0,"",a),Hm(this,b,c))}else if(this.h&&this.h.audioTracks){c=Array.from(this.h.audioTracks);b=null;c=t(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&Jm(this,b)}};
499
+ q.je=function(){var a=this.Y;return this.G?this.G.u.isTextVisible():this.h&&this.h.src&&this.h.textTracks?Am(this).some(function(b){return"showing"==b.mode}):a};q.lf=function(){return this.h&&this.h.src&&this.h.textTracks?Mm(this).map(function(a){return ae(a)}):[]};
500
+ q.jg=function(a){var b=Tc(a),c=Mm(this).filter(function(h){return Tc(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
501
+ function Am(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Dm(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function Mm(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
502
+ q.lh=function(a){a=!!a;if(this.Y!=a){this.Y=a;if(this.l==km)this.G.u.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.o||(a=fe(this.i.textStreams,this.Qb,this.Ec,this.Ac),0<a.length&&(Uj(this.j,a[0]),Im(this))):Qj(this.j));else if(this.h&&this.h.src&&this.h.textTracks){var b=Am(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}sm(this)}};
502
503
  q.wg=function(){if(!this.T())return null;var a=this.Oa.l,b=0;if(this.A)b=this.A.gd();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
503
- q.lf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.h&&this.h.getStartDate){var a=this.h.getStartDate();return isNaN(a.getTime())?null:a}return null};q.cb=function(){if(this.l==lm)return this.G.cb();var a={total:[],audio:[],video:[],text:[]};this.l==zm&&(a.total=zh(this.h.buffered));return a};
504
- q.getStats=function(){if(this.l!=lm&&this.l!=zm)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:[]};gm(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=
505
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.A&&(this.u.M=this.A.Ve(),this.u.N=this.A.We());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.I=d;this.u.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.H?c.H:NaN):c=NaN;this.u.s=c;if(this.l==lm){if(c=this.j.j)this.u.A=(this.H?this.H.i:1)*c.bandwidth;c&&c.video&&(b=this.u,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.lf().valueOf()+
506
- 1E3*this.ec().end,this.u.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.u.u=c}this.l==zm&&(c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.u;a=e.o;c=e.l;b=e.A;d=e.I;var f=e.L,g=e.H,h=e.N,k=e.M,l=e.u,m=e.i,n=e.m,p=e.F,r=e.j,u=ql(e.g,"playing"),w=ql(e.g,"paused"),y=ql(e.g,"buffering"),x=e.s,A=e.C,z=e.G,B=rl(e.g),E=[];e=t(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
504
+ q.mf=function(){if(!this.T())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.h&&this.h.getStartDate){var a=this.h.getStartDate();return isNaN(a.getTime())?null:a}return null};q.cb=function(){if(this.l==km)return this.G.cb();var a={total:[],audio:[],video:[],text:[]};this.l==ym&&(a.total=yh(this.h.buffered));return a};
505
+ q.getStats=function(){if(this.l!=km&&this.l!=ym)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:[]};fm(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.u;b=
506
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.A&&(this.u.M=this.A.We(),this.u.N=this.A.Xe());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.u;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.I=d;this.u.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.H?c.H:NaN):c=NaN;this.u.s=c;if(this.l==km){if(c=this.j.j)this.u.A=(this.H?this.H.i:1)*c.bandwidth;c&&c.video&&(b=this.u,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.T()&&(c=this.mf().valueOf()+
507
+ 1E3*this.ec().end,this.u.C=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.u.u=c}this.l==ym&&(c=this.u,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.u;a=e.o;c=e.l;b=e.A;d=e.I;var f=e.L,g=e.H,h=e.N,k=e.M,l=e.u,m=e.i,n=e.m,p=e.F,r=e.j,u=pl(e.g,"playing"),w=pl(e.g,"paused"),y=pl(e.g,"buffering"),x=e.s,A=e.C,z=e.G,B=ql(e.g),E=[];e=t(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
507
508
  id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:w,bufferingTime:y,licenseTime:x,liveLatency:A,maxSegmentDuration:z,stateHistory:B,switchHistory:E}};
508
- q.Sf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,w,y,x,A;return I(function(z){switch(z.g){case 1:if(h.l!=lm&&h.l!=zm)throw new N(1,7,7004);if(d){z.B(2);break}return C(z,Om(h,a),3);case 3:d=z.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(B){}if(h.l!=zm){z.B(4);break}g&&(c="forced");return C(z,Pm(h,a,b,c,d,f||"",k),5);case 5:l=h.Zb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return wm(h),z.return(m);throw new N(1,2,2012);case 4:n=
509
- Ac;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.B(6);break}return C(z,Qm(h,a,h.F,h.g.streaming.retryParameters),7);case 7:r=z.h,u=Rm(h,r,d,k),w=new Blob([u],{type:"text/vtt"}),a=li(w),d="text/vtt";case 6:y={id:h.Be++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:n.da,primary:!1,
510
- trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0};x=Cc(y.mimeType,y.codecs);A=Lc(x);if(!A)throw new N(2,2,2014,d);h.i.textStreams.push(y);wm(h);return z.return(Yd(y))}})};
511
- q.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A;return I(function(z){switch(z.g){case 1:if(c.l!=lm&&c.l!=zm)throw new N(1,7,7004);if(c.l==zm)throw new N(1,2,2016);if(b){z.B(2);break}return C(z,Om(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new N(1,2,2017,a);d=Ac;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new N(1,4,4045);return C(z,Qm(c,a,c.F,c.g.streaming.retryParameters),4);case 4:f=z.h;g=Mc[b];if(!g)throw new N(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
512
- segmentEnd:e,vttOffset:0};l=M(f);m=h.parseMedia(l,k);n=[];p={};r=t(m);for(u=r.next();!u.done;p={nc:p.nc},u=r.next())w=u.value,p.nc=uc([a],[w.U])[0],y=new Q(w.startTime,w.endTime,function(B){return function(){return[B.nc]}}(p),0,null,null,0,0,Infinity),p.nc.includes("#xywh")&&(x=p.nc.split("#xywh=")[1].split(","),4===x.length&&y.If({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),n.push(y);A={id:c.Be++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
513
- segmentIndex:new hj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0};c.i.imageStreams.push(A);wm(c);return z.return(Zd(A))}})};
514
- q.Rf=function(a,b,c){var d=this,e,f,g,h;return I(function(k){switch(k.g){case 1:if(d.l!=lm&&d.l!=zm)throw new N(1,7,7004);if(c){k.B(2);break}return C(k,Om(d,a),3);case 3:c=k.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(l){}return C(k,Pm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.kf();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return C(k,new Promise(function(l,m){d.o.la(f,"load",l);d.o.la(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k.return(h);
515
- case 5:throw new N(1,2,2012);}})};function Om(a,b){var c,d;return I(function(e){switch(e.g){case 1:c=lh(b);if(d=Sm[c])return e.return(d);wa(e,2);return C(e,nh(b,a.F,a.g.streaming.retryParameters),4);case 4:d=e.h;Aa(e,3);break;case 2:Ba(e);case 3:if(d)return e.return(d);throw new N(1,2,2011,c);}})}
516
- function Pm(a,b,c,d,e,f,g){var h,k,l,m;return I(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,Qm(a,b,a.F,a.g.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=Rm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=li(l),e="text/vtt");m=document.createElement("track");var p=a.V,r=b;try{if(p.g.enabled){var u=Nk(p);u.ot=Zk;u.su=!0;var w=Qk(u);var y=Rk(r,w)}else y=r}catch(x){ab("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),y=r}m.src=y;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
517
- a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function Qm(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){e=hf;f=bf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&Sk(k,f,{ot:Zk,su:!0})}catch(l){ab("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
518
- function Rm(a,b,c,d){var e=Mc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=M(b),b=c.parseMedia(b,a),Kk(b,d);throw new N(2,2,2014,c);}q.Me=function(a,b){this.Ae.width=a;this.Ae.height=b};q.Ee=function(a){if(this.l==lm){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Nc||d.ua||d.Ya||(d.Nc=!1,Qj(b,d,a));b=!0}}else b=!1;return b};
519
- q.pg=function(){$a("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.qg=function(){return this.zd};
520
- function wl(a){var b=ll();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Ee(d))}};b.textDisplayFactory=function(){return a.nd?new Ck(a.h,a.nd):new xk(a.h)};return b}q.Kf=function(a){this.nd=a};
521
- function am(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new lj,l=e.closedCaptions.get(g);h={id:a.Be++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
522
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:zc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1};b.textStreams.push(h);c.add(g)}}function $l(a,b){return I(function(c){if(1==c.g)return C(c,Tm(a,b),2);Hm(a,b);D(c)})}
523
- function Tm(a,b){var c;return I(function(d){if(1==d.g)return c=a.j?a.j.j:null,C(d,Gd(c,b),2);vm(b);D(d)})}function Hm(a,b){if(a.l!=Ql){for(var c=a.g.restrictions,d=a.Ae,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Fd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&wm(a);if((c=a.m?a.m.g:null)&&a.m.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,bm(a,c.keySystem,e.video),bm(a,c.keySystem,e.audio);Um(a,b)}}
524
- function bm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Kg(a.m,e.initDataType,e.initData)}}}
525
- function rm(a,b){var c,d,e,f,g;return I(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return I(function(r){if(1==r.g)return k?C(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.yb(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(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)})}
526
- function Wl(a){var b=a.ge();if(a.u&&a.M&&a.A){var c=a.H;c.j=b;nj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);gm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Ll("buffering",b))}function hm(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Ll("ratechange"),a.dispatchEvent(b))}function gm(a){if(a.u&&a.M){var b=a.u.g;a.M.g==Ee?pl(b,"buffering"):a.h.paused?pl(b,"paused"):a.h.ended?pl(b,"ended"):pl(b,"playing")}}
527
- function xm(a){if(a.T()){var b=a.ec();if(Number.isFinite(b.end)&&!(a.h.currentTime<b.start)){if(a.g.streaming.liveSync){var c=a.g.streaming.liveSyncMaxLatency;var d=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.g.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);var e=a.h.playbackRate,f=b.end-a.h.currentTime,g=0;if(a.l==zm){var h=a.h.buffered;0<h.length&&(g=h.end(h.length-1),g=Math.max(d,
528
- g-b.end))}c&&d&&f-g>c?e!=d&&a.Mf(d):1!==e&&0!==e&&a.Ze()}}}function nm(a){try{Um(a,a.i)}catch(c){return Vl(a,c),!1}var b=fe(a.i.variants);b=a.Za.create(b);a.s.setVariants(Array.from(b.values()));return!0}
529
- function Ml(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,fb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.wd.stop();d&&Im(a,!0,void 0,!1,!1)}
530
- function Im(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=nm(a)?a.s.chooseVariant():null)&&jm(a,f,e,b,c,d)}
531
- function jm(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Uj(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Uj(a.j,b,d,e,f,c);d=null;g&&(d=Xd(g));b=Xd(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&ei(a.L,b),c=Ll("adaptation",c),Vm(a,c)):Wm(a,d,b)}}
532
- function Km(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=de(c);b=de(b);Wm(a,c,b)}function sm(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Uc(a.g.preferredTextLanguage);c=Uc(c.language);if(2==a.g.autoShowText)return Tc(c,d);if(3==a.g.autoShowText)return a=Uc(b.language),Tc(c,d)&&!Tc(a,c);$a("Invalid autoShowText setting!");return!1}function wm(a){var b=Ll("trackschanged");Vm(a,b)}
533
- function Wm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&ei(a.L,c);c=Ll("variantchanged",b);Vm(a,c)}function Jm(a){var b=Ll("textchanged");Vm(a,b)}function tm(a){var b=Ll("texttrackvisibility");Vm(a,b)}function um(a){a.g.abr.enabled||Al(a);var b=(new Map).set("newStatus",a.g.abr.enabled);Vm(a,Ll("abrstatuschanged",b))}function Al(a,b){b=void 0===b?!0:b;if(a.l==lm){a.wd.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&nm(a)}}
534
- q.$d=function(a,b){if(!this.g.abr.enabled||this.l===Ql||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.wd.Ca(1);b=this.cb().video.reduce(function(f,g){return f+g.end-g.start},0);Im(this,!0,b,!0,!1);return!0}return!1};
535
- function Vl(a,b){if(a.l!=Ql){2===b.severity&&Al(a,!1);var c=Ll("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Zl(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(Ll(b,c))}
536
- function Ul(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return null;var c=a.h.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.h.error.message)}
537
- function em(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(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=t(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=t(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&&!Xm.includes(l)}h!=f.allowedByKeySystem&&
538
- (e=!0)}}}if(!e||nm(a))(b=a.j.j)&&!b.allowedByKeySystem&&Im(a),e&&wm(a)}}function fm(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Ll("expirationupdated");a.dispatchEvent(b)}function im(a,b,c){0<b&&(a.T()||a.Jf(b));b=a.getDuration();c<b&&(a.T()||a.Aa(c))}
539
- function Um(a,b){a=a.m?a.m.qd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?Xm.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
540
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new N(2,4,4012,a);}function vm(a){if(!a.variants.some(ee))throw new N(2,4,4032);}function Vm(a,b){I(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=Ql&&a.dispatchEvent(b);D(c)})}function Mm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Uc(c.language)):b.add("und");return b}
541
- function Lm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Uc(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
542
- h.push({language:l,role:m,label:n})}});return h}function Rl(){return new N(2,7,7E3)}function Kl(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function ok(){return{mediaElement:null,mimeType:null,startTime:null,Nd:NaN,uri:null}}function Sl(a){return new Promise(function(b,c){a.Jb=function(){return c(Rl())};a.Hd=function(){return b()};a.onError=function(d){return c(d)};a.Jd=function(){return c(Rl())}})}L("shaka.Player",T);
543
- T.prototype.setVideoContainer=T.prototype.Kf;T.prototype.getManifestParserFactory=T.prototype.qg;T.prototype.getManifest=T.prototype.pg;T.prototype.retryStreaming=T.prototype.Ee;T.prototype.setMaxHardwareResolution=T.prototype.Me;T.prototype.addChaptersTrack=T.prototype.Rf;T.prototype.addThumbnailsTrack=T.prototype.Tf;T.prototype.addTextTrackAsync=T.prototype.Sf;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.cb;T.prototype.getPresentationStartTimeAsDate=T.prototype.lf;
544
- T.prototype.getPlayheadTimeAsDate=T.prototype.wg;T.prototype.setTextTrackVisibility=T.prototype.lh;T.prototype.getChapters=T.prototype.jg;T.prototype.getChaptersTracks=T.prototype.kf;T.prototype.isTextTrackVisible=T.prototype.ie;T.prototype.selectVariantsByLabel=T.prototype.gh;T.prototype.selectTextLanguage=T.prototype.Je;T.prototype.selectAudioLanguage=T.prototype.Ie;T.prototype.getTextLanguages=T.prototype.yg;T.prototype.getAudioLanguages=T.prototype.gg;T.prototype.getTextLanguagesAndRoles=T.prototype.zg;
545
- T.prototype.getAudioLanguagesAndRoles=T.prototype.hg;T.prototype.selectVariantTrack=T.prototype.Df;T.prototype.selectTextTrack=T.prototype.Cf;T.prototype.getThumbnails=T.prototype.Bg;T.prototype.getImageTracks=T.prototype.ng;T.prototype.getTextTracks=T.prototype.Zb;T.prototype.getVariantTracks=T.prototype.Cb;T.prototype.cancelTrickPlay=T.prototype.Ze;T.prototype.trickPlay=T.prototype.Mf;T.prototype.getPlaybackRate=T.prototype.rd;T.prototype.isBuffering=T.prototype.ge;T.prototype.getKeyStatuses=T.prototype.qd;
546
- T.prototype.getActiveSessionsMetadata=T.prototype.be;T.prototype.getExpiration=T.prototype.Ic;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Gg;T.prototype.seekRange=T.prototype.ec;T.prototype.isAudioOnly=T.prototype.Jg;T.prototype.isInProgress=T.prototype.Fb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.jf;T.prototype.getAssetUri=T.prototype.ce;T.prototype.getNetworkingEngine=T.prototype.zb;
547
- T.prototype.getMediaElement=T.prototype.tg;T.prototype.getManifestType=T.prototype.rg;T.prototype.getLoadMode=T.prototype.og;T.prototype.resetConfiguration=T.prototype.dh;T.prototype.getBufferFullness=T.prototype.ig;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.qh;T.prototype.unload=T.prototype.Se;T.prototype.detach=T.prototype.detach;T.prototype.attachCanvas=T.prototype.Vf;
509
+ q.Sf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,w,y,x,A;return H(function(z){switch(z.g){case 1:if(h.l!=km&&h.l!=ym)throw new N(1,7,7004);if(d){z.B(2);break}return C(z,Nm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(B){}if(h.l!=ym){z.B(4);break}g&&(c="forced");return C(z,Om(h,a,b,c,d,f||"",k),5);case 5:l=h.Zb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return vm(h),z.return(m);throw new N(1,2,2012);case 4:n=
510
+ zc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.B(6);break}return C(z,Pm(h,a,h.F,h.g.streaming.retryParameters),7);case 7:r=z.h,u=Qm(h,r,d,k),w=new Blob([u],{type:"text/vtt"}),a=ki(w),d="text/vtt";case 6:y={id:h.Ce++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:jj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:n.da,primary:!1,
511
+ trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0};x=Bc(y.mimeType,y.codecs);A=Kc(x);if(!A)throw new N(2,2,2014,d);h.i.textStreams.push(y);vm(h);return z.return(Xd(y))}})};
512
+ q.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A;return H(function(z){switch(z.g){case 1:if(c.l!=km&&c.l!=ym)throw new N(1,7,7004);if(c.l==ym)throw new N(1,2,2016);if(b){z.B(2);break}return C(z,Nm(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new N(1,2,2017,a);d=zc;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new N(1,4,4045);return C(z,Pm(c,a,c.F,c.g.streaming.retryParameters),4);case 4:f=z.h;g=Lc[b];if(!g)throw new N(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
513
+ segmentEnd:e,vttOffset:0};l=M(f);m=h.parseMedia(l,k);n=[];p={};r=t(m);for(u=r.next();!u.done;p={nc:p.nc},u=r.next())w=u.value,p.nc=tc([a],[w.U])[0],y=new P(w.startTime,w.endTime,function(B){return function(){return[B.nc]}}(p),0,null,null,0,0,Infinity),p.nc.includes("#xywh")&&(x=p.nc.split("#xywh=")[1].split(","),4===x.length&&y.If({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),n.push(y);A={id:c.Ce++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
514
+ segmentIndex:new gj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.wc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0};c.i.imageStreams.push(A);vm(c);return z.return(Yd(A))}})};
515
+ q.Rf=function(a,b,c){var d=this,e,f,g,h;return H(function(k){switch(k.g){case 1:if(d.l!=km&&d.l!=ym)throw new N(1,7,7004);if(c){k.B(2);break}return C(k,Nm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(l){}return C(k,Om(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.lf();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return C(k,new Promise(function(l,m){d.o.la(f,"load",l);d.o.la(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k.return(h);
516
+ case 5:throw new N(1,2,2012);}})};function Nm(a,b){var c,d;return H(function(e){switch(e.g){case 1:c=kh(b);if(d=Rm[c])return e.return(d);ua(e,2);return C(e,mh(b,a.F,a.g.streaming.retryParameters),4);case 4:d=e.h;xa(e,3);break;case 2:za(e);case 3:if(d)return e.return(d);throw new N(1,2,2011,c);}})}
517
+ function Om(a,b,c,d,e,f,g){var h,k,l,m;return H(function(n){if(1==n.g)return"text/vtt"!=e||g.length?C(n,Pm(a,b,a.F,a.g.streaming.retryParameters),3):n.B(2);2!=n.g&&(h=n.h,k=Qm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=ki(l),e="text/vtt");m=document.createElement("track");var p=a.V,r=b;try{if(p.g.enabled){var u=Mk(p);u.ot=Yk;u.su=!0;var w=Pk(u);var y=Qk(r,w)}else y=r}catch(x){Za("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),y=r}m.src=y;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
518
+ a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function Pm(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){e=gf;f=af([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&Rk(k,f,{ot:Yk,su:!0})}catch(l){Za("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return C(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
519
+ function Qm(a,b,c,d){var e=Lc[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=M(b),b=c.parseMedia(b,a),Jk(b,d);throw new N(2,2,2014,c);}q.Ne=function(a,b){this.Be.width=a;this.Be.height=b};q.Fe=function(a){if(this.l==km){var b=this.j;a=void 0===a?.1:a;if(b.l.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.h.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Nc||d.ua||d.Ya||(d.Nc=!1,Pj(b,d,a));b=!0}}else b=!1;return b};
520
+ q.pg=function(){Xa("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.qg=function(){return this.Bd};
521
+ function vl(a){var b=kl();b.streaming.failureCallback=function(c){if(a.T()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Fe(d))}};b.textDisplayFactory=function(){return a.nd?new Bk(a.h,a.nd):new wk(a.h)};return b}q.Kf=function(a){this.nd=a};
522
+ function $l(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new kj,l=e.closedCaptions.get(g);h={id:a.Ce++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
523
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:yc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1};b.textStreams.push(h);c.add(g)}}function Zl(a,b){return H(function(c){if(1==c.g)return C(c,Sm(a,b),2);Gm(a,b);D(c)})}
524
+ function Sm(a,b){var c;return H(function(d){if(1==d.g)return c=a.j?a.j.j:null,C(d,Fd(c,b),2);um(b);D(d)})}function Gm(a,b){if(a.l!=Pl){for(var c=a.g.restrictions,d=a.Be,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Ed(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&vm(a);if((c=a.m?a.m.g:null)&&a.m.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,am(a,c.keySystem,e.video),am(a,c.keySystem,e.audio);Tm(a,b)}}
525
+ function am(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,Jg(a.m,e.initDataType,e.initData)}}}
526
+ function qm(a,b){var c,d,e,f,g;return H(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return H(function(r){if(1==r.g)return k?C(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.zb(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},C(h,e(c,b),2);if(3!=h.g)return f=h.h,C(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)})}
527
+ function Vl(a){var b=a.he();if(a.u&&a.M&&a.A){var c=a.H;c.j=b;mj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);fm(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Kl("buffering",b))}function gm(a){var b=a.h.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Kl("ratechange"),a.dispatchEvent(b))}function fm(a){if(a.u&&a.M){var b=a.u.g;a.M.g==De?ol(b,"buffering"):a.h.paused?ol(b,"paused"):a.h.ended?ol(b,"ended"):ol(b,"playing")}}
528
+ function wm(a){if(a.T()){var b=a.ec();if(Number.isFinite(b.end)&&!(a.h.currentTime<b.start)){if(a.g.streaming.liveSync){var c=a.g.streaming.liveSyncMaxLatency;var d=a.g.streaming.liveSyncPlaybackRate}else a.i&&a.i.serviceDescription&&(c=a.i.serviceDescription.maxLatency||a.g.streaming.liveSyncMaxLatency,d=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSyncPlaybackRate);var e=a.h.playbackRate,f=b.end-a.h.currentTime,g=0;if(a.l==ym){var h=a.h.buffered;0<h.length&&(g=h.end(h.length-1),g=Math.max(d,
529
+ g-b.end))}c&&d&&f-g>c?e!=d&&a.Mf(d):1!==e&&0!==e&&a.$e()}}}function mm(a){try{Tm(a,a.i)}catch(c){return Ul(a,c),!1}var b=ee(a.i.variants);b=a.Za.create(b);a.s.setVariants(Array.from(b.values()));return!0}
530
+ function Ll(a){function b(g){var h="";g.video&&(h+="video:"+g.video.id);g.audio&&(h=h+(h?"&":"")+("audio:"+g.audio.id));return h}for(var c=Date.now()/1E3,d=!1,e=t(a.i.variants),f=e.next();!f.done;f=e.next())f=f.value,0<f.disabledUntilTime&&f.disabledUntilTime<=c&&(f.disabledUntilTime=0,d=!0,db("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.xd.stop();d&&Hm(a,!0,void 0,!1,!1)}
531
+ function Hm(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=mm(a)?a.s.chooseVariant():null)&&im(a,f,e,b,c,d)}
532
+ function im(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.j;if(b==g)d&&Tj(a.j,b,d,e,!0);else{var h=a.u.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Tj(a.j,b,d,e,f,c);d=null;g&&(d=Wd(g));b=Wd(b);c?(c=(new Map).set("oldTrack",d).set("newTrack",b),a.L&&di(a.L,b),c=Kl("adaptation",c),Um(a,c)):Vm(a,d,b)}}
533
+ function Jm(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ce(c);b=ce(b);Vm(a,c,b)}function rm(a,b,c){if(0==a.g.autoShowText)return!1;if(1==a.g.autoShowText)return!0;var d=Tc(a.g.preferredTextLanguage);c=Tc(c.language);if(2==a.g.autoShowText)return Sc(c,d);if(3==a.g.autoShowText)return a=Tc(b.language),Sc(c,d)&&!Sc(a,c);Xa("Invalid autoShowText setting!");return!1}function vm(a){var b=Kl("trackschanged");Um(a,b)}
534
+ function Vm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&di(a.L,c);c=Kl("variantchanged",b);Um(a,c)}function Im(a){var b=Kl("textchanged");Um(a,b)}function sm(a){var b=Kl("texttrackvisibility");Um(a,b)}function tm(a){a.g.abr.enabled||zl(a);var b=(new Map).set("newStatus",a.g.abr.enabled);Um(a,Kl("abrstatuschanged",b))}function zl(a,b){b=void 0===b?!0:b;if(a.l==km){a.xd.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&mm(a)}}
535
+ q.ae=function(a,b){if(!this.g.abr.enabled||this.l===Pl||!navigator.onLine)return!1;if(this.i.variants.some(function(f){return(f=f[a.type])&&f.id!==a.id?"audio"==a.type?a.language===f.language:!0:!1})){for(var c=t(this.i.variants),d=c.next();!d.done;d=c.next()){d=d.value;var e=d[a.type];e&&e.id===a.id&&(d.disabledUntilTime=Date.now()/1E3+b)}this.xd.Ca(1);b=this.cb().video.reduce(function(f,g){return f+g.end-g.start},0);Hm(this,!0,b,!0,!1);return!0}return!1};
536
+ function Ul(a,b){if(a.l!=Pl){2===b.severity&&zl(a,!1);var c=Kl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Yl(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(Kl(b,c))}
537
+ function Tl(a){if(!a.h.error)return null;var b=a.h.error.code;if(1==b)return null;var c=a.h.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.h.error.message)}
538
+ function dm(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(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=t(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=t(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&&!Wm.includes(l)}h!=f.allowedByKeySystem&&
539
+ (e=!0)}}}if(!e||mm(a))(b=a.j.j)&&!b.allowedByKeySystem&&Hm(a),e&&vm(a)}}function em(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Kl("expirationupdated");a.dispatchEvent(b)}function hm(a,b,c){0<b&&(a.T()||a.Jf(b));b=a.getDuration();c<b&&(a.T()||a.Aa(c))}
540
+ function Tm(a,b){a=a.m?a.m.qd():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?Wm.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
541
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new N(2,4,4012,a);}function um(a){if(!a.variants.some(de))throw new N(2,4,4032);}function Um(a,b){H(function(c){if(1==c.g)return C(c,Promise.resolve(),2);a.l!=Pl&&a.dispatchEvent(b);D(c)})}function Lm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Tc(c.language)):b.add("und");return b}
542
+ function Km(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Tc(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
543
+ h.push({language:l,role:m,label:n})}});return h}function Ql(){return new N(2,7,7E3)}function Jl(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function nk(){return{mediaElement:null,mimeType:null,startTime:null,Od:NaN,uri:null}}function Rl(a){return new Promise(function(b,c){a.Kb=function(){return c(Ql())};a.Id=function(){return b()};a.onError=function(d){return c(d)};a.Kd=function(){return c(Ql())}})}L("shaka.Player",T);
544
+ T.prototype.setVideoContainer=T.prototype.Kf;T.prototype.getManifestParserFactory=T.prototype.qg;T.prototype.getManifest=T.prototype.pg;T.prototype.retryStreaming=T.prototype.Fe;T.prototype.setMaxHardwareResolution=T.prototype.Ne;T.prototype.addChaptersTrack=T.prototype.Rf;T.prototype.addThumbnailsTrack=T.prototype.Tf;T.prototype.addTextTrackAsync=T.prototype.Sf;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.cb;T.prototype.getPresentationStartTimeAsDate=T.prototype.mf;
545
+ T.prototype.getPlayheadTimeAsDate=T.prototype.wg;T.prototype.setTextTrackVisibility=T.prototype.lh;T.prototype.getChapters=T.prototype.jg;T.prototype.getChaptersTracks=T.prototype.lf;T.prototype.isTextTrackVisible=T.prototype.je;T.prototype.selectVariantsByLabel=T.prototype.gh;T.prototype.selectTextLanguage=T.prototype.Ke;T.prototype.selectAudioLanguage=T.prototype.Je;T.prototype.getTextLanguages=T.prototype.yg;T.prototype.getAudioLanguages=T.prototype.gg;T.prototype.getTextLanguagesAndRoles=T.prototype.zg;
546
+ T.prototype.getAudioLanguagesAndRoles=T.prototype.hg;T.prototype.selectVariantTrack=T.prototype.Df;T.prototype.selectTextTrack=T.prototype.Cf;T.prototype.getThumbnails=T.prototype.Bg;T.prototype.getImageTracks=T.prototype.ng;T.prototype.getTextTracks=T.prototype.Zb;T.prototype.getVariantTracks=T.prototype.Db;T.prototype.cancelTrickPlay=T.prototype.$e;T.prototype.trickPlay=T.prototype.Mf;T.prototype.getPlaybackRate=T.prototype.rd;T.prototype.isBuffering=T.prototype.he;T.prototype.getKeyStatuses=T.prototype.qd;
547
+ T.prototype.getActiveSessionsMetadata=T.prototype.ce;T.prototype.getExpiration=T.prototype.Ic;T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.keySystem=T.prototype.keySystem;T.prototype.goToLive=T.prototype.Gg;T.prototype.seekRange=T.prototype.ec;T.prototype.isAudioOnly=T.prototype.Jg;T.prototype.isInProgress=T.prototype.Gb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.kf;T.prototype.getAssetUri=T.prototype.de;T.prototype.getNetworkingEngine=T.prototype.Ab;
548
+ T.prototype.getMediaElement=T.prototype.tg;T.prototype.getManifestType=T.prototype.rg;T.prototype.getLoadMode=T.prototype.og;T.prototype.resetConfiguration=T.prototype.dh;T.prototype.getBufferFullness=T.prototype.ig;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.qh;T.prototype.unload=T.prototype.Te;T.prototype.detach=T.prototype.detach;T.prototype.attachCanvas=T.prototype.Vf;
548
549
  T.prototype.attach=T.prototype.yc;
549
- T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return I(function(h){if(1==h.g)return b={},a?C(h,ch(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(ed()){for(var l in kh)k[l]=!0;for(var m in mh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=ed()?!!kh[n]:fd(n);for(var p in l)k[p]=
550
- ed()?!!mh[p]:fd(l[p]);c=k;p='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",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(v(Ec));
551
- k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=ed()?Lc(l)?!0:gb(l)||(Vb(l)?!0:!1):fd(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Ym;for(g in f)e[g]=f[g]();return h.return(e)})};
552
- T.isBrowserSupported=function(){window.Promise||$a("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||jd("Trident/"))return!1;var a=od();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:ed()?!0:fd("application/x-mpegurl")};T.setAdManagerFactory=function(a){zl=a};
553
- T.registerSupportPlugin=function(a,b){Ym[a]=b};T.prototype.destroy=T.prototype.destroy;var Ql=0,vl=1,lm=2,zm=3;T.LoadMode={DESTROYED:Ql,NOT_LOADED:vl,MEDIA_SOURCE:lm,SRC_EQUALS:zm};T.version="v4.4.0";var Zm=["4","4"];pe=new function(a){this.g=a;this.i=qe;this.h=re}(new ne(Number(Zm[0]),Number(Zm[1])));
554
- var Xm=["output-restricted","internal-error"],Ym={},zl=null,Pl={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"},Sm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
555
- ssa:"text/x-ssa",ass:"text/x-ssa"};function $m(){this.h=[];this.j=this.i=this.g=0};function U(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.l=this.h.getVolume();this.j=new lf;this.j.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=U.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
550
+ T.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return H(function(h){if(1==h.g)return b={},a?C(h,bh(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(dd()){for(var l in jh)k[l]=!0;for(var m in lh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=dd()?!!jh[n]:ed(n);for(var p in l)k[p]=
551
+ dd()?!!lh[p]:ed(l[p]);c=k;p='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",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(v(Cc));
552
+ k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=dd()?Kc(l)?!0:eb(l)||(Ub(l)?!0:!1):ed(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Xm;for(g in f)e[g]=f[g]();return h.return(e)})};
553
+ T.isBrowserSupported=function(){window.Promise||Xa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||id("Trident/"))return!1;var a=nd();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:dd()?!0:ed("application/x-mpegurl")};T.setAdManagerFactory=function(a){yl=a};
554
+ T.registerSupportPlugin=function(a,b){Xm[a]=b};T.prototype.destroy=T.prototype.destroy;var Pl=0,ul=1,km=2,ym=3;T.LoadMode={DESTROYED:Pl,NOT_LOADED:ul,MEDIA_SOURCE:km,SRC_EQUALS:ym};T.version="v4.4.1";var Ym=["4","4"];oe=new function(a){this.g=a;this.i=pe;this.h=qe}(new me(Number(Ym[0]),Number(Ym[1])));
555
+ var Wm=["output-restricted","internal-error"],Xm={},yl=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"},Rm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
556
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Zm(){this.h=[];this.j=this.i=this.g=0};function U(a,b,c){var d=this;this.g=a;this.h=b;this.m=c;this.i=!1;this.l=this.h.getVolume();this.j=new kf;this.j.D(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.D(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=U.prototype;q.getDuration=function(){return this.g.getDuration()};q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};
556
557
  q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){return this.h.setVolume(a)};q.isMuted=function(){return 0==this.h.getVolume()};
557
558
  q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};
558
559
  q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};
559
560
  q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};L("shaka.ads.ClientSideAd",U);U.prototype.release=U.prototype.release;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getTimeOffset=U.prototype.getTimeOffset;
560
561
  U.prototype.getMediaUrl=U.prototype.getMediaUrl;U.prototype.getAdvertiserName=U.prototype.getAdvertiserName;U.prototype.getCreativeAdId=U.prototype.getCreativeAdId;U.prototype.getAdId=U.prototype.getAdId;U.prototype.getVastMediaWidth=U.prototype.getVastMediaWidth;U.prototype.getVastMediaHeight=U.prototype.getVastMediaHeight;U.prototype.getVastMediaBitrate=U.prototype.getVastMediaBitrate;U.prototype.getDescription=U.prototype.getDescription;U.prototype.getTitle=U.prototype.getTitle;
561
562
  U.prototype.getPositionInSequence=U.prototype.getPositionInSequence;U.prototype.getSequenceLength=U.prototype.getSequenceLength;U.prototype.setMuted=U.prototype.setMuted;U.prototype.resize=U.prototype.resize;U.prototype.isLinear=U.prototype.isLinear;U.prototype.isMuted=U.prototype.isMuted;U.prototype.setVolume=U.prototype.setVolume;U.prototype.getVolume=U.prototype.getVolume;U.prototype.play=U.prototype.play;U.prototype.pause=U.prototype.pause;U.prototype.skip=U.prototype.skip;
562
- U.prototype.canSkipNow=U.prototype.canSkipNow;U.prototype.getTimeUntilSkippable=U.prototype.getTimeUntilSkippable;U.prototype.isSkippable=U.prototype.isSkippable;U.prototype.isPaused=U.prototype.isPaused;U.prototype.getRemainingTime=U.prototype.getRemainingTime;U.prototype.getMinSuggestedDuration=U.prototype.getMinSuggestedDuration;U.prototype.getDuration=U.prototype.getDuration;function an(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new lf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.4.0");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
563
- function(g){bn(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){cn(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.la(this.i,"play",function(){f.A=!0})}an.prototype.configure=function(a){this.C=a};an.prototype.stop=function(){this.g&&this.g.stop();this.o&&Bk(this.o)};an.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
564
- function cn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new P("ad-error",b));dn(a,null);a.m(new P("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
565
- function bn(a,b){a.m(new P("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.C.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.u);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume)})}else a.g=b.getAdsManager(a.i,a.u);a.m(new P("ima-ad-manager-loaded",(new Map).set("imaAdManager",
566
- a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new P("ad-cue-points-changed",(new Map).set("cuepoints",b)))}en(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,fn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,fn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
567
- a.i.offsetHeight,fn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,fn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A?a.g.start():a.h.la(a.i,"play",function(){a.A=!0;a.g.start()})}catch(f){dn(a,null)}}function fn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
568
- function en(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new P(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){cn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){gn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){gn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
569
- function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){dn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){dn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
563
+ U.prototype.canSkipNow=U.prototype.canSkipNow;U.prototype.getTimeUntilSkippable=U.prototype.getTimeUntilSkippable;U.prototype.isSkippable=U.prototype.isSkippable;U.prototype.isPaused=U.prototype.isPaused;U.prototype.getRemainingTime=U.prototype.getRemainingTime;U.prototype.getMinSuggestedDuration=U.prototype.getMinSuggestedDuration;U.prototype.getDuration=U.prototype.getDuration;function $m(a,b,c,d,e){var f=this;this.o=a;this.i=b;this.A=!1;this.s=this.C=null;this.F=NaN;this.m=e;this.j=null;this.h=new kf;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.4.1");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
564
+ function(g){an(f,g)});this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){bn(f,g)});this.h.D(this.i,"ended",function(){f.l.contentComplete()});this.h.la(this.i,"play",function(){f.A=!0})}$m.prototype.configure=function(a){this.C=a};$m.prototype.stop=function(){this.g&&this.g.stop();this.o&&Ak(this.o)};$m.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};
565
+ function bn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new O("ad-error",b));cn(a,null);a.m(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
566
+ function an(a,b){a.m(new O("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.F)));if(a.C.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.u);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.D(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.D(a.i,"volumechange",function(){a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume)})}else a.g=b.getAdsManager(a.i,a.u);a.m(new O("ima-ad-manager-loaded",(new Map).set("imaAdManager",
567
+ a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.m(new O("ad-cue-points-changed",(new Map).set("cuepoints",b)))}dn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,en(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.D(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,en(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
568
+ a.i.offsetHeight,en(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.D(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,en(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.A?a.g.start():a.h.la(a.i,"play",function(){a.A=!0;a.g.start()})}catch(f){cn(a,null)}}function en(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
569
+ function dn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.m(new O(d,c))}a.h.D(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){bn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){fn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.STARTED,function(c){fn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.D(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
570
+ function(c){b(c,"ad-third-quartile")});a.h.D(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.D(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){cn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){cn(a,c)});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.D(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
570
571
  a.h.D(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.D(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.D(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.D(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.D(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
571
572
  a.h.D(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.D(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.D(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.D(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.D(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.D(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.D(a.g,
572
573
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.D(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.D(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.D(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
573
- function gn(a,b){var c=b.getAd();c?(a.j=new U(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new P("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))):$a("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
574
- function dn(a,b){a.m(new P("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function V(a,b){this.g=a;this.i=null;this.h=b}q=V.prototype;q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
574
+ function fn(a,b){var c=b.getAd();c?(a.j=new U(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.m(new O("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))):Xa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
575
+ function cn(a,b){a.m(new O("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function V(a,b){this.g=a;this.i=null;this.h=b}q=V.prototype;q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
575
576
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.h.muted=a};
576
577
  q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};
577
578
  q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};L("shaka.ads.ServerSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPodIndex=V.prototype.getPodIndex;
578
579
  V.prototype.getTimeOffset=V.prototype.getTimeOffset;V.prototype.getMediaUrl=V.prototype.getMediaUrl;V.prototype.getAdvertiserName=V.prototype.getAdvertiserName;V.prototype.getCreativeAdId=V.prototype.getCreativeAdId;V.prototype.getAdId=V.prototype.getAdId;V.prototype.getVastMediaWidth=V.prototype.getVastMediaWidth;V.prototype.getVastMediaHeight=V.prototype.getVastMediaHeight;V.prototype.getVastMediaBitrate=V.prototype.getVastMediaBitrate;V.prototype.getDescription=V.prototype.getDescription;
579
580
  V.prototype.getTitle=V.prototype.getTitle;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;V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;
580
- 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;V.prototype.getDuration=V.prototype.getDuration;function hn(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.A="";this.C=[];this.h=new lf;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 P("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){jn(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.A.length?
581
- e.j.resolve(e.A):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new V(f,e.l);e.u&&(e.m.i=e.u);e.i(new P("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
582
- var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.i=e.u)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new P("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new P("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new P("ad-third-quartile"))});
583
- this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new P("ad-complete"));e.i(new P("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new P("ad-skipped"));e.i(new P("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
584
- f;e.i(new P("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}hn.prototype.configure=function(){};hn.prototype.stop=function(){this.A="";this.o=null;this.C=[]};hn.prototype.release=function(){this.stop();this.h&&this.h.release()};hn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
585
- function jn(a,b){a.i(new P("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.D(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 W(){Te.call(this);this.g=this.h=null;this.i=new $m;this.l=navigator.language;this.j=null}ra(W,Te);q=W.prototype;q.setLocale=function(a){this.l=a};q.configure=function(a){this.j=a;this.h&&this.h.configure(this.j);this.g&&this.g.configure(this.j)};
586
- q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new an(a,b,this.l,c,function(e){if(e&&e.type)switch(e.type){case "ads-loaded":d.i.h.push(e.loadTime);break;case "ad-started":d.i.g++;break;case "ad-complete":d.i.i++;break;case "ad-skipped":d.i.j++}d.dispatchEvent(e)});this.h.configure(this.j)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);Te.prototype.release.call(this)};
587
- q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new P("ad-stopped"));this.i=new $m};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};q.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.u=a;b.g&&b.g.updateAdsRenderingSettings(b.u)};
588
- 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 hn(a,b,this.l,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.i.h.push(d.loadTime);break;case "ad-started":c.i.g++;break;case "ad-complete":c.i.i++;break;case "ad-skipped":c.i.j++}c.dispatchEvent(d)});this.g.configure(this.j)};
589
- 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)&&$a('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.4.0";c=this.g;c.j?a=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
590
- (c.F=!0),c.j=new Je,c.g.requestStream(a),c.A=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)&&$a('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.4.0";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.C};
591
- q.getStats=function(){var a=this.i;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)};L("shaka.ads.AdManager",W);
592
- W.prototype.onCueMetadataChange=W.prototype.onCueMetadataChange;W.prototype.onHlsTimedMetadata=W.prototype.onHlsTimedMetadata;W.prototype.onDashTimedMetadata=W.prototype.onDashTimedMetadata;W.prototype.getStats=W.prototype.getStats;W.prototype.getServerSideCuePoints=W.prototype.getServerSideCuePoints;W.prototype.replaceServerSideAdTagParameters=W.prototype.replaceServerSideAdTagParameters;W.prototype.requestServerSideStream=W.prototype.requestServerSideStream;W.prototype.initServerSide=W.prototype.initServerSide;
593
- W.prototype.updateClientSideAdsRenderingSettings=W.prototype.updateClientSideAdsRenderingSettings;W.prototype.requestClientSideAds=W.prototype.requestClientSideAds;W.prototype.onAssetUnload=W.prototype.onAssetUnload;W.prototype.release=W.prototype.release;W.prototype.initClientSide=W.prototype.initClientSide;W.prototype.configure=W.prototype.configure;W.prototype.setLocale=W.prototype.setLocale;W.ADS_LOADED="ads-loaded";W.AD_STARTED="ad-started";W.AD_FIRST_QUARTILE="ad-first-quartile";
594
- W.AD_MIDPOINT="ad-midpoint";W.AD_THIRD_QUARTILE="ad-third-quartile";W.AD_COMPLETE="ad-complete";W.AD_STOPPED="ad-stopped";W.AD_SKIPPED="ad-skipped";W.AD_VOLUME_CHANGED="ad-volume-changed";W.AD_MUTED="ad-muted";W.AD_PAUSED="ad-paused";W.AD_RESUMED="ad-resumed";W.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";W.CUEPOINTS_CHANGED="ad-cue-points-changed";W.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";W.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";W.AD_CLICKED="ad-clicked";W.AD_PROGRESS="ad-progress";
595
- W.AD_BUFFERING="ad-buffering";W.AD_IMPRESSION="ad-impression";W.AD_DURATION_CHANGED="ad-duration-changed";W.AD_CLOSED="ad-closed";W.AD_LOADED="ad-loaded";W.ALL_ADS_COMPLETED="all-ads-completed";W.AD_LINEAR_CHANGED="ad-linear-changed";W.AD_METADATA="ad-metadata";W.AD_RECOVERABLE_ERROR="ad-recoverable-error";W.AD_ERROR="ad-error";W.AD_BREAK_READY="ad-break-ready";W.AD_INTERACTION="ad-interaction";zl=function(){return new W};function kn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof P){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=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(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
596
- TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(zh(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}})}
597
- function ln(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=mn(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})}
598
- function mn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
599
- var nn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),on="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),pn=["loop","playbackRate"],qn=["pause","play"],rn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
600
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},sn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},tn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},un=[["getConfiguration","configure"]],vn=[["isTextTrackVisible","setTextTrackVisibility"]],wn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
601
- xn=["attach","attachCanvas","detach","load","unload"];function yn(a,b,c,d,e,f,g){var h=this;this.G=a;this.M=g;this.j=new dd(b);this.N=c;this.u=!1;this.s=d;this.F=e;this.I=f;this.h=this.m=!1;this.L="";this.o=null;this.A=function(){return zn(h)};this.C=function(k,l){k=ln(l);switch(k.type){case "event":var m=k.targetName,n=Re(k.event);h.s(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.N(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new N(p.severity,p.category,
602
- p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;An.add(this)}q=yn.prototype;q.destroy=function(){An.delete(this);Bn(this);Cn&&Dn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.C=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.xa=function(){return this.h};q.Ce=function(){return this.L};
603
- q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.ic();var a=new chrome.cast.SessionRequest(this.G,[],null,this.M,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(An),d=c.next();!d.done;d=c.next())En(d.value,b)},function(b){for(var c=t(An),d=c.next();!d.done;d=c.next())d=d.value,Fn="available"==b,d.j.ic()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Fn&&this.j.S(Gn);(a=Cn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
604
- En(this,a):Cn=null}else window.__onGCastApiAvailable!==Hn&&(In=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Hn)};q.Ke=function(a){this.o=a;this.h&&Jn(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return I(function(c){if(!b.m)throw new N(1,8,8E3);if(!Fn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new Je;chrome.cast.requestSession(function(d){return Kn(b,a,d)},function(d){return Ln(b,d)});return C(c,b.l,0)})};
605
- function Mn(a){if(a.h){var b=a.I();chrome.cast.requestSession(function(c){return Kn(a,b,c)},function(c){return Ln(a,c)})}}q.Vb=function(){if(this.h){Bn(this);if(Cn){Dn(this);try{Cn.stop(function(){},function(){})}catch(a){}Cn=null}zn(this)}};
606
- q.get=function(a,b){var c=this;if("video"==a){if(qn.includes(b))return function(){return c.Af.apply(c,[a,b].concat(v(La.apply(0,arguments))))}}else if("player"==a){if(tn[b]&&!this.get("player","isLive")())return function(){};if(wn.includes(b))return function(){return c.Af.apply(c,[a,b].concat(v(La.apply(0,arguments))))};if(xn.includes(b))return function(){return c.$g.apply(c,[a,b].concat(v(La.apply(0,arguments))))};if(rn[b]||sn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
607
- q.set=function(a,b,c){this.g[a][b]=c;Jn(this,{type:"set",targetName:a,property:b,value:c})};function Kn(a,b,c){Cn=c;c.addUpdateListener(a.A);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);zn(a);Jn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Ln(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))}
608
- q.Af=function(a,b){Jn(this,{type:"call",targetName:a,methodName:b,args:La.apply(2,arguments)})};q.$g=function(a,b){var c=La.apply(2,arguments),d=new Je,e=this.H.toString();this.H++;this.i[e]=d;try{Jn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function En(a,b){var c=a.I();a.l=new Je;a.u=!0;Kn(a,c,b)}function Dn(a){var b=Cn;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
609
- function zn(a){var b=Cn?"connected"==Cn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Bn(a)}a.h=b;a.L=b?Cn.receiver.friendlyName:"";a.j.ic()}function Bn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function Jn(a,b){b=kn(b);var c=Cn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},cb)}catch(d){throw b=new N(2,8,8005,d),c=new P("error",(new Map).set("detail",b)),a.s("player",c),a.Vb(),b;}}var Gn=.02,Fn=!1,Cn=null,In=null,An=new Set;
610
- function Hn(a){In?window.__onGCastApiAvailable=In:delete window.__onGCastApiAvailable;In=null;if(a)for(var b=t(An),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Nn(a,b,c,d){d=void 0===d?!1:d;Te.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.A=d;this.u=new Map;this.g=new yn(c,function(){return On(e)},function(){return Pn(e)},function(f,g){return Qn(e,f,g)},function(){return Rn(e)},function(){return Sn(e)},d);Tn(this)}ra(Nn,Te);q=Nn.prototype;
611
- q.destroy=function(a){a&&this.g.Vb();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;Te.prototype.release.call(this);return Promise.all(a)};q.Fg=function(){return this.l};q.vg=function(){return this.s};q.Xf=function(){return this.g.m&&Fn};q.xa=function(){return this.g.xa()};q.Ce=function(){return this.g.Ce()};
612
- q.cast=function(){var a=this,b;return I(function(c){return 1==c.g?(b=Sn(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.Se(),0):c.return()})};q.Ke=function(a){this.g.Ke(a)};q.mh=function(){Mn(this.g)};q.Vb=function(){this.g.Vb()};
613
- q.Yf=function(a,b){b=void 0===b?!1:b;var c=this;return I(function(d){if(1==d.g){if(a==c.C&&b==c.A)return d.return();c.C=a;c.A=b;c.g.Vb();return C(d,c.g.destroy(),2)}c.g=null;c.g=new yn(a,function(){return On(c)},function(){return Pn(c)},function(e,f){return Qn(c,e,f)},function(){return Rn(c)},function(){return Sn(c)},b);c.g.init();D(d)})};
614
- function Tn(a){a.g.init();a.m=new lf;for(var b=t(nn),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.xa()||(f=Re(f),a.j.dispatchEvent(f))});for(var d in Se)a.m.D(a.h,Se[d],function(f){a.g.xa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.oc=e,Object.defineProperty(a.l,b.oc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Un(a,f.oc)}}(b),set:function(f){return function(g){var h=f.oc;a.g.xa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={oc:b.oc};a.s={};Vn(a,
615
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Wn(a,f)}})});Xn(a);a.j=new Te;a.j.xd=a.l;a.o=new Te;a.o.xd=a.s}function Xn(a){var b=new Map;Vn(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)})}
616
- function Vn(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
617
- function Sn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.ce(),startTime:null};a.i.pause();for(var c=t(pn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(un);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(vn);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 On(a){var b=new P("caststatuschanged");a.dispatchEvent(b)}
618
- function Pn(a){var b=new P(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
619
- function Rn(a){for(var b=t(un),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=t(pn);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=t(pn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(vn);for(k=
620
- 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 P("error",h);a.h.dispatchEvent(h)})}
621
- function Un(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.xa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.xa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
622
- function Wn(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.zb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.jf()};
623
- if("setVideoContainer"==b)return function(c){return a.h.Kf(c)};if(a.g.xa()){if("getManifest"==b||"drmInfo"==b)return function(){$a(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){$a(b+"() does not work while casting!");return Promise.resolve()}}return a.g.xa()&&0==Object.keys(a.g.g.video).length&&(rn[b]||sn[b])||!a.g.xa()?a.h[b].bind(a.h):a.g.get("player",b)}
624
- function Qn(a,b,c){a.g.xa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}L("shaka.cast.CastProxy",Nn);Nn.prototype.changeReceiverId=Nn.prototype.Yf;Nn.prototype.forceDisconnect=Nn.prototype.Vb;Nn.prototype.suggestDisconnect=Nn.prototype.mh;Nn.prototype.setAppData=Nn.prototype.Ke;Nn.prototype.cast=Nn.prototype.cast;Nn.prototype.receiverName=Nn.prototype.Ce;Nn.prototype.isCasting=Nn.prototype.xa;Nn.prototype.canCast=Nn.prototype.Xf;Nn.prototype.getPlayer=Nn.prototype.vg;
625
- Nn.prototype.getVideo=Nn.prototype.Fg;Nn.prototype.destroy=Nn.prototype.destroy;function Yn(a,b,c,d){Te.call(this);var e=this;this.g=a;this.h=b;this.j=new lf;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.A=!1;this.u=!0;this.s=this.l=null;this.G=new dd(function(){Zn(e)});$n(this)}ra(Yn,Te);q=Yn.prototype;q.isConnected=function(){return this.F};q.Kg=function(){return this.o};q.jh=function(a){this.i=a};q.ag=function(){this.i=null};
581
+ 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;V.prototype.getDuration=V.prototype.getDuration;function gn(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.A="";this.C=[];this.h=new kf;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 O("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){hn(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.A.length?
582
+ e.j.resolve(e.A):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new V(f,e.l);e.u&&(e.m.i=e.u);e.i(new O("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
583
+ var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.i=e.u)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new O("ad-first-quartile"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new O("ad-midpoint"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new O("ad-third-quartile"))});
584
+ this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new O("ad-complete"));e.i(new O("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new O("ad-skipped"));e.i(new O("ad-stopped"))});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.C=
585
+ f;e.i(new O("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}gn.prototype.configure=function(){};gn.prototype.stop=function(){this.A="";this.o=null;this.C=[]};gn.prototype.release=function(){this.stop();this.h&&this.h.release()};gn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
586
+ function hn(a,b){a.i(new O("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.D(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(){Se.call(this);this.g=this.h=null;this.i=new Zm;this.l=navigator.language;this.j=null}qa(X,Se);q=X.prototype;q.setLocale=function(a){this.l=a};q.configure=function(a){this.j=a;this.h&&this.h.configure(this.j);this.g&&this.g.configure(this.j)};
587
+ q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.h&&this.h.release();this.h=new $m(a,b,this.l,c,function(e){if(e&&e.type)switch(e.type){case "ads-loaded":d.i.h.push(e.loadTime);break;case "ad-started":d.i.g++;break;case "ad-complete":d.i.i++;break;case "ad-skipped":d.i.j++}d.dispatchEvent(e)});this.h.configure(this.j)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);Se.prototype.release.call(this)};
588
+ q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new O("ad-stopped"));this.i=new Zm};q.requestClientSideAds=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.g&&b.g.destroy();b.l&&b.l.contentComplete();b.F=Date.now()/1E3;b.l.requestAds(a)};q.updateClientSideAdsRenderingSettings=function(a){if(!this.h)throw new N(1,10,10001);var b=this.h;b.u=a;b.g&&b.g.updateAdsRenderingSettings(b.u)};
589
+ 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 gn(a,b,this.l,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.i.h.push(d.loadTime);break;case "ad-started":c.i.g++;break;case "ad-complete":c.i.i++;break;case "ad-skipped":c.i.j++}c.dispatchEvent(d)});this.g.configure(this.j)};
590
+ 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)&&Xa('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.4.1";c=this.g;c.j?a=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
591
+ (c.F=!0),c.j=new Ie,c.g.requestStream(a),c.A=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)&&Xa('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.4.1";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.C};
592
+ q.getStats=function(){var a=this.i;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)};L("shaka.ads.AdManager",X);
593
+ 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;
594
+ X.prototype.updateClientSideAdsRenderingSettings=X.prototype.updateClientSideAdsRenderingSettings;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.configure=X.prototype.configure;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";
595
+ 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";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";
596
+ X.AD_BUFFERING="ad-buffering";X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";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_ERROR="ad-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";yl=function(){return new X};function jn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=t(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=t(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
597
+ TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(yh(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}})}
598
+ function kn(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=ln(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})}
599
+ function ln(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
600
+ var mn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),nn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),on=["loop","playbackRate"],pn=["pause","play"],qn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
601
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},rn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},sn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},tn=[["getConfiguration","configure"]],un=[["isTextTrackVisible","setTextTrackVisibility"]],vn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
602
+ wn=["attach","attachCanvas","detach","load","unload"];function xn(a,b,c,d,e,f,g){var h=this;this.G=a;this.M=g;this.j=new cd(b);this.N=c;this.u=!1;this.s=d;this.F=e;this.I=f;this.h=this.m=!1;this.L="";this.o=null;this.A=function(){return yn(h)};this.C=function(k,l){k=kn(l);switch(k.type){case "event":var m=k.targetName,n=Qe(k.event);h.s(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.N(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new N(p.severity,p.category,
603
+ p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;zn.add(this)}q=xn.prototype;q.destroy=function(){zn.delete(this);An(this);Bn&&Cn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.C=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.xa=function(){return this.h};q.De=function(){return this.L};
604
+ q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.ic();var a=new chrome.cast.SessionRequest(this.G,[],null,this.M,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(zn),d=c.next();!d.done;d=c.next())Dn(d.value,b)},function(b){for(var c=t(zn),d=c.next();!d.done;d=c.next())d=d.value,En="available"==b,d.j.ic()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});En&&this.j.S(Fn);(a=Bn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
605
+ Dn(this,a):Bn=null}else window.__onGCastApiAvailable!==Gn&&(Hn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Gn)};q.Le=function(a){this.o=a;this.h&&In(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return H(function(c){if(!b.m)throw new N(1,8,8E3);if(!En)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new Ie;chrome.cast.requestSession(function(d){return Jn(b,a,d)},function(d){return Kn(b,d)});return C(c,b.l,0)})};
606
+ function Ln(a){if(a.h){var b=a.I();chrome.cast.requestSession(function(c){return Jn(a,b,c)},function(c){return Kn(a,c)})}}q.Wb=function(){if(this.h){An(this);if(Bn){Cn(this);try{Bn.stop(function(){},function(){})}catch(a){}Bn=null}yn(this)}};
607
+ q.get=function(a,b){var c=this;if("video"==a){if(pn.includes(b))return function(){return c.Af.apply(c,[a,b].concat(v(Ka.apply(0,arguments))))}}else if("player"==a){if(sn[b]&&!this.get("player","isLive")())return function(){};if(vn.includes(b))return function(){return c.Af.apply(c,[a,b].concat(v(Ka.apply(0,arguments))))};if(wn.includes(b))return function(){return c.$g.apply(c,[a,b].concat(v(Ka.apply(0,arguments))))};if(qn[b]||rn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
608
+ q.set=function(a,b,c){this.g[a][b]=c;In(this,{type:"set",targetName:a,property:b,value:c})};function Jn(a,b,c){Bn=c;c.addUpdateListener(a.A);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.C);yn(a);In(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Kn(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))}
609
+ q.Af=function(a,b){In(this,{type:"call",targetName:a,methodName:b,args:Ka.apply(2,arguments)})};q.$g=function(a,b){var c=Ka.apply(2,arguments),d=new Ie,e=this.H.toString();this.H++;this.i[e]=d;try{In(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Dn(a,b){var c=a.I();a.l=new Ie;a.u=!0;Jn(a,c,b)}function Cn(a){var b=Bn;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.C)}
610
+ function yn(a){var b=Bn?"connected"==Bn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};An(a)}a.h=b;a.L=b?Bn.receiver.friendlyName:"";a.j.ic()}function An(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function In(a,b){b=jn(b);var c=Bn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},ab)}catch(d){throw b=new N(2,8,8005,d),c=new O("error",(new Map).set("detail",b)),a.s("player",c),a.Wb(),b;}}var Fn=.02,En=!1,Bn=null,Hn=null,zn=new Set;
611
+ function Gn(a){Hn?window.__onGCastApiAvailable=Hn:delete window.__onGCastApiAvailable;Hn=null;if(a)for(var b=t(zn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Mn(a,b,c,d){d=void 0===d?!1:d;Se.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.A=d;this.u=new Map;this.g=new xn(c,function(){return Nn(e)},function(){return On(e)},function(f,g){return Pn(e,f,g)},function(){return Qn(e)},function(){return Rn(e)},d);Sn(this)}qa(Mn,Se);q=Mn.prototype;
612
+ q.destroy=function(a){a&&this.g.Wb();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;Se.prototype.release.call(this);return Promise.all(a)};q.Fg=function(){return this.l};q.vg=function(){return this.s};q.Xf=function(){return this.g.m&&En};q.xa=function(){return this.g.xa()};q.De=function(){return this.g.De()};
613
+ q.cast=function(){var a=this,b;return H(function(c){return 1==c.g?(b=Rn(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.Te(),0):c.return()})};q.Le=function(a){this.g.Le(a)};q.mh=function(){Ln(this.g)};q.Wb=function(){this.g.Wb()};
614
+ q.Yf=function(a,b){b=void 0===b?!1:b;var c=this;return H(function(d){if(1==d.g){if(a==c.C&&b==c.A)return d.return();c.C=a;c.A=b;c.g.Wb();return C(d,c.g.destroy(),2)}c.g=null;c.g=new xn(a,function(){return Nn(c)},function(){return On(c)},function(e,f){return Pn(c,e,f)},function(){return Qn(c)},function(){return Rn(c)},b);c.g.init();D(d)})};
615
+ function Sn(a){a.g.init();a.m=new kf;for(var b=t(mn),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.xa()||(f=Qe(f),a.j.dispatchEvent(f))});for(var d in Re)a.m.D(a.h,Re[d],function(f){a.g.xa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.oc=e,Object.defineProperty(a.l,b.oc,{configurable:!1,enumerable:!0,get:function(f){return function(){return Tn(a,f.oc)}}(b),set:function(f){return function(g){var h=f.oc;a.g.xa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={oc:b.oc};a.s={};Un(a,
616
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Vn(a,f)}})});Wn(a);a.j=new Se;a.j.yd=a.l;a.o=new Se;a.o.yd=a.s}function Wn(a){var b=new Map;Un(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)})}
617
+ function Un(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
618
+ function Rn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.de(),startTime:null};a.i.pause();for(var c=t(on),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(tn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(un);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 Nn(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
619
+ function On(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
620
+ function Qn(a){for(var b=t(tn),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=t(on);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=t(on),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(un);for(k=
621
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new O("error",h);a.h.dispatchEvent(h)})}
622
+ function Tn(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.xa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.xa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
623
+ function Vn(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.Ab()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.kf()};
624
+ if("setVideoContainer"==b)return function(c){return a.h.Kf(c)};if(a.g.xa()){if("getManifest"==b||"drmInfo"==b)return function(){Xa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Xa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.xa()&&0==Object.keys(a.g.g.video).length&&(qn[b]||rn[b])||!a.g.xa()?a.h[b].bind(a.h):a.g.get("player",b)}
625
+ function Pn(a,b,c){a.g.xa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}L("shaka.cast.CastProxy",Mn);Mn.prototype.changeReceiverId=Mn.prototype.Yf;Mn.prototype.forceDisconnect=Mn.prototype.Wb;Mn.prototype.suggestDisconnect=Mn.prototype.mh;Mn.prototype.setAppData=Mn.prototype.Le;Mn.prototype.cast=Mn.prototype.cast;Mn.prototype.receiverName=Mn.prototype.De;Mn.prototype.isCasting=Mn.prototype.xa;Mn.prototype.canCast=Mn.prototype.Xf;Mn.prototype.getPlayer=Mn.prototype.vg;
626
+ Mn.prototype.getVideo=Mn.prototype.Fg;Mn.prototype.destroy=Mn.prototype.destroy;function Xn(a,b,c,d){Se.call(this);var e=this;this.g=a;this.h=b;this.j=new kf;this.H={video:a,player:b};this.C=c||function(){};this.I=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.A=!1;this.u=!0;this.s=this.l=null;this.G=new cd(function(){Yn(e)});Zn(this)}qa(Xn,Se);q=Xn.prototype;q.isConnected=function(){return this.F};q.Kg=function(){return this.o};q.jh=function(a){this.i=a};q.ag=function(){this.i=null};
626
627
  q.kh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.ih=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.hh=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
627
- q.destroy=function(){var a=this,b,c;return I(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.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Te.prototype.release.call(a),C(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();D(d)})};
628
- function $n(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return ao(a)};b.onSenderDisconnected=function(){return ao(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&bo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);bo(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 co(a,
629
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return eo(a,e)};b.start();b=t(nn);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return fo(a,"video",e)});for(var d in Se)a.j.D(a.h,Se[d],function(e){return fo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Me(3840,2160):a.h.Me(1920,1080);a.j.D(a.g,"loadeddata",function(){a.A=!0});a.j.D(a.h,"loading",function(){a.o=
630
- !1;go(a)});a.j.D(a.g,"playing",function(){a.o=!1;go(a)});a.j.D(a.g,"pause",function(){go(a)});a.j.D(a.h,"unloading",function(){a.o=!0;go(a)});a.j.D(a.g,"ended",function(){(new dd(function(){a.g&&a.g.ended&&(a.o=!0,go(a))})).S(ho)})}function ao(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;go(a)}
631
- function go(a){var b;I(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new P("caststatuschanged");a.dispatchEvent(b);io(a)||jo(a);D(c)})}
632
- function ko(a,b,c){var d,e,f,g,h,k,l,m,n,p;I(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,wa(r,5),C(r,a.h.load(b.manifest,b.startTime),7)):C(r,Promise.resolve(),3);case 7:Aa(r,3);break;case 5:return g=Ba(r),h=(new Map).set("detail",g),k=new P("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
633
- a.g.autoplay=f;b.manifest&&(a.g.play(),jo(a));D(r)}})}function fo(a,b,c){a.h&&(Zn(a),bo(a,{type:"event",targetName:b,event:c},a.l))}
634
- function Zn(a){a.G.S(lo);for(var b={video:{},player:{}},c=t(on),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in tn)0==a.m%tn[e]&&(b.player[e]=a.h[e]());for(var f in rn)0==a.m%rn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;bo(a,{type:"update",update:b},a.l);for(var g in sn)0==a.m%sn[g]&&(b={player:{}},b.player[g]=a.h[g](),bo(a,{type:"update",update:b},a.l));a.A&&(a.m+=
635
- 1);io(a)}function io(a){return a.u&&(a.g.duration||a.h.T())?(mo(a),a.u=!1,!0):!1}function mo(a,b){var c={contentId:a.h.ce(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);jo(a,void 0===b?0:b,c)}
636
- function eo(a,b){var c=ln(b.data);switch(c.type){case "init":a.m=0;a.A=!1;a.u=!0;ko(a,c.initState,c.appData);Zn(a);break;case "appData":a.C(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.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
637
- "player"==d&&"load"==e&&(a.m=0,a.A=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return no(a,g,f,null)},function(h){return no(a,g,f,h)})}}
638
- function co(a,b){var c=ln(b.data);switch(c.type){case "PLAY":a.g.play();jo(a);break;case "PAUSE":a.g.pause();jo(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(),jo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),jo(a));break;case "STOP":a.h.Se().then(function(){a.h&&jo(a)});break;case "GET_STATUS":mo(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));
639
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||jo(a);break;case "LOAD":a.m=0;a.A=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&mo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");bo(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:bo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
640
- function no(a,b,c,d){a.h&&bo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function bo(a,b,c,d){a.F&&(a=kn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function jo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?oo:a.h.ge()?po:a.g.paused?qo:ro,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);bo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
641
- L("shaka.cast.CastReceiver",Yn);Yn.prototype.destroy=Yn.prototype.destroy;Yn.prototype.setContentArtist=Yn.prototype.hh;Yn.prototype.setContentImage=Yn.prototype.ih;Yn.prototype.setContentTitle=Yn.prototype.kh;Yn.prototype.clearContentMetadata=Yn.prototype.ag;Yn.prototype.setContentMetadata=Yn.prototype.jh;Yn.prototype.isIdle=Yn.prototype.Kg;Yn.prototype.isConnected=Yn.prototype.isConnected;var lo=.5,ho=5,oo="IDLE",ro="PLAYING",po="BUFFERING",qo="PAUSED";function so(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",n=to(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){r=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){u=w;break}if(-1===
642
- r||-1===u)p=uo(d,e),a.g.push(p);else{for(;r<=u;r++)if(w=p[r]){var y=w.l,x=w.i,A=w.j,z=w.h;if(y!=h||x!=k||A!=l||z!=m)n.U&&a.g.push(n),n=to(d,e,y,x,A,z),h=y,k=x,l=A,m=z;n.U+=w.g}else n.U+=" ";n.U&&a.g.push(n);f!==g&&(n=uo(d,e),a.g.push(n));n=to(d,e,h,k,l,m)}}return a.g.length?{cue:a,stream:b}:null}function to(a,b,c,d,e,f){a=new yb(a,b,"");c&&a.h.push("underline");d&&(a.o="italic");a.j=e;a.backgroundColor=f;return a}function uo(a,b){a=new yb(a,b,"");a.F=!0;return a}
643
- function vo(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function wo(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";xo(this)}function yo(a,b,c){var d="CC"+(a.u<<1|a.s+1),e=new yb(b,c,"");e.H=1;e.m=a.g/16*100;return so(e,d,a.i,b,c)}function xo(a){zo(a,0,15);a.g=1}
644
- function Ao(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Bo:d=Co.has(c)?Co.get(c):String.fromCharCode(c);break;case Do:d=Eo.get(c);break;case Fo:a.i[a.g].pop();d=Go.get(c);break;case Ho:a.i[a.g].pop(),d=Io.get(c)}d&&a.i[a.g].push(new vo(d,a.m,a.j,a.o,a.l))}}function Jo(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 zo(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
645
- var Bo=0,Do=1,Fo=2,Ho=3,Co=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"]]),Eo=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"]]),Go=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
646
- [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Io=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
647
- [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Ko(a,b){this.h=Lo;this.o=new wo(a,b);this.i=new wo(a,b);this.g=this.j=new wo(a,b);this.l=0;this.m=null}function Mo(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==No&&a.h!==Oo&&(e=yo(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,zo(c,0,15),c=a.j,c.g=0<c.h?c.h:0,zo(c,0,15),d.g=15);a.h=No;d.h=b;return e}function Po(a){a.h=Qo;a.g=a.j;a.g.h=0}function Ro(a){ab("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Oo}
648
- var Lo=0,Qo=1,No=3,Oo=4,So="black green blue cyan red yellow magenta black".split(" "),To="white green blue cyan red yellow magenta white_italics".split(" ");function Uo(){this.l=!1;this.A=this.F=0;this.C=Vo;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Wo(this)}function Wo(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Xo())}function Xo(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Yo(a,b){Zo(a)&&(a.i[a.h][a.g]=new vo(b,a.u,a.o,a.m,a.s),a.g++)}function Zo(a){var b=a.g<a.A&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Uo.prototype.isVisible=function(){return this.l};
649
- function $o(a,b,c){var d=new yb(a.j,b,"");d.textAlign=a.C===ap?"left":a.C===bp?"right":Bb;if(c=so(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var ap=0,bp=1,Vo=2;function cp(){this.i=[];this.h=null;this.g=0}function dp(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new ep(a.h)),a.h=null,a.g=0))}function ep(a){this.g=0;this.h=a}ep.prototype.ja=function(){return this.g<this.h.length};ep.prototype.ha=function(){return this.g};function fp(a){if(!a.ja())throw new N(2,2,3E3);return a.h[a.g++]}ep.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function gp(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
650
- function hp(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=fp(b).value;b=null;c=t(ip(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=$o(e,d,a.i)),Wo(e);return b}if(137===c)for(b=fp(b).value,b=t(ip(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=fp(b).value;b=null;c=t(ip(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=$o(e,d,a.i)),e.l=!1;return b}if(139===c){c=fp(b).value;
651
- b=null;c=t(ip(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=$o(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=fp(b).value,jp(a,b,d);if(143===c)return d=jp(a,255,d),kp(a),d;if(144===c)b.skip(1),d=fp(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=fp(b).value,c=fp(b).value,b.skip(1),a.g&&(b=lp((c&48)>>4,(c&12)>>2,c&3),a.g.s=lp((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=fp(b).value,b=fp(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
652
- b.skip(1),d=fp(b).value,b.skip(1),a.g&&(a.g.C=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Uo;f.j=d;a.h[c]=f}d=fp(b).value;fp(b);fp(b);f=fp(b).value;var g=fp(b).value;b=fp(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.A=(g&63)+1;a.g=a.h[c]}}}return null}function ip(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
653
- function jp(a,b,c){var d=null;b=t(ip(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=$o(f,c,a.i));a.h[e]=null}return d}function kp(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function lp(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return mp[a<<2|b<<1|c]}
654
- var np=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"]]),mp="black blue green cyan red magenta yellow white".split(" ");function op(){this.h=[];this.g=[];this.i=new cp;this.l=0;this.m=new Map([["CC1",new Ko(0,0)],["CC2",new Ko(0,1)],["CC3",new Ko(1,0)],["CC4",new Ko(1,1)]]);this.s=this.o=0;this.j=new Map;this.u=!0;pp(this)}op.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;pp(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())kp(b.value)};
655
- function pp(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Lo,c.g=c.j,c.m=null,xo(c.i),xo(c.j),xo(c.o);a.u=!0}
656
- op.prototype.extract=function(a,b){if(this.u){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.u=!1}a=new Df(a,0);if(181===a.qa()&&49===a.Ia()&&1195456820===a.K()&&3===a.qa()&&(c=a.qa(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.qa(),f=(e&4)>>2,g=a.qa(),h=a.qa();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ea:g,$a:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
657
- op.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=qp(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())dp(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=rp(this,d.value),b.push.apply(b,v(d));this.i.i=[];this.h=[];this.g=[];return b};
658
- function qp(a,b){var c=b.type;if(16===(b.Ea&112)){var d=b.Ea>>3&1;0===c?a.o=d:a.s=d}c=a.m.get("CC"+(c<<1|(c?a.s:a.o)+1));if(255===b.Ea&&255===b.$a||!b.Ea&&!b.$a||!sp(b.Ea)||!sp(b.$a))return 45<=++a.l&&pp(a),null;a.l=0;b.Ea&=127;b.$a&=127;if(!b.Ea&&!b.$a)return null;a=null;if(16===(b.Ea&112))a:{d=b.Ea;a=b.$a;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=To[e]:7===e&&(f=!0);
659
- a=1===(a&1);c.h!==Oo&&(e=c.g,c.h===No&&b!==e.g&&(c=1+b-e.h,Jo(e,c,1+e.g-e.h,e.h),zo(e,0,c-1),zo(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Ao(c.g,Bo,32),d=!1,b=To[(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=So[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))Ao(c.g,Do,a);else if(18===(d&246)&&32===
660
- (a&224))Ao(c.g,d&1?Ho:Fo,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.$a){case 32:Po(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Mo(c,2,a);break;case 38:d=Mo(c,3,a);break;case 39:d=Mo(c,4,a);break;case 40:Ao(c.g,Bo,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:xo(c.o);Ro(c);break;case 43:Ro(c);break;case 44:b=c.i;d=null;c.h!==Oo&&(d=yo(b,c.l,a));zo(b,0,15);break;case 45:b=c.g;c.h!==No?d=null:(d=yo(b,c.l,a),f=b.g-b.h+1,Jo(b,f-1,f,b.h),zo(b,0,f-1),zo(b,b.g,
661
- 15-b.g),c.l=a);break;case 46:zo(c.j,0,15);break;case 47:b=null,c.h!==Oo&&(b=yo(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Po(c),c.l=a,d=b}a=d;break a}a=null}else d=b.$a,Ao(c.g,Bo,b.Ea),Ao(c.g,Bo,d);return a}
662
- function rp(a,b){var c=[];try{for(;b.ja();){var d=fp(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=fp(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new gp(e));for(var g=a.j.get(e),h=b.ha();b.ha()-h<f;){e=b;var k=fp(e),l=k.value,m=k.pts;if(16===l){var n=fp(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!Zo(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.A-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=$o(r,p,g.i));if(r.h+1>=r.F){p=r;for(var u=0,w=1;16>w;w++,
663
- u++)p.i[u]=p.i[w];for(w=0;1>w;w++,u++)p.i[u]=Xo()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=$o(r,p,g.i));r.i[r.h]=Xo();r.g=0;break;case 12:r.isVisible()&&(e=$o(r,p,g.i)),Wo(r),p=r,p.h=0,p.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=hp(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Yo(g.g,"\u266a"):Yo(g.g,
664
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Yo(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(np.has(e)){var x=np.get(e);Yo(g.g,x)}else Yo(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Yo(g.g,"_"):Yo(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(A){if(A instanceof N&&3E3===A.code)ab("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw A;}return c}function sp(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
665
- L("shaka.cea.CeaDecoder",op);tb=function(){return new op};function tp(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(v(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function up(){this.j=new Map;this.i=this.h=0;this.g=vp}
666
- up.prototype.init=function(a){function b(f){f=f.name;f in wp&&(c.g=wp[f])}var c=this,d=[],e=[];(new Gf).box("moov",Lf).box("mvex",Lf).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.K();g=g.K();c.h=f;c.i=g}).box("trak",Lf).O("tkhd",function(f){f=Mh(f.reader,f.version);d.push(f.trackId)}).box("mdia",Lf).O("mdhd",function(f){f=Kh(f.reader,f.version);e.push(f.timescale)}).box("minf",Lf).box("stbl",Lf).O("stsd",Nf).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",
667
- b).box("encv",Of).box("sinf",Lf).box("frma",function(f){f=Ph(f.reader).Pa;f in wp&&(c.g=wp[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new N(2,2,2010);this.g==vp&&$a("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
668
- up.prototype.parse=function(a){var b=this;if(this.g==vp)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Gf).box("moof",function(l){f=l.start;g=[];Lf(l)}).box("traf",Lf).O("trun",function(l){l=Lh(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Ih(l.reader,l.flags);d=l.ef||b.h;e=l.eg||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Jh(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw $a("Unable to find base media decode time for CEA captions!"),
669
- new N(2,2,2010);xp(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
670
- function xp(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Bf});n=[].concat.apply([],v(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].dg);b.ja();){g=b.K();var p=b.qa(),r=null;r=!1;h=1;switch(a.g){case yp:r=p&31;r=6==r;break;case zp:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].Ld||0),p=(c+p)/d,h=t(tp(b.kb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
671
- c+(n[l].Ge||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}L("shaka.cea.Mp4CeaParser",up);var vp=0,yp=1,zp=2,wp={avc1:yp,avc3:yp,hev1:zp,hvc1:zp,dvh1:zp,dvhe:zp};sb["video/mp4"]=function(){return new up};function Ap(){}Ap.prototype.init=function(){};Ap.prototype.parse=function(a){var b=[];a=M(a);if(!ci(a))return b;a=(new Zh).parse(a).ee();a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,6==c.type&&null!=c.time)for(var d=t(tp(c.data)),e=d.next();!e.done;e=d.next())b.push({packet:e.value,pts:c.time});return b};L("shaka.cea.TsCeaParser",Ap);sb["video/mp2t"]=function(){return new Ap};function Bp(a,b,c){var d=Cp(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.He?(e=h.init||e,!1):!0}),f.length&&(a=Dp(e,f,c,g),0==a.length&&(a=[vc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(vc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
672
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{df:g,di:e,drmInfos:a,hf:!0}}function Ep(a,b,c,d){var e=Bp(a,c,d);if(b.hf){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.hf=!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.df||b.df}
673
- function Fp(a){var b=0,c=pb(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=M(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
674
- function Gp(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(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""}
675
- function Hp(a){var b=ag(a.node,"https://dashif.org/CPS","Laurl");if(b&&b.textContent)return b.textContent;a=ag(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Tf(a.textContent);a=Fp(a).filter(function(c){return c.type===Ip})[0];if(!a)return"";a=yf(a.value,!0);return(a=rg(a,"WRMHEADER"))?Gp(a):""}
676
- function Dp(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.He];if(g){var h;if(h=ag(f.node,"urn:microsoft:playready","pro")){h=Tf(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Yf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.He)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,
677
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Yf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=vc(g,f.init||a||h||k);if(g=Jp.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Cp(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Kp(c.value))&&b.push(c);return b}
678
- function Kp(a){var b=a.getAttribute("schemeIdUri"),c=dg(a,"urn:mpeg:cenc:2013","default_KID"),d=bg(a,"urn:mpeg:cenc:2013","pssh").map(fg);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:Tf(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,He:b,keyId:c,init:0<e.length?e:null}}
679
- var Ip=1,Jp=(new Map).set("com.widevine.alpha",function(a){var b=ag(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?b.textContent:(a=ag(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Hp).set("com.microsoft.playready.recommendation",Hp).set("com.microsoft.playready.software",Hp).set("com.microsoft.playready.hardware",Hp).set("org.w3.clearkey",function(a){var b=ag(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?
680
- b.textContent:(a=ag(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Lp(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=
628
+ q.destroy=function(){var a=this,b,c;return H(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.H=null,a.C=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Se.prototype.release.call(a),C(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();D(d)})};
629
+ function Zn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return $n(a)};b.onSenderDisconnected=function(){return $n(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&ao(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);ao(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 bo(a,
630
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return co(a,e)};b.start();b=t(mn);for(var c=b.next();!c.done;c=b.next())a.j.D(a.g,c.value,function(e){return eo(a,"video",e)});for(var d in Re)a.j.D(a.h,Re[d],function(e){return eo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Ne(3840,2160):a.h.Ne(1920,1080);a.j.D(a.g,"loadeddata",function(){a.A=!0});a.j.D(a.h,"loading",function(){a.o=
631
+ !1;fo(a)});a.j.D(a.g,"playing",function(){a.o=!1;fo(a)});a.j.D(a.g,"pause",function(){fo(a)});a.j.D(a.h,"unloading",function(){a.o=!0;fo(a)});a.j.D(a.g,"ended",function(){(new cd(function(){a.g&&a.g.ended&&(a.o=!0,fo(a))})).S(go)})}function $n(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;fo(a)}
632
+ function fo(a){var b;H(function(c){if(1==c.g)return C(c,Promise.resolve(),2);if(!a.h)return c.return();b=new O("caststatuschanged");a.dispatchEvent(b);ho(a)||io(a);D(c)})}
633
+ function jo(a,b,c){var d,e,f,g,h,k,l,m,n,p;H(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.C(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,ua(r,5),C(r,a.h.load(b.manifest,b.startTime),7)):C(r,Promise.resolve(),3);case 7:xa(r,3);break;case 5:return g=za(r),h=(new Map).set("detail",g),k=new O("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
634
+ a.g.autoplay=f;b.manifest&&(a.g.play(),io(a));D(r)}})}function eo(a,b,c){a.h&&(Yn(a),ao(a,{type:"event",targetName:b,event:c},a.l))}
635
+ function Yn(a){a.G.S(ko);for(var b={video:{},player:{}},c=t(nn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.T())for(var e in sn)0==a.m%sn[e]&&(b.player[e]=a.h[e]());for(var f in qn)0==a.m%qn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;ao(a,{type:"update",update:b},a.l);for(var g in rn)0==a.m%rn[g]&&(b={player:{}},b.player[g]=a.h[g](),ao(a,{type:"update",update:b},a.l));a.A&&(a.m+=
636
+ 1);ho(a)}function ho(a){return a.u&&(a.g.duration||a.h.T())?(lo(a),a.u=!1,!0):!1}function lo(a,b){var c={contentId:a.h.de(),streamType:a.h.T()?"LIVE":"BUFFERED",contentType:""};a.h.T()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);io(a,void 0===b?0:b,c)}
637
+ function co(a,b){var c=kn(b.data);switch(c.type){case "init":a.m=0;a.A=!1;a.u=!0;jo(a,c.initState,c.appData);Yn(a);break;case "appData":a.C(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.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
638
+ "player"==d&&"load"==e&&(a.m=0,a.A=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return mo(a,g,f,null)},function(h){return mo(a,g,f,h)})}}
639
+ function bo(a,b){var c=kn(b.data);switch(c.type){case "PLAY":a.g.play();io(a);break;case "PAUSE":a.g.pause();io(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(),io(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),io(a));break;case "STOP":a.h.Te().then(function(){a.h&&io(a)});break;case "GET_STATUS":lo(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));
640
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||io(a);break;case "LOAD":a.m=0;a.A=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.I(b.contentId);f=c.autoplay||!0;a.C(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&lo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");ao(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:ao(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
641
+ function mo(a,b,c,d){a.h&&ao(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function ao(a,b,c,d){a.F&&(a=jn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function io(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?no:a.h.he()?oo:a.g.paused?po:qo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);ao(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
642
+ L("shaka.cast.CastReceiver",Xn);Xn.prototype.destroy=Xn.prototype.destroy;Xn.prototype.setContentArtist=Xn.prototype.hh;Xn.prototype.setContentImage=Xn.prototype.ih;Xn.prototype.setContentTitle=Xn.prototype.kh;Xn.prototype.clearContentMetadata=Xn.prototype.ag;Xn.prototype.setContentMetadata=Xn.prototype.jh;Xn.prototype.isIdle=Xn.prototype.Kg;Xn.prototype.isConnected=Xn.prototype.isConnected;var ko=.5,go=5,no="IDLE",qo="PLAYING",oo="BUFFERING",po="PAUSED";function ro(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",n=so(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].g.trim()){r=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].g.trim()){u=w;break}if(-1===
643
+ r||-1===u)p=to(d,e),a.g.push(p);else{for(;r<=u;r++)if(w=p[r]){var y=w.l,x=w.i,A=w.j,z=w.h;if(y!=h||x!=k||A!=l||z!=m)n.U&&a.g.push(n),n=so(d,e,y,x,A,z),h=y,k=x,l=A,m=z;n.U+=w.g}else n.U+=" ";n.U&&a.g.push(n);f!==g&&(n=to(d,e),a.g.push(n));n=so(d,e,h,k,l,m)}}return a.g.length?{cue:a,stream:b}:null}function so(a,b,c,d,e,f){a=new xb(a,b,"");c&&a.h.push("underline");d&&(a.o="italic");a.j=e;a.backgroundColor=f;return a}function to(a,b){a=new xb(a,b,"");a.F=!0;return a}
644
+ function uo(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function vo(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";wo(this)}function xo(a,b,c){var d="CC"+(a.u<<1|a.s+1),e=new xb(b,c,"");e.H=1;e.m=a.g/16*100;return ro(e,d,a.i,b,c)}function wo(a){yo(a,0,15);a.g=1}
645
+ function zo(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Ao:d=Bo.has(c)?Bo.get(c):String.fromCharCode(c);break;case Co:d=Do.get(c);break;case Eo:a.i[a.g].pop();d=Fo.get(c);break;case Go:a.i[a.g].pop(),d=Ho.get(c)}d&&a.i[a.g].push(new uo(d,a.m,a.j,a.o,a.l))}}function Io(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 yo(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
646
+ var Ao=0,Co=1,Eo=2,Go=3,Bo=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"]]),Do=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"]]),Fo=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
647
+ [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Ho=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
648
+ [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Jo(a,b){this.h=Ko;this.o=new vo(a,b);this.i=new vo(a,b);this.g=this.j=new vo(a,b);this.l=0;this.m=null}function Lo(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Mo&&a.h!==No&&(e=xo(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,yo(c,0,15),c=a.j,c.g=0<c.h?c.h:0,yo(c,0,15),d.g=15);a.h=Mo;d.h=b;return e}function Oo(a){a.h=Po;a.g=a.j;a.g.h=0}function Qo(a){Za("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=No}
649
+ var Ko=0,Po=1,Mo=3,No=4,Ro="black green blue cyan red yellow magenta black".split(" "),So="white green blue cyan red yellow magenta white_italics".split(" ");function To(){this.l=!1;this.A=this.F=0;this.C=Uo;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Vo(this)}function Vo(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Wo())}function Wo(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Xo(a,b){Yo(a)&&(a.i[a.h][a.g]=new uo(b,a.u,a.o,a.m,a.s),a.g++)}function Yo(a){var b=a.g<a.A&&0<=a.g;return a.h<a.F&&0<=a.h&&b}To.prototype.isVisible=function(){return this.l};
650
+ function Zo(a,b,c){var d=new xb(a.j,b,"");d.textAlign=a.C===$o?"left":a.C===ap?"right":Ab;if(c=ro(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var $o=0,ap=1,Uo=2;function bp(){this.i=[];this.h=null;this.g=0}function cp(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new dp(a.h)),a.h=null,a.g=0))}function dp(a){this.g=0;this.h=a}dp.prototype.ja=function(){return this.g<this.h.length};dp.prototype.ha=function(){return this.g};function ep(a){if(!a.ja())throw new N(2,2,3E3);return a.h[a.g++]}dp.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function fp(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
651
+ function gp(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=ep(b).value;b=null;c=t(hp(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Zo(e,d,a.i)),Vo(e);return b}if(137===c)for(b=ep(b).value,b=t(hp(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=ep(b).value;b=null;c=t(hp(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Zo(e,d,a.i)),e.l=!1;return b}if(139===c){c=ep(b).value;
652
+ b=null;c=t(hp(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Zo(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=ep(b).value,ip(a,b,d);if(143===c)return d=ip(a,255,d),jp(a),d;if(144===c)b.skip(1),d=ep(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=ep(b).value,c=ep(b).value,b.skip(1),a.g&&(b=kp((c&48)>>4,(c&12)>>2,c&3),a.g.s=kp((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=ep(b).value,b=ep(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
653
+ b.skip(1),d=ep(b).value,b.skip(1),a.g&&(a.g.C=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new To;f.j=d;a.h[c]=f}d=ep(b).value;ep(b);ep(b);f=ep(b).value;var g=ep(b).value;b=ep(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.A=(g&63)+1;a.g=a.h[c]}}}return null}function hp(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
654
+ function ip(a,b,c){var d=null;b=t(hp(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Zo(f,c,a.i));a.h[e]=null}return d}function jp(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function kp(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return lp[a<<2|b<<1|c]}
655
+ var mp=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"]]),lp="black blue green cyan red magenta yellow white".split(" ");function np(){this.h=[];this.g=[];this.i=new bp;this.l=0;this.m=new Map([["CC1",new Jo(0,0)],["CC2",new Jo(0,1)],["CC3",new Jo(1,0)],["CC4",new Jo(1,1)]]);this.s=this.o=0;this.j=new Map;this.u=!0;op(this)}np.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;op(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())jp(b.value)};
656
+ function op(a){a.o=0;a.s=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=Ko,c.g=c.j,c.m=null,wo(c.i),wo(c.j),wo(c.o);a.u=!0}
657
+ np.prototype.extract=function(a,b){if(this.u){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.u=!1}a=new Cf(a,0);if(181===a.qa()&&49===a.Ia()&&1195456820===a.K()&&3===a.qa()&&(c=a.qa(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.qa(),f=(e&4)>>2,g=a.qa(),h=a.qa();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Ea:g,$a:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
658
+ np.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=pp(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())cp(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=qp(this,d.value),b.push.apply(b,v(d));this.i.i=[];this.h=[];this.g=[];return b};
659
+ function pp(a,b){var c=b.type;if(16===(b.Ea&112)){var d=b.Ea>>3&1;0===c?a.o=d:a.s=d}c=a.m.get("CC"+(c<<1|(c?a.s:a.o)+1));if(255===b.Ea&&255===b.$a||!b.Ea&&!b.$a||!rp(b.Ea)||!rp(b.$a))return 45<=++a.l&&op(a),null;a.l=0;b.Ea&=127;b.$a&=127;if(!b.Ea&&!b.$a)return null;a=null;if(16===(b.Ea&112))a:{d=b.Ea;a=b.$a;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=So[e]:7===e&&(f=!0);
660
+ a=1===(a&1);c.h!==No&&(e=c.g,c.h===Mo&&b!==e.g&&(c=1+b-e.h,Io(e,c,1+e.g-e.h,e.h),yo(e,0,c-1),yo(e,b+1,15-b)),e.g=b,e.m=a,e.j=f,e.l=d,e.o="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",zo(c.g,Ao,32),d=!1,b=So[(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=Ro[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))zo(c.g,Co,a);else if(18===(d&246)&&32===
661
+ (a&224))zo(c.g,d&1?Go:Eo,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.$a){case 32:Oo(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Lo(c,2,a);break;case 38:d=Lo(c,3,a);break;case 39:d=Lo(c,4,a);break;case 40:zo(c.g,Ao,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:wo(c.o);Qo(c);break;case 43:Qo(c);break;case 44:b=c.i;d=null;c.h!==No&&(d=xo(b,c.l,a));yo(b,0,15);break;case 45:b=c.g;c.h!==Mo?d=null:(d=xo(b,c.l,a),f=b.g-b.h+1,Io(b,f-1,f,b.h),yo(b,0,f-1),yo(b,b.g,
662
+ 15-b.g),c.l=a);break;case 46:yo(c.j,0,15);break;case 47:b=null,c.h!==No&&(b=xo(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Oo(c),c.l=a,d=b}a=d;break a}a=null}else d=b.$a,zo(c.g,Ao,b.Ea),zo(c.g,Ao,d);return a}
663
+ function qp(a,b){var c=[];try{for(;b.ja();){var d=ep(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=ep(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new fp(e));for(var g=a.j.get(e),h=b.ha();b.ha()-h<f;){e=b;var k=ep(e),l=k.value,m=k.pts;if(16===l){var n=ep(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var r=g.g;e=null;switch(l){case 8:!Yo(r)||0>=r.g&&0>=r.h||(0>=r.g?(r.g=r.A-1,r.h--):r.g--,r.i[r.h][r.g]=null);break;case 13:r.isVisible()&&(e=Zo(r,p,g.i));if(r.h+1>=r.F){p=r;for(var u=0,w=1;16>w;w++,
664
+ u++)p.i[u]=p.i[w];for(w=0;1>w;w++,u++)p.i[u]=Wo()}else r.h++;r.g=0;break;case 14:r.isVisible()&&(e=Zo(r,p,g.i));r.i[r.h]=Wo();r.g=0;break;case 12:r.isVisible()&&(e=Zo(r,p,g.i)),Vo(r),p=r,p.h=0,p.g=0}var y=e}else y=null}else if(128<=l&&159>=l)y=gp(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Xo(g.g,"\u266a"):Xo(g.g,
665
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Xo(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(mp.has(e)){var x=mp.get(e);Xo(g.g,x)}else Xo(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Xo(g.g,"_"):Xo(g.g,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(A){if(A instanceof N&&3E3===A.code)Za("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw A;}return c}function rp(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}
666
+ L("shaka.cea.CeaDecoder",np);sb=function(){return new np};function sp(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(v(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function tp(){this.j=new Map;this.i=this.h=0;this.g=up}
667
+ tp.prototype.init=function(a){function b(f){f=f.name;f in vp&&(c.g=vp[f])}var c=this,d=[],e=[];(new Ff).box("moov",Kf).box("mvex",Kf).O("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.K();g=g.K();c.h=f;c.i=g}).box("trak",Kf).O("tkhd",function(f){f=Lh(f.reader,f.version);d.push(f.trackId)}).box("mdia",Kf).O("mdhd",function(f){f=Jh(f.reader,f.version);e.push(f.timescale)}).box("minf",Kf).box("stbl",Kf).O("stsd",Mf).box("avc1",b).box("avc3",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",
668
+ b).box("encv",Nf).box("sinf",Kf).box("frma",function(f){f=Oh(f.reader).Pa;f in vp&&(c.g=vp[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new N(2,2,2010);this.g==up&&Xa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
669
+ tp.prototype.parse=function(a){var b=this;if(this.g==up)return[];var c=[],d=this.h,e=this.i,f=0,g=[],h=null,k=9E4;(new Ff).box("moof",function(l){f=l.start;g=[];Kf(l)}).box("traf",Kf).O("trun",function(l){l=Kh(l.reader,l.version,l.flags);g.push(l)}).O("tfhd",function(l){l=Hh(l.reader,l.flags);d=l.ff||b.h;e=l.eg||b.i;l=l.trackId;b.j.has(l)&&(k=b.j.get(l))}).O("tfdt",function(l){h=Ih(l.reader,l.version).baseMediaDecodeTime}).box("mdat",function(l){if(null===h)throw Xa("Unable to find base media decode time for CEA captions!"),
670
+ new N(2,2,2010);wp(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
671
+ function wp(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.Bf});n=[].concat.apply([],v(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].dg);b.ja();){g=b.K();var p=b.qa(),r=null;r=!1;h=1;switch(a.g){case xp:r=p&31;r=6==r;break;case yp:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].Md||0),p=(c+p)/d,h=t(sp(b.kb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?
672
+ c+(n[l].He||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}L("shaka.cea.Mp4CeaParser",tp);var up=0,xp=1,yp=2,vp={avc1:xp,avc3:xp,hev1:yp,hvc1:yp,dvh1:yp,dvhe:yp};rb["video/mp4"]=function(){return new tp};function zp(){}zp.prototype.init=function(){};zp.prototype.parse=function(a){var b=[];a=M(a);if(!bi(a))return b;a=(new Yh).parse(a).fe();a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,6==c.type&&null!=c.time)for(var d=t(sp(c.data)),e=d.next();!e.done;e=d.next())b.push({packet:e.value,pts:c.time});return b};L("shaka.cea.TsCeaParser",zp);rb["video/mp2t"]=function(){return new zp};function Ap(a,b,c){var d=Bp(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.Ie?(e=h.init||e,!1):!0}),f.length&&(a=Cp(e,f,c,g),0==a.length&&(a=[uc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(uc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
673
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ef:g,di:e,drmInfos:a,jf:!0}}function Dp(a,b,c,d){var e=Ap(a,c,d);if(b.jf){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.jf=!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.ef||b.ef}
674
+ function Ep(a){var b=0,c=ob(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=M(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
675
+ function Fp(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(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""}
676
+ function Gp(a){var b=$f(a.node,"https://dashif.org/CPS","Laurl");if(b&&b.textContent)return b.textContent;a=$f(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Sf(a.textContent);a=Ep(a).filter(function(c){return c.type===Hp})[0];if(!a)return"";a=xf(a.value,!0);return(a=qg(a,"WRMHEADER"))?Fp(a):""}
677
+ function Cp(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Ie];if(g){var h;if(h=$f(f.node,"urn:microsoft:playready","pro")){h=Sf(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Xf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ie)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,
678
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Xf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=uc(g,f.init||a||h||k);if(g=Ip.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Bp(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Jp(c.value))&&b.push(c);return b}
679
+ function Jp(a){var b=a.getAttribute("schemeIdUri"),c=cg(a,"urn:mpeg:cenc:2013","default_KID"),d=ag(a,"urn:mpeg:cenc:2013","pssh").map(eg);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:Sf(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Ie:b,keyId:c,init:0<e.length?e:null}}
680
+ var Hp=1,Ip=(new Map).set("com.widevine.alpha",function(a){var b=$f(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?b.textContent:(a=$f(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Gp).set("com.microsoft.playready.recommendation",Gp).set("com.microsoft.playready.software",Gp).set("com.microsoft.playready.hardware",Gp).set("org.w3.clearkey",function(a){var b=$f(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?
681
+ b.textContent:(a=$f(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Kp(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=
681
682
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
682
- function Mp(a,b){var c=Np(a,b,"timescale"),d=1;c&&(d=mg(c)||1);var e=Np(a,b,"duration");c=mg(e||"");"image"==a.J.contentType&&(c=og(e||""));c&&(c/=d);var f=Np(a,b,"startNumber");e=Number(Np(a,b,"presentationTimeOffset"))||0;var g=ng(f||"");if(null==f||null==g)g=1;f=Op(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.$.duration||Infinity;f=$f(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],n=f[l+1],p=hg(m,"t",ng),r=hg(m,"d",ng);m=hg(m,"r",lg);null!=p&&(p-=e);if(!r)break;p=null!=p?p:k;m=m||0;if(0>
683
- m)if(n){n=hg(n,"t",ng);if(null==n)break;else if(p>=n)break;m=Math.ceil((n-p)/r)-1}else{if(Infinity==a)break;else if(p/b>=a)break;m=Math.ceil((a*b-p)/r)-1}0<h.length&&p!=k&&(h[h.length-1].end=p/b);for(n=0;n<=m;++n)k=p+r,h.push({start:p/b,end:k/b,Ue:p}),p=k}b=h}return{timescale:d,ma:c,hc:g,lb:e/d||0,Te:e,timeline:b}}function Np(a,b,c){return[b(a.J),b(a.ea),b(a.ia)].filter(tc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
684
- function Op(a,b,c){return[b(a.J),b(a.ea),b(a.ia)].filter(tc).map(function(d){return Zf(d,c)}).reduce(function(d,e){return d||e})}
685
- function Pp(a,b,c,d,e,f){for(var g=dg(a,"http://www.w3.org/1999/xlink","href"),h=dg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(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 Le(new N(2,4,4028));if("onLoad"!=h)return Le(new N(2,4,4027));var m=uc([d],[g]);return e.request(0,bf(m,b)).fa(function(n){n=tg(n.data,a.tagName);if(!n)return Le(new N(2,4,4001,g));
686
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Qp(a,b,c,m[0],e,f+1)})}
687
- function Qp(a,b,c,d,e,f){f=void 0===f?0:f;if(dg(a,"http://www.w3.org/1999/xlink","href")){var g=Pp(a,b,c,d,e,f);c&&(g=g.fa(void 0,function(){return Qp(a,b,c,d,e,f)}));return g}g=[];for(var h=t(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"==dg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Qp(k,b,c,d,e,f)));return Pe(g).fa(function(){return a})};function Rp(a,b,c,d,e,f,g){var h,k=(new Gf).O("sidx",function(l){h=Sp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
688
- function Sp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.dc(),m=g.reader.dc();g.reader.skip(2);var n=g.reader.Ia();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.K(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.K();g.reader.skip(4);if(1==r)throw new N(2,3,3006);h.push(new Q(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Tp(a){this.h=pb(a);this.g=new Df(this.h,0)}Tp.prototype.ja=function(){return this.g.ja()};
689
- function Up(a){var b=Vp(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Vp(a);a:{d=t(Wp);for(var e=d.next();!e.done;e=d.next())if(lb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ha();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.ha()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ha();d=pb(a.h,a.g.ha(),b);a.g.skip(b);return new Xp(c,
690
- d)}function Vp(a){var b=a.g.ha(),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 M(a.h,b,c)}var Wp=[[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 Xp(a,b){this.id=a;this.g=b}
691
- function Yp(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 Zp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Tp(a.g);for(var n=null,p=null;a.ja();){var r=Up(a);if(187==r.id){var u=$p(r);u&&(r=c*u.ph,u=b+u.Zg,null!=n&&m.push(new Q(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Q(n+g,d+g,l,p,null,f,g,h,k));return m}
692
- function $p(a){var b=new Tp(a.g);a=Up(b);if(179!=a.id)throw new N(2,3,3013);a=Yp(a);b=Up(b);if(183!=b.id)throw new N(2,3,3012);b=new Tp(b.g);for(var c=0;b.ja();){var d=Up(b);if(241==d.id){c=Yp(d);break}}return{ph:a,Zg:c}};function aq(a,b){b=Op(a,b,"Initialization");if(!b)return null;var c=a.J.Da,d=b.getAttribute("sourceURL");d&&(c=uc(a.J.Da,[d]));d=0;var e=null;if(b=hg(b,"range",kg))d=b.start,e=b.end;return new sh(function(){return c},d,e,bq(a))}
693
- function cq(a,b){var c=Number(Np(a,dq,"presentationTimeOffset"))||0,d=Np(a,dq,"timescale"),e=1;d&&(e=mg(d)||1);var f=c/e||0,g=aq(a,dq);eq(a,g);var h=Ve(a);return{Wb:function(){var k=Op(h,dq,"RepresentationIndex");var l=h.J.Da;k&&(k=k.getAttribute("sourceURL"))&&(l=uc(h.J.Da,[k]));k=fq(h);return gq(h,b,g,l,k.start,k.end,f)}}}
694
- function gq(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,y,x,A,z,B,E;return I(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.rb||!a.$.he,l=a.$.start,m=a.$.duration,n=a.J.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.wa(),c.Ba,c.ka,!0):null],p=null,C(F,Promise.all(u),2);w=F.h;y=w[0];x=w[1]||null;A=null;z=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var G=Rp(y,e,d,c,z,B,E);else{G=new Tp(x);if(440786851!=Up(G).id)throw new N(2,3,3008);var H=Up(G);if(408125543!=H.id)throw new N(2,3,3009);
695
- G=H.g.byteOffset;H=new Tp(H.g);for(var J=null;H.ja();){var K=Up(H);if(357149030==K.id){J=K;break}}if(!J)throw new N(2,3,3010);J=new Tp(J.g);K=1E6;for(H=null;J.ja();){var S=Up(J);if(2807729==S.id)K=Yp(S);else if(17545==S.id)if(4==S.g.byteLength)H=S.g.getFloat32(0);else if(8==S.g.byteLength)H=S.g.getFloat64(0);else throw new N(2,3,3003);}if(null==H)throw new N(2,3,3011);J=K/1E9;H*=J;K=Up(new Tp(y));if(475249515!=K.id)throw new N(2,3,3007);G=Zp(K,G,J,H,d,c,z,B,E)}A=G;h.Qc(A);r=new hj(A);k&&r.Ub(B,E,
696
- !0);return F.return(r)})}function dq(a){return a.Wc}function fq(a){var b=Op(a,dq,"RepresentationIndex");a=Np(a,dq,"indexRange");a=kg(a||"");b&&(a=hg(b,"range",kg,a));return a}function eq(a,b){hq(a,b);if(!fq(a))throw new N(2,4,4002);}function hq(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=zc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
697
- function bq(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Gd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function iq(a,b){var c=aq(a,jq),d=kq(a);if(!d.ma&&!d.timeline&&1<d.ac.length)throw new N(2,4,4002);if(!d.ma&&!a.$.duration&&!d.timeline&&1==d.ac.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.ia.id&&a.J.id&&(f=b[a.ia.id+","+a.J.id])&&(e=f.segmentIndex);var g=lq(a.$.start,a.$.duration,a.J.Da,d,c);b=!e;e?e.Pc(g,a.presentationTimeline.fb()):e=new hj(g);a.presentationTimeline.Qc(g);a.rb&&a.$.he||e.Ub(a.$.start,a.$.duration?a.$.start+a.$.duration:
698
- Infinity,b);f&&(f.segmentIndex=e);return{Wb:function(){e&&0!=e.Jc()||e.Ed(g);return Promise.resolve(e)}}}function jq(a){return a.ub}function kq(a){var b=mq(a);a=Mp(a,jq);var c=a.hc;0==c&&(c=1);var d=0;a.ma?d=a.ma*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ma:a.ma,startTime:d,hc:c,lb:a.lb,timeline:a.timeline,ac:b}}
699
- function lq(a,b,c,d,e){var f=d.ac.length;d.timeline&&d.timeline.length!=d.ac.length&&(f=Math.min(d.timeline.length,d.ac.length));for(var g=a-d.lb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={vc:m.vc,tc:m.tc},n++){m.tc=d.ac[n];var p=void 0;p=null!=d.ma?l+d.ma:d.timeline?d.timeline[n].end:l+b;m.vc=null;k.push(new Q(a+l,a+p,function(r){return function(){null==r.vc&&(r.vc=uc(c,[r.tc.Qg]));return r.vc}}(m),m.tc.start,m.tc.end,e,g,a,h));l=p}return k}
700
- function mq(a){return[a.J.ub,a.ea.ub,a.ia.ub].filter(tc).map(function(b){return $f(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.qf&&(a.qf=!0);var c=b.getAttribute("media");b=hg(b,"mediaRange",kg,{start:0,end:null});return{Qg:c,start:b.start,end:b.end}})};function nq(a,b,c,d,e,f){var g=oq(a),h=pq(a);qq(h);var k=Ve(a);if(h.Oc)return hq(a,g),{Wb:function(){var r=Lp(h.Oc,k.J.id,null,k.bandwidth||null,null);r=uc(k.J.Da,[r]);return gq(k,b,g,r,0,null,h.lb)}};if(h.ma)return d||"image"===a.ea.contentType||(a.presentationTimeline.ue(h.ma),a.presentationTimeline.Fd(a.$.start)),{Wb:function(){return rq(k,h,e,g,f)}};var l=null;d=d=null;a.ia.id&&a.J.id&&(d=a.ia.id+","+a.J.id,d=c[d])&&(l=d.segmentIndex);var m=a.$.start,n=a.$.duration?m+a.$.duration:Infinity,p=!(a.rb&&
701
- a.$.he);l?(c=l,sq(c,h,m,n,p),c.Ta(a.presentationTimeline.fb())):l=new tq(h,a.J.id,a.bandwidth,a.J.Da,m,n,g,p);h.timeline&&"image"!==a.ea.contentType&&a.presentationTimeline.yf(h.timeline,m);d&&a.rb&&(d.segmentIndex=l);return{Wb:function(){l instanceof tq&&0==l.Jc()&&sq(l,h,m,n,p);return Promise.resolve(l)}}}function uq(a){return a.Xc}function pq(a){var b=Mp(a,uq),c=Np(a,uq,"media");a=Np(a,uq,"index");return{ma:b.ma,timescale:b.timescale,hc:b.hc,lb:b.lb,Te:b.Te,timeline:b.timeline,re:c,Oc:a}}
702
- function qq(a){var b=a.Oc?1:0;b+=a.timeline?1:0;b+=a.ma?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Oc&&(a.timeline=null),a.ma=null);if(!a.Oc&&!a.re)throw new N(2,4,4002);}
703
- function rq(a,b,c,d,e){function f(J){var K=(J-r)*p,S=K+b.lb,O=K+l;K=O+p;var da=Math.min(K,h());O=new Q(O,da,function(){var X=Lp(w,x,J,y,S*u);return uc(A,[X])},0,null,d,z,l,h());O.l=K;return O}function g(){var J=[Math.max(k.fb(),l),Math.min(k.Ab(),h())].map(function(K){return K-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(K){return K+r})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.$.start,m=a.ia.id,n=a.$.duration,p=b.ma,r=b.hc,u=b.timescale,
704
- w=b.re,y=a.bandwidth||null,x=a.J.id,A=a.J.Da,z=l-b.lb,B=g();a=a.rb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var F=f(E);c.push(F)}var G=new hj(c);c=k.Ab()<h();E=k.T();if(c||E){var H=Math.max(a,B+1);G.Od(p,function(){var J=k.fb();G.Ta(J);var K=t(g());K.next();K=K.next().value;for(var S=[];H<=K;){var O=f(H);S.push(O);H++}return J>h()&&!S.length?null:S})}return Promise.resolve(G)}
705
- function oq(a){var b=Np(a,uq,"initialization");if(!b)return null;var c=a.J.id,d=a.bandwidth||null,e=a.J.Da;return new sh(function(){var f=Lp(b,c,null,d,null);return uc(e,[f])},0,null,bq(a))}function tq(a,b,c,d,e,f,g,h){hj.call(this,[]);this.h=a;this.C=b;this.s=c;this.u=d;this.j=e;this.o=f;this.A=g;h&&vq(this)}ra(tq,hj);q=tq.prototype;q.Jc=function(){return this.h?this.h.timeline.length:0};q.release=function(){hj.prototype.release.call(this);this.h=null};
706
- q.Ta=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.Jc()&&this.release())}};function sq(a,b,c,d,e){if(a.h){c=a.h.timeline;var f=c[c.length-1];b=b.timeline.filter(function(g){return g.start>=f.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,v(b));a.o!==d&&(a.o=d)}else a.h=b,a.j=c,a.o=d;e&&vq(a)}
707
- function vq(a){if(!a.m){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.o)b.pop();else break;a.Ta(a.j);0!==b.length&&Infinity!==a.o&&(b[b.length-1].end=a.o-a.j)}}
683
+ function Lp(a,b){var c=Mp(a,b,"timescale"),d=1;c&&(d=lg(c)||1);var e=Mp(a,b,"duration");c=lg(e||"");"image"==a.J.contentType&&(c=ng(e||""));c&&(c/=d);var f=Mp(a,b,"startNumber");e=Number(Mp(a,b,"presentationTimeOffset"))||0;var g=mg(f||"");if(null==f||null==g)g=1;f=Np(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.$.duration||Infinity;f=Zf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],n=f[l+1],p=gg(m,"t",mg),r=gg(m,"d",mg);m=gg(m,"r",kg);null!=p&&(p-=e);if(!r)break;p=null!=p?p:k;m=m||0;if(0>
684
+ m)if(n){n=gg(n,"t",mg);if(null==n)break;else if(p>=n)break;m=Math.ceil((n-p)/r)-1}else{if(Infinity==a)break;else if(p/b>=a)break;m=Math.ceil((a*b-p)/r)-1}0<h.length&&p!=k&&(h[h.length-1].end=p/b);for(n=0;n<=m;++n)k=p+r,h.push({start:p/b,end:k/b,Ve:p}),p=k}b=h}return{timescale:d,ma:c,hc:g,lb:e/d||0,Ue:e,timeline:b}}function Mp(a,b,c){return[b(a.J),b(a.ea),b(a.ia)].filter(sc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
685
+ function Np(a,b,c){return[b(a.J),b(a.ea),b(a.ia)].filter(sc).map(function(d){return Yf(d,c)}).reduce(function(d,e){return d||e})}
686
+ function Op(a,b,c,d,e,f){for(var g=cg(a,"http://www.w3.org/1999/xlink","href"),h=cg(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(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 Ke(new N(2,4,4028));if("onLoad"!=h)return Ke(new N(2,4,4027));var m=tc([d],[g]);return e.request(0,af(m,b)).fa(function(n){n=sg(n.data,a.tagName);if(!n)return Ke(new N(2,4,4001,g));
687
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return Pp(a,b,c,m[0],e,f+1)})}
688
+ function Pp(a,b,c,d,e,f){f=void 0===f?0:f;if(cg(a,"http://www.w3.org/1999/xlink","href")){var g=Op(a,b,c,d,e,f);c&&(g=g.fa(void 0,function(){return Pp(a,b,c,d,e,f)}));return g}g=[];for(var h=t(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"==cg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Pp(k,b,c,d,e,f)));return Oe(g).fa(function(){return a})};function Qp(a,b,c,d,e,f,g){var h,k=(new Ff).O("sidx",function(l){h=Rp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
689
+ function Rp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.dc(),m=g.reader.dc();g.reader.skip(2);var n=g.reader.Ia();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.K(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.K();g.reader.skip(4);if(1==r)throw new N(2,3,3006);h.push(new P(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function Sp(a){this.h=ob(a);this.g=new Cf(this.h,0)}Sp.prototype.ja=function(){return this.g.ja()};
690
+ function Tp(a){var b=Up(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Up(a);a:{d=t(Vp);for(var e=d.next();!e.done;e=d.next())if(kb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ha();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.ha()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ha();d=ob(a.h,a.g.ha(),b);a.g.skip(b);return new Wp(c,
691
+ d)}function Up(a){var b=a.g.ha(),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 M(a.h,b,c)}var Vp=[[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 Wp(a,b){this.id=a;this.g=b}
692
+ function Xp(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 Yp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Sp(a.g);for(var n=null,p=null;a.ja();){var r=Tp(a);if(187==r.id){var u=Zp(r);u&&(r=c*u.ph,u=b+u.Zg,null!=n&&m.push(new P(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new P(n+g,d+g,l,p,null,f,g,h,k));return m}
693
+ function Zp(a){var b=new Sp(a.g);a=Tp(b);if(179!=a.id)throw new N(2,3,3013);a=Xp(a);b=Tp(b);if(183!=b.id)throw new N(2,3,3012);b=new Sp(b.g);for(var c=0;b.ja();){var d=Tp(b);if(241==d.id){c=Xp(d);break}}return{ph:a,Zg:c}};function $p(a,b){b=Np(a,b,"Initialization");if(!b)return null;var c=a.J.Da,d=b.getAttribute("sourceURL");d&&(c=tc(a.J.Da,[d]));d=0;var e=null;if(b=gg(b,"range",jg))d=b.start,e=b.end;return new rh(function(){return c},d,e,aq(a))}
694
+ function bq(a,b){var c=Number(Mp(a,cq,"presentationTimeOffset"))||0,d=Mp(a,cq,"timescale"),e=1;d&&(e=lg(d)||1);var f=c/e||0,g=$p(a,cq);dq(a,g);var h=Ue(a);return{Xb:function(){var k=Np(h,cq,"RepresentationIndex");var l=h.J.Da;k&&(k=k.getAttribute("sourceURL"))&&(l=tc(h.J.Da,[k]));k=eq(h);return fq(h,b,g,l,k.start,k.end,f)}}}
695
+ function fq(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,y,x,A,z,B,E;return H(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.rb||!a.$.ie,l=a.$.start,m=a.$.duration,n=a.J.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.wa(),c.Ba,c.ka,!0):null],p=null,C(F,Promise.all(u),2);w=F.h;y=w[0];x=w[1]||null;A=null;z=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var G=Qp(y,e,d,c,z,B,E);else{G=new Sp(x);if(440786851!=Tp(G).id)throw new N(2,3,3008);var I=Tp(G);if(408125543!=I.id)throw new N(2,3,3009);
696
+ G=I.g.byteOffset;I=new Sp(I.g);for(var J=null;I.ja();){var K=Tp(I);if(357149030==K.id){J=K;break}}if(!J)throw new N(2,3,3010);J=new Sp(J.g);K=1E6;for(I=null;J.ja();){var S=Tp(J);if(2807729==S.id)K=Xp(S);else if(17545==S.id)if(4==S.g.byteLength)I=S.g.getFloat32(0);else if(8==S.g.byteLength)I=S.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=K/1E9;I*=J;K=Tp(new Sp(y));if(475249515!=K.id)throw new N(2,3,3007);G=Yp(K,G,J,I,d,c,z,B,E)}A=G;h.Qc(A);r=new gj(A);k&&r.Vb(B,E,
697
+ !0);return F.return(r)})}function cq(a){return a.Wc}function eq(a){var b=Np(a,cq,"RepresentationIndex");a=Mp(a,cq,"indexRange");a=jg(a||"");b&&(a=gg(b,"range",jg,a));return a}function dq(a,b){gq(a,b);if(!eq(a))throw new N(2,4,4002);}function gq(a,b){var c=a.J.mimeType.split("/")[1];if(a.J.contentType!=yc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
698
+ function aq(a){var b=a.J;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Hd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function hq(a,b){var c=$p(a,iq),d=jq(a);if(!d.ma&&!d.timeline&&1<d.ac.length)throw new N(2,4,4002);if(!d.ma&&!a.$.duration&&!d.timeline&&1==d.ac.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.ia.id&&a.J.id&&(f=b[a.ia.id+","+a.J.id])&&(e=f.segmentIndex);var g=kq(a.$.start,a.$.duration,a.J.Da,d,c);b=!e;e?e.Pc(g,a.presentationTimeline.fb()):e=new gj(g);a.presentationTimeline.Qc(g);a.rb&&a.$.ie||e.Vb(a.$.start,a.$.duration?a.$.start+a.$.duration:
699
+ Infinity,b);f&&(f.segmentIndex=e);return{Xb:function(){e&&0!=e.Jc()||e.Fd(g);return Promise.resolve(e)}}}function iq(a){return a.ub}function jq(a){var b=lq(a);a=Lp(a,iq);var c=a.hc;0==c&&(c=1);var d=0;a.ma?d=a.ma*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ma:a.ma,startTime:d,hc:c,lb:a.lb,timeline:a.timeline,ac:b}}
700
+ function kq(a,b,c,d,e){var f=d.ac.length;d.timeline&&d.timeline.length!=d.ac.length&&(f=Math.min(d.timeline.length,d.ac.length));for(var g=a-d.lb,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={vc:m.vc,tc:m.tc},n++){m.tc=d.ac[n];var p=void 0;p=null!=d.ma?l+d.ma:d.timeline?d.timeline[n].end:l+b;m.vc=null;k.push(new P(a+l,a+p,function(r){return function(){null==r.vc&&(r.vc=tc(c,[r.tc.Qg]));return r.vc}}(m),m.tc.start,m.tc.end,e,g,a,h));l=p}return k}
701
+ function lq(a){return[a.J.ub,a.ea.ub,a.ia.ub].filter(sc).map(function(b){return Zf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.qf&&(a.qf=!0);var c=b.getAttribute("media");b=gg(b,"mediaRange",jg,{start:0,end:null});return{Qg:c,start:b.start,end:b.end}})};function mq(a,b,c,d,e,f){var g=nq(a),h=oq(a);pq(h);var k=Ue(a);if(h.Oc)return gq(a,g),{Xb:function(){var r=Kp(h.Oc,k.J.id,null,k.bandwidth||null,null);r=tc(k.J.Da,[r]);return fq(k,b,g,r,0,null,h.lb)}};if(h.ma)return d||"image"===a.ea.contentType||(a.presentationTimeline.ve(h.ma),a.presentationTimeline.Gd(a.$.start)),{Xb:function(){return qq(k,h,e,g,f)}};var l=null;d=d=null;a.ia.id&&a.J.id&&(d=a.ia.id+","+a.J.id,d=c[d])&&(l=d.segmentIndex);var m=a.$.start,n=a.$.duration?m+a.$.duration:Infinity,p=!(a.rb&&
702
+ a.$.ie);l?(c=l,rq(c,h,m,n,p),c.Ta(a.presentationTimeline.fb())):l=new sq(h,a.J.id,a.bandwidth,a.J.Da,m,n,g,p);h.timeline&&"image"!==a.ea.contentType&&a.presentationTimeline.yf(h.timeline,m);d&&a.rb&&(d.segmentIndex=l);return{Xb:function(){l instanceof sq&&0==l.Jc()&&rq(l,h,m,n,p);return Promise.resolve(l)}}}function tq(a){return a.Xc}function oq(a){var b=Lp(a,tq),c=Mp(a,tq,"media");a=Mp(a,tq,"index");return{ma:b.ma,timescale:b.timescale,hc:b.hc,lb:b.lb,Ue:b.Ue,timeline:b.timeline,se:c,Oc:a}}
703
+ function pq(a){var b=a.Oc?1:0;b+=a.timeline?1:0;b+=a.ma?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.Oc&&(a.timeline=null),a.ma=null);if(!a.Oc&&!a.se)throw new N(2,4,4002);}
704
+ function qq(a,b,c,d,e){function f(J){var K=(J-r)*p,S=K+b.lb,R=K+l;K=R+p;var ba=Math.min(K,h());R=new P(R,ba,function(){var W=Kp(w,x,J,y,S*u);return tc(A,[W])},0,null,d,z,l,h());R.l=K;return R}function g(){var J=[Math.max(k.fb(),l),Math.min(k.Bb(),h())].map(function(K){return K-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(K){return K+r})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.$.start,m=a.ia.id,n=a.$.duration,p=b.ma,r=b.hc,u=b.timescale,
705
+ w=b.se,y=a.bandwidth||null,x=a.J.id,A=a.J.Da,z=l-b.lb,B=g();a=a.rb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var F=f(E);c.push(F)}var G=new gj(c);c=k.Bb()<h();E=k.T();if(c||E){var I=Math.max(a,B+1);G.Pd(p,function(){var J=k.fb();G.Ta(J);var K=t(g());K.next();K=K.next().value;for(var S=[];I<=K;){var R=f(I);S.push(R);I++}return J>h()&&!S.length?null:S})}return Promise.resolve(G)}
706
+ function nq(a){var b=Mp(a,tq,"initialization");if(!b)return null;var c=a.J.id,d=a.bandwidth||null,e=a.J.Da;return new rh(function(){var f=Kp(b,c,null,d,null);return tc(e,[f])},0,null,aq(a))}function sq(a,b,c,d,e,f,g,h){gj.call(this,[]);this.h=a;this.C=b;this.s=c;this.u=d;this.j=e;this.o=f;this.A=g;h&&uq(this)}qa(sq,gj);q=sq.prototype;q.Jc=function(){return this.h?this.h.timeline.length:0};q.release=function(){gj.prototype.release.call(this);this.h=null};
707
+ q.Ta=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.Jc()&&this.release())}};function rq(a,b,c,d,e){if(a.h){c=a.h.timeline;var f=c[c.length-1];b=b.timeline.filter(function(g){return g.start>=f.end});0<b.length&&a.h.timeline.push.apply(a.h.timeline,v(b));a.o!==d&&(a.o=d)}else a.h=b,a.j=c,a.o=d;e&&uq(a)}
708
+ function uq(a){if(!a.m){for(var b=a.h.timeline;b.length;)if(b[b.length-1].start>=a.o)b.pop();else break;a.Ta(a.j);0!==b.length&&Infinity!==a.o&&(b[b.length-1].end=a.o-a.j)}}
708
709
  q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>this.o)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=e.end+this.j;d<c&&(e=b[d+1].start+this.j);if(a>=f&&a<e)return d+this.i}return null};
709
- q.get=function(a){var b=this,c=a-this.i;if(0>c||c>=this.Jc()||!this.h)return null;var d=this.g[c];if(!d){d=this.h.timeline[c];var e=a+this.h.hc,f=this.h.Te+d.Ue;d=new Q(this.j+d.start,this.j+d.end,function(){return wq(b.h.re,b.C,e,b.s,f,b.u)},0,null,this.A,this.j-this.h.lb,this.j,this.o);this.g[c]=d}return d};function wq(a,b,c,d,e,f){a=Lp(a,b,c,d||null,e);return uc(f,[a]).map(function(g){return g.toString()})};function xq(){this.j=[];this.g=[];this.i=[];this.l=[];this.h=[];this.m=new Set}q=xq.prototype;q.release=function(){for(var a=t(this.g.concat(this.i,this.l,this.h)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.i=[];this.l=[];this.h=[];this.j=[]};q.Eg=function(){return this.j};q.de=function(){return this.l.slice()};q.mg=function(){return this.h};
710
- q.af=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,H,J,K,S,O,da,X,aa,xa;return I(function(ta){switch(ta.g){case 1:d=Ac;yq(a);zq(a);Aq(a);Bq(a);if(!b&&1==a.length){e=a[0];c.g=e.audioStreams;c.i=e.videoStreams;c.l=e.textStreams;c.h=e.imageStreams;ta.B(2);break}f=-1;for(g=0;g<a.length;g++)h=a[g],c.m.has(h.id)||(c.m.add(h.id),-1==f&&(f=g));if(-1==f)return ta.return();k=a.map(function(ja){return ja.audioStreams});l=a.map(function(ja){return ja.videoStreams});m=a.map(function(ja){return ja.textStreams});
711
- n=a.map(function(ja){return ja.imageStreams});p=t(m);for(r=p.next();!r.done;r=p.next())u=r.value,u.push(Cq(d.da));w=t(n);for(y=w.next();!y.done;y=w.next())x=y.value,x.push(Cq(d.wc));return C(ta,Dq(c.g,k,f,Eq,Fq),3);case 3:return C(ta,Dq(c.i,l,f,Eq,Fq),4);case 4:return C(ta,Dq(c.l,m,f,Eq,Fq),5);case 5:return C(ta,Dq(c.h,n,f,Eq,Fq),2);case 2:A=0;z=[];if(c.i.length&&c.g.length)for(J=t(c.g),K=J.next();!K.done;K=J.next())for(S=K.value,O=t(c.i),da=O.next();!da.done;da=O.next())X=da.value,aa=gh(S.drmInfos,
712
- X.drmInfos),S.drmInfos.length&&X.drmInfos.length&&!aa.length||(xa=A++,z.push({id:xa,language:S.language,disabledUntilTime:0,primary:S.primary,audio:S,video:X,bandwidth:(S.bandwidth||0)+(X.bandwidth||0),drmInfos:aa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=c.i.concat(c.g),E=t(B),F=E.next();!F.done;F=E.next())G=F.value,H=A++,z.push({id:H,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G.type==d.qb?G:null,video:G.type==d.va?G:null,bandwidth:G.bandwidth||
713
- 0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=z;D(ta)}})};
714
- function yq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.audioStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(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&&wb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.audioStreams=c}}
715
- function Aq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(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&&wb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
716
- function zq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.videoStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(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&&wb(e.roles,h.roles)&&vf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.videoStreams=c}}
717
- function Bq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(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}}
718
- function Gq(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,H,J,K,S;return I(function(O){switch(O.g){case 1:b=Ac;if(1==a.length)return O.return(a[0]);c=a.map(function(da){return da.filter(function(X){return X.type==b.qb})});d=a.map(function(da){return da.filter(function(X){return X.type==b.va})});e=a.map(function(da){return da.filter(function(X){return X.type==b.da})});f=a.map(function(da){return da.filter(function(X){return X.type==b.wc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
719
- k.push(Hq(b.da));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Hq(b.wc));return C(O,Dq([],c,0,Iq,Jq),2);case 2:return p=O.h,C(O,Dq([],d,0,Iq,Jq),3);case 3:return r=O.h,C(O,Dq([],e,0,Iq,Jq),4);case 4:return u=O.h,C(O,Dq([],f,0,Iq,Jq),5);case 5:w=O.h;y=0;if(r.length&&p.length)for(E=t(p),F=E.next();!F.done;F=E.next())for(G=F.value,H=t(r),J=H.next();!J.done;J=H.next())K=J.value,S=y++,K.variantIds.push(S),G.variantIds.push(S);else for(x=r.concat(p),A=t(x),z=A.next();!z.done;z=A.next())B=z.value,
720
- B.variantIds=[y++];return O.return(r.concat(p).concat(u).concat(w))}})}
721
- function Dq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,H,J;return I(function(K){switch(K.g){case 1:f=Ac;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){K.B(4);break}m=l.value;return C(K,Kq(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.B(2);break;case 4:p=t(g);for(r=p.next();!r.done;r=p.next())for(u=r.value,w=t(u),y=w.next();!y.done;y=w.next())x=y.value,(A=Lq(x,b,d,e,g))&&a.push(A);z=t(g);for(r=z.next();!r.done;r=
722
- z.next())for(B=r.value,E={},F=t(B),y=F.next();!y.done;E={pb:E.pb},y=F.next())if(E.pb=y.value,G=E.pb.type==f.da&&!E.pb.language,H=E.pb.type==f.wc&&!E.pb.tilesLayout,!G&&!H&&(J=a.some(function(S){return function(O){return O.mimeType==S.pb.mimeType&&Hc(O.codecs)==Hc(S.pb.codecs)}}(E))))throw new N(2,4,4037);return K.return(a)}})}function Kq(a,b,c,d,e){return I(function(f){if(1==f.g)return Mq(b,a),a.matchedStreams?a.segmentIndex?C(f,Nq(a,c),2):f.B(2):f.return(!1);Oq(a,c,d,e);return f.return(!0)})}
723
- function Nq(a,b){var c,d,e,f,g,h,k;return I(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(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 C(l,Promise.all(c),2)}if(a.segmentIndex instanceof lj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);D(l)})}
724
- function Lq(a,b,c,d,e){var f=c(a);Mq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return I(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new lj;return C(g,Nq(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Oq(f,0,d,e);return f}function Oq(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==Yc(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
725
- function Eq(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=t(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}
726
- function Iq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
727
- function Fq(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(v(f),v(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=gh(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||
728
- (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Eq(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Fq(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Fq(a.trickModeVideo,b)}
729
- function Jq(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(v(a.keyIds),v(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,v(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
730
- function Mq(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Pq,video:Pq,text:Qq,image:Rq}[e.type],g={audio:Sq,video:Tq,text:Uq,image:Vq}[e.type],h=null;d=t(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}
731
- function Pq(a,b){function c(d){if(!Wq.has(d)){var e=Hc(d);Wq.set(d,e)}return Wq.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!fh(a.drmInfos,b.drmInfos)?!1:!0}function Qq(a,b){return a.language?b.language?0==Yc(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Rq(a){return a.tilesLayout?!0:!1}
732
- function Sq(a,b,c){if(a.id==c.id)return!0;var d=Yc(a.language,b.language),e=Yc(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;
733
- d=Xq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Yq)return!0;if(d==Zq)return!1;d=Xq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Yq?!0:d==Zq?!1:a.bandwidth&&$q(a.bandwidth,b.bandwidth,c.bandwidth)==Yq?!0:!1}
734
- function Tq(a,b,c){if(a.id==c.id)return!0;var d=Xq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Yq)return!0;if(d==Zq)return!1;if(a.frameRate){d=Xq(a.frameRate,b.frameRate,c.frameRate);if(d==Yq)return!0;if(d==Zq)return!1}return a.bandwidth&&$q(a.bandwidth,b.bandwidth,c.bandwidth)==Yq?!0:!1}
735
- function Uq(a,b,c){if(a.id==c.id)return!0;var d=Yc(a.language,b.language),e=Yc(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!=
736
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Vq(a,b,c){return a.id==c.id?!0:Xq(a.width*a.height,b.width*b.height,c.width*c.height)==Yq?!0:!1}function Hq(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}
737
- function Cq(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new hj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1}}
738
- function Xq(a,b,c){if(b==a&&a!=c)return Zq;if(c==a&&a!=b)return Yq;if(b>a){if(c<=a||c-a<b-a)return Yq;if(c-a>b-a)return Zq}else{if(c>a)return Zq;if(a-c<a-b)return Yq;if(a-c>a-b)return Zq}return ar}function $q(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Yq:b<a?Zq:ar}L("shaka.util.PeriodCombiner",xq);xq.prototype.combinePeriods=xq.prototype.af;xq.prototype.getImageStreams=xq.prototype.mg;xq.prototype.getTextStreams=xq.prototype.de;xq.prototype.getVariants=xq.prototype.Eg;
739
- var Yq=1,ar=0,Zq=-1,Wq=new Map;function br(){var a=this;this.h=this.g=null;this.s=[];this.i=null;this.H=1;this.l={};this.L={};this.j=new xq;this.C=0;this.G=new Ta(5);this.F=new dd(function(){cr(a)});this.u=new We;this.A=null;this.I=[];this.m=Infinity;this.o=!1}q=br.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return I(function(e){if(1==e.g)return c.o=b.isLowLatencyMode(),c.s=[a],c.h=b,C(e,dr(c),2);d=e.h;c.h&&er(c,d);if(!c.h)throw new N(2,7,7001);return e.return(c.i)})};
740
- q.stop=function(){for(var a=t(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.s=[];this.i=null;this.l={};this.j=null;null!=this.F&&(this.F.stop(),this.F=null);return this.u.destroy()};q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return wa(c,2),C(c,dr(a),4);if(2!=c.g)return Aa(c,0);b=Ba(c);if(!a.h||!b)return c.return();a.h.onError(b);D(c)})};q.onExpirationUpdated=function(){};
741
- function dr(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=bf(a.s,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:4}),Xe(a.u,e),C(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.s.includes(f.uri)&&a.s.unshift(f.uri);return C(k,fr(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.G.sample(1,h);return k.return(h)})}
742
- function fr(a,b,c){var d,e,f,g,h;return I(function(k){if(1==k.g){d=tg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(gr(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Qp(d,a.g.retryParameters,f,c,a.h.networkingEngine);Xe(a.u,g);return C(k,g.promise,2)}h=k.h;return k.return(gr(a,h,c))})}
743
- function gr(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,H,J,K,S,O,da,X,aa,xa,ta,ja;return I(function(oa){switch(oa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=$f(b,"Location").map(fg).filter(tc);0<f.length&&(g=uc(e,f),e=a.s=g);h=$f(b,"BaseURL");k=h.map(fg);l=uc(e,k);m=0;h&&h.length&&(m=hg(h[0],"availabilityTimeOffset",og)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=hg(b,"minBufferTime",jg)||0);a.C=hg(b,"minimumUpdatePeriod",jg,-1);r=hg(b,"availabilityStartTime",ig);u=hg(b,
744
- "timeShiftBufferDepth",jg);w=a.g.dash.ignoreSuggestedPresentationDelay;y=null;w||(y=hg(b,"suggestedPresentationDelay",jg));x=a.g.dash.ignoreMaxSegmentDuration;A=null;x||(A=hg(b,"maxSegmentDuration",jg));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.l)),F=E.next();!F.done;F=E.next())G=F.value,G.segmentIndex&&G.segmentIndex.Ta(B.fb());else H=a.g.defaultPresentationDelay||1.5*p,J=null!=y?y:H,B=new R(r,J,a.g.dash.autoCorrectDrift);B.fc("static"==z);(K=B.T())&&
745
- !isNaN(a.g.availabilityWindowOverride)&&(u=a.g.availabilityWindowOverride);null==u&&(u=Infinity);B.Md(u);S=b.getAttribute("profiles")||"";O={rb:"static"!=z,presentationTimeline:B,ia:null,$:null,ea:null,J:null,bandwidth:0,qf:!1,Tb:m,profiles:S.split(",")};da=hr(a,O,l,b);X=da.duration;aa=da.periods;"static"!=z&&da.ff||B.Aa(X||Infinity);a.m&&!a.o&&(xa=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.o=a.h.isLowLatencyMode());a.o?B.Ef(a.m):a.m&&$a("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.");
746
- B.ue(A||1);return C(oa,a.j.af(aa,O.rb),2);case 2:a.o&&(p=0);a.o&&a.m&&(a.C=a.m);if(a.i){a.i.variants=a.j.j;a.i.textStreams=a.j.de();a.i.imageStreams=a.j.h;a.h.filter(a.i);oa.B(3);break}var Za=B,za=a.j.j,Da=a.j.de(),Va=a.j.h,Sa=p||0,lc=a.g.dash.sequenceMode;var Dc=Zf(b,"ServiceDescription");if(Dc){var Yb=Zf(Dc,"Latency");Dc=Zf(Dc,"PlaybackRate");Yb&&Yb.getAttribute("max")||Dc?(Yb=Yb&&Yb.getAttribute("max")?parseInt(Yb.getAttribute("max"),10)/1E3:null,Dc=Dc?parseFloat(Dc.getAttribute("max")):null,Yb=
747
- {maxLatency:Yb,maxPlaybackRate:Dc}):Yb=null}else Yb=null;a.i={presentationTimeline:Za,variants:za,textStreams:Da,imageStreams:Va,offlineSessionIds:[],minBufferTime:Sa,sequenceMode:lc,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Yb};if(!B.Of()){oa.B(4);break}ta=$f(b,"UTCTiming");return C(oa,ir(a,l,ta),5);case 5:ja=oa.h;if(!a.h)return oa.return();B.Ff(ja);case 4:B.Cd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),D(oa)}})}
748
- function hr(a,b,c,d){var e=hg(d,"mediaPresentationDuration",jg),f=[],g=0;d=$f(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=hg(k,"start",jg,g),n=k.id,p=hg(k,"duration",jg),r=null;if(l){var u=hg(l,"start",jg);null!=u&&(r=u-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.A&&null!==n&&null!==m&&m<a.A)||a.I.includes(n)||h+1==d.length){null!==m&&(null===a.A||m>a.A)&&(a.A=m);g=jr(a,b,c,{start:m,duration:r,node:k,he:null==r||!l});f.push(g);b.ia.id&&r&&(a.L[b.ia.id]=r);if(null==r){g=
749
- null;break}g=m+r}}a.I=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,ff:!1}:{periods:f,duration:g,ff:!0}}
750
- function jr(a,b,c,d){b.ia=kr(d.node,null,c);b.$=d;b.ia.Tb=b.Tb;b.ia.id||(b.ia.id="__shaka_period_"+d.start);var e=$f(d.node,"EventStream");c=b.presentationTimeline.fb();e=t(e);for(var f=e.next();!f.done;f=e.next())lr(a,d.start,d.duration,f.value,c);c=$f(d.node,"AdaptationSet").map(function(m){return mr(a,b,m)}).filter(tc);if(b.rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.bh);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);
751
- }d=c.filter(function(m){return!m.Re});c=c.filter(function(m){return m.Re});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Re.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={fd:h.fd},l=k.next())h.fd=l.value,h.fd.trickModeVideo=e.streams.find(function(m){return function(n){return Hc(m.fd.codecs)==Hc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:nr(d,"audio");g=a.g.disableVideo?[]:nr(d,"video");f=a.g.disableText?
752
- []:nr(d,zc);c=a.g.disableThumbnails?[]:nr(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,v(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,v(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,v(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,v(h.value.streams));return{id:b.ia.id,audioStreams:d,videoStreams:e,textStreams:g,imageStreams:f}}
753
- function nr(a,b){return a.filter(function(c){return c.contentType==b})}
754
- function mr(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ea=kr(c,b.ia,null);var e=!1,f=$f(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(tc),h=void 0,k=b.ea.contentType==zc;k&&(h="subtitle");f=t(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=
755
- l}}var n;m=$f(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=r&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=r&&(l=!0)}m=$f(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
756
- p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=$f(c,"Accessibility");var u=new Map,w;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),x=y.next();!x.done;x=y.next()){var A=x.value,z=x=void 0;A.includes("=")?(A=A.split("="),x=A[0].startsWith("CC")?A[0]:"CC"+A[0],z=A[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,z=A);u.set(x,Uc(z))}}else u.set("CC1",
757
- "und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=r)for(r=t(r.split(";")),x=r.next();!x.done;x=r.next())x=x.value,A=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],A=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,A=x),u.set(y,Uc(A));else u.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=r&&(g.push(r),"captions"==r&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==r?w="visually impaired":"2"==r&&(w="hard of hearing"));if(l)return null;l=$f(c,"ContentProtection");
758
- var B=Bp(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),E=Uc(b.ea.language||"und"),F=c.getAttribute("label");(l=$f(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(F=l.textContent));l=$f(c,"Representation");c=l.map(function(G){if(G=or(a,b,B,h,E,F,e,g,u,G,w))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ea.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ea.contentType||"application"==b.ea.contentType)for(b.ea.contentType=
759
- pr(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ea.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,p=t(B.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(v(r.keyIds),v(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(tc);return{id:b.ea.id||"__fake__"+a.H++,contentType:b.ea.contentType,language:E,ei:e,streams:c,drmInfos:B.drmInfos,Re:f,bh:k}}
760
- function or(a,b,c,d,e,f,g,h,k,l,m){b.J=kr(l,b.ea,null);a.m=Math.min(a.m,b.J.Tb);if(!qr(b.J))return null;var n=b.$.start;b.bandwidth=hg(l,"bandwidth",mg)||0;var p=b.J.contentType,r=p==zc||"application"==p;p="image"==p;try{var u=function(G,H,J,K){return rr(a,G,H,J,K)};if(b.J.Wc)var w=cq(b,u);else if(b.J.ub)w=iq(b,a.l);else if(b.J.Xc)w=nq(b,u,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var y=b.J.Da,x=b.$.duration||0;w={Wb:function(){return Promise.resolve(kj(n,x,y))}}}}catch(G){if((r||p)&&4002==
761
- G.code)return null;throw G;}u=$f(l,"ContentProtection");u=Ep(u,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);u=new Set(u?[u]:[]);var A=!1;$f(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(A=!0);var z=!1;r&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(p&&((l=$f(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
710
+ q.get=function(a){var b=this,c=a-this.i;if(0>c||c>=this.Jc()||!this.h)return null;var d=this.g[c];if(!d){d=this.h.timeline[c];var e=a+this.h.hc,f=this.h.Ue+d.Ve;d=new P(this.j+d.start,this.j+d.end,function(){return vq(b.h.se,b.C,e,b.s,f,b.u)},0,null,this.A,this.j-this.h.lb,this.j,this.o);this.g[c]=d}return d};function vq(a,b,c,d,e,f){a=Kp(a,b,c,d||null,e);return tc(f,[a]).map(function(g){return g.toString()})};function wq(){this.j=[];this.g=[];this.i=[];this.l=[];this.h=[];this.m=new Set}q=wq.prototype;q.release=function(){for(var a=t(this.g.concat(this.i,this.l,this.h)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.i=[];this.l=[];this.h=[];this.j=[]};q.Eg=function(){return this.j};q.ee=function(){return this.l.slice()};q.mg=function(){return this.h};
711
+ q.bf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,I,J,K,S,R,ba,W,Z,na;return H(function(wa){switch(wa.g){case 1:d=zc;xq(a);yq(a);zq(a);Aq(a);if(!b&&1==a.length){e=a[0];c.g=e.audioStreams;c.i=e.videoStreams;c.l=e.textStreams;c.h=e.imageStreams;wa.B(2);break}f=-1;for(g=0;g<a.length;g++)h=a[g],c.m.has(h.id)||(c.m.add(h.id),-1==f&&(f=g));if(-1==f)return wa.return();k=a.map(function(oa){return oa.audioStreams});l=a.map(function(oa){return oa.videoStreams});m=a.map(function(oa){return oa.textStreams});
712
+ n=a.map(function(oa){return oa.imageStreams});p=t(m);for(r=p.next();!r.done;r=p.next())u=r.value,u.push(Bq(d.da));w=t(n);for(y=w.next();!y.done;y=w.next())x=y.value,x.push(Bq(d.wc));return C(wa,Cq(c.g,k,f,Dq,Eq),3);case 3:return C(wa,Cq(c.i,l,f,Dq,Eq),4);case 4:return C(wa,Cq(c.l,m,f,Dq,Eq),5);case 5:return C(wa,Cq(c.h,n,f,Dq,Eq),2);case 2:A=0;z=[];if(c.i.length&&c.g.length)for(J=t(c.g),K=J.next();!K.done;K=J.next())for(S=K.value,R=t(c.i),ba=R.next();!ba.done;ba=R.next())W=ba.value,Z=fh(S.drmInfos,
713
+ W.drmInfos),S.drmInfos.length&&W.drmInfos.length&&!Z.length||(na=A++,z.push({id:na,language:S.language,disabledUntilTime:0,primary:S.primary,audio:S,video:W,bandwidth:(S.bandwidth||0)+(W.bandwidth||0),drmInfos:Z,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=c.i.concat(c.g),E=t(B),F=E.next();!F.done;F=E.next())G=F.value,I=A++,z.push({id:I,language:G.language,disabledUntilTime:0,primary:G.primary,audio:G.type==d.qb?G:null,video:G.type==d.va?G:null,bandwidth:G.bandwidth||
714
+ 0,drmInfos:G.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=z;D(wa)}})};
715
+ function xq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.audioStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(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&&vb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.audioStreams=c}}
716
+ function zq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(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&&vb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
717
+ function yq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.videoStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(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&&vb(e.roles,h.roles)&&uf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.videoStreams=c}}
718
+ function Aq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(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}}
719
+ function Fq(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,I,J,K,S;return H(function(R){switch(R.g){case 1:b=zc;if(1==a.length)return R.return(a[0]);c=a.map(function(ba){return ba.filter(function(W){return W.type==b.qb})});d=a.map(function(ba){return ba.filter(function(W){return W.type==b.va})});e=a.map(function(ba){return ba.filter(function(W){return W.type==b.da})});f=a.map(function(ba){return ba.filter(function(W){return W.type==b.wc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
720
+ k.push(Gq(b.da));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Gq(b.wc));return C(R,Cq([],c,0,Hq,Iq),2);case 2:return p=R.h,C(R,Cq([],d,0,Hq,Iq),3);case 3:return r=R.h,C(R,Cq([],e,0,Hq,Iq),4);case 4:return u=R.h,C(R,Cq([],f,0,Hq,Iq),5);case 5:w=R.h;y=0;if(r.length&&p.length)for(E=t(p),F=E.next();!F.done;F=E.next())for(G=F.value,I=t(r),J=I.next();!J.done;J=I.next())K=J.value,S=y++,K.variantIds.push(S),G.variantIds.push(S);else for(x=r.concat(p),A=t(x),z=A.next();!z.done;z=A.next())B=z.value,
721
+ B.variantIds=[y++];return R.return(r.concat(p).concat(u).concat(w))}})}
722
+ function Cq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,I,J;return H(function(K){switch(K.g){case 1:f=zc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){K.B(4);break}m=l.value;return C(K,Jq(m,b,c,e,g),5);case 5:n=K.h;if(!n)throw new N(2,4,4037);l=k.next();K.B(2);break;case 4:p=t(g);for(r=p.next();!r.done;r=p.next())for(u=r.value,w=t(u),y=w.next();!y.done;y=w.next())x=y.value,(A=Kq(x,b,d,e,g))&&a.push(A);z=t(g);for(r=z.next();!r.done;r=
723
+ z.next())for(B=r.value,E={},F=t(B),y=F.next();!y.done;E={pb:E.pb},y=F.next())if(E.pb=y.value,G=E.pb.type==f.da&&!E.pb.language,I=E.pb.type==f.wc&&!E.pb.tilesLayout,!G&&!I&&(J=a.some(function(S){return function(R){return R.mimeType==S.pb.mimeType&&Gc(R.codecs)==Gc(S.pb.codecs)}}(E))))throw new N(2,4,4037);return K.return(a)}})}function Jq(a,b,c,d,e){return H(function(f){if(1==f.g)return Lq(b,a),a.matchedStreams?a.segmentIndex?C(f,Mq(a,c),2):f.B(2):f.return(!1);Nq(a,c,d,e);return f.return(!0)})}
724
+ function Mq(a,b){var c,d,e,f,g,h,k;return H(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(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 C(l,Promise.all(c),2)}if(a.segmentIndex instanceof kj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.h.push(k.segmentIndex);D(l)})}
725
+ function Kq(a,b,c,d,e){var f=c(a);Lq(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return H(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new kj;return C(g,Mq(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Nq(f,0,d,e);return f}function Nq(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==Xc(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
726
+ function Dq(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=t(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}
727
+ function Hq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
728
+ function Eq(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(v(f),v(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=fh(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||
729
+ (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Dq(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Eq(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Eq(a.trickModeVideo,b)}
730
+ function Iq(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(v(a.keyIds),v(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,v(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
731
+ function Lq(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Oq,video:Oq,text:Pq,image:Qq}[e.type],g={audio:Rq,video:Sq,text:Tq,image:Uq}[e.type],h=null;d=t(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}
732
+ function Oq(a,b){function c(d){if(!Vq.has(d)){var e=Gc(d);Vq.set(d,e)}return Vq.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!eh(a.drmInfos,b.drmInfos)?!1:!0}function Pq(a,b){return a.language?b.language?0==Xc(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Qq(a){return a.tilesLayout?!0:!1}
733
+ function Rq(a,b,c){if(a.id==c.id)return!0;var d=Xc(a.language,b.language),e=Xc(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;
734
+ d=Wq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Xq)return!0;if(d==Yq)return!1;d=Wq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Xq?!0:d==Yq?!1:a.bandwidth&&Zq(a.bandwidth,b.bandwidth,c.bandwidth)==Xq?!0:!1}
735
+ function Sq(a,b,c){if(a.id==c.id)return!0;var d=Wq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Xq)return!0;if(d==Yq)return!1;if(a.frameRate){d=Wq(a.frameRate,b.frameRate,c.frameRate);if(d==Xq)return!0;if(d==Yq)return!1}return a.bandwidth&&Zq(a.bandwidth,b.bandwidth,c.bandwidth)==Xq?!0:!1}
736
+ function Tq(a,b,c){if(a.id==c.id)return!0;var d=Xc(a.language,b.language),e=Xc(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!=
737
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Uq(a,b,c){return a.id==c.id?!0:Wq(a.width*a.height,b.width*b.height,c.width*c.height)==Xq?!0:!1}function Gq(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1}}
738
+ function Bq(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new gj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1}}
739
+ function Wq(a,b,c){if(b==a&&a!=c)return Yq;if(c==a&&a!=b)return Xq;if(b>a){if(c<=a||c-a<b-a)return Xq;if(c-a>b-a)return Yq}else{if(c>a)return Yq;if(a-c<a-b)return Xq;if(a-c>a-b)return Yq}return $q}function Zq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Xq:b<a?Yq:$q}L("shaka.util.PeriodCombiner",wq);wq.prototype.combinePeriods=wq.prototype.bf;wq.prototype.getImageStreams=wq.prototype.mg;wq.prototype.getTextStreams=wq.prototype.ee;wq.prototype.getVariants=wq.prototype.Eg;
740
+ var Xq=1,$q=0,Yq=-1,Vq=new Map;function ar(){var a=this;this.h=this.g=null;this.s=[];this.i=null;this.H=1;this.l={};this.L={};this.j=new wq;this.C=0;this.G=new Ra(5);this.F=new cd(function(){br(a)});this.u=new Ve;this.A=null;this.I=[];this.m=Infinity;this.o=!1}q=ar.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return H(function(e){if(1==e.g)return c.o=b.isLowLatencyMode(),c.s=[a],c.h=b,C(e,cr(c),2);d=e.h;c.h&&dr(c,d);if(!c.h)throw new N(2,7,7001);return e.return(c.i)})};
741
+ q.stop=function(){for(var a=t(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.s=[];this.i=null;this.l={};this.j=null;null!=this.F&&(this.F.stop(),this.F=null);return this.u.destroy()};q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return ua(c,2),C(c,cr(a),4);if(2!=c.g)return xa(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);D(c)})};q.onExpirationUpdated=function(){};
742
+ function cr(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=af(a.s,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:4}),We(a.u,e),C(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.s.includes(f.uri)&&a.s.unshift(f.uri);return C(k,er(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.G.sample(1,h);return k.return(h)})}
743
+ function er(a,b,c){var d,e,f,g,h;return H(function(k){if(1==k.g){d=sg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(fr(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Pp(d,a.g.retryParameters,f,c,a.h.networkingEngine);We(a.u,g);return C(k,g.promise,2)}h=k.h;return k.return(fr(a,h,c))})}
744
+ function fr(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,I,J,K,S,R,ba,W,Z,na,wa,oa;return H(function(ya){switch(ya.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Zf(b,"Location").map(eg).filter(sc);0<f.length&&(g=tc(e,f),e=a.s=g);h=Zf(b,"BaseURL");k=h.map(eg);l=tc(e,k);m=0;h&&h.length&&(m=gg(h[0],"availabilityTimeOffset",ng)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=gg(b,"minBufferTime",ig)||0);a.C=gg(b,"minimumUpdatePeriod",ig,-1);r=gg(b,"availabilityStartTime",hg);u=gg(b,"timeShiftBufferDepth",
745
+ ig);w=a.g.dash.ignoreSuggestedPresentationDelay;y=null;w||(y=gg(b,"suggestedPresentationDelay",ig));x=a.g.dash.ignoreMaxSegmentDuration;A=null;x||(A=gg(b,"maxSegmentDuration",ig));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.l)),F=E.next();!F.done;F=E.next())G=F.value,G.segmentIndex&&G.segmentIndex.Ta(B.fb());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=y?y:I,B=new Q(r,J,a.g.dash.autoCorrectDrift);B.fc("static"==z);(K=B.T())&&!isNaN(a.g.availabilityWindowOverride)&&
746
+ (u=a.g.availabilityWindowOverride);null==u&&(u=Infinity);B.Nd(u);S=b.getAttribute("profiles")||"";R={rb:"static"!=z,presentationTimeline:B,ia:null,$:null,ea:null,J:null,bandwidth:0,qf:!1,Ub:m,profiles:S.split(",")};ba=gr(a,R,l,b);W=ba.duration;Z=ba.periods;"static"!=z&&ba.gf||B.Aa(W||Infinity);a.m&&!a.o&&(na=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.o=a.h.isLowLatencyMode());a.o?B.Ef(a.m):a.m&&Xa("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.");
747
+ B.ve(A||1);return C(ya,a.j.bf(Z,R.rb),2);case 2:a.o&&(p=0);a.o&&a.m&&(a.C=a.m);if(a.i){a.i.variants=a.j.j;a.i.textStreams=a.j.ee();a.i.imageStreams=a.j.h;a.h.filter(a.i);ya.B(3);break}var jb=B,Da=a.j.j,Ga=a.j.ee(),Ya=a.j.h,Sa=p||0,lc=a.g.dash.sequenceMode;var Dc=Yf(b,"ServiceDescription");if(Dc){var Yb=Yf(Dc,"Latency");Dc=Yf(Dc,"PlaybackRate");Yb&&Yb.getAttribute("max")||Dc?(Yb=Yb&&Yb.getAttribute("max")?parseInt(Yb.getAttribute("max"),10)/1E3:null,Dc=Dc?parseFloat(Dc.getAttribute("max")):null,Yb=
748
+ {maxLatency:Yb,maxPlaybackRate:Dc}):Yb=null}else Yb=null;a.i={presentationTimeline:jb,variants:Da,textStreams:Ga,imageStreams:Ya,offlineSessionIds:[],minBufferTime:Sa,sequenceMode:lc,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Yb};if(!B.Of()){ya.B(4);break}wa=Zf(b,"UTCTiming");return C(ya,hr(a,l,wa),5);case 5:oa=ya.h;if(!a.h)return ya.return();B.Ff(oa);case 4:B.Dd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),D(ya)}})}
749
+ function gr(a,b,c,d){var e=gg(d,"mediaPresentationDuration",ig),f=[],g=0;d=Zf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=gg(k,"start",ig,g),n=k.id,p=gg(k,"duration",ig),r=null;if(l){var u=gg(l,"start",ig);null!=u&&(r=u-m)}else null!=e&&(r=e-m);null==r&&(r=p);if(!(null!==a.A&&null!==n&&null!==m&&m<a.A)||a.I.includes(n)||h+1==d.length){null!==m&&(null===a.A||m>a.A)&&(a.A=m);g=ir(a,b,c,{start:m,duration:r,node:k,ie:null==r||!l});f.push(g);b.ia.id&&r&&(a.L[b.ia.id]=r);if(null==r){g=
750
+ null;break}g=m+r}}a.I=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,gf:!1}:{periods:f,duration:g,gf:!0}}
751
+ function ir(a,b,c,d){b.ia=jr(d.node,null,c);b.$=d;b.ia.Ub=b.Ub;b.ia.id||(b.ia.id="__shaka_period_"+d.start);var e=Zf(d.node,"EventStream");c=b.presentationTimeline.fb();e=t(e);for(var f=e.next();!f.done;f=e.next())kr(a,d.start,d.duration,f.value,c);c=Zf(d.node,"AdaptationSet").map(function(m){return lr(a,b,m)}).filter(sc);if(b.rb){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.bh);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);
752
+ }d=c.filter(function(m){return!m.Se});c=c.filter(function(m){return m.Se});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Se.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={fd:h.fd},l=k.next())h.fd=l.value,h.fd.trickModeVideo=e.streams.find(function(m){return function(n){return Gc(m.fd.codecs)==Gc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:mr(d,"audio");g=a.g.disableVideo?[]:mr(d,"video");f=a.g.disableText?
753
+ []:mr(d,yc);c=a.g.disableThumbnails?[]:mr(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,v(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,v(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,v(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,v(h.value.streams));return{id:b.ia.id,audioStreams:d,videoStreams:e,textStreams:g,imageStreams:f}}
754
+ function mr(a,b){return a.filter(function(c){return c.contentType==b})}
755
+ function lr(a,b,c){function d(G){switch(G){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ea=jr(c,b.ia,null);var e=!1,f=Zf(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(sc),h=void 0,k=b.ea.contentType==yc;k&&(h="subtitle");f=t(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=
756
+ l}}var n;m=Zf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var r=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==r?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==r?n=d(parseInt(p.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=r&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=r&&(l=!0)}m=Zf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==
757
+ p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=Zf(c,"Accessibility");var u=new Map,w;m=t(m);for(p=m.next();!p.done;p=m.next())if(r=p.value,p=r.getAttribute("schemeIdUri"),r=r.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=r){r=r.split(";");for(var y=t(r),x=y.next();!x.done;x=y.next()){var A=x.value,z=x=void 0;A.includes("=")?(A=A.split("="),x=A[0].startsWith("CC")?A[0]:"CC"+A[0],z=A[1]||"und"):(x="CC"+p,2==r.length?p+=2:p++,z=A);u.set(x,Tc(z))}}else u.set("CC1",
758
+ "und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=r)for(r=t(r.split(";")),x=r.next();!x.done;x=r.next())x=x.value,A=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],A=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,A=x),u.set(y,Tc(A));else u.set("svc1","und");else"urn:mpeg:dash:role:2011"==p?null!=r&&(g.push(r),"captions"==r&&(h="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==r?w="visually impaired":"2"==r&&(w="hard of hearing"));if(l)return null;l=Zf(c,"ContentProtection");
759
+ var B=Ap(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),E=Tc(b.ea.language||"und"),F=c.getAttribute("label");(l=Zf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(F=l.textContent));l=Zf(c,"Representation");c=l.map(function(G){if(G=nr(a,b,B,h,E,F,e,g,u,G,w))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.ea.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ea.contentType||"application"==b.ea.contentType)for(b.ea.contentType=
760
+ or(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ea.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=m.value,p=t(B.drmInfos),r=p.next();!r.done;r=p.next())r=r.value,r.keyIds=r.keyIds&&m.keyIds?new Set([].concat(v(r.keyIds),v(m.keyIds))):r.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(sc);return{id:b.ea.id||"__fake__"+a.H++,contentType:b.ea.contentType,language:E,ei:e,streams:c,drmInfos:B.drmInfos,Se:f,bh:k}}
761
+ function nr(a,b,c,d,e,f,g,h,k,l,m){b.J=jr(l,b.ea,null);a.m=Math.min(a.m,b.J.Ub);if(!pr(b.J))return null;var n=b.$.start;b.bandwidth=gg(l,"bandwidth",lg)||0;var p=b.J.contentType,r=p==yc||"application"==p;p="image"==p;try{var u=function(G,I,J,K){return qr(a,G,I,J,K)};if(b.J.Wc)var w=bq(b,u);else if(b.J.ub)w=hq(b,a.l);else if(b.J.Xc)w=mq(b,u,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var y=b.J.Da,x=b.$.duration||0;w={Xb:function(){return Promise.resolve(jj(n,x,y))}}}}catch(G){if((r||p)&&4002==
762
+ G.code)return null;throw G;}u=Zf(l,"ContentProtection");u=Dp(u,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);u=new Set(u?[u]:[]);var A=!1;Zf(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(A=!0);var z=!1;r&&(z=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var B;if(p&&((l=Zf(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
762
763
  (B=l.getAttribute("value")),!B))return null;var E;l=b.J.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"))&&(E="PQ");l=b.J.id?b.ia.id+","+b.J.id:"";var F=l&&a.l[l]?a.l[l]:{id:a.H++,originalId:b.J.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){F.segmentIndex&&(F.segmentIndex.release(),F.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:b.J.codecs,
763
- frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:u,language:e,originalLanguage:b.ea.language,label:f,type:b.ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.Gd,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:A,closedCaptions:k,hdr:E,tilesLayout:B,matchedStreams:[],accessibilityPurpose:m,external:!1};
764
- F.createSegmentIndex=function(){var G;return I(function(H){if(1==H.g){if(F.segmentIndex)return H.B(0);G=F;return C(H,w.Wb(),3)}G.segmentIndex=H.h;D(H)})};l&&b.rb&&!a.l[l]&&(a.l[l]=F);return F}function cr(a){var b,c;I(function(d){switch(d.g){case 1:return b=0,wa(d,2),C(d,dr(a),4);case 4:b=d.h;Aa(d,3);break;case 2:if(c=Ba(d),a.h){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(c),d.return();c.severity=1;a.h.onError(c)}case 3:if(!a.h)return d.return();er(a,b);D(d)}})}
765
- function er(a,b){0>a.C||a.F.S(Math.max(a.C-b,Ua(a.G)))}
766
- function kr(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Gd:null,audioSamplingRate:null,Tb:0};c=c||b.Da;var d=$f(a,"BaseURL"),e=d.map(fg),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=hg(a,"frameRate",qg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=$f(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
767
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=$f(a,"AudioChannelConfiguration");m=sr(m)||b.Gd;p=hg(a,"audioSamplingRate",ng)||b.audioSamplingRate;f||(f=pr(g,h));var r=Zf(a,"SegmentBase"),u=Zf(a,"SegmentTemplate"),w=r?hg(r,"availabilityTimeOffset",og)||0:0,y=u?hg(u,"availabilityTimeOffset",og)||0:0;d=d&&d.length?hg(d[0],"availabilityTimeOffset",og)||0:0;d=b.Tb+d+w+y;return{Da:uc(c,e),Wc:r||b.Wc,ub:Zf(a,"SegmentList")||b.ub,Xc:u||b.Xc,width:hg(a,"width",ng)||b.width,height:hg(a,
768
- "height",ng)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),language:a.getAttribute("lang"),Gd:m,audioSamplingRate:p,Tb:d}}
769
- function sr(a){a=t(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=
770
- 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 qr(a){var b=a.Wc?1:0;b+=a.ub?1:0;b+=a.Xc?1:0;if(0==b)return a.contentType==zc||"application"==a.contentType?!0:!1;1!=b&&(a.Wc&&(a.ub=null),a.Xc=null);return!0}
771
- function tr(a,b,c,d){var e,f,g,h,k,l;return I(function(m){if(1==m.g)return e=uc(b,[c]),f=bf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Xe(a.u,g),C(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=xf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
772
- function ir(a,b,c){var d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;wa(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
773
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":$a("NTP UTCTiming scheme is not supported");break;default:$a("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return C(n,tr(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,tr(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:Aa(n,
774
- 3);break;case 5:Ba(n);case 3:g=f.next();n.B(2);break;case 4:return $a("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
775
- function lr(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=hg(d,"timescale",ng)||1;d=t($f(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=hg(k,"presentationTime",ng)||0,m=hg(k,"duration",ng)||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))}}
776
- function rr(a,b,c,d,e){var f,g,h,k,l,m;return I(function(n){if(1==n.g)return f=hf,g=e?0:1,h=Hj(b,c,d,a.g.retryParameters),k=a.h.networkingEngine,l=k.request(f,h,{type:g}),Xe(a.u,l),C(n,l.promise,2);m=n.h;return n.return(m.data)})}function pr(a,b){b=Cc(a,b);return Lc(b)?zc:a.split("/")[0]}L("shaka.dash.DashParser",br);mh.mpd=function(){return new br};kh["application/dash+xml"]=function(){return new br};kh["video/vnd.mpeg.dash.mpd"]=function(){return new br};function ur(){}L("shaka.dependencies",ur);ur.has=function(a){return vr.has(a)};ur.add=function(a,b){if(!wr[a])throw Error(a+" is not supported");vr.set(a,function(){return b})};var wr={muxjs:"muxjs",ISOBoxer:"ISOBoxer"};ur.Allowed=wr;var vr=new Map([["muxjs",function(){return window.muxjs}],["ISOBoxer",function(){return window.ISOBoxer}]]);function xr(a,b){return a.filter(function(c){return c.name==b})}function yr(a,b){return a.filter(function(c){return zr(c,"TYPE")==b})}function Ar(a,b){a=xr(a,b);return a.length?a[0]:null}function Br(a,b,c){c=void 0===c?0:c;return(a=Ar(a,b))?Number(a.value):c}function Cr(a,b){return uc([a],[b])[0]};function Dr(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Er(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Er.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};
777
- Er.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Y(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function zr(a,b){a=a.getAttribute(b);if(!a)throw new N(2,4,4023,b);return a.value}function Fr(a,b,c,d){d=void 0===d?[]:d;this.g=c;this.l=null;this.j=a;this.m=b;this.h=d}
778
- fa.Object.defineProperties(Fr.prototype,{i:{configurable:!0,enumerable:!0,get:function(){!this.l&&this.j&&this.m&&(this.l=Cr(this.j,this.m),this.m=this.j=null);return this.l||""}}});function Gr(a,b){this.name=a;this.value=b};function Hr(a){this.h=a||"";this.g=0}function Ir(a){Jr(a,/[ \t]+/gm)}function Jr(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 Kr(a){return a.g==a.h.length?null:(a=Jr(a,/[^ \t\n]*/gm))?a[0]:null};function Lr(){this.g=0}
779
- function Mr(a,b,c){b=xf(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=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Nr(a,g),--a.g,Or.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=Nr(a,h);if(Pr.includes(h.name)){if(1!=b)throw new N(2,4,4017);
780
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Nr(a,m),Or.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"==Y(m,"TYPE")?k.push(m):"MAP"==Y(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=m.trim(),h&&g.push(h),e.push(new Fr(d,m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Fr("","",g,k)));return new Dr(c,b,f,e)}f.push(h);
781
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Gr("URI",k)),e=!0)}}return new Dr(c,b,f)}function Nr(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 Hr(d);var f;(f=Jr(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Jr(d,g);)c.push(new Gr(f[1],f[2]||f[3])),Ir(d)}return new Er(a,b,c,e)}
782
- var Or="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Pr="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Qr(){}function Rr(a){try{var b=Sr(a);return Ne({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Le(c)}}
783
- function Sr(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=Tf(a):e=Bf(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Qr);Qr.parse=Rr;Ze("data",Rr);function Tr(){var a=this;this.g=this.i=null;this.Na=1;this.s=new Map;this.A=new Map;this.G=new Map;this.G.set("video",new Map);this.G.set("audio",new Map);this.G.set(zc,new Map);this.G.set("image",new Map);this.ga=new Set;this.h=new Map;this.j=null;this.N="";this.X=new Lr;this.C=-1;this.L=Infinity;this.Za=!1;this.m=new dd(function(){Ur(a)});this.aa=Vr;this.F=null;this.Z=0;this.l=Infinity;this.W=this.V=this.H=0;this.I=new We;this.M=new Map;this.u=new Map;this.Y=new Map;this.Oa=this.o=!1}q=Tr.prototype;
784
- q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return I(function(e){return 1==e.g?(c.i=b,c.o=b.isLowLatencyMode(),C(e,Wr(c,a),2)):3!=e.g?(d=e.h,c.N=d.uri,C(e,Xr(c,d.data,a),3)):e.return(c.F)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.I&&(a.push(this.I.destroy()),this.I=null);this.g=this.i=null;this.ga.clear();this.F=null;this.h.clear();this.A.clear();this.u.clear();this.s.clear();return Promise.all(a)};
785
- q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return I(function(m){if(1==m.g){if(!Yr(a))return m.return();b=[];c=Array.from(a.h.values());a.l=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Zr(a,g));return C(m,Promise.all(b),2)}$r(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Mc});d.length&&!h&&(k=as,bs(a,k.Qf),l=d.map(function(n){return n.ib}),a.j.Aa(Math.min.apply(Math,v(l))),a.i.updateDuration());
786
- h&&cs(a);D(m)})};function ds(a,b){return Yr(a)?a.G.get(b.type):b.Dd}
787
- function Zr(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,H,J,K,S;return I(function(O){if(1==O.g)return c=b.hd,d=new bc(c),e=new gc,b.kd&&(0<=b.Ga&&e.add("_HLS_msn",String(b.Ga)),0<=b.Ha&&e.add("_HLS_part",String(b.Ha))),b.ld&&e.add("_HLS_skip","YES"),pc(e),e.Dc&&ec(d,e),C(O,Wr(a,d.toString(),!0),2);f=O.h;if(!b.stream.segmentIndex)return O.return();g=Mr(a.X,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=xr(g.g,"EXT-X-DEFINE");k=es(a,h);l=b.stream;m=ds(a,b);n=fs(g,l.mimeType);p=n.keyIds;
788
- r=n.drmInfos;u=function(da,X){return da.size===X.size&&[].concat(v(da)).every(function(aa){return X.has(aa)})};u(l.keyIds,p)||(l.keyIds=p,l.drmInfos=r,a.i.newDrmInfo(l));w=gs(a,g,l.type,l.mimeType,m,k);y=w.segments;x=w.bandwidth;l.bandwidth=x;l.segmentIndex.Pc(y,a.j.fb());y.length&&(A=Br(g.g,"EXT-X-MEDIA-SEQUENCE",0),B=(z=Ar(g.g,"EXT-X-SKIP"))?Number(Y(z,"SKIPPED-SEGMENTS")):0,E=hs(A,y),F=E.Ga,G=E.Ha,b.Ga=F+B,b.Ha=G,H=m.get(A),l.segmentIndex.Ta(H));J=y[0];b.Gb=J.startTime;K=y[y.length-1];b.ib=K.endTime;
789
- if(S=Ar(g.g,"EXT-X-ENDLIST"))b.Mc=!0;is(a,g);D(O)})}q.onExpirationUpdated=function(){};
790
- function js(a,b){for(var c=-1==a.C,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=ds(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.C=Math.max(a.C,k));e.ae=k;break}}}}if(!(0>a.C))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.C-c.ae),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),ks(a,c,d)}
791
- function ls(a,b){if(Infinity==a.L){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.L=Math.min(a.L,d.g))}}b=a.L;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Ya("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Zc,"Expect AV sync issues!");else for(ks(a,c,f.g-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Oe(b)}}}
792
- function ks(a,b,c){b.Gb+=c;b.ib+=c;a=ds(a,b);b=t(a);for(var d=b.next();!d.done;d=b.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
793
- function Xr(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,H,J,K,S,O,da,X,aa,xa,ta,ja;return I(function(oa){switch(oa.g){case 1:d=Mr(a.X,b,a.N);e=xr(d.g,"EXT-X-DEFINE");for(var Za=t(e),za=Za.next();!za.done;za=Za.next()){var Da=za.value;za=Y(Da,"NAME");Da=Y(Da,"VALUE");za&&Da&&(a.s.has(za)||a.s.set(za,Da))}f=[];g=[];h=[];if(1==d.type)return C(oa,ms(a,d),5);k=xr(d.g,"EXT-X-MEDIA");l=xr(d.g,"EXT-X-STREAM-INF");m=xr(d.g,"EXT-X-IMAGE-STREAM-INF");n=xr(d.g,"EXT-X-SESSION-KEY");Za=t(l);for(za=Za.next();!za.done;za=
794
- Za.next()){var Va=za.value;Da=Y(Va,"AUDIO");za=Y(Va,"VIDEO");var Sa=Y(Va,"SUBTITLES");Va=ns(a,Va);if(Sa){var lc=xc(zc,Va);a.u.set(Sa,lc);vb(Va,lc)}Da&&(Sa=xc("audio",Va),Sa||(Sa=a.g.hls.defaultAudioCodec),a.u.set(Da,Sa));za&&(Da=xc("video",Va),Da||(Da=a.g.hls.defaultVideoCodec),a.u.set(za,Da))}p=xr(d.g,"EXT-X-SESSION-DATA");r=t(p);for(u=r.next();!u.done;u=r.next())if(w=u.value,y=Y(w,"DATA-ID"),x=Y(w,"URI"),A=Y(w,"LANGUAGE"),z=Y(w,"VALUE"),B=(new Map).set("id",y),x&&B.set("uri",Cr(a.N,x)),A&&B.set("language",
795
- A),z&&B.set("value",z),E=new P("sessiondata",B),a.i)a.i.onEvent(E);os(a,k);Za=yr(k,"CLOSED-CAPTIONS");Za=t(Za);for(za=Za.next();!za.done;za=Za.next())za=za.value,Da=Y(za,"LANGUAGE"),Da=Uc(Da||"und"),Sa=zr(za,"GROUP-ID"),za=zr(za,"INSTREAM-ID"),a.M.get(Sa)||a.M.set(Sa,new Map),a.M.get(Sa).set(za,Da);f=ps(a,l,n);g=qs(a,k);return C(oa,rs(a,m),4);case 4:h=oa.h;oa.B(3);break;case 5:return F=oa.h,G=F.type,H=F.mimeType,J=F.codecs,K=F.language,S=F.height,O=F.width,da=F.channelCount,X=F.sampleRate,aa=new Map,
796
- C(oa,ss(a,d,c,c,J,G,K,!0,"Media Playlist",da,aa,null,!1,X,!1,H),6);case 6:xa=oa.h,a.h.set(c,xa),"video"==G&&ts(xa.stream,O,S,null,null),f.push({id:0,language:Uc(K||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==G?xa.stream:null,video:"video"==G?xa.stream:null,bandwidth:xa.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.j=new R(null,0);a.j.fc(!0);1==d.type&&(Yr(a)&&(us(a),ta=a.l,a.m.S(ta)),ja=Array.from(a.h.values()),
797
- vs(a,ja),cs(a));a.F={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};a.i.makeTextStreamsForClosedCaptions(a.F);D(oa)}})}
798
- function ms(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z;return I(function(B){if(1==B.g){c=a.g.hls.mediaPlaylistFullMimeType;d=c.split(";")[0];e=d.split("/")[0];f=Jc(c);g={type:e,mimeType:d,codecs:f,language:null,height:null,width:null,channelCount:null,sampleRate:null};if(!b.segments.length)return B.return(g);h=b.segments[0];k=new bc(h.i);l=k.ta.split(".").pop();if(m=ws[l])return B.return({type:"audio",mimeType:m,codecs:"",language:null,height:null,width:null,channelCount:null,sampleRate:null});
799
- n=[h.i];(p=xs(a,b.h,h.g,new Map))&&(n=p.wa());r=hf;u=bf(n,a.g.retryParameters);w=p?0:1;return C(B,ys(a,u,r,{type:w}),2)}y=B.h;(x=y.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var E=M(y.data);var F=(new Zh).parse(E),G=F.od();E=[];var H=!1,J=!1;switch(G.audio){case "aac":E.push("mp4a.40.2");H=!0;break;case "mp3":E.push("mp4a.40.34");H=!0;break;case "ac3":E.push("ac-3");H=!0;break;case "ec3":E.push("ec-3"),H=!0}switch(G.video){case "avc":E.push("avc1.42E01E");
800
- J=!0;break;case "hvc":E.push("hvc1.1.6.L93.90"),J=!0}E.length?(G=H&&!J,F=F.nf(),E={type:G?"audio":"video",mimeType:"video/mp2t",codecs:E.join(", "),language:null,height:F.height,width:F.width,channelCount:null,sampleRate:null}):E=null;if(A=E)return B.return(A)}else if("mp4"==l||"video/mp4"==x||"audio/mp4"==x)if(z=zs(y))return B.return(z);return B.return(g)})}
801
- function zs(a){function b(n){return c(n.name)}function c(n){n=n.toLowerCase();switch(n){case "avc1":case "avc3":d.push(n+".42E01E");f=!0;break;case "hev1":case "hvc1":d.push(n+".1.6.L93.90");f=!0;break;case "dvh1":case "dvhe":d.push(n+".05.04");f=!0;break;case "vp09":d.push(n+".00.10.08");f=!0;break;case "av01":d.push(n+".0.01M.08");f=!0;break;case "mp4a":d.push("mp4a.40.2");e=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":d.push(n),e=!0}}var d=[],e=!1,f=!1,g=null,h=null,k=null,l=null,m=
802
- null;(new Gf).box("moov",Lf).box("trak",Lf).O("tkhd",function(n){n=Mh(n.reader,n.version);h=String(n.height);k=String(n.width)}).box("mdia",Lf).O("mdhd",function(n){g=Kh(n.reader,n.version).language}).box("minf",Lf).box("stbl",Lf).O("stsd",Nf).box("mp4a",function(n){var p=n.reader;p.skip(6);p.skip(2);p.skip(8);var r=p.Ia();p.skip(2);p.skip(2);p.skip(2);p=p.Ia()+p.Ia()/65536;l=r;m=p;n.reader.ja()?Lf(n):b(n)}).box("esds",function(n){n=Nh(n.reader);d.push(n.Pa);e=!0}).box("ac-3",b).box("ec-3",b).box("opus",
803
- b).box("Opus",b).box("fLaC",b).box("avc1",function(n){n=Oh(n.reader,n.name);d.push(n.Pa);f=!0}).box("avc3",function(n){n=Oh(n.reader,n.name);d.push(n.Pa);f=!0}).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vp09",b).box("av01",b).box("enca",Of).box("encv",Of).box("sinf",Lf).box("frma",function(n){n=Ph(n.reader).Pa;c(n)}).parse(a.data,!0);if(!d.length)return null;a=e&&!f;return{type:a?"audio":"video",mimeType:a?"audio/mp4":"video/mp4",codecs:As(d).join(", "),language:g,height:h,width:k,
804
- channelCount:l,sampleRate:m}}function cs(a){if(Yr(a)){if(a.aa==Bs){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.ib),c=Math.min(c,e.Gb));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Md(b)}}else a.j.Aa(Cs(a));a.j.Cd()}
805
- function es(a,b){var c=new Map;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"NAME");var f=Y(e,"VALUE");e=Y(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
806
- function qs(a,b){var c=yr(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Ds(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=zr(d.value,"GROUP-ID");if(d=a.u.get(e))if(e=a.A.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Es(zc,d)||Fs(zc)}}return b.filter(function(g){return g})}
807
- function rs(a,b){var c,d;return I(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return I(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);wa(l,2);return C(l,Gs(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=Ba(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),C(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
808
- function os(a,b){b=b.filter(function(d){var e=Y(d,"URI")||"";return"SUBTITLES"!=Y(d,"TYPE")&&""!=e});b=t(b);for(var c=b.next();!c.done;c=b.next())Ds(a,c.value)}
809
- function ps(a,b,c){var d=[],e=new Set;if(0<c.length){c=t(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=zr(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Y(f,"KEYFORMAT")||"identity",f=(g=Hs[g])?g(f,""):null)){if(f.keyIds){g=t(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Y(k,"FRAME-RATE"),m=Number(Y(k,"AVERAGE-BANDWIDTH"))||Number(zr(k,"BANDWIDTH")),n=Y(k,"RESOLUTION");n=t(n?n.split("x"):[null,null]);var p=n.next().value,r=n.next().value,
810
- u=Y(k,"VIDEO-RANGE");k=Is(a,k);n=k.audio;k=k.video;for(var w=t(k),y=w.next();!y.done;y=w.next())ts(y.value.stream,p,r,l,u);l=a.g.disableAudio;if(!n.length||l)n=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];n=t(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,r=t(k),u=r.next();!u.done;u=r.next()){var x=u.value;if(u=p?p.stream:null)u.drmInfos=d,u.keyIds=e;if(w=x?x.stream:null)w.drmInfos=d,w.keyIds=e;y=p?p.stream.drmInfos:null;var A=x?x.stream.drmInfos:null;x=(x?x.Zc:"")+" - "+(p?p.Zc:"");
811
- u&&w&&!fh(y,A)||a.ga.has(x)||(u={id:a.Na++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!w&&w.primary,audio:u,video:w,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(u),a.ga.add(x))}return l}).reduce(rc,[]);return b=b.filter(function(k){return null!=k})}
812
- function Is(a,b){var c=ns(a,b),d=Y(b,"AUDIO"),e=Y(b,"VIDEO"),f=d||e;f=f&&a.A.has(f)?a.A.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=zr(b,"URI"),h=d.audio.find(function(m){return m&&m.Zc==g}),k=xc("video",c),l=xc("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Js(a,b,c,f),d[a.stream.type]=[a]);return d}
813
- function ns(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);a=Y(b,"CODECS",c.join(",")).split(/\s*,\s*/);return As(a)}function As(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Ic(d)[0];b.has(e)||(c.push(d),b.add(e))}return c}
814
- function Ds(a,b){var c=zr(b,"GROUP-ID"),d="",e=zr(b,"TYPE").toLowerCase();"subtitles"==e&&(e=zc);var f=e;f==zc?d=Y(b,"CODECS")||"":c&&a.u.has(c)&&(d=a.u.get(c));e=Ks(zr(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);var g=Y(b,"LANGUAGE"),h=Y(b,"NAME"),k="YES"==Y(b,"DEFAULT");var l="audio"==f?(l=Y(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Y(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=Y(b,"CHARACTERISTICS"),p="YES"==Y(b,"FORCED");"audio"==f?b=(b=Y(b,"SAMPLE-RATE"))?
815
- parseInt(b,10):null:b=null;d=Ls(a,e,d,f,g,k,h,l,null,n,p,b,m);a.A.has(c)?a.A.get(c).push(d):a.A.set(c,[d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
816
- function Gs(a,b){var c,d,e,f,g,h,k,l,m,n;return I(function(p){if(1==p.g){c=Ks(zr(b,"URI"),a.s);d=Y(b,"CODECS","jpeg")||"";if(a.h.has(c))return p.return(a.h.get(c));e=Y(b,"LANGUAGE");f=Y(b,"NAME");g=Y(b,"CHARACTERISTICS");h=Ls(a,c,d,"image",e,!1,f,null,null,g,!1,null,!1);return a.h.has(c)?p.return(a.h.get(c)):(k=Y(b,"RESOLUTION"))?C(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.g&&(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=
817
- Number(k.split("x")[1])*Number(m.split("x")[1]));if(n=Y(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p.return(h)})}function Js(a,b,c,d){var e=Ks(zr(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);b=Y(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.M.get(b):null;c=wc(d,c);d=Ls(a,e,c,d,null,!1,null,null,b,null,!1,null,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
818
- function Ls(a,b,c,d,e,f,g,h,k,l,m,n,p){function r(z){var B,E,F,G,H,J,K,S,O,da,X,aa,xa,ta;return I(function(ja){if(1==ja.g)return C(ja,Wr(a,y.hd,!0),2);if(3!=ja.g){B=ja.h;if(z.aborted)return ja.return();E=B.uri;F=Mr(a.X,B.data,E);G=Yr(a);return C(ja,ss(a,F,b,E,c,d,e,f,g,h,k,l,m,n,p),3)}H=ja.h;if(z.aborted)return ja.return();J=H.stream;Yr(a)&&!G&&us(a);y.hd=E;y.Gb=H.Gb;y.ib=H.ib;y.ld=H.ld;y.kd=H.kd;y.Mc=H.Mc;y.Dd=H.Dd;y.Ga=H.Ga;y.Ha=H.Ha;y.ne=!0;w.segmentIndex=J.segmentIndex;w.encrypted=J.encrypted;
819
- w.drmInfos=J.drmInfos;w.keyIds=J.keyIds;w.mimeType=J.mimeType;w.bandwidth=J.bandwidth;w.drmInfos.length&&a.i.newDrmInfo(w);K=Ac;if(d==K.va||d==K.qb)for(S=t(a.h.values()),O=S.next();!O.done;O=S.next())da=O.value,da.ne||da.type!=d||(da.stream.mimeType=J.mimeType);d==K.da&&(X=J.segmentIndex.get(0))&&X.h&&(w.mimeType="application/mp4");Ms(a)&&(a.Za?vs(a,[y]):(a.Za=!0,aa=Array.from(a.h.values()),xa=aa.filter(function(oa){return oa.stream.segmentIndex}),vs(a,xa),cs(a),ta=a.l,0<ta&&a.m.S(ta)));D(ja)})}var u=
820
- Cr(a.N,b),w=Ns(a,c,d,e,f,g,h,k,l,m,n,p),y={stream:w,type:d,Zc:b,hd:u,Gb:0,ib:0,Dd:new Map,ld:!1,kd:!1,Mc:!1,ae:-1,Ga:-1,Ha:-1,ne:!1},x=null,A=new AbortController;w.createSegmentIndex=function(){if(x)return x;A=new AbortController;return x=new Promise(function(z){z(r(A.signal))})};w.closeSegmentIndex=function(){x&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);x=null};return y}
821
- function Cs(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.ib));return b}function $r(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&ij(d.segmentIndex,function(e){c.push(e)});a.j.Qc(c)}
822
- function vs(a,b){if(!Yr(a))for(var c=Cs(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ub(0,c);$r(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?js(a,b):ls(a,b)}function Ms(a){if(!a.F)return!1;var b=[],c=[];a=t(a.F.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
823
- function ss(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w){var y,x,A,z,B,E,F,G,H,J,K,S,O,da,X,aa,xa,ta,ja,oa,Za,za,Da;return I(function(Va){if(1==Va.g){if(1!=b.type)throw new N(2,4,4017);y=xr(b.g,"EXT-X-DEFINE");x=es(a,y);var Sa=Ar(b.g,"EXT-X-PLAYLIST-TYPE"),lc=Ar(b.g,"EXT-X-ENDLIST");lc=Sa&&"VOD"==Sa.value||lc;Sa=Sa&&"EVENT"==Sa.value&&!lc;Sa=!lc&&!Sa;lc?bs(a,Vr):Sa?bs(a,Bs):bs(a,Os);Yr(a)&&is(a,b);return w?Va.B(2):C(Va,Ps(a,f,e,b,x),3)}2!=Va.g&&(w=Va.h);A=fs(b,w);z=A.drmInfos;B=A.keyIds;E=A.encrypted;F=A.Uf;
824
- if(E&&!z.length&&!F)throw new N(2,4,4026);G=Yr(a)?a.G.get(f):new Map;H=gs(a,b,f,w,G,x);J=H.segments;K=H.bandwidth;Yr(a)&&is(a,b);S=J[0].startTime;O=J[J.length-1];da=O.endTime;X=new hj(J);xa=(aa=Ar(b.g,"EXT-X-SERVER-CONTROL"))?null!=aa.getAttribute("CAN-SKIP-UNTIL"):!1;ta=aa?null!=aa.getAttribute("CAN-BLOCK-RELOAD"):!1;ja=Br(b.g,"EXT-X-MEDIA-SEQUENCE",0);oa=hs(ja,J);Za=oa.Ga;za=oa.Ha;Da=Ns(a,e,f,g,h,k,l,m,n,p,r,u);Da.segmentIndex=X;Da.encrypted=E;Da.drmInfos=z;Da.keyIds=B;Da.mimeType=w;Da.bandwidth=
825
- K;return Va.return({stream:Da,type:f,Zc:c,hd:d,Gb:S,ib:da,ld:xa,kd:ta,Mc:!1,ae:-1,Ga:Za,Ha:za,Dd:G,ne:!1})})}function hs(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Ga:a,Ha:c};b=b[b.length-1];var d=b.i;if(!b.i.length)return a++,b.o&&(c=0),{Ga:a,Ha:c};c=d.length-1;d[d.length-1].m||(a++,c=0);return{Ga:a,Ha:c}}
826
- function Ns(a,b,c,d,e,f,g,h,k,l,m,n){var p=Es(c,b)||Fs(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=c==zc?"subtitle":void 0;r.length||"subtitle"!==k||r.push("subtitle");return{id:a.Na++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:c==zc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Uc(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,
764
+ frameRate:b.J.frameRate,pixelAspectRatio:b.J.pixelAspectRatio,bandwidth:b.bandwidth,width:b.J.width,height:b.J.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:u,language:e,originalLanguage:b.ea.language,label:f,type:b.ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.J.emsgSchemeIdUris,roles:h,forced:z,channelsCount:b.J.Hd,audioSamplingRate:b.J.audioSamplingRate,spatialAudio:A,closedCaptions:k,hdr:E,tilesLayout:B,matchedStreams:[],accessibilityPurpose:m,external:!1};
765
+ F.createSegmentIndex=function(){var G;return H(function(I){if(1==I.g){if(F.segmentIndex)return I.B(0);G=F;return C(I,w.Xb(),3)}G.segmentIndex=I.h;D(I)})};l&&b.rb&&!a.l[l]&&(a.l[l]=F);return F}function br(a){var b,c;H(function(d){switch(d.g){case 1:return b=0,ua(d,2),C(d,cr(a),4);case 4:b=d.h;xa(d,3);break;case 2:if(c=za(d),a.h){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(c),d.return();c.severity=1;a.h.onError(c)}case 3:if(!a.h)return d.return();dr(a,b);D(d)}})}
766
+ function dr(a,b){0>a.C||a.F.S(Math.max(a.C-b,Ta(a.G)))}
767
+ function jr(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Hd:null,audioSamplingRate:null,Ub:0};c=c||b.Da;var d=Zf(a,"BaseURL"),e=d.map(eg),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=gg(a,"frameRate",pg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Zf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
768
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Zf(a,"AudioChannelConfiguration");m=rr(m)||b.Hd;p=gg(a,"audioSamplingRate",mg)||b.audioSamplingRate;f||(f=or(g,h));var r=Yf(a,"SegmentBase"),u=Yf(a,"SegmentTemplate"),w=r?gg(r,"availabilityTimeOffset",ng)||0:0,y=u?gg(u,"availabilityTimeOffset",ng)||0:0;d=d&&d.length?gg(d[0],"availabilityTimeOffset",ng)||0:0;d=b.Ub+d+w+y;return{Da:tc(c,e),Wc:r||b.Wc,ub:Yf(a,"SegmentList")||b.ub,Xc:u||b.Xc,width:gg(a,"width",mg)||b.width,height:gg(a,
769
+ "height",mg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),language:a.getAttribute("lang"),Hd:m,audioSamplingRate:p,Ub:d}}
770
+ function rr(a){a=t(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=
771
+ 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 pr(a){var b=a.Wc?1:0;b+=a.ub?1:0;b+=a.Xc?1:0;if(0==b)return a.contentType==yc||"application"==a.contentType?!0:!1;1!=b&&(a.Wc&&(a.ub=null),a.Xc=null);return!0}
772
+ function sr(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(1==m.g)return e=tc(b,[c]),f=af(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),We(a.u,g),C(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=wf(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
773
+ function hr(a,b,c){var d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.B(4);break}h=g.value;ua(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.B(8);
774
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}n.B(9);break;case 7:return C(n,sr(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return C(n,sr(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:xa(n,
775
+ 3);break;case 5:za(n);case 3:g=f.next();n.B(2);break;case 4:return Xa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
776
+ function kr(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=gg(d,"timescale",mg)||1;d=t(Zf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=gg(k,"presentationTime",mg)||0,m=gg(k,"duration",mg)||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))}}
777
+ function qr(a,b,c,d,e){var f,g,h,k,l,m;return H(function(n){if(1==n.g)return f=gf,g=e?0:1,h=Gj(b,c,d,a.g.retryParameters),k=a.h.networkingEngine,l=k.request(f,h,{type:g}),We(a.u,l),C(n,l.promise,2);m=n.h;return n.return(m.data)})}function or(a,b){b=Bc(a,b);return Kc(b)?yc:a.split("/")[0]}L("shaka.dash.DashParser",ar);lh.mpd=function(){return new ar};jh["application/dash+xml"]=function(){return new ar};jh["video/vnd.mpeg.dash.mpd"]=function(){return new ar};function tr(){}L("shaka.dependencies",tr);tr.has=function(a){return ur.has(a)};tr.add=function(a,b){if(!vr[a])throw Error(a+" is not supported");ur.set(a,function(){return b})};var vr={muxjs:"muxjs",ISOBoxer:"ISOBoxer"};tr.Allowed=vr;var ur=new Map([["muxjs",function(){return window.muxjs}],["ISOBoxer",function(){return window.ISOBoxer}]]);function wr(a,b){return a.filter(function(c){return c.name==b})}function xr(a,b){return a.filter(function(c){return yr(c,"TYPE")==b})}function zr(a,b){a=wr(a,b);return a.length?a[0]:null}function Ar(a,b,c){c=void 0===c?0:c;return(a=zr(a,b))?Number(a.value):c}function Br(a,b){return tc([a],[b])[0]};function Cr(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Dr(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Dr.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};
778
+ Dr.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Y(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function yr(a,b){a=a.getAttribute(b);if(!a)throw new N(2,4,4023,b);return a.value}function Er(a,b,c,d){d=void 0===d?[]:d;this.g=c;this.l=null;this.j=a;this.m=b;this.h=d}
779
+ ea.Object.defineProperties(Er.prototype,{i:{configurable:!0,enumerable:!0,get:function(){!this.l&&this.j&&this.m&&(this.l=Br(this.j,this.m),this.m=this.j=null);return this.l||""}}});function Fr(a,b){this.name=a;this.value=b};function Gr(a){this.h=a||"";this.g=0}function Hr(a){Ir(a,/[ \t]+/gm)}function Ir(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 Jr(a){return a.g==a.h.length?null:(a=Ir(a,/[^ \t\n]*/gm))?a[0]:null};function Kr(){this.g=0}
780
+ function Lr(a,b,c){b=wf(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=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Mr(a,g),--a.g,Nr.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=Mr(a,h);if(Or.includes(h.name)){if(1!=b)throw new N(2,4,4017);
781
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Mr(a,m),Nr.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"==Y(m,"TYPE")?k.push(m):"MAP"==Y(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=m.trim(),h&&g.push(h),e.push(new Er(d,m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Er("","",g,k)));return new Cr(c,b,f,e)}f.push(h);
782
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Fr("URI",k)),e=!0)}}return new Cr(c,b,f)}function Mr(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 Gr(d);var f;(f=Ir(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Ir(d,g);)c.push(new Fr(f[1],f[2]||f[3])),Hr(d)}return new Dr(a,b,c,e)}
783
+ var Nr="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Or="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Pr(){}function Qr(a){try{var b=Rr(a);return Me({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ke(c)}}
784
+ function Rr(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=Sf(a):e=Af(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Pr);Pr.parse=Qr;Ye("data",Qr);function Sr(){var a=this;this.g=this.i=null;this.Na=1;this.s=new Map;this.A=new Map;this.G=new Map;this.G.set("video",new Map);this.G.set("audio",new Map);this.G.set(yc,new Map);this.G.set("image",new Map);this.ga=new Set;this.h=new Map;this.j=null;this.N="";this.X=new Kr;this.C=-1;this.L=Infinity;this.Za=!1;this.m=new cd(function(){Tr(a)});this.aa=Ur;this.F=null;this.Z=0;this.l=Infinity;this.W=this.V=this.H=0;this.I=new Ve;this.M=new Map;this.u=new Map;this.Y=new Map;this.Oa=this.o=!1}q=Sr.prototype;
785
+ q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return H(function(e){return 1==e.g?(c.i=b,c.o=b.isLowLatencyMode(),C(e,Vr(c,a),2)):3!=e.g?(d=e.h,c.N=d.uri,C(e,Wr(c,d.data,a),3)):e.return(c.F)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.I&&(a.push(this.I.destroy()),this.I=null);this.g=this.i=null;this.ga.clear();this.F=null;this.h.clear();this.A.clear();this.u.clear();this.s.clear();return Promise.all(a)};
786
+ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){if(!Xr(a))return m.return();b=[];c=Array.from(a.h.values());a.l=Infinity;d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Yr(a,g));return C(m,Promise.all(b),2)}Zr(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.Mc});d.length&&!h&&(k=$r,as(a,k.Qf),l=d.map(function(n){return n.ib}),a.j.Aa(Math.min.apply(Math,v(l))),a.i.updateDuration());
787
+ h&&bs(a);D(m)})};function cs(a,b){return Xr(a)?a.G.get(b.type):b.Ed}
788
+ function Yr(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,I,J,K,S;return H(function(R){if(1==R.g)return c=b.hd,d=new ac(c),e=new fc,b.kd&&(0<=b.Ga&&e.add("_HLS_msn",String(b.Ga)),0<=b.Ha&&e.add("_HLS_part",String(b.Ha))),b.ld&&e.add("_HLS_skip","YES"),oc(e),e.Dc&&dc(d,e),C(R,Vr(a,d.toString(),!0),2);f=R.h;if(!b.stream.segmentIndex)return R.return();g=Lr(a.X,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=wr(g.g,"EXT-X-DEFINE");k=ds(a,h);l=b.stream;m=cs(a,b);n=es(g,l.mimeType);p=n.keyIds;
789
+ r=n.drmInfos;u=function(ba,W){return ba.size===W.size&&[].concat(v(ba)).every(function(Z){return W.has(Z)})};u(l.keyIds,p)||(l.keyIds=p,l.drmInfos=r,a.i.newDrmInfo(l));w=fs(a,g,l.type,l.mimeType,m,k);y=w.segments;x=w.bandwidth;l.bandwidth=x;l.segmentIndex.Pc(y,a.j.fb());y.length&&(A=Ar(g.g,"EXT-X-MEDIA-SEQUENCE",0),B=(z=zr(g.g,"EXT-X-SKIP"))?Number(Y(z,"SKIPPED-SEGMENTS")):0,E=gs(A,y),F=E.Ga,G=E.Ha,b.Ga=F+B,b.Ha=G,I=m.get(A),l.segmentIndex.Ta(I));J=y[0];b.Hb=J.startTime;K=y[y.length-1];b.ib=K.endTime;
790
+ if(S=zr(g.g,"EXT-X-ENDLIST"))b.Mc=!0;hs(a,g);D(R)})}q.onExpirationUpdated=function(){};
791
+ function is(a,b){for(var c=-1==a.C,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=cs(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.C=Math.max(a.C,k));e.be=k;break}}}}if(!(0>a.C))for(b=t(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.C-c.be),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),js(a,c,d)}
792
+ function ks(a,b){if(Infinity==a.L){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.L=Math.min(a.L,d.g))}}b=a.L;if(Infinity!=b)for(d=t(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Wa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Zc,"Expect AV sync issues!");else for(js(a,c,f.g-b-f.startTime),c=t(e),e=c.next();!e.done;e=c.next())e.value.Pe(b)}}}
793
+ function js(a,b,c){b.Hb+=c;b.ib+=c;a=cs(a,b);b=t(a);for(var d=b.next();!d.done;d=b.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
794
+ function Wr(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,I,J,K,S,R,ba,W,Z,na,wa,oa;return H(function(ya){switch(ya.g){case 1:d=Lr(a.X,b,a.N);e=wr(d.g,"EXT-X-DEFINE");for(var jb=t(e),Da=jb.next();!Da.done;Da=jb.next()){var Ga=Da.value;Da=Y(Ga,"NAME");Ga=Y(Ga,"VALUE");Da&&Ga&&(a.s.has(Da)||a.s.set(Da,Ga))}f=[];g=[];h=[];if(1==d.type)return C(ya,ls(a,d),5);k=wr(d.g,"EXT-X-MEDIA");l=wr(d.g,"EXT-X-STREAM-INF");m=wr(d.g,"EXT-X-IMAGE-STREAM-INF");n=wr(d.g,"EXT-X-SESSION-KEY");jb=t(l);for(Da=jb.next();!Da.done;Da=
795
+ jb.next()){var Ya=Da.value;Ga=Y(Ya,"AUDIO");Da=Y(Ya,"VIDEO");var Sa=Y(Ya,"SUBTITLES");Ya=ms(a,Ya);if(Sa){var lc=wc(yc,Ya);a.u.set(Sa,lc);ub(Ya,lc)}Ga&&(Sa=wc("audio",Ya),Sa||(Sa=a.g.hls.defaultAudioCodec),a.u.set(Ga,Sa));Da&&(Ga=wc("video",Ya),Ga||(Ga=a.g.hls.defaultVideoCodec),a.u.set(Da,Ga))}p=wr(d.g,"EXT-X-SESSION-DATA");r=t(p);for(u=r.next();!u.done;u=r.next())if(w=u.value,y=Y(w,"DATA-ID"),x=Y(w,"URI"),A=Y(w,"LANGUAGE"),z=Y(w,"VALUE"),B=(new Map).set("id",y),x&&B.set("uri",Br(a.N,x)),A&&B.set("language",
796
+ A),z&&B.set("value",z),E=new O("sessiondata",B),a.i)a.i.onEvent(E);ns(a,k);jb=xr(k,"CLOSED-CAPTIONS");jb=t(jb);for(Da=jb.next();!Da.done;Da=jb.next())Da=Da.value,Ga=Y(Da,"LANGUAGE"),Ga=Tc(Ga||"und"),Sa=yr(Da,"GROUP-ID"),Da=yr(Da,"INSTREAM-ID"),a.M.get(Sa)||a.M.set(Sa,new Map),a.M.get(Sa).set(Da,Ga);f=os(a,l,n);g=ps(a,k);return C(ya,qs(a,m),4);case 4:h=ya.h;ya.B(3);break;case 5:return F=ya.h,G=F.type,I=F.mimeType,J=F.codecs,K=F.language,S=F.height,R=F.width,ba=F.channelCount,W=F.sampleRate,Z=new Map,
797
+ C(ya,rs(a,d,c,c,J,G,K,!0,"Media Playlist",ba,Z,null,!1,W,!1,I),6);case 6:na=ya.h,a.h.set(c,na),"video"==G&&ss(na.stream,R,S,null,null),f.push({id:0,language:Tc(K||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==G?na.stream:null,video:"video"==G?na.stream:null,bandwidth:na.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.j=new Q(null,0);a.j.fc(!0);1==d.type&&(Xr(a)&&(ts(a),wa=a.l,a.m.S(wa)),oa=Array.from(a.h.values()),
798
+ us(a,oa),bs(a));a.F={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null};a.i.makeTextStreamsForClosedCaptions(a.F);D(ya)}})}
799
+ function ls(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z;return H(function(B){if(1==B.g){c=a.g.hls.mediaPlaylistFullMimeType;d=c.split(";")[0];e=d.split("/")[0];f=Ic(c);g={type:e,mimeType:d,codecs:f,language:null,height:null,width:null,channelCount:null,sampleRate:null};if(!b.segments.length)return B.return(g);h=b.segments[0];k=new ac(h.i);l=k.ta.split(".").pop();if(m=vs[l])return B.return({type:"audio",mimeType:m,codecs:"",language:null,height:null,width:null,channelCount:null,sampleRate:null});
800
+ n=[h.i];(p=ws(a,b.h,h.g,new Map))&&(n=p.wa());r=gf;u=af(n,a.g.retryParameters);w=p?0:1;return C(B,xs(a,u,r,{type:w}),2)}y=B.h;(x=y.headers["content-type"])&&(x=x.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==x){var E=M(y.data);var F=(new Yh).parse(E),G=F.od();E=[];var I=!1,J=!1;switch(G.audio){case "aac":E.push("mp4a.40.2");I=!0;break;case "mp3":E.push("mp4a.40.34");I=!0;break;case "ac3":E.push("ac-3");I=!0;break;case "ec3":E.push("ec-3"),I=!0}switch(G.video){case "avc":E.push("avc1.42E01E");
801
+ J=!0;break;case "hvc":E.push("hvc1.1.6.L93.90"),J=!0}E.length?(G=I&&!J,F=F.nf(),E={type:G?"audio":"video",mimeType:"video/mp2t",codecs:E.join(", "),language:null,height:F.height,width:F.width,channelCount:null,sampleRate:null}):E=null;if(A=E)return B.return(A)}else if("mp4"==l||"video/mp4"==x||"audio/mp4"==x)if(z=ys(y))return B.return(z);return B.return(g)})}
802
+ function ys(a){function b(n){return c(n.name)}function c(n){n=n.toLowerCase();switch(n){case "avc1":case "avc3":d.push(n+".42E01E");f=!0;break;case "hev1":case "hvc1":d.push(n+".1.6.L93.90");f=!0;break;case "dvh1":case "dvhe":d.push(n+".05.04");f=!0;break;case "vp09":d.push(n+".00.10.08");f=!0;break;case "av01":d.push(n+".0.01M.08");f=!0;break;case "mp4a":d.push("mp4a.40.2");e=!0;break;case "ac-3":case "ec-3":case "opus":case "flac":d.push(n),e=!0}}var d=[],e=!1,f=!1,g=null,h=null,k=null,l=null,m=
803
+ null;(new Ff).box("moov",Kf).box("trak",Kf).O("tkhd",function(n){n=Lh(n.reader,n.version);h=String(n.height);k=String(n.width)}).box("mdia",Kf).O("mdhd",function(n){g=Jh(n.reader,n.version).language}).box("minf",Kf).box("stbl",Kf).O("stsd",Mf).box("mp4a",function(n){var p=n.reader;p.skip(6);p.skip(2);p.skip(8);var r=p.Ia();p.skip(2);p.skip(2);p.skip(2);p=p.Ia()+p.Ia()/65536;l=r;m=p;n.reader.ja()?Kf(n):b(n)}).box("esds",function(n){n=Mh(n.reader);d.push(n.Pa);e=!0}).box("ac-3",b).box("ec-3",b).box("opus",
804
+ b).box("Opus",b).box("fLaC",b).box("avc1",function(n){n=Nh(n.reader,n.name);d.push(n.Pa);f=!0}).box("avc3",function(n){n=Nh(n.reader,n.name);d.push(n.Pa);f=!0}).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vp09",b).box("av01",b).box("enca",Nf).box("encv",Nf).box("sinf",Kf).box("frma",function(n){n=Oh(n.reader).Pa;c(n)}).parse(a.data,!0);if(!d.length)return null;a=e&&!f;return{type:a?"audio":"video",mimeType:a?"audio/mp4":"video/mp4",codecs:zs(d).join(", "),language:g,height:h,width:k,
805
+ channelCount:l,sampleRate:m}}function bs(a){if(Xr(a)){if(a.aa==As){for(var b,c=b=Infinity,d=t(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.ib),c=Math.min(c,e.Hb));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.Nd(b)}}else a.j.Aa(Bs(a));a.j.Dd()}
806
+ function ds(a,b){var c=new Map;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Y(e,"NAME");var f=Y(e,"VALUE");e=Y(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
807
+ function ps(a,b){var c=xr(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Cs(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=yr(d.value,"GROUP-ID");if(d=a.u.get(e))if(e=a.A.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Ds(yc,d)||Es(yc)}}return b.filter(function(g){return g})}
808
+ function qs(a,b){var c,d;return H(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return H(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);ua(l,2);return C(l,Fs(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=za(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),C(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
809
+ function ns(a,b){b=b.filter(function(d){var e=Y(d,"URI")||"";return"SUBTITLES"!=Y(d,"TYPE")&&""!=e});b=t(b);for(var c=b.next();!c.done;c=b.next())Cs(a,c.value)}
810
+ function os(a,b,c){var d=[],e=new Set;if(0<c.length){c=t(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=yr(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Y(f,"KEYFORMAT")||"identity",f=(g=Gs[g])?g(f,""):null)){if(f.keyIds){g=t(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Y(k,"FRAME-RATE"),m=Number(Y(k,"AVERAGE-BANDWIDTH"))||Number(yr(k,"BANDWIDTH")),n=Y(k,"RESOLUTION");n=t(n?n.split("x"):[null,null]);var p=n.next().value,r=n.next().value,
811
+ u=Y(k,"VIDEO-RANGE");k=Hs(a,k);n=k.audio;k=k.video;for(var w=t(k),y=w.next();!y.done;y=w.next())ss(y.value.stream,p,r,l,u);l=a.g.disableAudio;if(!n.length||l)n=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];n=t(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,r=t(k),u=r.next();!u.done;u=r.next()){var x=u.value;if(u=p?p.stream:null)u.drmInfos=d,u.keyIds=e;if(w=x?x.stream:null)w.drmInfos=d,w.keyIds=e;y=p?p.stream.drmInfos:null;var A=x?x.stream.drmInfos:null;x=(x?x.Zc:"")+" - "+(p?p.Zc:"");
812
+ u&&w&&!eh(y,A)||a.ga.has(x)||(u={id:a.Na++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!w&&w.primary,audio:u,video:w,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(u),a.ga.add(x))}return l}).reduce(qc,[]);return b=b.filter(function(k){return null!=k})}
813
+ function Hs(a,b){var c=ms(a,b),d=Y(b,"AUDIO"),e=Y(b,"VIDEO"),f=d||e;f=f&&a.A.has(f)?a.A.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=yr(b,"URI"),h=d.audio.find(function(m){return m&&m.Zc==g}),k=wc("video",c),l=wc("audio",c);l&&!k?(f="audio",e=0<d.audio.length):!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Is(a,b,c,f),d[a.stream.type]=[a]);return d}
814
+ function ms(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);a=Y(b,"CODECS",c.join(",")).split(/\s*,\s*/);return zs(a)}function zs(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Hc(d)[0];b.has(e)||(c.push(d),b.add(e))}return c}
815
+ function Cs(a,b){var c=yr(b,"GROUP-ID"),d="",e=yr(b,"TYPE").toLowerCase();"subtitles"==e&&(e=yc);var f=e;f==yc?d=Y(b,"CODECS")||"":c&&a.u.has(c)&&(d=a.u.get(c));e=Js(yr(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);var g=Y(b,"LANGUAGE"),h=Y(b,"NAME"),k="YES"==Y(b,"DEFAULT");var l="audio"==f?(l=Y(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Y(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=Y(b,"CHARACTERISTICS"),p="YES"==Y(b,"FORCED");"audio"==f?b=(b=Y(b,"SAMPLE-RATE"))?
816
+ parseInt(b,10):null:b=null;d=Ks(a,e,d,f,g,k,h,l,null,n,p,b,m);a.A.has(c)?a.A.get(c).push(d):a.A.set(c,[d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
817
+ function Fs(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(1==p.g){c=Js(yr(b,"URI"),a.s);d=Y(b,"CODECS","jpeg")||"";if(a.h.has(c))return p.return(a.h.get(c));e=Y(b,"LANGUAGE");f=Y(b,"NAME");g=Y(b,"CHARACTERISTICS");h=Ks(a,c,d,"image",e,!1,f,null,null,g,!1,null,!1);return a.h.has(c)?p.return(a.h.get(c)):(k=Y(b,"RESOLUTION"))?C(p,h.stream.createSegmentIndex(),3):p.B(2)}2!=p.g&&(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=
818
+ Number(k.split("x")[1])*Number(m.split("x")[1]));if(n=Y(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p.return(h)})}function Is(a,b,c,d){var e=Js(yr(b,"URI"),a.s);if(a.h.has(e))return a.h.get(e);b=Y(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.M.get(b):null;c=vc(d,c);d=Ks(a,e,c,d,null,!1,null,null,b,null,!1,null,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
819
+ function Ks(a,b,c,d,e,f,g,h,k,l,m,n,p){function r(z){var B,E,F,G,I,J,K,S,R,ba,W,Z,na,wa;return H(function(oa){if(1==oa.g)return C(oa,Vr(a,y.hd,!0),2);if(3!=oa.g){B=oa.h;if(z.aborted)return oa.return();E=B.uri;F=Lr(a.X,B.data,E);G=Xr(a);return C(oa,rs(a,F,b,E,c,d,e,f,g,h,k,l,m,n,p),3)}I=oa.h;if(z.aborted)return oa.return();J=I.stream;Xr(a)&&!G&&ts(a);y.hd=E;y.Hb=I.Hb;y.ib=I.ib;y.ld=I.ld;y.kd=I.kd;y.Mc=I.Mc;y.Ed=I.Ed;y.Ga=I.Ga;y.Ha=I.Ha;y.oe=!0;w.segmentIndex=J.segmentIndex;w.encrypted=J.encrypted;
820
+ w.drmInfos=J.drmInfos;w.keyIds=J.keyIds;w.mimeType=J.mimeType;w.bandwidth=J.bandwidth;w.drmInfos.length&&a.i.newDrmInfo(w);K=zc;if(d==K.va||d==K.qb)for(S=t(a.h.values()),R=S.next();!R.done;R=S.next())ba=R.value,ba.oe||ba.type!=d||(ba.stream.mimeType=J.mimeType);d==K.da&&(W=J.segmentIndex.get(0))&&W.h&&(w.mimeType="application/mp4");Ls(a)&&(a.Za?us(a,[y]):(a.Za=!0,Z=Array.from(a.h.values()),na=Z.filter(function(ya){return ya.stream.segmentIndex}),us(a,na),bs(a),wa=a.l,0<wa&&a.m.S(wa)));D(oa)})}var u=
821
+ Br(a.N,b),w=Ms(a,c,d,e,f,g,h,k,l,m,n,p),y={stream:w,type:d,Zc:b,hd:u,Hb:0,ib:0,Ed:new Map,ld:!1,kd:!1,Mc:!1,be:-1,Ga:-1,Ha:-1,oe:!1},x=null,A=new AbortController;w.createSegmentIndex=function(){if(x)return x;A=new AbortController;return x=new Promise(function(z){z(r(A.signal))})};w.closeSegmentIndex=function(){x&&!w.segmentIndex&&A.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);x=null};return y}
822
+ function Bs(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.ib));return b}function Zr(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&hj(d.segmentIndex,function(e){c.push(e)});a.j.Qc(c)}
823
+ function us(a,b){if(!Xr(a))for(var c=Bs(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Vb(0,c);Zr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?is(a,b):ks(a,b)}function Ls(a){if(!a.F)return!1;var b=[],c=[];a=t(a.F.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
824
+ function rs(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,w){var y,x,A,z,B,E,F,G,I,J,K,S,R,ba,W,Z,na,wa,oa,ya,jb,Da,Ga;return H(function(Ya){if(1==Ya.g){if(1!=b.type)throw new N(2,4,4017);y=wr(b.g,"EXT-X-DEFINE");x=ds(a,y);var Sa=zr(b.g,"EXT-X-PLAYLIST-TYPE"),lc=zr(b.g,"EXT-X-ENDLIST");lc=Sa&&"VOD"==Sa.value||lc;Sa=Sa&&"EVENT"==Sa.value&&!lc;Sa=!lc&&!Sa;lc?as(a,Ur):Sa?as(a,As):as(a,Ns);Xr(a)&&hs(a,b);return w?Ya.B(2):C(Ya,Os(a,f,e,b,x),3)}2!=Ya.g&&(w=Ya.h);A=es(b,w);z=A.drmInfos;B=A.keyIds;E=A.encrypted;F=A.Uf;if(E&&
825
+ !z.length&&!F)throw new N(2,4,4026);G=Xr(a)?a.G.get(f):new Map;I=fs(a,b,f,w,G,x);J=I.segments;K=I.bandwidth;Xr(a)&&hs(a,b);S=J[0].startTime;R=J[J.length-1];ba=R.endTime;W=new gj(J);na=(Z=zr(b.g,"EXT-X-SERVER-CONTROL"))?null!=Z.getAttribute("CAN-SKIP-UNTIL"):!1;wa=Z?null!=Z.getAttribute("CAN-BLOCK-RELOAD"):!1;oa=Ar(b.g,"EXT-X-MEDIA-SEQUENCE",0);ya=gs(oa,J);jb=ya.Ga;Da=ya.Ha;Ga=Ms(a,e,f,g,h,k,l,m,n,p,r,u);Ga.segmentIndex=W;Ga.encrypted=E;Ga.drmInfos=z;Ga.keyIds=B;Ga.mimeType=w;Ga.bandwidth=K;return Ya.return({stream:Ga,
826
+ type:f,Zc:c,hd:d,Hb:S,ib:ba,ld:na,kd:wa,Mc:!1,be:-1,Ga:jb,Ha:Da,Ed:G,oe:!1})})}function gs(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Ga:a,Ha:c};b=b[b.length-1];var d=b.i;if(!b.i.length)return a++,b.o&&(c=0),{Ga:a,Ha:c};c=d.length-1;d[d.length-1].m||(a++,c=0);return{Ga:a,Ha:c}}
827
+ function Ms(a,b,c,d,e,f,g,h,k,l,m,n){var p=Ds(c,b)||Es(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=c==yc?"subtitle":void 0;r.length||"subtitle"!==k||r.push("subtitle");return{id:a.Na++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:c==yc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Tc(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,
827
828
  frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,tilesLayout:void 0,accessibilityPurpose:null,external:!1}}
828
- function fs(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=xr(d.value.g,"EXT-X-KEY"),c.push.apply(c,v(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=zr(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Y(g,"KEYFORMAT")||"identity",g=(h=Hs[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,Uf:d}}
829
- function Qs(a,b,c){if(!window.crypto||!window.crypto.subtle)throw $a("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=Y(b,"IV","");if(e){var f=Uf(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=Br(c.g,"EXT-X-MEDIA-SEQUENCE",0);b=Cr(c.h,zr(b,"URI"));var g=bf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return I(function(n){if(1==n.g)return C(n,
830
- ys(a,g,6),2);if(3!=n.g){k=n.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l={name:"AES-CBC"};m=h;return C(n,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=n.h;h.fetchKey=void 0;D(n)})}};return h}
831
- function is(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=Ar(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=Ar(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=Ar(b.g,"EXT-X-PART-INF"))a.H=Number(zr(e,"PART-TARGET"));b=Ar(b.g,"EXT-X-SERVER-CONTROL");a.o&&a.H?(a.l=a.Oa?5*a.H<=c?Math.min(a.H,a.l):Math.min(c,a.l):Math.min(a.H,a.l),a.W=b?Number(zr(b,"PART-HOLD-BACK")):0):(a.l=Math.min(c,a.l),c=b?
832
- b.getAttribute("HOLD-BACK"):null,a.V=c?Number(c.value):0);a.Z=Math.max(d,a.Z)}function us(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.W?a.W:a.V?a.V:a.Z*a.g.hls.liveSegmentsDelay;a.j.Hf(0);a.j.Gf(b);a.j.fc(!1)}function xs(a,b,c,d){c=Ar(c,"EXT-X-MAP");if(!c)return null;var e=zr(c,"URI");d=Ks(Cr(b,e),d);b=[d,Y(c,"BYTERANGE","")].join("-");a.Y.has(b)||(c=Rs(d,c),a.Y.set(b,c));return a.Y.get(b)}
833
- function Rs(a,b){var c=0,d=null;if(b=Y(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new sh(function(){return[a]},c,d)}
834
- function Ss(a,b,c,d,e,f,g,h,k,l,m){var n=d.g,p=Ar(n,"EXTINF"),r=0,u=0,w=null;d.h.length&&!a.o&&$a("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=Ar(n,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=ig(x.value))}var A=uh;Ar(n,"EXT-X-GAP")&&(A=2);if(!p){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
835
- if(!a.o)return null}var z=[];x=!1;var B=null,E=!1,F=!1;if(a.o&&d.h.length){r=("video/mp4"==k||"audio/mp4"==k)&&window.ReadableStream;k=y;for(var G={},H=0;H<d.h.length;G={qc:G.qc,dd:G.dd},H++){var J=d.h[H],K=0==H?c:z[z.length-1],S=0==H?e:K.endTime,O=Number(Y(J,"DURATION"))||a.H;if(O){var da=S+O,X=0,aa=null;"EXT-X-PRELOAD-HINT"==J.name?(X=(X=Y(J,"BYTERANGE-START"))?Number(X):0,(K=Y(J,"BYTERANGE-LENGTH"))?aa=X+Number(K)-1:X&&(aa=Number.MAX_SAFE_INTEGER)):(X=Y(J,"BYTERANGE"),aa=t(Ts(K,X)),X=aa.next().value,
836
- aa=aa.next().value);G.dd=Y(J,"URI");if(G.dd){K=uh;"YES"==Y(J,"GAP")&&(K=2,E=!0);G.qc=null;var xa=function(ja){return function(){null==ja.qc&&(ja.qc=Cr(g,ja.dd));return[ja.qc]}}(G);r&&0<=X&&null!=aa&&(B=xa,x=!0);S=new Q(S,da,xa,X,aa,b,0,0,Infinity,[],"",null,k,K,m);"EXT-X-PRELOAD-HINT"==J.name&&(S.pe(),F=!0);"YES"!=Y(J,"INDEPENDENT")&&0<H&&S.vf();z.push(S);k&&(k+=O)}}}}if(p){p=Number(p.value.split(",")[0]);if(0==p)return null;r=e+p}else r=z[z.length-1].endTime;x&&(E||0!=z[0].Ba?(x=!1,B=null):z=[]);
837
- (p=Ar(n,"EXT-X-BYTERANGE"))?(w=t(Ts(c,p.value)),u=w.next().value,w=w.next().value):z.length&&(u=z[0].Ba,w=z[z.length-1].ka);c="";p=null;"image"==h&&(c="1x1",h=Ar(n,"EXT-X-TILES"))&&(c=zr(h,"LAYOUT"),(h=Y(h,"DURATION"))&&(p=Number(h)));var ta=null;b=new Q(e,r,function(){if(B)return B();null==ta&&(ta=Ks(d.i,f));return ta.length?[ta]:[]},u,w,b,l,0,Infinity,z,c,p,y,A,m);x&&(a.Oa=!0,b.uf(),F&&b.pe());return b}
838
- function Ts(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ka+1,d=c+b-1);return[c,d]}
839
- function gs(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Br(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Br(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=Ar(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Yr(a)&&e.has(p)&&(r=e.get(p));var u=[],w=null,y=r;m=[];for(var x=0;x<g.length;x++){var A=g[x],z=0==x?r:w.endTime;p=l+n+x;Ar(A.g,"EXT-X-DISCONTINUITY")&&(k++,y=z);var B=t(A.g);for(var E=B.next();!E.done;E=B.next())E=E.value,"EXT-X-KEY"==E.name&&("AES-128"==zr(E,"METHOD")?h=Qs(a,E,b):h=void 0);e.set(p,
840
- z);B=xs(a,b.h,A.g,f);!a.o&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.o=a.i.isLowLatencyMode());if(z=Ss(a,B,w,A,z,f,b.h,c,d,y,h))(w=Br(A.g,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:z.endTime-z.startTime}):m.length&&(w=m.pop(),w.duration+=z.endTime-z.startTime,m.push(w)),w=z,z.j=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.C&&p<a.C||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(F,G){return F+G.duration},0),b=Math.round(m.reduce(function(F,G){return F+G.bitrate*G.duration},
829
+ function es(a,b){var c=[];if(a.segments){a=t(a.segments);for(var d=a.next();!d.done;d=a.next())d=wr(d.value.g,"EXT-X-KEY"),c.push.apply(c,v(d))}d=a=!1;var e=[],f=new Set;c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=yr(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Y(g,"KEYFORMAT")||"identity",g=(h=Gs[h])?h(g,b):null){if(g.keyIds){h=t(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,Uf:d}}
830
+ function Ps(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Xa("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=Y(b,"IV","");if(e){var f=Tf(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=Ar(c.g,"EXT-X-MEDIA-SEQUENCE",0);b=Br(c.h,yr(b,"URI"));var g=af([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return H(function(n){if(1==n.g)return C(n,
831
+ xs(a,g,6),2);if(3!=n.g){k=n.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l={name:"AES-CBC"};m=h;return C(n,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=n.h;h.fetchKey=void 0;D(n)})}};return h}
832
+ function hs(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=zr(d[e].g,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=zr(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=zr(b.g,"EXT-X-PART-INF"))a.H=Number(yr(e,"PART-TARGET"));b=zr(b.g,"EXT-X-SERVER-CONTROL");a.o&&a.H?(a.l=a.Oa?5*a.H<=c?Math.min(a.H,a.l):Math.min(c,a.l):Math.min(a.H,a.l),a.W=b?Number(yr(b,"PART-HOLD-BACK")):0):(a.l=Math.min(c,a.l),c=b?
833
+ b.getAttribute("HOLD-BACK"):null,a.V=c?Number(c.value):0);a.Z=Math.max(d,a.Z)}function ts(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.W?a.W:a.V?a.V:a.Z*a.g.hls.liveSegmentsDelay;a.j.Hf(0);a.j.Gf(b);a.j.fc(!1)}function ws(a,b,c,d){c=zr(c,"EXT-X-MAP");if(!c)return null;var e=yr(c,"URI");d=Js(Br(b,e),d);b=[d,Y(c,"BYTERANGE","")].join("-");a.Y.has(b)||(c=Qs(d,c),a.Y.set(b,c));return a.Y.get(b)}
834
+ function Qs(a,b){var c=0,d=null;if(b=Y(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new rh(function(){return[a]},c,d)}
835
+ function Rs(a,b,c,d,e,f,g,h,k,l,m){var n=d.g,p=zr(n,"EXTINF"),r=0,u=0,w=null;d.h.length&&!a.o&&Xa("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=zr(n,"EXT-X-PROGRAM-DATE-TIME");x&&x.value&&(y=hg(x.value))}var A=th;zr(n,"EXT-X-GAP")&&(A=2);if(!p){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
836
+ if(!a.o)return null}var z=[];x=!1;var B=null,E=!1,F=!1;if(a.o&&d.h.length){r=("video/mp4"==k||"audio/mp4"==k)&&window.ReadableStream;k=y;for(var G={},I=0;I<d.h.length;G={qc:G.qc,dd:G.dd},I++){var J=d.h[I],K=0==I?c:z[z.length-1],S=0==I?e:K.endTime,R=Number(Y(J,"DURATION"))||a.H;if(R){var ba=S+R,W=0,Z=null;"EXT-X-PRELOAD-HINT"==J.name?(W=(W=Y(J,"BYTERANGE-START"))?Number(W):0,(K=Y(J,"BYTERANGE-LENGTH"))?Z=W+Number(K)-1:W&&(Z=Number.MAX_SAFE_INTEGER)):(W=Y(J,"BYTERANGE"),Z=t(Ss(K,W)),W=Z.next().value,
837
+ Z=Z.next().value);G.dd=Y(J,"URI");if(G.dd){K=th;"YES"==Y(J,"GAP")&&(K=2,E=!0);G.qc=null;var na=function(oa){return function(){null==oa.qc&&(oa.qc=Br(g,oa.dd));return[oa.qc]}}(G);r&&0<=W&&null!=Z&&(B=na,x=!0);S=new P(S,ba,na,W,Z,b,0,0,Infinity,[],"",null,k,K,m);"EXT-X-PRELOAD-HINT"==J.name&&(S.qe(),F=!0);"YES"!=Y(J,"INDEPENDENT")&&0<I&&S.vf();z.push(S);k&&(k+=R)}}}}if(p){p=Number(p.value.split(",")[0]);if(0==p)return null;r=e+p}else r=z[z.length-1].endTime;x&&(E||0!=z[0].Ba?(x=!1,B=null):z=[]);(p=
838
+ zr(n,"EXT-X-BYTERANGE"))?(w=t(Ss(c,p.value)),u=w.next().value,w=w.next().value):z.length&&(u=z[0].Ba,w=z[z.length-1].ka);c="";p=null;"image"==h&&(c="1x1",h=zr(n,"EXT-X-TILES"))&&(c=yr(h,"LAYOUT"),(h=Y(h,"DURATION"))&&(p=Number(h)));var wa=null;b=new P(e,r,function(){if(B)return B();null==wa&&(wa=Js(d.i,f));return wa.length?[wa]:[]},u,w,b,l,0,Infinity,z,c,p,y,A,m);x&&(a.Oa=!0,b.uf(),F&&b.qe());return b}
839
+ function Ss(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ka+1,d=c+b-1);return[c,d]}
840
+ function fs(a,b,c,d,e,f){var g=b.segments,h=void 0,k=Ar(b.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),l=Ar(b.g,"EXT-X-MEDIA-SEQUENCE",0),m=zr(b.g,"EXT-X-SKIP"),n=m?Number(Y(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Xr(a)&&e.has(p)&&(r=e.get(p));var u=[],w=null,y=r;m=[];for(var x=0;x<g.length;x++){var A=g[x],z=0==x?r:w.endTime;p=l+n+x;zr(A.g,"EXT-X-DISCONTINUITY")&&(k++,y=z);var B=t(A.g);for(var E=B.next();!E.done;E=B.next())E=E.value,"EXT-X-KEY"==E.name&&("AES-128"==yr(E,"METHOD")?h=Ps(a,E,b):h=void 0);e.set(p,
841
+ z);B=ws(a,b.h,A.g,f);!a.o&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.o=a.i.isLowLatencyMode());if(z=Rs(a,B,w,A,z,f,b.h,c,d,y,h))(w=Ar(A.g,"EXT-X-BITRATE"))?m.push({bitrate:w,duration:z.endTime-z.startTime}):m.length&&(w=m.pop(),w.duration+=z.endTime-z.startTime,m.push(w)),w=z,z.j=k,a.g.hls.ignoreManifestProgramDateTime&&null!=a.C&&p<a.C||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(F,G){return F+G.duration},0),b=Math.round(m.reduce(function(F,G){return F+G.bitrate*G.duration},
841
842
  0)/b*1E3));if(m=u.some(function(F){return null!=F.g}))for(c={},d=0;d<u.length;c={mc:c.mc,lc:c.lc,$c:c.$c,nb:c.nb,kc:c.kc},d++)if(c.nb=u[d],null==c.nb.g)for(c.lc=0,c.mc=d,e=function(F){return function(){var G=u[F.mc];if(G){if(null!=G.g)return G.g+F.lc;F.lc-=G.endTime-G.startTime;F.mc+=1}return null}}(c),c.kc=0,c.$c=d,f=function(F){return function(){var G=u[F.$c];if(G){G!=F.nb&&(F.kc+=G.endTime-G.startTime);if(null!=G.g)return G.g+F.kc;--F.$c}return null}}(c);null==c.nb.g;)c.nb.g=f(),null==c.nb.g&&
842
- (c.nb.g=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=t(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.L;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.Oe(a);return{segments:u,bandwidth:b}}
843
- function Ks(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new N(2,4,4039,e);}}return a}function Es(a,b){if(a==zc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
844
- function Fs(a){return a==zc?"text/vtt":Us[a].mp4}function Ps(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u;return I(function(w){if(1==w.g){f=hf;g=Math.trunc((d.segments.length-1)/2);h=Ks(d.segments[g].i,e);k=new bc(h);l=k.ta.split(".").pop();m=Us[b];if((n=m[l])||(n=ws[l])||(n=Es(b,c)))return w.return(n);p=bf([h],a.g.retryParameters);p.method="HEAD";return C(w,ys(a,p,f,{type:1}),2)}r=w.h;return(u=r.headers["content-type"])?w.return(u.split(";")[0]):w.return(Fs(b))})}
845
- function ts(a,b,c,d,e){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0)}function Wr(a,b,c){return ys(a,bf([b],a.g.retryParameters),0,{type:c?2:3})}
846
- function Ur(a){var b,c;I(function(d){if(1==d.g){if(!a.i)return d.return();wa(d,2);return C(d,a.update(),4)}if(2!=d.g)return Yr(a)&&(b=a.l,a.m.S(b)),Aa(d,0);c=Ba(d);if(!a.i)return d.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c);a.m.S(.1);D(d)})}function Yr(a){return a.aa!=Vr}function bs(a,b){a.aa=b;a.j&&a.j.fc(!Yr(a));Yr(a)||a.m.stop()}
847
- function ys(a,b,c,d){if(!a.I)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b,d);Xe(a.I,b);return b.promise}L("shaka.hls.HlsParser",Tr);
848
- var ws={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Us={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
849
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Hs={"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 vc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=zr(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
850
- b=zr(a,"URI");b=Sr(b);b=M(b.data);b=vc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=zr(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=zr(a,"URI");a=Sr(a);a=M(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Yf(a,b,new Set,0);return vc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
851
- zr(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?vc("org.w3.clearkey",null):null}},Vr="VOD",Os="EVENT",Bs="LIVE",as={Qf:Vr,zh:Os,Eh:Bs};mh.m3u8=function(){return new Tr};kh["application/x-mpegurl"]=function(){return new Tr};kh["application/vnd.apple.mpegurl"]=function(){return new Tr};function Vs(a){var b=0,c=pb(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=M(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Ws(a){if(a=Xs(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=Zf(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
852
- function Xs(a){a=Tf(a.textContent);a=Vs(a).filter(function(b){return b.type===Ys})[0];if(!a)return null;a=yf(a.value,!0);return(a=rg(a,"WRMHEADER"))?a:null}var Ys=1,Zs=(new Map).set("com.microsoft.playready",Ws).set("com.microsoft.playready.recommendation",Ws).set("com.microsoft.playready.software",Ws).set("com.microsoft.playready.hardware",Ws);function $s(a){if(!at){at=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);bt=Z("ftyp",b,d,b,c);b=Z("dref",ct);dt=Z("dinf",b)}this.g=a}
853
- $s.prototype.initSegment=function(){var a=new Uint8Array([]);var b=t(this.g);for(var c=b.next();!c.done;c=b.next()){var d=a;a=c.value;c=Z;var e=a.stream.width||0;var f=a.stream.height||0,g=a.duration*a.timescale,h=Math.floor(g/(et+1));g=Math.floor(g%(et+1));e=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(v(ft(a.id+1,4)),[0,0,0,0],v(ft(h,4)),v(ft(g,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],v(ft(e,2)),[0,0],v(ft(f,
854
- 2)),[0,0]));e=Z("tkhd",e);f=Z;g=a.duration*a.timescale;h=Math.floor(g/(et+1));g=Math.floor(g%(et+1));var k=a.stream.language;k=k.charCodeAt(0)-96<<10|k.charCodeAt(1)-96<<5|k.charCodeAt(2)-96;h=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(v(ft(a.timescale,4)),v(ft(h,4)),v(ft(g,4)),v(ft(k,2)),[0,0]));h=Z("mdhd",h);g=a;k=new Uint8Array([]);switch(g.type){case "video":k=gt;break;case "audio":k=ht}g=Z("hdlr",k);a:{switch(a.type){case "video":a=Z("minf",Z("vmhd",it),dt,jt(a));break a;
855
- case "audio":a=Z("minf",Z("smhd",kt),dt,jt(a));break a}a=new Uint8Array([])}a=f("mdia",h,g,a);c=c("trak",e,a);a=Wf(d,c)}c=this.g[0];b=Z;e=c.duration*c.timescale;d=Math.floor(e/(et+1));e=Math.floor(e%(et+1));d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(v(ft(c.timescale,4)),v(ft(d,4)),v(ft(e,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]));d=Z("mvhd",d);
856
- e=Z;f=new Uint8Array([0,0,0,0].concat(v(ft(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]));f=Z("trex",f);e=e("mvex",f);f=new Uint8Array([]);if(c.encrypted)for(c=t(c.stream.drmInfos),h=c.next();!h.done;h=c.next())if(h=h.value,h.initData)for(h=t(h.initData),g=h.next();!g.done;g=h.next())f=Wf(f,g.value.initData);b=b("moov",d,a,e,f);d=new Uint8Array(bt.byteLength+b.byteLength);d.set(bt);d.set(b,bt.byteLength);return d};
857
- function jt(a){var b=Z,c=new Uint8Array([]);switch(a.type){case "video":if(a.stream.codecs.includes("avc1.")||a.stream.codecs.includes("avc3.")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.na.byteLength)var e=Z("avcC",a.na);else{e=Z;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ka.length;n++){var p=lt(a.Ka[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=
858
- l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(v(ft(c,2)),v(ft(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,
859
- 24,17,17]));d="avc1";h=new Uint8Array([]);a.encrypted&&(h=mt(a),d="encv");c=Z(d,c,e,h)}else if(a.stream.codecs.includes("hev1.")||a.stream.codecs.includes("hvc1."))d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.na.byteLength&&(c=Z("hvcC",a.na)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(v(ft(d,2)),v(ft(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),
860
- e="hvc1",h=new Uint8Array([]),a.encrypted&&(h=mt(a),e="encv"),c=Z(e,d,c,h);break;case "audio":if("audio/mpeg"===a.stream.mimeType||a.stream.codecs.includes("mp3")||a.stream.codecs.includes("mp4a.40.34"))a=Z(".mp3",nt(a));else if("audio/ac3"===a.stream.mimeType||a.stream.codecs.includes("ac-3"))c=Z("dac3",a.ca),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=mt(a),d="enca"),a=Z(d,nt(a),c,e);else if("audio/ec3"===a.stream.mimeType||a.stream.codecs.includes("ec-3"))c=Z("dec3",a.ca),d="ec-3",e=new Uint8Array([]),
861
- a.encrypted&&(e=mt(a),d="enca"),a=Z(d,nt(a),c,e);else{if(0<a.ca.byteLength)c=Z("esds",a.ca);else{c=Z;d=a.id+1;e=a.stream.bandwidth||0;h=a.stream.channelsCount||2;k=a.stream.audioSamplingRate||44100;l=wc("audio",a.stream.codecs.split(","));m={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};g=m[k];if("mp4a.40.5"===l||"mp4a.40.29"===l)g=m[2*k];k=parseInt(l.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(v(ft(d,2)),[0,4,17,64,21,0,6,0],v(ft(e,
862
- 4)),v(ft(e,4)),[5,2,k<<3|g>>>1,g<<7|h<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=mt(a),d="enca");a=Z(d,nt(a),c,e)}c=a}a=Z("stsd",ot,c);return b("stbl",a,Z("stts",pt),Z("stsc",qt),Z("stsz",rt),Z("stco",st))}function nt(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(v(ft(a.stream.audioSamplingRate||44100,2)),[0,0]))}
863
- function mt(a){var b=Z;var c=a.stream.codecs.substring(0,a.stream.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(v(ft(d,4))));c=Z("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=Z("schm",d);e=Z;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=lt(h.value)}a=
864
- new Uint8Array([0,0,0,0,0,0,1,8]);f=Z("tenc",a,f);return b("sinf",c,d,e("schi",f))}
865
- function tt(a){var b=new Uint8Array([]);a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Z,e=new Uint8Array([0,0,0,0].concat(v(ft(c.data?c.data.mb:0,4))));e=Z("mfhd",e);var f;var g=c.data?c.data.Ja:[];var h=new Uint8Array(4+g.length);for(f=0;f<g.length;f++){var k=g[f].flags;h[f+4]=k.Ra<<4|k.Va<<2|k.Ua}g=Z("sdtp",h);var l=g.length+92;h=Z;f=new Uint8Array([0,0,0,58].concat(v(ft(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));f=Z("tfhd",f);k=c.data?c.data.baseMediaDecodeTime:0;var m=Math.floor(k%
866
- (et+1));k=new Uint8Array([1,0,0,0].concat(v(ft(Math.floor(k/(et+1)),4)),v(ft(m,4))));k=Z("tfdt",k);var n=l;l=c.data?c.data.Ja:[];m=l.length;var p=12+16*m,r=new Uint8Array(p);n+=8+p;r.set(["video"===c.type?1:0,0,15,1].concat(v(ft(m,4)),v(ft(n,4))),0);for(n=0;n<m;n++){var u=l[n];p=ft(u.duration,4);var w=ft(u.size,4),y=u.flags;u=ft(u.ab,4);r.set([].concat(v(p),v(w),[y.gb<<2|y.Ra,y.Va<<6|y.Ua<<4|y.hb,y.Qa&61440,y.Qa&15],v(u)),12+16*n)}l=Z("trun",r);g=h("traf",f,k,l,g);d=d("moof",e,g);e=c.data?c.data.Ja:
867
- [];c=new Uint8Array([]);e=t(e);for(g=e.next();!g.done;g=e.next())c=Wf(c,g.value.data);c=Z("mdat",c);b=Wf(b,d,c)}return b}function ft(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function lt(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
868
- function Z(a){var b=La.apply(1,arguments),c=ut[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],ut[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
869
- var at=!1,et=Math.pow(2,32)-1,ut={},gt=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ht=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),pt=new Uint8Array([0,0,0,0,0,0,0,0]),qt=new Uint8Array([0,0,0,0,0,0,0,0]),st=new Uint8Array([0,0,0,0,0,0,0,0]),rt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),it=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),kt=new Uint8Array([0,
870
- 0,0,0,0,0,0,0]),ot=new Uint8Array([0,0,0,0,0,0,0,1]),bt=new Uint8Array([]),ct=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),dt=new Uint8Array([]);function vt(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.A=new Ta(5);this.o=new dd(function(){wt(a)});this.u=new We;this.m=new Map}q=vt.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return I(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,xt(c),2);if(!c.h)throw new N(2,7,7001);return d.return(c.j)})};
871
- function wt(a){var b;I(function(c){switch(c.g){case 1:return wa(c,2),C(c,xt(a),4);case 4:Aa(c,3);break;case 2:b=Ba(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();D(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.u.destroy()};
872
- q.update=function(){var a=this,b;return I(function(c){if(1==c.g)return wa(c,2),C(c,xt(a),4);if(2!=c.g)return Aa(c,0);b=Ba(c);if(!a.h||!b)return c.return();a.h.onError(b);D(c)})};q.onExpirationUpdated=function(){};
873
- function xt(a){var b,c,d,e,f,g,h;return I(function(k){if(1==k.g)return b=bf(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),Xe(a.u,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=tg(f.data,"SmoothStreamingMedia");if(!m)throw new N(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new R(null,0));if(l=hg(m,"IsLive",pg,!1))throw new N(2,4,4047);a.i.fc(!l);var n=hg(m,"TimeScale",ng,1E7),
874
- p=hg(m,"DVRWindowLength",ng);l&&(0===p||isNaN(p))&&(p=Infinity);var r=hg(m,"CanSeek",pg,!1);0===p&&r&&(p=Infinity);r=null;p&&0<p&&(r=p/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.Md(r);p=hg(m,"Duration",ng,Infinity);l||a.i.Aa(p/n);l={variants:[],textStreams:[],timescale:n,duration:p/n};r=$f(m,"Protection");var u;n=a.g.mss.keySystemsBySystemId;p=[];r=t(r);for(u=r.next();!u.done;u=r.next())p=p.concat($f(u.value,"ProtectionHeader"));if(p.length){r=
875
- [];for(u=0;u<p.length;u++){var w=p[u],y=w.getAttribute("SystemID").toLowerCase(),x=n[y];if(x){var A=Xs(w);if(A)a:{A=t(A.getElementsByTagName("DATA"));for(var z=A.next();!z.done;z=A.next())if(z=Zf(z.value,"KID")){A=Tf(z.textContent);A=new Uint8Array([A[3],A[2],A[1],A[0],A[5],A[4],A[7],A[6]].concat(v(A.slice(8))));A=Vf(A);break a}A=null}else A=null;z=Tf(w.textContent);y=Uf(y.replace(/-/g,""));y=[{initData:Yf(z,y,new Set,0),initDataType:"cenc",keyId:A}];y=vc(x,y);A&&y.keyIds.add(A);if(x=Zs.get(x))y.licenseServerUri=
876
- x(w);r.push(y)}}n=r}else n=[];u=n;r=[];n=[];p=[];m=$f(m,"StreamIndex");m=t(m);for(w=m.next();!w.done;w=m.next()){w=w.value;x=$f(w,"QualityLevel");y=l.timescale;A=l.duration;z=$f(w,"c");for(var B=[],E=0,F=0;F<z.length;++F){var G=z[F],H=z[F+1],J=hg(G,"t",ng),K=hg(G,"d",ng);G=hg(G,"r",lg);if(!K)break;J=null!=J?J:E;G=G||0;if(0>G)if(H){H=hg(H,"t",ng);if(null==H)break;else if(J>=H)break;G=Math.ceil((H-J)/K)-1}else{if(Infinity==A)break;else if(J/y>=A)break;G=Math.ceil((A*y-J)/K)-1}for(H=0;H<=G;++H)E=J+K,
877
- B.push({start:J/y,end:E/y,Ue:J}),J=E}y=B;x=t(x);for(A=x.next();!A.done;A=x.next())(A=yt(a,w,A.value,y,u,l))&&("audio"!=A.type||a.g.disableAudio?"video"!=A.type||a.g.disableVideo?A.type!=zc||a.g.disableText||p.push(A):n.push(A):r.push(A))}m=[];r=t(0<r.length?r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,w=t(0<n.length?n:[null]),A=w.next();!A.done;A=w.next())x=m,y=x.push,A=A.value,z=0,u&&u.bandwidth&&0<u.bandwidth&&(z+=u.bandwidth),A&&A.bandwidth&&0<A.bandwidth&&(z+=A.bandwidth),A={id:a.s++,
843
+ (c.nb.g=e());if(m)for(c=t(u),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=t(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.L;if(m&&Infinity!=a)for(m=t(u),d=m.next();!d.done;d=m.next())d.value.Pe(a);return{segments:u,bandwidth:b}}
844
+ function Js(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new N(2,4,4039,e);}}return a}function Ds(a,b){if(a==yc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
845
+ function Es(a){return a==yc?"text/vtt":Ts[a].mp4}function Os(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u;return H(function(w){if(1==w.g){f=gf;g=Math.trunc((d.segments.length-1)/2);h=Js(d.segments[g].i,e);k=new ac(h);l=k.ta.split(".").pop();m=Ts[b];if((n=m[l])||(n=vs[l])||(n=Ds(b,c)))return w.return(n);p=af([h],a.g.retryParameters);p.method="HEAD";return C(w,xs(a,p,f,{type:1}),2)}r=w.h;return(u=r.headers["content-type"])?w.return(u.split(";")[0]):w.return(Es(b))})}
846
+ function ss(a,b,c,d,e){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0)}function Vr(a,b,c){return xs(a,af([b],a.g.retryParameters),0,{type:c?2:3})}
847
+ function Tr(a){var b,c;H(function(d){if(1==d.g){if(!a.i)return d.return();ua(d,2);return C(d,a.update(),4)}if(2!=d.g)return Xr(a)&&(b=a.l,a.m.S(b)),xa(d,0);c=za(d);if(!a.i)return d.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.i.onError(c),d.return();c.severity=1;a.i.onError(c);a.m.S(.1);D(d)})}function Xr(a){return a.aa!=Ur}function as(a,b){a.aa=b;a.j&&a.j.fc(!Xr(a));Xr(a)||a.m.stop()}
848
+ function xs(a,b,c,d){if(!a.I)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b,d);We(a.I,b);return b.promise}L("shaka.hls.HlsParser",Sr);
849
+ var vs={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},Ts={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
850
+ vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Gs={"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 uc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=yr(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
851
+ b=yr(a,"URI");b=Rr(b);b=M(b.data);b=uc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Y(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=yr(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=yr(a,"URI");a=Rr(a);a=M(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Xf(a,b,new Set,0);return uc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
852
+ yr(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?uc("org.w3.clearkey",null):null}},Ur="VOD",Ns="EVENT",As="LIVE",$r={Qf:Ur,zh:Ns,Eh:As};lh.m3u8=function(){return new Sr};jh["application/x-mpegurl"]=function(){return new Sr};jh["application/vnd.apple.mpegurl"]=function(){return new Sr};function Us(a){var b=0,c=ob(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=M(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Vs(a){if(a=Ws(a))a:{a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next())if(b=Yf(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
853
+ function Ws(a){a=Sf(a.textContent);a=Us(a).filter(function(b){return b.type===Xs})[0];if(!a)return null;a=xf(a.value,!0);return(a=qg(a,"WRMHEADER"))?a:null}var Xs=1,Ys=(new Map).set("com.microsoft.playready",Vs).set("com.microsoft.playready.recommendation",Vs).set("com.microsoft.playready.software",Vs).set("com.microsoft.playready.hardware",Vs);function Zs(a){if(!$s){$s=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);at=bt("ftyp",b,d,b,c);b=bt("dref",ct);dt=bt("dinf",b)}this.g=a}
854
+ Zs.prototype.initSegment=function(){var a=new Uint8Array([]);var b=t(this.g);for(var c=b.next();!c.done;c=b.next()){var d=a;a=c.value;c=bt;var e=a.id+1;var f=a.stream.width||0,g=a.stream.height||0;"audio"==a.type&&(g=f=0);var h=a.duration*a.timescale,k=Math.floor(h/(et+1));h=Math.floor(h%(et+1));e=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(v(ft(e,4)),[0,0,0,0],v(ft(k,4)),v(ft(h,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
855
+ 0,64,0,0,0],v(ft(f,2)),[0,0],v(ft(g,2)),[0,0]));e=bt("tkhd",e);f=bt;k=a.duration*a.timescale;g=Math.floor(k/(et+1));k=Math.floor(k%(et+1));h=a.stream.language;h=h.charCodeAt(0)-96<<10|h.charCodeAt(1)-96<<5|h.charCodeAt(2)-96;g=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(v(ft(a.timescale,4)),v(ft(g,4)),v(ft(k,4)),v(ft(h,2)),[0,0]));g=bt("mdhd",g);k=a;h=new Uint8Array([]);switch(k.type){case "video":h=gt;break;case "audio":h=ht}k=bt("hdlr",h);a:{switch(a.type){case "video":a=bt("minf",
856
+ bt("vmhd",it),dt,jt(a));break a;case "audio":a=bt("minf",bt("smhd",kt),dt,jt(a));break a}a=new Uint8Array([])}a=f("mdia",g,k,a);c=c("trak",e,a);a=Vf(d,c)}c=this.g[0];b=bt;e=c.duration*c.timescale;d=Math.floor(e/(et+1));e=Math.floor(e%(et+1));d=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(v(ft(c.timescale,4)),v(ft(d,4)),v(ft(e,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
857
+ 0,0,255,255,255,255]));d=bt("mvhd",d);f=new Uint8Array([]);e=t(this.g);for(g=e.next();!g.done;g=e.next())g=new Uint8Array([0,0,0,0].concat(v(ft(g.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),g=bt("trex",g),f=Vf(f,g);e=bt("mvex",f);f=new Uint8Array([]);if(c.encrypted)for(c=t(c.stream.drmInfos),g=c.next();!g.done;g=c.next())if(g=g.value,g.initData)for(g=t(g.initData),k=g.next();!k.done;k=g.next())f=Vf(f,k.value.initData);b=b("moov",d,a,e,f);d=new Uint8Array(at.byteLength+b.byteLength);d.set(at);
858
+ d.set(b,at.byteLength);return d};
859
+ function jt(a){var b=bt,c=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;var d=a.stream.height||0;if(0<a.na.byteLength)var e=bt("avcC",a.na);else{e=bt;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Ka.length;n++){var p=lt(a.Ka[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=
860
+ 0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(v(ft(c,2)),v(ft(d,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=new Uint8Array([]);
861
+ a.encrypted&&(h=mt(a),d="encv");c=bt(d,c,e,h)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.na.byteLength&&(c=bt("hvcC",a.na)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(v(ft(d,2)),v(ft(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=new Uint8Array([]),a.encrypted&&(h=mt(a),e="encv"),c=bt(e,d,c,h));break;
862
+ case "audio":if(a.codecs.includes("mp3"))a=bt(".mp3",nt(a));else if(a.codecs.includes("ac-3"))c=bt("dac3",a.ca),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=mt(a),d="enca"),a=bt(d,nt(a),c,e);else if(a.codecs.includes("ec-3"))c=bt("dec3",a.ca),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=mt(a),d="enca"),a=bt(d,nt(a),c,e);else{if(0<a.ca.byteLength)c=bt("esds",a.ca);else{c=bt;d=a.id+1;e=a.stream.bandwidth||0;h=a.stream.channelsCount||2;k=a.stream.audioSamplingRate||44100;l=vc("audio",a.codecs.split(","));
863
+ m={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};g=m[k];if("mp4a.40.5"===l||"mp4a.40.29"===l)g=m[2*k];k=parseInt(l.split(".").pop(),10);d=new Uint8Array([0,0,0,0,3,25].concat(v(ft(d,2)),[0,4,17,64,21,0,6,0],v(ft(e,4)),v(ft(e,4)),[5,2,k<<3|g>>>1,g<<7|h<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=mt(a),d="enca");a=bt(d,nt(a),c,e)}c=a}a=bt("stsd",ot,c);return b("stbl",a,bt("stts",pt),bt("stsc",qt),bt("stsz",rt),bt("stco",
864
+ st))}function nt(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(v(ft(a.stream.audioSamplingRate||44100,2)),[0,0]))}
865
+ function mt(a){var b=bt;var c=a.codecs.substring(0,a.codecs.indexOf("."));for(var d=0,e=0;e<c.length;e+=1)d|=c.charCodeAt(e)<<8*(c.length-e-1);c=new Uint8Array([].concat(v(ft(d,4))));c=bt("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=bt("schm",d);e=bt;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a=t(a.stream.drmInfos);for(var g=a.next();!g.done;g=a.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=lt(h.value)}a=new Uint8Array([0,
866
+ 0,0,0,0,0,1,8]);f=bt("tenc",a,f);return b("sinf",c,d,e("schi",f))}
867
+ function tt(a){var b=new Uint8Array([]);a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=bt,e=new Uint8Array([0,0,0,0].concat(v(ft(c.data?c.data.mb:0,4))));e=bt("mfhd",e);var f;var g=c.data?c.data.Ja:[];var h=new Uint8Array(4+g.length);for(f=0;f<g.length;f++){var k=g[f].flags;h[f+4]=k.Ra<<4|k.Va<<2|k.Ua}g=bt("sdtp",h);var l=g.length+92;h=bt;f=new Uint8Array([0,0,0,58].concat(v(ft(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));f=bt("tfhd",f);k=c.data?c.data.baseMediaDecodeTime:0;var m=
868
+ Math.floor(k%(et+1));k=new Uint8Array([1,0,0,0].concat(v(ft(Math.floor(k/(et+1)),4)),v(ft(m,4))));k=bt("tfdt",k);var n=l;l=c.data?c.data.Ja:[];m=l.length;var p=12+16*m,r=new Uint8Array(p);n+=8+p;r.set(["video"===c.type?1:0,0,15,1].concat(v(ft(m,4)),v(ft(n,4))),0);for(n=0;n<m;n++){var u=l[n];p=ft(u.duration,4);var w=ft(u.size,4),y=u.flags;u=ft(u.ab,4);r.set([].concat(v(p),v(w),[y.gb<<2|y.Ra,y.Va<<6|y.Ua<<4|y.hb,y.Qa&61440,y.Qa&15],v(u)),12+16*n)}l=bt("trun",r);g=h("traf",f,k,l,g);d=d("moof",e,g);e=
869
+ c.data?c.data.Ja:[];c=new Uint8Array([]);e=t(e);for(g=e.next();!g.done;g=e.next())c=Vf(c,g.value.data);c=bt("mdat",c);b=Vf(b,d,c)}return b}function ft(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function lt(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}
870
+ function bt(a){var b=Ka.apply(1,arguments),c=ut[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],ut[a]=c);for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
871
+ var $s=!1,et=Math.pow(2,32)-1,ut={},gt=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ht=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),pt=new Uint8Array([0,0,0,0,0,0,0,0]),qt=new Uint8Array([0,0,0,0,0,0,0,0]),st=new Uint8Array([0,0,0,0,0,0,0,0]),rt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),it=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),kt=new Uint8Array([0,
872
+ 0,0,0,0,0,0,0]),ot=new Uint8Array([0,0,0,0,0,0,0,1]),at=new Uint8Array([]),ct=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),dt=new Uint8Array([]);function vt(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.A=new Ra(5);this.o=new cd(function(){wt(a)});this.u=new Ve;this.m=new Map}q=vt.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this;return H(function(d){if(1==d.g)return c.l=[a],c.h=b,C(d,xt(c),2);if(!c.h)throw new N(2,7,7001);return d.return(c.j)})};
873
+ function wt(a){var b;H(function(c){switch(c.g){case 1:return ua(c,2),C(c,xt(a),4);case 4:xa(c,3);break;case 2:b=za(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();D(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.o&&(this.o.stop(),this.o=null);this.m.clear();return this.u.destroy()};
874
+ q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return ua(c,2),C(c,xt(a),4);if(2!=c.g)return xa(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);D(c)})};q.onExpirationUpdated=function(){};
875
+ function xt(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=af(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5}),We(a.u,e),C(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=sg(f.data,"SmoothStreamingMedia");if(!m)throw new N(2,4,4046,l);(l=a.g.mss.manifestPreprocessor)&&l(m);a.i||(a.i=new Q(null,0));if(l=gg(m,"IsLive",og,!1))throw new N(2,4,4047);a.i.fc(!l);var n=gg(m,"TimeScale",mg,1E7),
876
+ p=gg(m,"DVRWindowLength",mg);l&&(0===p||isNaN(p))&&(p=Infinity);var r=gg(m,"CanSeek",og,!1);0===p&&r&&(p=Infinity);r=null;p&&0<p&&(r=p/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.Nd(r);p=gg(m,"Duration",mg,Infinity);l||a.i.Aa(p/n);l={variants:[],textStreams:[],timescale:n,duration:p/n};r=Zf(m,"Protection");var u;n=a.g.mss.keySystemsBySystemId;p=[];r=t(r);for(u=r.next();!u.done;u=r.next())p=p.concat(Zf(u.value,"ProtectionHeader"));if(p.length){r=
877
+ [];for(u=0;u<p.length;u++){var w=p[u],y=w.getAttribute("SystemID").toLowerCase(),x=n[y];if(x){var A=Ws(w);if(A)a:{A=t(A.getElementsByTagName("DATA"));for(var z=A.next();!z.done;z=A.next())if(z=Yf(z.value,"KID")){A=Sf(z.textContent);A=new Uint8Array([A[3],A[2],A[1],A[0],A[5],A[4],A[7],A[6]].concat(v(A.slice(8))));A=Uf(A);break a}A=null}else A=null;z=Sf(w.textContent);y=Tf(y.replace(/-/g,""));y=[{initData:Xf(z,y,new Set,0),initDataType:"cenc",keyId:A}];y=uc(x,y);A&&y.keyIds.add(A);if(x=Ys.get(x))y.licenseServerUri=
878
+ x(w);r.push(y)}}n=r}else n=[];u=n;r=[];n=[];p=[];m=Zf(m,"StreamIndex");m=t(m);for(w=m.next();!w.done;w=m.next()){w=w.value;x=Zf(w,"QualityLevel");y=l.timescale;A=l.duration;z=Zf(w,"c");for(var B=[],E=0,F=0;F<z.length;++F){var G=z[F],I=z[F+1],J=gg(G,"t",mg),K=gg(G,"d",mg);G=gg(G,"r",kg);if(!K)break;J=null!=J?J:E;G=G||0;if(0>G)if(I){I=gg(I,"t",mg);if(null==I)break;else if(J>=I)break;G=Math.ceil((I-J)/K)-1}else{if(Infinity==A)break;else if(J/y>=A)break;G=Math.ceil((A*y-J)/K)-1}for(I=0;I<=G;++I)E=J+K,
879
+ B.push({start:J/y,end:E/y,Ve:J}),J=E}y=B;x=t(x);for(A=x.next();!A.done;A=x.next())(A=yt(a,w,A.value,y,u,l))&&("audio"!=A.type||a.g.disableAudio?"video"!=A.type||a.g.disableVideo?A.type!=yc||a.g.disableText||p.push(A):n.push(A):r.push(A))}m=[];r=t(0<r.length?r:[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,w=t(0<n.length?n:[null]),A=w.next();!A.done;A=w.next())x=m,y=x.push,A=A.value,z=0,u&&u.bandwidth&&0<u.bandwidth&&(z+=u.bandwidth),A&&A.bandwidth&&0<A.bandwidth&&(z+=A.bandwidth),A={id:a.s++,
878
880
  language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!A&&A.primary,audio:u,video:A,bandwidth:z,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},y.call(x,A);l.variants=m;l.textStreams=p;a.j?(a.j.variants=l.variants,a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,
879
- type:"MSS",serviceDescription:null},a.i.Cd());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.A.sample(1,h);D(k)})}
880
- function yt(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return $a("Ignoring unrecognized type:",g),null;var h=b.getAttribute("Language"),k=a.s++,l=hg(c,"Bitrate",mg),m=hg(c,"MaxWidth",mg),n=hg(c,"MaxHeight",mg),p=hg(c,"Channels",mg),r=hg(c,"SamplingRate",mg),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.Aa(Math.min(u,w));var y={id:k,originalId:b.getAttribute("Name")||String(k),createSegmentIndex:function(){return Promise.resolve()},
881
- closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Uc(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:u,
882
- timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1};if(e=b.getAttribute("Subtype"))(e=zt[e])&&y.roles.push(e),"main"===e&&(y.primary=!0);e=c.getAttribute("FourCC");if(null===e||""===e)e=b.getAttribute("FourCC");if(!e)if("audio"===g)e="AAC";else if("video"===g)return $a('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!At.includes(e.toUpperCase()))return $a("Codec not supported:",e),null;c=Bt(c,g,e,
883
- y);y.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return $a("Quality unsupported without CodecPrivateData",g),null;y.type="audio";y.mimeType="mss/audio/mp4";y.codecs=Ct(e,c);break;case "video":if(!c)return $a("Quality unsupported without CodecPrivateData",g),null;y.type="video";y.mimeType="mss/video/mp4";y.codecs=Dt(c);break;case "text":if(y.type=zc,y.mimeType="application/mp4","TTML"===e||"DFXP"===e)y.codecs="stpp"}y.createSegmentIndex=function(){if(y.segmentIndex)return Promise.resolve();
884
- if(a.m.has(y.id))var x=a.m.get(y.id);else x=[],"video"==y.type&&(x=y.mssPrivateData.codecPrivateData.split("00000001").slice(1)),x={id:y.id,type:y.type,encrypted:y.encrypted,timescale:y.mssPrivateData.timescale,duration:y.mssPrivateData.duration,Ka:x,ca:new Uint8Array([]),na:new Uint8Array([]),data:null,stream:y},x=(new $s([x])).initSegment(),a.m.set(y.id,x);x=Et(a,new sh(function(){return[]},0,null,null,void 0,x),y,b,d);y.segmentIndex=new hj(x);return Promise.resolve()};y.closeSegmentIndex=function(){y.segmentIndex&&
885
- (y.segmentIndex.release(),y.segmentIndex=null)};return y}
881
+ type:"MSS",serviceDescription:null},a.i.Dd());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.A.sample(1,h);D(k)})}
882
+ function yt(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return Xa("Ignoring unrecognized type:",g),null;var h=b.getAttribute("Language"),k=a.s++,l=gg(c,"Bitrate",lg),m=gg(c,"MaxWidth",lg),n=gg(c,"MaxHeight",lg),p=gg(c,"Channels",lg),r=gg(c,"SamplingRate",lg),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var w=a.i.getDuration();a.i.Aa(Math.min(u,w));var y={id:k,originalId:b.getAttribute("Name")||String(k),createSegmentIndex:function(){return Promise.resolve()},
883
+ closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:Tc(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:u,
884
+ timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1};if(e=b.getAttribute("Subtype"))(e=zt[e])&&y.roles.push(e),"main"===e&&(y.primary=!0);e=c.getAttribute("FourCC");if(null===e||""===e)e=b.getAttribute("FourCC");if(!e)if("audio"===g)e="AAC";else if("video"===g)return Xa('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!At.includes(e.toUpperCase()))return Xa("Codec not supported:",e),null;c=Bt(c,g,e,
885
+ y);y.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Xa("Quality unsupported without CodecPrivateData",g),null;y.type="audio";y.mimeType="mss/audio/mp4";y.codecs=Ct(e,c);break;case "video":if(!c)return Xa("Quality unsupported without CodecPrivateData",g),null;y.type="video";y.mimeType="mss/video/mp4";y.codecs=Dt(c);break;case "text":if(y.type=yc,y.mimeType="application/mp4","TTML"===e||"DFXP"===e)y.codecs="stpp"}y.createSegmentIndex=function(){if(y.segmentIndex)return Promise.resolve();
886
+ if(a.m.has(y.id))var x=a.m.get(y.id);else x=[],"video"==y.type&&(x=y.mssPrivateData.codecPrivateData.split("00000001").slice(1)),x={id:y.id,type:y.type,codecs:y.codecs,encrypted:y.encrypted,timescale:y.mssPrivateData.timescale,duration:y.mssPrivateData.duration,Ka:x,ca:new Uint8Array([]),na:new Uint8Array([]),data:null,stream:y},x=(new Zs([x])).initSegment(),a.m.set(y.id,x);x=Et(a,new rh(function(){return[]},0,null,null,void 0,x),y,b,d);y.segmentIndex=new gj(x);return Promise.resolve()};y.closeSegmentIndex=
887
+ function(){y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null)};return y}
886
888
  function Bt(a,b,c,d){if(a=a.getAttribute("CodecPrivateData"))return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|
887
889
  b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Ct(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function Dt(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
888
- function Et(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={uc:g.uc},h=e.next())g.uc=h.value,d.push(new Q(g.uc.start,g.uc.end,function(k){return function(){return uc(a.l,[f.replace("{start time}",String(k.uc.Ue))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}L("shaka.mss.MssParser",vt);var At="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),zt={CAPT:"main",SUBT:"alternate",DESC:"main"};mh.ism=function(){return new vt};
889
- kh["application/vnd.ms-sstr+xml"]=function(){return new vt};function Ft(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Af(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Gt(){}function Ht(a,b,c,d,e){var f=new It;tf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Jt,h={$e:!1,Lf:!1};a=Kt(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 Ke(a,function(){h.$e=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new dd(function(){h.Lf=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
890
- function Kt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,y,x,A,z;return I(function(B){switch(B.g){case 1:return h=Lt,k=Mt,p=n=0,r=Date.now(),wa(B,2),C(B,h(a,c),4);case 4:l=B.h;f(Nt(l.headers));if("HEAD"==c.method){B.B(5);break}u=l.clone().body.getReader();y=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;x=function(E){function F(){var G,H;return I(function(J){switch(J.g){case 1:return wa(J,2),C(J,u.read(),4);case 4:G=J.h;Aa(J,3);break;case 2:return Ba(J),J.return();case 3:if(G.done){J.B(5);break}n+=
891
- G.value.byteLength;if(!g){J.B(5);break}return C(J,g(G.value),5);case 5:H=Date.now();if(100<H-r||G.done)e(H-r,n-p,y-n),p=n,r=H;G.done?E.close():(E.enqueue(G.value),F());D(J)}})}F()};new k({start:x});return C(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:Aa(B,3);break;case 2:A=Ba(B);if(d.$e)throw new N(1,1,7001,a,b);if(d.Lf)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,A,b);case 3:return z=Nt(l.headers),B.return(Ft(z,m,l.status,a,l.url,b))}})}
890
+ function Et(a,b,c,d,e){var f=d.getAttribute("Url").replace("{bitrate}",String(c.bandwidth));d=[];var g={};e=t(e);for(var h=e.next();!h.done;g={uc:g.uc},h=e.next())g.uc=h.value,d.push(new P(g.uc.start,g.uc.end,function(k){return function(){return tc(a.l,[f.replace("{start time}",String(k.uc.Ve))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}L("shaka.mss.MssParser",vt);var At="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),zt={CAPT:"main",SUBT:"alternate",DESC:"main"};lh.ism=function(){return new vt};
891
+ jh["application/vnd.ms-sstr+xml"]=function(){return new vt};function Ft(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=zf(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Gt(){}function Ht(a,b,c,d,e){var f=new It;sf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Jt,h={af:!1,Lf:!1};a=Kt(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 Je(a,function(){h.af=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new cd(function(){h.Lf=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
892
+ function Kt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,w,y,x,A,z;return H(function(B){switch(B.g){case 1:return h=Lt,k=Mt,p=n=0,r=Date.now(),ua(B,2),C(B,h(a,c),4);case 4:l=B.h;f(Nt(l.headers));if("HEAD"==c.method){B.B(5);break}u=l.clone().body.getReader();y=(w=l.headers.get("Content-Length"))?parseInt(w,10):0;x=function(E){function F(){var G,I;return H(function(J){switch(J.g){case 1:return ua(J,2),C(J,u.read(),4);case 4:G=J.h;xa(J,3);break;case 2:return za(J),J.return();case 3:if(G.done){J.B(5);break}n+=
893
+ G.value.byteLength;if(!g){J.B(5);break}return C(J,g(G.value),5);case 5:I=Date.now();if(100<I-r||G.done)e(I-r,n-p,y-n),p=n,r=I;G.done?E.close():(E.enqueue(G.value),F());D(J)}})}F()};new k({start:x});return C(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:xa(B,3);break;case 2:A=za(B);if(d.af)throw new N(1,1,7001,a,b);if(d.Lf)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,A,b);case 3:return z=Nt(l.headers),B.return(Ft(z,m,l.status,a,l.url,b))}})}
892
894
  function Nt(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Ot(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}L("shaka.net.HttpFetchPlugin",Gt);Gt.isSupported=Ot;Gt.parse=Ht;var Lt=window.fetch,Jt=window.AbortController,Mt=window.ReadableStream,It=window.Headers;
893
- Ot()&&(Ze("http",Ht,2,!0),Ze("https",Ht,2,!0),Ze("blob",Ht,2,!0));function Pt(){}
895
+ Ot()&&(Ye("http",Ht,2,!0),Ye("https",Ht,2,!0),Ye("blob",Ht,2,!0));function Pt(){}
894
896
  function Qt(a,b,c,d,e){var f=new Rt,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 n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var r=St(f);e(r);n=!0}};f.onload=function(){var r=St(f),u=f.response;try{var w=Ft(r,u,f.status,a,f.responseURL,c);l(w)}catch(y){m(y)}};f.onerror=function(r){m(new N(1,1,1002,a,r,
895
- c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ke(k,function(){f.abort();return Promise.resolve()})}
896
- function St(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}L("shaka.net.HttpXHRPlugin",Pt);Pt.parse=Qt;var Rt=window.XMLHttpRequest;Ze("http",Qt,1,!0);Ze("https",Qt,1,!0);Ze("blob",Qt,1,!0);function Tt(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ut(a){return a.wa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.ka}function Vt(a,b){return Hj(a.g.wa(),a.g.Ba,a.g.ka,b.streaming.retryParameters)};function Wt(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Xt(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Wt.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 Yt(a){var b=this;this.o=a;this.j=new Map;this.i=new jf(function(){return Zt(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Wt}Yt.prototype.destroy=function(){return this.i.destroy()};function $t(a,b,c){a.m=b;a.l=c}function Zt(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
897
- function au(a,b,c,d,e,f){kf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return I(function(u){if(1==u.g)return C(u,bu(a,c),2);h=u.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=M(h),l=new Xf(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function cu(a){return I(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
898
- function bu(a,b){var c,d,e,f;return I(function(g){if(1==g.g)return c=hf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;vb(a.h,e);return g.return(f.data)})};function du(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Je;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}du.prototype.abort=function(){var a=this;return I(function(b){if(1==b.g){try{a.i.abort()}catch(c){}wa(b,2);return C(b,a.g,4)}if(2!=b.g)return Aa(b,0);Ba(b);D(b)})};
899
- function eu(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return I(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();D(g)})}})}du.prototype.store=function(){return this.h};du.prototype.promise=function(){return this.g};function fu(a){this.h=a;this.g=[]}fu.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function gu(a,b){return hu(a,b,"readwrite")}function hu(a,b,c){c=a.h.transaction([b],c);var d=new du(c,b);a.g.push(d);d.promise().then(function(){vb(a.g,d)},function(){vb(a.g,d)});return d};function iu(a,b,c){this.h=new fu(a);this.i=b;this.g=c}q=iu.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ju(this.i)};q.removeSegments=function(a,b){return ku(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return I(function(d){if(1==d.g)return C(d,lu(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.bf(e)}))})};q.addManifests=function(){return ju(this.g)};
897
+ c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(r){var u=Date.now();if(100<u-g||r.lengthComputable&&r.loaded==r.total)d(u-g,r.loaded-h,r.total-r.loaded),h=r.loaded,g=u};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Je(k,function(){f.abort();return Promise.resolve()})}
898
+ function St(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}L("shaka.net.HttpXHRPlugin",Pt);Pt.parse=Qt;var Rt=window.XMLHttpRequest;Ye("http",Qt,1,!0);Ye("https",Qt,1,!0);Ye("blob",Qt,1,!0);function Tt(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ut(a){return a.wa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.ka}function Vt(a,b){return Gj(a.g.wa(),a.g.Ba,a.g.ka,b.streaming.retryParameters)};function Wt(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Xt(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Wt.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 Yt(a){var b=this;this.o=a;this.j=new Map;this.i=new hf(function(){return Zt(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Wt}Yt.prototype.destroy=function(){return this.i.destroy()};function $t(a,b,c){a.m=b;a.l=c}function Zt(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
899
+ function au(a,b,c,d,e,f){jf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return H(function(u){if(1==u.g)return C(u,bu(a,c),2);h=u.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=M(h),l=new Wf(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.l(p,r);a.g.close(d,h.byteLength);var w=a.g;a.m(0==w.i?0:w.j/w.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function cu(a){return H(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
900
+ function bu(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=gf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),C(g,d.promise,2);f=g.h;ub(a.h,e);return g.return(f.data)})};function du(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Ie;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}du.prototype.abort=function(){var a=this;return H(function(b){if(1==b.g){try{a.i.abort()}catch(c){}ua(b,2);return C(b,a.g,4)}if(2!=b.g)return xa(b,0);za(b);D(b)})};
901
+ function eu(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return H(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return C(g,b(f.key,f.value,f),2)}f.continue();D(g)})}})}du.prototype.store=function(){return this.h};du.prototype.promise=function(){return this.g};function fu(a){this.h=a;this.g=[]}fu.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function gu(a,b){return hu(a,b,"readwrite")}function hu(a,b,c){c=a.h.transaction([b],c);var d=new du(c,b);a.g.push(d);d.promise().then(function(){ub(a.g,d)},function(){ub(a.g,d)});return d};function iu(a,b,c){this.h=new fu(a);this.i=b;this.g=c}q=iu.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ju(this.i)};q.removeSegments=function(a,b){return ku(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return H(function(d){if(1==d.g)return C(d,lu(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.cf(e)}))})};q.addManifests=function(){return ju(this.g)};
900
902
  q.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function mu(a,b,c){a=gu(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=gu(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 ku(this,this.g,a,b)};
901
- q.getManifests=function(a){var b=this,c;return I(function(d){if(1==d.g)return C(d,lu(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 I(function(d){return 1==d.g?(b=hu(a.h,a.g,"readonly"),c=new Map,C(d,eu(b,function(e,f){var g;return I(function(h){if(1==h.g)return C(h,a.Cc(f),2);g=h.h;c.set(e,g);D(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};q.bf=function(a){return a};q.Cc=function(a){return Promise.resolve(a)};
902
- function ju(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 I(function(m){if(1==m.g){d=gu(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={ed:g.ed},k=h.next())l=k.value,g.ed=e.add(l),g.ed.onsuccess=function(n){return function(){f.push(n.ed.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
903
+ q.getManifests=function(a){var b=this,c;return H(function(d){if(1==d.g)return C(d,lu(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 H(function(d){return 1==d.g?(b=hu(a.h,a.g,"readonly"),c=new Map,C(d,eu(b,function(e,f){var g;return H(function(h){if(1==h.g)return C(h,a.Cc(f),2);g=h.h;c.set(e,g);D(h)})}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};q.cf=function(a){return a};q.Cc=function(a){return Promise.resolve(a)};
904
+ function ju(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 H(function(m){if(1==m.g){d=gu(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={ed:g.ed},k=h.next())l=k.value,g.ed=e.add(l),g.ed.onsuccess=function(n){return function(){f.push(n.ed.result)}}(g);return C(m,d.promise(),2)}return m.return(f)})};
903
905
  function ku(a,b,c,d){a=gu(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={cd:e.cd},f=c.next())e.cd=f.value,b.delete(e.cd).onsuccess=function(g){return function(){return d(g.cd)}}(e);return a.promise()}
904
- function lu(a,b,c){var d,e,f,g,h,k,l;return I(function(m){if(1==m.g){d=hu(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={sc:h.sc,pc:h.pc},l=k.next())h.pc=l.value,h.sc=e.get(h.pc),h.sc.onsuccess=function(n){return function(){void 0==n.sc.result&&g.push(n.pc);f[n.pc]=n.sc.result}}(h);return C(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(n){return f[n]}))})};function nu(a){this.g=new fu(a)}nu.prototype.destroy=function(){return this.g.destroy()};nu.prototype.getAll=function(){var a=this,b,c;return I(function(d){return 1==d.g?(b=hu(a.g,"session-ids","readonly"),c=[],C(d,eu(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};nu.prototype.add=function(a){var b=gu(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
905
- nu.prototype.remove=function(a){var b=this,c;return I(function(d){return 1==d.g?(c=gu(b.g,"session-ids"),C(d,eu(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function ou(){this.g=new Map}ou.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ou.prototype.init=function(){var a=this;pu.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
906
+ function lu(a,b,c){var d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=hu(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={sc:h.sc,pc:h.pc},l=k.next())h.pc=l.value,h.sc=e.get(h.pc),h.sc.onsuccess=function(n){return function(){void 0==n.sc.result&&g.push(n.pc);f[n.pc]=n.sc.result}}(h);return C(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(n){return f[n]}))})};function nu(a){this.g=new fu(a)}nu.prototype.destroy=function(){return this.g.destroy()};nu.prototype.getAll=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=hu(a.g,"session-ids","readonly"),c=[],C(d,eu(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};nu.prototype.add=function(a){var b=gu(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
907
+ nu.prototype.remove=function(a){var b=this,c;return H(function(d){return 1==d.g?(c=gu(b.g,"session-ids"),C(d,eu(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function ou(){this.g=new Map}ou.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ou.prototype.init=function(){var a=this;pu.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
906
908
  function qu(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Fa:d,oa:f},oa:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function ru(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Fa:d,oa:f},e)})})}
907
909
  function su(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 tu(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function uu(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()}
908
- function vu(a){var b,c,d;return I(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=pu,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function wu(a,b){pu.set(a,b)}L("shaka.offline.StorageMuxer",ou);ou.unregister=function(a){pu.delete(a)};ou.register=wu;ou.prototype.destroy=ou.prototype.destroy;var pu=new Map;function xu(){iu.apply(this,arguments)}ra(xu,iu);xu.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return I(function(g){d=gu(c.h,c.g);e=d.store();f=new Je;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 C(g,Promise.all([d.promise(),f]),0)})};
909
- xu.prototype.Cc=function(a){var b,c,d,e,f,g;return I(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=yu(a.periods[c],e),b.push(f);return C(h,Gq(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})})};
910
+ function vu(a){var b,c,d;return H(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=pu,d.forEach(function(f){(f=f())&&b.push(f)})),C(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):C(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function wu(a,b){pu.set(a,b)}L("shaka.offline.StorageMuxer",ou);ou.unregister=function(a){pu.delete(a)};ou.register=wu;ou.prototype.destroy=ou.prototype.destroy;var pu=new Map;function xu(){iu.apply(this,arguments)}qa(xu,iu);xu.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return H(function(g){d=gu(c.h,c.g);e=d.store();f=new Ie;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 C(g,Promise.all([d.promise(),f]),0)})};
911
+ xu.prototype.Cc=function(a){var b,c,d,e,f,g;return H(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=yu(a.periods[c],e),b.push(f);return C(h,Fq(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})})};
910
912
  function yu(a,b){zu(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Au(e,a.startTime,b)})}
911
913
  function Au(a,b,c){var d=a.initSegmentUri?Bu(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,originalLanguage:a.language||null,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Bu(g.uri);return{startTime:b+
912
- g.startTime,endTime:b+g.endTime,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,external:!1}}xu.prototype.bf=function(a){return{data:a.data}};
914
+ g.startTime,endTime:b+g.endTime,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,external:!1}}xu.prototype.cf=function(a){return{data:a.data}};
913
915
  function Bu(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);}
914
916
  function zu(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
915
- f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Cu(){iu.apply(this,arguments)}ra(Cu,iu);
916
- Cu.prototype.Cc=function(a){var b,c,d,e,f,g;return I(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=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Du(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,Gq(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
917
+ f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Cu(){iu.apply(this,arguments)}qa(Cu,iu);
918
+ Cu.prototype.Cc=function(a){var b,c,d,e,f,g;return H(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=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Du(n,k.startTime,k.startTime+e));f=l;b.push(f)}return C(h,Fq(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
917
919
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
918
920
  function Du(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,originalLanguage:a.language||null,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,
919
- timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}};function Eu(){iu.apply(this,arguments)}ra(Eu,iu);q=Eu.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 mu(this,a,b)};q.Cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Fu(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Fu.prototype;
920
- q.init=function(){var a=this,b=new Je,c=!1,d=new dd(function(){c=!0;b.reject(new N(2,9,9017))});d.S(5);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 xu(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Cu(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
921
+ timestampOffset:b-a.presentationTimeOffset,dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1}};function Eu(){iu.apply(this,arguments)}qa(Eu,iu);q=Eu.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 mu(this,a,b)};q.Cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Fu(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Fu.prototype;
922
+ q.init=function(){var a=this,b=new Ie,c=!1,d=new cd(function(){c=!0;b.reject(new N(2,9,9017))});d.S(5);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 xu(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Cu(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
921
923
  new Cu(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Eu(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new nu(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["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,
922
- 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),D(b)}})};
924
+ 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return C(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),D(b)}})};
923
925
  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};
924
- q.erase=function(){var a=this;return I(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,Gu(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
925
- function Gu(){var a=new Je,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}wu("idb",function(){return jd("CrKey")||id()||!window.indexedDB?null:new Fu});function Hu(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Hu.prototype.Fa=function(){return this.i};Hu.prototype.oa=function(){return this.h};Hu.prototype.key=function(){return this.l};Hu.prototype.toString=function(){return this.j};
926
+ q.erase=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return C(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return C(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return C(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return C(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),C(b,Gu(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
927
+ function Gu(){var a=new Ie,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}wu("idb",function(){return id("CrKey")||hd()||!window.indexedDB?null:new Fu});function Hu(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Hu.prototype.Fa=function(){return this.i};Hu.prototype.oa=function(){return this.h};Hu.prototype.key=function(){return this.l};Hu.prototype.toString=function(){return this.j};
926
928
  function Iu(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 Hu(b,c,d,Number(a[4])):null};function Ju(a,b){this.h=a;this.g=b}
927
- function Ku(a,b){var c=new R(null,0);c.Aa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Lu(a,d,e,c);e=b.streams.filter(function(l){return l.type==zc}).map(function(l){return Mu(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Mu(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
929
+ function Ku(a,b){var c=new Q(null,0);c.Aa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Lu(a,d,e,c);e=b.streams.filter(function(l){return l.type==yc}).map(function(l){return Mu(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Mu(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
928
930
  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,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null}}
929
931
  function Lu(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(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=t(b);for(e=b.next();!e.done;e=
930
932
  b.next())for(e=e.value,g=Mu(a,e,d),h=t(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=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Mu(a,e,d),g=t(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}
931
- function Mu(a,b,c){var d=b.segments.map(function(e){return Nu(a,e)});c.Qc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new hj(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,originalLanguage:b.originalLanguage||null,label:b.label,type:b.type,primary:b.primary,
933
+ function Mu(a,b,c){var d=b.segments.map(function(e){return Nu(a,e)});c.Qc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new gj(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,originalLanguage:b.originalLanguage||null,label:b.label,type:b.type,primary:b.primary,
932
934
  trickModeVideo:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,accessibilityPurpose:null,external:b.external}}
933
- function Nu(a,b){var c=new Hu("segment",a.h,a.g,b.dataKey);return new Q(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ou(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}function Ou(a,b){var c=new Hu("segment",a.h,a.g,b);return new sh(function(){return[c.toString()]},0,null)};function Pu(){this.g=null}q=Pu.prototype;q.configure=function(){};
934
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:d=Iu(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new ou;ya(m);return C(m,e.init(),4);case 4:return C(m,su(e,d.Fa(),d.oa()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ju(d.Fa(),d.oa()),l=Ku(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ca(m),C(m,e.destroy(),7);case 7:Ea(m,0)}})};q.stop=function(){return Promise.resolve()};
935
+ function Nu(a,b){var c=new Hu("segment",a.h,a.g,b.dataKey);return new P(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ou(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}function Ou(a,b){var c=new Hu("segment",a.h,a.g,b);return new rh(function(){return[c.toString()]},0,null)};function Pu(){this.g=null}q=Pu.prototype;q.configure=function(){};
936
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:d=Iu(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new ou;va(m);return C(m,e.init(),4);case 4:return C(m,su(e,d.Fa(),d.oa()),5);case 5:return f=m.h,C(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new Ju(d.Fa(),d.oa()),l=Ku(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Aa(m),C(m,e.destroy(),7);case 7:Ba(m,0)}})};q.stop=function(){return Promise.resolve()};
935
937
  q.update=function(){};
936
- q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return I(function(m){switch(m.g){case 1:return d=c.g,e=new ou,wa(m,2,3),C(m,e.init(),5);case 5:return C(m,su(e,d.Fa(),d.oa()),6);case 6:return f=m.h,C(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.B(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ca(m),C(m,e.destroy(),10);case 10:Ea(m,0);break;case 2:Ba(m),m.B(3)}})};
937
- kh["application/x-offline-manifest"]=function(){return new Pu};function Qu(){}function Ru(a){var b=Iu(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ne(a)):a=b&&"segment"==b.g?Su(b.key(),b):Le(new N(2,1,9004,a));return a}
938
- function Su(a,b){var c=new ou;return Ne(void 0).fa(function(){return c.init()}).fa(function(){return su(c,b.Fa(),b.oa())}).fa(function(d){return d.getSegments([b.key()])}).fa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}L("shaka.offline.OfflineScheme",Qu);Qu.plugin=Ru;Ze("offline",Ru);function Tu(a,b,c){var d,e,f,g,h,k;return I(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,Uu(w.info,p)){w.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Vu(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
939
- function Vu(a,b,c){var d,e;return I(function(f){switch(f.g){case 1:return d=new ug({Hb:b,onError:function(){},Id:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),wa(f,2),d.configure(a),C(f,Cg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:Aa(f,3);break;case 2:return Ba(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return wa(f,6),C(f,Ng(d),8);case 8:Aa(f,7);break;case 6:return Ba(f),C(f,d.destroy(),
940
- 9);case 9:return f.return([]);case 7:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return I(function(h){if(1==h.g)return wa(h,2),C(h,Og(d,g),4);if(2!=h.g)return e.push(g),Aa(h,0);Ba(h);D(h)})})),10);case 10:return C(f,d.destroy(),11);case 11:return f.return(e)}})}
941
- function Uu(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&wb(a.audioCapabilities,b.audioCapabilities,c)&&wb(a.videoCapabilities,b.videoCapabilities,c)};function Wu(a,b,c){var d=b.presentationTimeline.getDuration();b=Xu(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Yu(a,b){var c=Ku(new Ju(a.Fa(),a.oa()),b),d=b.appMetadata||{};c=Xu(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}}
942
- function Xu(a){var b=[],c=fe(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Xd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Yd(c.value));return b};function Zu(){this.g={}}function $u(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 av(a,b){a.g[b.id]=b.bandwidth||2048}function bv(a,b){a=a.g[b];null==a&&(a=0);return a};function cv(a){var b=this;if(a&&a.constructor!=T)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.zb()):(this.h=ll(),this.g=new Ye);this.i=[];this.j=[];var c=!a;this.l=new jf(function(){var d,e,f,g,h;return I(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return Zt(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return C(k,b.g.destroy(),4);
943
- case 4:b.h=null,b.g=null,D(k)}})})}function dv(){if(ed())a:{var a=t(pu.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=cv.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dl(a,b));return nl(this.h,a)};q.getConfiguration=function(){var a=ll();nl(a,this.h,ll());return a};q.zb=function(){return this.g};
944
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Yt(this.g);this.j.push(f);b=ev(this,a,b||{},function(){var g;return I(function(h){if(1==h.g)return C(h,jh(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ke(b,function(){return Zt(f)});b.finally(function(){vb(d.j,f)});return fv(this,b)};
945
- function ev(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,y,x,A,z;return I(function(B){switch(B.g){case 1:return gv(),h=g=null,k=new ou,n=m=l=null,wa(B,2,3),C(B,d(),5);case 5:return g=B.h,C(B,hv(a,b,g,e),6);case 6:p=B.h;iv(a);r=!p.presentationTimeline.T()&&!p.presentationTimeline.Fb();if(!r)throw new N(2,9,9005,b);return C(B,jv(a,p,function(E){n=n||E},e),7);case 7:h=B.h;iv(a);if(n)throw n;return C(B,kv(p,e),8);case 8:return C(B,k.init(),9);case 9:return iv(a),C(B,qu(k),10);case 10:return l=B.h,iv(a),u=lv(h,
946
- p,b,c,e,f),w=u.Ng,y=u.Qe,C(B,l.oa.addManifests([w]),11);case 11:x=B.h;iv(a);m=x[0];iv(a);if(n)throw n;return C(B,mv(a,y,m,w,f,e,l.oa,p,h),12);case 12:return iv(a),A=new Hu("manifest",l.path.Fa,l.path.oa,m),B.return(Yu(A,w));case 3:return Ca(B),C(B,k.destroy(),13);case 13:if(!g){B.B(14);break}return C(B,g.stop(),14);case 14:if(!h){B.B(16);break}return C(B,h.destroy(),16);case 16:Ea(B,0);break;case 2:z=Ba(B);if(null==m){B.B(18);break}return C(B,nv(m),18);case 18:throw n||z;}})}
947
- function mv(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,w,y,x,A;return I(function(z){switch(z.g){case 1:l={};m=0;n=function(B,E){var F,G,H,J,K,S,O;return I(function(da){if(1==da.g){F={};G=t(B);for(H=G.next();!H.done;F={wb:F.wb},H=G.next())F.wb=H.value,J=Vt(F.wb,f),K=F.wb.i,S=F.wb.h,O=function(X){return function(aa){var xa,ta,ja;return I(function(oa){if(1==oa.g)return C(oa,g.addSegments([{data:aa}]),2);xa=oa.h;iv(a);ta=X.wb.g;ja=Ut(ta);l[ja]=xa[0];m+=aa.byteLength;D(oa)})}}(F),au(e,F.wb.groupId,J,K,S,O);return C(da,
948
- cu(e),2)}if(!E)return da.B(0);iv(a);ov(h,d,k,f);return C(da,g.updateManifest(c,d),0)})};p=!1;wa(z,2);if(!pv(h)||!p||qv(h)){z.B(4);break}return C(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return iv(a),b=b.filter(function(B){return!B.h}),r=l,u=m,l={},m=0,C(z,rv(g,c,d,r,u,function(){return iv(a)}),6);case 6:iv(a);case 4:if(p){z.B(7);break}return C(z,n(b,!1),8);case 8:return iv(a),w=l,y=m,l={},m=0,C(z,rv(g,c,d,w,y,function(){return iv(a)}),9);case 9:iv(a);case 7:Aa(z,0);break;case 2:return x=
949
- Ba(z),A=Object.values(l),C(z,g.removeSegments(A,function(){}),10);case 10:throw x;}})}function nv(a){var b,c,d,e;return I(function(f){switch(f.g){case 1:return b=new ou,C(f,b.init(),2);case 2:return C(f,qu(b),3);case 3:return c=f.h,d=new Hu("manifest",c.path.Fa,c.path.oa,a),C(f,b.destroy(),4);case 4:return e=new cv,C(f,e.remove(d.toString()),0)}})}
950
- function rv(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,y;return I(function(x){switch(x.g){case 1:g=!1;wa(x,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
951
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(x,a.updateManifest(b,c),4);case 4:g=!0;f();Aa(x,0);break;case 2:return w=Ba(x),C(x,nv(b),5);case 5:if(g){x.B(6);break}y=Object.values(d);return C(x,a.removeSegments(y,function(){}),6);case 6:throw w;}})}
952
- function kv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,H,J,K,S,O,da,X;return I(function(aa){switch(aa.g){case 1:return c={width:Infinity,height:Infinity},Ed(a,b.restrictions,c),C(aa,Hd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;sd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Xd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
953
- d.push(Yd(r));u=t(a.imageStreams);for(w=u.next();!w.done;w=u.next())y=w.value,d.push(Zd(y));return C(aa,b.offline.trackSelectionCallback(d),3);case 3:x=aa.h;A=a.presentationTimeline.getDuration();z=0;B=t(x);for(E=B.next();!E.done;E=B.next())F=E.value,G=F.bandwidth*A/8,z+=G;wa(aa,4);return C(aa,b.offline.downloadSizeCallback(z),6);case 6:H=aa.h;if(!H)throw new N(2,9,9014);Aa(aa,5);break;case 4:J=Ba(aa);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:K=new Set;S=new Set;O=new Set;da=t(x);for(E=
954
- da.next();!E.done;E=da.next())X=E.value,"variant"==X.type&&K.add(X.id),"text"==X.type&&S.add(X.id),"image"==X.type&&O.add(X.id);a.variants=a.variants.filter(function(xa){return K.has(xa.id)});a.textStreams=a.textStreams.filter(function(xa){return S.has(xa.id)});a.imageStreams=a.imageStreams.filter(function(xa){return O.has(xa.id)});sv(a);D(aa)}})}
955
- function lv(a,b,c,d,e,f){var g=Wu(c,b,d),h=e.offline.progressCallback;$t(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&Kg(a,"cenc",r)});var k=pv(b)&&!qv(b),l=null;k&&(l=tv.get(a.g.keySystem));for(var m=new Zu,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())av(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())$u(m,n.value);m=uv(f,m,b,e);f=m.streams;m=m.Qe;p=a.g;n=e.offline.usePersistentLicense;
956
- p&&n&&(p.initData=[]);return{Ng:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Ic(),streams:f,sessionIds:n?Ug(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Qe:m}}function pv(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
957
- function qv(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 ov(a,b,c,d){b.expiration=c.Ic();c=Ug(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(pv(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}q.remove=function(a){return vv(this,wv(this,a))};
958
- function wv(a,b){var c,d,e,f,g,h;return I(function(k){switch(k.g){case 1:gv();c=Iu(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new ou;ya(k);return C(k,e.init(),4);case 4:return C(k,su(e,d.Fa(),d.oa()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([xv(a,h,e),yv(f,d,h)]),2);case 2:return Ca(k),C(k,e.destroy(),8);case 8:Ea(k,0)}})}
959
- function zv(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Cc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Cc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function xv(a,b,c){return I(function(d){return C(d,Av(a.g,a.h.drm,c,b),0)})}
938
+ q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:return d=c.g,e=new ou,ua(m,2,3),C(m,e.init(),5);case 5:return C(m,su(e,d.Fa(),d.oa()),6);case 6:return f=m.h,C(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.B(3);break}return C(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Aa(m),C(m,e.destroy(),10);case 10:Ba(m,0);break;case 2:za(m),m.B(3)}})};
939
+ jh["application/x-offline-manifest"]=function(){return new Pu};function Qu(){}function Ru(a){var b=Iu(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Me(a)):a=b&&"segment"==b.g?Su(b.key(),b):Ke(new N(2,1,9004,a));return a}
940
+ function Su(a,b){var c=new ou;return Me(void 0).fa(function(){return c.init()}).fa(function(){return su(c,b.Fa(),b.oa())}).fa(function(d){return d.getSegments([b.key()])}).fa(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}L("shaka.offline.OfflineScheme",Qu);Qu.plugin=Ru;Ye("offline",Ru);function Tu(a,b,c){var d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),w=u.next();!w.done;w=u.next())if(w=w.value,Uu(w.info,p)){w.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=Vu(a,b,g);return C(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
941
+ function Vu(a,b,c){var d,e;return H(function(f){switch(f.g){case 1:return d=new tg({Ib:b,onError:function(){},Jd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),ua(f,2),d.configure(a),C(f,Bg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:xa(f,3);break;case 2:return za(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return ua(f,6),C(f,Mg(d),8);case 8:xa(f,7);break;case 6:return za(f),C(f,d.destroy(),
942
+ 9);case 9:return f.return([]);case 7:return e=[],C(f,Promise.all(c.sessionIds.map(function(g){return H(function(h){if(1==h.g)return ua(h,2),C(h,Ng(d,g),4);if(2!=h.g)return e.push(g),xa(h,0);za(h);D(h)})})),10);case 10:return C(f,d.destroy(),11);case 11:return f.return(e)}})}
943
+ function Uu(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&vb(a.audioCapabilities,b.audioCapabilities,c)&&vb(a.videoCapabilities,b.videoCapabilities,c)};function Wu(a,b,c){var d=b.presentationTimeline.getDuration();b=Xu(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Yu(a,b){var c=Ku(new Ju(a.Fa(),a.oa()),b),d=b.appMetadata||{};c=Xu(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}}
944
+ function Xu(a){var b=[],c=ee(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Wd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Xd(c.value));return b};function Zu(){this.g={}}function $u(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 av(a,b){a.g[b.id]=b.bandwidth||2048}function bv(a,b){a=a.g[b];null==a&&(a=0);return a};function cv(a){var b=this;if(a&&a.constructor!=T)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Ab()):(this.h=kl(),this.g=new Xe);this.i=[];this.j=[];var c=!a;this.l=new hf(function(){var d,e,f,g,h;return H(function(k){switch(k.g){case 1:return C(k,Promise.all(b.j.map(function(l){return Zt(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return C(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return C(k,b.g.destroy(),4);
945
+ case 4:b.h=null,b.g=null,D(k)}})})}function dv(){if(dd())a:{var a=t(pu.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=cv.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cl(a,b));return ml(this.h,a)};q.getConfiguration=function(){var a=kl();ml(a,this.h,kl());return a};q.Ab=function(){return this.g};
946
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Yt(this.g);this.j.push(f);b=ev(this,a,b||{},function(){var g;return H(function(h){if(1==h.g)return C(h,ih(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Je(b,function(){return Zt(f)});b.finally(function(){ub(d.j,f)});return fv(this,b)};
947
+ function ev(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,y,x,A,z;return H(function(B){switch(B.g){case 1:return gv(),h=g=null,k=new ou,n=m=l=null,ua(B,2,3),C(B,d(),5);case 5:return g=B.h,C(B,hv(a,b,g,e),6);case 6:p=B.h;iv(a);r=!p.presentationTimeline.T()&&!p.presentationTimeline.Gb();if(!r)throw new N(2,9,9005,b);return C(B,jv(a,p,function(E){n=n||E},e),7);case 7:h=B.h;iv(a);if(n)throw n;return C(B,kv(p,e),8);case 8:return C(B,k.init(),9);case 9:return iv(a),C(B,qu(k),10);case 10:return l=B.h,iv(a),u=lv(h,
948
+ p,b,c,e,f),w=u.Ng,y=u.Re,C(B,l.oa.addManifests([w]),11);case 11:x=B.h;iv(a);m=x[0];iv(a);if(n)throw n;return C(B,mv(a,y,m,w,f,e,l.oa,p,h),12);case 12:return iv(a),A=new Hu("manifest",l.path.Fa,l.path.oa,m),B.return(Yu(A,w));case 3:return Aa(B),C(B,k.destroy(),13);case 13:if(!g){B.B(14);break}return C(B,g.stop(),14);case 14:if(!h){B.B(16);break}return C(B,h.destroy(),16);case 16:Ba(B,0);break;case 2:z=za(B);if(null==m){B.B(18);break}return C(B,nv(m),18);case 18:throw n||z;}})}
949
+ function mv(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,w,y,x,A;return H(function(z){switch(z.g){case 1:l={};m=0;n=function(B,E){var F,G,I,J,K,S,R;return H(function(ba){if(1==ba.g){F={};G=t(B);for(I=G.next();!I.done;F={wb:F.wb},I=G.next())F.wb=I.value,J=Vt(F.wb,f),K=F.wb.i,S=F.wb.h,R=function(W){return function(Z){var na,wa,oa;return H(function(ya){if(1==ya.g)return C(ya,g.addSegments([{data:Z}]),2);na=ya.h;iv(a);wa=W.wb.g;oa=Ut(wa);l[oa]=na[0];m+=Z.byteLength;D(ya)})}}(F),au(e,F.wb.groupId,J,K,S,R);return C(ba,
950
+ cu(e),2)}if(!E)return ba.B(0);iv(a);ov(h,d,k,f);return C(ba,g.updateManifest(c,d),0)})};p=!1;ua(z,2);if(!pv(h)||!p||qv(h)){z.B(4);break}return C(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return iv(a),b=b.filter(function(B){return!B.h}),r=l,u=m,l={},m=0,C(z,rv(g,c,d,r,u,function(){return iv(a)}),6);case 6:iv(a);case 4:if(p){z.B(7);break}return C(z,n(b,!1),8);case 8:return iv(a),w=l,y=m,l={},m=0,C(z,rv(g,c,d,w,y,function(){return iv(a)}),9);case 9:iv(a);case 7:xa(z,0);break;case 2:return x=
951
+ za(z),A=Object.values(l),C(z,g.removeSegments(A,function(){}),10);case 10:throw x;}})}function nv(a){var b,c,d,e;return H(function(f){switch(f.g){case 1:return b=new ou,C(f,b.init(),2);case 2:return C(f,qu(b),3);case 3:return c=f.h,d=new Hu("manifest",c.path.Fa,c.path.oa,a),C(f,b.destroy(),4);case 4:return e=new cv,C(f,e.remove(d.toString()),0)}})}
952
+ function rv(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,w,y;return H(function(x){switch(x.g){case 1:g=!1;ua(x,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
953
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(x,a.updateManifest(b,c),4);case 4:g=!0;f();xa(x,0);break;case 2:return w=za(x),C(x,nv(b),5);case 5:if(g){x.B(6);break}y=Object.values(d);return C(x,a.removeSegments(y,function(){}),6);case 6:throw w;}})}
954
+ function kv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z,B,E,F,G,I,J,K,S,R,ba,W;return H(function(Z){switch(Z.g){case 1:return c={width:Infinity,height:Infinity},Dd(a,b.restrictions,c),C(Z,Gd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;rd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Wd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())r=p.value,
955
+ d.push(Xd(r));u=t(a.imageStreams);for(w=u.next();!w.done;w=u.next())y=w.value,d.push(Yd(y));return C(Z,b.offline.trackSelectionCallback(d),3);case 3:x=Z.h;A=a.presentationTimeline.getDuration();z=0;B=t(x);for(E=B.next();!E.done;E=B.next())F=E.value,G=F.bandwidth*A/8,z+=G;ua(Z,4);return C(Z,b.offline.downloadSizeCallback(z),6);case 6:I=Z.h;if(!I)throw new N(2,9,9014);xa(Z,5);break;case 4:J=za(Z);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:K=new Set;S=new Set;R=new Set;ba=t(x);for(E=ba.next();!E.done;E=
956
+ ba.next())W=E.value,"variant"==W.type&&K.add(W.id),"text"==W.type&&S.add(W.id),"image"==W.type&&R.add(W.id);a.variants=a.variants.filter(function(na){return K.has(na.id)});a.textStreams=a.textStreams.filter(function(na){return S.has(na.id)});a.imageStreams=a.imageStreams.filter(function(na){return R.has(na.id)});sv(a);D(Z)}})}
957
+ function lv(a,b,c,d,e,f){var g=Wu(c,b,d),h=e.offline.progressCallback;$t(f,function(r,u){g.size=u;h(g,r)},function(r,u){k&&e.offline.usePersistentLicense&&l==u&&Jg(a,"cenc",r)});var k=pv(b)&&!qv(b),l=null;k&&(l=tv.get(a.g.keySystem));for(var m=new Zu,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())av(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())$u(m,n.value);m=uv(f,m,b,e);f=m.streams;m=m.Re;p=a.g;n=e.offline.usePersistentLicense;
958
+ p&&n&&(p.initData=[]);return{Ng:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Ic(),streams:f,sessionIds:n?Tg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Re:m}}function pv(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
959
+ function qv(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 ov(a,b,c,d){b.expiration=c.Ic();c=Tg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(pv(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}q.remove=function(a){return vv(this,wv(this,a))};
960
+ function wv(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:gv();c=Iu(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new ou;va(k);return C(k,e.init(),4);case 4:return C(k,su(e,d.Fa(),d.oa()),5);case 5:return f=k.h,C(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],C(k,Promise.all([xv(a,h,e),yv(f,d,h)]),2);case 2:return Aa(k),C(k,e.destroy(),8);case 8:Ba(k,0)}})}
961
+ function zv(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Bc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Bc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function xv(a,b,c){return H(function(d){return C(d,Av(a.g,a.h.drm,c,b),0)})}
960
962
  function yv(a,b,c){function d(){}var e=Bv(c);Yu(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.ah=function(){return vv(this,Cv(this))};
961
- function Cv(a){var b,c,d,e,f,g,h,k,l,m;return I(function(n){switch(n.g){case 1:return gv(),b=a.g,c=a.h.drm,d=new ou,e=!1,ya(n),C(n,d.init(),4);case 4:f=[],tu(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,Tu(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return Ca(n),C(n,d.destroy(),11);case 11:Ea(n,3);break;case 3:return n.return(!e)}})}
962
- q.list=function(){return vv(this,Dv())};function Dv(){var a,b,c;return I(function(d){switch(d.g){case 1:return gv(),a=[],b=new ou,ya(d),C(d,b.init(),4);case 4:return c=Promise.resolve(),ru(b,function(e,f){c=c.then(function(){var g;return I(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Yu(new Hu("manifest",e.Fa,e.oa,l),k);a.push(k)});D(h)})})}),C(d,c,2);case 2:return Ca(d),C(d,b.destroy(),6);case 6:Ea(d,3);break;case 3:return d.return(a)}})}
963
- function hv(a,b,c,d){var e,f,g,h,k;return I(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},c.configure(d.manifest),iv(a),C(l,c.start(b,g),2);if(3!=
964
- l.g)return h=l.h,iv(a),k=Ev(h),C(l,Promise.all(qf(k,function(m){return m.createSegmentIndex()})),3);iv(a);if(e)throw e;return l.return(h)})}function jv(a,b,c,d){var e;return I(function(f){switch(f.g){case 1:return e=new ug({Hb:a.g,onError:c,Id:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),C(f,zg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return C(f,Ng(e),3);case 3:return C(f,Mg(e),4);case 4:return f.return(e)}})}
965
- function uv(a,b,c,d){var e=new Map,f=Ev(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Fv(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Qe:Array.from(e.values())}}
963
+ function Cv(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return gv(),b=a.g,c=a.h.drm,d=new ou,e=!1,va(n),C(n,d.init(),4);case 4:f=[],tu(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.B(2);break}k=h.value;return C(n,k.getAll(),8);case 8:return l=n.h,C(n,Tu(c,b,l),9);case 9:return m=n.h,C(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.B(5);break;case 2:return Aa(n),C(n,d.destroy(),11);case 11:Ba(n,3);break;case 3:return n.return(!e)}})}
964
+ q.list=function(){return vv(this,Dv())};function Dv(){var a,b,c;return H(function(d){switch(d.g){case 1:return gv(),a=[],b=new ou,va(d),C(d,b.init(),4);case 4:return c=Promise.resolve(),ru(b,function(e,f){c=c.then(function(){var g;return H(function(h){if(1==h.g)return C(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=Yu(new Hu("manifest",e.Fa,e.oa,l),k);a.push(k)});D(h)})})}),C(d,c,2);case 2:return Aa(d),C(d,b.destroy(),6);case 6:Ba(d,3);break;case 3:return d.return(a)}})}
965
+ function hv(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},c.configure(d.manifest),iv(a),C(l,c.start(b,g),2);if(3!=
966
+ l.g)return h=l.h,iv(a),k=Ev(h),C(l,Promise.all(pf(k,function(m){return m.createSegmentIndex()})),3);iv(a);if(e)throw e;return l.return(h)})}function jv(a,b,c,d){var e;return H(function(f){switch(f.g){case 1:return e=new tg({Ib:a.g,onError:c,Jd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),C(f,yg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return C(f,Mg(e),3);case 3:return C(f,Lg(e),4);case 4:return f.return(e)}})}
967
+ function uv(a,b,c,d){var e=new Map,f=Ev(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Fv(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Re:Array.from(e.values())}}
966
968
  function Fv(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,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,
967
969
  closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external},h=e.offline.numberOfParallelDownloads,k=0;Gv(d,c.presentationTimeline.fb(),function(l){var m=Ut(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=bv(b,d.id)*p;p=Xt(a.g,p);f.set(m,new Tt(l,p,k,!1))}l.h&&(n=Ut(l.h),f.has(n)||(p=.5*bv(b,d.id),p=Xt(a.g,p),f.set(n,new Tt(l.h,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,
968
970
  appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Gv(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 iv(a){if(a.l.g)throw new N(2,9,7001);}function gv(){if(!dv())throw new N(2,9,9E3);}
969
- function vv(a,b){return I(function(c){if(1==c.g)return a.i.push(b),ya(c),C(c,b,4);if(2!=c.g)return c.return(c.h);Ca(c);vb(a.i,b);return Ea(c,0)})}function fv(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){vb(a.i,c)})}function Bv(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
970
- function Av(a,b,c,d){var e,f,g;return I(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=uu(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:zv(d,!1),videoCapabilities:zv(d,!0)}});return C(h,Tu(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
971
+ function vv(a,b){return H(function(c){if(1==c.g)return a.i.push(b),va(c),C(c,b,4);if(2!=c.g)return c.return(c.h);Aa(c);ub(a.i,b);return Ba(c,0)})}function fv(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){ub(a.i,c)})}function Bv(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
972
+ function Av(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=uu(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:zv(d,!1),videoCapabilities:zv(d,!0)}});return C(h,Tu(b,a,f),2)}return 3!=h.g?(g=h.h,C(h,e.remove(g),3)):C(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
971
973
  function Ev(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(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}
972
- function sv(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}L("shaka.offline.Storage",cv);cv.deleteAll=function(){var a;return I(function(b){return 1==b.g?(a=new ou,ya(b),C(b,vu(a),2)):5!=b.g?(Ca(b),C(b,a.destroy(),5)):Ea(b,0)})};cv.prototype.list=cv.prototype.list;
973
- cv.prototype.removeEmeSessions=cv.prototype.ah;cv.prototype.remove=cv.prototype.remove;cv.prototype.store=cv.prototype.store;cv.prototype.getNetworkingEngine=cv.prototype.zb;cv.prototype.getConfiguration=cv.prototype.getConfiguration;cv.prototype.configure=cv.prototype.configure;cv.prototype.destroy=cv.prototype.destroy;cv.support=dv;
974
+ function sv(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}L("shaka.offline.Storage",cv);cv.deleteAll=function(){var a;return H(function(b){return 1==b.g?(a=new ou,va(b),C(b,vu(a),2)):5!=b.g?(Aa(b),C(b,a.destroy(),5)):Ba(b,0)})};cv.prototype.list=cv.prototype.list;
975
+ cv.prototype.removeEmeSessions=cv.prototype.ah;cv.prototype.remove=cv.prototype.remove;cv.prototype.store=cv.prototype.store;cv.prototype.getNetworkingEngine=cv.prototype.Ab;cv.prototype.getConfiguration=cv.prototype.getConfiguration;cv.prototype.configure=cv.prototype.configure;cv.prototype.destroy=cv.prototype.destroy;cv.support=dv;
974
976
  var tv=(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");
975
- Ym.offline=dv;function Hv(){}function Iv(a,b){a={priority:b||0,Wf:a};for(b=0;b<Jv.length;b++)if(Jv[b].priority<a.priority){Jv.splice(b,0,a);return}Jv.push(a)}L("shaka.polyfill",Hv);Hv.register=Iv;Hv.installAll=function(){for(var a=t(Jv),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Wf()}catch(c){$a("Error installing polyfill!",c)}}};var Jv=[];function Kv(){this.g=new Lv}function Mv(){window.AbortController||(window.AbortController=Kv,window.AbortSignal=Lv)}Kv.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 P("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};fa.Object.defineProperties(Kv.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Hv.AbortController=Kv;Kv.install=Mv;
976
- function Lv(){Te.call(this);this.h=!1;this.g=void 0;this.onabort=null}ra(Lv,Te);fa.Object.defineProperties(Lv.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Iv(Mv);function Nv(){}function Ov(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Pv(b.value)}function Pv(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)}})}Hv.Aria=Nv;Nv.install=Ov;Iv(Ov);function Qv(){}function Rv(){Sv()}Hv.EncryptionScheme=Qv;Qv.install=Rv;Iv(Rv,-2);function Tv(){}
977
+ Xm.offline=dv;function Hv(){}function Iv(a,b){a={priority:b||0,Wf:a};for(b=0;b<Jv.length;b++)if(Jv[b].priority<a.priority){Jv.splice(b,0,a);return}Jv.push(a)}L("shaka.polyfill",Hv);Hv.register=Iv;Hv.installAll=function(){for(var a=t(Jv),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Wf()}catch(c){Xa("Error installing polyfill!",c)}}};var Jv=[];function Kv(){this.g=new Lv}function Mv(){window.AbortController||(window.AbortController=Kv,window.AbortSignal=Lv)}Kv.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new O("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(Kv.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Hv.AbortController=Kv;Kv.install=Mv;
978
+ function Lv(){Se.call(this);this.h=!1;this.g=void 0;this.onabort=null}qa(Lv,Se);ea.Object.defineProperties(Lv.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Iv(Mv);function Nv(){}function Ov(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Pv(b.value)}function Pv(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)}})}Hv.Aria=Nv;Nv.install=Ov;Iv(Ov);function Qv(){}function Rv(){Sv()}Hv.EncryptionScheme=Qv;Qv.install=Rv;Iv(Rv,-2);function Tv(){}
977
979
  function Uv(){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}}),
978
980
  Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Vv);document.addEventListener("webkitfullscreenerror",Vv);document.addEventListener("mozfullscreenchange",Vv);document.addEventListener("mozfullscreenerror",Vv);document.addEventListener("MSFullscreenChange",Vv);document.addEventListener("MSFullscreenError",Vv)}}
979
- function Vv(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)}Hv.Fullscreen=Tv;Tv.install=Uv;Iv(Uv);function Wv(){}function Xv(){var a=!0;if(md()||jd("PlayStation 5")||nd()||jd("Web0S")||kd()||jd("CrKey")||jd("PC=EOS")||jd("Hisense")||jd("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Yv=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Zv)}
980
- function Zv(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z;return I(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(!ed())return B.return(b);if(c){if(jd("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var E=c.contentType;c.width&&c.height&&(E+="; width="+c.width+"; height="+c.height);c.framerate&&(E+="; framerate="+c.framerate);"pq"===
981
- c.transferFunction&&(E+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(E)}else e=gb(c.contentType);else kd()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=gb(f)):e=gb(c.contentType);if(!e)return B.return(b)}if(d&&(g=d.contentType,h=gb(g),!h))return B.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=fd(k),!l)||d&&(m=d.contentType,n=fd(m),!n))return B.return(b)}else return B.return(b);
981
+ function Vv(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)}Hv.Fullscreen=Tv;Tv.install=Uv;Iv(Uv);function Wv(){}function Xv(){var a=!0;if(ld()||id("PlayStation 5")||md()||id("Web0S")||jd()||id("CrKey")||id("PC=EOS")||id("Hisense")||id("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Yv=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Zv)}
982
+ function Zv(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,w,y,x,A,z;return H(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(!dd())return B.return(b);if(c){if(id("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var E=c.contentType;c.width&&c.height&&(E+="; width="+c.width+"; height="+c.height);c.framerate&&(E+="; framerate="+c.framerate);"pq"===
983
+ c.transferFunction&&(E+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(E)}else e=eb(c.contentType);else jd()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=eb(f)):e=eb(c.contentType);if(!e)return B.return(b)}if(d&&(g=d.contentType,h=eb(g),!h))return B.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=ed(k),!l)||d&&(m=d.contentType,n=ed(m),!n))return B.return(b)}else return B.return(b);
982
984
  if(!a.keySystemConfiguration)return b.supported=!0,B.return(Promise.resolve(b));p=a.keySystemConfiguration;r=[];u=[];p.audio&&(w={robustness:p.audio.robustness||"",contentType:a.audio.contentType},r.push(w));p.video&&(y={robustness:p.video.robustness||"",contentType:a.video.contentType},u.push(y));x={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};r.length&&(x.audioCapabilities=r);u.length&&(x.videoCapabilities=
983
- u);A=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;wa(B,3);if(A in $v){z=$v[A];B.B(5);break}return C(B,navigator.requestMediaKeySystemAccess(p.keySystem,[x]),6);case 6:z=B.h,$v[A]=z;case 5:Aa(B,4);break;case 3:Ba(B);case 4:z&&(b.supported=!0,b.keySystemAccess=z);case 2:return B.return(b)}})}Hv.MediaCapabilities=Wv;Wv.install=Xv;var Yv=null;Wv.originalMcap=Yv;var $v={};Wv.memoizedMediaKeySystemAccessRequests_=$v;Iv(Xv,-1);function aw(){}function bw(){var a=od();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?cw():a?12>=a?(dw(),ew()):15>=a&&dw():hd()?fw():(jd("Tizen 2")||jd("Tizen 3")||jd("Tizen 4"))&&gw());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&hw()}
984
- function dw(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,La.apply(0,arguments));b.abort=function(){};return b}}function ew(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function fw(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
985
- function gw(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Ic(b)[0]&&a(b)}}function cw(){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)}}
986
- function hw(){var a=MediaSource.isTypeSupported;jd("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)})}Hv.MediaSource=aw;aw.install=bw;Iv(bw);function iw(){}function jw(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?kw():void 0!=window.orientation&&lw())}function kw(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
987
- function lw(){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 mw;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new P("change");b.dispatchEvent(c)})}Hv.Orientation=iw;iw.install=jw;function mw(){Te.call(this);this.type="";this.angle=0}ra(mw,Te);
985
+ u);A=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;ua(B,3);if(A in $v){z=$v[A];B.B(5);break}return C(B,navigator.requestMediaKeySystemAccess(p.keySystem,[x]),6);case 6:z=B.h,$v[A]=z;case 5:xa(B,4);break;case 3:za(B);case 4:z&&(b.supported=!0,b.keySystemAccess=z);case 2:return B.return(b)}})}Hv.MediaCapabilities=Wv;Wv.install=Xv;var Yv=null;Wv.originalMcap=Yv;var $v={};Wv.memoizedMediaKeySystemAccessRequests_=$v;Iv(Xv,-1);function aw(){}function bw(){var a=nd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?cw():a?12>=a?(dw(),ew()):15>=a&&dw():gd()?fw():(id("Tizen 2")||id("Tizen 3")||id("Tizen 4"))&&gw());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&hw()}
986
+ function dw(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ka.apply(0,arguments));b.abort=function(){};return b}}function ew(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function fw(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
987
+ function gw(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Hc(b)[0]&&a(b)}}function cw(){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)}}
988
+ function hw(){var a=MediaSource.isTypeSupported;id("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)})}Hv.MediaSource=aw;aw.install=bw;Iv(bw);function iw(){}function jw(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?kw():void 0!=window.orientation&&lw())}function kw(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
989
+ function lw(){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 mw;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Hv.Orientation=iw;iw.install=jw;function mw(){Se.call(this);this.type="";this.angle=0}qa(mw,Se);
988
990
  mw.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)};
989
991
  mw.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Iv(jw);function nw(){}var ow,pw,qw,rw,sw,tw;function uw(a,b){try{var c=new vw(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function ww(a){var b=this.mediaKeys;b&&b!=a&&xw(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?xw(a,this):Promise.resolve()}
990
- function yw(a){a=M(a.initData);if(pb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=yf(a.subarray(4),!0);a=Bf(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=nb(a);this.dispatchEvent(b)}Hv.PatchedMediaKeysApple=nw;
992
+ function yw(a){a=M(a.initData);if(ob(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=xf(a.subarray(4),!0);a=Af(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=mb(a);this.dispatchEvent(b)}Hv.PatchedMediaKeysApple=nw;
991
993
  nw.uninstall=function(){ow&&(ow=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",pw),HTMLMediaElement.prototype.setMediaKeys=qw,window.MediaKeys=rw,window.MediaKeySystemAccess=sw,navigator.requestMediaKeySystemAccess=tw,pw=tw=qw=sw=rw=null,window.shakaMediaKeysPolyfill=!1)};
992
994
  nw.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)ow=!0,pw=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),qw=HTMLMediaElement.prototype.setMediaKeys,rw=window.MediaKeys,sw=window.MediaKeySystemAccess,tw=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=ww;window.MediaKeys=zw;window.MediaKeySystemAccess=vw;navigator.requestMediaKeySystemAccess=
993
995
  uw;window.shakaMediaKeysPolyfill=!0}};
994
996
  function vw(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(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=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
995
997
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(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;}
996
- vw.prototype.createMediaKeys=function(){var a=new zw(this.keySystem);return Promise.resolve(a)};vw.prototype.getConfiguration=function(){return this.g};function zw(a){this.h=new WebKitMediaKeys(a);this.g=new lf}zw.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Aw(this.h,a)};zw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
997
- function xw(a,b){a.g.sb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",yw);try{return Ti(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}zw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Aw(a){Te.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new lf;this.sessionId="";this.expiration=NaN;this.closed=new Je;this.keyStatuses=new Bw}ra(Aw,Te);q=Aw.prototype;
998
- q.generateRequest=function(a,b){var c=this;this.h=new Je;try{var d=this.l.createSession("video/mp4",M(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Bb()?"license-request":"license-renewal").set("message",nb(e.message));e=new P("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Cw(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
998
+ vw.prototype.createMediaKeys=function(){var a=new zw(this.keySystem);return Promise.resolve(a)};vw.prototype.getConfiguration=function(){return this.g};function zw(a){this.h=new WebKitMediaKeys(a);this.g=new kf}zw.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Aw(this.h,a)};zw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
999
+ function xw(a,b){a.g.sb();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",yw);try{return Si(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}zw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Aw(a){Se.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new kf;this.sessionId="";this.expiration=NaN;this.closed=new Ie;this.keyStatuses=new Bw}qa(Aw,Se);q=Aw.prototype;
1000
+ q.generateRequest=function(a,b){var c=this;this.h=new Ie;try{var d=this.l.createSession("video/mp4",M(b));this.i=d;this.sessionId=d.sessionId||"";this.j.D(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Cb()?"license-request":"license-renewal").set("message",mb(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Cw(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
999
1001
  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:Cw(c,"output-not-allowed");break;default:Cw(c,"internal-error")}});Cw(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1000
- q.update=function(a){this.g=new Je;try{this.i.update(M(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.sb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Cw(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new P("keystatuseschange");a.dispatchEvent(b)}
1001
- function Bw(){this.size=0;this.g=void 0}q=Bw.prototype;q.Bb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,hh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=hh.value();return this.g&&lb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function Dw(){}function Ew(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Fw,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Gw,window.MediaKeys=Hw,window.MediaKeySystemAccess=Iw,window.shakaMediaKeysPolyfill=!0)}function Fw(){return Promise.reject(Error("The key system specified is not supported."))}
1002
+ q.update=function(a){this.g=new Ie;try{this.i.update(M(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.sb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Cw(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
1003
+ function Bw(){this.size=0;this.g=void 0}q=Bw.prototype;q.Cb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,gh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=gh.value();return this.g&&kb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function Dw(){}function Ew(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Fw,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Gw,window.MediaKeys=Hw,window.MediaKeySystemAccess=Iw,window.shakaMediaKeysPolyfill=!0)}function Fw(){return Promise.reject(Error("The key system specified is not supported."))}
1002
1004
  function Gw(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Hv.PatchedMediaKeysNop=Dw;Dw.install=Ew;function Hw(){throw new TypeError("Illegal constructor.");}Hw.prototype.createSession=function(){};Hw.prototype.setServerCertificate=function(){};Hw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Iw(){this.keySystem="";throw new TypeError("Illegal constructor.");}Iw.prototype.getConfiguration=function(){};
1003
1005
  Iw.prototype.createMediaKeys=function(){};Iv(Ew,-10);function Jw(){}
1004
1006
  function Kw(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Lw="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Mw;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Nw;window.MediaKeys=Ow;window.MediaKeySystemAccess=Pw;window.shakaMediaKeysPolyfill=!0}}
1005
1007
  function Qw(a){var b=Lw;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Mw(a,b){try{var c=new Pw(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Nw(a){var b=this.mediaKeys;b&&b!=a&&Rw(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Rw(a,this);return Promise.resolve()}Hv.PatchedMediaKeysWebkit=Jw;Jw.install=Kw;
1006
1008
  function Pw(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
1007
1009
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
1008
- 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;}Pw.prototype.createMediaKeys=function(){var a=new Ow(this.g);return Promise.resolve(a)};Pw.prototype.getConfiguration=function(){return this.h};function Ow(a){this.l=a;this.h=null;this.g=new lf;this.i=[];this.j=new Map}
1009
- function Rw(a,b){a.h=b;a.g.sb();var c=Lw;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=nb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=Sw(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Bb()?"licenserequest":"licenserenewal").set("message",d.message),d=new P("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=Sw(a,d.sessionId))Tw(d,"usable"),
1010
+ 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;}Pw.prototype.createMediaKeys=function(){var a=new Ow(this.g);return Promise.resolve(a)};Pw.prototype.getConfiguration=function(){return this.h};function Ow(a){this.l=a;this.h=null;this.g=new kf;this.i=[];this.j=new Map}
1011
+ function Rw(a,b){a.h=b;a.g.sb();var c=Lw;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=mb(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=Sw(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Cb()?"licenserequest":"licenserenewal").set("message",d.message),d=new O("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.D(b,c+"keyadded",function(d){if(d=Sw(a,d.sessionId))Tw(d,"usable"),
1010
1012
  d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=Sw(a,d.sessionId);e&&e.handleError(d)}))}Ow.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 Uw(b,this.l,a);this.i.push(a);return a};Ow.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1011
- Ow.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Sw(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 Uw(a,b,c){Te.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 Je;this.keyStatuses=new Vw}ra(Uw,Te);q=Uw.prototype;
1013
+ Ow.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Sw(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 Uw(a,b,c){Se.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 Ie;this.keyStatuses=new Vw}qa(Uw,Se);q=Uw.prototype;
1012
1014
  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?Tw(this,"output-restricted"):1==b?Tw(this,"expired"):Tw(this,"internal-error"))};
1013
- function Ww(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=M(Bf("LOAD_SESSION|"+c));else{var e=Bf("PERSISTENT|");d=Wf(e,b)}else d=M(b)}catch(g){return Promise.reject(g)}a.h=new Je;var f=Qw("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new dd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
1014
- function Xw(a,b,c){if(a.g)a.g.then(function(){return Xw(a,b,c)}).catch(function(){return Xw(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=xf(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=Tf(e.keys[0].k);e=Tf(e.keys[0].kid)}else d=M(c),e=null;var f=Qw("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1015
- function Tw(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new P("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Ww(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Ww(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Je;Xw(this,b,a);return b};
1016
- 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=Qw("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 Vw(){this.size=0;this.g=void 0}q=Vw.prototype;q.Bb=function(){return this.g};
1017
- q.forEach=function(a){this.g&&a(this.g,hh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=hh.value();return this.g&&lb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Lw="";Iv(Kw);function Yw(){}function Zw(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=$w,Object.defineProperty(a,"disablePictureInPicture",{get:ax,set:bx,enumerable:!0,configurable:!0}),document.exitPictureInPicture=cx,document.addEventListener("webkitpresentationmodechanged",dx,!0))}}
1015
+ function Ww(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=M(Af("LOAD_SESSION|"+c));else{var e=Af("PERSISTENT|");d=Vf(e,b)}else d=M(b)}catch(g){return Promise.reject(g)}a.h=new Ie;var f=Qw("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new cd(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
1016
+ function Xw(a,b,c){if(a.g)a.g.then(function(){return Xw(a,b,c)}).catch(function(){return Xw(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=wf(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=Sf(e.keys[0].k);e=Sf(e.keys[0].kid)}else d=M(c),e=null;var f=Qw("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1017
+ function Tw(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return Ww(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Ww(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Ie;Xw(this,b,a);return b};
1018
+ 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=Qw("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 Vw(){this.size=0;this.g=void 0}q=Vw.prototype;q.Cb=function(){return this.g};
1019
+ q.forEach=function(a){this.g&&a(this.g,gh.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=gh.value();return this.g&&kb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Lw="";Iv(Kw);function Yw(){}function Zw(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=$w,Object.defineProperty(a,"disablePictureInPicture",{get:ax,set:bx,enumerable:!0,configurable:!0}),document.exitPictureInPicture=cx,document.addEventListener("webkitpresentationmodechanged",dx,!0))}}
1018
1020
  function dx(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)}
1019
1021
  function $w(){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 cx(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1020
- function ax(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function bx(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Hv.PiPWebkit=Yw;Yw.install=Zw;Iv(Zw);function ex(){}function fx(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=gx))}function gx(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Hv.RandomUUID=ex;ex.install=fx;Iv(fx);function hx(){}function ix(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=jx)}function jx(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Hv.StorageEstimate=hx;hx.install=ix;Iv(ix);function kx(){}function lx(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:mx})}function mx(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Hv.Symbol=kx;kx.install=lx;Iv(lx);function nx(){}function ox(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Hv.VideoPlayPromise=nx;nx.install=ox;Iv(ox);function px(){}function qx(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||ld())&&(a.getVideoPlaybackQuality=rx)}}function rx(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Hv.VideoPlaybackQuality=px;px.install=qx;Iv(qx);function sx(){}function tx(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ux;else if(6==b)a=vx;else{try{var c=!!ux(1,2,"")}catch(d){c=!1}c&&(a=ux)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ux(a,b,c){return new window.TextTrackCue(a,b,c)}function vx(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Hv.VTTCue=sx;sx.install=tx;Iv(tx);function wx(){}wx.prototype.parseInit=function(){};wx.prototype.setSequenceMode=function(){};wx.prototype.parseMedia=function(a,b){var c=null,d=[];a=xf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=xx.exec(e))){var f=yx.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new yb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};L("shaka.text.LrcTextParser",wx);wx.prototype.parseMedia=wx.prototype.parseMedia;
1021
- wx.prototype.setSequenceMode=wx.prototype.setSequenceMode;wx.prototype.parseInit=wx.prototype.parseInit;var xx=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,yx=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Mc["application/x-subtitle-lrc"]=function(){return new wx};function zx(){}zx.prototype.parseInit=function(){};zx.prototype.setSequenceMode=function(){};
1022
- zx.prototype.parseMedia=function(a,b){var c=xf(a);a=[];if(""==c)return a;var d=rg(c,"tt");if(!d)throw new N(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=eg(d,Ax,"frameRate"),f=eg(d,Ax,"subFrameRate"),g=eg(d,Ax,"frameRateMultiplier"),h=eg(d,Ax,"tickRate"),k=eg(d,Ax,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=eg(d,Bx,"extent");if("default"!=l&&"preserve"!=l)throw new N(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new Cx(e,f,
1023
- g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{bg:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?cg(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var n=t(d),p=n.next();!p.done;p=n.next()){var r=p.value;p=new zb;var u=r.getAttribute("xml:id");if(u){p.id=u;var w=null;m&&(w=Dx.exec(m)||Ex.exec(m));u=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,x;if(y=Fx(r,g,"extent"))y=(x=Dx.exec(y))||Ex.exec(y),
1024
- null!=y&&(p.width=Number(y[1]),p.height=Number(y[2]),x||(null!=u&&(p.width=100*p.width/u),null!=w&&(p.height=100*p.height/w)),p.l=x||null!=u?Qb:0,p.i=x||null!=w?Qb:0);if(r=Fx(r,g,"origin"))y=(x=Dx.exec(r))||Ex.exec(r),null!=y&&(p.g=Number(y[1]),p.h=Number(y[2]),x||(null!=w&&(p.h=100*p.h/w),null!=u&&(p.g=100*p.g/u)),p.j=x||null!=u?Qb:0)}else p=null;p&&h.push(p)}if($f(c,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");m=t($f(c,"div"));for(n=m.next();!n.done;n=m.next())if($f(n.value,
1022
+ function ax(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function bx(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Hv.PiPWebkit=Yw;Yw.install=Zw;Iv(Zw);function ex(){}function fx(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=gx))}function gx(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Hv.RandomUUID=ex;ex.install=fx;Iv(fx);function hx(){}function ix(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=jx)}function jx(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Hv.StorageEstimate=hx;hx.install=ix;Iv(ix);function kx(){}function lx(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:mx})}function mx(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Hv.Symbol=kx;kx.install=lx;Iv(lx);function nx(){}function ox(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Hv.VideoPlayPromise=nx;nx.install=ox;Iv(ox);function px(){}function qx(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||kd())&&(a.getVideoPlaybackQuality=rx)}}function rx(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Hv.VideoPlaybackQuality=px;px.install=qx;Iv(qx);function sx(){}function tx(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=ux;else if(6==b)a=vx;else{try{var c=!!ux(1,2,"")}catch(d){c=!1}c&&(a=ux)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function ux(a,b,c){return new window.TextTrackCue(a,b,c)}function vx(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Hv.VTTCue=sx;sx.install=tx;Iv(tx);function wx(){}wx.prototype.parseInit=function(){};wx.prototype.setSequenceMode=function(){};wx.prototype.parseMedia=function(a,b){var c=null,d=[];a=wf(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=xx.exec(e))){var f=yx.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new xb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};L("shaka.text.LrcTextParser",wx);wx.prototype.parseMedia=wx.prototype.parseMedia;
1023
+ wx.prototype.setSequenceMode=wx.prototype.setSequenceMode;wx.prototype.parseInit=wx.prototype.parseInit;var xx=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,yx=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Lc["application/x-subtitle-lrc"]=function(){return new wx};function zx(){}zx.prototype.parseInit=function(){};zx.prototype.setSequenceMode=function(){};
1024
+ zx.prototype.parseMedia=function(a,b){var c=wf(a);a=[];if(""==c)return a;var d=qg(c,"tt");if(!d)throw new N(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=dg(d,Ax,"frameRate"),f=dg(d,Ax,"subFrameRate"),g=dg(d,Ax,"frameRateMultiplier"),h=dg(d,Ax,"tickRate"),k=dg(d,Ax,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=dg(d,Bx,"extent");if("default"!=l&&"preserve"!=l)throw new N(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new Cx(e,f,
1025
+ g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{bg:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?bg(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var n=t(d),p=n.next();!p.done;p=n.next()){var r=p.value;p=new yb;var u=r.getAttribute("xml:id");if(u){p.id=u;var w=null;m&&(w=Dx.exec(m)||Ex.exec(m));u=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,x;if(y=Fx(r,g,"extent"))y=(x=Dx.exec(y))||Ex.exec(y),
1026
+ null!=y&&(p.width=Number(y[1]),p.height=Number(y[2]),x||(null!=u&&(p.width=100*p.width/u),null!=w&&(p.height=100*p.height/w)),p.l=x||null!=u?Pb:0,p.i=x||null!=w?Pb:0);if(r=Fx(r,g,"origin"))y=(x=Dx.exec(r))||Ex.exec(r),null!=y&&(p.g=Number(y[1]),p.h=Number(y[2]),x||(null!=w&&(p.h=100*p.h/w),null!=u&&(p.g=100*p.g/u)),p.j=x||null!=u?Pb:0)}else p=null;p&&h.push(p)}if(Zf(c,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");m=t(Zf(c,"div"));for(n=m.next();!n.done;n=m.next())if(Zf(n.value,
1025
1027
  "span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Gx(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1026
1028
  function Gx(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var r=null,u=t(Hx),w=u.next();!w.done&&!(r=Ix(p,"backgroundImage",d,"#",w.value)[0]);w=u.next());u=m;if("p"==a.nodeName||r)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));w=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
1027
1029
  a=[];if(!w)for(var y=t(p.childNodes),x=y.next();!x.done;x=y.next())(x=Gx(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);d=null!=l;y=/\S/.test(p.textContent);var A=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(A||y||"br"==p.tagName||0!=a.length||d&&!h))return null;x=Jx(p,c);y=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=Kx(n,c,y,x),y=x.start,x=x.end,n=n.parentNode;null==y&&(y=0);y+=b.periodStart;x=null==x?Infinity:x+b.periodStart;y=Math.max(y,b.segmentStart);
1028
- x=Math.min(x,b.segmentEnd);if(!A&&0<a.length)for(y=Infinity,x=0,b=t(a),c=b.next();!c.done;c=b.next())c=c.value,y=Math.min(y,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new yb(y,x,""),e.F=!0,e;b="";w&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new yb(y,x,b);b.g=a;m||(b.Y=!0);k&&(b.X=k);k=Ix(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&
1030
+ x=Math.min(x,b.segmentEnd);if(!A&&0<a.length)for(y=Infinity,x=0,b=t(a),c=b.next();!c.done;c=b.next())c=c.value,y=Math.min(y,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new xb(y,x,""),e.F=!0,e;b="";w&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new xb(y,x,b);b.g=a;m||(b.Y=!0);k&&(b.X=k);k=Ix(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&
1029
1031
  !p.getAttribute("style")&&(g=Ix(l,"region",f,"")[0]);Lx(b,p,g,r,e,u,0==a.length);return b}
1030
- function Lx(a,b,c,d,e,f,g){f=f||g;"rtl"==Mx(b,c,e,"direction",f)&&(a.direction="rtl");g=Mx(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=Cb);(g=Mx(b,c,e,"textAlign",!0))?(a.G=Nx[g],a.s=Ox[g],a.textAlign=Kb[g.toUpperCase()]):a.textAlign=Bb;if(g=Mx(b,c,e,"displayAlign",!0))a.i=Lb[g.toUpperCase()];if(g=Mx(b,c,e,"color",f))a.j=g;if(g=Mx(b,c,e,"backgroundColor",f))a.backgroundColor=g;if(g=
1032
+ function Lx(a,b,c,d,e,f,g){f=f||g;"rtl"==Mx(b,c,e,"direction",f)&&(a.direction="rtl");g=Mx(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=Bb);(g=Mx(b,c,e,"textAlign",!0))?(a.G=Nx[g],a.s=Ox[g],a.textAlign=Jb[g.toUpperCase()]):a.textAlign=Ab;if(g=Mx(b,c,e,"displayAlign",!0))a.i=Kb[g.toUpperCase()];if(g=Mx(b,c,e,"color",f))a.j=g;if(g=Mx(b,c,e,"backgroundColor",f))a.backgroundColor=g;if(g=
1031
1033
  Mx(b,c,e,"border",f))a.V=g;if(g=Mx(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.l="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.l="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.l="sans-serif";break;case "monospaceSansSerif":a.l="Consolas,monospace";break;case "proportionalSerif":a.l="serif";break;default:a.l=g}(g=Mx(b,c,e,"fontWeight",f))&&"bold"==g&&(a.u=700);g=Mx(b,c,e,"wrapOption",f);a.M=g&&"noWrap"==g?!1:!0;(g=Mx(b,c,e,"lineHeight",
1032
- f))&&g.match(Px)&&(a.aa=g);(g=Mx(b,c,e,"fontSize",f))&&(g.match(Px)||g.match(Qx))&&(a.A=g);if(g=Mx(b,c,e,"fontStyle",f))a.o=Pb[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.N="data:image/png;base64,"+d)}if(d=Mx(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Px)?a.L=a.j:(a.L=d[0],d.shift()),d[0]&&d[0].match(Px)?a.ga=d[0]:a.L="";(d=Mx(b,c,e,"letterSpacing",f))&&d.match(Px)&&(a.W=
1034
+ f))&&g.match(Px)&&(a.aa=g);(g=Mx(b,c,e,"fontSize",f))&&(g.match(Px)||g.match(Qx))&&(a.A=g);if(g=Mx(b,c,e,"fontStyle",f))a.o=Ob[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.N="data:image/png;base64,"+d)}if(d=Mx(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Px)?a.L=a.j:(a.L=d[0],d.shift()),d[0]&&d[0].match(Px)?a.ga=d[0]:a.L="";(d=Mx(b,c,e,"letterSpacing",f))&&d.match(Px)&&(a.W=
1033
1035
  d);(d=Mx(b,c,e,"linePadding",f))&&d.match(Px)&&(a.Z=d);if(f=Mx(b,c,e,"opacity",f))a.C=parseFloat(f);(c=Fx(c,e,"textDecoration"))&&Rx(a,c);(b=Sx(b,e,"textDecoration"))&&Rx(a,b)}
1034
- function Rx(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.h.includes("underline")||a.h.push("underline");break;case "noUnderline":a.h.includes("underline")&&vb(a.h,"underline");break;case "lineThrough":a.h.includes("lineThrough")||a.h.push("lineThrough");break;case "noLineThrough":a.h.includes("lineThrough")&&vb(a.h,"lineThrough");break;case "overline":a.h.includes("overline")||a.h.push("overline");break;case "noOverline":a.h.includes("overline")&&
1035
- vb(a.h,"overline")}}function Mx(a,b,c,d,e){e=void 0===e?!0:e;return(a=Sx(a,c,d))?a:e?Fx(b,c,d):null}function Fx(a,b,c){if(!a)return null;var d=eg(a,Bx,c);return d?d:Tx(a,b,c)}function Sx(a,b,c){var d=eg(a,Bx,c);return d?d:Tx(a,b,c)}function Tx(a,b,c){a=Ix(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=dg(a[e],"urn:ebu:tt:style",c);f||(f=eg(a[e],Bx,c));f||(f=Sx(a[e],b,c));f&&(d=f)}return d}
1036
- function Ix(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?dg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(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 Kx(a,b,c,d){a=Jx(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}}
1036
+ function Rx(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.h.includes("underline")||a.h.push("underline");break;case "noUnderline":a.h.includes("underline")&&ub(a.h,"underline");break;case "lineThrough":a.h.includes("lineThrough")||a.h.push("lineThrough");break;case "noLineThrough":a.h.includes("lineThrough")&&ub(a.h,"lineThrough");break;case "overline":a.h.includes("overline")||a.h.push("overline");break;case "noOverline":a.h.includes("overline")&&
1037
+ ub(a.h,"overline")}}function Mx(a,b,c,d,e){e=void 0===e?!0:e;return(a=Sx(a,c,d))?a:e?Fx(b,c,d):null}function Fx(a,b,c){if(!a)return null;var d=dg(a,Bx,c);return d?d:Tx(a,b,c)}function Sx(a,b,c){var d=dg(a,Bx,c);return d?d:Tx(a,b,c)}function Tx(a,b,c){a=Ix(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=cg(a[e],"urn:ebu:tt:style",c);f||(f=dg(a[e],Bx,c));f||(f=Sx(a[e],b,c));f&&(d=f)}return d}
1038
+ function Ix(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?cg(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(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 Kx(a,b,c,d){a=Jx(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}}
1037
1039
  function Jx(a,b){var c=Ux(a.getAttribute("begin"),b),d=Ux(a.getAttribute("end"),b);a=Ux(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1038
1040
  function Ux(a,b){var c=null;if(Vx.test(a)){a=Vx.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(Wx.test(a))c=Xx(Wx,a);else if(Yx.test(a))c=Xx(Yx,a);else if(Zx.test(a))a=Zx.exec(a),c=Number(a[1])/b.frameRate;else if($x.test(a))a=$x.exec(a),c=Number(a[1])/b.g;else if(ay.test(a))c=Xx(ay,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
1039
1041
  function Xx(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)}L("shaka.text.TtmlTextParser",zx);zx.prototype.parseMedia=zx.prototype.parseMedia;zx.prototype.setSequenceMode=zx.prototype.setSequenceMode;zx.prototype.parseInit=zx.prototype.parseInit;
1040
1042
  function Cx(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]))}
1041
- var Dx=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Qx=/^(\d{1,2}(?:\.\d+)?|100)%$/,Px=/^(\d+px|\d+em|\d*\.?\d+c)$/,Ex=/^(\d+)px (\d+)px$/,Vx=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Wx=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Yx=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Zx=/^(\d*(?:\.\d*)?)f$/,$x=/^(\d*(?:\.\d*)?)t$/,ay=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Ox={left:Fb,center:"center",right:"end",start:Fb,
1042
- end:"end"},Nx={left:"line-left",center:"center",right:"line-right"},Ax=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Bx=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Hx=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Mc["application/ttml+xml"]=function(){return new zx};function by(){this.g=new zx}by.prototype.parseInit=function(a){var b=!1;(new Gf).box("moov",Lf).box("trak",Lf).box("mdia",Lf).box("minf",Lf).box("stbl",Lf).O("stsd",Nf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};by.prototype.setSequenceMode=function(){};by.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Gf).box("mdat",Pf(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};
1043
- L("shaka.text.Mp4TtmlParser",by);by.prototype.parseMedia=by.prototype.parseMedia;by.prototype.setSequenceMode=by.prototype.setSequenceMode;by.prototype.parseInit=by.prototype.parseInit;Mc['application/mp4; codecs="stpp"']=function(){return new by};Mc['application/mp4; codecs="stpp.ttml"']=function(){return new by};Mc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new by};Mc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new by};function cy(){this.g=!1}cy.prototype.parseInit=function(){};cy.prototype.setSequenceMode=function(a){this.g=a};
1044
- cy.prototype.parseMedia=function(a,b){a=xf(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=dy(new Hr(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+
1045
- e/9E4-a}}b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Hr(d);var f=new zb;Kr(d);Ir(d);for(var g=Kr(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.i=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.m=Number(g[1]),h.o=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.g=Number(g[1]),h.h=Number(g[2])):
1046
- /^scroll=up$/.exec(k)&&(h.s="up");Ir(d);g=Kr(d)}b.push(f)}e=new Map;ey(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=
1047
- /\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new yb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.j=r;break;case "font-family":m=!0;l.l=r;break;case "font-size":m=!0;l.A=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.u=700;break;case "font-style":switch(r){case "normal":m=!0;
1048
- l.o=Ib;break;case "italic":m=!0;l.o="italic";break;case "oblique":m=!0,l.o="oblique"}break;case "opacity":m=!0;l.C=parseFloat(r);break;case "text-shadow":m=!0;l.I=r;break;case "white-space":m=!0,l.M="noWrap"!=r}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Hr(f[0]),k=dy(g),n=Jr(g,/[ \t]+--\x3e[ \t]+/g),l=dy(g),null==k||null==n||null==l)$a("Failed to parse VTT time code. Cue skipped:",
1049
- h,f),f=null;else{k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.U=""):f=new yb(k,l,"");fy(m,f,e);Ir(g);for(k=Kr(g);k;)gy(f,k,b),Ir(g),k=Kr(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
1050
- function ey(a){for(var b=t(Object.entries(Nb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new yb(0,0,"");e.j=d;a.set("."+c,e)}b=t(Object.entries(Ob));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new yb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1043
+ var Dx=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Qx=/^(\d{1,2}(?:\.\d+)?|100)%$/,Px=/^(\d+px|\d+em|\d*\.?\d+c)$/,Ex=/^(\d+)px (\d+)px$/,Vx=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Wx=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Yx=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Zx=/^(\d*(?:\.\d*)?)f$/,$x=/^(\d*(?:\.\d*)?)t$/,ay=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Ox={left:Eb,center:"center",right:"end",start:Eb,
1044
+ end:"end"},Nx={left:"line-left",center:"center",right:"line-right"},Ax=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Bx=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Hx=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];Lc["application/ttml+xml"]=function(){return new zx};function by(){this.g=new zx}by.prototype.parseInit=function(a){var b=!1;(new Ff).box("moov",Kf).box("trak",Kf).box("mdia",Kf).box("minf",Kf).box("stbl",Kf).O("stsd",Mf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};by.prototype.setSequenceMode=function(){};by.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Ff).box("mdat",Of(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};
1045
+ L("shaka.text.Mp4TtmlParser",by);by.prototype.parseMedia=by.prototype.parseMedia;by.prototype.setSequenceMode=by.prototype.setSequenceMode;by.prototype.parseInit=by.prototype.parseInit;Lc['application/mp4; codecs="stpp"']=function(){return new by};Lc['application/mp4; codecs="stpp.ttml"']=function(){return new by};Lc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new by};Lc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new by};function cy(){this.g=!1}cy.prototype.parseInit=function(){};cy.prototype.setSequenceMode=function(a){this.g=a};
1046
+ cy.prototype.parseMedia=function(a,b){a=wf(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=dy(new Gr(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+
1047
+ e/9E4-a}}b=[];e=t(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Gr(d);var f=new yb;Jr(d);Hr(d);for(var g=Jr(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.i=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.m=Number(g[1]),h.o=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.g=Number(g[1]),h.h=Number(g[2])):
1048
+ /^scroll=up$/.exec(k)&&(h.s="up");Hr(d);g=Jr(d)}b.push(f)}e=new Map;ey(e);d=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=
1049
+ /\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new xb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.j=r;break;case "font-family":m=!0;l.l=r;break;case "font-size":m=!0;l.A=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.u=700;break;case "font-style":switch(r){case "normal":m=!0;
1050
+ l.o=Hb;break;case "italic":m=!0;l.o="italic";break;case "oblique":m=!0,l.o="oblique"}break;case "opacity":m=!0;l.C=parseFloat(r);break;case "text-shadow":m=!0;l.I=r;break;case "white-space":m=!0,l.M="noWrap"!=r}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else if(h=null,f[0].includes("--\x3e")||(h=f[0],f.splice(0,1)),g=new Gr(f[0]),k=dy(g),n=Ir(g,/[ \t]+--\x3e[ \t]+/g),l=dy(g),null==k||null==n||null==l)Xa("Failed to parse VTT time code. Cue skipped:",
1051
+ h,f),f=null;else{k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.U=""):f=new xb(k,l,"");fy(m,f,e);Hr(g);for(k=Jr(g);k;)gy(f,k,b),Hr(g),k=Jr(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
1052
+ function ey(a){for(var b=t(Object.entries(Mb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new xb(0,0,"");e.j=d;a.set("."+c,e)}b=t(Object.entries(Nb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new xb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1051
1053
  function fy(a,b,c){0===c.size&&ey(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
1052
1054
  a.substr(f,e-f),f.match(hy)&&d.push(f),f=-1);d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
1053
- ">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=rg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.U=iy(a);return}a=t(e);for(e=a.next();!e.done;e=a.next())jy(e.value,b,d,c);b.g=d}else b.U=iy(a)}
1055
+ ">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=t(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=qg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.U=iy(a);return}a=t(e);for(e=a.next();!e.done;e=a.next())jy(e.value,b,d,c);b.g=d}else b.U=iy(a)}
1054
1056
  function ky(a,b){return a&&0<a.length?a:b}
1055
1057
  function jy(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=ky(h.backgroundColor,e.backgroundColor),e.j=ky(h.j,e.j),e.l=ky(h.l,e.l),e.A=ky(h.A,e.A),e.u=h.u,e.o=h.o,e.C=h.C,e.I=h.I,e.M=h.M);switch(g){case "br":g=b.clone();g.F=!0;c.push(g);break;
1056
- case "b":e.u=700;break;case "i":e.o="italic";break;case "u":e.h.push("underline");break;case "font":if(g=a.getAttribute("color"))e.j=g;break;case "div":if(g=a.getAttribute("time"))if(g=dy(new Hr(g)))e.startTime=g}}if(gg(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.F=!0,c.push(f)),0<a.length&&(f=e.clone(),f.U=iy(a),c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())jy(a.value,e,c,d)}
1057
- function gy(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Bb:a.textAlign=Kb[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.G="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
1058
- b?"line-right":"center"==b||"middle"==b?"center":Ab);else if(d=/^region:(.*)$/.exec(b)){if(b=ly(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.H=1,a.m=Number(c[1]),c[2]&&(a.s=Mb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.H=Eb,a.m=Number(c[1]),c[2]&&(a.s=Mb[c[2].toUpperCase()])}function ly(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
1059
- function dy(a){a=Jr(a,hy);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)}function iy(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}L("shaka.text.VttTextParser",cy);cy.prototype.parseMedia=cy.prototype.parseMedia;
1060
- cy.prototype.setSequenceMode=cy.prototype.setSequenceMode;cy.prototype.parseInit=cy.prototype.parseInit;var hy=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Mc["text/vtt"]=function(){return new cy};Mc['text/vtt; codecs="vtt"']=function(){return new cy};Mc['text/vtt; codecs="wvtt"']=function(){return new cy};function my(){this.g=null}my.prototype.parseInit=function(a){var b=this,c=!1;(new Gf).box("moov",Lf).box("trak",Lf).box("mdia",Lf).O("mdhd",function(d){d=Kh(d.reader,d.version);b.g=d.timescale}).box("minf",Lf).box("stbl",Lf).O("stsd",Nf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};my.prototype.setSequenceMode=function(){};
1061
- my.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Gf).box("moof",Lf).box("traf",Lf).O("tfdt",function(z){g=!0;c=Jh(z.reader,z.version).baseMediaDecodeTime}).O("tfhd",function(z){l=Ih(z.reader,z.flags).ef}).O("trun",function(z){h=!0;d=Lh(z.reader,z.version,z.flags).Bf}).box("mdat",Pf(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 Df(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1062
- p.value;var r=p.Ge||l,u=p.Ld?c+p.Ld:a;a=u+(r||0);var w=0;do{var y=m.K();w+=y;var x=m.K(),A=null;"vttc"==Kf(x)?8<y&&(A=m.kb(y-8)):m.skip(y-8);r&&A&&(y=ny(A,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(y))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(tc)};function ny(a,b,c){var d,e,f;(new Gf).box("payl",Pf(function(g){d=xf(g)})).box("iden",Pf(function(g){e=xf(g)})).box("sttg",Pf(function(g){f=xf(g)})).parse(a);return d?oy(d,e,f,b,c):null}
1063
- function oy(a,b,c,d,e){d=new yb(d,e,"");fy(a,d,new Map);b&&(d.id=b);if(c)for(a=new Hr(c),b=Kr(a);b;)gy(d,b,[]),Ir(a),b=Kr(a);return d}L("shaka.text.Mp4VttParser",my);my.prototype.parseMedia=my.prototype.parseMedia;my.prototype.setSequenceMode=my.prototype.setSequenceMode;my.prototype.parseInit=my.prototype.parseInit;Mc['application/mp4; codecs="wvtt"']=function(){return new my};function py(){}py.prototype.parseInit=function(){};py.prototype.setSequenceMode=function(){};py.prototype.parseMedia=function(a){var b=xf(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Hr(c[0]),e=qy(d),f=Jr(d,/,/g);d=qy(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 yb(e,d,c.slice(1).join("\n").trim()))}return a};
1064
- function qy(a){a=Jr(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)}L("shaka.text.SbvTextParser",py);py.prototype.parseMedia=py.prototype.parseMedia;py.prototype.setSequenceMode=py.prototype.setSequenceMode;py.prototype.parseInit=py.prototype.parseInit;Mc["text/x-subviewer"]=function(){return new py};function ry(){this.g=new cy}ry.prototype.parseInit=function(){};ry.prototype.setSequenceMode=function(){};ry.prototype.parseMedia=function(a,b){a=xf(a);a=sy(a);a=M(Bf(a));return this.g.parseMedia(a,b)};
1058
+ case "b":e.u=700;break;case "i":e.o="italic";break;case "u":e.h.push("underline");break;case "font":if(g=a.getAttribute("color"))e.j=g;break;case "div":if(g=a.getAttribute("time"))if(g=dy(new Gr(g)))e.startTime=g}}if(fg(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.F=!0,c.push(f)),0<a.length&&(f=e.clone(),f.U=iy(a),c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())jy(a.value,e,c,d)}
1059
+ function gy(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=Ab:a.textAlign=Jb[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.G="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
1060
+ b?"line-right":"center"==b||"middle"==b?"center":zb);else if(d=/^region:(.*)$/.exec(b)){if(b=ly(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.H=1,a.m=Number(c[1]),c[2]&&(a.s=Lb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.H=Db,a.m=Number(c[1]),c[2]&&(a.s=Lb[c[2].toUpperCase()])}function ly(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
1061
+ function dy(a){a=Ir(a,hy);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)}function iy(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}L("shaka.text.VttTextParser",cy);cy.prototype.parseMedia=cy.prototype.parseMedia;
1062
+ cy.prototype.setSequenceMode=cy.prototype.setSequenceMode;cy.prototype.parseInit=cy.prototype.parseInit;var hy=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Lc["text/vtt"]=function(){return new cy};Lc['text/vtt; codecs="vtt"']=function(){return new cy};Lc['text/vtt; codecs="wvtt"']=function(){return new cy};function my(){this.g=null}my.prototype.parseInit=function(a){var b=this,c=!1;(new Ff).box("moov",Kf).box("trak",Kf).box("mdia",Kf).O("mdhd",function(d){d=Jh(d.reader,d.version);b.g=d.timescale}).box("minf",Kf).box("stbl",Kf).O("stsd",Mf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};my.prototype.setSequenceMode=function(){};
1063
+ my.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Ff).box("moof",Kf).box("traf",Kf).O("tfdt",function(z){g=!0;c=Ih(z.reader,z.version).baseMediaDecodeTime}).O("tfhd",function(z){l=Hh(z.reader,z.flags).ff}).O("trun",function(z){h=!0;d=Kh(z.reader,z.version,z.flags).Bf}).box("mdat",Of(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 Cf(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
1064
+ p.value;var r=p.He||l,u=p.Md?c+p.Md:a;a=u+(r||0);var w=0;do{var y=m.K();w+=y;var x=m.K(),A=null;"vttc"==Jf(x)?8<y&&(A=m.kb(y-8)):m.skip(y-8);r&&A&&(y=ny(A,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(y))}while(p.sampleSize&&w<p.sampleSize)}return f.filter(sc)};function ny(a,b,c){var d,e,f;(new Ff).box("payl",Of(function(g){d=wf(g)})).box("iden",Of(function(g){e=wf(g)})).box("sttg",Of(function(g){f=wf(g)})).parse(a);return d?oy(d,e,f,b,c):null}
1065
+ function oy(a,b,c,d,e){d=new xb(d,e,"");fy(a,d,new Map);b&&(d.id=b);if(c)for(a=new Gr(c),b=Jr(a);b;)gy(d,b,[]),Hr(a),b=Jr(a);return d}L("shaka.text.Mp4VttParser",my);my.prototype.parseMedia=my.prototype.parseMedia;my.prototype.setSequenceMode=my.prototype.setSequenceMode;my.prototype.parseInit=my.prototype.parseInit;Lc['application/mp4; codecs="wvtt"']=function(){return new my};function py(){}py.prototype.parseInit=function(){};py.prototype.setSequenceMode=function(){};py.prototype.parseMedia=function(a){var b=wf(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Gr(c[0]),e=qy(d),f=Ir(d,/,/g);d=qy(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 xb(e,d,c.slice(1).join("\n").trim()))}return a};
1066
+ function qy(a){a=Ir(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)}L("shaka.text.SbvTextParser",py);py.prototype.parseMedia=py.prototype.parseMedia;py.prototype.setSequenceMode=py.prototype.setSequenceMode;py.prototype.parseInit=py.prototype.parseInit;Lc["text/x-subviewer"]=function(){return new py};function ry(){this.g=new cy}ry.prototype.parseInit=function(){};ry.prototype.setSequenceMode=function(){};ry.prototype.parseMedia=function(a,b){a=wf(a);a=sy(a);a=M(Af(a));return this.g.parseMedia(a,b)};
1065
1067
  function sy(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}L("shaka.text.SrtTextParser",ry);ry.srt2webvtt=sy;ry.prototype.parseMedia=ry.prototype.parseMedia;
1066
- ry.prototype.setSequenceMode=ry.prototype.setSequenceMode;ry.prototype.parseInit=ry.prototype.parseInit;Mc["text/srt"]=function(){return new ry};function ty(){}ty.prototype.parseInit=function(){};ty.prototype.setSequenceMode=function(){};
1067
- ty.prototype.parseMedia=function(a){var b="",c="";a=xf(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=uy.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=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=vy.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(wy);else if("Style"==e){e=f.split(wy);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1068
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Vd:e.Vd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=vy.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(wy);else if("Dialogue"==f){g=g.split(wy);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=xy(f.Start);var k=xy(f.End);g=new yb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Vd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Vd}}(e)))&&yy(g,f);d.push(g)}return d};
1069
- function yy(a,b){var c=b.Fontname;c&&(a.l=c);if(c=b.Fontsize)a.A=c+"px";if(c=b.PrimaryColour)if(c=zy(c))a.j=c;if(c=b.BackColour)if(c=zy(c))a.backgroundColor=c;b.Bold&&(a.u=700);b.Italic&&(a.o="italic");b.Underline&&a.h.push("underline");if(c=b.Spacing)a.W=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.i=Gb;a.textAlign="start";break;case 2:a.i=Gb;a.textAlign=Bb;break;case 3:a.i=Gb;a.textAlign="end";break;case 5:a.i="before";a.textAlign="start";break;case 6:a.i="before";a.textAlign=Bb;break;
1070
- case 7:a.i="before";a.textAlign="end";break;case 9:a.i="center";a.textAlign="start";break;case 10:a.i="center";a.textAlign=Bb;break;case 11:a.i="center",a.textAlign="end"}if(b=b.AlphaLevel)a.C=parseFloat(b)}function zy(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 xy(a){a=Ay.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}L("shaka.text.SsaTextParser",ty);
1071
- ty.prototype.parseMedia=ty.prototype.parseMedia;ty.prototype.setSequenceMode=ty.prototype.setSequenceMode;ty.prototype.parseInit=ty.prototype.parseInit;var uy=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vy=/^\s*([^:]+):\s*(.*)/,wy=/\s*,\s*/,Ay=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Mc["text/x-ssa"]=function(){return new ty};function By(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{vd:c,P:a}:null}function Cy(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,Pa:"mp4a.40."+e}}
1072
- function Dy(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1};function Ey(a){this.i=a;this.h=0;this.g=new Map}q=Ey.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?gb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Jc(b)||"mp4a.40.2")+'"':b};q.getOrginalMimeType=function(){return this.i};
1073
- q.transmux=function(a,b,c,d){for(var e=M(a),f=Hh(e),g=f.length;g<e.length&&!Dy(e,g);g++);a=1E3*c.endTime;f=Gh(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);f=Cy(e,g);if(!f)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;b.codecs=f.Pa;for(c=[];g<e.length;){var h=By(e,g);if(!h)return Promise.reject(new N(2,3,3018));var k=h.vd+h.P;g+k<=e.length&&c.push({data:e.subarray(g+
1074
- h.vd,g+k),size:h.P,duration:1024,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});g+=k}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ka:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ja:c},stream:b};a=new $s([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=tt(a);this.h++;b=Wf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.AacTransmuxer",Ey);
1075
- Ey.prototype.transmux=Ey.prototype.transmux;Ey.prototype.getOrginalMimeType=Ey.prototype.getOrginalMimeType;Ey.prototype.convertCodecs=Ey.prototype.convertCodecs;Ey.prototype.isSupported=Ey.prototype.isSupported;Ey.prototype.destroy=Ey.prototype.destroy;Tb("audio/aac",function(){return new Ey("audio/aac")},$b);function Fy(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1068
+ ry.prototype.setSequenceMode=ry.prototype.setSequenceMode;ry.prototype.parseInit=ry.prototype.parseInit;Lc["text/srt"]=function(){return new ry};function ty(){}ty.prototype.parseInit=function(){};ty.prototype.setSequenceMode=function(){};
1069
+ ty.prototype.parseMedia=function(a){var b="",c="";a=wf(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=uy.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=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=vy.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(wy);else if("Style"==e){e=f.split(wy);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1070
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={Wd:e.Wd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=vy.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(wy);else if("Dialogue"==f){g=g.split(wy);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=xy(f.Start);var k=xy(f.End);g=new xb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Wd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Wd}}(e)))&&yy(g,f);d.push(g)}return d};
1071
+ function yy(a,b){var c=b.Fontname;c&&(a.l=c);if(c=b.Fontsize)a.A=c+"px";if(c=b.PrimaryColour)if(c=zy(c))a.j=c;if(c=b.BackColour)if(c=zy(c))a.backgroundColor=c;b.Bold&&(a.u=700);b.Italic&&(a.o="italic");b.Underline&&a.h.push("underline");if(c=b.Spacing)a.W=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.i=Fb;a.textAlign="start";break;case 2:a.i=Fb;a.textAlign=Ab;break;case 3:a.i=Fb;a.textAlign="end";break;case 5:a.i="before";a.textAlign="start";break;case 6:a.i="before";a.textAlign=Ab;break;
1072
+ case 7:a.i="before";a.textAlign="end";break;case 9:a.i="center";a.textAlign="start";break;case 10:a.i="center";a.textAlign=Ab;break;case 11:a.i="center",a.textAlign="end"}if(b=b.AlphaLevel)a.C=parseFloat(b)}function zy(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 xy(a){a=Ay.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}L("shaka.text.SsaTextParser",ty);
1073
+ ty.prototype.parseMedia=ty.prototype.parseMedia;ty.prototype.setSequenceMode=ty.prototype.setSequenceMode;ty.prototype.parseInit=ty.prototype.parseInit;var uy=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,vy=/^\s*([^:]+):\s*(.*)/,wy=/\s*,\s*/,Ay=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Lc["text/x-ssa"]=function(){return new ty};function By(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{wd:c,P:a}:null}function Cy(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,Pa:"mp4a.40."+e}}
1074
+ function Dy(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1};function Ey(a){this.i=a;this.h=0;this.g=new Map}q=Ey.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?eb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Ic(b)||"mp4a.40.2")+'"':b};q.getOrginalMimeType=function(){return this.i};
1075
+ q.transmux=function(a,b,c,d){for(var e=M(a),f=Gh(e),g=f.length;g<e.length&&!Dy(e,g);g++);a=1E3*c.endTime;f=Fh(f);f.length&&c&&(c=f.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(a=c.data);c=Cy(e,g);if(!c)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=c.sampleRate;b.channelsCount=c.channelCount;for(f=[];g<e.length;){var h=By(e,g);if(!h)return Promise.reject(new N(2,3,3018));var k=h.wd+h.P;g+k<=e.length&&f.push({data:e.subarray(g+h.wd,g+k),size:h.P,
1076
+ duration:1024,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});g+=k}e=c.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:c.Pa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Ka:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ja:f},stream:b};a=new Zs([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=tt(a);this.h++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.AacTransmuxer",Ey);
1077
+ Ey.prototype.transmux=Ey.prototype.transmux;Ey.prototype.getOrginalMimeType=Ey.prototype.getOrginalMimeType;Ey.prototype.convertCodecs=Ey.prototype.convertCodecs;Ey.prototype.isSupported=Ey.prototype.isSupported;Ey.prototype.destroy=Ey.prototype.destroy;Sb("audio/aac",function(){return new Ey("audio/aac")},Zb);function Fy(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1076
1078
  1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,ca:a,P:e}}
1077
- function Gy(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function Hy(a){this.i=a;this.h=0;this.g=new Map}q=Hy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?gb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOrginalMimeType=function(){return this.i};
1078
- q.transmux=function(a,b,c,d){a=M(a);for(var e=Hh(a),f=e.length;f<a.length&&!Gy(a,f);f++);var g=1E3*c.endTime;e=Gh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Fy(a,f);if(!k)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ca;h.push({data:a.subarray(f,f+k.P),size:k.P,duration:1536,ab:0,flags:{gb:0,
1079
- Va:0,Ua:0,Qa:0,Ra:2,hb:0}});f+=k.P}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ka:[],ca:e,na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ja:h},stream:b};a=new $s([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=tt(a);this.h++;b=Wf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ac3Transmuxer",Hy);Hy.prototype.transmux=Hy.prototype.transmux;Hy.prototype.getOrginalMimeType=Hy.prototype.getOrginalMimeType;
1080
- Hy.prototype.convertCodecs=Hy.prototype.convertCodecs;Hy.prototype.isSupported=Hy.prototype.isSupported;Hy.prototype.destroy=Hy.prototype.destroy;Tb("audio/ac3",function(){return new Hy("audio/ac3")},$b);function Iy(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Qh(a.subarray(b+2));Sh(c,2);Sh(c,3);var d=Th(c,11)+1<<1,e=Th(c,2);if(3==e){e=Th(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Th(c,2);var g=Th(c,3),h=Th(c,1);c=Th(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ca:a,P:d}};function Jy(a){this.i=a;this.h=0;this.g=new Map}q=Jy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?gb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOrginalMimeType=function(){return this.i};
1081
- q.transmux=function(a,b,c,d){a=M(a);for(var e=Hh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Gh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Iy(a,f);if(!k)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ca;h.push({data:a.subarray(f,f+k.P),size:k.P,duration:1536,
1082
- ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});f+=k.P}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ka:[],ca:e,na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ja:h},stream:b};a=new $s([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=tt(a);this.h++;b=Wf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ec3Transmuxer",Jy);Jy.prototype.transmux=Jy.prototype.transmux;
1083
- Jy.prototype.getOrginalMimeType=Jy.prototype.getOrginalMimeType;Jy.prototype.convertCodecs=Jy.prototype.convertCodecs;Jy.prototype.isSupported=Jy.prototype.isSupported;Jy.prototype.destroy=Jy.prototype.destroy;Tb("audio/ec3",function(){return new Jy("audio/ec3")},$b);function Ky(a){if(!a.length)return null;var b=a.find(function(m){return 7==m.type});a=a.find(function(m){return 8==m.type});if(!b||!a)return null;var c=new Qh(b.data),d=Th(c,8);Th(c,8);Th(c,8);Vh(c);if(Ly.includes(d)&&(d=Wh(c),3===d&&Sh(c,1),Vh(c),Vh(c),Sh(c,1),1===Th(c,1))){d=3!==d?8:12;for(var e=0;e<d;e++)1===Th(c,1)&&(6>e?Xh(c,16):Xh(c,64))}Vh(c);d=Wh(c);if(0===d)Wh(c);else if(1===d)for(Sh(c,1),Vh(c),Vh(c),d=Wh(c),e=0;e<d;e++)Vh(c);Vh(c);Sh(c,1);d=Wh(c);var f=Wh(c),g=Th(c,1);0===g&&Sh(c,1);Sh(c,
1084
- 1);var h=e=0,k=0,l=0;1===Th(c,1)&&(e=Wh(c),h=Wh(c),k=Wh(c),l=Wh(c));c=(2-g)*(f+1)*16-2*k-2*l;d=16*(d+1)-2*e-2*h;e=[];b=b.bb;e.push(b.byteLength>>>8&255);e.push(b.byteLength&255);e=e.concat.apply(e,v(b));b=[];a=a.bb;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,v(a));a=new Uint8Array([1,e[3],e[4],e[5],255,225].concat(e,[1],b));return{height:c,width:d,na:a}}
1085
- function My(a){var b=!1,c=new Uint8Array([]),d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=Yh(new Qh(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.bb.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c=
1086
- Wf(c,h,f.bb))}return c.byteLength?{data:c,tf:b}:null}var Ly=[100,110,122,244,44,83,86,118,128,138,139,134];function Ny(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*Oy[14*(3===c?3-d:3===d?3:4)+e-1];f=Py[3*(3===c?0:2===c?1:2)+f];c=Qy[c][d];var h=Ry[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,P:k,fh:8*c*h}}return null}
1087
- function Sy(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var Oy=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Py=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],Qy=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Ry=[0,1,1,4];function Ty(a){this.i=a;this.h=0;this.g=new Map}q=Ty.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?gb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOrginalMimeType=function(){return this.i};
1088
- q.transmux=function(a,b,c,d){a=M(a);for(c=Hh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&Sy(a,e)){var f=Ny(a,e),g=4;f&&f.P&&(g=f.P);e+=g;e=e===a.length||e+1<a.length&&Sy(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=Ny(a,c);if(!f)return Promise.reject(new N(2,3,3018));h||(h=f);c+f.P<=a.length&&e.push({data:a.subarray(c,c+f.P),size:f.P,duration:1152,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});c+=f.P}if(!h)return Promise.reject(new N(2,3,3018));a=9E4*h.fh/h.sampleRate*this.h;d={id:b.id,
1089
- type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,Ka:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ja:e},stream:b};h=new $s([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=h.initSegment(),this.g.set(b.id,d));b=tt(h);this.h++;b=Wf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Mp3Transmuxer",Ty);Ty.prototype.transmux=Ty.prototype.transmux;Ty.prototype.getOrginalMimeType=Ty.prototype.getOrginalMimeType;
1090
- Ty.prototype.convertCodecs=Ty.prototype.convertCodecs;Ty.prototype.isSupported=Ty.prototype.isSupported;Ty.prototype.destroy=Ty.prototype.destroy;Tb("audio/mpeg",function(){return new Ty("audio/mpeg")},$b);function Uy(a){this.h=a;this.g=null}q=Uy.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Jc(a).split(","),c=xc("audio",b);b=xc("video",b);return!c||b||"mp3"!=Hc(c)?!1:gb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOrginalMimeType=function(){return this.h};
1091
- q.transmux=function(a){this.g?this.g.clearData():this.g=new Zh;a=M(a);var b=this.g.parse(a);a=b.od();if("mp3"!=a.audio||a.video)return Promise.reject(new N(2,3,3018));a=new Uint8Array([]);b=t(b.Xb());for(var c=b.next();!c.done;c=b.next())if(c=c.value.data)for(var d=0;d<c.length;){var e=Ny(c,d);e?(d+e.P<=c.length&&(a=Wf(a,c.subarray(d,d+e.P))),d+=e.P):d++}return Promise.resolve(a)};L("shaka.transmuxer.MpegTsTransmuxer",Uy);Uy.prototype.transmux=Uy.prototype.transmux;
1092
- Uy.prototype.getOrginalMimeType=Uy.prototype.getOrginalMimeType;Uy.prototype.convertCodecs=Uy.prototype.convertCodecs;Uy.prototype.isSupported=Uy.prototype.isSupported;Uy.prototype.destroy=Uy.prototype.destroy;Tb("video/mp2t",function(){return new Uy("video/mp2t")},Zb);/*
1079
+ function Gy(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function Hy(a){this.i=a;this.h=0;this.g=new Map}q=Hy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?eb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':b};q.getOrginalMimeType=function(){return this.i};
1080
+ q.transmux=function(a,b,c,d){a=M(a);for(var e=Gh(a),f=e.length;f<a.length&&!Gy(a,f);f++);var g=1E3*c.endTime;e=Fh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Fy(a,f);if(!k)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ca;h.push({data:a.subarray(f,f+k.P),size:k.P,duration:1536,ab:0,flags:{gb:0,
1081
+ Va:0,Ua:0,Qa:0,Ra:2,hb:0}});f+=k.P}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ka:[],ca:e,na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ja:h},stream:b};a=new Zs([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=tt(a);this.h++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ac3Transmuxer",Hy);Hy.prototype.transmux=Hy.prototype.transmux;
1082
+ Hy.prototype.getOrginalMimeType=Hy.prototype.getOrginalMimeType;Hy.prototype.convertCodecs=Hy.prototype.convertCodecs;Hy.prototype.isSupported=Hy.prototype.isSupported;Hy.prototype.destroy=Hy.prototype.destroy;Sb("audio/ac3",function(){return new Hy("audio/ac3")},Zb);function Iy(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new Ph(a.subarray(b+2));Rh(c,2);Rh(c,3);var d=Sh(c,11)+1<<1,e=Sh(c,2);if(3==e){e=Sh(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=Sh(c,2);var g=Sh(c,3),h=Sh(c,1);c=Sh(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,ca:a,P:d}};function Jy(a){this.i=a;this.h=0;this.g=new Map}q=Jy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?eb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOrginalMimeType=function(){return this.i};
1083
+ q.transmux=function(a,b,c,d){a=M(a);for(var e=Gh(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=Fh(e);e.length&&c&&(c=e.find(function(l){return"com.apple.streaming.transportStreamTimestamp"===l.description}))&&(g=c.data);c=0;e=new Uint8Array([]);for(var h=[];f<a.length;){var k=Iy(a,f);if(!k)return Promise.reject(new N(2,3,3018));b.audioSamplingRate=k.sampleRate;b.channelsCount=k.channelCount;c=k.sampleRate;e=k.ca;h.push({data:a.subarray(f,f+k.P),size:k.P,duration:1536,
1084
+ ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});f+=k.P}a=Math.floor(g*c/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:c,duration:d,Ka:[],ca:e,na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ja:h},stream:b};a=new Zs([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=a.initSegment(),this.g.set(b.id,d));b=tt(a);this.h++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ec3Transmuxer",Jy);Jy.prototype.transmux=Jy.prototype.transmux;
1085
+ Jy.prototype.getOrginalMimeType=Jy.prototype.getOrginalMimeType;Jy.prototype.convertCodecs=Jy.prototype.convertCodecs;Jy.prototype.isSupported=Jy.prototype.isSupported;Jy.prototype.destroy=Jy.prototype.destroy;Sb("audio/ec3",function(){return new Jy("audio/ec3")},Zb);function Ky(a){if(!a.length)return null;var b=a.find(function(m){return 7==m.type});a=a.find(function(m){return 8==m.type});if(!b||!a)return null;var c=new Ph(b.data),d=Sh(c,8);Sh(c,8);Sh(c,8);Uh(c);if(Ly.includes(d)&&(d=Vh(c),3===d&&Rh(c,1),Uh(c),Uh(c),Rh(c,1),1===Sh(c,1))){d=3!==d?8:12;for(var e=0;e<d;e++)1===Sh(c,1)&&(6>e?Wh(c,16):Wh(c,64))}Uh(c);d=Vh(c);if(0===d)Vh(c);else if(1===d)for(Rh(c,1),Uh(c),Uh(c),d=Vh(c),e=0;e<d;e++)Uh(c);Uh(c);Rh(c,1);d=Vh(c);var f=Vh(c),g=Sh(c,1);0===g&&Rh(c,1);Rh(c,
1086
+ 1);var h=e=0,k=0,l=0;1===Sh(c,1)&&(e=Vh(c),h=Vh(c),k=Vh(c),l=Vh(c));c=(2-g)*(f+1)*16-2*k-2*l;d=16*(d+1)-2*e-2*h;e=[];b=b.bb;e.push(b.byteLength>>>8&255);e.push(b.byteLength&255);e=e.concat.apply(e,v(b));b=[];a=a.bb;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,v(a));a=new Uint8Array([1,e[3],e[4],e[5],255,225].concat(e,[1],b));return{height:c,width:d,na:a}}
1087
+ function My(a){var b=!1,c=new Uint8Array([]),d=a.find(function(k){return 7==k.type}),e=!1;a=t(a);for(var f=a.next();!f.done;f=a.next()){f=f.value;var g=!1;switch(f.type){case 1:g=e=!0;var h=f.data;d&&4<h.length&&(h=Xh(new Ph(h)),2===h||4===h||7===h||9===h)&&(b=!0);break;case 5:b=g=e=!0;break;case 6:g=!0;break;case 7:g=!0;break;case 8:g=!0;break;case 9:e=g=!0;break;case 12:g=!0;break;default:g=!1}e&&g&&(g=f.bb.byteLength,h=new Uint8Array(4),h[0]=g>>24&255,h[1]=g>>16&255,h[2]=g>>8&255,h[3]=g&255,c=
1088
+ Vf(c,h,f.bb))}return c.byteLength?{data:c,tf:b}:null}var Ly=[100,110,122,244,44,83,86,118,128,138,139,134];function Ny(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*Oy[14*(3===c?3-d:3===d?3:4)+e-1];f=Py[3*(3===c?0:2===c?1:2)+f];c=Qy[c][d];var h=Ry[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,P:k,fh:8*c*h}}return null}
1089
+ function Sy(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var Oy=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Py=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],Qy=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Ry=[0,1,1,4];function Ty(a){this.i=a;this.h=0;this.g=new Map}q=Ty.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?eb(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOrginalMimeType=function(){return this.i};
1090
+ q.transmux=function(a,b,c,d){a=M(a);for(c=Gh(a).length;c<a.length;c++){var e=c;if(e+1<a.length&&Sy(a,e)){var f=Ny(a,e),g=4;f&&f.P&&(g=f.P);e+=g;e=e===a.length||e+1<a.length&&Sy(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=Ny(a,c);if(!f)return Promise.reject(new N(2,3,3018));h||(h=f);c+f.P<=a.length&&e.push({data:a.subarray(c,c+f.P),size:f.P,duration:1152,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});c+=f.P}if(!h)return Promise.reject(new N(2,3,3018));a=9E4*h.fh/h.sampleRate*this.h;d={id:b.id,
1091
+ type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,Ka:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ja:e},stream:b};h=new Zs([d]);this.g.has(b.id)?d=this.g.get(b.id):(d=h.initSegment(),this.g.set(b.id,d));b=tt(h);this.h++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Mp3Transmuxer",Ty);Ty.prototype.transmux=Ty.prototype.transmux;Ty.prototype.getOrginalMimeType=Ty.prototype.getOrginalMimeType;
1092
+ Ty.prototype.convertCodecs=Ty.prototype.convertCodecs;Ty.prototype.isSupported=Ty.prototype.isSupported;Ty.prototype.destroy=Ty.prototype.destroy;Sb("audio/mpeg",function(){return new Ty("audio/mpeg")},Zb);function Uy(a){this.h=a;this.g=null}q=Uy.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Ic(a).split(","),c=wc("audio",b);b=wc("video",b);return!c||b||"mp3"!=Gc(c)?!1:eb(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOrginalMimeType=function(){return this.h};
1093
+ q.transmux=function(a){this.g?this.g.clearData():this.g=new Yh;a=M(a);var b=this.g.parse(a);a=b.od();if("mp3"!=a.audio||a.video)return Promise.reject(new N(2,3,3018));a=new Uint8Array([]);b=t(b.yb());for(var c=b.next();!c.done;c=b.next())if(c=c.value.data)for(var d=0;d<c.length;){var e=Ny(c,d);e?(d+e.P<=c.length&&(a=Vf(a,c.subarray(d,d+e.P))),d+=e.P):d++}return Promise.resolve(a)};L("shaka.transmuxer.MpegTsTransmuxer",Uy);Uy.prototype.transmux=Uy.prototype.transmux;
1094
+ Uy.prototype.getOrginalMimeType=Uy.prototype.getOrginalMimeType;Uy.prototype.convertCodecs=Uy.prototype.convertCodecs;Uy.prototype.isSupported=Uy.prototype.isSupported;Uy.prototype.destroy=Uy.prototype.destroy;Sb("video/mp2t",function(){return new Uy("video/mp2t")},Xb);/*
1093
1095
  @license
1094
1096
  MSS Transmuxer
1095
1097
  Copyright 2015 Dash Industry Forum
1096
1098
  SPDX-License-Identifier: BSD-3-Clause
1097
1099
  */
1098
- function Vy(a){this.h=a;(this.g=vr.get("ISOBoxer")())&&Wy(this)}
1100
+ function Vy(a){this.h=a;(this.g=ur.get("ISOBoxer")())&&Wy(this)}
1099
1101
  function Wy(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
1100
1102
  "uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
1101
1103
  "uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==Xy[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=Vy.prototype;q.destroy=function(){};
1102
- q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return gb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return gb(b)||gb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOrginalMimeType=function(){return this.h};
1104
+ q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return eb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return eb(b)||eb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOrginalMimeType=function(){return this.h};
1103
1105
  q.transmux=function(a,b,c){if(!c)return Promise.resolve(M(a));if(!b.mssPrivateData)return Promise.reject(new N(2,3,3020));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),
1104
1106
  1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=8}}f.flags&=16777214;f.flags|=131072;k.flags|=
1105
1107
  1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var w=e.fetch("saio");null!==w&&(w.offset[0]=Yy(u,"traf")+Yy(h,"senc")+16);var y=M(e.write());return Promise.resolve(y)}catch(x){return x instanceof N?Promise.reject(x):Promise.reject(new N(2,3,3022))}};function Yy(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}L("shaka.transmuxer.MssTransmuxer",Vy);Vy.prototype.transmux=Vy.prototype.transmux;Vy.prototype.getOrginalMimeType=Vy.prototype.getOrginalMimeType;
1106
- Vy.prototype.convertCodecs=Vy.prototype.convertCodecs;Vy.prototype.isSupported=Vy.prototype.isSupported;Vy.prototype.destroy=Vy.prototype.destroy;var Xy=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Tb("mss/audio/mp4",function(){return new Vy("mss/audio/mp4")},$b);Tb("mss/video/mp4",function(){return new Vy("mss/video/mp4")},$b);function Zy(a){var b=this;this.m=a;this.j=vr.get("muxjs")();this.h=this.g=null;this.l=[];this.i=!1;this.j&&(this.g=new this.j.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(c){b.l.push(Wf(c.initSegment,c.data))}),this.g.on("done",function(){var c=Wf.apply(Qf,v(b.l));b.h.resolve(c);b.i=!1}))}q=Zy.prototype;q.destroy=function(){this.g&&this.g.dispose();this.g=null};
1107
- q.isSupported=function(a,b){var c="mp2t"==a.toLowerCase().split(";")[0].split("/")[1];if(!this.j||!c)return!1;if(b)return gb($y(b,a));b=$y("audio",a);a=$y("video",a);return gb(b)||gb(a)};q.convertCodecs=function(a,b){return"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?$y(a,b):b};
1108
- function $y(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}q.getOrginalMimeType=function(){return this.m};q.transmux=function(a){this.i=!0;this.h=new Je;this.l=[];a=M(a);this.g.push(a);this.g.flush();this.i&&this.h.reject(new N(2,3,3018));return this.h};
1109
- L("shaka.transmuxer.MuxjsTransmuxer",Zy);Zy.prototype.transmux=Zy.prototype.transmux;Zy.prototype.getOrginalMimeType=Zy.prototype.getOrginalMimeType;Zy.prototype.convertCodecs=Zy.prototype.convertCodecs;Zy.prototype.isSupported=Zy.prototype.isSupported;Zy.prototype.destroy=Zy.prototype.destroy;Tb("video/mp2t",function(){return new Zy("video/mp2t")},$b);function az(a){this.j=a;this.g=0;this.h=new Map;this.i=null}q=az.prototype;q.destroy=function(){this.h.clear()};q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=Jc(a).split(","),d=xc("audio",c);c=xc("video",c);if(d&&c||d&&(d=Hc(d),!bz.includes(d))||c&&(d=Hc(c),!cz.includes(d)))return!1;if(b)return gb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return gb(b)||gb(a)};
1110
- q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Jc(b).replace("mp4a.40.34","mp3"),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOrginalMimeType=function(){return this.j};
1111
- q.transmux=function(a,b,c,d){this.i?this.i.clearData():this.i=new Zh;a=M(a);var e=1E3*c.endTime,f=this.i.parse(a);c=f.getStartTime();null!=c.audio&&(e=c.audio);null!=c.video&&(e=c.video);c=[];var g=f.od();try{a=null;switch(g.video){case "avc":a=dz(this,f,b,d)}a&&(c.push(a),a=null);var h=!(!g.video||!g.audio);switch(g.audio){case "aac":for(var k=e,l=[],m,n=t(f.Xb()),p=n.next();!p.done;p=n.next()){var r=p.value.data;if(r){f=0;m=Cy(r,f);if(!m)throw new N(2,3,3018);b.audioSamplingRate=m.sampleRate;b.channelsCount=
1112
- m.channelCount;for(b.codecs=m.Pa;f<r.length;){var u=By(r,f);if(u){var w=u.vd+u.P;f+w<=r.length&&l.push({data:r.subarray(f+u.vd,f+w),size:u.P,duration:1024,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});f+=w}else f++}}}if(!m)throw new N(2,3,3018);var y=m.sampleRate,x=Math.floor(k*y/1E3),A=b.id;h&&(A+=128);a={id:A,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:y,duration:d,Ka:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:x,Ja:l},stream:b};break;
1113
- case "ac3":var z=e,B=[],E=0;k=new Uint8Array([]);l=t(f.Xb());for(var F=l.next();!F.done;F=l.next()){var G=F.value.data;for(f=0;f<G.length;){var H=Fy(G,f);H?(b.audioSamplingRate=H.sampleRate,b.channelsCount=H.channelCount,E=H.sampleRate,k=H.ca,B.push({data:G.subarray(f,f+H.P),size:H.P,duration:1536,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}}),f+=H.P):f++}}if(0==E||0==k.byteLength)throw new N(2,3,3018);var J=Math.floor(z*E/1E3),K=b.id;h&&(K+=128);a={id:K,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,
1114
- timescale:E,duration:d,Ka:[],ca:k,na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:J,Ja:B},stream:b};break;case "ec3":k=e;l=[];F=0;z=new Uint8Array([]);B=t(f.Xb());for(E=B.next();!E.done;E=B.next()){var S=E.value.data;for(f=0;f<S.length;){var O=Iy(S,f);O?(b.audioSamplingRate=O.sampleRate,b.channelsCount=O.channelCount,F=O.sampleRate,z=O.ca,l.push({data:S.subarray(f,f+O.P),size:O.P,duration:1536,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}}),f+=O.P):f++}}if(0==F||0==z.byteLength)throw new N(2,
1115
- 3,3018);var da=Math.floor(k*F/1E3),X=b.id;h&&(X+=128);a={id:X,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:F,duration:d,Ka:[],ca:z,na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:da,Ja:l},stream:b};break;case "mp3":k=e;l=[];for(var aa,xa=t(f.Xb()),ta=xa.next();!ta.done;ta=xa.next()){var ja=ta.value.data;if(ja)for(f=0;f<ja.length;){var oa=Ny(ja,f);oa?(aa||(aa=oa),f+oa.P<=ja.length&&l.push({data:ja.subarray(f,f+oa.P),size:oa.P,duration:1152,ab:0,flags:{gb:0,Va:0,Ua:0,
1116
- Qa:0,Ra:2,hb:0}}),f+=oa.P):f++}}if(!aa)throw new N(2,3,3018);var Za=aa.sampleRate,za=Math.floor(k*Za/1E3),Da=b.id;h&&(Da+=128);a={id:Da,type:"audio",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Za,duration:d,Ka:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:za,Ja:l},stream:b}}a&&c.push(a)}catch(Va){return Promise.reject(Va)}if(!c.length)return Promise.reject(new N(2,3,3018));h=new $s(c);this.h.has(b.id)?d=this.h.get(b.id):(d=h.initSegment(),this.h.set(b.id,
1117
- d));b=tt(h);this.g++;b=Wf(d,b);return Promise.resolve(b)};
1118
- function dz(a,b,c,d){for(var e=[],f=null,g=[],h=b.mf().filter(function(p){return null!=p.pts&&null!=p.dts}),k=0;k<h.length;k++){var l=h[k],m=void 0;k+1<h.length&&(m=h[k+1]);m=b.ze(l,m);g=g.concat(m);if(m=My(m)){null==f&&null!=l.dts&&(f=l.dts);var n=void 0;n=k+1<h.length?(h[k+1].dts||0)-(l.dts||0):(l.dts||0)-(h[k-1].dts||0);e.push({data:m.data,size:m.data.byteLength,duration:n,ab:Math.round((l.pts||0)-(l.dts||0)),flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:m.tf?2:1,hb:m.tf?0:1}})}}b=Ky(g);if(!b||null==f)throw new N(2,
1119
- 3,3018);c.height=b.height;c.width=b.width;return{id:c.id,type:"video",encrypted:c.encrypted&&0<c.drmInfos.length,timescale:9E4,duration:d,Ka:[],ca:new Uint8Array([]),na:b.na,data:{mb:a.g,baseMediaDecodeTime:f,Ja:e},stream:c}}L("shaka.transmuxer.TsTransmuxer",az);az.prototype.transmux=az.prototype.transmux;az.prototype.getOrginalMimeType=az.prototype.getOrginalMimeType;az.prototype.convertCodecs=az.prototype.convertCodecs;az.prototype.isSupported=az.prototype.isSupported;az.prototype.destroy=az.prototype.destroy;
1120
- var bz=["aac","ac-3","ec-3","mp3"],cz=["avc"];Tb("video/mp2t",function(){return new az("video/mp2t")},Xb);/*
1108
+ Vy.prototype.convertCodecs=Vy.prototype.convertCodecs;Vy.prototype.isSupported=Vy.prototype.isSupported;Vy.prototype.destroy=Vy.prototype.destroy;var Xy=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Sb("mss/audio/mp4",function(){return new Vy("mss/audio/mp4")},Zb);Sb("mss/video/mp4",function(){return new Vy("mss/video/mp4")},Zb);function Zy(a){var b=this;this.m=a;this.j=ur.get("muxjs")();this.h=this.g=null;this.l=[];this.i=!1;this.j&&(this.g=new this.j.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(c){b.l.push(Vf(c.initSegment,c.data))}),this.g.on("done",function(){var c=Vf.apply(Pf,v(b.l));b.h.resolve(c);b.i=!1}))}q=Zy.prototype;q.destroy=function(){this.g&&this.g.dispose();this.g=null};
1109
+ q.isSupported=function(a,b){var c="mp2t"==a.toLowerCase().split(";")[0].split("/")[1];if(!this.j||!c)return!1;if(b)return eb($y(b,a));b=$y("audio",a);a=$y("video",a);return eb(b)||eb(a)};q.convertCodecs=function(a,b){return"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?$y(a,b):b};
1110
+ function $y(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}q.getOrginalMimeType=function(){return this.m};q.transmux=function(a){this.i=!0;this.h=new Ie;this.l=[];a=M(a);this.g.push(a);this.g.flush();this.i&&this.h.reject(new N(2,3,3018));return this.h};
1111
+ L("shaka.transmuxer.MuxjsTransmuxer",Zy);Zy.prototype.transmux=Zy.prototype.transmux;Zy.prototype.getOrginalMimeType=Zy.prototype.getOrginalMimeType;Zy.prototype.convertCodecs=Zy.prototype.convertCodecs;Zy.prototype.isSupported=Zy.prototype.isSupported;Zy.prototype.destroy=Zy.prototype.destroy;Sb("video/mp2t",function(){return new Zy("video/mp2t")},Zb);function az(a){this.j=a;this.g=0;this.h=new Map;this.i=null}q=az.prototype;q.destroy=function(){this.h.clear()};q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=Ic(a).split(","),d=wc("audio",c);c=wc("video",c);if(d&&c||d&&(d=Gc(d),!bz.includes(d))||c&&(d=Gc(c),!cz.includes(d)))return!1;if(b)return eb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return eb(b)||eb(a)};
1112
+ q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Ic(b).replace("mp4a.40.34","mp3"),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOrginalMimeType=function(){return this.j};
1113
+ q.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new Yh;a=M(a);var f=1E3*c.endTime,g=this.i.parse(a);c=g.getStartTime();null!=c.audio&&(f=c.audio);null!=c.video&&(f=c.video);c=[];var h=g.od();try{a=null;if("video"==e){switch(h.video){case "avc":a=dz(this,g,b,d)}a&&(c.push(a),a=null)}if("audio"==e){switch(h.audio){case "aac":for(var k=f,l=[],m,n=t(g.yb()),p=n.next();!p.done;p=n.next()){var r=p.value.data;if(r){g=0;m=Cy(r,g);if(!m)throw new N(2,3,3018);b.audioSamplingRate=m.sampleRate;
1114
+ for(b.channelsCount=m.channelCount;g<r.length;){var u=By(r,g);if(u){var w=u.wd+u.P;g+w<=r.length&&l.push({data:r.subarray(g+u.wd,g+w),size:u.P,duration:1024,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});g+=w}else g++}}}if(!m)throw new N(2,3,3018);var y=m.sampleRate,x=Math.floor(k*y/1E3);a={id:b.id,type:"audio",codecs:m.Pa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:y,duration:d,Ka:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:x,Ja:l},stream:b};break;case "ac3":var A=
1115
+ f,z=[],B=0;k=new Uint8Array([]);l=t(g.yb());for(var E=l.next();!E.done;E=l.next()){var F=E.value.data;for(g=0;g<F.length;){var G=Fy(F,g);G?(b.audioSamplingRate=G.sampleRate,b.channelsCount=G.channelCount,B=G.sampleRate,k=G.ca,z.push({data:F.subarray(g,g+G.P),size:G.P,duration:1536,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}}),g+=G.P):g++}}if(0==B||0==k.byteLength)throw new N(2,3,3018);var I=Math.floor(A*B/1E3);a={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:B,
1116
+ duration:d,Ka:[],ca:k,na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:I,Ja:z},stream:b};break;case "ec3":k=f;l=[];E=0;A=new Uint8Array([]);z=t(g.yb());for(B=z.next();!B.done;B=z.next()){var J=B.value.data;for(g=0;g<J.length;){var K=Iy(J,g);K?(b.audioSamplingRate=K.sampleRate,b.channelsCount=K.channelCount,E=K.sampleRate,A=K.ca,l.push({data:J.subarray(g,g+K.P),size:K.P,duration:1536,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}}),g+=K.P):g++}}if(0==E||0==A.byteLength)throw new N(2,3,3018);var S=
1117
+ Math.floor(k*E/1E3);a={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:E,duration:d,Ka:[],ca:A,na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:S,Ja:l},stream:b};break;case "mp3":k=f;l=[];for(var R,ba=t(g.yb()),W=ba.next();!W.done;W=ba.next()){var Z=W.value.data;if(Z)for(g=0;g<Z.length;){var na=Ny(Z,g);na?(R||(R=na),g+na.P<=Z.length&&l.push({data:Z.subarray(g,g+na.P),size:na.P,duration:1152,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}}),g+=na.P):g++}}if(!R)throw new N(2,
1118
+ 3,3018);var wa=R.sampleRate,oa=Math.floor(k*wa/1E3);a={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:wa,duration:d,Ka:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:oa,Ja:l},stream:b}}a&&c.push(a)}}catch(ya){return Promise.reject(ya)}if(!c.length)return Promise.reject(new N(2,3,3018));c=new Zs(c);this.h.has(b.id)?d=this.h.get(b.id):(d=c.initSegment(),this.h.set(b.id,d));b=tt(c);this.g++;b=Vf(d,b);return Promise.resolve(b)};
1119
+ function dz(a,b,c,d){for(var e=[],f=null,g=[],h=b.ud().filter(function(p){return null!=p.pts&&null!=p.dts}),k=0;k<h.length;k++){var l=h[k],m=void 0;k+1<h.length&&(m=h[k+1]);m=b.Ae(l,m);g=g.concat(m);if(m=My(m)){null==f&&null!=l.dts&&(f=l.dts);var n=void 0;n=k+1<h.length?(h[k+1].dts||0)-(l.dts||0):(l.dts||0)-(h[k-1].dts||0);e.push({data:m.data,size:m.data.byteLength,duration:n,ab:Math.round((l.pts||0)-(l.dts||0)),flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:m.tf?2:1,hb:m.tf?0:1}})}}b=Ky(g);if(!b||null==f)throw new N(2,
1120
+ 3,3018);c.height=b.height;c.width=b.width;return{id:c.id,type:"video",codecs:"avc1",encrypted:c.encrypted&&0<c.drmInfos.length,timescale:9E4,duration:d,Ka:[],ca:new Uint8Array([]),na:b.na,data:{mb:a.g,baseMediaDecodeTime:f,Ja:e},stream:c}}L("shaka.transmuxer.TsTransmuxer",az);az.prototype.transmux=az.prototype.transmux;az.prototype.getOrginalMimeType=az.prototype.getOrginalMimeType;az.prototype.convertCodecs=az.prototype.convertCodecs;az.prototype.isSupported=az.prototype.isSupported;
1121
+ az.prototype.destroy=az.prototype.destroy;var bz=["aac","ac-3","ec-3","mp3"],cz=["avc"];Sb("video/mp2t",function(){return new az("video/mp2t")},Wb);/*
1121
1122
  @license
1122
1123
  EME Encryption Scheme Polyfill
1123
1124
  Copyright 2019 Google LLC
1124
1125
  SPDX-License-Identifier: Apache-2.0
1125
1126
  */
1126
1127
  function ez(){}var fz;function gz(){fz?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(fz=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=hz):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
1127
- function hz(a,b){var c=this,d;return I(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,fz.call(c,a,b),2);d=e.h;if(iz(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=fz,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=jz;return e.return(jz.call(c,
1128
+ function hz(a,b){var c=this,d;return H(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),C(e,fz.call(c,a,b),2);d=e.h;if(iz(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=fz,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=jz;return e.return(jz.call(c,
1128
1129
  a,b))})}
1129
- function jz(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return I(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=kz(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=lz(h.videoCapabilities,d),l=lz(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 n=Error("Unsupported keySystem or supportedConfigurations."),
1130
+ function jz(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return H(function(r){if(1==r.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=kz(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=lz(h.videoCapabilities,d),l=lz(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 n=Error("Unsupported keySystem or supportedConfigurations."),
1130
1131
  n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return C(r,fz.call(c,a,e),2)}p=r.h;return r.return(new mz(p,d))})}function lz(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}L("EmeEncryptionSchemePolyfill",ez);ez.install=gz;function nz(){}var oz;
1131
1132
  function pz(){oz?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(oz=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=qz):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
1132
- function qz(a){var b=this,c,d,e;return I(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,oz.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&iz(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=oz,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1133
+ function qz(a){var b=this,c,d,e;return H(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),C(f,oz.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&iz(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=oz,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
1133
1134
  navigator.mediaCapabilities.decodingInfo=rz;if(d){f.B(3);break}e=c;return C(f,sz(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(rz.call(b,a))}})}
1134
- function rz(a){var b=this,c,d,e,f,g,h,k,l;return I(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=kz(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,oz.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1135
+ function rz(a){var b=this,c,d,e,f,g,h,k,l;return H(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=kz(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):C(m,oz.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
1135
1136
  new mz(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return C(m,sz(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1136
- function sz(a){var b,c;return I(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 C(d,
1137
+ function sz(a){var b,c;return H(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 C(d,
1137
1138
  navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}L("McEncryptionSchemePolyfill",nz);nz.install=pz;function mz(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
1138
1139
  mz.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};mz.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
1139
1140
  function kz(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 iz(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}