shaka-player 3.1.4 → 3.1.5

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 (43) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/controls.css +2 -2
  3. package/dist/controls.css.map +1 -1
  4. package/dist/locales.js +29 -29
  5. package/dist/shaka-player.compiled.d.ts +14 -0
  6. package/dist/shaka-player.compiled.debug.d.ts +14 -0
  7. package/dist/shaka-player.compiled.debug.externs.js +11 -0
  8. package/dist/shaka-player.compiled.debug.js +170 -168
  9. package/dist/shaka-player.compiled.debug.map +3 -3
  10. package/dist/shaka-player.compiled.externs.js +11 -0
  11. package/dist/shaka-player.compiled.js +650 -650
  12. package/dist/shaka-player.compiled.map +2 -2
  13. package/dist/shaka-player.ui.d.ts +14 -0
  14. package/dist/shaka-player.ui.debug.d.ts +14 -0
  15. package/dist/shaka-player.ui.debug.externs.js +11 -0
  16. package/dist/shaka-player.ui.debug.js +178 -176
  17. package/dist/shaka-player.ui.debug.map +3 -3
  18. package/dist/shaka-player.ui.externs.js +11 -0
  19. package/dist/shaka-player.ui.js +792 -792
  20. package/dist/shaka-player.ui.map +2 -2
  21. package/externs/shaka/text.js +10 -0
  22. package/lib/dash/dash_parser.js +4 -2
  23. package/lib/media/streaming_engine.js +5 -2
  24. package/lib/player.js +1 -1
  25. package/lib/polyfill/media_capabilities.js +30 -15
  26. package/lib/text/cue.js +6 -0
  27. package/lib/text/ttml_text_parser.js +84 -58
  28. package/lib/text/ui_text_displayer.js +17 -11
  29. package/lib/util/stream_utils.js +58 -7
  30. package/lib/util/xml_utils.js +19 -0
  31. package/package.json +2 -2
  32. package/test/dash/dash_parser_manifest_unit.js +33 -1
  33. package/test/media/drm_engine_unit.js +3 -3
  34. package/test/media/streaming_engine_integration.js +2 -1
  35. package/test/media/streaming_engine_unit.js +145 -0
  36. package/test/player_unit.js +5 -5
  37. package/test/test/util/ttml_utils.js +81 -0
  38. package/test/text/mp4_ttml_parser_unit.js +11 -18
  39. package/test/text/ttml_text_parser_unit.js +495 -228
  40. package/test/util/stream_utils_unit.js +35 -29
  41. package/ui/less/buttons.less +0 -4
  42. package/ui/text_selection.js +1 -0
  43. package/externs/media_capabilities.js +0 -16
@@ -16,7 +16,7 @@ ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(v
16
16
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ha(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
17
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ka=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=ka;
18
18
  function ra(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.mi=b.prototype}function sa(){this.A=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.o=0;this.D=this.i=null}function ta(a){if(a.A)throw new TypeError("Generator is already running");a.A=!0}sa.prototype.B=function(a){this.h=a};
19
- function ua(a,b){a.i={Re:b,Ze:!0};a.g=a.o||a.j}sa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function v(a,b,c){a.g=c;return{value:b}}sa.prototype.C=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.o=b;void 0!=c&&(a.j=c)}function va(a){a.o=0;a.j=2}function wa(a,b,c){a.g=b;a.o=c||0}function F(a,b){a.o=b||0;var c=a.i.Re;a.i=null;return c}function xa(a){a.D=[a.i];a.o=0;a.j=0}
19
+ function ua(a,b){a.i={Re:b,Ze:!0};a.g=a.o||a.j}sa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}sa.prototype.C=function(a){this.g=a};function z(a){a.g=0}function A(a,b,c){a.o=b;void 0!=c&&(a.j=c)}function va(a){a.o=0;a.j=2}function wa(a,b,c){a.g=b;a.o=c||0}function F(a,b){a.o=b||0;var c=a.i.Re;a.i=null;return c}function xa(a){a.D=[a.i];a.o=0;a.j=0}
20
20
  function ya(a,b){var c=a.D.splice(0)[0];(c=a.i=a.i||c)?c.Ze?a.g=a.o||a.j:void 0!=c.C&&a.j<c.C?(a.g=c.C,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new sa;this.h=a}function Aa(a,b){ta(a.g);var c=a.g.l;if(c)return Ba(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ca(a)}
21
21
  function Ba(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.A=!1,e;var f=e.value}catch(g){return a.g.l=null,ua(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}
22
22
  function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.A=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ua(a.g,c)}a.g.A=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ze)throw b.Re;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
@@ -26,8 +26,8 @@ ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.A=!
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.K),reject:g(this.l)}};b.prototype.K=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.O(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.I(g):this.o(g)}};
27
27
  b.prototype.I=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.R(h,g):this.o(g)};b.prototype.l=function(g){this.B(2,g)};b.prototype.o=function(g){this.B(1,g)};b.prototype.B=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.L();this.D()};b.prototype.L=function(){var g=this;e(function(){if(g.H()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.H=
28
28
  function(){if(this.A)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.D=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.O=function(g){var h=this.j();g.bd(h.resolve,h.reject)};b.prototype.R=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,t){return"function"==typeof p?function(u){try{l(p(u))}catch(x){m(x)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.bd(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.bd=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.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).bd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(x){p[u]=x;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).bd(n(p.length-1),m),k=h.next();
29
+ b.prototype.O=function(g){var h=this.j();g.bd(h.resolve,h.reject)};b.prototype.R=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,t){return"function"==typeof p?function(v){try{l(p(v))}catch(x){m(x)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.bd(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.bd=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.A=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).bd(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(x){p[v]=x;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).bd(n(p.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ga(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
32
  ea("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ga(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
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(!Ga(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ga(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
@@ -54,8 +54,8 @@ ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ga(
54
54
  */
55
55
  function N(a,b){if(b)if(b instanceof Map)for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
56
56
  function Na(a){var b=new N(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}N.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};N.prototype.stopImmediatePropagation=function(){this.g=!0};N.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",N);function Oa(){}function Pa(){}function Ra(){}function Sa(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Ta.has(a)||(Ta.add(a),Ra.apply(Oa,ha(c)))}function Ua(){}function Va(){}function Wa(){}function Xa(){}var Ta=new Set;
57
- if(window.console&&window.console.log.bind){var Ya={},Za=(Ya[1]=console.error.bind(console),Ya[2]=console.warn.bind(console),Ya[3]=console.info.bind(console),Ya[4]=console.log.bind(console),Ya[5]=console.debug.bind(console),Ya[6]=console.debug.bind(console),Ya);Ra=Za[2];Pa=Za[1]};function bb(){this.g={}}bb.prototype.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};bb.prototype.get=function(a){return(a=this.g[a])?a.slice():null};bb.prototype.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function cb(a,b){for(var c in a.g)b(c,a.g[c])}bb.prototype.size=function(){return Object.keys(this.g).length};function db(){this.Yc=new bb;this.Xc=this}db.prototype.addEventListener=function(a,b){this.Yc.push(a,b)};db.prototype.removeEventListener=function(a,b){this.Yc.remove(a,b)};db.prototype.dispatchEvent=function(a){var b=this.Yc.get(a.type)||[],c=this.Yc.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Xc;a.currentTarget=this.Xc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function eb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function gb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function ib(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c}
58
- var kb=function jb(a){var c;return Ea(jb,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?v(d,c,3):d.C(0);c++;return d.C(2)})},nb=function mb(a){var c,d,e,f,g,h;return Ea(mb,function(k){1==k.g&&(c=-1,e=d=void 0,f=r(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.C(0):v(k,{xa:c,Bg:d,item:e,next:void 0},0);h=g.value;return 0<=c?v(k,{xa:c,item:e,Bg:d,next:h},5):k.C(5)}c++;d=e;e=h;g=f.next();return k.C(2)})};/*
57
+ if(window.console&&window.console.log.bind){var Ya={},ab=(Ya[1]=console.error.bind(console),Ya[2]=console.warn.bind(console),Ya[3]=console.info.bind(console),Ya[4]=console.log.bind(console),Ya[5]=console.debug.bind(console),Ya[6]=console.debug.bind(console),Ya);Ra=ab[2];Pa=ab[1]};function bb(){this.g={}}bb.prototype.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};bb.prototype.get=function(a){return(a=this.g[a])?a.slice():null};bb.prototype.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function cb(a,b){for(var c in a.g)b(c,a.g[c])}bb.prototype.size=function(){return Object.keys(this.g).length};function db(){this.Yc=new bb;this.Xc=this}db.prototype.addEventListener=function(a,b){this.Yc.push(a,b)};db.prototype.removeEventListener=function(a,b){this.Yc.remove(a,b)};db.prototype.dispatchEvent=function(a){var b=this.Yc.get(a.type)||[],c=this.Yc.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Xc;a.currentTarget=this.Xc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};function fb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function gb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(b(d.value))return!0;return!1}function ib(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())e=e.value,b(e)&&c.push(e);return c}
58
+ var lb=function jb(a){var c;return Ea(jb,function(d){1==d.g&&(c=0);if(3!=d.g)return c<a?u(d,c,3):d.C(0);c++;return d.C(2)})},nb=function mb(a){var c,d,e,f,g,h;return Ea(mb,function(k){1==k.g&&(c=-1,e=d=void 0,f=r(a),g=f.next());if(5!=k.g){if(g.done)return-1==c?k.C(0):u(k,{xa:c,Bg:d,item:e,next:void 0},0);h=g.value;return 0<=c?u(k,{xa:c,item:e,Bg:d,next:h},5):k.C(5)}c++;d=e;e=h;g=f.next();return k.C(2)})};/*
59
59
  @license
60
60
  Copyright 2008 The Closure Library Authors
61
61
  SPDX-License-Identifier: Apache-2.0
@@ -65,11 +65,11 @@ var ob=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]
65
65
  Copyright 2006 The Closure Library Authors
66
66
  SPDX-License-Identifier: Apache-2.0
67
67
  */
68
- function pb(a){var b;a instanceof pb?(qb(this,a.Ya),this.Rb=a.Rb,this.$a=a.$a,rb(this,a.jc),this.Pa=a.Pa,sb(this,a.g.clone()),this.Gb=a.Gb):a&&(b=String(a).match(ob))?(qb(this,b[1]||"",!0),this.Rb=tb(b[2]||""),this.$a=tb(b[3]||"",!0),rb(this,b[4]),this.Pa=tb(b[5]||"",!0),sb(this,b[6]||"",!0),this.Gb=tb(b[7]||"")):this.g=new vb(null)}q=pb.prototype;q.Ya="";q.Rb="";q.$a="";q.jc=null;q.Pa="";q.Gb="";
68
+ function pb(a){var b;a instanceof pb?(qb(this,a.Ya),this.Rb=a.Rb,this.$a=a.$a,rb(this,a.jc),this.Pa=a.Pa,sb(this,a.g.clone()),this.Gb=a.Gb):a&&(b=String(a).match(ob))?(qb(this,b[1]||"",!0),this.Rb=ub(b[2]||""),this.$a=ub(b[3]||"",!0),rb(this,b[4]),this.Pa=ub(b[5]||"",!0),sb(this,b[6]||"",!0),this.Gb=ub(b[7]||"")):this.g=new vb(null)}q=pb.prototype;q.Ya="";q.Rb="";q.$a="";q.jc=null;q.Pa="";q.Gb="";
69
69
  q.toString=function(){var a=[],b=this.Ya;b&&a.push(wb(b,xb,!0),":");if(b=this.$a){a.push("//");var c=this.Rb;c&&a.push(wb(c,xb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.jc;null!=b&&a.push(":",String(b))}if(b=this.Pa)this.$a&&"/"!=b.charAt(0)&&a.push("/"),a.push(wb(b,"/"==b.charAt(0)?yb:zb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Gb)&&a.push("#",wb(b,Ab));return a.join("")};
70
70
  q.resolve=function(a){var b=this.clone();"data"===b.Ya&&(b=new pb);var c=!!a.Ya;c?qb(b,a.Ya):c=!!a.Rb;c?b.Rb=a.Rb:c=!!a.$a;c?b.$a=a.$a:c=null!=a.jc;var d=a.Pa;if(c)rb(b,a.jc);else if(c=!!a.Pa){if("/"!=d.charAt(0))if(this.$a&&!this.Pa)d="/"+d;else{var e=b.Pa.lastIndexOf("/");-1!=e&&(d=b.Pa.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(""):".."==
71
- 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.Pa=d:c=""!==a.g.toString();c?sb(b,a.g.clone()):c=!!a.Gb;c&&(b.Gb=a.Gb);return b};q.clone=function(){return new pb(this)};function qb(a,b,c){a.Ya=c?tb(b,!0):b;a.Ya&&(a.Ya=a.Ya.replace(/:$/,""))}function rb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.jc=b}else a.jc=null}function sb(a,b,c){b instanceof vb?a.g=b:(c||(b=wb(b,Bb)),a.g=new vb(b))}
72
- function tb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function wb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Cb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Cb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var xb=/[#\/\?@]/g,zb=/[#\?:]/g,yb=/[#\?]/g,Bb=/[#\?@]/g,Ab=/#/g;function vb(a){this.g=a||null}q=vb.prototype;q.Ma=null;q.dd=null;
71
+ 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.Pa=d:c=""!==a.g.toString();c?sb(b,a.g.clone()):c=!!a.Gb;c&&(b.Gb=a.Gb);return b};q.clone=function(){return new pb(this)};function qb(a,b,c){a.Ya=c?ub(b,!0):b;a.Ya&&(a.Ya=a.Ya.replace(/:$/,""))}function rb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.jc=b}else a.jc=null}function sb(a,b,c){b instanceof vb?a.g=b:(c||(b=wb(b,Bb)),a.g=new vb(b))}
72
+ function ub(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function wb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Cb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Cb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var xb=/[#\/\?@]/g,zb=/[#\?:]/g,yb=/[#\?]/g,Bb=/[#\?@]/g,Ab=/#/g;function vb(a){this.g=a||null}q=vb.prototype;q.Ma=null;q.dd=null;
73
73
  q.add=function(a,b){if(!this.Ma&&(this.Ma={},this.dd=0,this.g))for(var c=this.g.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.g=null;(c=this.Ma.hasOwnProperty(a)&&this.Ma[a])||(this.Ma[a]=c=[]);c.push(b);this.dd++;return this};
74
74
  q.toString=function(){if(this.g)return this.g;if(!this.Ma)return"";var a=[],b;for(b in this.Ma)for(var c=encodeURIComponent(b),d=this.Ma[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 vb;a.g=this.g;if(this.Ma){var b={},c;for(c in this.Ma)b[c]=this.Ma[c].concat();a.Ma=b;a.dd=this.dd}return a};function O(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}O.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};K("shaka.util.Error",O);O.Severity={RECOVERABLE:1,CRITICAL:2};O.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
75
75
  O.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,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,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
@@ -79,7 +79,7 @@ HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERA
79
79
  HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,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,
80
80
  ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,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,STORAGE_NOT_SUPPORTED:9E3,
81
81
  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,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};function Db(a,b){this.g=a;this.h=b}Db.prototype.toString=function(){return"v"+this.g+"."+this.h};function Eb(a,b){var c=new Db(4,0),d=Fb,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Gb(a,b,c,d){Ra([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Hb(a,b,c,d){Pa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Fb=null;function Ib(a,b){return a.concat(b)}function Jb(){}function Kb(a){return null!=a}function Lb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Eb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Eb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Mb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new pb(d)});return a.map(function(d){return new pb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Ib,[]).map(function(d){return d.toString()})}function Nb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,sessionType:"",initData:b||[],keyIds:new Set}}
82
- function Ob(a,b){if(1==b.length)return b[0];var c=Pb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Pb(a,b){for(var c=r(Qb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Rb?"":null}var Rb="text",Sb={hb:"video",Bb:"audio",qa:Rb,Wc:"image",$g:"application"},Qb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Tb(a,b){a=Ub(a);b=Ub(b);return a.split("-")[0]==b.split("-")[0]}function Vb(a,b){a=Ub(a);b=Ub(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Wb(a,b){a=Ub(a);b=Ub(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Ub(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Xb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Yb(a,b){a=Ub(a);b=Ub(b);return b==a?4:Vb(b,a)?3:Wb(b,a)?2:Vb(a,b)?1:0}
82
+ function Ob(a,b){if(1==b.length)return b[0];var c=Pb(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function Pb(a,b){for(var c=r(Qb[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==Rb?"":null}var Rb="text",Sb={ib:"video",Bb:"audio",qa:Rb,Wc:"image",$g:"application"},Qb={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function Tb(a,b){a=Ub(a);b=Ub(b);return a.split("-")[0]==b.split("-")[0]}function Vb(a,b){a=Ub(a);b=Ub(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Wb(a,b){a=Ub(a);b=Ub(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Ub(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Xb.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Yb(a,b){a=Ub(a);b=Ub(b);return b==a?4:Vb(b,a)?3:Wb(b,a)?2:Vb(a,b)?1:0}
83
83
  function Zb(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=Xb.get(a)||a}function $b(a){return a.language?Ub(a.language):a.audio&&a.audio.language?Ub(a.audio.language):a.video&&a.video.language?Ub(a.video.language):"und"}
84
84
  function ac(a,b){for(var c=Ub(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Ub(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Vb(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Wb(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Vb(c,f))return f;return null}
85
85
  var Xb=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
@@ -93,10 +93,10 @@ q.ka=function(a,b,c){a=Ub(a);void 0===c&&(c=dc);var d=this.i.get(a)||new Map;b.f
93
93
  function cc(a){for(var b=a.i,c=a.l,d=a.h,e=new Set,f={},g=r(d),h=g.next();!h.done;f={Wb:f.Wb},h=g.next()){f.Wb=h.value;e.add(f.Wb);e.add(Zb(f.Wb));h=ib(b.keys(),function(l){return function(m){var n=l.Wb,p=Zb(m),t=Zb(n);return m!=p&&n!=t&&p==t}}(f));h.sort();var k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value);h=ib(b.keys(),function(l){return function(m){return Zb(m)==l.Wb}}(f));h.sort();k=r(h);for(h=k.next();!h.done;h=k.next())e.add(h.value)}e.add(c);c=[];e=r(e);for(h=e.next();!h.done;h=e.next())(h=
94
94
  b.get(h.value))&&c.push(h);c.reverse();a.j.clear();b=r(c);for(h=b.next();!h.done;h=b.next())h.value.forEach(function(l,m){a.j.set(m,l)});b=a.j.keys();e=new Set;c=r(a.h);for(h=c.next();!h.done;h=c.next())h=a.i.get(h.value)||new Map,ec(h,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.g.dispatchEvent(new N("missing-localizations",d)))}function ec(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}K("shaka.ui.Localization",bc);
95
95
  bc.prototype.resolve=bc.prototype.resolve;bc.prototype.resolveDictionary=bc.prototype.Kg;bc.prototype.insert=bc.prototype.ka;bc.prototype.changeLocale=bc.prototype.Ke;bc.prototype.dispatchEvent=bc.prototype.dispatchEvent;bc.prototype.removeEventListener=bc.prototype.removeEventListener;bc.prototype.addEventListener=bc.prototype.addEventListener;var dc=1;bc.ConflictResolution={USE_OLD:0,USE_NEW:dc};bc.UNKNOWN_LOCALES="unknown-locales";bc.UNKNOWN_LOCALIZATION="unknown-localization";
96
- bc.MISSING_LOCALIZATIONS="missing-localizations";bc.LOCALE_CHANGED="locale-changed";bc.LOCALE_UPDATED="locale-updated";var fc={Qh:"SEEK",Ih:"PAUSE",Lh:"PLAYBACK_RATE",Fh:"ON",Yg:"AD_TIME",mh:"EXIT_LOOP_MODE",Zg:"AIRPLAY",Ah:"MULTIPLE_LANGUAGES",ah:"AUTO_QUALITY",BACK:"BACK",Bh:"MUTE",Oh:"REWIND",ai:"UNDETERMINED_LANGUAGE",Rh:"SKIP_AD",zf:"SUBTITLE_FORCED",ei:"VOLUME",nh:"EXIT_PICTURE_IN_PICTURE",Dh:"NOT_APPLICABLE",qh:"FAST_FORWARD",lh:"EXIT_FULL_SCREEN",jh:"ENTER_PICTURE_IN_PICTURE",rh:"FULL_SCREEN",Eh:"OFF",ih:"ENTER_LOOP_MODE",Mh:"REPLAY",AD_PROGRESS:"AD_PROGRESS",gh:"CAST",fh:"CAPTIONS",Nh:"RESOLUTION",Xg:"AD_DURATION",
97
- Jh:"PICTURE_IN_PICTURE",sh:"LANGUAGE",Ge:"LIVE",bi:"UNMUTE",ci:"UNRECOGNIZED_LANGUAGE",yh:"MORE_SETTINGS",Sh:"SKIP_TO_LIVE",Kh:"PLAY",uh:"LOOP"};function gc(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function hc(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function ic(a){return a.g/(1-Math.pow(a.i,a.h))};function jc(){this.h=new gc(2);this.i=new gc(5);this.g=0}jc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(ic(this.h),ic(this.i))};function kc(){}function lc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(mc(a)==mc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=nc(a),d=nc(b),e=r(kb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function mc(a){return a instanceof ArrayBuffer?a:a.buffer}function oc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
96
+ bc.MISSING_LOCALIZATIONS="missing-localizations";bc.LOCALE_CHANGED="locale-changed";bc.LOCALE_UPDATED="locale-updated";var fc={Fh:"ON",rh:"FULL_SCREEN",sh:"LANGUAGE",Sh:"SKIP_TO_LIVE",Xg:"AD_DURATION",Ah:"MULTIPLE_LANGUAGES",Lh:"PLAYBACK_RATE",Qh:"SEEK",Ge:"LIVE",Ih:"PAUSE",nh:"EXIT_PICTURE_IN_PICTURE",BACK:"BACK",ci:"UNRECOGNIZED_LANGUAGE",Oh:"REWIND",bi:"UNMUTE",qh:"FAST_FORWARD",fh:"CAPTIONS",yh:"MORE_SETTINGS",ai:"UNDETERMINED_LANGUAGE",Zg:"AIRPLAY",gh:"CAST",Mh:"REPLAY",zf:"SUBTITLE_FORCED",lh:"EXIT_FULL_SCREEN",ah:"AUTO_QUALITY",ei:"VOLUME",Bh:"MUTE",uh:"LOOP",Yg:"AD_TIME",Nh:"RESOLUTION",ih:"ENTER_LOOP_MODE",
97
+ AD_PROGRESS:"AD_PROGRESS",Kh:"PLAY",Jh:"PICTURE_IN_PICTURE",Dh:"NOT_APPLICABLE",Rh:"SKIP_AD",Eh:"OFF",jh:"ENTER_PICTURE_IN_PICTURE",mh:"EXIT_LOOP_MODE"};function gc(a){this.i=Math.exp(Math.log(.5)/a);this.h=this.g=0}function hc(a,b,c){var d=Math.pow(a.i,b);c=c*(1-d)+d*a.g;isNaN(c)||(a.g=c,a.h+=b)}function ic(a){return a.g/(1-Math.pow(a.i,a.h))};function jc(){this.h=new gc(2);this.i=new gc(5);this.g=0}jc.prototype.getBandwidthEstimate=function(a){return 128E3>this.g?a:Math.min(ic(this.h),ic(this.i))};function kc(){}function lc(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(mc(a)==mc(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=nc(a),d=nc(b),e=r(lb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function mc(a){return a instanceof ArrayBuffer?a:a.buffer}function oc(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
98
98
  function nc(a,b,c){c=void 0===c?Infinity:c;return pc(a,void 0===b?0:b,c,Uint8Array)}function qc(a,b,c){c=void 0===c?Infinity:c;return pc(a,void 0===b?0:b,c,DataView)}function pc(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(mc(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",kc);kc.toDataView=qc;kc.toUint8=nc;kc.toArrayBuffer=oc;kc.equal=lc;function rc(a){this.h=a;this.g=void 0}rc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function sc(){}function tc(a){if(!a)return"";a=nc(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Pa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!');return a}
99
- function uc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=qc(a);d=r(kb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return vc.value()(c)}
99
+ function uc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=qc(a);d=r(lb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return vc.value()(c)}
100
100
  function wc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=nc(a);if(239==c[0]&&187==c[1]&&191==c[2])return tc(c);if(254==c[0]&&255==c[1])return uc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return uc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return uc(a,!1);if(0==c[1]&&0==c[3])return uc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return tc(a);throw new O(2,2,2003);}function xc(a){var b=new TextEncoder;return oc(b.encode(a))}
101
101
  function yc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(nb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.xa,f.item.charCodeAt(0),b);return c}K("shaka.util.StringUtils",sc);sc.resetFromCharCode=function(){vc.g=void 0};sc.toUTF16=yc;sc.toUTF8=xc;sc.fromBytesAutoDetect=wc;sc.fromUTF16=uc;sc.fromUTF8=tc;
102
102
  var vc=new rc(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={sb:65536};0<b.sb;b={sb:b.sb},b.sb/=2)if(a(b.sb))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.sb)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.sb));return e}}(b);return null});function zc(a,b){this.W=qc(a);this.h=b==Ac;this.g=0}q=zc.prototype;q.Ga=function(){return this.g<this.W.byteLength};q.ma=function(){return this.g};q.Wf=function(){return this.W.byteLength};q.na=function(){try{var a=this.W.getUint8(this.g);this.g+=1;return a}catch(b){throw Bc();}};q.kc=function(){try{var a=this.W.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Bc();}};q.S=function(){try{var a=this.W.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Bc();}};
@@ -104,30 +104,30 @@ q.hf=function(){try{var a=this.W.getInt32(this.g,this.h);this.g+=4;return a}catc
104
104
  q.skip=function(a){if(this.g+a>this.W.byteLength)throw Bc();this.g+=a};q.kf=function(a){if(this.g<a)throw Bc();this.g-=a};q.seek=function(a){if(0>a||a>this.W.byteLength)throw Bc();this.g=a};q.Mc=function(){for(var a=this.g;this.Ga()&&0!=this.W.getUint8(this.g);)this.g+=1;a=nc(this.W,a,this.g-a);this.g+=1;return tc(a)};function Bc(){return new O(2,3,3E3)}K("shaka.util.DataViewReader",zc);zc.prototype.readTerminatedString=zc.prototype.Mc;zc.prototype.seek=zc.prototype.seek;zc.prototype.rewind=zc.prototype.kf;
105
105
  zc.prototype.skip=zc.prototype.skip;zc.prototype.readBytes=zc.prototype.zb;zc.prototype.readUint64=zc.prototype.lc;zc.prototype.readInt32=zc.prototype.hf;zc.prototype.readUint32=zc.prototype.S;zc.prototype.readUint16=zc.prototype.kc;zc.prototype.readUint8=zc.prototype.na;zc.prototype.getLength=zc.prototype.Wf;zc.prototype.getPosition=zc.prototype.ma;zc.prototype.hasMoreData=zc.prototype.Ga;var Ac=1;zc.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Ac};function Cc(){this.i=[];this.h=[];this.g=!1}q=Cc.prototype;q.box=function(a,b){var c=Dc(a);this.i[c]=Ec;this.h[c]=b;return this};q.Y=function(a,b){var c=Dc(a);this.i[c]=Fc;this.h[c]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new zc(a,0);for(this.g=!1;a.Ga()&&!this.g;)this.rd(0,a,b,c)};
106
106
  q.rd=function(a,b,c,d){var e=b.ma();if(d&&e+8>b.W.byteLength)this.g=!0;else{var f=b.S(),g=b.S(),h=!1;switch(f){case 0:f=b.W.byteLength-e;break;case 1:if(d&&b.ma()+8>b.W.byteLength){this.g=!0;return}f=b.lc();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Fc){if(d&&b.ma()+4>b.W.byteLength){this.g=!0;return}m=b.S();l=m>>>24;m&=16777215}g=e+f;c&&g>b.W.byteLength&&(g=b.W.byteLength);d&&g>b.W.byteLength?this.g=!0:(d=g-b.ma(),b=0<d?b.zb(d):new Uint8Array(0),b=new zc(b,0),k({parser:this,partialOkay:c||
107
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ma(),b.W.byteLength-b.ma()))}};function Gc(a){for(var b=Hc(a);a.reader.Ga()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function Ic(a){var b=Hc(a),c=a.reader.S();c=r(kb(c));for(var d=c.next();!d.done&&(a.parser.rd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function Jc(a){return function(b){a(b.reader.zb(b.reader.W.byteLength-b.reader.ma()))}}
107
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.ma(),b.W.byteLength-b.ma()))}};function Gc(a){for(var b=Hc(a);a.reader.Ga()&&!a.parser.g;)a.parser.rd(a.start+b,a.reader,a.partialOkay)}function Ic(a){var b=Hc(a),c=a.reader.S();c=r(lb(c));for(var d=c.next();!d.done&&(a.parser.rd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d=c.next());}function Jc(a){return function(b){a(b.reader.zb(b.reader.W.byteLength-b.reader.ma()))}}
108
108
  function Dc(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Kc(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Hc(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",Cc);Cc.headerSize=Hc;Cc.typeToString=Kc;Cc.allData=Jc;Cc.sampleDescription=Ic;Cc.children=Gc;Cc.prototype.parseNext=Cc.prototype.rd;Cc.prototype.parse=Cc.prototype.parse;Cc.prototype.stop=Cc.prototype.stop;
109
109
  Cc.prototype.fullBox=Cc.prototype.Y;Cc.prototype.box=Cc.prototype.box;var Ec=0,Fc=1;function Lc(a){this.h=a;this.g=null}Lc.prototype.T=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};Lc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.Ha=function(){this.stop();this.h();return this};P.prototype.T=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.h()})).T(a);return this};P.prototype.oa=function(a){var b=this;this.stop();this.g=(new Lc(function(){b.g.T(a);b.h()})).T(a);return this};P.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};K("shaka.util.Timer",P);P.prototype.stop=P.prototype.stop;P.prototype.tickEvery=P.prototype.oa;P.prototype.tickAfter=P.prototype.T;
110
110
  P.prototype.tickNow=P.prototype.Ha;function Mc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Nc(a){return""!=Oc().canPlayType(a)}function Pc(){return Qc("Xbox One")}function Rc(){return Qc("Tizen")}function Sc(){return Qc("CrKey")}function Tc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!Rc()}function Uc(){if(!Tc())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}
111
111
  function Qc(a){return(navigator.userAgent||"").includes(a)}function Oc(){if(Vc)return Vc;Wc||(Wc=new P(function(){Vc=null}));(Vc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Vc=document.createElement("video"));Wc.T(1);return Vc}var Wc=null,Vc=null;function Xc(){}function Yc(a){a=nc(a);a=vc.value()(a);return btoa(a)}function Zc(a,b){b=void 0==b?!0:b;var c=Yc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function $c(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(nb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.xa]=c.item.charCodeAt(0);return a}
112
- function ad(a){var b=a.length/2,c=new Uint8Array(b);b=r(kb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function bd(a){var b=nc(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}
112
+ function ad(a){var b=a.length/2,c=new Uint8Array(b);b=r(lb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function bd(a){var b=nc(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}
113
113
  function cd(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=r(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(nc(c),e),e+=c.byteLength;return d}K("shaka.util.Uint8ArrayUtils",Xc);Xc.concat=cd;Xc.toHex=bd;Xc.fromHex=ad;Xc.fromBase64=$c;Xc.toBase64=Zc;Xc.toStandardBase64=Yc;
114
114
  Xc.equal=function(a,b){Eb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return lc(a,b)};function dd(a){function b(){d=!0}function c(l){f.push(l);Gc(l)}a=nc(a);var d=!1,e,f=[],g=[];(new Cc).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).Y("stsd",function(l){e=l;f.push(l);Ic(l)}).Y("encv",b).Y("enca",b).Y("avc1",function(l){g.push({box:l,Jc:1701733238})}).Y("avc3",function(l){g.push({box:l,Jc:1701733238})}).Y("ac-3",function(l){g.push({box:l,Jc:1701733217})}).Y("ec-3",function(l){g.push({box:l,Jc:1701733217})}).Y("mp4a",function(l){g.push({box:l,Jc:1701733217})}).parse(a);
115
115
  if(d)return a;if(0==g.length||!e)throw Xa(bd(a)),new O(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=ed(a,e,k.box,f,k.Jc);return a}
116
116
  function ed(a,b,c,d,e){var f=fd.value(),g=a.subarray(c.start,c.start+c.size),h=qc(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=qc(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);gd(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=Pc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,gd(e,d.start,d.size+k.byteLength);k=qc(e,b.start);b=Hc(b);a=k.getUint32(b);
117
117
  k.setUint32(b,a+1);return e}function gd(a,b,c){a=qc(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 fd=new rc(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 hd(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function id(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function jd(a,b,c){c||(c=hd);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Ed:d.Ed},e=a.next()){d.Ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.Ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
118
118
  function kd(a,b,c){c||(c=hd);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 ld(a,b,c){this.startTime=a;this.direction=md;this.endTime=b;this.payload=c;this.region=new nd;this.position=null;this.positionAlign=od;this.size=0;this.textAlign=pd;this.writingMode=qd;this.lineInterpretation=rd;this.line=null;this.lineHeight="";this.lineAlign=sd;this.displayAlign=td;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=ud;this.fontStyle=vd;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
119
- [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=!1;this.cellResolution={columns:32,rows:15}}ld.prototype.clone=function(){var a=new ld(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
119
+ [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}ld.prototype.clone=function(){var a=new ld(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
120
120
  function wd(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!kd(a.nestedCues,b.nestedCues,wd))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(!kd(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",ld);var od="auto";
121
121
  ld.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:od};var pd="center",xd={LEFT:"left",RIGHT:"right",CENTER:pd,START:"start",END:"end"};ld.textAlign=xd;var td="after",yd={BEFORE:"before",CENTER:"center",AFTER:td};ld.displayAlign=yd;var md="ltr";ld.direction={HORIZONTAL_LEFT_TO_RIGHT:md,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var qd="horizontal-tb";ld.writingMode={HORIZONTAL_TOP_TO_BOTTOM:qd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var rd=0;
122
122
  ld.lineInterpretation={LINE_NUMBER:rd,PERCENTAGE:1};var sd="start",zd={CENTER:"center",START:sd,END:"end"};ld.lineAlign=zd;var Ad={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};ld.defaultTextColor=Ad;var Bd={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};ld.defaultTextBackgroundColor=Bd;var ud=400;ld.fontWeight={NORMAL:ud,BOLD:700};
123
- var vd="normal",Cd={NORMAL:vd,ITALIC:"italic",OBLIQUE:"oblique"};ld.fontStyle=Cd;ld.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function nd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Dd;this.scroll=Ed}K("shaka.text.CueRegion",nd);var Dd=1;nd.units={PX:0,PERCENTAGE:Dd,LINES:2};var Ed="";nd.scrollMode={NONE:Ed,UP:"up"};function Fd(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=Gd(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,u=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){t=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){u=x;break}if(-1===
124
- t||-1===u)p=Hd(d,e),a.nestedCues.push(p);else{for(;t<=u;t++)if(x=p[t]){var w=x.l,y=x.i,C=x.j,D=x.h;if(w!=h||y!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Gd(d,e,w,y,C,D),h=w,k=y,l=C,m=D;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Hd(d,e),a.nestedCues.push(n));n=Gd(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
123
+ var vd="normal",Cd={NORMAL:vd,ITALIC:"italic",OBLIQUE:"oblique"};ld.fontStyle=Cd;ld.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function nd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Dd;this.scroll=Ed}K("shaka.text.CueRegion",nd);var Dd=1;nd.units={PX:0,PERCENTAGE:Dd,LINES:2};var Ed="";nd.scrollMode={NONE:Ed,UP:"up"};function Fd(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=Gd(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,x=0;x<p.length;x++)if(null!=p[x]&&""!==p[x].g.trim()){t=x;break}for(x=p.length-1;0<=x;x--)if(null!=p[x]&&""!==p[x].g.trim()){v=x;break}if(-1===
124
+ t||-1===v)p=Hd(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(x=p[t]){var w=x.l,y=x.i,C=x.j,D=x.h;if(w!=h||y!=k||C!=l||D!=m)n.payload&&a.nestedCues.push(n),n=Gd(d,e,w,y,C,D),h=w,k=y,l=C,m=D;n.payload+=x.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Hd(d,e),a.nestedCues.push(n));n=Gd(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
125
125
  function Gd(a,b,c,d,e,f){a=new ld(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Hd(a,b){var c=new ld(a,b,"");c.lineBreak=!0;return c}function Id(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Jd(){this.l=!1;this.H=this.K=0;this.I=Kd;this.i=[];this.g=this.h=this.j=0;this.D=this.A=!1;this.B="white";this.o="black";Ld(this)}function Ld(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Md())}function Md(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Nd(a,b){Od(a)&&(a.i[a.h][a.g]=new Id(b,a.D,a.A,a.o,a.B),a.g++)}function Od(a){var b=a.g<a.H&&0<=a.g;return a.h<a.K&&0<=a.h&&b}Jd.prototype.isVisible=function(){return this.l};
126
126
  function Pd(a,b,c){var d=new ld(a.j,b,"");d.textAlign=a.I===Qd?"left":a.I===Rd?"right":pd;if(c=Fd(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Qd=0,Rd=1,Kd=2;function Sd(){this.i=[];this.h=null;this.g=0}function Td(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 Ud(a.h)),a.h=null,a.g=0))}function Ud(a){this.g=0;this.h=a}Ud.prototype.Ga=function(){return this.g<this.h.length};Ud.prototype.ma=function(){return this.g};function Vd(a){if(!a.Ga())throw new O(2,2,3E3);return a.h[a.g++]}Ud.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Wd(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
127
127
  function Xd(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=Vd(b).value;b=null;c=r(Yd(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Pd(e,d,a.i)),Ld(e);return b}if(137===c)for(b=Vd(b).value,b=r(Yd(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=Vd(b).value;b=null;c=r(Yd(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Pd(e,d,a.i)),e.l=!1;return b}if(139===c){c=Vd(b).value;
128
128
  b=null;c=r(Yd(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Pd(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Vd(b).value,Zd(a,b,d);if(143===c)return d=Zd(a,255,d),$d(a),d;if(144===c)b.skip(1),d=Vd(b).value,a.g&&(a.g.A=0<(d&128),a.g.D=0<(d&64));else if(145===c)d=Vd(b).value,c=Vd(b).value,b.skip(1),a.g&&(b=ae((c&48)>>4,(c&12)>>2,c&3),a.g.B=ae((d&48)>>4,(d&12)>>2,d&3),a.g.o=b);else if(146===c)d=Vd(b).value,b=Vd(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
129
129
  b.skip(1),d=Vd(b).value,b.skip(1),a.g&&(a.g.I=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Jd;f.j=d;a.h[c]=f}d=Vd(b).value;Vd(b);Vd(b);f=Vd(b).value;var g=Vd(b).value;b=Vd(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.D=!1,b.A=!1,b.B="white",b.o="black");b=a.h[c];b.l=0<(d&32);b.K=(f&15)+1;b.H=(g&63)+1;a.g=a.h[c]}}}return null}
130
- var Yd=function be(a,b){var d,e;return Ea(be,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?v(f,d,5):f.C(5):f.C(0);b>>=1;d++;return f.C(2)})};function Zd(a,b,c){var d=null;b=r(Yd(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Pd(f,c,a.i));a.h[e]=null}return d}function $d(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ae(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return ce[a<<2|b<<1|c]}
130
+ var Yd=function be(a,b){var d,e;return Ea(be,function(f){1==f.g&&(d=0);if(5!=f.g)return 8>d?(e=1===(b&1))&&a.h[d]?u(f,d,5):f.C(5):f.C(0);b>>=1;d++;return f.C(2)})};function Zd(a,b,c){var d=null;b=r(Yd(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Pd(f,c,a.i));a.h[e]=null}return d}function $d(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ae(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return ce[a<<2|b<<1|c]}
131
131
  var de=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"]]),ce="black blue green cyan red magenta yellow white".split(" ");function ee(a,b){this.i=[];this.g=1;this.h=0;this.D=a;this.B=b;this.j=this.o=!1;this.l="white";this.A="black";fe(this)}function ge(a,b,c){return Fd(new ld(b,c,""),"CC"+(a.D<<1|a.B+1),a.i,b,c)}function fe(a){he(a,0,15);a.g=1}function ie(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case je:d=ke.has(c)?ke.get(c):String.fromCharCode(c);break;case le:d=me.get(c);break;case ne:a.i[a.g].pop();d=oe.get(c);break;case pe:a.i[a.g].pop(),d=qe.get(c)}d&&a.i[a.g].push(new Id(d,a.o,a.j,a.A,a.l))}}
132
132
  function re(a,b,c,d){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 he(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
133
133
  var je=0,le=1,ne=2,pe=3,ke=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"]]),me=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"]]),oe=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
@@ -135,25 +135,25 @@ var je=0,le=1,ne=2,pe=3,ke=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[9
135
135
  [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 se(a,b){this.h=te;this.A=new ee(a,b);this.i=new ee(a,b);this.l=new ee(a,b);this.g=this.i;this.j=0;this.o=null}function ue(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==ve&&a.h!==we&&(e=ge(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,he(c,0,15),c=a.l,c.g=0<c.h?c.h:0,he(c,0,15),d.g=15);a.h=ve;d.h=b;return e}function xe(a){a.h=ye;a.g=a.l;a.g.h=0}function ze(a){Sa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.A;a.h=we}
136
136
  var te=0,ye=1,ve=3,we=4,Ae="black green blue cyan red yellow magenta black".split(" "),Be="white green blue cyan red yellow magenta white_italics".split(" ");function Ce(){this.h=[];this.g=[];this.i=new Sd;this.l=0;this.B=new Map([["CC1",new se(0,0)],["CC2",new se(0,1)],["CC3",new se(1,0)],["CC4",new se(1,1)]]);this.A=this.o=0;this.j=new Map;De(this)}function De(a){a.o=0;a.A=0;a=r(a.B.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.o=null,fe(b.i),fe(b.l),fe(b.A)}
137
137
  function Ee(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=r(a.h),e=d.next();!e.done;e=d.next())(e=Fe(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Td(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=Ge(a,e.value),c.push.apply(c,ha(e));a.i.i=[];a.h=[];a.g=[];return c}
138
- function Fe(a,b){var c=b.type;if(16===(b.Ta&112)){var d=b.Ta>>3&1;0===c?a.o=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.o)+1));if(255===b.Ta&&255===b.jb||!b.Ta&&!b.jb||!He(b.Ta)||!He(b.jb))return 45<=++a.l&&De(a),null;a.l=0;b.Ta&=127;b.jb&=127;if(!b.Ta&&!b.jb)return null;d=null;if(16===(b.Ta&112))a:{var e=b.Ta;d=b.jb;if(c.o===(e<<8|d))c.o=null;else if(c.o=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Be[f]:7===f&&(h=!0);
138
+ function Fe(a,b){var c=b.type;if(16===(b.Ta&112)){var d=b.Ta>>3&1;0===c?a.o=d:a.A=d}c=a.B.get("CC"+(c<<1|(c?a.A:a.o)+1));if(255===b.Ta&&255===b.kb||!b.Ta&&!b.kb||!He(b.Ta)||!He(b.kb))return 45<=++a.l&&De(a),null;a.l=0;b.Ta&=127;b.kb&=127;if(!b.Ta&&!b.kb)return null;d=null;if(16===(b.Ta&112))a:{var e=b.Ta;d=b.kb;if(c.o===(e<<8|d))c.o=null;else if(c.o=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Be[f]:7===f&&(h=!0);
139
139
  d=1===(d&1);if(c.h!==we){f=c.g;if(c.h===ve&&e!==f.g){var k=1+e-f.h;re(f,k,1+f.g-f.h,f.h);he(f,0,k-1);he(f,e+1,15-e)}f.g=e;c.g.o=d;c.g.j=h;c.g.l=g;c.g.A="black"}}else if(17===(e&247)&&32===(d&240))c.g.o=!1,c.g.j=!1,c.g.l="white",ie(c.g,je,32),g=!1,e=Be[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.o=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Ae[(d&14)>>1]),c.g.A=g;else if(17===(e&247)&&48===(d&240))ie(c.g,le,d);else if(18===
140
- (e&246)&&32===(d&224))ie(c.g,e&1?pe:ne,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.jb){case 32:xe(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=ue(c,2,d);break;case 38:e=ue(c,3,d);break;case 39:e=ue(c,4,d);break;case 40:ie(c.g,je,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:fe(c.A);ze(c);break;case 43:ze(c);break;case 44:e=c.i;g=null;c.h!==we&&(g=ge(e,c.j,d));he(e,0,15);e=g;break;case 45:e=c.g;c.h!==ve?e=null:(g=ge(e,c.j,d),h=e.g-e.h+1,re(e,h-1,h,e.h),he(e,
141
- 0,h-1),he(e,e.g,15-e.g),c.j=d,e=g);break;case 46:he(c.l,0,15);break;case 47:e=null,c.h!==we&&(e=ge(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,xe(c),c.j=d}d=e;break a}d=null}else e=b.jb,ie(c.g,je,b.Ta),ie(c.g,je,e);return d}
142
- function Ge(a,b){var c=[];try{for(;b.Ga();){var d=Vd(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Vd(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Wd(e));for(var g=a.j.get(e),h=b.ma();b.ma()-h<f;){e=b;var k=Vd(e),l=k.value,m=k.pts;if(16===l){var n=Vd(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Od(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.H-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Pd(t,p,g.i));if(t.h+1>=t.K){p=t;for(var u=0,x=1;15>x;x++,
143
- u++)p.i[u]=p.i[x];for(x=0;1>x;x++,u++)p.i[u]=Md()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Pd(t,p,g.i));t.i[t.h]=Md();t.g=0;break;case 12:t.isVisible()&&(e=Pd(t,p,g.i)),Ld(t),p=t,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Xd(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?Nd(g.g,"\u266a"):Nd(g.g,
144
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Nd(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(de.has(e)){var y=de.get(e);Nd(g.g,y)}else Nd(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Nd(g.g,"_"):Nd(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof O&&3E3===C.code)Sa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function He(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ie(){}var Ke=function Je(a,b){var d,e,f,g;return Ea(Je,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ha(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.C(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.C(4):v(h,d.subarray(e,e+g),4)}e+=g;return h.C(2)})};function Le(a,b){var c=null,d=null,e=a.S();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.S());b&16&&(d=a.S());return{trackId:e,Pe:c,Jf:d}}function Me(a,b){return{Od:1==b?a.lc():a.S()}}function Ne(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.S()}}
145
- function Oe(a,b,c){var d=a.S(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=r(kb(d)),g=f.next();!g.done;g=f.next())g={le:null,sampleSize:null,ud:null},c&256&&(g.le=a.S()),c&512&&(g.sampleSize=a.S()),c&1024&&a.skip(4),c&2048&&(g.ud=0==b?a.S():a.hf()),e.push(g);return{li:d,lf:e}};function Pe(){this.j=new Ie;this.i=new Map;this.h=this.g=0}
140
+ (e&246)&&32===(d&224))ie(c.g,e&1?pe:ne,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.kb){case 32:xe(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=ue(c,2,d);break;case 38:e=ue(c,3,d);break;case 39:e=ue(c,4,d);break;case 40:ie(c.g,je,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:fe(c.A);ze(c);break;case 43:ze(c);break;case 44:e=c.i;g=null;c.h!==we&&(g=ge(e,c.j,d));he(e,0,15);e=g;break;case 45:e=c.g;c.h!==ve?e=null:(g=ge(e,c.j,d),h=e.g-e.h+1,re(e,h-1,h,e.h),he(e,
141
+ 0,h-1),he(e,e.g,15-e.g),c.j=d,e=g);break;case 46:he(c.l,0,15);break;case 47:e=null,c.h!==we&&(e=ge(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,xe(c),c.j=d}d=e;break a}d=null}else e=b.kb,ie(c.g,je,b.Ta),ie(c.g,je,e);return d}
142
+ function Ge(a,b){var c=[];try{for(;b.Ga();){var d=Vd(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Vd(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Wd(e));for(var g=a.j.get(e),h=b.ma();b.ma()-h<f;){e=b;var k=Vd(e),l=k.value,m=k.pts;if(16===l){var n=Vd(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Od(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.H-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Pd(t,p,g.i));if(t.h+1>=t.K){p=t;for(var v=0,x=1;15>x;x++,
143
+ v++)p.i[v]=p.i[x];for(x=0;1>x;x++,v++)p.i[v]=Md()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Pd(t,p,g.i));t.i[t.h]=Md();t.g=0;break;case 12:t.isVisible()&&(e=Pd(t,p,g.i)),Ld(t),p=t,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Xd(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?Nd(g.g,"\u266a"):Nd(g.g,
144
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Nd(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(de.has(e)){var y=de.get(e);Nd(g.g,y)}else Nd(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Nd(g.g,"_"):Nd(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof O&&3E3===C.code)Sa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function He(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ie(){}var Ke=function Je(a,b){var d,e,f,g;return Ea(Je,function(h){if(1==h.g){for(var k=b,l=0,m=0;m<k.length;)2==l&&3==k[m]?(l=0,k=[].concat(ha(k)),k.splice(m,1),k=new Uint8Array(k)):0==k[m]?l++:l=0,m++;d=k;e=0}if(4!=h.g){if(!(e<d.length))return h.C(0);for(f=0;255==d[e];)f+=255,e++;f+=d[e++];for(g=0;255==d[e];)g+=255,e++;g+=d[e++];return 4!=f?h.C(4):u(h,d.subarray(e,e+g),4)}e+=g;return h.C(2)})};function Le(a,b){var c=null,d=null,e=a.S();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.S());b&16&&(d=a.S());return{trackId:e,Pe:c,Jf:d}}function Me(a,b){return{Od:1==b?a.lc():a.S()}}function Ne(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.S()}}
145
+ function Oe(a,b,c){var d=a.S(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=r(lb(d)),g=f.next();!g.done;g=f.next())g={le:null,sampleSize:null,ud:null},c&256&&(g.le=a.S()),c&512&&(g.sampleSize=a.S()),c&1024&&a.skip(4),c&2048&&(g.ud=0==b?a.S():a.hf()),e.push(g);return{li:d,lf:e}};function Pe(){this.j=new Ie;this.i=new Map;this.h=this.g=0}
146
146
  Pe.prototype.init=function(a){var b=this,c=[],d=[];(new Cc).box("moov",Gc).box("mvex",Gc).Y("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.S();f=f.S();b.g=e;b.h=f}).box("trak",Gc).Y("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.S();c.push(e)}).box("mdia",Gc).Y("mdhd",function(e){e=Ne(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new O(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
147
- Pe.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Cc).box("moof",Gc).box("traf",Gc).Y("trun",function(k){f=Oe(k.reader,k.version,k.flags).lf}).Y("tfhd",function(k){k=Le(k.reader,k.flags);d=k.Pe||b.g;e=k.Jf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).Y("tfdt",function(k){g=Me(k.reader,k.version).Od}).box("mdat",function(k){if(null===g)throw new O(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,u=0,x=p;for(t.length&&(x=t[0].sampleSize||p);k.Ga();){var w=k.S();if(6==
148
- (k.na()&31)){var y=0;t.length>u&&(y=t[u].ud||0);y=(l+y)/m;for(var C=r(Ke(b.j,k.zb(w-1))),D=C.next();!D.done;D=C.next())c.push({zg:D.value,pts:y})}else k.skip(w-1);x-=w+4;0==x&&(l=t.length>u?l+(t[u].le||n):l+n,u++,x=t.length>u?t[u].sampleSize||p:p)}}).parse(a,!1);return c};function Qe(){this.h=new Pe;this.g=new Ce}Qe.prototype.init=function(a){this.h.init(a)};
149
- function Re(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=nc(e.zg);if(0<f.length&&(d=a.g,e=e.pts,f=new zc(f,0),181===f.na()&&49===f.kc()&&1195456820===f.S()&&3===f.na())){var g=f.na();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.na(),l=(k&4)>>2,m=f.na(),n=f.na();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ta:m,jb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Ee(a.g)}
147
+ Pe.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Cc).box("moof",Gc).box("traf",Gc).Y("trun",function(k){f=Oe(k.reader,k.version,k.flags).lf}).Y("tfhd",function(k){k=Le(k.reader,k.flags);d=k.Pe||b.g;e=k.Jf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).Y("tfdt",function(k){g=Me(k.reader,k.version).Od}).box("mdat",function(k){if(null===g)throw new O(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,x=p;for(t.length&&(x=t[0].sampleSize||p);k.Ga();){var w=k.S();if(6==
148
+ (k.na()&31)){var y=0;t.length>v&&(y=t[v].ud||0);y=(l+y)/m;for(var C=r(Ke(b.j,k.zb(w-1))),D=C.next();!D.done;D=C.next())c.push({zg:D.value,pts:y})}else k.skip(w-1);x-=w+4;0==x&&(l=t.length>v?l+(t[v].le||n):l+n,v++,x=t.length>v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function Qe(){this.h=new Pe;this.g=new Ce}Qe.prototype.init=function(a){this.h.init(a)};
149
+ function Re(a,b){var c=a.h.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=nc(e.zg);if(0<f.length&&(d=a.g,e=e.pts,f=new zc(f,0),181===f.na()&&49===f.kc()&&1195456820===f.S()&&3===f.na())){var g=f.na();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.na(),l=(k&4)>>2,m=f.na(),n=f.na();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,Ta:m,kb:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Ee(a.g)}
150
150
  ;function Se(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Te(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function Ue(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(Ve(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
151
- function We(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ve(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ve(a){if(!a)return[];for(var b=[],c=r(kb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function Xe(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Xe.prototype.resolve=function(){};Xe.prototype.reject=function(){};function Ye(){}K("shaka.dependencies",Ye);Ye.has=function(a){return Ze.has(a)};Ye.add=function(a,b){if(!$e[a])throw Error(a+" is not supported");Ze.set(a,function(){return b})};var $e={muxjs:"muxjs"};Ye.Allowed=$e;var Ze=new Map([["muxjs",function(){return window.muxjs}]]);function af(){var a=this;this.A=Ze.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.o=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.o.push(cd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:cd.apply(Xc,ha(a.o)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}af.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
151
+ function We(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Ve(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Ve(a){if(!a)return[];for(var b=[],c=r(lb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function Xe(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Xe.prototype.resolve=function(){};Xe.prototype.reject=function(){};function Ye(){}K("shaka.dependencies",Ye);Ye.has=function(a){return Ze.has(a)};Ye.add=function(a,b){if(!$e[a])throw Error(a+" is not supported");Ze.set(a,function(){return b})};var $e={muxjs:"muxjs"};Ye.Allowed=$e;var Ze=new Map([["muxjs",function(){return window.muxjs}]]);function af(){var a=this;this.A=Ze.get("muxjs")();this.g=new this.A.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.o=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.o.push(cd(b.initSegment,b.data))});this.g.on("done",function(){var b={data:cd.apply(Xc,ha(a.o)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}af.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
152
152
  function bf(a,b){if(!Ze.get("muxjs")()||!cf(a))return!1;if(b)return MediaSource.isTypeSupported(df(b,a));var c=df("audio",a),d=df("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function cf(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
153
153
  function df(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function ef(a,b){a.l=!0;a.h=new Xe;a.o=[];a.j=[];a.i=[];var c=nc(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new O(2,3,3018));return a.h};function ff(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function gf(a,b,c){a=ff(a,b);return Ze.get("muxjs")()&&cf(a)?df(c,a):a}function hf(a){var b=[a.mimeType];jf.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});"PQ"==a.hdr&&b.push('eotf="smpte2084"');return b.join(";")}function kf(a){a=a.split(".");var b=a[0];a.pop();return b}function lf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}
154
154
  var jf=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function mf(a){this.A=null;this.i=a;this.j=this.D=0;this.l=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function nf(a){return of[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}mf.prototype.destroy=function(){this.i=this.A=null;this.o.clear();return Promise.resolve()};
155
- function pf(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g)return v(h,Promise.resolve(),2);if(!a.A||!a.i)return h["return"]();if(null==c||null==d)return a.A.parseInit(nc(b)),h["return"]();e={periodStart:a.D,segmentStart:c,segmentEnd:d};f=a.A.parseMedia(nc(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.l});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.l);z(h)})}
156
- mf.prototype.remove=function(a,b){var c=this;return H(function(d){if(1==d.g)return v(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function qf(a,b,c){a.j=b;a.l=c}function rf(a,b,c){a.B=b;if(b=a.o.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
155
+ function pf(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g)return u(h,Promise.resolve(),2);if(!a.A||!a.i)return h["return"]();if(null==c||null==d)return a.A.parseInit(nc(b)),h["return"]();e={periodStart:a.D,segmentStart:c,segmentEnd:d};f=a.A.parseMedia(nc(b),e);g=f.filter(function(k){return k.startTime>=a.j&&k.startTime<a.l});a.i.append(g);null==a.g&&(a.g=Math.max(c,a.j));a.h=Math.min(d,a.l);z(h)})}
156
+ mf.prototype.remove=function(a,b){var c=this;return H(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function qf(a,b,c){a.j=b;a.l=c}function rf(a,b,c){a.B=b;if(b=a.o.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
157
157
  function sf(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new ld(c.startTime,c.endTime,c.text)});return b}function tf(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())tf(a,d.value,c)}
158
158
  function uf(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);tf(a,k,e);k.startTime>=a.j&&k.startTime<a.l&&(g.get(h).get(f).push(k),h==a.B&&a.i.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
159
159
  a.j):Math.min(a.g,Math.max(c,a.j));a.h=Math.max(a.h,Math.min(d,a.l))}K("shaka.text.TextEngine",mf);mf.prototype.destroy=mf.prototype.destroy;mf.findParser=function(a){return of[a]};mf.unregisterParser=function(a){delete of[a]};mf.registerParser=function(a,b){of[a]=b};var of={};function vf(a){this.g=!1;this.h=new Xe;this.i=a}vf.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 wf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function xf(){this.g=new bb}q=xf.prototype;q.release=function(){this.Pb();this.g=null};q.m=function(a,b,c,d){this.g&&(a=new yf(a,b,c,d),this.g.push(b,a))};q.Na=function(a,b,c,d){function e(g){f.Qa(a,b,e);c(g)}var f=this;this.m(a,b,e,d)};q.Qa=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Qa(),this.g.remove(b,e))}};
@@ -161,723 +161,723 @@ q.Pb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.
161
161
  yf.prototype.Qa=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function zf(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 Af(a)?b:b.capture||!1}
162
162
  function Af(a){var b=Bf;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}Bf=b}return b||!1}var Bf=void 0;function Cf(a,b,c,d){var e=this;this.g=a;this.o=c;this.j={};this.K={};this.i=null;this.L=d||function(){};this.l={};this.h=new xf;this.B={};this.D=b;this.H=new Xe;this.A=Df(this,this.H);this.M=new vf(function(){return Ef(e)});this.I=""}function Df(a,b){var c=new MediaSource;a.h.Na(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Ff(c);a.g.src=a.I;return c}function Gf(a){var b=ff(a.mimeType,a.codecs),c=hf(a);return nf(b)||MediaSource.isTypeSupported(c)||bf(b,a.type)}q=Cf.prototype;
163
163
  q.destroy=function(){return this.M.destroy()};
164
- function Ef(a){var b,c,d,e,f,g,h,k;return H(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p["catch"](Jb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.o&&b.push(a.o.destroy());for(k in a.B)b.push(a.B[k].destroy());return v(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.A=null;a.i=null;a.o=null;a.j={};a.B={};a.D=null;a.l=
164
+ function Ef(a){var b,c,d,e,f,g,h,k;return H(function(l){if(1==l.g){b=[];for(c in a.l)for(d=a.l[c],e=d[0],a.l[c]=d.slice(0,1),e&&b.push(e.p["catch"](Jb)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.i&&b.push(a.i.destroy());a.o&&b.push(a.o.destroy());for(k in a.B)b.push(a.B[k].destroy());return u(l,Promise.all(b),2)}a.h&&(a.h.release(),a.h=null);a.g&&(a.g.removeAttribute("src"),a.g.load(),a.g=null);a.A=null;a.i=null;a.o=null;a.j={};a.B={};a.D=null;a.l=
165
165
  {};z(l)})}
166
- q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g)return d=Sb,v(m,c.H,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ka:e.Ka},g=f.next())e.Ka=g.value,h=a.get(e.Ka),k=ff(h.mimeType,h.codecs),e.Ka==d.qa?Hf(c,k):(!b&&MediaSource.isTypeSupported(k)||!bf(k,e.Ka)||(c.B[e.Ka]=new af,k=df(e.Ka,k)),l=c.A.addSourceBuffer(k),c.h.m(l,"error",function(n){return function(){c.l[n.Ka][0].p.reject(new O(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.m(l,"updateend",function(n){return function(){return If(c,n.Ka)}}(e)),
166
+ q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g)return d=Sb,u(m,c.H,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={Ka:e.Ka},g=f.next())e.Ka=g.value,h=a.get(e.Ka),k=ff(h.mimeType,h.codecs),e.Ka==d.qa?Hf(c,k):(!b&&MediaSource.isTypeSupported(k)||!bf(k,e.Ka)||(c.B[e.Ka]=new af,k=df(e.Ka,k)),l=c.A.addSourceBuffer(k),c.h.m(l,"error",function(n){return function(){c.l[n.Ka][0].p.reject(new O(2,3,3014,c.g.error?c.g.error.code:0))}}(e)),c.h.m(l,"updateend",function(n){return function(){return If(c,n.Ka)}}(e)),
167
167
  c.j[e.Ka]=l,c.K[e.Ka]=k,c.l[e.Ka]=[]);z(m)})};function Hf(a,b){a.i||(a.i=new mf(a.o));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.i.A=Lb(of[b]))}function Jf(a){return a.A?"ended"==a.A.readyState:!0}function Kf(a,b){if(b==Rb)var c=a.i.g;else c=Lf(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function Mf(a,b){return b==Rb?a.i.h:Se(Lf(a,b))}
168
168
  function Nf(a,b,c){if(b==Rb)return a=a.i,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Lf(a,b);return Ue(a,c)}q.gd=function(){var a={total:Ve(this.g.buffered),audio:Ve(Lf(this,"audio")),video:Ve(Lf(this,"video")),text:[]};if(this.i){var b=this.i.g,c=this.i.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Lf(a,b){try{return a.j[b].buffered}catch(c){return null}}
169
- function Of(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return H(function(u){if(1==u.g){g=Sb;if(b==g.qa)return v(u,pf(a.i,c,d,e),0);if(a.B[b])return v(u,ef(a.B[b],c),10);if(f)return a.i||Hf(a,"text/vtt"),null==d&&null==e?a.D.init(c):(h=Re(a.D,c),h.length&&(k=a.j[g.hb].timestampOffset,uf(a.i,h,d,e,k))),c=Pf(a,c,d,b),v(u,Qf(a,b,function(){a.j[b].appendBuffer(c)}),0);c=Pf(a,c,d,b);return v(u,Qf(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=u.h;a.i||Hf(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
170
- m,e));l.captions&&l.captions.length&&(n=a.j[g.hb].timestampOffset,p=sf(l.captions),uf(a.i,p,d,e,n));t=l.data;t=Pf(a,t,d,b);return v(u,Qf(a,b,function(){a.j[b].appendBuffer(t)}),0)})}function Rf(a,b){var c=Mf(a,"video")||0;rf(a.i,b,c)}function Sf(a){a.i&&rf(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return H(function(f){e=Sb;return a==e.qa?v(f,d.i.remove(b,c),0):v(f,Qf(d,a,function(){c<=b?If(d,a):d.j[a].remove(b,c)}),0)})};
171
- function Tf(a,b){var c;return H(function(d){c=Sb;return b==c.qa?a.i?v(d,a.i.remove(0,Infinity),0):d["return"]():v(d,Qf(a,b,function(){var e=a.A.duration;0>=e?If(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return H(function(d){c=Sb;return a==c.qa?d["return"]():v(d,Qf(b,a,function(){b.g.currentTime-=.001;If(b,a)}),0)})};
172
- function Vf(a,b,c,d,e){var f;return H(function(g){f=Sb;return b==f.qa?(a.i.D=c,qf(a.i,d,e),g["return"]()):v(g,Promise.all([Qf(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;If(a,b)}),Qf(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;If(a,b)}),Qf(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;If(a,b)})]),0)})}
173
- q.endOfStream=function(a){var b=this;return H(function(c){return v(c,Wf(b,function(){Jf(b)||(a?b.A.endOfStream(a):b.A.endOfStream())}),0)})};q.cb=function(a){var b=this;return H(function(c){return v(c,Wf(b,function(){b.A.duration=a}),0)})};q.getDuration=function(){return this.A.duration};function If(a,b){var c=a.l[b][0];c&&(c.p.resolve(),Xf(a,b))}function Qf(a,b,c){wf(a.M);c={start:c,p:new Xe};a.l[b].push(c);1==a.l[b].length&&Yf(a,b);return c.p}
174
- function Wf(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:wf(a.M);c=[];d={};for(e in a.j)d.sc=new Xe,f={start:function(l){return function(){return l.sc.resolve()}}(d),p:d.sc},a.l[e].push(f),c.push(d.sc),1==a.l[e].length&&f.start(),d={sc:d.sc};A(k,2);return v(k,Promise.all(c),4);case 4:wa(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.j)Xf(a,h)}z(k)}})}function Xf(a,b){a.l[b].shift();Yf(a,b)}
175
- function Yf(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),Xf(a,b)}}function Pf(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(Rc()||Pc())&&"mp4"==a.K[d].split(";")[0].split("/")[1]&&(b=dd(b));return b}var Ff=window.URL.createObjectURL;function Zf(a,b){var c=$f(a.variants,b);c=ag(c);c=bg(c);var d=cg(c);a.variants=a.variants.filter(function(e){return dg(e)==d?!0:!1})}function ag(a){var b=new bb;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=dg(c);b.push(d,c)}return b}
169
+ function Of(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return H(function(v){if(1==v.g){g=Sb;if(b==g.qa)return u(v,pf(a.i,c,d,e),0);if(a.B[b])return u(v,ef(a.B[b],c),10);if(f)return a.i||Hf(a,"text/vtt"),null==d&&null==e?a.D.init(c):(h=Re(a.D,c),h.length&&(k=a.j[g.ib].timestampOffset,uf(a.i,h,d,e,k))),c=Pf(a,c,d,b),u(v,Qf(a,b,function(){a.j[b].appendBuffer(c)}),0);c=Pf(a,c,d,b);return u(v,Qf(a,b,function(){a.j[b].appendBuffer(c)}),0)}l=v.h;a.i||Hf(a,"text/vtt");l.metadata&&(m=a.j[b].timestampOffset,a.L(l.metadata,
170
+ m,e));l.captions&&l.captions.length&&(n=a.j[g.ib].timestampOffset,p=sf(l.captions),uf(a.i,p,d,e,n));t=l.data;t=Pf(a,t,d,b);return u(v,Qf(a,b,function(){a.j[b].appendBuffer(t)}),0)})}function Rf(a,b){var c=Mf(a,"video")||0;rf(a.i,b,c)}function Sf(a){a.i&&rf(a.i,"",0)}q.remove=function(a,b,c){var d=this,e;return H(function(f){e=Sb;return a==e.qa?u(f,d.i.remove(b,c),0):u(f,Qf(d,a,function(){c<=b?If(d,a):d.j[a].remove(b,c)}),0)})};
171
+ function Tf(a,b){var c;return H(function(d){c=Sb;return b==c.qa?a.i?u(d,a.i.remove(0,Infinity),0):d["return"]():u(d,Qf(a,b,function(){var e=a.A.duration;0>=e?If(a,b):a.j[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return H(function(d){c=Sb;return a==c.qa?d["return"]():u(d,Qf(b,a,function(){b.g.currentTime-=.001;If(b,a)}),0)})};
172
+ function Uf(a,b,c,d,e){var f;return H(function(g){f=Sb;return b==f.qa?(a.i.D=c,qf(a.i,d,e),g["return"]()):u(g,Promise.all([Qf(a,b,function(){var h=a.j[b].appendWindowStart,k=a.j[b].appendWindowEnd;a.j[b].abort();a.j[b].appendWindowStart=h;a.j[b].appendWindowEnd=k;If(a,b)}),Qf(a,b,function(){var h=c;0>h&&(h+=.001);a.j[b].timestampOffset=h;If(a,b)}),Qf(a,b,function(){a.j[b].appendWindowStart=0;a.j[b].appendWindowEnd=e;a.j[b].appendWindowStart=d;If(a,b)})]),0)})}
173
+ q.endOfStream=function(a){var b=this;return H(function(c){return u(c,Vf(b,function(){Jf(b)||(a?b.A.endOfStream(a):b.A.endOfStream())}),0)})};q.eb=function(a){var b=this;return H(function(c){return u(c,Vf(b,function(){b.A.duration=a}),0)})};q.getDuration=function(){return this.A.duration};function If(a,b){var c=a.l[b][0];c&&(c.p.resolve(),Wf(a,b))}function Qf(a,b,c){wf(a.M);c={start:c,p:new Xe};a.l[b].push(c);1==a.l[b].length&&Yf(a,b);return c.p}
174
+ function Vf(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:wf(a.M);c=[];d={};for(e in a.j)d.sc=new Xe,f={start:function(l){return function(){return l.sc.resolve()}}(d),p:d.sc},a.l[e].push(f),c.push(d.sc),1==a.l[e].length&&f.start(),d={sc:d.sc};A(k,2);return u(k,Promise.all(c),4);case 4:wa(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.j)Wf(a,h)}z(k)}})}function Wf(a,b){a.l[b].shift();Yf(a,b)}
175
+ function Yf(a,b){var c=a.l[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new O(2,3,3017,b)):c.p.reject(new O(2,3,3015,d)),Wf(a,b)}}function Pf(a,b,c,d){var e=a.g.mediaKeys;null==c&&e&&(Rc()||Pc())&&"mp4"==a.K[d].split(";")[0].split("/")[1]&&(b=dd(b));return b}var Ff=window.URL.createObjectURL;function Zf(a,b){var c=$f(a.variants,b);c=ag(c);c=bg(c);var d=cg(c);a.variants=a.variants.filter(function(e){return dg(e)==d?!0:!1})}function ag(a){var b=new bb;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=dg(c);b.push(d,c)}return b}
176
176
  function bg(a){var b=0,c=new Map,d=a.size();cb(a,function(e,f){for(var g=r(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new bb);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}function cg(a){var b="",c=Infinity;cb(a,function(d,e){for(var f=0,g=0,h=r(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}
177
177
  function dg(a){var b="";a.video&&(b=kf(a.video.codecs));var c="";a.audio&&(c=kf(a.audio.codecs));return b+"-"+c}function eg(a,b,c){a.variants=a.variants.filter(function(d){return fg(d,b,c)})}
178
178
  function fg(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}
179
- function gg(a,b,c,d){return H(function(e){if(1==e.g)return d?v(e,jg(c,0<c.offlineSessionIds.length),2):(hg(c,a),ig(c),e.C(2));kg(b,c);lg(c);mg(c);z(e)})}function hg(a,b){a.variants=a.variants.filter(function(c){return b&&b.L?ng(b,c)?!0:!1:!0})}
180
- function jg(a,b){return H(function(c){if(1==c.g)return v(c,og(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(Pc()&&e&&(e.width&&1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Va(pg(d)),!1;(e=d.decodingInfos.some(function(f){return f.supported}))||Va(pg(d));return e});z(c)})}
181
- function ig(a){a.variants=a.variants.filter(function(b){var c=b.audio;b=b.video;return c&&!Gf(c)||b&&!Gf(b)||Pc()&&b&&(b.width&&1920<b.width||b.height&&1080<b.height)&&b.codecs.includes("avc1.")?!1:!0})}
182
- function og(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return H(function(u){if(d=a.some(function(x){return x.decodingInfos.length}))return u["return"]();e=window.shakaMediaCapabilities;f=[];g=function(x,w){var y;return H(function(C){if(1==C.g)return A(C,2),v(C,e.decodingInfo(w),4);if(2!=C.g)return y=C.h,x.decodingInfos.push(y),wa(C,0);F(C);JSON.stringify(w);z(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=qg(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return v(u,Promise.all(f),
179
+ function gg(a,b,c,d){return H(function(e){if(1==e.g)return d?u(e,jg(c,0<c.offlineSessionIds.length),2):(hg(c,a),ig(c),e.C(2));kg(b,c);lg(c);mg(c);z(e)})}function hg(a,b){a.variants=a.variants.filter(function(c){return b&&b.L?ng(b,c)?!0:!1:!0})}
180
+ function jg(a,b){return H(function(c){if(1==c.g)return u(c,og(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=pg(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=Ob("video",g);g=Ob("audio",g);g=gf(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=gf(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=qg(f.codecs),f=gf(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(Pc()&&e&&(e.width&&
181
+ 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Va(rg(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Va(rg(d));return e});z(c)})}function ig(a){a.variants=a.variants.filter(function(b){var c=b.audio;b=b.video;return c&&!Gf(c)||b&&!Gf(b)||Pc()&&b&&(b.width&&1920<b.width||b.height&&1080<b.height)&&b.codecs.includes("avc1.")?!1:!0})}
182
+ function og(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return H(function(v){if(d=a.some(function(x){return x.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(x,w){var y;return H(function(C){if(1==C.g)return A(C,2),u(C,e.decodingInfo(w),4);if(2!=C.g)return y=C.h,x.decodingInfos.push(y),wa(C,0);F(C);JSON.stringify(w);z(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=sg(l,b,c),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,f.push(g(l,t));return u(v,Promise.all(f),
183
183
  0)})}
184
- function qg(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=Ob("video",g);f="vp9"==f?"vp09.00.10.08":f;g=Ob("audio",g);g=gf(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=gf(e.mimeType,"vp9"==f?"vp09.00.10.08":f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};
185
- if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f="ac-3"==d.codecs.toLowerCase()&&Rc()?"ec-3":d.codecs,f=gf(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;
186
- g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,
187
- t=r(h.initData),u=t.next();!u.done;u=t.next())p.add(u.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&(m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=
188
- m;a.push(l)}return a}function kg(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!rg(d,a.audio)||c&&a&&a.video&&!rg(c,a.video)?!1:!0})}function lg(a){a.textStreams=a.textStreams.filter(function(b){return nf(ff(b.mimeType,b.codecs))})}function mg(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Qc("Web0S")||Rc()||Sc())&&c.push("image/webp");return c.includes(b.mimeType)})}
189
- function rg(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
190
- function sg(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
184
+ function sg(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=Ob("video",g);f=pg(f);g=Ob("audio",g);g=gf(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=pg(f);f=gf(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
185
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=qg(d.codecs),f=gf(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
186
+ f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=r(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
187
+ (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function qg(a){return Rc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
188
+ function pg(a){return"vp9"==a?"vp09.00.10.08":a}function kg(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!tg(d,a.audio)||c&&a&&a.video&&!tg(c,a.video)?!1:!0})}function lg(a){a.textStreams=a.textStreams.filter(function(b){return nf(ff(b.mimeType,b.codecs))})}function mg(a){a.imageStreams=a.imageStreams.filter(function(b){var c=["image/svg+xml","image/png","image/jpeg"];(Qc("Web0S")||Rc()||Sc())&&c.push("image/webp");return c.includes(b.mimeType)})}
189
+ function tg(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
190
+ function ug(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
191
191
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||
192
192
  null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
193
- function tg(a){return{id:a.id,active:!1,type:Rb,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,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,originalAudioId:null,
193
+ function vg(a){return{id:a.id,active:!1,type:Rb,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,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,originalAudioId:null,
194
194
  originalTextId:a.originalId,originalImageId:null}}
195
- function ug(a){return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:a.width||null,height:a.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:a.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
196
- originalTextId:null,originalImageId:a.originalId}}function vg(a){a.__shaka_id||(a.__shaka_id=wg++);return a.__shaka_id}function xg(a){var b=yg(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
197
- function yg(a){return{id:vg(a),active:!1,type:"",bandwidth:0,language:Ub(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType: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,originalTextId:null,originalImageId:null}}
198
- function zg(a){return a.allowedByApplication&&a.allowedByKeySystem}function Ag(a){return a.filter(function(b){return zg(b)})}
195
+ function wg(a){return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:a.width||null,height:a.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:a.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
196
+ originalTextId:null,originalImageId:a.originalId}}function xg(a){a.__shaka_id||(a.__shaka_id=yg++);return a.__shaka_id}function zg(a){var b=Ag(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
197
+ function Ag(a){return{id:xg(a),active:!1,type:"",bandwidth:0,language:Ub(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType: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,originalTextId:null,originalImageId:null}}
198
+ function Bg(a){return a.allowedByApplication&&a.allowedByKeySystem}function Cg(a){return a.filter(function(b){return Bg(b)})}
199
199
  function $f(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ha(e))):d.get(Math.min.apply(Math,ha(c)))}
200
- function Bg(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=ac(Ub(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Ub(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Cg(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(Ib,[]);return a.length?
201
- Cg(e,a[0]):e}function Cg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function pg(a){var b=[];a.audio&&b.push(Dg(a.audio));a.video&&b.push(Dg(a.video));return b.join(", ")}
202
- function Dg(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"}var wg=0;function Eg(){var a=this;this.j=null;this.h=!1;this.g=new jc;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.v.useNetworkInformation&&a.h){a.g=new jc;var b=a.chooseVariant();b&&a.j(b)}});this.i=[];this.o=1;this.A=!1;this.v=this.l=null}q=Eg.prototype;q.stop=function(){this.j=null;this.h=!1;this.i=[];this.o=1;this.l=null};q.init=function(a){this.j=a};
203
- q.chooseVariant=function(){var a=Fg(this.v.restrictions,this.i),b=this.g.getBandwidthEstimate(Gg(this));this.i.length&&!a.length&&(a=Fg(null,this.i),a=[a[0]]);var c=a[0]||null;a=r(nb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.o)?1:Math.abs(this.o);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.v.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.v.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.l=Date.now();return c};q.enable=function(){this.h=!0};
204
- q.disable=function(){this.h=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;hc(c.h,e,d);hc(c.i,e,d)}if(null!=this.l&&this.h)a:{if(!this.A){if(!(128E3<=this.g.g))break a;this.A=!0}else if(Date.now()-this.l<1E3*this.v.switchInterval)break a;c=this.chooseVariant();this.g.getBandwidthEstimate(Gg(this));c&&this.j(c)}};q.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.v.defaultBandwidthEstimate)};q.setVariants=function(a){this.i=a};
205
- q.playbackRateChanged=function(a){this.o=a};q.configure=function(a){this.v=a};function Gg(a){var b=a.v.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.v.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function Fg(a,b){a&&(b=b.filter(function(c){return fg(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}K("shaka.abr.SimpleAbrManager",Eg);Eg.prototype.configure=Eg.prototype.configure;
206
- Eg.prototype.playbackRateChanged=Eg.prototype.playbackRateChanged;Eg.prototype.setVariants=Eg.prototype.setVariants;Eg.prototype.getBandwidthEstimate=Eg.prototype.getBandwidthEstimate;Eg.prototype.segmentDownloaded=Eg.prototype.segmentDownloaded;Eg.prototype.disable=Eg.prototype.disable;Eg.prototype.enable=Eg.prototype.enable;Eg.prototype.chooseVariant=Eg.prototype.chooseVariant;Eg.prototype.init=Eg.prototype.init;Eg.prototype.stop=Eg.prototype.stop;function Hg(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Hg.prototype.add=function(a){return Ig(this.h,a)?(this.g.add(a),!0):!1};
207
- function Ig(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)&&Jg(c,d)&&Kg(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Jg(c,d)&&Kg(c.roles,d.roles)));return c?!1:!0}Hg.prototype.values=function(){return this.g.values()};
208
- function Jg(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return kf(g)}),d=b.codecs.split(",").map(function(g){return kf(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(kb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
209
- function Kg(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Lg(a){this.g=a;this.h=new Mg(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Lg.prototype.create=function(a){var b=this,c=a.filter(function(d){return Ig(b.g,d)});return c.length?new Hg(c[0],c):this.h.create(a)};function Mg(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
210
- Mg.prototype.create=function(a){var b=[];b=Ng(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Og(b,this.j);a.length&&(b=a);this.g&&(a=$f(b,this.g),a.length&&(b=a));this.h&&(a=Pg(b,this.h),a.length&&(b=a));a=new Hg(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Ig(a.h,c)&&a.add(c);return a};function Ng(a,b){var c=Ub(b),d=ac(c,a.map(function(e){return $b(e)}));return d?a.filter(function(e){return d==$b(e)}):[]}
211
- function Og(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Pg(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Qg(){this.g=Rg;this.h=(new Map).set(Rg,2).set(Sg,1)}function Tg(a,b,c){a.h.set(Rg,c).set(Sg,b)}var Sg=0,Rg=1;function Ug(a,b){var c=Vg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.o=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
212
- function Wg(a){var b,c;return H(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new O(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return v(d,new Promise(function(e){(new P(e)).T(c/1E3)}),2)}a.h*=a.o;z(d)})}function Vg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Xg(a,b){this.promise=a;this.i=b;this.g=!1}function Yg(a){return new Xg(Promise.reject(a),function(){return Promise.resolve()})}function Zg(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new Xg(a,function(){return Promise.resolve()})}function $g(a){return new Xg(Promise.resolve(a),function(){return Promise.resolve()})}function ah(a){return new Xg(a,function(){return a["catch"](function(){})})}Xg.prototype.abort=function(){this.g=!0;return this.i()};
213
- function bh(a){return new Xg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Xg.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
214
- Xg.prototype.ra=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=ch(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Xe,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Xg(f,function(){return d()})};
215
- function ch(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()}}}K("shaka.util.AbortableOperation",Xg);Xg.prototype.chain=Xg.prototype.ra;Xg.prototype["finally"]=Xg.prototype["finally"];Xg.all=bh;Xg.prototype.abort=Xg.prototype.abort;Xg.notAbortable=ah;Xg.completed=$g;Xg.aborted=Zg;Xg.failed=Yg;function dh(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 eh(a){var b={},c;for(c in a)b[c]=a[c];return b};function fh(){this.g=[]}function gh(a,b){a.g.push(b["finally"](function(){id(a.g,b)}))}fh.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function hh(a){db.call(this);this.i=!1;this.l=new fh;this.g=new Set;this.h=new Set;this.j=a||null;this.o=!1}ra(hh,db);q=hh.prototype;q.se=function(a){this.o=a};function ih(a,b,c,d){c=c||jh;var e=kh[a];if(!e||c>=e.priority)kh[a]={priority:c,Ag:b,Cg:void 0===d?!1:d}}q.Dg=function(a){this.g.add(a)};q.Tg=function(a){this.g["delete"](a)};q.Gf=function(){this.g.clear()};q.Eg=function(a){this.h.add(a)};q.Ug=function(a){this.h["delete"](a)};q.Hf=function(){this.h.clear()};
216
- function lh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
217
- q.request=function(a,b){var c=this,d=new mh;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new nh(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?dh(b.retryParameters):Vg();b.uris=dh(b.uris);e=oh(this,a,b);var f=e.ra(function(){return ph(c,a,b,new Ug(b.retryParameters,!1),0,null,d)}),g=f.ra(function(n){return qh(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
218
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ra(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.og||!c.j||t.fromCache||a!=rh||c.j(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new nh(m.promise,function(){return m.abort()},d);gh(this.l,e);return e};
219
- function oh(a,b,c){var d=$g(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Jd:e.Jd},f=a.next())e.Jd=f.value,d=d.ra(function(g){return function(){c.body&&(c.body=oc(c.body));return g.Jd(b,c)}}(e));return d.ra(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
220
- function ph(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new pb(c.uris[e]),k=h.Ya,l=!1;k||(k=location.protocol,k=k.slice(0,-1),qb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=kh[k])?k.Ag:null;if(!m)return Yg(new O(2,1,1E3,h));var n=k.Cg,p=null,t=null,u=!1,x;return ah(Wg(d)).ra(function(){if(a.i)return Zg();x=Date.now();var w=m(c.uris[e],c,b,function(D,B,E){p&&p.stop();t&&t.T(C/1E3);a.j&&b==rh&&(a.j(D,B),l=!0,g.g=E)});if(!n)return w;var y=c.retryParameters.connectionTimeout;
221
- y&&(p=new P(function(){u=!0;w.abort()}),p.T(y/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new P(function(){u=!0;w.abort()}));return w}).ra(function(w){p&&p.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);return{response:w,og:l}},function(w){p&&p.stop();t&&t.stop();if(a.i)return Zg();u&&(w=new O(1,1,1003,c.uris[e],b));if(w instanceof O){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity){var y=(new Map).set("error",w);y=new N("retry",y);a.dispatchEvent(y);e=(e+1)%c.uris.length;
222
- return ph(a,b,c,d,e,w,g)}}throw w;})}function qh(a,b,c){var d=$g(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.ra(function(g){return function(){var h=c.response;h.data&&(h.data=oc(h.data));return g.Kd(b,h)}}(e));return d.ra(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}K("shaka.net.NetworkingEngine",hh);hh.prototype.request=hh.prototype.request;hh.prototype.destroy=hh.prototype.destroy;
223
- hh.makeRequest=lh;hh.defaultRetryParameters=function(){return Vg()};hh.prototype.clearAllResponseFilters=hh.prototype.Hf;hh.prototype.unregisterResponseFilter=hh.prototype.Ug;hh.prototype.registerResponseFilter=hh.prototype.Eg;hh.prototype.clearAllRequestFilters=hh.prototype.Gf;hh.prototype.unregisterRequestFilter=hh.prototype.Tg;hh.prototype.registerRequestFilter=hh.prototype.Dg;hh.unregisterScheme=function(a){delete kh[a]};hh.registerScheme=ih;hh.prototype.setForceHTTPS=hh.prototype.se;
224
- function mh(){this.g=0}hh.NumBytesRemainingClass=mh;function nh(a,b,c){Xg.call(this,a,b);this.h=c}ra(nh,Xg);hh.PendingRequest=nh;var rh=1;hh.RequestType={MANIFEST:0,SEGMENT:rh,LICENSE:2,APP:3,TIMING:4};var jh=3;hh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:jh};var kh={};function sh(){}function th(a){a=wc(a);return(new pb(a)).$a}function uh(a,b,c){function d(h){qc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(nc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=yc(b,!0):e=b;a=wc(a);a=yc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}K("shaka.util.FairPlayUtils",sh);sh.initDataTransform=uh;sh.defaultGetContentId=th;function vh(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function wh(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xh(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function yh(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.B=new Set;this.g=this.o=null;this.ha=this.L=!1;this.I=0;this.i=null;this.h=new xf;this.j=new Map;this.D=[];this.A=new Xe;this.v=null;this.l=function(d){c.A.reject(d);a.onError(d)};this.ia=new Map;this.ba=new Map;this.R=new P(function(){return zh(c)});this.H=!1;this.K=[];this.O=!1;this.ea=(new P(function(){Ah(c)})).oa(b);this.A["catch"](function(){});this.M=new vf(function(){return Bh(c)});this.V=!1}q=yh.prototype;q.destroy=function(){return this.M.destroy()};
225
- function Bh(a){return H(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.A.reject(),a.ea.stop(),a.ea=null,a.R.stop(),a.R=null,v(b,Ch(a),2);case 2:if(!a.g){b.C(3);break}A(b,4);return v(b,a.g.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:F(b);case 5:a.g=null;case 3:a.i=null,a.B.clear(),a.o=null,a.D=[],a.v=null,a.l=function(){},a.G=null,a.V=!1,z(b)}})}q.configure=function(a){this.v=a};function Dh(a,b,c,d){a.ha=!0;a.D=[];a.H=c;return Eh(a,b,!!d)}
226
- function Fh(a,b,c,d){a.D=c;a.H=0<c.length;return Eh(a,b,!!d)}function Gh(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,initData:null,keyIds:null}];g.set(b,e);return Hh(a,g,[],!1)}
227
- function Eh(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,u,x,w,y;return H(function(C){if(1==C.g){if(d=Ih(a))for(e=r(b),f=e.next();!f.done;f=e.next())g=f.value,g.video&&(g.video.drmInfos=[d]),g.audio&&(g.audio.drmInfos=[d]);h=b.some(function(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});h||(k=vh(a.v.servers),Jh(b,k));l=r(b);for(f=l.next();!f.done;f=l.next())for(m=f.value,n=Kh(m),p=r(n),t=p.next();!t.done;t=p.next())u=t.value,Lh(u,vh(a.v.servers),vh(a.v.advanced||{}));return c?
228
- v(C,og(b,a.H,a.V),2):(x=Mh(a,b),C.C(2))}w=h||Object.keys(a.v.servers).length;if(!w)return a.L=!0,C["return"](Promise.resolve());y=Hh(a,x,b,c);return C["return"](h?y:y["catch"](function(){}))})}
229
- q.wc=function(a){var b=this,c,d;return H(function(e){if(1==e.g){if(!b.o)return b.h.Na(a,"encrypted",function(){b.l(new O(2,6,6010))}),e["return"]();b.g=a;b.h.Na(b.g,"play",function(){for(var f=r(b.K),g=f.next();!g.done;g=f.next())Nh(b,g.value);b.O=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.m(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ch(b)});c=b.g.setMediaKeys(b.o);c=c["catch"](function(f){return Promise.reject(new O(2,6,6003,f.message))});return v(e,
230
- c,2)}wf(b.M);Oh(b);b.i.initData.length||b.D.length||(d=function(f){return Ph(b,f.initDataType,nc(f.initData))},b.h.m(b.g,"encrypted",d));z(e)})};function Qh(a){var b;return H(function(c){if(1==c.g){if(!(a.o&&a.i&&a.i.serverCertificate&&a.i.serverCertificate.length))return c.C(0);A(c,3);return v(c,a.o.setServerCertificate(a.i.serverCertificate),5)}if(3!=c.g)return wa(c,0);b=F(c);throw new O(2,6,6004,b.message);})}
231
- function Rh(a,b){var c,d,e;return H(function(f){if(1==f.g)return v(f,Sh(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.eb=new Xe,d.push(e.eb);d.push(c.remove());return v(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}function Oh(a){for(var b=(a.i?a.i.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Ph(a,d.initDataType,d.initData);c=r(a.D);for(d=c.next();!d.done;d=c.next())Sh(a,d.value);b.length||a.D.length||a.A.resolve();return a.A}
232
- function Ph(a,b,c){var d=a.j.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(lc(c,e.value.initData)&&!Qc("Tizen 2"))return;Th(a,b,c)}function Uh(a){return a?a.keySystem:""}function Vh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Wh(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(Rc()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.B.has(b)||a.B.has(c)}return a.B.has(b)}
233
- function Xh(a){a=a.j.keys();a=eb(a,function(b){return b.sessionId});return Array.from(a)}q.Ac=function(){var a=Infinity,b=this.j.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.jd=function(){return wh(this.ba)};
234
- function Mh(a,b){for(var c=new Set,d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Kh(e.value));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=r(c);for(e=d.next();!e.done;e=d.next())Lh(e.value,vh(a.v.servers),vh(a.v.advanced||{}));f=a.H?"required":"optional";var g=a.H?["persistent-license"]:["temporary"];d=new Map;c=r(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:f,
235
- sessionTypes:g,label:e.keySystem,drmInfos:[]});c=r(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=r([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Yh(g),k=null;"ac-3"==g.codecs.toLowerCase()&&Rc()&&(k=Yh(g,"ec-3"));var l=r(g.drmInfos);for(e=l.next();!e.done;e=l.next()){var m=e.value;e=d.get(m.keySystem);e.drmInfos.push(m);m.initData&&m.initData.length&&(e.initDataTypes=[].concat(ha(new Set(m.initData.map(function(p){return p.initDataType})))));m.distinctiveIdentifierRequired&&
200
+ function Dg(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=ac(Ub(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Ub(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=Eg(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(Ib,[]);return a.length?
201
+ Eg(e,a[0]):e}function Eg(a,b){return a.filter(function(c){return c.roles.includes(b)})}function rg(a){var b=[];a.audio&&b.push(Fg(a.audio));a.video&&b.push(Fg(a.video));return b.join(", ")}
202
+ function Fg(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"}var yg=0;function Gg(){var a=this;this.j=null;this.h=!1;this.g=new jc;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.v.useNetworkInformation&&a.h){a.g=new jc;var b=a.chooseVariant();b&&a.j(b)}});this.i=[];this.o=1;this.A=!1;this.v=this.l=null}q=Gg.prototype;q.stop=function(){this.j=null;this.h=!1;this.i=[];this.o=1;this.l=null};q.init=function(a){this.j=a};
203
+ q.chooseVariant=function(){var a=Hg(this.v.restrictions,this.i),b=this.g.getBandwidthEstimate(Ig(this));this.i.length&&!a.length&&(a=Hg(null,this.i),a=[a[0]]);var c=a[0]||null;a=r(nb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.o)?1:Math.abs(this.o);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.v.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.v.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.l=Date.now();return c};q.enable=function(){this.h=!0};
204
+ q.disable=function(){this.h=!1};q.segmentDownloaded=function(a,b){var c=this.g;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.g+=b;hc(c.h,e,d);hc(c.i,e,d)}if(null!=this.l&&this.h)a:{if(!this.A){if(!(128E3<=this.g.g))break a;this.A=!0}else if(Date.now()-this.l<1E3*this.v.switchInterval)break a;c=this.chooseVariant();this.g.getBandwidthEstimate(Ig(this));c&&this.j(c)}};q.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.v.defaultBandwidthEstimate)};q.setVariants=function(a){this.i=a};
205
+ q.playbackRateChanged=function(a){this.o=a};q.configure=function(a){this.v=a};function Ig(a){var b=a.v.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.v.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function Hg(a,b){a&&(b=b.filter(function(c){return fg(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}K("shaka.abr.SimpleAbrManager",Gg);Gg.prototype.configure=Gg.prototype.configure;
206
+ Gg.prototype.playbackRateChanged=Gg.prototype.playbackRateChanged;Gg.prototype.setVariants=Gg.prototype.setVariants;Gg.prototype.getBandwidthEstimate=Gg.prototype.getBandwidthEstimate;Gg.prototype.segmentDownloaded=Gg.prototype.segmentDownloaded;Gg.prototype.disable=Gg.prototype.disable;Gg.prototype.enable=Gg.prototype.enable;Gg.prototype.chooseVariant=Gg.prototype.chooseVariant;Gg.prototype.init=Gg.prototype.init;Gg.prototype.stop=Gg.prototype.stop;function Jg(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}Jg.prototype.add=function(a){return Kg(this.h,a)?(this.g.add(a),!0):!1};
207
+ function Kg(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)&&Lg(c,d)&&Mg(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(Lg(c,d)&&Mg(c.roles,d.roles)));return c?!1:!0}Jg.prototype.values=function(){return this.g.values()};
208
+ function Lg(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return kf(g)}),d=b.codecs.split(",").map(function(g){return kf(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(lb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
209
+ function Mg(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Ng(a){this.g=a;this.h=new Og(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Ng.prototype.create=function(a){var b=this,c=a.filter(function(d){return Kg(b.g,d)});return c.length?new Jg(c[0],c):this.h.create(a)};function Og(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
210
+ Og.prototype.create=function(a){var b=[];b=Pg(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Qg(b,this.j);a.length&&(b=a);this.g&&(a=$f(b,this.g),a.length&&(b=a));this.h&&(a=Rg(b,this.h),a.length&&(b=a));a=new Jg(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,Kg(a.h,c)&&a.add(c);return a};function Pg(a,b){var c=Ub(b),d=ac(c,a.map(function(e){return $b(e)}));return d?a.filter(function(e){return d==$b(e)}):[]}
211
+ function Qg(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Rg(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Sg(){this.g=Tg;this.h=(new Map).set(Tg,2).set(Ug,1)}function Vg(a,b,c){a.h.set(Tg,c).set(Ug,b)}var Ug=0,Tg=1;function Wg(a,b){var c=Xg();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.A=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.o=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
212
+ function Yg(a){var b,c;return H(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new O(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.A);return u(d,new Promise(function(e){(new P(e)).T(c/1E3)}),2)}a.h*=a.o;z(d)})}function Xg(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Zg(a,b){this.promise=a;this.i=b;this.g=!1}function $g(a){return new Zg(Promise.reject(a),function(){return Promise.resolve()})}function ah(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new Zg(a,function(){return Promise.resolve()})}function bh(a){return new Zg(Promise.resolve(a),function(){return Promise.resolve()})}function ch(a){return new Zg(a,function(){return a["catch"](function(){})})}Zg.prototype.abort=function(){this.g=!0;return this.i()};
213
+ function dh(a){return new Zg(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Zg.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
214
+ Zg.prototype.ra=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=eh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Xe,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Zg(f,function(){return d()})};
215
+ function eh(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()}}}K("shaka.util.AbortableOperation",Zg);Zg.prototype.chain=Zg.prototype.ra;Zg.prototype["finally"]=Zg.prototype["finally"];Zg.all=dh;Zg.prototype.abort=Zg.prototype.abort;Zg.notAbortable=ch;Zg.completed=bh;Zg.aborted=ah;Zg.failed=$g;function fh(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 gh(a){var b={},c;for(c in a)b[c]=a[c];return b};function hh(){this.g=[]}function ih(a,b){a.g.push(b["finally"](function(){id(a.g,b)}))}hh.prototype.destroy=function(){for(var a=[],b=r(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function jh(a){db.call(this);this.i=!1;this.l=new hh;this.g=new Set;this.h=new Set;this.j=a||null;this.o=!1}ra(jh,db);q=jh.prototype;q.se=function(a){this.o=a};function kh(a,b,c,d){c=c||lh;var e=mh[a];if(!e||c>=e.priority)mh[a]={priority:c,Ag:b,Cg:void 0===d?!1:d}}q.Dg=function(a){this.g.add(a)};q.Tg=function(a){this.g["delete"](a)};q.Gf=function(){this.g.clear()};q.Eg=function(a){this.h.add(a)};q.Ug=function(a){this.h["delete"](a)};q.Hf=function(){this.h.clear()};
216
+ function nh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();return this.l.destroy()};
217
+ q.request=function(a,b){var c=this,d=new oh;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new ph(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?fh(b.retryParameters):Xg();b.uris=fh(b.uris);e=qh(this,a,b);var f=e.ra(function(){return rh(c,a,b,new Wg(b.retryParameters,!1),0,null,d)}),g=f.ra(function(n){return sh(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
218
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.ra(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.og||!c.j||t.fromCache||a!=th||c.j(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new ph(m.promise,function(){return m.abort()},d);ih(this.l,e);return e};
219
+ function qh(a,b,c){var d=bh(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={Jd:e.Jd},f=a.next())e.Jd=f.value,d=d.ra(function(g){return function(){c.body&&(c.body=oc(c.body));return g.Jd(b,c)}}(e));return d.ra(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
220
+ function rh(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new pb(c.uris[e]),k=h.Ya,l=!1;k||(k=location.protocol,k=k.slice(0,-1),qb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=mh[k])?k.Ag:null;if(!m)return $g(new O(2,1,1E3,h));var n=k.Cg,p=null,t=null,v=!1,x;return ch(Yg(d)).ra(function(){if(a.i)return ah();x=Date.now();var w=m(c.uris[e],c,b,function(D,B,E){p&&p.stop();t&&t.T(C/1E3);a.j&&b==th&&(a.j(D,B),l=!0,g.g=E)});if(!n)return w;var y=c.retryParameters.connectionTimeout;
221
+ y&&(p=new P(function(){v=!0;w.abort()}),p.T(y/1E3));var C=c.retryParameters.stallTimeout;C&&(t=new P(function(){v=!0;w.abort()}));return w}).ra(function(w){p&&p.stop();t&&t.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);return{response:w,og:l}},function(w){p&&p.stop();t&&t.stop();if(a.i)return ah();v&&(w=new O(1,1,1003,c.uris[e],b));if(w instanceof O){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity){var y=(new Map).set("error",w);y=new N("retry",y);a.dispatchEvent(y);e=(e+1)%c.uris.length;
222
+ return rh(a,b,c,d,e,w,g)}}throw w;})}function sh(a,b,c){var d=bh(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={Kd:e.Kd},f=a.next())e.Kd=f.value,d=d.ra(function(g){return function(){var h=c.response;h.data&&(h.data=oc(h.data));return g.Kd(b,h)}}(e));return d.ra(function(){return c},function(g){var h=2;if(g instanceof O){if(7001==g.code)throw g;h=g.severity}throw new O(h,1,1007,g);})}K("shaka.net.NetworkingEngine",jh);jh.prototype.request=jh.prototype.request;jh.prototype.destroy=jh.prototype.destroy;
223
+ jh.makeRequest=nh;jh.defaultRetryParameters=function(){return Xg()};jh.prototype.clearAllResponseFilters=jh.prototype.Hf;jh.prototype.unregisterResponseFilter=jh.prototype.Ug;jh.prototype.registerResponseFilter=jh.prototype.Eg;jh.prototype.clearAllRequestFilters=jh.prototype.Gf;jh.prototype.unregisterRequestFilter=jh.prototype.Tg;jh.prototype.registerRequestFilter=jh.prototype.Dg;jh.unregisterScheme=function(a){delete mh[a]};jh.registerScheme=kh;jh.prototype.setForceHTTPS=jh.prototype.se;
224
+ function oh(){this.g=0}jh.NumBytesRemainingClass=oh;function ph(a,b,c){Zg.call(this,a,b);this.h=c}ra(ph,Zg);jh.PendingRequest=ph;var th=1;jh.RequestType={MANIFEST:0,SEGMENT:th,LICENSE:2,APP:3,TIMING:4};var lh=3;jh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:lh};var mh={};function uh(){}function vh(a){a=wc(a);return(new pb(a)).$a}function wh(a,b,c){function d(h){qc(f).setUint32(g,h.byteLength,!0);g+=4;f.set(nc(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=yc(b,!0):e=b;a=wc(a);a=yc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}K("shaka.util.FairPlayUtils",uh);uh.initDataTransform=wh;uh.defaultGetContentId=vh;function xh(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function yh(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function zh(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function Ah(a,b){var c=this;b=void 0===b?1:b;this.G=a;this.B=new Set;this.g=this.o=null;this.ha=this.L=!1;this.I=0;this.i=null;this.h=new xf;this.j=new Map;this.D=[];this.A=new Xe;this.v=null;this.l=function(d){c.A.reject(d);a.onError(d)};this.ia=new Map;this.ba=new Map;this.R=new P(function(){return Bh(c)});this.H=!1;this.K=[];this.O=!1;this.ea=(new P(function(){Ch(c)})).oa(b);this.A["catch"](function(){});this.M=new vf(function(){return Dh(c)});this.V=!1}q=Ah.prototype;q.destroy=function(){return this.M.destroy()};
225
+ function Dh(a){return H(function(b){switch(b.g){case 1:return a.h.release(),a.h=null,a.A.reject(),a.ea.stop(),a.ea=null,a.R.stop(),a.R=null,u(b,Eh(a),2);case 2:if(!a.g){b.C(3);break}A(b,4);return u(b,a.g.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:F(b);case 5:a.g=null;case 3:a.i=null,a.B.clear(),a.o=null,a.D=[],a.v=null,a.l=function(){},a.G=null,a.V=!1,z(b)}})}q.configure=function(a){this.v=a};function Fh(a,b,c,d){a.ha=!0;a.D=[];a.H=c;return Gh(a,b,!!d)}
226
+ function Hh(a,b,c,d){a.D=c;a.H=0<c.length;return Gh(a,b,!!d)}function Ih(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,initData:null,keyIds:null}];g.set(b,e);return Jh(a,g,[],!1)}
227
+ function Gh(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y;return H(function(C){if(1==C.g){if(d=Kh(a))for(e=r(b),f=e.next();!f.done;f=e.next())g=f.value,g.video&&(g.video.drmInfos=[d]),g.audio&&(g.audio.drmInfos=[d]);h=b.some(function(D){return D.video&&D.video.drmInfos.length||D.audio&&D.audio.drmInfos.length?!0:!1});h||(k=xh(a.v.servers),Lh(b,k));l=r(b);for(f=l.next();!f.done;f=l.next())for(m=f.value,n=Mh(m),p=r(n),t=p.next();!t.done;t=p.next())v=t.value,Nh(v,xh(a.v.servers),xh(a.v.advanced||{}));return c?
228
+ u(C,og(b,a.H,a.V),2):(x=Oh(a,b),C.C(2))}w=h||Object.keys(a.v.servers).length;if(!w)return a.L=!0,C["return"](Promise.resolve());y=Jh(a,x,b,c);return C["return"](h?y:y["catch"](function(){}))})}
229
+ q.wc=function(a){var b=this,c,d;return H(function(e){if(1==e.g){if(!b.o)return b.h.Na(a,"encrypted",function(){b.l(new O(2,6,6010))}),e["return"]();b.g=a;b.h.Na(b.g,"play",function(){for(var f=r(b.K),g=f.next();!g.done;g=f.next())Ph(b,g.value);b.O=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.g&&b.h.m(b.g,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Eh(b)});c=b.g.setMediaKeys(b.o);c=c["catch"](function(f){return Promise.reject(new O(2,6,6003,f.message))});return u(e,
230
+ c,2)}wf(b.M);Qh(b);b.i.initData.length||b.D.length||(d=function(f){return Rh(b,f.initDataType,nc(f.initData))},b.h.m(b.g,"encrypted",d));z(e)})};function Sh(a){var b;return H(function(c){if(1==c.g){if(!(a.o&&a.i&&a.i.serverCertificate&&a.i.serverCertificate.length))return c.C(0);A(c,3);return u(c,a.o.setServerCertificate(a.i.serverCertificate),5)}if(3!=c.g)return wa(c,0);b=F(c);throw new O(2,6,6004,b.message);})}
231
+ function Th(a,b){var c,d,e;return H(function(f){if(1==f.g)return u(f,Uh(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.j.get(c))e.fb=new Xe,d.push(e.fb);d.push(c.remove());return u(f,Promise.all(d),3)}a.j["delete"](c);z(f)})}function Qh(a){for(var b=(a.i?a.i.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Rh(a,d.initDataType,d.initData);c=r(a.D);for(d=c.next();!d.done;d=c.next())Uh(a,d.value);b.length||a.D.length||a.A.resolve();return a.A}
232
+ function Rh(a,b,c){var d=a.j.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(lc(c,e.value.initData)&&!Qc("Tizen 2"))return;Vh(a,b,c)}function Wh(a){return a?a.keySystem:""}function Xh(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Yh(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(Rc()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.B.has(b)||a.B.has(c)}return a.B.has(b)}
233
+ function Zh(a){a=a.j.keys();a=fb(a,function(b){return b.sessionId});return Array.from(a)}q.Ac=function(){var a=Infinity,b=this.j.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.jd=function(){return yh(this.ba)};
234
+ function Oh(a,b){for(var c=new Set,d=r(b),e=d.next();!e.done;e=d.next()){var f=r(Mh(e.value));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=r(c);for(e=d.next();!e.done;e=d.next())Nh(e.value,xh(a.v.servers),xh(a.v.advanced||{}));f=a.H?"required":"optional";var g=a.H?["persistent-license"]:["temporary"];d=new Map;c=r(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:f,
235
+ sessionTypes:g,label:e.keySystem,drmInfos:[]});c=r(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=r([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=$h(g),k=null;"ac-3"==g.codecs.toLowerCase()&&Rc()&&(k=$h(g,"ec-3"));var l=r(g.drmInfos);for(e=l.next();!e.done;e=l.next()){var m=e.value;e=d.get(m.keySystem);e.drmInfos.push(m);m.initData&&m.initData.length&&(e.initDataTypes=[].concat(ha(new Set(m.initData.map(function(p){return p.initDataType})))));m.distinctiveIdentifierRequired&&
236
236
  (e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");m.sessionType&&(e.sessionTypes=[m.sessionType]);m="audio"==g.type?m.audioRobustness:m.videoRobustness;var n={robustness:m||"",contentType:h};"audio"==g.type?e.audioCapabilities.push(n):e.videoCapabilities.push(n);k&&(m={robustness:m||"",contentType:k},"audio"==g.type?e.audioCapabilities.push(m):e.videoCapabilities.push(m))}}return d}
237
- function Yh(a,b){var c=ff(a.mimeType,b||a.codecs);return bf(c)?df(a.type,c):c}
238
- function Hh(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,u,x,w;return H(function(y){switch(y.g){case 1:e=new Map;if(d){a:{for(var C=r(c),D=C.next();!D.done;D=C.next()){var B=r(Kh(D.value));for(D=B.next();!D.done;D=B.next()){var E=D.value;e.has(E.keySystem)||e.set(E.keySystem,[]);e.get(E.keySystem).push(E)}}if(1==e.size&&e.has(""))throw new O(2,6,6E3);C=r([!0,!1]);for(B=C.next();!B.done;B=C.next())for(B=B.value,E=r(c),D=E.next();!D.done;D=E.next()){var G=r(D.value.decodingInfos);for(D=G.next();!D.done;D=G.next()){var I=
239
- D.value;if(I.supported&&I.keySystemAccess){D=e.get(I.keySystemAccess.keySystem);var L=r(D);for(D=L.next();!D.done;D=L.next())if(!!D.value.licenseServerUri==B){f=I.keySystemAccess;break a}}}}f=null}y.C(2);break}return v(y,Zh(a,b),3);case 3:f=y.h;case 2:g=f;if(!g)throw new O(2,6,6001);wf(a.M);A(y,4);a.B.clear();h=g.getConfiguration();k=h.audioCapabilities||[];l=h.videoCapabilities||[];m=r(k);for(n=m.next();!n.done;n=m.next())p=n.value,a.B.add(p.contentType.toLowerCase());t=r(l);for(n=t.next();!n.done;n=
240
- t.next())u=n.value,a.B.add(u.contentType.toLowerCase());if(d){B=g.keySystem;C=e.get(g.keySystem);E=[];D=[];G=[];I=new Set;$h(C,E,D,G,I);L=a.H?"persistent-license":"temporary";B={keySystem:B,licenseServerUri:E[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||L,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:D[0],initData:G,keyIds:I};C=r(C);for(E=
241
- C.next();!E.done;E=C.next())E=E.value,E.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(B.persistentStateRequired=E.persistentStateRequired);C=B}else C=g.keySystem,B=b.get(g.keySystem),E=[],D=[],G=[],I=new Set,$h(B.drmInfos,E,D,G,I),C={keySystem:C,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",
242
- audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:D[0],initData:G,keyIds:I};a.i=C;if(!a.i.licenseServerUri)throw new O(2,6,6012,a.i.keySystem);return v(y,g.createMediaKeys(),6);case 6:return x=y.h,wf(a.M),a.o=x,a.L=!0,v(y,Qh(a),7);case 7:wf(a.M);wa(y,0);break;case 4:w=F(y);wf(a.M,w);a.i=null;a.B.clear();if(w instanceof O)throw w;throw new O(2,6,6002,w.message);}})}
243
- function Zh(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return H(function(u){switch(u.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r([!0,!1]);h=g.next();case 2:if(h.done){u.C(4);break}k=h.value;l=r(b.keys());m=l.next();case 5:if(m.done){h=g.next();u.C(2);break}n=m.value;p=b.get(n);t=p.drmInfos.some(function(x){return!!x.licenseServerUri});
244
- if(t!=k){u.C(6);break}A(u,8);return v(u,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:return c=u.h,u["return"](c);case 8:F(u);case 9:wf(a.M);case 6:m=l.next();u.C(5);break;case 4:return u["return"](c)}})}
245
- function Ih(a){a=vh(a.v.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=ad(f),h=ad(e);g={kty:"oct",kid:Zc(g,!1),k:Zc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:nc(xc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
237
+ function $h(a,b){var c=ff(a.mimeType,b||a.codecs);return bf(c)?df(a.type,c):c}
238
+ function Jh(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,x,w;return H(function(y){switch(y.g){case 1:e=new Map;if(d){a:{for(var C=r(c),D=C.next();!D.done;D=C.next()){var B=r(Mh(D.value));for(D=B.next();!D.done;D=B.next()){var E=D.value;e.has(E.keySystem)||e.set(E.keySystem,[]);e.get(E.keySystem).push(E)}}if(1==e.size&&e.has(""))throw new O(2,6,6E3);C=r([!0,!1]);for(B=C.next();!B.done;B=C.next())for(B=B.value,E=r(c),D=E.next();!D.done;D=E.next()){var G=r(D.value.decodingInfos);for(D=G.next();!D.done;D=G.next()){var I=
239
+ D.value;if(I.supported&&I.keySystemAccess){D=e.get(I.keySystemAccess.keySystem);var L=r(D);for(D=L.next();!D.done;D=L.next())if(!!D.value.licenseServerUri==B){f=I.keySystemAccess;break a}}}}f=null}y.C(2);break}return u(y,ai(a,b),3);case 3:f=y.h;case 2:g=f;if(!g)throw new O(2,6,6001);wf(a.M);A(y,4);a.B.clear();h=g.getConfiguration();k=h.audioCapabilities||[];l=h.videoCapabilities||[];m=r(k);for(n=m.next();!n.done;n=m.next())p=n.value,a.B.add(p.contentType.toLowerCase());t=r(l);for(n=t.next();!n.done;n=
240
+ t.next())v=n.value,a.B.add(v.contentType.toLowerCase());if(d){B=g.keySystem;C=e.get(g.keySystem);E=[];D=[];G=[];I=new Set;bi(C,E,D,G,I);L=a.H?"persistent-license":"temporary";B={keySystem:B,licenseServerUri:E[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||L,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:D[0],initData:G,keyIds:I};C=r(C);for(E=
241
+ C.next();!E.done;E=C.next())E=E.value,E.distinctiveIdentifierRequired&&(B.distinctiveIdentifierRequired=E.distinctiveIdentifierRequired),E.persistentStateRequired&&(B.persistentStateRequired=E.persistentStateRequired);C=B}else C=g.keySystem,B=b.get(g.keySystem),E=[],D=[],G=[],I=new Set,bi(B.drmInfos,E,D,G,I),C={keySystem:C,licenseServerUri:E[0],distinctiveIdentifierRequired:"required"==B.distinctiveIdentifier,persistentStateRequired:"required"==B.persistentState,sessionType:B.sessionTypes[0]||"temporary",
242
+ audioRobustness:(B.audioCapabilities?B.audioCapabilities[0].robustness:"")||"",videoRobustness:(B.videoCapabilities?B.videoCapabilities[0].robustness:"")||"",serverCertificate:D[0],initData:G,keyIds:I};a.i=C;if(!a.i.licenseServerUri)throw new O(2,6,6012,a.i.keySystem);return u(y,g.createMediaKeys(),6);case 6:return x=y.h,wf(a.M),a.o=x,a.L=!0,u(y,Sh(a),7);case 7:wf(a.M);wa(y,0);break;case 4:w=F(y);wf(a.M,w);a.i=null;a.B.clear();if(w instanceof O)throw w;throw new O(2,6,6002,w.message);}})}
243
+ function ai(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return H(function(v){switch(v.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=r(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=r([!0,!1]);h=g.next();case 2:if(h.done){v.C(4);break}k=h.value;l=r(b.keys());m=l.next();case 5:if(m.done){h=g.next();v.C(2);break}n=m.value;p=b.get(n);t=p.drmInfos.some(function(x){return!!x.licenseServerUri});
244
+ if(t!=k){v.C(6);break}A(v,8);return u(v,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:return c=v.h,v["return"](c);case 8:F(v);case 9:wf(a.M);case 6:m=l.next();v.C(5);break;case 4:return v["return"](c)}})}
245
+ function Kh(a){a=xh(a.v.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=ad(f),h=ad(e);g={kty:"oct",kid:Zc(g,!1),k:Zc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:nc(xc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
246
246
  sessionType:"",initData:d,keyIds:new Set(c)}}
247
- function Sh(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:try{c=a.o.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.m(c,"message",function(k){a.g&&a.v.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.O?a.K.push(k):Nh(a,k)});a.h.m(c,"keystatuseschange",function(k){return ai(a,k)});e={initData:null,loaded:!1,fe:Infinity,eb:null,type:"persistent-license"};a.j.set(c,e);A(h,2);return v(h,c.load(b),4);case 4:f=h.h;wf(a.M);
248
- if(!f)return a.j["delete"](c),a.l(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;bi(a)&&a.A.resolve();return h["return"](c);case 2:g=F(h),wf(a.M,g),a.j["delete"](c),a.l(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
249
- function Th(a,b,c){var d=a.i.sessionType;try{var e=a.o.createSession(d)}catch(f){a.l(new O(2,6,6005,f.message));return}a.h.m(e,"message",function(f){a.g&&a.v.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.O?a.K.push(f):Nh(a,f)});a.h.m(e,"keystatuseschange",function(f){return ai(a,f)});a.j.set(e,{initData:c,loaded:!1,fe:Infinity,eb:null,type:d});try{c=a.v.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.l(b);return}a.v.logLicenseExchange&&Zc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.M.g){a.j["delete"](e);
250
- 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.l(new O(2,6,6006,f.message,f,h))}})}function ci(a,b,c){"skd"==b&&(b=c.serverCertificate,c=th(a),a=uh(a,c,b));return a}
251
- function Nh(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,u,x;H(function(w){switch(w.g){case 1:return c=b.target,a.v.logLicenseExchange&&Zc(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.v.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=lh([e],a.v.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Vh(a.i.keySystem)&&di(g),h=Date.now(),A(w,2),l=a.G.fc.request(2,g),v(w,
252
- l.promise,4);case 4:k=w.h;wa(w,3);break;case 2:return m=F(w),n=new O(2,6,6007,m),a.l(n),d&&d.eb&&d.eb.reject(n),w["return"]();case 3:if(a.M.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.v.logLicenseExchange&&Zc(k.data);A(w,5);return v(w,c.update(k.data),7);case 7:wa(w,6);break;case 5:return p=F(w),t=new O(2,6,6008,p.message),a.l(t),d&&d.eb&&d.eb.reject(t),w["return"]();case 6:u=new N("drmsessionupdate"),a.G.onEvent(u),d&&(d.eb&&d.eb.resolve(),x=new P(function(){d.loaded=!0;bi(a)&&a.A.resolve()}),
253
- x.T(ei)),z(w)}})}function di(a){var b=uc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=$c(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
254
- function ai(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Vh(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=qc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=bd(h);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.eb&&(a.j["delete"](c),c.close()["catch"](function(){}));
255
- bi(a)&&(a.A.resolve(),a.R.T(fi))}function zh(a){var b=a.ia,c=a.ba;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.l(new O(2,6,6014));a.G.pd(wh(c))}
256
- function gi(){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.3_0 com.apple.fps.2_0 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,
257
- c],f=new Map,g=function(l){var m,n,p;return H(function(t){switch(t.g){case 1:return A(t,2),v(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Qc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),v(t,m.createMediaKeys(),5);case 5:wa(t,0);break;case 2:F(t),f.set(l,null),z(t)}})},h=a.map(function(l){return g(l)}),v(k,Promise.all(h),2)):k["return"](wh(f))})}
258
- function hi(a){var b;return H(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).T(ii)}),A(c,2),v(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);F(c);z(c)})}
259
- function Ch(a){var b;return H(function(c){b=Array.from(a.j.entries());a.j.clear();return v(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return H(function(g){if(1==g.g)return A(g,2),a.ha||a.D.includes(e.sessionId)||"persistent-license"!==f.type?v(g,hi(e),5):v(g,e.remove(),5);if(2!=g.g)return wa(g,0);F(g);z(g)})})),0)})}
260
- function ng(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted&&(c=Yh(c),!Wh(a,c))||d&&d.encrypted&&(d=Yh(d),!Wh(a,d)))return!1;var e=Uh(a.i);d=Kh(b);return 0==d.length||d.some(function(f){return f.keySystem==e})}
261
- function ji(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Wa:f.Wa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Wa=[];f.Wa=f.Wa.concat(e.initData||[]);f.Wa=f.Wa.concat(h.initData||[]);f.Wa=f.Wa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Wa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ha(e.keyIds),ha(h.keyIds))):
247
+ function Uh(a,b){var c,d,e,f,g;return H(function(h){switch(h.g){case 1:try{c=a.o.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.l(d),h["return"](Promise.reject(d))}a.h.m(c,"message",function(k){a.g&&a.v.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.O?a.K.push(k):Ph(a,k)});a.h.m(c,"keystatuseschange",function(k){return ci(a,k)});e={initData:null,loaded:!1,fe:Infinity,fb:null,type:"persistent-license"};a.j.set(c,e);A(h,2);return u(h,c.load(b),4);case 4:f=h.h;wf(a.M);
248
+ if(!f)return a.j["delete"](c),a.l(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;di(a)&&a.A.resolve();return h["return"](c);case 2:g=F(h),wf(a.M,g),a.j["delete"](c),a.l(new O(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
249
+ function Vh(a,b,c){var d=a.i.sessionType;try{var e=a.o.createSession(d)}catch(f){a.l(new O(2,6,6005,f.message));return}a.h.m(e,"message",function(f){a.g&&a.v.delayLicenseRequestUntilPlayed&&a.g.paused&&!a.O?a.K.push(f):Ph(a,f)});a.h.m(e,"keystatuseschange",function(f){return ci(a,f)});a.j.set(e,{initData:c,loaded:!1,fe:Infinity,fb:null,type:d});try{c=a.v.initDataTransform(c,b,a.i)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.l(b);return}a.v.logLicenseExchange&&Zc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.M.g){a.j["delete"](e);
250
+ 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.l(new O(2,6,6006,f.message,f,h))}})}function ei(a,b,c){"skd"==b&&(b=c.serverCertificate,c=vh(a),a=wh(a,c,b));return a}
251
+ function Ph(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;H(function(w){switch(w.g){case 1:return c=b.target,a.v.logLicenseExchange&&Zc(b.message),d=a.j.get(c),e=a.i.licenseServerUri,f=a.v.advanced[a.i.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=nh([e],a.v.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,Xh(a.i.keySystem)&&fi(g),h=Date.now(),A(w,2),l=a.G.fc.request(2,g),u(w,
252
+ l.promise,4);case 4:k=w.h;wa(w,3);break;case 2:return m=F(w),n=new O(2,6,6007,m),a.l(n),d&&d.fb&&d.fb.reject(n),w["return"]();case 3:if(a.M.g)return w["return"]();a.I+=(Date.now()-h)/1E3;a.v.logLicenseExchange&&Zc(k.data);A(w,5);return u(w,c.update(k.data),7);case 7:wa(w,6);break;case 5:return p=F(w),t=new O(2,6,6008,p.message),a.l(t),d&&d.fb&&d.fb.reject(t),w["return"]();case 6:v=new N("drmsessionupdate"),a.G.onEvent(v),d&&(d.fb&&d.fb.resolve(),x=new P(function(){d.loaded=!0;di(a)&&a.A.resolve()}),
253
+ x.T(gi)),z(w)}})}function fi(a){var b=uc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=$c(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
254
+ function ci(a,b){var c=b.target,d=a.j.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Xh(a.i.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=qc(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=bd(h);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.fb&&(a.j["delete"](c),c.close()["catch"](function(){}));
255
+ di(a)&&(a.A.resolve(),a.R.T(hi))}function Bh(a){var b=a.ia,c=a.ba;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.l(new O(2,6,6014));a.G.pd(yh(c))}
256
+ function ii(){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.3_0 com.apple.fps.2_0 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,
257
+ c],f=new Map,g=function(l){var m,n,p;return H(function(t){switch(t.g){case 1:return A(t,2),u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,Qc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(t,m.createMediaKeys(),5);case 5:wa(t,0);break;case 2:F(t),f.set(l,null),z(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](yh(f))})}
258
+ function ji(a){var b;return H(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).T(ki)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return wa(c,0);F(c);z(c)})}
259
+ function Eh(a){var b;return H(function(c){b=Array.from(a.j.entries());a.j.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return H(function(g){if(1==g.g)return A(g,2),a.ha||a.D.includes(e.sessionId)||"persistent-license"!==f.type?u(g,ji(e),5):u(g,e.remove(),5);if(2!=g.g)return wa(g,0);F(g);z(g)})})),0)})}
260
+ function ng(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted&&(c=$h(c),!Yh(a,c))||d&&d.encrypted&&(d=$h(d),!Yh(a,d)))return!1;var e=Wh(a.i);d=Mh(b);return 0==d.length||d.some(function(f){return f.keySystem==e})}
261
+ function li(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=r(b),h=g.next();!h.done;f={Wa:f.Wa},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Wa=[];f.Wa=f.Wa.concat(e.initData||[]);f.Wa=f.Wa.concat(h.initData||[]);f.Wa=f.Wa.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Wa.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ha(e.keyIds),ha(h.keyIds))):
262
262
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,initData:f.Wa,keyIds:g});break}}return c}
263
- function Kh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Ah(a){a.j.forEach(function(b,c){var d=b.fe,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.fe=e)})}function bi(a){a=a.j.values();return gb(a,function(b){return b.loaded})}
264
- function Jh(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
265
- function $h(a,b,c,d,e){var f={};a=r(a);for(var g=a.next();!g.done;f={Ra:f.Ra},g=a.next()){f.Ra=g.value;b.includes(f.Ra.licenseServerUri)||b.push(f.Ra.licenseServerUri);f.Ra.serverCertificate&&(c.some(function(l){return function(m){return lc(m,l.Ra.serverCertificate)}}(f))||c.push(f.Ra.serverCertificate));if(f.Ra.initData){g={};for(var h=r(f.Ra.initData),k=h.next();!k.done;g={Sc:g.Sc},k=h.next())g.Sc=k.value,d.some(function(l){return function(m){var n=l.Sc;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
263
+ function Mh(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function Ch(a){a.j.forEach(function(b,c){var d=b.fe,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.fe=e)})}function di(a){a=a.j.values();return gb(a,function(b){return b.loaded})}
264
+ function Lh(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
265
+ function bi(a,b,c,d,e){var f={};a=r(a);for(var g=a.next();!g.done;f={Ra:f.Ra},g=a.next()){f.Ra=g.value;b.includes(f.Ra.licenseServerUri)||b.push(f.Ra.licenseServerUri);f.Ra.serverCertificate&&(c.some(function(l){return function(m){return lc(m,l.Ra.serverCertificate)}}(f))||c.push(f.Ra.serverCertificate));if(f.Ra.initData){g={};for(var h=r(f.Ra.initData),k=h.next();!k.done;g={Sc:g.Sc},k=h.next())g.Sc=k.value,d.some(function(l){return function(m){var n=l.Sc;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
266
266
  n.initDataType&&lc(m.initData,n.initData)}}(g))||d.push(g.Sc)}if(f.Ra.keyIds)for(g=r(f.Ra.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
267
- function Lh(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))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||
268
- (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var ii=1,ei=5,fi=.5,ki=new rc(function(){return oc(new Uint8Array([0]))});function li(){}function mi(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){if(d&&(e=ni[d.toLowerCase()]))return k["return"](e);if(f=oi(a))if(g=pi[f])return k["return"](g);return d?k.C(2):v(k,qi(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=ni[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
269
- function qi(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=lh([a],c),d.method="HEAD",v(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function oi(a){a=(new pb(a)).Pa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",li);li.unregisterParserByMime=function(a){delete ni[a]};li.registerParserByMime=function(a,b){ni[a]=b};
270
- li.registerParserByExtension=function(a,b){pi[a]=b};var ni={},pi={};function ri(a,b,c){this.Fa=a;this.Ca=b;this.wa=c}ri.prototype.Ec=function(){return this.Ca};ri.prototype.zc=function(){return this.wa};function si(a,b){return a&&b?a.Ec()==b.Ec()&&a.zc()==b.zc()&&kd(a.Fa(),b.Fa()):a==b}K("shaka.media.InitSegmentReference",ri);ri.prototype.getEndByte=ri.prototype.zc;ri.prototype.getStartByte=ri.prototype.Ec;
271
- function wi(a,b,c,d,e,f,g,h,k,l){l=void 0===l?[]:l;this.startTime=a;this.j=this.endTime=b;this.i=c;this.Ca=d;this.wa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l}q=wi.prototype;q.Fa=function(){return this.i()};q.ig=function(){return this.startTime};q.Uf=function(){return this.endTime};q.Ec=function(){return this.Ca};q.zc=function(){return this.wa};K("shaka.media.SegmentReference",wi);wi.prototype.getEndByte=wi.prototype.zc;wi.prototype.getStartByte=wi.prototype.Ec;
272
- wi.prototype.getEndTime=wi.prototype.Uf;wi.prototype.getStartTime=wi.prototype.ig;wi.prototype.getUris=wi.prototype.Fa;function Q(a,b,c){this.j=a;this.sd=b;this.o=this.l=Infinity;this.g=1;this.h=this.i=null;this.A=0;this.B=!0;this.D=0;this.H=void 0===c?!0:c;this.I=0}q=Q.prototype;q.getDuration=function(){return this.l};q.cg=function(){return this.g};q.cb=function(a){this.l=a};q.gg=function(){return this.j};q.pf=function(a){this.A=a};q.Pc=function(a){this.B=a};q.xe=function(a){this.o=a};q.Qg=function(a){this.sd=a};q.Tf=function(){return this.sd};
267
+ function Nh(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))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||
268
+ (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var ki=1,gi=5,hi=.5,mi=new rc(function(){return oc(new Uint8Array([0]))});function ni(){}function oi(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){if(d&&(e=pi[d.toLowerCase()]))return k["return"](e);if(f=qi(a))if(g=ri[f])return k["return"](g);return d?k.C(2):u(k,si(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=pi[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
269
+ function si(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=nh([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function qi(a){a=(new pb(a)).Pa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",ni);ni.unregisterParserByMime=function(a){delete pi[a]};ni.registerParserByMime=function(a,b){pi[a]=b};
270
+ ni.registerParserByExtension=function(a,b){ri[a]=b};var pi={},ri={};function ti(a,b,c){this.Fa=a;this.Ca=b;this.wa=c}ti.prototype.Ec=function(){return this.Ca};ti.prototype.zc=function(){return this.wa};function ui(a,b){return a&&b?a.Ec()==b.Ec()&&a.zc()==b.zc()&&kd(a.Fa(),b.Fa()):a==b}K("shaka.media.InitSegmentReference",ti);ti.prototype.getEndByte=ti.prototype.zc;ti.prototype.getStartByte=ti.prototype.Ec;
271
+ function vi(a,b,c,d,e,f,g,h,k,l){l=void 0===l?[]:l;this.startTime=a;this.j=this.endTime=b;this.i=c;this.Ca=d;this.wa=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l}q=vi.prototype;q.Fa=function(){return this.i()};q.ig=function(){return this.startTime};q.Uf=function(){return this.endTime};q.Ec=function(){return this.Ca};q.zc=function(){return this.wa};K("shaka.media.SegmentReference",vi);vi.prototype.getEndByte=vi.prototype.zc;vi.prototype.getStartByte=vi.prototype.Ec;
272
+ vi.prototype.getEndTime=vi.prototype.Uf;vi.prototype.getStartTime=vi.prototype.ig;vi.prototype.getUris=vi.prototype.Fa;function Q(a,b,c){this.j=a;this.sd=b;this.o=this.l=Infinity;this.g=1;this.h=this.i=null;this.A=0;this.B=!0;this.D=0;this.H=void 0===c?!0:c;this.I=0}q=Q.prototype;q.getDuration=function(){return this.l};q.cg=function(){return this.g};q.eb=function(a){this.l=a};q.gg=function(){return this.j};q.pf=function(a){this.A=a};q.Pc=function(a){this.B=a};q.xe=function(a){this.o=a};q.Qg=function(a){this.sd=a};q.Tf=function(){return this.sd};
273
273
  q.hc=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.be(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.j&&this.H&&(this.j=(Date.now()+this.A)/1E3-this.h-this.g)}};q.be=function(a){this.i=null==this.i?a:Math.min(this.i,a)};q.ae=function(a){this.g=Math.max(this.g,a)};q.offset=function(a){null!=this.i&&(this.i+=a);null!=this.h&&(this.h+=a)};q.Z=function(){return Infinity==this.l&&!this.B};
274
- q.Lb=function(){return Infinity!=this.l&&!this.B};q.xb=function(){return Math.max(this.D,this.Hb()-this.o)};q.sf=function(a){this.D=a};q.Hb=function(){return this.Z()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.j)+this.I,this.l):this.h||this.l};q.Dc=function(a){var b=Math.max(this.i,this.D);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Hb()-this.o+a,this.kb()))};q.cc=function(){return this.Dc(0)};
275
- q.kb=function(){return Math.max(0,this.Hb()-(this.Z()||this.Lb()?this.sd:0))};q.wf=function(){return null==this.j||null!=this.h&&this.H?!1:!0};q.nf=function(a){this.I=a};K("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.nf;Q.prototype.usingPresentationStartTime=Q.prototype.wf;Q.prototype.getSeekRangeEnd=Q.prototype.kb;Q.prototype.getSeekRangeStart=Q.prototype.cc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Dc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Hb;
274
+ q.Lb=function(){return Infinity!=this.l&&!this.B};q.xb=function(){return Math.max(this.D,this.Hb()-this.o)};q.sf=function(a){this.D=a};q.Hb=function(){return this.Z()||this.Lb()?Math.min(Math.max(0,(Date.now()+this.A)/1E3-this.g-this.j)+this.I,this.l):this.h||this.l};q.Dc=function(a){var b=Math.max(this.i,this.D);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Hb()-this.o+a,this.mb()))};q.cc=function(){return this.Dc(0)};
275
+ q.mb=function(){return Math.max(0,this.Hb()-(this.Z()||this.Lb()?this.sd:0))};q.wf=function(){return null==this.j||null!=this.h&&this.H?!1:!0};q.nf=function(a){this.I=a};K("shaka.media.PresentationTimeline",Q);Q.prototype.setAvailabilityTimeOffset=Q.prototype.nf;Q.prototype.usingPresentationStartTime=Q.prototype.wf;Q.prototype.getSeekRangeEnd=Q.prototype.mb;Q.prototype.getSeekRangeStart=Q.prototype.cc;Q.prototype.getSafeSeekRangeStart=Q.prototype.Dc;Q.prototype.getSegmentAvailabilityEnd=Q.prototype.Hb;
276
276
  Q.prototype.setUserSeekStart=Q.prototype.sf;Q.prototype.getSegmentAvailabilityStart=Q.prototype.xb;Q.prototype.isInProgress=Q.prototype.Lb;Q.prototype.isLive=Q.prototype.Z;Q.prototype.offset=Q.prototype.offset;Q.prototype.notifyMaxSegmentDuration=Q.prototype.ae;Q.prototype.notifyMinSegmentStartTime=Q.prototype.be;Q.prototype.notifySegments=Q.prototype.hc;Q.prototype.getDelay=Q.prototype.Tf;Q.prototype.setDelay=Q.prototype.Qg;Q.prototype.setSegmentAvailabilityDuration=Q.prototype.xe;
277
- Q.prototype.setStatic=Q.prototype.Pc;Q.prototype.setClockOffset=Q.prototype.pf;Q.prototype.getPresentationStartTime=Q.prototype.gg;Q.prototype.setDuration=Q.prototype.cb;Q.prototype.getMaxSegmentDuration=Q.prototype.cg;Q.prototype.getDuration=Q.prototype.getDuration;function xi(a,b){this.j=a;this.o=yi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}xi.prototype.release=function(){this.j=null;this.i=function(){}};function zi(a,b){a.i=b}function Ai(a){this.g=a}function yi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Ve(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 Bi(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.v=c;this.B=e;this.h=new xf;this.A=!1;this.H=a.readyState;this.j=!1;this.i=d;this.o=!1;this.h.m(a,"waiting",function(){return Ci(f)});this.l=(new P(function(){Ci(f)})).oa(.25)}Bi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.D=this.B=null};Bi.prototype.ge=function(){this.o=!0;Ci(this)};
278
- function Ci(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.A)return}else a.A=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.H&&(a.j=!1,a.H=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=yi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.o!=d)b.l=f,b.g=e,b.o=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.v.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=We(b,g,a.v.gapDetectionThreshold);if(!(null==
279
- c||0==c&&!a.o||(d=b.start(c),d>=a.D.kb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new N("largegap",g),g.cancelable=!0,a.B(g),a.v.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Di(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Ei.value().get(b),c.Na(a,b,d))}var Ei=new rc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Fi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.o=!1;this.h=new xf;this.i=new Gi(a);Di(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Hi(d,d.j)})}Fi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ii(a){return a.o?a.g.currentTime:a.j}function Ji(a,b){0<a.g.readyState?Ki(a.i,b):Di(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Hi(a,a.j)})}
280
- function Hi(a,b){.001>Math.abs(a.g.currentTime-b)?Li(a):(a.h.Na(a.g,"seeking",function(){Li(a)}),Ki(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Li(a){a.o=!0;a.h.m(a.g,"seeking",function(){return a.l()})}function Gi(a){var b=this;this.h=a;this.o=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Gi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
281
- function Ki(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.o;a.h.currentTime=b;a.g.oa(.1)};function Mi(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.Na(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new xf;Di(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Mi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Mi.prototype.o=function(a){this.i=this.j?this.i:a};Mi.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Mi.prototype.H=function(){};
282
- function Ni(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.I=b.minBufferTime||0;this.v=c;this.D=e;this.B=null;this.j=new Bi(a,b.presentationTimeline,c,Oi(a,c),f);this.h=new Fi(a,function(){a:{var h=g.j;h.A=!0;h.o=!1;h.j=!1;var k=Ii(g.h);h=Pi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Ji(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Qi(this,d));this.A=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ii(g.h),k=g.g.cc(),l=g.g.kb();3>l-k&&(k=
283
- l-3);h<k&&(h=Pi(g,h),g.i.currentTime=h)}})).oa(.25)}Ni.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.A&&(this.A.stop(),this.A=null);this.i=this.h=this.g=this.v=null;this.D=function(){}};Ni.prototype.o=function(a){Ji(this.h,a)};Ni.prototype.l=function(){var a=Ii(this.h);return 0<this.i.readyState&&!this.i.paused?Ri(this,a):a};
284
- function Qi(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.kb():0>b&&(b=a.g.kb()+b);return Si(a,Ri(a,b))}Ni.prototype.H=function(){this.j.ge()};function Si(a,b){var c=a.g.getDuration();return b>=c?c-a.v.durationBackoff:b}function Pi(a,b){var c=Math.max(a.I,a.v.rebufferingGoal),d=a.v.safeSeekOffset,e=a.g.cc(),f=a.g.kb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Dc(c),k=a.g.Dc(d);c=a.g.Dc(c+d);return b>=g?Si(a,b):b>f?f:b<e?Te(a.i.buffered,k)?k:c:b>=h||Te(a.i.buffered,b)?b:c}
285
- function Ri(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.kb();return b>c?c:b}function Oi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new xi(new Ai(a),b.stallThreshold);zi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Ti(a){this.P=a;this.g=null;this.h=0;this.i=!1}q=Ti.prototype;q.destroy=function(){Eb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.P=[],this.g&&this.g.stop(),this.g=null)};q.ug=function(){this.i=!0};
277
+ Q.prototype.setStatic=Q.prototype.Pc;Q.prototype.setClockOffset=Q.prototype.pf;Q.prototype.getPresentationStartTime=Q.prototype.gg;Q.prototype.setDuration=Q.prototype.eb;Q.prototype.getMaxSegmentDuration=Q.prototype.cg;Q.prototype.getDuration=Q.prototype.getDuration;function wi(a,b){this.j=a;this.o=xi(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.A=b;this.i=function(){}}wi.prototype.release=function(){this.j=null;this.i=function(){}};function Bi(a,b){a.i=b}function Ci(a){this.g=a}function xi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(Ve(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 Di(a,b,c,d,e){var f=this;this.g=a;this.D=b;this.v=c;this.B=e;this.h=new xf;this.A=!1;this.H=a.readyState;this.j=!1;this.i=d;this.o=!1;this.h.m(a,"waiting",function(){return Ei(f)});this.l=(new P(function(){Ei(f)})).oa(.25)}Di.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.l&&(this.l.stop(),this.l=null);this.i&&(this.i.release(),this.i=null);this.g=this.D=this.B=null};Di.prototype.ge=function(){this.o=!0;Ei(this)};
278
+ function Ei(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.A)return}else a.A=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.H&&(a.j=!1,a.H=a.g.readyState);var b;if(!(b=!a.i)){b=a.i;var c=b.j,d=xi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.o!=d)b.l=f,b.g=e,b.o=d,b.h=!1;e=f-b.l;if(d=e>=b.A&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}if(b){e=a.v.smallGapLimit;var g=a.g.currentTime;b=a.g.buffered;c=We(b,g,a.v.gapDetectionThreshold);if(!(null==
279
+ c||0==c&&!a.o||(d=b.start(c),d>=a.D.mb()))){var h=d-g;e=h<=e;f=!1;.001>h||(e||a.j||(a.j=!0,g=(new Map).set("currentTime",g).set("gapSize",h),g=new N("largegap",g),g.cancelable=!0,a.B(g),a.v.jumpLargeGaps&&!g.defaultPrevented&&(f=!0)),!e&&!f)||(0!=c&&b.end(c-1),a.g.currentTime=d)}}}}};function Fi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Gi.value().get(b),c.Na(a,b,d))}var Gi=new rc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Hi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.o=!1;this.h=new xf;this.i=new Ii(a);Fi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ji(d,d.j)})}Hi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ki(a){return a.o?a.g.currentTime:a.j}function Li(a,b){0<a.g.readyState?Mi(a.i,b):Fi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ji(a,a.j)})}
280
+ function Ji(a,b){.001>Math.abs(a.g.currentTime-b)?Ni(a):(a.h.Na(a.g,"seeking",function(){Ni(a)}),Mi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Ni(a){a.o=!0;a.h.m(a.g,"seeking",function(){return a.l()})}function Ii(a){var b=this;this.h=a;this.o=10;this.l=this.j=this.i=0;this.g=new P(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ii.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
281
+ function Mi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.o;a.h.currentTime=b;a.g.oa(.1)};function Oi(a){function b(){null==c.i||0==c.i?c.j=!0:(c.h.Na(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.i))}var c=this;this.g=a;this.j=!1;this.i=null;this.h=new xf;Fi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,function(){b()})}Oi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.g=null};Oi.prototype.o=function(a){this.i=this.j?this.i:a};Oi.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0};Oi.prototype.H=function(){};
282
+ function Pi(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.I=b.minBufferTime||0;this.v=c;this.D=e;this.B=null;this.j=new Di(a,b.presentationTimeline,c,Qi(a,c),f);this.h=new Hi(a,function(){a:{var h=g.j;h.A=!0;h.o=!1;h.j=!1;var k=Ki(g.h);h=Ri(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.B||g.B<k-1)){g.B=k;Li(g.h,h);h=void 0;break a}g.D();h=void 0}return h},Si(this,d));this.A=(new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Ki(g.h),k=g.g.cc(),l=g.g.mb();3>l-k&&(k=
283
+ l-3);h<k&&(h=Ri(g,h),g.i.currentTime=h)}})).oa(.25)}Pi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.A&&(this.A.stop(),this.A=null);this.i=this.h=this.g=this.v=null;this.D=function(){}};Pi.prototype.o=function(a){Li(this.h,a)};Pi.prototype.l=function(){var a=Ki(this.h);return 0<this.i.readyState&&!this.i.paused?Ti(this,a):a};
284
+ function Si(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.cc():a.g.mb():0>b&&(b=a.g.mb()+b);return Ui(a,Ti(a,b))}Pi.prototype.H=function(){this.j.ge()};function Ui(a,b){var c=a.g.getDuration();return b>=c?c-a.v.durationBackoff:b}function Ri(a,b){var c=Math.max(a.I,a.v.rebufferingGoal),d=a.v.safeSeekOffset,e=a.g.cc(),f=a.g.mb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Dc(c),k=a.g.Dc(d);c=a.g.Dc(c+d);return b>=g?Ui(a,b):b>f?f:b<e?Te(a.i.buffered,k)?k:c:b>=h||Te(a.i.buffered,b)?b:c}
285
+ function Ti(a,b){var c=a.g.cc();if(b<c)return c;c=a.g.mb();return b>c?c:b}function Qi(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new wi(new Ci(a),b.stallThreshold);Bi(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Vi(a){this.P=a;this.g=null;this.h=0;this.i=!1}q=Vi.prototype;q.destroy=function(){Eb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.i||(this.P=[],this.g&&this.g.stop(),this.g=null)};q.ug=function(){this.i=!0};
286
286
  q.find=function(a){for(var b=this.P.length-1,c=b;0<=c;--c){var d=this.P[c],e=c<b?this.P[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.P.length&&a<this.P[0].startTime?this.h:null};q.get=function(a){if(0==this.P.length)return null;a-=this.h;return 0>a||a>=this.P.length?null:this.P[a]};q.offset=function(a){if(!this.i)for(var b=r(this.P),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};
287
287
  q.nd=function(a){!this.i&&a.length&&(this.P=this.P.filter(function(b){return b.startTime<a[0].startTime}),this.P.push.apply(this.P,ha(a)))};q.ec=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.P.length||d.endTime>c.P[0].startTime)});this.nd(a);this.Fb(b)};q.Fb=function(a){if(!this.i){var b=this.P.length;this.P=this.P.filter(function(c){return c.endTime>a});this.h+=b-this.P.length}};
288
- q.wb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],this.P[this.P.length-1]=new wi(a.startTime,b,a.i,a.Ca,a.wa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
289
- q.xd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.P.push.apply(c.P,ha(d)):(c.g.stop(),c.g=null)}),this.g.oa(a))};Ti.prototype[Symbol.iterator]=function(){return this.ac(0)};Ti.prototype.ac=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.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Ui(this,b,d)};
290
- function Vi(a,b,c){return new Ti([new wi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",Ti);Ti.forSingleSegment=Vi;Ti.prototype.getIteratorForTime=Ti.prototype.ac;Ti.prototype.updateEvery=Ti.prototype.xd;Ti.prototype.fit=Ti.prototype.wb;Ti.prototype.evict=Ti.prototype.Fb;Ti.prototype.mergeAndEvict=Ti.prototype.ec;Ti.prototype.merge=Ti.prototype.nd;Ti.prototype.offset=Ti.prototype.offset;Ti.prototype.get=Ti.prototype.get;Ti.prototype.find=Ti.prototype.find;
291
- Ti.prototype.markImmutable=Ti.prototype.ug;Ti.prototype.release=Ti.prototype.release;Ti.prototype.destroy=Ti.prototype.destroy;function Ui(a,b,c){this.i=a;this.h=b;this.g=c}Ui.prototype.seek=function(a){Eb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.ac(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
292
- Ui.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.Fa().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Ui.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.Fa().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};K("shaka.media.SegmentIterator",Ui);Ui.prototype.next=Ui.prototype.next;Ui.prototype.current=Ui.prototype.current;
293
- Ui.prototype.seek=Ui.prototype.seek;function Wi(){Ti.call(this,[]);this.j=[]}ra(Wi,Ti);q=Wi.prototype;q.clone=function(){var a=new Wi;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.P.length}return null};
294
- q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.P.length}return null};q.offset=function(){};q.nd=function(){};q.Fb=function(){};q.ec=function(){};q.wb=function(){};q.xd=function(){};K("shaka.media.MetaSegmentIndex",Wi);Wi.prototype.updateEvery=Wi.prototype.xd;Wi.prototype.fit=Wi.prototype.wb;Wi.prototype.mergeAndEvict=Wi.prototype.ec;Wi.prototype.evict=Wi.prototype.Fb;Wi.prototype.merge=Wi.prototype.nd;
295
- Wi.prototype.offset=Wi.prototype.offset;Wi.prototype.get=Wi.prototype.get;Wi.prototype.find=Wi.prototype.find;Wi.prototype.release=Wi.prototype.release;function Xi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ld();this.h=new P(function(){b.g.cf(.25*b.i)})}Xi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Xi.prototype.set=function(a){this.i=a;Yi(this)};Xi.prototype.hd=function(){return this.g.hd()};function Yi(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ld()!=b&&a.g.ve(b);return}catch(c){}a.h.oa(.25);0!=a.g.ld()&&a.g.ve(0)};function Zi(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){$i(b,!1)})).oa(.25)}Zi.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
296
- function $i(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=r(d.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?aj:e>h.endTime?bj:cj;d.j.set(h,l);for(var m=r(d.o),n=m.next();!n.done;n=m.next())n=n.value,n.Ub==k&&n.Tb==l&&n.Kb(h,f)}}};function dj(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new P(function(){for(var c=b.j(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).oa(2)}dj.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function ej(a,b){a.h=b};function fj(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.o=[{Ub:null,Tb:cj,Kb:function(c,d){return b.g(c,d)}},{Ub:aj,Tb:cj,Kb:function(c,d){return b.g(c,d)}},{Ub:bj,Tb:cj,Kb:function(c,d){return b.g(c,d)}},{Ub:cj,Tb:aj,Kb:function(c,d){return b.h(c,d)}},{Ub:cj,Tb:bj,Kb:function(c,d){return b.h(c,d)}},{Ub:aj,Tb:bj,Kb:function(c,d){return b.i(c,d)}},{Ub:bj,Tb:aj,Kb:function(c,d){return b.i(c,d)}}]}
297
- fj.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function gj(a,b,c,d){a.g=b;a.h=c;a.i=d}var aj=1,cj=2,bj=3;function hj(a,b,c,d,e){a=lh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function ij(a,b){var c=this;this.G=b;this.F=a;this.v=null;this.l=1;this.i=this.h=null;this.g=new Map;this.o=!1;this.A=null;this.j=!1;this.M=new vf(function(){return jj(c)})}ij.prototype.destroy=function(){return this.M.destroy()};function jj(a){var b,c,d,e;return H(function(f){if(1==f.g){b=[];c=r(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,kj(e),b.push(lj(e));return v(f,Promise.all(b),2)}a.g.clear();a.G=null;a.F=null;a.v=null;z(f)})}
298
- ij.prototype.configure=function(a){this.v=a;this.A=new Ug({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)};ij.prototype.start=function(){var a=this;return H(function(b){if(1==b.g)return v(b,mj(a),2);wf(a.M);a.o=!0;z(b)})};
299
- function nj(a,b){var c,d,e,f,g,h;H(function(k){switch(k.g){case 1:return c=Sb,A(k,2),v(k,Tf(a.G.X,c.qa),4);case 4:wa(k,3);break;case 2:if(d=F(k),a.G)a.G.onError(d);case 3:e=ff(b.mimeType,b.codecs);Hf(a.G.X,e);f=a.G.X.o;if(g=f.isTextVisible()||a.v.alwaysStreamText)h=oj(b),a.g.set(c.qa,h),pj(a,h,0);z(k)}})}function qj(a){var b=a.g.get(Rb);b&&(kj(b),lj(b)["catch"](function(){}),a.g["delete"](Rb));a.i=null}
300
- function rj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Qb&&(sj(a,e,!1,0,!1),c.Qb=d)}else if(d=c.Qb)c.Qb=null,sj(a,d,!0,0,!1)}}function tj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.o&&(b.video&&sj(a,b.video,c,d,e),b.audio&&sj(a,b.audio,c,d,e))}function uj(a,b){a.i=b;a.o&&sj(a,b,!0,0,!1)}
301
- function sj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=Rb?f&&(f.Qb&&(b.trickModeVideo?(f.Qb=b,b=b.trickModeVideo):f.Qb=null),f.stream!=b||e)&&(b.type==Rb&&Hf(a.G.X,ff(b.mimeType,b.codecs)),f.stream=b,f.ua=null,c&&(f.xc?f.Bd=!0:f.ob?(f.Sb=!0,f.cd=d,f.Bd=!0):(kj(f),vj(a,f,!0,d)["catch"](function(g){if(a.G)a.G.onError(g)}))),wj(a,f)["catch"](function(g){if(a.G)a.G.onError(g)})):nj(a,b)}
302
- function wj(a,b){var c,d;return H(function(e){if(1==e.g){if(!b.Oa)return e["return"]();c=b.stream;d=b.Oa;return c.segmentIndex?e.C(2):v(e,c.createSegmentIndex(),2)}if(b.Oa!=d||b.stream!=c)return e["return"]();var f=a.G.kd();var g=Mf(a.G.X,b.type),h=b.stream.segmentIndex.find(b.Ua?b.Ua.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ca:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.wa?k.wa-k.Ca:null)||0),k=a.G.getBandwidthEstimate(),
303
- f=8*h/k<(g||0)-f-Math.max(a.F.minBufferTime||0,a.v.rebufferingGoal)||b.Oa.h.g>h?!0:!1):f=!1;f&&b.Oa.abort();z(e)})}function xj(a,b){b.xc||b.Sb||(b.ob?(b.Sb=!0,b.cd=0):null==Kf(a.G.X,b.type)?null==b.fb&&pj(a,b,0):(kj(b),vj(a,b,!1,0)["catch"](function(c){if(a.G)a.G.onError(c)})))}
304
- function mj(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){if(1==n.g){b=Sb;if(!a.h)throw new O(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.Bb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.hb,a.h.video),d.add(a.h.video));a.i&&(c.set(b.qa,a.i),d.add(a.i));e=a.G.X;f=a.v.forceTransmuxTS;return v(n,e.init(c,f),2)}wf(a.M);var p=a.F.presentationTimeline.getDuration();Infinity>p?a.G.X.cb(p):a.G.X.cb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
305
- (m=oj(l),a.g.set(k,m),pj(a,m,0));z(n)})}function oj(a){return{stream:a,type:a.type,ua:null,Ua:null,md:null,Wd:null,Vd:null,Ud:null,Qb:null,endOfStream:!1,ob:!1,fb:null,Sb:!1,cd:0,Bd:!1,xc:!1,je:!1,Fc:!1,Oa:null}}
306
- ij.prototype.Kc=function(a){var b=this,c,d,e,f,g;return H(function(h){switch(h.g){case 1:wf(b.M);if(a.ob||null==a.fb||a.xc)return h["return"]();a.fb=null;if(!a.Sb){h.C(2);break}return v(h,vj(b,a,a.Bd,a.cd),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.C(4);break}c=a.stream;return v(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.fb&&pj(b,a,0),h["return"]();case 4:A(h,6);d=yj(b,a);null!=d&&(pj(b,a,d),a.Fc=!1);wa(h,7);break;case 6:return e=F(h),v(h,zj(b,e),
307
- 8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.o||!f.every(function(k){return k.endOfStream})){h.C(0);break}return v(h,b.G.X.endOfStream(),10);case 10:wf(b.M),g=b.G.X.getDuration(),0!=g&&g<b.F.presentationTimeline.getDuration()&&b.F.presentationTimeline.cb(g),z(h)}})};
308
- function yj(a,b){if(Aj(b))return Rf(a.G.X,b.stream.originalId||""),null;b.type==Rb&&Sf(a.G.X);var c=a.G.kd(),d=b.Ua?b.Ua.endTime:c,e=Nf(a.G.X,b.type,c),f=Math.max(a.F.minBufferTime||0,a.v.rebufferingGoal,a.v.bufferingGoal)*a.l;if(d>=a.F.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(Rb))&&Aj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=Mf(a.G.X,b.type);e=Bj(a,b,c,e);if(!e)return 1;f=Infinity;var g=Array.from(a.g.values());g=r(g);for(var h=
309
- g.next();!h.done;h=g.next())h=h.value,Aj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ua?h.Ua.endTime:c));if(d>=f+a.F.presentationTimeline.g)return 1;Cj(a,b,c,e)["catch"](function(){});return null}
310
- function Bj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ua||d)return b.ua=b.stream.segmentIndex.ac(b.Ua?b.Ua.endTime:d),b.ua&&b.ua.next().value;a=a.v.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.ac(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.ac(c),e=b.ua&&b.ua.next().value);return e}
311
- function Cj(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,u,x;return H(function(w){switch(w.g){case 1:return e=Sb,f=b.stream,g=b.ua,b.ob=!0,A(w,2),v(w,Dj(a,b,d),4);case 4:wf(a.M);if(a.j)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.v.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(y){var C,D,B;return H(function(E){wf(a.M);if(a.j)return E["return"]();n=Ej(n,y);C=!1;D=0;(new Cc).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.C(0);
312
- B=n.subarray(0,D);n=n.subarray(D);return v(E,Fj(a,b,c,f,d,B),0)})},v(w,Gj(a,b,d,p),6);l=Gj(a,b,d);return v(w,l,7);case 7:return m=w.h,wf(a.M),a.j?w["return"]():b.Sb?(b.ob=!1,pj(a,b,0),w["return"]()):v(w,Fj(a,b,c,f,d,m),6);case 6:wf(a.M);if(a.j)return w["return"]();b.Ua=d;g.next();b.ob=!1;b.je=!1;t=a.G.X.gd();u=t[b.type];Wa(JSON.stringify(u));b.Sb||a.G.ge();pj(a,b,0);wa(w,0);break;case 2:x=F(w);wf(a.M,x);if(a.j)return w["return"]();b.ob=!1;if(7001==x.code)b.ob=!1,b.fb=null,pj(a,b,0),w.C(0);else if(b.type==
313
- e.qa&&a.v.ignoreTextStreamFailures)a.g["delete"](e.qa),w.C(0);else if(3017==x.code)Hj(a,b,x),w.C(0);else if(1001==x.code&&x.data&&404==x.data[1])b.ob=!1,b.fb=null,pj(a,b,1),w.C(0);else return b.Fc=!0,x.severity=2,v(w,zj(a,x),0)}})}function Ej(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
314
- function Hj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.je})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Fc=!0;a.j=!0;a.G.onError(c);return}b.je=!0}pj(a,b,4)}
315
- function Dj(a,b,c){var d,e,f,g,h,k,l;return H(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Wd||e!=b.Vd||f!=b.Ud)h=function(){var n;return H(function(p){if(1==p.g)return A(p,2),b.Vd=e,b.Ud=f,b.Wd=g,v(p,Vf(a.G.X,b.type,g,e,f),4);if(2!=p.g)return wa(p,0);n=F(p);b.Vd=null;b.Ud=null;b.Wd=null;throw n;})},d.push(h());!si(c.h,b.md)&&(b.md=c.h)&&(k=Gj(a,b,c.h),l=function(){var n,p,t;return H(function(u){switch(u.g){case 1:return A(u,2),v(u,k,4);
316
- case 4:return n=u.h,wf(a.M),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,v(u,Of(a.G.X,b.type,n,null,null,p),5);case 5:wa(u,0);break;case 2:throw t=F(u),b.md=null,t;}})},d.push(l()));return v(m,Promise.all(d),0)})}
317
- function Fj(a,b,c,d,e,f){var g;return H(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new Cc).Y("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Mc();var n=k.reader.Mc();var p=k.reader.S();var t=k.reader.S();var u=k.reader.S();var x=k.reader.S();var w=e.startTime+t/p}else p=k.reader.S(),w=k.reader.lc()/p+e.timestampOffset,t=w-e.startTime,u=k.reader.S(),x=k.reader.S(),m=k.reader.Mc(),n=k.reader.Mc();
318
- k=k.reader.zb(k.reader.W.byteLength-k.reader.ma());l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.G.yg():(l=(new Map).set("detail",{startTime:w,endTime:w+u/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:u,id:x,messageData:k}),l=new N(Ij,l),a.G.onEvent(l)))}).parse(f),v(h,Jj(a,b,c),2);if(3!=h.g)return wf(a.M),v(h,Of(a.G.X,b.type,f,e.startTime,e.endTime,g),3);wf(a.M);z(h)})}
319
- function Jj(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g){d=Math.max(a.v.bufferBehind,a.F.presentationTimeline.g);e=Kf(a.G.X,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():v(h,a.G.X.remove(b.type,e,e+g),2)}wf(a.M);z(h)})}function Aj(a){return a&&a.type==Rb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
320
- function Gj(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g)return e=rh,f=hj(c.Fa(),c.Ca,c.wa,a.v.retryParameters,d),g=a.G.fc.request(e,f),b.Oa=g,v(k,g.promise,2);h=k.h;b.Oa=null;return k["return"](h.data)})}
321
- function vj(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.Sb=!1,b.Bd=!1,b.cd=0,b.xc=!0,b.Ua=null,b.md=null,b.ua=null,d?(e=a.G.kd(),f=a.G.X.getDuration(),v(g,a.G.X.remove(b.type,e+d,f),3)):v(g,Tf(a.G.X,b.type),4);if(3!=g.g)return wf(a.M),c?v(g,a.G.X.flush(b.type),3):g.C(3);wf(a.M);b.xc=!1;b.endOfStream=!1;pj(a,b,0);z(g)})}
322
- function pj(a,b,c){var d=b.type;if(d!=Rb||a.g.has(d))b.fb=(new Lc(function(){var e;return H(function(f){if(1==f.g)return A(f,2),v(f,a.Kc(b),4);if(2!=f.g)return wa(f,0);e=F(f);if(a.G)a.G.onError(e);z(f)})})).T(c)}function kj(a){null!=a.fb&&(a.fb.stop(),a.fb=null)}function lj(a){return H(function(b){return a.Oa?v(b,a.Oa.abort(),0):b.C(0)})}function zj(a,b){return H(function(c){if(1==c.g)return v(c,Wg(a.A),2);wf(a.M);a.G.onError(b);b.handled||a.v.failureCallback(b);z(c)})};function Kj(a,b){var c=Lj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.o=[];this.h=this.g=null;this.B=Promise.resolve().then(function(){return Mj(d)});this.M=new vf(function(){return Nj(d)})}Kj.prototype.destroy=function(){return this.M.destroy()};function Nj(a){var b,c,d;return H(function(e){if(1==e.g)return a.h&&a.h.abort(),Oj(a),v(e,a.B,2);a.g&&a.g.ab.Ob();b=r(a.o);for(c=b.next();!c.done;c=b.next())d=c.value,d.ab.Ob();a.g=null;a.o=[];a.j=null;z(e)})}
323
- function Pj(a,b){var c={ic:function(){},od:function(){},Ob:function(){},onError:function(){},qd:function(){},ki:function(){}};a.o.push({create:b,ab:c});a.h&&a.h.abort();Oj(a);return c}
324
- function Mj(a){return H(function(b){if(a.M.g)b=b.C(0);else{if(0==a.o.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.ab.Ob(),a.g=null);c=a.o.shift();var d=c.create(a.l);d?(c.ab.ic(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,ab:c.ab}):c.ab.qd();c=!0}c?c=Promise.resolve():a.g?c=Qj(a):(a.j.xg(a.i),a.A=new Xe,c=a.A);b=v(b,c,1)}return b})}
325
- function Qj(a){var b,c;return H(function(d){switch(d.g){case 1:return a.i=a.j.eg(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Lf(a.i,a.l,a.g.payload),v(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.ab.od(),a.g=null);wa(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.ab.Ob();else a.g.ab.onError(b);a.g=null;a.h=null;c=a;return v(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Oj(a){a.A&&(a.A.resolve(),a.A=null)};function Rj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Rj.prototype;q.remove=function(a,b){if(!this.g)return!1;Sj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
288
+ q.wb=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.P.length;)if(this.P[this.P.length-1].startTime>=b)this.P.pop();else break;for(;this.P.length;)if(this.P[0].endTime<=a)this.P.shift(),c||this.h++;else break;0!=this.P.length&&(a=this.P[this.P.length-1],this.P[this.P.length-1]=new vi(a.startTime,b,a.i,a.Ca,a.wa,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd))}};
289
+ q.xd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new P(function(){var d=b();d?c.P.push.apply(c.P,ha(d)):(c.g.stop(),c.g=null)}),this.g.oa(a))};Vi.prototype[Symbol.iterator]=function(){return this.ac(0)};Vi.prototype.ac=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.g.length)for(var e=c.g.length-1;0<=e;--e){var f=c.g[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Wi(this,b,d)};
290
+ function Xi(a,b,c){return new Vi([new vi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",Vi);Vi.forSingleSegment=Xi;Vi.prototype.getIteratorForTime=Vi.prototype.ac;Vi.prototype.updateEvery=Vi.prototype.xd;Vi.prototype.fit=Vi.prototype.wb;Vi.prototype.evict=Vi.prototype.Fb;Vi.prototype.mergeAndEvict=Vi.prototype.ec;Vi.prototype.merge=Vi.prototype.nd;Vi.prototype.offset=Vi.prototype.offset;Vi.prototype.get=Vi.prototype.get;Vi.prototype.find=Vi.prototype.find;
291
+ Vi.prototype.markImmutable=Vi.prototype.ug;Vi.prototype.release=Vi.prototype.release;Vi.prototype.destroy=Vi.prototype.destroy;function Wi(a,b,c){this.i=a;this.h=b;this.g=c}Wi.prototype.seek=function(a){Eb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");(a=this.i.ac(a))?(this.h=a.h,this.g=a.g):(this.h=Number.MAX_VALUE,this.g=0);return this.next().value};
292
+ Wi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.Fa().length&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};Wi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.g.length?(this.g++,a.Fa().length&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};K("shaka.media.SegmentIterator",Wi);Wi.prototype.next=Wi.prototype.next;Wi.prototype.current=Wi.prototype.current;
293
+ Wi.prototype.seek=Wi.prototype.seek;function Yi(){Vi.call(this,[]);this.j=[]}ra(Yi,Vi);q=Yi.prototype;q.clone=function(){var a=new Yi;a.j=this.j.slice();return a};q.release=function(){for(var a=r(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};q.find=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.P.length}return null};
294
+ q.get=function(a){for(var b=0,c=r(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.P.length}return null};q.offset=function(){};q.nd=function(){};q.Fb=function(){};q.ec=function(){};q.wb=function(){};q.xd=function(){};K("shaka.media.MetaSegmentIndex",Yi);Yi.prototype.updateEvery=Yi.prototype.xd;Yi.prototype.fit=Yi.prototype.wb;Yi.prototype.mergeAndEvict=Yi.prototype.ec;Yi.prototype.evict=Yi.prototype.Fb;Yi.prototype.merge=Yi.prototype.nd;
295
+ Yi.prototype.offset=Yi.prototype.offset;Yi.prototype.get=Yi.prototype.get;Yi.prototype.find=Yi.prototype.find;Yi.prototype.release=Yi.prototype.release;function Zi(a){var b=this;this.g=a;this.j=!1;this.i=this.g.ld();this.h=new P(function(){b.g.cf(.25*b.i)})}Zi.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Zi.prototype.set=function(a){this.i=a;$i(this)};Zi.prototype.hd=function(){return this.g.hd()};function $i(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.ld()!=b&&a.g.ve(b);return}catch(c){}a.h.oa(.25);0!=a.g.ld()&&a.g.ve(0)};function aj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){bj(b,!1)})).oa(.25)}aj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};
296
+ function bj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.h.currentTime,f=b,g=r(d.l.g),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.j.get(h),l=e<h.startTime?cj:e>h.endTime?dj:ej;d.j.set(h,l);for(var m=r(d.o),n=m.next();!n.done;n=m.next())n=n.value,n.Ub==k&&n.Tb==l&&n.Kb(h,f)}}};function fj(a){var b=this;this.h=function(){};this.g=new Set;this.j=a;this.i=(new P(function(){for(var c=b.j(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.g["delete"](e)})).oa(2)}fj.prototype.release=function(){this.h=function(){};this.g.clear();this.i.stop()};function gj(a,b){a.h=b};function hj(a){var b=this;this.l=a;this.j=new Map;this.g=function(){};this.h=function(){};this.i=function(){};this.o=[{Ub:null,Tb:ej,Kb:function(c,d){return b.g(c,d)}},{Ub:cj,Tb:ej,Kb:function(c,d){return b.g(c,d)}},{Ub:dj,Tb:ej,Kb:function(c,d){return b.g(c,d)}},{Ub:ej,Tb:cj,Kb:function(c,d){return b.h(c,d)}},{Ub:ej,Tb:dj,Kb:function(c,d){return b.h(c,d)}},{Ub:cj,Tb:dj,Kb:function(c,d){return b.i(c,d)}},{Ub:dj,Tb:cj,Kb:function(c,d){return b.i(c,d)}}]}
297
+ hj.prototype.release=function(){this.l=null;this.j.clear();this.g=function(){};this.h=function(){};this.i=function(){}};function ij(a,b,c,d){a.g=b;a.h=c;a.i=d}var cj=1,ej=2,dj=3;function jj(a,b,c,d,e){a=nh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function kj(a,b){var c=this;this.G=b;this.F=a;this.v=null;this.l=1;this.i=this.h=null;this.g=new Map;this.o=!1;this.A=null;this.j=!1;this.M=new vf(function(){return lj(c)})}kj.prototype.destroy=function(){return this.M.destroy()};function lj(a){var b,c,d,e;return H(function(f){if(1==f.g){b=[];c=r(a.g.values());for(d=c.next();!d.done;d=c.next())e=d.value,mj(e),b.push(nj(e));return u(f,Promise.all(b),2)}a.g.clear();a.G=null;a.F=null;a.v=null;z(f)})}
298
+ kj.prototype.configure=function(a){this.v=a;this.A=new Wg({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)};kj.prototype.start=function(){var a=this;return H(function(b){if(1==b.g)return u(b,oj(a),2);wf(a.M);a.o=!0;z(b)})};
299
+ function pj(a,b){var c,d,e,f,g,h;H(function(k){switch(k.g){case 1:return c=Sb,A(k,2),u(k,Tf(a.G.X,c.qa),4);case 4:wa(k,3);break;case 2:if(d=F(k),a.G)a.G.onError(d);case 3:e=ff(b.mimeType,b.codecs);Hf(a.G.X,e);f=a.G.X.o;if(g=f.isTextVisible()||a.v.alwaysStreamText)h=qj(b),a.g.set(c.qa,h),rj(a,h,0);z(k)}})}function sj(a){var b=a.g.get(Rb);b&&(mj(b),nj(b)["catch"](function(){}),a.g["delete"](Rb));a.i=null}
300
+ function tj(a,b){var c=a.g.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.Qb&&(uj(a,e,!1,0,!1),c.Qb=d)}else if(d=c.Qb)c.Qb=null,uj(a,d,!0,0,!1)}}function vj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.h=b;a.o&&(b.video&&uj(a,b.video,c,d,e),b.audio&&uj(a,b.audio,c,d,e))}function wj(a,b){a.i=b;a.o&&uj(a,b,!0,0,!1)}
301
+ function uj(a,b,c,d,e){var f=a.g.get(b.type);f||b.type!=Rb?f&&(f.Qb&&(b.trickModeVideo?(f.Qb=b,b=b.trickModeVideo):f.Qb=null),f.stream!=b||e)&&(b.type==Rb&&Hf(a.G.X,ff(b.mimeType,b.codecs)),f.stream=b,f.ua=null,c&&(f.xc?f.Bd=!0:f.cb?(f.Sb=!0,f.cd=d,f.Bd=!0):(mj(f),xj(a,f,!0,d)["catch"](function(g){if(a.G)a.G.onError(g)}))),yj(a,f)["catch"](function(g){if(a.G)a.G.onError(g)})):pj(a,b)}
302
+ function yj(a,b){var c,d;return H(function(e){if(1==e.g){if(!b.Oa)return e["return"]();c=b.stream;d=b.Oa;return c.segmentIndex?e.C(2):u(e,c.createSegmentIndex(),2)}if(b.Oa!=d||b.stream!=c)return e["return"]();var f=a.G.kd();var g=Mf(a.G.X,b.type),h=b.stream.segmentIndex.find(b.Ua?b.Ua.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.wa?k.wa-k.Ca:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.wa?k.wa-k.Ca:null)||0),k=a.G.getBandwidthEstimate(),
303
+ f=8*h/k<(g||0)-f-Math.max(a.F.minBufferTime||0,a.v.rebufferingGoal)||b.Oa.h.g>h?!0:!1):f=!1;f&&b.Oa.abort();z(e)})}function zj(a,b){b.xc||b.Sb||(b.cb?(b.Sb=!0,b.cd=0):null==Kf(a.G.X,b.type)?null==b.gb&&rj(a,b,0):(mj(b),xj(a,b,!1,0)["catch"](function(c){if(a.G)a.G.onError(c)})))}
304
+ function oj(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){if(1==n.g){b=Sb;if(!a.h)throw new O(2,5,5006);c=new Map;d=new Set;a.h.audio&&(c.set(b.Bb,a.h.audio),d.add(a.h.audio));a.h.video&&(c.set(b.ib,a.h.video),d.add(a.h.video));a.i&&(c.set(b.qa,a.i),d.add(a.i));e=a.G.X;f=a.v.forceTransmuxTS;return u(n,e.init(c,f),2)}wf(a.M);var p=a.F.presentationTimeline.getDuration();Infinity>p?a.G.X.eb(p):a.G.X.eb(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.g.has(k)||
305
+ (m=qj(l),a.g.set(k,m),rj(a,m,0));z(n)})}function qj(a){return{stream:a,type:a.type,ua:null,Ua:null,md:null,Wd:null,Vd:null,Ud:null,Qb:null,endOfStream:!1,cb:!1,gb:null,Sb:!1,cd:0,Bd:!1,xc:!1,je:!1,Fc:!1,Oa:null}}
306
+ kj.prototype.Kc=function(a){var b=this,c,d,e,f,g;return H(function(h){switch(h.g){case 1:wf(b.M);if(a.cb||null==a.gb||a.xc)return h["return"]();a.gb=null;if(!a.Sb){h.C(2);break}return u(h,xj(b,a,a.Bd,a.cd),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.C(4);break}c=a.stream;return u(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.gb&&rj(b,a,0),h["return"]();case 4:A(h,6);d=Aj(b,a);null!=d&&(rj(b,a,d),a.Fc=!1);wa(h,7);break;case 6:return e=F(h),u(h,Bj(b,e),
307
+ 8);case 8:return h["return"]();case 7:f=Array.from(b.g.values());if(!b.o||!f.every(function(k){return k.endOfStream})){h.C(0);break}return u(h,b.G.X.endOfStream(),10);case 10:wf(b.M),g=b.G.X.getDuration(),0!=g&&g<b.F.presentationTimeline.getDuration()&&b.F.presentationTimeline.eb(g),z(h)}})};
308
+ function Aj(a,b){if(Cj(b))return Rf(a.G.X,b.stream.originalId||""),null;b.type==Rb&&Sf(a.G.X);var c=a.G.kd(),d=b.Ua?b.Ua.endTime:c,e=Nf(a.G.X,b.type,c),f=Math.max(a.F.minBufferTime||0,a.v.rebufferingGoal,a.v.bufferingGoal)*a.l;if(1E-6>a.F.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.g.get(Rb))&&Cj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=Mf(a.G.X,b.type);e=Dj(a,b,c,e);if(!e)return 1;f=Infinity;var g=Array.from(a.g.values());g=r(g);for(var h=
309
+ g.next();!h.done;h=g.next())h=h.value,Cj(h)||h.ua&&!h.ua.current()||(f=Math.min(f,h.Ua?h.Ua.endTime:c));if(d>=f+a.F.presentationTimeline.g)return 1;Ej(a,b,c,e)["catch"](function(){});return null}
310
+ function Dj(a,b,c,d){if(b.ua)return b.ua.current();if(b.Ua||d)return b.ua=b.stream.segmentIndex.ac(b.Ua?b.Ua.endTime:d),b.ua&&b.ua.next().value;a=a.v.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ua=b.stream.segmentIndex.ac(d),e=b.ua&&b.ua.next().value);e||(b.ua=b.stream.segmentIndex.ac(c),e=b.ua&&b.ua.next().value);return e}
311
+ function Ej(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,x;return H(function(w){switch(w.g){case 1:return e=Sb,f=b.stream,g=b.ua,b.cb=!0,A(w,2),u(w,Fj(a,b,d),4);case 4:wf(a.M);if(a.j)return w["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.v.lowLatencyMode&&k&&h)return n=new Uint8Array(0),p=function(y){var C,D,B;return H(function(E){wf(a.M);if(a.j)return E["return"]();n=Gj(n,y);C=!1;D=0;(new Cc).box("mdat",function(G){D=G.size+G.start;C=!0}).parse(n,!1,!0);if(!C)return E.C(0);
312
+ B=n.subarray(0,D);n=n.subarray(D);return u(E,Hj(a,b,c,f,d,B),0)})},u(w,Ij(a,b,d,p),6);l=Ij(a,b,d);return u(w,l,7);case 7:return m=w.h,wf(a.M),a.j?w["return"]():b.Sb?(b.cb=!1,rj(a,b,0),w["return"]()):u(w,Hj(a,b,c,f,d,m),6);case 6:wf(a.M);if(a.j)return w["return"]();b.Ua=d;g.next();b.cb=!1;b.je=!1;t=a.G.X.gd();v=t[b.type];Wa(JSON.stringify(v));b.Sb||a.G.ge();rj(a,b,0);wa(w,0);break;case 2:x=F(w);wf(a.M,x);if(a.j)return w["return"]();b.cb=!1;if(7001==x.code)b.cb=!1,b.gb=null,rj(a,b,0),w.C(0);else if(b.type==
313
+ e.qa&&a.v.ignoreTextStreamFailures)a.g["delete"](e.qa),w.C(0);else if(3017==x.code)Jj(a,b,x),w.C(0);else if(1001==x.code&&x.data&&404==x.data[1])b.cb=!1,b.gb=null,rj(a,b,1),w.C(0);else return b.Fc=!0,x.severity=2,u(w,Bj(a,x),0)}})}function Gj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
314
+ function Jj(a,b,c){if(!Array.from(a.g.values()).some(function(e){return e!=b&&e.je})){var d=Math.round(100*a.l);if(20<d)a.l-=.2;else if(4<d)a.l-=.04;else{b.Fc=!0;a.j=!0;a.G.onError(c);return}b.je=!0}rj(a,b,4)}
315
+ function Fj(a,b,c){var d,e,f,g,h,k,l;return H(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Wd||e!=b.Vd||f!=b.Ud)h=function(){var n;return H(function(p){if(1==p.g)return A(p,2),b.Vd=e,b.Ud=f,b.Wd=g,u(p,Uf(a.G.X,b.type,g,e,f),4);if(2!=p.g)return wa(p,0);n=F(p);b.Vd=null;b.Ud=null;b.Wd=null;throw n;})},d.push(h());!ui(c.h,b.md)&&(b.md=c.h)&&(k=Ij(a,b,c.h),l=function(){var n,p,t;return H(function(v){switch(v.g){case 1:return A(v,2),u(v,k,4);
316
+ case 4:return n=v.h,wf(a.M),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,Of(a.G.X,b.type,n,null,null,p),5);case 5:wa(v,0);break;case 2:throw t=F(v),b.md=null,t;}})},d.push(l()));return u(m,Promise.all(d),0)})}
317
+ function Hj(a,b,c,d,e,f){var g;return H(function(h){if(1==h.g)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new Cc).Y("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Mc();var n=k.reader.Mc();var p=k.reader.S();var t=k.reader.S();var v=k.reader.S();var x=k.reader.S();var w=e.startTime+t/p}else p=k.reader.S(),w=k.reader.lc()/p+e.timestampOffset,t=w-e.startTime,v=k.reader.S(),x=k.reader.S(),m=k.reader.Mc(),n=k.reader.Mc();
318
+ k=k.reader.zb(k.reader.W.byteLength-k.reader.ma());l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.G.yg():(l=(new Map).set("detail",{startTime:w,endTime:w+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:x,messageData:k}),l=new N(Kj,l),a.G.onEvent(l)))}).parse(f),u(h,Lj(a,b,c),2);if(3!=h.g)return wf(a.M),u(h,Of(a.G.X,b.type,f,e.startTime,e.endTime,g),3);wf(a.M);z(h)})}
319
+ function Lj(a,b,c){var d,e,f,g;return H(function(h){if(1==h.g){d=Math.max(a.v.bufferBehind,a.F.presentationTimeline.g);e=Kf(a.G.X,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.G.X.remove(b.type,e,e+g),2)}wf(a.M);z(h)})}function Cj(a){return a&&a.type==Rb&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
320
+ function Ij(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g)return e=th,f=jj(c.Fa(),c.Ca,c.wa,a.v.retryParameters,d),g=a.G.fc.request(e,f),b.Oa=g,u(k,g.promise,2);h=k.h;b.Oa=null;return k["return"](h.data)})}
321
+ function xj(a,b,c,d){var e,f;return H(function(g){if(1==g.g)return b.Sb=!1,b.Bd=!1,b.cd=0,b.xc=!0,b.Ua=null,b.md=null,b.ua=null,d?(e=a.G.kd(),f=a.G.X.getDuration(),u(g,a.G.X.remove(b.type,e+d,f),3)):u(g,Tf(a.G.X,b.type),4);if(3!=g.g)return wf(a.M),c?u(g,a.G.X.flush(b.type),3):g.C(3);wf(a.M);b.xc=!1;b.endOfStream=!1;rj(a,b,0);z(g)})}
322
+ function rj(a,b,c){var d=b.type;if(d!=Rb||a.g.has(d))b.gb=(new Lc(function(){var e;return H(function(f){if(1==f.g)return A(f,2),u(f,a.Kc(b),4);if(2!=f.g)return wa(f,0);e=F(f);if(a.G)a.G.onError(e);z(f)})})).T(c)}function mj(a){null!=a.gb&&(a.gb.stop(),a.gb=null)}function nj(a){return H(function(b){return a.Oa?u(b,a.Oa.abort(),0):b.C(0)})}function Bj(a,b){return H(function(c){if(1==c.g)return u(c,Yg(a.A),2);wf(a.M);a.G.onError(b);b.handled||a.v.failureCallback(b);z(c)})};function Mj(a,b){var c=Nj(),d=this;this.j=b;this.i=a;this.l=c;this.A=null;this.o=[];this.h=this.g=null;this.B=Promise.resolve().then(function(){return Oj(d)});this.M=new vf(function(){return Pj(d)})}Mj.prototype.destroy=function(){return this.M.destroy()};function Pj(a){var b,c,d;return H(function(e){if(1==e.g)return a.h&&a.h.abort(),Qj(a),u(e,a.B,2);a.g&&a.g.ab.Ob();b=r(a.o);for(c=b.next();!c.done;c=b.next())d=c.value,d.ab.Ob();a.g=null;a.o=[];a.j=null;z(e)})}
323
+ function Rj(a,b){var c={ic:function(){},od:function(){},Ob:function(){},onError:function(){},qd:function(){},ki:function(){}};a.o.push({create:b,ab:c});a.h&&a.h.abort();Qj(a);return c}
324
+ function Oj(a){return H(function(b){if(a.M.g)b=b.C(0);else{if(0==a.o.length||a.g&&!a.g.Jb)var c=!1;else{a.g&&(a.g.ab.Ob(),a.g=null);c=a.o.shift();var d=c.create(a.l);d?(c.ab.ic(),a.g={node:d.node,payload:d.payload,Jb:d.Jb,ab:c.ab}):c.ab.qd();c=!0}c?c=Promise.resolve():a.g?c=Sj(a):(a.j.xg(a.i),a.A=new Xe,c=a.A);b=u(b,c,1)}return b})}
325
+ function Sj(a){var b,c;return H(function(d){switch(d.g){case 1:return a.i=a.j.eg(a.i,a.l,a.g.node,a.g.payload),A(d,2),a.h=a.j.Lf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.ab.od(),a.g=null);wa(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.ab.Ob();else a.g.ab.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Qj(a){a.A&&(a.A.resolve(),a.A=null)};function Tj(a){this.g=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}q=Tj.prototype;q.remove=function(a,b){if(!this.g)return!1;Uj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
326
326
  q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Eb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
327
- g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={Vb:e.Vb},f=c.next())e.Vb=f.value,a.some(function(g){return function(h){return h.startTime==g.Vb.startTime&&h.endTime==g.Vb.endTime&&h.text==g.Vb.payload?!0:!1}}(e))||(f=Tj(e.Vb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
328
- d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Sj(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"};
329
- function Tj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
330
- function Sj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}K("shaka.text.SimpleTextDisplayer",Rj);Rj.prototype.setTextVisibility=Rj.prototype.setTextVisibility;Rj.prototype.isTextVisible=Rj.prototype.isTextVisible;Rj.prototype.destroy=Rj.prototype.destroy;Rj.prototype.append=Rj.prototype.append;Rj.prototype.remove=Rj.prototype.remove;function Uj(){}function S(a){return document.createElement(a)}function Vj(){return document.createElement("button")}function Wj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",Uj);Uj.removeAllChildren=Wj;function Xj(a,b){var c=this;this.o=!1;this.l=[];this.g=a;this.B=b;this.i=S("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.B.appendChild(this.i);this.D=(new P(function(){Yj(c)})).oa(.25);this.j=new Map;this.h=new xf;this.h.m(document,"fullscreenchange",function(){Yj(c,!0)});this.A=null;"ResizeObserver"in window&&(this.A=new ResizeObserver(function(){Yj(c,
331
- !0)}),this.A.observe(this.i))}q=Xj.prototype;q.append=function(a){var b=[].concat(ha(this.l)),c={};a=r(a);for(var d=a.next();!d.done;c={Qc:c.Qc},d=a.next())c.Qc=d.value,b.some(function(e){return function(f){return wd(f,e.Qc)}}(c))||this.l.push(c.Qc);Yj(this)};q.destroy=function(){this.B.removeChild(this.i);this.i=null;this.o=!1;this.l=[];this.D&&this.D.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.A&&(this.A.disconnect(),this.A=null)};
332
- q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});Yj(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.o};q.setTextVisibility=function(a){this.o=a};
333
- function Zj(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.yf:null;l&&(g.push(l.Ne),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(ak(a,k,e),l=a.j.get(k),n=l.yf,f=!0));0<k.nestedCues.length&&n&&Zj(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,t){return p.startTime!=t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});
334
- h=r(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Ne)}}function Yj(a,b){if(a.i){var c=a.g.currentTime;(!a.o||(void 0===b?0:b))&&0<a.j.size&&(Wj(a.i),a.j.clear());if(a.o){for(var d=new Map,e=r(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));Zj(a,a.l,a.i,c,[])}}}
335
- function ak(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Eb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";var f=S(e);"br"!=e&&bk(a,f,b,c);c=f;!d&&b.nestedCues.length&&(c=S("span"),c.classList.add("shaka-text-wrapper"),f.appendChild(c));a.j.set(b,{Ne:f,yf:c})}
336
- function bk(a,b,c,d){var e=b.style,f=0==c.nestedCues.length,g=1<d.length;e.whiteSpace="pre-wrap";var h=c.payload.replace(/\s+$/g,function(l){return"\u00a0".repeat(l.length)});e.backgroundColor=c.backgroundColor;e.border=c.border;e.color=c.color;e.direction=c.direction;e.opacity=c.opacity;e.paddingLeft=ck(c.linePadding,c,a.B);e.paddingRight=ck(c.linePadding,c,a.B);if(c.backgroundImage)e.backgroundImage="url('"+c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition=
337
- "center";else{if(c.nestedCues.length)var k=b;else k=S("span"),b.appendChild(k);c.border&&(k.style.border=c.border);(b=dk(d,function(l){return l.backgroundColor}))?k.style.backgroundColor=b:h&&(k.style.backgroundColor="rgba(0, 0, 0, 0.8)");h&&(k.textContent=h)}g?e.display="inline":(e.display="flex",e.flexDirection="column",e.alignItems="center",e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");f||(e.margin="0");e.fontFamily=c.fontFamily;e.fontWeight=
338
- c.fontWeight.toString();e.fontStyle=c.fontStyle;e.letterSpacing=c.letterSpacing;e.fontSize=ck(c.fontSize,c,a.B);c.line?1==c.lineInterpretation&&(e.position="absolute",e.left="0",e.top="0",c.writingMode==qd?(e.width="100%",c.lineAlign==sd?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(e.height="100%",c.lineAlign==sd?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%")):(e.height="100%",c.lineAlign==sd?e.right=c.line+"%":"end"==c.lineAlign&&(e.left=c.line+
339
- "%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Dd?"%":"px",f=c.region.viewportAnchorUnits==Dd?"%":"px",e.height=c.region.height+(c.region.heightUnits==Dd?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+f,e.left=c.region.viewportAnchorX+f);e.lineHeight=c.lineHeight;c.position&&(c.writingMode==qd?e.paddingLeft=c.position:e.paddingTop=c.position);"line-left"==c.positionAlign?e.cssFloat="left":"line-right"==c.positionAlign&&(e.cssFloat="right");e.textAlign=
340
- c.textAlign;e.textDecoration=c.textDecoration.join(" ");e.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&e.writingMode==c.writingMode||(e.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==qd?e.width=c.size+"%":e.height=c.size+"%")}
341
- function ck(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),Sg:d[2]}:null;if(!d)return a;var e=d.value;switch(d.Sg){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function dk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}K("shaka.text.UITextDisplayer",Xj);Xj.prototype.setTextVisibility=Xj.prototype.setTextVisibility;
342
- Xj.prototype.isTextVisible=Xj.prototype.isTextVisible;Xj.prototype.remove=Xj.prototype.remove;Xj.prototype.destroy=Xj.prototype.destroy;Xj.prototype.append=Xj.prototype.append;function ek(a){function b(f){var g=[],h=700<=f.fontWeight,k="italic"==f.fontStyle,l=f.textDecoration.includes("underline");h&&g.push("b");k&&g.push("i");l&&g.push("u");h=g.reduce(function(m,n){return m+"<"+n+">"},"");g=g.reduceRight(function(m,n){return m+"</"+n+">"},"");return f.lineBreak||f.spacer?(f.spacer&&Eb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):f.nestedCues.length?f.nestedCues.map(b).join(""):h+f.payload+g}var c=a.map(function(f){if(f.nestedCues.length){var g=f.clone();
343
- g.nestedCues=[];g.payload=b(f);return g}return f});a="WEBVTT\n\n";c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=function(f){var g=Math.floor(f/3600),h=Math.floor(f/60%60),k=Math.floor(f%60);f=Math.floor(1E3*f%1E3);return(10>g?"0":"")+g+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>f?10>f?"00":"0":"")+f};a+=e(d.startTime)+" --\x3e "+e(d.endTime)+"\n";a+=d.payload+"\n\n"}return a}K("shaka.text.WebVttGenerator",function(){});function fk(){}
344
- function gk(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]=dh(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=dh(l)),k=gk(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?(Pa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ra("Unexpected number of arguments for "+k),a[h]=b[h]):(Pa("Invalid config, unrecognized key "+
345
- k),g=!1)}return g}function hk(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}K("shaka.util.ConfigUtils",fk);fk.convertToConfigObject=hk;fk.mergeConfigObjects=gk;function ik(){}
346
- function jk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Vg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:ci,logLicenseExchange:!1,updateExpirationTime:1},c={retryParameters:Vg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,
327
+ g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={Vb:e.Vb},f=c.next())e.Vb=f.value,a.some(function(g){return function(h){return h.startTime==g.Vb.startTime&&h.endTime==g.Vb.endTime&&h.text==g.Vb.payload?!0:!1}}(e))||(f=Vj(e.Vb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
328
+ d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};q.destroy=function(){this.g&&(Uj(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"};
329
+ function Vj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
330
+ function Uj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}K("shaka.text.SimpleTextDisplayer",Tj);Tj.prototype.setTextVisibility=Tj.prototype.setTextVisibility;Tj.prototype.isTextVisible=Tj.prototype.isTextVisible;Tj.prototype.destroy=Tj.prototype.destroy;Tj.prototype.append=Tj.prototype.append;Tj.prototype.remove=Tj.prototype.remove;function Wj(){}function S(a){return document.createElement(a)}function Xj(){return document.createElement("button")}function Yj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",Wj);Wj.removeAllChildren=Yj;function Zj(a,b){var c=this;this.o=!1;this.l=[];this.g=a;this.B=b;this.i=S("div");this.i.classList.add("shaka-text-container");this.i.style.textAlign="center";this.i.style.display="flex";this.i.style.flexDirection="column";this.i.style.alignItems="center";this.i.style.justifyContent="flex-end";this.B.appendChild(this.i);this.D=(new P(function(){ak(c)})).oa(.25);this.j=new Map;this.h=new xf;this.h.m(document,"fullscreenchange",function(){ak(c,!0)});this.A=null;"ResizeObserver"in window&&(this.A=new ResizeObserver(function(){ak(c,
331
+ !0)}),this.A.observe(this.i))}q=Zj.prototype;q.append=function(a){var b=[].concat(ha(this.l)),c={};a=r(a);for(var d=a.next();!d.done;c={Qc:c.Qc},d=a.next())c.Qc=d.value,b.some(function(e){return function(f){return wd(f,e.Qc)}}(c))||this.l.push(c.Qc);ak(this)};q.destroy=function(){this.B.removeChild(this.i);this.i=null;this.o=!1;this.l=[];this.D&&this.D.stop();this.j.clear();this.h&&(this.h.release(),this.h=null);this.A&&(this.A.disconnect(),this.A=null)};
332
+ q.remove=function(a,b){if(!this.i)return!1;var c=this.l.length;this.l=this.l.filter(function(d){return d.startTime<a||d.endTime>=b});ak(this,c>this.l.length);return!0};q.isTextVisible=function(){return this.o};q.setTextVisibility=function(a){this.o=a};
333
+ function bk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.j.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.yf:null;l&&(g.push(l.Ne),m||(f=!0,a.j["delete"](k),l=null));m&&(h.push(k),l||(ck(a,k,e),l=a.j.get(k),n=l.yf,f=!0));0<k.nestedCues.length&&n&&bk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(p,t){return p.startTime!=t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});
334
+ h=r(h);for(k=h.next();!k.done;k=h.next())d=a.j.get(k.value),c.appendChild(d.Ne)}}function ak(a,b){if(a.i){var c=a.g.currentTime;(!a.o||(void 0===b?0:b))&&0<a.j.size&&(Yj(a.i),a.j.clear());if(a.o){for(var d=new Map,e=r(a.j.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.j.get(f));bk(a,a.l,a.i,c,[])}}}
335
+ function ck(a,b,c){var d=1<c.length,e=d?"span":"div";if(b.lineBreak||b.spacer)b.spacer&&Eb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e="br";d=!d&&0<b.nestedCues.length;var f=S(e);"br"!=e&&dk(a,f,b,c,d);c=f;d&&(c=S("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.j.set(b,{Ne:f,yf:c})}
336
+ function dk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.backgroundColor=c.backgroundColor;f.border=c.border;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ek(c.linePadding,c,a.B);f.paddingRight=ek(c.linePadding,c,a.B);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition=
337
+ "center";else{if(c.nestedCues.length)var l=b;else l=S("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=fk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=
338
+ c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ek(c.fontSize,c,a.B);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==qd?(f.width="100%",c.lineAlign==sd?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sd?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==sd?f.right=c.line+"%":"end"==
339
+ c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Dd?"%":"px",d=c.region.viewportAnchorUnits==Dd?"%":"px",f.height=c.region.height+(c.region.heightUnits==Dd?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==qd?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat=
340
+ "right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==qd?f.width=c.size+"%":f.height=c.size+"%")}
341
+ function ek(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),Sg:d[2]}:null;if(!d)return a;var e=d.value;switch(d.Sg){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}K("shaka.text.UITextDisplayer",Zj);Zj.prototype.setTextVisibility=Zj.prototype.setTextVisibility;
342
+ Zj.prototype.isTextVisible=Zj.prototype.isTextVisible;Zj.prototype.remove=Zj.prototype.remove;Zj.prototype.destroy=Zj.prototype.destroy;Zj.prototype.append=Zj.prototype.append;function gk(a){function b(f){var g=[],h=700<=f.fontWeight,k="italic"==f.fontStyle,l=f.textDecoration.includes("underline");h&&g.push("b");k&&g.push("i");l&&g.push("u");h=g.reduce(function(m,n){return m+"<"+n+">"},"");g=g.reduceRight(function(m,n){return m+"</"+n+">"},"");return f.lineBreak||f.spacer?(f.spacer&&Eb("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):f.nestedCues.length?f.nestedCues.map(b).join(""):h+f.payload+g}var c=a.map(function(f){if(f.nestedCues.length){var g=f.clone();
343
+ g.nestedCues=[];g.payload=b(f);return g}return f});a="WEBVTT\n\n";c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=function(f){var g=Math.floor(f/3600),h=Math.floor(f/60%60),k=Math.floor(f%60);f=Math.floor(1E3*f%1E3);return(10>g?"0":"")+g+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>f?10>f?"00":"0":"")+f};a+=e(d.startTime)+" --\x3e "+e(d.endTime)+"\n";a+=d.payload+"\n\n"}return a}K("shaka.text.WebVttGenerator",function(){});function hk(){}
344
+ function ik(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]=fh(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=fh(l)),k=ik(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?(Pa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Ra("Unexpected number of arguments for "+k),a[h]=b[h]):(Pa("Invalid config, unrecognized key "+
345
+ k),g=!1)}return g}function jk(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}K("shaka.util.ConfigUtils",hk);hk.convertToConfigObject=jk;hk.mergeConfigObjects=ik;function kk(){}
346
+ function lk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Xg(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:ei,logLicenseExchange:!1,updateExpirationTime:1},c={retryParameters:Xg(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,
347
347
  autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"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"}},
348
- hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Vg(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,
349
- forceHTTPS:!1,preferNativeHls:!1};if(navigator.userAgent.match(/Edge\//)||Rc()||Sc())d.gapDetectionThreshold=.5;if(Qc("Web0S")||Rc()||Sc())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?v(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[g,
350
- h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new Eg},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",
351
- preferredAudioChannelCount:2,preferForcedSubs:!1,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,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};e.trackSelectionCallback=function(g){return H(function(h){return h["return"](kk(g,f.preferredAudioLanguage))})};return f}
352
- function lk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return gk(a,b,c||jk(),d,"")}
353
- function kk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=ac(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Ub(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
354
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Rb&&"image"!=g.type||c.push(g);return c}K("shaka.util.PlayerConfiguration",ik);ik.mergeConfigObjects=lk;function mk(){this.g=null;this.h=[]}function nk(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 ok(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
355
- function pk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function qk(){this.i=this.h=null;this.g=[]}function rk(a,b,c){a.h!=b&&(a.h=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function sk(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 tk(){this.A=this.B=this.K=this.H=this.o=this.j=this.I=this.l=this.i=this.L=this.O=this.R=this.D=this.V=NaN;this.h=new mk;this.g=new qk};function T(a,b){db.call(this);var c=this;this.l=uk;this.gb=this.g=null;this.V=!1;this.h=new xf;this.Cb=this.B=this.Ia=this.F=this.vb=this.A=this.i=this.rb=this.K=this.ub=this.H=this.va=this.D=this.L=this.o=this.U=null;this.Xd=1E9;this.v=vk(this);this.Td={width:Infinity,height:Infinity};this.j=null;this.ea=new Mg(this.v.preferredAudioLanguage,this.v.preferredVariantRole,this.v.preferredAudioChannelCount);this.ha=this.v.preferredTextLanguage;this.Za=this.v.preferredTextRole;this.Ja=this.v.preferForcedSubs;
356
- this.Db=[];b&&b(this);this.U=wk(this);this.U.se(this.v.streaming.forceHTTPS);this.I=null;xk&&(this.I=Lb(xk));this.h.m(window,"online",function(){c.ke()});this.La={name:"detach"};this.ib={name:"attach"};this.R={name:"unload"};this.$d={name:"manifest-parser"};this.Rd={name:"manifest"};this.ia={name:"media-source"};this.Yb={name:"drm-engine"};this.O={name:"load"};this.ee={name:"src-equals-drm-engine"};this.za={name:"src-equals"};var d=new Map;d.set(this.ib,function(e,f){return ah(yk(c,e,f))});d.set(this.La,
357
- function(e){e.J&&(c.h.Qa(e.J,"error"),e.J=null);c.I&&c.I.release();c.g=null;e=Promise.resolve();return ah(e)});d.set(this.R,function(e){return ah(zk(c,e))});d.set(this.ia,function(e){e=Ak(c,e);return ah(e)});d.set(this.$d,function(e,f){var g=Bk(c,e,f);return ah(g)});d.set(this.Rd,function(e){return Ck(c,e)});d.set(this.Yb,function(e){e=Dk(c,e);return ah(e)});d.set(this.O,function(e,f){return ah(Ek(c,e,f))});d.set(this.ee,function(e,f){var g=Fk(c,e,f);return ah(g)});d.set(this.za,function(e,f){return Gk(c,
358
- e,f)});this.ba=new Kj(this.La,{eg:function(e,f,g,h){var k=null;e==c.La&&(k=g==c.La?c.La:c.ib);e==c.ib&&(k=g==c.La||f.J!=h.J?c.La:g==c.ib?c.ib:g==c.ia||g==c.O?c.ia:g==c.za?c.ee:null);e==c.ia&&(k=g==c.O&&f.J==h.J?c.$d:c.R);e==c.$d&&(k=Hk(c.O,c.Rd,c.R,g,f,h));e==c.Rd&&(k=Hk(c.O,c.Yb,c.R,g,f,h));e==c.Yb&&(k=Hk(c.O,c.O,c.R,g,f,h));e==c.ee&&(k=g==c.za&&f.J==h.J?c.za:c.R);if(e==c.O||e==c.za)k=c.R;e==c.R&&(k=h.J&&f.J==h.J?c.ib:c.La);return k},Lf:function(e,f,g){c.dispatchEvent(Ik(Jk,(new Map).set("state",
359
- e.name)));return d.get(e)(f,g)},handleError:function(e){return H(function(f){return 1==f.g?v(f,zk(c,e),2):f["return"](e.J?c.ib:c.La)})},xg:function(e){c.dispatchEvent(Ik(Kk,(new Map).set("state",e.name)))}});a&&this.wc(a,!0)}ra(T,db);function Ik(a,b){return new N(a,b)}q=T.prototype;
360
- q.destroy=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(a.l==Lk)return c["return"]();a.l=Lk;b=Pj(a.ba,function(){return{node:a.La,payload:Lj(),Jb:!1}});return v(c,new Promise(function(d){b.ic=function(){};b.od=function(){d()};b.Ob=function(){d()};b.onError=function(){d()};b.qd=function(){d()}}),2);case 2:return v(c,a.ba.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.Cb=null;a.B=null;a.v=null;a.j=null;a.gb=null;if(!a.U){c.C(0);break}return v(c,a.U.destroy(),5);case 5:a.U=
348
+ hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:Xg(),failureCallback:function(g){return[g]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,
349
+ forceHTTPS:!1,preferNativeHls:!1};if(navigator.userAgent.match(/Edge\//)||Rc()||Sc())d.gapDetectionThreshold=.5;if(Qc("Web0S")||Rc()||Sc())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?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,
350
+ h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new Gg},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",
351
+ preferredAudioChannelCount:2,preferForcedSubs:!1,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,useMediaCapabilities:!1,textDisplayFactory:function(){return null}};e.trackSelectionCallback=function(g){return H(function(h){return h["return"](mk(g,f.preferredAudioLanguage))})};return f}
352
+ function nk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return ik(a,b,c||lk(),d,"")}
353
+ function mk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=ac(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Ub(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
354
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=Rb&&"image"!=g.type||c.push(g);return c}K("shaka.util.PlayerConfiguration",kk);kk.mergeConfigObjects=nk;function ok(){this.g=null;this.h=[]}function pk(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 qk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=r(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
355
+ function rk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function sk(){this.i=this.h=null;this.g=[]}function tk(a,b,c){a.h!=b&&(a.h=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function uk(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 vk(){this.A=this.B=this.K=this.H=this.o=this.j=this.I=this.l=this.i=this.L=this.O=this.R=this.D=this.V=NaN;this.h=new ok;this.g=new sk};function T(a,b){db.call(this);var c=this;this.l=wk;this.hb=this.g=null;this.V=!1;this.h=new xf;this.Cb=this.B=this.Ia=this.F=this.vb=this.A=this.i=this.rb=this.K=this.ub=this.H=this.va=this.D=this.L=this.o=this.U=null;this.Xd=1E9;this.v=xk(this);this.Td={width:Infinity,height:Infinity};this.j=null;this.ea=new Og(this.v.preferredAudioLanguage,this.v.preferredVariantRole,this.v.preferredAudioChannelCount);this.ha=this.v.preferredTextLanguage;this.Za=this.v.preferredTextRole;this.Ja=this.v.preferForcedSubs;
356
+ this.Db=[];b&&b(this);this.U=yk(this);this.U.se(this.v.streaming.forceHTTPS);this.I=null;zk&&(this.I=Lb(zk));this.h.m(window,"online",function(){c.ke()});this.La={name:"detach"};this.jb={name:"attach"};this.R={name:"unload"};this.$d={name:"manifest-parser"};this.Rd={name:"manifest"};this.ia={name:"media-source"};this.Yb={name:"drm-engine"};this.O={name:"load"};this.ee={name:"src-equals-drm-engine"};this.za={name:"src-equals"};var d=new Map;d.set(this.jb,function(e,f){return ch(Ak(c,e,f))});d.set(this.La,
357
+ function(e){e.J&&(c.h.Qa(e.J,"error"),e.J=null);c.I&&c.I.release();c.g=null;e=Promise.resolve();return ch(e)});d.set(this.R,function(e){return ch(Bk(c,e))});d.set(this.ia,function(e){e=Ck(c,e);return ch(e)});d.set(this.$d,function(e,f){var g=Dk(c,e,f);return ch(g)});d.set(this.Rd,function(e){return Ek(c,e)});d.set(this.Yb,function(e){e=Fk(c,e);return ch(e)});d.set(this.O,function(e,f){return ch(Gk(c,e,f))});d.set(this.ee,function(e,f){var g=Hk(c,e,f);return ch(g)});d.set(this.za,function(e,f){return Ik(c,
358
+ e,f)});this.ba=new Mj(this.La,{eg:function(e,f,g,h){var k=null;e==c.La&&(k=g==c.La?c.La:c.jb);e==c.jb&&(k=g==c.La||f.J!=h.J?c.La:g==c.jb?c.jb:g==c.ia||g==c.O?c.ia:g==c.za?c.ee:null);e==c.ia&&(k=g==c.O&&f.J==h.J?c.$d:c.R);e==c.$d&&(k=Jk(c.O,c.Rd,c.R,g,f,h));e==c.Rd&&(k=Jk(c.O,c.Yb,c.R,g,f,h));e==c.Yb&&(k=Jk(c.O,c.O,c.R,g,f,h));e==c.ee&&(k=g==c.za&&f.J==h.J?c.za:c.R);if(e==c.O||e==c.za)k=c.R;e==c.R&&(k=h.J&&f.J==h.J?c.jb:c.La);return k},Lf:function(e,f,g){c.dispatchEvent(Kk(Lk,(new Map).set("state",
359
+ e.name)));return d.get(e)(f,g)},handleError:function(e){return H(function(f){return 1==f.g?u(f,Bk(c,e),2):f["return"](e.J?c.jb:c.La)})},xg:function(e){c.dispatchEvent(Kk(Mk,(new Map).set("state",e.name)))}});a&&this.wc(a,!0)}ra(T,db);function Kk(a,b){return new N(a,b)}q=T.prototype;
360
+ q.destroy=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(a.l==Nk)return c["return"]();a.l=Nk;b=Rj(a.ba,function(){return{node:a.La,payload:Nj(),Jb:!1}});return u(c,new Promise(function(d){b.ic=function(){};b.od=function(){d()};b.Ob=function(){d()};b.onError=function(){d()};b.qd=function(){d()}}),2);case 2:return u(c,a.ba.destroy(),3);case 3:a.h&&(a.h.release(),a.h=null);a.Cb=null;a.B=null;a.v=null;a.j=null;a.hb=null;if(!a.U){c.C(0);break}return u(c,a.U.destroy(),5);case 5:a.U=
361
361
  null,z(c)}})};
362
- function Mk(){window.Promise||Ra("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ra("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Qc("Trident/"))return!1;var a=Uc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:
363
- Mc()?!0:Nc("application/x-mpegurl")}q.wc=function(a,b){b=void 0===b?!0:b;if(this.l==Lk)return Promise.reject(Nk());var c=Lj();c.J=a;Mc()||(b=!1);var d=b?this.ia:this.ib,e=Pj(this.ba,function(){return{node:d,payload:c,Jb:!1}});e.ic=function(){};return Ok(e)};q.detach=function(){var a=this;if(this.l==Lk)return Promise.reject(Nk());var b=Pj(this.ba,function(){return{node:a.La,payload:Lj(),Jb:!1}});b.ic=function(){};return Ok(b)};
364
- q.Ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Lk)return Promise.reject(Nk());Mc()||(a=!1);var c=Lj(),d=Pj(this.ba,function(e){var f=e.J&&a?b.ia:e.J?b.ib:b.La;c.J=e.J;return{node:f,payload:c,Jb:!1}});d.ic=function(){};return Ok(d)};
365
- q.load=function(a,b,c){var d=this;if(this.l==Lk)return Promise.reject(Nk());this.dispatchEvent(Ik(Pk));var e=Lj();e.uri=a;e.Ae=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Qk(this,e)?this.za:this.O,g=Pj(this.ba,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,Jb:!0}});this.j=new tk;g.ic=function(){};return new Promise(function(h,k){g.qd=function(){return k(new O(2,7,7002))};g.od=function(){h();d.dispatchEvent(Ik(Rk))};g.Ob=function(){return k(Nk())};g.onError=
362
+ function Ok(){window.Promise||Ra("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Ra("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||Qc("Trident/"))return!1;var a=Uc();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:
363
+ Mc()?!0:Nc("application/x-mpegurl")}q.wc=function(a,b){b=void 0===b?!0:b;if(this.l==Nk)return Promise.reject(Pk());var c=Nj();c.J=a;Mc()||(b=!1);var d=b?this.ia:this.jb,e=Rj(this.ba,function(){return{node:d,payload:c,Jb:!1}});e.ic=function(){};return Qk(e)};q.detach=function(){var a=this;if(this.l==Nk)return Promise.reject(Pk());var b=Rj(this.ba,function(){return{node:a.La,payload:Nj(),Jb:!1}});b.ic=function(){};return Qk(b)};
364
+ q.Ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Nk)return Promise.reject(Pk());Mc()||(a=!1);var c=Nj(),d=Rj(this.ba,function(e){var f=e.J&&a?b.ia:e.J?b.jb:b.La;c.J=e.J;return{node:f,payload:c,Jb:!1}});d.ic=function(){};return Qk(d)};
365
+ q.load=function(a,b,c){var d=this;if(this.l==Nk)return Promise.reject(Pk());this.dispatchEvent(Kk(Rk));var e=Nj();e.uri=a;e.Ae=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Sk(this,e)?this.za:this.O,g=Rj(this.ba,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,Jb:!0}});this.j=new vk;g.ic=function(){};return new Promise(function(h,k){g.qd=function(){return k(new O(2,7,7002))};g.od=function(){h();d.dispatchEvent(Kk(Tk))};g.Ob=function(){return k(Pk())};g.onError=
366
366
  function(l){return k(l)}})};
367
- function Qk(a,b){if(!Mc())return!0;var c=b.mimeType,d=b.uri||"";c||(c={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"}[oi(d)]);if(c){if(""==(b.J||Oc()).canPlayType(c))return!1;if(!Mc()||!(c in ni||oi(d)in pi)||a.v.streaming.preferNativeHls)return!0;if(Tc())return a.v.streaming.useNativeHlsOnSafari}return!1}
368
- function yk(a,b,c){null==b.J&&(b.J=c.J,a.h.m(b.J,"error",function(){var d=Sk(a);d&&Tk(a,d)}));a.g=b.J;return Promise.resolve()}
369
- function zk(a,b){var c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return a.l!=Lk&&(a.l=uk),c=a.Db.map(function(p){return p()}),a.Db=[],v(n,Promise.all(c),2);case 2:a.dispatchEvent(Ik(Uk));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&(a.h.Qa(b.J,"loadedmetadata"),a.h.Qa(b.J,"playing"),a.h.Qa(b.J,"pause"),a.h.Qa(b.J,"ended"),a.h.Qa(b.J,"ratechange"));a.va&&(a.va.release(),a.va=null);a.ub&&(a.ub.stop(),a.ub=null);if(!a.A){n.C(3);break}return v(n,a.A.stop(),4);case 4:a.A=null,a.vb=null;
370
- case 3:if(!a.B){n.C(5);break}return v(n,a.B.stop(),5);case 5:if(!a.i){n.C(7);break}return v(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.H&&(a.H.release(),a.H=null);a.D&&(a.D.release(),a.D=null);if(!a.L){n.C(9);break}return v(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.I)a.I.onAssetUnload();if(!b.J||!b.J.src){n.C(11);break}return v(n,new Promise(function(p){return(new P(p)).T(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.o){n.C(13);
371
- break}return v(n,a.o.destroy(),14);case 14:a.o=null;case 13:a.Ia=null;a.K=null;if(a.F){d=r(a.F.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.F.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.F=null;a.j=new tk;a.Qd=null;Vk(a);z(n)}})}
372
- function Ak(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=new Qe,d=a.v.textDisplayFactory,e=Lb(d),a.Qd=d,f=Wk(b.J,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),u=t.next();!u.done;u=t.next())Xk(a,n,p,"ID3",u.value);if(a.I)a.I.onHlsTimedMetadata(m,n)}}),v(g,f.H,2);a.L=f;z(g)})}
373
- function Bk(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.U,a.Ia=d,f=a,v(h,mi(d,e,a.v.manifest.retryParameters,b.mimeType),2);f.vb=h.h;a.A=Lb(a.vb);g=dh(a.v.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.A.configure(g);z(h)})}
374
- function Ck(a,b){var c=b.uri,d=a.U;a.rb=new dj(function(){return a.Va()});ej(a.rb,function(g){Yk(a,Zk,g);if(a.I)a.I.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return H(function(h){return h["return"](a.ed(g))})},makeTextStreamsForClosedCaptions:function(g){return $k(a,g)},onTimelineRegionAdded:function(g){var h=a.rb;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
375
- l;break a}k=null}null==k&&(h.g.add(g),h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Tk(a,g)},isLowLatencyMode:function(){return a.v.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.v.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Xg(function(){var g,h,k,l;return H(function(m){if(1==m.g)return g=a,v(m,a.A.start(c,e),2);g.F=m.h;h=Ik(al);a.dispatchEvent(h);if(0==
376
- a.F.variants.length)throw new O(2,4,4036);bl(a.F);k=Date.now()/1E3;l=k-f;a.j.I=l;z(m)})}(),function(){return a.A.stop()})}
377
- function Dk(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=cl(a,{fc:a.U,onError:function(f){Tk(a,f)},pd:function(f){dl(a,f)},onExpirationUpdated:function(f,g){el(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==fl&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.v.useMediaCapabilities||ig(a.F),a.o.configure(a.v.drm),v(e,Fh(a.o,a.F.variants,a.F.offlineSessionIds,a.v.useMediaCapabilities),2)):3!=e.g?v(e,a.o.wc(b.J),3):v(e,a.ed(a.F),0)})}
378
- function Ek(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,u;return H(function(x){switch(x.g){case 1:b.startTime=c.startTime;d=b.J;e=b.uri;a.Ia=e;a.H=new Xi({ld:function(){return b.J.playbackRate},hd:function(){return b.J.defaultPlaybackRate},ve:function(w){b.J.playbackRate=w},cf:function(w){b.J.currentTime+=w}});f=function(){return gl(a)};g=function(){return hl(a)};a.h.m(d,"playing",f);a.h.m(d,"pause",f);a.h.m(d,"ended",f);a.h.m(d,"ratechange",g);h=a.v.abrFactory;a.B&&a.Cb==h||(a.Cb=h,a.B=Lb(h),"function"!=typeof a.B.playbackRateChanged&&
379
- (Eb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.v.abr));a.ea=new Mg(a.v.preferredAudioLanguage,a.v.preferredVariantRole,a.v.preferredAudioChannelCount);a.ha=a.v.preferredTextLanguage;a.Za=a.v.preferredTextRole;a.Ja=a.v.preferForcedSubs;il(a.F.presentationTimeline,a.v.playRangeStart,a.v.playRangeEnd);a.B.init(function(w,y,C){y=void 0===y?!1:y;C=void 0===C?0:C;a.i&&w!=a.i.h&&(rk(a.j.g,w,!0),tj(a.i,w,y,C),jl(a))});
380
- a.D=kl(a,b.startTime);a.va=ll(a);k=Math.max(a.F.minBufferTime,a.v.streaming.rebufferingGoal);ml(a,k);Zf(a.F,a.v.preferredAudioChannelCount);a.i=nl(a);a.i.configure(a.v.streaming);a.l=ol;a.dispatchEvent(Ik(pl));l=null;if(m=a.Ib().find(function(w){return w.active})){x.C(2);break}l=ql(a)?a.B.chooseVariant():null;rl(a,l,!0,!1,0);if(!a.v.streaming.startAtSegmentBoundary){x.C(3);break}n=a.D.l();return v(x,sl(l,n),4);case 4:p=x.h,a.D.o(p);case 3:jl(a);case 2:return t=a.mb().find(function(w){return w.active}),
381
- t||((u=Bg(a.F.textStreams,a.ha,a.Za,a.Ja)[0]||null)&&sk(a.j.g,u,!0),l&&(u?(l.audio&&tl(a,l.audio,u)&&(a.V=!0),a.V&&a.L.o.setTextVisibility(!0),ul(a)):a.V=!1),u&&(a.v.streaming.alwaysStreamText||a.Nb())&&uj(a.i,u)),v(x,a.i.start(),5);case 5:a.v.abr.enabled&&(a.B.enable(),vl(a)),kg(a.i?a.i.h:null,a.F),wl(a.F),xl(a),ql(a),a.F.variants.some(function(w){return w.primary}),a.h.Na(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Ae}),z(x)}})}
382
- function Fk(a,b,c){var d,e,f,g;return H(function(h){return 1==h.g?(d=Sb,e=Date.now()/1E3,f=!0,a.o=cl(a,{fc:a.U,onError:function(k){Tk(a,k)},pd:function(k){dl(a,k)},onExpirationUpdated:function(k,l){el(a,k,l)},onEvent:function(k){a.dispatchEvent(k);k.type==fl&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.o.configure(a.v.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:
383
- "video/mp4",codecs:c.mimeType?lf(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.hb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.V=!0,v(h,Fh(a.o,[g],[]),2)):v(h,a.o.wc(b.J),0)})}
384
- function Gk(a,b,c){function d(){return gl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ia=b.uri;a.D=new Mi(b.J);null!=b.startTime&&a.D.o(b.startTime);a.H=new Xi({ld:function(){return b.J.playbackRate},hd:function(){return b.J.defaultPlaybackRate},ve:function(g){b.J.playbackRate=g},cf:function(g){b.J.currentTime+=g}});ml(a,a.v.streaming.rebufferingGoal);a.h.m(b.J,"playing",d);a.h.m(b.J,"pause",d);a.h.m(b.J,"ended",d);a.h.m(b.J,"ratechange",function(){return hl(a)});"none"!=a.g.preload&&a.h.Na(a.g,"loadedmetadata",
385
- function(){a.j.l=Date.now()/1E3-c.Ae});a.g.audioTracks&&(a.h.m(a.g.audioTracks,"addtrack",function(){return xl(a)}),a.h.m(a.g.audioTracks,"removetrack",function(){return xl(a)}),a.h.m(a.g.audioTracks,"change",function(){return xl(a)}));a.g.textTracks&&(a.h.m(a.g.textTracks,"addtrack",function(g){xl(a);yl(a,g)}),a.h.m(a.g.textTracks,"removetrack",function(){return xl(a)}),a.h.m(a.g.textTracks,"change",function(){return xl(a)}));b.J.src=b.uri;(Rc()||Qc("Web0S"))&&b.J.load();a.l=zl;a.dispatchEvent(Ik(pl));
386
- var e=new Xe;Di(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.Db.push(function(){f=!0});Di(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return H(function(h){if(1==h.g){if(f)return h["return"]();Al(a);g=Bl(a);return g.find(function(k){return"disabled"!=k.mode})?h.C(2):v(h,new Promise(function(k){a.h.Na(a.g.textTracks,"change",k);(new P(k)).T(1)}),2)}if(f)return h["return"]();Cl(a);z(h)})});a.g.error?e.reject(Sk(a)):"none"==a.g.preload&&(Ra('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.'),
387
- e.resolve());a.h.Na(a.g,"error",function(){e.reject(Sk(a))});return new Xg(e,function(){e.reject(new O(2,7,7001));return Promise.resolve()})}function Al(a){var b=a.v.preferredAudioLanguage;if(""!=b){a.wd(b);var c=a.v.preferredVariantRole;""!=c&&a.wd(b,c)}}function Cl(a){var b=a.v.preferredTextLanguage,c=a.v.preferForcedSubs;if(""!=b){a.me(b,"",c);var d=a.v.preferredTextRole;""!=d&&a.me(b,d,c)}}
388
- function yl(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.h.m(c,"cuechange",function(){if(c.activeCues)for(var d=r(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Xk(a,e.startTime,e.endTime,e.type,e.value),a.I)a.I.onCueMetadataChange(e.value)}),(new P(function(){var d=Dl(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ha().T(.5))}
389
- function Xk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ik(El,b))}function bl(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 cl(a,b){return new yh(b,a.v.drm.updateExpirationTime)}function wk(a){return new hh(function(b,c){a.B&&a.B.segmentDownloaded(b,c)})}
390
- function kl(a,b){return new Ni(a.g,a.F,a.v.streaming,b,function(){a.va&&$i(a.va,!0);if(a.i)for(var c=a.i,d=c.G.kd(),e=c.v.smallGapLimit,f=r(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.ua=null;var k=c.G.X;g==Rb?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Lf(k,g),k=Te(k,d,e));if(!k&&(null!=Mf(c.G.X,g)&&xj(c,h),h.Oa&&(h.Oa.abort(),h.Oa=null),g===Rb))for(g=c.G.X.D.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,De(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())$d(h.value)}a.K&&
391
- Fl(a)},function(c){return a.dispatchEvent(c)})}function ll(a){var b=new fj(a.rb);gj(b,function(d){Yk(a,Gl,d)},function(d){Yk(a,Hl,d)},function(d,e){e||(Yk(a,Gl,d),Yk(a,Hl,d))});var c=new Zi(a.g);c.g.add(b);return c}function ml(a,b){a.K=new Qg;a.K.g=Sg;Tg(a.K,b,Math.min(.5,b/2));Vk(a);a.ub=(new P(function(){Fl(a)})).oa(.25)}
392
- function Fl(a){switch(a.l){case zl:if(a.g.ended)var b=!0;else{var c=Se(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ol:a:if(a.g.ended||Jf(a.L))b=!0;else{if(a.F.presentationTimeline.Z()){c=a.F.presentationTimeline.Hb();var d=Se(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ue(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Rg:Sg;c.g=d;b!=d&&Vk(a)}function Wk(a,b,c,d){return new Cf(a,b,c,d)}
393
- function nl(a){return new ij(a.F,{kd:function(){return a.D.l()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},X:a.L,fc:a.U,onError:function(b){return Tk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},yg:function(){a.A&&a.A.update&&a.A.update()},ge:function(){a.D&&a.D.H();Fl(a)}})}
394
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Eb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
395
- 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=lk(this.v,a,vk(this));Il(this);return c};
396
- function Il(a){if(a.A){var b=dh(a.v.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.A.configure(b)}a.o&&a.o.configure(a.v.drm);if(a.i){a.i.configure(a.v.streaming);try{Jl(a,a.F)}catch(f){Tk(a,f)}a.B&&ql(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Kl(a)}a.U&&a.U.se(a.v.streaming.forceHTTPS);if(a.L&&(b=a.v.textDisplayFactory,a.Qd!=b)){var c=Lb(b),d=a.L,e=d.o;d.o=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.Qd=b;a.i&&(b=a.i,(c=b.g.get(Rb))&&
397
- sj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.v.abr),a.v.abr.enabled?a.B.enable():a.B.disable(),vl(a));a.K&&(b=a.v.streaming.rebufferingGoal,a.F&&(b=Math.max(b,a.F.minBufferTime)),Tg(a.K,b,Math.min(.5,b/2)));a.F&&il(a.F.presentationTimeline,a.v.playRangeStart,a.v.playRangeEnd)}q.getConfiguration=function(){var a=vk(this);lk(a,this.v,vk(this));return a};q.Jg=function(){for(var a in this.v)delete this.v[a];lk(this.v,vk(this),vk(this));Il(this)};q.Ue=function(){return this.l};q.dg=function(){return this.g};
367
+ function Sk(a,b){if(!Mc())return!0;var c=b.mimeType,d=b.uri||"";c||(c={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"}[qi(d)]);if(c){if(""==(b.J||Oc()).canPlayType(c))return!1;if(!Mc()||!(c in pi||qi(d)in ri)||a.v.streaming.preferNativeHls)return!0;if(Tc())return a.v.streaming.useNativeHlsOnSafari}return!1}
368
+ function Ak(a,b,c){null==b.J&&(b.J=c.J,a.h.m(b.J,"error",function(){var d=Uk(a);d&&Vk(a,d)}));a.g=b.J;return Promise.resolve()}
369
+ function Bk(a,b){var c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return a.l!=Nk&&(a.l=wk),c=a.Db.map(function(p){return p()}),a.Db=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Kk(Wk));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&(a.h.Qa(b.J,"loadedmetadata"),a.h.Qa(b.J,"playing"),a.h.Qa(b.J,"pause"),a.h.Qa(b.J,"ended"),a.h.Qa(b.J,"ratechange"));a.va&&(a.va.release(),a.va=null);a.ub&&(a.ub.stop(),a.ub=null);if(!a.A){n.C(3);break}return u(n,a.A.stop(),4);case 4:a.A=null,a.vb=null;
370
+ case 3:if(!a.B){n.C(5);break}return u(n,a.B.stop(),5);case 5:if(!a.i){n.C(7);break}return u(n,a.i.destroy(),8);case 8:a.i=null;case 7:a.H&&(a.H.release(),a.H=null);a.D&&(a.D.release(),a.D=null);if(!a.L){n.C(9);break}return u(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.I)a.I.onAssetUnload();if(!b.J||!b.J.src){n.C(11);break}return u(n,new Promise(function(p){return(new P(p)).T(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.o){n.C(13);
371
+ break}return u(n,a.o.destroy(),14);case 14:a.o=null;case 13:a.Ia=null;a.K=null;if(a.F){d=r(a.F.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.F.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.F=null;a.j=new vk;a.Qd=null;Xk(a);z(n)}})}
372
+ function Ck(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=new Qe,d=a.v.textDisplayFactory,e=Lb(d),a.Qd=d,f=Yk(b.J,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())Zk(a,n,p,"ID3",v.value);if(a.I)a.I.onHlsTimedMetadata(m,n)}}),u(g,f.H,2);a.L=f;z(g)})}
373
+ function Dk(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.U,a.Ia=d,f=a,u(h,oi(d,e,a.v.manifest.retryParameters,b.mimeType),2);f.vb=h.h;a.A=Lb(a.vb);g=fh(a.v.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.A.configure(g);z(h)})}
374
+ function Ek(a,b){var c=b.uri,d=a.U;a.rb=new fj(function(){return a.Va()});gj(a.rb,function(g){$k(a,al,g);if(a.I)a.I.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return H(function(h){return h["return"](a.ed(g))})},makeTextStreamsForClosedCaptions:function(g){return bl(a,g)},onTimelineRegionAdded:function(g){var h=a.rb;a:{var k=r(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
375
+ l;break a}k=null}null==k&&(h.g.add(g),h.h(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Vk(a,g)},isLowLatencyMode:function(){return a.v.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.v.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Zg(function(){var g,h,k,l;return H(function(m){if(1==m.g)return g=a,u(m,a.A.start(c,e),2);g.F=m.h;h=Kk(cl);a.dispatchEvent(h);if(0==
376
+ a.F.variants.length)throw new O(2,4,4036);dl(a.F);k=Date.now()/1E3;l=k-f;a.j.I=l;z(m)})}(),function(){return a.A.stop()})}
377
+ function Fk(a,b){var c,d;return H(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.o=el(a,{fc:a.U,onError:function(f){Vk(a,f)},pd:function(f){fl(a,f)},onExpirationUpdated:function(f,g){gl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==hl&&d&&(d=!1,a.j.j=Date.now()/1E3-c)}}),a.v.useMediaCapabilities||ig(a.F),a.o.configure(a.v.drm),u(e,Hh(a.o,a.F.variants,a.F.offlineSessionIds,a.v.useMediaCapabilities),2)):3!=e.g?u(e,a.o.wc(b.J),3):u(e,a.ed(a.F),0)})}
378
+ function Gk(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v;return H(function(x){switch(x.g){case 1:b.startTime=c.startTime;d=b.J;e=b.uri;a.Ia=e;a.H=new Zi({ld:function(){return b.J.playbackRate},hd:function(){return b.J.defaultPlaybackRate},ve:function(w){b.J.playbackRate=w},cf:function(w){b.J.currentTime+=w}});f=function(){return il(a)};g=function(){return jl(a)};a.h.m(d,"playing",f);a.h.m(d,"pause",f);a.h.m(d,"ended",f);a.h.m(d,"ratechange",g);h=a.v.abrFactory;a.B&&a.Cb==h||(a.Cb=h,a.B=Lb(h),"function"!=typeof a.B.playbackRateChanged&&
379
+ (Eb("AbrManager","Please use an AbrManager with playbackRateChanged function."),a.B.playbackRateChanged=function(){}),a.B.configure(a.v.abr));a.ea=new Og(a.v.preferredAudioLanguage,a.v.preferredVariantRole,a.v.preferredAudioChannelCount);a.ha=a.v.preferredTextLanguage;a.Za=a.v.preferredTextRole;a.Ja=a.v.preferForcedSubs;kl(a.F.presentationTimeline,a.v.playRangeStart,a.v.playRangeEnd);a.B.init(function(w,y,C){y=void 0===y?!1:y;C=void 0===C?0:C;a.i&&w!=a.i.h&&(tk(a.j.g,w,!0),vj(a.i,w,y,C),ll(a))});
380
+ a.D=ml(a,b.startTime);a.va=nl(a);k=Math.max(a.F.minBufferTime,a.v.streaming.rebufferingGoal);ol(a,k);Zf(a.F,a.v.preferredAudioChannelCount);a.i=pl(a);a.i.configure(a.v.streaming);a.l=ql;a.dispatchEvent(Kk(rl));l=null;if(m=a.Ib().find(function(w){return w.active})){x.C(2);break}l=sl(a)?a.B.chooseVariant():null;tl(a,l,!0,!1,0);if(!a.v.streaming.startAtSegmentBoundary){x.C(3);break}n=a.D.l();return u(x,ul(l,n),4);case 4:p=x.h,a.D.o(p);case 3:ll(a);case 2:return t=a.ob().find(function(w){return w.active}),
381
+ t||((v=Dg(a.F.textStreams,a.ha,a.Za,a.Ja)[0]||null)&&uk(a.j.g,v,!0),l&&(v?(l.audio&&vl(a,l.audio,v)&&(a.V=!0),a.V&&a.L.o.setTextVisibility(!0),wl(a)):a.V=!1),v&&(a.v.streaming.alwaysStreamText||a.Nb())&&wj(a.i,v)),u(x,a.i.start(),5);case 5:a.v.abr.enabled&&(a.B.enable(),xl(a)),kg(a.i?a.i.h:null,a.F),yl(a.F),zl(a),sl(a),a.F.variants.some(function(w){return w.primary}),a.h.Na(d,"loadedmetadata",function(){a.j.l=Date.now()/1E3-c.Ae}),z(x)}})}
382
+ function Hk(a,b,c){var d,e,f,g;return H(function(h){return 1==h.g?(d=Sb,e=Date.now()/1E3,f=!0,a.o=el(a,{fc:a.U,onError:function(k){Vk(a,k)},pd:function(k){fl(a,k)},onExpirationUpdated:function(k,l){gl(a,k,l)},onEvent:function(k){a.dispatchEvent(k);k.type==hl&&f&&(f=!1,a.j.j=Date.now()/1E3-e)}}),a.o.configure(a.v.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:
383
+ "video/mp4",codecs:c.mimeType?lf(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ib,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.o.V=!0,u(h,Hh(a.o,[g],[]),2)):u(h,a.o.wc(b.J),0)})}
384
+ function Ik(a,b,c){function d(){return il(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ia=b.uri;a.D=new Oi(b.J);null!=b.startTime&&a.D.o(b.startTime);a.H=new Zi({ld:function(){return b.J.playbackRate},hd:function(){return b.J.defaultPlaybackRate},ve:function(g){b.J.playbackRate=g},cf:function(g){b.J.currentTime+=g}});ol(a,a.v.streaming.rebufferingGoal);a.h.m(b.J,"playing",d);a.h.m(b.J,"pause",d);a.h.m(b.J,"ended",d);a.h.m(b.J,"ratechange",function(){return jl(a)});"none"!=a.g.preload&&a.h.Na(a.g,"loadedmetadata",
385
+ function(){a.j.l=Date.now()/1E3-c.Ae});a.g.audioTracks&&(a.h.m(a.g.audioTracks,"addtrack",function(){return zl(a)}),a.h.m(a.g.audioTracks,"removetrack",function(){return zl(a)}),a.h.m(a.g.audioTracks,"change",function(){return zl(a)}));a.g.textTracks&&(a.h.m(a.g.textTracks,"addtrack",function(g){zl(a);Al(a,g)}),a.h.m(a.g.textTracks,"removetrack",function(){return zl(a)}),a.h.m(a.g.textTracks,"change",function(){return zl(a)}));b.J.src=b.uri;(Rc()||Qc("Web0S"))&&b.J.load();a.l=Bl;a.dispatchEvent(Kk(rl));
386
+ var e=new Xe;Fi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){e.resolve()});var f=!1;a.Db.push(function(){f=!0});Fi(a.g,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,function(){var g;return H(function(h){if(1==h.g){if(f)return h["return"]();Cl(a);g=Dl(a);return g.find(function(k){return"disabled"!=k.mode})?h.C(2):u(h,new Promise(function(k){a.h.Na(a.g.textTracks,"change",k);(new P(k)).T(1)}),2)}if(f)return h["return"]();El(a);z(h)})});a.g.error?e.reject(Uk(a)):"none"==a.g.preload&&(Ra('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.'),
387
+ e.resolve());a.h.Na(a.g,"error",function(){e.reject(Uk(a))});return new Zg(e,function(){e.reject(new O(2,7,7001));return Promise.resolve()})}function Cl(a){var b=a.v.preferredAudioLanguage;if(""!=b){a.wd(b);var c=a.v.preferredVariantRole;""!=c&&a.wd(b,c)}}function El(a){var b=a.v.preferredTextLanguage,c=a.v.preferForcedSubs;if(""!=b){a.me(b,"",c);var d=a.v.preferredTextRole;""!=d&&a.me(b,d,c)}}
388
+ function Al(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.h.m(c,"cuechange",function(){if(c.activeCues)for(var d=r(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Zk(a,e.startTime,e.endTime,e.type,e.value),a.I)a.I.onCueMetadataChange(e.value)}),(new P(function(){var d=Fl(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ha().T(.5))}
389
+ function Zk(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Kk(Gl,b))}function dl(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 el(a,b){return new Ah(b,a.v.drm.updateExpirationTime)}function yk(a){return new jh(function(b,c){a.B&&a.B.segmentDownloaded(b,c)})}
390
+ function ml(a,b){return new Pi(a.g,a.F,a.v.streaming,b,function(){a.va&&bj(a.va,!0);if(a.i)for(var c=a.i,d=c.G.kd(),e=c.v.smallGapLimit,f=r(c.g.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.g.get(g);h.ua=null;var k=c.G.X;g==Rb?(k=k.i,k=null==k.g||null==k.h?!1:d>=k.g&&d<k.h):(k=Lf(k,g),k=Te(k,d,e));if(!k&&((null!=Mf(c.G.X,g)||h.cb)&&zj(c,h),h.Oa&&(h.Oa.abort(),h.Oa=null),g===Rb))for(g=c.G.X.D.g,g.l=0,g.h=[],g.g=[],h=g.i,h.i=[],h.h=[],h.g=0,De(g),g=r(g.j.values()),h=g.next();!h.done;h=g.next())$d(h.value)}a.K&&
391
+ Hl(a)},function(c){return a.dispatchEvent(c)})}function nl(a){var b=new hj(a.rb);ij(b,function(d){$k(a,Il,d)},function(d){$k(a,Jl,d)},function(d,e){e||($k(a,Il,d),$k(a,Jl,d))});var c=new aj(a.g);c.g.add(b);return c}function ol(a,b){a.K=new Sg;a.K.g=Ug;Vg(a.K,b,Math.min(.5,b/2));Xk(a);a.ub=(new P(function(){Hl(a)})).oa(.25)}
392
+ function Hl(a){switch(a.l){case Bl:if(a.g.ended)var b=!0;else{var c=Se(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case ql:a:if(a.g.ended||Jf(a.L))b=!0;else{if(a.F.presentationTimeline.Z()){c=a.F.presentationTimeline.Hb();var d=Se(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Ue(a.g.buffered,a.g.currentTime);c=a.K;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Tg:Ug;c.g=d;b!=d&&Xk(a)}function Yk(a,b,c,d){return new Cf(a,b,c,d)}
393
+ function pl(a){return new kj(a.F,{kd:function(){return a.D.l()},getBandwidthEstimate:function(){return a.B.getBandwidthEstimate()},X:a.L,fc:a.U,onError:function(b){return Vk(a,b)},onEvent:function(b){return a.dispatchEvent(b)},yg:function(){a.A&&a.A.update&&a.A.update()},ge:function(){a.D&&a.D.H();Hl(a)}})}
394
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=jk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Eb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
395
+ 0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=nk(this.v,a,xk(this));Kl(this);return c};
396
+ function Kl(a){if(a.A){var b=fh(a.v.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.A.configure(b)}a.o&&a.o.configure(a.v.drm);if(a.i){a.i.configure(a.v.streaming);try{Ll(a,a.F)}catch(f){Vk(a,f)}a.B&&sl(a);b=a.i.h;!b||b.allowedByApplication&&b.allowedByKeySystem||Ml(a)}a.U&&a.U.se(a.v.streaming.forceHTTPS);if(a.L&&(b=a.v.textDisplayFactory,a.Qd!=b)){var c=Lb(b),d=a.L,e=d.o;d.o=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.i&&(d.i.i=c);a.Qd=b;a.i&&(b=a.i,(c=b.g.get(Rb))&&
397
+ uj(b,c.stream,!0,0,!0))}a.B&&(a.B.configure(a.v.abr),a.v.abr.enabled?a.B.enable():a.B.disable(),xl(a));a.K&&(b=a.v.streaming.rebufferingGoal,a.F&&(b=Math.max(b,a.F.minBufferTime)),Vg(a.K,b,Math.min(.5,b/2)));a.F&&kl(a.F.presentationTimeline,a.v.playRangeStart,a.v.playRangeEnd)}q.getConfiguration=function(){var a=xk(this);nk(a,this.v,xk(this));return a};q.Jg=function(){for(var a in this.v)delete this.v[a];nk(this.v,xk(this),xk(this));Kl(this)};q.Ue=function(){return this.l};q.dg=function(){return this.g};
398
398
  q.Bc=function(){return this.U};q.Pd=function(){return this.Ia};q.fd=function(){return this.I?this.I:null};q.Z=function(){return this.F?this.F.presentationTimeline.Z():this.g&&this.g.src?Infinity==this.g.duration:!1};q.Lb=function(){return this.F?this.F.presentationTimeline.Lb():!1};q.Ye=function(){if(this.F){var a=this.F.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
399
- q.Va=function(){if(this.F){var a=this.F.presentationTimeline;return{start:a.cc(),end:a.kb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.keySystem=function(){return Uh(this.drmInfo())};q.drmInfo=function(){return this.o?this.o.i:null};q.Ac=function(){return this.o?this.o.Ac():Infinity};q.jd=function(){return this.o?this.o.jd():{}};q.Ic=function(){return this.K?this.K.g==Sg:!1};q.Cc=function(){return this.g?this.H?this.H.i:1:0};
400
- q.De=function(a){0==a?Ra("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==ol&&(this.B.playbackRateChanged(a),rj(this.i,1<Math.abs(a))))};q.Ie=function(){var a=this.H.hd();this.l==zl&&this.H.set(a);this.l==ol&&(this.H.set(a),this.B.playbackRateChanged(a),rj(this.i,!1))};
401
- q.Ib=function(){if(this.F){for(var a=this.i?this.i.h:null,b=[],c=0,d=r(this.F.variants),e=d.next();!e.done;e=d.next())if(e=e.value,zg(e)){var f=sg(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return xg(g)}):[]};
402
- q.mb=function(){if(this.F){for(var a=this.i?this.i.i:null,b=[],c=r(this.F.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=tg(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Bl(this).map(function(f){var g=yg(f);g.active="disabled"!=f.mode;g.type="text";g.originalTextId=f.id;"captions"==f.kind&&(g.mimeType="application/cea-608");f.kind&&(g.roles=[f.kind]);"forced"==f.kind&&(g.forced=!0);return g}):[]};
403
- q.Vf=function(){return this.F?this.F.imageStreams.map(function(a){return ug(a)}):[]};
404
- q.mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,u,x,w,y,C,D;return H(function(B){if(1==B.g)return c.F?(d=c.F.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?B.C(3):v(B,d.createSegmentIndex(),3):B["return"](null):B.C(2);if(2!=B.g){e=d.segmentIndex.find(b);if(null==e)return B["return"](null);f=d.segmentIndex.get(e);g=/(\d+)x(\d+)/.exec(d.tilesLayout);if(!g)return B["return"](null);h=d.width||0;k=d.height||0;l=parseInt(g[1],10);m=parseInt(g[2],10);n=h/l;p=k/m;t=l*m;u=f.j-f.startTime;
405
- x=u/t;w=f.startTime;C=y=0;1<t&&(D=Math.floor((b-f.startTime)/x),w=f.startTime+D*x,y=D%l*n,C=Math.floor(D/l)*p);return B["return"]({height:p,positionX:y,positionY:C,startTime:w,duration:x,uris:f.Fa(),width:n})}return B["return"](null)})};
406
- q.oe=function(a){if(this.F&&this.i){var b=this.F.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(sk(this.j.g,b,!1),uj(this.i,b),Ll(this),this.ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Bl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,vg(c)==a.id?c.mode=this.V?"showing":"hidden":c.mode="disabled";Ll(this)}};
407
- q.pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.F&&this.i){this.v.abr.enabled&&Ra("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.F.variants.find(function(e){return e.id==a.id});d&&zg(d)&&(rl(this,d,!1,b,c),this.ea=new Lg(d),ql(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
408
- vg(c)==a.id){Ml(this,c);break}};q.Nf=function(){return Nl(this.Ib())};q.lg=function(){return Nl(this.mb())};q.Mf=function(){return Array.from(Ol(this.Ib()))};q.kg=function(){return Array.from(Ol(this.mb()))};
409
- q.wd=function(a,b){if(this.F&&this.D){this.ea=new Mg(a,b||"",0,"");if(!this.v.abr.enabled){var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.i.h,e=this.ea.create(this.F.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;if(f){c=sg(f);this.pe(c,!0);return}}Kl(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
410
- c=Ub(a);f=d=null;e=r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=xg(g);Ub(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Ml(this,f):d&&Ml(this,d)}};
411
- q.me=function(a,b,c){c=void 0===c?!1:c;if(this.F&&this.D){if(this.ha=a,this.Za=b||"",this.Ja=c,(a=Bg(this.F.textStreams,this.ha,this.Za,this.Ja)[0]||null)&&a!=this.i.i&&(sk(this.j.g,a,!1),this.v.streaming.alwaysStreamText||this.Nb()))uj(this.i,a),Ll(this)}else{var d=Ub(a);(a=this.mb().find(function(e){return Ub(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.oe(a)}};
412
- q.Lg=function(a){if(this.F&&this.D){for(var b=null,c=r(this.F.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ea=new Mg(b.language,"",0,a),Kl(this))}};q.Nb=function(){var a=this.V;return this.L?this.L.o.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Bl(this).some(function(b){return"showing"==b.mode}):a};
413
- function Bl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Dl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
414
- q.ye=function(a){a=!!a;if(this.V!=a){this.V=a;if(this.l==ol)this.L.o.setTextVisibility(a),this.v.streaming.alwaysStreamText||(a?this.i.i||(a=Bg(this.F.textStreams,this.ha,this.Za,this.Ja),0<a.length&&(uj(this.i,a[0]),Ll(this))):qj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=Bl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}ul(this)}};
399
+ q.Va=function(){if(this.F){var a=this.F.presentationTimeline;return{start:a.cc(),end:a.mb()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.keySystem=function(){return Wh(this.drmInfo())};q.drmInfo=function(){return this.o?this.o.i:null};q.Ac=function(){return this.o?this.o.Ac():Infinity};q.jd=function(){return this.o?this.o.jd():{}};q.Ic=function(){return this.K?this.K.g==Ug:!1};q.Cc=function(){return this.g?this.H?this.H.i:1:0};
400
+ q.De=function(a){0==a?Ra("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==ql&&(this.B.playbackRateChanged(a),tj(this.i,1<Math.abs(a))))};q.Ie=function(){var a=this.H.hd();this.l==Bl&&this.H.set(a);this.l==ql&&(this.H.set(a),this.B.playbackRateChanged(a),tj(this.i,!1))};
401
+ q.Ib=function(){if(this.F){for(var a=this.i?this.i.h:null,b=[],c=0,d=r(this.F.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Bg(e)){var f=ug(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return zg(g)}):[]};
402
+ q.ob=function(){if(this.F){for(var a=this.i?this.i.i:null,b=[],c=r(this.F.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=vg(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Dl(this).map(function(f){var g=Ag(f);g.active="disabled"!=f.mode;g.type="text";g.originalTextId=f.id;"captions"==f.kind&&(g.mimeType="application/cea-608");f.kind&&(g.roles=[f.kind]);"forced"==f.kind&&(g.forced=!0);return g}):[]};
403
+ q.Vf=function(){return this.F?this.F.imageStreams.map(function(a){return wg(a)}):[]};
404
+ q.mg=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D;return H(function(B){if(1==B.g)return c.F?(d=c.F.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?B.C(3):u(B,d.createSegmentIndex(),3):B["return"](null):B.C(2);if(2!=B.g){e=d.segmentIndex.find(b);if(null==e)return B["return"](null);f=d.segmentIndex.get(e);g=/(\d+)x(\d+)/.exec(d.tilesLayout);if(!g)return B["return"](null);h=d.width||0;k=d.height||0;l=parseInt(g[1],10);m=parseInt(g[2],10);n=h/l;p=k/m;t=l*m;v=f.j-f.startTime;
405
+ x=v/t;w=f.startTime;C=y=0;1<t&&(D=Math.floor((b-f.startTime)/x),w=f.startTime+D*x,y=D%l*n,C=Math.floor(D/l)*p);return B["return"]({height:p,positionX:y,positionY:C,startTime:w,duration:x,uris:f.Fa(),width:n})}return B["return"](null)})};
406
+ q.oe=function(a){if(this.F&&this.i){var b=this.F.textStreams.find(function(d){return d.id==a.id});b&&b!=this.i.i&&(uk(this.j.g,b,!1),wj(this.i,b),Nl(this),this.ha=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Dl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,xg(c)==a.id?c.mode=this.V?"showing":"hidden":c.mode="disabled";Nl(this)}};
407
+ q.pe=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.F&&this.i){this.v.abr.enabled&&Ra("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.F.variants.find(function(e){return e.id==a.id});d&&Bg(d)&&(tl(this,d,!1,b,c),this.ea=new Ng(d),sl(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=r(b),c=b.next();!c.done;c=b.next())if(c=c.value,
408
+ xg(c)==a.id){Ol(this,c);break}};q.Nf=function(){return Pl(this.Ib())};q.lg=function(){return Pl(this.ob())};q.Mf=function(){return Array.from(Ql(this.Ib()))};q.kg=function(){return Array.from(Ql(this.ob()))};
409
+ q.wd=function(a,b){if(this.F&&this.D){this.ea=new Og(a,b||"",0,"");if(!this.v.abr.enabled){var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.i.h,e=this.ea.create(this.F.variants),f=null;e=r(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;if(f){c=ug(f);this.pe(c,!0);return}}Ml(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
410
+ c=Ub(a);f=d=null;e=r(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=zg(g);Ub(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?Ol(this,f):d&&Ol(this,d)}};
411
+ q.me=function(a,b,c){c=void 0===c?!1:c;if(this.F&&this.D){if(this.ha=a,this.Za=b||"",this.Ja=c,(a=Dg(this.F.textStreams,this.ha,this.Za,this.Ja)[0]||null)&&a!=this.i.i&&(uk(this.j.g,a,!1),this.v.streaming.alwaysStreamText||this.Nb()))wj(this.i,a),Nl(this)}else{var d=Ub(a);(a=this.ob().find(function(e){return Ub(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.oe(a)}};
412
+ q.Lg=function(a){if(this.F&&this.D){for(var b=null,c=r(this.F.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ea=new Og(b.language,"",0,a),Ml(this))}};q.Nb=function(){var a=this.V;return this.L?this.L.o.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Dl(this).some(function(b){return"showing"==b.mode}):a};
413
+ function Dl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Fl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}
414
+ q.ye=function(a){a=!!a;if(this.V!=a){this.V=a;if(this.l==ql)this.L.o.setTextVisibility(a),this.v.streaming.alwaysStreamText||(a?this.i.i||(a=Dg(this.F.textStreams,this.ha,this.Za,this.Ja),0<a.length&&(wj(this.i,a[0]),Nl(this))):sj(this.i));else if(this.g&&this.g.src&&this.g.textTracks){var b=Dl(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}wl(this)}};
415
415
  q.fg=function(){if(!this.Z())return null;var a=this.ba.l,b=0;if(this.D)b=this.D.l();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.F?new Date(1E3*(this.F.presentationTimeline.j+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
416
- q.Ve=function(){if(!this.Z())return null;if(this.F)return new Date(1E3*this.F.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.gd=function(){if(this.l==ol)return this.L.gd();var a={total:[],audio:[],video:[],text:[]};this.l==zl&&(a.total=Ve(this.g.buffered));return a};
417
- q.getStats=function(){if(this.l!=ol&&this.l!=zl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames: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:[]};gl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
418
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.R=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.I?a.I:NaN):a=NaN;this.j.o=a;if(this.l==ol){if(a=this.i.h)this.j.B=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.V=a.video.width||NaN,c.D=b);this.Z()&&(a=this.Ve().valueOf()+1E3*this.Va().end,this.j.H=(Date.now()-a)/1E3);this.F&&this.F.presentationTimeline&&
419
- (this.j.K=this.F.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.j.A=a}var d=this.j;a=d.V;c=d.D;b=d.B;var e=d.O,f=d.R,g=d.L,h=d.A,k=d.i,l=d.l,m=d.I,n=d.j,p=ok(d.h,"playing"),t=ok(d.h,"paused"),u=ok(d.h,"buffering"),x=d.o,w=d.H,y=d.K,C=pk(d.h),D=[];d=r(d.g.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
420
- estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:u,licenseTime:x,liveLatency:w,maxSegmentDuration:y,stateHistory:C,switchHistory:D}};
421
- q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Eb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=ol&&this.l!=zl)throw new O(1,7,7004);if(!d){var h=oi(a);d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[h];if(!d)throw new O(1,2,2011,h);}if(this.l==zl){if("text/vtt"!=d)throw new O(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=
422
- f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.mb().find(function(k){return k.language==b&&k.label==(f||"")&&k.kind==c}))return xl(this),a;throw new O(1,2,2012);}h=this.F.presentationTimeline.getDuration();if(Infinity==h)throw new O(1,4,4033);a={id:this.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Vi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],
423
- keyIds:new Set,language:b,label:f||null,type:Rb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};if(!nf(ff(a.mimeType,a.codecs)))throw new O(2,2,2014,d);this.F.textStreams.push(a);xl(this);return tg(a)};
424
- q.Cf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,u,x,w,y,C,D;return H(function(B){switch(B.g){case 1:if(h.l!=ol&&h.l!=zl)throw new O(1,7,7004);if(d){B.C(2);break}k=oi(a);if(d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[k]){B.C(3);break}A(B,4);return v(B,qi(a,h.U,h.v.streaming.retryParameters),6);case 6:d=B.h;wa(B,3);break;case 4:F(B);case 3:if(!d)throw new O(1,
425
- 2,2011,k);case 2:if(h.l!=zl){B.C(7);break}if("text/vtt"==d){B.C(8);break}return v(B,Pl(a,h.U,h.v.streaming.retryParameters),9);case 9:l=B.h,m=Ql(h,l,d),n=new Blob([m],{type:"text/vtt"}),a=Ff(n),d="text/vtt";case 8:g&&(c="forced");p=document.createElement("track");p.src=a;p.label=f||"";p.kind=c;p.srclang=b;h.g.getAttribute("crossorigin")||h.g.setAttribute("crossorigin","anonymous");h.g.appendChild(p);t=h.mb();if(u=t.find(function(E){return E.language==b&&E.label==(f||"")&&E.kind==c}))return xl(h),
426
- B["return"](u);throw new O(1,2,2012);case 7:x=Sb;w=h.F.presentationTimeline.getDuration();if(Infinity==w)throw new O(1,4,4033);y={id:h.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Vi(0,w,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:x.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};C=
427
- ff(y.mimeType,y.codecs);D=nf(C);if(!D)throw new O(2,2,2014,d);h.F.textStreams.push(y);xl(h);return B["return"](tg(y))}})};function Pl(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=rh,e=lh([a],c),e.method="GET",v(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Ql(a,b,c){var d=of[c];if(d)return c=d(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=nc(b),b=c.parseMedia(b,a),ek(b);throw new O(2,2,2014,c);}
428
- q.ue=function(a,b){this.Td.width=a;this.Td.height=b};q.ke=function(){if(this.l==ol){var a=this.i;if(a.M.g)a=!1;else if(a.j)a=!1;else{for(var b=r(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Fc&&(c.Fc=!1,pj(a,c,.1));a=!0}}else a=!1;return a};q.$f=function(){Ra("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.F};
429
- q.ag=function(){return this.vb};function vk(a){var b=jk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Z()&&d.includes(c.code)&&(c.severity=1,a.ke())};b.textDisplayFactory=function(){return a.gb?new Xj(a.g,a.gb):new Rj(a.g)};return b}q.ze=function(a){this.gb=a};
430
- function $k(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Wi;h={id:a.Xd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
431
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Rb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}q.ed=function(a){var b=this;return H(function(c){if(1==c.g)return v(c,Rl(b,a),2);Jl(b,a);z(c)})};
432
- function Rl(a,b){var c;return H(function(d){if(1==d.g)return c=a.i?a.i.h:null,v(d,gg(a.o,c,b,a.v.useMediaCapabilities),2);wl(b);z(d)})}
433
- function Jl(a,b){if(a.l!=Lk){for(var c=a.v.restrictions,d=a.Td,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=fg(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&xl(a);if((c=a.o?a.o.i:null)&&a.o.o)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
434
- f.next())g=g.value,Ph(a.o,g.initDataType,g.initData);Sl(a,b)}}
435
- function sl(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;return H(function(p){if(1==p.g)return k?v(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},v(h,e(c,b),2);if(3!=h.g)return f=h.h,v(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)})}
436
- function Vk(a){var b=a.Ic();if(a.j&&a.K&&a.D){var c=a.H;c.j=b;Yi(c);gl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Ik(Tl,b))}function hl(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Ik(Ul),a.dispatchEvent(b))}function gl(a){if(a.j&&a.K){var b=a.j.h;a.K.g==Sg?nk(b,"buffering"):a.g.paused?nk(b,"paused"):a.g.ended?nk(b,"ended"):nk(b,"playing")}}
437
- function ql(a){try{Sl(a,a.F)}catch(c){return Tk(a,c),!1}var b=a.F.variants.filter(function(c){return zg(c)});b=a.ea.create(b);a.B.setVariants(Array.from(b.values()));return!0}function Kl(a){var b;if(b=ql(a)?a.B.chooseVariant():null)rl(a,b,!0,!0,0),jl(a)}function rl(a,b,c,d,e){var f=a.i.h;b==f?d&&tj(a.i,b,d,e,!0):(rk(a.j.g,b,c),tj(a.i,b,d,e),c=null,f&&(c=sg(f)),b=sg(b),Vl(a,c,b))}
438
- function Ml(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=xg(c);var d=xg(b);Vl(a,c,d)}function tl(a,b,c){a=Ub(a.v.preferredTextLanguage);b=Ub(b.language);c=Ub(c.language);return Tb(c,a)&&!Tb(b,c)}function jl(a){var b=Ik(Wl);Xl(a,b)}function xl(a){var b=Ik(Yl);Xl(a,b)}function Vl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Ik(Zl,b);Xl(a,b)}function Ll(a){var b=Ik($l);Xl(a,b)}function ul(a){var b=Ik(am);Xl(a,b)}
439
- function vl(a){var b=(new Map).set("newStatus",a.v.abr.enabled);Xl(a,Ik(bm,b))}function Tk(a,b){if(a.l!=Lk){var c=Ik(cm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Yk(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(Ik(b,c))}
440
- function Sk(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)}
441
- function dl(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.F.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!dm.includes(l)}h!=f.allowedByKeySystem&&
442
- (e=!0)}}}e&&ql(a);(d=a.i.h)&&!d.allowedByKeySystem&&Kl(a);e&&xl(a)}}function el(a,b,c){if(a.A&&a.A.onExpirationUpdated)a.A.onExpirationUpdated(b,c);b=Ik(em);a.dispatchEvent(b)}function il(a,b,c){0<b&&(a.Z()||a.sf(b));b=a.getDuration();c<b&&(a.Z()||a.cb(c))}
443
- function Sl(a,b){var c=a.o?a.o.jd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?dm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
444
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function wl(a){if(!a.variants.some(zg))throw new O(2,4,4032);}function Xl(a,b){H(function(c){if(1==c.g)return v(c,Promise.resolve(),2);a.l!=Lk&&a.dispatchEvent(b);z(c)})}function Ol(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ub(c.language)):b.add("und");return b}
445
- function Nl(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Ub(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
446
- h.push({language:l,role:n,label:p})}});return h}function Nk(){return new O(2,7,7E3)}function Hk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Lj(){return{J:null,mimeType:null,startTime:null,Ae:NaN,uri:null}}function Ok(a){return new Promise(function(b,c){a.Ob=function(){return c(Nk())};a.od=function(){return b()};a.onError=function(d){return c(d)};a.qd=function(){return c(Nk())}})}K("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.ze;
416
+ q.Ve=function(){if(!this.Z())return null;if(this.F)return new Date(1E3*this.F.presentationTimeline.j);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.gd=function(){if(this.l==ql)return this.L.gd();var a={total:[],audio:[],video:[],text:[]};this.l==Bl&&(a.total=Ve(this.g.buffered));return a};
417
+ q.getStats=function(){if(this.l!=ql&&this.l!=Bl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames: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:[]};il(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.j;b=Math.round(100*b);c.i=isNaN(c.i)?
418
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.j,b=Number(a.totalVideoFrames),c.R=Number(a.droppedVideoFrames),c.O=b,this.j.L=Number(a.corruptedVideoFrames));this.o?(a=this.o,a=a.I?a.I:NaN):a=NaN;this.j.o=a;if(this.l==ql){if(a=this.i.h)this.j.B=(this.H?this.H.i:1)*a.bandwidth;a&&a.video&&(c=this.j,b=a.video.height||NaN,c.V=a.video.width||NaN,c.D=b);this.Z()&&(a=this.Ve().valueOf()+1E3*this.Va().end,this.j.H=(Date.now()-a)/1E3);this.F&&this.F.presentationTimeline&&
419
+ (this.j.K=this.F.presentationTimeline.g);a=this.B.getBandwidthEstimate();this.j.A=a}var d=this.j;a=d.V;c=d.D;b=d.B;var e=d.O,f=d.R,g=d.L,h=d.A,k=d.i,l=d.l,m=d.I,n=d.j,p=qk(d.h,"playing"),t=qk(d.h,"paused"),v=qk(d.h,"buffering"),x=d.o,w=d.H,y=d.K,C=rk(d.h),D=[];d=r(d.g.g);for(var B=d.next();!B.done;B=d.next())B=B.value,D.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
420
+ estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:x,liveLatency:w,maxSegmentDuration:y,stateHistory:C,switchHistory:D}};
421
+ q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Eb("addTextTrack","Please use an addTextTrackAsync.");if(this.l!=ql&&this.l!=Bl)throw new O(1,7,7004);if(!d){var h=qi(a);d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[h];if(!d)throw new O(1,2,2011,h);}if(this.l==Bl){if("text/vtt"!=d)throw new O(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.src=a;d.label=
422
+ f||"";d.kind=c;d.srclang=b;this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous");this.g.appendChild(d);if(a=this.ob().find(function(k){return k.language==b&&k.label==(f||"")&&k.kind==c}))return zl(this),a;throw new O(1,2,2012);}h=this.F.presentationTimeline.getDuration();if(Infinity==h)throw new O(1,4,4033);a={id:this.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Xi(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],
423
+ keyIds:new Set,language:b,label:f||null,type:Rb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};if(!nf(ff(a.mimeType,a.codecs)))throw new O(2,2,2014,d);this.F.textStreams.push(a);zl(this);return vg(a)};
424
+ q.Cf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,x,w,y,C,D;return H(function(B){switch(B.g){case 1:if(h.l!=ql&&h.l!=Bl)throw new O(1,7,7004);if(d){B.C(2);break}k=qi(a);if(d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[k]){B.C(3);break}A(B,4);return u(B,si(a,h.U,h.v.streaming.retryParameters),6);case 6:d=B.h;wa(B,3);break;case 4:F(B);case 3:if(!d)throw new O(1,
425
+ 2,2011,k);case 2:if(h.l!=Bl){B.C(7);break}if("text/vtt"==d){B.C(8);break}return u(B,Rl(a,h.U,h.v.streaming.retryParameters),9);case 9:l=B.h,m=Sl(h,l,d),n=new Blob([m],{type:"text/vtt"}),a=Ff(n),d="text/vtt";case 8:g&&(c="forced");p=document.createElement("track");p.src=a;p.label=f||"";p.kind=c;p.srclang=b;h.g.getAttribute("crossorigin")||h.g.setAttribute("crossorigin","anonymous");h.g.appendChild(p);t=h.ob();if(v=t.find(function(E){return E.language==b&&E.label==(f||"")&&E.kind==c}))return zl(h),
426
+ B["return"](v);throw new O(1,2,2012);case 7:x=Sb;w=h.F.presentationTimeline.getDuration();if(Infinity==w)throw new O(1,4,4033);y={id:h.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Xi(0,w,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:x.qa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};C=
427
+ ff(y.mimeType,y.codecs);D=nf(C);if(!D)throw new O(2,2,2014,d);h.F.textStreams.push(y);zl(h);return B["return"](vg(y))}})};function Rl(a,b,c){var d,e,f;return H(function(g){if(1==g.g)return d=th,e=nh([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.h;return g["return"](f.data)})}function Sl(a,b,c){var d=of[c];if(d)return c=d(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration},b=nc(b),b=c.parseMedia(b,a),gk(b);throw new O(2,2,2014,c);}
428
+ q.ue=function(a,b){this.Td.width=a;this.Td.height=b};q.ke=function(){if(this.l==ql){var a=this.i;if(a.M.g)a=!1;else if(a.j)a=!1;else{for(var b=r(a.g.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Fc&&(c.Fc=!1,rj(a,c,.1));a=!0}}else a=!1;return a};q.$f=function(){Ra("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.F};
429
+ q.ag=function(){return this.vb};function xk(a){var b=lk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.Z()&&d.includes(c.code)&&(c.severity=1,a.ke())};b.textDisplayFactory=function(){return a.hb?new Zj(a.g,a.hb):new Tj(a.g)};return b}q.ze=function(a){this.hb=a};
430
+ function bl(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Yi;h={id:a.Xd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
431
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:Rb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}q.ed=function(a){var b=this;return H(function(c){if(1==c.g)return u(c,Tl(b,a),2);Ll(b,a);z(c)})};
432
+ function Tl(a,b){var c;return H(function(d){if(1==d.g)return c=a.i?a.i.h:null,u(d,gg(a.o,c,b,a.v.useMediaCapabilities),2);yl(b);z(d)})}
433
+ function Ll(a,b){if(a.l!=Nk){for(var c=a.v.restrictions,d=a.Td,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=fg(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.i&&zl(a);if((c=a.o?a.o.i:null)&&a.o.o)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=
434
+ f.next())g=g.value,Rh(a.o,g.initDataType,g.initData);Ul(a,b)}}
435
+ function ul(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;return H(function(p){if(1==p.g)return k?u(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
436
+ function Xk(a){var b=a.Ic();if(a.j&&a.K&&a.D){var c=a.H;c.j=b;$i(c);il(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Kk(Vl,b))}function jl(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Kk(Wl),a.dispatchEvent(b))}function il(a){if(a.j&&a.K){var b=a.j.h;a.K.g==Ug?pk(b,"buffering"):a.g.paused?pk(b,"paused"):a.g.ended?pk(b,"ended"):pk(b,"playing")}}
437
+ function sl(a){try{Ul(a,a.F)}catch(c){return Vk(a,c),!1}var b=a.F.variants.filter(function(c){return Bg(c)});b=a.ea.create(b);a.B.setVariants(Array.from(b.values()));return!0}function Ml(a){var b;if(b=sl(a)?a.B.chooseVariant():null)tl(a,b,!0,!0,0),ll(a)}function tl(a,b,c,d,e){var f=a.i.h;b==f?d&&vj(a.i,b,d,e,!0):(tk(a.j.g,b,c),vj(a.i,b,d,e),c=null,f&&(c=ug(f)),b=ug(b),Xl(a,c,b))}
438
+ function Ol(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=zg(c);var d=zg(b);Xl(a,c,d)}function vl(a,b,c){a=Ub(a.v.preferredTextLanguage);b=Ub(b.language);c=Ub(c.language);return Tb(c,a)&&!Tb(b,c)}function ll(a){var b=Kk(Yl);Zl(a,b)}function zl(a){var b=Kk($l);Zl(a,b)}function Xl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Kk(am,b);Zl(a,b)}function Nl(a){var b=Kk(bm);Zl(a,b)}function wl(a){var b=Kk(cm);Zl(a,b)}
439
+ function xl(a){var b=(new Map).set("newStatus",a.v.abr.enabled);Zl(a,Kk(dm,b))}function Vk(a,b){if(a.l!=Nk){var c=Kk(em,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function $k(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(Kk(b,c))}
440
+ function Uk(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new O(2,3,3016,b,c,a.g.error.message)}
441
+ function fl(a,b){if(a.i){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.F.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!fm.includes(l)}h!=f.allowedByKeySystem&&
442
+ (e=!0)}}}e&&sl(a);(d=a.i.h)&&!d.allowedByKeySystem&&Ml(a);e&&zl(a)}}function gl(a,b,c){if(a.A&&a.A.onExpirationUpdated)a.A.onExpirationUpdated(b,c);b=Kk(gm);a.dispatchEvent(b)}function kl(a,b,c){0<b&&(a.Z()||a.sf(b));b=a.getDuration();c<b&&(a.Z()||a.eb(c))}
443
+ function Ul(a,b){var c=a.o?a.o.jd():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?fm.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
444
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function yl(a){if(!a.variants.some(Bg))throw new O(2,4,4032);}function Zl(a,b){H(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Nk&&a.dispatchEvent(b);z(c)})}function Ql(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Ub(c.language)):b.add("und");return b}
445
+ function Pl(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Ub(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
446
+ h.push({language:l,role:n,label:p})}});return h}function Pk(){return new O(2,7,7E3)}function Jk(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Nj(){return{J:null,mimeType:null,startTime:null,Ae:NaN,uri:null}}function Qk(a){return new Promise(function(b,c){a.Ob=function(){return c(Pk())};a.od=function(){return b()};a.onError=function(d){return c(d)};a.qd=function(){return c(Pk())}})}K("shaka.Player",T);T.prototype.setVideoContainer=T.prototype.ze;
447
447
  T.prototype.getManifestParserFactory=T.prototype.ag;T.prototype.getManifest=T.prototype.$f;T.prototype.retryStreaming=T.prototype.ke;T.prototype.setMaxHardwareResolution=T.prototype.ue;T.prototype.addTextTrackAsync=T.prototype.Cf;T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.getStats=T.prototype.getStats;T.prototype.getBufferedInfo=T.prototype.gd;T.prototype.getPresentationStartTimeAsDate=T.prototype.Ve;T.prototype.getPlayheadTimeAsDate=T.prototype.fg;
448
448
  T.prototype.setTextTrackVisibility=T.prototype.ye;T.prototype.isTextTrackVisible=T.prototype.Nb;T.prototype.selectVariantsByLabel=T.prototype.Lg;T.prototype.selectTextLanguage=T.prototype.me;T.prototype.selectAudioLanguage=T.prototype.wd;T.prototype.getTextLanguages=T.prototype.kg;T.prototype.getAudioLanguages=T.prototype.Mf;T.prototype.getTextLanguagesAndRoles=T.prototype.lg;T.prototype.getAudioLanguagesAndRoles=T.prototype.Nf;T.prototype.selectVariantTrack=T.prototype.pe;
449
- T.prototype.selectTextTrack=T.prototype.oe;T.prototype.getThumbnails=T.prototype.mg;T.prototype.getImageTracks=T.prototype.Vf;T.prototype.getTextTracks=T.prototype.mb;T.prototype.getVariantTracks=T.prototype.Ib;T.prototype.cancelTrickPlay=T.prototype.Ie;T.prototype.trickPlay=T.prototype.De;T.prototype.getPlaybackRate=T.prototype.Cc;T.prototype.isBuffering=T.prototype.Ic;T.prototype.getKeyStatuses=T.prototype.jd;T.prototype.getExpiration=T.prototype.Ac;T.prototype.drmInfo=T.prototype.drmInfo;
449
+ T.prototype.selectTextTrack=T.prototype.oe;T.prototype.getThumbnails=T.prototype.mg;T.prototype.getImageTracks=T.prototype.Vf;T.prototype.getTextTracks=T.prototype.ob;T.prototype.getVariantTracks=T.prototype.Ib;T.prototype.cancelTrickPlay=T.prototype.Ie;T.prototype.trickPlay=T.prototype.De;T.prototype.getPlaybackRate=T.prototype.Cc;T.prototype.isBuffering=T.prototype.Ic;T.prototype.getKeyStatuses=T.prototype.jd;T.prototype.getExpiration=T.prototype.Ac;T.prototype.drmInfo=T.prototype.drmInfo;
450
450
  T.prototype.keySystem=T.prototype.keySystem;T.prototype.seekRange=T.prototype.Va;T.prototype.isAudioOnly=T.prototype.Ye;T.prototype.isInProgress=T.prototype.Lb;T.prototype.isLive=T.prototype.Z;T.prototype.getAdManager=T.prototype.fd;T.prototype.getAssetUri=T.prototype.Pd;T.prototype.getNetworkingEngine=T.prototype.Bc;T.prototype.getMediaElement=T.prototype.dg;T.prototype.getLoadMode=T.prototype.Ue;T.prototype.resetConfiguration=T.prototype.Jg;T.prototype.getConfiguration=T.prototype.getConfiguration;
451
451
  T.prototype.configure=T.prototype.configure;T.prototype.load=T.prototype.load;T.prototype.unload=T.prototype.Ee;T.prototype.detach=T.prototype.detach;T.prototype.attach=T.prototype.wc;
452
- 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?v(h,gi(),3):h.C(2);2!=h.g&&(b=h.h);var k={};if(Mc()){for(var l in ni)k[l]=!0;for(var m in pi)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Mc()?!!ni[n]:Nc(n);for(var p in l)k[p]=
453
- Mc()?!!pi[p]:Nc(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
454
- for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Mc()?nf(l)?!0:MediaSource.isTypeSupported(l)||bf(l):Nc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=fm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=Mk;T.setAdManagerFactory=function(a){xk=a};T.registerSupportPlugin=function(a,b){fm[a]=b};T.prototype.destroy=T.prototype.destroy;
455
- var bm="abrstatuschanged",Wl="adaptation",Tl="buffering",fl="drmsessionupdate",Ij="emsg",cm="error",em="expirationupdated",Rk="loaded",Pk="loading",al="manifestparsed",El="metadata",Jk="onstatechange",Kk="onstateidle",Ul="ratechange",pl="streaming",$l="textchanged",am="texttrackvisibility",Zk="timelineregionadded",Gl="timelineregionenter",Hl="timelineregionexit",Yl="trackschanged",Uk="unloading",Zl="variantchanged",gm={bh:bm,dh:Wl,eh:Tl,hh:fl,oh:Ij,Error:cm,ph:em,vh:"largegap",wh:Rk,xh:Pk,Ch:al,Metadata:El,
456
- Gh:Jk,Hh:Kk,Ph:Ul,Th:"sessiondata",Uh:pl,Vh:$l,Wh:am,Xh:Zk,Yh:Gl,Zh:Hl,$h:Yl,di:Uk,gi:Zl},Lk=0,uk=1,ol=2,zl=3;T.LoadMode={DESTROYED:Lk,NOT_LOADED:uk,MEDIA_SOURCE:ol,SRC_EQUALS:zl};T.version="v3.1.4";var hm=["3","1"];Fb=new function(a){this.g=a;this.i=Gb;this.h=Hb}(new Db(Number(hm[0]),Number(hm[1])));var dm=["output-restricted","internal-error"],fm={},xk=null;function im(){this.h=[];this.j=this.i=this.g=0};function jm(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new xf;this.h.m(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.m(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=jm.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
452
+ 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?u(h,ii(),3):h.C(2);2!=h.g&&(b=h.h);var k={};if(Mc()){for(var l in pi)k[l]=!0;for(var m in ri)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=Mc()?!!pi[n]:Nc(n);for(var p in l)k[p]=
453
+ Mc()?!!ri[p]:Nc(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
454
+ for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=Mc()?nf(l)?!0:MediaSource.isTypeSupported(l)||bf(l):Nc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=hm;for(g in f)e[g]=f[g]();return h["return"](e)})};T.isBrowserSupported=Ok;T.setAdManagerFactory=function(a){zk=a};T.registerSupportPlugin=function(a,b){hm[a]=b};T.prototype.destroy=T.prototype.destroy;
455
+ var dm="abrstatuschanged",Yl="adaptation",Vl="buffering",hl="drmsessionupdate",Kj="emsg",em="error",gm="expirationupdated",Tk="loaded",Rk="loading",cl="manifestparsed",Gl="metadata",Lk="onstatechange",Mk="onstateidle",Wl="ratechange",rl="streaming",bm="textchanged",cm="texttrackvisibility",al="timelineregionadded",Il="timelineregionenter",Jl="timelineregionexit",$l="trackschanged",Wk="unloading",am="variantchanged",im={bh:dm,dh:Yl,eh:Vl,hh:hl,oh:Kj,Error:em,ph:gm,vh:"largegap",wh:Tk,xh:Rk,Ch:cl,Metadata:Gl,
456
+ Gh:Lk,Hh:Mk,Ph:Wl,Th:"sessiondata",Uh:rl,Vh:bm,Wh:cm,Xh:al,Yh:Il,Zh:Jl,$h:$l,di:Wk,gi:am},Nk=0,wk=1,ql=2,Bl=3;T.LoadMode={DESTROYED:Nk,NOT_LOADED:wk,MEDIA_SOURCE:ql,SRC_EQUALS:Bl};T.version="v3.1.5";var jm=["3","1"];Fb=new function(a){this.g=a;this.i=Gb;this.h=Hb}(new Db(Number(jm[0]),Number(jm[1])));var fm=["output-restricted","internal-error"],hm={},zk=null;function km(){this.h=[];this.j=this.i=this.g=0};function lm(a,b){var c=this;this.i=a;this.g=b;this.j=!1;this.l=this.g.getVolume();this.h=new xf;this.h.m(this.g,google.ima.AdEvent.Type.PAUSED,function(){c.j=!0});this.h.m(this.g,google.ima.AdEvent.Type.RESUMED,function(){c.j=!1})}q=lm.prototype;q.getDuration=function(){return this.i.getDuration()};q.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.j};
457
457
  q.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
458
- q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?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.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};K("shaka.ads.ClientSideAd",jm);
459
- jm.prototype.release=jm.prototype.release;jm.prototype.getPositionInSequence=jm.prototype.getPositionInSequence;jm.prototype.getSequenceLength=jm.prototype.getSequenceLength;jm.prototype.setMuted=jm.prototype.setMuted;jm.prototype.resize=jm.prototype.resize;jm.prototype.isMuted=jm.prototype.isMuted;jm.prototype.setVolume=jm.prototype.setVolume;jm.prototype.getVolume=jm.prototype.getVolume;jm.prototype.play=jm.prototype.play;jm.prototype.pause=jm.prototype.pause;jm.prototype.skip=jm.prototype.skip;
460
- jm.prototype.canSkipNow=jm.prototype.canSkipNow;jm.prototype.getTimeUntilSkippable=jm.prototype.getTimeUntilSkippable;jm.prototype.isSkippable=jm.prototype.isSkippable;jm.prototype.isPaused=jm.prototype.isPaused;jm.prototype.getRemainingTime=jm.prototype.getRemainingTime;jm.prototype.getMinSuggestedDuration=jm.prototype.getMinSuggestedDuration;jm.prototype.getDuration=jm.prototype.getDuration;function km(a,b,c,d){var e=this;this.o=a;this.g=b;this.B=null;this.D=NaN;this.j=d;this.A=null;this.h=new xf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.1.4");this.i=null;this.h.Na(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){lm(e,f)});this.h.m(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
461
- function(f){mm(e,f)});this.g.onended=function(){e.l.contentComplete()}}km.prototype.stop=function(){this.i&&this.i.stop();this.o&&Wj(this.o)};km.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function mm(a,b){b.getError();nm(a,null);a.j(new N("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
462
- function lm(a,b){a.j(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));a.i=b.getAdsManager(a.g);a.j(new N("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push(new om(e.value));a.j(new N("ad-cue-points-changed",(new Map).set("cuepoints",d)))}pm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
463
- a.h.m(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.g)),a.i.start()}catch(f){nm(a,null)}}
464
- function pm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new N(d,e))}a.h.m(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){mm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){qm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.STARTED,function(c){qm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.m(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
465
- function(c){b(c,"ad-third-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){nm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){nm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
458
+ q.resize=function(a,b){this.g.resize(a,b,document.fullscreenElement?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.i.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.i=null};K("shaka.ads.ClientSideAd",lm);
459
+ lm.prototype.release=lm.prototype.release;lm.prototype.getPositionInSequence=lm.prototype.getPositionInSequence;lm.prototype.getSequenceLength=lm.prototype.getSequenceLength;lm.prototype.setMuted=lm.prototype.setMuted;lm.prototype.resize=lm.prototype.resize;lm.prototype.isMuted=lm.prototype.isMuted;lm.prototype.setVolume=lm.prototype.setVolume;lm.prototype.getVolume=lm.prototype.getVolume;lm.prototype.play=lm.prototype.play;lm.prototype.pause=lm.prototype.pause;lm.prototype.skip=lm.prototype.skip;
460
+ lm.prototype.canSkipNow=lm.prototype.canSkipNow;lm.prototype.getTimeUntilSkippable=lm.prototype.getTimeUntilSkippable;lm.prototype.isSkippable=lm.prototype.isSkippable;lm.prototype.isPaused=lm.prototype.isPaused;lm.prototype.getRemainingTime=lm.prototype.getRemainingTime;lm.prototype.getMinSuggestedDuration=lm.prototype.getMinSuggestedDuration;lm.prototype.getDuration=lm.prototype.getDuration;function mm(a,b,c,d){var e=this;this.o=a;this.g=b;this.B=null;this.D=NaN;this.j=d;this.A=null;this.h=new xf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.g);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v3.1.5");this.i=null;this.h.Na(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){nm(e,f)});this.h.m(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
461
+ function(f){om(e,f)});this.g.onended=function(){e.l.contentComplete()}}mm.prototype.stop=function(){this.i&&this.i.stop();this.o&&Yj(this.o)};mm.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.i&&this.i.destroy();this.l.destroy()};function om(a,b){b.getError();pm(a,null);a.j(new N("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
462
+ function nm(a,b){a.j(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.D)));a.i=b.getAdsManager(a.g);a.j(new N("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.i)));var c=a.i.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push(new qm(e.value));a.j(new N("ad-cue-points-changed",(new Map).set("cuepoints",d)))}rm(a);try{a.i.init(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),
463
+ a.h.m(a.g,"loadeddata",function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.B=new ResizeObserver(function(){a.i.resize(a.g.offsetWidth,a.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.g)),a.i.start()}catch(f){pm(a,null)}}
464
+ function rm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new N(d,e))}a.h.m(a.i,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){om(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){sm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.STARTED,function(c){sm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.m(a.i,google.ima.AdEvent.Type.THIRD_QUARTILE,
465
+ function(c){b(c,"ad-third-quartile")});a.h.m(a.i,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.m(a.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){pm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){pm(a,c)});a.h.m(a.i,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.m(a.i,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
466
466
  a.h.m(a.i,google.ima.AdEvent.Type.PAUSED,function(c){a.A.j=!0;b(c,"ad-paused")});a.h.m(a.i,google.ima.AdEvent.Type.RESUMED,function(c){a.A.j=!1;b(c,"ad-resumed")});a.h.m(a.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.m(a.i,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.m(a.i,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.m(a.i,
467
467
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.m(a.i,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.m(a.i,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.m(a.i,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.m(a.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.m(a.i,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.m(a.i,google.ima.AdEvent.Type.AD_METADATA,
468
- function(c){b(c,"ad-metadata")});a.h.m(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.m(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function qm(a,b){var c=b.getAd();a.A=new jm(c,a.i);c=(new Map).set("ad",a.A).set("sdkAdObject",c).set("originalEvent",b);a.j(new N("ad-started",c));a.o.setAttribute("ad-active","true");a.g.pause()}
469
- function nm(a,b){a.j(new N("ad-stopped",(new Map).set("originalEvent",b)));a.o.removeAttribute("ad-active");a.g.play()};function rm(a,b){this.i=a;this.h=null;this.g=b}q=rm.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
468
+ function(c){b(c,"ad-metadata")});a.h.m(a.i,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.m(a.i,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.m(a.i,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function sm(a,b){var c=b.getAd();a.A=new lm(c,a.i);c=(new Map).set("ad",a.A).set("sdkAdObject",c).set("originalEvent",b);a.j(new N("ad-started",c));a.o.setAttribute("ad-active","true");a.g.pause()}
469
+ function pm(a,b){a.j(new N("ad-stopped",(new Map).set("originalEvent",b)));a.o.removeAttribute("ad-active");a.g.play()};function tm(a,b){this.i=a;this.h=null;this.g=b}q=tm.prototype;q.getDuration=function(){return this.h?this.h.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.i.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
470
470
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};
471
- q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};K("shaka.ads.ServerSideAd",rm);rm.prototype.release=rm.prototype.release;rm.prototype.getPositionInSequence=rm.prototype.getPositionInSequence;rm.prototype.getSequenceLength=rm.prototype.getSequenceLength;rm.prototype.setMuted=rm.prototype.setMuted;rm.prototype.resize=rm.prototype.resize;rm.prototype.isMuted=rm.prototype.isMuted;
472
- rm.prototype.setVolume=rm.prototype.setVolume;rm.prototype.getVolume=rm.prototype.getVolume;rm.prototype.play=rm.prototype.play;rm.prototype.pause=rm.prototype.pause;rm.prototype.skip=rm.prototype.skip;rm.prototype.canSkipNow=rm.prototype.canSkipNow;rm.prototype.getTimeUntilSkippable=rm.prototype.getTimeUntilSkippable;rm.prototype.isSkippable=rm.prototype.isSkippable;rm.prototype.isPaused=rm.prototype.isPaused;rm.prototype.getRemainingTime=rm.prototype.getRemainingTime;
473
- rm.prototype.getMinSuggestedDuration=rm.prototype.getMinSuggestedDuration;rm.prototype.getDuration=rm.prototype.getDuration;function sm(a,b,c,d){var e=this;this.B=a;this.g=b;this.l=null;this.K=NaN;this.j=d;this.I=!1;this.D=this.o=this.A=null;this.H="";this.h=new xf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.B,a);this.j(new N("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){tm(e,f)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.H.length?e.l.resolve(e.H):
474
- e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.o=new rm(f,e.g);e.D&&(e.o.h=e.D);e.j(new N("ad-started",(new Map).set("ad",e.o)));e.B.setAttribute("ad-active","true")});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
471
+ q.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.g=this.h=this.i=null};K("shaka.ads.ServerSideAd",tm);tm.prototype.release=tm.prototype.release;tm.prototype.getPositionInSequence=tm.prototype.getPositionInSequence;tm.prototype.getSequenceLength=tm.prototype.getSequenceLength;tm.prototype.setMuted=tm.prototype.setMuted;tm.prototype.resize=tm.prototype.resize;tm.prototype.isMuted=tm.prototype.isMuted;
472
+ tm.prototype.setVolume=tm.prototype.setVolume;tm.prototype.getVolume=tm.prototype.getVolume;tm.prototype.play=tm.prototype.play;tm.prototype.pause=tm.prototype.pause;tm.prototype.skip=tm.prototype.skip;tm.prototype.canSkipNow=tm.prototype.canSkipNow;tm.prototype.getTimeUntilSkippable=tm.prototype.getTimeUntilSkippable;tm.prototype.isSkippable=tm.prototype.isSkippable;tm.prototype.isPaused=tm.prototype.isPaused;tm.prototype.getRemainingTime=tm.prototype.getRemainingTime;
473
+ tm.prototype.getMinSuggestedDuration=tm.prototype.getMinSuggestedDuration;tm.prototype.getDuration=tm.prototype.getDuration;function um(a,b,c,d){var e=this;this.B=a;this.g=b;this.l=null;this.K=NaN;this.j=d;this.I=!1;this.D=this.o=this.A=null;this.H="";this.h=new xf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.i=new google.ima.dai.api.StreamManager(this.g,this.B,a);this.j(new N("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.i)));this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){vm(e,f)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.H.length?e.l.resolve(e.H):
474
+ e.l.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.l=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.o=new tm(f,e.g);e.D&&(e.o.h=e.D);e.j(new N("ad-started",(new Map).set("ad",e.o)));e.B.setAttribute("ad-active","true")});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.B.removeAttribute("ad-active");
475
475
  var f=e.g.currentTime;e.A&&e.A>f&&(e.g.currentTime=e.A,e.A=null)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.D=f.getStreamData().adProgressData;e.o&&(e.o.h=e.D)});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.j(new N("ad-first-quartile"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.j(new N("ad-midpoint"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.j(new N("ad-third-quartile"))});
476
- this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new N("ad-complete"));e.j(new N("ad-stopped"));e.B.removeAttribute("ad-active");e.o=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new N("ad-skipped"));e.j(new N("ad-stopped"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new om(h.start,h.end));e.j(new N("ad-cue-points-changed",
477
- (new Map).set("cuepoints",f)))})}sm.prototype.stop=function(){this.H="";this.A=null};sm.prototype.release=function(){this.stop();this.h&&this.h.release()};sm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
478
- function tm(a,b){a.j(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.K)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.I||a.h.m(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.g.currentTime=e.start)}})};function V(){db.call(this);this.g=this.h=null;this.j=new im;this.i=navigator.language}ra(V,db);q=V.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.h&&this.h.release();this.h=new km(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
479
- q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.j=new im};q.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.D=Date.now()/1E3;b.l.requestAds(a)};
480
- q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new sm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
481
- q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('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="v3.1.4";c=this.g;var d=b;c.l?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
482
- (c.I=!0),c.l=new Xe,c.i.requestStream(a),c.H=d||"",c.K=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ra('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="v3.1.4";this.g.i.replaceAdTagParameters(a)};
476
+ this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.j(new N("ad-complete"));e.j(new N("ad-stopped"));e.B.removeAttribute("ad-active");e.o=null});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.j(new N("ad-skipped"));e.j(new N("ad-stopped"))});this.h.m(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new qm(h.start,h.end));e.j(new N("ad-cue-points-changed",
477
+ (new Map).set("cuepoints",f)))})}um.prototype.stop=function(){this.H="";this.A=null};um.prototype.release=function(){this.stop();this.h&&this.h.release()};um.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.i.onTimedMetadata(b)}};
478
+ function vm(a,b){a.j(new N("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.K)));var c=b.getStreamData().url;a.l.resolve(c);a.l=null;a.I||a.h.m(a.g,"seeked",function(){var d=a.g.currentTime;if(0!=d){a.i.streamTimeForContentTime(d);var e=a.i.previousCuePointForStreamTime(d);e&&!e.played&&(a.A=d,a.g.currentTime=e.start)}})};function V(){db.call(this);this.g=this.h=null;this.j=new km;this.i=navigator.language}ra(V,db);q=V.prototype;q.setLocale=function(a){this.i=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.h&&this.h.release();this.h=new mm(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
479
+ q.release=function(){this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null)};q.onAssetUnload=function(){this.h&&this.h.stop();this.g&&this.g.stop();this.dispatchEvent(new N("ad-stopped"));this.j=new km};q.requestClientSideAds=function(a){if(!this.h)throw new O(1,10,10001);var b=this.h;b.D=Date.now()/1E3;b.l.requestAds(a)};
480
+ q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new O(2,10,10002);this.g&&this.g.release();this.g=new um(a,b,this.i,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.j.h.push(d.loadTime);break;case "ad-started":c.j.g++;break;case "ad-complete":c.j.i++;break;case "ad-skipped":c.j.j++}c.dispatchEvent(d)})};
481
+ q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new O(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Ra('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="v3.1.5";c=this.g;var d=b;c.l?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
482
+ (c.I=!0),c.l=new Xe,c.i.requestStream(a),c.H=d||"",c.K=Date.now()/1E3,c=c.l);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Ra('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="v3.1.5";this.g.i.replaceAdTagParameters(a)};
483
483
  q.getStats=function(){var a=this.j;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.i.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.i.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};K("shaka.ads.AdManager",V);
484
484
  V.prototype.onCueMetadataChange=V.prototype.onCueMetadataChange;V.prototype.onHlsTimedMetadata=V.prototype.onHlsTimedMetadata;V.prototype.onDashTimedMetadata=V.prototype.onDashTimedMetadata;V.prototype.getStats=V.prototype.getStats;V.prototype.replaceServerSideAdTagParameters=V.prototype.replaceServerSideAdTagParameters;V.prototype.requestServerSideStream=V.prototype.requestServerSideStream;V.prototype.initServerSide=V.prototype.initServerSide;V.prototype.requestClientSideAds=V.prototype.requestClientSideAds;
485
- V.prototype.onAssetUnload=V.prototype.onAssetUnload;V.prototype.release=V.prototype.release;V.prototype.initClientSide=V.prototype.initClientSide;V.prototype.setLocale=V.prototype.setLocale;function om(a,b){this.start=a;this.end=void 0===b?null:b}V.ADS_LOADED="ads-loaded";V.AD_STARTED="ad-started";V.AD_FIRST_QUARTILE="ad-first-quartile";V.AD_MIDPOINT="ad-midpoint";V.AD_THIRD_QUARTILE="ad-third-quartile";V.AD_COMPLETE="ad-complete";V.AD_STOPPED="ad-stopped";V.AD_SKIPPED="ad-skipped";
485
+ V.prototype.onAssetUnload=V.prototype.onAssetUnload;V.prototype.release=V.prototype.release;V.prototype.initClientSide=V.prototype.initClientSide;V.prototype.setLocale=V.prototype.setLocale;function qm(a,b){this.start=a;this.end=void 0===b?null:b}V.ADS_LOADED="ads-loaded";V.AD_STARTED="ad-started";V.AD_FIRST_QUARTILE="ad-first-quartile";V.AD_MIDPOINT="ad-midpoint";V.AD_THIRD_QUARTILE="ad-third-quartile";V.AD_COMPLETE="ad-complete";V.AD_STOPPED="ad-stopped";V.AD_SKIPPED="ad-skipped";
486
486
  V.AD_VOLUME_CHANGED="ad-volume-changed";V.AD_MUTED="ad-muted";V.AD_PAUSED="ad-paused";V.AD_RESUMED="ad-resumed";V.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";V.CUEPOINTS_CHANGED="ad-cue-points-changed";V.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";V.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";V.AD_CLICKED="ad-clicked";V.AD_PROGRESS="ad-progress";V.AD_BUFFERING="ad-buffering";V.AD_IMPRESSION="ad-impression";V.AD_DURATION_CHANGED="ad-duration-changed";V.AD_CLOSED="ad-closed";
487
- V.AD_LOADED="ad-loaded";V.ALL_ADS_COMPLETED="all-ads-completed";V.AD_LINEAR_CHANGED="ad-linear-changed";V.AD_METADATA="ad-metadata";V.AD_RECOVERABLE_ERROR="ad-recoverable-error";V.AD_BREAK_READY="ad-break-ready";V.AD_INTERACTION="ad-interaction";xk=function(){return new V};function um(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof N){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
487
+ V.AD_LOADED="ad-loaded";V.ALL_ADS_COMPLETED="all-ads-completed";V.AD_LINEAR_CHANGED="ad-linear-changed";V.AD_METADATA="ad-metadata";V.AD_RECOVERABLE_ERROR="ad-recoverable-error";V.AD_BREAK_READY="ad-break-ready";V.AD_INTERACTION="ad-interaction";zk=function(){return new V};function wm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof N){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
488
488
  TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(Ve(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
489
- function vm(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=wm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
490
- function wm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
491
- var xm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),ym="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),zm=["loop","playbackRate"],Am=["pause","play"],Bm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,
492
- getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Cm={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Dm=[["getConfiguration","configure"]],Em=[["isTextTrackVisible","setTextTrackVisibility"]],Fm="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),
493
- Gm=["attach","detach","load","unload"];function Hm(a,b,c,d,e,f){var g=this;this.L=a;this.j=new P(b);this.ba=c;this.D=!1;this.B=d;this.K=e;this.R=f;this.h=this.o=!1;this.V="";this.A=null;this.H=function(){return Im(g)};this.I=function(h,k){var l=vm(k);switch(l.type){case "event":var m=l.targetName;l=Na(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.D&&(g.ba(),g.D=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new O(l.severity,l.category,
494
- l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;Jm.add(this)}q=Hm.prototype;q.destroy=function(){Jm["delete"](this);Km(this);Lm&&Mm(this);this.j&&(this.j.stop(),this.j=null);this.K=this.B=null;this.h=this.o=!1;this.I=this.H=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.sa=function(){return this.h};q.td=function(){return this.V};
495
- q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.o=!0;this.j.Ha();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Jm),d=c.next();!d.done;d=c.next())Nm(d.value,b)},function(b){for(var c=r(Jm),d=c.next();!d.done;d=c.next())d=d.value,Om="available"==b,d.j.Ha()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Om&&this.j.T(Pm);(a=Lm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Nm(this,
496
- a):Lm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Qm),window.__onGCastApiAvailable!=Qm&&Ra("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.qe=function(a){this.A=a;this.h&&Rm(this,{type:"appData",appData:this.A})};
497
- q.cast=function(a){var b=this;return H(function(c){if(!b.o)throw new O(1,8,8E3);if(!Om)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Xe;chrome.cast.requestSession(function(d){return Sm(b,a,d)},function(d){return Tm(b,d)});return v(c,b.l,0)})};function Um(a){if(a.h){var b=a.R();chrome.cast.requestSession(function(c){return Sm(a,b,c)},function(c){return Tm(a,c)})}}q.Zb=function(){if(this.h){Km(this);if(Lm){Mm(this);try{Lm.stop(function(){},function(){})}catch(a){}Lm=null}Im(this)}};
498
- q.get=function(a,b){var c=this;if("video"==a){if(Am.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.jf.apply(c,[a,b].concat(ha(e)))}}else if("player"==a){if(Cm[b]&&!this.get("player","isLive")())return function(){};if(Fm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.jf.apply(c,[a,b].concat(ha(e)))};if(Gm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Gg.apply(c,
499
- [a,b].concat(ha(e)))};if(Bm[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Rm(this,{type:"set",targetName:a,property:b,value:c})};function Sm(a,b,c){Lm=c;c.addUpdateListener(a.H);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.I);Im(a);Rm(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}
500
- function Tm(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 O(2,8,c,b))}q.jf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Rm(this,{type:"call",targetName:a,methodName:b,args:d})};q.Gg=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Xe;var f=this.O.toString();this.O++;this.i[f]=e;try{Rm(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
501
- function Nm(a,b){var c=a.R();a.l=new Xe;a.D=!0;Sm(a,c,b)}function Mm(a){var b=Lm;b.removeUpdateListener(a.H);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.I)}function Im(a){var b=Lm?"connected"==Lm.status:!1;if(a.h&&!b){a.K();for(var c in a.g)a.g[c]={};Km(a)}a.h=b;a.V=b?Lm.receiver.friendlyName:"";a.j.Ha()}function Km(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}
502
- function Rm(a,b){var c=um(b),d=Lm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ua)}catch(e){throw c=new O(2,8,8005,e),d=new N("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var Pm=.02,Om=!1,Lm=null,Jm=new Set;function Qm(a){if(a){a=r(Jm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Vm(a,b,c){db.call(this);var d=this;this.j=a;this.i=b;this.h=this.A=this.l=this.B=this.o=null;this.H=c;this.D=new Map;this.g=new Hm(c,function(){return Wm(d)},function(){return Xm(d)},function(e,f){return Ym(d,e,f)},function(){return Zm(d)},function(){return $m(d)});an(this)}ra(Vm,db);q=Vm.prototype;
503
- q.destroy=function(a){a&&this.g.Zb();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.o=this.j=null;return Promise.all(a)};q.yb=function(){return this.o};q.bc=function(){return this.B};q.He=function(){return this.g.o&&Om};q.sa=function(){return this.g.sa()};q.td=function(){return this.g.td()};
504
- q.cast=function(){var a=this,b;return H(function(c){return 1==c.g?(b=$m(a),v(c,a.g.cast(b),2)):a.i?v(c,a.i.Ee(),0):c["return"]()})};q.qe=function(a){this.g.qe(a)};q.uf=function(){Um(this.g)};q.Zb=function(){this.g.Zb()};
505
- q.Le=function(a){var b=this;return H(function(c){if(1==c.g){if(a==b.H)return c["return"]();b.H=a;b.g.Zb();return v(c,b.g.destroy(),2)}b.g=null;b.g=new Hm(a,function(){return Wm(b)},function(){return Xm(b)},function(d,e){return Ym(b,d,e)},function(){return Zm(b)},function(){return $m(b)});b.g.init();z(c)})};
506
- function an(a){a.g.init();a.h=new xf;for(var b=r(xm),c=b.next();!c.done;c=b.next())a.h.m(a.j,c.value,function(f){a.g.sa()||(f=Na(f),a.l.dispatchEvent(f))});for(var d in gm)a.h.m(a.i,gm[d],function(f){a.g.sa()||a.A.dispatchEvent(f)});a.o={};b={};for(var e in a.j)b.nc=e,Object.defineProperty(a.o,b.nc,{configurable:!1,enumerable:!0,get:function(f){return function(){return bn(a,f.nc)}}(b),set:function(f){return function(g){var h=f.nc;a.g.sa()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={nc:b.nc};a.B={};cn(a,
507
- function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return dn(a,f)}})});en(a);a.l=new db;a.l.Xc=a.o;a.A=new db;a.A.Xc=a.B}function en(a){var b=new Map;cn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.D.set(c,e):a.D.set(e,c)}else b.set(d,c)})}
508
- function cn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
509
- function $m(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.Pd(),startTime:null};a.j.pause();for(var c=r(zm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=r(Dm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=r(Em);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function Wm(a){var b=new N("caststatuschanged");a.dispatchEvent(b)}
510
- function Xm(a){var b=new N(a.o.paused?"pause":"play");a.l.dispatchEvent(b)}
511
- function Zm(a){for(var b=r(Dm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=r(zm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=r(zm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=r(Em);for(k=
512
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new N(cm,h);a.i.dispatchEvent(h)})}
513
- function bn(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.sa()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
514
- function dn(a,b){a.D.has(b)&&(b=a.D.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.o};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Bc()};if("getAdManager"==b)return function(){return a.i.fd()};if("setVideoContainer"==b)return function(c){return a.i.ze(c)};
515
- if(a.g.sa()){if("getManifest"==b||"drmInfo"==b)return function(){Ra(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ra(b+"() does not work while casting!");return Promise.resolve()}}return a.g.sa()&&0==Object.keys(a.g.g.video).length&&Bm[b]||!a.g.sa()?a.i[b].bind(a.i):a.g.get("player",b)}function Ym(a,b,c){a.g.sa()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}K("shaka.cast.CastProxy",Vm);Vm.prototype.changeReceiverId=Vm.prototype.Le;
516
- Vm.prototype.forceDisconnect=Vm.prototype.Zb;Vm.prototype.suggestDisconnect=Vm.prototype.uf;Vm.prototype.setAppData=Vm.prototype.qe;Vm.prototype.cast=Vm.prototype.cast;Vm.prototype.receiverName=Vm.prototype.td;Vm.prototype.isCasting=Vm.prototype.sa;Vm.prototype.canCast=Vm.prototype.He;Vm.prototype.getPlayer=Vm.prototype.bc;Vm.prototype.getVideo=Vm.prototype.yb;Vm.prototype.destroy=Vm.prototype.destroy;function fn(a,b,c,d){db.call(this);var e=this;this.g=a;this.i=b;this.h=new xf;this.O={video:a,player:b};this.I=c||function(){};this.R=d||function(f){return f};this.j=null;this.K=!1;this.A=!0;this.o=0;this.H=!1;this.D=!0;this.B=this.l=null;this.L=new P(function(){gn(e)});hn(this)}ra(fn,db);q=fn.prototype;q.isConnected=function(){return this.K};q.qg=function(){return this.A};q.Og=function(a){this.j=a};q.If=function(){this.j=null};
489
+ function xm(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=ym(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
490
+ function ym(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
491
+ var zm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Am="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Bm=["loop","playbackRate"],Cm=["pause","play"],Dm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,
492
+ getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Em={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Fm=[["getConfiguration","configure"]],Gm=[["isTextTrackVisible","setTextTrackVisibility"]],Hm="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),
493
+ Im=["attach","detach","load","unload"];function Jm(a,b,c,d,e,f){var g=this;this.L=a;this.j=new P(b);this.ba=c;this.D=!1;this.B=d;this.K=e;this.R=f;this.h=this.o=!1;this.V="";this.A=null;this.H=function(){return Km(g)};this.I=function(h,k){var l=xm(k);switch(l.type){case "event":var m=l.targetName;l=Na(l.event);g.B(m,l);break;case "update":m=l.update;for(var n in m){l=g.g[n]||{};for(var p in m[n])l[p]=m[n][p]}g.D&&(g.ba(),g.D=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.i[n],delete g.i[n],p)if(l){n=new O(l.severity,l.category,
494
+ l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.g={video:{},player:{}};this.O=0;this.i={};this.l=null;Lm.add(this)}q=Jm.prototype;q.destroy=function(){Lm["delete"](this);Mm(this);Nm&&Om(this);this.j&&(this.j.stop(),this.j=null);this.K=this.B=null;this.h=this.o=!1;this.I=this.H=this.l=this.i=this.g=this.A=null;return Promise.resolve()};q.sa=function(){return this.h};q.td=function(){return this.V};
495
+ q.init=function(){if(this.L.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.o=!0;this.j.Ha();var a=new chrome.cast.SessionRequest(this.L);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Lm),d=c.next();!d.done;d=c.next())Pm(d.value,b)},function(b){for(var c=r(Lm),d=c.next();!d.done;d=c.next())d=d.value,Qm="available"==b,d.j.Ha()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Qm&&this.j.T(Rm);(a=Nm)&&a.status!=chrome.cast.SessionStatus.STOPPED?Pm(this,
496
+ a):Nm=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=Sm),window.__onGCastApiAvailable!=Sm&&Ra("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};q.qe=function(a){this.A=a;this.h&&Tm(this,{type:"appData",appData:this.A})};
497
+ q.cast=function(a){var b=this;return H(function(c){if(!b.o)throw new O(1,8,8E3);if(!Qm)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new Xe;chrome.cast.requestSession(function(d){return Um(b,a,d)},function(d){return Vm(b,d)});return u(c,b.l,0)})};function Wm(a){if(a.h){var b=a.R();chrome.cast.requestSession(function(c){return Um(a,b,c)},function(c){return Vm(a,c)})}}q.Zb=function(){if(this.h){Mm(this);if(Nm){Om(this);try{Nm.stop(function(){},function(){})}catch(a){}Nm=null}Km(this)}};
498
+ q.get=function(a,b){var c=this;if("video"==a){if(Cm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.jf.apply(c,[a,b].concat(ha(e)))}}else if("player"==a){if(Em[b]&&!this.get("player","isLive")())return function(){};if(Hm.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.jf.apply(c,[a,b].concat(ha(e)))};if(Im.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.Gg.apply(c,
499
+ [a,b].concat(ha(e)))};if(Dm[b])return function(){return c.g[a][b]}}return this.g[a][b]};q.set=function(a,b,c){this.g[a][b]=c;Tm(this,{type:"set",targetName:a,property:b,value:c})};function Um(a,b,c){Nm=c;c.addUpdateListener(a.H);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.I);Km(a);Tm(a,{type:"init",initState:b,appData:a.A});a.l.resolve()}
500
+ function Vm(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 O(2,8,c,b))}q.jf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Tm(this,{type:"call",targetName:a,methodName:b,args:d})};q.Gg=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Xe;var f=this.O.toString();this.O++;this.i[f]=e;try{Tm(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
501
+ function Pm(a,b){var c=a.R();a.l=new Xe;a.D=!0;Um(a,c,b)}function Om(a){var b=Nm;b.removeUpdateListener(a.H);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.I)}function Km(a){var b=Nm?"connected"==Nm.status:!1;if(a.h&&!b){a.K();for(var c in a.g)a.g[c]={};Mm(a)}a.h=b;a.V=b?Nm.receiver.friendlyName:"";a.j.Ha()}function Mm(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}
502
+ function Tm(a,b){var c=wm(b),d=Nm;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ua)}catch(e){throw c=new O(2,8,8005,e),d=new N("error",(new Map).set("detail",c)),a.B("player",d),a.Zb(),c;}}var Rm=.02,Qm=!1,Nm=null,Lm=new Set;function Sm(a){if(a){a=r(Lm);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function Xm(a,b,c){db.call(this);var d=this;this.j=a;this.i=b;this.h=this.A=this.l=this.B=this.o=null;this.H=c;this.D=new Map;this.g=new Jm(c,function(){return Ym(d)},function(){return Zm(d)},function(e,f){return $m(d,e,f)},function(){return an(d)},function(){return bn(d)});cn(this)}ra(Xm,db);q=Xm.prototype;
503
+ q.destroy=function(a){a&&this.g.Zb();this.h&&(this.h.release(),this.h=null);a=[];this.i&&(a.push(this.i.destroy()),this.i=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.B=this.o=this.j=null;return Promise.all(a)};q.yb=function(){return this.o};q.bc=function(){return this.B};q.He=function(){return this.g.o&&Qm};q.sa=function(){return this.g.sa()};q.td=function(){return this.g.td()};
504
+ q.cast=function(){var a=this,b;return H(function(c){return 1==c.g?(b=bn(a),u(c,a.g.cast(b),2)):a.i?u(c,a.i.Ee(),0):c["return"]()})};q.qe=function(a){this.g.qe(a)};q.uf=function(){Wm(this.g)};q.Zb=function(){this.g.Zb()};
505
+ q.Le=function(a){var b=this;return H(function(c){if(1==c.g){if(a==b.H)return c["return"]();b.H=a;b.g.Zb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new Jm(a,function(){return Ym(b)},function(){return Zm(b)},function(d,e){return $m(b,d,e)},function(){return an(b)},function(){return bn(b)});b.g.init();z(c)})};
506
+ function cn(a){a.g.init();a.h=new xf;for(var b=r(zm),c=b.next();!c.done;c=b.next())a.h.m(a.j,c.value,function(f){a.g.sa()||(f=Na(f),a.l.dispatchEvent(f))});for(var d in im)a.h.m(a.i,im[d],function(f){a.g.sa()||a.A.dispatchEvent(f)});a.o={};b={};for(var e in a.j)b.nc=e,Object.defineProperty(a.o,b.nc,{configurable:!1,enumerable:!0,get:function(f){return function(){return dn(a,f.nc)}}(b),set:function(f){return function(g){var h=f.nc;a.g.sa()?a.g.set("video",h,g):a.j[h]=g}}(b)}),b={nc:b.nc};a.B={};en(a,
507
+ function(f){Object.defineProperty(a.B,f,{configurable:!1,enumerable:!0,get:function(){return fn(a,f)}})});gn(a);a.l=new db;a.l.Xc=a.o;a.A=new db;a.A.Xc=a.B}function gn(a){var b=new Map;en(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.D.set(c,e):a.D.set(e,c)}else b.set(d,c)})}
508
+ function en(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.i,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
509
+ function bn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.i.Pd(),startTime:null};a.j.pause();for(var c=r(Bm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.j[d];a.j.ended||(b.startTime=a.j.currentTime);c=r(Fm);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.i[e[0]]();b.player[d]=e}c=r(Gm);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.i[e[0]](),b.playerAfterLoad[d]=e;return b}function Ym(a){var b=new N("caststatuschanged");a.dispatchEvent(b)}
510
+ function Zm(a){var b=new N(a.o.paused?"pause":"play");a.l.dispatchEvent(b)}
511
+ function an(a){for(var b=r(Fm),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.i[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.j.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.j.autoplay=!1,b=a.i.load(e,d));var g={};c=r(Bm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.j){for(var h=r(Bm),k=h.next();!k.done;k=h.next())k=k.value,a.j[k]=g[k];h=r(Gm);for(k=
512
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.i[k](l)}a.j.autoplay=f;e&&a.j.play()}},function(h){h=(new Map).set("detail",h);h=new N(em,h);a.i.dispatchEvent(h)})}
513
+ function dn(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.sa()&&0==Object.keys(a.g.g.video).length){var c=a.j[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(c=a.j[b],"function"==typeof c&&(c=c.bind(a.j)),c)}
514
+ function fn(a,b){a.D.has(b)&&(b=a.D.get(b));if("addEventListener"==b)return function(c,d,e){return a.A.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.A.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.o};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.i.Bc()};if("getAdManager"==b)return function(){return a.i.fd()};if("setVideoContainer"==b)return function(c){return a.i.ze(c)};
515
+ if(a.g.sa()){if("getManifest"==b||"drmInfo"==b)return function(){Ra(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Ra(b+"() does not work while casting!");return Promise.resolve()}}return a.g.sa()&&0==Object.keys(a.g.g.video).length&&Dm[b]||!a.g.sa()?a.i[b].bind(a.i):a.g.get("player",b)}function $m(a,b,c){a.g.sa()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.A.dispatchEvent(c))}K("shaka.cast.CastProxy",Xm);Xm.prototype.changeReceiverId=Xm.prototype.Le;
516
+ Xm.prototype.forceDisconnect=Xm.prototype.Zb;Xm.prototype.suggestDisconnect=Xm.prototype.uf;Xm.prototype.setAppData=Xm.prototype.qe;Xm.prototype.cast=Xm.prototype.cast;Xm.prototype.receiverName=Xm.prototype.td;Xm.prototype.isCasting=Xm.prototype.sa;Xm.prototype.canCast=Xm.prototype.He;Xm.prototype.getPlayer=Xm.prototype.bc;Xm.prototype.getVideo=Xm.prototype.yb;Xm.prototype.destroy=Xm.prototype.destroy;function hn(a,b,c,d){db.call(this);var e=this;this.g=a;this.i=b;this.h=new xf;this.O={video:a,player:b};this.I=c||function(){};this.R=d||function(f){return f};this.j=null;this.K=!1;this.A=!0;this.o=0;this.H=!1;this.D=!0;this.B=this.l=null;this.L=new P(function(){jn(e)});kn(this)}ra(hn,db);q=hn.prototype;q.isConnected=function(){return this.K};q.qg=function(){return this.A};q.Og=function(a){this.j=a};q.If=function(){this.j=null};
517
517
  q.Pg=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.title=a};q.Ng=function(a){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC});this.j.images=[{url:a}]};q.Mg=function(a){this.j||(this.j={});this.j.artist=a;this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
518
- q.destroy=function(){var a=this,b,c;return H(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.I=null,a.K=!1,a.A=!0,a.l=null,a.B=null,v(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
519
- function hn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return jn(a)};b.onSenderDisconnected=function(){return jn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&kn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);kn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return ln(a,
520
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return mn(a,e)};b.start();b=r(xm);for(var c=b.next();!c.done;c=b.next())a.h.m(a.g,c.value,function(e){return nn(a,"video",e)});for(var d in gm)a.h.m(a.i,gm[d],function(e){return nn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.ue(3840,2160):a.i.ue(1920,1080);a.h.m(a.g,"loadeddata",function(){a.H=!0});a.h.m(a.i,"loading",function(){a.A=
521
- !1;on(a)});a.h.m(a.g,"playing",function(){a.A=!1;on(a)});a.h.m(a.g,"pause",function(){on(a)});a.h.m(a.i,"unloading",function(){a.A=!0;on(a)});a.h.m(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.A=!0,on(a))})).T(pn)})}function jn(a){a.o=0;a.D=!0;a.K=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;on(a)}
522
- function on(a){var b;H(function(c){if(1==c.g)return v(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new N("caststatuschanged");a.dispatchEvent(b);qn(a)||rn(a);z(c)})}
523
- function sn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;H(function(u){switch(u.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.I(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(u,5),v(u,a.i.load(b.manifest,b.startTime),7)):v(u,Promise.resolve(),3);case 7:wa(u,3);break;case 5:return g=F(u),h=cm,k=(new Map).set("detail",g),l=new N(h,k),a.i&&a.i.dispatchEvent(l),u["return"]();case 3:if(!a.i)return u["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
524
- a.i[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),rn(a));z(u)}})}function nn(a,b,c){a.i&&(gn(a),kn(a,{type:"event",targetName:b,event:c},a.l))}
525
- function gn(a){a.L.T(tn);for(var b={video:{},player:{}},c=r(ym),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Z())for(var e in Cm)0==a.o%Cm[e]&&(b.player[e]=a.i[e]());for(var f in Bm)0==a.o%Bm[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.H&&(a.o+=1);kn(a,{type:"update",update:b},a.l);qn(a)}function qn(a){return a.D&&(a.g.duration||a.i.Z())?(un(a),a.D=!1,!0):!1}
526
- function un(a,b){var c={contentId:a.i.Pd(),streamType:a.i.Z()?"LIVE":"BUFFERED",contentType:""};a.i.Z()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);rn(a,void 0===b?0:b,c)}
527
- function mn(a,b){var c=vm(b.data);switch(c.type){case "init":a.o=0;a.H=!1;a.D=!0;sn(a,c.initState,c.appData);gn(a);break;case "appData":a.I(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
528
- c.methodName;"player"==d&&"load"==e&&(a.o=0,a.H=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return vn(a,h,g,null)},function(k){return vn(a,h,g,k)})}}
529
- function ln(a,b){var c=vm(b.data);switch(c.type){case "PLAY":a.g.play();rn(a);break;case "PAUSE":a.g.pause();rn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),rn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),rn(a));break;case "STOP":a.i.Ee().then(function(){a.i&&rn(a)});break;case "GET_STATUS":un(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
530
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||rn(a);break;case "LOAD":a.o=0;a.H=!1;a.D=!1;d=c.media;e=c.currentTime;f=a.R(d.contentId);g=c.autoplay||!0;a.I(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&un(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");kn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:kn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
531
- function vn(a,b,c,d){a.i&&kn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function kn(a,b,c,d){a.K&&(a=um(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function rn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?wn:a.i.Ic()?xn:a.g.paused?yn:zn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);kn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
532
- K("shaka.cast.CastReceiver",fn);fn.prototype.destroy=fn.prototype.destroy;fn.prototype.setContentArtist=fn.prototype.Mg;fn.prototype.setContentImage=fn.prototype.Ng;fn.prototype.setContentTitle=fn.prototype.Pg;fn.prototype.clearContentMetadata=fn.prototype.If;fn.prototype.setContentMetadata=fn.prototype.Og;fn.prototype.isIdle=fn.prototype.qg;fn.prototype.isConnected=fn.prototype.isConnected;var tn=.5,pn=5,wn="IDLE",zn="PLAYING",xn="BUFFERING",yn="PAUSED";function An(a){var b=this;this.g=[];this.h=[];this.data=[];(new Cc).box("moov",Gc).Y("pssh",function(c){if(!(1<c.version)){var d=nc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(bd(c.reader.zb(16)));if(0<c.version){d=c.reader.S();d=r(kb(d));for(var e=d.next();!e.done;e=d.next())e=bd(c.reader.zb(16)),b.h.push(e)}}}).parse(a)}
533
- function Bn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=qc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function Cn(a){if(!a)return a;var b=new An(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Rc:c.Rc},d=b.next())c.Rc=d.value,a.some(function(e){return function(f){return lc(f,e.Rc)}}(c))||a.push(c.Rc);return cd.apply(Xc,ha(a))};function Dn(a,b){var c=En(a,b);return 1!=c.length?null:c[0]}function Fn(a,b,c){a=Gn(a,b,c);return 1!=a.length?null:a[0]}function En(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Hn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function Gn(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
534
- function In(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Jn(a){return Array.from(a.childNodes).every(Kn)?a.textContent.trim():null}function Kn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Ln(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 Mn(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:Math.floor(a/1E3)}
535
- function Nn(a){if(!a)return null;a=/^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}function On(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}
536
- function Pn(a){a=Number(a);return 0===a%1?a:null}function Qn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Rn(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Sn(a){a=Number(a);return isNaN(a)?null:a}function Tn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
537
- function Un(a,b){var c=new DOMParser,d=null,e=null;try{e=c.parseFromString(a,"text/xml")}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d}function Vn(a,b){try{var c=tc(a);return Un(c,b)}catch(d){return null}};function Wn(a,b,c){var d=Xn(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 O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.mf?(e=h.init||e,!1):!0}),f.length&&(a=Yn(e,f,c),0==a.length&&(a=[Nb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Nb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
538
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Oe:g,ii:e,drmInfos:a,Se:!0}}function Zn(a,b,c,d){var e=Wn(a,c,d);if(b.Se){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.Se=!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 O(2,4,4008);return e.Oe||b.Oe}
539
- function $n(a){var b=0,c=qc(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=nc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
540
- function ao(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function bo(a){a=Fn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=$c(a.textContent);a=$n(a).filter(function(b){return b.type===co})[0];if(!a)return"";a=uc(a.value,!0);return(a=Un(a,"WRMHEADER"))?ao(a):""}
541
- function Yn(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.mf];if(f){var g;if(g=Fn(e.node,"urn:microsoft:playready","pro")){g=$c(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Bn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Nb(f,e.init||a||g);if(f=eo.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
542
- function Xn(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=fo(c.value))&&b.push(c);return b}
543
- function fo(a){var b=a.getAttribute("schemeIdUri"),c=In(a,"urn:mpeg:cenc:2013","default_KID"),d=Gn(a,"urn:mpeg:cenc:2013","pssh").map(Jn);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:$c(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,mf:b,keyId:c,init:0<e.length?e:null}}
544
- var co=1,eo=(new Map).set("com.widevine.alpha",function(a){return(a=Fn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",bo).set("com.microsoft.playready.recommendation",bo).set("com.microsoft.playready.software",bo).set("com.microsoft.playready.hardware",bo);function go(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=
518
+ q.destroy=function(){var a=this,b,c;return H(function(d){if(1==d.g)return a.h&&(a.h.release(),a.h=null),b=[],a.i&&(b.push(a.i.destroy()),a.i=null),a.L&&(a.L.stop(),a.L=null),a.g=null,a.O=null,a.I=null,a.K=!1,a.A=!0,a.l=null,a.B=null,u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
519
+ function kn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return ln(a)};b.onSenderDisconnected=function(){return ln(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&mn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);mn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.B=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.B.onMessage=function(e){return nn(a,
520
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return on(a,e)};b.start();b=r(zm);for(var c=b.next();!c.done;c=b.next())a.h.m(a.g,c.value,function(e){return pn(a,"video",e)});for(var d in im)a.h.m(a.i,im[d],function(e){return pn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.i.ue(3840,2160):a.i.ue(1920,1080);a.h.m(a.g,"loadeddata",function(){a.H=!0});a.h.m(a.i,"loading",function(){a.A=
521
+ !1;qn(a)});a.h.m(a.g,"playing",function(){a.A=!1;qn(a)});a.h.m(a.g,"pause",function(){qn(a)});a.h.m(a.i,"unloading",function(){a.A=!0;qn(a)});a.h.m(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.A=!0,qn(a))})).T(rn)})}function ln(a){a.o=0;a.D=!0;a.K=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;qn(a)}
522
+ function qn(a){var b;H(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.i)return c["return"]();b=new N("caststatuschanged");a.dispatchEvent(b);sn(a)||tn(a);z(c)})}
523
+ function un(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;H(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.i[d](e);a.I(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,A(v,5),u(v,a.i.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:wa(v,3);break;case 5:return g=F(v),h=em,k=(new Map).set("detail",g),l=new N(h,k),a.i&&a.i.dispatchEvent(l),v["return"]();case 3:if(!a.i)return v["return"]();for(m in b.video)n=b.video[m],a.g[m]=n;for(p in b.playerAfterLoad)t=b.playerAfterLoad[p],
524
+ a.i[p](t);a.g.autoplay=f;b.manifest&&(a.g.play(),tn(a));z(v)}})}function pn(a,b,c){a.i&&(jn(a),mn(a,{type:"event",targetName:b,event:c},a.l))}
525
+ function jn(a){a.L.T(vn);for(var b={video:{},player:{}},c=r(Am),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.i.Z())for(var e in Em)0==a.o%Em[e]&&(b.player[e]=a.i[e]());for(var f in Dm)0==a.o%Dm[f]&&(b.player[f]=a.i[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.H&&(a.o+=1);mn(a,{type:"update",update:b},a.l);sn(a)}function sn(a){return a.D&&(a.g.duration||a.i.Z())?(wn(a),a.D=!1,!0):!1}
526
+ function wn(a,b){var c={contentId:a.i.Pd(),streamType:a.i.Z()?"LIVE":"BUFFERED",contentType:""};a.i.Z()||(c.duration=a.g.duration);a.j&&(c.metadata=a.j);tn(a,void 0===b?0:b,c)}
527
+ function on(a,b){var c=xm(b.data);switch(c.type){case "init":a.o=0;a.H=!1;a.D=!0;un(a,c.initState,c.appData);jn(a);break;case "appData":a.I(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.O[d][e]=c;break;case "call":d=a.O[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
528
+ c.methodName;"player"==d&&"load"==e&&(a.o=0,a.H=!1);var g=c.id,h=b.senderId;f=a.O[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.D=!0}));c.then(function(){return xn(a,h,g,null)},function(k){return xn(a,h,g,k)})}}
529
+ function nn(a,b){var c=xm(b.data);switch(c.type){case "PLAY":a.g.play();tn(a);break;case "PAUSE":a.g.pause();tn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),tn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),tn(a));break;case "STOP":a.i.Ee().then(function(){a.i&&tn(a)});break;case "GET_STATUS":wn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
530
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||tn(a);break;case "LOAD":a.o=0;a.H=!1;a.D=!1;d=c.media;e=c.currentTime;f=a.R(d.contentId);g=c.autoplay||!0;a.I(d.customData);g&&(a.g.autoplay=!0);a.i.load(f,e).then(function(){a.i&&wn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");mn(a,{requestId:Number(c.requestId),type:k},a.B)});break;default:mn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.B)}}
531
+ function xn(a,b,c,d){a.i&&mn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function mn(a,b,c,d){a.K&&(a=wm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function tn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.A?yn:a.i.Ic()?zn:a.g.paused?An:Bn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);mn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.B)}
532
+ K("shaka.cast.CastReceiver",hn);hn.prototype.destroy=hn.prototype.destroy;hn.prototype.setContentArtist=hn.prototype.Mg;hn.prototype.setContentImage=hn.prototype.Ng;hn.prototype.setContentTitle=hn.prototype.Pg;hn.prototype.clearContentMetadata=hn.prototype.If;hn.prototype.setContentMetadata=hn.prototype.Og;hn.prototype.isIdle=hn.prototype.qg;hn.prototype.isConnected=hn.prototype.isConnected;var vn=.5,rn=5,yn="IDLE",Bn="PLAYING",zn="BUFFERING",An="PAUSED";function Cn(a){var b=this;this.g=[];this.h=[];this.data=[];(new Cc).box("moov",Gc).Y("pssh",function(c){if(!(1<c.version)){var d=nc(c.reader.W,-12,c.size);b.data.push(d);b.g.push(bd(c.reader.zb(16)));if(0<c.version){d=c.reader.S();d=r(lb(d));for(var e=d.next();!e.done;e=d.next())e=bd(c.reader.zb(16)),b.h.push(e)}}}).parse(a)}
533
+ function Dn(a,b){var c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=qc(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}function En(a){if(!a)return a;var b=new Cn(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Rc:c.Rc},d=b.next())c.Rc=d.value,a.some(function(e){return function(f){return lc(f,e.Rc)}}(c))||a.push(c.Rc);return cd.apply(Xc,ha(a))};function Fn(a,b){var c=Gn(a,b);return 1!=c.length?null:c[0]}function Hn(a,b,c){a=In(a,b,c);return 1!=a.length?null:a[0]}function Gn(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Jn(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function In(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
534
+ function Kn(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Ln(a,b,c){b=r(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Mn(a){return Array.from(a.childNodes).every(Nn)?a.textContent.trim():null}function Nn(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function On(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}
535
+ function Pn(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:Math.floor(a/1E3)}function Qn(a){if(!a)return null;a=/^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}
536
+ function Rn(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 Sn(a){a=Number(a);return 0===a%1?a:null}function Tn(a){a=Number(a);return 0===a%1&&0<a?a:null}function Un(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Vn(a){a=Number(a);return isNaN(a)?null:a}function Wn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
537
+ function Xn(a,b){var c=new DOMParser,d=null,e=null;try{e=c.parseFromString(a,"text/xml")}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d}function Yn(a,b){try{var c=tc(a);return Xn(c,b)}catch(d){return null}};function Zn(a,b,c){var d=$n(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 O(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.mf?(e=h.init||e,!1):!0}),f.length&&(a=ao(e,f,c),0==a.length&&(a=[Nb("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Nb(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
538
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Oe:g,ii:e,drmInfos:a,Se:!0}}function bo(a,b,c,d){var e=Zn(a,c,d);if(b.Se){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.Se=!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 O(2,4,4008);return e.Oe||b.Oe}
539
+ function co(a){var b=0,c=qc(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=nc(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
540
+ function eo(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function fo(a){a=Hn(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=$c(a.textContent);a=co(a).filter(function(b){return b.type===go})[0];if(!a)return"";a=uc(a.value,!0);return(a=Xn(a,"WRMHEADER"))?eo(a):""}
541
+ function ao(a,b,c){var d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=c[e.mf];if(f){var g;if(g=Hn(e.node,"urn:microsoft:playready","pro")){g=$c(g.textContent);var h=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);g=[{initData:Dn(g,h),initDataType:"cenc",keyId:e.keyId}]}else g=null;g=Nb(f,e.init||a||g);if(f=ho.get(f))g.licenseServerUri=f(e);d.push(g)}}return d}
542
+ function $n(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=io(c.value))&&b.push(c);return b}
543
+ function io(a){var b=a.getAttribute("schemeIdUri"),c=Kn(a,"urn:mpeg:cenc:2013","default_KID"),d=In(a,"urn:mpeg:cenc:2013","pssh").map(Mn);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new O(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:$c(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,mf:b,keyId:c,init:0<e.length?e:null}}
544
+ var go=1,ho=(new Map).set("com.widevine.alpha",function(a){return(a=Hn(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",fo).set("com.microsoft.playready.recommendation",fo).set("com.microsoft.playready.software",fo).set("com.microsoft.playready.hardware",fo);function jo(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=
545
545
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
546
- function ho(a,b){var c=io(a,b,"timescale"),d=1;c&&(d=Qn(c)||1);var e=io(a,b,"duration");c=Qn(e||"");"image"==a.N.contentType&&(c=Sn(e||""));c&&(c/=d);var f=io(a,b,"startNumber");e=Number(io(a,b,"presentationTimeOffset"))||0;var g=Rn(f||"");if(null==f||null==g)g=1;var h=jo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.$.duration||Infinity,l=En(h,"S");h=[];var m=-e;l=r(nb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,t=n.next,u=Ln(p,"t",Rn);n=Ln(p,"d",Rn);var x=Ln(p,"r",Pn);null!=
547
- u&&(u-=e);if(!n)break;p=null!=u?u:m;u=x||0;if(0>u)if(t){t=Ln(t,"t",Rn);if(null==t)break;else if(p>=t)break;u=Math.ceil((t-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;u=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);t=r(kb(u+1));for(u=t.next();!u.done;u=t.next())m=p+n,h.push({start:p/f,end:m/f,Vg:p}),p=m}f=h}return{timescale:d,Ba:c,mc:g,qb:e/d||0,Fe:e,timeline:f}}
548
- function io(a,b,c){return[b(a.N),b(a.Da),b(a.ya)].filter(Kb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function jo(a,b,c){return[b(a.N),b(a.Da),b(a.ya)].filter(Kb).map(function(d){return Dn(d,c)}).reduce(function(d,e){return d||e})}
549
- function ko(a,b,c,d,e,f){for(var g=In(a,"http://www.w3.org/1999/xlink","href"),h=In(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Yg(new O(2,4,4028));if("onLoad"!=h)return Yg(new O(2,4,4027));var m=Mb([d],[g]);return e.request(0,lh(m,b)).ra(function(n){n=Vn(n.data,a.tagName);if(!n)return Yg(new O(2,4,4001,g));
550
- 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=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return lo(a,b,c,m[0],e,f+1)})}
551
- function lo(a,b,c,d,e,f){f=void 0===f?0:f;if(In(a,"http://www.w3.org/1999/xlink","href")){var g=ko(a,b,c,d,e,f);c&&(g=g.ra(void 0,function(){return lo(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==In(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(lo(k,b,c,d,e,f)));return bh(g).ra(function(){return a})};function mo(a,b,c,d,e,f,g){var h,k=(new Cc).Y("sidx",function(l){h=no(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
552
- function no(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.S();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.S();var m=g.reader.S()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;n=r(kb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.S();m=(p&2147483648)>>>31;p&=2147483647;var t=g.reader.S();g.reader.skip(4);if(1==m)throw new O(2,3,3006);h.push(new wi(l/k+c,(l+t)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=t;a+=p}g.parser.stop();
553
- return h};function oo(a){this.h=qc(a);this.g=new zc(this.h,0)}oo.prototype.Ga=function(){return this.g.Ga()};
554
- function po(a){var b=qo(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=qo(a);a:{d=r(ro);for(var e=d.next();!e.done;e=d.next())if(lc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ma();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);d=0;e=r(nb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.xa?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.ma()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ma();d=qc(a.h,
555
- a.g.ma(),b);a.g.skip(b);return new so(c,d)}function qo(a){var b=a.g.ma(),c=a.g.na();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return nc(a.h,b,c)}var ro=[[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 so(a,b){this.id=a;this.g=b}
556
- function to(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=r(kb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function uo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new oo(a.g);for(var n=null,p=null;a.Ga();){var t=po(a);if(187==t.id){var u=vo(t);u&&(t=c*u.Wg,u=b+u.Fg,null!=n&&m.push(new wi(n+g,t+g,l,p,u-1,f,g,h,k)),n=t,p=u)}}null!=n&&m.push(new wi(n+g,d+g,l,p,null,f,g,h,k));return m}
557
- function vo(a){var b=new oo(a.g);a=po(b);if(179!=a.id)throw new O(2,3,3013);a=to(a);b=po(b);if(183!=b.id)throw new O(2,3,3012);b=new oo(b.g);for(var c=0;b.Ga();){var d=po(b);if(241==d.id){c=to(d);break}}return{Wg:a,Fg:c}};function wo(a,b){var c=jo(a,b,"Initialization");if(!c)return null;var d=a.N.Sa,e=c.getAttribute("sourceURL");e&&(d=Mb(a.N.Sa,[e]));e=0;var f=null;if(c=Ln(c,"range",On))e=c.start,f=c.end;return new ri(function(){return d},e,f)}
558
- function xo(a,b){var c=Number(io(a,yo,"presentationTimeOffset"))||0,d=io(a,yo,"timescale"),e=1;d&&(e=Qn(d)||1);var f=c/e||0,g=wo(a,yo);zo(a,g);var h=eh(a);return{$b:function(){var k=jo(h,yo,"RepresentationIndex"),l=h.N.Sa;k&&(k=k.getAttribute("sourceURL"))&&(l=Mb(h.N.Sa,[k]));k=Ao(h);return Bo(h,b,g,l,k.start,k.end,f)}}}
559
- function Bo(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,u,x,w,y,C,D,B,E;return H(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Eb||!a.$.$e,l=a.$.start,m=a.$.duration,n=a.N.mimeType.split("/")[1],p=b,t=null,u=[p(d,e,f),"webm"==n?p(c.Fa(),c.Ca,c.wa):null],p=null,v(G,Promise.all(u),2);x=G.h;w=x[0];y=x[1]||null;C=null;D=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var I=mo(w,e,d,c,D,B,E);else{I=new oo(y);if(440786851!=po(I).id)throw new O(2,3,3008);var L=po(I);if(408125543!=L.id)throw new O(2,3,3009);I=L.g.byteOffset;
560
- L=new oo(L.g);for(var J=null;L.Ga();){var M=po(L);if(357149030==M.id){J=M;break}}if(!J)throw new O(2,3,3010);J=new oo(J.g);M=1E6;for(L=null;J.Ga();){var R=po(J);if(2807729==R.id)M=to(R);else if(17545==R.id)if(4==R.g.byteLength)L=R.g.getFloat32(0);else if(8==R.g.byteLength)L=R.g.getFloat64(0);else throw new O(2,3,3003);}if(null==L)throw new O(2,3,3011);J=M/1E9;L*=J;M=po(new oo(w));if(475249515!=M.id)throw new O(2,3,3007);I=uo(M,I,J,L,d,c,D,B,E)}C=I;h.hc(C);t=new Ti(C);k&&t.wb(B,E,!0);return G["return"](t)})}
561
- function yo(a){return a.Nc}function Ao(a){var b=jo(a,yo,"RepresentationIndex");a=io(a,yo,"indexRange");a=On(a||"");b&&(a=Ln(b,"range",On,a));return a}function zo(a,b){Co(a,b);if(!Ao(a))throw new O(2,4,4002);}function Co(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Rb&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);};function Do(a,b){var c=wo(a,Mo),d=No(a);if(!d.Ba&&!d.timeline&&1<d.dc.length)throw new O(2,4,4002);if(!d.Ba&&!a.$.duration&&!d.timeline&&1==d.dc.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.ya.id&&a.N.id&&(f=a.ya.id+","+a.N.id,e=b[f]);c=Oo(a.$.start,a.$.duration,a.N.Sa,d,c);d=!e;e?e.ec(c,a.presentationTimeline.xb()):(e=new Ti(c),f&&a.Eb&&(b[f]=e));a.presentationTimeline.hc(c);a.Eb&&a.$.$e||e.wb(a.$.start,a.$.duration?a.$.start+a.$.duration:
562
- Infinity,d);return{$b:function(){return Promise.resolve(e)}}}function Mo(a){return a.Ab}function No(a){var b=Po(a);a=ho(a,Mo);var c=a.mc;0==c&&(c=1);var d=0;a.Ba?d=a.Ba*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ba:a.Ba,startTime:d,mc:c,qb:a.qb,timeline:a.timeline,dc:b}}
563
- function Oo(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(kb(f));for(var n=f.next();!n.done;m={Gd:m.Gd},n=f.next()){n=n.value;var p=d.dc[n];m.Gd=Mb(c,[p.wg]);var t=void 0;t=null!=d.Ba?l+d.Ba:d.timeline?d.timeline[n].end:l+b;k.push(new wi(a+l,a+t,function(u){return function(){return u.Gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
564
- function Po(a){return[a.N.Ab,a.Da.Ab,a.ya.Ab].filter(Kb).map(function(b){return En(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Xe&&(a.Xe=!0);var c=b.getAttribute("media");b=Ln(b,"mediaRange",On,{start:0,end:null});return{wg:c,start:b.start,end:b.end}})};function Qo(a,b,c,d,e,f){var g=Ro(a),h=So(a);To(h);var k=eh(a);if(h.Hc)return Co(a,g),{$b:function(){var u=go(h.Hc,k.N.id,null,k.bandwidth||null,null);u=Mb(k.N.Sa,[u]);return Bo(k,b,g,u,0,null,h.qb)}};if(h.Ba)return d||(a.presentationTimeline.ae(h.Ba),a.presentationTimeline.be(a.$.start)),{$b:function(){return Uo(k,h,e,g,f)}};var l=null;d=null;a.ya.id&&a.N.id&&(d=a.ya.id+","+a.N.id,l=c[d]);var m=Vo(k,h,g),n=a.$.start,p=a.$.duration?a.$.start+a.$.duration:Infinity,t=Infinity!=p;l?(t&&(new Ti(m)).wb(n,
565
- p,!0),l.ec(m,a.presentationTimeline.xb())):(l=new Ti(m),d&&a.Eb&&(c[d]=l));a.presentationTimeline.hc(m);t&&l.wb(n,p);return{$b:function(){return Promise.resolve(l)}}}function Wo(a){return a.Oc}function So(a){var b=ho(a,Wo),c=io(a,Wo,"media");a=io(a,Wo,"index");return{Ba:b.Ba,timescale:b.timescale,mc:b.mc,qb:b.qb,Fe:b.Fe,timeline:b.timeline,Zd:c,Hc:a}}
566
- function To(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.Ba?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.Ba=null);if(!a.Hc&&!a.Zd)throw new O(2,4,4002);}
567
- function Uo(a,b,c,d,e){function f(J){var M=(J-t)*p,R=M+b.qb,U=M+l;M=U+p;var Z=Math.min(M,h());U=new wi(U,Z,function(){var ia=go(x,y,J,w,R*u);return Mb(C,[ia])},0,null,d,D,l,h());U.j=M;return U}function g(){var J=[Math.max(k.xb(),l),Math.min(k.Hb(),h())].map(function(M){return M-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(M){return M+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.$.start,m=a.ya.id,n=a.$.duration,p=b.Ba,t=b.mc,u=b.timescale,
568
- x=b.Zd,w=a.bandwidth||null,y=a.N.id,C=a.N.Sa,D=l-b.qb,B=g();a=a.Eb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var I=new Ti(c);c=k.Hb()<h();E=k.Z();if(c||E){var L=Math.max(a,B+1);I.xd(p,function(){var J=k.xb();I.Fb(J);var M=r(g());M.next();M=M.next().value;for(var R=[];L<=M;){var U=f(L);R.push(U);L++}return J>h()&&!R.length?null:R})}return Promise.resolve(I)}
569
- function Vo(a,b,c){var d=a.$.start,e=a.$.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=r(nb(b.timeline)),l=k.next();!l.done;h={Fd:h.Fd,Id:h.Id,Ld:h.Ld,Cd:h.Cd,Nd:h.Nd,Dd:h.Dd},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Vg;m=m.end;h.Ld=l.xa+b.mc;h.Nd=p+b.Fe;h.Id=a.N.id;h.Cd=a.bandwidth||null;h.Fd=b.Zd;h.Dd=a.N.Sa;g.push(new wi(d+n,d+m,function(t){return function(){var u=go(t.Fd,t.Id,t.Ld,t.Cd||null,t.Nd);return Mb(t.Dd,[u]).map(function(x){return x.toString()})}}(h),0,null,c,f,d,e))}return g}
570
- function Ro(a){var b=io(a,Wo,"initialization");if(!b)return null;var c=a.N.id,d=a.bandwidth||null,e=a.N.Sa;return new ri(function(){var f=go(b,c,null,d,null);return Mb(e,[f])},0,null)};function Xo(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.o=new Set}Xo.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
571
- function Yo(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,u,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la,ma,Qa,Ha,ub,$a;return H(function(fb){switch(fb.g){case 1:d=Sb;Zo(b);$o(b);ap(b);bp(b);if(!c&&1==b.length){e=b[0];a.g=e.$c;a.h=e.zd;a.j=e.textStreams;a.i=e.imageStreams;fb.C(2);break}f=-1;g=r(nb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.xa,n=l.item,a.o.has(n.id)||(a.o.add(n.id),-1==f&&(f=m));if(-1==f)return fb["return"]();p=b.map(function(ab){return ab.$c});t=b.map(function(ab){return ab.zd});u=b.map(function(ab){return ab.textStreams});
572
- x=b.map(function(ab){return ab.imageStreams});w=r(u);for(y=w.next();!y.done;y=w.next())C=y.value,C.push(cp(d.qa));D=r(x);for(B=D.next();!B.done;B=D.next())E=B.value,E.push(cp(d.Wc));return v(fb,dp(a.g,p,f,ep,fp),3);case 3:return v(fb,dp(a.h,t,f,ep,fp),4);case 4:return v(fb,dp(a.j,u,f,ep,fp),5);case 5:return v(fb,dp(a.i,x,f,ep,fp),2);case 2:G=0;I=[];if(a.h.length&&a.g.length)for(Z=r(a.g),ia=Z.next();!ia.done;ia=Z.next())for(la=ia.value,ma=r(a.h),Qa=ma.next();!Qa.done;Qa=ma.next())Ha=Qa.value,ub=ji(la.drmInfos,
573
- Ha.drmInfos),la.drmInfos.length&&Ha.drmInfos.length&&!ub.length||($a=G++,I.push({id:$a,language:la.language,primary:la.primary,audio:la,video:Ha,bandwidth:(la.bandwidth||0)+(Ha.bandwidth||0),drmInfos:ub,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(L=a.h.concat(a.g),J=r(L),M=J.next();!M.done;M=J.next())R=M.value,U=G++,I.push({id:U,language:R.language,primary:R.primary,audio:R.type==d.Bb?R:null,video:R.type==d.hb?R:null,bandwidth:R.bandwidth||0,drmInfos:R.drmInfos,allowedByApplication:!0,
574
- allowedByKeySystem:!0,decodingInfos:[]});a.l=I;z(fb)}})}
575
- function Zo(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.$c),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jd(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.$c=c}}
576
- function ap(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jd(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
577
- function $o(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.zd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&jd(e.roles,h.roles)&&xh(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.zd=c}}
578
- function bp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
579
- function gp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,u,x,w,y,C,D,B,E,G,I,L,J,M,R;return H(function(U){switch(U.g){case 1:b=Sb;if(1==a.length)return U["return"](a[0]);c=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.Bb})});d=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.hb})});e=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.qa})});f=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.Wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
580
- k.push(hp(b.qa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(hp(b.Wc));return v(U,dp([],c,0,ip,jp),2);case 2:return p=U.h,v(U,dp([],d,0,ip,jp),3);case 3:return t=U.h,v(U,dp([],e,0,ip,jp),4);case 4:return u=U.h,v(U,dp([],f,0,ip,jp),5);case 5:x=U.h;w=0;if(t.length&&p.length)for(E=r(p),G=E.next();!G.done;G=E.next())for(I=G.value,L=r(t),J=L.next();!J.done;J=L.next())M=J.value,R=w++,M.variantIds.push(R),I.variantIds.push(R);else for(y=t.concat(p),C=r(y),D=C.next();!D.done;D=C.next())B=D.value,
581
- B.variantIds=[w++];return U["return"](t.concat(p).concat(u).concat(x))}})}
582
- function dp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,u,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia;return H(function(la){switch(la.g){case 1:f=Sb;g=[];h=r(nb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.xa,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);t=r(a);u=t.next();case 2:if(u.done){la.C(4);break}x=u.value;return v(la,kp(x,b,c,e,g),5);case 5:w=la.h;if(!w)throw new O(2,4,4037);u=t.next();la.C(2);break;case 4:y=r(g),C=y.next();case 6:if(C.done){la.C(8);break}D=C.value;B=r(D);E=B.next();case 9:if(E.done){C=
583
- y.next();la.C(6);break}G=E.value;return v(la,lp(G,b,d,e,g),12);case 12:(I=la.h)&&a.push(I);E=B.next();la.C(9);break;case 8:L=r(g);for(C=L.next();!C.done;C=L.next())for(J=C.value,M={},R=r(J),E=R.next();!E.done;M={tb:M.tb},E=R.next())if(M.tb=E.value,U=M.tb.type==f.qa&&!M.tb.language,Z=M.tb.type==f.Wc&&!M.tb.tilesLayout,!U&&!Z&&(ia=a.some(function(ma){return function(Qa){return Qa.mimeType==ma.tb.mimeType&&kf(Qa.codecs)==kf(ma.tb.codecs)}}(M))))throw new O(2,4,4037);return la["return"](a)}})}
584
- function kp(a,b,c,d,e){var f;return H(function(g){if(1==g.g)return(f=mp(b,a))?v(g,np(f),2):g["return"](!1);op(a,f,c,d,e);return g["return"](!0)})}function np(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
585
- function lp(a,b,c,d,e){var f,g;return H(function(h){if(1==h.g)return f=c(a),(g=mp(b,f))?f.createSegmentIndex?v(h,np(g),2):h.C(2):h["return"](null);op(f,g,0,d,e);return h["return"](f)})}function op(a,b,c,d,e){b=r(nb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.xa;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Yb(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
586
- function ep(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Wi;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function ip(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
587
- function fp(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))));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=ji(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
588
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=ep(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),fp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&fp(a.trickModeVideo,b)}
589
- function jp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
590
- function mp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:pp,video:pp,text:qp,image:rp}[f.type],h={audio:sp,video:tp,text:up,image:vp}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function pp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||kf(b.codecs)!=kf(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<ji(c,d).length:1)}return c?!1:!0}
591
- function qp(a,b){return a.language?b.language?0==Yb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function rp(a){return a.tilesLayout?!0:!1}
592
- function sp(a,b,c){if(a.id==c.id)return!0;var d=Yb(a.language,b.language),e=Yb(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)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;
593
- d=wp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==xp)return!0;if(d==yp)return!1;d=wp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==xp?!0:d==yp?!1:a.bandwidth&&zp(a.bandwidth,b.bandwidth,c.bandwidth)==xp?!0:!1}
594
- function tp(a,b,c){if(a.id==c.id)return!0;var d=wp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==xp)return!0;if(d==yp)return!1;if(a.frameRate){d=wp(a.frameRate,b.frameRate,c.frameRate);if(d==xp)return!0;if(d==yp)return!1}return a.bandwidth&&zp(a.bandwidth,b.bandwidth,c.bandwidth)==xp?!0:!1}
595
- function up(a,b,c){if(a.id==c.id)return!0;var d=Yb(a.language,b.language),e=Yb(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!=
596
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function vp(a,b,c){return a.id==c.id?!0:wp(a.width*a.height,b.width*b.height,c.width*c.height)==xp?!0:!1}function hp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
597
- function cp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ti([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
598
- function wp(a,b,c){if(b==a&&a!=c)return yp;if(c==a&&a!=b)return xp;if(b>a){if(c<=a||c-a<b-a)return xp;if(c-a>b-a)return yp}else{if(c>a)return yp;if(a-c<a-b)return xp;if(a-c>a-b)return yp}return Ap}function zp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?xp:b<a?yp:Ap}var xp=1,Ap=0,yp=-1;function Bp(){var a=this;this.G=this.v=null;this.h=[];this.F=null;this.H=1;this.o={};this.L={};this.g=new Xo;this.D=0;this.I=new gc(5);this.B=new P(function(){a.Kc()});this.i=new fh;this.j=null;this.K=[];this.l=Infinity;this.A=!1}q=Bp.prototype;q.configure=function(a){this.v=a};q.start=function(a,b){var c=this,d;return H(function(e){if(1==e.g)return c.A=b.isLowLatencyMode(),c.h=[a],c.G=b,v(e,Cp(c),2);d=e.h;c.G&&Dp(c,d);if(!c.G)throw new O(2,7,7001);return e["return"](c.F)})};
599
- q.stop=function(){for(var a=r(Object.values(this.o)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.v=this.G=null;this.h=[];this.F=null;this.o={};this.g=null;null!=this.B&&(this.B.stop(),this.B=null);return this.i.destroy()};q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return A(c,2),v(c,Cp(a),4);if(2!=c.g)return wa(c,0);b=F(c);if(!a.G||!b)return c["return"]();a.G.onError(b);z(c)})};q.onExpirationUpdated=function(){};
600
- function Cp(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=lh(a.h,a.v.retryParameters),c=a.G.networkingEngine,d=Date.now(),e=c.request(0,b),gh(a.i,e),v(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.G)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return v(k,Ep(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;hc(a.I,1,h);return k["return"](h)})}
601
- function Ep(a,b,c){var d,e,f,g,h;return H(function(k){if(1==k.g){d=Vn(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.v.dash.disableXlinkProcessing)return k["return"](Fp(a,d,c));f=a.v.dash.xlinkFailGracefully;g=lo(d,a.v.retryParameters,f,c,a.G.networkingEngine);gh(a.i,g);return v(k,g.promise,2)}h=k.h;return k["return"](Fp(a,h,c))})}
602
- function Fp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,u,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la,ma,Qa;return H(function(Ha){switch(Ha.g){case 1:d=[c];e=En(b,"Location").map(Jn).filter(Kb);0<e.length&&(f=Mb(d,e),d=a.h=f);g=En(b,"BaseURL");h=g.map(Jn);k=Mb(d,h);l=0;g&&g.length&&(l=Ln(g[0],"availabilityTimeOffset",Sn)||0);m=a.v.dash.ignoreMinBufferTime;n=0;m||(n=Ln(b,"minBufferTime",Nn)||0);a.D=Ln(b,"minimumUpdatePeriod",Nn,-1);p=Ln(b,"availabilityStartTime",Mn);t=Ln(b,"timeShiftBufferDepth",Nn);u=a.v.dash.ignoreSuggestedPresentationDelay;
603
- x=null;u||(x=Ln(b,"suggestedPresentationDelay",Nn));w=a.v.dash.ignoreMaxSegmentDuration;y=null;w||(y=Ln(b,"maxSegmentDuration",Nn));C=b.getAttribute("type")||"static";if(a.F)for(D=a.F.presentationTimeline,B=r(Object.values(a.o)),E=B.next();!E.done;E=B.next())G=E.value,G.Fb(D.xb());else I=a.v.defaultPresentationDelay||1.5*n,L=null!=x?x:I,D=new Q(p,L,a.v.dash.autoCorrectDrift);J=b.getAttribute("profiles")||"";M={Eb:"static"!=C,presentationTimeline:D,ya:null,$:null,Da:null,N:null,bandwidth:0,Xe:!1,Xb:l,
604
- profiles:J.split(",")};R=Gp(a,M,k,b);U=R.duration;Z=R.periods;D.Pc("static"==C);"static"!=C&&R.Qe||D.cb(U||Infinity);a.l&&!a.A&&(ia=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.A=a.G.isLowLatencyMode());a.A?D.nf(a.l):a.l&&Ra("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.");(la=D.Z())&&!isNaN(a.v.availabilityWindowOverride)&&(t=a.v.availabilityWindowOverride);
605
- null==t&&(t=Infinity);D.xe(t);D.ae(y||1);return v(Ha,Yo(a.g,Z,M.Eb),2);case 2:if(a.F){a.F.variants=a.g.l;a.F.textStreams=a.g.j.slice();a.F.imageStreams=a.g.i;a.G.filter(a.F);Ha.C(3);break}a.F={presentationTimeline:D,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:n||0};if(!D.wf()){Ha.C(3);break}ma=En(b,"UTCTiming");return v(Ha,Hp(a,k,ma),5);case 5:Qa=Ha.h;if(!a.G)return Ha["return"]();D.pf(Qa);case 3:a.G.makeTextStreamsForClosedCaptions(a.F),z(Ha)}})}
606
- function Gp(a,b,c,d){var e=Ln(d,"mediaPresentationDuration",Nn),f=[],g=0;d=En(d,"Period");for(var h=r(nb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.xa;var m=l.item,n=l.next;l=Ln(m,"start",Nn,g);var p=m.id,t=Ln(m,"duration",Nn),u=null;if(n){var x=Ln(n,"start",Nn);null!=x&&(u=x-l)}else null!=e&&(u=e-l);null==u&&(u=t);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.K.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=Ip(a,b,c,{start:l,duration:u,node:m,$e:null==u||!n});f.push(g);
607
- b.ya.id&&u&&(a.L[b.ya.id]=u);if(null==u){g=null;break}g=l+u}}a.K=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Qe:!1}:{periods:f,duration:g,Qe:!0}}
608
- function Ip(a,b,c,d){b.ya=Jp(d.node,null,c);b.$=d;b.ya.Xb=b.Xb;b.ya.id||(b.ya.id="__shaka_period_"+d.start);c=En(d.node,"EventStream");c=r(c);for(var e=c.next();!e.done;e=c.next())Kp(a,d.start,d.duration,e.value);c=En(d.node,"AdaptationSet").map(function(m){return Lp(a,b,m)}).filter(Kb);if(b.Eb){d=[];e=r(c);for(var f=e.next();!f.done;f=e.next()){f=r(f.value.Ig);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);}d=c.filter(function(m){return!m.Ce});
609
- c=c.filter(function(m){return m.Ce});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ce.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Vc:h.Vc},l=k.next())h.Vc=l.value,h.Vc.trickModeVideo=e.streams.find(function(m){return function(n){return kf(m.Vc.codecs)==kf(n.codecs)}}(h))}}}e=a.v.disableAudio?[]:Mp(d,"audio");g=a.v.disableVideo?[]:Mp(d,"video");f=a.v.disableText?[]:Mp(d,Rb);c=a.v.disableThumbnails?
610
- []:Mp(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.ya.id,$c:d,zd:e,textStreams:g,imageStreams:f}}
611
- function Mp(a,b){return a.filter(function(c){return c.contentType==b})}
612
- function Lp(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.Da=Jp(c,b.ya,null);var e=!1,f=En(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Kb),h=void 0,k=b.Da.contentType==Rb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
613
- l}}var n;m=En(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=En(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
614
- 10)));m=En(c,"Accessibility");var u=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var x=r(t),w=x.next();!w.done;w=x.next()){var y=w.value,C=w=void 0;y.includes("=")?(y=y.split("="),w=y[0].startsWith("CC")?y[0]:"CC"+y[0],C=y[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,C=y);u.set(w,Ub(C))}}else u.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
615
- 1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,y=x=void 0,w.includes("=")?(w=w.split("="),x="svc"+w[0],y=w[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,y=w),u.set(x,Ub(y));else u.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=En(c,"ContentProtection");var D=Wn(l,a.v.dash.ignoreDrmInfo,a.v.dash.keySystemsByURI),B=Ub(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=En(c,"Label"))&&l.length&&
616
- (l=l[0],l.textContent&&(E=l.textContent));l=En(c,"Representation");c=l.map(function(G){if(G=Np(a,b,D,h,B,E,e,g,u,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Da.contentType;if(a.v.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.Da.contentType||"application"==b.Da.contentType)for(b.Da.contentType=Op(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Da.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
546
+ function ko(a,b){var c=lo(a,b,"timescale"),d=1;c&&(d=Tn(c)||1);var e=lo(a,b,"duration");c=Tn(e||"");"image"==a.N.contentType&&(c=Vn(e||""));c&&(c/=d);var f=lo(a,b,"startNumber");e=Number(lo(a,b,"presentationTimeOffset"))||0;var g=Un(f||"");if(null==f||null==g)g=1;var h=mo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.$.duration||Infinity,l=Gn(h,"S");h=[];var m=-e;l=r(nb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,t=n.next,v=On(p,"t",Un);n=On(p,"d",Un);var x=On(p,"r",Sn);null!=
547
+ v&&(v-=e);if(!n)break;p=null!=v?v:m;v=x||0;if(0>v)if(t){t=On(t,"t",Un);if(null==t)break;else if(p>=t)break;v=Math.ceil((t-p)/n)-1}else{if(Infinity==k)break;else if(p/f>=k)break;v=Math.ceil((k*f-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/f);t=r(lb(v+1));for(v=t.next();!v.done;v=t.next())m=p+n,h.push({start:p/f,end:m/f,Vg:p}),p=m}f=h}return{timescale:d,Ba:c,mc:g,qb:e/d||0,Fe:e,timeline:f}}
548
+ function lo(a,b,c){return[b(a.N),b(a.Da),b(a.ya)].filter(Kb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}function mo(a,b,c){return[b(a.N),b(a.Da),b(a.ya)].filter(Kb).map(function(d){return Fn(d,c)}).reduce(function(d,e){return d||e})}
549
+ function no(a,b,c,d,e,f){for(var g=Kn(a,"http://www.w3.org/1999/xlink","href"),h=Kn(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return $g(new O(2,4,4028));if("onLoad"!=h)return $g(new O(2,4,4027));var m=Mb([d],[g]);return e.request(0,nh(m,b)).ra(function(n){n=Yn(n.data,a.tagName);if(!n)return $g(new O(2,4,4001,g));
550
+ 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=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return oo(a,b,c,m[0],e,f+1)})}
551
+ function oo(a,b,c,d,e,f){f=void 0===f?0:f;if(Kn(a,"http://www.w3.org/1999/xlink","href")){var g=no(a,b,c,d,e,f);c&&(g=g.ra(void 0,function(){return oo(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Kn(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(oo(k,b,c,d,e,f)));return dh(g).ra(function(){return a})};function po(a,b,c,d,e,f,g){var h,k=(new Cc).Y("sidx",function(l){h=qo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
552
+ function qo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.S();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.S();var m=g.reader.S()}else l=g.reader.lc(),m=g.reader.lc();g.reader.skip(2);var n=g.reader.kc();a=a+g.size+m;n=r(lb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.S();m=(p&2147483648)>>>31;p&=2147483647;var t=g.reader.S();g.reader.skip(4);if(1==m)throw new O(2,3,3006);h.push(new vi(l/k+c,(l+t)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=t;a+=p}g.parser.stop();
553
+ return h};function ro(a){this.h=qc(a);this.g=new zc(this.h,0)}ro.prototype.Ga=function(){return this.g.Ga()};
554
+ function so(a){var b=to(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=to(a);a:{d=r(uo);for(var e=d.next();!e.done;e=d.next())if(lc(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.ma();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);d=0;e=r(nb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.xa?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.g.ma()+b<=a.h.byteLength?b:a.h.byteLength-a.g.ma();d=qc(a.h,
555
+ a.g.ma(),b);a.g.skip(b);return new vo(c,d)}function to(a){var b=a.g.ma(),c=a.g.na();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return nc(a.h,b,c)}var uo=[[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 vo(a,b){this.id=a;this.g=b}
556
+ function wo(a){if(8<a.g.byteLength)throw new O(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new O(2,3,3001);for(var b=0,c=r(lb(a.g.byteLength)),d=c.next();!d.done;d=c.next())d=a.g.getUint8(d.value),b=256*b+d;return b};function xo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new ro(a.g);for(var n=null,p=null;a.Ga();){var t=so(a);if(187==t.id){var v=yo(t);v&&(t=c*v.Wg,v=b+v.Fg,null!=n&&m.push(new vi(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new vi(n+g,d+g,l,p,null,f,g,h,k));return m}
557
+ function yo(a){var b=new ro(a.g);a=so(b);if(179!=a.id)throw new O(2,3,3013);a=wo(a);b=so(b);if(183!=b.id)throw new O(2,3,3012);b=new ro(b.g);for(var c=0;b.Ga();){var d=so(b);if(241==d.id){c=wo(d);break}}return{Wg:a,Fg:c}};function zo(a,b){var c=mo(a,b,"Initialization");if(!c)return null;var d=a.N.Sa,e=c.getAttribute("sourceURL");e&&(d=Mb(a.N.Sa,[e]));e=0;var f=null;if(c=On(c,"range",Rn))e=c.start,f=c.end;return new ti(function(){return d},e,f)}
558
+ function Ao(a,b){var c=Number(lo(a,Bo,"presentationTimeOffset"))||0,d=lo(a,Bo,"timescale"),e=1;d&&(e=Tn(d)||1);var f=c/e||0,g=zo(a,Bo);Co(a,g);var h=gh(a);return{$b:function(){var k=mo(h,Bo,"RepresentationIndex"),l=h.N.Sa;k&&(k=k.getAttribute("sourceURL"))&&(l=Mb(h.N.Sa,[k]));k=Do(h);return Eo(h,b,g,l,k.start,k.end,f)}}}
559
+ function Eo(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,w,y,C,D,B,E;return H(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.Eb||!a.$.$e,l=a.$.start,m=a.$.duration,n=a.N.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.Fa(),c.Ca,c.wa):null],p=null,u(G,Promise.all(v),2);x=G.h;w=x[0];y=x[1]||null;C=null;D=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var I=po(w,e,d,c,D,B,E);else{I=new ro(y);if(440786851!=so(I).id)throw new O(2,3,3008);var L=so(I);if(408125543!=L.id)throw new O(2,3,3009);I=L.g.byteOffset;
560
+ L=new ro(L.g);for(var J=null;L.Ga();){var M=so(L);if(357149030==M.id){J=M;break}}if(!J)throw new O(2,3,3010);J=new ro(J.g);M=1E6;for(L=null;J.Ga();){var R=so(J);if(2807729==R.id)M=wo(R);else if(17545==R.id)if(4==R.g.byteLength)L=R.g.getFloat32(0);else if(8==R.g.byteLength)L=R.g.getFloat64(0);else throw new O(2,3,3003);}if(null==L)throw new O(2,3,3011);J=M/1E9;L*=J;M=so(new ro(w));if(475249515!=M.id)throw new O(2,3,3007);I=xo(M,I,J,L,d,c,D,B,E)}C=I;h.hc(C);t=new Vi(C);k&&t.wb(B,E,!0);return G["return"](t)})}
561
+ function Bo(a){return a.Nc}function Do(a){var b=mo(a,Bo,"RepresentationIndex");a=lo(a,Bo,"indexRange");a=Rn(a||"");b&&(a=On(b,"range",Rn,a));return a}function Co(a,b){Fo(a,b);if(!Do(a))throw new O(2,4,4002);}function Fo(a,b){var c=a.N.mimeType.split("/")[1];if(a.N.contentType!=Rb&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);};function Go(a,b){var c=zo(a,Ho),d=Io(a);if(!d.Ba&&!d.timeline&&1<d.dc.length)throw new O(2,4,4002);if(!d.Ba&&!a.$.duration&&!d.timeline&&1==d.dc.length)throw new O(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new O(2,4,4002);var e=null,f=null;a.ya.id&&a.N.id&&(f=a.ya.id+","+a.N.id,e=b[f]);c=Ro(a.$.start,a.$.duration,a.N.Sa,d,c);d=!e;e?e.ec(c,a.presentationTimeline.xb()):(e=new Vi(c),f&&a.Eb&&(b[f]=e));a.presentationTimeline.hc(c);a.Eb&&a.$.$e||e.wb(a.$.start,a.$.duration?a.$.start+a.$.duration:
562
+ Infinity,d);return{$b:function(){return Promise.resolve(e)}}}function Ho(a){return a.Ab}function Io(a){var b=So(a);a=ko(a,Ho);var c=a.mc;0==c&&(c=1);var d=0;a.Ba?d=a.Ba*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{Ba:a.Ba,startTime:d,mc:c,qb:a.qb,timeline:a.timeline,dc:b}}
563
+ function Ro(a,b,c,d,e){var f=d.dc.length;d.timeline&&d.timeline.length!=d.dc.length&&(f=Math.min(d.timeline.length,d.dc.length));var g=a-d.qb,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(lb(f));for(var n=f.next();!n.done;m={Gd:m.Gd},n=f.next()){n=n.value;var p=d.dc[n];m.Gd=Mb(c,[p.wg]);var t=void 0;t=null!=d.Ba?l+d.Ba:d.timeline?d.timeline[n].end:l+b;k.push(new vi(a+l,a+t,function(v){return function(){return v.Gd}}(m),p.start,p.end,e,g,a,h));l=t}return k}
564
+ function So(a){return[a.N.Ab,a.Da.Ab,a.ya.Ab].filter(Kb).map(function(b){return Gn(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Xe&&(a.Xe=!0);var c=b.getAttribute("media");b=On(b,"mediaRange",Rn,{start:0,end:null});return{wg:c,start:b.start,end:b.end}})};function To(a,b,c,d,e,f){var g=Uo(a),h=Vo(a);Wo(h);var k=gh(a);if(h.Hc)return Fo(a,g),{$b:function(){var v=jo(h.Hc,k.N.id,null,k.bandwidth||null,null);v=Mb(k.N.Sa,[v]);return Eo(k,b,g,v,0,null,h.qb)}};if(h.Ba)return d||(a.presentationTimeline.ae(h.Ba),a.presentationTimeline.be(a.$.start)),{$b:function(){return Xo(k,h,e,g,f)}};var l=null;d=null;a.ya.id&&a.N.id&&(d=a.ya.id+","+a.N.id,l=c[d]);var m=Yo(k,h,g),n=a.$.start,p=a.$.duration?a.$.start+a.$.duration:Infinity,t=Infinity!=p;l?(t&&(new Vi(m)).wb(n,
565
+ p,!0),l.ec(m,a.presentationTimeline.xb())):(l=new Vi(m),d&&a.Eb&&(c[d]=l));a.presentationTimeline.hc(m);t&&l.wb(n,p);return{$b:function(){return Promise.resolve(l)}}}function Zo(a){return a.Oc}function Vo(a){var b=ko(a,Zo),c=lo(a,Zo,"media");a=lo(a,Zo,"index");return{Ba:b.Ba,timescale:b.timescale,mc:b.mc,qb:b.qb,Fe:b.Fe,timeline:b.timeline,Zd:c,Hc:a}}
566
+ function Wo(a){var b=a.Hc?1:0;b+=a.timeline?1:0;b+=a.Ba?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.Hc&&(a.timeline=null),a.Ba=null);if(!a.Hc&&!a.Zd)throw new O(2,4,4002);}
567
+ function Xo(a,b,c,d,e){function f(J){var M=(J-t)*p,R=M+b.qb,U=M+l;M=U+p;var Z=Math.min(M,h());U=new vi(U,Z,function(){var ia=jo(x,y,J,w,R*v);return Mb(C,[ia])},0,null,d,D,l,h());U.j=M;return U}function g(){var J=[Math.max(k.xb(),l),Math.min(k.Hb(),h())].map(function(M){return M-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(M){return M+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.$.start,m=a.ya.id,n=a.$.duration,p=b.Ba,t=b.mc,v=b.timescale,
568
+ x=b.Zd,w=a.bandwidth||null,y=a.N.id,C=a.N.Sa,D=l-b.qb,B=g();a=a.Eb?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var G=f(E);c.push(G)}var I=new Vi(c);c=k.Hb()<h();E=k.Z();if(c||E){var L=Math.max(a,B+1);I.xd(p,function(){var J=k.xb();I.Fb(J);var M=r(g());M.next();M=M.next().value;for(var R=[];L<=M;){var U=f(L);R.push(U);L++}return J>h()&&!R.length?null:R})}return Promise.resolve(I)}
569
+ function Yo(a,b,c){var d=a.$.start,e=a.$.duration,f=d-b.qb;e=e?d+e:Infinity;for(var g=[],h={},k=r(nb(b.timeline)),l=k.next();!l.done;h={Fd:h.Fd,Id:h.Id,Ld:h.Ld,Cd:h.Cd,Nd:h.Nd,Dd:h.Dd},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Vg;m=m.end;h.Ld=l.xa+b.mc;h.Nd=p+b.Fe;h.Id=a.N.id;h.Cd=a.bandwidth||null;h.Fd=b.Zd;h.Dd=a.N.Sa;g.push(new vi(d+n,d+m,function(t){return function(){var v=jo(t.Fd,t.Id,t.Ld,t.Cd||null,t.Nd);return Mb(t.Dd,[v]).map(function(x){return x.toString()})}}(h),0,null,c,f,d,e))}return g}
570
+ function Uo(a){var b=lo(a,Zo,"initialization");if(!b)return null;var c=a.N.id,d=a.bandwidth||null,e=a.N.Sa;return new ti(function(){var f=jo(b,c,null,d,null);return Mb(e,[f])},0,null)};function $o(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.o=new Set}$o.prototype.release=function(){for(var a=r(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
571
+ function ap(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la,ma,Qa,Ha,tb,Za;return H(function(eb){switch(eb.g){case 1:d=Sb;bp(b);cp(b);dp(b);ep(b);if(!c&&1==b.length){e=b[0];a.g=e.$c;a.h=e.zd;a.j=e.textStreams;a.i=e.imageStreams;eb.C(2);break}f=-1;g=r(nb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.xa,n=l.item,a.o.has(n.id)||(a.o.add(n.id),-1==f&&(f=m));if(-1==f)return eb["return"]();p=b.map(function($a){return $a.$c});t=b.map(function($a){return $a.zd});v=b.map(function($a){return $a.textStreams});
572
+ x=b.map(function($a){return $a.imageStreams});w=r(v);for(y=w.next();!y.done;y=w.next())C=y.value,C.push(fp(d.qa));D=r(x);for(B=D.next();!B.done;B=D.next())E=B.value,E.push(fp(d.Wc));return u(eb,gp(a.g,p,f,hp,ip),3);case 3:return u(eb,gp(a.h,t,f,hp,ip),4);case 4:return u(eb,gp(a.j,v,f,hp,ip),5);case 5:return u(eb,gp(a.i,x,f,hp,ip),2);case 2:G=0;I=[];if(a.h.length&&a.g.length)for(Z=r(a.g),ia=Z.next();!ia.done;ia=Z.next())for(la=ia.value,ma=r(a.h),Qa=ma.next();!Qa.done;Qa=ma.next())Ha=Qa.value,tb=li(la.drmInfos,
573
+ Ha.drmInfos),la.drmInfos.length&&Ha.drmInfos.length&&!tb.length||(Za=G++,I.push({id:Za,language:la.language,primary:la.primary,audio:la,video:Ha,bandwidth:(la.bandwidth||0)+(Ha.bandwidth||0),drmInfos:tb,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(L=a.h.concat(a.g),J=r(L),M=J.next();!M.done;M=J.next())R=M.value,U=G++,I.push({id:U,language:R.language,primary:R.primary,audio:R.type==d.Bb?R:null,video:R.type==d.ib?R:null,bandwidth:R.bandwidth||0,drmInfos:R.drmInfos,allowedByApplication:!0,
574
+ allowedByKeySystem:!0,decodingInfos:[]});a.l=I;z(eb)}})}
575
+ function bp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.$c),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jd(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.$c=c}}
576
+ function dp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&jd(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
577
+ function cp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.zd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&jd(e.roles,h.roles)&&zh(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.zd=c}}
578
+ function ep(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
579
+ function jp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,M,R;return H(function(U){switch(U.g){case 1:b=Sb;if(1==a.length)return U["return"](a[0]);c=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.Bb})});d=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.ib})});e=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.qa})});f=a.map(function(Z){return Z.filter(function(ia){return ia.type==b.Wc})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
580
+ k.push(kp(b.qa));l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(kp(b.Wc));return u(U,gp([],c,0,lp,mp),2);case 2:return p=U.h,u(U,gp([],d,0,lp,mp),3);case 3:return t=U.h,u(U,gp([],e,0,lp,mp),4);case 4:return v=U.h,u(U,gp([],f,0,lp,mp),5);case 5:x=U.h;w=0;if(t.length&&p.length)for(E=r(p),G=E.next();!G.done;G=E.next())for(I=G.value,L=r(t),J=L.next();!J.done;J=L.next())M=J.value,R=w++,M.variantIds.push(R),I.variantIds.push(R);else for(y=t.concat(p),C=r(y),D=C.next();!D.done;D=C.next())B=D.value,
581
+ B.variantIds=[w++];return U["return"](t.concat(p).concat(v).concat(x))}})}
582
+ function gp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia;return H(function(la){switch(la.g){case 1:f=Sb;g=[];h=r(nb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.xa,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);t=r(a);v=t.next();case 2:if(v.done){la.C(4);break}x=v.value;return u(la,np(x,b,c,e,g),5);case 5:w=la.h;if(!w)throw new O(2,4,4037);v=t.next();la.C(2);break;case 4:y=r(g),C=y.next();case 6:if(C.done){la.C(8);break}D=C.value;B=r(D);E=B.next();case 9:if(E.done){C=
583
+ y.next();la.C(6);break}G=E.value;return u(la,op(G,b,d,e,g),12);case 12:(I=la.h)&&a.push(I);E=B.next();la.C(9);break;case 8:L=r(g);for(C=L.next();!C.done;C=L.next())for(J=C.value,M={},R=r(J),E=R.next();!E.done;M={tb:M.tb},E=R.next())if(M.tb=E.value,U=M.tb.type==f.qa&&!M.tb.language,Z=M.tb.type==f.Wc&&!M.tb.tilesLayout,!U&&!Z&&(ia=a.some(function(ma){return function(Qa){return Qa.mimeType==ma.tb.mimeType&&kf(Qa.codecs)==kf(ma.tb.codecs)}}(M))))throw new O(2,4,4037);return la["return"](a)}})}
584
+ function np(a,b,c,d,e){var f;return H(function(g){if(1==g.g)return(f=pp(b,a))?u(g,qp(f),2):g["return"](!1);rp(a,f,c,d,e);return g["return"](!0)})}function qp(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push(c.createSegmentIndex()),c.trickModeVideo&&!c.trickModeVideo.segmentIndex&&b.push(c.trickModeVideo.createSegmentIndex());return Promise.all(b)}
585
+ function op(a,b,c,d,e){var f,g;return H(function(h){if(1==h.g)return f=c(a),(g=pp(b,f))?f.createSegmentIndex?u(h,qp(g),2):h.C(2):h["return"](null);rp(f,g,0,d,e);return h["return"](f)})}function rp(a,b,c,d,e){b=r(nb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.xa;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Yb(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}
586
+ function hp(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new Yi;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}function lp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
587
+ function ip(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))));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=li(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new O(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
588
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.j.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=hp(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),ip(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&ip(a.trickModeVideo,b)}
589
+ function mp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ha(a.keyIds),ha(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ha(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
590
+ function pp(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:sp,video:sp,text:tp,image:up}[f.type],h={audio:vp,video:wp,text:xp,image:yp}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function sp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||kf(b.codecs)!=kf(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<li(c,d).length:1)}return c?!1:!0}
591
+ function tp(a,b){return a.language?b.language?0==Yb(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function up(a){return a.tilesLayout?!0:!1}
592
+ function vp(a,b,c){if(a.id==c.id)return!0;var d=Yb(a.language,b.language),e=Yb(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)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;
593
+ d=zp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Ap)return!0;if(d==Bp)return!1;d=zp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Ap?!0:d==Bp?!1:a.bandwidth&&Cp(a.bandwidth,b.bandwidth,c.bandwidth)==Ap?!0:!1}
594
+ function wp(a,b,c){if(a.id==c.id)return!0;var d=zp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Ap)return!0;if(d==Bp)return!1;if(a.frameRate){d=zp(a.frameRate,b.frameRate,c.frameRate);if(d==Ap)return!0;if(d==Bp)return!1}return a.bandwidth&&Cp(a.bandwidth,b.bandwidth,c.bandwidth)==Ap?!0:!1}
595
+ function xp(a,b,c){if(a.id==c.id)return!0;var d=Yb(a.language,b.language),e=Yb(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!=
596
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function yp(a,b,c){return a.id==c.id?!0:zp(a.width*a.height,b.width*b.height,c.width*c.height)==Ap?!0:!1}function kp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
597
+ function fp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Vi([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
598
+ function zp(a,b,c){if(b==a&&a!=c)return Bp;if(c==a&&a!=b)return Ap;if(b>a){if(c<=a||c-a<b-a)return Ap;if(c-a>b-a)return Bp}else{if(c>a)return Bp;if(a-c<a-b)return Ap;if(a-c>a-b)return Bp}return Dp}function Cp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Ap:b<a?Bp:Dp}var Ap=1,Dp=0,Bp=-1;function Ep(){var a=this;this.G=this.v=null;this.h=[];this.F=null;this.H=1;this.o={};this.L={};this.g=new $o;this.D=0;this.I=new gc(5);this.B=new P(function(){a.Kc()});this.i=new hh;this.j=null;this.K=[];this.l=Infinity;this.A=!1}q=Ep.prototype;q.configure=function(a){this.v=a};q.start=function(a,b){var c=this,d;return H(function(e){if(1==e.g)return c.A=b.isLowLatencyMode(),c.h=[a],c.G=b,u(e,Fp(c),2);d=e.h;c.G&&Gp(c,d);if(!c.G)throw new O(2,7,7001);return e["return"](c.F)})};
599
+ q.stop=function(){for(var a=r(Object.values(this.o)),b=a.next();!b.done;b=a.next())b.value.release();this.g&&this.g.release();this.v=this.G=null;this.h=[];this.F=null;this.o={};this.g=null;null!=this.B&&(this.B.stop(),this.B=null);return this.i.destroy()};q.update=function(){var a=this,b;return H(function(c){if(1==c.g)return A(c,2),u(c,Fp(a),4);if(2!=c.g)return wa(c,0);b=F(c);if(!a.G||!b)return c["return"]();a.G.onError(b);z(c)})};q.onExpirationUpdated=function(){};
600
+ function Fp(a){var b,c,d,e,f,g,h;return H(function(k){if(1==k.g)return b=nh(a.h,a.v.retryParameters),c=a.G.networkingEngine,d=Date.now(),e=c.request(0,b),ih(a.i,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.G)return k["return"](0);f.uri&&!a.h.includes(f.uri)&&a.h.unshift(f.uri);return u(k,Hp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;hc(a.I,1,h);return k["return"](h)})}
601
+ function Hp(a,b,c){var d,e,f,g,h;return H(function(k){if(1==k.g){d=Yn(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.v.dash.disableXlinkProcessing)return k["return"](Ip(a,d,c));f=a.v.dash.xlinkFailGracefully;g=oo(d,a.v.retryParameters,f,c,a.G.networkingEngine);ih(a.i,g);return u(k,g.promise,2)}h=k.h;return k["return"](Ip(a,h,c))})}
602
+ function Ip(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la,ma,Qa;return H(function(Ha){switch(Ha.g){case 1:d=[c];e=Gn(b,"Location").map(Mn).filter(Kb);0<e.length&&(f=Mb(d,e),d=a.h=f);g=Gn(b,"BaseURL");h=g.map(Mn);k=Mb(d,h);l=0;g&&g.length&&(l=On(g[0],"availabilityTimeOffset",Vn)||0);m=a.v.dash.ignoreMinBufferTime;n=0;m||(n=On(b,"minBufferTime",Qn)||0);a.D=On(b,"minimumUpdatePeriod",Qn,-1);p=On(b,"availabilityStartTime",Pn);t=On(b,"timeShiftBufferDepth",Qn);v=a.v.dash.ignoreSuggestedPresentationDelay;
603
+ x=null;v||(x=On(b,"suggestedPresentationDelay",Qn));w=a.v.dash.ignoreMaxSegmentDuration;y=null;w||(y=On(b,"maxSegmentDuration",Qn));C=b.getAttribute("type")||"static";if(a.F)for(D=a.F.presentationTimeline,B=r(Object.values(a.o)),E=B.next();!E.done;E=B.next())G=E.value,G.Fb(D.xb());else I=a.v.defaultPresentationDelay||1.5*n,L=null!=x?x:I,D=new Q(p,L,a.v.dash.autoCorrectDrift);J=b.getAttribute("profiles")||"";M={Eb:"static"!=C,presentationTimeline:D,ya:null,$:null,Da:null,N:null,bandwidth:0,Xe:!1,Xb:l,
604
+ profiles:J.split(",")};R=Jp(a,M,k,b);U=R.duration;Z=R.periods;D.Pc("static"==C);"static"!=C&&R.Qe||D.eb(U||Infinity);a.l&&!a.A&&(ia=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.A=a.G.isLowLatencyMode());a.A?D.nf(a.l):a.l&&Ra("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.");(la=D.Z())&&!isNaN(a.v.availabilityWindowOverride)&&(t=a.v.availabilityWindowOverride);
605
+ null==t&&(t=Infinity);D.xe(t);D.ae(y||1);return u(Ha,ap(a.g,Z,M.Eb),2);case 2:if(a.F){a.F.variants=a.g.l;a.F.textStreams=a.g.j.slice();a.F.imageStreams=a.g.i;a.G.filter(a.F);Ha.C(3);break}a.F={presentationTimeline:D,variants:a.g.l,textStreams:a.g.j.slice(),imageStreams:a.g.i,offlineSessionIds:[],minBufferTime:n||0};if(!D.wf()){Ha.C(3);break}ma=Gn(b,"UTCTiming");return u(Ha,Kp(a,k,ma),5);case 5:Qa=Ha.h;if(!a.G)return Ha["return"]();D.pf(Qa);case 3:a.G.makeTextStreamsForClosedCaptions(a.F),z(Ha)}})}
606
+ function Jp(a,b,c,d){var e=On(d,"mediaPresentationDuration",Qn),f=[],g=0;d=Gn(d,"Period");for(var h=r(nb(d)),k=h.next();!k.done;k=h.next()){var l=k.value;k=l.xa;var m=l.item,n=l.next;l=On(m,"start",Qn,g);var p=m.id,t=On(m,"duration",Qn),v=null;if(n){var x=On(n,"start",Qn);null!=x&&(v=x-l)}else null!=e&&(v=e-l);null==v&&(v=t);if(!(null!==a.j&&null!==p&&null!==l&&l<a.j)||a.K.includes(p)||k+1==d.length){null!==l&&(null===a.j||l>a.j)&&(a.j=l);g=Lp(a,b,c,{start:l,duration:v,node:m,$e:null==v||!n});f.push(g);
607
+ b.ya.id&&v&&(a.L[b.ya.id]=v);if(null==v){g=null;break}g=l+v}}a.K=f.map(function(w){return w.id});return null!=e?{periods:f,duration:e,Qe:!1}:{periods:f,duration:g,Qe:!0}}
608
+ function Lp(a,b,c,d){b.ya=Mp(d.node,null,c);b.$=d;b.ya.Xb=b.Xb;b.ya.id||(b.ya.id="__shaka_period_"+d.start);c=Gn(d.node,"EventStream");c=r(c);for(var e=c.next();!e.done;e=c.next())Np(a,d.start,d.duration,e.value);c=Gn(d.node,"AdaptationSet").map(function(m){return Op(a,b,m)}).filter(Kb);if(b.Eb){d=[];e=r(c);for(var f=e.next();!f.done;f=e.next()){f=r(f.value.Ig);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new O(2,4,4018);}d=c.filter(function(m){return!m.Ce});
609
+ c=c.filter(function(m){return m.Ce});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Ce.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Vc:h.Vc},l=k.next())h.Vc=l.value,h.Vc.trickModeVideo=e.streams.find(function(m){return function(n){return kf(m.Vc.codecs)==kf(n.codecs)}}(h))}}}e=a.v.disableAudio?[]:Pp(d,"audio");g=a.v.disableVideo?[]:Pp(d,"video");f=a.v.disableText?[]:Pp(d,Rb);c=a.v.disableThumbnails?
610
+ []:Pp(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=r(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ha(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ha(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ha(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ha(h.value.streams));return{id:b.ya.id,$c:d,zd:e,textStreams:g,imageStreams:f}}
611
+ function Pp(a,b){return a.filter(function(c){return c.contentType==b})}
612
+ function Op(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.Da=Mp(c,b.ya,null);var e=!1,f=Gn(c,"Role"),g=f.map(function(G){return G.getAttribute("value")}).filter(Kb),h=void 0,k=b.Da.contentType==Rb;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
613
+ l}}var n;m=Gn(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var t=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Gn(c,"SupplementalProperty");m=r(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
614
+ 10)));m=Gn(c,"Accessibility");var v=new Map;m=r(m);for(p=m.next();!p.done;p=m.next())if(t=p.value,p=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=t){t=t.split(";");for(var x=r(t),w=x.next();!w.done;w=x.next()){var y=w.value,C=w=void 0;y.includes("=")?(y=y.split("="),w=y[0].startsWith("CC")?y[0]:"CC"+y[0],C=y[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,C=y);v.set(w,Ub(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
615
+ 1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,y=x=void 0,w.includes("=")?(w=w.split("="),x="svc"+w[0],y=w[1].split(",")[0].split(":").pop()):(x="svc"+p,p++,y=w),v.set(x,Ub(y));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Gn(c,"ContentProtection");var D=Zn(l,a.v.dash.ignoreDrmInfo,a.v.dash.keySystemsByURI),B=Ub(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Gn(c,"Label"))&&l.length&&
616
+ (l=l[0],l.textContent&&(E=l.textContent));l=Gn(c,"Representation");c=l.map(function(G){if(G=Qp(a,b,D,h,B,E,e,g,v,G))G.hdr=G.hdr||n;return G}).filter(function(G){return!!G});if(0==c.length){f="image"==b.Da.contentType;if(a.v.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.Da.contentType||"application"==b.Da.contentType)for(b.Da.contentType=Rp(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.Da.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
617
617
  m.value,p=r(D.drmInfos),t=p.next();!t.done;t=p.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ha(t.keyIds),ha(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(G){return G.getAttribute("id")}).filter(Kb);return{id:b.Da.id||"__fake__"+a.H++,contentType:b.Da.contentType,language:B,ji:e,streams:c,drmInfos:D.drmInfos,Ce:f,Ig:k}}
618
- function Np(a,b,c,d,e,f,g,h,k,l){b.N=Jp(l,b.Da,null);a.l=Math.min(a.l,b.N.Xb);if(!Pp(b.N))return null;var m=b.$.start;b.bandwidth=Ln(l,"bandwidth",Qn)||0;var n=b.N.contentType,p=n==Rb||"application"==n;n="image"==n;try{var t=function(G,I,L){return Qp(a,G,I,L)};if(b.N.Nc)var u=xo(b,t);else if(b.N.Ab)u=Do(b,a.o);else if(b.N.Oc)u=Qo(b,t,a.o,!!a.F,a.v.dash.initialSegmentLimit,a.L);else{var x=b.N.Sa,w=b.$.duration||0;u={$b:function(){return Promise.resolve(Vi(m,w,x))}}}}catch(G){if((p||n)&&4002==G.code)return null;
619
- throw G;}t=En(l,"ContentProtection");t=Zn(t,c,a.v.dash.ignoreDrmInfo,a.v.dash.keySystemsByURI);t=new Set(t?[t]:[]);var y=!1;En(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.N.mimeType="audio/eac3-joc",y=!0);var C=!1;p&&(C=h.includes("forced_subtitle"));var D;if(n&&((l=En(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&
620
- (D=l.getAttribute("value")),!D))return null;var B;l=b.N.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var E={id:a.H++,originalId:b.N.id,createSegmentIndex:function(){var G;return H(function(I){if(1==I.g){if(E.segmentIndex)return I.C(0);G=E;return v(I,u.$b(),3)}G.segmentIndex=I.h;z(I)})},segmentIndex:null,mimeType:b.N.mimeType,codecs:b.N.codecs,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,
621
- bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Da.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.N.ce,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:B,tilesLayout:D};return E}
622
- q.Kc=function(){var a=this,b,c;return H(function(d){switch(d.g){case 1:return b=0,A(d,2),v(d,Cp(a),4);case 4:b=d.h;wa(d,3);break;case 2:c=F(d),a.G&&(c.severity=1,a.G.onError(c));case 3:if(!a.G)return d["return"]();Dp(a,b);z(d)}})};function Dp(a,b){0>a.D||a.B.T(Math.max(3,a.D-b,ic(a.I)))}
623
- function Jp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ce:null,audioSamplingRate:null,Xb:0};c=c||b.Sa;var d=En(a,"BaseURL"),e=d.map(Jn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Ln(a,"frameRate",Tn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=En(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
624
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=En(a,"AudioChannelConfiguration");m=Rp(m)||b.ce;p=Ln(a,"audioSamplingRate",Rn)||b.audioSamplingRate;f||(f=Op(g,h));var t=Dn(a,"SegmentBase"),u=Dn(a,"SegmentTemplate"),x=t?Ln(t,"availabilityTimeOffset",Sn)||0:0,w=u?Ln(u,"availabilityTimeOffset",Sn)||0:0;d=d&&d.length?Ln(d[0],"availabilityTimeOffset",Sn)||0:0;d=b.Xb+d+x+w;return{Sa:Mb(c,e),Nc:t||b.Nc,Ab:Dn(a,"SegmentList")||b.Ab,Oc:u||b.Oc,width:Ln(a,"width",Rn)||b.width,height:Ln(a,
625
- "height",Rn)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ce:m,audioSamplingRate:p,Xb:d}}
626
- function Rp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
627
- 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 Pp(a){var b=a.Nc?1:0;b+=a.Ab?1:0;b+=a.Oc?1:0;if(0==b)return a.contentType==Rb||"application"==a.contentType?!0:!1;1!=b&&(a.Nc&&(a.Ab=null),a.Oc=null);return!0}
628
- function Sp(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(1==m.g)return e=Mb(b,[c]),f=lh(e,a.v.retryParameters),f.method=d,g=a.G.networkingEngine.request(4,f),gh(a.i,g),v(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=tc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
629
- function Hp(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.v.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.C(4);break}h=g.value;A(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.C(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.C(8);
630
- 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":Ra("NTP UTCTiming scheme is not supported");break;default:Ra("Unrecognized scheme in UTCTiming element",k)}n.C(9);break;case 7:return v(n,Sp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return v(n,Sp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
618
+ function Qp(a,b,c,d,e,f,g,h,k,l){b.N=Mp(l,b.Da,null);a.l=Math.min(a.l,b.N.Xb);if(!Sp(b.N))return null;var m=b.$.start;b.bandwidth=On(l,"bandwidth",Tn)||0;var n=b.N.contentType,p=n==Rb||"application"==n;n="image"==n;try{var t=function(G,I,L){return Tp(a,G,I,L)};if(b.N.Nc)var v=Ao(b,t);else if(b.N.Ab)v=Go(b,a.o);else if(b.N.Oc)v=To(b,t,a.o,!!a.F,a.v.dash.initialSegmentLimit,a.L);else{var x=b.N.Sa,w=b.$.duration||0;v={$b:function(){return Promise.resolve(Xi(m,w,x))}}}}catch(G){if((p||n)&&4002==G.code)return null;
619
+ throw G;}t=Gn(l,"ContentProtection");t=bo(t,c,a.v.dash.ignoreDrmInfo,a.v.dash.keySystemsByURI);t=new Set(t?[t]:[]);var y=!1;Gn(l,"SupplementalProperty").some(function(G){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==G.getAttribute("schemeIdUri")&&"JOC"==G.getAttribute("value")})&&(b.N.mimeType="audio/eac3-joc",y=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var D;if(n&&((l=Gn(l,"EssentialProperty").find(function(G){return["http://dashif.org/thumbnail_tile",
620
+ "http://dashif.org/guidelines/thumbnail_tile"].includes(G.getAttribute("schemeIdUri"))}))&&(D=l.getAttribute("value")),!D))return null;var B;l=b.N.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var E={id:a.H++,originalId:b.N.id,createSegmentIndex:function(){var G;return H(function(I){if(1==I.g){if(E.segmentIndex)return I.C(0);G=E;return u(I,v.$b(),3)}G.segmentIndex=I.h;z(I)})},segmentIndex:null,
621
+ mimeType:b.N.mimeType,codecs:b.N.codecs,frameRate:b.N.frameRate,pixelAspectRatio:b.N.pixelAspectRatio,bandwidth:b.bandwidth,width:b.N.width,height:b.N.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.Da.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.N.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.N.ce,audioSamplingRate:b.N.audioSamplingRate,spatialAudio:y,closedCaptions:k,hdr:B,tilesLayout:D};return E}
622
+ q.Kc=function(){var a=this,b,c;return H(function(d){switch(d.g){case 1:return b=0,A(d,2),u(d,Fp(a),4);case 4:b=d.h;wa(d,3);break;case 2:c=F(d),a.G&&(c.severity=1,a.G.onError(c));case 3:if(!a.G)return d["return"]();Gp(a,b);z(d)}})};function Gp(a,b){0>a.D||a.B.T(Math.max(3,a.D-b,ic(a.I)))}
623
+ function Mp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ce:null,audioSamplingRate:null,Xb:0};c=c||b.Sa;var d=Gn(a,"BaseURL"),e=d.map(Mn),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=On(a,"frameRate",Wn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Gn(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
624
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Gn(a,"AudioChannelConfiguration");m=Up(m)||b.ce;p=On(a,"audioSamplingRate",Un)||b.audioSamplingRate;f||(f=Rp(g,h));var t=Fn(a,"SegmentBase"),v=Fn(a,"SegmentTemplate"),x=t?On(t,"availabilityTimeOffset",Vn)||0:0,w=v?On(v,"availabilityTimeOffset",Vn)||0:0;d=d&&d.length?On(d[0],"availabilityTimeOffset",Vn)||0:0;d=b.Xb+d+x+w;return{Sa:Mb(c,e),Nc:t||b.Nc,Ab:Fn(a,"SegmentList")||b.Ab,Oc:v||b.Oc,width:On(a,"width",Un)||b.width,height:On(a,
625
+ "height",Un)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ce:m,audioSamplingRate:p,Xb:d}}
626
+ function Up(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
627
+ 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 Sp(a){var b=a.Nc?1:0;b+=a.Ab?1:0;b+=a.Oc?1:0;if(0==b)return a.contentType==Rb||"application"==a.contentType?!0:!1;1!=b&&(a.Nc&&(a.Ab=null),a.Oc=null);return!0}
628
+ function Vp(a,b,c,d){var e,f,g,h,k,l;return H(function(m){if(1==m.g)return e=Mb(b,[c]),f=nh(e,a.v.retryParameters),f.method=d,g=a.G.networkingEngine.request(4,f),ih(a.i,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=tc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
629
+ function Kp(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.v.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.C(4);break}h=g.value;A(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.C(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.C(8);
630
+ 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":Ra("NTP UTCTiming scheme is not supported");break;default:Ra("Unrecognized scheme in UTCTiming element",k)}n.C(9);break;case 7:return u(n,Vp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Vp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
631
631
  case 9:wa(n,3);break;case 5:F(n);case 3:g=f.next();n.C(2);break;case 4:return Ra("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
632
- function Kp(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=Ln(d,"timescale",Rn)||1;d=r(En(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=Ln(h,"presentationTime",Rn)||0,l=Ln(h,"duration",Rn)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.G.onTimelineRegionAdded(h)}}
633
- function Qp(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=rh,f=hj(b,c,d,a.v.retryParameters),g=a.G.networkingEngine,h=g.request(e,f),gh(a.i,h),v(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Op(a,b){return nf(ff(a,b))?Rb:a.split("/")[0]}K("shaka.dash.DashParser",Bp);pi.mpd=function(){return new Bp};ni["application/dash+xml"]=function(){return new Bp};ni["video/vnd.mpeg.dash.mpd"]=function(){return new Bp};function Tp(a,b,c,d){this.g=a;this.type=b;this.aa=c;this.segments=d||null}function Up(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Up.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};
634
- Up.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Vp(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Wp(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function Xp(a,b,c){c=void 0===c?[]:c;this.aa=b;this.g=a;this.h=c}function Yp(a,b){this.name=a;this.value=b};function Zp(a,b){return a.filter(function(c){return c.name==b})}function $p(a,b){return a.filter(function(c){return Wp(c,"TYPE")==b})}function aq(a,b){var c=Zp(a,b);return c.length?c[0]:null}function bq(a,b,c){c=void 0===c?0:c;return(a=aq(a,b))?Number(a.value):c};function cq(a){this.h=a;this.g=0}function dq(a){eq(a,/[ \t]+/gm)}function eq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function fq(a){return a.g==a.h.length?null:(a=eq(a,/[^ \t\n]*/gm))?a[0]:null};function gq(){this.g=0}
635
- function hq(a,b,c){b=tc(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 O(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=iq(a.g++,g),--a.g,jq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(nb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.xa;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=iq(a.g++,
636
- l);if(kq.includes(l.name)){if(1!=b)throw new O(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=r(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=iq(a.g++,m),jq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Vp(m,"TYPE")?h.push(m):"MAP"==Vp(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Mb([d],[m.trim()])[0],l&&g.push(l),e.push(new Xp(m,g,h)),g=[],h=[]);h.length&&
637
- (l&&g.push(l),e.push(new Xp("",g,h)));return new Tp(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new Yp("URI",k)),e=!0)}}return new Tp(c,b,f)}function iq(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new cq(e);var g;(g=eq(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=eq(e,h);)c.push(new Yp(g[1],g[2]||g[3]))}return new Up(a,d,c,f)}
638
- var jq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),kq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function lq(){}function mq(a){try{var b=nq(a);return $g({uri:a,df:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Yg(c)}}function nq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(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=$c(a):e=xc(a);return{data:e,contentType:c}}
639
- K("shaka.net.DataUriPlugin",lq);lq.parse=mq;ih("data",mq);function oq(){var a=this;this.v=this.G=null;this.za=1;this.B=new Map;this.o=new Map;this.va=new Set;this.h=new Map;this.g=null;this.L="";this.ba=new gq;this.ia=0;this.A=new P(function(){a.Kc()});this.j=pq;this.F=null;this.ha=0;this.H=Infinity;this.V=this.Ja=0;this.D=new fh;this.R=[];this.K=new Map;this.Ia=!1;this.l=new Map;this.O=null;this.ea=new Map;this.I=new Map;this.i=!1}q=oq.prototype;q.configure=function(a){this.v=a};
640
- q.start=function(a,b){var c=this,d,e;return H(function(f){if(1==f.g)return c.G=b,c.i=b.isLowLatencyMode(),v(f,qq(c,lh([a],c.v.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,v(f,rq(c,d.data),3);e=c.ia;0<e&&c.A.T(e);return f["return"](c.F)})};q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.v=this.G=null;this.va.clear();this.F=null;this.h.clear();this.o.clear();this.l.clear();this.B.clear();return Promise.all(a)};
641
- q.update=function(){var a=this,b,c,d;return H(function(e){if(1==e.g){if(a.j==pq)return e["return"]();b=[];a.O=null;c=Array.from(a.h.values());return c.length?v(e,sq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(sq(a,c[d]));return v(e,Promise.all(b),0)})};
642
- function sq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,u;return H(function(x){if(1==x.g)return c=tq,d=b.Bf,e=new pb(d),a.i&&b.Ff&&sb(e,new vb("_HLS_skip=YES")),v(x,qq(a,lh([e.toString()],a.v.retryParameters),0),2);if(3!=x.g){f=x.h;g=hq(a.ba,f.data,f.uri);if(1!=g.type)throw new O(2,4,4017);h=Zp(g.aa,"EXT-X-DEFINE");k=uq(a,h);l=b.stream;return v(x,vq(a,b.yd,g,l.mimeType,b.Yd,k,b.Kf),3)}m=x.h;l.segmentIndex.ec(m,a.g.xb());m.length&&(n=bq(g.aa,"EXT-X-MEDIA-SEQUENCE",0),p=b.Yd.get(n),l.segmentIndex.Fb(p));t=m[m.length-
643
- 1];if(u=aq(g.aa,"EXT-X-ENDLIST"))wq(a,c.Af),a.g.cb(t.endTime);z(x)})}q.onExpirationUpdated=function(){};
644
- function rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,u,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la,ma,Qa,Ha,ub;return H(function($a){switch($a.g){case 1:c=hq(a.ba,b,a.L);if(0!=c.type)throw new O(2,4,4022);d=Zp(c.aa,"EXT-X-DEFINE");xq(a,d);e=Zp(c.aa,"EXT-X-MEDIA");f=Zp(c.aa,"EXT-X-STREAM-INF");yq(a,f);g=Zp(c.aa,"EXT-X-SESSION-DATA");h=r(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Vp(l,"DATA-ID"),n=Vp(l,"URI"),p=Vp(l,"LANGUAGE"),t=Vp(l,"VALUE"),u=(new Map).set("id",m),n&&u.set("uri",Mb([a.L],[n])[0]),p&&u.set("language",
645
- p),t&&u.set("value",t),x=new N("sessiondata",u),a.G)a.G.onEvent(x);return v($a,zq(a,e),2);case 2:return Aq(a,e),v($a,Bq(a,f),3);case 3:return w=$a.h,v($a,Cq(a,e),4);case 4:y=$a.h;if(!a.G)throw new O(2,7,7001);if(a.Ia&&0==w.length)throw new O(2,4,4034);D=C=Infinity;B=r(a.h.values());for(E=B.next();!E.done;E=B.next())G=E.value,C=Math.min(C,G.bf),"text"!=G.stream.type&&(D=Math.min(D,G.vg-G.bf));a.j!=pq?(a.g=new Q(0,a.v.defaultPresentationDelay?a.v.defaultPresentationDelay:a.V?a.V:3*a.ha),a.g.Pc(!1)):
646
- (a.g=new Q(null,0),a.g.Pc(!0));Dq(a);if(a.j!=pq)a.ia=a.H,I=tq,a.j==I.Ge&&(L=a.g.sd,isNaN(a.v.availabilityWindowOverride)||(L=a.v.availabilityWindowOverride),a.g.xe(L));else for(a.g.cb(D),a.g.offset(-C),J=r(a.h.values()),E=J.next();!E.done;E=J.next())M=E.value,M.stream.segmentIndex.offset(-C),M.stream.segmentIndex.wb(0,D);a.R=[];R=[];U=r(w);for(Z=U.next();!Z.done;Z=U.next())for(ia=Z.value,la=r([ia.video,ia.audio]),ma=la.next();!ma.done;ma=la.next())(Qa=ma.value)&&R.push(Qa);return v($a,Promise.all(R.map(function(fb){return H(function(ab){return v(ab,
647
- fb.createSegmentIndex(),0)})})),5);case 5:Ha=r(R);for(ma=Ha.next();!ma.done;ma=Ha.next())ub=ma.value,a.R.push(ub.segmentIndex.P);Dq(a);a.F={presentationTimeline:a.g,variants:w,textStreams:y,imageStreams:[],offlineSessionIds:[],minBufferTime:0};a.G.makeTextStreamsForClosedCaptions(a.F);z($a)}})}function xq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Vp(e,"NAME");e=Vp(e,"VALUE");d&&e&&(a.B.has(d)||a.B.set(d,e))}}
648
- function uq(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Vp(f,"NAME");var g=Vp(f,"VALUE");f=Vp(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.B.get(f))&&c.set(f,e)}return c}function yq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Vp(e,"AUDIO");d=Vp(e,"VIDEO");var g=Vp(e,"SUBTITLES");e=Eq(a,e);if(g){var h=Pb(Rb,e);a.l.set(g,h);id(e,h)}f&&(g=Ob("audio",e),a.l.set(f,g));d&&(f=Ob("video",e),a.l.set(d,f))}}
649
- function Cq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return H(function(u){if(1==u.g)return c=$p(b,"SUBTITLES"),d=c.map(function(x){var w,y,C;return H(function(D){if(1==D.g){if(w=a.v.disableText)return D["return"](null);A(D,2);return v(D,Fq(a,x),4)}if(2!=D.g)return y=D.h,D["return"](y.stream);C=F(D);if(a.v.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),v(u,Promise.all(d),2);e=u.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Wp(h,"GROUP-ID"),l=a.l.get(k))if(m=a.o.get(k))for(n=
650
- r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return u["return"](e.filter(function(x){return x}))})}function zq(a,b){var c;return H(function(d){if(1==d.g)return b=b.filter(function(e){var f=Vp(e,"URI")||"";return"SUBTITLES"!=Vp(e,"TYPE")&&""!=f}),b.length?v(d,Fq(a,b[0]),2):d.C(2);c=b.slice(1).map(function(e){return Fq(a,e)});return v(d,Promise.all(c),0)})}
651
- function Bq(a,b){var c,d,e;return H(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,u;return H(function(x){if(1==x.g)return h=Vp(g,"FRAME-RATE"),k=Number(Vp(g,"AVERAGE-BANDWIDTH"))||Number(Wp(g,"BANDWIDTH")),l=Vp(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Vp(g,"VIDEO-RANGE"),v(x,Gq(a,g),2);if(u=x.h){for(var w=x["return"],y=u.audio,C=u.video,D=r(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
652
- void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;D=a.v.disableAudio;if(!y.length||D)y=[null];D=a.v.disableVideo;if(!C.length||D)C=[null];D=[];y=r(y);for(B=y.next();!B.done;B=y.next()){B=B.value;for(var E=r(C),G=E.next();!G.done;G=E.next()){var I=G.value;G=B?B.stream:null;var L=I?I.stream:null,J=B?B.stream.drmInfos:null,M=I?I.stream.drmInfos:null;I=(I?I.yd:"")+" - "+(B?B.yd:"");G&&L&&J.length&&M.length&&!(0<ji(J,M).length)||a.va.has(I)||(G={id:a.za++,language:G?G.language:"und",primary:!!G&&G.primary||
653
- !!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.va.add(I))}}x=w.call(x,D)}else x=x["return"]([]);return x})}),v(f,Promise.all(c),2);d=f.h;e=d.reduce(Ib,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
654
- function Gq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,u,x;return H(function(w){if(1==w.g)return c=Sb,d=Eq(a,b),e=Vp(b,"AUDIO"),f=Vp(b,"VIDEO"),h=(g=e||f)&&a.o.has(g)?a.o.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Wp(b,"URI"),p=k.audio.find(function(y){return y&&y.yd==n}),t=Pb(c.hb,d),(u=Pb(c.Bb,d))&&!t?l=c.Bb:!h.length&&u&&t?(l=c.hb,d=[[t,u].join()]):k.audio.length&&p?(l=c.Bb,m=!0):l=k.video.length?c.Bb:c.hb,m?w.C(2):v(w,Hq(a,b,d,l),3);2!=w.g&&(x=w.h);if(x)k[x.stream.type]=[x];else if(null===x)return w["return"](null);
655
- Iq(k);return w["return"](k)})}function Eq(a,b){var c=[];a.v.disableVideo||c.push("avc1.42E01E");a.v.disableAudio||c.push("mp4a.40.2");var d=Vp(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=kf(f);c.has(g)||(e.push(f),c.add(g))}return e}function Jq(a){a=Vp(a,"LANGUAGE")||"und";return Ub(a)}
656
- function Iq(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Aq(a,b){var c=$p(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Jq(e);var f=Wp(e,"GROUP-ID");e=Wp(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
657
- function Fq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,u,x;return H(function(w){if(1==w.g){c=Wp(b,"GROUP-ID");d="";var y=Wp(b,"TYPE").toLowerCase();"subtitles"==y&&(y=Rb);e=y;e!=Rb&&c&&a.l.has(c)&&(d=a.l.get(c));f=Kq(Wp(b,"URI"),a.B);if(a.h.has(f))return w["return"](a.h.get(f));g=Jq(b);h=Vp(b,"NAME");k=Vp(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Vp(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Vp(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;n=y;p=Vp(b,"CHARACTERISTICS");t=Vp(b,"FORCED");
658
- u="YES"==t;return v(w,Lq(a,f,d,e,g,l,h,m,null,p,u,n),2)}x=w.h;a.o.has(c)?a.o.get(c).push(x):a.o.set(c,[x]);if(null==x)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,x);return w["return"](x)})}
659
- function Hq(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){e=Kq(Wp(b,"URI"),a.B);if(a.h.has(e))return k["return"](a.h.get(e));var l=Vp(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Ob(d,c);return v(k,Lq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
660
- function Lq(a,b,c,d,e,f,g,h,k,l,m,n){var p,t,u,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la,ma,Qa,Ha,ub,$a,fb,ab,ti,Eo,Fo,Go,Ho,ui,vi,Uf,Io,Jo,Ko,Lo;return H(function(lb){switch(lb.g){case 1:return p=Mb([a.L],[b])[0],v(lb,qq(a,lh([p],a.v.retryParameters),0),2);case 2:t=lb.h;p=t.uri;u=hq(a.ba,t.data,p);if(1!=u.type)throw new O(2,4,4017);x=[];if(u.segments)for(w=r(u.segments),y=w.next();!y.done;y=w.next())C=y.value,D=Zp(C.aa,"EXT-X-KEY"),x.push.apply(x,ha(D));B=!1;E=[];G=new Set;I=r(x);for(L=I.next();!L.done;L=
661
- I.next())if(J=L.value,M=Wp(J,"METHOD"),"NONE"!=M){B=!0;if("AES-128"==M)return a.Ia=!0,lb["return"](null);R=Wp(J,"KEYFORMAT");if(Z=(U=Mq[R])?U(J):null){if(Z.keyIds)for(ia=r(Z.keyIds),la=ia.next();!la.done;la=ia.next())ma=la.value,G.add(ma);E.push(Z)}}if(B&&!E.length)throw new O(2,4,4026);Qa=Zp(u.aa,"EXT-X-DEFINE");Ha=uq(a,Qa);Nq(a,u);return v(lb,Oq(a,d,c,u,Ha),3);case 3:return ub=lb.h,Pq.includes(ub)&&(c=""),$a=new Map,fb=new Map,A(lb,4),v(lb,vq(a,b,u,ub,$a,Ha,fb),6);case 6:ab=lb.h;wa(lb,5);break;
662
- case 4:ti=F(lb);if(4035==ti.code)return Ra("Skipping unsupported HLS stream",ub,b),lb["return"](null);throw ti;case 5:Eo=ab[0].startTime;Fo=ab[ab.length-1].endTime;Go=new Ti(ab);Ho=d==Rb?"subtitle":void 0;ui=[];if(l)for(vi=r(l.split(",")),Uf=vi.next();!Uf.done;Uf=vi.next())Io=Uf.value,ui.push(Io);Ko=(Jo=aq(u.aa,"EXT-X-SERVER-CONTROL"))?null!=Jo.getAttribute("CAN-SKIP-UNTIL"):!1;Lo={id:a.za++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Go,mimeType:ub,codecs:c,
663
- kind:Ho,encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:ui,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return lb["return"]({stream:Lo,yd:b,Bf:p,bf:Eo,vg:Fo,Yd:$a,Kf:fb,Ff:Ko})}})}
664
- function Nq(a,b){var c=aq(b.aa,"EXT-X-PLAYLIST-TYPE"),d=aq(b.aa,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)wq(a,pq);else{c?wq(a,Qq):wq(a,Rq);d=aq(b.aa,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=aq(b.aa,"EXT-X-PART-INF");a.i&&c?(a.Ja=Number(Wp(c,"PART-TARGET")),a.H=Math.min(a.Ja,a.H),c=aq(b.aa,"EXT-X-SERVER-CONTROL"),a.V=c?Number(Wp(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ha=Math.max(d,a.ha)}}
665
- function Sq(a,b,c,d){c=aq(c,"EXT-X-MAP");if(!c)return null;var e=Wp(c,"URI");d=Kq(Mb([b],[e])[0],d);b=[d,Vp(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Tq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Tq(a,b){var c=0,d=null,e=Vp(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ri(function(){return[a]},c,d)}
666
- function Uq(a,b,c,d,e,f,g,h){var k=d.aa,l=Kq(d.g,g),m=aq(k,"EXTINF"),n=g=0,p=null,t=[];if(a.i&&d.h.length){a={};d=r(nb(d.h));for(var u=d.next();!u.done;a={Hd:a.Hd},u=d.next()){u=u.value;var x=u.xa;u=u.item;var w=0==x?c:t[t.length-1];x=0==x?e:w.endTime;var y=Number(Vp(u,"DURATION"));y=x+y;var C=0,D=null;"EXT-X-PRELOAD-HINT"==u.name?C=(w=Vp(u,"BYTERANGE-START"))?Number(w):0:(C=Vp(u,"BYTERANGE"),w=r(Vq(w,C)),C=w.next().value,D=w.next().value);u=Vp(u,"URI");a.Hd=Mb([h],[u])[0];t.push(new wi(x,y,function(B){return function(){return[B.Hd]}}(a),
667
- C,D,b,f,0,Infinity))}}else if(!m)throw new O(2,4,4024,"EXTINF");m?g=e+Number(m.value.split(",")[0]):g=t[t.length-1].endTime;(h=aq(k,"EXT-X-BYTERANGE"))?(c=r(Vq(c,h.value)),n=c.next().value,p=c.next().value):t.length&&(n=t[0].Ca,p=t[t.length-1].wa);return new wi(e,g,function(){return l.length?[l]:[]},n,p,b,f,0,Infinity,t)}function Vq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}
668
- function Dq(a){if(a.g){for(var b=r(a.R),c=b.next();!c.done;c=b.next())a.g.hc(c.value);a.R=[]}}
669
- function vq(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,u,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la;return H(function(ma){switch(ma.g){case 1:h=c.segments;l=bq(c.aa,"EXT-X-MEDIA-SEQUENCE",0);n=(m=aq(c.aa,"EXT-X-SKIP"))?Number(Vp(m,"SKIPPED-SEGMENTS")):0;p=l+n;if(a.j!=pq&&e.has(p)){t=e.get(p);ma.C(2);break}if(null!=a.O){ma.C(3);break}k=Sq(a,c.g,h[0].aa,f);u=a;return v(ma,Wq(a,b,k,d,p,!1,h[0],f),4);case 4:u.O=ma.h;case 3:t=a.O;case 2:x=h[0].g;Va(x.split("/").pop());w=bq(c.aa,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&
670
- (g.has(w)||g.set(w,p),n))for(;g.has(w+1)&&g.get(w+1)<p;)w++;y=a.I.get(w)||0;C=[];D=function(Qa){return nb(Qa)};B=r(D(h));E=B.next();case 5:if(E.done){ma.C(7);break}I=G=E.value;L=I.xa;J=I.item;M=C[C.length-1];R=0==L?t:M.endTime;p=l+n+L;e.set(p,R);k=Sq(a,c.g,J.aa,f);U=aq(J.aa,"EXT-X-DISCONTINUITY");if(!U){ma.C(8);break}w++;g.set(w,p);return v(ma,Xq(a,w,b,k,d,p,J,f,R),9);case 9:y=ma.h;case 8:!a.i&&(Z=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.i=a.G.isLowLatencyMode());ia=aq(J.aa,"EXTINF");
671
- a.i||ia?(la=Uq(a,k,M,J,R,y,f,c.g),C.push(la)):a.i||Ra("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.");E=B.next();ma.C(5);break;case 7:return ma["return"](C)}})}
672
- function Xq(a,b,c,d,e,f,g,h,k){var l,m;return H(function(n){if(1==n.g)return l=0,a.I.has(b)?(l=a.I.get(b),n.C(2)):v(n,Wq(a,c,d,e,f,!0,g,h),3);2!=n.g&&(m=n.h,l=k-m,a.I.set(b,l));return n["return"](l)})}
673
- function Yq(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:c=rh;d=hj(b.Fa(),b.Ca,b.wa,a.v.retryParameters);if(a.v.hls.useFullSegmentsForStartTime)return k["return"](qq(a,d,c));e=hj(b.Fa(),b.Ca,b.Ca+2048-1,a.v.retryParameters);A(k,2);return v(k,qq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Ra("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
674
- e.uris[0]);return v(k,qq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
675
- function Wq(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,u,x;return H(function(w){switch(w.g){case 1:k=Uq(a,c,null,g,0,0,h,"");if(a.F&&!f&&(l=a.h.get(b),m=l.Yd.get(e),void 0!=m))return w["return"](m);d=d.toLowerCase();if(Pq.includes(d))throw Ra("Raw formats are not yet supported. Skipping "+d),new O(1,4,4035);if("video/webm"==d)throw Ra("WebM in HLS is not yet supported. Skipping."),new O(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}n=[Yq(a,k)];c&&n.push(Yq(a,c));return v(w,Promise.all(n),3);case 3:return p=
676
- w.h,t=p[0],u=p[1]||p[0],w["return"](Zq(b,t.uri,t.data,u.data));case 2:if("video/mp2t"!=d){w.C(4);break}return v(w,Yq(a,k),5);case 5:return x=w.h,w["return"]($q(b,x.uri,x.data));case 4:throw new O(2,4,4030,b);}})}
677
- function Zq(a,b,c,d){var e=0;(new Cc).box("moov",Gc).box("trak",Gc).box("mdia",Gc).Y("mdhd",function(h){e=Ne(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new O(2,4,4030,a,b);var f=0,g=!1;(new Cc).box("moof",Gc).box("traf",Gc).Y("tfdt",function(h){f=Me(h.reader,h.version).Od/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new O(2,4,4030,a,b);return f}
678
- function $q(a,b,c){function d(){f.seek(g+188);h=f.na();71!=h&&(f.seek(g+192),h=f.na());71!=h&&(f.seek(g+204),h=f.na());71!=h&&e();f.kf(1)}function e(){throw new O(2,4,4030,a,b);}var f=new zc(c,0),g=0,h=0;for(c=Math.min(f.W.byteLength-188,940);;){g=f.ma();h=f.na();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.na()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.na(),f.skip(k)),1!=f.S()>>8)d();else{f.skip(3);c=f.na()>>6;0!=c&&1!=c||e();0==f.na()&&e();c=f.na();k=
679
- f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Kq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new O(2,4,4039,f);}}return c}
680
- function Oq(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,u,x;return H(function(w){if(1==w.g){f=Sb;g=rh;h=Kq(d.segments[0].g,e);k=new pb(h);l=k.Pa.split(".").pop();m=ar[b];if(n=m[l])return w["return"](n);if(b==f.qa)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=lh([h],a.v.retryParameters);p.method="HEAD";return v(w,qq(a,p,g),2)}t=w.h;u=t.headers["content-type"];return u?w["return"](u.split(";")[0]):(x=m.mp4,w["return"](x))})}
681
- q.Kc=function(){var a=this,b,c;return H(function(d){if(1==d.g){if(!a.G)return d["return"]();A(d,2);return v(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.A.T(b),wa(d,0);c=F(d);if(!a.G)return d["return"]();c.severity=1;a.G.onError(c);a.A.T(.1);z(d)})};function wq(a,b){a.j=b;a.g&&a.g.Pc(a.j==pq);a.j!=pq||a.A.stop()}function qq(a,b,c){if(!a.D)throw new O(2,7,7001);b=a.G.networkingEngine.request(c,b);gh(a.D,b);return b.promise}K("shaka.hls.HlsParser",oq);
682
- var Pq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],ar={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",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
683
- vtt:"text/vtt",ttml:"application/ttml+xml"}},Mq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Wp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Wp(a,"URI");b=nq(b);b=nc(b.data);b=Nb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Vp(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Wp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Wp(a,"URI");a=nq(a);
684
- a=nc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Bn(a,b);return Nb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},pq="VOD",Rq="EVENT",Qq="LIVE",tq={Af:pq,kh:Rq,Ge:Qq};pi.m3u8=function(){return new oq};ni["application/x-mpegurl"]=function(){return new oq};ni["application/vnd.apple.mpegurl"]=function(){return new oq};function br(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,df:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=wc(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function cr(){}function dr(a,b,c,d){var e=new er;vh(b.headers).forEach(function(k,l){e.append(l,k)});var f=new fr,g={Je:!1,vf:!1};a=gr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Xg(a,function(){g.Je=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.vf=!0;f.abort()});h.T(b/1E3);a["finally"](function(){h.stop()})}return a}
685
- function gr(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,u,x,w,y,C,D;return H(function(B){switch(B.g){case 1:return g=hr,h=ir,n=m=0,p=Date.now(),A(B,2),v(B,g(a,c),4);case 4:return k=B.h,t=k.clone().body.getReader(),x=(u=k.headers.get("Content-Length"))?parseInt(u,10):0,w=function(E){function G(){var I,L;return H(function(J){switch(J.g){case 1:return A(J,2),v(J,t.read(),4);case 4:I=J.h;wa(J,3);break;case 2:return F(J),J["return"]();case 3:if(I.done){J.C(5);break}m+=I.value.byteLength;if(!f){J.C(5);break}return v(J,
686
- f(I.value),5);case 5:L=Date.now();if(100<L-p||I.done)e(L-p,m-n,x-m),n=m,p=L;I.done?E.close():(E.enqueue(I.value),G());z(J)}})}G()},new h({start:w}),v(B,k.arrayBuffer(),5);case 5:l=B.h;wa(B,3);break;case 2:y=F(B);if(d.Je)throw new O(1,1,7001,a,b);if(d.vf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,y,b);case 3:return C={},D=k.headers,D.forEach(function(E,G){C[G.trim()]=E}),B["return"](br(C,l,k.status,a,k.url,b))}})}
687
- function jr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",cr);cr.isSupported=jr;cr.parse=dr;var hr=window.fetch,fr=window.AbortController,ir=window.ReadableStream,er=window.Headers;jr()&&(ih("http",dr,2,!0),ih("https",dr,2,!0));function kr(){}
688
- function lr(a,b,c,d){var e=new mr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new O(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),t={};p=r(p);for(var u=p.next();!u.done;u=p.next())u=u.value.split(": "),t[u[0].toLowerCase()]=u.slice(1).join(": ");try{var x=br(t,n.response,n.status,a,n.responseURL,
689
- c);k(x)}catch(w){l(w)}};e.onerror=function(n){l(new O(1,1,1002,a,n,c))};e.ontimeout=function(){l(new O(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Xg(h,function(){e.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",kr);kr.parse=lr;var mr=window.XMLHttpRequest;
690
- ih("http",lr,1,!0);ih("https",lr,1,!0);function nr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function or(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}nr.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 pr(a){var b=this;this.U=a;this.g=new Map;this.M=new vf(function(){var c=Array.from(b.g.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.h=[];this.gf=function(){};this.ef=function(){};this.vc=new nr}pr.prototype.destroy=function(){return this.M.destroy()};function qr(a,b,c){a.gf=b;a.ef=c}function rr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
691
- function sr(a,b,c,d,e,f){wf(a.M);var g=or(a.vc,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return H(function(u){if(1==u.g)return v(u,tr(a,c),2);h=u.h;if(a.M.g)throw new O(2,9,7001);if(e)for(m in k=nc(h),l=new An(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.ef(p,t);a.vc.close(g,h.byteLength);var x=a.vc;a.gf(0==x.i?0:x.j/x.i,a.vc.h);return u["return"](f(h))})});a.g.set(b,d);return d}
692
- function ur(a,b,c){wf(a.M);var d=(a.g.get(b)||Promise.resolve()).then(function(){return H(function(e){return v(e,c(),0)})});a.g.set(b,d)}function vr(a){return H(function(b){return 1==b.g?v(b,Promise.all(a.g.values()),2):b["return"](a.vc.h)})}function tr(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=rh,d=a.U.request(c,b),e=function(){return d.abort()},a.h.push(e),v(g,d.promise,2);f=g.h;id(a.h,e);return g["return"](f.data)})};function wr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Xe;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}wr.prototype.abort=function(){var a=this;return H(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return v(b,a.g,4)}if(2!=b.g)return wa(b,0);F(b);z(b)})};
693
- function xr(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 v(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}wr.prototype.store=function(){return this.h};wr.prototype.promise=function(){return this.g};function yr(a){this.h=a;this.g=[]}yr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function zr(a,b){return Ar(a,b,"readwrite")}function Ar(a,b,c){c=a.h.transaction([b],c);var d=new wr(c,b);a.g.push(d);d.promise().then(function(){id(a.g,d)},function(){id(a.g,d)});return d};function Br(a,b,c){this.g=new yr(a);this.i=b;this.h=c}q=Br.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Cr(this.i)};q.removeSegments=function(a,b){return Dr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return H(function(d){if(1==d.g)return v(d,Er(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Me(e)}))})};q.addManifests=function(){return Cr(this.h)};
694
- q.updateManifestExpiration=function(a,b){var c=zr(this.g,this.h),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 Dr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return H(function(d){if(1==d.g)return v(d,Er(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.yc(e)})))})};
695
- q.getAllManifests=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Ar(a.g,a.h,"readonly"),c=new Map,v(d,xr(b,function(e,f){var g;return H(function(h){if(1==h.g)return v(h,a.yc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?v(d,b.promise(),3):d["return"](c)})};q.Me=function(a){return a};q.yc=function(a){return Promise.resolve(a)};function Cr(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}
696
- q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=zr(c.g,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Uc:g.Uc},k=h.next())l=k.value,g.Uc=e.add(l),g.Uc.onsuccess=function(n){return function(){f.push(n.Uc.result)}}(g);return v(m,d.promise(),2)}return m["return"](f)})};
697
- function Dr(a,b,c,d){a=zr(a.g,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Tc:e.Tc},f=c.next())e.Tc=f.value,b["delete"](e.Tc).onsuccess=function(g){return function(){return d(g.Tc)}}(e);return a.promise()}
698
- function Er(a,b,c){var d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Ar(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={tc:h.tc,pc:h.pc},l=k.next())h.pc=l.value,h.tc=e.get(h.pc),h.tc.onsuccess=function(n){return function(){void 0==n.tc.result&&g.push(n.pc);f[n.pc]=n.tc.result}}(h);return v(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Fr(a){this.g=new yr(a)}Fr.prototype.destroy=function(){return this.g.destroy()};Fr.prototype.getAll=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Ar(a.g,"session-ids","readonly"),c=[],v(d,xr(b,function(e,f){c.push(f)}),2)):3!=d.g?v(d,b.promise(),3):d["return"](c)})};Fr.prototype.add=function(a){var b=zr(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
699
- Fr.prototype.remove=function(a){var b=this,c;return H(function(d){return 1==d.g?(c=zr(b.g,"session-ids"),v(d,xr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):v(d,c.promise(),0)})};function Gr(){this.g=new Map}Gr.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Gr.prototype.init=function(){var a=this;Hr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
700
- function Ir(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{bb:d,Ea:f},Ea:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function Jr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({bb:d,Ea:f},e)})})}
701
- function Kr(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function Lr(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Mr(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
702
- function Nr(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=Hr,d.forEach(function(f){(f=f())&&b.push(f)})),v(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.C(0):v(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Or(a,b){Hr.set(a,b)}K("shaka.offline.StorageMuxer",Gr);Gr.unregister=function(a){Hr["delete"](a)};Gr.register=Or;Gr.prototype.destroy=Gr.prototype.destroy;var Hr=new Map;function Pr(){Br.apply(this,arguments)}ra(Pr,Br);Pr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return H(function(g){d=zr(c.g,c.h);e=d.store();f=new Xe;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return v(g,Promise.all([d.promise(),f]),0)})};
703
- Pr.prototype.yc=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=Qr(a.periods[c],e),b.push(f);return v(h,gp(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})})};
704
- function Qr(a,b){Rr(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Sr(e,a.startTime,b)})}
705
- function Sr(a,b,c){var d=a.initSegmentUri?Tr(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Tr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
706
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Pr.prototype.Me=function(a){return{data:a.data}};function Tr(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 O(2,9,9004,"Could not parse uri "+a);}
707
- function Rr(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
708
- f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Ur(){Br.apply(this,arguments)}ra(Ur,Br);
709
- Ur.prototype.yc=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=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Vr(n,k.startTime,k.startTime+e));f=l;b.push(f)}return v(h,gp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
632
+ function Np(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=On(d,"timescale",Un)||1;d=r(Gn(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=On(h,"presentationTime",Un)||0,l=On(h,"duration",Un)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.G.onTimelineRegionAdded(h)}}
633
+ function Tp(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=th,f=jj(b,c,d,a.v.retryParameters),g=a.G.networkingEngine,h=g.request(e,f),ih(a.i,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Rp(a,b){return nf(ff(a,b))?Rb:a.split("/")[0]}K("shaka.dash.DashParser",Ep);ri.mpd=function(){return new Ep};pi["application/dash+xml"]=function(){return new Ep};pi["video/vnd.mpeg.dash.mpd"]=function(){return new Ep};function Wp(a,b,c,d){this.g=a;this.type=b;this.aa=c;this.segments=d||null}function Xp(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Xp.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};
634
+ Xp.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Yp(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Zp(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function $p(a,b,c){c=void 0===c?[]:c;this.aa=b;this.g=a;this.h=c}function aq(a,b){this.name=a;this.value=b};function bq(a,b){return a.filter(function(c){return c.name==b})}function cq(a,b){return a.filter(function(c){return Zp(c,"TYPE")==b})}function dq(a,b){var c=bq(a,b);return c.length?c[0]:null}function eq(a,b,c){c=void 0===c?0:c;return(a=dq(a,b))?Number(a.value):c};function fq(a){this.h=a;this.g=0}function gq(a){hq(a,/[ \t]+/gm)}function hq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function iq(a){return a.g==a.h.length?null:(a=hq(a,/[^ \t\n]*/gm))?a[0]:null};function jq(){this.g=0}
635
+ function kq(a,b,c){b=tc(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 O(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=lq(a.g++,g),--a.g,mq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(nb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.xa;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=lq(a.g++,
636
+ l);if(nq.includes(l.name)){if(1!=b)throw new O(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=r(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=lq(a.g++,m),mq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Yp(m,"TYPE")?h.push(m):"MAP"==Yp(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Mb([d],[m.trim()])[0],l&&g.push(l),e.push(new $p(m,g,h)),g=[],h=[]);h.length&&
637
+ (l&&g.push(l),e.push(new $p("",g,h)));return new Wp(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.g.push(new aq("URI",k)),e=!0)}}return new Wp(c,b,f)}function lq(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new fq(e);var g;(g=hq(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=hq(e,h);)c.push(new aq(g[1],g[2]||g[3]))}return new Xp(a,d,c,f)}
638
+ var mq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),nq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function oq(){}function pq(a){try{var b=qq(a);return bh({uri:a,df:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return $g(c)}}function qq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new O(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new O(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=$c(a):e=xc(a);return{data:e,contentType:c}}
639
+ K("shaka.net.DataUriPlugin",oq);oq.parse=pq;kh("data",pq);function rq(){var a=this;this.v=this.G=null;this.za=1;this.B=new Map;this.o=new Map;this.va=new Set;this.h=new Map;this.g=null;this.L="";this.ba=new jq;this.ia=0;this.A=new P(function(){a.Kc()});this.j=sq;this.F=null;this.ha=0;this.H=Infinity;this.V=this.Ja=0;this.D=new hh;this.R=[];this.K=new Map;this.Ia=!1;this.l=new Map;this.O=null;this.ea=new Map;this.I=new Map;this.i=!1}q=rq.prototype;q.configure=function(a){this.v=a};
640
+ q.start=function(a,b){var c=this,d,e;return H(function(f){if(1==f.g)return c.G=b,c.i=b.isLowLatencyMode(),u(f,tq(c,nh([a],c.v.retryParameters),0),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,uq(c,d.data),3);e=c.ia;0<e&&c.A.T(e);return f["return"](c.F)})};q.stop=function(){this.A&&(this.A.stop(),this.A=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.v=this.G=null;this.va.clear();this.F=null;this.h.clear();this.o.clear();this.l.clear();this.B.clear();return Promise.all(a)};
641
+ q.update=function(){var a=this,b,c,d;return H(function(e){if(1==e.g){if(a.j==sq)return e["return"]();b=[];a.O=null;c=Array.from(a.h.values());return c.length?u(e,vq(a,c[0]),2):e.C(2)}for(d=1;d<c.length;d++)b.push(vq(a,c[d]));return u(e,Promise.all(b),0)})};
642
+ function vq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return H(function(x){if(1==x.g)return c=wq,d=b.Bf,e=new pb(d),a.i&&b.Ff&&sb(e,new vb("_HLS_skip=YES")),u(x,tq(a,nh([e.toString()],a.v.retryParameters),0),2);if(3!=x.g){f=x.h;g=kq(a.ba,f.data,f.uri);if(1!=g.type)throw new O(2,4,4017);h=bq(g.aa,"EXT-X-DEFINE");k=xq(a,h);l=b.stream;return u(x,yq(a,b.yd,g,l.mimeType,b.Yd,k,b.Kf),3)}m=x.h;l.segmentIndex.ec(m,a.g.xb());m.length&&(n=eq(g.aa,"EXT-X-MEDIA-SEQUENCE",0),p=b.Yd.get(n),l.segmentIndex.Fb(p));t=m[m.length-
643
+ 1];if(v=dq(g.aa,"EXT-X-ENDLIST"))zq(a,c.Af),a.g.eb(t.endTime);z(x)})}q.onExpirationUpdated=function(){};
644
+ function uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la,ma,Qa,Ha,tb;return H(function(Za){switch(Za.g){case 1:c=kq(a.ba,b,a.L);if(0!=c.type)throw new O(2,4,4022);d=bq(c.aa,"EXT-X-DEFINE");Aq(a,d);e=bq(c.aa,"EXT-X-MEDIA");f=bq(c.aa,"EXT-X-STREAM-INF");Bq(a,f);g=bq(c.aa,"EXT-X-SESSION-DATA");h=r(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Yp(l,"DATA-ID"),n=Yp(l,"URI"),p=Yp(l,"LANGUAGE"),t=Yp(l,"VALUE"),v=(new Map).set("id",m),n&&v.set("uri",Mb([a.L],[n])[0]),p&&v.set("language",
645
+ p),t&&v.set("value",t),x=new N("sessiondata",v),a.G)a.G.onEvent(x);return u(Za,Cq(a,e),2);case 2:return Dq(a,e),u(Za,Eq(a,f),3);case 3:return w=Za.h,u(Za,Fq(a,e),4);case 4:y=Za.h;if(!a.G)throw new O(2,7,7001);if(a.Ia&&0==w.length)throw new O(2,4,4034);D=C=Infinity;B=r(a.h.values());for(E=B.next();!E.done;E=B.next())G=E.value,C=Math.min(C,G.bf),"text"!=G.stream.type&&(D=Math.min(D,G.vg-G.bf));a.j!=sq?(a.g=new Q(0,a.v.defaultPresentationDelay?a.v.defaultPresentationDelay:a.V?a.V:3*a.ha),a.g.Pc(!1)):
646
+ (a.g=new Q(null,0),a.g.Pc(!0));Gq(a);if(a.j!=sq)a.ia=a.H,I=wq,a.j==I.Ge&&(L=a.g.sd,isNaN(a.v.availabilityWindowOverride)||(L=a.v.availabilityWindowOverride),a.g.xe(L));else for(a.g.eb(D),a.g.offset(-C),J=r(a.h.values()),E=J.next();!E.done;E=J.next())M=E.value,M.stream.segmentIndex.offset(-C),M.stream.segmentIndex.wb(0,D);a.R=[];R=[];U=r(w);for(Z=U.next();!Z.done;Z=U.next())for(ia=Z.value,la=r([ia.video,ia.audio]),ma=la.next();!ma.done;ma=la.next())(Qa=ma.value)&&R.push(Qa);return u(Za,Promise.all(R.map(function(eb){return H(function($a){return u($a,
647
+ eb.createSegmentIndex(),0)})})),5);case 5:Ha=r(R);for(ma=Ha.next();!ma.done;ma=Ha.next())tb=ma.value,a.R.push(tb.segmentIndex.P);Gq(a);a.F={presentationTimeline:a.g,variants:w,textStreams:y,imageStreams:[],offlineSessionIds:[],minBufferTime:0};a.G.makeTextStreamsForClosedCaptions(a.F);z(Za)}})}function Aq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Yp(e,"NAME");e=Yp(e,"VALUE");d&&e&&(a.B.has(d)||a.B.set(d,e))}}
648
+ function xq(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Yp(f,"NAME");var g=Yp(f,"VALUE");f=Yp(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.B.get(f))&&c.set(f,e)}return c}function Bq(a,b){for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Yp(e,"AUDIO");d=Yp(e,"VIDEO");var g=Yp(e,"SUBTITLES");e=Hq(a,e);if(g){var h=Pb(Rb,e);a.l.set(g,h);id(e,h)}f&&(g=Ob("audio",e),a.l.set(f,g));d&&(f=Ob("video",e),a.l.set(d,f))}}
649
+ function Fq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return H(function(v){if(1==v.g)return c=cq(b,"SUBTITLES"),d=c.map(function(x){var w,y,C;return H(function(D){if(1==D.g){if(w=a.v.disableText)return D["return"](null);A(D,2);return u(D,Iq(a,x),4)}if(2!=D.g)return y=D.h,D["return"](y.stream);C=F(D);if(a.v.hls.ignoreTextStreamFailures)return D["return"](null);throw C;})}),u(v,Promise.all(d),2);e=v.h;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Zp(h,"GROUP-ID"),l=a.l.get(k))if(m=a.o.get(k))for(n=
650
+ r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(x){return x}))})}function Cq(a,b){var c;return H(function(d){if(1==d.g)return b=b.filter(function(e){var f=Yp(e,"URI")||"";return"SUBTITLES"!=Yp(e,"TYPE")&&""!=f}),b.length?u(d,Iq(a,b[0]),2):d.C(2);c=b.slice(1).map(function(e){return Iq(a,e)});return u(d,Promise.all(c),0)})}
651
+ function Eq(a,b){var c,d,e;return H(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return H(function(x){if(1==x.g)return h=Yp(g,"FRAME-RATE"),k=Number(Yp(g,"AVERAGE-BANDWIDTH"))||Number(Zp(g,"BANDWIDTH")),l=Yp(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Yp(g,"VIDEO-RANGE"),u(x,Jq(a,g),2);if(v=x.h){for(var w=x["return"],y=v.audio,C=v.video,D=r(C),B=D.next();!B.done;B=D.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||
652
+ void 0,B.frameRate=Number(h)||void 0,B.hdr=t||void 0;D=a.v.disableAudio;if(!y.length||D)y=[null];D=a.v.disableVideo;if(!C.length||D)C=[null];D=[];y=r(y);for(B=y.next();!B.done;B=y.next()){B=B.value;for(var E=r(C),G=E.next();!G.done;G=E.next()){var I=G.value;G=B?B.stream:null;var L=I?I.stream:null,J=B?B.stream.drmInfos:null,M=I?I.stream.drmInfos:null;I=(I?I.yd:"")+" - "+(B?B.yd:"");G&&L&&J.length&&M.length&&!(0<li(J,M).length)||a.va.has(I)||(G={id:a.za++,language:G?G.language:"und",primary:!!G&&G.primary||
653
+ !!L&&L.primary,audio:G,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},D.push(G),a.va.add(I))}}x=w.call(x,D)}else x=x["return"]([]);return x})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(Ib,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
654
+ function Jq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return H(function(w){if(1==w.g)return c=Sb,d=Hq(a,b),e=Yp(b,"AUDIO"),f=Yp(b,"VIDEO"),h=(g=e||f)&&a.o.has(g)?a.o.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=Zp(b,"URI"),p=k.audio.find(function(y){return y&&y.yd==n}),t=Pb(c.ib,d),(v=Pb(c.Bb,d))&&!t?l=c.Bb:!h.length&&v&&t?(l=c.ib,d=[[t,v].join()]):k.audio.length&&p?(l=c.Bb,m=!0):l=k.video.length?c.Bb:c.ib,m?w.C(2):u(w,Kq(a,b,d,l),3);2!=w.g&&(x=w.h);if(x)k[x.stream.type]=[x];else if(null===x)return w["return"](null);
655
+ Lq(k);return w["return"](k)})}function Hq(a,b){var c=[];a.v.disableVideo||c.push("avc1.42E01E");a.v.disableAudio||c.push("mp4a.40.2");var d=Yp(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=kf(f);c.has(g)||(e.push(f),c.add(g))}return e}function Mq(a){a=Yp(a,"LANGUAGE")||"und";return Ub(a)}
656
+ function Lq(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Dq(a,b){var c=cq(b,"CLOSED-CAPTIONS");c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Mq(e);var f=Zp(e,"GROUP-ID");e=Zp(e,"INSTREAM-ID");a.K.get(f)||a.K.set(f,new Map);a.K.get(f).set(e,d)}}
657
+ function Iq(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,x;return H(function(w){if(1==w.g){c=Zp(b,"GROUP-ID");d="";var y=Zp(b,"TYPE").toLowerCase();"subtitles"==y&&(y=Rb);e=y;e!=Rb&&c&&a.l.has(c)&&(d=a.l.get(c));f=Nq(Zp(b,"URI"),a.B);if(a.h.has(f))return w["return"](a.h.get(f));g=Mq(b);h=Yp(b,"NAME");k=Yp(b,"DEFAULT");l="YES"==k;"audio"==e?y=(y=Yp(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:y=null;m=y;"audio"==e?y=(y=Yp(b,"CHANNELS"))?y.includes("/JOC"):!1:y=!1;n=y;p=Yp(b,"CHARACTERISTICS");t=Yp(b,"FORCED");
658
+ v="YES"==t;return u(w,Oq(a,f,d,e,g,l,h,m,null,p,v,n),2)}x=w.h;a.o.has(c)?a.o.get(c).push(x):a.o.set(c,[x]);if(null==x)return w["return"](null);if(a.h.has(f))return w["return"](a.h.get(f));a.h.set(f,x);return w["return"](x)})}
659
+ function Kq(a,b,c,d){var e,f,g,h;return H(function(k){if(1==k.g){e=Nq(Zp(b,"URI"),a.B);if(a.h.has(e))return k["return"](a.h.get(e));var l=Yp(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.K.get(l):null;g=Ob(d,c);return u(k,Oq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
660
+ function Oq(a,b,c,d,e,f,g,h,k,l,m,n){var p,t,v,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la,ma,Qa,Ha,tb,Za,eb,$a,yi,Jo,Ko,Lo,Mo,zi,Ai,Xf,No,Oo,Po,Qo;return H(function(kb){switch(kb.g){case 1:return p=Mb([a.L],[b])[0],u(kb,tq(a,nh([p],a.v.retryParameters),0),2);case 2:t=kb.h;p=t.uri;v=kq(a.ba,t.data,p);if(1!=v.type)throw new O(2,4,4017);x=[];if(v.segments)for(w=r(v.segments),y=w.next();!y.done;y=w.next())C=y.value,D=bq(C.aa,"EXT-X-KEY"),x.push.apply(x,ha(D));B=!1;E=[];G=new Set;I=r(x);for(L=I.next();!L.done;L=
661
+ I.next())if(J=L.value,M=Zp(J,"METHOD"),"NONE"!=M){B=!0;if("AES-128"==M)return a.Ia=!0,kb["return"](null);R=Zp(J,"KEYFORMAT");if(Z=(U=Pq[R])?U(J):null){if(Z.keyIds)for(ia=r(Z.keyIds),la=ia.next();!la.done;la=ia.next())ma=la.value,G.add(ma);E.push(Z)}}if(B&&!E.length)throw new O(2,4,4026);Qa=bq(v.aa,"EXT-X-DEFINE");Ha=xq(a,Qa);Qq(a,v);return u(kb,Rq(a,d,c,v,Ha),3);case 3:return tb=kb.h,Sq.includes(tb)&&(c=""),Za=new Map,eb=new Map,A(kb,4),u(kb,yq(a,b,v,tb,Za,Ha,eb),6);case 6:$a=kb.h;wa(kb,5);break;
662
+ case 4:yi=F(kb);if(4035==yi.code)return Ra("Skipping unsupported HLS stream",tb,b),kb["return"](null);throw yi;case 5:Jo=$a[0].startTime;Ko=$a[$a.length-1].endTime;Lo=new Vi($a);Mo=d==Rb?"subtitle":void 0;zi=[];if(l)for(Ai=r(l.split(",")),Xf=Ai.next();!Xf.done;Xf=Ai.next())No=Xf.value,zi.push(No);Po=(Oo=dq(v.aa,"EXT-X-SERVER-CONTROL"))?null!=Oo.getAttribute("CAN-SKIP-UNTIL"):!1;Qo={id:a.za++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Lo,mimeType:tb,codecs:c,
663
+ kind:Mo,encrypted:B,drmInfos:E,keyIds:G,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:zi,forced:m,channelsCount:h,audioSamplingRate:null,spatialAudio:n,closedCaptions:k,hdr:void 0,tilesLayout:void 0};return kb["return"]({stream:Qo,yd:b,Bf:p,bf:Jo,vg:Ko,Yd:Za,Kf:eb,Ff:Po})}})}
664
+ function Qq(a,b){var c=dq(b.aa,"EXT-X-PLAYLIST-TYPE"),d=dq(b.aa,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)zq(a,sq);else{c?zq(a,Tq):zq(a,Uq);d=dq(b.aa,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=dq(b.aa,"EXT-X-PART-INF");a.i&&c?(a.Ja=Number(Zp(c,"PART-TARGET")),a.H=Math.min(a.Ja,a.H),c=dq(b.aa,"EXT-X-SERVER-CONTROL"),a.V=c?Number(Zp(c,"PART-HOLD-BACK")):0):a.H=Math.min(d,a.H);a.ha=Math.max(d,a.ha)}}
665
+ function Vq(a,b,c,d){c=dq(c,"EXT-X-MAP");if(!c)return null;var e=Zp(c,"URI");d=Nq(Mb([b],[e])[0],d);b=[d,Yp(c,"BYTERANGE","")].join("-");a.ea.has(b)||(c=Wq(d,c),a.ea.set(b,c));return a.ea.get(b)}function Wq(a,b){var c=0,d=null,e=Yp(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ti(function(){return[a]},c,d)}
666
+ function Xq(a,b,c,d,e,f,g,h){var k=d.aa,l=Nq(d.g,g),m=dq(k,"EXTINF"),n=g=0,p=null,t=[];if(a.i&&d.h.length){a={};d=r(nb(d.h));for(var v=d.next();!v.done;a={Hd:a.Hd},v=d.next()){v=v.value;var x=v.xa;v=v.item;var w=0==x?c:t[t.length-1];x=0==x?e:w.endTime;var y=Number(Yp(v,"DURATION"));y=x+y;var C=0,D=null;"EXT-X-PRELOAD-HINT"==v.name?C=(w=Yp(v,"BYTERANGE-START"))?Number(w):0:(C=Yp(v,"BYTERANGE"),w=r(Yq(w,C)),C=w.next().value,D=w.next().value);v=Yp(v,"URI");a.Hd=Mb([h],[v])[0];t.push(new vi(x,y,function(B){return function(){return[B.Hd]}}(a),
667
+ C,D,b,f,0,Infinity))}}else if(!m)throw new O(2,4,4024,"EXTINF");m?g=e+Number(m.value.split(",")[0]):g=t[t.length-1].endTime;(h=dq(k,"EXT-X-BYTERANGE"))?(c=r(Yq(c,h.value)),n=c.next().value,p=c.next().value):t.length&&(n=t[0].Ca,p=t[t.length-1].wa);return new vi(e,g,function(){return l.length?[l]:[]},n,p,b,f,0,Infinity,t)}function Yq(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.wa+1,d=c+d-1);return[c,d]}
668
+ function Gq(a){if(a.g){for(var b=r(a.R),c=b.next();!c.done;c=b.next())a.g.hc(c.value);a.R=[]}}
669
+ function yq(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,M,R,U,Z,ia,la;return H(function(ma){switch(ma.g){case 1:h=c.segments;l=eq(c.aa,"EXT-X-MEDIA-SEQUENCE",0);n=(m=dq(c.aa,"EXT-X-SKIP"))?Number(Yp(m,"SKIPPED-SEGMENTS")):0;p=l+n;if(a.j!=sq&&e.has(p)){t=e.get(p);ma.C(2);break}if(null!=a.O){ma.C(3);break}k=Vq(a,c.g,h[0].aa,f);v=a;return u(ma,Zq(a,b,k,d,p,!1,h[0],f),4);case 4:v.O=ma.h;case 3:t=a.O;case 2:x=h[0].g;Va(x.split("/").pop());w=eq(c.aa,"EXT-X-DISCONTINUITY-SEQUENCE");if(a.i&&
670
+ (g.has(w)||g.set(w,p),n))for(;g.has(w+1)&&g.get(w+1)<p;)w++;y=a.I.get(w)||0;C=[];D=function(Qa){return nb(Qa)};B=r(D(h));E=B.next();case 5:if(E.done){ma.C(7);break}I=G=E.value;L=I.xa;J=I.item;M=C[C.length-1];R=0==L?t:M.endTime;p=l+n+L;e.set(p,R);k=Vq(a,c.g,J.aa,f);U=dq(J.aa,"EXT-X-DISCONTINUITY");if(!U){ma.C(8);break}w++;g.set(w,p);return u(ma,$q(a,w,b,k,d,p,J,f,R),9);case 9:y=ma.h;case 8:!a.i&&(Z=a.G.isAutoLowLatencyMode())&&(a.G.enableLowLatencyMode(),a.i=a.G.isLowLatencyMode());ia=dq(J.aa,"EXTINF");
671
+ a.i||ia?(la=Xq(a,k,M,J,R,y,f,c.g),C.push(la)):a.i||Ra("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.");E=B.next();ma.C(5);break;case 7:return ma["return"](C)}})}
672
+ function $q(a,b,c,d,e,f,g,h,k){var l,m;return H(function(n){if(1==n.g)return l=0,a.I.has(b)?(l=a.I.get(b),n.C(2)):u(n,Zq(a,c,d,e,f,!0,g,h),3);2!=n.g&&(m=n.h,l=k-m,a.I.set(b,l));return n["return"](l)})}
673
+ function ar(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:c=th;d=jj(b.Fa(),b.Ca,b.wa,a.v.retryParameters);if(a.v.hls.useFullSegmentsForStartTime)return k["return"](tq(a,d,c));e=jj(b.Fa(),b.Ca,b.Ca+2048-1,a.v.retryParameters);A(k,2);return u(k,tq(a,e,c),4);case 4:return f=k.h,k["return"](f);case 2:g=F(k);if(7001==g.code)throw g;Ra("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",
674
+ e.uris[0]);return u(k,tq(a,d,c),5);case 5:return h=k.h,k["return"](h)}})}
675
+ function Zq(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,x;return H(function(w){switch(w.g){case 1:k=Xq(a,c,null,g,0,0,h,"");if(a.F&&!f&&(l=a.h.get(b),m=l.Yd.get(e),void 0!=m))return w["return"](m);d=d.toLowerCase();if(Sq.includes(d))throw Ra("Raw formats are not yet supported. Skipping "+d),new O(1,4,4035);if("video/webm"==d)throw Ra("WebM in HLS is not yet supported. Skipping."),new O(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){w.C(2);break}n=[ar(a,k)];c&&n.push(ar(a,c));return u(w,Promise.all(n),3);case 3:return p=
676
+ w.h,t=p[0],v=p[1]||p[0],w["return"](br(b,t.uri,t.data,v.data));case 2:if("video/mp2t"!=d){w.C(4);break}return u(w,ar(a,k),5);case 5:return x=w.h,w["return"](cr(b,x.uri,x.data));case 4:throw new O(2,4,4030,b);}})}
677
+ function br(a,b,c,d){var e=0;(new Cc).box("moov",Gc).box("trak",Gc).box("mdia",Gc).Y("mdhd",function(h){e=Ne(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new O(2,4,4030,a,b);var f=0,g=!1;(new Cc).box("moof",Gc).box("traf",Gc).Y("tfdt",function(h){f=Me(h.reader,h.version).Od/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new O(2,4,4030,a,b);return f}
678
+ function cr(a,b,c){function d(){f.seek(g+188);h=f.na();71!=h&&(f.seek(g+192),h=f.na());71!=h&&(f.seek(g+204),h=f.na());71!=h&&e();f.kf(1)}function e(){throw new O(2,4,4030,a,b);}var f=new zc(c,0),g=0,h=0;for(c=Math.min(f.W.byteLength-188,940);;){g=f.ma();h=f.na();if(71!=h){if(0<c){--c;continue}e()}c=0;var k=f.kc();if(8191==(k&8191))d();else if(k&16384)if(k=(f.na()&48)>>4,0!=k&&2!=k||e(),3==k&&(k=f.na(),f.skip(k)),1!=f.S()>>8)d();else{f.skip(3);c=f.na()>>6;0!=c&&1!=c||e();0==f.na()&&e();c=f.na();k=
679
+ f.kc();var l=f.kc();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/9E4}else d()}}function Nq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new O(2,4,4039,f);}}return c}
680
+ function Rq(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,x;return H(function(w){if(1==w.g){f=Sb;g=th;h=Nq(d.segments[0].g,e);k=new pb(h);l=k.Pa.split(".").pop();m=dr[b];if(n=m[l])return w["return"](n);if(b==f.qa)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=nh([h],a.v.retryParameters);p.method="HEAD";return u(w,tq(a,p,g),2)}t=w.h;v=t.headers["content-type"];return v?w["return"](v.split(";")[0]):(x=m.mp4,w["return"](x))})}
681
+ q.Kc=function(){var a=this,b,c;return H(function(d){if(1==d.g){if(!a.G)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.A.T(b),wa(d,0);c=F(d);if(!a.G)return d["return"]();c.severity=1;a.G.onError(c);a.A.T(.1);z(d)})};function zq(a,b){a.j=b;a.g&&a.g.Pc(a.j==sq);a.j!=sq||a.A.stop()}function tq(a,b,c){if(!a.D)throw new O(2,7,7001);b=a.G.networkingEngine.request(c,b);ih(a.D,b);return b.promise}K("shaka.hls.HlsParser",rq);
682
+ var Sq=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],dr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
683
+ vtt:"text/vtt",ttml:"application/ttml+xml"}},Pq={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Zp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Zp(a,"URI");b=qq(b);b=nc(b.data);b=Nb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Yp(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Zp(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Zp(a,"URI");a=qq(a);
684
+ a=nc(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Dn(a,b);return Nb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},sq="VOD",Uq="EVENT",Tq="LIVE",wq={Af:sq,kh:Uq,Ge:Tq};ri.m3u8=function(){return new rq};pi["application/x-mpegurl"]=function(){return new rq};pi["application/vnd.apple.mpegurl"]=function(){return new rq};function er(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,df:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=wc(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function fr(){}function gr(a,b,c,d){var e=new hr;xh(b.headers).forEach(function(k,l){e.append(l,k)});var f=new ir,g={Je:!1,vf:!1};a=jr(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new Zg(a,function(){g.Je=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new P(function(){g.vf=!0;f.abort()});h.T(b/1E3);a["finally"](function(){h.stop()})}return a}
685
+ function jr(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,w,y,C,D;return H(function(B){switch(B.g){case 1:return g=kr,h=lr,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.h,t=k.clone().body.getReader(),x=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,w=function(E){function G(){var I,L;return H(function(J){switch(J.g){case 1:return A(J,2),u(J,t.read(),4);case 4:I=J.h;wa(J,3);break;case 2:return F(J),J["return"]();case 3:if(I.done){J.C(5);break}m+=I.value.byteLength;if(!f){J.C(5);break}return u(J,
686
+ f(I.value),5);case 5:L=Date.now();if(100<L-p||I.done)e(L-p,m-n,x-m),n=m,p=L;I.done?E.close():(E.enqueue(I.value),G());z(J)}})}G()},new h({start:w}),u(B,k.arrayBuffer(),5);case 5:l=B.h;wa(B,3);break;case 2:y=F(B);if(d.Je)throw new O(1,1,7001,a,b);if(d.vf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,y,b);case 3:return C={},D=k.headers,D.forEach(function(E,G){C[G.trim()]=E}),B["return"](er(C,l,k.status,a,k.url,b))}})}
687
+ function mr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",fr);fr.isSupported=mr;fr.parse=gr;var kr=window.fetch,ir=window.AbortController,lr=window.ReadableStream,hr=window.Headers;mr()&&(kh("http",gr,2,!0),kh("https",gr,2,!0));function nr(){}
688
+ function or(a,b,c,d){var e=new pr,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new O(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),t={};p=r(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),t[v[0].toLowerCase()]=v.slice(1).join(": ");try{var x=er(t,n.response,n.status,a,n.responseURL,
689
+ c);k(x)}catch(w){l(w)}};e.onerror=function(n){l(new O(1,1,1002,a,n,c))};e.ontimeout=function(){l(new O(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new Zg(h,function(){e.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",nr);nr.parse=or;var pr=window.XMLHttpRequest;
690
+ kh("http",or,1,!0);kh("https",or,1,!0);function qr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function rr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}qr.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 sr(a){var b=this;this.U=a;this.g=new Map;this.M=new vf(function(){var c=Array.from(b.g.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.h=[];this.gf=function(){};this.ef=function(){};this.vc=new qr}sr.prototype.destroy=function(){return this.M.destroy()};function tr(a,b,c){a.gf=b;a.ef=c}function ur(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
691
+ function vr(a,b,c,d,e,f){wf(a.M);var g=rr(a.vc,d);d=(a.g.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return H(function(v){if(1==v.g)return u(v,wr(a,c),2);h=v.h;if(a.M.g)throw new O(2,9,7001);if(e)for(m in k=nc(h),l=new Cn(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.ef(p,t);a.vc.close(g,h.byteLength);var x=a.vc;a.gf(0==x.i?0:x.j/x.i,a.vc.h);return v["return"](f(h))})});a.g.set(b,d);return d}
692
+ function xr(a,b,c){wf(a.M);var d=(a.g.get(b)||Promise.resolve()).then(function(){return H(function(e){return u(e,c(),0)})});a.g.set(b,d)}function yr(a){return H(function(b){return 1==b.g?u(b,Promise.all(a.g.values()),2):b["return"](a.vc.h)})}function wr(a,b){var c,d,e,f;return H(function(g){if(1==g.g)return c=th,d=a.U.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;id(a.h,e);return g["return"](f.data)})};function zr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new Xe;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}zr.prototype.abort=function(){var a=this;return H(function(b){if(1==b.g){try{a.i.abort()}catch(c){}A(b,2);return u(b,a.g,4)}if(2!=b.g)return wa(b,0);F(b);z(b)})};
693
+ function Ar(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 u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}zr.prototype.store=function(){return this.h};zr.prototype.promise=function(){return this.g};function Br(a){this.h=a;this.g=[]}Br.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Cr(a,b){return Dr(a,b,"readwrite")}function Dr(a,b,c){c=a.h.transaction([b],c);var d=new zr(c,b);a.g.push(d);d.promise().then(function(){id(a.g,d)},function(){id(a.g,d)});return d};function Er(a,b,c){this.g=new Br(a);this.i=b;this.h=c}q=Er.prototype;q.destroy=function(){return this.g.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Fr(this.i)};q.removeSegments=function(a,b){return Gr(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return H(function(d){if(1==d.g)return u(d,Hr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.Me(e)}))})};q.addManifests=function(){return Fr(this.h)};
694
+ q.updateManifestExpiration=function(a,b){var c=Cr(this.g,this.h),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 Gr(this,this.h,a,b)};q.getManifests=function(a){var b=this,c;return H(function(d){if(1==d.g)return u(d,Hr(b,b.h,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.yc(e)})))})};
695
+ q.getAllManifests=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Dr(a.g,a.h,"readonly"),c=new Map,u(d,Ar(b,function(e,f){var g;return H(function(h){if(1==h.g)return u(h,a.yc(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};q.Me=function(a){return a};q.yc=function(a){return Promise.resolve(a)};function Fr(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}
696
+ q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Cr(c.g,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Uc:g.Uc},k=h.next())l=k.value,g.Uc=e.add(l),g.Uc.onsuccess=function(n){return function(){f.push(n.Uc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
697
+ function Gr(a,b,c,d){a=Cr(a.g,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Tc:e.Tc},f=c.next())e.Tc=f.value,b["delete"](e.Tc).onsuccess=function(g){return function(){return d(g.Tc)}}(e);return a.promise()}
698
+ function Hr(a,b,c){var d,e,f,g,h,k,l;return H(function(m){if(1==m.g){d=Dr(a.g,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={tc:h.tc,pc:h.pc},l=k.next())h.pc=l.value,h.tc=e.get(h.pc),h.tc.onsuccess=function(n){return function(){void 0==n.tc.result&&g.push(n.pc);f[n.pc]=n.tc.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new O(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Ir(a){this.g=new Br(a)}Ir.prototype.destroy=function(){return this.g.destroy()};Ir.prototype.getAll=function(){var a=this,b,c;return H(function(d){return 1==d.g?(b=Dr(a.g,"session-ids","readonly"),c=[],u(d,Ar(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Ir.prototype.add=function(a){var b=Cr(this.g,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
699
+ Ir.prototype.remove=function(a){var b=this,c;return H(function(d){return 1==d.g?(c=Cr(b.g,"session-ids"),u(d,Ar(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Jr(){this.g=new Map}Jr.prototype.destroy=function(){for(var a=[],b=r(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Jr.prototype.init=function(){var a=this;Kr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
700
+ function Lr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{bb:d,Ea:f},Ea:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function Mr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({bb:d,Ea:f},e)})})}
701
+ function Nr(a,b,c){a=a.g.get(b);if(!a)throw new O(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new O(2,9,9013,"Could not find cell with name "+c);return b}function Or(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Pr(a){var b=Array.from(a.g.keys());if(!b.length)throw new O(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
702
+ function Qr(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=Kr,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.C(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Rr(a,b){Kr.set(a,b)}K("shaka.offline.StorageMuxer",Jr);Jr.unregister=function(a){Kr["delete"](a)};Jr.register=Rr;Jr.prototype.destroy=Jr.prototype.destroy;var Kr=new Map;function Sr(){Er.apply(this,arguments)}ra(Sr,Er);Sr.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return H(function(g){d=Cr(c.g,c.h);e=d.store();f=new Xe;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
703
+ Sr.prototype.yc=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=Tr(a.periods[c],e),b.push(f);return u(h,jp(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})})};
704
+ function Tr(a,b){Ur(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Vr(e,a.startTime,b)})}
705
+ function Vr(a,b,c){var d=a.initSegmentUri?Wr(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Wr(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
706
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Sr.prototype.Me=function(a){return{data:a.data}};function Wr(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 O(2,9,9004,"Could not parse uri "+a);}
707
+ function Ur(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
708
+ f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Xr(){Er.apply(this,arguments)}ra(Xr,Er);
709
+ Xr.prototype.yc=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=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Yr(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,jp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
710
710
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
711
- function Vr(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
712
- dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Wr(){Br.apply(this,arguments)}ra(Wr,Br);Wr.prototype.hasFixedKeySpace=function(){return!1};Wr.prototype.addSegments=function(a){return this.add(this.i,a)};Wr.prototype.addManifests=function(a){return this.add(this.h,a)};Wr.prototype.yc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Xr(){this.o=this.j=this.i=this.h=this.g=this.l=null}q=Xr.prototype;
713
- q.init=function(){var a=this,b=new Xe,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Pr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Ur(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Ur(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
714
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Wr(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Fr(d):null;a.o=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new O(2,9,9001,c.error));d.preventDefault()};return b};
715
- q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return v(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return v(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return v(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return v(b,a.j.destroy(),8);case 8:if(!a.o){b.C(10);break}return v(b,a.o.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
711
+ function Yr(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
712
+ dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Zr(){Er.apply(this,arguments)}ra(Zr,Er);Zr.prototype.hasFixedKeySpace=function(){return!1};Zr.prototype.addSegments=function(a){return this.add(this.i,a)};Zr.prototype.addManifests=function(a){return this.add(this.h,a)};Zr.prototype.yc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function $r(){this.o=this.j=this.i=this.h=this.g=this.l=null}q=$r.prototype;
713
+ q.init=function(){var a=this,b=new Xe,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Sr(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Xr(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Xr(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
714
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Zr(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new Ir(d):null;a.o=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new O(2,9,9001,c.error));d.preventDefault()};return b};
715
+ q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.o){b.C(10);break}return u(b,a.o.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
716
716
  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.o};
717
- q.erase=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return v(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return v(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return v(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return v(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),v(b,Yr(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,v(b,a.init(),0)}})};
718
- function Yr(){var a=new Xe,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}Or("idb",function(){return Sc()||!window.indexedDB?null:new Xr});function Zr(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Zr.prototype.bb=function(){return this.i};Zr.prototype.Ea=function(){return this.h};Zr.prototype.key=function(){return this.l};Zr.prototype.toString=function(){return this.j};
719
- function $r(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 Zr(b,c,d,Number(a[4])):null};function as(a,b){this.h=a;this.g=b}
720
- function bs(a,b){var c=new Q(null,0);c.cb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=cs(a,d,e,c);e=b.streams.filter(function(l){return l.type==Rb}).map(function(l){return ds(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ds(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
717
+ q.erase=function(){var a=this;return H(function(b){switch(b.g){case 1:if(!a.g){b.C(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.C(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.C(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.C(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,as(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
718
+ function as(){var a=new Xe,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}Rr("idb",function(){return Sc()||!window.indexedDB?null:new $r});function bs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}bs.prototype.bb=function(){return this.i};bs.prototype.Ea=function(){return this.h};bs.prototype.key=function(){return this.l};bs.prototype.toString=function(){return this.j};
719
+ function cs(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 bs(b,c,d,Number(a[4])):null};function ds(a,b){this.h=a;this.g=b}
720
+ function es(a,b){var c=new Q(null,0);c.eb(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=fs(a,d,e,c);e=b.streams.filter(function(l){return l.type==Rb}).map(function(l){return gs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return gs(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=r(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
721
721
  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}}
722
- function cs(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
723
- e.value,g=ds(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ds(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
724
- function ds(a,b,c){var d=b.segments.map(function(e){return es(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ti(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
725
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function es(a,b){var c=new Zr("segment",a.h,a.g,b.dataKey);return new wi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?fs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}
726
- function fs(a,b){var c=new Zr("segment",a.h,a.g,b);return new ri(function(){return[c.toString()]},0,null)};function gs(){this.g=null}q=gs.prototype;q.configure=function(){};
727
- 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=$r(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new Gr;va(m);return v(m,e.init(),4);case 4:return v(m,Kr(e,d.bb(),d.Ea()),5);case 5:return f=m.h,v(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new as(d.bb(),d.Ea()),l=bs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),v(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
728
- q.update=function(){};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 Gr,A(m,2,3),v(m,e.init(),5);case 5:return v(m,Kr(e,d.bb(),d.Ea()),6);case 6:return f=m.h,v(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.C(3);break}return v(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),v(m,e.destroy(),10);case 10:ya(m,0);break;case 2:F(m),m.C(3)}})};
729
- ni["application/x-offline-manifest"]=function(){return new gs};function hs(){}function is(a){var b=$r(a);b&&"manifest"==b.g?(a={uri:a,df:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=$g(a)):a=b&&"segment"==b.g?js(b.key(),b):Yg(new O(2,1,9004,a));return a}
730
- function js(a,b){var c=new Gr;return $g(void 0).ra(function(){return c.init()}).ra(function(){return Kr(c,b.bb(),b.Ea())}).ra(function(d){return d.getSegments([b.key()])}).ra(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}K("shaka.offline.OfflineScheme",hs);hs.plugin=is;ih("offline",is);function ks(a,b,c){var d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,u=r(m),x=u.next();!x.done;x=u.next())if(x=x.value,ls(x.info,p)){x.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.C(4);break}g=f.value;h=ms(a,b,g);return v(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.C(2);break;case 4:return l["return"](d)}})}
731
- function ms(a,b,c){var d,e;return H(function(f){switch(f.g){case 1:return d=new yh({fc:b,onError:function(){},pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),v(f,Gh(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return F(f),v(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),v(f,Qh(d),8);case 8:wa(f,7);break;case 6:return F(f),v(f,d.destroy(),
732
- 9);case 9:return f["return"]([]);case 7:return e=[],v(f,Promise.all(c.sessionIds.map(function(g){return H(function(h){if(1==h.g)return A(h,2),v(h,Rh(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);F(h);z(h)})})),10);case 10:return v(f,d.destroy(),11);case 11:return f["return"](e)}})}
733
- function ls(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jd(a.audioCapabilities,b.audioCapabilities,c)&&jd(a.videoCapabilities,b.videoCapabilities,c)};function ns(a,b,c){var d=b.presentationTimeline.getDuration();b=os(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function ps(a,b){var c=bs(new as(a.bb(),a.Ea()),b),d=b.appMetadata||{};c=os(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
734
- function os(a){var b=[],c=Ag(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(sg(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(tg(c.value));return b};function qs(){this.g={}}function rs(a,b,c){c=c.endTime-c.startTime;return ss(a,b)*c}function ss(a,b){var c=a.g[b];null==c&&(c=0);return c};function ts(a){var b=this;if(a&&a.constructor!=T)throw new O(2,9,9008);this.U=this.v=null;a?(this.v=a.v,this.U=a.Bc()):(this.v=jk(),this.U=new hh);this.vd=[];this.Lc=[];this.ie=[];var c=!a;this.M=new vf(function(){var d,e,f,g,h;return H(function(k){switch(k.g){case 1:return v(k,Promise.all(b.ie.map(function(l){return rr(l)})),2);case 2:d=function(){};e=[];f=r(b.Lc);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return v(k,Promise.all(e),3);case 3:if(!c){k.C(4);break}return v(k,b.U.destroy(),
735
- 4);case 4:b.v=null,b.U=null,z(k)}})})}function us(){if(Mc())a:{var a=r(Hr.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=ts.prototype;q.destroy=function(){return this.M.destroy()};
736
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Eb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return lk(this.v,a)};q.getConfiguration=function(){var a=jk();lk(a,this.v,jk());return a};q.Bc=function(){return this.U};
737
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new pr(this.U);this.ie.push(f);b=vs(this,a,b||{},function(){var h;return H(function(k){if(1==k.g)return v(k,mi(a,d.U,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Lb(h))})},e,f);var g=new Xg(b,function(){return rr(f)});g["finally"](function(){id(d.ie,f)});g.then=function(h){Eb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
738
- return g.promise.then(h)};return ws(this,g)};q.jg=function(){Eb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
739
- function vs(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,u,x,w;return H(function(y){switch(y.g){case 1:return xs(),h=g=null,k=new Gr,m=l=null,A(y,2,3),v(y,d(),5);case 5:return g=y.h,v(y,ys(a,b,g,e),6);case 6:n=y.h;zs(a);p=!n.presentationTimeline.Z()&&!n.presentationTimeline.Lb();if(!p)throw new O(2,9,9005,b);return v(y,As(a,n,function(C){m=m||C},e),7);case 7:h=y.h;zs(a);if(m)throw m;return v(y,a.ed(n,h,e),8);case 8:return v(y,k.init(),9);case 9:return zs(a),v(y,Ir(k),10);case 10:return l=y.h,zs(a),v(y,Bs(a,l.Ea,
740
- h,n,b,c,e,f),11);case 11:t=y.h;zs(a);if(m)throw m;return v(y,l.Ea.addManifests([t]),12);case 12:return u=y.h,zs(a),x=new Zr("manifest",l.path.bb,l.path.Ea,u[0]),y["return"](ps(x,t));case 3:return xa(y),a.vd=[],v(y,k.destroy(),13);case 13:if(!g){y.C(14);break}return v(y,g.stop(),14);case 14:if(!h){y.C(16);break}return v(y,h.destroy(),16);case 16:ya(y,0);break;case 2:w=F(y);if(!l){y.C(18);break}return v(y,l.Ea.removeSegments(a.vd,function(){}),18);case 18:throw m||w;}})}
741
- q.ed=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,u,x,w,y,C,D,B,E,G,I,L,J,M,R,U;return H(function(Z){switch(Z.g){case 1:d={width:Infinity,height:Infinity};eg(a,c.restrictions,d);c.useMediaCapabilities?jg(a,c.offline.usePersistentLicense):(ig(a),hg(a,b));e=[];f=c.preferredAudioChannelCount;Zf(a,f);g=r(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(sg(k));l=r(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(tg(n));p=r(a.imageStreams);for(t=p.next();!t.done;t=p.next())u=
742
- t.value,e.push(ug(u));return v(Z,c.offline.trackSelectionCallback(e),2);case 2:x=Z.h;w=a.presentationTimeline.getDuration();y=0;C=r(x);for(D=C.next();!D.done;D=C.next())B=D.value,E=B.bandwidth*w/8,y+=E;A(Z,3);return v(Z,c.offline.downloadSizeCallback(y),5);case 5:G=Z.h;if(!G)throw new O(2,9,9014);wa(Z,4);break;case 3:I=F(Z);if(I instanceof O)throw I;throw new O(2,9,9015);case 4:L=new Set;J=new Set;M=new Set;R=r(x);for(D=R.next();!D.done;D=R.next())U=D.value,"variant"==U.type&&L.add(U.id),"text"==
743
- U.type&&J.add(U.id),"image"==U.type&&M.add(U.id);a.variants=a.variants.filter(function(ia){return L.has(ia.id)});a.textStreams=a.textStreams.filter(function(ia){return J.has(ia.id)});a.imageStreams=a.imageStreams.filter(function(ia){return M.has(ia.id)});Cs(a);z(Z)}})};
744
- function Bs(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,u,x,w,y,C,D;return H(function(B){switch(B.g){case 1:return k=ns(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){u&&g.offline.usePersistentLicense&&x==G&&Ph(c,"cenc",E)},qr(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),t=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
745
- G.initData.length})}),u=p&&!t,x=null,u&&(w=c.i,x=Ds.get(w.keySystem)),va(B),C=y=Es(a,h,b,c,d,e,f,g),v(B,vr(h),4);case 4:C.size=B.h;y.expiration=c.Ac();D=Xh(c);y.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new O(2,9,9007);return B["return"](y);case 2:return xa(B),v(B,h.destroy(),5);case 5:ya(B,0)}})}q.remove=function(a){return Fs(this,Gs(this,a))};
746
- function Gs(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:xs();c=$r(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Gr;va(k);return v(k,e.init(),4);case 4:return v(k,Kr(e,d.bb(),d.Ea()),5);case 5:return f=k.h,v(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],v(k,Promise.all([Hs(a,h,e),Is(f,d,h)]),2);case 2:return xa(k),v(k,e.destroy(),8);case 8:ya(k,0)}})}
747
- function Js(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:ff(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ff(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Hs(a,b,c){return H(function(d){return v(d,Ks(a.U,a.v.drm,c,b),0)})}
748
- function Is(a,b,c){function d(){}var e=Ls(c);ps(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Hg=function(){return Fs(this,Ms(this))};
749
- function Ms(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return xs(),b=a.U,c=a.v.drm,d=new Gr,e=!1,va(n),v(n,d.init(),4);case 4:f=[],Lr(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.C(2);break}k=h.value;return v(n,k.getAll(),8);case 8:return l=n.h,v(n,ks(c,b,l),9);case 9:return m=n.h,v(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.C(5);break;case 2:return xa(n),v(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
750
- q.list=function(){return Fs(this,Ns())};function Ns(){var a,b,c;return H(function(d){switch(d.g){case 1:return xs(),a=[],b=new Gr,va(d),v(d,b.init(),4);case 4:return c=Promise.resolve(),Jr(b,function(e,f){c=c.then(function(){var g;return H(function(h){if(1==h.g)return v(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ps(new Zr("manifest",e.bb,e.Ea,l),k);a.push(m)});z(h)})})}),v(d,c,2);case 2:return xa(d),v(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
751
- function ys(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=null,f=a.U,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(){}},c.configure(d.manifest),zs(a),v(l,c.start(b,g),2);if(3!=l.g)return h=l.h,zs(a),k=Os(h),v(l,Promise.all(eb(k,
752
- function(m){return m.createSegmentIndex()})),3);zs(a);if(e)throw e;return l["return"](h)})}function As(a,b,c,d){var e;return H(function(f){switch(f.g){case 1:return e=new yh({fc:a.U,onError:c,pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),v(f,Dh(e,b.variants,d.offline.usePersistentLicense,d.useMediaCapabilities),2);case 2:return v(f,Qh(e),3);case 3:return v(f,Oh(e),4);case 4:return f["return"](e)}})}
753
- function Es(a,b,c,d,e,f,g,h){for(var k=new qs,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,t=m.video;p&&!t&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&t&&(n.g[t.id]=t.bandwidth||m.bandwidth);if(p&&t){var u=p.bandwidth||393216,x=t.bandwidth||m.bandwidth-u;0>=x&&(x=m.bandwidth);n.g[p.id]=u;n.g[t.id]=x}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=r(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
754
- n.set(null,Promise.resolve(null));m=new Map;p=Os(e);l=new Map;p=r(p);for(t=p.next();!t.done;t=p.next())t=t.value,u=Ps(a,b,c,k,e,t,h,n,m),l.set(t.id,u);a=r(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
755
- expiration:d.Ac(),streams:a,sessionIds:h?Xh(d):[],drmInfo:b,appMetadata:g}}
756
- function Ps(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
757
- tilesLayout:f.tilesLayout},m=f.id;Qs(f,e.presentationTimeline.xb(),function(n){var p=Rs(a,b,m,f.id,c,d,n.h,g,h),t=Ss(a,b,m,f.id,c,d,n,g,k);ur(b,m,function(){var u,x;return H(function(w){if(1==w.g)return v(w,p,2);if(3!=w.g)return u=w.h,v(w,t,3);x=w.h;l.segments.push({initSegmentKey:u,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:x});z(w)})})});return l}
758
- function Rs(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=hj(g.Fa(),g.Ca,g.wa,h.streaming.retryParameters);b=sr(b,c,h,.5*ss(f,d),!0,function(l){var m;return H(function(n){if(1==n.g)return v(n,e.addSegments([{data:l}]),2);m=n.h;a.vd.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
759
- function Ss(a,b,c,d,e,f,g,h,k){var l=[g.Fa()[0],g.Ca,g.wa].join("-");if(k.has(l))return k.get(l);h=hj(g.Fa(),g.Ca,g.wa,h.streaming.retryParameters);b=sr(b,c,h,rs(f,d,g),!1,function(m){var n;return H(function(p){if(1==p.g)return v(p,e.addSegments([{data:m}]),2);n=p.h;a.vd.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Qs(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 zs(a){if(a.M.g)throw new O(2,9,7001);}
760
- function xs(){if(!us())throw new O(2,9,9E3);}function Fs(a,b){return H(function(c){if(1==c.g)return a.Lc.push(b),va(c),v(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);id(a.Lc,b);return ya(c,0)})}function ws(a,b){var c=b.promise;a.Lc.push(c);return b["finally"](function(){id(a.Lc,c)})}
761
- function Ls(a){var b=[];a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
762
- function Ks(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Mr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Js(d,!1),videoCapabilities:Js(d,!0)}});return v(h,ks(b,a,f),2)}return 3!=h.g?(g=h.h,v(h,e.remove(g),3)):v(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
763
- function Os(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
764
- function Cs(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}K("shaka.offline.Storage",ts);ts.deleteAll=function(){var a;return H(function(b){return 1==b.g?(a=new Gr,va(b),v(b,Nr(a),2)):5!=b.g?(xa(b),v(b,a.destroy(),5)):ya(b,0)})};ts.prototype.list=ts.prototype.list;
765
- ts.prototype.removeEmeSessions=ts.prototype.Hg;ts.prototype.remove=ts.prototype.remove;ts.prototype.getStoreInProgress=ts.prototype.jg;ts.prototype.store=ts.prototype.store;ts.prototype.getNetworkingEngine=ts.prototype.Bc;ts.prototype.getConfiguration=ts.prototype.getConfiguration;ts.prototype.configure=ts.prototype.configure;ts.prototype.destroy=ts.prototype.destroy;ts.support=us;
766
- var Ds=(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");
767
- fm.offline=us;function Ts(){}function Us(){for(var a=r(Vs),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Ef()}catch(c){Ra("Error installing polyfill!",c)}}}function Ws(a,b){for(var c={priority:b||0,Ef:a},d=r(nb(Vs)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.xa;if(e.item.priority<c.priority){Vs.splice(f,0,c);return}}Vs.push(c)}K("shaka.polyfill",Ts);Ts.register=Ws;Ts.installAll=Us;var Vs=[];function Xs(){}function Ys(){Zs()}Ts.EncryptionScheme=Xs;Xs.install=Ys;Ws(Ys,-2);function $s(){}
768
- function at(){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}}),
769
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",bt);document.addEventListener("webkitfullscreenerror",bt);document.addEventListener("mozfullscreenchange",bt);document.addEventListener("mozfullscreenerror",bt);document.addEventListener("MSFullscreenChange",bt);document.addEventListener("MSFullscreenError",bt)}}
770
- function bt(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)}Ts.Fullscreen=$s;$s.install=at;Ws(at);function ct(){}function dt(){}Ts.MathRound=ct;ct.install=dt;Ws(dt);function et(){}function ft(){if(Sc()||Tc()||Qc("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),navigator.mediaCapabilities.decodingInfo=gt;window.shakaMediaCapabilities=navigator.mediaCapabilities}
771
- function gt(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,u,x,w;return H(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!Mc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Nc(g),!h)||a.audio&&(k=a.audio.contentType,
772
- l=Nc(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(u={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(u));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
773
- n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);A(y,3);return v(y,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:w=y.h;wa(y,4);break;case 3:F(y);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return y["return"](b)}})}Ts.MediaCapabilities=et;et.install=ft;Ws(ft,-1);function ht(){}function it(){var a=Uc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?jt():a?(kt(),12>=a?(lt(),mt()):lt()):(Qc("Tizen 2")||Qc("Tizen 3")||Qc("Tizen 4"))&&nt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&ot()}
774
- function lt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function mt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function kt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
775
- function nt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=kf(b)&&a(b)}}function jt(){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)}}
776
- function ot(){var a=MediaSource.isTypeSupported;Qc("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)})}Ts.MediaSource=ht;ht.install=it;Ws(it);function pt(){}function qt(){screen.orientation||void 0!=window.orientation&&rt()}function rt(){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 st;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new N("change");b.dispatchEvent(c)})}Ts.Orientation=pt;
777
- pt.install=qt;function st(){db.call(this);this.type="";this.angle=0}ra(st,db);
778
- st.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)};
779
- st.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Ws(qt);function tt(){}function ut(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vt,window.MediaKeys=wt,window.MediaKeySystemAccess=xt,navigator.requestMediaKeySystemAccess=yt)}function yt(a,b){try{var c=new xt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
780
- function vt(a){var b=this.mediaKeys;b&&b!=a&&zt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?zt(a,this):Promise.resolve()}function At(a){a=nc(a.initData);if(qc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=uc(a.subarray(4),!0);a=xc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=oc(a);this.dispatchEvent(b)}Ts.PatchedMediaKeysApple=tt;tt.install=ut;
781
- function xt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
722
+ function fs(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=
723
+ e.value,g=gs(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=gs(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
724
+ function gs(a,b,c){var d=b.segments.map(function(e){return hs(a,e)});c.hc(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Vi(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
725
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function hs(a,b){var c=new bs("segment",a.h,a.g,b.dataKey);return new vi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?is(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}
726
+ function is(a,b){var c=new bs("segment",a.h,a.g,b);return new ti(function(){return[c.toString()]},0,null)};function js(){this.g=null}q=js.prototype;q.configure=function(){};
727
+ 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=cs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new Jr;va(m);return u(m,e.init(),4);case 4:return u(m,Nr(e,d.bb(),d.Ea()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new ds(d.bb(),d.Ea()),l=es(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return xa(m),u(m,e.destroy(),7);case 7:ya(m,0)}})};q.stop=function(){return Promise.resolve()};
728
+ q.update=function(){};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 Jr,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Nr(e,d.bb(),d.Ea()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.C(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:F(m),m.C(3)}})};
729
+ pi["application/x-offline-manifest"]=function(){return new js};function ks(){}function ls(a){var b=cs(a);b&&"manifest"==b.g?(a={uri:a,df:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=bh(a)):a=b&&"segment"==b.g?ms(b.key(),b):$g(new O(2,1,9004,a));return a}
730
+ function ms(a,b){var c=new Jr;return bh(void 0).ra(function(){return c.init()}).ra(function(){return Nr(c,b.bb(),b.Ea())}).ra(function(d){return d.getSegments([b.key()])}).ra(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}K("shaka.offline.OfflineScheme",ks);ks.plugin=ls;kh("offline",ls);function ns(a,b,c){var d,e,f,g,h,k;return H(function(l){switch(l.g){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),x=v.next();!x.done;x=v.next())if(x=x.value,os(x.info,p)){x.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.C(4);break}g=f.value;h=ps(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.C(2);break;case 4:return l["return"](d)}})}
731
+ function ps(a,b,c){var d,e;return H(function(f){switch(f.g){case 1:return d=new Ah({fc:b,onError:function(){},pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Ih(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,Sh(d),8);case 8:wa(f,7);break;case 6:return F(f),u(f,d.destroy(),
732
+ 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return H(function(h){if(1==h.g)return A(h,2),u(h,Th(d,g),4);if(2!=h.g)return e.push(g),wa(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
733
+ function os(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&jd(a.audioCapabilities,b.audioCapabilities,c)&&jd(a.videoCapabilities,b.videoCapabilities,c)};function qs(a,b,c){var d=b.presentationTimeline.getDuration();b=rs(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function ss(a,b){var c=es(new ds(a.bb(),a.Ea()),b),d=b.appMetadata||{};c=rs(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
734
+ function rs(a){var b=[],c=Cg(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(ug(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(vg(c.value));return b};function ts(){this.g={}}function us(a,b,c){c=c.endTime-c.startTime;return vs(a,b)*c}function vs(a,b){var c=a.g[b];null==c&&(c=0);return c};function ws(a){var b=this;if(a&&a.constructor!=T)throw new O(2,9,9008);this.U=this.v=null;a?(this.v=a.v,this.U=a.Bc()):(this.v=lk(),this.U=new jh);this.vd=[];this.Lc=[];this.ie=[];var c=!a;this.M=new vf(function(){var d,e,f,g,h;return H(function(k){switch(k.g){case 1:return u(k,Promise.all(b.ie.map(function(l){return ur(l)})),2);case 2:d=function(){};e=[];f=r(b.Lc);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.C(4);break}return u(k,b.U.destroy(),
735
+ 4);case 4:b.v=null,b.U=null,z(k)}})})}function xs(){if(Mc())a:{var a=r(Kr.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=ws.prototype;q.destroy=function(){return this.M.destroy()};
736
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=jk(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Eb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return nk(this.v,a)};q.getConfiguration=function(){var a=lk();nk(a,this.v,lk());return a};q.Bc=function(){return this.U};
737
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new sr(this.U);this.ie.push(f);b=ys(this,a,b||{},function(){var h;return H(function(k){if(1==k.g)return u(k,oi(a,d.U,e.manifest.retryParameters,c||null),2);h=k.h;return k["return"](Lb(h))})},e,f);var g=new Zg(b,function(){return ur(f)});g["finally"](function(){id(d.ie,f)});g.then=function(h){Eb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead.");
738
+ return g.promise.then(h)};return zs(this,g)};q.jg=function(){Eb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
739
+ function ys(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,x,w;return H(function(y){switch(y.g){case 1:return As(),h=g=null,k=new Jr,m=l=null,A(y,2,3),u(y,d(),5);case 5:return g=y.h,u(y,Bs(a,b,g,e),6);case 6:n=y.h;Cs(a);p=!n.presentationTimeline.Z()&&!n.presentationTimeline.Lb();if(!p)throw new O(2,9,9005,b);return u(y,Ds(a,n,function(C){m=m||C},e),7);case 7:h=y.h;Cs(a);if(m)throw m;return u(y,a.ed(n,h,e),8);case 8:return u(y,k.init(),9);case 9:return Cs(a),u(y,Lr(k),10);case 10:return l=y.h,Cs(a),u(y,Es(a,l.Ea,
740
+ h,n,b,c,e,f),11);case 11:t=y.h;Cs(a);if(m)throw m;return u(y,l.Ea.addManifests([t]),12);case 12:return v=y.h,Cs(a),x=new bs("manifest",l.path.bb,l.path.Ea,v[0]),y["return"](ss(x,t));case 3:return xa(y),a.vd=[],u(y,k.destroy(),13);case 13:if(!g){y.C(14);break}return u(y,g.stop(),14);case 14:if(!h){y.C(16);break}return u(y,h.destroy(),16);case 16:ya(y,0);break;case 2:w=F(y);if(!l){y.C(18);break}return u(y,l.Ea.removeSegments(a.vd,function(){}),18);case 18:throw m||w;}})}
741
+ q.ed=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,x,w,y,C,D,B,E,G,I,L,J,M,R,U;return H(function(Z){switch(Z.g){case 1:d={width:Infinity,height:Infinity};eg(a,c.restrictions,d);c.useMediaCapabilities?jg(a,c.offline.usePersistentLicense):(ig(a),hg(a,b));e=[];f=c.preferredAudioChannelCount;Zf(a,f);g=r(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(ug(k));l=r(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(vg(n));p=r(a.imageStreams);for(t=p.next();!t.done;t=p.next())v=
742
+ t.value,e.push(wg(v));return u(Z,c.offline.trackSelectionCallback(e),2);case 2:x=Z.h;w=a.presentationTimeline.getDuration();y=0;C=r(x);for(D=C.next();!D.done;D=C.next())B=D.value,E=B.bandwidth*w/8,y+=E;A(Z,3);return u(Z,c.offline.downloadSizeCallback(y),5);case 5:G=Z.h;if(!G)throw new O(2,9,9014);wa(Z,4);break;case 3:I=F(Z);if(I instanceof O)throw I;throw new O(2,9,9015);case 4:L=new Set;J=new Set;M=new Set;R=r(x);for(D=R.next();!D.done;D=R.next())U=D.value,"variant"==U.type&&L.add(U.id),"text"==
743
+ U.type&&J.add(U.id),"image"==U.type&&M.add(U.id);a.variants=a.variants.filter(function(ia){return L.has(ia.id)});a.textStreams=a.textStreams.filter(function(ia){return J.has(ia.id)});a.imageStreams=a.imageStreams.filter(function(ia){return M.has(ia.id)});Fs(a);z(Z)}})};
744
+ function Es(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,x,w,y,C,D;return H(function(B){switch(B.g){case 1:return k=qs(e,d,f),l=g.offline.progressCallback,m=function(E,G){k.size=G;l(k,E)},n=function(E,G){v&&g.offline.usePersistentLicense&&x==G&&Rh(c,"cenc",E)},tr(h,m,n),p=d.variants.some(function(E){var G=E.audio&&E.audio.encrypted;return E.video&&E.video.encrypted||G}),t=d.variants.some(function(E){return(E.video?E.video.drmInfos:[]).concat(E.audio?E.audio.drmInfos:[]).some(function(G){return G.initData&&
745
+ G.initData.length})}),v=p&&!t,x=null,v&&(w=c.i,x=Gs.get(w.keySystem)),va(B),C=y=Hs(a,h,b,c,d,e,f,g),u(B,yr(h),4);case 4:C.size=B.h;y.expiration=c.Ac();D=Zh(c);y.sessionIds=g.offline.usePersistentLicense?D:[];if(p&&g.offline.usePersistentLicense&&!D.length)throw new O(2,9,9007);return B["return"](y);case 2:return xa(B),u(B,h.destroy(),5);case 5:ya(B,0)}})}q.remove=function(a){return Is(this,Js(this,a))};
746
+ function Js(a,b){var c,d,e,f,g,h;return H(function(k){switch(k.g){case 1:As();c=cs(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Jr;va(k);return u(k,e.init(),4);case 4:return u(k,Nr(e,d.bb(),d.Ea()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([Ks(a,h,e),Ls(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
747
+ function Ms(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:ff(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:ff(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ks(a,b,c){return H(function(d){return u(d,Ns(a.U,a.v.drm,c,b),0)})}
748
+ function Ls(a,b,c){function d(){}var e=Os(c);ss(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.Hg=function(){return Is(this,Ps(this))};
749
+ function Ps(a){var b,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.g){case 1:return As(),b=a.U,c=a.v.drm,d=new Jr,e=!1,va(n),u(n,d.init(),4);case 4:f=[],Or(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.C(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,ns(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.C(5);break;case 2:return xa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n["return"](!e)}})}
750
+ q.list=function(){return Is(this,Qs())};function Qs(){var a,b,c;return H(function(d){switch(d.g){case 1:return As(),a=[],b=new Jr,va(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Mr(b,function(e,f){c=c.then(function(){var g;return H(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=ss(new bs("manifest",e.bb,e.Ea,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return xa(d),u(d,b.destroy(),6);case 6:ya(d,3);break;case 3:return d["return"](a)}})}
751
+ function Bs(a,b,c,d){var e,f,g,h,k;return H(function(l){if(1==l.g)return e=null,f=a.U,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(){}},c.configure(d.manifest),Cs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Cs(a),k=Rs(h),u(l,Promise.all(fb(k,
752
+ function(m){return m.createSegmentIndex()})),3);Cs(a);if(e)throw e;return l["return"](h)})}function Ds(a,b,c,d){var e;return H(function(f){switch(f.g){case 1:return e=new Ah({fc:a.U,onError:c,pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Fh(e,b.variants,d.offline.usePersistentLicense,d.useMediaCapabilities),2);case 2:return u(f,Sh(e),3);case 3:return u(f,Qh(e),4);case 4:return f["return"](e)}})}
753
+ function Hs(a,b,c,d,e,f,g,h){for(var k=new ts,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,t=m.video;p&&!t&&(n.g[p.id]=p.bandwidth||m.bandwidth);!p&&t&&(n.g[t.id]=t.bandwidth||m.bandwidth);if(p&&t){var v=p.bandwidth||393216,x=t.bandwidth||m.bandwidth-v;0>=x&&(x=m.bandwidth);n.g[p.id]=v;n.g[t.id]=x}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.g[n.value.id]=52;l=r(e.imageStreams);for(n=l.next();!n.done;n=l.next())n=n.value,k.g[n.id]=n.bandwidth||2048;n=new Map;
754
+ n.set(null,Promise.resolve(null));m=new Map;p=Rs(e);l=new Map;p=r(p);for(t=p.next();!t.done;t=p.next())t=t.value,v=Ss(a,b,c,k,e,t,h,n,m),l.set(t.id,v);a=r(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.i)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,
755
+ expiration:d.Ac(),streams:a,sessionIds:h?Zh(d):[],drmInfo:b,appMetadata:g}}
756
+ function Ss(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,spatialAudio:f.spatialAudio,closedCaptions:f.closedCaptions,
757
+ tilesLayout:f.tilesLayout},m=f.id;Ts(f,e.presentationTimeline.xb(),function(n){var p=Us(a,b,m,f.id,c,d,n.h,g,h),t=Vs(a,b,m,f.id,c,d,n,g,k);xr(b,m,function(){var v,x;return H(function(w){if(1==w.g)return u(w,p,2);if(3!=w.g)return v=w.h,u(w,t,3);x=w.h;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:x});z(w)})})});return l}
758
+ function Us(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=jj(g.Fa(),g.Ca,g.wa,h.streaming.retryParameters);b=vr(b,c,h,.5*vs(f,d),!0,function(l){var m;return H(function(n){if(1==n.g)return u(n,e.addSegments([{data:l}]),2);m=n.h;a.vd.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
759
+ function Vs(a,b,c,d,e,f,g,h,k){var l=[g.Fa()[0],g.Ca,g.wa].join("-");if(k.has(l))return k.get(l);h=jj(g.Fa(),g.Ca,g.wa,h.streaming.retryParameters);b=vr(b,c,h,us(f,d,g),!1,function(m){var n;return H(function(p){if(1==p.g)return u(p,e.addSegments([{data:m}]),2);n=p.h;a.vd.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Ts(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 Cs(a){if(a.M.g)throw new O(2,9,7001);}
760
+ function As(){if(!xs())throw new O(2,9,9E3);}function Is(a,b){return H(function(c){if(1==c.g)return a.Lc.push(b),va(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);xa(c);id(a.Lc,b);return ya(c,0)})}function zs(a,b){var c=b.promise;a.Lc.push(c);return b["finally"](function(){id(a.Lc,c)})}
761
+ function Os(a){var b=[];a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
762
+ function Ns(a,b,c,d){var e,f,g;return H(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=Pr(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ms(d,!1),videoCapabilities:Ms(d,!0)}});return u(h,ns(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
763
+ function Rs(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=r(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
764
+ function Fs(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}K("shaka.offline.Storage",ws);ws.deleteAll=function(){var a;return H(function(b){return 1==b.g?(a=new Jr,va(b),u(b,Qr(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};ws.prototype.list=ws.prototype.list;
765
+ ws.prototype.removeEmeSessions=ws.prototype.Hg;ws.prototype.remove=ws.prototype.remove;ws.prototype.getStoreInProgress=ws.prototype.jg;ws.prototype.store=ws.prototype.store;ws.prototype.getNetworkingEngine=ws.prototype.Bc;ws.prototype.getConfiguration=ws.prototype.getConfiguration;ws.prototype.configure=ws.prototype.configure;ws.prototype.destroy=ws.prototype.destroy;ws.support=xs;
766
+ var Gs=(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");
767
+ hm.offline=xs;function Ws(){}function Xs(){for(var a=r(Ys),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Ef()}catch(c){Ra("Error installing polyfill!",c)}}}function Zs(a,b){for(var c={priority:b||0,Ef:a},d=r(nb(Ys)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.xa;if(e.item.priority<c.priority){Ys.splice(f,0,c);return}}Ys.push(c)}K("shaka.polyfill",Ws);Ws.register=Zs;Ws.installAll=Xs;var Ys=[];function $s(){}function at(){bt()}Ws.EncryptionScheme=$s;$s.install=at;Zs(at,-2);function ct(){}
768
+ function dt(){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}}),
769
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",et);document.addEventListener("webkitfullscreenerror",et);document.addEventListener("mozfullscreenchange",et);document.addEventListener("mozfullscreenerror",et);document.addEventListener("MSFullscreenChange",et);document.addEventListener("MSFullscreenError",et)}}
770
+ function et(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)}Ws.Fullscreen=ct;ct.install=dt;Zs(dt);function ft(){}function gt(){}Ws.MathRound=ft;ft.install=gt;Zs(gt);function ht(){}function it(){if(Sc()||Tc()||Qc("PlayStation 5")||!navigator.mediaCapabilities)navigator.mediaCapabilities||(navigator.mediaCapabilities={}),jt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=kt}
771
+ function kt(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,x,w;return H(function(y){switch(y.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return y["return"](b);if("media-source"==a.type){if(!Mc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return y["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=Nc(g),!h)||a.audio&&(k=a.audio.contentType,
772
+ l=Nc(k),!l))return y["return"](b)}else return y["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,y["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(t={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(t));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));x={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
773
+ n.length&&(x.audioCapabilities=n);p.length&&(x.videoCapabilities=p);A(y,3);return u(y,navigator.requestMediaKeySystemAccess(m.keySystem,[x]),5);case 5:w=y.h;wa(y,4);break;case 3:F(y);case 4:w&&(b.supported=!0,b.keySystemAccess=w);case 2:return y["return"](b)}})}Ws.MediaCapabilities=ht;ht.install=it;var jt=null;ht.originalMcap=jt;Zs(it,-1);function lt(){}function mt(){var a=Uc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?nt():a?(ot(),12>=a?(pt(),qt()):pt()):(Qc("Tizen 2")||Qc("Tizen 3")||Qc("Tizen 4"))&&rt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&st()}
774
+ function pt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function qt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function ot(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
775
+ function rt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=kf(b)&&a(b)}}function nt(){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)}}
776
+ function st(){var a=MediaSource.isTypeSupported;Qc("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)})}Ws.MediaSource=lt;lt.install=mt;Zs(mt);function tt(){}function ut(){screen.orientation||void 0!=window.orientation&&vt()}function vt(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new wt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new N("change");b.dispatchEvent(c)})}Ws.Orientation=tt;
777
+ tt.install=ut;function wt(){db.call(this);this.type="";this.angle=0}ra(wt,db);
778
+ wt.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
779
+ wt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Zs(ut);function xt(){}function yt(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=zt,window.MediaKeys=At,window.MediaKeySystemAccess=Bt,navigator.requestMediaKeySystemAccess=Ct)}function Ct(a,b){try{var c=new Bt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
780
+ function zt(a){var b=this.mediaKeys;b&&b!=a&&Dt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Dt(a,this):Promise.resolve()}function Et(a){a=nc(a.initData);if(qc(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=uc(a.subarray(4),!0);a=xc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=oc(a);this.dispatchEvent(b)}Ws.PatchedMediaKeysApple=xt;xt.install=yt;
781
+ function Bt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
782
782
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
783
- xt.prototype.createMediaKeys=function(){var a=new wt(this.keySystem);return Promise.resolve(a)};xt.prototype.getConfiguration=function(){return this.g};function wt(a){this.g=new WebKitMediaKeys(a);this.h=new xf}wt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Bt(this.g,a)};wt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
784
- function zt(a,b){a.h.Pb();if(!b)return Promise.resolve();a.h.m(b,"webkitneedkey",At);try{return Di(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Bt(a){db.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new xf;this.sessionId="";this.expiration=NaN;this.closed=new Xe;this.keyStatuses=new Ct}ra(Bt,db);q=Bt.prototype;
785
- q.generateRequest=function(a,b){var c=this;this.g=new Xe;try{var d=this.l.createSession("video/mp4",nc(b));this.j=d;this.sessionId=d.sessionId||"";this.h.m(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",oc(e.message));e=new N("message",e);c.dispatchEvent(e)});this.h.m(d,"webkitkeyadded",function(){c.i&&(Dt(c,"usable"),c.i.resolve(),c.i=null)});this.h.m(d,"webkitkeyerror",function(){var e=
786
- Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Dt(c,"output-not-allowed");break;default:Dt(c,"internal-error")}});Dt(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
787
- q.update=function(a){this.i=new Xe;try{this.j.update(nc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Pb()}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 Dt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}
788
- function Ct(){this.size=0;this.g=void 0}q=Ct.prototype;q.forEach=function(a){this.g&&a(this.g,ki.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ki.value();return this.g&&lc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ws(ut);function Et(){}function Ft(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Gt,window.MediaKeySystemAccess=Ht,navigator.requestMediaKeySystemAccess=It,HTMLMediaElement.prototype.setMediaKeys=Jt)}function It(a,b){try{var c=new Ht(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
789
- function Kt(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=oc(Cn(a.initData));this.dispatchEvent(b)}}Ts.PatchedMediaKeysMs=Et;Et.install=Ft;
790
- function Ht(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
783
+ Bt.prototype.createMediaKeys=function(){var a=new At(this.keySystem);return Promise.resolve(a)};Bt.prototype.getConfiguration=function(){return this.g};function At(a){this.g=new WebKitMediaKeys(a);this.h=new xf}At.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ft(this.g,a)};At.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
784
+ function Dt(a,b){a.h.Pb();if(!b)return Promise.resolve();a.h.m(b,"webkitneedkey",Et);try{return Fi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.webkitSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Ft(a){db.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new xf;this.sessionId="";this.expiration=NaN;this.closed=new Xe;this.keyStatuses=new Gt}ra(Ft,db);q=Ft.prototype;
785
+ q.generateRequest=function(a,b){var c=this;this.g=new Xe;try{var d=this.l.createSession("video/mp4",nc(b));this.j=d;this.sessionId=d.sessionId||"";this.h.m(this.j,"webkitkeymessage",function(e){c.g&&(c.g.resolve(),c.g=null);e=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",oc(e.message));e=new N("message",e);c.dispatchEvent(e)});this.h.m(d,"webkitkeyadded",function(){c.i&&(Ht(c,"usable"),c.i.resolve(),c.i=null)});this.h.m(d,"webkitkeyerror",function(){var e=
786
+ Error("EME PatchedMediaKeysApple key error");e.errorCode=c.j.error;if(null!=c.g)c.g.reject(e),c.g=null;else if(null!=c.i)c.i.reject(e),c.i=null;else switch(c.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ht(c,"output-not-allowed");break;default:Ht(c,"internal-error")}});Ht(this,"status-pending")}catch(e){this.g.reject(e)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
787
+ q.update=function(a){this.i=new Xe;try{this.j.update(nc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Pb()}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 Ht(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}
788
+ function Gt(){this.size=0;this.g=void 0}q=Gt.prototype;q.forEach=function(a){this.g&&a(this.g,mi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=mi.value();return this.g&&lc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Zs(yt);function It(){}function Jt(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=Kt,window.MediaKeySystemAccess=Lt,navigator.requestMediaKeySystemAccess=Mt,HTMLMediaElement.prototype.setMediaKeys=Nt)}function Mt(a,b){try{var c=new Lt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}
789
+ function Ot(a){if(a.initData){var b=new CustomEvent("encrypted");b.initDataType="cenc";b.initData=oc(En(a.initData));this.dispatchEvent(b)}}Ws.PatchedMediaKeysMs=It;It.install=Jt;
790
+ function Lt(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
791
791
  !0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.g=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
792
- Ht.prototype.createMediaKeys=function(){var a=new Gt(this.keySystem);return Promise.resolve(a)};Ht.prototype.getConfiguration=function(){return this.g};function Jt(a){var b=this.mediaKeys;b&&b!=a&&Lt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Lt(a,this):Promise.resolve()}function Gt(a){this.g=new MSMediaKeys(a);this.h=new xf}
793
- Gt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Mt(this.g,a)};Gt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Lt(a,b){a.h.Pb();if(!b)return Promise.resolve();a.h.m(b,"msneedkey",Kt);try{return Di(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
794
- function Mt(a){db.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new xf;this.sessionId="";this.expiration=NaN;this.closed=new Xe;this.keyStatuses=new Nt}ra(Mt,db);q=Mt.prototype;
795
- q.generateRequest=function(a,b){var c=this;this.g=new Xe;try{this.j=this.l.createSession("video/mp4",nc(b),null),this.h.m(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",oc(d.message));d=new N("message",d);c.dispatchEvent(d)}),this.h.m(this.j,"mskeyadded",function(){c.g?(Ot(c,"usable"),c.g.resolve(),c.g=null):c.i&&(Ot(c,"usable"),c.i.resolve(),c.i=null)}),this.h.m(this.j,"mskeyerror",
796
- function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Ot(c,"output-not-allowed");break;default:Ot(c,"internal-error")}}),Ot(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
797
- q.update=function(a){this.i=new Xe;try{this.j.update(nc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Pb()}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 Ot(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}
798
- function Nt(){this.size=0;this.g=void 0}q=Nt.prototype;q.forEach=function(a){this.g&&a(this.g,ki.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=ki.value();return this.g&&lc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Ws(Ft);function Pt(){}function Qt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Rt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=St,window.MediaKeys=Tt,window.MediaKeySystemAccess=Ut)}function Rt(){return Promise.reject(Error("The key system specified is not supported."))}
799
- function St(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ts.PatchedMediaKeysNop=Pt;Pt.install=Qt;function Tt(){throw new TypeError("Illegal constructor.");}Tt.prototype.createSession=function(){};Tt.prototype.setServerCertificate=function(){};function Ut(){this.keySystem="";throw new TypeError("Illegal constructor.");}Ut.prototype.getConfiguration=function(){};Ut.prototype.createMediaKeys=function(){};Ws(Qt,-10);function Vt(){}function Wt(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Xt="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Yt;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Zt;window.MediaKeys=$t;window.MediaKeySystemAccess=au}}
800
- function bu(a){var b=Xt;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Yt(a,b){try{var c=new au(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Zt(a){var b=this.mediaKeys;b&&b!=a&&cu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&cu(a,this);return Promise.resolve()}Ts.PatchedMediaKeysWebkit=Vt;Vt.install=Wt;
801
- function au(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");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
792
+ Lt.prototype.createMediaKeys=function(){var a=new Kt(this.keySystem);return Promise.resolve(a)};Lt.prototype.getConfiguration=function(){return this.g};function Nt(a){var b=this.mediaKeys;b&&b!=a&&Pt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Pt(a,this):Promise.resolve()}function Kt(a){this.g=new MSMediaKeys(a);this.h=new xf}
793
+ Kt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Qt(this.g,a)};Kt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function Pt(a,b){a.h.Pb();if(!b)return Promise.resolve();a.h.m(b,"msneedkey",Ot);try{return Fi(b,HTMLMediaElement.HAVE_METADATA,a.h,function(){b.msSetMediaKeys(a.g)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
794
+ function Qt(a){db.call(this);this.j=null;this.l=a;this.i=this.g=null;this.h=new xf;this.sessionId="";this.expiration=NaN;this.closed=new Xe;this.keyStatuses=new Rt}ra(Qt,db);q=Qt.prototype;
795
+ q.generateRequest=function(a,b){var c=this;this.g=new Xe;try{this.j=this.l.createSession("video/mp4",nc(b),null),this.h.m(this.j,"mskeymessage",function(d){c.g&&(c.g.resolve(),c.g=null);d=(new Map).set("messageType",void 0==c.keyStatuses.g?"license-request":"license-renewal").set("message",oc(d.message));d=new N("message",d);c.dispatchEvent(d)}),this.h.m(this.j,"mskeyadded",function(){c.g?(St(c,"usable"),c.g.resolve(),c.g=null):c.i&&(St(c,"usable"),c.i.resolve(),c.i=null)}),this.h.m(this.j,"mskeyerror",
796
+ function(){var d=Error("EME PatchedMediaKeysMs key error");d.errorCode=c.j.error;if(null!=c.g)c.g.reject(d),c.g=null;else if(null!=c.i)c.i.reject(d),c.i=null;else switch(c.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:St(c,"output-not-allowed");break;default:St(c,"internal-error")}}),St(this,"status-pending")}catch(d){this.g.reject(d)}return this.g};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
797
+ q.update=function(a){this.i=new Xe;try{this.j.update(nc(a))}catch(b){this.i.reject(b)}return this.i};q.close=function(){try{this.j.close(),this.closed.resolve(),this.h.Pb()}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 St(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}
798
+ function Rt(){this.size=0;this.g=void 0}q=Rt.prototype;q.forEach=function(a){this.g&&a(this.g,mi.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=mi.value();return this.g&&lc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Zs(Jt);function Tt(){}function Ut(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Vt,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Wt,window.MediaKeys=Xt,window.MediaKeySystemAccess=Yt)}function Vt(){return Promise.reject(Error("The key system specified is not supported."))}
799
+ function Wt(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Ws.PatchedMediaKeysNop=Tt;Tt.install=Ut;function Xt(){throw new TypeError("Illegal constructor.");}Xt.prototype.createSession=function(){};Xt.prototype.setServerCertificate=function(){};function Yt(){this.keySystem="";throw new TypeError("Illegal constructor.");}Yt.prototype.getConfiguration=function(){};Yt.prototype.createMediaKeys=function(){};Zs(Ut,-10);function Zt(){}function $t(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)au="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=bu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=cu;window.MediaKeys=du;window.MediaKeySystemAccess=eu}}
800
+ function fu(a){var b=au;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function bu(a,b){try{var c=new eu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function cu(a){var b=this.mediaKeys;b&&b!=a&&gu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&gu(a,this);return Promise.resolve()}Ws.PatchedMediaKeysWebkit=Zt;Zt.install=$t;
801
+ function eu(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");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
802
802
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
803
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}au.prototype.createMediaKeys=function(){var a=new $t(this.g);return Promise.resolve(a)};au.prototype.getConfiguration=function(){return this.h};function $t(a){this.l=a;this.g=null;this.h=new xf;this.i=[];this.j=new Map}
804
- function cu(a,b){a.g=b;a.h.Pb();var c=Xt;b&&(a.h.m(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=oc(d.initData);a.g.dispatchEvent(e)}),a.h.m(b,c+"keymessage",function(d){var e=du(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new N("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.m(b,c+"keyadded",function(d){if(d=du(a,d.sessionId))eu(d,"usable"),
805
- d.g&&d.g.resolve(),d.g=null}),a.h.m(b,c+"keyerror",function(d){var e=du(a,d.sessionId);e&&e.handleError(d)}))}$t.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.g||document.createElement("video");b.src||(b.src="about:blank");a=new fu(b,this.l,a);this.i.push(a);return a};$t.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
806
- function du(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 fu(a,b,c){db.call(this);this.j=a;this.o=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Xe;this.keyStatuses=new gu}ra(fu,db);q=fu.prototype;
807
- 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?eu(this,"output-restricted"):1==b?eu(this,"expired"):eu(this,"internal-error"))};
808
- function hu(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if("persistent-license"==a.l)if(c)var d=nc(xc("LOAD_SESSION|"+c));else{var e=xc("PERSISTENT|");d=cd(e,b)}else d=nc(b)}catch(g){return Promise.reject(g)}a.h=new Xe;var f=bu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).T(.01)}return a.h}
809
- function iu(a,b,c){if(a.g)a.g.then(function(){return iu(a,b,c)})["catch"](function(){return iu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=tc(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=$c(e.keys[0].k);e=$c(e.keys[0].kid)}else d=nc(c),e=null;var f=bu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
810
- function eu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return hu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?hu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Xe;iu(this,b,a);return b};
811
- 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=bu("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 gu(){this.size=0;this.g=void 0}q=gu.prototype;q.forEach=function(a){this.g&&a(this.g,ki.value())};q.get=function(a){if(this.has(a))return this.g};
812
- q.has=function(a){var b=ki.value();return this.g&&lc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Xt="";Ws(Wt);function ju(){}function ku(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=lu,Object.defineProperty(a,"disablePictureInPicture",{get:mu,set:nu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=ou,document.addEventListener("webkitpresentationmodechanged",pu,!0))}}
813
- function pu(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)}
814
- function lu(){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 ou(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
815
- function mu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function nu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ts.PiPWebkit=ju;ju.install=ku;Ws(ku);function qu(){}function ru(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=su)}function su(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ts.StorageEstimate=qu;qu.install=ru;Ws(ru);function tu(){}function uu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ts.VideoPlayPromise=tu;tu.install=uu;Ws(uu);function vu(){}function wu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=xu)}}function xu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ts.VideoPlaybackQuality=vu;vu.install=wu;Ws(wu);function yu(){}function zu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Au;else if(6==b)a=Bu;else{try{var c=!!Au(1,2,"")}catch(d){c=!1}c&&(a=Au)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Au(a,b,c){return new window.TextTrackCue(a,b,c)}function Bu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ts.VTTCue=yu;yu.install=zu;Ws(zu);function Cu(){}Cu.prototype.parseInit=function(){};Cu.prototype.parseMedia=function(a,b){var c=null,d=[],e=tc(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Du.exec(f))){var g=Eu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ld(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};K("shaka.text.LrcTextParser",Cu);Cu.prototype.parseMedia=Cu.prototype.parseMedia;
816
- Cu.prototype.parseInit=Cu.prototype.parseInit;var Du=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Eu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;of["application/x-subtitle-lrc"]=function(){return new Cu};function Fu(){}Fu.prototype.parseInit=function(){};
817
- Fu.prototype.parseMedia=function(a,b){var c=tc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new O(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new O(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new O(2,2,2005,"TTML does not contain <tt> tag.");e=g.getElementsByTagName("body")[0];if(!e)return[];c=In(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=In(g,"http://www.w3.org/ns/ttml#parameter",
818
- "subFrameRate"),k=In(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),l=In(g,"http://www.w3.org/ns/ttml#parameter","tickRate"),m=In(g,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=g.getAttribute("xml:space")||"default";var n=In(g,"http://www.w3.org/ns/ttml#styling","extent");if("default"!=f&&"preserve"!=f)throw new O(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;c=new Gu(c,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:
819
- null:null;h=(h=g.getElementsByTagName("metadata")[0])?Hn(h):[];k=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));l=[];for(var p=r(g),t=p.next();!t.done;t=p.next()){var u=t.value;t=new nd;var x=u.getAttribute("xml:id");if(x){t.id=x;var w=null;n&&(w=Hu.exec(n)||Iu.exec(n));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,C;if(y=Ju(u,k,"extent"))y=(C=Hu.exec(y))||Iu.exec(y),null!=y&&(t.width=Number(y[1]),t.height=Number(y[2]),C||(null!=x&&(t.width=100*t.width/
820
- x),null!=w&&(t.height=100*t.height/w)),t.widthUnits=C||null!=x?Dd:0,t.heightUnits=C||null!=w?Dd:0);if(u=Ju(u,k,"origin"))y=(C=Hu.exec(u))||Iu.exec(u),null!=y&&(t.viewportAnchorX=Number(y[1]),t.viewportAnchorY=Number(y[2]),C||(null!=w&&(t.viewportAnchorY=100*t.viewportAnchorY/w),null!=x&&(t.viewportAnchorX=100*t.viewportAnchorX/x)),t.viewportAnchorUnits=C||null!=x?Dd:0)}else t=null;t&&l.push(t)}if(En(e,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");e=r(En(e,"div"));for(n=
821
- e.next();!n.done;n=e.next()){n=n.value;if(En(n,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if((p=En(n,"p"))&&p.length)for(n=r(p),p=n.next();!p.done;p=n.next())(p=Ku(p.value,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(p);else(n=Ku(n,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(n)}}return d};
822
- function Ku(a,b,c,d,e,f,g,h,k,l){var m=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){var n=document.createElement("span");n.textContent=a.textContent;a=n}n="default"==(a.getAttribute("xml:space")||(h?"default":"preserve"));var p=Array.from(a.childNodes).every(function(y){return y.nodeType==Node.TEXT_NODE});h=[];if(!p)for(var t=r(a.childNodes),u=t.next();!u.done;u=t.next())(u=Ku(u.value,b,c,d,e,f,g,n,!0,l))&&h.push(u);t=/\S/.test(a.textContent);var x=a.hasAttribute("begin")||
823
- a.hasAttribute("end")||a.hasAttribute("dur");if(!(x||t||"br"==a.tagName||0!=h.length||k&&!n))return null;u=Lu(a,c);t=u.start;for(u=u.end;m&&m.nodeType==Node.ELEMENT_NODE&&"tt"!=m.tagName;)u=Mu(m,c,t,u),t=u.start,u=u.end,m=m.parentNode;null==t&&(t=0);t+=b;u=null==u?Infinity:u+b;if(!x&&0<h.length)for(t=Infinity,u=0,b=r(h),c=b.next();!c.done;c=b.next())c=c.value,t=Math.min(t,c.startTime),u=Math.max(u,c.endTime);if("br"==a.tagName)return d=new ld(t,u,""),d.lineBreak=!0,d;b="";p&&(b=a.textContent,n&&(b=
824
- b.trim(),b=b.replace(/\s+/g," ")));n=new ld(t,u,b);n.nestedCues=h;l&&(n.cellResolution=l);if((f=Nu(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var w=f.getAttribute("xml:id");n.region=g.filter(function(y){return y.id==w})[0]}g=null;l=r(Ou);for(p=l.next();!p.done&&!(g=Nu(a,"backgroundImage",d,"#",p.value)[0]);p=l.next());Pu(n,a,f,g,e,k,0==h.length);return n}
825
- function Pu(a,b,c,d,e,f,g){f=f||g;"rtl"==Qu(b,c,e,"direction",f)&&(a.direction="rtl");g=Qu(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=md);(g=Qu(b,c,e,"textAlign",f))?(a.positionAlign=Ru[g],a.lineAlign=Su[g],a.textAlign=xd[g.toUpperCase()]):a.textAlign="start";if(g=Qu(b,c,e,"displayAlign",f))a.displayAlign=yd[g.toUpperCase()];if(g=Qu(b,c,e,"color",f))a.color=g;if(g=Qu(b,c,e,"backgroundColor",
826
- f))a.backgroundColor=g;if(g=Qu(b,c,e,"border",f))a.border=g;if(g=Qu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Qu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Qu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Qu(b,c,e,"lineHeight",f))&&g.match(Tu)&&(a.lineHeight=g);(g=Qu(b,c,e,"fontSize",f))&&(g.match(Tu)||g.match(Uu))&&(a.fontSize=g);if(g=Qu(b,c,e,"fontStyle",f))a.fontStyle=Cd[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
827
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Qu(b,c,e,"letterSpacing",f))&&d.match(Tu)&&(a.letterSpacing=d);(d=Qu(b,c,e,"linePadding",f))&&d.match(Tu)&&(a.linePadding=d);if(f=Qu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Ju(c,e,"textDecoration"))&&Vu(a,c);(b=Wu(b,e,"textDecoration"))&&Vu(a,b)}
828
- function Vu(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&id(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&id(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
829
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&id(a.textDecoration,"overline")}}function Qu(a,b,c,d,e){e=void 0===e?!0:e;return(a=Wu(a,c,d))?a:e?Ju(b,c,d):null}function Ju(a,b,c){if(!a)return null;var d=In(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Xu(a,b,c)}function Wu(a,b,c){var d=In(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:Xu(a,b,c)}
830
- function Xu(a,b,c){a=Nu(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=In(a[e],"urn:ebu:tt:style",c);f||(f=In(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=Wu(a[e],b,c));f&&(d=f)}return d}
831
- function Nu(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?In(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Mu(a,b,c,d){a=Lu(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}}
832
- function Lu(a,b){var c=Yu(a.getAttribute("begin"),b),d=Yu(a.getAttribute("end"),b),e=Yu(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
833
- function Yu(a,b){var c=null;if(Zu.test(a)){c=Zu.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if($u.test(a))c=av($u,a);else if(bv.test(a))c=av(bv,a);else if(cv.test(a))c=cv.exec(a),c=Number(c[1])/b.frameRate;else if(dv.test(a))c=dv.exec(a),c=Number(c[1])/b.g;else if(ev.test(a))c=av(ev,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
834
- function av(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}K("shaka.text.TtmlTextParser",Fu);Fu.prototype.parseMedia=Fu.prototype.parseMedia;Fu.prototype.parseInit=Fu.prototype.parseInit;function Gu(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]))}
835
- var Hu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Uu=/^(\d{1,2}(?:\.\d+)?|100)%$/,Tu=/^(\d+px|\d+em|\d*\.?\d+c)$/,Iu=/^(\d+)px (\d+)px$/,Zu=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,$u=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,bv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,cv=/^(\d*(?:\.\d*)?)f$/,dv=/^(\d*(?:\.\d*)?)t$/,ev=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Su={left:sd,center:"center",right:"end",start:sd,end:"end"},Ru=
836
- {left:"line-left",center:"center",right:"line-right"},Ou=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];of["application/ttml+xml"]=function(){return new Fu};function fv(){this.A=new Fu}fv.prototype.parseInit=function(a){var b=!1;(new Cc).box("moov",Gc).box("trak",Gc).box("mdia",Gc).box("minf",Gc).box("stbl",Gc).Y("stsd",Ic).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};fv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Cc).box("mdat",Jc(function(f){d=!0;e=e.concat(c.A.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};K("shaka.text.Mp4TtmlParser",fv);fv.prototype.parseMedia=fv.prototype.parseMedia;
837
- fv.prototype.parseInit=fv.prototype.parseInit;of['application/mp4; codecs="stpp"']=function(){return new fv};of['application/mp4; codecs="stpp.ttml"']=function(){return new fv};of['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new fv};of['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new fv};function gv(){}gv.prototype.parseInit=function(){};
838
- gv.prototype.parseMedia=function(a,b){var c=tc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new O(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=hv(new cq(e[1]));if(null==c)throw new O(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
839
- [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new cq(g);var h=new nd;fq(g);dq(g);for(var k=fq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
840
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");dq(g);k=fq(g)}f.push(h)}e=new Map;iv(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new ld(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
841
- /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var u=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":n=!0;m.backgroundColor=u;break;case "color":n=!0;m.color=u;break;case "font-family":n=!0;m.fontFamily=u;break;case "font-size":n=!0;m.fontSize=u;break;case "font-weight":700<=parseInt(u,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(u){case "normal":n=!0;m.fontStyle=vd;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
842
- !0;m.opacity=parseFloat(u);break;case "white-space":n=!0,m.wrapLine="noWrap"!=u}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new cq(h[0]);m=hv(k);t=eq(k,/[ \t]+--\x3e[ \t]+/g);n=hv(k);if(null==m||null==t||null==n)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
843
- ""):h=new ld(m,n,"");jv(p,h,e);dq(k);for(m=fq(k);m;)kv(h,m,f),dq(k),m=fq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function iv(a){for(var b=r(Object.entries(Ad)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new ld(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Bd));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new ld(0,0,""),e.backgroundColor=d,a.set(c,e)}
844
- function jv(a,b,c){0===c.size&&iv(c);a=lv(a);var d=Un("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())mv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
845
- function lv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function nv(a,b){return a&&0<a.length?a:b}
846
- function mv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=nv(h.backgroundColor,e.backgroundColor),e.color=nv(h.color,e.color),e.fontFamily=nv(h.fontFamily,e.fontFamily),e.fontSize=nv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
847
- "italic";break;case "u":e.textDecoration.push("underline")}}if(Kn(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())mv(a.value,e,c,d)}
848
- function kv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pd:a.textAlign=xd[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
849
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=ov(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=zd[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rd,a.line=Number(c[1]),c[2]&&(a.lineAlign=zd[c[2].toUpperCase()])}function ov(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
850
- function hv(a){a=eq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}K("shaka.text.VttTextParser",gv);gv.prototype.parseMedia=gv.prototype.parseMedia;gv.prototype.parseInit=gv.prototype.parseInit;of["text/vtt"]=function(){return new gv};of['text/vtt; codecs="vtt"']=function(){return new gv};of['text/vtt; codecs="wvtt"']=function(){return new gv};function pv(){this.g=null}pv.prototype.parseInit=function(a){var b=this,c=!1;(new Cc).box("moov",Gc).box("trak",Gc).box("mdia",Gc).Y("mdhd",function(d){d=Ne(d.reader,d.version);b.g=d.timescale}).box("minf",Gc).box("stbl",Gc).Y("stsd",Ic).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};
851
- pv.prototype.parseMedia=function(a,b){if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Cc).box("moof",Gc).box("traf",Gc).Y("tfdt",function(B){g=!0;c=Me(B.reader,B.version).Od}).Y("tfhd",function(B){l=Le(B.reader,B.flags).Pe}).Y("trun",function(B){h=!0;d=Oe(B.reader,B.version,B.flags).lf}).box("mdat",Jc(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new zc(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var u=t.le||l,x=t.ud?
852
- c+t.ud:m;m=x+(u||0);var w=0;do{var y=n.S();w+=y;var C=n.S(),D=null;"vttc"==Kc(C)?8<y&&(D=n.zb(y-8)):n.skip(y-8);u&&D&&(y=qv(D,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(y))}while(t.sampleSize&&w<t.sampleSize)}return f.filter(Kb)};function qv(a,b,c){var d,e,f;(new Cc).box("payl",Jc(function(g){d=tc(g)})).box("iden",Jc(function(g){e=tc(g)})).box("sttg",Jc(function(g){f=tc(g)})).parse(a);return d?rv(d,e,f,b,c):null}
853
- function rv(a,b,c,d,e){d=new ld(d,e,"");jv(a,d,new Map);b&&(d.id=b);if(c)for(a=new cq(c),b=fq(a);b;)kv(d,b,[]),dq(a),b=fq(a);return d}K("shaka.text.Mp4VttParser",pv);pv.prototype.parseMedia=pv.prototype.parseMedia;pv.prototype.parseInit=pv.prototype.parseInit;of['application/mp4; codecs="wvtt"']=function(){return new pv};function sv(){}sv.prototype.parseInit=function(){};sv.prototype.parseMedia=function(a){var b=tc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new cq(c[0]),e=tv(d),f=eq(d,/,/g);d=tv(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ld(e,d,c.slice(1).join("\n").trim()))}return a};
854
- function tv(a){a=eq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}K("shaka.text.SbvTextParser",sv);sv.prototype.parseMedia=sv.prototype.parseMedia;sv.prototype.parseInit=sv.prototype.parseInit;of["text/x-subviewer"]=function(){return new sv};function uv(){this.A=new gv}uv.prototype.parseInit=function(){};uv.prototype.parseMedia=function(a,b){var c=tc(a);c=vv(c);c=nc(xc(c));return this.A.parseMedia(c,b)};function vv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}K("shaka.text.SrtTextParser",uv);uv.srt2webvtt=vv;uv.prototype.parseMedia=uv.prototype.parseMedia;
855
- uv.prototype.parseInit=uv.prototype.parseInit;of["text/srt"]=function(){return new uv};function wv(){}wv.prototype.parseInit=function(){};
856
- wv.prototype.parseMedia=function(a){var b="",c="";a=tc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=xv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=yv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(zv);else if("Style"==e){e=f.split(zv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
857
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Md:e.Md},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=yv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(zv);else if("Dialogue"==f){g=g.split(zv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Av(f.Start);var k=Av(f.End);g=new ld(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Md=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Md}}(e)))&&Bv(g,f);d.push(g)}return d};
858
- function Bv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Cv(c))a.color=c;if(c=b.BackColour)if(c=Cv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=td;a.textAlign="start";break;case 2:a.displayAlign=td;a.textAlign=pd;break;case 3:a.displayAlign=td;a.textAlign="end";
803
+ d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}eu.prototype.createMediaKeys=function(){var a=new du(this.g);return Promise.resolve(a)};eu.prototype.getConfiguration=function(){return this.h};function du(a){this.l=a;this.g=null;this.h=new xf;this.i=[];this.j=new Map}
804
+ function gu(a,b){a.g=b;a.h.Pb();var c=au;b&&(a.h.m(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=oc(d.initData);a.g.dispatchEvent(e)}),a.h.m(b,c+"keymessage",function(d){var e=hu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.g?"licenserequest":"licenserenewal").set("message",d.message),d=new N("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.h.m(b,c+"keyadded",function(d){if(d=hu(a,d.sessionId))iu(d,"usable"),
805
+ d.g&&d.g.resolve(),d.g=null}),a.h.m(b,c+"keyerror",function(d){var e=hu(a,d.sessionId);e&&e.handleError(d)}))}du.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.g||document.createElement("video");b.src||(b.src="about:blank");a=new ju(b,this.l,a);this.i.push(a);return a};du.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
806
+ function hu(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 ju(a,b,c){db.call(this);this.j=a;this.o=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new Xe;this.keyStatuses=new ku}ra(ju,db);q=ju.prototype;
807
+ 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?iu(this,"output-restricted"):1==b?iu(this,"expired"):iu(this,"internal-error"))};
808
+ function lu(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;try{if("persistent-license"==a.l)if(c)var d=nc(xc("LOAD_SESSION|"+c));else{var e=xc("PERSISTENT|");d=cd(e,b)}else d=nc(b)}catch(g){return Promise.reject(g)}a.h=new Xe;var f=fu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new P(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).T(.01)}return a.h}
809
+ function mu(a,b,c){if(a.g)a.g.then(function(){return mu(a,b,c)})["catch"](function(){return mu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=tc(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=$c(e.keys[0].k);e=$c(e.keys[0].kid)}else d=nc(c),e=null;var f=fu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
810
+ function iu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new N("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return lu(this,b,null)};q.load=function(a){return"persistent-license"==this.l?lu(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Xe;mu(this,b,a);return b};
811
+ 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=fu("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 ku(){this.size=0;this.g=void 0}q=ku.prototype;q.forEach=function(a){this.g&&a(this.g,mi.value())};q.get=function(a){if(this.has(a))return this.g};
812
+ q.has=function(a){var b=mi.value();return this.g&&lc(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var au="";Zs($t);function nu(){}function ou(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=pu,Object.defineProperty(a,"disablePictureInPicture",{get:qu,set:ru,enumerable:!0,configurable:!0}),document.exitPictureInPicture=su,document.addEventListener("webkitpresentationmodechanged",tu,!0))}}
813
+ function tu(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)}
814
+ function pu(){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 su(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
815
+ function qu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function ru(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Ws.PiPWebkit=nu;nu.install=ou;Zs(ou);function uu(){}function vu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=wu)}function wu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Ws.StorageEstimate=uu;uu.install=vu;Zs(vu);function xu(){}function yu(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}Ws.VideoPlayPromise=xu;xu.install=yu;Zs(yu);function zu(){}function Au(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Bu)}}function Bu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ws.VideoPlaybackQuality=zu;zu.install=Au;Zs(Au);function Cu(){}function Du(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Eu;else if(6==b)a=Fu;else{try{var c=!!Eu(1,2,"")}catch(d){c=!1}c&&(a=Eu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Eu(a,b,c){return new window.TextTrackCue(a,b,c)}function Fu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Ws.VTTCue=Cu;Cu.install=Du;Zs(Du);function Gu(){}Gu.prototype.parseInit=function(){};Gu.prototype.parseMedia=function(a,b){var c=null,d=[],e=tc(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Hu.exec(f))){var g=Iu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ld(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};K("shaka.text.LrcTextParser",Gu);Gu.prototype.parseMedia=Gu.prototype.parseMedia;
816
+ Gu.prototype.parseInit=Gu.prototype.parseInit;var Hu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Iu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;of["application/x-subtitle-lrc"]=function(){return new Gu};function Ju(){}Ju.prototype.parseInit=function(){};
817
+ Ju.prototype.parseMedia=function(a,b){var c=tc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(D){throw new O(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new O(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new O(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=Ln(g,Ku,"frameRate"),k=Ln(g,Ku,"subFrameRate"),l=Ln(g,Ku,"frameRateMultiplier"),
818
+ m=Ln(g,Ku,"tickRate"),n=Ln(g,Ku,"cellResolution");c=g.getAttribute("xml:space")||"default";e=Ln(g,Lu,"extent");if("default"!=c&&"preserve"!=c)throw new O(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Mu(h,k,l,m);n=n?(n=/^(\d+) (\d+)$/.exec(n))?{columns:parseInt(n[1],10),rows:parseInt(n[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?Jn(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var p=r(g),t=p.next();!t.done;t=
819
+ p.next()){var v=t.value;t=new nd;var x=v.getAttribute("xml:id");if(x){t.id=x;var w=null;e&&(w=Nu.exec(e)||Ou.exec(e));x=w?Number(w[1]):null;w=w?Number(w[2]):null;var y,C;if(y=Pu(v,l,"extent"))y=(C=Nu.exec(y))||Ou.exec(y),null!=y&&(t.width=Number(y[1]),t.height=Number(y[2]),C||(null!=x&&(t.width=100*t.width/x),null!=w&&(t.height=100*t.height/w)),t.widthUnits=C||null!=x?Dd:0,t.heightUnits=C||null!=w?Dd:0);if(v=Pu(v,l,"origin"))y=(C=Nu.exec(v))||Ou.exec(v),null!=y&&(t.viewportAnchorX=Number(y[1]),t.viewportAnchorY=
820
+ Number(y[2]),C||(null!=w&&(t.viewportAnchorY=100*t.viewportAnchorY/w),null!=x&&(t.viewportAnchorX=100*t.viewportAnchorX/x)),t.viewportAnchorUnits=C||null!=x?Dd:0)}else t=null;t&&m.push(t)}if(Gn(f,"p").length)throw new O(2,2,2001,"<p> can only be inside <div> in TTML");e=r(Gn(f,"div"));for(p=e.next();!p.done;p=e.next())if(Gn(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");(f=Qu(f,b.periodStart,h,k,l,g,m,c,n,null,!1))&&d.push(f)}return d};
821
+ function Qu(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 t=null,v=r(Ru),x=v.next();!x.done&&!(t=Su(p,"backgroundImage",d,"#",x.value)[0]);x=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));x=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
822
+ a=[];if(!x)for(var w=r(p.childNodes),y=w.next();!y.done;y=w.next())(y=Qu(y.value,b,c,d,e,f,g,h,k,p,m))&&a.push(y);d=null!=l;w=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||w||"br"==p.tagName||0!=a.length||d&&!h))return null;y=Tu(p,c);w=y.start;for(y=y.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)y=Uu(n,c,w,y),w=y.start,y=y.end,n=n.parentNode;null==w&&(w=0);w+=b;y=null==y?Infinity:y+b;if(!C&&0<a.length)for(w=Infinity,y=0,b=r(a),
823
+ c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),y=Math.max(y,c.endTime);if("br"==p.tagName)return e=new ld(w,y,""),e.lineBreak=!0,e;b="";x&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ld(w,y,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Su(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var D=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==D})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
824
+ (g=Su(l,"region",f,"")[0]);Vu(b,p,g,t,e,v,0==a.length);return b}
825
+ function Vu(a,b,c,d,e,f,g){f=f||g;"rtl"==Wu(b,c,e,"direction",f)&&(a.direction="rtl");g=Wu(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=md);(g=Wu(b,c,e,"textAlign",!0))?(a.positionAlign=Xu[g],a.lineAlign=Yu[g],a.textAlign=xd[g.toUpperCase()]):a.textAlign="start";if(g=Wu(b,c,e,"displayAlign",!0))a.displayAlign=yd[g.toUpperCase()];if(g=Wu(b,c,e,"color",f))a.color=g;if(g=Wu(b,c,e,"backgroundColor",
826
+ f))a.backgroundColor=g;if(g=Wu(b,c,e,"border",f))a.border=g;if(g=Wu(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Wu(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Wu(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Wu(b,c,e,"lineHeight",f))&&g.match(Zu)&&(a.lineHeight=g);(g=Wu(b,c,e,"fontSize",f))&&(g.match(Zu)||g.match($u))&&(a.fontSize=g);if(g=Wu(b,c,e,"fontStyle",f))a.fontStyle=Cd[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
827
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=Wu(b,c,e,"letterSpacing",f))&&d.match(Zu)&&(a.letterSpacing=d);(d=Wu(b,c,e,"linePadding",f))&&d.match(Zu)&&(a.linePadding=d);if(f=Wu(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Pu(c,e,"textDecoration"))&&av(a,c);(b=bv(b,e,"textDecoration"))&&av(a,b)}
828
+ function av(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&id(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&id(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
829
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&id(a.textDecoration,"overline")}}function Wu(a,b,c,d,e){e=void 0===e?!0:e;return(a=bv(a,c,d))?a:e?Pu(b,c,d):null}function Pu(a,b,c){if(!a)return null;var d=Ln(a,Lu,c);return d?d:cv(a,b,c)}function bv(a,b,c){var d=Ln(a,Lu,c);return d?d:cv(a,b,c)}
830
+ function cv(a,b,c){a=Su(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Kn(a[e],"urn:ebu:tt:style",c);f||(f=Ln(a[e],Lu,c));f||(f=bv(a[e],b,c));f&&(d=f)}return d}
831
+ function Su(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Kn(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function Uu(a,b,c,d){a=Tu(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}}
832
+ function Tu(a,b){var c=dv(a.getAttribute("begin"),b),d=dv(a.getAttribute("end"),b),e=dv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
833
+ function dv(a,b){var c=null;if(ev.test(a)){c=ev.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(fv.test(a))c=gv(fv,a);else if(hv.test(a))c=gv(hv,a);else if(iv.test(a))c=iv.exec(a),c=Number(c[1])/b.frameRate;else if(jv.test(a))c=jv.exec(a),c=Number(c[1])/b.g;else if(kv.test(a))c=gv(kv,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
834
+ function gv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}K("shaka.text.TtmlTextParser",Ju);Ju.prototype.parseMedia=Ju.prototype.parseMedia;Ju.prototype.parseInit=Ju.prototype.parseInit;function Mu(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]))}
835
+ var Nu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,$u=/^(\d{1,2}(?:\.\d+)?|100)%$/,Zu=/^(\d+px|\d+em|\d*\.?\d+c)$/,Ou=/^(\d+)px (\d+)px$/,ev=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,fv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,hv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,iv=/^(\d*(?:\.\d*)?)f$/,jv=/^(\d*(?:\.\d*)?)t$/,kv=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Yu={left:sd,center:"center",right:"end",start:sd,end:"end"},Xu=
836
+ {left:"line-left",center:"center",right:"line-right"},Ku=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Lu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Ru=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];of["application/ttml+xml"]=function(){return new Ju};function lv(){this.A=new Ju}lv.prototype.parseInit=function(a){var b=!1;(new Cc).box("moov",Gc).box("trak",Gc).box("mdia",Gc).box("minf",Gc).box("stbl",Gc).Y("stsd",Ic).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};lv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Cc).box("mdat",Jc(function(f){d=!0;e=e.concat(c.A.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};K("shaka.text.Mp4TtmlParser",lv);lv.prototype.parseMedia=lv.prototype.parseMedia;
837
+ lv.prototype.parseInit=lv.prototype.parseInit;of['application/mp4; codecs="stpp"']=function(){return new lv};of['application/mp4; codecs="stpp.ttml"']=function(){return new lv};of['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new lv};of['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new lv};function mv(){}mv.prototype.parseInit=function(){};
838
+ mv.prototype.parseMedia=function(a,b){var c=tc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new O(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=nv(new fq(e[1]));if(null==c)throw new O(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
839
+ [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new fq(g);var h=new nd;iq(g);gq(g);for(var k=iq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
840
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");gq(g);k=iq(g)}f.push(h)}e=new Map;ov(e);g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new ld(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=
841
+ /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(t){var v=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=vd;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
842
+ !0;m.opacity=parseFloat(v);break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new fq(h[0]);m=nv(k);t=hq(k,/[ \t]+--\x3e[ \t]+/g);n=nv(k);if(null==m||null==t||null==n)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=
843
+ ""):h=new ld(m,n,"");pv(p,h,e);gq(k);for(m=iq(k);m;)qv(h,m,f),gq(k),m=iq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function ov(a){for(var b=r(Object.entries(Ad)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new ld(0,0,"");e.color=d;a.set(c,e)}b=r(Object.entries(Bd));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new ld(0,0,""),e.backgroundColor=d,a.set(c,e)}
844
+ function pv(a,b,c){0===c.size&&ov(c);a=rv(a);var d=Xn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())sv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
845
+ function rv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function tv(a,b){return a&&0<a.length?a:b}
846
+ function sv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=tv(h.backgroundColor,e.backgroundColor),e.color=tv(h.color,e.color),e.fontFamily=tv(h.fontFamily,e.fontFamily),e.fontSize=tv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
847
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(Nn(a))for(f=!0,d=r(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=r(a.childNodes),a=b.next();!a.done;a=b.next())sv(a.value,e,c,d)}
848
+ function qv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=pd:a.textAlign=xd[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
849
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=uv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=zd[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rd,a.line=Number(c[1]),c[2]&&(a.lineAlign=zd[c[2].toUpperCase()])}function uv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
850
+ function nv(a){a=hq(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)}K("shaka.text.VttTextParser",mv);mv.prototype.parseMedia=mv.prototype.parseMedia;mv.prototype.parseInit=mv.prototype.parseInit;of["text/vtt"]=function(){return new mv};of['text/vtt; codecs="vtt"']=function(){return new mv};of['text/vtt; codecs="wvtt"']=function(){return new mv};function vv(){this.g=null}vv.prototype.parseInit=function(a){var b=this,c=!1;(new Cc).box("moov",Gc).box("trak",Gc).box("mdia",Gc).Y("mdhd",function(d){d=Ne(d.reader,d.version);b.g=d.timescale}).box("minf",Gc).box("stbl",Gc).Y("stsd",Ic).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};
851
+ vv.prototype.parseMedia=function(a,b){if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Cc).box("moof",Gc).box("traf",Gc).Y("tfdt",function(B){g=!0;c=Me(B.reader,B.version).Od}).Y("tfhd",function(B){l=Le(B.reader,B.flags).Pe}).Y("trun",function(B){h=!0;d=Oe(B.reader,B.version,B.flags).lf}).box("mdat",Jc(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new zc(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.le||l,x=t.ud?
852
+ c+t.ud:m;m=x+(v||0);var w=0;do{var y=n.S();w+=y;var C=n.S(),D=null;"vttc"==Kc(C)?8<y&&(D=n.zb(y-8)):n.skip(y-8);v&&D&&(y=wv(D,b.periodStart+x/this.g,b.periodStart+m/this.g),f.push(y))}while(t.sampleSize&&w<t.sampleSize)}return f.filter(Kb)};function wv(a,b,c){var d,e,f;(new Cc).box("payl",Jc(function(g){d=tc(g)})).box("iden",Jc(function(g){e=tc(g)})).box("sttg",Jc(function(g){f=tc(g)})).parse(a);return d?xv(d,e,f,b,c):null}
853
+ function xv(a,b,c,d,e){d=new ld(d,e,"");pv(a,d,new Map);b&&(d.id=b);if(c)for(a=new fq(c),b=iq(a);b;)qv(d,b,[]),gq(a),b=iq(a);return d}K("shaka.text.Mp4VttParser",vv);vv.prototype.parseMedia=vv.prototype.parseMedia;vv.prototype.parseInit=vv.prototype.parseInit;of['application/mp4; codecs="wvtt"']=function(){return new vv};function yv(){}yv.prototype.parseInit=function(){};yv.prototype.parseMedia=function(a){var b=tc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new fq(c[0]),e=zv(d),f=hq(d,/,/g);d=zv(d);if(null==e||null==f||null==d)throw new O(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ld(e,d,c.slice(1).join("\n").trim()))}return a};
854
+ function zv(a){a=hq(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)}K("shaka.text.SbvTextParser",yv);yv.prototype.parseMedia=yv.prototype.parseMedia;yv.prototype.parseInit=yv.prototype.parseInit;of["text/x-subviewer"]=function(){return new yv};function Av(){this.A=new mv}Av.prototype.parseInit=function(){};Av.prototype.parseMedia=function(a,b){var c=tc(a);c=Bv(c);c=nc(xc(c));return this.A.parseMedia(c,b)};function Bv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}K("shaka.text.SrtTextParser",Av);Av.srt2webvtt=Bv;Av.prototype.parseMedia=Av.prototype.parseMedia;
855
+ Av.prototype.parseInit=Av.prototype.parseInit;of["text/srt"]=function(){return new Av};function Cv(){}Cv.prototype.parseInit=function(){};
856
+ Cv.prototype.parseMedia=function(a){var b="",c="";a=tc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Dv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Ev.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Fv);else if("Style"==e){e=f.split(Fv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
857
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Md:e.Md},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Ev.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Fv);else if("Dialogue"==f){g=g.split(Fv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Gv(f.Start);var k=Gv(f.End);g=new ld(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Md=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Md}}(e)))&&Hv(g,f);d.push(g)}return d};
858
+ function Hv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Iv(c))a.color=c;if(c=b.BackColour)if(c=Iv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=td;a.textAlign="start";break;case 2:a.displayAlign=td;a.textAlign=pd;break;case 3:a.displayAlign=td;a.textAlign="end";
859
859
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=pd;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=pd;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
860
- function Cv(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 Av(a){a=Dv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}K("shaka.text.SsaTextParser",wv);wv.prototype.parseMedia=wv.prototype.parseMedia;wv.prototype.parseInit=wv.prototype.parseInit;var xv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,yv=/^\s*([^:]+):\s*(.*)/,zv=/\s*,\s*/,Dv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
861
- of["text/x-ssa"]=function(){return new wv};/*
860
+ function Iv(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 Gv(a){a=Jv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}K("shaka.text.SsaTextParser",Cv);Cv.prototype.parseMedia=Cv.prototype.parseMedia;Cv.prototype.parseInit=Cv.prototype.parseInit;var Dv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Ev=/^\s*([^:]+):\s*(.*)/,Fv=/\s*,\s*/,Jv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
861
+ of["text/x-ssa"]=function(){return new Cv};/*
862
862
  @license
863
863
  EME Encryption Scheme Polyfill
864
864
  Copyright 2019 Google LLC
865
865
  SPDX-License-Identifier: Apache-2.0
866
866
  */
867
- function Ev(){}var Fv;function Gv(){Fv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Fv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Hv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
868
- function Hv(a,b){var c=this,d;return H(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),v(e,Fv.call(c,a,b),2);d=e.h;if(Iv(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Fv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Jv;return e["return"](Jv.call(c,
867
+ function Kv(){}var Lv;function Mv(){Lv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Lv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Nv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
868
+ function Nv(a,b){var c=this,d;return H(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Lv.call(c,a,b),2);d=e.h;if(Ov(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Lv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Pv;return e["return"](Pv.call(c,
869
869
  a,b))})}
870
- function Jv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return H(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Kv(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Lv(h.videoCapabilities,d),l=Lv(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
871
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return v(t,Fv.call(c,a,e),2)}p=t.h;return t["return"](new Mv(p,d))})}function Lv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",Ev);Ev.install=Gv;function Nv(){}var Ov;
872
- function Pv(){Ov?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Ov=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Qv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
873
- function Qv(a){var b=this,c,d;return H(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),v(e,Ov.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Iv(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Ov,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
874
- navigator.mediaCapabilities.decodingInfo=Rv;return e["return"](Rv.call(b,a))})}
875
- function Rv(a){var b=this,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.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=Kv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):v(n,Ov.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
876
- new Mv(k.keySystemAccess,c);n.C(3);break}if(!a.keySystemConfiguration){n.C(3);break}var p=a.keySystemConfiguration,t=[],u=[];p.audio&&t.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&u.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};t.length&&(p.audioCapabilities=t);u.length&&(p.videoCapabilities=
877
- u);l=p;m=k;return v(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}K("McEncryptionSchemePolyfill",Nv);Nv.install=Pv;function Mv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
878
- Mv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Mv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
879
- function Kv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||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 Iv(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}function Sv(){}
880
- function Zs(){Gv();Pv()}K("EncryptionSchemePolyfills",Sv);Sv.install=Zs;"undefined"!==typeof module&&module.exports&&(module.exports=Sv);/*
870
+ function Pv(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return H(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Qv(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Rv(h.videoCapabilities,d),l=Rv(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
871
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,Lv.call(c,a,e),2)}p=t.h;return t["return"](new Sv(p,d))})}function Rv(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",Kv);Kv.install=Mv;function Tv(){}var Uv;
872
+ function Vv(){Uv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Uv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Wv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
873
+ function Wv(a){var b=this,c,d;return H(function(e){if(1==e.g)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,Uv.call(b,a),2);c=e.h;if(!a.keySystemConfiguration)return e["return"](c);if((d=c.keySystemAccess)&&Ov(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Uv,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
874
+ navigator.mediaCapabilities.decodingInfo=Xv;return e["return"](Xv.call(b,a))})}
875
+ function Xv(a){var b=this,c,d,e,f,g,h,k,l,m;return H(function(n){switch(n.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=Qv(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?n["return"](h):u(n,Uv.call(b,a),2);case 2:k=n.h;if(k.keySystemAccess){k.keySystemAccess=
876
+ new Sv(k.keySystemAccess,c);n.C(3);break}if(!a.keySystemConfiguration){n.C(3);break}var p=a.keySystemConfiguration,t=[],v=[];p.audio&&t.push({robustness:p.audio.robustness||"",contentType:a.audio.contentType});p.video&&v.push({robustness:p.video.robustness||"",contentType:a.video.contentType});p={initDataTypes:p.initDataType?[p.initDataType]:[],distinctiveIdentifier:p.distinctiveIdentifier,persistentState:p.persistentState,sessionTypes:p.sessionTypes};t.length&&(p.audioCapabilities=t);v.length&&(p.videoCapabilities=
877
+ v);l=p;m=k;return u(n,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[l]),5);case 5:m.keySystemAccess=n.h;case 3:return n["return"](k)}})}K("McEncryptionSchemePolyfill",Tv);Tv.install=Vv;function Sv(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
878
+ Sv.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Sv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
879
+ function Qv(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||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 Ov(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}function Yv(){}
880
+ function bt(){Mv();Vv()}K("EncryptionSchemePolyfills",Yv);Yv.install=bt;"undefined"!==typeof module&&module.exports&&(module.exports=Yv);/*
881
881
  @license
882
882
  Copyright 2013 Ali Al Dallal
883
883
 
@@ -901,7 +901,7 @@ function Zs(){Gv();Pv()}K("EncryptionSchemePolyfills",Sv);Sv.install=Zs;"undefin
901
901
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
902
902
  SOFTWARE.
903
903
  */
904
- for(var Tv={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
904
+ for(var Zv={ach:{s:"Lwo",u:"Acholi"},ady:{s:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",u:"Adyghe"},af:{s:"Afrikaans",u:"Afrikaans"},"af-NA":{s:"Afrikaans (Namibia)",u:"Afrikaans (Namibia)"},"af-ZA":{s:"Afrikaans (South Africa)",u:"Afrikaans (South Africa)"},ak:{s:"T\u0255\u0265i",u:"Akan"},ar:{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-AR":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic"},"ar-MA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",u:"Arabic (Morocco)"},
905
905
  "ar-SA":{s:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",u:"Arabic (Saudi Arabia)"},"ay-BO":{s:"Aymar aru",u:"Aymara"},az:{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"az-AZ":{s:"Az\u0259rbaycan dili",u:"Azerbaijani"},"be-BY":{s:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",u:"Belarusian"},bg:{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",u:"Bulgarian"},"bg-BG":{s:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
906
906
  u:"Bulgarian"},bn:{s:"\u09ac\u09be\u0982\u09b2\u09be",u:"Bengali"},"bn-IN":{s:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",u:"Bengali (India)"},"bn-BD":{s:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",u:"Bengali (Bangladesh)"},"bs-BA":{s:"Bosanski",u:"Bosnian"},ca:{s:"Catal\u00e0",u:"Catalan"},"ca-ES":{s:"Catal\u00e0",u:"Catalan"},cak:{s:"Maya Kaqchikel",u:"Kaqchikel"},"ck-US":{s:"\u13e3\u13b3\u13a9 (tsalagi)",u:"Cherokee"},cs:{s:"\u010ce\u0161tina",
907
907
  u:"Czech"},"cs-CZ":{s:"\u010ce\u0161tina",u:"Czech"},cy:{s:"Cymraeg",u:"Welsh"},"cy-GB":{s:"Cymraeg",u:"Welsh"},da:{s:"Dansk",u:"Danish"},"da-DK":{s:"Dansk",u:"Danish"},de:{s:"Deutsch",u:"German"},"de-AT":{s:"Deutsch (\u00d6sterreich)",u:"German (Austria)"},"de-DE":{s:"Deutsch (Deutschland)",u:"German (Germany)"},"de-CH":{s:"Deutsch (Schweiz)",u:"German (Switzerland)"},dsb:{s:"Dolnoserb\u0161\u0107ina",u:"Lower Sorbian"},el:{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",u:"Greek"},"el-GR":{s:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -922,49 +922,49 @@ u:"Slovak"},"sk-SK":{s:"Sloven\u010dina (Slovakia)",u:"Slovak (Slovakia)"},sl:{s
922
922
  sw:{s:"Kiswahili",u:"Swahili"},"sw-KE":{s:"Kiswahili",u:"Swahili (Kenya)"},ta:{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},"ta-IN":{s:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",u:"Tamil"},te:{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},"te-IN":{s:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",u:"Telugu"},tg:{s:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",u:"Tajik"},"tg-TJ":{s:"\u0442\u043e\u04b7\u0438\u043a\u04e3",u:"Tajik"},th:{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
923
923
  u:"Thai"},"th-TH":{s:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",u:"Thai (Thailand)"},tl:{s:"Filipino",u:"Filipino"},"tl-PH":{s:"Filipino",u:"Filipino"},tlh:{s:"tlhIngan-Hol",u:"Klingon"},tr:{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tr-TR":{s:"T\u00fcrk\u00e7e",u:"Turkish"},"tt-RU":{s:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",u:"Tatar"},uk:{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",u:"Ukrainian"},"uk-UA":{s:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
924
924
  u:"Ukrainian"},ur:{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},"ur-PK":{s:"\u0627\u0631\u062f\u0648",u:"Urdu"},uz:{s:"O'zbek",u:"Uzbek"},"uz-UZ":{s:"O'zbek",u:"Uzbek"},vi:{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"vi-VN":{s:"Ti\u1ebfng Vi\u1ec7t",u:"Vietnamese"},"xh-ZA":{s:"isiXhosa",u:"Xhosa"},yi:{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",u:"Yiddish"},"yi-DE":{s:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",u:"Yiddish (German)"},zh:{s:"\u4e2d\u6587",u:"Chinese"},"zh-HANS":{s:"\u4e2d\u6587\u7b80\u4f53",
925
- u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},Uv=r(Object.keys(Tv)),Vv=Uv.next();!Vv.done;Vv=
926
- Uv.next()){var Wv=Vv.value;Tv[Wv.toLowerCase()]=Tv[Wv]};function W(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new xf;this.localization=this.controls.Za;this.player=this.controls.bc();this.video=this.controls.yb();this.adManager=this.player.fd();this.ad=b.getAd();this.eventManager.m(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null})}
927
- W.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};K("shaka.ui.Element",W);W.prototype.release=W.prototype.release;function Xv(a){return Yv(a,"shaka-back-to-overflow-button")}function Yv(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function Zv(a){a&&(a=Yv(a,"shaka-chosen-item"))&&a.parentElement.focus()}function $v(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.setAttribute("aria-hidden","true");return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
928
- function aw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function bw(a,b){W.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=aw(e-d,!1)+" / "+aw(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
929
- ""))});this.eventManager.m(this.localization,"locale-updated",function(){});this.eventManager.m(this.localization,"locale-changed",function(){});this.eventManager.m(this.adManager,"ad-started",function(){c.g.Ha();c.g.oa(.5)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Ha(),this.g.oa(.5))}ra(bw,W);bw.prototype.release=function(){this.g.stop();this.g=null;W.prototype.release.call(this)};K("shaka.ui.AdCounter",bw);function cw(a,b){W.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.m(this.localization,"locale-updated",function(){c.ad&&dw(c)});this.eventManager.m(this.localization,"locale-changed",function(){c.ad&&dw(c)});this.eventManager.m(this.adManager,"ad-started",function(){dw(c)});this.eventManager.m(this.adManager,
930
- "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&dw(this)}ra(cw,W);function dw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}K("shaka.ui.AdPosition",cw);function ew(a,b){W.call(this,a,b);var c=this;this.button=Vj();this.parent.appendChild(this.button);this.eventManager.m(this.localization,"locale-updated",function(){c.g()});this.eventManager.m(this.localization,"locale-changed",function(){c.g()});this.eventManager.m(this.video,"play",function(){c.g();c.h()});this.eventManager.m(this.video,"pause",function(){c.g();c.h()});this.eventManager.m(this.video,"seeking",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-paused",function(){c.g();
931
- c.h()});this.eventManager.m(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.m(this.button,"click",function(){c.ad?fw(c.controls):gw(c.controls)});this.ad&&(this.g(),this.h())}ra(ew,W);ew.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.g.paused&&!a.ea;return a};ew.prototype.g=function(){};ew.prototype.h=function(){};K("shaka.ui.PlayButton",ew);function hw(a,b){ew.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}ra(hw,ew);hw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};hw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};K("shaka.ui.BigPlayButton",hw);function iw(a,b,c,d){W.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
932
- this.parent.appendChild(this.container);this.eventManager.m(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.m(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,jw(e,f),e.onChangeStart())});this.eventManager.m(this.bar,"input",function(){e.onChange()});this.eventManager.m(this.bar,"touchmove",function(f){e.g&&(jw(e,f),e.onChange())});this.eventManager.m(this.bar,"touchend",function(f){e.g&&(e.g=!1,jw(e,f),e.onChangeEnd())});this.eventManager.m(this.bar,
933
- "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}ra(iw,W);q=iw.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);W.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.T(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
934
- q.setValue=function(a){this.g||(this.bar.value=a)};function jw(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}K("shaka.ui.RangeElement",iw);iw.prototype.setValue=iw.prototype.setValue;iw.prototype.getValue=iw.prototype.getValue;iw.prototype.changeTo=iw.prototype.changeTo;iw.prototype.onChangeEnd=iw.prototype.onChangeEnd;iw.prototype.onChange=iw.prototype.onChange;
935
- iw.prototype.onChangeStart=iw.prototype.onChangeStart;iw.prototype.setRange=iw.prototype.setRange;function kw(a,b){iw.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.v=this.controls.v;this.h=new P(function(){c.video.currentTime=c.getValue()});this.o=new P(function(){lw(c)});this.A=!1;this.i=[];this.eventManager.m(this.localization,"locale-updated",function(){return mw(c)});this.eventManager.m(this.localization,
936
- "locale-changed",function(){return mw(c)});this.eventManager.m(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.m(this.adManager,"ad-stopped",function(){nw(c)&&X(c.container,!0)});this.eventManager.m(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;ow(c)});this.eventManager.m(this.player,"unloading",function(){c.i=[];ow(c)});this.setValue(this.video.currentTime);this.update();mw(this);this.ad&&X(this.container,!1)}ra(kw,iw);q=kw.prototype;
937
- q.release=function(){this.h&&(this.h.stop(),this.h=null,this.o.stop(),this.o=null);iw.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.we(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.T(.125))};q.onChangeEnd=function(){this.h.Ha();this.controls.we(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
938
- q.update=function(){var a=this.v.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Va(),g=f.end-f.start;this.setRange(f.start,f.end);nw(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.v.showUnbufferedStart?
925
+ u:"Chinese Simplified"},"zh-HANT":{s:"\u4e2d\u6587\u7e41\u9ad4",u:"Chinese Traditional"},"zh-CN":{s:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",u:"Chinese Simplified (China)"},"zh-HK":{s:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",u:"Chinese Traditional (Hong Kong)"},"zh-SG":{s:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",u:"Chinese Simplified (Singapore)"},"zh-TW":{s:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",u:"Chinese Traditional (Taiwan)"},"zu-ZA":{s:"isiZulu",u:"Zulu"}},$v=r(Object.keys(Zv)),aw=$v.next();!aw.done;aw=
926
+ $v.next()){var bw=aw.value;Zv[bw.toLowerCase()]=Zv[bw]};function W(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new xf;this.localization=this.controls.Za;this.player=this.controls.bc();this.video=this.controls.yb();this.adManager=this.player.fd();this.ad=b.getAd();this.eventManager.m(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null})}
927
+ W.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};K("shaka.ui.Element",W);W.prototype.release=W.prototype.release;function cw(a){return dw(a,"shaka-back-to-overflow-button")}function dw(a,b){var c=a.getElementsByClassName(b);return c.length?c[0]:null}function ew(a){a&&(a=dw(a,"shaka-chosen-item"))&&a.parentElement.focus()}function fw(){var a=S("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.setAttribute("aria-hidden","true");return a}function X(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
928
+ function gw(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60),e=Math.floor(a%60);10>e&&(e="0"+e);e=d+":"+e;b&&(10>d&&(e="0"+e),e=c+":"+e);return e};function hw(a,b){W.call(this,a,b);var c=this;this.i=S("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=S("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new P(function(){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=gw(e-d,!1)+" / "+gw(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",d))):(c.g.stop(),c.h.textContent=
929
+ ""))});this.eventManager.m(this.localization,"locale-updated",function(){});this.eventManager.m(this.localization,"locale-changed",function(){});this.eventManager.m(this.adManager,"ad-started",function(){c.g.Ha();c.g.oa(.5)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Ha(),this.g.oa(.5))}ra(hw,W);hw.prototype.release=function(){this.g.stop();this.g=null;W.prototype.release.call(this)};K("shaka.ui.AdCounter",hw);function iw(a,b){W.call(this,a,b);var c=this;this.g=S("div");this.g.classList.add("shaka-ad-position");X(this.g,!1);this.parent.appendChild(this.g);this.h=S("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.m(this.localization,"locale-updated",function(){c.ad&&jw(c)});this.eventManager.m(this.localization,"locale-changed",function(){c.ad&&jw(c)});this.eventManager.m(this.adManager,"ad-started",function(){jw(c)});this.eventManager.m(this.adManager,
930
+ "ad-stopped",function(){c.h.textContent="";X(c.g,!1)});this.ad&&jw(this)}ra(iw,W);function jw(a){var b=a.ad.getSequenceLength();if(1<b){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));X(a.g,!0)}}K("shaka.ui.AdPosition",iw);function kw(a,b){W.call(this,a,b);var c=this;this.button=Xj();this.parent.appendChild(this.button);this.eventManager.m(this.localization,"locale-updated",function(){c.g()});this.eventManager.m(this.localization,"locale-changed",function(){c.g()});this.eventManager.m(this.video,"play",function(){c.g();c.h()});this.eventManager.m(this.video,"pause",function(){c.g();c.h()});this.eventManager.m(this.video,"seeking",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-paused",function(){c.g();
931
+ c.h()});this.eventManager.m(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.m(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.m(this.button,"click",function(){c.ad?lw(c.controls):mw(c.controls)});this.ad&&(this.g(),this.h())}ra(kw,W);kw.prototype.isPaused=function(){if(this.ad)var a=this.ad.isPaused();else a=this.controls,a=a.g.paused&&!a.ea;return a};kw.prototype.g=function(){};kw.prototype.h=function(){};K("shaka.ui.PlayButton",kw);function nw(a,b){kw.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}ra(nw,kw);nw.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};nw.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};K("shaka.ui.BigPlayButton",nw);function ow(a,b,c,d){W.call(this,a,b);var e=this;this.container=S("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,ha(c));this.g=!1;this.bar=document.createElement("input");this.l=new P(function(){e.onChangeEnd();e.g=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,ha(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
932
+ this.parent.appendChild(this.container);this.eventManager.m(this.bar,"mousedown",function(){e.controls.Mb()&&(e.g=!0,e.onChangeStart())});this.eventManager.m(this.bar,"touchstart",function(f){e.controls.Mb()&&(e.g=!0,pw(e,f),e.onChangeStart())});this.eventManager.m(this.bar,"input",function(){e.onChange()});this.eventManager.m(this.bar,"touchmove",function(f){e.g&&(pw(e,f),e.onChange())});this.eventManager.m(this.bar,"touchend",function(f){e.g&&(e.g=!1,pw(e,f),e.onChangeEnd())});this.eventManager.m(this.bar,
933
+ "mouseup",function(){e.g&&(e.g=!1,e.onChangeEnd())})}ra(ow,W);q=ow.prototype;q.release=function(){this.l&&(this.l.stop(),this.l=null);W.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.g||(this.g=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.l.T(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
934
+ q.setValue=function(a){this.g||(this.bar.value=a)};function pw(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect(),e=parseFloat(a.bar.min),f=parseFloat(a.bar.max);c=e+(f-e)/d.width*(c.clientX-d.left);c<e?c=e:c>f&&(c=f);a.bar.value=c}K("shaka.ui.RangeElement",ow);ow.prototype.setValue=ow.prototype.setValue;ow.prototype.getValue=ow.prototype.getValue;ow.prototype.changeTo=ow.prototype.changeTo;ow.prototype.onChangeEnd=ow.prototype.onChangeEnd;ow.prototype.onChange=ow.prototype.onChange;
935
+ ow.prototype.onChangeStart=ow.prototype.onChangeStart;ow.prototype.setRange=ow.prototype.setRange;function qw(a,b){ow.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.j=S("div");this.j.classList.add("shaka-ad-markers");this.container.insertBefore(this.j,this.container.childNodes[0]);this.v=this.controls.v;this.h=new P(function(){c.video.currentTime=c.getValue()});this.o=new P(function(){rw(c)});this.A=!1;this.i=[];this.eventManager.m(this.localization,"locale-updated",function(){return sw(c)});this.eventManager.m(this.localization,
936
+ "locale-changed",function(){return sw(c)});this.eventManager.m(this.adManager,"ad-started",function(){X(c.container,!1)});this.eventManager.m(this.adManager,"ad-stopped",function(){tw(c)&&X(c.container,!0)});this.eventManager.m(this.adManager,"ad-cue-points-changed",function(d){c.i=d.cuepoints;uw(c)});this.eventManager.m(this.player,"unloading",function(){c.i=[];uw(c)});this.setValue(this.video.currentTime);this.update();sw(this);this.ad&&X(this.container,!1)}ra(qw,ow);q=qw.prototype;
937
+ q.release=function(){this.h&&(this.h.stop(),this.h=null,this.o.stop(),this.o=null);ow.prototype.release.call(this)};q.onChangeStart=function(){this.A=!this.video.paused;this.controls.we(!0);this.video.pause()};q.onChange=function(){this.video.duration&&(this.update(),this.h.T(.125))};q.onChangeEnd=function(){this.h.Ha();this.controls.we(!1);this.A&&this.video.play()};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
938
+ q.update=function(){var a=this.v.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.Va(),g=f.end-f.start;this.setRange(f.start,f.end);tw(this)?(X(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.v.showUnbufferedStart?
939
939
  a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):X(this.container,!1)};
940
- function lw(a){if(a.i.length){for(var b=a.player.Va(),c=b.end-b.start,d=["to right"],e=[],f=a.v.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
941
- 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function ow(a){lw(a);var b=a.player.Va();b=b.end-b.start;a.player.Z()&&5<b&&a.o.oa(1)}function nw(a){var b=a.player.Va();b=b.end-b.start;return a.player.Z()&&5>b?!1:null==a.ad}function mw(a){a.bar.setAttribute("aria-label",a.localization.resolve("SEEK"))}K("shaka.ui.SeekBar",kw);function pw(){}
942
- pw.prototype.create=function(a,b){return new kw(a,b)};kw.Factory=pw;function Y(a,b,c,d){db.call(this);var e=this;this.V=!0;this.v=d;this.A=new Vm(c,a,this.v.castReceiverAppId);this.vb=!0;this.g=this.A.yb();this.B=c;this.D=this.A.bc();this.Ia=a;this.j=b;this.ub=this.D.fd();this.l=this.o=null;this.ea=!1;this.H=[];this.Yb=[];this.Db=!1;this.ha=new P(function(){e.j.style.cursor="none";e.Db=!1;qw(e)});this.va=new P(function(){e.i.removeAttribute("shown");e.I.T(2)});this.I=new P(function(){for(var f=r(e.H),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.gb=new P(function(){e.Mb()&&
943
- rw(e)});this.K=null;this.R=[];this.Za=sw();this.h=new xf;this.configure(this.v);tw(this);this.za=new Set;uw(this);this.gb.oa(.125);this.h.m(this.Za,"locale-changed",function(f){e.ub.setLocale(f.locales[0])})}ra(Y,db);q=Y.prototype;
944
- q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.C(2);break}return v(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.ha&&(a.ha.stop(),a.ha=null);a.va&&(a.va.stop(),a.va=null);a.I&&(a.I.stop(),a.I=null);a.gb&&(a.gb.stop(),a.gb=null);vw(a);a.i&&(a.j.removeChild(a.i),a.i=null);if(!a.A){b.C(4);break}return v(b,a.A.destroy(),5);case 5:a.A=null;case 4:if(!a.Ia){b.C(6);break}return v(b,a.Ia.destroy(),7);case 7:a.Ia=
945
- null;case 6:a.D=null,a.B=null,a.g=null,a.Za=null,a.za.clear(),z(b)}})};function vw(a){for(var b=r(a.R),c=b.next();!c.done;c=b.next())c.value.release();a.R=[]}function ww(a,b){xw.set(a,b)}q.Df=function(a){this.vb=a;uw(this)};q.sg=function(){qw(this)};
946
- q.configure=function(a){this.v=a;this.A.Le(a.castReceiverAppId);this.l&&(this.l=null);this.Cb&&(this.Cb=null);this.i?(Wj(this.i),vw(this)):(yw(this),this.ba=S("div"),this.ba.classList.add("shaka-client-side-ad-container"),X(this.ba,!1),this.j.appendChild(this.ba));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");zw(this);this.v.addBigPlayButton&&Aw(this);this.ia||Bw(this);this.rb=S("div");this.rb.classList.add("shaka-server-side-ad-container");this.i.appendChild(this.rb);
947
- Cw(this);this.H=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.H.push.apply(this.H,ha(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Dw(this);this.Yb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));qw(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.m(b,"click",c);this.h.m(b,"dblclick",c)}};
948
- q.re=function(a){(this.V=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");qw(this)};q.qf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.re(!1)};q.getAd=function(){return this.o};q.Of=function(){return this.A};q.Zf=function(){return this.Za};q.ng=function(){return this.j};q.yb=function(){return this.g};q.Yf=function(){return this.B};q.bc=function(){return this.D};q.Xf=function(){return this.Ia};q.Sf=function(){return this.i};
940
+ function rw(a){if(a.i.length){for(var b=a.player.Va(),c=b.end-b.start,d=["to right"],e=[],f=a.v.seekBarColors.adBreaks,g=!1,h=r(a.i),k=h.next();!k.done;k=h.next())if(k=k.value,-1!=k.start||k.end||(g=!0),k.start>=b.start&&k.start<b.end&&!(k.end&&k.end>b.end)){var l=(k.start-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}b=r(e);for(k=b.next();!k.done;k=b.next())c=k.value,d.push("transparent "+100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+
941
+ 100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.j.style.background="linear-gradient("+d.join(",")+")"}else a.j.style.background="transparent"}function uw(a){rw(a);var b=a.player.Va();b=b.end-b.start;a.player.Z()&&5<b&&a.o.oa(1)}function tw(a){var b=a.player.Va();b=b.end-b.start;return a.player.Z()&&5>b?!1:null==a.ad}function sw(a){a.bar.setAttribute("aria-label",a.localization.resolve("SEEK"))}K("shaka.ui.SeekBar",qw);function vw(){}
942
+ vw.prototype.create=function(a,b){return new qw(a,b)};qw.Factory=vw;function Y(a,b,c,d){db.call(this);var e=this;this.V=!0;this.v=d;this.A=new Xm(c,a,this.v.castReceiverAppId);this.vb=!0;this.g=this.A.yb();this.B=c;this.D=this.A.bc();this.Ia=a;this.j=b;this.ub=this.D.fd();this.l=this.o=null;this.ea=!1;this.H=[];this.Yb=[];this.Db=!1;this.ha=new P(function(){e.j.style.cursor="none";e.Db=!1;ww(e)});this.va=new P(function(){e.i.removeAttribute("shown");e.I.T(2)});this.I=new P(function(){for(var f=r(e.H),g=f.next();!g.done;g=f.next())X(g.value,!1)});this.hb=new P(function(){e.Mb()&&
943
+ xw(e)});this.K=null;this.R=[];this.Za=yw();this.h=new xf;this.configure(this.v);zw(this);this.za=new Set;Aw(this);this.hb.oa(.125);this.h.m(this.Za,"locale-changed",function(f){e.ub.setLocale(f.locales[0])})}ra(Y,db);q=Y.prototype;
944
+ q.destroy=function(){var a=this;return H(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.B){b.C(2);break}return u(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.ha&&(a.ha.stop(),a.ha=null);a.va&&(a.va.stop(),a.va=null);a.I&&(a.I.stop(),a.I=null);a.hb&&(a.hb.stop(),a.hb=null);Bw(a);a.i&&(a.j.removeChild(a.i),a.i=null);if(!a.A){b.C(4);break}return u(b,a.A.destroy(),5);case 5:a.A=null;case 4:if(!a.Ia){b.C(6);break}return u(b,a.Ia.destroy(),7);case 7:a.Ia=
945
+ null;case 6:a.D=null,a.B=null,a.g=null,a.Za=null,a.za.clear(),z(b)}})};function Bw(a){for(var b=r(a.R),c=b.next();!c.done;c=b.next())c.value.release();a.R=[]}function Cw(a,b){Dw.set(a,b)}q.Df=function(a){this.vb=a;Aw(this)};q.sg=function(){ww(this)};
946
+ q.configure=function(a){this.v=a;this.A.Le(a.castReceiverAppId);this.l&&(this.l=null);this.Cb&&(this.Cb=null);this.i?(Yj(this.i),Bw(this)):(Ew(this),this.ba=S("div"),this.ba.classList.add("shaka-client-side-ad-container"),X(this.ba,!1),this.j.appendChild(this.ba));this.j.classList.add("shaka-video-container");this.B.classList.add("shaka-video");Fw(this);this.v.addBigPlayButton&&Gw(this);this.ia||Hw(this);this.rb=S("div");this.rb.classList.add("shaka-server-side-ad-container");this.i.appendChild(this.rb);
947
+ Iw(this);this.H=Array.from(this.j.getElementsByClassName("shaka-settings-menu"));this.H.push.apply(this.H,ha(Array.from(this.j.getElementsByClassName("shaka-overflow-menu"))));Jw(this);this.Yb=Array.from(this.j.getElementsByClassName("shaka-show-controls-on-mouse-over"));ww(this);a=r(this.j.getElementsByClassName("shaka-no-propagation"));for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=function(d){return d.stopPropagation()};this.h.m(b,"click",c);this.h.m(b,"dblclick",c)}};
948
+ q.re=function(a){(this.V=a)?(this.j.setAttribute("shaka-controls","true"),this.B.tabIndex=-1,this.B.controls=!1):this.j.removeAttribute("shaka-controls");ww(this)};q.qf=function(a){this.B.controls=a;this.B.tabIndex=a?0:-1;a&&this.re(!1)};q.getAd=function(){return this.o};q.Of=function(){return this.A};q.Zf=function(){return this.Za};q.ng=function(){return this.j};q.yb=function(){return this.g};q.Yf=function(){return this.B};q.bc=function(){return this.D};q.Xf=function(){return this.Ia};q.Sf=function(){return this.i};
949
949
  q.hg=function(){return this.rb};q.Pf=function(){return this.ba};q.Qf=function(){return this.v};q.rg=function(){return this.ea};q.we=function(a){this.ea=a};q.pg=function(){return this.vb};q.Te=function(){return this.l?this.l.getValue():this.g.currentTime};q.rf=function(a){this.K=a};q.Zc=function(){return this.H.some(function(a){return!a.classList.contains("shaka-hidden")})};q.Gc=function(){this.I.Ha()};
950
- q.Be=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),v(c,document.exitFullscreen(),0);A(c,4);if(!document.pictureInPictureElement){c.C(6);break}return v(c,document.exitPictureInPicture(),6);case 6:return v(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.v.forceLandscapeOnFullscreen||!screen.orientation){c.C(9);break}A(c,10);return v(c,screen.orientation.lock("landscape"),12);case 12:wa(c,
951
- 9,4);break;case 10:F(c,4);case 9:wa(c,0);break;case 4:b=F(c),a.dispatchEvent(new N("error",(new Map).set("detail",b))),c.C(0)}})};q.tf=function(){X(this.L,!0);X(this.ba,!0);this.i.setAttribute("ad-active","true")};q.We=function(){X(this.L,!1);X(this.ba,!1);this.i.removeAttribute("ad-active")};function gw(a){a.V&&a.g.duration&&(a.D.Ie(),a.g.paused&&!a.ea?a.g.play():a.g.pause())}function fw(a){a.o&&a.o.isPaused()?a.o.play():a.o&&a.o.pause()}
952
- function yw(a){a.i=S("div");a.i.classList.add("shaka-controls-container");a.j.appendChild(a.i);a.j.setAttribute("shaka-controls","true");a.h.m(a.i,"touchstart",function(b){a.g.duration&&(a.Mb()?a.K=Date.now():(Ew(a,b),b.preventDefault()))},{passive:!1});a.h.m(a.i,"click",function(){a.V&&(a.Zc()?a.I.Ha():a.o?fw(a):gw(a))});a.h.m(a.i,"dblclick",function(){a.v.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Be()})}
953
- function Aw(a){var b=S("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.Cb=new hw(b,a);a.R.push(a.Cb)}function zw(a){var b=S("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function Fw(a){a.L=S("div");a.L.classList.add("shaka-ad-controls");X(a.L,null!=a.o);a.O.appendChild(a.L);var b=new cw(a.L,a);a.R.push(b);b=new bw(a.L,a);a.R.push(b)}
954
- function Bw(a){a.ia=S("div");a.ia.classList.add("shaka-spinner-container");a.j.appendChild(a.ia);var b=S("div");b.classList.add("shaka-spinner");a.ia.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
950
+ q.Be=function(){var a=this,b;return H(function(c){switch(c.g){case 1:if(document.fullscreenElement)return screen.orientation&&screen.orientation.unlock(),u(c,document.exitFullscreen(),0);A(c,4);if(!document.pictureInPictureElement){c.C(6);break}return u(c,document.exitPictureInPicture(),6);case 6:return u(c,a.j.requestFullscreen({navigationUI:"hide"}),8);case 8:if(!a.v.forceLandscapeOnFullscreen||!screen.orientation){c.C(9);break}A(c,10);return u(c,screen.orientation.lock("landscape"),12);case 12:wa(c,
951
+ 9,4);break;case 10:F(c,4);case 9:wa(c,0);break;case 4:b=F(c),a.dispatchEvent(new N("error",(new Map).set("detail",b))),c.C(0)}})};q.tf=function(){X(this.L,!0);X(this.ba,!0);this.i.setAttribute("ad-active","true")};q.We=function(){X(this.L,!1);X(this.ba,!1);this.i.removeAttribute("ad-active")};function mw(a){a.V&&a.g.duration&&(a.D.Ie(),a.g.paused&&!a.ea?a.g.play():a.g.pause())}function lw(a){a.o&&a.o.isPaused()?a.o.play():a.o&&a.o.pause()}
952
+ function Ew(a){a.i=S("div");a.i.classList.add("shaka-controls-container");a.j.appendChild(a.i);a.j.setAttribute("shaka-controls","true");a.h.m(a.i,"touchstart",function(b){a.g.duration&&(a.Mb()?a.K=Date.now():(Kw(a,b),b.preventDefault()))},{passive:!1});a.h.m(a.i,"click",function(){a.V&&(a.Zc()?a.I.Ha():a.o?lw(a):mw(a))});a.h.m(a.i,"dblclick",function(){a.v.doubleClickForFullscreen&&document.fullscreenEnabled&&a.Be()})}
953
+ function Gw(a){var b=S("div");b.classList.add("shaka-play-button-container");a.i.appendChild(b);a.Cb=new nw(b,a);a.R.push(a.Cb)}function Fw(a){var b=S("div");b.classList.add("shaka-scrim-container");a.i.appendChild(b)}function Lw(a){a.L=S("div");a.L.classList.add("shaka-ad-controls");X(a.L,null!=a.o);a.O.appendChild(a.L);var b=new iw(a.L,a);a.R.push(b);b=new hw(a.L,a);a.R.push(b)}
954
+ function Hw(a){a.ia=S("div");a.ia.classList.add("shaka-spinner-container");a.j.appendChild(a.ia);var b=S("div");b.classList.add("shaka-spinner");a.ia.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");
955
955
  b.setAttribute("fill","none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}
956
- function Cw(a){a.O=S("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.i.appendChild(a.O);a.h.m(a.O,"click",function(){a.Gc()});Fw(a);a.Ja=S("div");a.Ja.classList.add("shaka-controls-button-panel");a.Ja.classList.add("shaka-show-controls-on-mouse-over");a.O.appendChild(a.Ja);for(var b={},c=r(a.v.controlPanelElements),d=c.next();!d.done;b={qc:b.qc},d=c.next())d=d.value,xw.get(d)?(d=xw.get(d).create(a.Ja,a),"function"!=typeof d.release&&(Eb("shaka.extern.IUIElement",
957
- "Please update UI elements to have a release() method."),b.qc=d,b.qc.release=function(e){return function(){e.qc.destroy&&e.qc.destroy()}}(b)),a.R.push(d)):Ra("Unrecognized control panel element requested:",d)}function Dw(a){if(a.v.addSeekBar)a.l=Gw.create(a.O,a),a.R.push(a.l);else{a=r(a.H);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
958
- function tw(a){a.h.m(a.D,"buffering",function(){a.V&&X(a.ia,a.D.Ic())});a.V&&X(a.ia,a.D.Ic());a.h.m(window,"keydown",function(b){Hw(a,b)});a.h.m(window,"click",function(){return a.Gc()});a.h.m(a.g,"play",function(){qw(a)});a.h.m(a.g,"pause",function(){qw(a)});a.h.m(a.j,"mousemove",function(b){Ew(a,b)});a.h.m(a.j,"touchmove",function(b){Ew(a,b)},{passive:!0});a.h.m(a.j,"touchend",function(b){Ew(a,b)},{passive:!0});a.h.m(a.j,"mouseleave",function(){a.K||a.ha.Ha()});a.h.m(a.A,"caststatuschanged",function(){uw(a)});
959
- a.h.m(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.i.contains(c)&&Ew(a,b);if(a.v.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Iw(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Iw(a,a.l.getValue()+5));break;case "Home":a.l&&Iw(a,a.D.Va().start);break;case "End":a.l&&Iw(a,a.D.Va().end);break;case " ":e&&
960
- (a.o?fw(a):gw(a))}});a.h.m(a.j,"keyup",function(b){a.za["delete"](b.key)});a.h.m(a.ub,"ad-started",function(b){a.o=b.ad;a.tf()});a.h.m(a.ub,"ad-stopped",function(){a.o=null;a.We()});screen.orientation&&a.h.m(screen.orientation,"change",function(){return H(function(b){return v(b,Jw(a),0)})});a.h.m(document,"fullscreenchange",function(){a.o&&a.o.resize(a.B.offsetWidth,a.B.offsetHeight)})}
961
- function Jw(a){return H(function(b){return a.g&&0!=a.g.readyState&&!a.A.sa()&&a.v.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?v(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?v(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
962
- function Ew(a,b){"mousemove"==b.type&&(a.i.classList.remove("shaka-keyboard-navigation"),qw(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.K=Date.now():a.K+1E3<Date.now()&&(a.K=null);a.K&&"mousemove"==b.type||(a.j.style.cursor="",a.Db=!0,a.I.stop(),a.Mb()||(rw(a),qw(a)),a.ha.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.K||a.ha.T(3))}function Kw(a){return window.matchMedia("hover: hover").matches?a.Yb.some(function(b){return b.matches(":hover")}):!1}
963
- function qw(a){var b=a.o?a.o.isPaused():!1,c=a.g.paused&&!a.ea,d=a.i.classList.contains("shaka-keyboard-navigation");b||!a.o&&c||a.Db||d||Kw(a)?(rw(a),a.i.setAttribute("shown","true"),a.va.stop()):a.va.T(a.v.fadeDelay)}function uw(a){var b=a.A.sa();a.dispatchEvent(new N("caststatuschanged",(new Map).set("newStatus",b)));b?a.i.setAttribute("casting","true"):a.i.removeAttribute("casting")}q.Mb=function(){return this.V?null!=this.i.getAttribute("shown")||null!=this.i.getAttribute("casting"):!1};
964
- function Iw(a,b){a.l.changeTo(b);a.Mb()&&rw(a)}function rw(a){if(a.l)if(a.l.setValue(a.g.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new N("timeandseekrangeupdated"))}
965
- function Hw(a,b){a.za.add(b.key);var c=a.Zc();"Tab"==b.key&&(a.i.classList.add("shaka-keyboard-navigation"),qw(a),a.h.m(window,"mousedown",function(){a.h.Qa(window,"mousedown")}));"Escape"==b.key&&a.I.Ha();c&&a.za.has("Tab")&&Lw(a,b)}
966
- function Lw(a,b){var c=a.H.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.za.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
967
- function sw(){var a=new bc("en");a.ka("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
956
+ function Iw(a){a.O=S("div");a.O.classList.add("shaka-bottom-controls");a.O.classList.add("shaka-no-propagation");a.i.appendChild(a.O);a.h.m(a.O,"click",function(){a.Gc()});Lw(a);a.Ja=S("div");a.Ja.classList.add("shaka-controls-button-panel");a.Ja.classList.add("shaka-show-controls-on-mouse-over");a.O.appendChild(a.Ja);for(var b={},c=r(a.v.controlPanelElements),d=c.next();!d.done;b={qc:b.qc},d=c.next())d=d.value,Dw.get(d)?(d=Dw.get(d).create(a.Ja,a),"function"!=typeof d.release&&(Eb("shaka.extern.IUIElement",
957
+ "Please update UI elements to have a release() method."),b.qc=d,b.qc.release=function(e){return function(){e.qc.destroy&&e.qc.destroy()}}(b)),a.R.push(d)):Ra("Unrecognized control panel element requested:",d)}function Jw(a){if(a.v.addSeekBar)a.l=Mw.create(a.O,a),a.R.push(a.l);else{a=r(a.H);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}
958
+ function zw(a){a.h.m(a.D,"buffering",function(){a.V&&X(a.ia,a.D.Ic())});a.V&&X(a.ia,a.D.Ic());a.h.m(window,"keydown",function(b){Nw(a,b)});a.h.m(window,"click",function(){return a.Gc()});a.h.m(a.g,"play",function(){ww(a)});a.h.m(a.g,"pause",function(){ww(a)});a.h.m(a.j,"mousemove",function(b){Kw(a,b)});a.h.m(a.j,"touchmove",function(b){Kw(a,b)},{passive:!0});a.h.m(a.j,"touchend",function(b){Kw(a,b)},{passive:!0});a.h.m(a.j,"mouseleave",function(){a.K||a.ha.Ha()});a.h.m(a.A,"caststatuschanged",function(){Aw(a)});
959
+ a.h.m(a.j,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.i.contains(c)&&Kw(a,b);if(a.v.enableKeyboardPlaybackControls)switch(b.key){case "ArrowLeft":a.l&&!d&&(b.preventDefault(),Ow(a,a.l.getValue()-5));break;case "ArrowRight":a.l&&!d&&(b.preventDefault(),Ow(a,a.l.getValue()+5));break;case "Home":a.l&&Ow(a,a.D.Va().start);break;case "End":a.l&&Ow(a,a.D.Va().end);break;case " ":e&&
960
+ (a.o?lw(a):mw(a))}});a.h.m(a.j,"keyup",function(b){a.za["delete"](b.key)});a.h.m(a.ub,"ad-started",function(b){a.o=b.ad;a.tf()});a.h.m(a.ub,"ad-stopped",function(){a.o=null;a.We()});screen.orientation&&a.h.m(screen.orientation,"change",function(){return H(function(b){return u(b,Pw(a),0)})});a.h.m(document,"fullscreenchange",function(){a.o&&a.o.resize(a.B.offsetWidth,a.B.offsetHeight)})}
961
+ function Pw(a){return H(function(b){return a.g&&0!=a.g.readyState&&!a.A.sa()&&a.v.enableFullscreenOnRotation?screen.orientation.type.includes("landscape")&&!document.fullscreenElement?u(b,a.j.requestFullscreen({navigationUI:"hide"}),0):screen.orientation.type.includes("portrait")&&document.fullscreenElement?u(b,document.exitFullscreen(),0):b.C(0):b["return"]()})}
962
+ function Kw(a,b){"mousemove"==b.type&&(a.i.classList.remove("shaka-keyboard-navigation"),ww(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.K=Date.now():a.K+1E3<Date.now()&&(a.K=null);a.K&&"mousemove"==b.type||(a.j.style.cursor="",a.Db=!0,a.I.stop(),a.Mb()||(xw(a),ww(a)),a.ha.stop(),"touchend"!=b.type&&"keyup"!=b.type&&a.K||a.ha.T(3))}function Qw(a){return window.matchMedia("hover: hover").matches?a.Yb.some(function(b){return b.matches(":hover")}):!1}
963
+ function ww(a){var b=a.o?a.o.isPaused():!1,c=a.g.paused&&!a.ea,d=a.i.classList.contains("shaka-keyboard-navigation");b||!a.o&&c||a.Db||d||Qw(a)?(xw(a),a.i.setAttribute("shown","true"),a.va.stop()):a.va.T(a.v.fadeDelay)}function Aw(a){var b=a.A.sa();a.dispatchEvent(new N("caststatuschanged",(new Map).set("newStatus",b)));b?a.i.setAttribute("casting","true"):a.i.removeAttribute("casting")}q.Mb=function(){return this.V?null!=this.i.getAttribute("shown")||null!=this.i.getAttribute("casting"):!1};
964
+ function Ow(a,b){a.l.changeTo(b);a.Mb()&&xw(a)}function xw(a){if(a.l)if(a.l.setValue(a.g.currentTime),a.l.update(),a.l.isShowing())for(var b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=r(a.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new N("timeandseekrangeupdated"))}
965
+ function Nw(a,b){a.za.add(b.key);var c=a.Zc();"Tab"==b.key&&(a.i.classList.add("shaka-keyboard-navigation"),ww(a),a.h.m(window,"mousedown",function(){a.h.Qa(window,"mousedown")}));"Escape"==b.key&&a.I.Ha();c&&a.za.has("Tab")&&Rw(a,b)}
966
+ function Rw(a,b){var c=a.H.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.za.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
967
+ function yw(){var a=new bc("en");a.ka("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],
968
968
  ["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],
969
969
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],
970
970
  ["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],
@@ -1025,64 +1025,64 @@ new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD
1025
1025
  ["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Ke(navigator.languages||[]);return a}K("shaka.ui.Controls",Y);Y.prototype.isOpaque=Y.prototype.Mb;Y.prototype.hideAdUI=Y.prototype.We;Y.prototype.showAdUI=Y.prototype.tf;
1026
1026
  Y.prototype.toggleFullScreen=Y.prototype.Be;Y.prototype.hideSettingsMenus=Y.prototype.Gc;Y.prototype.anySettingsMenusAreOpen=Y.prototype.Zc;Y.prototype.setLastTouchEventTime=Y.prototype.rf;Y.prototype.getDisplayTime=Y.prototype.Te;Y.prototype.isCastAllowed=Y.prototype.pg;Y.prototype.setSeeking=Y.prototype.we;Y.prototype.isSeeking=Y.prototype.rg;Y.prototype.getConfig=Y.prototype.Qf;Y.prototype.getClientSideAdContainer=Y.prototype.Pf;Y.prototype.getServerSideAdContainer=Y.prototype.hg;
1027
1027
  Y.prototype.getControlsContainer=Y.prototype.Sf;Y.prototype.getLocalPlayer=Y.prototype.Xf;Y.prototype.getPlayer=Y.prototype.bc;Y.prototype.getLocalVideo=Y.prototype.Yf;Y.prototype.getVideo=Y.prototype.yb;Y.prototype.getVideoContainer=Y.prototype.ng;Y.prototype.getLocalization=Y.prototype.Zf;Y.prototype.getCastProxy=Y.prototype.Of;Y.prototype.getAd=Y.prototype.getAd;Y.prototype.setEnabledNativeControls=Y.prototype.qf;Y.prototype.setEnabledShakaControls=Y.prototype.re;Y.prototype.configure=Y.prototype.configure;
1028
- Y.prototype.loadComplete=Y.prototype.sg;Y.prototype.allowCast=Y.prototype.Df;Y.registerSeekBar=function(a){Gw=a};Y.registerElement=ww;Y.prototype.destroy=Y.prototype.destroy;var xw=new Map,Gw=new pw;function Mw(a,b){W.call(this,a,b);var c=this;this.v=this.controls.v;this.j=this.controls.i;this.i=[];this.h=Vj();this.h.classList.add("shaka-overflow-menu-button");this.h.classList.add("shaka-no-propagation");this.h.classList.add("material-icons-round");this.h.textContent="more_vert";this.parent.appendChild(this.h);this.g=S("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");
1029
- this.j.appendChild(this.g);Nw(this);for(var d=r(this.controls.j.getElementsByClassName("shaka-back-to-overflow-button")),e=d.next();!e.done;e=d.next())this.eventManager.m(e.value,"click",function(){c.controls.Gc();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();qw(c.controls)});this.eventManager.m(this.localization,"locale-updated",function(){Ow(c)});this.eventManager.m(this.localization,"locale-changed",function(){Ow(c)});this.eventManager.m(this.adManager,"ad-started",function(){X(c.h,
1030
- !1)});this.eventManager.m(this.adManager,"ad-stopped",function(){X(c.h,!0)});this.eventManager.m(this.controls,"submenuopen",function(){X(c.g,!1)});this.eventManager.m(this.g,"touchstart",function(f){c.controls.rf(Date.now());f.stopPropagation()});this.eventManager.m(this.h,"click",function(){Pw(c)});Ow(this);this.ad&&X(this.h,!1)}ra(Mw,W);Mw.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];W.prototype.release.call(this)};
1031
- function Qw(a,b){Rw.set(a,b)}function Nw(a){for(var b=r(a.v.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Rw.get(c)?(c=Rw.get(c),a.i.push(c.create(a.g,a.controls))):Ra("Unrecognized overflow menu element requested:",c)}function Pw(a){if(a.controls.Zc())a.controls.Gc();else{X(a.g,!0);qw(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};hb(a.g.childNodes,b)&&ib(a.g.childNodes,b)[0].focus()}}
1032
- function Ow(a){a.h.setAttribute("aria-label",a.localization.resolve("MORE_SETTINGS"))}K("shaka.ui.OverflowMenu",Mw);Mw.registerElement=Qw;function Sw(){}Sw.prototype.create=function(a,b){return new Mw(a,b)};ww("overflow_menu",new Sw);var Rw=new Map;function Tw(a,b){W.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-airplay-button");this.g.setAttribute("aria-pressed","false");this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);this.i=S("span");
1033
- this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);Uw(this);Vw(this);this.eventManager.m(this.localization,"locale-updated",function(){Uw(c)});this.eventManager.m(this.localization,"locale-changed",function(){Uw(c)});this.eventManager.m(this.g,"click",function(){c.controls.yb().webkitShowPlaybackTargetPicker()});d=this.controls.yb();this.eventManager.m(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Ue()==
1034
- zl;X(c.g,"available"==e.availability&&f)});this.eventManager.m(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){Vw(c)})}ra(Tw,W);function Vw(a){var b=a.controls.yb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function Uw(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}K("shaka.ui.AirPlayButton",Tw);function Ww(){}Ww.prototype.create=function(a,b){return new Tw(a,b)};Qw("airplay",new Ww);ww("airplay",new Ww);function Xw(a,b,c){this.h=a;this.v=Yw(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Sd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.v);this.configure({});c.controls||a.ze(b);b.ui=this;c.ui=this}q=Xw.prototype;q.destroy=function(){var a=this;return H(function(b){if(1==b.g)return a.g?v(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.h?v(b,a.h.destroy(),4):b.C(4);a.h=null;z(b)})};q.Sd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Tc()&&1<navigator.maxTouchPoints};
1035
- q.getConfiguration=function(){var a=Yw(this);gk(a,this.v,Yw(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=hk(a,b));gk(this.v,a,Yw(this),{},"");this.v.castReceiverAppId&&!this.v.overflowMenuButtons.includes("cast")&&this.v.overflowMenuButtons.push("cast");this.g.configure(this.v);this.g.dispatchEvent(new N("uiupdated"))};q.Rf=function(){return this.g};q.Rg=function(a){this.g.re(a)};
1036
- function Yw(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),addSeekBar:!0,addBigPlayButton:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
1037
- level:"rgb(255, 255, 255)"},trackLabelFormat:Zw,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Sd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1038
- function $w(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return H(function(t){switch(t.g){case 1:Us();if(!Mk())return ax("shaka-ui-load-failed",bx),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.C(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),cx(f,e));t.C(2);break}h=r(a);k=h.next();
1039
- case 4:if(k.done){t.C(2);break}l=k.value;if(l.ui){t.C(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));A(t,7);return v(t,cx(l,m),9);case 9:wa(t,5);break;case 7:return F(t),ax("shaka-ui-load-failed",dx),t["return"]();case 5:k=h.next();t.C(4);break;case 2:ax("shaka-ui-loaded"),z(t)}})}
1040
- function ax(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1041
- function cx(a,b){var c,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:c=new T(b);d=new Xw(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.qf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1042
- k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return v(m,d.g.bc().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:F(m);case 3:k=h.next(),m.C(2)}})}K("shaka.ui.Overlay",Xw);Xw.prototype.setEnabled=Xw.prototype.Rg;Xw.prototype.getControls=Xw.prototype.Rf;Xw.prototype.configure=Xw.prototype.configure;Xw.prototype.getConfiguration=Xw.prototype.getConfiguration;Xw.prototype.isMobile=Xw.prototype.Sd;Xw.prototype.destroy=Xw.prototype.destroy;var Zw=0;
1043
- Xw.TrackLabelFormat={LANGUAGE:Zw,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var bx=0,dx=1;Xw.FailReasonCode={NO_BROWSER_SUPPORT:bx,PLAYER_FAILED_TO_LOAD:dx};"complete"==document.readyState?H(function(a){if(1==a.g)return v(a,Promise.resolve(),2);$w();z(a)}):window.addEventListener("load",$w);function ex(a,b,c,d,e,f,g){function h(D,B){return D+": "+B}function k(D){return"variant"==D.type?D.audioRoles?D.audioRoles.join(", "):void 0:D.roles.join(", ")}var l=a.find(function(D){return 1==D.active}),m=Xv(b);Wj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Xa:n.Xa},p=a.next()){n.Xa=p.value;p=n.Xa.language;var t=
1044
- n.Xa.forced,u=f.resolve(fc.zf),x=k(n.Xa),w=h(p,x);if(!m.has(w)){m.add(w);var y=Vj();y.addEventListener("click",function(D){return function(){c(D.Xa)}}(n));var C=S("span");y.appendChild(C);C.textContent=fx(p,f);switch(g){case Zw:t&&(C.textContent+=" ("+u+")");break;case 1:x?C.textContent=x:(Ra("Track #"+n.Xa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+u+")");break;case 2:x&&(C.textContent+=": "+x);t&&(C.textContent+=" ("+u+")");
1045
- break;case 3:n.Xa.label?C.textContent=n.Xa.label:(Ra("Track #"+n.Xa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&w==l&&(y.appendChild($v()),C.classList.add("shaka-chosen-item"),y.setAttribute("aria-selected","true"),e.textContent=C.textContent);b.appendChild(y)}}}
1046
- function fx(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Zb(a);return a in Tv?Tv[a].s:c in Tv?Tv[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function gx(a,b,c){W.call(this,a,b);var d=this;hx(this,c);ix(this);this.eventManager.m(this.button,"click",function(){d.controls.dispatchEvent(new N("submenuopen"));X(d.menu,!0);Zv(d.menu)})}ra(gx,W);
1047
- function hx(a,b){a.button=Vj();a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1048
- function ix(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Vj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=S("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=S("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}
1049
- K("shaka.ui.SettingsMenu",gx);function jx(a,b){gx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.m(this.localization,"locale-updated",function(){kx(c)});this.eventManager.m(this.localization,"locale-changed",function(){kx(c)});this.eventManager.m(this.player,"trackschanged",function(){var d=0<c.player.Ib().length;X(c.button,d);lx(c)});this.eventManager.m(this.player,"variantchanged",function(){lx(c)});kx(this);lx(this)}
1050
- ra(jx,gx);function lx(a){var b=a.player.Ib();ex(b,a.menu,function(c){a.player.wd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.v.trackLabelFormat);Zv(a.menu);a.controls.dispatchEvent(new N("languageselectionupdated"))}
1051
- function kx(a){a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.button.setAttribute("aria-label",a.localization.resolve("LANGUAGE"));a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}K("shaka.ui.AudioLanguageSelection",jx);function mx(){}mx.prototype.create=function(a,b){return new jx(a,b)};Qw("language",new mx);function nx(a,b){W.call(this,a,b);var c=this;this.h=this.controls.A;this.g=Vj();this.g.classList.add("shaka-cast-button");this.g.setAttribute("aria-pressed","false");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1052
- this.g.appendChild(d);this.parent.appendChild(this.g);ox(this);px(this);this.eventManager.m(this.localization,"locale-updated",function(){ox(c)});this.eventManager.m(this.localization,"locale-changed",function(){ox(c)});this.eventManager.m(this.g,"click",function(){qx(c)});this.eventManager.m(this.controls,"caststatuschanged",function(){px(c)})}ra(nx,W);
1053
- function qx(a){var b;H(function(c){if(1==c.g){if(a.h.sa())return a.h.uf(),c.C(0);A(c,3);a.g.disabled=!0;return v(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,wa(c,0);b=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new N("error",(new Map).set("detail",b)));z(c)})}function px(a){var b=a.h.He()&&a.controls.vb,c=a.h.sa();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(c?a.g.setAttribute("aria-pressed","true"):a.g.setAttribute("aria-pressed","false"));rx(a)}
1054
- function rx(a){a.j.textContent=a.h.sa()?a.h.td():a.localization.resolve("OFF")}function ox(a){a.g.setAttribute("aria-label",a.localization.resolve("CAST"));a.l.textContent=a.localization.resolve("CAST");rx(a)}K("shaka.ui.CastButton",nx);function sx(){}sx.prototype.create=function(a,b){return new nx(a,b)};Qw("cast",new sx);ww("cast",new sx);function tx(a,b){W.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);ux(this);this.eventManager.m(this.localization,"locale-updated",function(){ux(c)});this.eventManager.m(this.localization,"locale-changed",function(){ux(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Cc();c.player.De(0>d||4<d?1:2*d)}})}ra(tx,W);
1055
- function ux(a){a.g.setAttribute("aria-label",a.localization.resolve("FAST_FORWARD"))}K("shaka.ui.FastForwardButton",tx);function vx(){}vx.prototype.create=function(a,b){return new tx(a,b)};ww("fast_forward",new vx);function wx(a,b){W.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);xx(this);this.eventManager.m(this.localization,"locale-updated",function(){xx(c)});this.eventManager.m(this.localization,"locale-changed",function(){xx(c)});this.eventManager.m(this.g,"click",function(){return H(function(d){return v(d,
1056
- c.controls.Be(),0)})});this.eventManager.m(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";xx(c)})}ra(wx,W);function xx(a){a.g.setAttribute("aria-label",a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN"))}K("shaka.ui.FullscreenButton",wx);function yx(){}yx.prototype.create=function(a,b){return new wx(a,b)};ww("fullscreen",new yx);function zx(a,b){W.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-loop-button");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1057
- this.g.appendChild(d);Ax(this);this.parent.appendChild(this.g);this.eventManager.m(this.localization,"locale-updated",function(){Ax(c)});this.eventManager.m(this.localization,"locale-changed",function(){Ax(c)});this.eventManager.m(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Ha();c.h.oa(1)});this.o=this.video.loop;this.h=new P(function(){c.o!=c.video.loop&&(Ax(c),c.o=c.video.loop)});this.h.oa(1)}ra(zx,W);zx.prototype.release=function(){this.h.stop();this.h=null;W.prototype.release.call(this)};
1058
- function Ax(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.setAttribute("aria-label",a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE"))}K("shaka.ui.LoopButton",zx);function Bx(){}Bx.prototype.create=function(a,b){return new zx(a,b)};Qw("loop",new Bx);ww("loop",new Bx);function Cx(a,b){W.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Dx(this);Ex(this);this.eventManager.m(this.localization,"locale-updated",function(){Dx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Dx(c)});this.eventManager.m(this.g,"click",function(){c.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.m(this.video,"volumechange",
1059
- function(){Dx(c);Ex(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){Dx(c);Ex(c)});this.eventManager.m(this.adManager,"ad-muted",function(){Dx(c);Ex(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null;Dx(c);Ex(c)})}ra(Cx,W);function Dx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.setAttribute("aria-label",a.localization.resolve(b))}
1060
- function Ex(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}K("shaka.ui.MuteButton",Cx);function Fx(){}Fx.prototype.create=function(a,b){return new Cx(a,b)};ww("mute",new Fx);function Gx(a,b){W.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Vj();this.g.classList.add("shaka-pip-button");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=S("span");this.h.classList.add("shaka-current-selection-span");
1061
- d.appendChild(this.h);this.g.appendChild(d);Hx(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.m(this.localization,"locale-updated",function(){Hx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Hx(c)});this.eventManager.m(this.g,"click",function(){Ix(c)});this.eventManager.m(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.setAttribute("aria-label",c.localization.resolve("EXIT_PICTURE_IN_PICTURE"));
1028
+ Y.prototype.loadComplete=Y.prototype.sg;Y.prototype.allowCast=Y.prototype.Df;Y.registerSeekBar=function(a){Mw=a};Y.registerElement=Cw;Y.prototype.destroy=Y.prototype.destroy;var Dw=new Map,Mw=new vw;function Sw(a,b){W.call(this,a,b);var c=this;this.v=this.controls.v;this.j=this.controls.i;this.i=[];this.h=Xj();this.h.classList.add("shaka-overflow-menu-button");this.h.classList.add("shaka-no-propagation");this.h.classList.add("material-icons-round");this.h.textContent="more_vert";this.parent.appendChild(this.h);this.g=S("div");this.g.classList.add("shaka-overflow-menu");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-hidden");
1029
+ this.j.appendChild(this.g);Tw(this);for(var d=r(this.controls.j.getElementsByClassName("shaka-back-to-overflow-button")),e=d.next();!e.done;e=d.next())this.eventManager.m(e.value,"click",function(){c.controls.Gc();X(c.g,!0);c.g.childNodes.length&&c.g.childNodes[0].focus();ww(c.controls)});this.eventManager.m(this.localization,"locale-updated",function(){Uw(c)});this.eventManager.m(this.localization,"locale-changed",function(){Uw(c)});this.eventManager.m(this.adManager,"ad-started",function(){X(c.h,
1030
+ !1)});this.eventManager.m(this.adManager,"ad-stopped",function(){X(c.h,!0)});this.eventManager.m(this.controls,"submenuopen",function(){X(c.g,!1)});this.eventManager.m(this.g,"touchstart",function(f){c.controls.rf(Date.now());f.stopPropagation()});this.eventManager.m(this.h,"click",function(){Vw(c)});Uw(this);this.ad&&X(this.h,!1)}ra(Sw,W);Sw.prototype.release=function(){this.j=null;for(var a=r(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];W.prototype.release.call(this)};
1031
+ function Ww(a,b){Xw.set(a,b)}function Tw(a){for(var b=r(a.v.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,Xw.get(c)?(c=Xw.get(c),a.i.push(c.create(a.g,a.controls))):Ra("Unrecognized overflow menu element requested:",c)}function Vw(a){if(a.controls.Zc())a.controls.Gc();else{X(a.g,!0);ww(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};hb(a.g.childNodes,b)&&ib(a.g.childNodes,b)[0].focus()}}
1032
+ function Uw(a){a.h.setAttribute("aria-label",a.localization.resolve("MORE_SETTINGS"))}K("shaka.ui.OverflowMenu",Sw);Sw.registerElement=Ww;function Yw(){}Yw.prototype.create=function(a,b){return new Sw(a,b)};Cw("overflow_menu",new Yw);var Xw=new Map;function Zw(a,b){W.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-airplay-button");this.g.setAttribute("aria-pressed","false");this.h=S("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");d.appendChild(this.j);this.i=S("span");
1033
+ this.i.classList.add("shaka-current-selection-span");d.appendChild(this.i);this.g.appendChild(d);this.parent.appendChild(this.g);$w(this);ax(this);this.eventManager.m(this.localization,"locale-updated",function(){$w(c)});this.eventManager.m(this.localization,"locale-changed",function(){$w(c)});this.eventManager.m(this.g,"click",function(){c.controls.yb().webkitShowPlaybackTargetPicker()});d=this.controls.yb();this.eventManager.m(d,"webkitplaybacktargetavailabilitychanged",function(e){var f=c.player.Ue()==
1034
+ Bl;X(c.g,"available"==e.availability&&f)});this.eventManager.m(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){ax(c)})}ra(Zw,W);function ax(a){var b=a.controls.yb();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function $w(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}K("shaka.ui.AirPlayButton",Zw);function bx(){}bx.prototype.create=function(a,b){return new Zw(a,b)};Ww("airplay",new bx);Cw("airplay",new bx);function cx(a,b,c){this.h=a;this.v=dx(this);b.dataset.shakaPlayerContainer="";b.ui=this;this.Sd()&&b.classList.add("shaka-mobile");this.g=new Y(a,b,c,this.v);this.configure({});c.controls||a.ze(b);b.ui=this;c.ui=this}q=cx.prototype;q.destroy=function(){var a=this;return H(function(b){if(1==b.g)return a.g?u(b,a.g.destroy(),2):b.C(2);if(4!=b.g)return a.g=null,a.h?u(b,a.h.destroy(),4):b.C(4);a.h=null;z(b)})};q.Sd=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:Tc()&&1<navigator.maxTouchPoints};
1035
+ q.getConfiguration=function(){var a=dx(this);ik(a,this.v,dx(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=jk(a,b));ik(this.v,a,dx(this),{},"");this.v.castReceiverAppId&&!this.v.overflowMenuButtons.includes("cast")&&this.v.overflowMenuButtons.push("cast");this.g.configure(this.v);this.g.dispatchEvent(new N("uiupdated"))};q.Rf=function(){return this.g};q.Rg=function(a){this.g.re(a)};
1036
+ function dx(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language picture_in_picture cast playback_rate".split(" "),addSeekBar:!0,addBigPlayButton:!1,castReceiverAppId:"",clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
1037
+ level:"rgb(255, 255, 255)"},trackLabelFormat:ex,fadeDelay:0,doubleClickForFullscreen:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0};window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Sd()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));return b}
1038
+ function fx(){var a,b,c,d,e,f,g,h,k,l,m,n,p;return H(function(t){switch(t.g){case 1:Xs();if(!Ok())return gx("shaka-ui-load-failed",hx),t["return"]();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");if(!b.length&&!a.length){t.C(2);break}if(b.length&&!a.length){c=r(b);for(d=c.next();!d.done;d=c.next())e=d.value,e.ui||(f=document.createElement("div"),g=e.parentElement,g.replaceChild(f,e),f.appendChild(e),ix(f,e));t.C(2);break}h=r(a);k=h.next();
1039
+ case 4:if(k.done){t.C(2);break}l=k.value;if(l.ui){t.C(5);break}m=null;n=r(b);for(d=n.next();!d.done;d=n.next())if(p=d.value,p.parentElement==l){m=p;break}m||(m=document.createElement("video"),m.setAttribute("playsinline",""),l.appendChild(m));A(t,7);return u(t,ix(l,m),9);case 9:wa(t,5);break;case 7:return F(t),gx("shaka-ui-load-failed",jx),t["return"]();case 5:k=h.next();t.C(4);break;case 2:gx("shaka-ui-loaded"),z(t)}})}
1040
+ function gx(a,b){var c=null;void 0!=b&&(c={reasonCode:b});c=new CustomEvent(a,{detail:c});document.dispatchEvent(c)}
1041
+ function ix(a,b){var c,d,e,f,g,h,k,l;return H(function(m){switch(m.g){case 1:c=new T(b);d=new cx(c,a,b);e="";a.dataset&&a.dataset.shakaPlayerCastReceiverId?e=a.dataset.shakaPlayerCastReceiverId:b.dataset&&b.dataset.shakaPlayerCastReceiverId&&(e=b.dataset.shakaPlayerCastReceiverId);e.length&&d.configure({castReceiverAppId:e});b.controls&&d.g.qf(!0);if(f=b.getAttribute("src"))g=document.createElement("source"),g.setAttribute("src",f),b.appendChild(g),b.removeAttribute("src");h=r(b.querySelectorAll("source"));
1042
+ k=h.next();case 2:if(k.done){m.C(0);break}l=k.value;A(m,5);return u(m,d.g.bc().load(l.getAttribute("src")),7);case 7:m.C(0);break;case 5:F(m);case 3:k=h.next(),m.C(2)}})}K("shaka.ui.Overlay",cx);cx.prototype.setEnabled=cx.prototype.Rg;cx.prototype.getControls=cx.prototype.Rf;cx.prototype.configure=cx.prototype.configure;cx.prototype.getConfiguration=cx.prototype.getConfiguration;cx.prototype.isMobile=cx.prototype.Sd;cx.prototype.destroy=cx.prototype.destroy;var ex=0;
1043
+ cx.TrackLabelFormat={LANGUAGE:ex,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var hx=0,jx=1;cx.FailReasonCode={NO_BROWSER_SUPPORT:hx,PLAYER_FAILED_TO_LOAD:jx};"complete"==document.readyState?H(function(a){if(1==a.g)return u(a,Promise.resolve(),2);fx();z(a)}):window.addEventListener("load",fx);function kx(a,b,c,d,e,f,g){function h(D,B){return D+": "+B}function k(D){return"variant"==D.type?D.audioRoles?D.audioRoles.join(", "):void 0:D.roles.join(", ")}var l=a.find(function(D){return 1==D.active}),m=cw(b);Yj(b);b.appendChild(m);m=new Map;for(var n=r(a),p=n.next();!p.done;p=n.next())p=p.value,m.has(p.language)||m.set(p.language,new Set),m.get(p.language).add(k(p));m=new Set;l=l?h(l.language,k(l)):"";n={};a=r(a);for(p=a.next();!p.done;n={Xa:n.Xa},p=a.next()){n.Xa=p.value;p=n.Xa.language;var t=
1044
+ n.Xa.forced,v=f.resolve(fc.zf),x=k(n.Xa),w=h(p,x);if(!m.has(w)){m.add(w);var y=Xj();y.addEventListener("click",function(D){return function(){c(D.Xa)}}(n));var C=S("span");y.appendChild(C);C.textContent=lx(p,f);switch(g){case ex:t&&(C.textContent+=" ("+v+")");break;case 1:x?C.textContent=x:(Ra("Track #"+n.Xa.id+" does not have a role, but the UI is configured to only show role."),C.textContent="?");t&&(C.textContent+=" ("+v+")");break;case 2:x&&(C.textContent+=": "+x);t&&(C.textContent+=" ("+v+")");
1045
+ break;case 3:n.Xa.label?C.textContent=n.Xa.label:(Ra("Track #"+n.Xa.id+" does not have a label, but the UI is configured to only show labels."),C.textContent="?")}d&&w==l&&(y.appendChild(fw()),C.classList.add("shaka-chosen-item"),y.setAttribute("aria-selected","true"),e.textContent=C.textContent);b.appendChild(y)}}}
1046
+ function lx(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=Zb(a);return a in Zv?Zv[a].s:c in Zv?Zv[c].s+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function mx(a,b,c){W.call(this,a,b);var d=this;nx(this,c);ox(this);this.eventManager.m(this.button,"click",function(){d.controls.dispatchEvent(new N("submenuopen"));X(d.menu,!0);ew(d.menu)})}ra(mx,W);
1047
+ function nx(a,b){a.button=Xj();a.icon=S("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);var c=S("label");c.classList.add("shaka-overflow-button-label");a.nameSpan=S("span");c.appendChild(a.nameSpan);a.currentSelection=S("span");a.currentSelection.classList.add("shaka-current-selection-span");c.appendChild(a.currentSelection);a.button.appendChild(c);a.parent.appendChild(a.button)}
1048
+ function ox(a){a.menu=S("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=Xj();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);var b=S("i");b.classList.add("material-icons-round");b.textContent="arrow_back";a.backButton.appendChild(b);a.backSpan=S("span");a.backButton.appendChild(a.backSpan);a.controls.i.appendChild(a.menu)}
1049
+ K("shaka.ui.SettingsMenu",mx);function px(a,b){mx.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.menu.classList.add("shaka-audio-languages");this.eventManager.m(this.localization,"locale-updated",function(){qx(c)});this.eventManager.m(this.localization,"locale-changed",function(){qx(c)});this.eventManager.m(this.player,"trackschanged",function(){var d=0<c.player.Ib().length;X(c.button,d);rx(c)});this.eventManager.m(this.player,"variantchanged",function(){rx(c)});qx(this);rx(this)}
1050
+ ra(px,mx);function rx(a){var b=a.player.Ib();kx(b,a.menu,function(c){a.player.wd(c.language,c.roles[0])},!0,a.currentSelection,a.localization,a.controls.v.trackLabelFormat);ew(a.menu);a.controls.dispatchEvent(new N("languageselectionupdated"))}
1051
+ function qx(a){a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.button.setAttribute("aria-label",a.localization.resolve("LANGUAGE"));a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}K("shaka.ui.AudioLanguageSelection",px);function sx(){}sx.prototype.create=function(a,b){return new px(a,b)};Ww("language",new sx);function tx(a,b){W.call(this,a,b);var c=this;this.h=this.controls.A;this.g=Xj();this.g.classList.add("shaka-cast-button");this.g.setAttribute("aria-pressed","false");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1052
+ this.g.appendChild(d);this.parent.appendChild(this.g);ux(this);vx(this);this.eventManager.m(this.localization,"locale-updated",function(){ux(c)});this.eventManager.m(this.localization,"locale-changed",function(){ux(c)});this.eventManager.m(this.g,"click",function(){wx(c)});this.eventManager.m(this.controls,"caststatuschanged",function(){vx(c)})}ra(tx,W);
1053
+ function wx(a){var b;H(function(c){if(1==c.g){if(a.h.sa())return a.h.uf(),c.C(0);A(c,3);a.g.disabled=!0;return u(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,wa(c,0);b=F(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new N("error",(new Map).set("detail",b)));z(c)})}function vx(a){var b=a.h.He()&&a.controls.vb,c=a.h.sa();X(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(c?a.g.setAttribute("aria-pressed","true"):a.g.setAttribute("aria-pressed","false"));xx(a)}
1054
+ function xx(a){a.j.textContent=a.h.sa()?a.h.td():a.localization.resolve("OFF")}function ux(a){a.g.setAttribute("aria-label",a.localization.resolve("CAST"));a.l.textContent=a.localization.resolve("CAST");xx(a)}K("shaka.ui.CastButton",tx);function yx(){}yx.prototype.create=function(a,b){return new tx(a,b)};Ww("cast",new yx);Cw("cast",new yx);function zx(a,b){W.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.parent.appendChild(this.g);Ax(this);this.eventManager.m(this.localization,"locale-updated",function(){Ax(c)});this.eventManager.m(this.localization,"locale-changed",function(){Ax(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Cc();c.player.De(0>d||4<d?1:2*d)}})}ra(zx,W);
1055
+ function Ax(a){a.g.setAttribute("aria-label",a.localization.resolve("FAST_FORWARD"))}K("shaka.ui.FastForwardButton",zx);function Bx(){}Bx.prototype.create=function(a,b){return new zx(a,b)};Cw("fast_forward",new Bx);function Cx(a,b){W.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");document.fullscreenEnabled||this.g.classList.add("shaka-hidden");this.g.textContent="fullscreen";this.parent.appendChild(this.g);Dx(this);this.eventManager.m(this.localization,"locale-updated",function(){Dx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Dx(c)});this.eventManager.m(this.g,"click",function(){return H(function(d){return u(d,
1056
+ c.controls.Be(),0)})});this.eventManager.m(document,"fullscreenchange",function(){c.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Dx(c)})}ra(Cx,W);function Dx(a){a.g.setAttribute("aria-label",a.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN"))}K("shaka.ui.FullscreenButton",Cx);function Ex(){}Ex.prototype.create=function(a,b){return new Cx(a,b)};Cw("fullscreen",new Ex);function Fx(a,b){W.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-loop-button");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.l=S("span");this.l.textContent=this.localization.resolve("LOOP");d.appendChild(this.l);this.j=S("span");this.j.classList.add("shaka-current-selection-span");d.appendChild(this.j);
1057
+ this.g.appendChild(d);Gx(this);this.parent.appendChild(this.g);this.eventManager.m(this.localization,"locale-updated",function(){Gx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Gx(c)});this.eventManager.m(this.g,"click",function(){c.video.loop=!c.video.loop;c.h.Ha();c.h.oa(1)});this.o=this.video.loop;this.h=new P(function(){c.o!=c.video.loop&&(Gx(c),c.o=c.video.loop)});this.h.oa(1)}ra(Fx,W);Fx.prototype.release=function(){this.h.stop();this.h=null;W.prototype.release.call(this)};
1058
+ function Gx(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.setAttribute("aria-label",a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE"))}K("shaka.ui.LoopButton",Fx);function Hx(){}Hx.prototype.create=function(a,b){return new Fx(a,b)};Ww("loop",new Hx);Cw("loop",new Hx);function Ix(a,b){W.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons-round");this.parent.appendChild(this.g);Jx(this);Kx(this);this.eventManager.m(this.localization,"locale-updated",function(){Jx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Jx(c)});this.eventManager.m(this.g,"click",function(){c.ad?c.ad.setMuted(!c.ad.isMuted()):c.video.muted=!c.video.muted});this.eventManager.m(this.video,"volumechange",
1059
+ function(){Jx(c);Kx(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){Jx(c);Kx(c)});this.eventManager.m(this.adManager,"ad-muted",function(){Jx(c);Kx(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){c.ad=null;Jx(c);Kx(c)})}ra(Ix,W);function Jx(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted?"UNMUTE":"MUTE";a.g.setAttribute("aria-label",a.localization.resolve(b))}
1060
+ function Kx(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted?"volume_off":"volume_up";a.g.textContent=b}K("shaka.ui.MuteButton",Ix);function Lx(){}Lx.prototype.create=function(a,b){return new Ix(a,b)};Cw("mute",new Lx);function Mx(a,b){W.call(this,a,b);var c=this;this.l=this.controls.B;this.g=Xj();this.g.classList.add("shaka-pip-button");this.i=S("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);var d=S("label");d.classList.add("shaka-overflow-button-label");d.classList.add("shaka-overflow-menu-only");this.j=S("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");d.appendChild(this.j);this.h=S("span");this.h.classList.add("shaka-current-selection-span");
1061
+ d.appendChild(this.h);this.g.appendChild(d);Nx(this);this.parent.appendChild(this.g);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||X(this.g,!1);this.eventManager.m(this.localization,"locale-updated",function(){Nx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Nx(c)});this.eventManager.m(this.g,"click",function(){Ox(c)});this.eventManager.m(this.l,"enterpictureinpicture",function(){c.i.textContent="branding_watermark";c.g.setAttribute("aria-label",c.localization.resolve("EXIT_PICTURE_IN_PICTURE"));
1062
1062
  c.h.textContent=c.localization.resolve("ON")});this.eventManager.m(this.l,"leavepictureinpicture",function(){c.i.textContent="picture_in_picture_alt";c.g.setAttribute("aria-label",c.localization.resolve("ENTER_PICTURE_IN_PICTURE"));c.h.textContent=c.localization.resolve("OFF")});this.eventManager.m(this.controls,"caststatuschanged",function(e){e.newStatus?document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&X(c.g,!1):document.pictureInPictureEnabled&&!c.video.disablePictureInPicture&&
1063
- X(c.g,!0)});this.eventManager.m(this.player,"trackschanged",function(){Jx(c)})}ra(Gx,W);function Ix(a){var b;H(function(c){if(1==c.g)return A(c,2),document.pictureInPictureElement?v(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),v(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return wa(c,0);b=F(c);a.controls.dispatchEvent(new N("error",(new Map).set("detail",b)));z(c)})}
1064
- function Hx(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.setAttribute("aria-label",a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE"));a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1065
- function Jx(a){H(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.Ye())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?v(b,document.exitPictureInPicture(),0):b.C(0)})}K("shaka.ui.PipButton",Gx);function Kx(){}Kx.prototype.create=function(a,b){return new Gx(a,b)};Qw("picture_in_picture",new Kx);ww("picture_in_picture",new Kx);function Lx(a,b){gx.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.eventManager.m(this.localization,"locale-updated",function(){Mx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Mx(c)});this.eventManager.m(this.player,"ratechange",function(){Nx(c,c.player.Cc())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);Mx(this);
1066
- Ox(this);Nx(this,this.player.Cc())}ra(Lx,gx);function Mx(a){a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.button.setAttribute("aria-label",a.localization.resolve("PLAYBACK_RATE"));a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1067
- function Nx(a,b){var c=Yv(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild($v()),d.setAttribute("aria-selected","true"),c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1068
- function Ox(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={rc:b.rc},d=c.next()){b.rc=d.value;d=Vj();var e=S("span");e.textContent=b.rc;d.appendChild(e);a.eventManager.m(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.rc);a.video.defaultPlaybackRate=a.g.get(f.rc)}}(b));a.menu.appendChild(d)}Zv(a.menu)}K("shaka.ui.PlaybackRateSelection",Lx);function Px(){}Px.prototype.create=function(a,b){return new Lx(a,b)};Qw("playback_rate",new Px);function Qx(a,b){W.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("shaka-current-time");Rx(this,"0:00");this.parent.appendChild(this.g);this.eventManager.m(this.g,"click",function(){c.player.Z()&&(c.video.currentTime=c.player.Va().end)});this.eventManager.m(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.ea,e=c.controls.Te(),f=c.video.duration,g=c.player.Va(),h=g.end-g.start;c.player.Z()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Rx(c,"- "+aw(e,f)),c.g.disabled=
1069
- !1):(Rx(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=aw(e,d),f&&(e+=" / "+aw(f,d)),Rx(c,e),c.g.disabled=!0)});this.eventManager.m(this.player,"trackschanged",function(){c.player.Z()&&c.g.setAttribute("aria-label",c.localization.resolve("SKIP_TO_LIVE"))})}ra(Qx,W);function Rx(a,b){b!=a.g.textContent&&(a.g.textContent=b)}K("shaka.ui.PresentationTimeTracker",Qx);function Sx(){}Sx.prototype.create=function(a,b){return new Qx(a,b)};ww("time_and_duration",new Sx);function Tx(a,b){gx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.menu.classList.add("shaka-resolutions");this.eventManager.m(this.localization,"locale-updated",function(){Ux(c)});this.eventManager.m(this.localization,"locale-changed",function(){Ux(c)});this.eventManager.m(this.player,"variantchanged",function(){Vx(c)});this.eventManager.m(this.player,"trackschanged",function(){Vx(c)});this.eventManager.m(this.player,"abrstatuschanged",function(){Vx(c)});
1070
- Vx(this);Ux(this)}ra(Tx,gx);
1071
- function Vx(a){var b=a.player.Ib();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=Xv(a.menu);Wj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1072
- {uc:e.uc},g=f.next()){e.uc=g.value;g=Vj();g.classList.add("explicit-resolution");a.eventManager.m(g,"click",function(k){return function(){var l=k.uc;a.player.configure({abr:{enabled:!1}});a.player.pe(l,a.controls.v.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.uc.height+"p";g.appendChild(h);d||e.uc!=c||(g.setAttribute("aria-selected","true"),g.appendChild($v()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Vj();e.classList.add("shaka-enable-abr-button");
1073
- a.eventManager.m(e,"click",function(){a.player.configure({abr:{enabled:!0}});Vx(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.setAttribute("aria-selected","true"),e.appendChild($v()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);Zv(a.menu);a.controls.dispatchEvent(new N("resolutionselectionupdated"))}}
1074
- function Ux(a){a.button.setAttribute("aria-label",a.localization.resolve("RESOLUTION"));a.backButton.setAttribute("aria-label",a.localization.resolve("RESOLUTION"));a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}K("shaka.ui.ResolutionSelection",Tx);
1075
- function Wx(){}Wx.prototype.create=function(a,b){return new Tx(a,b)};Qw("quality",new Wx);function Xx(a,b){W.call(this,a,b);var c=this;this.g=Vj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);Yx(this);this.eventManager.m(this.localization,"locale-updated",function(){Yx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Yx(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Cc();c.player.De(0<d||-4>d?-1:2*d)}})}ra(Xx,W);
1076
- function Yx(a){a.g.setAttribute("aria-label",a.localization.resolve("REWIND"))}K("shaka.ui.RewindButton",Xx);function Zx(){}Zx.prototype.create=function(a,b){return new Xx(a,b)};ww("rewind",new Zx);function $x(a,b){W.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Vj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);ay(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1077
- d:(c.i.stop(),X(c.h,!1))});this.eventManager.m(this.localization,"locale-updated",function(){ay(c)});this.eventManager.m(this.localization,"locale-changed",function(){ay(c)});this.eventManager.m(this.adManager,"ad-started",function(){by(c)});this.eventManager.m(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.m(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.m(this.g,
1078
- "click",function(){c.ad.skip()});this.ad&&by(this)}ra($x,W);$x.prototype.release=function(){this.i.stop();this.i=null;W.prototype.release.call(this)};function ay(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function by(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.Ha(),a.i.oa(.5))}K("shaka.ui.SkipAdButton",$x);function cy(a,b){ew.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}ra(cy,ew);cy.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};cy.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1079
- K("shaka.ui.SmallPlayButton",cy);function dy(){}dy.prototype.create=function(a,b){return new cy(a,b)};ww("play_pause",new dy);function ey(a,b){W.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.setAttribute("aria-hidden",!0);this.parent.appendChild(c)}ra(ey,W);K("shaka.ui.Spacer",ey);function fy(){}fy.prototype.create=function(a,b){return new ey(a,b)};ww("spacer",new fy);function gy(a,b){gx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nb()?this.button.setAttribute("aria-pressed","true"):this.button.setAttribute("aria-pressed","false");hy(this);this.eventManager.m(this.localization,"locale-updated",function(){iy(c);jy(c)});this.eventManager.m(this.localization,"locale-changed",function(){iy(c);jy(c)});this.eventManager.m(this.player,"texttrackvisibility",
1080
- function(){ky(c)});this.eventManager.m(this.player,"textchanged",function(){jy(c)});this.eventManager.m(this.player,"trackschanged",function(){ly(c)});ky(this);iy(this);jy(this);ly(this)}ra(gy,gx);function hy(a){var b=Vj();b.setAttribute("aria-selected","true");a.menu.appendChild(b);b.appendChild($v());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1081
- function ky(a){a.player.Nb()?(a.icon.classList.add("shaka-captions-on"),a.icon.classList.remove("shaka-captions-off"),a.button.setAttribute("aria-pressed","true")):(a.icon.classList.add("shaka-captions-off"),a.icon.classList.remove("shaka-captions-on"),a.button.setAttribute("aria-pressed","false"));a.controls.dispatchEvent(new N("captionselectionupdated"))}
1082
- function jy(a){var b=a.player.mb();ex(b,a.menu,function(c){return my(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.v.trackLabelFormat);b=Vj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.m(b,"click",function(){a.player.ye(!1);jy(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.setAttribute("aria-selected","true"),b.appendChild($v()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));Zv(a.menu);
1083
- a.controls.dispatchEvent(new N("captionselectionupdated"))}function my(a,b){return H(function(c){a.player.oe(b);return v(c,a.player.ye(!0),0)})}function iy(a){a.button.setAttribute("aria-label",a.localization.resolve("CAPTIONS"));a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1084
- function ly(a){var b=0<a.player.mb().length;X(a.button,b);jy(a)}K("shaka.ui.TextSelection",gy);function ny(){}ny.prototype.create=function(a,b){return new gy(a,b)};Qw("captions",new ny);function oy(a,b){iw.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.v=this.controls.v;this.eventManager.m(this.video,"volumechange",function(){return py(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){return qy(c)});this.eventManager.m(this.adManager,"ad-muted",function(){return qy(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){return py(c)});this.eventManager.m(this.localization,"locale-updated",function(){return ry(c)});
1085
- this.eventManager.m(this.localization,"locale-changed",function(){return ry(c)});py(this);ry(this);if(this.ad)this.onChange()}ra(oy,iw);oy.prototype.onChange=function(){this.ad?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function py(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);sy(a)}function qy(a){var b=a.ad.getVolume();a.setValue(b);sy(a)}
1086
- function sy(a){var b=a.v.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function ry(a){a.bar.setAttribute("aria-label",a.localization.resolve("VOLUME"))}K("shaka.ui.VolumeBar",oy);function ty(){}ty.prototype.create=function(a,b){return new oy(a,b)};ww("volume",new ty);}).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})();
1063
+ X(c.g,!0)});this.eventManager.m(this.player,"trackschanged",function(){Px(c)})}ra(Mx,W);function Ox(a){var b;H(function(c){if(1==c.g)return A(c,2),document.pictureInPictureElement?u(c,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(c,a.video.requestPictureInPicture(),5));if(2!=c.g)return wa(c,0);b=F(c);a.controls.dispatchEvent(new N("error",(new Map).set("detail",b)));z(c)})}
1064
+ function Nx(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");a.g.setAttribute("aria-label",a.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE"));a.h.textContent=a.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
1065
+ function Px(a){H(function(b){if(!document.pictureInPictureEnabled||a.video.disablePictureInPicture)return X(a.g,!1),b.C(0);if(!a.player||!a.player.Ye())return X(a.g,!0),b.C(0);X(a.g,!1);return document.pictureInPictureElement?u(b,document.exitPictureInPicture(),0):b.C(0)})}K("shaka.ui.PipButton",Mx);function Qx(){}Qx.prototype.create=function(a,b){return new Mx(a,b)};Ww("picture_in_picture",new Qx);Cw("picture_in_picture",new Qx);function Rx(a,b){mx.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.eventManager.m(this.localization,"locale-updated",function(){Sx(c)});this.eventManager.m(this.localization,"locale-changed",function(){Sx(c)});this.eventManager.m(this.player,"ratechange",function(){Tx(c,c.player.Cc())});this.g=new Map([["0.5x",.5],["0.75x",.75],["1x",1],["1.25x",1.25],["1.5x",1.5],["1.75x",1.75],["2x",2]]);Sx(this);
1066
+ Ux(this);Tx(this,this.player.Cc())}ra(Rx,mx);function Sx(a){a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.button.setAttribute("aria-label",a.localization.resolve("PLAYBACK_RATE"));a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
1067
+ function Tx(a,b){var c=dw(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return a.g.get(e.textContent)==b}))d=c.parentElement,d.appendChild(fw()),d.setAttribute("aria-selected","true"),c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x"}
1068
+ function Ux(a){for(var b={},c=r(a.g.keys()),d=c.next();!d.done;b={rc:b.rc},d=c.next()){b.rc=d.value;d=Xj();var e=S("span");e.textContent=b.rc;d.appendChild(e);a.eventManager.m(d,"click",function(f){return function(){a.video.playbackRate=a.g.get(f.rc);a.video.defaultPlaybackRate=a.g.get(f.rc)}}(b));a.menu.appendChild(d)}ew(a.menu)}K("shaka.ui.PlaybackRateSelection",Rx);function Vx(){}Vx.prototype.create=function(a,b){return new Rx(a,b)};Ww("playback_rate",new Vx);function Wx(a,b){W.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("shaka-current-time");Xx(this,"0:00");this.parent.appendChild(this.g);this.eventManager.m(this.g,"click",function(){c.player.Z()&&(c.video.currentTime=c.player.Va().end)});this.eventManager.m(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.ea,e=c.controls.Te(),f=c.video.duration,g=c.player.Va(),h=g.end-g.start;c.player.Z()?(e=Math.max(0,Math.floor(g.end-e)),f=3600<=h,1<=e||d?(Xx(c,"- "+gw(e,f)),c.g.disabled=
1069
+ !1):(Xx(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=f,e=gw(e,d),f&&(e+=" / "+gw(f,d)),Xx(c,e),c.g.disabled=!0)});this.eventManager.m(this.player,"trackschanged",function(){c.player.Z()&&c.g.setAttribute("aria-label",c.localization.resolve("SKIP_TO_LIVE"))})}ra(Wx,W);function Xx(a,b){b!=a.g.textContent&&(a.g.textContent=b)}K("shaka.ui.PresentationTimeTracker",Wx);function Yx(){}Yx.prototype.create=function(a,b){return new Wx(a,b)};Cw("time_and_duration",new Yx);function Zx(a,b){mx.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.menu.classList.add("shaka-resolutions");this.eventManager.m(this.localization,"locale-updated",function(){$x(c)});this.eventManager.m(this.localization,"locale-changed",function(){$x(c)});this.eventManager.m(this.player,"variantchanged",function(){ay(c)});this.eventManager.m(this.player,"trackschanged",function(){ay(c)});this.eventManager.m(this.player,"abrstatuschanged",function(){ay(c)});
1070
+ ay(this);$x(this)}ra(Zx,mx);
1071
+ function ay(a){var b=a.player.Ib();if(b.length&&!b[0].height)X(a.menu,!1),X(a.button,!1);else{X(a.button,!0);b.sort(function(k,l){return l.height-k.height});var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){return k.language==c.language&&k.channelsCount==c.channelsCount}));b=b.filter(function(k,l){return b.findIndex(function(m){return m.height==k.height})==l});var d=cw(a.menu);Yj(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e={},f=r(b),g=f.next();!g.done;e=
1072
+ {uc:e.uc},g=f.next()){e.uc=g.value;g=Xj();g.classList.add("explicit-resolution");a.eventManager.m(g,"click",function(k){return function(){var l=k.uc;a.player.configure({abr:{enabled:!1}});a.player.pe(l,a.controls.v.clearBufferOnQualityChange)}}(e));var h=S("span");h.textContent=e.uc.height+"p";g.appendChild(h);d||e.uc!=c||(g.setAttribute("aria-selected","true"),g.appendChild(fw()),h.classList.add("shaka-chosen-item"),a.currentSelection.textContent=h.textContent);a.menu.appendChild(g)}e=Xj();e.classList.add("shaka-enable-abr-button");
1073
+ a.eventManager.m(e,"click",function(){a.player.configure({abr:{enabled:!0}});ay(a)});a.g=S("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.setAttribute("aria-selected","true"),e.appendChild(fw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.menu.appendChild(e);ew(a.menu);a.controls.dispatchEvent(new N("resolutionselectionupdated"))}}
1074
+ function $x(a){a.button.setAttribute("aria-label",a.localization.resolve("RESOLUTION"));a.backButton.setAttribute("aria-label",a.localization.resolve("RESOLUTION"));a.backSpan.textContent=a.localization.resolve("RESOLUTION");a.nameSpan.textContent=a.localization.resolve("RESOLUTION");a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}K("shaka.ui.ResolutionSelection",Zx);
1075
+ function by(){}by.prototype.create=function(a,b){return new Zx(a,b)};Ww("quality",new by);function cy(a,b){W.call(this,a,b);var c=this;this.g=Xj();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.parent.appendChild(this.g);dy(this);this.eventManager.m(this.localization,"locale-updated",function(){dy(c)});this.eventManager.m(this.localization,"locale-changed",function(){dy(c)});this.eventManager.m(this.g,"click",function(){if(c.video.duration){var d=c.player.Cc();c.player.De(0<d||-4>d?-1:2*d)}})}ra(cy,W);
1076
+ function dy(a){a.g.setAttribute("aria-label",a.localization.resolve("REWIND"))}K("shaka.ui.RewindButton",cy);function ey(){}ey.prototype.create=function(a,b){return new cy(a,b)};Cw("rewind",new ey);function fy(a,b){W.call(this,a,b);var c=this;this.j=S("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=S("div");this.h.classList.add("shaka-skip-ad-counter");X(this.h,!1);this.j.appendChild(this.h);this.g=Xj();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;X(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);gy(this);this.i=new P(function(){var d=Math.round(c.ad.getTimeUntilSkippable());0<d?c.h.textContent=
1077
+ d:(c.i.stop(),X(c.h,!1))});this.eventManager.m(this.localization,"locale-updated",function(){gy(c)});this.eventManager.m(this.localization,"locale-changed",function(){gy(c)});this.eventManager.m(this.adManager,"ad-started",function(){hy(c)});this.eventManager.m(this.adManager,"ad-skip-state-changed",function(){c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),X(c.h,!1))});this.eventManager.m(this.adManager,"ad-stopped",function(){c.i.stop();c.g.disabled=!0;X(c.g,!1);X(c.h,!1)});this.eventManager.m(this.g,
1078
+ "click",function(){c.ad.skip()});this.ad&&hy(this)}ra(fy,W);fy.prototype.release=function(){this.i.stop();this.i=null;W.prototype.release.call(this)};function gy(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function hy(a){a.ad.isSkippable()&&(X(a.g,!0),X(a.h,!0),a.h.textContent="",a.i.Ha(),a.i.oa(.5))}K("shaka.ui.SkipAdButton",fy);function iy(a,b){kw.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.h();this.g()}ra(iy,kw);iy.prototype.h=function(){this.button.textContent=this.video.ended?"replay":this.isPaused()?"play_arrow":"pause"};iy.prototype.g=function(){if(this.video.ended)this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};
1079
+ K("shaka.ui.SmallPlayButton",iy);function jy(){}jy.prototype.create=function(a,b){return new iy(a,b)};Cw("play_pause",new jy);function ky(a,b){W.call(this,a,b);var c=S("div");c.classList.add("shaka-spacer");c.setAttribute("aria-hidden",!0);this.parent.appendChild(c)}ra(ky,W);K("shaka.ui.Spacer",ky);function ly(){}ly.prototype.create=function(a,b){return new ky(a,b)};Cw("spacer",new ly);function my(a,b){mx.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Nb()?this.button.setAttribute("aria-pressed","true"):this.button.setAttribute("aria-pressed","false");ny(this);this.eventManager.m(this.localization,"locale-updated",function(){oy(c);py(c)});this.eventManager.m(this.localization,"locale-changed",function(){oy(c);py(c)});this.eventManager.m(this.player,"texttrackvisibility",
1080
+ function(){qy(c);py(c)});this.eventManager.m(this.player,"textchanged",function(){py(c)});this.eventManager.m(this.player,"trackschanged",function(){ry(c)});qy(this);oy(this);py(this);ry(this)}ra(my,mx);function ny(a){var b=Xj();b.setAttribute("aria-selected","true");a.menu.appendChild(b);b.appendChild(fw());a.g=S("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
1081
+ function qy(a){a.player.Nb()?(a.icon.classList.add("shaka-captions-on"),a.icon.classList.remove("shaka-captions-off"),a.button.setAttribute("aria-pressed","true")):(a.icon.classList.add("shaka-captions-off"),a.icon.classList.remove("shaka-captions-on"),a.button.setAttribute("aria-pressed","false"));a.controls.dispatchEvent(new N("captionselectionupdated"))}
1082
+ function py(a){var b=a.player.ob();kx(b,a.menu,function(c){return sy(a,c)},a.player.Nb(),a.currentSelection,a.localization,a.controls.v.trackLabelFormat);b=Xj();b.classList.add("shaka-turn-captions-off-button");a.eventManager.m(b,"click",function(){a.player.ye(!1);py(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Nb()||(b.setAttribute("aria-selected","true"),b.appendChild(fw()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));ew(a.menu);
1083
+ a.controls.dispatchEvent(new N("captionselectionupdated"))}function sy(a,b){return H(function(c){a.player.oe(b);return u(c,a.player.ye(!0),0)})}function oy(a){a.button.setAttribute("aria-label",a.localization.resolve("CAPTIONS"));a.backButton.setAttribute("aria-label",a.localization.resolve("BACK"));a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
1084
+ function ry(a){var b=0<a.player.ob().length;X(a.button,b);py(a)}K("shaka.ui.TextSelection",my);function ty(){}ty.prototype.create=function(a,b){return new my(a,b)};Ww("captions",new ty);function uy(a,b){ow.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.v=this.controls.v;this.eventManager.m(this.video,"volumechange",function(){return vy(c)});this.eventManager.m(this.adManager,"ad-volume-changed",function(){return wy(c)});this.eventManager.m(this.adManager,"ad-muted",function(){return wy(c)});this.eventManager.m(this.adManager,"ad-stopped",function(){return vy(c)});this.eventManager.m(this.localization,"locale-updated",function(){return xy(c)});
1085
+ this.eventManager.m(this.localization,"locale-changed",function(){return xy(c)});vy(this);xy(this);if(this.ad)this.onChange()}ra(uy,ow);uy.prototype.onChange=function(){this.ad?this.ad.setVolume(this.getValue()):(this.video.volume=this.getValue(),this.video.muted=0==this.video.volume?!0:!1)};function vy(a){a.video.muted?a.setValue(0):a.setValue(a.video.volume);yy(a)}function wy(a){var b=a.ad.getVolume();a.setValue(b);yy(a)}
1086
+ function yy(a){var b=a.v.volumeBarColors,c=["to right"];c.push(b.level+100*a.getValue()+"%");c.push(b.base+100*a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function xy(a){a.bar.setAttribute("aria-label",a.localization.resolve("VOLUME"))}K("shaka.ui.VolumeBar",uy);function zy(){}zy.prototype.create=function(a,b){return new uy(a,b)};Cw("volume",new zy);}).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})();
1087
1087
 
1088
1088
  //# sourceMappingURL=shaka-player.ui.map