shaka-player 4.4.1 → 4.4.2

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 (56) hide show
  1. package/.github/workflows/deflake.yaml +8 -5
  2. package/.github/workflows/release-please.yaml +47 -7
  3. package/.github/workflows/shaka-bot-commands/command-test.sh +1 -1
  4. package/CHANGELOG.md +20 -0
  5. package/CONTRIBUTORS +1 -0
  6. package/demo/custom.js +5 -5
  7. package/dist/demo.compiled.debug.js +3 -3
  8. package/dist/demo.compiled.debug.map +1 -1
  9. package/dist/demo.compiled.js +3 -3
  10. package/dist/demo.compiled.map +1 -1
  11. package/dist/deps.js +2 -2
  12. package/dist/locales.js +31 -31
  13. package/dist/shaka-player.compiled.d.ts +311 -295
  14. package/dist/shaka-player.compiled.debug.d.ts +311 -295
  15. package/dist/shaka-player.compiled.debug.externs.js +37 -0
  16. package/dist/shaka-player.compiled.debug.js +145 -135
  17. package/dist/shaka-player.compiled.debug.map +3 -3
  18. package/dist/shaka-player.compiled.externs.js +37 -0
  19. package/dist/shaka-player.compiled.js +887 -884
  20. package/dist/shaka-player.compiled.map +4 -4
  21. package/dist/shaka-player.ui.d.ts +355 -339
  22. package/dist/shaka-player.ui.debug.d.ts +355 -339
  23. package/dist/shaka-player.ui.debug.externs.js +37 -0
  24. package/dist/shaka-player.ui.debug.js +161 -151
  25. package/dist/shaka-player.ui.debug.map +3 -3
  26. package/dist/shaka-player.ui.externs.js +37 -0
  27. package/dist/shaka-player.ui.js +968 -967
  28. package/dist/shaka-player.ui.map +4 -4
  29. package/docs/tutorials/fairplay.md +8 -0
  30. package/docs/tutorials/faq.md +1 -1
  31. package/externs/shaka/text.js +7 -0
  32. package/lib/dash/segment_template.js +3 -0
  33. package/lib/hls/hls_parser.js +8 -4
  34. package/lib/media/media_source_engine.js +1 -1
  35. package/lib/player.js +8 -57
  36. package/lib/text/lrc_text_parser.js +8 -0
  37. package/lib/text/mp4_ttml_parser.js +8 -0
  38. package/lib/text/mp4_vtt_parser.js +8 -0
  39. package/lib/text/sbv_text_parser.js +8 -0
  40. package/lib/text/srt_text_parser.js +8 -0
  41. package/lib/text/ssa_text_parser.js +8 -0
  42. package/lib/text/text_engine.js +8 -1
  43. package/lib/text/ttml_text_parser.js +10 -1
  44. package/lib/text/ui_text_displayer.js +49 -3
  45. package/lib/text/vtt_text_parser.js +21 -5
  46. package/lib/transmuxer/ts_transmuxer.js +44 -43
  47. package/lib/util/error.js +16 -10
  48. package/lib/util/player_configuration.js +2 -2
  49. package/lib/util/stream_utils.js +13 -11
  50. package/lib/util/ts_parser.js +70 -13
  51. package/package.json +2 -2
  52. package/test/text/text_engine_unit.js +4 -2
  53. package/test/text/ttml_text_parser_unit.js +3 -4
  54. package/test/text/vtt_text_parser_unit.js +17 -2
  55. package/test/text/web_vtt_layout_integration.js +0 -1
  56. package/ui/language_utils.js +0 -15
@@ -10,74 +10,74 @@
10
10
  Copyright 2016 Google LLC
11
11
  SPDX-License-Identifier: Apache-2.0
12
12
  */
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};
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
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
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}
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(ba(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: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 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 ma={a:!0},na={};try{na.__proto__=ma;ka=na.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 oa=ja;
19
+ function pa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.ii=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 va(a,b){a.i={jf: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 wa(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function xa(a){a.m=0;a.j=2}function ya(a,b,c){a.g=b;a.m=c||0}function Aa(a,b){a.m=b||0;b=a.i.jf;a.i=null;return b}function Ba(a){a.u=[a.i];a.m=0;a.j=0}
21
+ function Ca(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 Ea(a){this.g=new ra;this.h=a}function Fa(a,b){sa(a.g);var c=a.g.l;if(c)return Ga(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 Ga(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),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,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.jf;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=Ga(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=Ga(a,a.g.l["throw"],b,a.g.s):(va(a.g,b),b=Ha(a));return b};this.return=function(b){return Fa(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 Ea(a)))}function La(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
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
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
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
- 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
- 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 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,
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(x){m(x)}}: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
+ 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(x){p[u]=x;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
+ 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(!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
+ 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&&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,
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
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 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}});/*
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}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Na(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 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
+ fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Oa(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Na(this,b,c).v}});fa("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}fa("Array.prototype.keys",function(a){return a?a:function(){return Pa(this,function(b){return b})}});var Ra="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
+ fa("Object.assign",function(a){return a||Ra});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 Pa(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 Pa(this,function(b,c){return[b,c]})}});
48
+ fa("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}});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)Ma(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)Ma(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 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};/*
55
+ var Sa=this||self;function L(a,b){a=a.split(".");var c=Sa;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 Ua(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ua.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 Va(a){return a.h/(1-Math.pow(a.g,a.i))};function Wa(){this.h=new Ua(2);this.j=new Ua(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(Va(this.h),Va(this.j))};function Xa(){}function Ya(){}function Za(){}function $a(a){var b=La.apply(1,arguments);ab.has(a)||(ab.add(a),Za.apply(Xa,v(b)))}function bb(){}function cb(){}function db(){}function eb(){}var ab=new Set;window.console&&(Za=function(){return console.warn.apply(console,v(La.apply(0,arguments)))},Ya=function(){console.error.apply(console,v(La.apply(0,arguments)))});function fb(a){if(gb.has(a))return gb.get(a);var b=MediaSource.isTypeSupported(a);gb.set(a,b);return b}var gb=new Map;function hb(){}hb.prototype.extract=function(){};hb.prototype.decode=function(){return[]};hb.prototype.clear=function(){};function kb(){}kb.prototype.init=function(){};kb.prototype.parse=function(){return[]};function lb(){}function mb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(nb(a)==nb(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 nb(a){return a instanceof ArrayBuffer?a:a.buffer}function ob(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 pb(a,void 0===b?0:b,c,Uint8Array)}function qb(a,b,c){c=void 0===c?Infinity:c;return pb(a,void 0===b?0:b,c,DataView)}function pb(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(nb(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",lb);lb.toDataView=qb;lb.toUint8=M;lb.toArrayBuffer=ob;lb.equal=mb;function rb(){}rb.prototype.init=function(){};rb.prototype.j=function(){};rb.prototype.i=function(){};L("shaka.media.IClosedCaptionParser",rb);function sb(a){this.h=new kb;if(a=ub[a.toLowerCase()])this.h=a();this.g=new hb;if(a=vb)this.g=a()}sb.prototype.init=function(a){this.h.init(a)};sb.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()};sb.prototype.i=function(){this.g.clear()};
57
+ L("shaka.media.ClosedCaptionParser",sb);sb.findDecoder=function(){return vb};sb.unregisterDecoder=function(){vb=null};sb.registerDecoder=function(a){vb=a};sb.findParser=function(a){return ub[a]};sb.unregisterParser=function(a){delete ub[a]};sb.registerParser=function(a,b){ub[a]=b};var ub={},vb=null;function wb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function xb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function yb(a,b,c){c||(c=wb);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 zb(a,b,c){c||(c=wb);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 Ab(a,b,c){this.startTime=a;this.endTime=b;this.U=c;this.region=new Bb;this.position=null;this.H=Cb;this.size=0;this.textAlign=Db;this.direction=Eb;this.writingMode=Fb;this.G=Gb;this.j=null;this.aa="";this.s=Hb;this.i=Ib;this.A=this.V=this.N=this.backgroundColor=this.l="";this.u=Jb;this.o=Kb;this.Z=this.W=this.m="";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={cg:32,rows:15}}
59
+ Ab.prototype.clone=function(){var a=new Ab(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 Lb(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(!zb(a.g,b.g,Lb))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(!zb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",Ab);Ab.equal=Lb;Ab.prototype.clone=Ab.prototype.clone;var Cb="auto";
61
+ Ab.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Cb};var Db="center",Mb={LEFT:"left",RIGHT:"right",CENTER:Db,START:"start",END:"end"};Ab.textAlign=Mb;var Ib="after",Nb={BEFORE:"before",CENTER:"center",AFTER:Ib};Ab.displayAlign=Nb;var Eb="ltr";Ab.direction={HORIZONTAL_LEFT_TO_RIGHT:Eb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Fb="horizontal-tb";Ab.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Fb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Gb=0;
62
+ Ab.lineInterpretation={LINE_NUMBER:Gb,PERCENTAGE:1};var Hb="start",Ob={CENTER:"center",START:Hb,END:"end"};Ab.lineAlign=Ob;var Pb={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Ab.defaultTextColor=Pb;var Qb={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};Ab.defaultTextBackgroundColor=Qb;var Jb=400;Ab.fontWeight={NORMAL:Jb,BOLD:700};
63
+ var Kb="normal",Rb={NORMAL:Kb,ITALIC:"italic",OBLIQUE:"oblique"};Ab.fontStyle=Rb;Ab.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function Bb(){this.id="";this.o=this.m=this.h=this.g=0;this.height=this.width=100;this.j=this.l=this.i=Sb;this.s=Tb}L("shaka.text.CueRegion",Bb);var Sb=1;Bb.units={PX:0,PERCENTAGE:Sb,LINES:2};var Tb="";Bb.scrollMode={NONE:Tb,UP:"up"};function Ub(){}Ub.prototype.destroy=function(){};function Vb(a,b,c){Wb[a.toLowerCase().split(";")[0]+"-"+c]={priority:c,Ld:b}}function Xb(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([Yb,Zb,$b,ac]),e=d.next();!e.done;e=d.next())if(e=Wb[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",Ub);Ub.findTransmuxer=Xb;Ub.unregisterTransmuxer=function(a,b){delete Wb[a.toLowerCase().split(";")[0]+"-"+b]};
64
+ Ub.registerTransmuxer=Vb;Ub.prototype.destroy=Ub.prototype.destroy;var Wb={},ac=1,$b=2,Zb=3,Yb=4;Ub.PluginPriority={FALLBACK:ac,PREFERRED_SECONDARY:$b,PREFERRED:Zb,APPLICATION:Yb};/*
65
65
  @license
66
66
  Copyright 2008 The Closure Library Authors
67
67
  SPDX-License-Identifier: Apache-2.0
68
68
  */
69
- var $b=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
69
+ var bc=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 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};
74
+ function cc(a){var b;a instanceof cc?(dc(this,a.Na),this.Mb=a.Mb,this.Sa=a.Sa,ec(this,a.cc),this.ua=a.ua,fc(this,a.g.clone()),this.yb=a.yb):a&&(b=String(a).match(bc))?(dc(this,b[1]||"",!0),this.Mb=gc(b[2]||""),this.Sa=gc(b[3]||"",!0),ec(this,b[4]),this.ua=gc(b[5]||"",!0),fc(this,b[6]||"",!0),this.yb=gc(b[7]||"")):this.g=new hc(null)}q=cc.prototype;q.Na="";q.Mb="";q.Sa="";q.cc=null;q.ua="";q.yb="";
75
+ q.toString=function(){var a=[],b=this.Na;b&&a.push(ic(b,jc,!0),":");if(b=this.Sa){a.push("//");var c=this.Mb;c&&a.push(ic(c,jc,!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.ua)this.Sa&&"/"!=b.charAt(0)&&a.push("/"),a.push(ic(b,"/"==b.charAt(0)?kc:lc,!0));(b=this.g.toString())&&a.push("?",b);(b=this.yb)&&a.push("#",ic(b,mc));return a.join("")};
76
+ q.resolve=function(a){var b=this.clone();"data"===b.Na&&(b=new cc);var c=!!a.Na;c?dc(b,a.Na):c=!!a.Mb;c?b.Mb=a.Mb:c=!!a.Sa;c?b.Sa=a.Sa:c=null!=a.cc;var d=a.ua;if(c)ec(b,a.cc);else if(c=!!a.ua){if("/"!=d.charAt(0))if(this.Sa&&!this.ua)d="/"+d;else{var e=b.ua.lastIndexOf("/");-1!=e&&(d=b.ua.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
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.ua=d:c=""!==a.g.toString();c?fc(b,a.g.clone()):c=!!a.yb;c&&(b.yb=a.yb);return b};q.clone=function(){return new cc(this)};function dc(a,b,c){a.Na=c?gc(b,!0):b;a.Na&&(a.Na=a.Na.replace(/:$/,""))}function ec(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 fc(a,b,c){b instanceof hc?a.g=b:(c||(b=ic(b,nc)),a.g=new hc(b))}
78
+ function gc(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function ic(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 jc=/[#\/\?@]/g,lc=/[#\?:]/g,kc=/[#\?]/g,nc=/[#\?@]/g,mc=/#/g;function hc(a){this.g=a||null}
79
+ function pc(a){if(!a.qa&&(a.qa={},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=hc.prototype;q.qa=null;q.Dc=null;q.add=function(a,b){pc(this);this.g=null;var c=this.qa.hasOwnProperty(a)?this.qa[a]:null;c||(this.qa[a]=c=[]);c.push(b);this.Dc++;return this};
80
+ q.set=function(a,b){pc(this);this.g=null;this.qa.hasOwnProperty(a)?this.qa[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.qa)return"";var a=[],b;for(b in this.qa)for(var c=encodeURIComponent(b),d=this.qa[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 hc;a.g=this.g;if(this.qa){var b={},c;for(c in this.qa)b[c]=this.qa[c].concat();a.qa=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;this.message="Shaka Error "+this.code;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};
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,12 +86,12 @@ 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 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}
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 cc(d)});return a.map(function(d){return new cc(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={wa:"video",qb:"audio",da:zc,wc:"image",sh:"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&&!Dc.includes(a)&&(c+='; codecs="'+b+'"');return c}function Ec(a,b){b&&(a+='; codecs="'+b+'"');return a}function Fc(a,b,c){var d=Cc(a,b);b=Ec(a,b);Xb(b)?(a=Xb(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
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()};
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",Bc);Bc.getFullTypeWithAllCodecs=Ec;
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 Dc=["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?!!vb:!1}Jc.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
95
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
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
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)}
@@ -105,7 +105,7 @@ var Wc=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"]
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 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;
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.Da=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.Da;
109
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
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
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}
@@ -115,23 +115,23 @@ function wd(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==yd
115
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
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
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=
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=wc("video",g);f=Ld(f);g=wc("audio",g);g=Md(g);var h=Fc(e.mimeType,g,"audio");if(!fb(h))return!1;f=[f,g].join()}g=Fc(e.mimeType,f,"video");if(!fb(g))return!1;e.codecs=f}if(f=d.audio){g=Md(f.codecs);h=Fc(f.mimeType,g,"audio");if(!fb(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 cb(Nd(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||cb(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);wa(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:ya(f,0);break;case 2:Aa(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,x,y,w,A,z,B;return H(function(G){switch(G.g){case 1:if(e=a.some(function(E){return E.decodingInfos.length}))return G.return();f={};g=t(d);h=g.next();case 2:if(h.done){G.B(4);break}f.Td=h.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){G.B(7);break}n=m.value;p=Rd(n,b,c).filter(function(E){return function(F){return(F.keySystemConfiguration&&F.keySystemConfiguration.keySystem)===E.Td}}(f));r=t(p);u=r.next();case 8:if(u.done){G.B(10);break}x=u.value;return C(G,
122
+ Pd(n,x),9);case 9:u=r.next();G.B(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();G.B(5);break;case 7:if(k)return G.return();f={Td:f.Td};h=g.next();G.B(2);break;case 4:y=t(a),m=y.next();case 12:if(m.done){G.B(0);break}w=m.value;A=Rd(w,b,c).filter(function(E){E=E.keySystemConfiguration&&E.keySystemConfiguration.keySystem;return!E||!d.includes(E)});z=t(A);u=z.next();case 15:if(u.done){m=y.next();G.B(12);break}B=u.value;return C(G,Pd(w,B),16);case 16:u=z.next(),G.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=wc("video",g);f=Ld(f);g=wc("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
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
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)}})}
128
+ function Id(a){a.textStreams=a.textStreams.filter(function(b){b=Cc(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
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
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 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,
134
+ function Xd(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,
135
135
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null,accessibilityPurpose:a.accessibilityPurpose,originalLanguage:a.originalLanguage}}
136
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
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}
@@ -139,17 +139,17 @@ function ae(a){var b=be(a);b.active="disabled"!=a.mode;b.type="text";b.originalT
139
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
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
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?
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(rc,[]);return a.length?
143
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
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();
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 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 cd(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();
146
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
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
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
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
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};
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){Za([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){Ya([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
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
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
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)}):[]}
@@ -159,97 +159,97 @@ function Oe(a){return new Je(Promise.all(a.map(function(b){return b.promise})),f
159
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
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
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()};
162
+ var Re={uh:"abrstatuschanged",vh:"adaptation",wh:"buffering",xh:"downloadfailed",yh:"downloadheadersreceived",zh:"drmsessionupdate",Bh:"emsg",Nh:"prft",Error:"error",Ch:"expirationupdated",Dh:"gapjumped",Gh:"loaded",Hh:"loading",Jh:"manifestparsed",Kh:"mediaqualitychanged",Metadata:"metadata",Lh:"onstatechange",Mh:"onstateidle",Oh:"ratechange",Qh:"segmentappended",Rh:"sessiondata",Sh:"stalldetected",Th:"streaming",Uh:"textchanged",Vh:"texttrackvisibility",Wh:"timelineregionadded",Xh:"timelineregionenter",
163
+ Yh:"timelineregionexit",Zh:"trackschanged",ai:"unloading",ci:"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(){xb(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}pa(Xe,Se);q=Xe.prototype;q.Ne=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,Xg:void 0===d?!1:d}}q.Yg=function(a){this.g.add(a)};q.oh=function(a){this.g.delete(a)};q.$f=function(){this.g.clear()};q.Zg=function(a){this.h.add(a)};q.ph=function(a){this.h.delete(a)};q.ag=function(){this.h.clear()};
165
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
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)}
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.Jg||!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=ob(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 cc(c.uris[e]),k=h.Na,l=!1;k||(k=location.protocol,k=k.slice(0,-1),dc(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.Xg,p=null,r=null,u=!1,x=!1,y;return Ne(He(d)).fa(function(){if(a.i)return Le();y=Date.now();var w=m(c.uris[e],c,b,function(B,G,E){p&&p.stop();r&&r.S(z/1E3);a.l&&b==gf&&(a.l(B,G),l=!0,g.g=E)},function(B){a.j&&a.j(B,c,b);x=!0});
170
+ if(!n)return w;var A=c.retryParameters.connectionTimeout;A&&(p=new cd(function(){u=!0;w.abort()}),p.S(A/1E3));var z=c.retryParameters.stallTimeout;z&&(r=new cd(function(){u=!0;w.abort()}));return w}).fa(function(w){p&&p.stop();r&&r.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-y);var A={response:w,Jg:l};!x&&a.j&&a.j(w.headers,c,b);return A},function(w){p&&p.stop();r&&r.stop();if(a.s){var A=null,z=0;w instanceof N&&(A=w,1001==w.code&&(z=w.data[1]));a.s(c,A,z,u)}if(a.i)return Le();u&&(w=new N(1,1,1003,
171
+ c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return A=(new Map).set("error",w),A=new O("retry",A),a.dispatchEvent(A),e=(e+1)%c.uris.length,ef(a,b,c,d,e,w,g)}throw w;})}
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=ob(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.ag;Xe.prototype.unregisterResponseFilter=Xe.prototype.ph;Xe.prototype.registerResponseFilter=Xe.prototype.Zg;Xe.prototype.clearAllRequestFilters=Xe.prototype.$f;Xe.prototype.unregisterRequestFilter=Xe.prototype.oh;Xe.prototype.registerRequestFilter=Xe.prototype.Yg;Xe.unregisterScheme=function(a){delete $e[a]};Xe.registerScheme=Ye;Xe.prototype.setForceHTTPS=Xe.prototype.Ne;function bf(){this.g=0}
174
+ Xe.NumBytesRemainingClass=bf;function cf(a,b,c){Je.call(this,a,b);this.h=c}pa(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.ub();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.ub=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.ub;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
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
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+
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")&&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+
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 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)}
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=qb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return yf.value()(d)}
181
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();}};
182
+ function Af(a){if(window.TextEncoder&&!md()){var b=new TextEncoder;return ob(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 ob(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=qb(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.ra=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Ef();}};q.Ja=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
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)};
185
+ q.skip=function(a){if(this.g+a>this.h.byteLength)throw Ef();this.g+=a};q.fh=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.fh;
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.Ja;Cf.prototype.readUint8=Cf.prototype.ra;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
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
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
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
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})}
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=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",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=qb(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
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
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
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
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
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};
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)})).Da(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}wa(b,4);return C(b,a.m.setMediaKeys(null),6);case 6:ya(b,5);break;case 4:Aa(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
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
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)})}
202
+ function zg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,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);x=t(k);for(r=x.next();!r.done;r=
203
+ x.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)}w=g||Object.keys(a.h.servers).length;if(!w)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 wa(c,4),a.F=a.m.setMediaKeys(a.s),C(c,a.F,6);case 6:ya(c,5);break;case 4:b=Aa(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
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
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)})}
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);wa(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);ya(g,4);break;case 3:throw e=Aa(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:ya(g,0);break;case 6:throw f=Aa(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
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)}
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(mb(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
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);}})}
212
+ function Cg(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,y,w;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);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 G=[],E=[],F=[],I=[],J=new Set;Wg(B,G,F,E,I,J);var K=a.M?"persistent-license":"temporary";z={keySystem:z,licenseServerUri:G[0],distinctiveIdentifierRequired:B[0].distinctiveIdentifierRequired,persistentStateRequired:B[0].persistentStateRequired,sessionType:B[0].sessionType||K,audioRobustness:B[0].audioRobustness||"",videoRobustness:B[0].videoRobustness||"",serverCertificate:F[0],serverCertificateUri:E[0],initData:I,keyIds:J};B=t(B);for(G=B.next();!G.done;G=
214
+ B.next())G=G.value,G.distinctiveIdentifierRequired&&(z.distinctiveIdentifierRequired=G.distinctiveIdentifierRequired),G.persistentStateRequired&&(z.persistentStateRequired=G.persistentStateRequired);B=z}else B=f.keySystem,z=b.get(f.keySystem),G=[],E=[],F=[],I=[],J=new Set,Wg(z.drmInfos,G,F,E,I,J),B={keySystem:B,licenseServerUri:G[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:F[0],serverCertificateUri:E[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}wa(A,8);return C(A,a.s.getStatusForPolicy({minHdcpVersion:a.h.minHdcpVersion}),10);case 10:x=A.h;if("usable"!=x)throw new N(2,
216
+ 6,6018);jf(a.j);ya(A,7,4);break;case 8:y=Aa(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);ya(A,0);break;case 4:w=Aa(A);jf(a.j,w);a.g=null;a.G.clear();if(w instanceof N)throw w;throw new N(2,6,6002,w.message);}})}
217
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
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)}})}
219
+ function Vg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x,y;return H(function(w){switch(w.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){w.B(4);break}k=h.value;if(!b.has(k)){w.B(3);break}l=b.get(k);wa(w,6);return C(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
220
+ w.h,w.return(c);case 6:Aa(w);case 7:jf(a.j);case 3:h=g.next();w.B(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){w.B(11);break}p=n.value;r=t(b.keys());h=r.next();case 12:if(h.done){n=m.next();w.B(9);break}u=h.value;x=b.get(u);y=x.drmInfos.some(function(A){return!!A.licenseServerUri});if(y!=p){w.B(13);break}wa(w,15);return C(w,navigator.requestMediaKeySystemAccess(u,[x]),17);case 17:return c=w.h,w.return(c);case 15:Aa(w);case 16:jf(a.j);case 13:h=r.next();w.B(12);break;case 11:return w.return(c)}})}
221
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
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);
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,ye: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,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=Aa(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,ye: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 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(){}));
227
+ function Kg(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u;H(function(x){switch(x.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 w=t(y.getElementsByTagName("HttpHeader")),A=w.next();!A.done;A=w.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();wa(x,2);l=a.C.Ib.request(2,g);return C(x,l.promise,4);case 4:k=x.h;ya(x,3);break;case 2:return m=
229
+ Aa(x),n=new N(2,6,6007,m),a.o(n),d&&d.Xa&&d.Xa.reject(n),x.return();case 3:if(a.j.g)return x.return();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Rf(k.data);wa(x,5);return C(x,c.update(k.data),7);case 7:ya(x,6);break;case 5:return p=Aa(x),r=new N(2,6,6008,p.message),a.o(r),d&&d.Xa&&d.Xa.reject(r),x.return();case 6:if(a.j.g)return x.return();u=new O("drmsessionupdate");a.C.onEvent(u);d&&(d.Xa&&d.Xa.resolve(),Yg(a,d));D(x)}})}
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=qb(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
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
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))):
233
+ p;return H(function(r){switch(r.g){case 1:wa(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:ya(r,0);break;case 2:Aa(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)}),wa(c,2),C(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ya(c,0);Aa(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 wa(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 ya(g,0);Aa(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={Ma:e.Ma},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Ma=[];e.Ma=e.Ma.concat(d.initData||[]);e.Ma=e.Ma.concat(g.initData||[]);e.Ma=e.Ma.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Ma.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 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}
238
+ initData:e.Ma,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.ye,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.C.onExpirationUpdated(c.sessionId,e),b.ye=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
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)}}
240
+ function Wg(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={sa:g.sa},h=a.next()){g.sa=h.value;b.includes(g.sa.licenseServerUri)||b.push(g.sa.licenseServerUri);d.includes(g.sa.serverCertificateUri)||d.push(g.sa.serverCertificateUri);g.sa.serverCertificate&&(c.some(function(m){return function(n){return mb(n,m.sa.serverCertificate)}}(g))||c.push(g.sa.serverCertificate));if(g.sa.initData){h={};for(var k=t(g.sa.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&&mb(n.initData,p.initData)}}(h))||e.push(h.bd)}if(g.sa.keyIds)for(h=t(g.sa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
242
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}
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 ob(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 cc(a)).ua.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={bi:"visually impaired",Eh:"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 eb(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=qb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=qb(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=qb(e,b.start);b=Lf(b);a=k.getUint32(b);
247
+ k.setUint32(b,a+1);return e}function qh(a,b,c){a=qb(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.xa=a;this.Ca=b;this.ka=c;this.se=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.Ca};rh.prototype.Hc=function(){return this.ka};function sh(a,b){return a&&b?a.Lc()==b.Lc()&&a.Hc()==b.Hc()&&zb(a.xa(),b.xa())&&mb(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.Ca=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.xa=function(){return this.F()};q.getStartTime=function(){return this.startTime};
249
+ q.mg=function(){return this.endTime};q.Lc=function(){return this.Ca};q.Hc=function(){return this.ka};q.Eg=function(){return this.tilesLayout};q.Dg=function(){return this.C};q.Db=function(){return this.status};q.Qg=function(){this.status=uh};q.re=function(){this.m=!0};q.Og=function(){return this.m};q.vf=function(){this.s=!1};q.Ng=function(){return this.s};q.uf=function(){this.o=!0};q.Kg=function(){return this.o};q.Jf=function(a){this.A=a};q.Bg=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.Qe=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",P);P.prototype.syncAgainst=P.prototype.Qe;P.prototype.offset=P.prototype.offset;P.prototype.getThumbnailSprite=P.prototype.Bg;P.prototype.setThumbnailSprite=P.prototype.Jf;
251
+ P.prototype.hasByterangeOptimization=P.prototype.Kg;P.prototype.markAsByterangeOptimization=P.prototype.uf;P.prototype.isIndependent=P.prototype.Ng;P.prototype.markAsNonIndependent=P.prototype.vf;P.prototype.isPreload=P.prototype.Og;P.prototype.markAsPreload=P.prototype.re;P.prototype.markAsUnavailable=P.prototype.Qg;P.prototype.getStatus=P.prototype.Db;P.prototype.getTileDuration=P.prototype.Dg;P.prototype.getTilesLayout=P.prototype.Eg;P.prototype.getEndByte=P.prototype.Hc;
252
+ P.prototype.getStartByte=P.prototype.Lc;P.prototype.getEndTime=P.prototype.mg;P.prototype.getStartTime=P.prototype.getStartTime;P.prototype.getUris=P.prototype.xa;var th=0,uh=1;P.Status={th:th,$h:uh,Ih: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
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
@@ -258,11 +258,11 @@ function zh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))retur
258
258
  */
259
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
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)}};/*
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=ob(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=ob(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,gf:c,fg:d,di: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.Ja();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={Je:null,sampleSize:null,Md:null};c&256&&(h.Je=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{hi:d,Bf:e,eg: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.Ja()+a.Ja()/16;a=a.Ja()+a.Ja()/16;return{trackId:c,width:b,height:a}}function Mh(a){var b="mp4a";a.skip(11);b+="."+this.g(a.ra());b+="."+this.g(a.ra()>>>2&63).replace(/^0/,"");return{pa:b}}function Nh(a,b){a.skip(87);return{pa:b+"."+this.g(a.ra())+this.g(a.ra())+this.g(a.ra())}}function Oh(a){a=a.K();return{pa:Jf(a)}};/*
266
266
 
267
267
  Copyright Brightcove, Inc.
268
268
 
@@ -280,845 +280,848 @@ function Lh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));var c=a.K();1=
280
280
  */
281
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
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):
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,he:-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.he&&(g.he=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.he);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
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;
287
+ function $h(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),Be:a[4]<<8|a[5],pts:null,dts:null};if(b.Be&&b.Be>a.byteLength-6)return null;var 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));c=a[8]+9;if(a.byteLength<=c)return null;b.data=a.subarray(c);return b}
288
+ q.Ce=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);if(0==a)break;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),
289
+ bb:d.subarray(h,e),type:k,time:c},b&&0==a.Be&&(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.zb=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};
290
+ q.ud=function(){for(var a=[],b=t(this.i),c=b.next();!c.done;c=b.next()){c=c.value;var d=$h(c);d&&null!=d.pts&&null!=d.dts?a.push(d):a.length&&(c=d?d.data:c)&&(d=a.pop(),d.data=Vf(d.data,c),a.push(d))}return a};
291
+ q.getStartTime=function(){for(var a=null,b=t(this.zb()),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}};
292
+ q.ge=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.Ce(d,e)))}return a};q.Hg=function(){ne("TsParser","Please use getVideoInfo function instead.");var a=this.fe();return{height:a.height,width:a.width}};
293
+ q.fe=function(){var a={height:null,width:null,pa:null},b=this.ge();if(!b.length)return a;b=b.find(function(p){return 7==p.type});if(!b)return a;b=new Ph(b.data);var c=Sh(b,8),d=Sh(b,8),e=Sh(b,8);Uh(b);if(ai.includes(c)){var f=Vh(b);3===f&&Rh(b,1);Uh(b);Uh(b);Rh(b,1);if(1===Sh(b,1)){f=3!==f?8:12;for(var g=0;g<f;g++)1===Sh(b,1)&&(6>g?Wh(b,16):Wh(b,64))}}Uh(b);f=Vh(b);if(0===f)Vh(b);else if(1===f)for(Rh(b,1),Uh(b),Uh(b),f=Vh(b),g=0;g<f;g++)Uh(b);Uh(b);Rh(b,1);f=Vh(b);g=Vh(b);var h=Sh(b,1);0===h&&Rh(b,
294
+ 1);Rh(b,1);var k=0,l=0,m=0,n=0;1===Sh(b,1)&&(k=Vh(b),l=Vh(b),m=Vh(b),n=Vh(b));a.height=String((2-h)*(g+1)*16-2*m-2*n);a.width=String(16*(f+1)-2*k-2*l);a.pa="avc1."+("0"+c.toString(16).toUpperCase()).slice(-2)+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2);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);
295
+ Yh.syncOffset=Zh;Yh.probe=bi;Yh.prototype.getVideoInfo=Yh.prototype.fe;Yh.prototype.getVideoResolution=Yh.prototype.Hg;Yh.prototype.getVideoNalus=Yh.prototype.ge;Yh.prototype.getCodecs=Yh.prototype.od;Yh.prototype.getStartTime=Yh.prototype.getStartTime;Yh.prototype.getVideoData=Yh.prototype.ud;Yh.prototype.getAudioData=Yh.prototype.zb;Yh.prototype.getMetadata=Yh.prototype.getMetadata;Yh.prototype.parseAvcNalus=Yh.prototype.Ce;Yh.prototype.parse=Yh.prototype.parse;Yh.prototype.clearData=Yh.prototype.clearData;
296
+ 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&&Za("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Za("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Za(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
297
+ (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.X={};this.g=null;this.N=!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.V="";this.i=ii(this,this.G);this.o=!1;this.I=new hf(function(){return ji(e)});this.s=!1;this.M="UNKNOWN";this.W=this.Y=!1;this.aa=new Ie}function ii(a,b){var c=new MediaSource;a.A.la(c,"sourceopen",function(){URL.revokeObjectURL(a.V);b.resolve()});a.V=ki(c);a.l.src=a.V;return c}q=hi.prototype;
296
298
  q.destroy=function(){return this.I.destroy()};
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)}
299
+ 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(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.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;
300
+ 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.M=c;e.Y=d;e.W=!e.s&&"HLS"==e.M&&!e.Y;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)})};
301
+ function li(a,b,c){var d=Cc(c.mimeType,c.codecs);if(b==zc)mi(a,d,a.s,c.external);else{var e=a.C.forceTransmux;if(!fb(d)||!a.s&&Dc.includes(d))e=!0;var f=Ec(c.mimeType,c.codecs);e&&(e=Xb(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:
302
+ 0))});a.A.D(g,"updateend",function(){return oi(a,b)});a.h[b]=g;a.H[b]=d;a.X[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;d=d||a.N;a=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):Za('Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Za('Text parsers should have a "setManifestType" method!'),e.u=d)}
303
+ function pi(a){return a.o?!1:a.i?"ended"==a.i.readyState:!0}function qi(a,b){a.o?a=null:b==zc?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==zc?a.g.h:vh(ri(a,b))}function ti(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=ri(a,b);return xh(a,c)}
302
304
  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/
305
+ function ui(a,b,c,d,e,f){var g=null,h=M(c);if(Dc.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
306
  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)}
307
+ 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,x,y,w,A;return H(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,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.W&&(wi(a,b,function(){return xi(a,
308
+ b)}),wi(a,b,function(){return yi(a,b,m)}));x=b==k.wa||!(k.wa in a.h);a.s&&x&&a.aa.resolve(m)}f&&b==k.wa&&(a.g||mi(a,"application/cea-608",a.s,!1),a.F||(y=n.split(";",1)[0],a.F=new sb(y)),d?(w=a.F.j(c),w.length&&Qc(a.g,w,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,
309
+ A)})),C(z,wi(a,b,function(){var B=c;if("video"==b&&a.L){var G=a.L;G.g&&G.g.appendBuffer(B,"video",G.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=Ac;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)})};
310
+ function Ci(a,b){var c;return H(function(d){c=Ac;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=Ac;return a==c.da?d.return():C(d,wi(b,a,function(){b.l.currentTime-=.001;oi(b,a)}),0)})};
311
+ function Di(a,b,c,d,e,f,g,h){var k,l,m;return H(function(n){if(1==n.g){k=Ac;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)})}
312
+ function Fi(a,b,c){var d;return H(function(e){d=Ac;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)})};
313
+ q.Ba=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
314
  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};
315
+ 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};wa(l,2);return C(l,Promise.all(c),4);case 4:ya(l,3);break;case 2:throw g=Aa(l),g;case 3:return wa(l,5,6),C(l,b(),6);case 6:Ba(l);for(h in a.h)Hi(a,h);Ca(l,0);break;case 5:throw k=Aa(l),new N(2,3,3015,k,a.l.error||"No error in the media element");
316
+ }})}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.X[d];a.C.insertFakeEncryptionInInit&&null==c&&e&&(jd()||hd())&&"mp4"==a.H[d].split(";")[0].split("/")[1]&&(b=nh(b));return b}
317
+ function Ji(a,b,c,d){return wi(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),oi(a,b))})}
318
+ function Ki(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G;return H(function(E){switch(E.g){case 1:a.o=!0;c=a.l.currentTime;xa(E);a.A.ub();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(sc)),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(F){}}return C(E,Promise.all(d),4);case 4:return a.m={},a.j={},a.h={},r=a.i.duration,a.G=new Ie,
319
+ a.i=ii(a,a.G),C(E,a.G,5);case 5:a.i.duration=r;u=new Ie;x=a.i.sourceBuffers;y=b.size;w=0;a.A.D(x,"addsourcebuffer",function(){w++;w===y&&u.resolve()});A=t(b.keys());for(z=A.next();!z.done;z=A.next())B=z.value,G=b.get(B),li(a,B,G);a.l.currentTime=c;return C(E,u,2);case 2:Ba(E),a.o=!1,Ca(E,0)}})}function Li(a,b){return Gi(a,function(){return Ki(a,b)})}
320
+ 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=Cc(c.mimeType,c.codecs);k=a.C.forceTransmux;if(!fb(h)||!a.s&&Dc.includes(h))k=!0;l=Ec(c.mimeType,c.codecs);k&&(m=Xb(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)})}
321
+ 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.tg=function(){return this.g};q.If=function(a){this.i=a};q.Ba=function(a){this.j=a};q.yg=function(){return this.i};q.Gf=function(a){this.o=a};q.fc=function(a){this.C=a};q.Nd=function(a){this.s=a};q.Hf=function(a){this.m=a};q.lg=function(){return this.m};
320
322
  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)};
323
+ 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.we=function(a){this.g=Math.max(this.g,a)};
324
+ 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.Cb()-this.s)};q.Kf=function(a){this.F=a};q.Cb=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};
325
+ 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.Cb()-this.s+a,this.eb()))};q.Yb=function(){return this.Kc(0)};q.eb=function(){return Math.max(0,this.Cb()-(this.T()||this.Gb()?this.m:0))};q.Pf=function(){return null==this.i||null!=this.h&&this.u?!1:!0};q.Ff=function(a){this.G=a};L("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.Ff;Q.prototype.usingPresentationStartTime=Q.prototype.Pf;
326
+ Q.prototype.getSeekRangeEnd=Q.prototype.eb;Q.prototype.getSeekRangeStart=Q.prototype.Yb;Q.prototype.getSafeSeekRangeStart=Q.prototype.Kc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Cb;Q.prototype.setUserSeekStart=Q.prototype.Kf;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.we;Q.prototype.notifyMinSegmentStartTime=Q.prototype.Gd;
327
+ Q.prototype.lockStartTime=Q.prototype.Dd;Q.prototype.notifySegments=Q.prototype.Qc;Q.prototype.notifyTimeRange=Q.prototype.yf;Q.prototype.getDelay=Q.prototype.lg;Q.prototype.setDelay=Q.prototype.Hf;Q.prototype.setSegmentAvailabilityDuration=Q.prototype.Nd;Q.prototype.setStatic=Q.prototype.fc;Q.prototype.setClockOffset=Q.prototype.Gf;Q.prototype.getPresentationStartTime=Q.prototype.yg;Q.prototype.setDuration=Q.prototype.Ba;Q.prototype.setPresentationStartTime=Q.prototype.If;
328
+ Q.prototype.getMaxSegmentDuration=Q.prototype.tg;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)})).Da(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.ze=function(){this.o=!0;Ri(this)};
327
329
  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
330
  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
331
  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 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.Da(.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.Ye=function(){return 0};
333
+ q.Xe=function(){return 0};q.xf=function(){};
332
334
  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
+ 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.Da(.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)};
336
+ q.gd=function(){var a=Xi(this.h);return 0<this.i.readyState&&!this.i.paused?fj(this,a):a};q.Ye=function(){return this.o?this.o.o:0};q.Xe=function(){return this.j.C};q.xf=function(){this.j.ze()};function ej(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
335
337
  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};
338
+ 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.Rg=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
339
  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
340
  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};
341
+ 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.Ca,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)}};
342
+ 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.Da(a))};gj.prototype[Symbol.iterator]=function(){return this.Ab(0)};
343
+ gj.prototype.Ab=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 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;
344
+ gj.prototype.getIteratorForTime=gj.prototype.Ab;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.Rg;gj.prototype.release=gj.prototype.release;function ij(a,b,c){this.i=a;this.g=b;this.h=c}ij.prototype.dg=function(){return this.g};
345
+ ij.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.xa().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.xa().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;
346
+ ij.prototype.currentPosition=ij.prototype.dg;function kj(){gj.call(this,[]);this.h=[]}pa(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
347
  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)}
348
+ 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.Pe(b);return}catch(c){}a.h.Da(.25);0!=a.g.td()&&a.g.Pe(0)};function nj(a){var b=this;this.h=a;this.g=new Set;this.i=(new cd(function(){oj(b,!1)})).Da(.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}pa(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:[],ef: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={se: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)}
349
+ 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.se;break a}}d=null}if(e=d)e=c.ef,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);
350
+ 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.ef=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))})).Da(2)}pa(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,
351
+ "regionremove",function(d){c.g.delete(d.region)})}pa(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)}}};
352
+ 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.Ab(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.Db()&&(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
353
  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}
354
+ 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.Aa){var d=c.Aa,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||
355
+ (c.Aa=null)}else 0<a.segmentPrefetchLimit&&(c.Aa=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)})};
356
+ function Nj(a,b){var c,d,e,f,g,h,k;H(function(l){switch(l.g){case 1:return c=Ac,a.F++,d=a.F,wa(l,2),C(l,Ci(a.g.R,c.da),4);case 4:ya(l,3);break;case 2:if(e=Aa(l),a.g)a.g.onError(e);case 3:f=Cc(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(zc);b&&(Jj(b),Kj(b).catch(function(){}),a.h.delete(zc));a.o=null}
355
357
  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(),
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)})}
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)}})}
358
+ function Sj(a,b,c,d,e,f){var g=a.h.get(b.type);g||b.type!=zc?g&&(g.Lb&&(b.trickModeVideo?(g.Lb=b,b=b.trickModeVideo):g.Lb=null),g.stream!=b||e)&&(g.Aa&&Fj(g.Aa,b),b.type==zc&&(e=Cc(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.Ze=!!f,c&&(g.Bc?g.Qd=!0:g.va?(g.wb=!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)}
359
+ function Wj(a,b){var c,d;return H(function(e){if(1==e.g){if(!b.za)return e.return();c=b.stream;d=b.za;return c.segmentIndex?e.B(2):C(e,c.createSegmentIndex(),2)}if(b.za!=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.ta?b.ta.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ka?k.ka-k.Ca:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ka?k.ka-k.Ca:null)||0),k=a.g.getBandwidthEstimate(),
360
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.za.h.g>h?!0:!1):f=!1;f&&b.za.abort();D(e)})}
361
+ 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=ri(e,d),e=wh(e,a));e||((null!=si(this.g.R,d)||c.va)&&Xj(this,c),c.za&&(c.za.abort(),c.za=null),d===zc&&(d=this.g.R,d.F&&d.F.i()),c.Vc=!0)}};
362
+ function Xj(a,b){b.Bc||b.wb||(b.va?(b.wb=!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)})))}
363
+ function Mj(a){var b,c,d,e,f,g,h,k,l;return H(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.wa,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,
364
+ 0));D(m)})}function Oj(a,b){return{stream:b,type:b.type,ba:null,Aa:Lj(a,b),ta:null,$b:null,oe:null,me:null,le:null,Lb:null,endOfStream:!1,va:!1,Ya:null,wb:!1,md:0,Qd:!1,Bc:!1,Vc:!0,ve:!1,Ge:!1,Nc:!1,za: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.Ba(a):this.g.R.Ba(Math.pow(2,32))};
365
+ function Zj(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:jf(a.l);if(b.va||null==b.Ya||b.Bc)return h.return();b.Ya=null;if(!b.wb){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.va||b.Ya||Pj(a,b,0),h.return();case 4:wa(h,6);d=ak(a,b);null!=d&&(Pj(a,b,d),b.Nc=!1);ya(h,7);break;case 6:return e=
366
+ Aa(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.Ba(g),D(h)}})}
367
+ function ak(a,b){if(ck(b))return Ai(a.g.R,b.stream.originalId||""),null;b.type==zc&&Bi(a.g.R);var c=a.g.sd(),d=b.ta?b.ta.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(zc))&&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;
368
+ 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.ta?h.ta.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;b.Aa&&b.ba&&Aj(b.Aa,e);ek(a,b,c,e).catch(function(){});return null}
369
+ function dk(a,b,c,d){if(b.ba)return b.ba.current();if(b.ta||d)return c=b.ta?b.ta.endTime:d,b.ve=!0,b.ba=b.stream.segmentIndex.Ab(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.Ab(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.Ab(c),e=b.ba&&b.ba.next().value);return e}
370
+ function ek(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,x,y,w,A;return H(function(z){switch(z.g){case 1:e=Ac;f=b.stream;g=b.ba;b.va=!0;wa(z,2);if(2==d.Db())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 G,E,F;return H(function(I){if(p)return I.return();r=!0;jf(a.l);if(a.s)return I.return();n=
371
+ gk(n,B);G=!1;E=0;(new Ff).box("mdat",function(J){E=J.size+J.start;G=!0}).parse(n,!1,!0);if(!G)return I.B(0);F=n.subarray(0,E);n=n.subarray(E);return C(I,hk(a,b,c,f,d,F),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.wb?(b.va=!1,Pj(a,b,0),z.return()):C(z,hk(a,b,c,f,d,m),6);case 11:x=z.h;if(r){z.B(6);break}p=!0;jf(a.l);return a.s?z.return():b.wb?(b.va=!1,Pj(a,b,0),
372
+ z.return()):C(z,hk(a,b,c,f,d,x),6);case 6:jf(a.l);if(a.s)return z.return();b.ta=d;g.next();b.va=!1;b.Ge=!1;y=a.g.R.cb();w=y[b.type];db(JSON.stringify(w));b.wb||a.g.ze(d.startTime,d.endTime,b.type);Pj(a,b,0);ya(z,0);break;case 2:A=Aa(z);jf(a.l,A);if(a.s)return z.return();b.va=!1;if(7001==A.code)b.va=!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
373
  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)})}
374
+ function kk(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Ge})){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.Ge=!0}Pj(a,b,4)}
375
+ function fk(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x;return H(function(y){d=Ac;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.oe||f!=b.me||g!=b.le||h!=b.Cd||k!=b.ne){if(b.Cd&&h!=b.Cd||b.ne&&k!=b.ne)if(b.type===d.wa){if(m=a.h.get(d.qb))m.$b=null,Kj(m)}else b.type===d.qb&&(n=a.h.get(d.wa))&&(n.$b=null,Kj(n));p=function(){var w,A,z;return H(function(B){if(1==B.g)return w=new Map,a.j.audio&&w.set(d.qb,
376
+ a.j.audio),a.j.video&&w.set(d.wa,a.j.video),wa(B,2),b.me=f,b.le=g,b.Cd=h,b.ne=k,b.oe=l,A=a.m.sequenceMode||"HLS"==a.m.type,C(B,Di(a.g.R,b.type,l,f,g,A,b.stream,w),4);if(2!=B.g)return ya(B,0);z=Aa(B);b.me=null;b.le=null;b.Cd=null;b.oe=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 w,A,z,B,G,E;return H(function(F){switch(F.g){case 1:return wa(F,2),C(F,r,4);case 4:return w=F.h,jf(a.l),A=null,z=new Map,B=new Ff,B.box("moov",Kf).box("trak",Kf).box("mdia",
377
+ 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.wa,A)}A=null}).parse(w),z.has(b.type)?c.h.timescale=z.get(b.type):null!=A&&(c.h.timescale=A),G=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,C(F,a.g.$e(b.type,w),5);case 5:return C(F,vi(a.g.R,b.type,
378
+ w,null,b.stream,G),6);case 6:ya(F,0);break;case 2:throw E=Aa(F),b.$b=null,E;}})},a.g.Ug(c.startTime,c.h),e.push(u()));x=b.ta?b.ta.j:null;if(a.m.sequenceMode){if(c.j!=x||b.ve)b.ve=!1,e.push(Fi(a.g.R,b.type,c.startTime))}else a.m.ignoreManifestTimestampsInSegmentsMode&&c.j!=x&&e.push(Fi(a.g.R,b.type,c.timestampOffset));return C(y,Promise.all(e),0)})}
379
+ 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 x=r.reader.Tc();var y=r.reader.Tc();var w=r.reader.K();var A=r.reader.K();var z=r.reader.K();var B=r.reader.K();var G=e.startTime+A/w}else w=r.reader.K(),G=r.reader.dc()/w+e.timestampOffset,
380
+ A=G-e.startTime,z=r.reader.K(),B=r.reader.K(),x=r.reader.Tc(),y=r.reader.Tc();r=r.reader.kb(r.reader.getLength()-r.reader.ha());if(u&&u.includes(x)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==x?a.g.Vg():(u=(new Map).set("detail",{startTime:G,endTime:G+z/w,schemeIdUri:x,value:y,timescale:w,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"!=x&&"https://developer.apple.com/streaming/emsg-id3"!=
381
+ x||(x=Fh(r),x.length&&e&&a.g.Wg([{cueTime:e.startTime,data:r,frames:x,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,x=r.version;u.K();r=u.K();var y=u.K();r=1E3*r+y/Math.pow(2,32)*1E3;0===x?u=u.K():(x=u.K(),u=u.K(),u=x*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);
382
+ 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.Ze,b.Ze=!1,C(p,a.g.$e(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)})}
383
+ function ck(a){return a&&a.type==zc&&("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.Aa&&c instanceof P){var l=b.Aa;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.za=g;return C(k,g.promise,2)}h=k.h;b.za=null;return k.return(h.data)})}
384
+ function Yj(a,b,c,d,e){e=e?0:1;var f=b instanceof P?b:void 0;b=Gj(b.xa(),b.Ca,b.ka,a.i.retryParameters,d);return a.g.Ib.request(gf,b,{type:e,stream:c,segment:f})}
385
+ function Vj(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.wb=!1,b.Qd=!1,b.md=0,b.Bc=!0,b.ta=null,b.$b=null,b.ba=null,b.Aa&&Dj(b.Aa),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.va||b.Ya||Pj(a,b,0);D(g)})}
386
+ function Pj(a,b,c){var d=b.type;if(d!=zc||a.h.has(d))b.Ya=(new bd(function(){var e;return H(function(f){if(1==f.g)return wa(f,2),C(f,Zj(a,b),4);if(2!=f.g)return ya(f,0);e=Aa(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.za?C(b,a.za.abort(),0):b.B(0)})}
385
387
  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)}
388
+ function rk(a,b){var c={bc:function(){},Id:function(){},Kb:function(){},onError:function(){},Kd:function(){},gi:function(){}};a.m.push({create:b,Wa:c});a.h&&a.h.abort();qk(a);return c}
389
+ 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.Tg(a.i),a.o=new Ie,c=a.o);b=C(b,c,1)}return b})}
390
+ function sk(a){var b,c;return H(function(d){switch(d.g){case 1:return a.i=a.j.vg(a.i,a.l,a.g.node,a.g.U),wa(d,2),a.h=a.j.gg(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);ya(d,0);break;case 2:b=Aa(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.l))&&(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
391
  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
392
  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
393
  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
394
  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)};
395
+ 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.H;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.G&&(b.snapToLines=!1);null!=a.j&&(b.line=a.j);null!=a.position&&(b.position=a.position);return b}
396
+ 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)})).Da(.25);this.h=new Map;this.s=new kf;this.s.D(document,"fullscreenchange",function(){Ck(c,!0)});this.l=null;"ResizeObserver"in
397
+ 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 Lb(f,e.ad)}}(c))||this.i.push(c.ad);Ck(this)};
396
398
  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
399
  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?
400
+ 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.Qf: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.Qf,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
401
  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:""},
402
+ 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==Sb?"%":"px")+"-"+c.g+"x"+c.h+(c.j==Sb?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.i==Sb?"%":"px",k=c.l==Sb?"%":"px",l=c.j==Sb?"%":"px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=
403
+ 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,Qf:e,Uc:c})}
404
+ function Hk(a){var b=a.direction,c=a.H;a=a.textAlign;return c!==Cb?c:"left"===a||"start"===a&&b===Eb||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===Eb?"line-right":"center"}
405
+ 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.l;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%";
406
+ 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.m;f.fontWeight=c.u.toString();
407
+ f.fontStyle=c.o;f.letterSpacing=c.W;f.fontSize=Ik(c.A,c,a.m);null!=c.j&&(a=c.G,0==c.j&&a==Gb&&(a=1),1==a&&(f.position="absolute",c.writingMode==Fb?(f.width="100%",c.s==Hb?f.top=c.j+"%":"end"==c.s&&(f.bottom=100-c.j+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.s==Hb?f.left=c.j+"%":"end"==c.s&&(f.right=100-c.j+"%")):(f.height="100%",c.s==Hb?f.right=c.j+"%":"end"==c.s&&(f.left=100-c.j+"%"))));f.lineHeight=c.aa;null!=c.position&&(c.writingMode==Fb?f.paddingLeft=c.position:f.paddingTop=c.position);
408
+ a=Hk(c);"line-left"==a?f.cssFloat="left":"line-right"==a&&(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==Fb?f.width=c.size+"%":f.height=c.size+"%")}
409
+ 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",Bk);Bk.prototype.setTextVisibility=Bk.prototype.setTextVisibility;Bk.prototype.isTextVisible=Bk.prototype.isTextVisible;
410
+ Bk.prototype.remove=Bk.prototype.remove;Bk.prototype.destroy=Bk.prototype.destroy;Bk.prototype.append=Bk.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=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");
411
+ break;case "right":g.push("align:right");break;case Db: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 $a("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}
412
+ 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)}))}}}
413
+ 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}
414
+ function al(a,b){var c=a.h.sb();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}}
415
+ 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"===
416
+ 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}
417
+ function Rk(a,b){if(!b||a.includes("offline:"))return a;a=new cc(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",Ph:"s",OTHER:"o"});function bl(){}
418
+ 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]=Te(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Te(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&&Za("Unexpected number of arguments for "+k),a[h]=b[h]):(Ya("Invalid config, unrecognized key "+
419
+ 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=zf(a);return(new cc(a)).Sa}function hl(a,b,c){function d(h){qb(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 il(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zf(a).split("skd://").pop();return hl(a,c,b)}
420
+ 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=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=ob(Sf(c)))}};fl.expressplayFairPlayRequest=function(a,b){jl(a,b)};
421
+ 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=Rf(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Af("spc="+a))};fl.expressplayInitDataTransform=function(a,b,c){return il(a,b,c)};
422
+ fl.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 hl(a,d,b)};fl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=zf(a).split(";").pop();return hl(a,c,b)};fl.verimatrixInitDataTransform=function(a,b,c){return il(a,b,c)};fl.initDataTransform=hl;
423
+ fl.defaultGetContentId=gl;fl.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"'}]},wa(b,2),C(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);Aa(b);return b.return(!1)})};function kl(){}
424
+ function ll(){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){window.shakaMediaKeysPolyfill&&"skd"==h&&(h=k.serverCertificate,k=gl(g),g=hl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:hd(),minHdcpVersion:""},
422
425
  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,
426
+ "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",
427
+ 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 el([g],g)},sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},
428
+ d={retryParameters:Ge(),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,
429
+ 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 el([g,
427
430
  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,
428
431
  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:[],
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(),
432
+ 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(ml(g,
433
+ 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,"")}
434
+ function ml(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/
435
+ 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}
436
+ 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){Se.call(this);var c=this;this.l=vl;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.Of=this.V=this.Oa=this.M=this.vd=this.H=this.Sb=this.A=this.G=this.m=this.F=null;this.Fc=!1;this.qe=this.s=null;this.Ee=1E9;this.g=wl(this);this.De={width:Infinity,height:Infinity};this.u=null;this.Za=new we(this.g.preferredAudioLanguage,this.g.preferredVariantRole,this.g.preferredAudioChannelCount,this.g.preferredVideoHdrLevel);
437
+ 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=xl(this);this.F=yl(this);this.F.Ne(this.g.streaming.forceHTTPS);this.C=null;zl&&(this.C=zl());this.zd.D(window,"online",function(){Al(c);c.He()});this.N={name:"detach"};this.W={name:"attach"};this.aa={name:"unload"};this.Ie={name:"manifest-parser"};this.Ae={name:"manifest"};this.Rb={name:"media-source"};this.ue={name:"drm-engine"};this.X={name:"load"};this.Re=
438
+ {name:"src-equals-drm-engine"};this.Tb={name:"src-equals"};var d=new Map;d.set(this.W,function(e,f){return Ne(Bl(c,e,f))});d.set(this.N,function(e){e.mediaElement&&(c.xc.ub(),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(Cl(c,e))});d.set(this.Rb,function(e){e=Dl(c,e);return Ne(e)});d.set(this.Ie,function(e,f){e=El(c,e,f);return Ne(e)});d.set(this.Ae,function(e){return Fl(c,e)});d.set(this.ue,function(e){e=Gl(c,e);return Ne(e)});
439
+ d.set(this.X,function(e,f){return Ne(Hl(c,e,f))});d.set(this.Re,function(e,f){e=Il(c,e,f);return Ne(e)});d.set(this.Tb,function(e,f){return Jl(c,e,f)});this.Pa=new mk(this.N,{vg: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.Re:null);e==c.Rb&&(k=g==c.X&&f.mediaElement==h.mediaElement?c.Ie:c.aa);e==c.Ie&&(k=Kl(c.X,c.Ae,c.aa,g,f,h));e==c.Ae&&(k=Kl(c.X,c.ue,c.aa,g,f,h));e==c.ue&&(k=Kl(c.X,c.X,c.aa,
440
+ g,f,h));e==c.Re&&(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},gg:function(e,f,g){c.dispatchEvent(Ll("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,Cl(c,e),2):f.return(e.mediaElement?c.W:c.N)})},Tg:function(e){c.dispatchEvent(Ll("onstateidle",(new Map).set("state",e.name)))}});this.xd=new cd(function(){return Ml(c)});
441
+ a&&this.yc(a,!0)}pa(T,Se);function Nl(a){null!=a.L&&(a.L.release(),a.L=null)}function Ol(a,b){if(b.lcevc.enabled){var c=a.sb();c&&c[0]&&c[0].videoMimeType==Pl.ts&&(gd()||navigator.userAgent.match(/Edge\//))&&(b.mediaSource.forceTransmux||Za("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled."));Nl(a);null==a.L&&(a.L=new ci(a.h,a.Of,b.lcevc),a.G&&(a.G.L=a.L))}else Nl(a)}function Ll(a,b){return new O(a,b)}q=T.prototype;
442
+ q.destroy=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(a.l==Ql)return c.return();Nl(a);a.l=Ql;b=rk(a.Pa,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.Pa.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.qe=null;a.g=null;a.u=null;a.nd=null;a.V=null;
443
+ 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==Ql)return Promise.reject(Rl());var c=nk();c.mediaElement=a;dd()||(b=!1);var d=b?this.Rb:this.W;a=rk(this.Pa,function(){return{node:d,U:c,Eb:!1}});a.bc=function(){};return Sl(a)};q.Wf=function(a){this.Of=a};
444
+ q.detach=function(){var a=this;if(this.l==Ql)return Promise.reject(Rl());var b=rk(this.Pa,function(){return{node:a.N,U:nk(),Eb:!1}});b.bc=function(){};return Sl(b)};q.Ue=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Ql)return Promise.reject(Rl());this.Fc=!1;dd()||(a=!1);Nl(this);var c=nk(),d=rk(this.Pa,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 Sl(d)};q.rh=function(a){this.Gc=a};
445
+ 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=nk();e.uri=a;e.Od=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Tl(this,e)?this.Tb:this.X,g=rk(this.Pa,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,U:e,Eb:!0}});this.u=new ul;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(Ll("loaded"))};
446
+ g.Kb=function(){return k(Rl())};g.onError=function(l){return k(l)}})};function Tl(a,b){if(!dd())return!0;var c=b.mimeType,d=b.uri||"";c||(c=kh(d),c=Pl[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}
447
+ 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()}
448
+ function Cl(a,b){var c,d,e,f,g,h,k,l,m;return H(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.Oa&&(a.Oa.release(),a.Oa=null);b.mediaElement&&a.o.ub();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
449
  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,
450
+ 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.xe=null;Wl(a);D(n)}})}
451
+ function Dl(a,b){var c,d,e,f,g;return H(function(h){if(1==h.g)return c=a.g.textDisplayFactory,d=c(),a.xe=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.N=g,C(h,e.G,2);a.G=e;D(h)})}
452
+ function El(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)})}
453
+ function Fl(a,b){var c=b.uri;b=a.F;a.Oa=new tj(function(){return a.ec()});a.Oa.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 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,
454
+ 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.Oa;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=
455
+ 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 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&&
456
+ a.m.s&&bm(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=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()})}
457
+ function Gl(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=dm(a,{Ib:a.F,onError:function(f){Vl(a,f)},Jd: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,Ag(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)})}
458
+ function Hl(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B;return H(function(G){switch(G.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},Pe:function(E){d.playbackRate=E},wf:function(E){d.currentTime+=E}});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);
459
+ h=a.g.abrFactory;a.s&&a.qe==h||(a.qe=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;im(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);
460
+ a.s.init(function(E,F,I){a.j&&E!=a.j.j&&jm(a,E,!0,void 0===F?!1:F,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=km(a);a.j.configure(a.g.streaming);a.l=lm;d.textTracks&&a.o.D(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":mm(a,E)}});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,
461
+ n.audio]);for(r=p.next();!r.done;r=p.next())(u=r.value)&&!u.segmentIndex&&m.push(u.createSegmentIndex());if(!(0<m.length)){G.B(2);break}return C(G,Promise.all(m),2);case 2:im(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.A=om(a,b.startTime);a.Sb=pm(a,b.Od);x=Math.max(a.i.minBufferTime,a.g.streaming.rebufferingGoal);qm(a,x);if(l){G.B(4);break}jm(a,k,!0,!1,0);if(!a.g.streaming.startAtSegmentBoundary){G.B(4);break}y=a.A.gd();return C(G,rm(k,y),6);case 6:w=G.h,a.A.Zd(w);case 4:return a.A.Yd(),
462
+ A=a.Zb().find(function(E){return E.active}),A||((z=fe(a.i.textStreams,a.Qb,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.ke())&&Uj(a.j,z)),C(G,a.j.start(),7);case 7:a.g.abr.enabled&&(a.s.enable(),um(a)),Hd(a.j?a.j.j:null,a.i),vm(a.i),wm(a),nm(a),a.i.variants.some(function(E){return E.primary}),a.T()&&(a.g.streaming.liveSync||a.i.serviceDescription)&&(B=function(){return xm(a)},a.o.D(d,
463
+ "timeupdate",B)),a.Fc=!0,a.o.la(d,"loadedmetadata",function(){a.u.m=Date.now()/1E3-c.Od}),D(G)}})}
464
+ function Il(a,b,c){var d,e,f,g,h,k,l;return H(function(m){return 1==m.g?(d=Ac,e=Date.now()/1E3,f=!0,a.m=dm(a,{Ib:a.F,onError:function(n){Vl(a,n)},Jd: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=kh(g),k=Pl[h],"application/x-mpegurl"==k&&ld()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
465
+ 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.wa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1},bandwidth:100,
463
466
  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};
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};
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;
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)})};
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)}};
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};
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,
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}};
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;
467
+ 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 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},Pe: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)});
468
+ "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 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)}),
469
+ a.o.D(e.textTracks,"change",function(){return wm(a)}));var g=kh(b.uri);e.src=Mk(a.V,b.uri,Pl[g]);(jd()||id("Web0S"))&&e.load();a.l=zm;a.dispatchEvent(Ll("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 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);
470
+ (new cd(m)).S(1)}),2);if(f)return l.return();Cm(a);D(l)})});e.error?h.reject(Ul(a)):"none"==e.preload&&(Za('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.o.la(e,"error",function(){h.reject(Ul(a))});return(new Je(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})).fa(function(){a.T()&&
471
+ a.g.streaming.liveSync&&a.o.D(e,"timeupdate",function(){return xm(a)});a.Fc=!0})}function Am(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Cf(b,a.g.preferredVariantRole)}function Cm(a){var b=a.g.preferredTextLanguage;""!=b&&a.Df(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
472
+ 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 cd(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()})}}
473
+ 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))}
474
+ function mm(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 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 tg(b,a.g.drm.updateExpirationTime)}
475
+ function yl(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(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=
476
+ "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){$a("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=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){$a("CMCD_SEGMENT_ERROR",
477
+ "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 bj(a.h,a.i,a.g.streaming,b,function(){a.Sb&&oj(a.Sb,!0);a.j&&a.j.Vc();a.M&&Fm(a)},function(c){return a.dispatchEvent(c)})}
478
+ function pm(a,b){b=new uj(a.Oa,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 nj(a.h);c.g.add(b);a.ga&&c.g.add(a.ga);return c}function qm(a,b){a.M=new Be;a.M.g=De;Ee(a.M,b,Math.min(.5,b/2));Wl(a);a.vd=(new cd(function(){Fm(a)})).Da(.25)}
479
+ function Fm(a){switch(a.l){case zm:if(a.h.ended)var b=!0;else{var c=vh(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case lm:a:if(a.h.ended||pi(a.G))b=!0;else{if(a.i.presentationTimeline.T()){c=a.i.presentationTimeline.Cb();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&&Wl(a)}function Xl(a,b,c,d){return new hi(a,b,c,d)}
480
+ 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()},Bb:function(){return a.Bb()},sb:function(){return a.sb()},T:function(){return a.T()}},a.g.cmcd)}
481
+ function km(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 Vl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Vg:function(){a.I&&a.I.update&&a.I.update()},ze: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))},Ug:function(b,c){(c=c.se)&&a.ga&&rj(a.ga,c,b)},$e:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&
482
+ !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},Wg:function(b,c,d){Yl(a,b,c,d)},ae:function(b,c){return a.ae(b,c)}})}
483
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=dl(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);
484
+ 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};
485
+ function Gm(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{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.Ne(a.g.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.g.mediaSource),a.G.N=a.g.manifest.segmentRelativeVttTiming,b=a.g.textDisplayFactory,a.xe!=b)){var c=b(),d=a.G,e=d.u;d.u=c;e&&(c.setTextVisibility(e.isTextVisible()),
486
+ e.destroy());d.g&&(d.g.j=c);a.xe=b;a.j&&(b=a.j,(c=b.h.get(zc))&&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(),um(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&&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};
487
+ q.jg=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.eh=function(){for(var a in this.g)delete this.g[a];nl(this.g,wl(this),wl(this));Gm(this)};q.pg=function(){return this.l};q.sg=function(){return this.i?this.i.type:null};q.ug=function(){return this.h};
488
+ q.Bb=function(){return this.F};q.de=function(){return this.jc};q.lf=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.Lg=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};
489
+ 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.Ig=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};
490
+ q.ce=function(){return this.m?this.m.ce():[]};q.qd=function(){return this.m?this.m.qd():{}};q.ie=function(){return this.M?this.M.g==De:!1};q.rd=function(){return this.h?this.H?this.H.i:1:0};q.Nf=function(a){0==a?Za("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),Rj(this.j,1<Math.abs(a))))};q.af=function(){var a=this.H.pd();this.l==zm&&this.H.set(a);this.l==lm&&(this.H.set(a),this.s.playbackRateChanged(a),Rj(this.j,!1))};
491
+ q.sb=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)}):[]};
492
+ 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?Bm(this).map(function(f){return ae(f)}):[]};q.og=function(){return this.i?this.i.imageStreams.map(function(a){return Yd(a)}):[]};
493
+ q.Cg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G,E;return H(function(F){if(1==F.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?F.B(3):C(F,d.createSegmentIndex(),3):F.return(null):F.B(2);if(2!=F.g){e=d.segmentIndex.find(b);if(null==e)return F.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return F.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;
494
+ x=f.l-f.startTime;y=f.C||x/u;w=f.startTime;z=A=0;1<u&&(B=Math.floor((b-f.startTime)/y),w=f.startTime+B*y,A=B%m*p,z=Math.floor(B/m)*r);G=!1;if(E=f.A)G=!0,r=E.height,A=E.positionX,z=E.positionY,p=E.width;return F.return({imageHeight:l,imageWidth:k,height:r,positionX:A,positionY:z,startTime:w,duration:y,uris:f.xa(),width:p,sprite:G})}return F.return(null)})};
495
+ q.Ef=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),Uj(this.j,b),Jm(this),this.Qb=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,Zd(c)==a.id?c.mode=this.Y?"showing":"hidden":c.mode="disabled";Jm(this)}};
496
+ q.Le=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&&Za("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)&&(jm(this,d,!1,b,c),this.Za=new ve(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,
497
+ Zd(c)==a.id){Km(this,c);break}};q.ig=function(){return Lm(this.sb())};q.Ag=function(){return Lm(this.Zb())};q.hg=function(){return Array.from(Mm(this.sb()))};q.zg=function(){return Array.from(Mm(this.Zb()))};
498
+ q.Cf=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,"","");a=function(g,h){return g.video||h.video?g.video&&h.video?Math.abs((g.video.height||0)-(h.video.height||0))+Math.abs((g.video.width||0)-(h.video.width||0)):Infinity:0};b=this.j.j;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||a(c,b)>a(f,b))c=f;c?(a=Wd(c),this.Le(a,!0,d)):Im(this)}else this.h&&this.h.audioTracks&&(d=fe(this.sb(),
499
+ a,b||"",!1)[0])&&this.Le(d)};q.Df=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&&(tl(this.u.h,a,!1),this.g.streaming.alwaysStreamText||this.ke()))Uj(this.j,a),Jm(this)}else(a=fe(this.Zb(),a,b||"",c)[0])&&this.Ef(a)};
500
+ q.hh=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),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)}};
501
+ q.ke=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.mf=function(){return this.h&&this.h.src&&this.h.textTracks?Nm(this).map(function(a){return ae(a)}):[]};
502
+ q.kg=function(a){var b=Tc(a),c=Nm(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};
503
+ 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})}
504
+ q.mh=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=fe(this.i.textStreams,this.Qb,this.Ec,this.Ac),0<a.length&&(Uj(this.j,a[0]),Jm(this))):Qj(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)}};
505
+ q.xg=function(){if(!this.T())return null;var a=this.Pa.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};
506
+ q.nf=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=yh(this.h.buffered));return a};
507
+ 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=
508
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.A&&(this.u.M=this.A.Xe(),this.u.N=this.A.Ye());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.nf().valueOf()+
509
+ 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"),x=ql(e.g,"paused"),y=ql(e.g,"buffering"),w=e.s,A=e.C,z=e.G,B=rl(e.g),G=[];e=t(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
510
+ id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:x,bufferingTime:y,licenseTime:w,liveLatency:A,maxSegmentDuration:z,stateHistory:B,switchHistory:G}};
511
+ q.Tf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,x,y,w,A;return H(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=
512
+ 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),x=new Blob([u],{type:"text/vtt"}),a=ki(x),d="text/vtt";case 6:y={id:h.Ee++,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,
513
+ trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0};w=Cc(y.mimeType,y.codecs);A=Kc(w);if(!A)throw new N(2,2,2014,d);h.i.textStreams.push(y);wm(h);return z.return(Xd(y))}})};
514
+ q.Uf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A;return H(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=Lc[b];if(!g)throw new N(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
515
+ 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())x=u.value,p.nc=uc([a],[x.U])[0],y=new P(x.startTime,x.endTime,function(B){return function(){return[B.nc]}}(p),0,null,null,0,0,Infinity),p.nc.includes("#xywh")&&(w=p.nc.split("#xywh=")[1].split(","),4===w.length&&y.Jf({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),n.push(y);A={id:c.Ee++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
516
+ 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);wm(c);return z.return(Yd(A))}})};
517
+ q.Sf=function(a,b,c){var d=this,e,f,g,h;return H(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.mf();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);
518
+ case 5:throw new N(1,2,2012);}})};function Om(a,b){var c,d;return H(function(e){switch(e.g){case 1:c=kh(b);if(d=Sm[c])return e.return(d);wa(e,2);return C(e,mh(b,a.F,a.g.streaming.retryParameters),4);case 4:d=e.h;ya(e,3);break;case 2:Aa(e);case 3:if(d)return e.return(d);throw new N(1,2,2011,c);}})}
519
+ function Pm(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,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=ki(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 x=Qk(u);var y=Rk(r,x)}else y=r}catch(w){$a("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),y=r}m.src=y;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
520
+ a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function Qm(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&&Sk(k,f,{ot:Zk,su:!0})}catch(l){$a("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)})}
521
+ function Rm(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),Kk(b,d);throw new N(2,2,2014,c);}q.Oe=function(a,b){this.De.width=a;this.De.height=b};q.He=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.va||d.Ya||(d.Nc=!1,Pj(b,d,a));b=!0}}else b=!1;return b};
522
+ q.qg=function(){Za("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.rg=function(){return this.Bd};
523
+ 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.He(d))}};b.textDisplayFactory=function(){return a.nd?new Bk(a.h,a.nd):new wk(a.h)};return b}q.Lf=function(a){this.nd=a};
524
+ 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 kj,l=e.closedCaptions.get(g);h={id:a.Ee++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
525
+ 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 H(function(c){if(1==c.g)return C(c,Tm(a,b),2);Hm(a,b);D(c)})}
526
+ function Tm(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);vm(b);D(d)})}function Hm(a,b){if(a.l!=Ql){for(var c=a.g.restrictions,d=a.De,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&&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)}}
527
+ 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,Jg(a.m,e.initDataType,e.initData)}}}
528
+ function rm(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.Ab(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)})}
529
+ function Wl(a){var b=a.ie();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);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==De?pl(b,"buffering"):a.h.paused?pl(b,"paused"):a.h.ended?pl(b,"ended"):pl(b,"playing")}}
530
+ 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,
531
+ g-b.end))}c&&d&&f-g>c?e!=d&&a.Nf(d):1!==e&&0!==e&&a.af()}}}function nm(a){try{Um(a,a.i)}catch(c){return Vl(a,c),!1}var b=ee(a.i.variants);b=a.Za.create(b);a.s.setVariants(Array.from(b.values()));return!0}
532
+ 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,eb("Re-enabled variant with "+b(f)));a.i.variants.every(function(g){return 0===g.disabledUntilTime})&&a.xd.stop();d&&Im(a,!0,void 0,!1,!1)}
533
+ 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)}
534
+ function jm(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=Ll("adaptation",c),Vm(a,c)):Wm(a,d,b)}}
535
+ 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=ce(c);b=ce(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=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);Za("Invalid autoShowText setting!");return!1}function wm(a){var b=Ll("trackschanged");Vm(a,b)}
536
+ function Wm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&di(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.xd.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&nm(a)}}
537
+ q.ae=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.xd.Da(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};
538
+ 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))}
539
+ 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)}
540
+ 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&&
541
+ (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.Kf(b));b=a.getDuration();c<b&&(a.T()||a.Ba(c))}
542
+ 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,
543
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new N(2,4,4012,a);}function vm(a){if(!a.variants.some(de))throw new N(2,4,4032);}function Vm(a,b){H(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(Tc(c.language)):b.add("und");return b}
544
+ 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=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));
545
+ 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 nk(){return{mediaElement:null,mimeType:null,startTime:null,Od:NaN,uri:null}}function Sl(a){return new Promise(function(b,c){a.Kb=function(){return c(Rl())};a.Id=function(){return b()};a.onError=function(d){return c(d)};a.Kd=function(){return c(Rl())}})}L("shaka.Player",T);
546
+ T.prototype.setVideoContainer=T.prototype.Lf;T.prototype.getManifestParserFactory=T.prototype.rg;T.prototype.getManifest=T.prototype.qg;T.prototype.retryStreaming=T.prototype.He;T.prototype.setMaxHardwareResolution=T.prototype.Oe;T.prototype.addChaptersTrack=T.prototype.Sf;T.prototype.addThumbnailsTrack=T.prototype.Uf;T.prototype.addTextTrackAsync=T.prototype.Tf;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.cb;T.prototype.getPresentationStartTimeAsDate=T.prototype.nf;
547
+ T.prototype.getPlayheadTimeAsDate=T.prototype.xg;T.prototype.setTextTrackVisibility=T.prototype.mh;T.prototype.getChapters=T.prototype.kg;T.prototype.getChaptersTracks=T.prototype.mf;T.prototype.isTextTrackVisible=T.prototype.ke;T.prototype.selectVariantsByLabel=T.prototype.hh;T.prototype.selectTextLanguage=T.prototype.Df;T.prototype.selectAudioLanguage=T.prototype.Cf;T.prototype.getTextLanguages=T.prototype.zg;T.prototype.getAudioLanguages=T.prototype.hg;T.prototype.getTextLanguagesAndRoles=T.prototype.Ag;
548
+ T.prototype.getAudioLanguagesAndRoles=T.prototype.ig;T.prototype.selectVariantTrack=T.prototype.Le;T.prototype.selectTextTrack=T.prototype.Ef;T.prototype.getThumbnails=T.prototype.Cg;T.prototype.getImageTracks=T.prototype.og;T.prototype.getTextTracks=T.prototype.Zb;T.prototype.getVariantTracks=T.prototype.sb;T.prototype.cancelTrickPlay=T.prototype.af;T.prototype.trickPlay=T.prototype.Nf;T.prototype.getPlaybackRate=T.prototype.rd;T.prototype.isBuffering=T.prototype.ie;T.prototype.getKeyStatuses=T.prototype.qd;
549
+ 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.Ig;T.prototype.seekRange=T.prototype.ec;T.prototype.isAudioOnly=T.prototype.Lg;T.prototype.isInProgress=T.prototype.Gb;T.prototype.isLive=T.prototype.T;T.prototype.getAdManager=T.prototype.lf;T.prototype.getAssetUri=T.prototype.de;T.prototype.getNetworkingEngine=T.prototype.Bb;
550
+ T.prototype.getMediaElement=T.prototype.ug;T.prototype.getManifestType=T.prototype.sg;T.prototype.getLoadMode=T.prototype.pg;T.prototype.resetConfiguration=T.prototype.eh;T.prototype.getBufferFullness=T.prototype.jg;T.prototype.getConfiguration=T.prototype.getConfiguration;T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.updateStartTime=T.prototype.rh;T.prototype.unload=T.prototype.Ue;T.prototype.detach=T.prototype.detach;T.prototype.attachCanvas=T.prototype.Wf;
549
551
  T.prototype.attach=T.prototype.yc;
550
552
  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};
553
+ 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(Dc));
554
+ k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=dd()?Kc(l)?!0:fb(l)||(Xb(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=Ym;for(g in f)e[g]=f[g]();return h.return(e)})};
555
+ T.isBrowserSupported=function(){window.Promise||Za("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){zl=a};
556
+ 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.2";var Zm=["4","4"];oe=new function(a){this.g=a;this.i=pe;this.h=qe}(new me(Number(Zm[0]),Number(Zm[1])));
557
+ 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",
558
+ 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 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};
557
559
  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()};
558
560
  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()};
559
561
  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()};
560
562
  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;
561
563
  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;
562
564
  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;
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")});
565
+ 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 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.2");this.g=null;this.u=d||new google.ima.AdsRenderingSettings;this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
566
+ 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&&Ak(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()};
567
+ function cn(a,b){b.getError();b=(new Map).set("originalEvent",b);a.m(new O("ad-error",b));dn(a,null);a.m(new O("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
568
+ function bn(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",
569
+ 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)))}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,
570
+ 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}
571
+ function en(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){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,
572
+ 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")});
571
573
  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")});
572
574
  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,
573
575
  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")})}
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)};
576
+ 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 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))):Za("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
577
+ function dn(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)};
576
578
  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};
577
579
  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()};
578
580
  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;
579
581
  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;
580
582
  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;
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?
583
+ 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 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){jn(e,f)});this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.A.length?
582
584
  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
585
  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
586
  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};
587
+ f;e.i(new O("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)}};
588
+ function jn(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 $m;this.l=navigator.language;this.j=null}pa(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)};
589
+ 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);Se.prototype.release.call(this)};
590
+ q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new O("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)};
591
+ 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)};
592
+ 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)&&Za('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.4.2";c=this.g;c.j?a=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
593
+ (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)&&Za('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.4.2";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.C};
592
594
  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
595
  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
596
  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
597
  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
598
+ 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";zl=function(){return new X};function kn(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
599
  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=
600
+ 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})}
601
+ function mn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
602
+ 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,
603
+ 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(" "),
604
+ 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 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 zn(h)};this.C=function(k,l){k=ln(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,
605
+ 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.ya=function(){return this.h};q.Fe=function(){return this.L};
606
+ 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?
607
+ En(this,a):Cn=null}else window.__onGCastApiAvailable!==Hn&&(In=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Hn)};q.Me=function(a){this.o=a;this.h&&Jn(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(!Fn)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 Kn(b,a,d)},function(d){return Ln(b,d)});return C(c,b.l,0)})};
608
+ 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.Wb=function(){if(this.h){Bn(this);if(Cn){Dn(this);try{Cn.stop(function(){},function(){})}catch(a){}Cn=null}zn(this)}};
609
+ 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.ah.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]};
610
+ 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))}
611
+ q.Af=function(a,b){Jn(this,{type:"call",targetName:a,methodName:b,args:La.apply(2,arguments)})};q.ah=function(a,b){var c=La.apply(2,arguments),d=new Ie,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 Ie;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)}
612
+ 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(){},bb)}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 Gn=.02,Fn=!1,Cn=null,In=null,An=new Set;
613
+ 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;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 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)}pa(Nn,Se);q=Nn.prototype;
614
+ 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.Gg=function(){return this.l};q.wg=function(){return this.s};q.Yf=function(){return this.g.m&&Fn};q.ya=function(){return this.g.ya()};q.Fe=function(){return this.g.Fe()};
615
+ q.cast=function(){var a=this,b;return H(function(c){return 1==c.g?(b=Sn(a),C(c,a.g.cast(b),2)):a.h?C(c,a.h.Ue(),0):c.return()})};q.Me=function(a){this.g.Me(a)};q.nh=function(){Mn(this.g)};q.Wb=function(){this.g.Wb()};
616
+ q.Zf=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 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)})};
617
+ function Tn(a){a.g.init();a.m=new kf;for(var b=t(nn),c=b.next();!c.done;c=b.next())a.m.D(a.i,c.value,function(f){a.g.ya()||(f=Qe(f),a.j.dispatchEvent(f))});for(var d in Re)a.m.D(a.h,Re[d],function(f){a.g.ya()||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.ya()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={oc:b.oc};a.s={};Vn(a,
618
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Wn(a,f)}})});Xn(a);a.j=new Se;a.j.yd=a.l;a.o=new Se;a.o.yd=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)})}
619
+ 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)}}
620
+ function Sn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.de(),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 O("caststatuschanged");a.dispatchEvent(b)}
621
+ function Pn(a){var b=new O(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
622
+ 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=
621
623
  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};
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};
624
+ 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.ya()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ya()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
625
+ 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.Bb()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.lf()};
626
+ if("setVideoContainer"==b)return function(c){return a.h.Lf(c)};if(a.g.ya()){if("getManifest"==b||"drmInfo"==b)return function(){Za(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Za(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ya()&&0==Object.keys(a.g.g.video).length&&(rn[b]||sn[b])||!a.g.ya()?a.h[b].bind(a.h):a.g.get("player",b)}
627
+ function Qn(a,b,c){a.g.ya()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}L("shaka.cast.CastProxy",Nn);Nn.prototype.changeReceiverId=Nn.prototype.Zf;Nn.prototype.forceDisconnect=Nn.prototype.Wb;Nn.prototype.suggestDisconnect=Nn.prototype.nh;Nn.prototype.setAppData=Nn.prototype.Me;Nn.prototype.cast=Nn.prototype.cast;Nn.prototype.receiverName=Nn.prototype.Fe;Nn.prototype.isCasting=Nn.prototype.ya;Nn.prototype.canCast=Nn.prototype.Yf;Nn.prototype.getPlayer=Nn.prototype.wg;
628
+ Nn.prototype.getVideo=Nn.prototype.Gg;Nn.prototype.destroy=Nn.prototype.destroy;function Yn(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(){Zn(e)});$n(this)}pa(Yn,Se);q=Yn.prototype;q.isConnected=function(){return this.F};q.Mg=function(){return this.o};q.kh=function(a){this.i=a};q.bg=function(){this.i=null};
629
+ q.lh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.jh=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.ih=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
628
630
  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=
631
+ 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,
632
+ 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 Re)a.j.D(a.h,Re[d],function(e){return fo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Oe(3840,2160):a.h.Oe(1920,1080);a.j.D(a.g,"loadeddata",function(){a.A=!0});a.j.D(a.h,"loading",function(){a.o=
633
+ !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 cd(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)}
634
+ function go(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);io(a)||jo(a);D(c)})}
635
+ function ko(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,wa(r,5),C(r,a.h.load(b.manifest,b.startTime),7)):C(r,Promise.resolve(),3);case 7:ya(r,3);break;case 5:return g=Aa(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);
636
+ 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))}
637
+ 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+=
638
+ 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.de(),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)}
639
+ 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;
640
+ "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)})}}
641
+ 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.Ue().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));
642
+ 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)}}
643
+ 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.ie()?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)}
644
+ L("shaka.cast.CastReceiver",Yn);Yn.prototype.destroy=Yn.prototype.destroy;Yn.prototype.setContentArtist=Yn.prototype.ih;Yn.prototype.setContentImage=Yn.prototype.jh;Yn.prototype.setContentTitle=Yn.prototype.lh;Yn.prototype.clearContentMetadata=Yn.prototype.bg;Yn.prototype.setContentMetadata=Yn.prototype.kh;Yn.prototype.isIdle=Yn.prototype.Mg;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,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){r=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){u=x;break}if(-1===
645
+ r||-1===u)p=uo(d,e),a.g.push(p);else{for(;r<=u;r++)if(x=p[r]){var y=x.l,w=x.i,A=x.j,z=x.h;if(y!=h||w!=k||A!=l||z!=m)n.U&&a.g.push(n),n=to(d,e,y,w,A,z),h=y,k=w,l=A,m=z;n.U+=x.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 Ab(a,b,"");c&&a.h.push("underline");d&&(a.o="italic");a.l=e;a.backgroundColor=f;return a}function uo(a,b){a=new Ab(a,b,"");a.F=!0;return a}
646
+ 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 Ab(b,c,"");e.G=1;e.j=a.g/16*100;return so(e,d,a.i,b,c)}function xo(a){zo(a,0,15);a.g=1}
647
+ 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]=[]}
648
+ 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"],
649
+ [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"],
650
+ [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){$a("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Oo}
651
+ 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};
652
+ function $o(a,b,c){var d=new Ab(a.j,b,"");d.textAlign=a.C===ap?"left":a.C===bp?"right":Db;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}
653
+ 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;
654
+ 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),
655
+ 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}
656
+ 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]}
657
+ 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)};
658
+ 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}
659
+ 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 Cf(a,0);if(181===a.ra()&&49===a.Ja()&&1195456820===a.K()&&3===a.ra()&&(c=a.ra(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.ra(),f=(e&4)>>2,g=a.ra(),h=a.ra();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Fa: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})))}};
660
+ 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};
661
+ function qp(a,b){var c=b.type;if(16===(b.Fa&112)){var d=b.Fa>>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.Fa&&255===b.$a||!b.Fa&&!b.$a||!sp(b.Fa)||!sp(b.$a))return 45<=++a.l&&pp(a),null;a.l=0;b.Fa&=127;b.$a&=127;if(!b.Fa&&!b.$a)return null;a=null;if(16===(b.Fa&112))a:{d=b.Fa;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);
662
+ 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===
663
+ (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,
664
+ 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.Fa),Ao(c.g,Bo,d);return a}
665
+ 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,x=1;16>x;x++,
666
+ u++)p.i[u]=p.i[x];for(x=0;1>x;x++,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,
667
+ 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 w=np.get(e);Yo(g.g,w)}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)$a("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}
668
+ L("shaka.cea.CeaDecoder",op);vb=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}
669
+ up.prototype.init=function(a){function b(f){f=f.name;f in wp&&(c.g=wp[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",
670
+ b).box("encv",Nf).box("sinf",Kf).box("frma",function(f){f=Oh(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&&Za("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
671
+ 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 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.gf||b.h;e=l.fg||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 Za("Unable to find base media decode time for CEA captions!"),
672
+ new N(2,2,2010);xp(b,l.reader,h,k,d,e,f-l.start-8,g,c)}).parse(a,!1);return c};
673
+ 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].eg);b.ja();){g=b.K();var p=b.ra(),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].Md||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?
674
+ c+(n[l].Je||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};ub["video/mp4"]=function(){return new up};function Ap(){}Ap.prototype.init=function(){};Ap.prototype.parse=function(a){var b=[];a=M(a);if(!bi(a))return b;a=(new Yh).parse(a).ge();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);ub["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.Ke?(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=
675
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ff:g,ei:e,drmInfos:a,kf:!0}}function Ep(a,b,c,d){var e=Bp(a,c,d);if(b.kf){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.kf=!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.ff||b.ff}
676
+ function Fp(a){var b=0,c=qb(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}
677
+ 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""}
678
+ function Hp(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=Fp(a).filter(function(c){return c.type===Ip})[0];if(!a)return"";a=xf(a.value,!0);return(a=qg(a,"WRMHEADER"))?Gp(a):""}
679
+ 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.Ke];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.Ke)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,
680
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Xf(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}
681
+ function Kp(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,Ke:b,keyId:c,init:0<e.length?e:null}}
682
+ var Ip=1,Jp=(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",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=$f(a.node,"https://dashif.org/CPS","Laurl");return b&&b.textContent?
683
+ b.textContent:(a=$f(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=
682
684
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
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)}}
685
+ function Mp(a,b){var c=Np(a,b,"timescale"),d=1;c&&(d=lg(c)||1);var e=Np(a,b,"duration");c=lg(e||"");"image"==a.J.contentType&&(c=ng(e||""));c&&(c/=d);var f=Np(a,b,"startNumber");e=Number(Np(a,b,"presentationTimeOffset"))||0;var g=mg(f||"");if(null==f||null==g)g=1;f=Op(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>
686
+ 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,We:p}),p=k}b=h}return{timescale:d,ma:c,hc:g,lb:e/d||0,Ve: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})}
687
+ function Op(a,b,c){return[b(a.J),b(a.ea),b(a.ia)].filter(tc).map(function(d){return Yf(d,c)}).reduce(function(d,e){return d||e})}
688
+ function Pp(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=uc([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));
689
+ 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)})}
690
+ function Qp(a,b,c,d,e,f){f=void 0===f?0:f;if(cg(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"==cg(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Qp(k,b,c,d,e,f)));return Oe(g).fa(function(){return a})};function Rp(a,b,c,d,e,f,g){var h,k=(new Ff).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);}
691
+ 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.Ja();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 Tp(a){this.h=qb(a);this.g=new Cf(this.h,0)}Tp.prototype.ja=function(){return this.g.ja()};
692
+ 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(mb(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=qb(a.h,a.g.ha(),b);a.g.skip(b);return new Xp(c,
693
+ d)}function Vp(a){var b=a.g.ha(),c=a.g.ra();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}
694
+ 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.qh,u=b+u.$g,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}
695
+ 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{qh:a,$g:c}};function aq(a,b){b=Op(a,b,"Initialization");if(!b)return null;var c=a.J.Ea,d=b.getAttribute("sourceURL");d&&(c=uc(a.J.Ea,[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,bq(a))}
696
+ function cq(a,b){var c=Number(Np(a,dq,"presentationTimeOffset"))||0,d=Np(a,dq,"timescale"),e=1;d&&(e=lg(d)||1);var f=c/e||0,g=aq(a,dq);eq(a,g);var h=Ue(a);return{Xb:function(){var k=Op(h,dq,"RepresentationIndex");var l=h.J.Ea;k&&(k=k.getAttribute("sourceURL"))&&(l=uc(h.J.Ea,[k]));k=fq(h);return gq(h,b,g,l,k.start,k.end,f)}}}
697
+ function gq(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,x,y,w,A,z,B,G;return H(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.rb||!a.$.je,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.xa(),c.Ca,c.ka,!0):null],p=null,C(E,Promise.all(u),2);x=E.h;y=x[0];w=x[1]||null;A=null;z=l-g;B=l;G=m?l+m:Infinity;if("mp4"==n)var F=Rp(y,e,d,c,z,B,G);else{F=new Tp(w);if(440786851!=Up(F).id)throw new N(2,3,3008);var I=Up(F);if(408125543!=I.id)throw new N(2,3,3009);
698
+ F=I.g.byteOffset;I=new Tp(I.g);for(var J=null;I.ja();){var K=Up(I);if(357149030==K.id){J=K;break}}if(!J)throw new N(2,3,3010);J=new Tp(J.g);K=1E6;for(I=null;J.ja();){var S=Up(J);if(2807729==S.id)K=Yp(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=Up(new Tp(y));if(475249515!=K.id)throw new N(2,3,3007);F=Zp(K,F,J,I,d,c,z,B,G)}A=F;h.Qc(A);r=new gj(A);k&&r.Vb(B,G,
699
+ !0);return E.return(r)})}function dq(a){return a.Wc}function fq(a){var b=Op(a,dq,"RepresentationIndex");a=Np(a,dq,"indexRange");a=jg(a||"");b&&(a=gg(b,"range",jg,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);}
700
+ 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.Hd,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.Ea,d,c);b=!e;e?e.Pc(g,a.presentationTimeline.fb()):e=new gj(g);a.presentationTimeline.Qc(g);a.rb&&a.$.je||e.Vb(a.$.start,a.$.duration?a.$.start+a.$.duration:
701
+ Infinity,b);f&&(f.segmentIndex=e);return{Xb:function(){e&&0!=e.Jc()||e.Fd(g);return Promise.resolve(e)}}}function jq(a){return a.vb}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}}
702
+ 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 P(a+l,a+p,function(r){return function(){null==r.vc&&(r.vc=uc(c,[r.tc.Sg]));return r.vc}}(m),m.tc.start,m.tc.end,e,g,a,h));l=p}return k}
703
+ function mq(a){return[a.J.vb,a.ea.vb,a.ia.vb].filter(tc).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{Sg: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=Ue(a);if(h.Oc)return hq(a,g),{Xb:function(){var r=Lp(h.Oc,k.J.id,null,k.bandwidth||null,null);r=uc(k.J.Ea,[r]);return gq(k,b,g,r,0,null,h.lb)}};if(h.ma)return d||"image"===a.ea.contentType||(a.presentationTimeline.we(h.ma),a.presentationTimeline.Gd(a.$.start)),{Xb: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&&
704
+ a.$.je);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.Ea,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 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,Ve:b.Ve,timeline:b.timeline,te:c,Oc:a}}
705
+ 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.te)throw new N(2,4,4002);}
706
+ function rq(a,b,c,d,e){function f(J){var K=(J-r)*p,S=K+b.lb,R=K+l;K=R+p;var aa=Math.min(K,h());R=new P(R,aa,function(){var W=Lp(x,w,J,y,S*u);return uc(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.Cb(),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,
707
+ x=b.te,y=a.bandwidth||null,w=a.J.id,A=a.J.Ea,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 G=a;G<=B;++G){var E=f(G);c.push(E)}var F=new gj(c);c=k.Cb()<h();G=k.T();if(c||G){var I=Math.max(a,B+1);F.Pd(p,function(){var J=k.fb();F.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(F)}
708
+ 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.Ea;return new rh(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){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&&vq(this)}pa(tq,gj);q=tq.prototype;q.Jc=function(){return this.h?this.h.timeline.length:0};q.release=function(){gj.prototype.release.call(this);this.h=null};
709
+ 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)}
710
+ 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)}}
709
711
  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};
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=
712
+ 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.Ve+d.We;d=new P(this.j+d.start,this.j+d.end,function(){return b.h?wq(b.h.te,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.Fg=function(){return this.j};q.ee=function(){return this.l.slice()};q.ng=function(){return this.h};
713
+ q.cf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G,E,F,I,J,K,S,R,aa,W,Y,za;return H(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(la){return la.audioStreams});l=a.map(function(la){return la.videoStreams});m=a.map(function(la){return la.textStreams});
714
+ n=a.map(function(la){return la.imageStreams});p=t(m);for(r=p.next();!r.done;r=p.next())u=r.value,u.push(Cq(d.da));x=t(n);for(y=x.next();!y.done;y=x.next())w=y.value,w.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,R=t(c.i),aa=R.next();!aa.done;aa=R.next())W=aa.value,Y=fh(S.drmInfos,
715
+ W.drmInfos),S.drmInfos.length&&W.drmInfos.length&&!Y.length||(za=A++,z.push({id:za,language:S.language,disabledUntilTime:0,primary:S.primary,audio:S,video:W,bandwidth:(S.bandwidth||0)+(W.bandwidth||0),drmInfos:Y,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=c.i.concat(c.g),G=t(B),E=G.next();!E.done;E=G.next())F=E.value,I=A++,z.push({id:I,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==d.qb?F:null,video:F.type==d.wa?F:null,bandwidth:F.bandwidth||
716
+ 0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});c.j=z;D(ta)}})};
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.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&&yb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.audioStreams=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.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&&yb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
719
+ 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&&yb(e.roles,h.roles)&&uf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.videoStreams=c}}
720
+ 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}}
721
+ function Gq(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G,E,F,I,J,K,S;return H(function(R){switch(R.g){case 1:b=Ac;if(1==a.length)return R.return(a[0]);c=a.map(function(aa){return aa.filter(function(W){return W.type==b.qb})});d=a.map(function(aa){return aa.filter(function(W){return W.type==b.wa})});e=a.map(function(aa){return aa.filter(function(W){return W.type==b.da})});f=a.map(function(aa){return aa.filter(function(W){return W.type==b.wc})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
722
+ 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(R,Dq([],c,0,Iq,Jq),2);case 2:return p=R.h,C(R,Dq([],d,0,Iq,Jq),3);case 3:return r=R.h,C(R,Dq([],e,0,Iq,Jq),4);case 4:return u=R.h,C(R,Dq([],f,0,Iq,Jq),5);case 5:x=R.h;y=0;if(r.length&&p.length)for(G=t(p),E=G.next();!E.done;E=G.next())for(F=E.value,I=t(r),J=I.next();!J.done;J=I.next())K=J.value,S=y++,K.variantIds.push(S),F.variantIds.push(S);else for(w=r.concat(p),A=t(w),z=A.next();!z.done;z=A.next())B=z.value,
723
+ B.variantIds=[y++];return R.return(r.concat(p).concat(u).concat(x))}})}
724
+ function Dq(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G,E,F,I,J;return H(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,x=t(u),y=x.next();!y.done;y=x.next())w=y.value,(A=Lq(w,b,d,e,g))&&a.push(A);z=t(g);for(r=z.next();!r.done;r=
725
+ z.next())for(B=r.value,G={},E=t(B),y=E.next();!y.done;G={pb:G.pb},y=E.next())if(G.pb=y.value,F=G.pb.type==f.da&&!G.pb.language,I=G.pb.type==f.wc&&!G.pb.tilesLayout,!F&&!I&&(J=a.some(function(S){return function(R){return R.mimeType==S.pb.mimeType&&Gc(R.codecs)==Gc(S.pb.codecs)}}(G))))throw new N(2,4,4037);return K.return(a)}})}function Kq(a,b,c,d,e){return H(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)})}
726
+ function Nq(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)})}
727
+ function Lq(a,b,c,d,e){var f=c(a);Mq(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,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==Xc(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
728
+ 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}
729
+ function Iq(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
730
+ 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=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||
731
+ (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)}
732
+ 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)}}
733
+ 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}
734
+ function Pq(a,b){function c(d){if(!Wq.has(d)){var e=Gc(d);Wq.set(d,e)}return Wq.get(d)}return b.mimeType!=a.mimeType||c(b.codecs)!=c(a.codecs)||a.drmInfos&&!eh(a.drmInfos,b.drmInfos)?!1:!0}function Qq(a,b){return a.language?b.language?0==Xc(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Rq(a){return a.tilesLayout?!0:!1}
735
+ function Sq(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;
736
+ 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}
737
+ 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}
738
+ function Uq(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!=
739
+ 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}}
740
+ function Cq(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}}
741
+ 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.cf;xq.prototype.getImageStreams=xq.prototype.ng;xq.prototype.getTextStreams=xq.prototype.ee;xq.prototype.getVariants=xq.prototype.Fg;
742
+ 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 Ua(5);this.F=new cd(function(){cr(a)});this.u=new Ve;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 H(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)})};
743
+ 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 wa(c,2),C(c,dr(a),4);if(2!=c.g)return ya(c,0);b=Aa(c);if(!a.h||!b)return c.return();a.h.onError(b);D(c)})};q.onExpirationUpdated=function(){};
744
+ function dr(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,fr(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.G.sample(1,h);return k.return(h)})}
745
+ function fr(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(gr(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Qp(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(gr(a,h,c))})}
746
+ function gr(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G,E,F,I,J,K,S,R,aa,W,Y,za,ta,la;return H(function(ua){switch(ua.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Zf(b,"Location").map(eg).filter(tc);0<f.length&&(g=uc(e,f),e=a.s=g);h=Zf(b,"BaseURL");k=h.map(eg);l=uc(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",
747
+ ig);x=a.g.dash.ignoreSuggestedPresentationDelay;y=null;x||(y=gg(b,"suggestedPresentationDelay",ig));w=a.g.dash.ignoreMaxSegmentDuration;A=null;w||(A=gg(b,"maxSegmentDuration",ig));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())F=E.value,F.segmentIndex&&F.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)&&
748
+ (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(",")};aa=hr(a,R,l,b);W=aa.duration;Y=aa.periods;"static"!=z&&aa.hf||B.Ba(W||Infinity);a.m&&!a.o&&(za=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.o=a.h.isLowLatencyMode());a.o?B.Ff(a.m):a.m&&Za("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.");
749
+ B.we(A||1);return C(ua,a.j.cf(Y,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);ua.B(3);break}var Qa=B,qa=a.j.j,Da=a.j.ee(),Ta=a.j.h,Ka=p||0,ib=a.g.dash.sequenceMode;var jb=Yf(b,"ServiceDescription");if(jb){var tb=Yf(jb,"Latency");jb=Yf(jb,"PlaybackRate");tb&&tb.getAttribute("max")||jb?(tb=tb&&tb.getAttribute("max")?parseInt(tb.getAttribute("max"),10)/1E3:null,jb=jb?parseFloat(jb.getAttribute("max")):null,tb=
750
+ {maxLatency:tb,maxPlaybackRate:jb}):tb=null}else tb=null;a.i={presentationTimeline:Qa,variants:qa,textStreams:Da,imageStreams:Ta,offlineSessionIds:[],minBufferTime:Ka,sequenceMode:ib,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:tb};if(!B.Pf()){ua.B(4);break}ta=Zf(b,"UTCTiming");return C(ua,ir(a,l,ta),5);case 5:la=ua.h;if(!a.h)return ua.return();B.Gf(la);case 4:B.Dd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),D(ua)}})}
751
+ function hr(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=jr(a,b,c,{start:m,duration:r,node:k,je:null==r||!l});f.push(g);b.ia.id&&r&&(a.L[b.ia.id]=r);if(null==r){g=
752
+ null;break}g=m+r}}a.I=f.map(function(x){return x.id});return null!=e?{periods:f,duration:e,hf:!1}:{periods:f,duration:g,hf:!0}}
753
+ function jr(a,b,c,d){b.ia=kr(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())lr(a,d.start,d.duration,f.value,c);c=Zf(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.dh);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);
754
+ }d=c.filter(function(m){return!m.Te});c=c.filter(function(m){return m.Te});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Te.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?[]:nr(d,"audio");g=a.g.disableVideo?[]:nr(d,"video");f=a.g.disableText?
755
+ []: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}}
756
+ function nr(a,b){return a.filter(function(c){return c.contentType==b})}
757
+ function mr(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ea=kr(c,b.ia,null);var e=!1,f=Zf(c,"Role"),g=f.map(function(F){return F.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=
756
758
  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"))}))&&
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,
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,
759
+ p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),10)));m=Zf(c,"Accessibility");var u=new Map,x;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),w=y.next();!w.done;w=y.next()){var A=w.value,z=w=void 0;A.includes("=")?(A=A.split("="),w=A[0].startsWith("CC")?A[0]:"CC"+A[0],z=A[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,z=A);u.set(w,Tc(z))}}else u.set("CC1",
760
+ "und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=1,null!=r)for(r=t(r.split(";")),w=r.next();!w.done;w=r.next())w=w.value,A=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],A=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,A=w),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?x="visually impaired":"2"==r&&(x="hard of hearing"));if(l)return null;l=Zf(c,"ContentProtection");
761
+ var B=Bp(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),G=Tc(b.ea.language||"und"),E=c.getAttribute("label");(l=Zf(c,"Label"))&&l.length&&(l=l[0],l.textContent&&(E=l.textContent));l=Zf(c,"Representation");c=l.map(function(F){if(F=or(a,b,B,h,G,E,e,g,u,F,x))F.hdr=F.hdr||n;return F}).filter(function(F){return!!F});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=
762
+ 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(F){return F.getAttribute("id")}).filter(tc);return{id:b.ea.id||"__fake__"+a.H++,contentType:b.ea.contentType,language:G,fi:e,streams:c,drmInfos:B.drmInfos,Te:f,dh:k}}
763
+ 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.Ub);if(!qr(b.J))return null;var n=b.$.start;b.bandwidth=gg(l,"bandwidth",lg)||0;var p=b.J.contentType,r=p==zc||"application"==p;p="image"==p;try{var u=function(F,I,J,K){return rr(a,F,I,J,K)};if(b.J.Wc)var x=cq(b,u);else if(b.J.vb)x=iq(b,a.l);else if(b.J.Xc)x=nq(b,u,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var y=b.J.Ea,w=b.$.duration||0;x={Xb:function(){return Promise.resolve(jj(n,w,y))}}}}catch(F){if((r||p)&&4002==
764
+ F.code)return null;throw F;}u=Zf(l,"ContentProtection");u=Ep(u,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);u=new Set(u?[u]:[]);var A=!1;Zf(l,"SupplementalProperty").some(function(F){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==F.getAttribute("schemeIdUri")&&"JOC"==F.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(F){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(F.getAttribute("schemeIdUri"))}))&&
765
+ (B=l.getAttribute("value")),!B))return null;var G;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"))&&(G="PQ");l=b.J.id?b.ia.id+","+b.J.id:"";var E=l&&a.l[l]?a.l[l]:{id:a.H++,originalId:b.J.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.J.mimeType,codecs:b.J.codecs,
766
+ 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:G,tilesLayout:B,matchedStreams:[],accessibilityPurpose:m,external:!1};
767
+ E.createSegmentIndex=function(){var F;return H(function(I){if(1==I.g){if(E.segmentIndex)return I.B(0);F=E;return C(I,x.Xb(),3)}F.segmentIndex=I.h;D(I)})};l&&b.rb&&!a.l[l]&&(a.l[l]=E);return E}function cr(a){var b,c;H(function(d){switch(d.g){case 1:return b=0,wa(d,2),C(d,dr(a),4);case 4:b=d.h;ya(d,3);break;case 2:if(c=Aa(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)}})}
768
+ function er(a,b){0>a.C||a.F.S(Math.max(a.C-b,Va(a.G)))}
769
+ function kr(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Hd:null,audioSamplingRate:null,Ub:0};c=c||b.Ea;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=
770
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Zf(a,"AudioChannelConfiguration");m=sr(m)||b.Hd;p=gg(a,"audioSamplingRate",mg)||b.audioSamplingRate;f||(f=pr(g,h));var r=Yf(a,"SegmentBase"),u=Yf(a,"SegmentTemplate"),x=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+x+y;return{Ea:uc(c,e),Wc:r||b.Wc,vb:Yf(a,"SegmentList")||b.vb,Xc:u||b.Xc,width:gg(a,"width",mg)||b.width,height:gg(a,
769
771
  "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,
772
+ 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=
773
+ 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.vb?1:0;b+=a.Xc?1:0;if(0==b)return a.contentType==zc||"application"==a.contentType?!0:!1;1!=b&&(a.Wc&&(a.vb=null),a.Xc=null);return!0}
774
+ function tr(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(1==m.g)return e=uc(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())})}
775
+ function ir(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;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);
776
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Za("NTP UTCTiming scheme is not supported");break;default:Za("Unrecognized scheme in UTCTiming element",k)}n.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:ya(n,
777
+ 3);break;case 5:Aa(n);case 3:g=f.next();n.B(2);break;case 4:return Za("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
778
+ function lr(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))}}
779
+ function rr(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 pr(a,b){b=Cc(a,b);return Kc(b)?zc:a.split("/")[0]}L("shaka.dash.DashParser",br);lh.mpd=function(){return new br};jh["application/dash+xml"]=function(){return new br};jh["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};
780
+ Er.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function 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}
781
+ ea.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}
782
+ function Mr(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=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);
783
+ 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"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=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);
784
+ "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)}
785
+ 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 Me({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ke(c)}}
786
+ 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=Sf(a):e=Af(a);return{data:e,contentType:c}}L("shaka.net.DataUriPlugin",Qr);Qr.parse=Rr;Ye("data",Rr);function Tr(){var a=this;this.g=this.i=null;this.Oa=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 cd(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 Ve;this.M=new Map;this.u=new Map;this.Y=new Map;this.Pa=this.o=!1}q=Tr.prototype;
787
+ 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,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)};
788
+ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return H(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.Rf),l=d.map(function(n){return n.ib}),a.j.Ba(Math.min.apply(Math,v(l))),a.i.updateDuration());
789
+ h&&cs(a);D(m)})};function ds(a,b){return Yr(a)?a.G.get(b.type):b.Ed}
790
+ function Zr(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G,E,F,I,J,K,S;return H(function(R){if(1==R.g)return c=b.hd,d=new cc(c),e=new hc,b.kd&&(0<=b.Ha&&e.add("_HLS_msn",String(b.Ha)),0<=b.Ia&&e.add("_HLS_part",String(b.Ia))),b.ld&&e.add("_HLS_skip","YES"),pc(e),e.Dc&&fc(d,e),C(R,Wr(a,d.toString(),!0),2);f=R.h;if(!b.stream.segmentIndex)return R.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;
791
+ r=n.drmInfos;u=function(aa,W){return aa.size===W.size&&[].concat(v(aa)).every(function(Y){return W.has(Y)})};u(l.keyIds,p)||(l.keyIds=p,l.drmInfos=r,a.i.newDrmInfo(l));x=gs(a,g,l.type,l.mimeType,m,k);y=x.segments;w=x.bandwidth;l.bandwidth=w;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(Z(z,"SKIPPED-SEGMENTS")):0,G=hs(A,y),E=G.Ha,F=G.Ia,b.Ha=E+B,b.Ia=F,I=m.get(A),l.segmentIndex.Ta(I));J=y[0];b.Hb=J.startTime;K=y[y.length-1];b.ib=K.endTime;
792
+ if(S=Ar(g.g,"EXT-X-ENDLIST"))b.Mc=!0;is(a,g);D(R)})}q.onExpirationUpdated=function(){};
793
+ 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.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),ks(a,c,d)}
794
+ 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.Qe(b)}}}
795
+ function ks(a,b,c){b.Hb+=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)}}
796
+ function Xr(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G,E,F,I,J,K,S,R,aa,W,Y,za,ta,la;return H(function(ua){switch(ua.g){case 1:d=Mr(a.X,b,a.N);e=xr(d.g,"EXT-X-DEFINE");for(var Qa=t(e),qa=Qa.next();!qa.done;qa=Qa.next()){var Da=qa.value;qa=Z(Da,"NAME");Da=Z(Da,"VALUE");qa&&Da&&(a.s.has(qa)||a.s.set(qa,Da))}f=[];g=[];h=[];if(1==d.type)return C(ua,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");Qa=t(l);for(qa=Qa.next();!qa.done;qa=
797
+ Qa.next()){var Ta=qa.value;Da=Z(Ta,"AUDIO");qa=Z(Ta,"VIDEO");var Ka=Z(Ta,"SUBTITLES");Ta=ns(a,Ta);if(Ka){var ib=xc(zc,Ta);a.u.set(Ka,ib);xb(Ta,ib)}Da&&(Ka=xc("audio",Ta),Ka||(Ka=a.g.hls.defaultAudioCodec),a.u.set(Da,Ka));qa&&(Da=xc("video",Ta),Da||(Da=a.g.hls.defaultVideoCodec),a.u.set(qa,Da))}p=xr(d.g,"EXT-X-SESSION-DATA");r=t(p);for(u=r.next();!u.done;u=r.next())if(x=u.value,y=Z(x,"DATA-ID"),w=Z(x,"URI"),A=Z(x,"LANGUAGE"),z=Z(x,"VALUE"),B=(new Map).set("id",y),w&&B.set("uri",Cr(a.N,w)),A&&B.set("language",
798
+ A),z&&B.set("value",z),G=new O("sessiondata",B),a.i)a.i.onEvent(G);os(a,k);Qa=yr(k,"CLOSED-CAPTIONS");Qa=t(Qa);for(qa=Qa.next();!qa.done;qa=Qa.next())qa=qa.value,Da=Z(qa,"LANGUAGE"),Da=Tc(Da||"und"),Ka=zr(qa,"GROUP-ID"),qa=zr(qa,"INSTREAM-ID"),a.M.get(Ka)||a.M.set(Ka,new Map),a.M.get(Ka).set(qa,Da);f=ps(a,l,n);g=qs(a,k);return C(ua,rs(a,m),4);case 4:h=ua.h;ua.B(3);break;case 5:return E=ua.h,F=E.type,I=E.mimeType,J=E.codecs,K=E.language,S=E.height,R=E.width,aa=E.channelCount,W=E.sampleRate,Y=new Map,
799
+ C(ua,ss(a,d,c,c,J,F,K,!0,"Media Playlist",aa,Y,null,!1,W,!1,I),6);case 6:za=ua.h,a.h.set(c,za),"video"==F&&ts(za.stream,R,S,null,null),f.push({id:0,language:Tc(K||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==F?za.stream:null,video:"video"==F?za.stream:null,bandwidth:za.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&&(Yr(a)&&(us(a),ta=a.l,a.m.S(ta)),la=Array.from(a.h.values()),
800
+ vs(a,la),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(ua)}})}
801
+ function ms(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,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 cc(h.i);l=k.ua.split(".").pop();if(m=ws[l])return B.return({type:"audio",mimeType:m,codecs:"",language:null,height:null,width:null,channelCount:null,sampleRate:null});
802
+ n=[h.i];(p=xs(a,b.h,h.g,new Map))&&(n=p.xa());r=gf;u=af(n,a.g.retryParameters);x=p?0:1;return C(B,ys(a,u,r,{type:x}),2)}y=B.h;(w=y.headers["content-type"])&&(w=w.split(";")[0].toLowerCase());if("ts"==l||"video/mp2t"==w){var G=M(y.data),E=(new Yh).parse(G);G=E.od();E=E.fe();var F=[],I=!1,J=!1;switch(G.audio){case "aac":F.push("mp4a.40.2");I=!0;break;case "mp3":F.push("mp4a.40.34");I=!0;break;case "ac3":F.push("ac-3");I=!0;break;case "ec3":F.push("ec-3"),I=!0}switch(G.video){case "avc":E.pa?F.push(E.pa):
803
+ F.push("avc1.42E01E");J=!0;break;case "hvc":F.push("hvc1.1.6.L93.90"),J=!0}if(A=F.length?{type:I&&!J?"audio":"video",mimeType:"video/mp2t",codecs:F.join(", "),language:null,height:E.height,width:E.width,channelCount:null,sampleRate:null}:null)return B.return(A)}else if("mp4"==l||"video/mp4"==w||"audio/mp4"==w)if(z=zs(y))return B.return(z);return B.return(g)})}
804
+ 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=
805
+ 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.Ja();p.skip(2);p.skip(2);p.skip(2);p=p.Ja()+p.Ja()/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",
806
+ 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:As(d).join(", "),language:g,height:h,width:k,
807
+ 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.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.Ba(Cs(a));a.j.Dd()}
808
+ 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=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.s.get(e))&&c.set(e,d)}return c}
809
+ 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})}
810
+ function rs(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);wa(l,2);return C(l,Gs(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=Aa(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}))})}
811
+ function os(a,b){b=b.filter(function(d){var e=Z(d,"URI")||"";return"SUBTITLES"!=Z(d,"TYPE")&&""!=e});b=t(b);for(var c=b.next();!c.done;c=b.next())Ds(a,c.value)}
812
+ 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=Z(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=Z(k,"FRAME-RATE"),m=Number(Z(k,"AVERAGE-BANDWIDTH"))||Number(zr(k,"BANDWIDTH")),n=Z(k,"RESOLUTION");n=t(n?n.split("x"):[null,null]);var p=n.next().value,r=n.next().value,
813
+ u=Z(k,"VIDEO-RANGE");k=Is(a,k);n=k.audio;k=k.video;for(var x=t(k),y=x.next();!y.done;y=x.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 w=u.value;if(u=p?p.stream:null)u.drmInfos=d,u.keyIds=e;if(x=w?w.stream:null)x.drmInfos=d,x.keyIds=e;y=p?p.stream.drmInfos:null;var A=w?w.stream.drmInfos:null;w=(w?w.Zc:"")+" - "+(p?p.Zc:"");
814
+ u&&x&&!eh(y,A)||a.ga.has(w)||(u={id:a.Oa++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!x&&x.primary,audio:u,video:x,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(u),a.ga.add(w))}return l}).reduce(rc,[]);return b=b.filter(function(k){return null!=k})}
815
+ function Is(a,b){var c=ns(a,b),d=Z(b,"AUDIO"),e=Z(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",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=Js(a,b,c,f),d[a.stream.type]=[a]);return d}
816
+ 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=Z(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=Hc(d)[0];b.has(e)||(c.push(d),b.add(e))}return c}
817
+ 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=Z(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=Z(b,"LANGUAGE"),h=Z(b,"NAME"),k="YES"==Z(b,"DEFAULT");var l="audio"==f?(l=Z(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Z(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=Z(b,"CHARACTERISTICS"),p="YES"==Z(b,"FORCED");"audio"==f?b=(b=Z(b,"SAMPLE-RATE"))?
818
+ 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}
819
+ function Gs(a,b){var c,d,e,f,g,h,k,l,m,n;return H(function(p){if(1==p.g){c=Ks(zr(b,"URI"),a.s);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p.return(a.h.get(c));e=Z(b,"LANGUAGE");f=Z(b,"NAME");g=Z(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=Z(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=
820
+ Number(k.split("x")[1])*Number(m.split("x")[1]));if(n=Z(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=Z(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}
821
+ function Ls(a,b,c,d,e,f,g,h,k,l,m,n,p){function r(z){var B,G,E,F,I,J,K,S,R,aa,W,Y,za,ta;return H(function(la){if(1==la.g)return C(la,Wr(a,y.hd,!0),2);if(3!=la.g){B=la.h;if(z.aborted)return la.return();G=B.uri;E=Mr(a.X,B.data,G);F=Yr(a);return C(la,ss(a,E,b,G,c,d,e,f,g,h,k,l,m,n,p),3)}I=la.h;if(z.aborted)return la.return();J=I.stream;Yr(a)&&!F&&us(a);y.hd=G;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.Ha=I.Ha;y.Ia=I.Ia;y.pe=!0;x.segmentIndex=J.segmentIndex;x.encrypted=J.encrypted;
822
+ x.drmInfos=J.drmInfos;x.keyIds=J.keyIds;x.mimeType=J.mimeType;x.bandwidth=J.bandwidth;x.drmInfos.length&&a.i.newDrmInfo(x);K=Ac;if(d==K.wa||d==K.qb)for(S=t(a.h.values()),R=S.next();!R.done;R=S.next())aa=R.value,aa.pe||aa.type!=d||(aa.stream.mimeType=J.mimeType);d==K.da&&(W=J.segmentIndex.get(0))&&W.h&&(x.mimeType="application/mp4");Ms(a)&&(a.Za?vs(a,[y]):(a.Za=!0,Y=Array.from(a.h.values()),za=Y.filter(function(ua){return ua.stream.segmentIndex}),vs(a,za),cs(a),ta=a.l,0<ta&&a.m.S(ta)));D(la)})}var u=
823
+ Cr(a.N,b),x=Ns(a,c,d,e,f,g,h,k,l,m,n,p),y={stream:x,type:d,Zc:b,hd:u,Hb:0,ib:0,Ed:new Map,ld:!1,kd:!1,Mc:!1,be:-1,Ha:-1,Ia:-1,pe:!1},w=null,A=new AbortController;x.createSegmentIndex=function(){if(w)return w;A=new AbortController;return w=new Promise(function(z){z(r(A.signal))})};x.closeSegmentIndex=function(){w&&!x.segmentIndex&&A.abort();x.segmentIndex&&(x.segmentIndex.release(),x.segmentIndex=null);w=null};return y}
824
+ 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&&hj(d.segmentIndex,function(e){c.push(e)});a.j.Qc(c)}
825
+ 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.Vb(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}
826
+ function ss(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,x){var y,w,A,z,B,G,E,F,I,J,K,S,R,aa,W,Y,za,ta,la,ua,Qa,qa,Da;return H(function(Ta){if(1==Ta.g){if(1!=b.type)throw new N(2,4,4017);y=xr(b.g,"EXT-X-DEFINE");w=es(a,y);var Ka=Ar(b.g,"EXT-X-PLAYLIST-TYPE"),ib=Ar(b.g,"EXT-X-ENDLIST");ib=Ka&&"VOD"==Ka.value||ib;Ka=Ka&&"EVENT"==Ka.value&&!ib;Ka=!ib&&!Ka;ib?bs(a,Vr):Ka?bs(a,Bs):bs(a,Os);Yr(a)&&is(a,b);return x?Ta.B(2):C(Ta,Ps(a,f,e,b,w),3)}2!=Ta.g&&(x=Ta.h);A=fs(b,x);z=A.drmInfos;B=A.keyIds;G=A.encrypted;E=A.Vf;if(G&&
827
+ !z.length&&!E)throw new N(2,4,4026);F=Yr(a)?a.G.get(f):new Map;I=gs(a,b,f,x,F,w);J=I.segments;K=I.bandwidth;Yr(a)&&is(a,b);S=J[0].startTime;R=J[J.length-1];aa=R.endTime;W=new gj(J);za=(Y=Ar(b.g,"EXT-X-SERVER-CONTROL"))?null!=Y.getAttribute("CAN-SKIP-UNTIL"):!1;ta=Y?null!=Y.getAttribute("CAN-BLOCK-RELOAD"):!1;la=Br(b.g,"EXT-X-MEDIA-SEQUENCE",0);ua=hs(la,J);Qa=ua.Ha;qa=ua.Ia;Da=Ns(a,e,f,g,h,k,l,m,n,p,r,u);Da.segmentIndex=W;Da.encrypted=G;Da.drmInfos=z;Da.keyIds=B;Da.mimeType=x;Da.bandwidth=K;return Ta.return({stream:Da,
828
+ type:f,Zc:c,hd:d,Hb:S,ib:aa,ld:za,kd:ta,Mc:!1,be:-1,Ha:Qa,Ia:qa,Ed:F,pe:!1})})}function hs(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Ha:a,Ia:c};b=b[b.length-1];var d=b.i;if(!b.i.length)return a++,b.o&&(c=0),{Ha:a,Ia:c};c=d.length-1;d[d.length-1].m||(a++,c=0);return{Ha:a,Ia:c}}
829
+ 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.Oa++,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:Tc(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,
828
830
  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}}
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},
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&&
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++,
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,
831
+ 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=Z(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,Vf:d}}
832
+ function Qs(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Za("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Tf(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=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,
833
+ 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}
834
+ 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.Pa?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?
835
+ 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.If(0);a.j.Hf(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,Z(c,"BYTERANGE","")].join("-");a.Y.has(b)||(c=Rs(d,c),a.Y.set(b,c));return a.Y.get(b)}
836
+ function Rs(a,b){var c=0,d=null;if(b=Z(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new rh(function(){return[a]},c,d)}
837
+ 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,x=null;d.h.length&&!a.o&&Za("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 w=Ar(n,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(y=hg(w.value))}var A=th;Ar(n,"EXT-X-GAP")&&(A=2);if(!p){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
838
+ if(!a.o)return null}var z=[];w=!1;var B=null,G=!1,E=!1;if(a.o&&d.h.length){r=("video/mp4"==k||"audio/mp4"==k)&&window.ReadableStream;k=y;for(var F={},I=0;I<d.h.length;F={qc:F.qc,dd:F.dd},I++){var J=d.h[I],K=0==I?c:z[z.length-1],S=0==I?e:K.endTime,R=Number(Z(J,"DURATION"))||a.H;if(R){var aa=S+R,W=0,Y=null;"EXT-X-PRELOAD-HINT"==J.name?(W=(W=Z(J,"BYTERANGE-START"))?Number(W):0,(K=Z(J,"BYTERANGE-LENGTH"))?Y=W+Number(K)-1:W&&(Y=Number.MAX_SAFE_INTEGER)):(W=Z(J,"BYTERANGE"),Y=t(Ts(K,W)),W=Y.next().value,
839
+ Y=Y.next().value);F.dd=Z(J,"URI");if(F.dd){K=th;"YES"==Z(J,"GAP")&&(K=2,G=!0);F.qc=null;var za=function(la){return function(){null==la.qc&&(la.qc=Cr(g,la.dd));return[la.qc]}}(F);r&&0<=W&&null!=Y&&(B=za,w=!0);S=new P(S,aa,za,W,Y,b,0,0,Infinity,[],"",null,k,K,m);"EXT-X-PRELOAD-HINT"==J.name&&(S.re(),E=!0);"YES"!=Z(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;w&&(G||0!=z[0].Ca?(w=!1,B=null):z=[]);(p=
840
+ Ar(n,"EXT-X-BYTERANGE"))?(x=t(Ts(c,p.value)),u=x.next().value,x=x.next().value):z.length&&(u=z[0].Ca,x=z[z.length-1].ka);c="";p=null;"image"==h&&(c="1x1",h=Ar(n,"EXT-X-TILES"))&&(c=zr(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(p=Number(h)));var ta=null;b=new P(e,r,function(){if(B)return B();null==ta&&(ta=Ks(d.i,f));return ta.length?[ta]:[]},u,x,b,l,0,Infinity,z,c,p,y,A,m);w&&(a.Pa=!0,b.uf(),E&&b.re());return b}
841
+ 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]}
842
+ 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(Z(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Yr(a)&&e.has(p)&&(r=e.get(p));var u=[],x=null,y=r;m=[];for(var w=0;w<g.length;w++){var A=g[w],z=0==w?r:x.endTime;p=l+n+w;Ar(A.g,"EXT-X-DISCONTINUITY")&&(k++,y=z);var B=t(A.g);for(var G=B.next();!G.done;G=B.next())G=G.value,"EXT-X-KEY"==G.name&&("AES-128"==zr(G,"METHOD")?h=Qs(a,G,b):h=void 0);e.set(p,
843
+ 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,x,A,z,f,b.h,c,d,y,h))(x=Br(A.g,"EXT-X-BITRATE"))?m.push({bitrate:x,duration:z.endTime-z.startTime}):m.length&&(x=m.pop(),x.duration+=z.endTime-z.startTime,m.push(x)),x=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(E,F){return E+F.duration},0),b=Math.round(m.reduce(function(E,F){return E+F.bitrate*F.duration},
844
+ 0)/b*1E3));if(m=u.some(function(E){return null!=E.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(E){return function(){var F=u[E.mc];if(F){if(null!=F.g)return F.g+E.lc;E.lc-=F.endTime-F.startTime;E.mc+=1}return null}}(c),c.kc=0,c.$c=d,f=function(E){return function(){var F=u[E.$c];if(F){F!=E.nb&&(E.kc+=F.endTime-F.startTime);if(null!=F.g)return F.g+E.kc;--E.$c}return null}}(c);null==c.nb.g;)c.nb.g=f(),null==c.nb.g&&
845
+ (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.Qe(a);return{segments:u,bandwidth:b}}
846
+ 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"}
847
+ 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 H(function(x){if(1==x.g){f=gf;g=Math.trunc((d.segments.length-1)/2);h=Ks(d.segments[g].i,e);k=new cc(h);l=k.ua.split(".").pop();m=Us[b];if((n=m[l])||(n=ws[l])||(n=Es(b,c)))return x.return(n);p=af([h],a.g.retryParameters);p.method="HEAD";return C(x,ys(a,p,f,{type:1}),2)}r=x.h;return(u=r.headers["content-type"])?x.return(u.split(";")[0]):x.return(Fs(b))})}
848
+ 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,af([b],a.g.retryParameters),0,{type:c?2:3})}
849
+ function Ur(a){var b,c;H(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)),ya(d,0);c=Aa(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()}
850
+ function ys(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",Tr);
851
+ 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",
852
+ 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;
853
+ b=zr(a,"URI");b=Sr(b);b=M(b.data);b=vc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=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=Xf(a,b,new Set,0);return vc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
854
+ zr(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?vc("org.w3.clearkey",null):null}},Vr="VOD",Os="EVENT",Bs="LIVE",as={Rf:Vr,Ah:Os,Fh:Bs};lh.m3u8=function(){return new Tr};jh["application/x-mpegurl"]=function(){return new Tr};jh["application/vnd.apple.mpegurl"]=function(){return new Tr};function Vs(a){var b=0,c=qb(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=Yf(b.value,"LA_URL")){a=b.textContent;break a}a=""}else a="";return a}
855
+ function Xs(a){a=Sf(a.textContent);a=Vs(a).filter(function(b){return b.type===Ys})[0];if(!a)return null;a=xf(a.value,!0);return(a=qg(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=ct("ftyp",b,d,b,c);b=ct("dref",dt);et=ct("dinf",b)}this.g=a}
856
+ $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=ct;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/(ft+1));h=Math.floor(h%(ft+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(gt(e,4)),[0,0,0,0],v(gt(k,4)),v(gt(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,
857
+ 0,64,0,0,0],v(gt(f,2)),[0,0],v(gt(g,2)),[0,0]));e=ct("tkhd",e);f=ct;k=a.duration*a.timescale;g=Math.floor(k/(ft+1));k=Math.floor(k%(ft+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(gt(a.timescale,4)),v(gt(g,4)),v(gt(k,4)),v(gt(h,2)),[0,0]));g=ct("mdhd",g);k=a;h=new Uint8Array([]);switch(k.type){case "video":h=ht;break;case "audio":h=it}k=ct("hdlr",h);a:{switch(a.type){case "video":a=ct("minf",
858
+ ct("vmhd",jt),et,kt(a));break a;case "audio":a=ct("minf",ct("smhd",lt),et,kt(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=ct;e=c.duration*c.timescale;d=Math.floor(e/(ft+1));e=Math.floor(e%(ft+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(gt(c.timescale,4)),v(gt(d,4)),v(gt(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,
859
+ 0,0,255,255,255,255]));d=ct("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(gt(g.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1])),g=ct("trex",g),f=Vf(f,g);e=ct("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(bt.byteLength+b.byteLength);d.set(bt);
860
+ d.set(b,bt.byteLength);return d};
861
+ function kt(a){var b=ct,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=ct("avcC",a.na);else{e=ct;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.La.length;n++){var p=mt(a.La[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=
862
+ 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(gt(c,2)),v(gt(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([]);
863
+ a.encrypted&&(h=nt(a),d="encv");c=ct(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=ct("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(gt(d,2)),v(gt(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=nt(a),e="encv"),c=ct(e,d,c,h));break;
864
+ case "audio":if(a.codecs.includes("mp3"))a=ct(".mp3",ot(a));else if(a.codecs.includes("ac-3"))c=ct("dac3",a.ca),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=nt(a),d="enca"),a=ct(d,ot(a),c,e);else if(a.codecs.includes("ec-3"))c=ct("dec3",a.ca),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=nt(a),d="enca"),a=ct(d,ot(a),c,e);else{if(0<a.ca.byteLength)c=ct("esds",a.ca);else{c=ct;d=a.id+1;e=a.stream.bandwidth||0;h=a.stream.channelsCount||2;k=a.stream.audioSamplingRate||44100;l=wc("audio",a.codecs.split(","));
865
+ 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(gt(d,2)),[0,4,17,64,21,0,6,0],v(gt(e,4)),v(gt(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=nt(a),d="enca");a=ct(d,ot(a),c,e)}c=a}a=ct("stsd",pt,c);return b("stbl",a,ct("stts",qt),ct("stsc",rt),ct("stsz",st),ct("stco",
866
+ tt))}function ot(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(gt(a.stream.audioSamplingRate||44100,2)),[0,0]))}
867
+ function nt(a){var b=ct;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(gt(d,4))));c=ct("frma",c);d=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0]);d=ct("schm",d);e=ct;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=mt(h.value)}a=new Uint8Array([0,
868
+ 0,0,0,0,0,1,8]);f=ct("tenc",a,f);return b("sinf",c,d,e("schi",f))}
869
+ function ut(a){var b=new Uint8Array([]);a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=ct,e=new Uint8Array([0,0,0,0].concat(v(gt(c.data?c.data.mb:0,4))));e=ct("mfhd",e);var f;var g=c.data?c.data.Ka:[];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=ct("sdtp",h);var l=g.length+92;h=ct;f=new Uint8Array([0,0,0,58].concat(v(gt(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));f=ct("tfhd",f);k=c.data?c.data.baseMediaDecodeTime:0;var m=
870
+ Math.floor(k%(ft+1));k=new Uint8Array([1,0,0,0].concat(v(gt(Math.floor(k/(ft+1)),4)),v(gt(m,4))));k=ct("tfdt",k);var n=l;l=c.data?c.data.Ka:[];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(gt(m,4)),v(gt(n,4))),0);for(n=0;n<m;n++){var u=l[n];p=gt(u.duration,4);var x=gt(u.size,4),y=u.flags;u=gt(u.ab,4);r.set([].concat(v(p),v(x),[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=ct("trun",r);g=h("traf",f,k,l,g);d=d("moof",e,g);e=
871
+ c.data?c.data.Ka:[];c=new Uint8Array([]);e=t(e);for(g=e.next();!g.done;g=e.next())c=Vf(c,g.value.data);c=ct("mdat",c);b=Vf(b,d,c)}return b}function gt(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function mt(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}
872
+ function ct(a){var b=La.apply(1,arguments),c=vt[a];c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],vt[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}
873
+ var at=!1,ft=Math.pow(2,32)-1,vt={},ht=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]),it=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]),qt=new Uint8Array([0,0,0,0,0,0,0,0]),rt=new Uint8Array([0,0,0,0,0,0,0,0]),tt=new Uint8Array([0,0,0,0,0,0,0,0]),st=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),jt=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),lt=new Uint8Array([0,
874
+ 0,0,0,0,0,0,0]),pt=new Uint8Array([0,0,0,0,0,0,0,1]),bt=new Uint8Array([]),dt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),et=new Uint8Array([]);function wt(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.s=1;this.i=null;this.A=new Ua(5);this.o=new cd(function(){xt(a)});this.u=new Ve;this.m=new Map}q=wt.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,yt(c),2);if(!c.h)throw new N(2,7,7001);return d.return(c.j)})};
875
+ function xt(a){var b;H(function(c){switch(c.g){case 1:return wa(c,2),C(c,yt(a),4);case 4:ya(c,3);break;case 2:b=Aa(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()};
876
+ q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return wa(c,2),C(c,yt(a),4);if(2!=c.g)return ya(c,0);b=Aa(c);if(!a.h||!b)return c.return();a.h.onError(b);D(c)})};q.onExpirationUpdated=function(){};
877
+ function yt(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),
878
+ 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.Ba(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=
879
+ [];for(u=0;u<p.length;u++){var x=p[u],y=x.getAttribute("SystemID").toLowerCase(),w=n[y];if(w){var A=Xs(x);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(x.textContent);y=Tf(y.replace(/-/g,""));y=[{initData:Xf(z,y,new Set,0),initDataType:"cenc",keyId:A}];y=vc(w,y);A&&y.keyIds.add(A);if(w=Zs.get(w))y.licenseServerUri=
880
+ w(x);r.push(y)}}n=r}else n=[];u=n;r=[];n=[];p=[];m=Zf(m,"StreamIndex");m=t(m);for(x=m.next();!x.done;x=m.next()){x=x.value;w=Zf(x,"QualityLevel");y=l.timescale;A=l.duration;z=Zf(x,"c");for(var B=[],G=0,E=0;E<z.length;++E){var F=z[E],I=z[E+1],J=gg(F,"t",mg),K=gg(F,"d",mg);F=gg(F,"r",kg);if(!K)break;J=null!=J?J:G;F=F||0;if(0>F)if(I){I=gg(I,"t",mg);if(null==I)break;else if(J>=I)break;F=Math.ceil((I-J)/K)-1}else{if(Infinity==A)break;else if(J/y>=A)break;F=Math.ceil((A*y-J)/K)-1}for(I=0;I<=F;++I)G=J+K,
881
+ B.push({start:J/y,end:G/y,We:J}),J=G}y=B;w=t(w);for(A=w.next();!A.done;A=w.next())(A=zt(a,x,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,x=t(0<n.length?n:[null]),A=x.next();!A.done;A=x.next())w=m,y=w.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++,
882
+ 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(w,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,
881
883
  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()},
884
+ function zt(a,b,c,d,e,f){var g=b.getAttribute("Type");if("audio"!==g&&"video"!==g&&"text"!==g)return Za("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 x=a.i.getDuration();a.i.Ba(Math.min(u,x));var y={id:k,originalId:b.getAttribute("Name")||String(k),createSegmentIndex:function(){return Promise.resolve()},
883
885
  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=
886
+ timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1};if(e=b.getAttribute("Subtype"))(e=At[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 Za('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!Bt.includes(e.toUpperCase()))return Za("Codec not supported:",e),null;c=Ct(c,g,e,
887
+ y);y.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return Za("Quality unsupported without CodecPrivateData",g),null;y.type="audio";y.mimeType="mss/audio/mp4";y.codecs=Dt(e,c);break;case "video":if(!c)return Za("Quality unsupported without CodecPrivateData",g),null;y.type="video";y.mimeType="mss/video/mp4";y.codecs=Et(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();
888
+ if(a.m.has(y.id))var w=a.m.get(y.id);else w=[],"video"==y.type&&(w=y.mssPrivateData.codecPrivateData.split("00000001").slice(1)),w={id:y.id,type:y.type,codecs:y.codecs,encrypted:y.encrypted,timescale:y.mssPrivateData.timescale,duration:y.mssPrivateData.duration,La:w,ca:new Uint8Array([]),na:new Uint8Array([]),data:null,stream:y},w=(new $s([w])).initSegment(),a.m.set(y.id,w);w=Ft(a,new rh(function(){return[]},0,null,null,void 0,w),y,b,d);y.segmentIndex=new gj(w);return Promise.resolve()};y.closeSegmentIndex=
887
889
  function(){y.segmentIndex&&(y.segmentIndex.release(),y.segmentIndex=null)};return y}
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|
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):""}
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))}})}
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;
895
- Ot()&&(Ye("http",Ht,2,!0),Ye("https",Ht,2,!0),Ye("blob",Ht,2,!0));function Pt(){}
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,
890
+ function Ct(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|
891
+ b<<3;b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function Dt(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 Et(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
892
+ function Ft(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 uc(a.l,[f.replace("{start time}",String(k.uc.We))])}}(g),0,null,b,0,0,c.mssPrivateData.duration));return d}L("shaka.mss.MssParser",wt);var Bt="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),At={CAPT:"main",SUBT:"alternate",DESC:"main"};lh.ism=function(){return new wt};
893
+ jh["application/vnd.ms-sstr+xml"]=function(){return new wt};function Gt(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 Ht(){}function It(a,b,c,d,e){var f=new Jt;sf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Kt,h={bf:!1,Mf:!1};a=Lt(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.bf=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new cd(function(){h.Mf=!0;g.abort()});k.S(b/1E3);a.finally(function(){k.stop()})}return a}
894
+ function Lt(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,x,y,w,A,z;return H(function(B){switch(B.g){case 1:return h=Mt,k=Nt,p=n=0,r=Date.now(),wa(B,2),C(B,h(a,c),4);case 4:l=B.h;f(Ot(l.headers));if("HEAD"==c.method){B.B(5);break}u=l.clone().body.getReader();y=(x=l.headers.get("Content-Length"))?parseInt(x,10):0;w=function(G){function E(){var F,I;return H(function(J){switch(J.g){case 1:return wa(J,2),C(J,u.read(),4);case 4:F=J.h;ya(J,3);break;case 2:return Aa(J),J.return();case 3:if(F.done){J.B(5);break}n+=
895
+ F.value.byteLength;if(!g){J.B(5);break}return C(J,g(F.value),5);case 5:I=Date.now();if(100<I-r||F.done)e(I-r,n-p,y-n),p=n,r=I;F.done?G.close():(G.enqueue(F.value),E());D(J)}})}E()};new k({start:w});return C(B,l.arrayBuffer(),6);case 6:m=B.h;case 5:ya(B,3);break;case 2:A=Aa(B);if(d.bf)throw new N(1,1,7001,a,b);if(d.Mf)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,A,b);case 3:return z=Ot(l.headers),B.return(Gt(z,m,l.status,a,l.url,b))}})}
896
+ function Ot(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Pt(){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",Ht);Ht.isSupported=Pt;Ht.parse=It;var Mt=window.fetch,Kt=window.AbortController,Nt=window.ReadableStream,Jt=window.Headers;
897
+ Pt()&&(Ye("http",It,2,!0),Ye("https",It,2,!0),Ye("blob",It,2,!0));function Qt(){}
898
+ function Rt(a,b,c,d,e){var f=new St,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=Tt(f);e(r);n=!0}};f.onload=function(){var r=Tt(f),u=f.response;try{var x=Gt(r,u,f.status,a,f.responseURL,c);l(x)}catch(y){m(y)}};f.onerror=function(r){m(new N(1,1,1002,a,r,
897
899
  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)};
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)};
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)})};
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()}
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)};
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)})})}
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()}
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})})};
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)})}
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+
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}};
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);}
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++,
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?
900
+ function Tt(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",Qt);Qt.parse=Rt;var St=window.XMLHttpRequest;Ye("http",Rt,1,!0);Ye("https",Rt,1,!0);Ye("blob",Rt,1,!0);function Ut(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Vt(a){return a.xa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ca+":"+a.ka}function Wt(a,b){return Gj(a.g.xa(),a.g.Ca,a.g.ka,b.streaming.retryParameters)};function Xt(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Yt(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Xt.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 Zt(a){var b=this;this.o=a;this.j=new Map;this.i=new hf(function(){return $t(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Xt}Zt.prototype.destroy=function(){return this.i.destroy()};function au(a,b,c){a.m=b;a.l=c}function $t(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
901
+ function bu(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,cu(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 x=a.g;a.m(0==x.i?0:x.j/x.i,a.g.h);return u.return(f(h))})});a.j.set(b,g)}function du(a){return H(function(b){return 1==b.g?C(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
902
+ function cu(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;xb(a.h,e);return g.return(f.data)})};function eu(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()}}eu.prototype.abort=function(){var a=this;return H(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 ya(b,0);Aa(b);D(b)})};
903
+ function fu(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)})}})}eu.prototype.store=function(){return this.h};eu.prototype.promise=function(){return this.g};function gu(a){this.h=a;this.g=[]}gu.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function hu(a,b){return iu(a,b,"readwrite")}function iu(a,b,c){c=a.h.transaction([b],c);var d=new eu(c,b);a.g.push(d);d.promise().then(function(){xb(a.g,d)},function(){xb(a.g,d)});return d};function ju(a,b,c){this.h=new gu(a);this.i=b;this.g=c}q=ju.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return ku(this.i)};q.removeSegments=function(a,b){return lu(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return H(function(d){if(1==d.g)return C(d,mu(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.df(e)}))})};q.addManifests=function(){return ku(this.g)};
904
+ q.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function nu(a,b,c){a=hu(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=hu(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 lu(this,this.g,a,b)};
905
+ q.getManifests=function(a){var b=this,c;return H(function(d){if(1==d.g)return C(d,mu(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=iu(a.h,a.g,"readonly"),c=new Map,C(d,fu(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.df=function(a){return a};q.Cc=function(a){return Promise.resolve(a)};
906
+ function ku(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=hu(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)})};
907
+ function lu(a,b,c,d){a=hu(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()}
908
+ function mu(a,b,c){var d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=iu(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 ou(a){this.g=new gu(a)}ou.prototype.destroy=function(){return this.g.destroy()};ou.prototype.getAll=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=iu(a.g,"session-ids","readonly"),c=[],C(d,fu(b,function(e,f){c.push(f)}),2)):3!=d.g?C(d,b.promise(),3):d.return(c)})};ou.prototype.add=function(a){var b=hu(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()};
909
+ ou.prototype.remove=function(a){var b=this,c;return H(function(d){return 1==d.g?(c=hu(b.g,"session-ids"),C(d,fu(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):C(d,c.promise(),0)})};function pu(){this.g=new Map}pu.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)};pu.prototype.init=function(){var a=this;qu.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)};
910
+ function ru(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Ga: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 su(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Ga:d,oa:f},e)})})}
911
+ function tu(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 uu(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function vu(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()}
912
+ function wu(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=qu,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 xu(a,b){qu.set(a,b)}L("shaka.offline.StorageMuxer",pu);pu.unregister=function(a){qu.delete(a)};pu.register=xu;pu.prototype.destroy=pu.prototype.destroy;var qu=new Map;function yu(){ju.apply(this,arguments)}pa(yu,ju);yu.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return H(function(g){d=hu(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)})};
913
+ yu.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=zu(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})})};
914
+ function zu(a,b){Au(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Bu(e,a.startTime,b)})}
915
+ function Bu(a,b,c){var d=a.initSegmentUri?Cu(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=Cu(g.uri);return{startTime:b+
916
+ 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}}yu.prototype.df=function(a){return{data:a.data}};
917
+ function Cu(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);}
918
+ function Au(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++,
919
+ 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 Du(){ju.apply(this,arguments)}pa(Du,ju);
920
+ Du.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(Eu(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?
919
921
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
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,
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")?
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
+ function Eu(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,
923
+ 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 Fu(){ju.apply(this,arguments)}pa(Fu,ju);q=Fu.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 nu(this,a,b)};q.Cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Gu(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Gu.prototype;
924
+ 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 yu(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Du(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
925
+ new Du(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Fu(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new ou(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,
924
926
  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)}})};
925
927
  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};
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};
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}
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
+ 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,Hu(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,C(b,a.init(),0)}})};
929
+ function Hu(){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}xu("idb",function(){return id("CrKey")||hd()||!window.indexedDB?null:new Gu});function Iu(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Iu.prototype.Ga=function(){return this.i};Iu.prototype.oa=function(){return this.h};Iu.prototype.key=function(){return this.l};Iu.prototype.toString=function(){return this.j};
930
+ function Ju(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 Iu(b,c,d,Number(a[4])):null};function Ku(a,b){this.h=a;this.g=b}
931
+ function Lu(a,b){var c=new Q(null,0);c.Ba(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Mu(a,d,e,c);e=b.streams.filter(function(l){return l.type==zc}).map(function(l){return Nu(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Nu(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=
930
932
  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}}
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=
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}
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,
933
+ function Mu(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=
934
+ b.next())for(e=e.value,g=Nu(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=Nu(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}
935
+ function Nu(a,b,c){var d=b.segments.map(function(e){return Ou(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,
934
936
  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}}
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()};
937
+ function Ou(a,b){var c=new Iu("segment",a.h,a.g,b.dataKey);return new P(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Pu(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}function Pu(a,b){var c=new Iu("segment",a.h,a.g,b);return new rh(function(){return[c.toString()]},0,null)};function Qu(){this.g=null}q=Qu.prototype;q.configure=function(){};
938
+ 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=Ju(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new pu;xa(m);return C(m,e.init(),4);case 4:return C(m,tu(e,d.Ga(),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 Ku(d.Ga(),d.oa()),l=Lu(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ba(m),C(m,e.destroy(),7);case 7:Ca(m,0)}})};q.stop=function(){return Promise.resolve()};
937
939
  q.update=function(){};
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)})}
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))};
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())}}
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,
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,
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);}
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)})}
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}
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;
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");
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(){}
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}}),
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)}}
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);
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=
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);
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)};
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()}
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;
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)};
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=
995
- uw;window.shakaMediaKeysPolyfill=!0}};
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,
940
+ 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 pu,wa(m,2,3),C(m,e.init(),5);case 5:return C(m,tu(e,d.Ga(),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 Ba(m),C(m,e.destroy(),10);case 10:Ca(m,0);break;case 2:Aa(m),m.B(3)}})};
941
+ jh["application/x-offline-manifest"]=function(){return new Qu};function Ru(){}function Su(a){var b=Ju(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?Tu(b.key(),b):Ke(new N(2,1,9004,a));return a}
942
+ function Tu(a,b){var c=new pu;return Me(void 0).fa(function(){return c.init()}).fa(function(){return tu(c,b.Ga(),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",Ru);Ru.plugin=Su;Ye("offline",Su);function Uu(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),x=u.next();!x.done;x=u.next())if(x=x.value,Vu(x.info,p)){x.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=Wu(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)}})}
943
+ function Wu(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(){}}),wa(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:ya(f,3);break;case 2:return Aa(f),C(f,d.destroy(),5);case 5:return f.return([]);case 3:return wa(f,6),C(f,Mg(d),8);case 8:ya(f,7);break;case 6:return Aa(f),C(f,d.destroy(),
944
+ 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 wa(h,2),C(h,Ng(d,g),4);if(2!=h.g)return e.push(g),ya(h,0);Aa(h);D(h)})})),10);case 10:return C(f,d.destroy(),11);case 11:return f.return(e)}})}
945
+ function Vu(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&yb(a.audioCapabilities,b.audioCapabilities,c)&&yb(a.videoCapabilities,b.videoCapabilities,c)};function Xu(a,b,c){var d=b.presentationTimeline.getDuration();b=Yu(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Zu(a,b){var c=Lu(new Ku(a.Ga(),a.oa()),b),d=b.appMetadata||{};c=Yu(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}}
946
+ function Yu(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 $u(){this.g={}}function av(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 bv(a,b){a.g[b.id]=b.bandwidth||2048}function cv(a,b){a=a.g[b];null==a&&(a=0);return a};function dv(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.Bb()):(this.h=ll(),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 $t(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);
947
+ case 4:b.h=null,b.g=null,D(k)}})})}function ev(){if(dd())a:{var a=t(qu.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=dv.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.Bb=function(){return this.g};
948
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Zt(this.g);this.j.push(f);b=fv(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 $t(f)});b.finally(function(){xb(d.j,f)});return gv(this,b)};
949
+ function fv(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,x,y,w,A,z;return H(function(B){switch(B.g){case 1:return hv(),h=g=null,k=new pu,n=m=l=null,wa(B,2,3),C(B,d(),5);case 5:return g=B.h,C(B,iv(a,b,g,e),6);case 6:p=B.h;jv(a);r=!p.presentationTimeline.T()&&!p.presentationTimeline.Gb();if(!r)throw new N(2,9,9005,b);return C(B,kv(a,p,function(G){n=n||G},e),7);case 7:h=B.h;jv(a);if(n)throw n;return C(B,lv(p,e),8);case 8:return C(B,k.init(),9);case 9:return jv(a),C(B,ru(k),10);case 10:return l=B.h,jv(a),u=mv(h,
950
+ p,b,c,e,f),x=u.Pg,y=u.Se,C(B,l.oa.addManifests([x]),11);case 11:w=B.h;jv(a);m=w[0];jv(a);if(n)throw n;return C(B,nv(a,y,m,x,f,e,l.oa,p,h),12);case 12:return jv(a),A=new Iu("manifest",l.path.Ga,l.path.oa,m),B.return(Zu(A,x));case 3:return Ba(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:Ca(B,0);break;case 2:z=Aa(B);if(null==m){B.B(18);break}return C(B,ov(m),18);case 18:throw n||z;}})}
951
+ function nv(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,x,y,w,A;return H(function(z){switch(z.g){case 1:l={};m=0;n=function(B,G){var E,F,I,J,K,S,R;return H(function(aa){if(1==aa.g){E={};F=t(B);for(I=F.next();!I.done;E={xb:E.xb},I=F.next())E.xb=I.value,J=Wt(E.xb,f),K=E.xb.i,S=E.xb.h,R=function(W){return function(Y){var za,ta,la;return H(function(ua){if(1==ua.g)return C(ua,g.addSegments([{data:Y}]),2);za=ua.h;jv(a);ta=W.xb.g;la=Vt(ta);l[la]=za[0];m+=Y.byteLength;D(ua)})}}(E),bu(e,E.xb.groupId,J,K,S,R);return C(aa,
952
+ du(e),2)}if(!G)return aa.B(0);jv(a);pv(h,d,k,f);return C(aa,g.updateManifest(c,d),0)})};p=!1;wa(z,2);if(!qv(h)||!p||rv(h)){z.B(4);break}return C(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return jv(a),b=b.filter(function(B){return!B.h}),r=l,u=m,l={},m=0,C(z,sv(g,c,d,r,u,function(){return jv(a)}),6);case 6:jv(a);case 4:if(p){z.B(7);break}return C(z,n(b,!1),8);case 8:return jv(a),x=l,y=m,l={},m=0,C(z,sv(g,c,d,x,y,function(){return jv(a)}),9);case 9:jv(a);case 7:ya(z,0);break;case 2:return w=
953
+ Aa(z),A=Object.values(l),C(z,g.removeSegments(A,function(){}),10);case 10:throw w;}})}function ov(a){var b,c,d,e;return H(function(f){switch(f.g){case 1:return b=new pu,C(f,b.init(),2);case 2:return C(f,ru(b),3);case 3:return c=f.h,d=new Iu("manifest",c.path.Ga,c.path.oa,a),C(f,b.destroy(),4);case 4:return e=new dv,C(f,e.remove(d.toString()),0)}})}
954
+ function sv(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,x,y;return H(function(w){switch(w.g){case 1:g=!1;wa(w,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&&
955
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return C(w,a.updateManifest(b,c),4);case 4:g=!0;f();ya(w,0);break;case 2:return x=Aa(w),C(w,ov(b),5);case 5:if(g){w.B(6);break}y=Object.values(d);return C(w,a.removeSegments(y,function(){}),6);case 6:throw x;}})}
956
+ function lv(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,A,z,B,G,E,F,I,J,K,S,R,aa,W;return H(function(Y){switch(Y.g){case 1:return c={width:Infinity,height:Infinity},Dd(a,b.restrictions,c),C(Y,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,
957
+ d.push(Xd(r));u=t(a.imageStreams);for(x=u.next();!x.done;x=u.next())y=x.value,d.push(Yd(y));return C(Y,b.offline.trackSelectionCallback(d),3);case 3:w=Y.h;A=a.presentationTimeline.getDuration();z=0;B=t(w);for(G=B.next();!G.done;G=B.next())E=G.value,F=E.bandwidth*A/8,z+=F;wa(Y,4);return C(Y,b.offline.downloadSizeCallback(z),6);case 6:I=Y.h;if(!I)throw new N(2,9,9014);ya(Y,5);break;case 4:J=Aa(Y);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:K=new Set;S=new Set;R=new Set;aa=t(w);for(G=aa.next();!G.done;G=
958
+ aa.next())W=G.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(za){return K.has(za.id)});a.textStreams=a.textStreams.filter(function(za){return S.has(za.id)});a.imageStreams=a.imageStreams.filter(function(za){return R.has(za.id)});tv(a);D(Y)}})}
959
+ function mv(a,b,c,d,e,f){var g=Xu(c,b,d),h=e.offline.progressCallback;au(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=qv(b)&&!rv(b),l=null;k&&(l=uv.get(a.g.keySystem));for(var m=new $u,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())bv(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())av(m,n.value);m=vv(f,m,b,e);f=m.streams;m=m.Se;p=a.g;n=e.offline.usePersistentLicense;
960
+ p&&n&&(p.initData=[]);return{Pg:{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},Se:m}}function qv(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
961
+ function rv(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 pv(a,b,c,d){b.expiration=c.Ic();c=Tg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(qv(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}q.remove=function(a){return wv(this,xv(this,a))};
962
+ function xv(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:hv();c=Ju(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new pu;xa(k);return C(k,e.init(),4);case 4:return C(k,tu(e,d.Ga(),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([yv(a,h,e),zv(f,d,h)]),2);case 2:return Ba(k),C(k,e.destroy(),8);case 8:Ca(k,0)}})}
963
+ function Av(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 yv(a,b,c){return H(function(d){return C(d,Bv(a.g,a.h.drm,c,b),0)})}
964
+ function zv(a,b,c){function d(){}var e=Cv(c);Zu(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.bh=function(){return wv(this,Dv(this))};
965
+ function Dv(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return hv(),b=a.g,c=a.h.drm,d=new pu,e=!1,xa(n),C(n,d.init(),4);case 4:f=[],uu(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,Uu(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 Ba(n),C(n,d.destroy(),11);case 11:Ca(n,3);break;case 3:return n.return(!e)}})}
966
+ q.list=function(){return wv(this,Ev())};function Ev(){var a,b,c;return H(function(d){switch(d.g){case 1:return hv(),a=[],b=new pu,xa(d),C(d,b.init(),4);case 4:return c=Promise.resolve(),su(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=Zu(new Iu("manifest",e.Ga,e.oa,l),k);a.push(k)});D(h)})})}),C(d,c,2);case 2:return Ba(d),C(d,b.destroy(),6);case 6:Ca(d,3);break;case 3:return d.return(a)}})}
967
+ function iv(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),jv(a),C(l,c.start(b,g),2);if(3!=
968
+ l.g)return h=l.h,jv(a),k=Fv(h),C(l,Promise.all(pf(k,function(m){return m.createSegmentIndex()})),3);jv(a);if(e)throw e;return l.return(h)})}function kv(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)}})}
969
+ function vv(a,b,c,d){var e=new Map,f=Fv(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Gv(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()),Se:Array.from(e.values())}}
970
+ function Gv(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,
971
+ closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,external:d.external},h=e.offline.numberOfParallelDownloads,k=0;Hv(d,c.presentationTimeline.fb(),function(l){var m=Vt(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=cv(b,d.id)*p;p=Yt(a.g,p);f.set(m,new Ut(l,p,k,!1))}l.h&&(n=Vt(l.h),f.has(n)||(p=.5*cv(b,d.id),p=Yt(a.g,p),f.set(n,new Ut(l.h,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,
972
+ appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Hv(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 jv(a){if(a.l.g)throw new N(2,9,7001);}function hv(){if(!ev())throw new N(2,9,9E3);}
973
+ function wv(a,b){return H(function(c){if(1==c.g)return a.i.push(b),xa(c),C(c,b,4);if(2!=c.g)return c.return(c.h);Ba(c);xb(a.i,b);return Ca(c,0)})}function gv(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){xb(a.i,c)})}function Cv(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)}
974
+ function Bv(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=vu(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Av(d,!1),videoCapabilities:Av(d,!0)}});return C(h,Uu(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)})}
975
+ function Fv(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}
976
+ function tv(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",dv);dv.deleteAll=function(){var a;return H(function(b){return 1==b.g?(a=new pu,xa(b),C(b,wu(a),2)):5!=b.g?(Ba(b),C(b,a.destroy(),5)):Ca(b,0)})};dv.prototype.list=dv.prototype.list;
977
+ dv.prototype.removeEmeSessions=dv.prototype.bh;dv.prototype.remove=dv.prototype.remove;dv.prototype.store=dv.prototype.store;dv.prototype.getNetworkingEngine=dv.prototype.Bb;dv.prototype.getConfiguration=dv.prototype.getConfiguration;dv.prototype.configure=dv.prototype.configure;dv.prototype.destroy=dv.prototype.destroy;dv.support=ev;
978
+ var uv=(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");
979
+ Ym.offline=ev;function Iv(){}function Jv(a,b){a={priority:b||0,Xf:a};for(b=0;b<Kv.length;b++)if(Kv[b].priority<a.priority){Kv.splice(b,0,a);return}Kv.push(a)}L("shaka.polyfill",Iv);Iv.register=Jv;Iv.installAll=function(){for(var a=t(Kv),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Xf()}catch(c){Za("Error installing polyfill!",c)}}};var Kv=[];function Lv(){this.g=new Mv}function Nv(){window.AbortController||(window.AbortController=Lv,window.AbortSignal=Mv)}Lv.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(Lv.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Iv.AbortController=Lv;Lv.install=Nv;
980
+ function Mv(){Se.call(this);this.h=!1;this.g=void 0;this.onabort=null}pa(Mv,Se);ea.Object.defineProperties(Mv.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Jv(Nv);function Ov(){}function Pv(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Qv(b.value)}function Qv(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)}})}Iv.Aria=Ov;Ov.install=Pv;Jv(Pv);function Rv(){}function Sv(){Tv()}Iv.EncryptionScheme=Rv;Rv.install=Sv;Jv(Sv,-2);function Uv(){}
981
+ function Vv(){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}}),
982
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Wv);document.addEventListener("webkitfullscreenerror",Wv);document.addEventListener("mozfullscreenchange",Wv);document.addEventListener("mozfullscreenerror",Wv);document.addEventListener("MSFullscreenChange",Wv);document.addEventListener("MSFullscreenError",Wv)}}
983
+ function Wv(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)}Iv.Fullscreen=Uv;Uv.install=Vv;Jv(Vv);function Xv(){}function Yv(){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={}),Zv=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=$v)}
984
+ function $v(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,x,y,w,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 G=c.contentType;c.width&&c.height&&(G+="; width="+c.width+"; height="+c.height);c.framerate&&(G+="; framerate="+c.framerate);"pq"===
985
+ c.transferFunction&&(G+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(G)}else e=fb(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=fb(f)):e=fb(c.contentType);if(!e)return B.return(b)}if(d&&(g=d.contentType,h=fb(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);
986
+ if(!a.keySystemConfiguration)return b.supported=!0,B.return(Promise.resolve(b));p=a.keySystemConfiguration;r=[];u=[];p.audio&&(x={robustness:p.audio.robustness||"",contentType:a.audio.contentType},r.push(x));p.video&&(y={robustness:p.video.robustness||"",contentType:a.video.contentType},u.push(y));w={initDataTypes:[p.initDataType],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};r.length&&(w.audioCapabilities=r);u.length&&(w.videoCapabilities=
987
+ u);A=(a.video?a.video.contentType:"")+"#"+(a.audio?a.audio.contentType:"")+"#"+a.keySystemConfiguration.keySystem;wa(B,3);if(A in aw){z=aw[A];B.B(5);break}return C(B,navigator.requestMediaKeySystemAccess(p.keySystem,[w]),6);case 6:z=B.h,aw[A]=z;case 5:ya(B,4);break;case 3:Aa(B);case 4:z&&(b.supported=!0,b.keySystemAccess=z);case 2:return B.return(b)}})}Iv.MediaCapabilities=Xv;Xv.install=Yv;var Zv=null;Xv.originalMcap=Zv;var aw={};Xv.memoizedMediaKeySystemAccessRequests_=aw;Jv(Yv,-1);function bw(){}function cw(){var a=nd();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?dw():a?12>=a?(ew(),fw()):15>=a&&ew():gd()?gw():(id("Tizen 2")||id("Tizen 3")||id("Tizen 4"))&&hw());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&iw()}
988
+ function ew(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,La.apply(0,arguments));b.abort=function(){};return b}}function fw(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function gw(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
989
+ function hw(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Hc(b)[0]&&a(b)}}function dw(){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)}}
990
+ function iw(){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)})}Iv.MediaSource=bw;bw.install=cw;Jv(cw);function jw(){}function kw(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?lw():void 0!=window.orientation&&mw())}function lw(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
991
+ function mw(){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 nw;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change");b.dispatchEvent(c)})}Iv.Orientation=jw;jw.install=kw;function nw(){Se.call(this);this.type="";this.angle=0}pa(nw,Se);
992
+ nw.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)};
993
+ nw.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Jv(kw);function ow(){}var pw,qw,rw,sw,tw,uw;function vw(a,b){try{var c=new ww(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function xw(a){var b=this.mediaKeys;b&&b!=a&&yw(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?yw(a,this):Promise.resolve()}
994
+ function zw(a){a=M(a.initData);if(qb(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=ob(a);this.dispatchEvent(b)}Iv.PatchedMediaKeysApple=ow;
995
+ ow.uninstall=function(){pw&&(pw=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",qw),HTMLMediaElement.prototype.setMediaKeys=rw,window.MediaKeys=sw,window.MediaKeySystemAccess=tw,navigator.requestMediaKeySystemAccess=uw,qw=uw=rw=tw=sw=null,window.shakaMediaKeysPolyfill=!1)};
996
+ ow.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)pw=!0,qw=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),rw=HTMLMediaElement.prototype.setMediaKeys,sw=window.MediaKeys,tw=window.MediaKeySystemAccess,uw=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=xw;window.MediaKeys=Aw;window.MediaKeySystemAccess=ww;navigator.requestMediaKeySystemAccess=
997
+ vw;window.shakaMediaKeysPolyfill=!0}};
998
+ function ww(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,
997
999
  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;}
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",
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"))};
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."))}
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(){};
1005
- Iw.prototype.createMediaKeys=function(){};Iv(Ew,-10);function Jw(){}
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}}
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;
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),
1000
+ ww.prototype.createMediaKeys=function(){var a=new Aw(this.keySystem);return Promise.resolve(a)};ww.prototype.getConfiguration=function(){return this.g};function Aw(a){this.h=new WebKitMediaKeys(a);this.g=new kf}Aw.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Bw(this.h,a)};Aw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1001
+ function yw(a,b){a.g.ub();if(!b)return Promise.resolve();a.g.D(b,"webkitneedkey",zw);try{return Si(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}Aw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Bw(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 Cw}pa(Bw,Se);q=Bw.prototype;
1002
+ 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.Db()?"license-request":"license-renewal").set("message",ob(e.message));e=new O("message",e);c.dispatchEvent(e)});this.j.D(d,"webkitkeyadded",function(){c.g&&(Dw(c,"usable"),c.g.resolve(),c.g=null)});this.j.D(d,"webkitkeyerror",
1003
+ 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:Dw(c,"output-not-allowed");break;default:Dw(c,"internal-error")}});Dw(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
1004
+ 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.ub()}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 Dw(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new O("keystatuseschange");a.dispatchEvent(b)}
1005
+ function Cw(){this.size=0;this.g=void 0}q=Cw.prototype;q.Db=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&&mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function Ew(){}function Fw(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Gw,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Hw,window.MediaKeys=Iw,window.MediaKeySystemAccess=Jw,window.shakaMediaKeysPolyfill=!0)}function Gw(){return Promise.reject(Error("The key system specified is not supported."))}
1006
+ function Hw(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Iv.PatchedMediaKeysNop=Ew;Ew.install=Fw;function Iw(){throw new TypeError("Illegal constructor.");}Iw.prototype.createSession=function(){};Iw.prototype.setServerCertificate=function(){};Iw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Jw(){this.keySystem="";throw new TypeError("Illegal constructor.");}Jw.prototype.getConfiguration=function(){};
1007
+ Jw.prototype.createMediaKeys=function(){};Jv(Fw,-10);function Kw(){}
1008
+ function Lw(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Mw="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Nw;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ow;window.MediaKeys=Pw;window.MediaKeySystemAccess=Qw;window.shakaMediaKeysPolyfill=!0}}
1009
+ function Rw(a){var b=Mw;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Nw(a,b){try{var c=new Qw(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Ow(a){var b=this.mediaKeys;b&&b!=a&&Sw(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Sw(a,this);return Promise.resolve()}Iv.PatchedMediaKeysWebkit=Kw;Kw.install=Lw;
1010
+ function Qw(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),
1009
1011
  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"]):
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"),
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)};
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;
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"))};
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))}}
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)}
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"))}
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,
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};
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});
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);
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")&&
1031
- !p.getAttribute("style")&&(g=Ix(l,"region",f,"")[0]);Lx(b,p,g,r,e,u,0==a.length);return b}
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=
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",
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=
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)}
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}}
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}}
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}
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;
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]))}
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)}
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=
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)):
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)}
1056
- function ky(a,b){return a&&0<a.length?a:b}
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;
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)};
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;
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,
1012
+ 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;}Qw.prototype.createMediaKeys=function(){var a=new Pw(this.g);return Promise.resolve(a)};Qw.prototype.getConfiguration=function(){return this.h};function Pw(a){this.l=a;this.h=null;this.g=new kf;this.i=[];this.j=new Map}
1013
+ function Sw(a,b){a.h=b;a.g.ub();var c=Mw;b&&(a.g.D(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=ob(d.initData);a.h.dispatchEvent(e)}),a.g.D(b,c+"keymessage",function(d){var e=Tw(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Db()?"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=Tw(a,d.sessionId))Uw(d,"usable"),
1014
+ d.g&&d.g.resolve(),d.g=null}),a.g.D(b,c+"keyerror",function(d){var e=Tw(a,d.sessionId);e&&e.handleError(d)}))}Pw.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 Vw(b,this.l,a);this.i.push(a);return a};Pw.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
1015
+ Pw.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Tw(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 Vw(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 Ww}pa(Vw,Se);q=Vw.prototype;
1016
+ 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?Uw(this,"output-restricted"):1==b?Uw(this,"expired"):Uw(this,"internal-error"))};
1017
+ function Xw(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=Rw("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}
1018
+ function Yw(a,b,c){if(a.g)a.g.then(function(){return Yw(a,b,c)}).catch(function(){return Yw(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=Rw("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
1019
+ function Uw(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 Xw(this,b,null)};q.load=function(a){return"persistent-license"==this.l?Xw(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Ie;Yw(this,b,a);return b};
1020
+ 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=Rw("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 Ww(){this.size=0;this.g=void 0}q=Ww.prototype;q.Db=function(){return this.g};
1021
+ 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&&mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Mw="";Jv(Lw);function Zw(){}function $w(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ax,Object.defineProperty(a,"disablePictureInPicture",{get:bx,set:cx,enumerable:!0,configurable:!0}),document.exitPictureInPicture=dx,document.addEventListener("webkitpresentationmodechanged",ex,!0))}}
1022
+ function ex(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)}
1023
+ function ax(){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 dx(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
1024
+ function bx(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function cx(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Iv.PiPWebkit=Zw;Zw.install=$w;Jv($w);function fx(){}function gx(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=hx))}function hx(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Iv.RandomUUID=fx;fx.install=gx;Jv(gx);function ix(){}function jx(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=kx)}function kx(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Iv.StorageEstimate=ix;ix.install=jx;Jv(jx);function lx(){}function mx(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:nx})}function nx(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Iv.Symbol=lx;lx.install=mx;Jv(mx);function ox(){}function px(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Iv.VideoPlayPromise=ox;ox.install=px;Jv(px);function qx(){}function rx(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||kd())&&(a.getVideoPlaybackQuality=sx)}}function sx(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Iv.VideoPlaybackQuality=qx;qx.install=rx;Jv(rx);function tx(){}function ux(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=vx;else if(6==b)a=wx;else{try{var c=!!vx(1,2,"")}catch(d){c=!1}c&&(a=vx)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function vx(a,b,c){return new window.TextTrackCue(a,b,c)}function wx(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Iv.VTTCue=tx;tx.install=ux;Jv(ux);function xx(){}xx.prototype.parseInit=function(){};xx.prototype.setSequenceMode=function(){};xx.prototype.setManifestType=function(){};xx.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=yx.exec(e))){var f=zx.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new Ab(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
1025
+ L("shaka.text.LrcTextParser",xx);xx.prototype.parseMedia=xx.prototype.parseMedia;xx.prototype.setManifestType=xx.prototype.setManifestType;xx.prototype.setSequenceMode=xx.prototype.setSequenceMode;xx.prototype.parseInit=xx.prototype.parseInit;var yx=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,zx=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;Lc["application/x-subtitle-lrc"]=function(){return new xx};function Ax(){}Ax.prototype.parseInit=function(){};Ax.prototype.setSequenceMode=function(){};Ax.prototype.setManifestType=function(){};
1026
+ Ax.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,Bx,"frameRate"),f=dg(d,Bx,"subFrameRate"),g=dg(d,Bx,"frameRateMultiplier"),h=dg(d,Bx,"tickRate"),k=dg(d,Bx,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=dg(d,Cx,"extent");if("default"!=l&&"preserve"!=l)throw new N(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new Dx(e,f,
1027
+ g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{cg: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 Bb;var u=r.getAttribute("xml:id");if(u){p.id=u;var x=null;m&&(x=Ex.exec(m)||Fx.exec(m));u=x?Number(x[1]):null;x=x?Number(x[2]):null;var y,w;if(y=Gx(r,g,"extent"))y=(w=Ex.exec(y))||Fx.exec(y),
1028
+ null!=y&&(p.width=Number(y[1]),p.height=Number(y[2]),w||(null!=u&&(p.width=100*p.width/u),null!=x&&(p.height=100*p.height/x)),p.l=w||null!=u?Sb:0,p.i=w||null!=x?Sb:0);if(r=Gx(r,g,"origin"))y=(w=Ex.exec(r))||Fx.exec(r),null!=y&&(p.g=Number(y[1]),p.h=Number(y[2]),w||(null!=x&&(p.h=100*p.h/x),null!=u&&(p.g=100*p.g/u)),p.j=w||null!=u?Sb: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,
1029
+ "span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Hx(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
1030
+ function Hx(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(Ix),x=u.next();!x.done&&!(r=Jx(p,"backgroundImage",d,"#",x.value)[0]);x=u.next());if("p"==a.nodeName||r)m=!0;a=m;u="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
1031
+ h=[];if(!x)for(var y=t(p.childNodes),w=y.next();!w.done;w=y.next())(w=Hx(w.value,b,c,d,e,f,g,u,k,p,m))&&h.push(w);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!=h.length||d&&!u))return null;w=Kx(p,c);y=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=Lx(n,c,y,w),y=w.start,w=w.end,n=n.parentNode;null==y&&(y=0);y+=b.periodStart;w=null==w?Infinity:w+b.periodStart;y=Math.max(y,b.segmentStart);
1032
+ w=Math.min(w,b.segmentEnd);if(!A&&0<h.length)for(y=Infinity,w=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,y=Math.min(y,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new Ab(y,w,""),e.F=!0,e;b="";x&&(b=p.textContent,u&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new Ab(y,w,b);b.g=h;m||(b.Y=!0);k&&(b.X=k);k=Jx(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")&&
1033
+ !p.getAttribute("style")&&(g=Jx(l,"region",f,"")[0]);Mx(b,p,g,r,e,a,0==h.length);return b}
1034
+ function Mx(a,b,c,d,e,f,g){f=f||g;"rtl"==Nx(b,c,e,"direction",f)&&(a.direction="rtl");g=Nx(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=Eb);(g=Nx(b,c,e,"textAlign",!0))?(a.H=Ox[g],a.s=Px[g],a.textAlign=Mb[g.toUpperCase()]):a.textAlign=Db;if(g=Nx(b,c,e,"displayAlign",!0))a.i=Nb[g.toUpperCase()];if(g=Nx(b,c,e,"color",f))a.l=g;if(g=Nx(b,c,e,"backgroundColor",f))a.backgroundColor=g;if(g=
1035
+ Nx(b,c,e,"border",f))a.V=g;if(g=Nx(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.m="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.m="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.m="sans-serif";break;case "monospaceSansSerif":a.m="Consolas,monospace";break;case "proportionalSerif":a.m="serif";break;default:a.m=g}(g=Nx(b,c,e,"fontWeight",f))&&"bold"==g&&(a.u=700);g=Nx(b,c,e,"wrapOption",f);a.M=g&&"noWrap"==g?!1:!0;(g=Nx(b,c,e,"lineHeight",
1036
+ f))&&g.match(Qx)&&(a.aa=g);(g=Nx(b,c,e,"fontSize",f))&&(g.match(Qx)||g.match(Rx))&&(a.A=g);if(g=Nx(b,c,e,"fontStyle",f))a.o=Rb[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=Nx(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Qx)?a.L=a.l:(a.L=d[0],d.shift()),d[0]&&d[0].match(Qx)?a.ga=d[0]:a.L="";(d=Nx(b,c,e,"letterSpacing",f))&&d.match(Qx)&&(a.W=
1037
+ d);(d=Nx(b,c,e,"linePadding",f))&&d.match(Qx)&&(a.Z=d);if(f=Nx(b,c,e,"opacity",f))a.C=parseFloat(f);(c=Gx(c,e,"textDecoration"))&&Sx(a,c);(b=Tx(b,e,"textDecoration"))&&Sx(a,b)}
1038
+ function Sx(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")&&xb(a.h,"underline");break;case "lineThrough":a.h.includes("lineThrough")||a.h.push("lineThrough");break;case "noLineThrough":a.h.includes("lineThrough")&&xb(a.h,"lineThrough");break;case "overline":a.h.includes("overline")||a.h.push("overline");break;case "noOverline":a.h.includes("overline")&&
1039
+ xb(a.h,"overline")}}function Nx(a,b,c,d,e){e=void 0===e?!0:e;return(a=Tx(a,c,d))?a:e?Gx(b,c,d):null}function Gx(a,b,c){if(!a)return null;var d=dg(a,Cx,c);return d?d:Ux(a,b,c)}function Tx(a,b,c){var d=dg(a,Cx,c);return d?d:Ux(a,b,c)}function Ux(a,b,c){a=Jx(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],Cx,c));f||(f=Tx(a[e],b,c));f&&(d=f)}return d}
1040
+ function Jx(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 Lx(a,b,c,d){a=Kx(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}}
1041
+ function Kx(a,b){var c=Vx(a.getAttribute("begin"),b),d=Vx(a.getAttribute("end"),b);a=Vx(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
1042
+ function Vx(a,b){var c=null;if(Wx.test(a)){a=Wx.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(Xx.test(a))c=Yx(Xx,a);else if(Zx.test(a))c=Yx(Zx,a);else if($x.test(a))a=$x.exec(a),c=Number(a[1])/b.frameRate;else if(ay.test(a))a=ay.exec(a),c=Number(a[1])/b.g;else if(by.test(a))c=Yx(by,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
1043
+ function Yx(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",Ax);Ax.prototype.parseMedia=Ax.prototype.parseMedia;Ax.prototype.setManifestType=Ax.prototype.setManifestType;Ax.prototype.setSequenceMode=Ax.prototype.setSequenceMode;Ax.prototype.parseInit=Ax.prototype.parseInit;
1044
+ function Dx(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]))}
1045
+ var Ex=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Rx=/^(\d{1,2}(?:\.\d+)?|100)%$/,Qx=/^(\d+px|\d+em|\d*\.?\d+c)$/,Fx=/^(\d+)px (\d+)px$/,Wx=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Xx=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Zx=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,$x=/^(\d*(?:\.\d*)?)f$/,ay=/^(\d*(?:\.\d*)?)t$/,by=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Px={left:Hb,center:"center",right:"end",start:Hb,
1046
+ end:"end"},Ox={left:"line-left",center:"center",right:"line-right"},Bx=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Cx=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ix=["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 Ax};function cy(){this.g=new Ax}cy.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);};cy.prototype.setSequenceMode=function(){};cy.prototype.setManifestType=function(){};
1047
+ cy.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};L("shaka.text.Mp4TtmlParser",cy);cy.prototype.parseMedia=cy.prototype.parseMedia;cy.prototype.setManifestType=cy.prototype.setManifestType;cy.prototype.setSequenceMode=cy.prototype.setSequenceMode;cy.prototype.parseInit=cy.prototype.parseInit;Lc['application/mp4; codecs="stpp"']=function(){return new cy};
1048
+ Lc['application/mp4; codecs="stpp.ttml"']=function(){return new cy};Lc['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new cy};Lc['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new cy};function dy(){this.h=!1;this.g="UNKNOWN"}dy.prototype.parseInit=function(){};dy.prototype.setSequenceMode=function(a){this.h=a};dy.prototype.setManifestType=function(a){this.g=a};
1049
+ dy.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.h){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=ey(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+
1050
+ e/9E4-a}}else c[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(a=b.segmentStart);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 Bb;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))?
1051
+ (h.g=Number(g[1]),h.h=Number(g[2])):/^scroll=up$/.exec(k)&&(h.s="up");Ir(d);g=Kr(d)}b.push(f)}e=new Map;fy(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=
1052
+ l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new Ab(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.l=r;break;case "font-family":m=!0;l.m=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=
1053
+ !0;l.o=Kb;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=ey(g),n=Jr(g,/[ \t]+--\x3e[ \t]+/g),l=ey(g),null==k||null==n||null==l)Za("Failed to parse VTT time code. Cue skipped:",
1054
+ h,f),f=null;else{k+=m;l+=m;f=f.slice(1).join("\n").trim();e.has("global")?(m=e.get("global").clone(),m.startTime=k,m.endTime=l,m.U=""):m=new Ab(k,l,"");Ir(g);for(k=Kr(g);k;)gy(m,k,b),Ir(g),k=Kr(g);hy(f,m,e);null!=h&&(m.id=h);f=m}f&&d.push(f)}return d};
1055
+ function fy(a){for(var b=t(Object.entries(Pb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new Ab(0,0,"");e.l=d;a.set("."+c,e)}b=t(Object.entries(Qb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new Ab(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
1056
+ function hy(a,b,c){0===c.size&&fy(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=
1057
+ a.substr(f,e-f),f.match(iy)&&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)):
1058
+ ">"===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=jy(a);return}a=t(e);for(e=a.next();!e.done;e=a.next())ky(e.value,b,d,c);b.g=d}else b.U=jy(a)}
1059
+ function ly(a,b){return a&&0<a.length?a:b}
1060
+ function ky(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=ly(h.backgroundColor,e.backgroundColor),e.l=ly(h.l,e.l),e.m=ly(h.m,e.m),e.A=ly(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;
1061
+ 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.l=g;break;case "div":if(g=a.getAttribute("time"))if(g=ey(new Hr(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=jy(a),c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())ky(a.value,e,c,d)}
1062
+ 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=Db:a.textAlign=Mb[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.H="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
1063
+ b?"line-right":"center"==b||"middle"==b?"center":Cb);else if(d=/^region:(.*)$/.exec(b)){if(b=my(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.G=1,a.j=Number(c[1]),c[2]&&(a.s=Ob[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.G=Gb,a.j=Number(c[1]),c[2]&&(a.s=Ob[c[2].toUpperCase()])}function my(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
1064
+ function ey(a){a=Jr(a,iy);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 jy(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",dy);dy.prototype.parseMedia=dy.prototype.parseMedia;
1065
+ dy.prototype.setManifestType=dy.prototype.setManifestType;dy.prototype.setSequenceMode=dy.prototype.setSequenceMode;dy.prototype.parseInit=dy.prototype.parseInit;var iy=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;Lc["text/vtt"]=function(){return new dy};Lc['text/vtt; codecs="vtt"']=function(){return new dy};Lc['text/vtt; codecs="wvtt"']=function(){return new dy};function ny(){this.g=null}ny.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);};ny.prototype.setSequenceMode=function(){};ny.prototype.setManifestType=function(){};
1066
+ ny.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).gf}).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=
1067
+ p.value;var r=p.Je||l,u=p.Md?c+p.Md:a;a=u+(r||0);var x=0;do{var y=m.K();x+=y;var w=m.K(),A=null;"vttc"==Jf(w)?8<y&&(A=m.kb(y-8)):m.skip(y-8);r&&A&&(y=oy(A,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(y))}while(p.sampleSize&&x<p.sampleSize)}return f.filter(tc)};function oy(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?py(d,e,f,b,c):null}
1068
+ function py(a,b,c,d,e){d=new Ab(d,e,"");hy(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",ny);ny.prototype.parseMedia=ny.prototype.parseMedia;ny.prototype.setManifestType=ny.prototype.setManifestType;ny.prototype.setSequenceMode=ny.prototype.setSequenceMode;ny.prototype.parseInit=ny.prototype.parseInit;Lc['application/mp4; codecs="wvtt"']=function(){return new ny};function qy(){}qy.prototype.parseInit=function(){};qy.prototype.setSequenceMode=function(){};qy.prototype.setManifestType=function(){};qy.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 Hr(c[0]),e=ry(d),f=Jr(d,/,/g);d=ry(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 Ab(e,d,c.slice(1).join("\n").trim()))}return a};
1069
+ function ry(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",qy);qy.prototype.parseMedia=qy.prototype.parseMedia;qy.prototype.setManifestType=qy.prototype.setManifestType;qy.prototype.setSequenceMode=qy.prototype.setSequenceMode;qy.prototype.parseInit=qy.prototype.parseInit;Lc["text/x-subviewer"]=function(){return new qy};function sy(){this.g=new dy}sy.prototype.parseInit=function(){};sy.prototype.setSequenceMode=function(){};sy.prototype.setManifestType=function(){};sy.prototype.parseMedia=function(a,b){a=wf(a);a=ty(a);a=M(Af(a));return this.g.parseMedia(a,b)};
1070
+ function ty(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",sy);sy.srt2webvtt=ty;sy.prototype.parseMedia=sy.prototype.parseMedia;
1071
+ sy.prototype.setManifestType=sy.prototype.setManifestType;sy.prototype.setSequenceMode=sy.prototype.setSequenceMode;sy.prototype.parseInit=sy.prototype.parseInit;Lc["text/srt"]=function(){return new sy};function uy(){}uy.prototype.parseInit=function(){};uy.prototype.setSequenceMode=function(){};uy.prototype.setManifestType=function(){};
1072
+ uy.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=vy.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=wy.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(xy);else if("Style"==e){e=f.split(xy);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
1073
+ [];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=wy.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(xy);else if("Dialogue"==f){g=g.split(xy);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=yy(f.Start);var k=yy(f.End);g=new Ab(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)))&&zy(g,f);d.push(g)}return d};
1074
+ function zy(a,b){var c=b.Fontname;c&&(a.m=c);if(c=b.Fontsize)a.A=c+"px";if(c=b.PrimaryColour)if(c=Ay(c))a.l=c;if(c=b.BackColour)if(c=Ay(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=Ib;a.textAlign="start";break;case 2:a.i=Ib;a.textAlign=Db;break;case 3:a.i=Ib;a.textAlign="end";break;case 5:a.i="before";a.textAlign="start";break;case 6:a.i="before";a.textAlign=Db;break;
1075
+ 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=Db;break;case 11:a.i="center",a.textAlign="end"}if(b=b.AlphaLevel)a.C=parseFloat(b)}function Ay(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 yy(a){a=By.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}L("shaka.text.SsaTextParser",uy);
1076
+ uy.prototype.parseMedia=uy.prototype.parseMedia;uy.prototype.setManifestType=uy.prototype.setManifestType;uy.prototype.setSequenceMode=uy.prototype.setSequenceMode;uy.prototype.parseInit=uy.prototype.parseInit;var vy=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,wy=/^\s*([^:]+):\s*(.*)/,xy=/\s*,\s*/,By=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;Lc["text/x-ssa"]=function(){return new uy};function Cy(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 Dy(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}}
1077
+ function Ey(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 Fy(a){this.i=a;this.h=0;this.g=new Map}q=Fy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?fb(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};
1078
+ q.transmux=function(a,b,c,d){for(var e=M(a),f=Gh(e),g=f.length;g<e.length&&!Ey(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=Dy(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=Cy(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,
1079
+ 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,La:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ka:f},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=ut(a);this.h++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.AacTransmuxer",Fy);
1080
+ Fy.prototype.transmux=Fy.prototype.transmux;Fy.prototype.getOrginalMimeType=Fy.prototype.getOrginalMimeType;Fy.prototype.convertCodecs=Fy.prototype.convertCodecs;Fy.prototype.isSupported=Fy.prototype.isSupported;Fy.prototype.destroy=Fy.prototype.destroy;Vb("audio/aac",function(){return new Fy("audio/aac")},ac);function Gy(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,
1078
1081
  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}}
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,
1082
+ function Hy(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 Iy(a){this.i=a;this.h=0;this.g=new Map}q=Iy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?fb(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};
1083
+ q.transmux=function(a,b,c,d){a=M(a);for(var e=Gh(a),f=e.length;f<a.length&&!Hy(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=Gy(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,
1084
+ 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,La:[],ca:e,na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ka: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=ut(a);this.h++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ac3Transmuxer",Iy);Iy.prototype.transmux=Iy.prototype.transmux;
1085
+ Iy.prototype.getOrginalMimeType=Iy.prototype.getOrginalMimeType;Iy.prototype.convertCodecs=Iy.prototype.convertCodecs;Iy.prototype.isSupported=Iy.prototype.isSupported;Iy.prototype.destroy=Iy.prototype.destroy;Vb("audio/ac3",function(){return new Iy("audio/ac3")},ac);function Jy(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 Ky(a){this.i=a;this.h=0;this.g=new Map}q=Ky.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?fb(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};
1086
+ 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=Jy(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,
1087
+ 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,La:[],ca:e,na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ka: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=ut(a);this.h++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Ec3Transmuxer",Ky);Ky.prototype.transmux=Ky.prototype.transmux;
1088
+ Ky.prototype.getOrginalMimeType=Ky.prototype.getOrginalMimeType;Ky.prototype.convertCodecs=Ky.prototype.convertCodecs;Ky.prototype.isSupported=Ky.prototype.isSupported;Ky.prototype.destroy=Ky.prototype.destroy;Vb("audio/ec3",function(){return new Ky("audio/ec3")},ac);function Ly(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(My.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
1089
  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);/*
1090
+ function Ny(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=
1091
+ Vf(c,h,f.bb))}return c.byteLength?{data:c,tf:b}:null}var My=[100,110,122,244,44,83,86,118,128,138,139,134];function Oy(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*Py[14*(3===c?3-d:3===d?3:4)+e-1];f=Qy[3*(3===c?0:2===c?1:2)+f];c=Ry[c][d];var h=Sy[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,gh:8*c*h}}return null}
1092
+ function Ty(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}var Py=[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],Qy=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],Ry=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Sy=[0,1,1,4];function Uy(a){this.i=a;this.h=0;this.g=new Map}q=Uy.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?fb(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};
1093
+ 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&&Ty(a,e)){var f=Oy(a,e),g=4;f&&f.P&&(g=f.P);e+=g;e=e===a.length||e+1<a.length&&Ty(a,e)}else e=!1;if(e)break}var h;for(e=[];c<a.length;){f=Oy(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.gh/h.sampleRate*this.h;d={id:b.id,
1094
+ type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:h.sampleRate,duration:d,La:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.h,baseMediaDecodeTime:a,Ka: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=ut(h);this.h++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.Mp3Transmuxer",Uy);Uy.prototype.transmux=Uy.prototype.transmux;Uy.prototype.getOrginalMimeType=Uy.prototype.getOrginalMimeType;
1095
+ Uy.prototype.convertCodecs=Uy.prototype.convertCodecs;Uy.prototype.isSupported=Uy.prototype.isSupported;Uy.prototype.destroy=Uy.prototype.destroy;Vb("audio/mpeg",function(){return new Uy("audio/mpeg")},ac);function Vy(a){this.h=a;this.g=null}q=Vy.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Ic(a).split(","),c=xc("audio",b);b=xc("video",b);return!c||b||"mp3"!=Gc(c)?!1:fb(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};
1096
+ 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.zb());for(var c=b.next();!c.done;c=b.next())if(c=c.value.data)for(var d=0;d<c.length;){var e=Oy(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",Vy);Vy.prototype.transmux=Vy.prototype.transmux;
1097
+ Vy.prototype.getOrginalMimeType=Vy.prototype.getOrginalMimeType;Vy.prototype.convertCodecs=Vy.prototype.convertCodecs;Vy.prototype.isSupported=Vy.prototype.isSupported;Vy.prototype.destroy=Vy.prototype.destroy;Vb("video/mp2t",function(){return new Vy("video/mp2t")},$b);/*
1095
1098
  @license
1096
1099
  MSS Transmuxer
1097
1100
  Copyright 2015 Dash Industry Forum
1098
1101
  SPDX-License-Identifier: BSD-3-Clause
1099
1102
  */
1100
- function Vy(a){this.h=a;(this.g=ur.get("ISOBoxer")())&&Wy(this)}
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",
1103
+ function Wy(a){this.h=a;(this.g=vr.get("ISOBoxer")())&&Xy(this)}
1104
+ function Xy(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",
1102
1105
  "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",
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(){};
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};
1106
+ "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]!==Yy[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=Wy.prototype;q.destroy=function(){};
1107
+ q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return fb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return fb(b)||fb(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOrginalMimeType=function(){return this.h};
1105
1108
  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),
1106
1109
  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|=
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;
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)};
1110
+ 1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var x=e.fetch("saio");null!==x&&(x.offset[0]=Zy(u,"traf")+Zy(h,"senc")+16);var y=M(e.write());return Promise.resolve(y)}catch(w){return w instanceof N?Promise.reject(w):Promise.reject(new N(2,3,3022))}};function Zy(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",Wy);Wy.prototype.transmux=Wy.prototype.transmux;Wy.prototype.getOrginalMimeType=Wy.prototype.getOrginalMimeType;
1111
+ Wy.prototype.convertCodecs=Wy.prototype.convertCodecs;Wy.prototype.isSupported=Wy.prototype.isSupported;Wy.prototype.destroy=Wy.prototype.destroy;var Yy=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Vb("mss/audio/mp4",function(){return new Wy("mss/audio/mp4")},ac);Vb("mss/video/mp4",function(){return new Wy("mss/video/mp4")},ac);function $y(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(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=$y.prototype;q.destroy=function(){this.g&&this.g.dispose();this.g=null};
1112
+ q.isSupported=function(a,b){var c="mp2t"==a.toLowerCase().split(";")[0].split("/")[1];if(!this.j||!c)return!1;if(b)return fb(az(b,a));b=az("audio",a);a=az("video",a);return fb(b)||fb(a)};q.convertCodecs=function(a,b){return"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?az(a,b):b};
1113
+ function az(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};
1114
+ L("shaka.transmuxer.MuxjsTransmuxer",$y);$y.prototype.transmux=$y.prototype.transmux;$y.prototype.getOrginalMimeType=$y.prototype.getOrginalMimeType;$y.prototype.convertCodecs=$y.prototype.convertCodecs;$y.prototype.isSupported=$y.prototype.isSupported;$y.prototype.destroy=$y.prototype.destroy;Vb("video/mp2t",function(){return new $y("video/mp2t")},ac);function bz(a){this.j=a;this.g=0;this.h=new Map;this.i=null}q=bz.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=xc("audio",c);c=xc("video",c);if(d&&c||d&&(d=Gc(d),!cz.includes(d))||c&&(d=Gc(c),!dz.includes(d)))return!1;if(b)return fb(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return fb(b)||fb(a)};
1112
1115
  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);/*
1116
+ q.transmux=function(a,b,c,d,e){this.i?this.i.clearData():this.i=new Yh;a=M(a);var f=this.i.parse(a);a=[];var g=f.od();try{c=null;if("video"==e){switch(g.video){case "avc":for(var h=[],k=null,l=[],m=f.ud(),n=0;n<m.length;n++){var p=m[n],r=void 0;n+1<m.length&&(r=m[n+1]);var u=f.Ce(p,r);l=l.concat(u);var x=Ny(u);x&&(null==k&&(k=p.dts),r=void 0,r=n+1<m.length?(m[n+1].dts||0)-(p.dts||0):(p.dts||0)-(m[n-1].dts||0),h.push({data:x.data,size:x.data.byteLength,duration:r,ab:Math.round((p.pts||0)-(p.dts||0)),
1117
+ flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:x.tf?2:1,hb:x.tf?0:1}}))}var y=Ly(l);if(!y||null==k)throw new N(2,3,3018);b.height=y.height;b.width=y.width;c={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,La:[],ca:new Uint8Array([]),na:y.na,data:{mb:this.g,baseMediaDecodeTime:k,Ka:h},stream:b}}c&&(a.push(c),c=null)}if("audio"==e){switch(g.audio){case "aac":for(var w=[],A,z=null,B=t(f.zb()),G=B.next();!G.done;G=B.next()){var E=G.value,F=E.data;if(F){f=0;A=Dy(F,
1118
+ f);if(!A)throw new N(2,3,3018);b.audioSamplingRate=A.sampleRate;b.channelsCount=A.channelCount;null==z&&null!==E.pts&&(z=E.pts);for(;f<F.length;){var I=Cy(F,f);if(I){var J=I.wd+I.P;f+J<=F.length&&w.push({data:F.subarray(f+I.wd,f+J),size:I.P,duration:1024,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}});f+=J}else f++}}}if(!A||null==z)throw new N(2,3,3018);var K=A.sampleRate;f=z/9E4*K;c={id:b.id,type:"audio",codecs:A.pa,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:K,duration:d,La:[],ca:new Uint8Array([]),
1119
+ na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:f,Ka:w},stream:b};break;case "ac3":z=[];A=0;w=new Uint8Array([]);K=null;for(var S=t(f.zb()),R=S.next();!R.done;R=S.next()){var aa=R.value,W=aa.data;null==K&&null!==aa.pts&&(K=aa.pts);for(f=0;f<W.length;){var Y=Gy(W,f);Y?(b.audioSamplingRate=Y.sampleRate,b.channelsCount=Y.channelCount,A=Y.sampleRate,w=Y.ca,z.push({data:W.subarray(f,f+Y.P),size:Y.P,duration:1536,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}}),f+=Y.P):f++}}if(0==A||0==w.byteLength||
1120
+ null==K)throw new N(2,3,3018);f=K/9E4*A;c={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:A,duration:d,La:[],ca:w,na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:f,Ka:z},stream:b};break;case "ec3":w=[];A=0;z=new Uint8Array([]);K=null;for(var za=t(f.zb()),ta=za.next();!ta.done;ta=za.next()){var la=ta.value,ua=la.data;null==K&&null!==la.pts&&(K=la.pts);for(f=0;f<ua.length;){var Qa=Jy(ua,f);Qa?(b.audioSamplingRate=Qa.sampleRate,b.channelsCount=Qa.channelCount,
1121
+ A=Qa.sampleRate,z=Qa.ca,w.push({data:ua.subarray(f,f+Qa.P),size:Qa.P,duration:1536,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}}),f+=Qa.P):f++}}if(0==A||0==z.byteLength||null==K)throw new N(2,3,3018);f=K/9E4*A;c={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:A,duration:d,La:[],ca:z,na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:f,Ka:w},stream:b};break;case "mp3":w=[];var qa;z=null;for(var Da=t(f.zb()),Ta=Da.next();!Ta.done;Ta=Da.next()){var Ka=Ta.value,
1122
+ ib=Ka.data;if(ib)for(null==z&&null!==Ka.pts&&(z=Ka.pts),f=0;f<ib.length;){var jb=Oy(ib,f);jb?(qa||(qa=jb),f+jb.P<=ib.length&&w.push({data:ib.subarray(f,f+jb.P),size:jb.P,duration:1152,ab:0,flags:{gb:0,Va:0,Ua:0,Qa:0,Ra:2,hb:0}}),f+=jb.P):f++}}if(!qa||null==z)throw new N(2,3,3018);var tb=qa.sampleRate;f=z/9E4*tb;c={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:tb,duration:d,La:[],ca:new Uint8Array([]),na:new Uint8Array([]),data:{mb:this.g,baseMediaDecodeTime:f,
1123
+ Ka:w},stream:b}}c&&a.push(c)}}catch(sz){return Promise.reject(sz)}if(!a.length)return Promise.reject(new N(2,3,3018));a=new $s(a);this.h.has(b.id)?d=this.h.get(b.id):(d=a.initSegment(),this.h.set(b.id,d));b=ut(a);this.g++;b=Vf(d,b);return Promise.resolve(b)};L("shaka.transmuxer.TsTransmuxer",bz);bz.prototype.transmux=bz.prototype.transmux;bz.prototype.getOrginalMimeType=bz.prototype.getOrginalMimeType;bz.prototype.convertCodecs=bz.prototype.convertCodecs;bz.prototype.isSupported=bz.prototype.isSupported;
1124
+ bz.prototype.destroy=bz.prototype.destroy;var cz=["aac","ac-3","ec-3","mp3"],dz=["avc"];Vb("video/mp2t",function(){return new bz("video/mp2t")},Zb);/*
1122
1125
  @license
1123
1126
  EME Encryption Scheme Polyfill
1124
1127
  Copyright 2019 Google LLC
@@ -1131,13 +1134,13 @@ 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){
1131
1134
  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;
1132
1135
  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")}
1133
1136
  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.");
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))}})}
1137
+ navigator.mediaCapabilities.decodingInfo=rz;if(d){f.B(3);break}e=c;return C(f,tz(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(rz.call(b,a))}})}
1135
1138
  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=
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)}})}
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,
1139
+ new mz(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return C(m,tz(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
1140
+ function tz(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,
1138
1141
  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}
1139
1142
  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()};
1140
1143
  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}
1141
- function tz(){}function Sv(){gz();pz()}L("EncryptionSchemePolyfills",tz);tz.install=Sv;"undefined"!==typeof module&&module.exports&&(module.exports=tz);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1144
+ function uz(){}function Tv(){gz();pz()}L("EncryptionSchemePolyfills",uz);uz.install=Tv;"undefined"!==typeof module&&module.exports&&(module.exports=uz);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
1142
1145
 
1143
1146
  //# sourceMappingURL=shaka-player.compiled.map