shaka-player 4.3.5 → 4.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/.github/workflows/demo-version-index.yaml +3 -3
  2. package/.github/workflows/selenium-lab-tests.yaml +23 -1
  3. package/AUTHORS +2 -1
  4. package/CHANGELOG.md +53 -0
  5. package/CONTRIBUTORS +4 -1
  6. package/README.md +3 -0
  7. package/demo/demo.less +1 -0
  8. package/dist/controls.css +2 -2
  9. package/dist/controls.css.map +1 -1
  10. package/dist/demo.compiled.debug.js +167 -296
  11. package/dist/demo.compiled.debug.map +4 -4
  12. package/dist/demo.compiled.js +167 -296
  13. package/dist/demo.compiled.map +4 -4
  14. package/dist/demo.css +1 -1
  15. package/dist/demo.css.map +1 -1
  16. package/dist/deps.js +1 -1
  17. package/dist/locales.js +32 -32
  18. package/dist/receiver.compiled.debug.js +34 -63
  19. package/dist/receiver.compiled.debug.map +4 -4
  20. package/dist/receiver.compiled.js +34 -63
  21. package/dist/receiver.compiled.map +4 -4
  22. package/dist/shaka-player.compiled.d.ts +20 -3
  23. package/dist/shaka-player.compiled.debug.d.ts +20 -3
  24. package/dist/shaka-player.compiled.debug.externs.js +29 -14
  25. package/dist/shaka-player.compiled.debug.js +303 -292
  26. package/dist/shaka-player.compiled.debug.map +4 -4
  27. package/dist/shaka-player.compiled.externs.js +29 -14
  28. package/dist/shaka-player.compiled.js +886 -879
  29. package/dist/shaka-player.compiled.map +3 -3
  30. package/dist/shaka-player.ui.d.ts +20 -3
  31. package/dist/shaka-player.ui.debug.d.ts +20 -3
  32. package/dist/shaka-player.ui.debug.externs.js +17 -2
  33. package/dist/shaka-player.ui.debug.js +321 -309
  34. package/dist/shaka-player.ui.debug.map +3 -3
  35. package/dist/shaka-player.ui.externs.js +17 -2
  36. package/dist/shaka-player.ui.js +1027 -1021
  37. package/dist/shaka-player.ui.map +3 -3
  38. package/docs/tutorials/a11y.md +0 -4
  39. package/docs/tutorials/ad_monetization.md +0 -4
  40. package/docs/tutorials/basic-usage.md +0 -5
  41. package/docs/tutorials/config.md +0 -5
  42. package/docs/tutorials/debugging.md +0 -5
  43. package/docs/tutorials/drm-config.md +0 -5
  44. package/docs/tutorials/fairplay.md +2 -2
  45. package/docs/tutorials/license-server-auth.md +0 -5
  46. package/docs/tutorials/license-wrapping.md +0 -5
  47. package/docs/tutorials/network-and-buffering-config.md +0 -5
  48. package/docs/tutorials/ui-customization.md +0 -5
  49. package/docs/tutorials/ui.md +0 -7
  50. package/docs/tutorials/welcome.md +1 -6
  51. package/externs/network_information.js +7 -2
  52. package/externs/shaka/abr_manager.js +6 -0
  53. package/externs/shaka/net.js +1 -0
  54. package/externs/shaka/player.js +13 -7
  55. package/lib/abr/simple_abr_manager.js +27 -3
  56. package/lib/ads/client_side_ad_manager.js +6 -3
  57. package/lib/cea/mp4_cea_parser.js +5 -2
  58. package/lib/dash/dash_parser.js +49 -48
  59. package/lib/debug/log.js +9 -13
  60. package/lib/hls/hls_parser.js +60 -7
  61. package/lib/hls/manifest_text_parser.js +10 -1
  62. package/lib/media/drm_engine.js +9 -6
  63. package/lib/media/media_source_engine.js +33 -13
  64. package/lib/media/presentation_timeline.js +9 -2
  65. package/lib/media/segment_index.js +2 -0
  66. package/lib/media/segment_reference.js +25 -2
  67. package/lib/media/streaming_engine.js +40 -11
  68. package/lib/net/http_fetch_plugin.js +79 -57
  69. package/lib/net/networking_engine.js +1 -0
  70. package/lib/player.js +26 -3
  71. package/lib/polyfill/media_capabilities.js +13 -0
  72. package/lib/text/mp4_vtt_parser.js +4 -0
  73. package/lib/text/text_engine.js +1 -0
  74. package/lib/util/manifest_parser_utils.js +1 -2
  75. package/lib/util/mime_utils.js +11 -0
  76. package/lib/util/periods.js +5 -5
  77. package/lib/util/stream_utils.js +2 -2
  78. package/maintained-branches.md +2 -3
  79. package/package.json +8 -3
  80. package/test/cea/mp4_cea_parser_unit.js +19 -0
  81. package/test/dash/dash_parser_live_unit.js +3 -2
  82. package/test/hls/hls_live_unit.js +3 -1
  83. package/test/hls/hls_parser_unit.js +156 -0
  84. package/test/media/content_workarounds_unit.js +43 -0
  85. package/test/media/drm_engine_integration.js +4 -17
  86. package/test/media/media_source_engine_unit.js +30 -0
  87. package/test/media/streaming_engine_unit.js +6 -1
  88. package/test/net/networking_engine_unit.js +6 -1
  89. package/test/player_integration.js +39 -0
  90. package/test/player_unit.js +57 -0
  91. package/test/polyfill/media_capabilities_unit.js +1 -0
  92. package/test/test/assets/h265-cea-init.mp4 +0 -0
  93. package/test/test/assets/h265-cea-segment.mp4 +0 -0
  94. package/test/test/assets/text-clip-alt.vtt +63 -0
  95. package/test/test/util/fake_drm_engine.js +3 -0
  96. package/test/test/util/fake_media_source_engine.js +4 -0
  97. package/test/test/util/layout_tests.js +4 -3
  98. package/test/test/util/simple_fakes.js +6 -0
  99. package/test/test/util/test_scheme.js +9 -14
  100. package/test/text/mp4_vtt_parser_unit.js +8 -0
  101. package/test/util/mime_utils_unit.js +10 -0
  102. package/ui/less/containers.less +4 -0
@@ -15,51 +15,51 @@
15
15
  Copyright The Closure Library Authors.
16
16
  SPDX-License-Identifier: Apache-2.0
17
17
  */
18
- var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
19
- function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function ea(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}}
20
- ea("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
21
- ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});function fa(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
22
- 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 ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
23
- if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},ma={};try{ma.__proto__=la;ka=ma.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var na=ja;
24
- function oa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(na)na(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.xh=b.prototype}function pa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function qa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}pa.prototype.s=function(a){this.h=a};
25
- function ra(a,b){a.i={Ee:b,Le:!0};a.g=a.m||a.j}pa.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}pa.prototype.A=function(a){this.g=a};function A(a){a.g=0}function D(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function sa(a){a.m=0;a.j=2}function ta(a,b){a.g=b;a.m=0}function ua(a){a.m=0;var b=a.i.Ee;a.i=null;return b}function xa(a){a.u=[a.i];a.m=0;a.j=0}
26
- function ya(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Le?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function za(a){this.g=new pa;this.h=a}function Aa(a,b){qa(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)}
27
- 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.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ra(a.g,g),Ca(a)}a.g.l=null;d.call(a.g,f);return Ca(a)}function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ra(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Le)throw b.Ee;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
28
- function Da(a){this.next=function(b){qa(a.g);a.g.l?b=Ba(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ca(a));return b};this.throw=function(b){qa(a.g);a.g.l?b=Ba(a,a.g.l["throw"],b,a.g.s):(ra(a.g,b),b=Ca(a));return b};this.return=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}function Ea(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
29
- function G(a){return Ea(new Da(new za(a)))}function Fa(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
30
- ea("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=da.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
18
+ var q;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
19
+ function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
20
+ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
21
+ fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
22
+ function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
23
+ if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={a:!0},oa={};try{oa.__proto__=na;ma=oa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
24
+ function qa(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.zh=b.prototype}function ra(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ra.prototype.s=function(a){this.h=a};
25
+ function ta(a,b){a.i={Fe:b,Me:!0};a.g=a.m||a.j}ra.prototype.return=function(a){this.i={return:a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ra.prototype.B=function(a){this.g=a};function B(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function wa(a){a.m=0;var b=a.i.Fe;a.i=null;return b}function ya(a){a.u=[a.i];a.m=0;a.j=0}
26
+ function za(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Me?a.g=a.m||a.j:void 0!=c.B&&a.j<c.B?(a.g=c.B,a.i=null):a.g=a.j:a.g=b}function Aa(a){this.g=new ra;this.h=a}function Ba(a,b){sa(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Da(a)}
27
+ function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Me)throw b.Fe;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
28
+ function Ea(a){this.next=function(b){sa(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Da(a));return b};this.return=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}
29
+ function G(a){return Ga(new Ea(new Aa(a)))}function Ia(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
30
+ fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
31
31
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.H(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
32
- b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
33
- function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=da.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
34
- b.prototype.H=function(g){var h=this.j();g.Lc(h.resolve,h.reject)};b.prototype.J=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(y){m(y)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.Lc(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Lc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
35
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Lc(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(y){p[v]=y;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).Lc(n(p.length-1),m),k=h.next();
36
- while(!k.done)})};return b});function Ha(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
37
- 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(!Ha(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({}),
38
- 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(!Ha(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ha(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ha(k,
39
- g)&&Ha(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ha(k,g)&&Ha(k[g],this.g)?delete k[g][this.g]:!1};return b});
40
- ea("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return fa(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ha(h.h,l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,ga:n}}return{id:l,
32
+ b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.J(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.A()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.A=
33
+ function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
34
+ b.prototype.H=function(g){var h=this.j();g.Mc(h.resolve,h.reject)};b.prototype.J=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,t){return"function"==typeof n?function(v){try{l(n(v))}catch(y){m(y)}}:t}var l,m,p=new b(function(n,t){l=n;m=t});this.Mc(k(g,l),k(h,m));return p};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Mc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
35
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).Mc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(v){return function(y){n[v]=y;t--;0==t&&l(n)}}var n=[],t=0;do n.push(void 0),t++,d(k.value).Mc(p(n.length-1),m),k=h.next();
36
+ while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
37
+ fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
38
+ m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m.delete(k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Ja(k,
39
+ g)&&Ja(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.g)?delete k[g][this.g]:!1};return b});
40
+ fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ja(h.h,l))for(h=0;h<m.length;h++){var p=m[h];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:h,ga:p}}return{id:l,
41
41
  list:m,index:-1,ga:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
42
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ga?l.ga.value=k:(l.ga={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.ga),this.g.Qa.next=l.ga,this.g.Qa=l.ga,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ga&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ga.Qa.next=h.ga.next,h.ga.next.Qa=h.ga.Qa,
42
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(p){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.ga?l.ga.value=k:(l.ga={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.ga),this.g.Qa.next=l.ga,this.g.Qa=l.ga,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.ga&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.ga.Qa.next=h.ga.next,h.ga.next.Qa=h.ga.Qa,
43
43
  h.ga.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Qa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).ga};e.prototype.get=function(h){return(h=d(this,h).ga)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
44
44
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
45
- ea("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
45
+ fa("Set",function(a){function b(c){this.g=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
46
46
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
47
- b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ia(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Je:e,v:f}}return{Je:-1,v:void 0}}ea("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ia(this,b,c).Je}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
48
- ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Ka(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
49
- ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ka(this,b,"includes").indexOf(b,c||0)}});ea("Array.prototype.find",function(a){return a?a:function(b,c){return Ia(this,b,c).v}});ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ka(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
50
- function La(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ea("Array.prototype.keys",function(a){return a?a:function(){return La(this,function(b){return b})}});var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ha(d,e)&&(a[e]=d[e])}return a};
51
- ea("Object.assign",function(a){return a||Na});ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ea("Array.prototype.values",function(a){return a?a:function(){return La(this,function(b,c){return c})}});
52
- ea("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});ea("Array.prototype.entries",function(a){return a?a:function(){return La(this,function(b,c){return[b,c]})}});
53
- ea("String.prototype.repeat",function(a){return a?a:function(b){var c=Ka(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ea("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push(b[d]);return c}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
54
- ea("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ha(b,d)&&c.push([d,b[d]]);return c}});var Oa=this||self;
55
- function K(a,b){a=a.split(".");var c=Oa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Ra(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Ra.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ra.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Ra.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Va(){}function Wa(){}function Xa(a){var b=Fa.apply(1,arguments);Ya.has(a)||(Ya.add(a),Wa.apply(Ta,ha(b)))}function Za(){}function $a(){}function ab(){}function bb(){}var Ya=new Set;if(window.console&&window.console.log.bind){var cb={},db=(cb[1]=console.error.bind(console),cb[2]=console.warn.bind(console),cb[3]=console.info.bind(console),cb[4]=console.log.bind(console),cb[5]=console.debug.bind(console),cb[6]=console.debug.bind(console),cb);Wa=db[2];Va=db[1]};function eb(a){if(fb.has(a))return fb.get(a);var b=MediaSource.isTypeSupported(a);fb.set(a,b);return b}var fb=new Map;function gb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function hb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function ib(a,b,c){c||(c=gb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={md:d.md},e=a.next()){d.md=e.value;e=b.findIndex(function(f){return function(g){return c(f.md,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
56
- function jb(a,b,c){c||(c=gb);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 kb(a,b,c){this.startTime=a;this.direction=lb;this.endTime=b;this.payload=c;this.region=new mb;this.position=null;this.positionAlign=nb;this.size=0;this.textAlign=ob;this.writingMode=qb;this.lineInterpretation=rb;this.line=null;this.lineHeight="";this.lineAlign=sb;this.displayAlign=tb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=ub;this.fontStyle=vb;this.linePadding=this.letterSpacing=
57
- this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}kb.prototype.clone=function(){var a=new kb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
58
- function wb(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(!jb(a.nestedCues,b.nestedCues,wb))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(!jb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",kb);var nb="auto";
59
- kb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:nb};var ob="center",xb={LEFT:"left",RIGHT:"right",CENTER:ob,START:"start",END:"end"};kb.textAlign=xb;var tb="after",yb={BEFORE:"before",CENTER:"center",AFTER:tb};kb.displayAlign=yb;var lb="ltr";kb.direction={HORIZONTAL_LEFT_TO_RIGHT:lb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var qb="horizontal-tb";kb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:qb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var rb=0;
60
- kb.lineInterpretation={LINE_NUMBER:rb,PERCENTAGE:1};var sb="start",zb={CENTER:"center",START:sb,END:"end"};kb.lineAlign=zb;var Ab={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};kb.defaultTextColor=Ab;var Bb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};kb.defaultTextBackgroundColor=Bb;var ub=400;kb.fontWeight={NORMAL:ub,BOLD:700};
61
- var vb="normal",Cb={NORMAL:vb,ITALIC:"italic",OBLIQUE:"oblique"};kb.fontStyle=Cb;kb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function mb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Db;this.scroll=Eb}K("shaka.text.CueRegion",mb);var Db=1;mb.units={PX:0,PERCENTAGE:Db,LINES:2};var Eb="";mb.scrollMode={NONE:Eb,UP:"up"};function Fb(){}function Gb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Hb(a)==Hb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=M(a);b=M(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Hb(a){return a instanceof ArrayBuffer?a:a.buffer}function Ib(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
62
- function M(a,b,c){c=void 0===c?Infinity:c;return Jb(a,void 0===b?0:b,c,Uint8Array)}function Lb(a,b,c){c=void 0===c?Infinity:c;return Jb(a,void 0===b?0:b,c,DataView)}function Jb(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(Hb(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",Fb);Fb.toDataView=Lb;Fb.toUint8=M;Fb.toArrayBuffer=Ib;Fb.equal=Gb;function O(a,b,c){var d=Fa.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;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};
47
+ b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function La(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Ke:e,v:f}}return{Ke:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).Ke}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
48
+ fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Ma(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
49
+ fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ma(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return La(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Ma(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});
50
+ function Oa(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Oa(this,function(b){return b})}});var Pa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ja(d,e)&&(a[e]=d[e])}return a};
51
+ fa("Object.assign",function(a){return a||Pa});fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Array.prototype.values",function(a){return a?a:function(){return Oa(this,function(b,c){return c})}});
52
+ fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Oa(this,function(b,c){return[b,c]})}});
53
+ fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Ma(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
54
+ fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push([d,b[d]]);return c}});var Qa=this||self;
55
+ function K(a,b){a=a.split(".");var c=Qa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};function Ra(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Ra.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function Sa(a){return a.h/(1-Math.pow(a.g,a.i))};function Ta(){this.h=new Ra(2);this.j=new Ra(5);this.g=0;this.i=128E3;this.l=16E3}Ta.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Ta.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};Ta.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Sa(this.h),Sa(this.j))};function Va(){}function Wa(){}function Xa(){}function Ya(a){var b=Ia.apply(1,arguments);Za.has(a)||(Za.add(a),Xa.apply(Va,ia(b)))}function $a(){}function ab(){}function bb(){}function cb(){}var Za=new Set;window.console&&(Xa=function(){return console.warn.apply(console,ia(Ia.apply(0,arguments)))},Wa=function(){console.error.apply(console,ia(Ia.apply(0,arguments)))});function db(a){if(eb.has(a))return eb.get(a);var b=MediaSource.isTypeSupported(a);eb.set(a,b);return b}var eb=new Map;function fb(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function gb(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function hb(a,b,c){c||(c=fb);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={nd:d.nd},e=a.next()){d.nd=e.value;e=b.findIndex(function(f){return function(g){return c(f.nd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
56
+ function ib(a,b,c){c||(c=fb);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 jb(a,b,c){this.startTime=a;this.direction=kb;this.endTime=b;this.payload=c;this.region=new lb;this.position=null;this.positionAlign=mb;this.size=0;this.textAlign=nb;this.writingMode=ob;this.lineInterpretation=qb;this.line=null;this.lineHeight="";this.lineAlign=rb;this.displayAlign=sb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=tb;this.fontStyle=ub;this.linePadding=this.letterSpacing=
57
+ this.fontFamily="";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}jb.prototype.clone=function(){var a=new jb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
58
+ function vb(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(!ib(a.nestedCues,b.nestedCues,vb))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(!ib(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",jb);var mb="auto";
59
+ jb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:mb};var nb="center",wb={LEFT:"left",RIGHT:"right",CENTER:nb,START:"start",END:"end"};jb.textAlign=wb;var sb="after",xb={BEFORE:"before",CENTER:"center",AFTER:sb};jb.displayAlign=xb;var kb="ltr";jb.direction={HORIZONTAL_LEFT_TO_RIGHT:kb,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ob="horizontal-tb";jb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ob,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var qb=0;
60
+ jb.lineInterpretation={LINE_NUMBER:qb,PERCENTAGE:1};var rb="start",yb={CENTER:"center",START:rb,END:"end"};jb.lineAlign=yb;var zb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};jb.defaultTextColor=zb;var Ab={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};jb.defaultTextBackgroundColor=Ab;var tb=400;jb.fontWeight={NORMAL:tb,BOLD:700};
61
+ var ub="normal",Bb={NORMAL:ub,ITALIC:"italic",OBLIQUE:"oblique"};jb.fontStyle=Bb;jb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function lb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Cb;this.scroll=Db}K("shaka.text.CueRegion",lb);var Cb=1;lb.units={PX:0,PERCENTAGE:Cb,LINES:2};var Db="";lb.scrollMode={NONE:Db,UP:"up"};function Eb(){}function Fb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Gb(a)==Gb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=L(a);b=L(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Gb(a){return a instanceof ArrayBuffer?a:a.buffer}function Hb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
62
+ function L(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,Uint8Array)}function Jb(a,b,c){c=void 0===c?Infinity:c;return Ib(a,void 0===b?0:b,c,DataView)}function Ib(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(Gb(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",Eb);Eb.toDataView=Jb;Eb.toUint8=L;Eb.toArrayBuffer=Hb;Eb.equal=Fb;function O(a,b,c){var d=Ia.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;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};
63
63
  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,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
64
64
  CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_SRC_EQUALS:2016,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,
65
65
  WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,
@@ -72,900 +72,907 @@ LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT
72
72
  Copyright 2008 The Closure Library Authors
73
73
  SPDX-License-Identifier: Apache-2.0
74
74
  */
75
- var Mb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
75
+ var Kb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
76
76
  @license
77
77
  Copyright 2006 The Closure Library Authors
78
78
  SPDX-License-Identifier: Apache-2.0
79
79
  */
80
- function Nb(a){var b;a instanceof Nb?(Ob(this,a.Ea),this.pb=a.pb,this.Ha=a.Ha,Pb(this,a.Kb),this.qa=a.qa,Qb(this,a.g.clone()),this.fb=a.fb):a&&(b=String(a).match(Mb))?(Ob(this,b[1]||"",!0),this.pb=Rb(b[2]||""),this.Ha=Rb(b[3]||"",!0),Pb(this,b[4]),this.qa=Rb(b[5]||"",!0),Qb(this,b[6]||"",!0),this.fb=Rb(b[7]||"")):this.g=new Sb(null)}q=Nb.prototype;q.Ea="";q.pb="";q.Ha="";q.Kb=null;q.qa="";q.fb="";
81
- q.toString=function(){var a=[],b=this.Ea;b&&a.push(Tb(b,Ub,!0),":");if(b=this.Ha){a.push("//");var c=this.pb;c&&a.push(Tb(c,Ub,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Kb;null!=b&&a.push(":",String(b))}if(b=this.qa)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(Tb(b,"/"==b.charAt(0)?Vb:Wb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fb)&&a.push("#",Tb(b,Xb));return a.join("")};
82
- q.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Nb);var c=!!a.Ea;c?Ob(b,a.Ea):c=!!a.pb;c?b.pb=a.pb:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Kb;var d=a.qa;if(c)Pb(b,a.Kb);else if(c=!!a.qa){if("/"!=d.charAt(0))if(this.Ha&&!this.qa)d="/"+d;else{var e=b.qa.lastIndexOf("/");-1!=e&&(d=b.qa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
83
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.qa=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};q.clone=function(){return new Nb(this)};function Ob(a,b,c){a.Ea=c?Rb(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function Pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Kb=b}else a.Kb=null}function Qb(a,b,c){b instanceof Sb?a.g=b:(c||(b=Tb(b,Yb)),a.g=new Sb(b))}
84
- function Rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Tb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,$b),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function $b(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ub=/[#\/\?@]/g,Wb=/[#\?:]/g,Vb=/[#\?]/g,Yb=/[#\?@]/g,Xb=/#/g;function Sb(a){this.g=a||null}
85
- function ac(a){if(!a.la&&(a.la={},a.Oc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=Sb.prototype;q.la=null;q.Oc=null;q.add=function(a,b){ac(this);this.g=null;var c=this.la.hasOwnProperty(a)?this.la[a]:null;c||(this.la[a]=c=[]);c.push(b);this.Oc++;return this};
86
- q.set=function(a,b){ac(this);this.g=null;this.la.hasOwnProperty(a)?this.la[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.la)return"";var a=[],b;for(b in this.la)for(var c=encodeURIComponent(b),d=this.la[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new Sb;a.g=this.g;if(this.la){var b={},c;for(c in this.la)b[c]=this.la[c].concat();a.la=b;a.Oc=this.Oc}return a};function bc(a,b){return a.concat(b)}function cc(){}function dc(a){return null!=a};function ec(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Nb(d)});return a.map(function(d){return new Nb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(bc,[]).map(function(d){return d.toString()})}function fc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
- function gc(a,b){if(1==b.length)return b[0];a=hc(a,b);if(null!=a)return a;throw new O(2,4,4025,b);}function hc(a,b){for(var c=r(ic[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==jc?"":null}
88
- var jc="text",kc={va:"video",Hc:"audio",X:jc,Wb:"image",Gg:"application"},ic={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function lc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}lc.prototype.resolve=function(){};lc.prototype.reject=function(){};function mc(a){this.h=a;this.g=void 0}mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function nc(a){this.h=a;this.g=null}nc.prototype.N=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.Mb=function(){this.stop();this.h();return this};P.prototype.N=function(a){var b=this;this.stop();this.g=(new nc(function(){b.h()})).N(a);return this};P.prototype.Ca=function(a){var b=this;this.stop();this.g=(new nc(function(){b.g.N(a);b.h()})).N(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.Ca;P.prototype.tickAfter=P.prototype.N;
89
- P.prototype.tickNow=P.prototype.Mb;function oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pc(a){return""!=qc().canPlayType(a)}function rc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function sc(){return tc("Xbox One")}function uc(){return tc("Tizen")}function vc(){return tc("Web0S")&&tc("Chrome/38.0.2125.122 Safari/537.36")}function wc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!uc()&&!tc("PC=EOS")&&!tc("VirginMedia")&&!xc()&&!tc("AFT")}
90
- function xc(){return tc("PlayStation 4")}function yc(){if(!wc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function tc(a){return(navigator.userAgent||"").includes(a)}function qc(){if(zc)return zc;Ac||(Ac=new P(function(){zc=null}));(zc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(zc=document.createElement("video"));Ac.N(1);return zc}
91
- var Ac=null,zc=null;function Bc(){}
92
- function Cc(a){if(!a)return"";a=M(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!xc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Va('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==(a[c+
80
+ function Mb(a){var b;a instanceof Mb?(Nb(this,a.Ea),this.qb=a.qb,this.Ha=a.Ha,Ob(this,a.Lb),this.ra=a.ra,Pb(this,a.g.clone()),this.fb=a.fb):a&&(b=String(a).match(Kb))?(Nb(this,b[1]||"",!0),this.qb=Qb(b[2]||""),this.Ha=Qb(b[3]||"",!0),Ob(this,b[4]),this.ra=Qb(b[5]||"",!0),Pb(this,b[6]||"",!0),this.fb=Qb(b[7]||"")):this.g=new Rb(null)}q=Mb.prototype;q.Ea="";q.qb="";q.Ha="";q.Lb=null;q.ra="";q.fb="";
81
+ q.toString=function(){var a=[],b=this.Ea;b&&a.push(Sb(b,Tb,!0),":");if(b=this.Ha){a.push("//");var c=this.qb;c&&a.push(Sb(c,Tb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Lb;null!=b&&a.push(":",String(b))}if(b=this.ra)this.Ha&&"/"!=b.charAt(0)&&a.push("/"),a.push(Sb(b,"/"==b.charAt(0)?Ub:Vb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fb)&&a.push("#",Sb(b,Wb));return a.join("")};
82
+ q.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Mb);var c=!!a.Ea;c?Nb(b,a.Ea):c=!!a.qb;c?b.qb=a.qb:c=!!a.Ha;c?b.Ha=a.Ha:c=null!=a.Lb;var d=a.ra;if(c)Ob(b,a.Lb);else if(c=!!a.ra){if("/"!=d.charAt(0))if(this.Ha&&!this.ra)d="/"+d;else{var e=b.ra.lastIndexOf("/");-1!=e&&(d=b.ra.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
83
+ h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ra=d:c=""!==a.g.toString();c?Pb(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};q.clone=function(){return new Mb(this)};function Nb(a,b,c){a.Ea=c?Qb(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function Ob(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Lb=b}else a.Lb=null}function Pb(a,b,c){b instanceof Rb?a.g=b:(c||(b=Sb(b,Xb)),a.g=new Rb(b))}
84
+ function Qb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Sb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Yb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Yb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Tb=/[#\/\?@]/g,Vb=/[#\?:]/g,Ub=/[#\?]/g,Xb=/[#\?@]/g,Wb=/#/g;function Rb(a){this.g=a||null}
85
+ function $b(a){if(!a.na&&(a.na={},a.Pc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=Rb.prototype;q.na=null;q.Pc=null;q.add=function(a,b){$b(this);this.g=null;var c=this.na.hasOwnProperty(a)?this.na[a]:null;c||(this.na[a]=c=[]);c.push(b);this.Pc++;return this};
86
+ q.set=function(a,b){$b(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};q.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};q.clone=function(){var a=new Rb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Pc=this.Pc}return a};function ac(a,b){return a.concat(b)}function bc(){}function cc(a){return null!=a};function dc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Mb(d)});return a.map(function(d){return new Mb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(ac,[]).map(function(d){return d.toString()})}function ec(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
87
+ function fc(a,b){if(1==b.length)return b[0];a=gc(a,b);if(null!=a)return a;throw new O(2,4,4025,b);}function gc(a,b){for(var c=r(hc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==ic?"":null}
88
+ var ic="text",jc={va:"video",Ic:"audio",X:ic,Xb:"image",Ig:"application"},hc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function kc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}kc.prototype.resolve=function(){};kc.prototype.reject=function(){};function lc(a){this.h=a;this.g=void 0}lc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function mc(a){this.h=a;this.g=null}mc.prototype.O=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};mc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function P(a){this.h=a;this.g=null}P.prototype.Nb=function(){this.stop();this.h();return this};P.prototype.O=function(a){var b=this;this.stop();this.g=(new mc(function(){b.h()})).O(a);return this};P.prototype.Ca=function(a){var b=this;this.stop();this.g=(new mc(function(){b.g.O(a);b.h()})).O(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.Ca;P.prototype.tickAfter=P.prototype.O;
89
+ P.prototype.tickNow=P.prototype.Nb;function nc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function oc(a){return""!=pc().canPlayType(a)}function qc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!sc("VirginMedia")&&!wc()&&!sc("AFT")}
90
+ function wc(){return sc("PlayStation 4")}function xc(){if(!vc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function sc(a){return(navigator.userAgent||"").includes(a)}function pc(){if(yc)return yc;zc||(zc=new P(function(){yc=null}));(yc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yc=document.createElement("video"));zc.O(1);return yc}
91
+ var zc=null,yc=null;function Ac(){}
92
+ function Bc(a){if(!a)return"";a=L(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!wc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Wa('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==(a[c+
93
93
  2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
94
- function Dc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Lb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Ec.value()(d)}
95
- function Fc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=M(a);if(239==c[0]&&187==c[1]&&191==c[2])return Cc(c);if(254==c[0]&&255==c[1])return Dc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Dc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Dc(a,!1);if(0==c[1]&&0==c[3])return Dc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Cc(a);throw new O(2,2,2003);}
96
- function Gc(a){if(window.TextEncoder&&!xc()){var b=new TextEncoder;return Ib(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Ib(b)}function Hc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}K("shaka.util.StringUtils",Bc);Bc.resetFromCharCode=function(){Ec.g=void 0};Bc.toUTF16=Hc;Bc.toUTF8=Gc;Bc.fromBytesAutoDetect=Fc;Bc.fromUTF16=Dc;
97
- Bc.fromUTF8=Cc;var Ec=new mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Ic(){}function Jc(a){a=M(a);a=Ec.value()(a);return btoa(a)}function Kc(a,b){b=void 0==b?!0:b;a=Jc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Lc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Mc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
98
- function Nc(a){var b=M(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Oc(){for(var a=Fa.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(M(d),c),c+=d.byteLength;return b}K("shaka.util.Uint8ArrayUtils",Ic);Ic.concat=Oc;Ic.toHex=Nc;Ic.fromHex=Mc;Ic.fromBase64=Lc;Ic.toBase64=Kc;Ic.toStandardBase64=Jc;function Pc(){}K("shaka.dependencies",Pc);Pc.has=function(a){return Qc.has(a)};Pc.add=function(a,b){if(!Rc[a])throw Error(a+" is not supported");Qc.set(a,function(){return b})};var Rc={muxjs:"muxjs"};Pc.Allowed=Rc;var Qc=new Map([["muxjs",function(){return window.muxjs}]]);function Sc(a){var b=this;this.o=a;this.m=Qc.get("muxjs")();this.h=this.g=null;this.l=[];this.i=[];this.j=!1;this.m&&(this.g=new this.m.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(c){b.i=c.captions;b.l.push(Oc(c.initSegment,c.data))}),this.g.on("done",function(){var c={data:Oc.apply(Ic,ha(b.l)),captions:b.i};b.h.resolve(c);b.j=!1}))}Sc.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
99
- function Tc(a,b){var c=Uc(a),d="audio/aac"==a.toLowerCase().split(";")[0];if(!Qc.get("muxjs")()||!c&&!d)return!1;if(d)return eb('audio/mp4; codecs="mp4a.40.2"');if(b)return eb(Vc(b,a));b=Vc("audio",a);a=Vc("video",a);return eb(b)||eb(a)}function Uc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}function Wc(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp4a.40.2"':Uc(b)?Vc(a,b):b}
100
- function Vc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function Xc(a,b){a.j=!0;a.h=new lc;a.l=[];a.i=[];b=M(b);a.g.push(b);a.g.flush();a.j&&a.h.reject(new O(2,3,3018));return a.h};function Yc(){}function Zc(a,b){b&&(a+='; codecs="'+b+'"');return a}function $c(a,b,c){b=Zc(a,b);return Tc(b,c)?Wc(c,b):"video/mp2t"!=a&&"audio"==c?b.replace("video","audio"):b}
101
- function ad(a){var b=bd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
102
- case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function cd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function bd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}K("shaka.util.MimeUtils",Yc);Yc.getFullType=Zc;
103
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function dd(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function ed(a){return fd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}dd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
104
- function gd(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k.return();if(null==c||null==d)return a.j.parseInit(M(b)),k.return();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(M(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);A(k)})}
105
- dd.prototype.remove=function(a,b){var c=this;return G(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));A(d)})};function hd(a,b,c){a.l=b;a.m=c}function id(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)}
106
- function jd(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 kb(c.startTime,c.endTime,c.text)});return b}function kd(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())kd(a,d.value,c)}
107
- function ld(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);kd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(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,
108
- a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}K("shaka.text.TextEngine",dd);dd.prototype.destroy=dd.prototype.destroy;dd.findParser=function(a){return fd[a]};dd.unregisterParser=function(a){delete fd[a]};dd.registerParser=function(a,b){fd[a]=b};var fd={};function md(){}function nd(a,b){a=od(a);b=od(b);return a.split("-")[0]==b.split("-")[0]}function pd(a,b){a=od(a);b=od(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function qd(a,b){a=od(a);b=od(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function od(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=rd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
109
- function sd(a,b){a=od(a);b=od(b);return b==a?4:pd(b,a)?3:qd(b,a)?2:pd(a,b)?1:0}function td(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=rd.get(a)||a}function ud(a){return a.language?od(a.language):a.audio&&a.audio.language?od(a.audio.language):a.video&&a.video.language?od(a.video.language):"und"}
110
- function vd(a,b){a=od(a);var c=new Set,d=r(b);for(b=d.next();!b.done;b=d.next())c.add(od(b.value));d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,pd(b,a))return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,qd(b,a))return b;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,pd(a,b))return b;return null}K("shaka.util.LanguageUtils",md);md.findClosestLocale=vd;md.getLocaleForVariant=ud;
111
- md.getLocaleForText=function(a){return od(a.language||"und")};md.getBase=td;md.relatedness=sd;md.areSiblings=function(a,b){var c=td(a),d=td(b);return a!=c&&b!=d&&c==d};md.normalize=od;md.isSiblingOf=qd;md.isParentOf=pd;md.areLanguageCompatible=nd;md.areLocaleCompatible=function(a,b){a=od(a);b=od(b);return a==b};
112
- var rd=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",
94
+ function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new O(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Jb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Dc.value()(d)}
95
+ function Ec(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=L(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new O(2,2,2003);}
96
+ function Fc(a){if(window.TextEncoder&&!wc()){var b=new TextEncoder;return Hb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Hb(b)}function Gc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}K("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Gc;Ac.toUTF8=Fc;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;
97
+ Ac.fromUTF8=Bc;var Dc=new lc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Hc(){}function Ic(a){a=L(a);a=Dc.value()(a);return btoa(a)}function Jc(a,b){b=void 0==b?!0:b;a=Ic(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Kc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Lc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
98
+ function Mc(a){var b=L(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Nc(){for(var a=Ia.apply(0,arguments),b=0,c=r(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(L(d),c),c+=d.byteLength;return b}K("shaka.util.Uint8ArrayUtils",Hc);Hc.concat=Nc;Hc.toHex=Mc;Hc.fromHex=Lc;Hc.fromBase64=Kc;Hc.toBase64=Jc;Hc.toStandardBase64=Ic;function Oc(){}K("shaka.dependencies",Oc);Oc.has=function(a){return Pc.has(a)};Oc.add=function(a,b){if(!Qc[a])throw Error(a+" is not supported");Pc.set(a,function(){return b})};var Qc={muxjs:"muxjs"};Oc.Allowed=Qc;var Pc=new Map([["muxjs",function(){return window.muxjs}]]);function Rc(a){var b=this;this.o=a;this.m=Pc.get("muxjs")();this.h=this.g=null;this.l=[];this.i=[];this.j=!1;this.m&&(this.g=new this.m.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.g.on("data",function(c){b.i=c.captions;b.l.push(Nc(c.initSegment,c.data))}),this.g.on("done",function(){var c={data:Nc.apply(Hc,ia(b.l)),captions:b.i};b.h.resolve(c);b.j=!1}))}Rc.prototype.destroy=function(){this.g&&this.g.dispose();this.g=null;return Promise.resolve()};
99
+ function Sc(a,b){var c=Tc(a),d="audio/aac"==a.toLowerCase().split(";")[0];if(!Pc.get("muxjs")()||!c&&!d)return!1;if(d)return db('audio/mp4; codecs="mp4a.40.2"');if(b)return db(Uc(b,a));b=Uc("audio",a);a=Uc("video",a);return db(b)||db(a)}function Tc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}function Vc(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp4a.40.2"':Tc(b)?Uc(a,b):b}
100
+ function Uc(a,b){b=b.replace(/mp2t/i,"mp4");"audio"==a&&(b=b.replace("video","audio"));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){var c="avc1.",d=a[1],e=Number(a[2]);c=("66"==d?c+"4200":"77"==d?c+"4d00":c+"6400")+(e>>4).toString(16);c+=(e&15).toString(16);b=b.replace(a[0],c)}return b}function Wc(a,b){a.j=!0;a.h=new kc;a.l=[];a.i=[];b=L(b);a.g.push(b);a.g.flush();a.j&&a.h.reject(new O(2,3,3018));return a.h};function Xc(){}function Yc(a,b){b&&(a+='; codecs="'+b+'"');return a}function Zc(a,b,c){b=Yc(a,b);return Sc(b,c)?Vc(c,b):"video/mp2t"!=a&&"audio"==c?b.replace("video","audio"):b}
101
+ function $c(a){var b=ad(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
102
+ case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function bd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function ad(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}K("shaka.util.MimeUtils",Xc);Xc.getFullType=Yc;
103
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function cd(a){this.i=null;this.j=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.A="";this.o=new Map}function dd(a){return ed[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}cd.prototype.destroy=function(){this.j=this.i=null;this.o.clear();return Promise.resolve()};
104
+ function fd(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.i||!a.j)return k.return();if(null==c||null==d)return a.i.parseInit(L(b)),k.return();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.i.parseMedia(L(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.j.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);B(k)})}
105
+ cd.prototype.remove=function(a,b){var c=this;return G(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));B(d)})};function gd(a,b,c){a.l=b;a.m=c}function hd(a,b,c){a.A=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.j.append(e)}
106
+ function id(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 jb(c.startTime,c.endTime,c.text)});return b}function jd(a,b,c){b.startTime+=c;b.endTime+=c;b=r(b.nestedCues);for(var d=b.next();!d.done;d=b.next())jd(a,d.value,c)}
107
+ function kd(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,[]);jd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.A&&a.j.append([k]))}e=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,
108
+ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}K("shaka.text.TextEngine",cd);cd.prototype.destroy=cd.prototype.destroy;cd.findParser=function(a){return ed[a]};cd.unregisterParser=function(a){delete ed[a]};cd.registerParser=function(a,b){ed[a]=b};var ed={};function ld(){}function md(a,b){a=nd(a);b=nd(b);return a.split("-")[0]==b.split("-")[0]}function od(a,b){a=nd(a);b=nd(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function pd(a,b){a=nd(a);b=nd(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}function nd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=qd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
109
+ function rd(a,b){a=nd(a);b=nd(b);return b==a?4:od(b,a)?3:pd(b,a)?2:od(a,b)?1:0}function sd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=qd.get(a)||a}function td(a){return a.language?nd(a.language):a.audio&&a.audio.language?nd(a.audio.language):a.video&&a.video.language?nd(a.video.language):"und"}
110
+ function ud(a,b){a=nd(a);var c=new Set,d=r(b);for(b=d.next();!b.done;b=d.next())c.add(nd(b.value));d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,b==a)return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,od(b,a))return b;d=r(c);for(b=d.next();!b.done;b=d.next())if(b=b.value,pd(b,a))return b;c=r(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,od(a,b))return b;return null}K("shaka.util.LanguageUtils",ld);ld.findClosestLocale=ud;ld.getLocaleForVariant=td;
111
+ ld.getLocaleForText=function(a){return nd(a.language||"und")};ld.getBase=sd;ld.relatedness=rd;ld.areSiblings=function(a,b){var c=sd(a),d=sd(b);return a!=c&&b!=d&&c==d};ld.normalize=nd;ld.isSiblingOf=pd;ld.isParentOf=od;ld.areLanguageCompatible=md;ld.areLocaleCompatible=function(a,b){a=nd(a);b=nd(b);return a==b};
112
+ var qd=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",
113
113
  "cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
114
114
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
115
115
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
116
116
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
117
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function wd(){this.g={}}q=wd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function xd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=yd(f,b,c);f=zd(f,d);b=Ad(f);b=Bd(b);var g=Cd(b,e);a.variants=a.variants.filter(function(h){return Dd(h)==g?!0:!1})}function Ad(a){var b=new wd;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Dd(c);b.push(d,c)}return b}
118
- function Bd(a){var b=0,c=new Map,d=a.size();a.forEach(function(e,f){f=r(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.video;if(h&&h.width&&h.height){h=h.width*h.height*(h.frameRate||1);c.has(h)||c.set(h,new wd);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
119
- function yd(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={xd:d.xd},e=b.next())if(d.xd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.xd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={jd:d.jd},b=c.next())if(d.jd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.jd)}}(d)),b.length){a=b;break}return a}
120
- function Cd(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Ed||c==Fd){if(a=Gd(a,c),1==a.size())return a.keys()[0]}else if(c==Hd)break;return Id(a)}function Gd(a,b){var c=0,d=new wd;a.forEach(function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
121
- function Id(a){var b="",c=Infinity;a.forEach(function(d,e){var f=0,g=0;e=r(e);for(var h=e.next();!h.done;h=e.next())f+=h.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Dd(a){var b="";a.video&&(b=ad(a.video.codecs));var c="";a.audio&&(c=ad(a.audio.codecs));return b+"-"+c}function Jd(a,b,c){a.variants=a.variants.filter(function(d){return Kd(d,b,c)})}
122
- function Kd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
123
- function Ld(a,b,c){var d=!1;a=r(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Kd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Md(a,b){return G(function(c){if(1==c.g)return u(c,Nd(b,0<b.offlineSessionIds.length),2);Od(a,b);Pd(b);return u(c,Qd(b),0)})}
124
- function Nd(a,b){return G(function(c){if(1==c.g)return u(c,Rd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Sd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=gc("video",g);f=Sd(f);g=gc("audio",g);g=Td(g);var h=$c(e.mimeType,g,"audio");if(!eb(h))return!1;f=[f,g].join()}g=$c(e.mimeType,f,"video");if(!eb(g))return!1;e.codecs=f}if(f=d.audio){g=Td(f.codecs);h=$c(f.mimeType,g,"audio");if(!eb(h))return!1;f.codecs=g}if(sc()&&e&&(e.width&&1920<e.width||
125
- e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return $a(Ud(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||$a(Ud(d));return e});A(c)})}
126
- function Rd(a,b,c){var d,e,f,g,h,k,l,m,n,p,t;return G(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v.return();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return G(function(C){if(1==C.g)return D(C,2),u(C,e.decodingInfo(w),4);if(2!=C.g)return x=C.h,y.decodingInfos.push(x),ta(C,0);ua(C);JSON.stringify(w);A(C)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Vd(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),
117
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function vd(){this.g={}}q=vd.prototype;q.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};q.get=function(a){return(a=this.g[a])?a.slice():null};q.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};q.forEach=function(a){for(var b in this.g)a(b,this.g[b])};q.size=function(){return Object.keys(this.g).length};q.keys=function(){return Object.keys(this.g)};function wd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=xd(f,b,c);f=yd(f,d);b=zd(f);b=Ad(b);var g=Bd(b,e);a.variants=a.variants.filter(function(h){return Cd(h)==g?!0:!1})}function zd(a){var b=new vd;a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Cd(c);b.push(d,c)}return b}
118
+ function Ad(a){var b=0,c=new Map,d=a.size();a.forEach(function(e,f){f=r(f);for(var g=f.next();!g.done;g=f.next()){g=g.value;var h=g.video;if(h&&h.width&&h.height){h=h.width*h.height*(h.frameRate||1);c.has(h)||c.set(h,new vd);var k=c.get(h);k.push(e,g);k.size()===d&&(b=Math.max(b,h))}}});return b?c.get(b):a}
119
+ function xd(a,b,c){var d={};b=r(b);for(var e=b.next();!e.done;d={yd:d.yd},e=b.next())if(d.yd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.yd)}}(d)),e.length){a=e;break}d={};c=r(c);for(b=c.next();!b.done;d={kd:d.kd},b=c.next())if(d.kd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.kd)}}(d)),b.length){a=b;break}return a}
120
+ function Bd(a,b){b=r(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c==Dd||c==Ed){if(a=Fd(a,c),1==a.size())return a.keys()[0]}else if(c==Gd)break;return Hd(a)}function Fd(a,b){var c=0,d=new vd;a.forEach(function(e,f){for(var g=0,h=0,k=r(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
121
+ function Hd(a){var b="",c=Infinity;a.forEach(function(d,e){var f=0,g=0;e=r(e);for(var h=e.next();!h.done;h=e.next())f+=h.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Cd(a){var b="";a.video&&(b=$c(a.video.codecs));var c="";a.audio&&(c=$c(a.audio.codecs));return b+"-"+c}function Id(a,b,c){a.variants=a.variants.filter(function(d){return Jd(d,b,c)})}
122
+ function Jd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
123
+ function Kd(a,b,c){var d=!1;a=r(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Jd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Ld(a,b){return G(function(c){if(1==c.g)return u(c,Md(b,0<b.offlineSessionIds.length),2);Nd(a,b);Od(b);return u(c,Pd(b),0)})}
124
+ function Md(a,b){return G(function(c){if(1==c.g)return u(c,Qd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Rd(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=fc("video",g);f=Rd(f);g=fc("audio",g);g=Sd(g);var h=Zc(e.mimeType,g,"audio");if(!db(h))return!1;f=[f,g].join()}g=Zc(e.mimeType,f,"video");if(!db(g))return!1;e.codecs=f}if(f=d.audio){g=Sd(f.codecs);h=Zc(f.mimeType,g,"audio");if(!db(h))return!1;f.codecs=g}if(rc()&&e&&(e.width&&1920<e.width||
125
+ e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return ab(Td(d)),!1;(e=d.decodingInfos.some(function(k){return k.supported}))||ab(Td(d));return e});B(c)})}
126
+ function Qd(a,b,c){var d,e,f,g,h,k,l,m,p,n,t;return G(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v.return();e=navigator.mediaCapabilities;f=[];g=function(y,w){var x;return G(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(w),4);if(2!=D.g)return x=D.h,y.decodingInfos.push(x),va(D,0);wa(D);JSON.stringify(w);B(D)})};h=r(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Ud(l,b,c),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,f.push(g(l,t));return u(v,Promise.all(f),
127
127
  0)})}
128
- function Vd(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=gc("video",g);f=Sd(f);g=gc("audio",g);g=$c(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Sd(f);f=$c(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
129
- break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Td(d.codecs),f=$c(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,[]);
130
- 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&&
128
+ function Ud(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=fc("video",g);f=Rd(f);g=fc("audio",g);g=Zc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Rd(f);f=Zc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
129
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Sd(d.codecs),f=Zc(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,[]);
130
+ f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=r(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=r(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,t=r(h.initData),v=t.next();!v.done;v=t.next())n.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
131
131
  (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(""!=h.audioRobustness?m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness}:m.audio||(m.audio={}));e&&(""!=h.videoRobustness?m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness}:m.video||(m.video={}))}l.keySystemConfiguration=m;a.push(l)}return a}
132
- function Td(a){return uc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function Sd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Od(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Wd(d,a.audio)||c&&a&&a.video&&!Wd(c,a.video)?!1:!0})}
133
- function Pd(a){a.textStreams=a.textStreams.filter(function(b){return ed(Zc(b.mimeType,b.codecs))})}function Qd(a){var b,c,d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Xd.has(f)){l.A(5);break}g=Yd.get(f);if(!g){Xd.set(f,!1);l.A(5);break}return u(l,Zd(g),7);case 7:h=l.h,Xd.set(f,h);case 5:(k=Xd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,A(l)}})}
134
- function Zd(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Wd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
135
- function $d(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=r(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=r(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
132
+ function Sd(a){return tc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}function Rd(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}function Nd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Vd(d,a.audio)||c&&a&&a.video&&!Vd(c,a.video)?!1:!0})}
133
+ function Od(a){a.textStreams=a.textStreams.filter(function(b){return dd(Yc(b.mimeType,b.codecs))})}function Pd(a){var b,c,d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:b=[],c=r(a.imageStreams),d=c.next();case 2:if(d.done){l.B(4);break}e=d.value;f=e.mimeType;if(Wd.has(f)){l.B(5);break}g=Xd.get(f);if(!g){Wd.set(f,!1);l.B(5);break}return u(l,Yd(g),7);case 7:h=l.h,Wd.set(f,h);case 5:(k=Wd.get(f))&&b.push(e);d=c.next();l.B(2);break;case 4:a.imageStreams=b,B(l)}})}
134
+ function Yd(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Vd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
135
+ function Zd(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=r(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=r(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
136
136
  kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
137
137
  a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
138
- function ae(a){return{id:a.id,active:!1,type:jc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
138
+ function $d(a){return{id:a.id,active:!1,type:ic,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
139
139
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
140
- function be(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
141
- audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function ce(a){a.__shaka_id||(a.__shaka_id=de++);return a.__shaka_id}
142
- function ee(a){var b=fe(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ge(a){var b=fe(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}
143
- function fe(a){return{id:ce(a),active:!1,type:"",bandwidth:0,language:od(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
144
- originalTextId:null,originalImageId:null}}function he(a){return a.allowedByApplication&&a.allowedByKeySystem}function ie(a){return a.filter(function(b){return he(b)})}
145
- function zd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;a=c.filter(function(g){return g<=b});return a.length?d.get(Math.max.apply(Math,ha(a))):d.get(Math.min.apply(Math,ha(c)))}
146
- function je(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=vd(od(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return od(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ke(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(bc,[]);return a.length?
147
- ke(e,a[0]):e}function ke(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Ud(a){var b=[];a.audio&&b.push(le(a.audio));a.video&&b.push(le(a.video));return b.join(", ")}
148
- function le(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"}
149
- var de=0,Ed="smooth",Fd="powerEfficient",Hd="bandwidth",Xd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Yd=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function me(){var a=this;this.l=null;this.o=!1;this.i=new Ra;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.o){a.i=new Ra;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.m=[];this.u=1;this.B=!1;this.h=this.j=this.g=this.s=null;this.D=new P(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}q=me.prototype;
150
- q.stop=function(){this.l=null;this.o=!1;this.m=[];this.u=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.D.stop()};q.init=function(a){this.l=a};
151
- q.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=ne(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(oe(this));this.m.length&&!a.length&&(a=ne(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
152
- d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.u)?1:Math.abs(this.u),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.s=Date.now();return c};q.enable=function(){this.o=!0};q.disable=function(){this.o=!1};
153
- q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.B){a=this.i;if(!(a.g>=a.i))break a;this.B=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(oe(this));a&&this.l(a)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(oe(this))};q.setVariants=function(a){this.m=a};q.playbackRateChanged=function(a){this.u=a};
154
- q.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.N(pe)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function oe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
155
- function ne(a,b,c,d){a&&(b=b.filter(function(e){return Kd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}K("shaka.abr.SimpleAbrManager",me);me.prototype.configure=me.prototype.configure;me.prototype.setMediaElement=me.prototype.setMediaElement;me.prototype.playbackRateChanged=me.prototype.playbackRateChanged;me.prototype.setVariants=me.prototype.setVariants;me.prototype.getBandwidthEstimate=me.prototype.getBandwidthEstimate;me.prototype.segmentDownloaded=me.prototype.segmentDownloaded;
156
- me.prototype.disable=me.prototype.disable;me.prototype.enable=me.prototype.enable;me.prototype.chooseVariant=me.prototype.chooseVariant;me.prototype.init=me.prototype.init;me.prototype.stop=me.prototype.stop;var pe=1;function qe(a,b){this.g=a;this.h=b}qe.prototype.toString=function(){return"v"+this.g+"."+this.h};function re(a,b){var c=new qe(5,0),d=se,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function te(a,b,c,d){Wa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function ue(a,b,c,d){Va([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var se=null;K("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function ve(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=r(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}ve.prototype.add=function(a){return we(this.h,a)?(this.g.add(a),!0):!1};
157
- function we(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)&&xe(c,d)&&ye(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(xe(a,b)&&ye(a.roles,b.roles)));return c?!1:!0}ve.prototype.values=function(){return this.g.values()};
158
- function xe(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return bd(d)[0]});b=b.codecs.split(",").map(function(d){return bd(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function ye(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function ze(a){this.g=a;this.h=new Ae(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}ze.prototype.create=function(a){var b=this,c=a.filter(function(d){return we(b.g,d)});return c.length?new ve(c[0],c):this.h.create(a)};function Ae(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
159
- Ae.prototype.create=function(a){var b=[];b=Be(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ce(b,this.j);a.length&&(b=a);this.g&&(a=zd(b,this.g),a.length&&(b=a));this.h&&(a=De(b,this.h),a.length&&(b=a));a=new ve(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,we(a.h,c)&&a.add(c);return a};function Be(a,b){b=od(b);var c=vd(b,a.map(function(d){return ud(d)}));return c?a.filter(function(d){return c==ud(d)}):[]}
160
- function Ce(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function De(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ee(){this.g=Fe;this.h=(new Map).set(Fe,2).set(Ge,1)}function He(a,b,c){a.h.set(Fe,c).set(Ge,b)}var Ge=0,Fe=1;function Ie(a,b){var c=Je();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
161
- function Ke(a){var b,c;return G(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.o);return u(d,new Promise(function(e){(new P(e)).N(c/1E3)}),2)}a.h*=a.m;A(d)})}function Je(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Le(a,b){this.promise=a;this.i=b;this.g=!1}function Me(a){return new Le(Promise.reject(a),function(){return Promise.resolve()})}function Ne(){var a=Promise.reject(new O(2,7,7001));a.catch(function(){});return new Le(a,function(){return Promise.resolve()})}function Oe(a){return new Le(Promise.resolve(a),function(){return Promise.resolve()})}function Pe(a){return new Le(a,function(){return a.catch(function(){})})}Le.prototype.abort=function(){this.g=!0;return this.i()};
162
- function Qe(a){return new Le(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Le.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
163
- Le.prototype.Y=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Re(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new lc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Le(f,function(){return d()})};
164
- function Re(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",Le);Le.prototype.chain=Le.prototype.Y;Le.prototype["finally"]=Le.prototype.finally;Le.all=Qe;Le.prototype.abort=Le.prototype.abort;Le.notAbortable=Pe;Le.completed=Oe;Le.aborted=Ne;Le.failed=Me;function S(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}
165
- function Se(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",S);
166
- var Te={Ig:"abrstatuschanged",Jg:"adaptation",Kg:"buffering",Lg:"downloadfailed",Mg:"downloadheadersreceived",Ng:"drmsessionupdate",Pg:"emsg",ah:"prft",Error:"error",Qg:"expirationupdated",Rg:"gapjumped",Tg:"loaded",Ug:"loading",Wg:"manifestparsed",Xg:"mediaqualitychanged",Metadata:"metadata",Zg:"onstatechange",$g:"onstateidle",bh:"ratechange",eh:"segmentappended",fh:"sessiondata",gh:"stalldetected",hh:"streaming",ih:"textchanged",jh:"texttrackvisibility",kh:"timelineregionadded",lh:"timelineregionenter",
167
- mh:"timelineregionexit",nh:"trackschanged",ph:"unloading",qh:"variantchanged"};function Ue(){this.da=new wd;this.Wc=this}Ue.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Ue.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Ue.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Wc;a.currentTarget=this.Wc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
168
- Ue.prototype.release=function(){this.da=null};function Ve(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 We(a){var b={},c;for(c in a)b[c]=a[c];return b};function Xe(){this.g=[]}function Ye(a,b){a.g.push(b.finally(function(){hb(a.g,b)}))}Xe.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 Ze(a,b,c){Ue.call(this);this.i=!1;this.m=new Xe;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}oa(Ze,Ue);q=Ze.prototype;q.je=function(a){this.o=a};function $e(a,b,c,d){c=c||af;var e=bf[a];if(!e||c>=e.priority)bf[a]={priority:c,jg:b,kg:void 0===d?!1:d}}q.lg=function(a){this.g.add(a)};q.Bg=function(a){this.g.delete(a)};q.rf=function(){this.g.clear()};q.mg=function(a){this.h.add(a)};q.Cg=function(a){this.h.delete(a)};q.tf=function(){this.h.clear()};
169
- function cf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Ue.prototype.release.call(this);return this.m.destroy()};
170
- q.request=function(a,b){var c=this,d=new df;if(this.i){var e=Promise.reject(new O(2,7,7001));e.catch(function(){});return new ef(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ve(b.retryParameters):Je();b.uris=Ve(b.uris);e=ff(this,a,b);var f=e.Y(function(){return gf(c,a,b,new Ie(b.retryParameters,!1),0,null,d)}),g=f.Y(function(n){return hf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
171
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Y(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Yf||!c.l||t.fromCache||a!=jf||c.l(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new ef(m.promise,function(){return m.abort()},d);Ye(this.m,e);return e};
172
- function ff(a,b,c){var d=Oe(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={sd:e.sd},f=a.next())e.sd=f.value,d=d.Y(function(g){return function(){c.body&&(c.body=Ib(c.body));return g.sd(b,c)}}(e));return d.Y(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
173
- function gf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Nb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=bf[k])?k.jg:null;if(!m)return Me(new O(2,1,1E3,h));var n=k.kg,p=null,t=null,v=!1,y=!1,w;return Pe(Ke(d)).Y(function(){if(a.i)return Ne();w=Date.now();var x=m(c.uris[e],c,b,function(B,E,F){p&&p.stop();t&&t.N(z/1E3);a.l&&b==jf&&(a.l(B,E),l=!0,g.g=F)},function(B){a.j&&a.j(B,c,b);y=!0});
174
- if(!n)return x;var C=c.retryParameters.connectionTimeout;C&&(p=new P(function(){v=!0;x.abort()}),p.N(C/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new P(function(){v=!0;x.abort()}));return x}).Y(function(x){p&&p.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var C={response:x,Yf:l};!y&&a.j&&a.j(x.headers,c,b);return C},function(x){p&&p.stop();t&&t.stop();if(a.s){var C=null,z=0;x instanceof O&&(C=x,1001==x.code&&(z=x.data[1]));a.s(c,C,z,v)}if(a.i)return Ne();v&&(x=new O(1,1,1003,
175
- c.uris[e],b));if(x instanceof O){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return C=(new Map).set("error",x),C=new S("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,gf(a,b,c,d,e,x,g)}throw x;})}
176
- function hf(a,b,c){var d=Oe(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={td:e.td},f=a.next())e.td=f.value,d=d.Y(function(g){return function(){var h=c.response;h.data&&(h.data=Ib(h.data));return g.td(b,h)}}(e));return d.Y(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",Ze);Ze.prototype.request=Ze.prototype.request;Ze.prototype.destroy=Ze.prototype.destroy;Ze.makeRequest=cf;
177
- Ze.defaultRetryParameters=function(){return Je()};Ze.prototype.clearAllResponseFilters=Ze.prototype.tf;Ze.prototype.unregisterResponseFilter=Ze.prototype.Cg;Ze.prototype.registerResponseFilter=Ze.prototype.mg;Ze.prototype.clearAllRequestFilters=Ze.prototype.rf;Ze.prototype.unregisterRequestFilter=Ze.prototype.Bg;Ze.prototype.registerRequestFilter=Ze.prototype.lg;Ze.unregisterScheme=function(a){delete bf[a]};Ze.registerScheme=$e;Ze.prototype.setForceHTTPS=Ze.prototype.je;function df(){this.g=0}
178
- Ze.NumBytesRemainingClass=df;function ef(a,b,c){Le.call(this,a,b);this.h=c}oa(ef,Le);Ze.PendingRequest=ef;var jf=1;Ze.RequestType={MANIFEST:0,SEGMENT:jf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var af=3;Ze.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:af};var bf={};function kf(a){this.g=!1;this.h=new lc;this.i=a}kf.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 lf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function mf(){this.g=new wd}q=mf.prototype;q.release=function(){this.nb();this.g=null};q.C=function(a,b,c,d){this.g&&(a=new nf(a,b,c,d),this.g.push(b,a))};q.ma=function(a,b,c,d){function e(g){f.zc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};q.zc=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.zc(),this.g.remove(b,e))}};
179
- q.nb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ha(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.zc();this.g.g={}}};K("shaka.util.EventManager",mf);mf.prototype.removeAll=mf.prototype.nb;mf.prototype.unlisten=mf.prototype.zc;mf.prototype.listenOnce=mf.prototype.ma;mf.prototype.listen=mf.prototype.C;mf.prototype.release=mf.prototype.release;function nf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=of(a,d);this.target.addEventListener(b,c,this.g)}
180
- nf.prototype.zc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function of(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 pf(a)?b:b.capture||!1}
181
- function pf(a){var b=qf;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}qf=b}return b||!1}var qf=void 0;function rf(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function sf(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function tf(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 uf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function vf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function wf(a,b){this.S=Lb(a);this.h=b==xf;this.g=0}q=wf.prototype;q.ha=function(){return this.g<this.S.byteLength};q.Z=function(){return this.g};q.Gf=function(){return this.S.byteLength};q.Ra=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw yf();}};q.$d=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw yf();}};q.K=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw yf();}};
182
- q.Pe=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw yf();}};q.$a=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw yf();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Za=function(a){if(this.g+a>this.S.byteLength)throw yf();var b=M(this.S,this.g,a);this.g+=a;return b};
183
- q.skip=function(a){if(this.g+a>this.S.byteLength)throw yf();this.g+=a};q.sg=function(a){if(this.g<a)throw yf();this.g-=a};q.seek=function(a){if(0>a||a>this.S.byteLength)throw yf();this.g=a};q.sc=function(){for(var a=this.g;this.ha()&&0!=this.S.getUint8(this.g);)this.g+=1;a=M(this.S,a,this.g-a);this.g+=1;return Cc(a)};function yf(){return new O(2,3,3E3)}K("shaka.util.DataViewReader",wf);wf.prototype.readTerminatedString=wf.prototype.sc;wf.prototype.seek=wf.prototype.seek;wf.prototype.rewind=wf.prototype.sg;
184
- wf.prototype.skip=wf.prototype.skip;wf.prototype.readBytes=wf.prototype.Za;wf.prototype.readUint64=wf.prototype.$a;wf.prototype.readInt32=wf.prototype.Pe;wf.prototype.readUint32=wf.prototype.K;wf.prototype.readUint16=wf.prototype.$d;wf.prototype.readUint8=wf.prototype.Ra;wf.prototype.getLength=wf.prototype.Gf;wf.prototype.getPosition=wf.prototype.Z;wf.prototype.hasMoreData=wf.prototype.ha;var xf=1;wf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:xf};function zf(){this.i=[];this.h=[];this.g=!1}q=zf.prototype;q.box=function(a,b){a=Af(a);this.i[a]=Bf;this.h[a]=b;return this};q.P=function(a,b){a=Af(a);this.i[a]=Cf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new wf(a,0);for(this.g=!1;a.ha()&&!this.g;)this.qc(0,a,b,c)};
185
- q.qc=function(a,b,c,d){var e=b.Z();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.K(),g=b.K(),h=Df(g),k=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.Z()+8>b.S.byteLength){this.g=!0;return}f=b.$a();k=!0}var l=this.h[g];if(l){var m=null,n=null;if(this.i[g]==Cf){if(d&&b.Z()+4>b.S.byteLength){this.g=!0;return}n=b.K();m=n>>>24;n&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.Z(),b=0<d?b.Za(d):new Uint8Array(0),b=new wf(b,0),l({name:h,parser:this,
186
- partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Z(),b.S.byteLength-b.Z()))}};function Ef(a){for(var b=Ff(a);a.reader.ha()&&!a.parser.g;)a.parser.qc(a.start+b,a.reader,a.partialOkay)}function Gf(a){for(var b=Ff(a),c=a.reader.K(),d=0;d<c&&(a.parser.qc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Hf(a){var b=Ff(a);for(a.reader.skip(78);a.reader.ha()&&!a.parser.g;)a.parser.qc(a.start+b,a.reader,a.partialOkay)}
187
- function If(a){return function(b){a(b.reader.Za(b.reader.S.byteLength-b.reader.Z()))}}function Af(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 Df(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ff(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",zf);zf.headerSize=Ff;zf.typeToString=Df;zf.allData=If;zf.visualSampleEntry=Hf;zf.sampleDescription=Gf;zf.children=Ef;zf.prototype.parseNext=zf.prototype.qc;
188
- zf.prototype.parse=zf.prototype.parse;zf.prototype.stop=zf.prototype.stop;zf.prototype.fullBox=zf.prototype.P;zf.prototype.box=zf.prototype.box;var Bf=0,Cf=1;function Jf(a){var b=this;this.g=[];this.h=[];this.data=[];(new zf).box("moov",Ef).box("moof",Ef).P("pssh",function(c){if(!(1<c.version)){var d=M(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Nc(c.reader.Za(16)));if(0<c.version){d=c.reader.K();for(var e=0;e<d;e++){var f=Nc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
189
- function Kf(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Lb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=r(c),c=b.next();!c.done;c=b.next())c=Mc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Lf(a,b){a=Mf(a,b);return 1!=a.length?null:a[0]}function Nf(a,b,c){a=Of(a,b,c);return 1!=a.length?null:a[0]}function Mf(a,b){var c=[];a=r(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Pf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
190
- function Of(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Qf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Rf(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 Sf(a){return Array.from(a.childNodes).every(Tf)?a.textContent.trim():null}
191
- function Tf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Uf(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 Vf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
192
- function Wf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
193
- function Xf(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 Yf(a){a=Number(a);return 0===a%1?a:null}function Zf(a){a=Number(a);return 0===a%1&&0<a?a:null}function $f(a){a=Number(a);return 0===a%1&&0<=a?a:null}function ag(a){a=Number(a);return isNaN(a)?null:a}function bg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
194
- function cg(a,b){var c=new DOMParser,d=dg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function eg(a,b){try{var c=Cc(a);return cg(c,b)}catch(d){return null}}
195
- var dg=new mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function fg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.da=this.W=!1;this.H=0;this.g=null;this.s=new mf;this.i=new Map;this.B=[];this.o=new lc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ea=new Map;this.ba=new Map;this.O=new P(function(){return gg(c)});this.L=!1;this.J=[];this.M=!1;this.ca=(new P(function(){hg(c)})).Ca(b);this.o.catch(function(){});this.j=new kf(function(){return ig(c)});this.V=!1;this.F=null}q=fg.prototype;q.destroy=function(){return this.j.destroy()};
196
- function ig(a){return G(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ca.stop(),a.ca=null,a.O.stop(),a.O=null,u(b,jg(a),2);case 2:if(!a.l){b.A(3);break}D(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:ta(b,5);break;case 4:ua(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.V=!1,a.F=null,A(b)}})}q.configure=function(a){this.h=a};function kg(a,b,c){a.da=!0;a.B=[];a.L=c;return lg(a,b)}
197
- function mg(a,b,c){a.B=c;a.L=0<c.length;return lg(a,b)}function ng(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return og(a,g,[])}
198
- function lg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;return G(function(w){if(1==w.g){if(c=pg(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=tf(a.h.servers),qg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=rg(l),n=r(m),p=n.next();!p.done;p=n.next())t=p.value,sg(t,tf(a.h.servers),tf(a.h.advanced||{}),a.h.keySystemsMapping);
199
- return u(w,Rd(b,a.L,a.V),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.W=!0,w.return(Promise.resolve());y=og(a,void 0,b);return w.return(g?y:y.catch(function(){}))})}function tg(a){var b;return G(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return lf(a.j),c.return();case 2:return D(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:ta(c,5);break;case 4:b=ua(c),a.m(new O(2,6,6003,b.message));case 5:lf(a.j),A(c)}})}
200
- function ug(a,b){return G(function(c){if(1==c.g)return u(c,tg(a),2);vg(a,b.initDataType,M(b.initData));A(c)})}
201
- q.Yb=function(a){var b=this,c;return G(function(d){if(1==d.g){if(!b.u)return b.s.ma(a,"encrypted",function(){b.m(new O(2,6,6010))}),d.return();b.l=a;b.s.ma(b.l,"play",function(){for(var e=r(b.J),f=e.next();!f.done;f=e.next())wg(b,f.value);b.M=!0;b.J=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return jg(b)});return(c=b.g?b.g.initData.find(function(e){return 0<e.initData.length}):null)||"com.apple.fps"!==b.g.keySystem||b.B.length?
202
- u(d,tg(b),2):d.A(2)}xg(b);c||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(e){return ug(b,e)});A(d)})};
203
- function yg(a){var b,c,d,e,f;return G(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=cf([a.g.serverCertificateUri],a.h.retryParameters);D(g,3);c=a.D.kb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=M(d.data);ta(g,4);break;case 3:throw e=ua(g),new O(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
204
- D(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:ta(g,0);break;case 6:throw f=ua(g),new O(2,6,6004,f.message);}})}function zg(a,b){var c,d,e;return G(function(f){if(1==f.g)return u(f,Ag(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Ja=new lc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);A(f)})}
205
- function xg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,vg(a,d.initDataType,d.initData);c=r(a.B);for(d=c.next();!d.done;d=c.next())Ag(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function vg(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Gb(c,e.value.initData)&&!tc("Tizen 2"))return;0<a.i.size&&Bg(a)&&(a.o.resolve(),a.o=new lc,a.o.catch(function(){}));Cg(a,b,c,a.g.sessionType)}}
206
- function Dg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Eg(a){a=a.i.keys();a=rf(a,function(b){return b.sessionId});return Array.from(a)}q.ic=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Qc=function(){return uf(this.ba)};
207
- function og(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y;return G(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Fg(a,c,d);w.A(2);break}return u(w,Gg(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new O(2,6,6001);lf(a.j);D(w,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=r(k);for(m=p.next();!m.done;m=p.next())t=m.value,a.G.add(t.contentType.toLowerCase());if(c.length){var x=
208
- f.keySystem;var C=d.get(f.keySystem);var z=[],B=[],E=[],F=[],H=new Set;Hg(C,z,E,B,F,H);var I=a.L?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:C[0].distinctiveIdentifierRequired,persistentStateRequired:C[0].persistentStateRequired,sessionType:C[0].sessionType||I,audioRobustness:C[0].audioRobustness||"",videoRobustness:C[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:F,keyIds:H};C=r(C);for(z=C.next();!z.done;z=
209
- C.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);C=x}else C=f.keySystem,x=b.get(f.keySystem),z=[],B=[],E=[],F=[],H=new Set,Hg(x.drmInfos,z,E,B,F,H),C={keySystem:C,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
210
- x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:B[0],initData:F,keyIds:H};a.g=C;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,lf(a.j),a.u=v,a.W=!0,u(w,yg(a),7);case 7:lf(a.j);ta(w,0);break;case 4:y=ua(w);lf(a.j,y);a.g=null;a.G.clear();if(y instanceof O)throw y;throw new O(2,6,6002,y.message);}})}
211
- function Fg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(rg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new O(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={qd:d.qd},e=a.next())for(d.qd=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
212
- l.qd}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
213
- function Gg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w;return G(function(x){switch(x.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(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.A(4);break}k=h.value;if(!b.has(k)){x.A(3);break}l=b.get(k);D(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
214
- x.h,x.return(c);case 6:ua(x);case 7:lf(a.j);case 3:h=g.next();x.A(2);break;case 4:m=r([!0,!1]),n=m.next();case 9:if(n.done){x.A(11);break}p=n.value;t=r(b.keys());h=t.next();case 12:if(h.done){n=m.next();x.A(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(w!=p){x.A(13);break}D(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x.return(c);case 15:ua(x);case 16:lf(a.j);case 13:h=t.next();x.A(12);break;case 11:return x.return(c)}})}
215
- function pg(a){a=tf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Kc(Mc(f),!1));f=e;22!=f.length&&(f=Kc(Mc(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:M(Gc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
140
+ function ae(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
141
+ audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function be(a){a.__shaka_id||(a.__shaka_id=ce++);return a.__shaka_id}
142
+ function de(a){var b=ee(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function fe(a){var b=ee(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}
143
+ function ee(a){return{id:be(a),active:!1,type:"",bandwidth:0,language:nd(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
144
+ originalTextId:null,originalImageId:null}}function ge(a){return a.allowedByApplication&&a.allowedByKeySystem}function he(a){return a.filter(function(b){return ge(b)})}
145
+ function yd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;a=c.filter(function(g){return g<=b});return a.length?d.get(Math.max.apply(Math,ia(a))):d.get(Math.min.apply(Math,ia(c)))}
146
+ function ie(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=ud(nd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return nd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=je(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(ac,[]);return a.length?
147
+ je(e,a[0]):e}function je(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Td(a){var b=[];a.audio&&b.push(ke(a.audio));a.video&&b.push(ke(a.video));return b.join(", ")}
148
+ function ke(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"}
149
+ var ce=0,Dd="smooth",Ed="powerEfficient",Gd="bandwidth",Wd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Xd=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function le(){var a=this;this.l=null;this.o=!1;this.i=new Ta;navigator.connection&&navigator.connection.addEventListener&&(this.u=function(){if(a.g.useNetworkInformation&&a.o){a.i=new Ta;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}},navigator.connection.addEventListener("change",this.u));this.m=[];this.A=1;this.F=!1;this.u=this.h=this.j=this.g=this.s=null;this.D=new P(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}q=le.prototype;
150
+ q.stop=function(){this.l=null;this.o=!1;this.m=[];this.A=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.D.stop()};q.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.u),this.u=null);this.D=null};q.init=function(a){this.l=a};
151
+ q.chooseVariant=function(){var a=Infinity,b=Infinity;this.g.restrictToScreenSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=window.screen.height*b,b*=window.screen.width);this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=me(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(ne(this));this.m.length&&!a.length&&(a=me(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
152
+ d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.A)?1:Math.abs(this.A),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.s=Date.now();return c};q.enable=function(){this.o=!0};q.disable=function(){this.o=!1};
153
+ q.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.F){a=this.i;if(!(a.g>=a.i))break a;this.F=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;a=this.chooseVariant();this.i.getBandwidthEstimate(ne(this));a&&this.l(a)}};q.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(ne(this))};q.setVariants=function(a){this.m=a};q.playbackRateChanged=function(a){this.A=a};
154
+ q.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.O(oe)}),this.h.observe(this.j))};q.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function ne(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
155
+ function me(a,b,c,d){a&&(b=b.filter(function(e){return Jd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}K("shaka.abr.SimpleAbrManager",le);le.prototype.configure=le.prototype.configure;le.prototype.setMediaElement=le.prototype.setMediaElement;le.prototype.playbackRateChanged=le.prototype.playbackRateChanged;le.prototype.setVariants=le.prototype.setVariants;le.prototype.getBandwidthEstimate=le.prototype.getBandwidthEstimate;le.prototype.segmentDownloaded=le.prototype.segmentDownloaded;
156
+ le.prototype.disable=le.prototype.disable;le.prototype.enable=le.prototype.enable;le.prototype.chooseVariant=le.prototype.chooseVariant;le.prototype.init=le.prototype.init;le.prototype.release=le.prototype.release;le.prototype.stop=le.prototype.stop;var oe=1;function pe(a,b){this.g=a;this.h=b}pe.prototype.toString=function(){return"v"+this.g+"."+this.h};function qe(a,b){var c=new pe(5,0),d=re,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function se(a,b,c,d){Xa([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function te(a,b,c,d){Wa([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var re=null;K("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function ue(a,b){this.h=a;this.g=new Set([a]);b=b||[];a=r(b);for(b=a.next();!b.done;b=a.next())this.add(b.value)}ue.prototype.add=function(a){return ve(this.h,a)?(this.g.add(a),!0):!1};
157
+ function ve(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)&&we(c,d)&&xe(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(a=a.video,b=b.video,c=!(we(a,b)&&xe(a.roles,b.roles)));return c?!1:!0}ue.prototype.values=function(){return this.g.values()};
158
+ function we(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return ad(d)[0]});b=b.codecs.split(",").map(function(d){return ad(d)[0]});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function xe(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0};function ye(a){this.g=a;this.h=new ze(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}ye.prototype.create=function(a){var b=this,c=a.filter(function(d){return ve(b.g,d)});return c.length?new ue(c[0],c):this.h.create(a)};function ze(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
159
+ ze.prototype.create=function(a){var b=[];b=Ae(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Be(b,this.j);a.length&&(b=a);this.g&&(a=yd(b,this.g),a.length&&(b=a));this.h&&(a=Ce(b,this.h),a.length&&(b=a));a=new ue(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,ve(a.h,c)&&a.add(c);return a};function Ae(a,b){b=nd(b);var c=ud(b,a.map(function(d){return td(d)}));return c?a.filter(function(d){return c==td(d)}):[]}
160
+ function Be(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ce(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function De(){this.g=Ee;this.h=(new Map).set(Ee,2).set(Fe,1)}function Ge(a,b,c){a.h.set(Ee,c).set(Fe,b)}var Fe=0,Ee=1;function He(a,b){var c=Ie();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
161
+ function Je(a){var b,c;return G(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.o);return u(d,new Promise(function(e){(new P(e)).O(c/1E3)}),2)}a.h*=a.m;B(d)})}function Ie(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ke(a,b){this.promise=a;this.i=b;this.g=!1}function Le(a){return new Ke(Promise.reject(a),function(){return Promise.resolve()})}function Me(){var a=Promise.reject(new O(2,7,7001));a.catch(function(){});return new Ke(a,function(){return Promise.resolve()})}function Ne(a){return new Ke(Promise.resolve(a),function(){return Promise.resolve()})}function Oe(a){return new Ke(a,function(){return a.catch(function(){})})}Ke.prototype.abort=function(){this.g=!0;return this.i()};
162
+ function Pe(a){return new Ke(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ke.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
163
+ Ke.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Qe(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new kc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new Ke(f,function(){return d()})};
164
+ function Qe(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}K("shaka.util.AbortableOperation",Ke);Ke.prototype.chain=Ke.prototype.Z;Ke.prototype["finally"]=Ke.prototype.finally;Ke.all=Pe;Ke.prototype.abort=Ke.prototype.abort;Ke.notAbortable=Oe;Ke.completed=Ne;Ke.aborted=Me;Ke.failed=Le;function S(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}
165
+ function Re(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",S);
166
+ var Se={Kg:"abrstatuschanged",Lg:"adaptation",Mg:"buffering",Ng:"downloadfailed",Og:"downloadheadersreceived",Pg:"drmsessionupdate",Rg:"emsg",dh:"prft",Error:"error",Sg:"expirationupdated",Tg:"gapjumped",Vg:"loaded",Wg:"loading",Yg:"manifestparsed",Zg:"mediaqualitychanged",Metadata:"metadata",ah:"onstatechange",bh:"onstateidle",eh:"ratechange",gh:"segmentappended",hh:"sessiondata",ih:"stalldetected",jh:"streaming",kh:"textchanged",lh:"texttrackvisibility",mh:"timelineregionadded",nh:"timelineregionenter",
167
+ oh:"timelineregionexit",ph:"trackschanged",rh:"unloading",sh:"variantchanged"};function Te(){this.da=new vd;this.Xc=this}Te.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Te.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Te.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.get("All");c&&(b=b.concat(c));b=r(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Xc;a.currentTarget=this.Xc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
168
+ Te.prototype.release=function(){this.da=null};function Ue(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ve(a){var b={},c;for(c in a)b[c]=a[c];return b};function We(){this.g=[]}function Xe(a,b){a.g.push(b.finally(function(){gb(a.g,b)}))}We.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 Ye(a,b,c){Te.call(this);this.i=!1;this.m=new We;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}qa(Ye,Te);q=Ye.prototype;q.ke=function(a){this.o=a};function Ze(a,b,c,d){c=c||$e;var e=af[a];if(!e||c>=e.priority)af[a]={priority:c,lg:b,mg:void 0===d?!1:d}}q.ng=function(a){this.g.add(a)};q.Dg=function(a){this.g.delete(a)};q.tf=function(){this.g.clear()};q.og=function(a){this.h.add(a)};q.Eg=function(a){this.h.delete(a)};q.uf=function(){this.h.clear()};
169
+ function bf(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Te.prototype.release.call(this);return this.m.destroy()};
170
+ q.request=function(a,b){var c=this,d=new cf;if(this.i){var e=Promise.reject(new O(2,7,7001));e.catch(function(){});return new df(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ue(b.retryParameters):Ie();b.uris=Ue(b.uris);e=ef(this,a,b);var f=e.Z(function(){return ff(c,a,b,new He(b.retryParameters,!1),0,null,d)}),g=f.Z(function(p){return gf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
171
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(p){var n=Date.now()-l,t=p.response;t.timeMs+=k;t.timeMs+=n;p.Zf||!c.l||t.fromCache||"HEAD"==b.method||a!=hf||c.l(t.timeMs,t.data.byteLength);return t},function(p){p&&(p.severity=2);throw p;});e=new df(m.promise,function(){return m.abort()},d);Xe(this.m,e);return e};
172
+ function ef(a,b,c){var d=Ne(void 0),e={};a=r(a.g);for(var f=a.next();!f.done;e={td:e.td},f=a.next())e.td=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Hb(c.body));return g.td(b,c)}}(e));return d.Z(void 0,function(g){if(g instanceof O&&7001==g.code)throw g;throw new O(2,1,1006,g);})}
173
+ function ff(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Mb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Nb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=af[k])?k.lg:null;if(!m)return Le(new O(2,1,1E3,h));var p=k.mg,n=null,t=null,v=!1,y=!1,w;return Oe(Je(d)).Z(function(){if(a.i)return Me();w=Date.now();var x=m(c.uris[e],c,b,function(A,E,F){n&&n.stop();t&&t.O(z/1E3);a.l&&b==hf&&(a.l(A,E),l=!0,g.g=F)},function(A){a.j&&a.j(A,c,b);y=!0});
174
+ if(!p)return x;var D=c.retryParameters.connectionTimeout;D&&(n=new P(function(){v=!0;x.abort()}),n.O(D/1E3));var z=c.retryParameters.stallTimeout;z&&(t=new P(function(){v=!0;x.abort()}));return x}).Z(function(x){n&&n.stop();t&&t.stop();void 0==x.timeMs&&(x.timeMs=Date.now()-w);var D={response:x,Zf:l};!y&&a.j&&a.j(x.headers,c,b);return D},function(x){n&&n.stop();t&&t.stop();if(a.s){var D=null,z=0;x instanceof O&&(D=x,1001==x.code&&(z=x.data[1]));a.s(c,D,z,v)}if(a.i)return Me();v&&(x=new O(1,1,1003,
175
+ c.uris[e],b));if(x instanceof O){if(7001==x.code)throw x;if(1010==x.code)throw f;if(1==x.severity)return D=(new Map).set("error",x),D=new S("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,ff(a,b,c,d,e,x,g)}throw x;})}
176
+ function gf(a,b,c){var d=Ne(void 0),e={};a=r(a.h);for(var f=a.next();!f.done;e={ud:e.ud},f=a.next())e.ud=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Hb(h.data));return g.ud(b,h)}}(e));return d.Z(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",Ye);Ye.prototype.request=Ye.prototype.request;Ye.prototype.destroy=Ye.prototype.destroy;Ye.makeRequest=bf;
177
+ Ye.defaultRetryParameters=function(){return Ie()};Ye.prototype.clearAllResponseFilters=Ye.prototype.uf;Ye.prototype.unregisterResponseFilter=Ye.prototype.Eg;Ye.prototype.registerResponseFilter=Ye.prototype.og;Ye.prototype.clearAllRequestFilters=Ye.prototype.tf;Ye.prototype.unregisterRequestFilter=Ye.prototype.Dg;Ye.prototype.registerRequestFilter=Ye.prototype.ng;Ye.unregisterScheme=function(a){delete af[a]};Ye.registerScheme=Ze;Ye.prototype.setForceHTTPS=Ye.prototype.ke;function cf(){this.g=0}
178
+ Ye.NumBytesRemainingClass=cf;function df(a,b,c){Ke.call(this,a,b);this.h=c}qa(df,Ke);Ye.PendingRequest=df;var hf=1;Ye.RequestType={MANIFEST:0,SEGMENT:hf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var $e=3;Ye.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:$e};var af={};function jf(a){this.g=!1;this.h=new kc;this.i=a}jf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function kf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function lf(){this.g=new vd}q=lf.prototype;q.release=function(){this.ob();this.g=null};q.C=function(a,b,c,d){this.g&&(a=new mf(a,b,c,d),this.g.push(b,a))};q.ia=function(a,b,c,d){function e(g){f.Ac(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};q.Ac=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.Ac(),this.g.remove(b,e))}};
179
+ q.ob=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.Ac();this.g.g={}}};K("shaka.util.EventManager",lf);lf.prototype.removeAll=lf.prototype.ob;lf.prototype.unlisten=lf.prototype.Ac;lf.prototype.listenOnce=lf.prototype.ia;lf.prototype.listen=lf.prototype.C;lf.prototype.release=lf.prototype.release;function mf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=nf(a,d);this.target.addEventListener(b,c,this.g)}
180
+ mf.prototype.Ac=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function nf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return of(a)?b:b.capture||!1}
181
+ function of(a){var b=pf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}pf=b}return b||!1}var pf=void 0;function qf(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function rf(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0};function sf(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 tf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function uf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;a=r(a);for(var c=a.next();!c.done;c=a.next()){var d=r(c.value);c=d.next().value;d=d.next().value;if(!b.has(c))return!1;c=b.get(c);if(c!=d||void 0==c)return!1}return!0};function vf(a,b){this.S=Jb(a);this.h=b==wf;this.g=0}q=vf.prototype;q.ha=function(){return this.g<this.S.byteLength};q.$=function(){return this.g};q.Hf=function(){return this.S.byteLength};q.Ra=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw xf();}};q.ae=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw xf();}};q.K=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw xf();}};
182
+ q.Qe=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw xf();}};q.$a=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw xf();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Za=function(a){if(this.g+a>this.S.byteLength)throw xf();var b=L(this.S,this.g,a);this.g+=a;return b};
183
+ q.skip=function(a){if(this.g+a>this.S.byteLength)throw xf();this.g+=a};q.ug=function(a){if(this.g<a)throw xf();this.g-=a};q.seek=function(a){if(0>a||a>this.S.byteLength)throw xf();this.g=a};q.tc=function(){for(var a=this.g;this.ha()&&0!=this.S.getUint8(this.g);)this.g+=1;a=L(this.S,a,this.g-a);this.g+=1;return Bc(a)};function xf(){return new O(2,3,3E3)}K("shaka.util.DataViewReader",vf);vf.prototype.readTerminatedString=vf.prototype.tc;vf.prototype.seek=vf.prototype.seek;vf.prototype.rewind=vf.prototype.ug;
184
+ vf.prototype.skip=vf.prototype.skip;vf.prototype.readBytes=vf.prototype.Za;vf.prototype.readUint64=vf.prototype.$a;vf.prototype.readInt32=vf.prototype.Qe;vf.prototype.readUint32=vf.prototype.K;vf.prototype.readUint16=vf.prototype.ae;vf.prototype.readUint8=vf.prototype.Ra;vf.prototype.getLength=vf.prototype.Hf;vf.prototype.getPosition=vf.prototype.$;vf.prototype.hasMoreData=vf.prototype.ha;var wf=1;vf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:wf};function yf(){this.i=[];this.h=[];this.g=!1}q=yf.prototype;q.box=function(a,b){a=zf(a);this.i[a]=Af;this.h[a]=b;return this};q.R=function(a,b){a=zf(a);this.i[a]=Bf;this.h[a]=b;return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new vf(a,0);for(this.g=!1;a.ha()&&!this.g;)this.rc(0,a,b,c)};
185
+ q.rc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.K(),g=b.K(),h=Cf(g),k=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.$a();k=!0}var l=this.h[g];if(l){var m=null,p=null;if(this.i[g]==Bf){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}p=b.K();m=p>>>24;p&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.Za(d):new Uint8Array(0),b=new vf(b,0),l({name:h,parser:this,
186
+ partialOkay:c||!1,version:m,flags:p,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function Df(a){for(var b=Ef(a);a.reader.ha()&&!a.parser.g;)a.parser.rc(a.start+b,a.reader,a.partialOkay)}function Ff(a){for(var b=Ef(a),c=a.reader.K(),d=0;d<c&&(a.parser.rc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Gf(a){var b=Ef(a);for(a.reader.skip(78);a.reader.ha()&&!a.parser.g;)a.parser.rc(a.start+b,a.reader,a.partialOkay)}
187
+ function Hf(a){return function(b){a(b.reader.Za(b.reader.S.byteLength-b.reader.$()))}}function zf(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 Cf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Ef(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",yf);yf.headerSize=Ef;yf.typeToString=Cf;yf.allData=Hf;yf.visualSampleEntry=Gf;yf.sampleDescription=Ff;yf.children=Df;yf.prototype.parseNext=yf.prototype.rc;
188
+ yf.prototype.parse=yf.prototype.parse;yf.prototype.stop=yf.prototype.stop;yf.prototype.fullBox=yf.prototype.R;yf.prototype.box=yf.prototype.box;var Af=0,Bf=1;function If(a){var b=this;this.g=[];this.h=[];this.data=[];(new yf).box("moov",Df).box("moof",Df).R("pssh",function(c){if(!(1<c.version)){var d=L(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Mc(c.reader.Za(16)));if(0<c.version){d=c.reader.K();for(var e=0;e<d;e++){var f=Mc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
189
+ function Jf(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Jb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=r(c),c=b.next();!c.done;c=b.next())c=Lc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Kf(a,b){a=Lf(a,b);return 1!=a.length?null:a[0]}function Mf(a,b,c){a=Nf(a,b,c);return 1!=a.length?null:a[0]}function Lf(a,b){var c=[];a=r(a.childNodes);for(var d=a.next();!d.done;d=a.next())d=d.value,d instanceof Element&&d.tagName==b&&c.push(d);return c}function Of(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
190
+ function Nf(a,b,c){var d=[];a=r(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Pf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Qf(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 Rf(a){return Array.from(a.childNodes).every(Sf)?a.textContent.trim():null}
191
+ function Sf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Tf(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 Uf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
192
+ function Vf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
193
+ function Wf(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 Xf(a){a=Number(a);return 0===a%1?a:null}function Yf(a){a=Number(a);return 0===a%1&&0<a?a:null}function Zf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function $f(a){a=Number(a);return isNaN(a)?null:a}function ag(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
194
+ function bg(a,b){var c=new DOMParser,d=cg.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function dg(a,b){try{var c=Bc(a);return bg(c,b)}catch(d){return null}}
195
+ var cg=new lc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function eg(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ea=this.ba=!1;this.H=0;this.g=null;this.s=new lf;this.i=new Map;this.A=[];this.o=new kc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ka=new Map;this.ca=new Map;this.V=new P(function(){return fg(c)});this.M=!1;this.L=[];this.P=!1;this.da=(new P(function(){gg(c)})).Ca(b);this.o.catch(function(){});this.j=new jf(function(){return hg(c)});this.W=!1;this.J=this.F=null}q=eg.prototype;
196
+ q.destroy=function(){return this.j.destroy()};function hg(a){return G(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.da.stop(),a.da=null,a.V.stop(),a.V=null,u(b,ig(a),2);case 2:if(!a.l){b.B(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:wa(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.A=[],a.h=null,a.m=function(){},a.D=null,a.W=!1,a.F=null,B(b)}})}q.configure=function(a){this.h=a};
197
+ function jg(a,b,c){a.ea=!0;a.A=[];a.M=c;return kg(a,b)}function lg(a,b,c){a.A=c;a.M=0<c.length;return kg(a,b)}
198
+ function mg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return ng(a,g,[])}
199
+ function kg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;return G(function(w){if(1==w.g){if(c=og(a))for(d=r(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(x){return x.video&&x.video.drmInfos.length||x.audio&&x.audio.drmInfos.length?!0:!1});g||(h=sf(a.h.servers),pg(b,h));k=r(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=qg(l),p=r(m),n=p.next();!n.done;n=p.next())t=n.value,rg(t,sf(a.h.servers),sf(a.h.advanced||{}),a.h.keySystemsMapping);
200
+ return u(w,Qd(b,a.M,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ba=!0,w.return(Promise.resolve());y=ng(a,void 0,b);return w.return(g?y:y.catch(function(){}))})}function sg(a){var b;return G(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c.return();if(!a.F){c.B(2);break}return u(c,a.F,3);case 3:return kf(a.j),c.return();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:va(c,5);break;case 4:b=wa(c),a.m(new O(2,6,6003,b.message));case 5:kf(a.j),B(c)}})}
201
+ function tg(a,b){return G(function(c){if(1==c.g)return u(c,sg(a),2);ug(a,b.initDataType,L(b.initData));B(c)})}
202
+ q.Zb=function(a){var b=this;return G(function(c){if(1==c.g){if(!b.u)return b.s.ia(a,"encrypted",function(){b.m(new O(2,6,6010))}),c.return();b.l=a;b.s.ia(b.l,"play",function(){for(var d=r(b.L),e=d.next();!e.done;e=d.next())vg(b,e.value);b.P=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return ig(b)});b.J=b.g?b.g.initData.find(function(d){return 0<d.initData.length})||null:null;return b.J||"com.apple.fps"!==b.g.keySystem||
203
+ b.A.length?u(c,sg(b),2):c.B(2)}wg(b);b.J||b.A.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(d){return tg(b,d)});B(c)})};
204
+ function xg(a){var b,c,d,e,f;return G(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g.return();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.B(2);break}b=bf([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=L(d.data);va(g,4);break;case 3:throw e=wa(g),new O(2,6,6017,e);case 4:if(a.j.g)return g.return();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g.return();
205
+ C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=wa(g),new O(2,6,6004,f.message);}})}function yg(a,b){var c,d,e;return G(function(f){if(1==f.g)return u(f,zg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Ja=new kc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i.delete(c);B(f)})}
206
+ function wg(a){for(var b=(a.g?a.g.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,ug(a,d.initDataType,d.initData);c=r(a.A);for(d=c.next();!d.done;d=c.next())zg(a,d.value);b.length||a.A.length||a.o.resolve();return a.o}function ug(a,b,c){if(c.length){var d=a.i.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(Fb(c,e.value.initData)&&!sc("Tizen 2"))return;0<a.i.size&&Ag(a)&&(a.o.resolve(),a.o=new kc,a.o.catch(function(){}));Bg(a,b,c,a.g.sessionType)}}
207
+ function Cg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Dg(a){a=a.i.keys();a=qf(a,function(b){return b.sessionId});return Array.from(a)}q.jc=function(){var a=Infinity,b=this.i.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Rc=function(){return tf(this.ca)};
208
+ function ng(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y;return G(function(w){switch(w.g){case 1:d=new Map;if(c.length){e=Eg(a,c,d);w.B(2);break}return u(w,Fg(a,b),3);case 3:e=w.h;case 2:f=e;if(!f)throw new O(2,6,6001);kf(a.j);C(w,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=r(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.G.add(p.contentType.toLowerCase());n=r(k);for(m=n.next();!m.done;m=n.next())t=m.value,a.G.add(t.contentType.toLowerCase());if(c.length){var x=
209
+ f.keySystem;var D=d.get(f.keySystem);var z=[],A=[],E=[],F=[],H=new Set;Gg(D,z,E,A,F,H);var I=a.M?"persistent-license":"temporary";x={keySystem:x,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:E[0],serverCertificateUri:A[0],initData:F,keyIds:H};D=r(D);for(z=D.next();!z.done;z=
210
+ D.next())z=z.value,z.distinctiveIdentifierRequired&&(x.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(x.persistentStateRequired=z.persistentStateRequired);D=x}else D=f.keySystem,x=b.get(f.keySystem),z=[],A=[],E=[],F=[],H=new Set,Gg(x.drmInfos,z,E,A,F,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==x.distinctiveIdentifier,persistentStateRequired:"required"==x.persistentState,sessionType:x.sessionTypes[0]||"temporary",audioRobustness:(x.audioCapabilities?
211
+ x.audioCapabilities[0].robustness:"")||"",videoRobustness:(x.videoCapabilities?x.videoCapabilities[0].robustness:"")||"",serverCertificate:E[0],serverCertificateUri:A[0],initData:F,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new O(2,6,6012,a.g.keySystem);return u(w,f.createMediaKeys(),6);case 6:return v=w.h,kf(a.j),a.u=v,a.ba=!0,u(w,xg(a),7);case 7:kf(a.j);va(w,0);break;case 4:y=wa(w);kf(a.j,y);a.g=null;a.G.clear();if(y instanceof O)throw y;throw new O(2,6,6002,y.message);}})}
212
+ function Eg(a,b,c){for(var d=r(b),e=d.next();!e.done;e=d.next()){var f=r(qg(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new O(2,6,6E3);d={};a=r(a.h.preferredKeySystems);for(e=a.next();!e.done;d={rd:d.rd},e=a.next())for(d.rd=e.value,f=r(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
213
+ l.rd}}(d)))return e.keySystemAccess;a=r([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=r(b),e=f.next();!e.done;e=f.next()){var g=r(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=r(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
214
+ function Fg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w;return G(function(x){switch(x.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(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){x.B(4);break}k=h.value;if(!b.has(k)){x.B(3);break}l=b.get(k);C(x,6);return u(x,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
215
+ x.h,x.return(c);case 6:wa(x);case 7:kf(a.j);case 3:h=g.next();x.B(2);break;case 4:m=r([!0,!1]),p=m.next();case 9:if(p.done){x.B(11);break}n=p.value;t=r(b.keys());h=t.next();case 12:if(h.done){p=m.next();x.B(9);break}v=h.value;y=b.get(v);w=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(w!=n){x.B(13);break}C(x,15);return u(x,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=x.h,x.return(c);case 15:wa(x);case 16:kf(a.j);case 13:h=t.next();x.B(12);break;case 11:return x.return(c)}})}
216
+ function og(a){a=sf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Jc(Lc(f),!1));f=e;22!=f.length&&(f=Jc(Lc(e),!1));e={kty:"oct",kid:g,k:f};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:L(Fc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
216
217
  videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
217
- function Ag(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.J.push(k):wg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Ig(a,k)});e={initData:null,initDataType:null,loaded:!1,Vd:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);D(h,2);return u(h,c.load(b),4);case 4:f=
218
- h.h;lf(a.j);if(!f)return a.i.delete(c),a.m(new O(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Bg(a)&&a.o.resolve();return h.return(c);case 2:g=ua(h),lf(a.j,g),a.i.delete(c),a.m(new O(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
219
- function Cg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.M?a.J.push(f):wg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Ig(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Vd:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Kc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
218
+ function zg(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new O(2,6,6005,k.message),a.m(d),h.return(Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.L.push(k):vg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Hg(a,k)});e={initData:null,initDataType:null,loaded:!1,Wd:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);case 4:f=
219
+ h.h;kf(a.j);if(!f)return a.i.delete(c),a.m(new O(2,6,6013)),h.return(Promise.resolve());e.loaded=!0;Ag(a)&&a.o.resolve();return h.return(c);case 2:g=wa(h),kf(a.j,g),a.i.delete(c),a.m(new O(2,6,6005,g.message));case 3:return h.return(Promise.resolve())}})}
220
+ function Bg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new O(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.P?a.L.push(f):vg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Hg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Wd:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof O||(b=new O(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Jc(c);e.generateRequest(b,c).catch(function(f){if(!a.j.g){a.i.delete(e);
220
221
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new O(2,6,6006,f.message,f,h))}})}
221
- function wg(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y;G(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&Kc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=cf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
222
- Dg(a.g.keySystem)&&Jg(g),h=Date.now(),D(w,2),l=a.D.kb.request(2,g),u(w,l.promise,4);case 4:k=w.h;ta(w,3);break;case 2:return m=ua(w),n=new O(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),w.return();case 3:if(a.j.g)return w.return();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Kc(k.data);D(w,5);return u(w,c.update(k.data),7);case 7:ta(w,6);break;case 5:return p=ua(w),t=new O(2,6,6008,p.message),a.m(t),d&&d.Ja&&d.Ja.reject(t),w.return();case 6:if(a.j.g)return w.return();v=new S("drmsessionupdate");
223
- a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new P(function(){d.loaded=!0;Bg(a)&&a.o.resolve()}),y.N(Kg));A(w)}})}
224
- function Jg(a){var b=Dc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=cg(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Lc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
225
- function Ig(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Dg(a.g.keySystem)&&16==g.byteLength&&(rc()||xc())){h=Lb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Nc(g).slice(0,32);a.ea.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ja&&(a.i.delete(b),b.close().catch(function(){}));
226
- Bg(a)&&(a.o.resolve(),a.O.N(Lg))}function gg(a){var b=a.ea,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.m(new O(2,6,6014));a.D.cd(uf(c))}
227
- function Mg(){var a,b,c,d,e,f,g,h;return G(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
228
- p;return G(function(t){switch(t.g){case 1:D(t,2);if("org.w3.clearkey"===l&&yc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,tc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(t,m.createMediaKeys(),5);case 5:ta(t,0);break;case 2:ua(t),f.set(l,null),A(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(uf(f))})}
229
- function Ng(a){var b;return G(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).N(Og)}),D(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return ta(c,0);ua(c);A(c)})}
230
- function jg(a){var b;return G(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return G(function(g){if(1==g.g)return D(g,2),a.da||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Ng(e),5):u(g,e.remove(),5);if(2!=g.g)return ta(g,0);ua(g);A(g)})})),0)})}
231
- function Pg(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Da:e.Da},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Da=[];e.Da=e.Da.concat(d.initData||[]);e.Da=e.Da.concat(g.initData||[]);e.Da=e.Da.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Da.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ha(d.keyIds),ha(g.keyIds))):
222
+ function vg(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y;G(function(w){switch(w.g){case 1:return c=b.target,a.h.logLicenseExchange&&Jc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=bf([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
223
+ Cg(a.g.keySystem)&&Ig(g),h=Date.now(),C(w,2),l=a.D.lb.request(2,g),u(w,l.promise,4);case 4:k=w.h;va(w,3);break;case 2:return m=wa(w),p=new O(2,6,6007,m),a.m(p),d&&d.Ja&&d.Ja.reject(p),w.return();case 3:if(a.j.g)return w.return();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Jc(k.data);C(w,5);return u(w,c.update(k.data),7);case 7:va(w,6);break;case 5:return n=wa(w),t=new O(2,6,6008,n.message),a.m(t),d&&d.Ja&&d.Ja.reject(t),w.return();case 6:if(a.j.g)return w.return();v=new S("drmsessionupdate");
224
+ a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new P(function(){d.loaded=!0;Ag(a)&&a.o.resolve()}),y.O(Jg));B(w)}})}
225
+ function Ig(a){var b=Cc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=bg(b,"PlayReadyKeyMessage");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Kc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
226
+ function Hg(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Cg(a.g.keySystem)&&16==g.byteLength&&(qc()||wc())){h=Jb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Mc(g).slice(0,32);a.ka.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ja&&(a.i.delete(b),b.close().catch(function(){}));
227
+ Ag(a)&&(a.o.resolve(),a.V.O(Kg))}function fg(a){var b=a.ka,c=a.ca;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new O(2,6,6014));a.D.dd(tf(c))}
228
+ function Lg(){var a,b,c,d,e,f,g,h;return G(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,p,
229
+ n;return G(function(t){switch(t.g){case 1:C(t,2);if("org.w3.clearkey"===l&&xc())throw Error("Unsupported keySystem");return u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,sc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(t,m.createMediaKeys(),5);case 5:va(t,0);break;case 2:wa(t),f.set(l,null),B(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k.return(tf(f))})}
230
+ function Mg(a){var b;return G(function(c){if(1==c.g)return b=new Promise(function(d,e){(new P(e)).O(Ng)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);wa(c);B(c)})}
231
+ function ig(a){var b;return G(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=r(d);var e=d.next().value,f=d.next().value;return G(function(g){if(1==g.g)return C(g,2),a.ea||a.A.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Mg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);wa(g);B(g)})})),0)})}
232
+ function Og(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e={},f=r(b),g=f.next();!g.done;e={Da:e.Da},g=f.next())if(g=g.value,d.keySystem==g.keySystem){e.Da=[];e.Da=e.Da.concat(d.initData||[]);e.Da=e.Da.concat(g.initData||[]);e.Da=e.Da.filter(function(h){return function(k,l){return void 0===k.keyId||l===h.Da.findIndex(function(m){return m.keyId===k.keyId})}}(e));f=d.keyIds&&g.keyIds?new Set([].concat(ia(d.keyIds),ia(g.keyIds))):
232
233
  d.keyIds||g.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||g.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||g.persistentStateRequired,videoRobustness:d.videoRobustness||g.videoRobustness,audioRobustness:d.audioRobustness||g.audioRobustness,serverCertificate:d.serverCertificate||g.serverCertificate,serverCertificateUri:d.serverCertificateUri||g.serverCertificateUri,
233
- initData:e.Da,keyIds:f});break}}return c}function rg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function hg(a){a.i.forEach(function(b,c){var d=b.Vd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Vd=e)})}function Bg(a){a=a.i.values();return sf(a,function(b){return b.loaded})}
234
- function qg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=r(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
235
- function Hg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={oa:g.oa},h=a.next()){g.oa=h.value;b.includes(g.oa.licenseServerUri)||b.push(g.oa.licenseServerUri);d.includes(g.oa.serverCertificateUri)||d.push(g.oa.serverCertificateUri);g.oa.serverCertificate&&(c.some(function(m){return function(n){return Gb(n,m.oa.serverCertificate)}}(g))||c.push(g.oa.serverCertificate));if(g.oa.initData){h={};for(var k=r(g.oa.initData),l=k.next();!l.done;h={Dc:h.Dc},l=k.next())h.Dc=l.value,e.some(function(m){return function(n){var p=
236
- m.Dc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Gb(n.initData,p.initData)}}(h))||e.push(h.Dc)}if(g.oa.keyIds)for(h=r(g.oa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
237
- function sg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
238
- c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Og=1,Kg=5,Lg=.5,Qg=new mc(function(){return Ib(new Uint8Array([0]))});function Rg(){}function Sg(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g){if(d&&(e=Tg[d.toLowerCase()]))return k.return(e);if(f=Ug(a))if(g=Vg[f])return k.return(g);return d?k.A(2):u(k,Wg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Tg[d]))return k.return(h);throw new O(2,4,4E3,a);})}function Wg(a,b,c){var d,e,f;return G(function(g){if(1==g.g)return d=cf([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():"")})}
239
- function Ug(a){a=(new Nb(a)).qa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",Rg);Rg.unregisterParserByMime=function(a){delete Tg[a]};Rg.registerParserByMime=function(a,b){Tg[a]=b};Rg.registerParserByExtension=function(a,b){Vg[a]=b};var Tg={},Vg={};function Xg(a){function b(){d=!0}function c(l){f.push(l);Ef(l)}a=M(a);var d=!1,e,f=[],g=[];(new zf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).P("stsd",function(l){e=l;f.push(l);Gf(l)}).P("encv",b).P("enca",b).P("hev1",function(l){g.push({box:l,lb:1701733238})}).P("hvc1",function(l){g.push({box:l,lb:1701733238})}).P("avc1",function(l){g.push({box:l,lb:1701733238})}).P("avc3",function(l){g.push({box:l,lb:1701733238})}).P("ac-3",function(l){g.push({box:l,lb:1701733217})}).P("ec-3",
240
- function(l){g.push({box:l,lb:1701733217})}).P("mp4a",function(l){g.push({box:l,lb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw bb(Nc(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=Yg(a,e,k.box,f,k.lb);return a}
241
- function Yg(a,b,c,d,e){var f=Zg.value(),g=a.subarray(c.start,c.start+c.size),h=Lb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Lb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);$g(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=sc()?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,$g(e,d.start,d.size+k.byteLength);k=Lb(e,b.start);b=Ff(b);a=k.getUint32(b);
242
- k.setUint32(b,a+1);return e}function $g(a,b,c){a=Lb(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 Zg=new mc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function ah(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=bh(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){t=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
243
- t||-1===v)p=ch(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(y=p[t]){var w=y.l,x=y.i,C=y.j,z=y.h;if(w!=h||x!=k||C!=l||z!=m)n.payload&&a.nestedCues.push(n),n=bh(d,e,w,x,C,z),h=w,k=x,l=C,m=z;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=ch(d,e),a.nestedCues.push(n));n=bh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
244
- function bh(a,b,c,d,e,f){a=new kb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function ch(a,b){a=new kb(a,b,"");a.lineBreak=!0;return a}function dh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function eh(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";fh(this)}function gh(a,b,c){return ah(new kb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function fh(a){hh(a,0,15);a.g=1}function ih(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case jh:d=kh.has(c)?kh.get(c):String.fromCharCode(c);break;case lh:d=mh.get(c);break;case nh:a.i[a.g].pop();d=oh.get(c);break;case ph:a.i[a.g].pop(),d=qh.get(c)}d&&a.i[a.g].push(new dh(d,a.m,a.j,a.o,a.l))}}
245
- function rh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function hh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
246
- var jh=0,lh=1,nh=2,ph=3,kh=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"]]),mh=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"]]),oh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
247
- [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),qh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
248
- [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 sh(a,b){this.h=th;this.o=new eh(a,b);this.i=new eh(a,b);this.l=new eh(a,b);this.g=this.i;this.j=0;this.m=null}function uh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==vh&&a.h!==wh&&(e=gh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,hh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,hh(c,0,15),d.g=15);a.h=vh;d.h=b;return e}function xh(a){a.h=yh;a.g=a.l;a.g.h=0}function zh(a){Xa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=wh}
249
- var th=0,yh=1,vh=3,wh=4,Ah="black green blue cyan red yellow magenta black".split(" "),Bh="white green blue cyan red yellow magenta white_italics".split(" ");function Ch(){this.l=!1;this.B=this.F=0;this.D=Dh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Eh(this)}function Eh(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Fh())}function Fh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Gh(a,b){Hh(a)&&(a.i[a.h][a.g]=new dh(b,a.u,a.o,a.m,a.s),a.g++)}function Hh(a){var b=a.g<a.B&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Ch.prototype.isVisible=function(){return this.l};
250
- function Ih(a,b,c){var d=new kb(a.j,b,"");d.textAlign=a.D===Jh?"left":a.D===Kh?"right":ob;if(c=ah(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Jh=0,Kh=1,Dh=2;function Lh(){this.i=[];this.h=null;this.g=0}function Mh(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 Nh(a.h)),a.h=null,a.g=0))}function Nh(a){this.g=0;this.h=a}Nh.prototype.ha=function(){return this.g<this.h.length};Nh.prototype.Z=function(){return this.g};function Oh(a){if(!a.ha())throw new O(2,2,3E3);return a.h[a.g++]}Nh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Ph(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
251
- function Qh(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=Oh(b).value;b=null;c=r(Rh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ih(e,d,a.i)),Eh(e);return b}if(137===c)for(b=Oh(b).value,b=r(Rh(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=Oh(b).value;b=null;c=r(Rh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Ih(e,d,a.i)),e.l=!1;return b}if(139===c){c=Oh(b).value;
252
- b=null;c=r(Rh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Ih(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Oh(b).value,Sh(a,b,d);if(143===c)return d=Sh(a,255,d),Th(a),d;if(144===c)b.skip(1),d=Oh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Oh(b).value,c=Oh(b).value,b.skip(1),a.g&&(b=Uh((c&48)>>4,(c&12)>>2,c&3),a.g.s=Uh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Oh(b).value,b=Oh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
253
- b.skip(1),d=Oh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Ch;f.j=d;a.h[c]=f}d=Oh(b).value;Oh(b);Oh(b);f=Oh(b).value;var g=Oh(b).value;b=Oh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.B=(g&63)+1;a.g=a.h[c]}}}return null}function Rh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
254
- function Sh(a,b,c){var d=null;b=r(Rh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Ih(f,c,a.i));a.h[e]=null}return d}function Th(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Uh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Vh[a<<2|b<<1|c]}
255
- var Wh=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"]]),Vh="black blue green cyan red magenta yellow white".split(" ");function Xh(){this.h=[];this.g=[];this.i=new Lh;this.l=0;this.s=new Map([["CC1",new sh(0,0)],["CC2",new sh(0,1)],["CC3",new sh(1,0)],["CC4",new sh(1,1)]]);this.o=this.m=0;this.j=new Map;Yh(this)}function Yh(a){a.m=0;a.o=0;a=r(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,fh(b.i),fh(b.l),fh(b.o)}
256
- function Zh(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=$h(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Mh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=ai(a,e.value),c.push.apply(c,ha(e));a.i.i=[];a.h=[];a.g=[];return c}
257
- function $h(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.La||!b.xa&&!b.La||!bi(b.xa)||!bi(b.La))return 45<=++a.l&&Yh(a),null;a.l=0;b.xa&=127;b.La&=127;if(!b.xa&&!b.La)return null;a=null;if(16===(b.xa&112))a:{d=b.xa;a=b.La;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=Bh[e]:7===e&&(f=!0);
258
- a=1===(a&1);if(c.h!==wh){e=c.g;if(c.h===vh&&b!==e.g){var g=1+b-e.h;rh(e,g,1+e.g-e.h,e.h);hh(e,0,g-1);hh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.o="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",ih(c.g,jh,32),d=!1,b=Bh[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Ah[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))ih(c.g,lh,a);else if(18===
259
- (d&246)&&32===(a&224))ih(c.g,d&1?ph:nh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.La){case 32:xh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=uh(c,2,a);break;case 38:d=uh(c,3,a);break;case 39:d=uh(c,4,a);break;case 40:ih(c.g,jh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:fh(c.o);zh(c);break;case 43:zh(c);break;case 44:b=c.i;d=null;c.h!==wh&&(d=gh(b,c.j,a));hh(b,0,15);break;case 45:b=c.g;c.h!==vh?d=null:(d=gh(b,c.j,a),f=b.g-b.h+1,rh(b,f-1,f,b.h),hh(b,0,
260
- f-1),hh(b,b.g,15-b.g),c.j=a);break;case 46:hh(c.l,0,15);break;case 47:b=null,c.h!==wh&&(b=gh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,xh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.La,ih(c.g,jh,b.xa),ih(c.g,jh,d);return a}
261
- function ai(a,b){var c=[];try{for(;b.ha();){var d=Oh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Oh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Ph(e));for(var g=a.j.get(e),h=b.Z();b.Z()-h<f;){e=b;var k=Oh(e),l=k.value,m=k.pts;if(16===l){var n=Oh(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:!Hh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.B-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Ih(t,p,g.i));if(t.h+1>=t.F){p=t;for(var v=0,y=1;16>y;y++,
262
- v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=Fh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Ih(t,p,g.i));t.i[t.h]=Fh();t.g=0;break;case 12:t.isVisible()&&(e=Ih(t,p,g.i)),Eh(t),p=t,p.h=0,p.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Qh(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?Gh(g.g,"\u266a"):Gh(g.g,
263
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Gh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Wh.has(e)){var x=Wh.get(e);Gh(g.g,x)}else Gh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Gh(g.g,"_"):Gh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(C){if(C instanceof O&&3E3===C.code)Xa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function bi(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function ci(){}ci.prototype.init=function(){};ci.prototype.parse=function(){return[]};function di(a,b){var c=null,d=null,e=null,f=a.K();b&1&&(e=a.$a());b&2&&a.skip(4);b&8&&(c=a.K());b&16&&(d=a.K());return{trackId:f,Ce:c,xf:d,rh:e}}function ei(a,b){return{we:1==b?a.$a():a.K()}}function fi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.K()}}
264
- function gi(a,b,c){var d=a.K(),e=[],f=null;c&1&&(f=a.K());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={ee:null,sampleSize:null,ed:null};c&256&&(h.ee=a.K());c&512&&(h.sampleSize=a.K());c&1024&&a.skip(4);c&2048&&(h.ed=0==b?a.K():a.Pe());e.push(h)}return{wh:d,Re:e,wf:f}};function hi(){this.j=new Map;this.i=this.h=0;this.g=ii}
265
- hi.prototype.init=function(a){function b(f){f=f.name;f in ji&&(c.g=ji[f])}var c=this,d=[],e=[];(new zf).box("moov",Ef).box("mvex",Ef).P("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.K();g=g.K();c.h=f;c.i=g}).box("trak",Ef).P("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.K();d.push(f)}).box("mdia",Ef).P("mdhd",function(f){f=fi(f.reader,f.version);e.push(f.timescale)}).box("minf",Ef).box("stbl",Ef).P("stsd",Gf).box("avc1",b).box("avc3",b).box("hev1",
266
- b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Hf).box("sinf",Ef).box("frma",function(f){f=f.reader.K();f=Df(f);f in ji&&(c.g=ji[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==ii&&Wa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
267
- hi.prototype.parse=function(a){var b=this;if(this.g==ii)return[];var c=[],d=this.h,e=this.i,f=[],g=null,h=null,k=null,l=9E4;(new zf).box("moof",function(m){g=m.start;Ef(m)}).box("traf",Ef).P("trun",function(m){m=gi(m.reader,m.version,m.flags);f=m.Re;h=m.wf}).P("tfhd",function(m){m=di(m.reader,m.flags);d=m.Ce||b.h;e=m.xf||b.i;m=m.trackId;b.j.has(m)&&(l=b.j.get(m))}).P("tfdt",function(m){k=ei(m.reader,m.version).we}).box("mdat",function(m){if(null===k)throw new O(2,2,2010);a:{var n=m.reader,p=k,t=l,
268
- v=d,y=e,w=f,x=0,C=y;w.length&&(C=w[0].sampleSize||y);for(n.skip((g||0)+(h||0)-m.start-8);n.ha();){m=n.K();var z=n.Ra();switch(b.g){case ki:z&=31;z=6==z;break;case li:z=z>>1&63;z=39==z||40==z;break;default:break a}if(z){z=0;w.length>x&&(z=w[x].ed||0);z=(p+z)/t;for(var B=[],E,F=n.Za(m-1),H=E=0;H<F.length;)2==E&&3==F[H]?(E=0,F=[].concat(ha(F)),F.splice(H,1),F=new Uint8Array(F)):0==F[H]?E++:E=0,H++;E=F;for(H=0;H<E.length;){for(F=0;255==E[H];)F+=255,H++;F+=E[H++];for(var I=0;255==E[H];)I+=255,H++;I+=E[H++];
269
- 4==F&&B.push(E.subarray(H,H+I));H+=I}B=r(B);for(E=B.next();!E.done;E=B.next())c.push({ig:E.value,pts:z})}else try{n.skip(m-1)}catch(J){break}C-=m+4;0==C&&(p=w.length>x?p+(w[x].ee||v):p+v,x++,C=w.length>x?w[x].sampleSize||y:y)}}}).parse(a,!1);return c};var ii=0,ki=1,li=2,ji={avc1:ki,avc3:ki,hev1:li,hvc1:li,dvh1:li,dvhe:li};function mi(a){this.h=new ci;a.includes("video/mp4")&&(this.h=new hi);this.g=new Xh}mi.prototype.init=function(a){this.h.init(a)};
270
- function ni(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=M(d.ig);if(0<e.length&&(c=a.g,d=d.pts,e=new wf(e,0),181===e.Ra()&&49===e.$d()&&1195456820===e.K()&&3===e.Ra())){var f=e.Ra();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.Ra(),k=(h&4)>>2,l=e.Ra(),m=e.Ra();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,xa:l,La:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return Zh(a.g)}
271
- ;function oi(a,b,c,d,e){this.ya=a;this.Ba=b;this.ka=c;this.Od=void 0===d?null:d;this.timescale=e}oi.prototype.lc=function(){return this.Ba};oi.prototype.hc=function(){return this.ka};function pi(a,b){return a&&b?a.lc()==b.lc()&&a.hc()==b.hc()&&jb(a.ya(),b.ya()):a==b}K("shaka.media.InitSegmentReference",oi);oi.prototype.getEndByte=oi.prototype.hc;oi.prototype.getStartByte=oi.prototype.lc;
272
- function qi(a,b,c,d,e,f,g,h,k,l,m,n,p,t,v){l=void 0===l?[]:l;t=void 0===t?ri:t;this.startTime=a;this.j=this.endTime=b;this.u=c;this.Ba=d;this.ka=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.s=void 0===n?null:n;this.g=void 0===p?null:p;this.status=t;this.l=void 0===v?null:v;this.o=null;this.m=0}q=qi.prototype;q.ya=function(){return this.u()};q.getStartTime=function(){return this.startTime};q.Ef=function(){return this.endTime};
273
- q.lc=function(){return this.Ba};q.hc=function(){return this.ka};q.Vf=function(){return this.tilesLayout};q.Uf=function(){return this.s};q.Eb=function(){return this.status};q.bg=function(){this.status=si};q.Ye=function(a){this.o=a};q.Sf=function(){return this.o};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=r(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};
274
- q.oe=function(a){null==this.g?Va("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};K("shaka.media.SegmentReference",qi);qi.prototype.syncAgainst=qi.prototype.oe;qi.prototype.offset=qi.prototype.offset;qi.prototype.getThumbnailSprite=qi.prototype.Sf;qi.prototype.setThumbnailSprite=qi.prototype.Ye;qi.prototype.markAsUnavailable=qi.prototype.bg;qi.prototype.getStatus=qi.prototype.Eb;qi.prototype.getTileDuration=qi.prototype.Uf;
275
- qi.prototype.getTilesLayout=qi.prototype.Vf;qi.prototype.getEndByte=qi.prototype.hc;qi.prototype.getStartByte=qi.prototype.lc;qi.prototype.getEndTime=qi.prototype.Ef;qi.prototype.getStartTime=qi.prototype.getStartTime;qi.prototype.getUris=qi.prototype.ya;var ri=0,si=1;qi.Status={Hg:ri,oh:si,Vg:2};function ti(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function ui(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function vi(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
276
- function wi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(xi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function yi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=xi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
277
- function xi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
234
+ initData:e.Da,keyIds:f});break}}return c}function qg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function gg(a){a.i.forEach(function(b,c){var d=b.Wd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Wd=e)})}function Ag(a){a=a.i.values();return rf(a,function(b){return b.loaded})}
235
+ function pg(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=r(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
236
+ function Gg(a,b,c,d,e,f){var g={};a=r(a);for(var h=a.next();!h.done;g={pa:g.pa},h=a.next()){g.pa=h.value;b.includes(g.pa.licenseServerUri)||b.push(g.pa.licenseServerUri);d.includes(g.pa.serverCertificateUri)||d.push(g.pa.serverCertificateUri);g.pa.serverCertificate&&(c.some(function(m){return function(p){return Fb(p,m.pa.serverCertificate)}}(g))||c.push(g.pa.serverCertificate));if(g.pa.initData){h={};for(var k=r(g.pa.initData),l=k.next();!l.done;h={Ec:h.Ec},l=k.next())h.Ec=l.value,e.some(function(m){return function(p){var n=
237
+ m.Ec;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Fb(p.initData,n.initData)}}(h))||e.push(h.Ec)}if(g.pa.keyIds)for(h=r(g.pa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
238
+ function rg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
239
+ c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}var Ng=1,Jg=5,Kg=.5,Pg=new lc(function(){return Hb(new Uint8Array([0]))});function Qg(){}function Rg(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g){if(d&&(e=Sg[d.toLowerCase()]))return k.return(e);if(f=Tg(a))if(g=Ug[f])return k.return(g);return d?k.B(2):u(k,Vg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Sg[d]))return k.return(h);throw new O(2,4,4E3,a);})}function Vg(a,b,c){var d,e,f;return G(function(g){if(1==g.g)return d=bf([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():"")})}
240
+ function Tg(a){a=(new Mb(a)).ra.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",Qg);Qg.unregisterParserByMime=function(a){delete Sg[a]};Qg.registerParserByMime=function(a,b){Sg[a]=b};Qg.registerParserByExtension=function(a,b){Ug[a]=b};var Sg={},Ug={};function Wg(a){function b(){d=!0}function c(l){f.push(l);Df(l)}a=L(a);var d=!1,e,f=[],g=[];(new yf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).R("stsd",function(l){e=l;f.push(l);Ff(l)}).R("encv",b).R("enca",b).R("hev1",function(l){g.push({box:l,mb:1701733238})}).R("hvc1",function(l){g.push({box:l,mb:1701733238})}).R("avc1",function(l){g.push({box:l,mb:1701733238})}).R("avc3",function(l){g.push({box:l,mb:1701733238})}).R("ac-3",function(l){g.push({box:l,mb:1701733217})}).R("ec-3",
241
+ function(l){g.push({box:l,mb:1701733217})}).R("mp4a",function(l){g.push({box:l,mb:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw cb(Mc(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=Xg(a,e,k.box,f,k.mb);return a}
242
+ function Xg(a,b,c,d,e){var f=Yg.value(),g=a.subarray(c.start,c.start+c.size),h=Jb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Jb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Zg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=rc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,Zg(e,d.start,d.size+k.byteLength);k=Jb(e,b.start);b=Ef(b);a=k.getUint32(b);
243
+ k.setUint32(b,a+1);return e}function Zg(a,b,c){a=Jb(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 Yg=new lc(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 $g(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(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=ah(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],t=-1,v=-1,y=0;y<n.length;y++)if(null!=n[y]&&""!==n[y].g.trim()){t=y;break}for(y=n.length-1;0<=y;y--)if(null!=n[y]&&""!==n[y].g.trim()){v=y;break}if(-1===
244
+ t||-1===v)n=bh(d,e),a.nestedCues.push(n);else{for(;t<=v;t++)if(y=n[t]){var w=y.l,x=y.i,D=y.j,z=y.h;if(w!=h||x!=k||D!=l||z!=m)p.payload&&a.nestedCues.push(p),p=ah(d,e,w,x,D,z),h=w,k=x,l=D,m=z;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=bh(d,e),a.nestedCues.push(p));p=ah(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
245
+ function ah(a,b,c,d,e,f){a=new jb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function bh(a,b){a=new jb(a,b,"");a.lineBreak=!0;return a}function ch(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function dh(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";eh(this)}function fh(a,b,c){return $g(new jb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function eh(a){gh(a,0,15);a.g=1}function hh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case ih:d=jh.has(c)?jh.get(c):String.fromCharCode(c);break;case kh:d=lh.get(c);break;case mh:a.i[a.g].pop();d=nh.get(c);break;case oh:a.i[a.g].pop(),d=ph.get(c)}d&&a.i[a.g].push(new ch(d,a.m,a.j,a.o,a.l))}}
246
+ function qh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function gh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
247
+ var ih=0,kh=1,mh=2,oh=3,jh=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"]]),lh=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"]]),nh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
248
+ [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),ph=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
249
+ [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 rh(a,b){this.h=sh;this.o=new dh(a,b);this.i=new dh(a,b);this.l=new dh(a,b);this.g=this.i;this.j=0;this.m=null}function th(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==uh&&a.h!==vh&&(e=fh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,gh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,gh(c,0,15),d.g=15);a.h=uh;d.h=b;return e}function wh(a){a.h=xh;a.g=a.l;a.g.h=0}function yh(a){Ya("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=vh}
250
+ var sh=0,xh=1,uh=3,vh=4,zh="black green blue cyan red yellow magenta black".split(" "),Ah="white green blue cyan red yellow magenta white_italics".split(" ");function Bh(){this.l=!1;this.A=this.F=0;this.D=Ch;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Dh(this)}function Dh(a){a.i=[];for(var b=0;16>b;b++)a.i.push(Eh())}function Eh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Fh(a,b){Gh(a)&&(a.i[a.h][a.g]=new ch(b,a.u,a.o,a.m,a.s),a.g++)}function Gh(a){var b=a.g<a.A&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Bh.prototype.isVisible=function(){return this.l};
251
+ function Hh(a,b,c){var d=new jb(a.j,b,"");d.textAlign=a.D===Ih?"left":a.D===Jh?"right":nb;if(c=$g(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Ih=0,Jh=1,Ch=2;function Kh(){this.i=[];this.h=null;this.g=0}function Lh(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 Mh(a.h)),a.h=null,a.g=0))}function Mh(a){this.g=0;this.h=a}Mh.prototype.ha=function(){return this.g<this.h.length};Mh.prototype.$=function(){return this.g};function Nh(a){if(!a.ha())throw new O(2,2,3E3);return a.h[a.g++]}Mh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Oh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
252
+ function Ph(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=Nh(b).value;b=null;c=r(Qh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Hh(e,d,a.i)),Dh(e);return b}if(137===c)for(b=Nh(b).value,b=r(Qh(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=Nh(b).value;b=null;c=r(Qh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Hh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Nh(b).value;
253
+ b=null;c=r(Qh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Hh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Nh(b).value,Rh(a,b,d);if(143===c)return d=Rh(a,255,d),Sh(a),d;if(144===c)b.skip(1),d=Nh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Nh(b).value,c=Nh(b).value,b.skip(1),a.g&&(b=Th((c&48)>>4,(c&12)>>2,c&3),a.g.s=Th((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Nh(b).value,b=Nh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
254
+ b.skip(1),d=Nh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new Bh;f.j=d;a.h[c]=f}d=Nh(b).value;Nh(b);Nh(b);f=Nh(b).value;var g=Nh(b).value;b=Nh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.A=(g&63)+1;a.g=a.h[c]}}}return null}function Qh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
255
+ function Rh(a,b,c){var d=null;b=r(Qh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Hh(f,c,a.i));a.h[e]=null}return d}function Sh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Th(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Uh[a<<2|b<<1|c]}
256
+ var Vh=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"]]),Uh="black blue green cyan red magenta yellow white".split(" ");function Wh(){this.h=[];this.g=[];this.i=new Kh;this.l=0;this.s=new Map([["CC1",new rh(0,0)],["CC2",new rh(0,1)],["CC3",new rh(1,0)],["CC4",new rh(1,1)]]);this.o=this.m=0;this.j=new Map;Xh(this)}function Xh(a){a.m=0;a.o=0;a=r(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,eh(b.i),eh(b.l),eh(b.o)}
257
+ function Yh(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=Zh(a,e.value))&&c.push(e);d=r(a.g);for(e=d.next();!e.done;e=d.next())Lh(a.i,e.value);d=r(a.i.i);for(e=d.next();!e.done;e=d.next())e=$h(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
258
+ function Zh(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.La||!b.xa&&!b.La||!ai(b.xa)||!ai(b.La))return 45<=++a.l&&Xh(a),null;a.l=0;b.xa&=127;b.La&=127;if(!b.xa&&!b.La)return null;a=null;if(16===(b.xa&112))a:{d=b.xa;a=b.La;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];var e=(a&30)>>1;d="white";var f=!1;7>e?d=Ah[e]:7===e&&(f=!0);
259
+ a=1===(a&1);if(c.h!==vh){e=c.g;if(c.h===uh&&b!==e.g){var g=1+b-e.h;qh(e,g,1+e.g-e.h,e.h);gh(e,0,g-1);gh(e,b+1,15-b)}e.g=b;c.g.m=a;c.g.j=f;c.g.l=d;c.g.o="black"}}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",hh(c.g,ih,32),d=!1,b=Ah[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=zh[(a&14)>>1]),c.g.o=b;else if(17===(d&247)&&48===(a&240))hh(c.g,kh,a);else if(18===
260
+ (d&246)&&32===(a&224))hh(c.g,d&1?oh:mh,a);else if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.La){case 32:wh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=th(c,2,a);break;case 38:d=th(c,3,a);break;case 39:d=th(c,4,a);break;case 40:hh(c.g,ih,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=a;break;case 42:eh(c.o);yh(c);break;case 43:yh(c);break;case 44:b=c.i;d=null;c.h!==vh&&(d=fh(b,c.j,a));gh(b,0,15);break;case 45:b=c.g;c.h!==uh?d=null:(d=fh(b,c.j,a),f=b.g-b.h+1,qh(b,f-1,f,b.h),gh(b,0,
261
+ f-1),gh(b,b.g,15-b.g),c.j=a);break;case 46:gh(c.l,0,15);break;case 47:b=null,c.h!==vh&&(b=fh(c.i,c.j,a)),d=c.l,c.l=c.i,c.i=d,wh(c),c.j=a,d=b}a=d;break a}a=null}else d=b.La,hh(c.g,ih,b.xa),hh(c.g,ih,d);return a}
262
+ function $h(a,b){var c=[];try{for(;b.ha();){var d=Nh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Nh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Oh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Nh(e),l=k.value,m=k.pts;if(16===l){var p=Nh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var t=g.g;e=null;switch(l){case 8:!Gh(t)||0>=t.g&&0>=t.h||(0>=t.g?(t.g=t.A-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(e=Hh(t,n,g.i));if(t.h+1>=t.F){n=t;for(var v=0,y=1;16>y;y++,
263
+ v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=Eh()}else t.h++;t.g=0;break;case 14:t.isVisible()&&(e=Hh(t,n,g.i));t.i[t.h]=Eh();t.g=0;break;case 12:t.isVisible()&&(e=Hh(t,n,g.i)),Dh(t),n=t,n.h=0,n.g=0}var w=e}else w=null}else if(128<=l&&159>=l)w=Ph(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Fh(g.g,"\u266a"):Fh(g.g,
264
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Fh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Vh.has(e)){var x=Vh.get(e);Fh(g.g,x)}else Fh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Fh(g.g,"_"):Fh(g.g,"[CC]"));w=null}(e=w)&&c.push(e)}}}}catch(D){if(D instanceof O&&3E3===D.code)Ya("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function ai(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function bi(){}bi.prototype.init=function(){};bi.prototype.parse=function(){return[]};function ci(a,b){var c=null,d=null,e=null,f=a.K();b&1&&(e=a.$a());b&2&&a.skip(4);b&8&&(c=a.K());b&16&&(d=a.K());return{trackId:f,De:c,yf:d,th:e}}function di(a,b){return{xe:1==b?a.$a():a.K()}}function ei(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.K()}}
265
+ function fi(a,b,c){var d=a.K(),e=[],f=null;c&1&&(f=a.K());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={fe:null,sampleSize:null,fd:null};c&256&&(h.fe=a.K());c&512&&(h.sampleSize=a.K());c&1024&&a.skip(4);c&2048&&(h.fd=0==b?a.K():a.Qe());e.push(h)}return{yh:d,Se:e,xf:f}};function gi(){this.j=new Map;this.i=this.h=0;this.g=hi}
266
+ gi.prototype.init=function(a){function b(f){f=f.name;f in ii&&(c.g=ii[f])}var c=this,d=[],e=[];(new yf).box("moov",Df).box("mvex",Df).R("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.K();g=g.K();c.h=f;c.i=g}).box("trak",Df).R("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.K();d.push(f)}).box("mdia",Df).R("mdhd",function(f){f=ei(f.reader,f.version);e.push(f.timescale)}).box("minf",Df).box("stbl",Df).R("stsd",Ff).box("avc1",b).box("avc3",b).box("hev1",
267
+ b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("encv",Gf).box("sinf",Df).box("frma",function(f){f=f.reader.K();f=Cf(f);f in ii&&(c.g=ii[f])}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==hi&&Xa("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
268
+ gi.prototype.parse=function(a){var b=this;if(this.g==hi)return[];var c=[],d=this.h,e=this.i,f=[],g=null,h=null,k=null,l=9E4;(new yf).box("moof",function(m){g=m.start;Df(m)}).box("traf",Df).R("trun",function(m){m=fi(m.reader,m.version,m.flags);f=m.Se;h=m.xf}).R("tfhd",function(m){m=ci(m.reader,m.flags);d=m.De||b.h;e=m.yf||b.i;m=m.trackId;b.j.has(m)&&(l=b.j.get(m))}).R("tfdt",function(m){k=di(m.reader,m.version).xe}).box("mdat",function(m){if(null===k)throw new O(2,2,2010);a:{var p=m.reader,n=k,t=l,
269
+ v=d,y=e,w=f,x=0,D=y;w.length&&(D=w[0].sampleSize||y);for(p.skip((g||0)+(h||0)-m.start-8);p.ha();){m=p.K();var z=p.Ra(),A=1;switch(b.g){case ji:z&=31;z=6==z;break;case ki:A=2;p.skip(1);z=z>>1&63;z=39==z||40==z;break;default:break a}if(z){z=0;w.length>x&&(z=w[x].fd||0);z=(n+z)/t;for(var E=[],F=p.Za(m-A),H=A=0;H<F.length;)2==A&&3==F[H]?(A=0,F=[].concat(ia(F)),F.splice(H,1),F=new Uint8Array(F)):0==F[H]?A++:A=0,H++;A=F;for(H=0;H<A.length;){for(F=0;255==A[H];)F+=255,H++;F+=A[H++];for(var I=0;255==A[H];)I+=
270
+ 255,H++;I+=A[H++];4==F&&E.push(A.subarray(H,H+I));H+=I}E=r(E);for(A=E.next();!A.done;A=E.next())c.push({kg:A.value,pts:z})}else try{p.skip(m-A)}catch(J){break}D-=m+4;0==D&&(n=w.length>x?n+(w[x].fe||v):n+v,x++,D=w.length>x?w[x].sampleSize||y:y)}}}).parse(a,!1);return c};var hi=0,ji=1,ki=2,ii={avc1:ji,avc3:ji,hev1:ki,hvc1:ki,dvh1:ki,dvhe:ki};function li(a){this.h=new bi;a.includes("video/mp4")&&(this.h=new gi);this.g=new Wh}li.prototype.init=function(a){this.h.init(a)};
271
+ function mi(a,b){b=a.h.parse(b);b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=L(d.kg);if(0<e.length&&(c=a.g,d=d.pts,e=new vf(e,0),181===e.Ra()&&49===e.ae()&&1195456820===e.K()&&3===e.Ra())){var f=e.Ra();if(0!==(f&64)){f&=31;e.skip(1);for(var g=0;g<f;g++){var h=e.Ra(),k=(h&4)>>2,l=e.Ra(),m=e.Ra();k&&(h&=3,0===h||1===h?c.h.push({pts:d,type:h,xa:l,La:m,order:c.h.length}):(c.g.push({pts:d,type:h,value:l,order:c.g.length}),c.g.push({pts:d,type:2,value:m,order:c.g.length})))}}}}return Yh(a.g)}
272
+ ;function ni(a,b,c,d,e){this.ya=a;this.Ba=b;this.ma=c;this.Pd=void 0===d?null:d;this.timescale=e}ni.prototype.mc=function(){return this.Ba};ni.prototype.ic=function(){return this.ma};function oi(a,b){return a&&b?a.mc()==b.mc()&&a.ic()==b.ic()&&ib(a.ya(),b.ya()):a==b}K("shaka.media.InitSegmentReference",ni);ni.prototype.getEndByte=ni.prototype.ic;ni.prototype.getStartByte=ni.prototype.mc;
273
+ function T(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){l=void 0===l?[]:l;t=void 0===t?pi:t;this.startTime=a;this.l=this.endTime=b;this.A=c;this.Ba=d;this.ma=e;this.h=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.i=l;this.tilesLayout=void 0===m?"":m;this.s=void 0===p?null:p;this.g=void 0===n?null:n;this.status=t;this.u=!1;this.m=void 0===v?null:v;this.o=null;this.j=0}q=T.prototype;q.ya=function(){return this.A()};q.getStartTime=function(){return this.startTime};q.Ff=function(){return this.endTime};
274
+ q.mc=function(){return this.Ba};q.ic=function(){return this.ma};q.Wf=function(){return this.tilesLayout};q.Vf=function(){return this.s};q.Fb=function(){return this.status};q.dg=function(){this.status=qi};q.Ne=function(){this.u=!0};q.bg=function(){return this.u};q.Ze=function(a){this.o=a};q.Tf=function(){return this.o};q.offset=function(a){this.startTime+=a;this.endTime+=a;this.l+=a;for(var b=r(this.i),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.l+=a};
275
+ q.pe=function(a){null==this.g?Wa("Sync attempted without sync time!"):(a=this.g-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};K("shaka.media.SegmentReference",T);T.prototype.syncAgainst=T.prototype.pe;T.prototype.offset=T.prototype.offset;T.prototype.getThumbnailSprite=T.prototype.Tf;T.prototype.setThumbnailSprite=T.prototype.Ze;T.prototype.isPreload=T.prototype.bg;T.prototype.markAsPreload=T.prototype.Ne;T.prototype.markAsUnavailable=T.prototype.dg;T.prototype.getStatus=T.prototype.Fb;
276
+ T.prototype.getTileDuration=T.prototype.Vf;T.prototype.getTilesLayout=T.prototype.Wf;T.prototype.getEndByte=T.prototype.ic;T.prototype.getStartByte=T.prototype.mc;T.prototype.getEndTime=T.prototype.Ff;T.prototype.getStartTime=T.prototype.getStartTime;T.prototype.getUris=T.prototype.ya;var pi=0,qi=1;T.Status={Jg:pi,qh:qi,Xg:2};function ri(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
277
+ function ui(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;var c=0;a=r(vi(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}function wi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=vi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}
278
+ function vi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};/*
278
279
  @license
279
280
  Shaka Player
280
281
  Copyright 2022 Google LLC
281
282
  SPDX-License-Identifier: Apache-2.0
282
283
  */
283
- function zi(){}function Ai(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
284
- function Bi(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Cc(M(a.data,1,c));a=Cc(M(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=Cc(M(a.data,1,c));a=Cc(M(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
285
- a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=Cc(M(a.data,0,d));a=Ib(a.data.subarray(d.length+1));b.description=d;b.data=a;return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Cc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Cc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ib(a.data),b):null}
286
- function Ci(a){for(var b=0,c=[];b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9];){var d=Ai(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=Ai(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=Bi(e))&&c.push(f);b+=e.size+10}b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]&&(b+=10)}return c}
287
- K("shaka.util.Id3Utils",zi);zi.getID3Frames=Ci;function Di(){this.o=null;this.s=!1;this.l=this.m=null;this.B=[];this.g=this.h=null;this.u=[];this.j=null;this.i=[]}
288
- Di.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Ei(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71===a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h===e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.o=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.o:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Ed:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&
289
- 15)<<8|f[h+11]);h<k;){var l=(f[h+1]&31)<<8|f[h+2];switch(f[h]){case 15:-1===g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1===g.Ed&&(g.Ed=l);break;case 27:-1===g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1===g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1===g.video&&(g.video=l,g.videoCodec="hvc")}h+=((f[h+3]&15)<<8|f[h+4])+5}f=g;null==this.l&&(this.l=f.video);null==this.g&&(this.g=f.audio);null==this.j&&(this.j=f.Ed);d&&!this.s&&(d=!1,e=b-188);this.s=!0;break;case this.l:f=
290
- a.subarray(h,e+188);null==this.m&&(h=Fi(f))&&null!=h.pts&&(this.m=h.pts/9E4);this.B.push(f);break;case this.g:f=a.subarray(h,e+188);null==this.h&&(h=Fi(f))&&null!=h.pts&&(this.h=h.pts/9E4);this.u.push(f);break;case this.j:this.i.push(a.subarray(h,e+188));break;default:d=!0}}return this};
291
- function Fi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),vh:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
292
- function Gi(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=Oc(a.i[d],c);var e=Fi(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Ci(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Di.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function Ei(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}K("shaka.util.TsParser",Di);function Hi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Wa("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Wa("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Wa(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
293
- (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Hi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ii(a,b){var c=Ji;switch(b.mimeType){case "video/webm":c=Ki;break;case "video/mp4":c=Li}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}K("shaka.lcevc.Dil",Hi);Hi.prototype.release=Hi.prototype.release;var Ji=0,Ki=1,Li=2;function Mi(a,b,c,d){var e=this;this.j=a;this.F=null;this.m=b;this.h={};this.L={};this.O={};this.g=null;this.H=!1;this.V=c||function(){};this.D=d||null;this.i={};this.u=new mf;this.o={};this.s=null;this.J=new lc;this.l=Ni(this,this.J);this.G=new kf(function(){return Oi(e)});this.M="";this.B=!1;this.W=new lc}function Ni(a,b){var c=new MediaSource;a.u.ma(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.M=Pi(c);a.j.src=a.M;return c}q=Mi.prototype;q.destroy=function(){return this.G.destroy()};
294
- function Oi(a){var b,c,d,e,f,g,h,k;return G(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(cc)),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.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.F=null;a.l=null;a.g=null;a.m=null;a.h={};a.o={};a.s=null;
295
- a.i={};a.D=null;A(l)})}
296
- q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n;return G(function(p){if(1==p.g)return e=kc,u(p,d.J,2);d.B=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={na:f.na},h=g.next())f.na=h.value,k=a.get(f.na),l=Zc(k.mimeType,k.codecs),f.na==e.X?Qi(d,l,c):(!b&&eb(l)||!Tc(l,f.na)||(d.o[f.na]=new Sc(l),l=Wc(f.na,l)),m=l+d.F.sourceBufferExtraFeatures,n=d.l.addSourceBuffer(m),d.u.C(n,"error",function(t){return function(){d.i[t.na][0].p.reject(new O(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),
297
- d.u.C(n,"updateend",function(t){return function(){return Ri(d,t.na)}}(f)),d.h[f.na]=n,d.L[f.na]=l,d.i[f.na]=[],d.O[f.na]=!!k.drmInfos.length);A(p)})};q.configure=function(a){this.F=a};function Qi(a,b,c){a.g||(a.g=new dd(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,fd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Wa('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Si(a){return a.l?"ended"==a.l.readyState:!0}
298
- function Ti(a,b){return b==jc?a.g.g:ti(Ui(a,b))}function Vi(a,b){return b==jc?a.g.h:ui(Ui(a,b))}function Wi(a,b,c){if(b==jc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Ui(a,b);return wi(a,c)}q.Na=function(){var a={total:xi(this.j.buffered),audio:xi(Ui(this,"audio")),video:xi(Ui(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Ui(a,b){try{return a.h[b].buffered}catch(c){return null}}
299
- function Xi(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,t,v,y,w,x,C,z,B,E,F,H,I,J,L,R,Q,U;return G(function(N){switch(N.g){case 1:h=kc;if(b!=h.X){N.A(2);break}if(!a.B){N.A(3);break}return u(N,a.W,4);case 4:k=N.h,a.g.s=k;case 3:return u(N,gd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return N.return();case 2:l=M(c);m=a.L[b];a.o[b]&&(m=a.o[b].o);0>Ei(l)?Yi.includes(m)&&(v=Ci(l),v.length&&d&&(y={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},a.V([y],
300
- 0,d.endTime))):(n=(new Di).parse(l),p=d.startTime-(n.getStartTime()[b]||0),t=Gi(n),t.length&&a.V(t,p,d?d.endTime:null));if(!a.o[b]){e&&b==h.va&&(a.g||Qi(a,"text/vtt",a.B),a.s||(a.s=new mi(m)),d?(w=ni(a.s,c),w.length&&(x=a.h[h.va].timestampOffset,ld(a.g,w,d.startTime,d.endTime,x))):a.s.init(c));N.A(6);break}f&&a.o[b].g.resetCaptions();return u(N,Xc(a.o[b],c),7);case 7:C=N.h,a.g||Qi(a,"text/vtt",a.B),C.captions&&C.captions.length&&(z=a.h[h.va].timestampOffset,B=jd(C.captions),ld(a.g,B,d?d.startTime:
301
- null,d?d.endTime:null,z)),c=C.data;case 6:c=Zi(a,c,d?d.startTime:null,b);E=a.h[b];F=$i;if(!a.B||E.mode==F||!d){N.A(8);break}H=a.l.duration;I=b==h.va||!(h.va in a.h);if(!I){N.A(9);break}J=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;L=E.timestampOffset;E.timestampOffset=0;return u(N,aj(a,b,function(){return bj(a,b,c)}),10);case 10:return u(N,aj(a,b,function(){return cj(a,b)}),11);case 11:return E.timestampOffset=L,E.appendWindowStart=J[0],E.appendWindowEnd=
302
- J[1],R=ti(Ui(a,b)),Q=(d.startTime||0)-(R||0),a.W.resolve(Q),u(N,aj(a,b,function(){return dj(a,b,0,H)}),12);case 12:if(b!=h.va){N.A(9);break}return u(N,aj(a,b,function(){a.j.currentTime-=.001;Ri(a,b)}),9);case 9:return E.mode=F,u(N,a.Aa(H),8);case 8:return d&&a.B&&b!=h.X&&(f||g)&&(U=d.startTime,aj(a,b,function(){return cj(a,b)}),aj(a,b,function(){return ej(a,b,U)})),u(N,aj(a,b,function(){bj(a,b,c)}),16);case 16:A(N)}})}function fj(a,b){var c=Vi(a,"video")||0;id(a.g,b,c)}
303
- function gj(a){a.g&&id(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return G(function(f){e=kc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,aj(d,a,function(){return dj(d,a,b,c)}),0)})};function hj(a,b){var c;return G(function(d){c=kc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,aj(a,b,function(){return dj(a,b,0,a.l.duration)}),0)})}q.flush=function(a){var b=this,c;return G(function(d){c=kc;return a==c.X?d.return():u(d,aj(b,a,function(){b.j.currentTime-=.001;Ri(b,a)}),0)})};
304
- function ij(a,b,c,d,e,f){var g;return G(function(h){g=kc;return b==g.X?(f||(a.g.s=c),hd(a.g,d,e),h.return()):u(h,Promise.all([aj(a,b,function(){return cj(a,b)}),f?Promise.resolve():aj(a,b,function(){return ej(a,b,c)}),aj(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Ri(a,b)})]),0)})}function jj(a,b,c){var d;return G(function(e){d=kc;if(b==d.X)return e.return();aj(a,b,function(){return cj(a,b)});return u(e,aj(a,b,function(){return ej(a,b,c)}),0)})}
305
- q.endOfStream=function(a){var b=this;return G(function(c){return u(c,kj(b,function(){Si(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};q.Aa=function(a){var b=this;return G(function(c){return u(c,kj(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new lc};b.i[d].unshift(e)}b.l.duration=a}),0)})};q.getDuration=function(){return this.l.duration};function bj(a,b,c){if("video"==b&&a.D){var d=a.D;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}
306
- function dj(a,b,c,d){d<=c?Ri(a,b):a.h[b].remove(c,d)}function cj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Ri(a,b)}function ej(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Ri(a,b)}function Ri(a,b){var c=a.i[b][0];c&&(c.p.resolve(),lj(a,b))}function aj(a,b,c){lf(a.G);c={start:c,p:new lc};a.i[b].push(c);1==a.i[b].length&&mj(a,b);return c.p}
307
- function kj(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:lf(a.G);c=[];d={};for(e in a.h)d.Ub=new lc,f={start:function(l){return function(){return l.Ub.resolve()}}(d),p:d.Ub},a.i[e].push(f),c.push(d.Ub),1==a.i[e].length&&f.start(),d={Ub:d.Ub};D(k,2);return u(k,Promise.all(c),4);case 4:ta(k,3);break;case 2:throw g=ua(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)lj(a,h)}A(k)}})}function lj(a,b){a.i[b].shift();mj(a,b)}
308
- function mj(a,b){var c=a.i[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)),lj(a,b)}}function Zi(a,b,c,d){var e=a.O[d];null==c&&e&&(uc()||sc())&&"mp4"==a.L[d].split(";")[0].split("/")[1]&&(b=Xg(b));return b}var Pi=window.URL.createObjectURL,$i="sequence",Yi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.i=a;this.m=b;this.o=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.u=!0;this.B=0;this.D=void 0===c?!0:c;this.F=0;this.G=!1}q=T.prototype;q.getDuration=function(){return this.j};q.Kf=function(){return this.g};q.Xe=function(a){this.i=a};q.Aa=function(a){this.j=a};q.Pf=function(){return this.i};q.Ve=function(a){this.s=a};q.yc=function(a){this.u=a};q.me=function(a){this.o=a};q.We=function(a){this.m=a};q.Df=function(){return this.m};
309
- q.Ib=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime;a=r(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b=Math.min(b,d.startTime),c=Math.max(c,d.endTime),this.g=Math.max(this.g,d.endTime-d.startTime);this.Td(b);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.G&&(this.i=(Date.now()+this.s)/1E3-this.h-this.g)}};q.Md=function(){this.G=!0};q.Td=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Sd=function(a){this.g=Math.max(this.g,a)};
310
- q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.u};q.jb=function(){return Infinity!=this.j&&!this.u};q.Pa=function(){return Math.max(this.B,this.gb()-this.o)};q.Ze=function(a){this.B=a};q.gb=function(){return this.U()||this.jb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.F,this.j):this.h?Math.min(this.h,this.j):this.j};
311
- q.kc=function(a){var b=Math.max(this.l,this.B);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.gb()-this.o+a,this.Oa()))};q.Db=function(){return this.kc(0)};q.Oa=function(){return Math.max(0,this.gb()-(this.U()||this.jb()?this.m:0))};q.df=function(){return null==this.i||null!=this.h&&this.D?!1:!0};q.Ue=function(a){this.F=a};K("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Ue;T.prototype.usingPresentationStartTime=T.prototype.df;
312
- T.prototype.getSeekRangeEnd=T.prototype.Oa;T.prototype.getSeekRangeStart=T.prototype.Db;T.prototype.getSafeSeekRangeStart=T.prototype.kc;T.prototype.getSegmentAvailabilityEnd=T.prototype.gb;T.prototype.setUserSeekStart=T.prototype.Ze;T.prototype.getSegmentAvailabilityStart=T.prototype.Pa;T.prototype.isInProgress=T.prototype.jb;T.prototype.isLive=T.prototype.U;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Sd;T.prototype.notifyMinSegmentStartTime=T.prototype.Td;
313
- T.prototype.lockStartTime=T.prototype.Md;T.prototype.notifySegments=T.prototype.Ib;T.prototype.getDelay=T.prototype.Df;T.prototype.setDelay=T.prototype.We;T.prototype.setSegmentAvailabilityDuration=T.prototype.me;T.prototype.setStatic=T.prototype.yc;T.prototype.setClockOffset=T.prototype.Ve;T.prototype.getPresentationStartTime=T.prototype.Pf;T.prototype.setDuration=T.prototype.Aa;T.prototype.setPresentationStartTime=T.prototype.Xe;T.prototype.getMaxSegmentDuration=T.prototype.Kf;
314
- T.prototype.getDuration=T.prototype.getDuration;function nj(a,b,c){this.l=c;this.j=a;this.s=oj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}nj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function pj(a,b){a.i=b}function qj(a){this.g=a}function oj(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(xi(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 rj(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new mf;this.m=!1;this.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return sj(f)});this.j=(new P(function(){sj(f)})).Ca(.25)}rj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.s=this.o=null};rj.prototype.Wd=function(){this.l=!0;sj(this)};
315
- function sj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=oj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new S("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=yi(c,b,a.D.gapDetectionThreshold),null==
316
- d||0==d&&!a.l||(e=c.start(d),e>=a.s.Oa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new S("gapjumped")))))}}};function tj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=uj.value().get(b),c.ma(a,b,d))}var uj=new mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function vj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new mf;this.i=new wj(a);tj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){xj(d,d.j)})}vj.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 yj(a){return a.m?a.g.currentTime:a.j}function zj(a,b){0<a.g.readyState?Aj(a.i,b):tj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){xj(a,a.j)})}
317
- function xj(a,b){.001>Math.abs(a.g.currentTime-b)?Bj(a):(a.h.ma(a.g,"seeking",function(){Bj(a)}),Aj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Bj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function wj(a){var b=this;this.h=a;this.m=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--)})}wj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
318
- function Aj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Cj(a){this.g=a;this.j=!1;this.h=null;this.i=new mf}q=Cj.prototype;q.yd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ma(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;tj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.zd=function(a){this.h=this.j?this.h:a};q.Ic=function(){return(this.j?this.g.currentTime:this.h)||0};q.ue=function(){return 0};
319
- q.te=function(){return 0};q.Ne=function(){};
320
- function Dj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=Ej(a,c,f);this.j=new rj(a,b.presentationTimeline,c,this.o,f);this.h=new vj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=yj(g.h);h=Fj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;zj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},Gj(this,d));this.m=new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=yj(g.h),k=g.g.Db(),l=g.g.Oa();3>
321
- l-k&&(k=l-3);h<k&&(h=Fj(g,h),g.i.currentTime=h)}})}q=Dj.prototype;q.yd=function(){this.m.Ca(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};q.zd=function(a){zj(this.h,a)};q.Ic=function(){var a=yj(this.h);return 0<this.i.readyState&&!this.i.paused?Hj(this,a):a};q.ue=function(){return this.o?this.o.o:0};q.te=function(){return this.j.u};
322
- function Gj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Db():a.g.Oa():0>b&&(b=a.g.Oa()+b);return Ij(a,Hj(a,b))}q.Ne=function(){this.j.Wd()};function Ij(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Fj(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Db(),f=a.g.Oa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.kc(c),k=a.g.kc(d);c=a.g.kc(c+d);return b>=g?Ij(a,b):b>f?f:b<e?vi(a.i.buffered,k)?k:c:b>=h||vi(a.i.buffered,b)?b:c}
323
- function Hj(a,b){var c=a.g.Db();if(b<c)return c;a=a.g.Oa();return b>a?a:b}function Ej(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new nj(new qj(a),b.stallThreshold,c);pj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Jj(a){this.g=a;this.h=null;this.i=0;this.j=!1}q=Jj.prototype;q.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};q.cg=function(){this.j=!0};function Kj(a,b){a=r(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
324
- q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.j)for(var b=r(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.pc=function(a){if(!this.j&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,ha(a))}};
325
- q.Hb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.pc(a);this.eb(b)};q.eb=function(a){if(!this.j){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
326
- q.Wa=function(a,b,c){c=void 0===c?!1:c;if(!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new qi(a.startTime,b,a.u,a.Ba,a.ka,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.s,a.g,a.status,a.l))}};
327
- q.fd=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new P(function(){var d=b();d?c.g.push.apply(c.g,ha(d)):(c.h.stop(),c.h=null)}),this.h.Ca(a))};Jj.prototype[Symbol.iterator]=function(){return this.Cb(0)};Jj.prototype.Cb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Lj(this,b,d)};
328
- function Mj(a,b,c){return new Jj([new qi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",Jj);Jj.forSingleSegment=Mj;Jj.prototype.getIteratorForTime=Jj.prototype.Cb;Jj.prototype.updateEvery=Jj.prototype.fd;Jj.prototype.fit=Jj.prototype.Wa;Jj.prototype.evict=Jj.prototype.eb;Jj.prototype.mergeAndEvict=Jj.prototype.Hb;Jj.prototype.offset=Jj.prototype.offset;Jj.prototype.get=Jj.prototype.get;Jj.prototype.find=Jj.prototype.find;Jj.prototype.markImmutable=Jj.prototype.cg;
329
- Jj.prototype.release=Jj.prototype.release;function Lj(a,b,c){this.i=a;this.g=b;this.h=c}Lj.prototype.vf=function(){return this.g};Lj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.ya().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
330
- Lj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.ya().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};K("shaka.media.SegmentIterator",Lj);Lj.prototype.next=Lj.prototype.next;Lj.prototype.current=Lj.prototype.current;Lj.prototype.currentPosition=Lj.prototype.vf;function Nj(){Jj.call(this,[]);this.l=[]}oa(Nj,Jj);q=Nj.prototype;q.clone=function(){var a=new Nj;a.l=this.l.slice();return a};
331
- q.release=function(){for(var a=r(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};q.find=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};q.get=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.pc=function(){};q.eb=function(){};q.Hb=function(){};q.Wa=function(){};q.fd=function(){};
332
- K("shaka.media.MetaSegmentIndex",Nj);Nj.prototype.updateEvery=Nj.prototype.fd;Nj.prototype.fit=Nj.prototype.Wa;Nj.prototype.mergeAndEvict=Nj.prototype.Hb;Nj.prototype.evict=Nj.prototype.eb;Nj.prototype.merge=Nj.prototype.pc;Nj.prototype.offset=Nj.prototype.offset;Nj.prototype.get=Nj.prototype.get;Nj.prototype.find=Nj.prototype.find;Nj.prototype.release=Nj.prototype.release;function Oj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Tc();this.h=new P(function(){b.g.Me(.25*b.i)})}Oj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Oj.prototype.set=function(a){this.i=a;Pj(this)};Oj.prototype.Pc=function(){return this.g.Pc()};function Pj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Tc()!=b&&a.g.le(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Tc()&&a.g.le(0)};function Qj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){Rj(b,!1)})).Ca(.25)}Qj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Rj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Sj(a){Ue.call(this);this.g=new Map;this.h=a}oa(Sj,Ue);Sj.prototype.release=function(){this.g.clear();Ue.prototype.release.call(this)};function Tj(a,b){var c=a.g.get(b);c||(c={rc:[],Ae:null,contentType:b},a.g.set(b,c));return c}function Uj(a,b,c){var d=Tj(a,b.contentType);Vj(a,d);a={Od:b,position:c};d=d.rc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
333
- Sj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.rc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Od;break a}}d=null}if(e=d)e=c.Ae,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
334
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Ae=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Vj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.rc;b.rc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.rc=[]};function Wj(a){Ue.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new P(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}oa(Wj,Ue);Wj.prototype.release=function(){this.g.clear();this.h.stop();Ue.prototype.release.call(this)};function Xj(a){Ue.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{rb:null,qb:Yj,ib:function(c,d){return Zj(b,"enter",c,d)}},{rb:ak,qb:Yj,ib:function(c,d){return Zj(b,"enter",c,d)}},{rb:bk,qb:Yj,ib:function(c,d){return Zj(b,"enter",c,d)}},{rb:Yj,qb:ak,ib:function(c,d){return Zj(b,"exit",c,d)}},{rb:Yj,qb:bk,ib:function(c,d){return Zj(b,"exit",c,d)}},{rb:ak,qb:bk,ib:function(c,d){return Zj(b,"skip",c,d)}},{rb:bk,qb:ak,ib:function(c,d){return Zj(b,"skip",c,d)}}];this.h=new mf;this.h.C(this.i,"regionremove",
335
- function(c){b.g.delete(c.region)})}oa(Xj,Ue);Xj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Ue.prototype.release.call(this)};Xj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?ak:a>d.endTime?bk:Yj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.rb==e&&h.qb==f&&h.ib(d,b)}};
336
- function Zj(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var ak=1,Yj=2,bk=3;function ck(a,b,c,d,e){a=cf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function dk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.l=null;this.D=!1;this.j=new Map;this.B=!1;this.F=null;this.s=!1;this.h=new kf(function(){return ek(c)})}q=dk.prototype;q.destroy=function(){return this.h.destroy()};function ek(a){var b,c,d,e;return G(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,fk(e),b.push(gk(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;A(f)})}
337
- q.configure=function(a){this.i=a;this.F=new Ie({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};q.start=function(){var a=this;return G(function(b){if(1==b.g)return u(b,hk(a),2);lf(a.h);a.B=!0;A(b)})};
338
- function ik(a,b){var c,d,e,f,g,h;G(function(k){switch(k.g){case 1:return c=kc,D(k,2),u(k,hj(a.g.R,c.X),4);case 4:ta(k,3);break;case 2:if(d=ua(k),a.g)a.g.onError(d);case 3:e=Zc(b.mimeType,b.codecs);Qi(a.g.R,e,a.m.sequenceMode);f=a.g.R.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=jk(b),a.j.set(c.X,h),kk(a,h,0);A(k)}})}function lk(a){var b=a.j.get(jc);b&&(fk(b),gk(b).catch(function(){}),a.j.delete(jc));a.o=null}
339
- function mk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.ob&&(nk(a,b,!1,0,!1),c.ob=d);else if(d=c.ob)c.ob=null,nk(a,d,!0,0,!1)}}function ok(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.B&&(b.video&&nk(a,b.video,c,d,e,f),b.audio&&nk(a,b.audio,c,d,e,f))}function pk(a,b){a.o=b;a.B&&nk(a,b,!0,0,!1)}
340
- function nk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=jc?g&&(g.ob&&(b.trickModeVideo?(g.ob=b,b=b.trickModeVideo):g.ob=null),g.stream!=b||e)&&(b.type==jc&&Qi(a.g.R,Zc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.aa=null,g.ve=!!f,c&&(g.ac?g.hd=!0:g.ra?(g.bb=!0,g.Nc=d,g.hd=!0):(fk(g),qk(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),rk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):ik(a,b)}
341
- function rk(a,b){var c,d;return G(function(e){if(1==e.g){if(!b.ta)return e.return();c=b.stream;d=b.ta;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ta!=d||b.stream!=c)return e.return();var f=a.g.Sc();var g=Vi(a.g.R,b.type),h=b.stream.segmentIndex.find(b.pa?b.pa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ka?k.ka-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ka?k.ka-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
342
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.ta.h.g>h?!0:!1):f=!1;f&&b.ta.abort();A(e)})}
343
- q.vc=function(){if(this.g)for(var a=this.g.Sc(),b=r(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);c.aa=null;var e=this.g.R;d==jc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Ui(e,d),e=vi(e,a));if(!e){(null!=Vi(this.g.R,d)||c.ra)&&sk(this,c);c.ta&&(c.ta.abort(),c.ta=null);if(d===jc&&(d=this.g.R,d.s))for(d=d.s.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,Yh(d),d=r(d.j.values()),e=d.next();!e.done;e=d.next())Th(e.value);c.vc=!0}}};
344
- function sk(a,b){b.ac||b.bb||(b.ra?(b.bb=!0,b.Nc=0):null==Ti(a.g.R,b.type)?null==b.Ka&&kk(a,b,0):(fk(b),qk(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
345
- function hk(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){if(1==n.g){b=kc;if(!a.l)throw new O(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Hc,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.va,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.R;f=a.i.forceTransmux;return u(n,e.init(c,f,a.m.sequenceMode),2)}lf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=jk(l),a.j.set(k,m),kk(a,m,0));A(n)})}
346
- function jk(a){return{stream:a,type:a.type,aa:null,pa:null,Zc:null,Kd:null,Jd:null,Id:null,ob:null,endOfStream:!1,ra:!1,Ka:null,bb:!1,Nc:0,hd:!1,ac:!1,vc:!0,Rd:!1,be:!1,nc:!1,ta:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Aa(a):this.g.R.Aa(Math.pow(2,32))};
347
- function tk(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:lf(a.h);if(b.ra||null==b.Ka||b.ac)return h.return();b.Ka=null;if(!b.bb){h.A(2);break}return u(h,qk(a,b,b.hd,b.Nc),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.ra||b.Ka||kk(a,b,0),h.return();case 4:D(h,6);d=uk(a,b);null!=d&&(kk(a,b,d),b.nc=!1);ta(h,7);break;case 6:return e=
348
- ua(h),u(h,vk(a,e),8);case 8:return h.return();case 7:f=Array.from(a.j.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.R.endOfStream(),10);case 10:lf(a.h),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Aa(g),A(h)}})}
349
- function uk(a,b){if(wk(b))return fj(a.g.R,b.stream.originalId||""),null;b.type==jc&&gj(a.g.R);var c=a.g.Sc(),d=b.pa?b.pa.endTime:c,e=Wi(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Vi(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.j.get(jc))&&wk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=xk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
350
- f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,wk(h)||h.aa&&!h.aa.current()||(f=Math.min(f,h.pa?h.pa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;yk(a,b,c,e).catch(function(){});return null}
351
- function xk(a,b,c,d){if(b.aa)return b.aa.current();if(b.pa||d)return c=b.pa?b.pa.endTime:d,b.Rd=!0,b.aa=b.stream.segmentIndex.Cb(c),b.aa&&b.aa.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.aa=b.stream.segmentIndex.Cb(d),e=b.aa&&b.aa.next().value);e||(b.aa=b.stream.segmentIndex.Cb(c),e=b.aa&&b.aa.next().value);return e}
352
- function yk(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:e=kc;f=b.stream;g=b.aa;b.ra=!0;D(z,2);if(2==d.Eb())throw new O(1,1,1011);return u(z,zk(a,b,d),4);case 4:lf(a.h);if(a.s)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&!d.l)return n=new Uint8Array(0),t=p=!1,v=function(B){var E,F,H;return G(function(I){if(p)return I.return();t=!0;lf(a.h);if(a.s)return I.return();n=Ak(n,B);E=!1;F=0;(new zf).box("mdat",
353
- function(J){F=J.size+J.start;E=!0}).parse(n,!1,!0);if(!E)return I.A(0);H=n.subarray(0,F);n=n.subarray(F);return u(I,Bk(a,b,c,f,d,H),0)})},u(z,Ck(a,b,d,v),11);l=Ck(a,b,d);return u(z,l,7);case 7:m=z.h;lf(a.h);if(a.s)return z.return();if(!d.l){z.A(8);break}return u(z,Dk(m,d,g),9);case 9:m=z.h;case 8:return lf(a.h),b.bb?(b.ra=!1,kk(a,b,0),z.return()):u(z,Bk(a,b,c,f,d,m),6);case 11:y=z.h;if(t){z.A(6);break}p=!0;lf(a.h);return a.s?z.return():b.bb?(b.ra=!1,kk(a,b,0),z.return()):u(z,Bk(a,b,c,f,d,y),6);case 6:lf(a.h);
354
- if(a.s)return z.return();b.pa=d;g.next();b.ra=!1;b.be=!1;w=a.g.R.Na();x=w[b.type];ab(JSON.stringify(x));b.bb||a.g.Wd(d.startTime,d.endTime,b.type);kk(a,b,0);ta(z,0);break;case 2:C=ua(z);lf(a.h,C);if(a.s)return z.return();b.ra=!1;if(7001==C.code)b.ra=!1,fk(b),kk(a,b,0),z.A(0);else if(b.type==e.X&&a.i.ignoreTextStreamFailures)a.j.delete(e.X),z.A(0);else if(3017==C.code)Ek(a,b,C),z.A(0);else return b.nc=!0,C.severity=2,u(z,vk(a,C),0)}})}
355
- function Dk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=M(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function Ak(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
356
- function Ek(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.be})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.nc=!0;a.s=!0;a.g.onError(c);return}b.be=!0}kk(a,b,4)}
357
- function zk(a,b,c){var d,e,f,g,h,k,l,m;return G(function(n){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Kd||e!=b.Jd||f!=b.Id)h=function(){var p;return G(function(t){if(1==t.g)return D(t,2),b.Jd=e,b.Id=f,b.Kd=g,u(t,ij(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return ta(t,0);p=ua(t);b.Jd=null;b.Id=null;b.Kd=null;throw p;})},d.push(h());!pi(c.h,b.Zc)&&(b.Zc=c.h)&&(k=Ck(a,b,c.h),l=function(){var p,t,v,y;return G(function(w){switch(w.g){case 1:return D(w,
358
- 2),u(w,k,4);case 4:return p=w.h,lf(a.h),t=new zf,t.box("moov",Ef).box("trak",Ef).box("mdia",Ef).P("mdhd",function(x){x=fi(x.reader||0,x.version||0);c.h.timescale=x.timescale}).parse(p),v=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(w,a.g.xe(b.type,p),5);case 5:return u(w,Xi(a.g.R,b.type,p,null,v),6);case 6:ta(w,0);break;case 2:throw y=ua(w),b.Zc=null,y;}})},a.g.fg(c.startTime,c.h),d.push(l()));a.m.sequenceMode&&(m=b.pa?b.pa.m:null,c.m!=m||b.Rd)&&(b.Rd=!1,d.push(jj(a.g.R,b.type,c.startTime)));
359
- return u(n,Promise.all(d),0)})}
360
- function Bk(a,b,c,d,e,f){var g,h,k,l,m,n;return G(function(p){switch(p.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.D;if(k||l)h=new zf;k&&h.P("emsg",function(t){var v=d.emsgSchemeIdUris;if(0===t.version){var y=t.reader.sc();var w=t.reader.sc();var x=t.reader.K();var C=t.reader.K();var z=t.reader.K();var B=t.reader.K();var E=e.startTime+C/x}else x=t.reader.K(),E=t.reader.$a()/x+e.timestampOffset,
361
- C=E-e.startTime,z=t.reader.K(),B=t.reader.K(),y=t.reader.sc(),w=t.reader.sc();t=t.reader.Za(t.reader.S.byteLength-t.reader.Z());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.gg():"https://aomedia.org/emsg/ID3"==y?(v=Ci(t),v.length&&e&&a.g.hg([{cueTime:e.startTime,data:t,frames:v,dts:e.startTime,pts:e.startTime}],0,e.endTime)):(v=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:y,value:w,timescale:x,presentationTimeDelta:C,eventDuration:z,id:B,messageData:t}),
362
- v=new S("emsg",v),a.g.onEvent(v))});l&&h.P("prft",function(t){a:{if(!a.D&&e.h.timescale){t.reader.K();var v=t.reader.K(),y=t.reader.K();v=1E3*v+y/Math.pow(2,32)*1E3;if(0===t.version)var w=t.reader.K();else try{w=t.reader.$a()}catch(x){a.D=!0;w=void 0;break a}t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.h.timescale*1E3)});w=new S("prft",w);a.g.onEvent(w);a.D=!0}w=void 0}return w});(k||l)&&h.parse(f);
363
- return u(p,Fk(a,b,c),2);case 2:return lf(a.h),m=b.vc,b.vc=!1,n=b.ve,b.ve=!1,u(p,a.g.xe(b.type,f),3);case 3:return u(p,Xi(a.g.R,b.type,f,e,g,m,n),4);case 4:lf(a.h),A(p)}})}function Fk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Ti(a.g.R,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.R.remove(b.type,e,e+g),2)}lf(a.h);A(h)})}
364
- function wk(a){return a&&a.type==jc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function Ck(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=jf,f=ck(c.ya(),c.Ba,c.ka,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof oi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.kb.request(e,f),b.ta=h,u(l,h.promise,2);k=l.h;b.ta=null;return l.return(k.data)})}
365
- function qk(a,b,c,d){var e,f;return G(function(g){if(1==g.g)return b.bb=!1,b.hd=!1,b.Nc=0,b.ac=!0,b.pa=null,b.Zc=null,b.aa=null,d?(e=a.g.Sc(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,hj(a.g.R,b.type),4);if(3!=g.g)return lf(a.h),c?u(g,a.g.R.flush(b.type),3):g.A(3);lf(a.h);b.ac=!1;b.endOfStream=!1;b.ra||b.Ka||kk(a,b,0);A(g)})}
366
- function kk(a,b,c){var d=b.type;if(d!=jc||a.j.has(d))b.Ka=(new nc(function(){var e;return G(function(f){if(1==f.g)return D(f,2),u(f,tk(a,b),4);if(2!=f.g)return ta(f,0);e=ua(f);if(a.g)a.g.onError(e);A(f)})})).N(c)}function fk(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function gk(a){return G(function(b){return a.ta?u(b,a.ta.abort(),0):b.A(0)})}function vk(a,b){return G(function(c){if(1==c.g)return u(c,Ke(a.F),2);lf(a.h);a.g.onError(b);b.handled||a.i.failureCallback(b);A(c)})};function Gk(a,b){var c=Hk(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Ik(d)});this.s=new kf(function(){return Jk(d)})}Gk.prototype.destroy=function(){return this.s.destroy()};function Jk(a){var b,c,d;return G(function(e){if(1==e.g)return a.h&&a.h.abort(),Kk(a),u(e,a.u,2);a.g&&a.g.Ia.mb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ia.mb();a.g=null;a.m=[];a.j=null;A(e)})}
367
- function Lk(a,b){var c={Jb:function(){},bd:function(){},mb:function(){},onError:function(){},dd:function(){},uh:function(){}};a.m.push({create:b,Ia:c});a.h&&a.h.abort();Kk(a);return c}
368
- function Ik(a){return G(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.hb)var c=!1;else{a.g&&(a.g.Ia.mb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ia.Jb(),a.g={node:d.node,payload:d.payload,hb:d.hb,Ia:c.Ia}):c.Ia.dd();c=!0}c?c=Promise.resolve():a.g?c=Mk(a):(a.j.eg(a.i),a.o=new lc,c=a.o);b=u(b,c,1)}return b})}
369
- function Mk(a){var b,c;return G(function(d){switch(d.g){case 1:return a.i=a.j.Mf(a.i,a.l,a.g.node,a.g.payload),D(d,2),a.h=a.j.yf(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.Ia.bd(),a.g=null);ta(d,0);break;case 2:b=ua(d);if(7001==b.code)a.g.Ia.mb();else a.g.Ia.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function Kk(a){a.o&&(a.o.resolve(),a.o=null)};function Nk(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(Nk).join(""):c+a.payload+b}
370
- function Ok(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)Ok(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=Nk(c);b.push(d)}return b};function Pk(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=Pk.prototype;q.remove=function(a,b){if(!this.g)return!1;Qk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
371
- q.append=function(a){var b=Ok(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=r(b);for(var e=b.next();!e.done;d={sb:d.sb},e=b.next())d.sb=e.value,a.some(function(f){return function(g){return g.startTime==f.sb.startTime&&g.endTime==f.sb.endTime&&g.text==f.sb.payload?!0:!1}}(d))||(e=Rk(d.sb))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
372
- c.indexOf(g)});a=r(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(Qk(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"};
373
- function Rk(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}
374
- function Qk(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",Pk);Pk.prototype.setTextVisibility=Pk.prototype.setTextVisibility;Pk.prototype.isTextVisible=Pk.prototype.isTextVisible;Pk.prototype.destroy=Pk.prototype.destroy;Pk.prototype.append=Pk.prototype.append;Pk.prototype.remove=Pk.prototype.remove;function Sk(){}function Tk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",Sk);Sk.removeAllChildren=Tk;function Uk(a,b){var c=this;this.j=!1;this.i=[];this.B=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.u=(new P(function(){Vk(c)})).Ca(.25);this.h=new Map;this.s=new mf;this.s.C(document,"fullscreenchange",function(){Vk(c,!0)});this.l=null;"ResizeObserver"in
375
- window&&(this.l=new ResizeObserver(function(){Vk(c,!0)}),this.l.observe(this.g));this.o=new Map}q=Uk.prototype;q.append=function(a){var b=[].concat(ha(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Cc:c.Cc},d=a.next())c.Cc=d.value,b.some(function(e){return function(f){return wb(f,e.Cc)}}(c))||this.i.push(c.Cc);Vk(this)};
376
- q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Vk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
377
- function Wk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
378
- function Xk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.ef:null;l&&(g.push(l.Bd),l.tc&&g.push(l.tc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Wk(a,n)||(f=!0):(Yk(a,k,e),l=a.h.get(k),n=l.ef,f=!0));0<k.nestedCues.length&&n&&Xk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,t){return p.startTime!=
379
- t.startTime?p.startTime-t.startTime:p.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.tc?(c.appendChild(d.tc),d.tc.appendChild(d.Bd)):c.appendChild(d.Bd)}}function Vk(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.o.values());for(var d=b.next();!d.done;d=b.next())Tk(d.value);Tk(a.g);a.h.clear();a.o.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));Xk(a,a.i,a.g,c,[])}}}
380
- function Yk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Zk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Db?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Db?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.heightUnits==Db?"%":"px",k=c.widthUnits==Db?"%":"px",l=c.viewportAnchorUnits==Db?"%":
284
+ function xi(){}function yi(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
285
+ function zi(a){var b={key:a.type,description:"",data:""};if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Bc(L(a.data,1,c));a=Bc(L(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;c=a.data.subarray(1).indexOf(0);if(-1===c)return null;d=Bc(L(a.data,1,c));a=Bc(L(a.data,2+c)).replace(/\0*$/,"");b.description=d;b.data=a;return b}if("PRIV"===a.type){if(2>
286
+ a.size)return null;d=a.data.indexOf(0);if(-1===d)return null;d=Bc(L(a.data,0,d));a=Hb(a.data.subarray(d.length+1));b.description=d;b.data=a;return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Bc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Bc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Hb(a.data),b):null}
287
+ function Ai(a){for(var b=0,c=[];b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9];){var d=yi(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=yi(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=zi(e))&&c.push(f);b+=e.size+10}b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]&&(b+=10)}return c}
288
+ K("shaka.util.Id3Utils",xi);xi.getID3Frames=Ai;function Bi(){this.o=null;this.s=!1;this.l=this.m=null;this.A=[];this.g=this.h=null;this.u=[];this.j=null;this.i=[]}
289
+ Bi.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Ci(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71===a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h===e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.o=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.o:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Fd:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&
290
+ 15)<<8|f[h+11]);h<k;){var l=(f[h+1]&31)<<8|f[h+2];switch(f[h]){case 15:-1===g.audio&&(g.audio=l,g.audioCodec="aac");break;case 21:-1===g.Fd&&(g.Fd=l);break;case 27:-1===g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1===g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1===g.video&&(g.video=l,g.videoCodec="hvc")}h+=((f[h+3]&15)<<8|f[h+4])+5}f=g;null==this.l&&(this.l=f.video);null==this.g&&(this.g=f.audio);null==this.j&&(this.j=f.Fd);d&&!this.s&&(d=!1,e=b-188);this.s=!0;break;case this.l:f=
291
+ a.subarray(h,e+188);null==this.m&&(h=Di(f))&&null!=h.pts&&(this.m=h.pts/9E4);this.A.push(f);break;case this.g:f=a.subarray(h,e+188);null==this.h&&(h=Di(f))&&null!=h.pts&&(this.h=h.pts/9E4);this.u.push(f);break;case this.j:this.i.push(a.subarray(h,e+188));break;default:d=!0}}return this};
292
+ function Di(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),xh:6+(a[4]<<8|a[5]),pts:null,dts:null},c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));b.data=a.subarray(9+a[8]);return b}
293
+ function Ei(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=Nc(a.i[d],c);var e=Di(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:Ai(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}Bi.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function Ci(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}K("shaka.util.TsParser",Bi);function Fi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Xa("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Xa("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Xa(LcevcDil.SupportObject.SupportError);"undefined"!==typeof LcevcDil&&"undefined"!==typeof libDPIModule&&this.h instanceof HTMLCanvasElement&&LcevcDil.SupportObject.SupportStatus&&!this.g&&LcevcDil.SupportObject.webGLSupport(this.h)&&
294
+ (this.h.classList.remove("shaka-hidden"),this.g=new LcevcDil.LcevcDil(this.j,this.h,this.l))}Fi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Gi(a,b){var c=Hi;switch(b.mimeType){case "video/webm":c=Ii;break;case "video/mp4":c=Ji}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}K("shaka.lcevc.Dil",Fi);Fi.prototype.release=Fi.prototype.release;var Hi=0,Ii=1,Ji=2;function Ki(a,b,c,d){var e=this;this.l=a;this.G=null;this.m=b;this.h={};this.L={};this.P={};this.g=null;this.H=!1;this.V=c||function(){};this.F=d||null;this.i={};this.u=new lf;this.o={};this.s=null;this.J=new kc;this.M="";this.j=Li(this,this.J);this.D=new jf(function(){return Mi(e)});this.A=!1;this.W=new kc}function Li(a,b){var c=new MediaSource;a.u.ia(c,"sourceopen",function(){URL.revokeObjectURL(a.M);b.resolve()});a.M=Ni(c);a.l.src=a.M;return c}q=Ki.prototype;q.destroy=function(){return this.D.destroy()};
295
+ function Mi(a){var b,c,d,e,f,g,h,k;return G(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p.catch(bc)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new O(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.u&&(a.u.release(),a.u=null);a.l&&(a.l.removeAttribute("src"),a.l.load(),a.l=null);a.G=null;a.j=null;a.g=null;a.m=null;a.h={};a.o={};a.s=null;
296
+ a.i={};a.F=null;B(l)})}
297
+ q.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,p;return G(function(n){if(1==n.g)return e=jc,u(n,d.J,2);d.A=c;f={};g=r(a.keys());for(h=g.next();!h.done;f={oa:f.oa},h=g.next())if(f.oa=h.value,k=a.get(f.oa),l=Yc(k.mimeType,k.codecs),f.oa==e.X)Oi(d,l,c);else{!b&&db(l)||!Sc(l,f.oa)||(d.o[f.oa]=new Rc(l),l=Vc(f.oa,l));m=l+d.G.sourceBufferExtraFeatures;kf(d.D);p=void 0;try{p=d.j.addSourceBuffer(m)}catch(t){throw new O(2,3,3015,t,"The mediaSource_ status was"+d.j.readyState+"expected 'open'");
298
+ }d.u.C(p,"error",function(t){return function(){d.i[t.oa][0].p.reject(new O(2,3,3014,d.l.error?d.l.error.code:0))}}(f));d.u.C(p,"updateend",function(t){return function(){return Pi(d,t.oa)}}(f));d.h[f.oa]=p;d.L[f.oa]=l;d.i[f.oa]=[];d.P[f.oa]=!!k.drmInfos.length}B(n)})};q.configure=function(a){this.G=a};
299
+ function Oi(a,b,c){a.g||(a.g=new cd(a.m));var d=a.g;a=a.H;"application/cea-608"==b||"application/cea-708"==b?d.i=null:(d.i=(0,ed[b])(),d.i.setSequenceMode?d.i.setSequenceMode(c):Xa('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Qi(a){return a.j?"ended"==a.j.readyState:!0}function Ri(a,b){return b==ic?a.g.g:ri(Si(a,b))}function Ti(a,b){return b==ic?a.g.h:si(Si(a,b))}function Ui(a,b,c){if(b==ic)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Si(a,b);return ui(a,c)}
300
+ q.Ma=function(){var a={total:vi(this.l.buffered),audio:vi(Si(this,"audio")),video:vi(Si(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Si(a,b){try{return a.h[b].buffered}catch(c){return null}}
301
+ function Vi(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,p,n,t,v,y,w,x,D,z,A,E,F,H,I,J,N,R,Q,ba;return G(function(M){switch(M.g){case 1:h=jc;if(b!=h.X){M.B(2);break}if(!a.A){M.B(3);break}return u(M,a.W,4);case 4:k=M.h,a.g.s=k;case 3:return u(M,fd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return M.return();case 2:l=L(c);m=a.L[b];a.o[b]&&(m=a.o[b].o);0>Ci(l)?Wi.includes(m)&&(v=Ai(l),v.length&&d&&(y={cueTime:d.startTime,data:l,frames:v,dts:d.startTime,pts:d.startTime},a.V([y],
302
+ 0,d.endTime))):(p=(new Bi).parse(l),n=d.startTime-(p.getStartTime()[b]||0),t=Ei(p),t.length&&a.V(t,n,d?d.endTime:null));if(!a.o[b]){e&&b==h.va&&(a.g||Oi(a,"application/cea-608",a.A),a.s||(a.s=new li(m)),d?(w=mi(a.s,c),w.length&&(x=a.h[h.va].timestampOffset,kd(a.g,w,d.startTime,d.endTime,x))):a.s.init(c));M.B(6);break}f&&a.o[b].g.resetCaptions();return u(M,Wc(a.o[b],c),7);case 7:D=M.h,a.g||Oi(a,"application/cea-608",a.A),D.captions&&D.captions.length&&(z=a.h[h.va].timestampOffset,A=id(D.captions),
303
+ kd(a.g,A,d?d.startTime:null,d?d.endTime:null,z)),c=D.data;case 6:c=Xi(a,c,d?d.startTime:null,b);E=a.h[b];F=Yi;if(!a.A||E.mode==F||!d){M.B(8);break}H=a.j.duration;I=b==h.va||!(h.va in a.h);if(!I){M.B(9);break}J=[E.appendWindowStart,E.appendWindowEnd];E.appendWindowStart=0;E.appendWindowEnd=Infinity;N=E.timestampOffset;E.timestampOffset=0;return u(M,Zi(a,b,function(){return $i(a,b,c)}),10);case 10:return u(M,Zi(a,b,function(){return aj(a,b)}),11);case 11:return E.timestampOffset=N,E.appendWindowStart=
304
+ J[0],E.appendWindowEnd=J[1],R=ri(Si(a,b)),Q=(d.startTime||0)-(R||0),a.W.resolve(Q),u(M,Zi(a,b,function(){return bj(a,b,0,H)}),12);case 12:if(b!=h.va){M.B(9);break}return u(M,Zi(a,b,function(){a.l.currentTime-=.001;Pi(a,b)}),9);case 9:return E.mode=F,u(M,a.Aa(H),8);case 8:return d&&a.A&&b!=h.X&&(f||g)&&(ba=d.startTime,Zi(a,b,function(){return aj(a,b)}),Zi(a,b,function(){return cj(a,b,ba)})),u(M,Zi(a,b,function(){$i(a,b,c)}),16);case 16:B(M)}})}function dj(a,b){var c=Ti(a,"video")||0;hd(a.g,b,c)}
305
+ function ej(a){a.g&&hd(a.g,"",0)}q.remove=function(a,b,c){var d=this,e;return G(function(f){e=jc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Zi(d,a,function(){return bj(d,a,b,c)}),0)})};function fj(a,b){var c;return G(function(d){c=jc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d.return():u(d,Zi(a,b,function(){return bj(a,b,0,a.j.duration)}),0)})}q.flush=function(a){var b=this,c;return G(function(d){c=jc;return a==c.X?d.return():u(d,Zi(b,a,function(){b.l.currentTime-=.001;Pi(b,a)}),0)})};
306
+ function gj(a,b,c,d,e,f){var g;return G(function(h){g=jc;return b==g.X?(f||(a.g.s=c),gd(a.g,d,e),h.return()):u(h,Promise.all([Zi(a,b,function(){return aj(a,b)}),f?Promise.resolve():Zi(a,b,function(){return cj(a,b,c)}),Zi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Pi(a,b)})]),0)})}function hj(a,b,c){var d;return G(function(e){d=jc;if(b==d.X)return e.return();Zi(a,b,function(){return aj(a,b)});return u(e,Zi(a,b,function(){return cj(a,b,c)}),0)})}
307
+ q.endOfStream=function(a){var b=this;return G(function(c){return u(c,ij(b,function(){Qi(b)||"closed"===b.j.readyState||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};q.Aa=function(a){var b=this;return G(function(c){return u(c,ij(b,function(){if(a<b.j.duration)for(var d in b.h){var e={start:function(){},p:new kc};b.i[d].unshift(e)}b.j.duration=a}),0)})};q.getDuration=function(){return this.j.duration};
308
+ function $i(a,b,c){if("video"==b&&a.F){var d=a.F;d.g&&d.g.appendBuffer(c,"video",d.i)}a.h[b].appendBuffer(c)}function bj(a,b,c,d){d<=c?Pi(a,b):a.h[b].remove(c,d)}function aj(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Pi(a,b)}function cj(a,b,c){0>c&&(c+=.001);a.h[b].timestampOffset=c;Pi(a,b)}function Pi(a,b){var c=a.i[b][0];c&&(c.p.resolve(),jj(a,b))}
309
+ function Zi(a,b,c){kf(a.D);c={start:c,p:new kc};a.i[b].push(c);1==a.i[b].length&&kj(a,b);return c.p}
310
+ function ij(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:kf(a.D);c=[];d={};for(e in a.h)d.Vb=new kc,f={start:function(l){return function(){return l.Vb.resolve()}}(d),p:d.Vb},a.i[e].push(f),c.push(d.Vb),1==a.i[e].length&&f.start(),d={Vb:d.Vb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=wa(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)jj(a,h)}B(k)}})}function jj(a,b){a.i[b].shift();kj(a,b)}
311
+ function kj(a,b){var c=a.i[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)),jj(a,b)}}function Xi(a,b,c,d){var e=a.P[d];null==c&&e&&(tc()||rc())&&"mp4"==a.L[d].split(";")[0].split("/")[1]&&(b=Wg(b));return b}var Ni=window.URL.createObjectURL,Yi="sequence",Wi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function U(a,b,c){this.i=a;this.m=b;this.o=this.j=Infinity;this.g=1;this.h=this.l=null;this.s=0;this.u=!0;this.A=0;this.D=void 0===c?!0:c;this.F=0;this.G=!1}q=U.prototype;q.getDuration=function(){return this.j};q.Lf=function(){return this.g};q.Ye=function(a){this.i=a};q.Aa=function(a){this.j=a};q.Qf=function(){return this.i};q.We=function(a){this.s=a};q.zc=function(a){this.u=a};q.ne=function(a){this.o=a};q.Xe=function(a){this.m=a};q.Ef=function(){return this.m};
312
+ q.Jb=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.s)/1E3;a=r(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.g=Math.max(this.g,e.endTime-e.startTime));this.Ud(b);this.h=Math.max(this.h,c);null!=this.i&&this.D&&!this.G&&(this.i=d-this.h-this.g)}};q.Nd=function(){this.G=!0};q.Ud=function(a){this.l=null==this.l?a:Math.min(this.l,a)};q.Td=function(a){this.g=Math.max(this.g,a)};
313
+ q.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};q.U=function(){return Infinity==this.j&&!this.u};q.jb=function(){return Infinity!=this.j&&!this.u};q.Oa=function(){return Math.max(this.A,this.gb()-this.o)};q.$e=function(a){this.A=a};q.gb=function(){return this.U()||this.jb()?Math.min(Math.max(0,(Date.now()+this.s)/1E3-this.g-this.i)+this.F,this.j):this.h?Math.min(this.h,this.j):this.j};
314
+ q.lc=function(a){var b=Math.max(this.l,this.A);return Infinity==this.o?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.gb()-this.o+a,this.Na()))};q.Eb=function(){return this.lc(0)};q.Na=function(){return Math.max(0,this.gb()-(this.U()||this.jb()?this.m:0))};q.ef=function(){return null==this.i||null!=this.h&&this.D?!1:!0};q.Ve=function(a){this.F=a};K("shaka.media.PresentationTimeline",U);U.prototype.setAvailabilityTimeOffset=U.prototype.Ve;U.prototype.usingPresentationStartTime=U.prototype.ef;
315
+ U.prototype.getSeekRangeEnd=U.prototype.Na;U.prototype.getSeekRangeStart=U.prototype.Eb;U.prototype.getSafeSeekRangeStart=U.prototype.lc;U.prototype.getSegmentAvailabilityEnd=U.prototype.gb;U.prototype.setUserSeekStart=U.prototype.$e;U.prototype.getSegmentAvailabilityStart=U.prototype.Oa;U.prototype.isInProgress=U.prototype.jb;U.prototype.isLive=U.prototype.U;U.prototype.offset=U.prototype.offset;U.prototype.notifyMaxSegmentDuration=U.prototype.Td;U.prototype.notifyMinSegmentStartTime=U.prototype.Ud;
316
+ U.prototype.lockStartTime=U.prototype.Nd;U.prototype.notifySegments=U.prototype.Jb;U.prototype.getDelay=U.prototype.Ef;U.prototype.setDelay=U.prototype.Xe;U.prototype.setSegmentAvailabilityDuration=U.prototype.ne;U.prototype.setStatic=U.prototype.zc;U.prototype.setClockOffset=U.prototype.We;U.prototype.getPresentationStartTime=U.prototype.Qf;U.prototype.setDuration=U.prototype.Aa;U.prototype.setPresentationStartTime=U.prototype.Ye;U.prototype.getMaxSegmentDuration=U.prototype.Lf;
317
+ U.prototype.getDuration=U.prototype.getDuration;function lj(a,b,c){this.l=c;this.j=a;this.s=mj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}lj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function nj(a,b){a.i=b}function oj(a){this.g=a}function mj(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=r(vi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function pj(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new lf;this.m=!1;this.A=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return qj(f)});this.j=(new P(function(){qj(f)})).Ca(.25)}pj.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.s=this.o=null};pj.prototype.Xd=function(){this.l=!0;qj(this)};
318
+ function qj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.A&&(a.A=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=mj(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new S("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.D.gapDetectionThreshold),null==
319
+ d||0==d&&!a.l||(e=c.start(d),e>=a.s.Na()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new S("gapjumped")))))}}};function rj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=sj.value().get(b),c.ia(a,b,d))}var sj=new lc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function tj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new lf;this.i=new uj(a);rj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){vj(d,d.j)})}tj.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 wj(a){return a.m?a.g.currentTime:a.j}function xj(a,b){0<a.g.readyState?yj(a.i,b):rj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){vj(a,a.j)})}
320
+ function vj(a,b){.001>Math.abs(a.g.currentTime-b)?zj(a):(a.h.ia(a.g,"seeking",function(){zj(a)}),yj(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function zj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function uj(a){var b=this;this.h=a;this.m=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--)})}uj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
321
+ function yj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Aj(a){this.g=a;this.j=!1;this.h=null;this.i=new lf}q=Aj.prototype;q.zd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.ia(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;rj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};q.Bd=function(a){this.h=this.j?this.h:a};q.Jc=function(){return(this.j?this.g.currentTime:this.h)||0};q.ve=function(){return 0};
322
+ q.ue=function(){return 0};q.Pe=function(){};
323
+ function Bj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.A=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=Cj(a,c,f);this.j=new pj(a,b.presentationTimeline,c,this.o,f);this.h=new tj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=wj(g.h);h=Dj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;xj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},Ej(this,d));this.m=new P(function(){if(0!=g.i.readyState&&!g.i.paused){var h=wj(g.h),k=g.g.Eb(),l=g.g.Na();3>
324
+ l-k&&(k=l-3);h<k&&(h=Dj(g,h),g.i.currentTime=h)}})}q=Bj.prototype;q.zd=function(){this.m.Ca(.25)};q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};q.Bd=function(a){xj(this.h,a)};q.Jc=function(){var a=wj(this.h);return 0<this.i.readyState&&!this.i.paused?Fj(this,a):a};q.ve=function(){return this.o?this.o.o:0};q.ue=function(){return this.j.u};
325
+ function Ej(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Eb():a.g.Na():0>b&&(b=a.g.Na()+b);return Gj(a,Fj(a,b))}q.Pe=function(){this.j.Xd()};function Gj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Dj(a,b){var c=Math.max(a.A,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Eb(),f=a.g.Na(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.lc(c),k=a.g.lc(d);c=a.g.lc(c+d);return b>=g?Gj(a,b):b>f?f:b<e?ti(a.i.buffered,k)?k:c:b>=h||ti(a.i.buffered,b)?b:c}
326
+ function Fj(a,b){var c=a.g.Eb();if(b<c)return c;a=a.g.Na();return b>a?a:b}function Cj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new lj(new oj(a),b.stallThreshold,c);nj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Hj(a){this.g=a;this.h=null;this.i=0;this.j=!1}q=Hj.prototype;q.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};q.eg=function(){this.j=!0};function Ij(a,b){a=r(a.g);for(var c=a.next();!c.done;c=a.next())b(c.value)}q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};
327
+ q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.j)for(var b=r(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};q.qc=function(a){if(!this.j&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,ia(a))}};
328
+ q.Ib=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.qc(a);this.eb(b)};q.eb=function(a){if(!this.j){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
329
+ q.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.j){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],this.g[this.g.length-1]=new T(a.startTime,b,a.A,a.Ba,a.ma,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.s,a.g,a.status,a.m),this.g[this.g.length-1].j=a.j)}};
330
+ q.gd=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new P(function(){var d=b();d?c.g.push.apply(c.g,ia(d)):(c.h.stop(),c.h=null)}),this.h.Ca(a))};Hj.prototype[Symbol.iterator]=function(){return this.Db(0)};Hj.prototype.Db=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.i.length)for(var e=c.i.length-1;0<=e;--e){var f=c.i[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Jj(this,b,d)};
331
+ function Kj(a,b,c){return new Hj([new T(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",Hj);Hj.forSingleSegment=Kj;Hj.prototype.getIteratorForTime=Hj.prototype.Db;Hj.prototype.updateEvery=Hj.prototype.gd;Hj.prototype.fit=Hj.prototype.Xa;Hj.prototype.evict=Hj.prototype.eb;Hj.prototype.mergeAndEvict=Hj.prototype.Ib;Hj.prototype.offset=Hj.prototype.offset;Hj.prototype.get=Hj.prototype.get;Hj.prototype.find=Hj.prototype.find;Hj.prototype.markImmutable=Hj.prototype.eg;
332
+ Hj.prototype.release=Hj.prototype.release;function Jj(a,b,c){this.i=a;this.g=b;this.h=c}Jj.prototype.wf=function(){return this.g};Jj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.ya().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
333
+ Jj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.ya().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};K("shaka.media.SegmentIterator",Jj);Jj.prototype.next=Jj.prototype.next;Jj.prototype.current=Jj.prototype.current;Jj.prototype.currentPosition=Jj.prototype.wf;function Lj(){Hj.call(this,[]);this.l=[]}qa(Lj,Hj);q=Lj.prototype;q.clone=function(){var a=new Lj;a.l=this.l.slice();return a};
334
+ q.release=function(){for(var a=r(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};q.find=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.i+d.g.length}return null};q.get=function(a){for(var b=0,c=r(this.l),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.i+d.g.length}return null};q.offset=function(){};q.qc=function(){};q.eb=function(){};q.Ib=function(){};q.Xa=function(){};q.gd=function(){};
335
+ K("shaka.media.MetaSegmentIndex",Lj);Lj.prototype.updateEvery=Lj.prototype.gd;Lj.prototype.fit=Lj.prototype.Xa;Lj.prototype.mergeAndEvict=Lj.prototype.Ib;Lj.prototype.evict=Lj.prototype.eb;Lj.prototype.merge=Lj.prototype.qc;Lj.prototype.offset=Lj.prototype.offset;Lj.prototype.get=Lj.prototype.get;Lj.prototype.find=Lj.prototype.find;Lj.prototype.release=Lj.prototype.release;function Mj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Uc();this.h=new P(function(){b.g.Oe(.25*b.i)})}Mj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Mj.prototype.set=function(a){this.i=a;Nj(this)};Mj.prototype.Qc=function(){return this.g.Qc()};function Nj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Uc()!=b&&a.g.me(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Uc()&&a.g.me(0)};function Oj(a){var b=this;this.h=a;this.g=new Set;this.i=(new P(function(){Pj(b,!1)})).Ca(.25)}Oj.prototype.release=function(){this.i.stop();for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Pj(a,b){for(var c=r(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Qj(a){Te.call(this);this.g=new Map;this.h=a}qa(Qj,Te);Qj.prototype.release=function(){this.g.clear();Te.prototype.release.call(this)};function Rj(a,b){var c=a.g.get(b);c||(c={sc:[],Be:null,contentType:b},a.g.set(b,c));return c}function Sj(a,b,c){var d=Rj(a,b.contentType);Tj(a,d);a={Pd:b,position:c};d=d.sc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
336
+ Qj.prototype.j=function(a){for(var b=r(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.sc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Pd;break a}}d=null}if(e=d)e=c.Be,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
337
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.Be=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Tj(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.sc;b.sc=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.sc=[]};function Uj(a){Te.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new P(function(){for(var c=b.i(),d=r(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g.delete(e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}qa(Uj,Te);Uj.prototype.release=function(){this.g.clear();this.h.stop();Te.prototype.release.call(this)};function Vj(a){Te.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{sb:null,rb:Wj,ib:function(c,d){return Xj(b,"enter",c,d)}},{sb:Yj,rb:Wj,ib:function(c,d){return Xj(b,"enter",c,d)}},{sb:Zj,rb:Wj,ib:function(c,d){return Xj(b,"enter",c,d)}},{sb:Wj,rb:Yj,ib:function(c,d){return Xj(b,"exit",c,d)}},{sb:Wj,rb:Zj,ib:function(c,d){return Xj(b,"exit",c,d)}},{sb:Yj,rb:Zj,ib:function(c,d){return Xj(b,"skip",c,d)}},{sb:Zj,rb:Yj,ib:function(c,d){return Xj(b,"skip",c,d)}}];this.h=new lf;this.h.C(this.i,"regionremove",
338
+ function(c){b.g.delete(c.region)})}qa(Vj,Te);Vj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Te.prototype.release.call(this)};Vj.prototype.j=function(a,b){for(var c=r(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Yj:a>d.endTime?Zj:Wj;this.g.set(d,f);for(var g=r(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.sb==e&&h.rb==f&&h.ib(d,b)}};
339
+ function Xj(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Yj=1,Wj=2,Zj=3;function ak(a,b,c,d,e){a=bf(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function bk(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.l=null;this.F=0;this.D=!1;this.j=new Map;this.A=!1;this.G=null;this.s=!1;this.h=new jf(function(){return ck(c)})}q=bk.prototype;q.destroy=function(){return this.h.destroy()};function ck(a){var b,c,d,e;return G(function(f){if(1==f.g){b=[];c=r(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,dk(e),b.push(ek(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;B(f)})}
340
+ q.configure=function(a){this.i=a;this.G=new He({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};q.start=function(){var a=this;return G(function(b){if(1==b.g)return u(b,fk(a),2);kf(a.h);a.A=!0;B(b)})};
341
+ function gk(a,b){var c,d,e,f,g,h,k;G(function(l){switch(l.g){case 1:return c=jc,a.F++,d=a.F,C(l,2),u(l,fj(a.g.N,c.X),4);case 4:va(l,3);break;case 2:if(e=wa(l),a.g)a.g.onError(e);case 3:f=Yc(b.mimeType,b.codecs),Oi(a.g.N,f,a.m.sequenceMode),g=a.g.N.m,(h=g.isTextVisible()||a.i.alwaysStreamText)&&a.F==d&&(k=hk(b),a.j.set(c.X,k),ik(a,k,0)),B(l)}})}function jk(a){var b=a.j.get(ic);b&&(dk(b),ek(b).catch(function(){}),a.j.delete(ic));a.o=null}
342
+ function kk(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b)(b=d.trickModeVideo)&&!c.pb&&(lk(a,b,!1,0,!1),c.pb=d);else if(d=c.pb)c.pb=null,lk(a,d,!0,0,!1)}}function mk(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.A&&(b.video&&lk(a,b.video,c,d,e,f),b.audio&&lk(a,b.audio,c,d,e,f))}function nk(a,b){G(function(c){if(1==c.g)return a.o=b,a.A?b.segmentIndex?c.B(2):u(c,b.createSegmentIndex(),2):c.return();lk(a,b,!0,0,!1);B(c)})}
343
+ function lk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=ic?g&&(g.pb&&(b.trickModeVideo?(g.pb=b,b=b.trickModeVideo):g.pb=null),g.stream!=b||e)&&(b.type==ic&&Oi(a.g.N,Yc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.Y=null,g.we=!!f,c&&(g.bc?g.jd=!0:g.sa?(g.bb=!0,g.Oc=d,g.jd=!0):(dk(g),ok(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)}))),pk(a,g).catch(function(h){if(a.g)a.g.onError(h)})):gk(a,b)}
344
+ function pk(a,b){var c,d;return G(function(e){if(1==e.g){if(!b.ua)return e.return();c=b.stream;d=b.ua;return c.segmentIndex?e.B(2):u(e,c.createSegmentIndex(),2)}if(b.ua!=d||b.stream!=c)return e.return();var f=a.g.Tc();var g=Ti(a.g.N,b.type),h=b.stream.segmentIndex.find(b.qa?b.qa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ma?k.ma-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ma?k.ma-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
345
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.ua.h.g>h?!0:!1):f=!1;f&&b.ua.abort();B(e)})}
346
+ q.wc=function(){if(this.g)for(var a=this.g.Tc(),b=r(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);var e=null;c.Y&&(e=c.Y.current());if(!e||e.startTime>a||e.endTime<a)c.Y=null;e=this.g.N;d==ic?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Si(e,d),e=ti(e,a));if(!e){(null!=Ti(this.g.N,d)||c.sa)&&qk(this,c);c.ua&&(c.ua.abort(),c.ua=null);if(d===ic&&(d=this.g.N,d.s))for(d=d.s.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,Xh(d),d=r(d.j.values()),e=d.next();!e.done;e=
347
+ d.next())Sh(e.value);c.wc=!0}}};function qk(a,b){b.bc||b.bb||(b.sa?(b.bb=!0,b.Oc=0):null==Ri(a.g.N,b.type)?null==b.Ka&&ik(a,b,0):(dk(b),ok(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
348
+ function fk(a){var b,c,d,e,f,g,h,k,l,m;return G(function(p){if(1==p.g){b=jc;if(!a.l)throw new O(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Ic,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.va,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.N;f=a.i.forceTransmux;return u(p,e.init(c,f,a.m.sequenceMode),2)}kf(a.h);a.updateDuration();g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=hk(l),a.j.set(k,m),ik(a,m,0));B(p)})}
349
+ function hk(a){return{stream:a,type:a.type,Y:null,qa:null,$c:null,Ld:null,Kd:null,Jd:null,pb:null,endOfStream:!1,sa:!1,Ka:null,bb:!1,Oc:0,jd:!1,bc:!1,wc:!0,Sd:!1,ce:!1,oc:!1,ua:null}}q.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.N.Aa(a):this.g.N.Aa(Math.pow(2,32))};
350
+ function rk(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:kf(a.h);if(b.sa||null==b.Ka||b.bc)return h.return();b.Ka=null;if(!b.bb){h.B(2);break}return u(h,ok(a,b,b.jd,b.Oc),3);case 3:return h.return();case 2:if(b.stream.segmentIndex){h.B(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.sa||b.Ka||ik(a,b,0),h.return();case 4:C(h,6);d=sk(a,b);null!=d&&(ik(a,b,d),b.oc=!1);va(h,7);break;case 6:return e=
351
+ wa(h),u(h,tk(a,e),8);case 8:return h.return();case 7:f=Array.from(a.j.values());if(!a.A||!f.every(function(k){return k.endOfStream})){h.B(0);break}return u(h,a.g.N.endOfStream(),10);case 10:kf(a.h),g=a.g.N.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Aa(g),B(h)}})}
352
+ function sk(a,b){if(uk(b))return dj(a.g.N,b.stream.originalId||""),null;b.type==ic&&ej(a.g.N);var c=a.g.Tc(),d=b.qa?b.qa.endTime:c,e=Ui(a.g.N,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Ti(a.g.N,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(a=a.j.get(ic))&&uk(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=vk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
353
+ f=Infinity;g=Array.from(a.j.values());g=r(g);for(h=g.next();!h.done;h=g.next())h=h.value,uk(h)||h.Y&&!h.Y.current()||(f=Math.min(f,h.qa?h.qa.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;wk(a,b,c,e).catch(function(){});return null}
354
+ function vk(a,b,c,d){if(b.Y)return b.Y.current();if(b.qa||d)return c=b.qa?b.qa.endTime:d,b.Sd=!0,b.Y=b.stream.segmentIndex.Db(c),b.Y&&b.Y.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.Y=b.stream.segmentIndex.Db(d),e=b.Y&&b.Y.next().value);e||(b.Y=b.stream.segmentIndex.Db(c),e=b.Y&&b.Y.next().value);return e}
355
+ function wk(a,b,c,d){var e,f,g,h,k,l,m,p,n,t,v,y,w,x,D;return G(function(z){switch(z.g){case 1:e=jc;f=b.stream;g=b.Y;b.sa=!0;C(z,2);if(2==d.Fb())throw new O(1,1,1011);return u(z,xk(a,b,d),4);case 4:kf(a.h);if(a.s)return z.return();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h&&!d.m)return p=new Uint8Array(0),t=n=!1,v=function(A){var E,F,H;return G(function(I){if(n)return I.return();t=!0;kf(a.h);if(a.s)return I.return();p=yk(p,A);E=!1;F=0;(new yf).box("mdat",
356
+ function(J){F=J.size+J.start;E=!0}).parse(p,!1,!0);if(!E)return I.B(0);H=p.subarray(0,F);p=p.subarray(F);return u(I,zk(a,b,c,f,d,H),0)})},u(z,Ak(a,b,d,v),11);l=Ak(a,b,d);return u(z,l,7);case 7:m=z.h;kf(a.h);if(a.s)return z.return();if(!d.m){z.B(8);break}return u(z,Bk(m,d,g),9);case 9:m=z.h;case 8:return kf(a.h),b.bb?(b.sa=!1,ik(a,b,0),z.return()):u(z,zk(a,b,c,f,d,m),6);case 11:y=z.h;if(t){z.B(6);break}n=!0;kf(a.h);return a.s?z.return():b.bb?(b.sa=!1,ik(a,b,0),z.return()):u(z,zk(a,b,c,f,d,y),6);case 6:kf(a.h);
357
+ if(a.s)return z.return();b.qa=d;g.next();b.sa=!1;b.ce=!1;w=a.g.N.Ma();x=w[b.type];bb(JSON.stringify(x));b.bb||a.g.Xd(d.startTime,d.endTime,b.type);ik(a,b,0);va(z,0);break;case 2:D=wa(z);kf(a.h,D);if(a.s)return z.return();b.sa=!1;if(7001==D.code)b.sa=!1,dk(b),ik(a,b,0),z.B(0);else if(b.type==e.X&&a.i.ignoreTextStreamFailures)a.j.delete(e.X),z.B(0);else if(3017==D.code)Ck(a,b,D),z.B(0);else return b.oc=!0,D.severity=2,u(z,tk(a,D),0)}})}
358
+ function Bk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return d=b.m,d.cryptoKey?h.B(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=L(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h.return(window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function yk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
359
+ function Ck(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.ce})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.oc=!0;a.s=!0;a.g.onError(c);return}b.ce=!0}ik(a,b,4)}
360
+ function xk(a,b,c){var d,e,f,g,h,k,l,m;return G(function(p){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Ld||e!=b.Kd||f!=b.Jd)h=function(){var n;return G(function(t){if(1==t.g)return C(t,2),b.Kd=e,b.Jd=f,b.Ld=g,u(t,gj(a.g.N,b.type,g,e,f,a.m.sequenceMode),4);if(2!=t.g)return va(t,0);n=wa(t);b.Kd=null;b.Jd=null;b.Ld=null;throw n;})},d.push(h());!oi(c.h,b.$c)&&(b.$c=c.h)&&(k=Ak(a,b,c.h),l=function(){var n,t,v,y;return G(function(w){switch(w.g){case 1:return C(w,
361
+ 2),u(w,k,4);case 4:return n=w.h,kf(a.h),t=new yf,t.box("moov",Df).box("trak",Df).box("mdia",Df).R("mdhd",function(x){x=ei(x.reader||0,x.version||0);c.h.timescale=x.timescale}).parse(n),v=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(w,a.g.ye(b.type,n),5);case 5:return u(w,Vi(a.g.N,b.type,n,null,v),6);case 6:va(w,0);break;case 2:throw y=wa(w),b.$c=null,y;}})},a.g.hg(c.startTime,c.h),d.push(l()));m=b.qa?b.qa.j:null;if(a.m.sequenceMode){if(c.j!=m||b.Sd)b.Sd=!1,d.push(hj(a.g.N,b.type,c.startTime))}else c.j!=
362
+ m&&d.push(hj(a.g.N,b.type,c.timestampOffset));return u(p,Promise.all(d),0)})}
363
+ function zk(a,b,c,d,e,f){var g,h,k,l,m,p;return G(function(n){switch(n.g){case 1:g=d.closedCaptions&&0<d.closedCaptions.size;k=null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes;l=a.i.parsePrftBox&&!a.D;if(k||l)h=new yf;k&&h.R("emsg",function(t){var v=d.emsgSchemeIdUris;if(0===t.version){var y=t.reader.tc();var w=t.reader.tc();var x=t.reader.K();var D=t.reader.K();var z=t.reader.K();var A=t.reader.K();var E=e.startTime+D/x}else x=t.reader.K(),E=t.reader.$a()/x+e.timestampOffset,
364
+ D=E-e.startTime,z=t.reader.K(),A=t.reader.K(),y=t.reader.tc(),w=t.reader.tc();t=t.reader.Za(t.reader.S.byteLength-t.reader.$());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.ig():"https://aomedia.org/emsg/ID3"==y?(v=Ai(t),v.length&&e&&a.g.jg([{cueTime:e.startTime,data:t,frames:v,dts:e.startTime,pts:e.startTime}],0,e.endTime)):(v=(new Map).set("detail",{startTime:E,endTime:E+z/x,schemeIdUri:y,value:w,timescale:x,presentationTimeDelta:D,eventDuration:z,id:A,messageData:t}),
365
+ v=new S("emsg",v),a.g.onEvent(v))});l&&h.R("prft",function(t){a:{if(!a.D&&e.h.timescale){t.reader.K();var v=t.reader.K(),y=t.reader.K();v=1E3*v+y/Math.pow(2,32)*1E3;if(0===t.version)var w=t.reader.K();else try{w=t.reader.$a()}catch(x){a.D=!0;w=void 0;break a}t=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();w=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-w/e.h.timescale*1E3)});w=new S("prft",w);a.g.onEvent(w);a.D=!0}w=void 0}return w});(k||l)&&h.parse(f);
366
+ return u(n,Dk(a,b,c),2);case 2:return kf(a.h),m=b.wc,b.wc=!1,p=b.we,b.we=!1,u(n,a.g.ye(b.type,f),3);case 3:return u(n,Vi(a.g.N,b.type,f,e,g,m,p),4);case 4:kf(a.h),B(n)}})}function Dk(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=Ri(a.g.N,b.type);if(null==e)return h.return();f=c-e;g=f-d;return.01>=g?h.return():u(h,a.g.N.remove(b.type,e,e+g),2)}kf(a.h);B(h)})}
367
+ function uk(a){return a&&a.type==ic&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function Ak(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=hf,f=ak(c.ya(),c.Ba,c.ma,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof ni,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.lb.request(e,f),b.ua=h,u(l,h.promise,2);k=l.h;b.ua=null;return l.return(k.data)})}
368
+ function ok(a,b,c,d){var e,f;return G(function(g){if(1==g.g)return b.bb=!1,b.jd=!1,b.Oc=0,b.bc=!0,b.qa=null,b.$c=null,b.Y=null,d?(e=a.g.Tc(),f=a.g.N.getDuration(),u(g,a.g.N.remove(b.type,e+d,f),3)):u(g,fj(a.g.N,b.type),4);if(3!=g.g)return kf(a.h),c?u(g,a.g.N.flush(b.type),3):g.B(3);kf(a.h);b.bc=!1;b.endOfStream=!1;b.sa||b.Ka||ik(a,b,0);B(g)})}
369
+ function ik(a,b,c){var d=b.type;if(d!=ic||a.j.has(d))b.Ka=(new mc(function(){var e;return G(function(f){if(1==f.g)return C(f,2),u(f,rk(a,b),4);if(2!=f.g)return va(f,0);e=wa(f);if(a.g)a.g.onError(e);B(f)})})).O(c)}function dk(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function ek(a){return G(function(b){return a.ua?u(b,a.ua.abort(),0):b.B(0)})}function tk(a,b){return G(function(c){if(1==c.g)return u(c,Je(a.G),2);kf(a.h);a.g.onError(b);b.handled||a.i.failureCallback(b);B(c)})};function Ek(a,b){var c=Fk(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Gk(d)});this.s=new jf(function(){return Hk(d)})}Ek.prototype.destroy=function(){return this.s.destroy()};function Hk(a){var b,c,d;return G(function(e){if(1==e.g)return a.h&&a.h.abort(),Ik(a),u(e,a.u,2);a.g&&a.g.Ia.nb();b=r(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ia.nb();a.g=null;a.m=[];a.j=null;B(e)})}
370
+ function Jk(a,b){var c={Kb:function(){},cd:function(){},nb:function(){},onError:function(){},ed:function(){},wh:function(){}};a.m.push({create:b,Ia:c});a.h&&a.h.abort();Ik(a);return c}
371
+ function Gk(a){return G(function(b){if(a.s.g)b=b.B(0);else{if(0==a.m.length||a.g&&!a.g.hb)var c=!1;else{a.g&&(a.g.Ia.nb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ia.Kb(),a.g={node:d.node,payload:d.payload,hb:d.hb,Ia:c.Ia}):c.Ia.ed();c=!0}c?c=Promise.resolve():a.g?c=Kk(a):(a.j.gg(a.i),a.o=new kc,c=a.o);b=u(b,c,1)}return b})}
372
+ function Kk(a){var b,c;return G(function(d){switch(d.g){case 1:return a.i=a.j.Nf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.zf(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.Ia.cd(),a.g=null);va(d,0);break;case 2:b=wa(d);if(7001==b.code)a.g.Ia.nb();else a.g.Ia.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,B(d)}})}function Ik(a){a.o&&(a.o.resolve(),a.o=null)};function Lk(a){var b=[],c=700<=a.fontWeight,d="italic"==a.fontStyle,e=a.textDecoration.includes("underline");c&&b.push("b");d&&b.push("i");e&&b.push("u");c=b.reduce(function(f,g){return f+"<"+g+">"},"");b=b.reduceRight(function(f,g){return f+"</"+g+">"},"");return a.lineBreak?"\n":a.nestedCues.length?a.nestedCues.map(Lk).join(""):c+a.payload+b}
373
+ function Mk(a,b){a=r(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.isContainer)Mk(c.nestedCues,b);else{var d=c.clone();d.nestedCues=[];d.payload=Lk(c);b.push(d)}return b};function Nk(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=Nk.prototype;q.remove=function(a,b){if(!this.g)return!1;Ok(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
374
+ q.append=function(a){var b=Mk(a,[]),c=[];a=this.g.cues?Array.from(this.g.cues):[];var d={};b=r(b);for(var e=b.next();!e.done;d={ub:d.ub},e=b.next())d.ub=e.value,a.some(function(f){return function(g){return g.startTime==f.ub.startTime&&g.endTime==f.ub.endTime&&g.text==f.ub.payload?!0:!1}}(d))||(e=Pk(d.ub))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-
375
+ c.indexOf(g)});a=r(a);for(d=a.next();!d.done;d=a.next())this.g.addCue(d.value)};q.destroy=function(){this.g&&(Ok(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"};
376
+ function Pk(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}
377
+ function Ok(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",Nk);Nk.prototype.setTextVisibility=Nk.prototype.setTextVisibility;Nk.prototype.isTextVisible=Nk.prototype.isTextVisible;Nk.prototype.destroy=Nk.prototype.destroy;Nk.prototype.append=Nk.prototype.append;Nk.prototype.remove=Nk.prototype.remove;function Qk(){}function Rk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",Qk);Qk.removeAllChildren=Rk;function Sk(a,b){var c=this;this.j=!1;this.i=[];this.A=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.u=(new P(function(){Tk(c)})).Ca(.25);this.h=new Map;this.s=new lf;this.s.C(document,"fullscreenchange",function(){Tk(c,!0)});this.l=null;"ResizeObserver"in
378
+ window&&(this.l=new ResizeObserver(function(){Tk(c,!0)}),this.l.observe(this.g));this.o=new Map}q=Sk.prototype;q.append=function(a){var b=[].concat(ia(this.i)),c={};a=r(a);for(var d=a.next();!d.done;c={Dc:c.Dc},d=a.next())c.Dc=d.value,b.some(function(e){return function(f){return vb(f,e.Dc)}}(c))||this.i.push(c.Dc);Tk(this)};
379
+ q.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};q.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Tk(this,c>this.i.length);return!0};q.isTextVisible=function(){return this.j};q.setTextVisibility=function(a){this.j=a};
380
+ function Uk(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
381
+ function Vk(a,b,c,d,e){var f=!1,g=[],h=[];b=r(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.ff:null;l&&(g.push(l.Cd),l.uc&&g.push(l.uc),m||(f=!0,a.h.delete(k),l=null));m&&(h.push(k),l?Uk(a,p)||(f=!0):(Wk(a,k,e),l=a.h.get(k),p=l.ff,f=!0));0<k.nestedCues.length&&p&&Vk(a,k.nestedCues,p,d,e);e.pop()}if(f){d=r(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(n,t){return n.startTime!=
382
+ t.startTime?n.startTime-t.startTime:n.endTime-t.endTime});h=r(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.uc?(c.appendChild(d.uc),d.uc.appendChild(d.Cd)):c.appendChild(d.Cd)}}function Tk(a,b){if(a.g){var c=a.A.currentTime;if(!a.j||(void 0===b?0:b)){b=r(a.o.values());for(var d=b.next();!d.done;d=b.next())Rk(d.value);Rk(a.g);a.h.clear();a.o.clear()}if(a.j){b=new Map;d=r(a.h.keys());for(var e=d.next();!e.done;e=d.next())e=e.value,b.set(e,a.h.get(e));Vk(a,a.i,a.g,c,[])}}}
383
+ function Wk(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Xk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,e=c.id+"_"+c.width+"x"+c.height+(c.heightUnits==Cb?"%":"px")+"-"+c.viewportAnchorX+"x"+c.viewportAnchorY+(c.viewportAnchorUnits==Cb?"%":"px"),a.o.has(e))c=a.o.get(e);else{var g=document.createElement("span"),h=c.heightUnits==Cb?"%":"px",k=c.widthUnits==Cb?"%":"px",l=c.viewportAnchorUnits==Cb?"%":
381
384
  "px";g.id="shaka-text-region---"+e;g.classList.add("shaka-text-region");g.style.height=c.height+h;g.style.width=c.width+k;g.style.position="absolute";g.style.top=c.viewportAnchorY+l;g.style.left=c.viewportAnchorX+l;g.style.display="flex";g.style.flexDirection="column";g.style.alignItems="center";g.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(e,g);c=g}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=
382
- b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Bd:f,ef:e,tc:c})}
383
- function Zk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=$k(c.linePadding,c,a.m);f.paddingRight=$k(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
384
- "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=al(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=
385
- "before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=$k(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==qb?(f.width="100%",c.lineAlign==sb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==sb?f.left=c.line+
386
- "%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==sb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==qb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
387
- f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==qb?f.width=c.size+"%":f.height=c.size+"%")}function $k(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
388
- function al(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",Uk);Uk.prototype.setTextVisibility=Uk.prototype.setTextVisibility;Uk.prototype.isTextVisible=Uk.prototype.isTextVisible;Uk.prototype.remove=Uk.prototype.remove;Uk.prototype.destroy=Uk.prototype.destroy;Uk.prototype.append=Uk.prototype.append;function bl(a,b){function c(f){for(var g=f,h=r(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Ok(a,[]);a="WEBVTT\n\n";d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
389
- break;case "right":g.push("align:right");break;case ob:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}K("shaka.text.WebVttGenerator",function(){});function cl(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function dl(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?el:fl};d.ot=gl(c);var e=d.ot===hl||d.ot===il||d.ot===jl||d.ot===kl;e&&(d.bl=ll(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==kl&&(d.tb=ml(a,d.ot)/1E3);nl(a,b,d)}}catch(f){Xa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
390
- function ol(a,b,c){try{if(!a.g.enabled)return b;var d=pl(a);a:{switch(c){case "video/webm":case "video/mp4":var e=jl;break a;case "application/x-mpegurl":e=ql;break a}e=void 0}d.ot=e;d.su=!0;var f=rl(d);return sl(b,f)}catch(g){return Xa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function pl(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
391
- function nl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,pl(a));c.pr=a.h.Rc();var e=c.ot===hl||c.ot===jl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=tl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=rl(c);f&&(b.uris=b.uris.map(function(g){return sl(g,f)}))}}}
392
- function gl(a){var b=a.type;if(a.init)return ul;if("video"==b)return a.codecs.includes(",")?jl:hl;if("audio"==b)return il;if("text"==b)return"application/mp4"===a.mimeType?kl:vl}function ll(a,b){b=a.h.Na()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
393
- function ml(a,b){var c=a.h.Xa();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case hl:return a.videoBandwidth||NaN;case il:return a.audioBandwidth||NaN;default:return a.bandwidth}}
394
- function rl(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
395
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function tl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=rl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
396
- function sl(a,b){if(!b||a.includes("offline:"))return a;a=new Nb(a);a.g.set("CMCD",b);return a.toString()}var ql="m",il="a",hl="v",jl="av",ul="i",vl="c",kl="tt",fl="v",el="l";K("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",dh:"s",Yg:"o"});function wl(){}
397
- function xl(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]=Ve(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ve(l)),k=xl(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?(Va("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Wa("Unexpected number of arguments for "+k),a[h]=b[h]):(Va("Invalid config, unrecognized key "+
398
- k),g=!1)}return g}function yl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function zl(a,b){return a&&b}K("shaka.util.ConfigUtils",wl);wl.convertToConfigObject=yl;wl.mergeConfigObjects=xl;function Al(){}function Bl(a){a=Fc(a);return(new Nb(a)).Ha}function Cl(a,b,c){function d(h){Lb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(M(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Hc(b,!0):e=b;a=Fc(a);a=Hc(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",Al);
399
- Al.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Cc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Ib(Lc(c)))}};Al.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Al.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
400
- Al.verimatrixFairPlayRequest=function(a,b){2===a&&(a=M(b.body),a=Kc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Gc("spc="+a))};Al.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Fc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Cl(a,d,b)};
401
- Al.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Fc(a).split(";").pop();return Cl(a,c,b)};Al.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Fc(a).split("skd://").pop();return Cl(a,c,b)};Al.initDataTransform=Cl;Al.defaultGetContentId=Bl;
402
- Al.isFairPlaySupported=function(){var a;return G(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},D(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);ua(b);return b.return(!1)})};function Dl(){}
403
- function El(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Je(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=Bl(g),g=Cl(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:sc()},c={retryParameters:Je(),availabilityWindowOverride:NaN,disableAudio:!1,
385
+ b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.h.set(b,{Cd:f,ff:e,uc:c})}
386
+ function Xk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Yk(c.linePadding,c,a.m);f.paddingRight=Yk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
387
+ "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Zk(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=
388
+ "before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Yk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",c.writingMode==ob?(f.width="100%",c.lineAlign==rb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==rb?f.left=c.line+
389
+ "%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==rb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==ob?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
390
+ f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==ob?f.width=c.size+"%":f.height=c.size+"%")}function Yk(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
391
+ function Zk(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",Sk);Sk.prototype.setTextVisibility=Sk.prototype.setTextVisibility;Sk.prototype.isTextVisible=Sk.prototype.isTextVisible;Sk.prototype.remove=Sk.prototype.remove;Sk.prototype.destroy=Sk.prototype.destroy;Sk.prototype.append=Sk.prototype.append;function $k(a,b){function c(f){for(var g=f,h=r(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Mk(a,[]);a="WEBVTT\n\n";d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
392
+ break;case "right":g.push("align:right");break;case nb:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}K("shaka.text.WebVttGenerator",function(){});function al(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function bl(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?cl:dl};d.ot=el(c);var e=d.ot===fl||d.ot===gl||d.ot===hl||d.ot===il;e&&(d.bl=jl(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==il&&(d.tb=kl(a,d.ot)/1E3);ll(a,b,d)}}catch(f){Ya("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
393
+ function ml(a,b,c){try{if(!a.g.enabled)return b;var d=nl(a);a:{switch(c){case "video/webm":case "video/mp4":var e=hl;break a;case "application/x-mpegurl":e=ol;break a}e=void 0}d.ot=e;d.su=!0;var f=pl(d);return ql(b,f)}catch(g){return Ya("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function nl(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
394
+ function ll(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,nl(a));c.pr=a.h.Sc();var e=c.ot===fl||c.ot===hl;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=rl(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=pl(c);f&&(b.uris=b.uris.map(function(g){return ql(g,f)}))}}}
395
+ function el(a){var b=a.type;if(a.init)return sl;if("video"==b)return a.codecs.includes(",")?hl:fl;if("audio"==b)return gl;if("text"==b)return"application/mp4"===a.mimeType?il:tl}function jl(a,b){b=a.h.Ma()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}
396
+ function kl(a,b){var c=a.h.Ya();if(!c.length)return NaN;a=c[0];c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case fl:return a.videoBandwidth||NaN;case gl:return a.audioBandwidth||NaN;default:return a.bandwidth}}
397
+ function pl(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=r(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
398
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function rl(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=r(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=pl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
399
+ function ql(a,b){if(!b||a.includes("offline:"))return a;a=new Mb(a);a.g.set("CMCD",b);return a.toString()}var ol="m",gl="a",fl="v",hl="av",sl="i",tl="c",il="tt",dl="v",cl="l";K("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",fh:"s",$g:"o"});function ul(){}
400
+ function vl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ue(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ue(l)),k=vl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Wa("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Xa("Unexpected number of arguments for "+k),a[h]=b[h]):(Wa("Invalid config, unrecognized key "+
401
+ k),g=!1)}return g}function wl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function xl(a,b){return a&&b}K("shaka.util.ConfigUtils",ul);ul.convertToConfigObject=wl;ul.mergeConfigObjects=vl;function yl(){}function zl(a){a=Ec(a);return(new Mb(a)).Ha}function Al(a,b,c){function d(h){Jb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(L(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Gc(b,!0):e=b;a=Ec(a);a=Gc(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",yl);
402
+ yl.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Hb(Kc(c)))}};yl.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};yl.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
403
+ yl.verimatrixFairPlayRequest=function(a,b){2===a&&(a=L(b.body),a=Jc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Fc("spc="+a))};yl.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Al(a,d,b)};
404
+ yl.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split(";").pop();return Al(a,c,b)};yl.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop();return Al(a,c,b)};yl.initDataTransform=Al;yl.defaultGetContentId=zl;
405
+ yl.isFairPlaySupported=function(){var a;return G(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},C(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);wa(b);return b.return(!1)})};function Bl(){}
406
+ function Cl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ie(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){"com.apple.fps.1_0"==k.keySystem&&"skd"==h&&(h=k.serverCertificate,k=zl(g),g=Al(g,k,h));return g},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:rc()},c={retryParameters:Ie(),availabilityWindowOverride:NaN,disableAudio:!1,
404
407
  disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
405
- "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return zl([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,
406
- mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:Je(),failureCallback:function(g){return zl([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
407
- autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1};if(tc("Web0S")||uc()||tc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return G(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return G(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<
408
- .95*h.quota)})},progressCallback:function(g,h){return zl([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new me},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,
408
+ "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return xl([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,
409
+ mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:Ie(),failureCallback:function(g){return xl([g])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmux:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,
410
+ autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1};if(sc("Web0S")||tc()||sc("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return G(function(h){return h.return(g)})},downloadSizeCallback:function(g){var h;return G(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<
411
+ .95*h.quota)})},progressCallback:function(g,h){return xl([g,h])},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new le},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,
409
412
  minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1},autoShowText:3,preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
410
- minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};e.trackSelectionCallback=function(g){return G(function(h){return h.return(Fl(g,f.preferredAudioLanguage))})};return f}
411
- function Gl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return xl(a,b,c||El(),d,"")}
412
- function Fl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=vd(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return od(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
413
- 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=jc&&"image"!=d.type||b.push(d);return b}K("shaka.util.PlayerConfiguration",Dl);Dl.mergeConfigObjects=Gl;Dl.createDefault=El;function Hl(){this.g=null;this.h=[]}function Il(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 Jl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
414
- function Kl(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 Ll(){this.i=this.h=null;this.g=[]}function Ml(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 Nl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.M=this.O=this.H=this.J=this.L=this.l=this.o=NaN;this.g=new Hl;this.h=new Ll};function V(a,b){Ue.call(this);var c=this;this.l=Ol;this.Uc=this.g=null;this.ca=!1;this.Xc=new mf;this.Xb=new mf;this.s=new mf;this.Nb=this.i=this.Yc=this.J=this.j=this.ua=this.L=this.cf=this.V=this.Fa=this.M=this.Vc=this.H=this.xb=this.B=this.G=this.m=this.D=null;this.dc=!1;this.Nd=this.u=null;this.Yd=1E9;this.h=Pl(this);this.ec={width:Infinity,height:Infinity};this.o=null;this.ub=new Ae(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.vb=this.h.preferredTextLanguage;
415
- this.cc=this.h.preferredTextRole;this.$b=this.h.preferForcedSubs;this.Zb=[];this.fc=null;b&&b(this);this.D=Ql(this);this.D.je(this.h.streaming.forceHTTPS);this.F=null;Rl&&(this.F=Rl());this.Xc.C(window,"online",function(){c.ce()});this.O={name:"detach"};this.W={name:"attach"};this.ea={name:"unload"};this.Zd={name:"manifest-parser"};this.Xd={name:"manifest"};this.wb={name:"media-source"};this.Qd={name:"drm-engine"};this.ba={name:"load"};this.de={name:"src-equals-drm-engine"};this.yb={name:"src-equals"};
416
- var d=new Map;d.set(this.W,function(e,f){return Pe(Sl(c,e,f))});d.set(this.O,function(e){e.mediaElement&&(c.Xb.nb(),e.mediaElement=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Pe(e)});d.set(this.ea,function(e){return Pe(Tl(c,e))});d.set(this.wb,function(e){e=Ul(c,e);return Pe(e)});d.set(this.Zd,function(e,f){e=Vl(c,e,f);return Pe(e)});d.set(this.Xd,function(e){return Wl(c,e)});d.set(this.Qd,function(e){e=Xl(c,e);return Pe(e)});d.set(this.ba,function(e,f){return Pe(Yl(c,e,f))});d.set(this.de,
417
- function(e,f){e=Zl(c,e,f);return Pe(e)});d.set(this.yb,function(e,f){return $l(c,e,f)});this.Ga=new Gk(this.O,{Mf:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.W);e==c.W&&(k=g==c.O||f.mediaElement!=h.mediaElement?c.O:g==c.W?c.W:g==c.wb||g==c.ba?c.wb:g==c.yb?c.de:null);e==c.wb&&(k=g==c.ba&&f.mediaElement==h.mediaElement?c.Zd:c.ea);e==c.Zd&&(k=am(c.ba,c.Xd,c.ea,g,f,h));e==c.Xd&&(k=am(c.ba,c.Qd,c.ea,g,f,h));e==c.Qd&&(k=am(c.ba,c.ba,c.ea,g,f,h));e==c.de&&(k=g==c.yb&&f.mediaElement==h.mediaElement?
418
- c.yb:c.ea);if(e==c.ba||e==c.yb)k=c.ea;e==c.ea&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.W:c.O);return k},yf:function(e,f,g){c.dispatchEvent(bm("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return G(function(f){return 1==f.g?u(f,Tl(c,e),2):f.return(e.mediaElement?c.W:c.O)})},eg:function(e){c.dispatchEvent(bm("onstateidle",(new Map).set("state",e.name)))}});this.af=new P(function(){Ld(c.i.variants,c.h.restrictions,c.ec)&&cm(c)});a&&this.Yb(a,
419
- !0)}oa(V,Ue);function dm(a){null!=a.L&&(a.L.release(),a.L=null)}function em(a,b){if(b.lcevc.enabled){var c=a.Xa();c&&c[0]&&c[0].videoMimeType==fm.ts&&(rc()||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Wa("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));dm(a);null==a.L&&(a.L=new Hi(a.g,a.cf,b.lcevc),a.G&&(a.G.D=a.L))}else dm(a)}function bm(a,b){return new S(a,b)}q=V.prototype;
420
- q.destroy=function(){var a=this,b;return G(function(c){switch(c.g){case 1:if(a.l==gm)return c.return();dm(a);a.l=gm;b=Lk(a.Ga,function(){return{node:a.O,payload:Hk(),hb:!1}});return u(c,new Promise(function(d){b.Jb=function(){};b.bd=function(){d()};b.mb=function(){d()};b.onError=function(){d()};b.dd=function(){d()}}),2);case 2:return u(c,a.Ga.destroy(),3);case 3:a.Xc&&(a.Xc.release(),a.Xc=null);a.Xb&&(a.Xb.release(),a.Xb=null);a.s&&(a.s.release(),a.s=null);a.Nd=null;a.u=null;a.h=null;a.o=null;a.Uc=
421
- null;a.V=null;if(!a.D){c.A(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:Ue.prototype.release.call(a),A(c)}})};q.Yb=function(a,b){b=void 0===b?!0:b;if(this.l==gm)return Promise.reject(hm());var c=Hk();c.mediaElement=a;oc()||(b=!1);var d=b?this.wb:this.W;a=Lk(this.Ga,function(){return{node:d,payload:c,hb:!1}});a.Jb=function(){};return im(a)};q.lf=function(a){this.cf=a};
422
- q.detach=function(){var a=this;if(this.l==gm)return Promise.reject(hm());var b=Lk(this.Ga,function(){return{node:a.O,payload:Hk(),hb:!1}});b.Jb=function(){};return im(b)};q.re=function(a){var b=this;a=void 0===a?!0:a;if(this.l==gm)return Promise.reject(hm());this.dc=!1;oc()||(a=!1);dm(this);var c=Hk(),d=Lk(this.Ga,function(e){var f=e.mediaElement&&a?b.wb:e.mediaElement?b.W:b.O;c.mediaElement=e.mediaElement;return{node:f,payload:c,hb:!1}});d.Jb=function(){};return im(d)};q.Fg=function(a){this.fc=a};
423
- q.load=function(a,b,c){var d=this;this.fc=null;this.dc=!1;if(this.l==gm)return Promise.reject(hm());this.dispatchEvent(bm("loading"));var e=Hk();e.uri=a;e.ne=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=jm(this,e)?this.yb:this.ba,g=Lk(this.Ga,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,hb:!0}});this.o=new Nl;this.V=km(this);g.Jb=function(){};return new Promise(function(h,k){g.dd=function(){return k(new O(2,7,7002))};g.bd=
424
- function(){h();d.dispatchEvent(bm("loaded"))};g.mb=function(){return k(hm())};g.onError=function(l){return k(l)}})};function jm(a,b){if(!oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Ug(d),c=fm[c]);if(c){if(""==(b.mediaElement||qc()).canPlayType(c))return!1;if(!oc()||!(c in Tg||Ug(d)in Vg)||a.h.streaming.preferNativeHls)return!0;if(wc())return a.h.streaming.useNativeHlsOnSafari}return!1}
425
- function Sl(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.Xb.C(b.mediaElement,"error",function(){var d=lm(a);d&&mm(a,d)}));a.g=b.mediaElement;return Promise.resolve()}
426
- function Tl(a,b){var c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:return a.l!=gm&&(a.l=Ol),c=a.Zb.map(function(p){return p()}),a.Zb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(bm("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.Fa&&(a.Fa.release(),a.Fa=null);b.mediaElement&&a.s.nb();a.af.stop();a.xb&&(a.xb.release(),a.xb=null);a.Vc&&(a.Vc.stop(),a.Vc=null);if(!a.J){n.A(3);break}return u(n,a.J.stop(),4);case 4:a.J=null,a.Yc=null;case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),
427
- 5);case 5:if(!a.j){n.A(7);break}return u(n,a.j.destroy(),8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.B&&(a.B.release(),a.B=null);if(!a.G){n.A(9);break}return u(n,a.G.destroy(),10);case 10:a.G=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){n.A(11);break}return u(n,new Promise(function(p){return(new P(p)).N(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
428
- case 11:if(!a.m){n.A(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Nb=null;a.M=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new Nl;a.Ud=null;nm(a);A(n)}})}
429
- function Ul(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.Ud=c,e=om(b.mediaElement,d,function(k,l,m){pm(a,k,l,m)},a.L),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.H=g,u(h,e.J,2);a.G=e;A(h)})}
430
- function Vl(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.D,a.Nb=d,f=a,u(h,Sg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Yc=h.h;a.J=a.Yc();g=Ve(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.J.configure(g);A(h)})}
431
- function Wl(a,b){var c=b.uri;b=a.D;a.Fa=new Wj(function(){return a.uc()});a.Fa.addEventListener("regionadd",function(f){f=f.region;qm(a,"timelineregionadded",f);if(a.F)a.F.onDashTimedMetadata(f)});a.ua=null;a.h.streaming.observeQualityChanges&&(a.ua=new Sj(function(){return a.Na()}),a.ua.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
432
- height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent(bm("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.V;try{h.g.enabled&&(h.o=g.format,nl(h,f,{ot:ql,su:!h.i}))}catch(k){Xa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){dl(a.V,f,g)},filter:function(f){return rm(a,f)},makeTextStreamsForClosedCaptions:function(f){return sm(a,
433
- f)},onTimelineRegionAdded:function(f){var g=a.Fa;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new S("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return mm(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
434
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.u&&tm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Le(function(){var f,g,h,k;return G(function(l){if(1==l.g)return f=a,u(l,a.J.start(c,d),2);f.i=l.h;g=bm("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new O(2,4,4036);um(a.i);h=Date.now()/1E3;k=h-e;a.o.F=k;A(l)})}(),function(){return a.J.stop()})}
435
- function Xl(a,b){var c,d;return G(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=vm(a,{kb:a.D,onError:function(f){mm(a,f)},cd:function(f){wm(a,f)},onExpirationUpdated:function(f,g){xm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c,a.L&&(f=a.L,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,mg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Yb(b.mediaElement),3):u(e,rm(a,a.i),0)})}
436
- function Yl(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C,z;return G(function(B){switch(B.g){case 1:b.startTime=c.startTime;null!=a.fc&&(b.startTime=a.fc,a.fc=null);d=b.mediaElement;e=b.uri;a.Nb=e;a.H=new Oj({Tc:function(){return d.playbackRate},Pc:function(){return d.defaultPlaybackRate},le:function(E){d.playbackRate=E},Me:function(E){d.currentTime+=E}});f=function(){return ym(a)};g=function(){return zm(a)};a.s.C(d,"playing",f);a.s.C(d,"pause",f);a.s.C(d,"ended",f);a.s.C(d,"ratechange",g);em(a,a.h);
437
- h=a.h.abrFactory;a.u&&a.Nd==h||(a.Nd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(re("AbrManager","Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.ub=new Ae(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.vb=a.h.preferredTextLanguage;a.cc=a.h.preferredTextRole;a.$b=a.h.preferForcedSubs;Am(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(E,F,H){a.j&&E!=a.j.l&&
438
- Bm(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.u.setMediaElement(d);xd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Cm(a);a.j.configure(a.h.streaming);a.l=Dm;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Em(a,E)}});a.dispatchEvent(bm("streaming"));k=null;(l=a.j.l)||(k=cm(a));m=[];n=l||k;p=r([n.video,n.audio]);for(t=p.next();!t.done;t=p.next())(v=t.value)&&!v.segmentIndex&&
439
- m.push(v.createSegmentIndex());if(!(0<m.length)){B.A(2);break}return u(B,Promise.all(m),2);case 2:a.B=Fm(a,b.startTime);a.xb=Gm(a);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Hm(a,y);if(l){B.A(4);break}Bm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){B.A(5);break}w=a.B.Ic();return u(B,Im(k,w),6);case 6:x=B.h,a.B.zd(x);case 5:Jm(a,null,$d(k));case 4:return a.B.yd(),C=a.Fb().find(function(E){return E.active}),C||((z=je(a.i.textStreams,a.vb,a.cc,a.$b)[0]||null)&&Ml(a.o.h,z,!0),
440
- k&&(z?(k.audio&&Km(a,k.audio,z)&&(a.ca=!0),a.ca&&a.G.m.setTextVisibility(!0),Lm(a)):a.ca=!1),z&&(a.h.streaming.alwaysStreamText||a.Hd())&&pk(a.j,z)),u(B,a.j.start(),7);case 7:a.h.abr.enabled&&(a.u.enable(),Mm(a)),Od(a.j?a.j.l:null,a.i),Nm(a.i),Om(a),Pm(a),a.i.variants.some(function(E){return E.primary}),a.dc=!0,a.s.ma(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ne}),A(B)}})}
441
- function Zl(a,b,c){var d,e,f,g,h,k,l;return G(function(m){return 1==m.g?(d=kc,e=Date.now()/1E3,f=!0,a.m=vm(a,{kb:a.D,onError:function(n){mm(a,n)},cd:function(n){wm(a,n)},onExpirationUpdated:function(n,p){xm(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Ug(g),k=fm[h],"application/x-mpegurl"==k&&wc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
442
- primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
443
- a.m.V=!0,u(m,mg(a.m,[l],[]),2)):u(m,a.m.Yb(b.mediaElement),0)})}
444
- function $l(a,b,c){function d(){return ym(a)}b.uri=c.uri;b.startTime=c.startTime;a.Nb=b.uri;var e=b.mediaElement;a.B=new Cj(e);var f=!1;a.Zb.push(function(){f=!0});null!=b.startTime&&a.B.zd(b.startTime);a.H=new Oj({Tc:function(){return e.playbackRate},Pc:function(){return e.defaultPlaybackRate},le:function(k){e.playbackRate=k},Me:function(k){e.currentTime+=k}});Hm(a,a.h.streaming.rebufferingGoal);a.s.C(e,"playing",d);a.s.C(e,"pause",d);a.s.C(e,"ended",d);a.s.C(e,"ratechange",function(){return zm(a)});
445
- "none"!=e.preload&&a.s.ma(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ne});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return Om(a)}),a.s.C(e.audioTracks,"removetrack",function(){return Om(a)}),a.s.C(e.audioTracks,"change",function(){return Om(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Qm(a,k);break;case "chapters":Em(a,k);break;default:Om(a)}}),a.s.C(e.textTracks,"removetrack",function(){return Om(a)}),
446
- a.s.C(e.textTracks,"change",function(){return Om(a)}));var g=Ug(b.uri);e.src=ol(a.V,b.uri,fm[g]);(uc()||tc("Web0S"))&&e.load();a.l=Rm;a.dispatchEvent(bm("streaming"));var h=new lc;tj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.yd();h.resolve()});tj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return G(function(l){if(1==l.g)return Sm(a),k=Tm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.ca=!0),l.A(2)):u(l,new Promise(function(m){a.s.ma(e.textTracks,"change",
447
- m);(new P(m)).N(1)}),2);if(f)return l.return();Um(a);A(l)})});e.error?h.reject(lm(a)):"none"==e.preload&&(Wa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.s.ma(e,"error",function(){h.reject(lm(a))});return(new Le(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})).Y(function(){a.dc=
448
- !0})}function Sm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.ge(b);var c=a.h.preferredVariantRole;""!=c&&a.ge(b,c)}}function Um(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.he(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.he(b,d,c)}}
449
- function Qm(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Vm(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Wm(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Mb().N(.5);a.Zb.push(function(){c.stop()})}}
450
- function pm(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())Vm(a,f,g,"org.id3",k.value);if(a.F)a.F.onHlsTimedMetadata(e,f)}}function Vm(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(bm("metadata",b))}
451
- function Em(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).Mb().N(.5);a.Zb.push(function(){c.stop()})}}function um(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 vm(a,b){return new fg(b,a.h.drm.updateExpirationTime)}
452
- function Ql(a){return new Ze(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(bm("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(bm("downloadfailed",b))})}
453
- function Fm(a,b){return new Dj(a.g,a.i,a.h.streaming,b,function(){a.xb&&Rj(a.xb,!0);a.j&&a.j.vc();a.M&&Xm(a)},function(c){return a.dispatchEvent(c)})}
454
- function Gm(a){var b=new Xj(a.Fa);b.addEventListener("enter",function(d){qm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){qm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(qm(a,"timelineregionenter",e),qm(a,"timelineregionexit",e))});var c=new Qj(a.g);c.g.add(b);a.ua&&c.g.add(a.ua);return c}function Hm(a,b){a.M=new Ee;a.M.g=Ge;He(a.M,b,Math.min(.5,b/2));nm(a);a.Vc=(new P(function(){Xm(a)})).Ca(.25)}
455
- function Xm(a){switch(a.l){case Rm:if(a.g.ended)var b=!0;else{var c=ui(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Dm:a:if(a.g.ended||Si(a.G))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.gb();var d=ui(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=wi(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Fe:Ge;c.g=d;b!=d&&nm(a)}function om(a,b,c,d){return new Mi(a,b,c,d)}
456
- function km(a){return new cl({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Na:function(){return a.Na()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Xa:function(){return a.Xa()},Rc:function(){return a.Rc()},U:function(){return a.U()}},a.h.cmcd)}
457
- function Cm(a){return new dk(a.i,{Sc:function(){return a.B?a.B.Ic():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){dl(a.V,b,c)},R:a.G,kb:a.D,onError:function(b){return mm(a,b)},onEvent:function(b){return a.dispatchEvent(b)},gg:function(){a.J&&a.J.update&&a.J.update()},Wd:function(b,c,d){a.B&&a.B.Ne();Xm(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(bm("segmentappended",b))},fg:function(b,c){(c=c.Od)&&a.ua&&
458
- Uj(a.ua,c,b)},xe:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){c=new Jf(M(c));var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;vg(d,"cenc",e);d=d.o}}else d=Promise.resolve();return d},hg:function(b,c,d){pm(a,b,c,d)}})}
459
- q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(re("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
460
- .01));var c=Gl(this.h,a,Pl(this));Ym(this);return c};
461
- function Ym(a){if(a.J){var b=Ve(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Zm(a,a.i)}catch(f){mm(a,f)}a.u&&Pm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||$m(a)}a.D&&a.D.je(a.h.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.h.mediaSource),a.G.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Ud!=b)){var c=b(),d=a.G,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
462
- e.destroy());d.g&&(d.g.i=c);a.Ud=b;a.j&&(b=a.j,(c=b.j.get(jc))&&nk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Mm(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),He(a.M,b,Math.min(.5,b/2)));a.i&&Am(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Pl(this);Gl(a,this.h,Pl(this));return a};
463
- q.Bf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.uc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.rg=function(){for(var a in this.h)delete this.h[a];Gl(this.h,Pl(this),Pl(this));Ym(this)};q.Hf=function(){return this.l};q.Lf=function(){return this.g};q.jc=function(){return this.D};q.Dd=function(){return this.Nb};
464
- q.Ge=function(){return this.F?this.F:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.jb=function(){return this.i?this.i.presentationTimeline.jb():!1};q.Zf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
465
- q.uc=function(){if(!this.dc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.Db(),end:a.Oa()}}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.Xf=function(){this.U()&&(this.g.currentTime=this.uc().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.ic=function(){return this.m?this.m.ic():Infinity};
466
- q.Qc=function(){return this.m?this.m.Qc():{}};q.Fd=function(){return this.M?this.M.g==Ge:!1};q.Rc=function(){return this.g?this.H?this.H.i:1:0};q.Ag=function(a){0==a?Wa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==Dm&&(this.u.playbackRateChanged(a),mk(this.j,1<Math.abs(a))))};q.pf=function(){var a=this.H.Pc();this.l==Rm&&this.H.set(a);this.l==Dm&&(this.H.set(a),this.u.playbackRateChanged(a),mk(this.j,!1))};
467
- q.Xa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,he(e)){var f=$d(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 ge(g)}):[]};
468
- q.Fb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ae(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Tm(this).map(function(f){return ee(f)}):[]};q.Ff=function(){return this.i?this.i.imageStreams.map(function(a){return be(a)}):[]};
469
- q.Tf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C,z,B,E,F;return G(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?H.A(3):u(H,d.createSegmentIndex(),3):H.return(null):H.A(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;t=l/n;v=m*n;
470
- y=f.j-f.startTime;w=f.s||y/v;x=f.startTime;z=C=0;1<v&&(B=Math.floor((b-f.startTime)/w),x=f.startTime+B*w,C=B%m*p,z=Math.floor(B/m)*t);E=!1;if(F=f.o)E=!0,t=F.height,C=F.positionX,z=F.positionY,p=F.width;return H.return({imageHeight:l,imageWidth:k,height:t,positionX:C,positionY:z,startTime:x,duration:w,uris:f.ya(),width:p,sprite:E})}return H.return(null)})};
471
- q.Se=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Ml(this.o.h,b,!1),pk(this.j,b),an(this),this.vb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Tm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ce(c)==a.id?c.mode=this.ca?"showing":"hidden":c.mode="disabled";an(this)}};
472
- q.Te=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&he(d)&&(Bm(this,d,!1,b,c),this.ub=new ze(d),Pm(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,
473
- ce(c)==a.id){bn(this,c);break}};q.Af=function(){return cn(this.Xa())};q.Rf=function(){return cn(this.Fb())};q.zf=function(){return Array.from(dn(this.Xa()))};q.Qf=function(){return Array.from(dn(this.Fb()))};
474
- q.ge=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.B){this.ub=new Ae(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.ub.create(this.i.variants);c=null;d=r(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=$d(c),this.Te(b,!0)):$m(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
475
- a=od(a);d=c=null;e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ge(f);od(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?bn(this,d):c&&bn(this,c)}};
476
- q.he=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.vb=a,this.cc=b||"",this.$b=c,(a=je(this.i.textStreams,this.vb,this.cc,this.$b)[0]||null)&&a!=this.j.o&&(Ml(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Hd()))pk(this.j,a),an(this)}else{var d=od(a);(a=this.Fb().find(function(e){return od(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Se(a)}};
477
- q.tg=function(a){if(this.i&&this.B){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.ub=new Ae(b.language,"",0,a),$m(this))}};q.Hd=function(){var a=this.ca;return this.G?this.G.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Tm(this).some(function(b){return"showing"==b.mode}):a};q.He=function(){return this.g&&this.g.src&&this.g.textTracks?en(this).map(function(a){return ee(a)}):[]};
478
- q.Cf=function(a){var b=od(a),c=en(this).filter(function(h){return od(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
479
- function Tm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Wm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function en(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
480
- q.yg=function(a){a=!!a;if(this.ca!=a){this.ca=a;if(this.l==Dm)this.G.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=je(this.i.textStreams,this.vb,this.cc,this.$b),0<a.length&&(pk(this.j,a[0]),an(this))):lk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Tm(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")}Lm(this)}};
481
- q.Of=function(){if(!this.U())return null;var a=this.Ga.l,b=0;if(this.B)b=this.B.Ic();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
482
- q.Ie=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Na=function(){if(this.l==Dm)return this.G.Na();var a={total:[],audio:[],video:[],text:[]};this.l==Rm&&(a.total=xi(this.g.buffered));return a};
483
- q.getStats=function(){if(this.l!=Dm&&this.l!=Rm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};ym(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
484
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.M=this.B.te(),this.o.O=this.B.ue());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.J=d;this.o.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.H?c.H:NaN):c=NaN;this.o.s=c;if(this.l==Dm){if(c=this.j.l)this.o.B=(this.H?this.H.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.Ie().valueOf()+
485
- 1E3*this.uc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==Rm&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.B;d=e.J;var f=e.L,g=e.H,h=e.O,k=e.M,l=e.u,m=e.i,n=e.m,p=e.F,t=e.j,v=Jl(e.g,"playing"),y=Jl(e.g,"paused"),w=Jl(e.g,"buffering"),x=e.s,C=e.D,z=e.G,B=Kl(e.g),E=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
486
- id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:t,playTime:v,pauseTime:y,bufferingTime:w,licenseTime:x,liveLatency:C,maxSegmentDuration:z,stateHistory:B,switchHistory:E}};
487
- q.hf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:if(h.l!=Dm&&h.l!=Rm)throw new O(1,7,7004);if(d){z.A(2);break}return u(z,fn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(B){}if(h.l!=Rm){z.A(4);break}g&&(c="forced");return u(z,gn(h,a,b,c,d,f||"",k),5);case 5:l=h.Fb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return Om(h),z.return(m);throw new O(1,2,2012);case 4:n=
488
- kc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new O(1,4,4033);if(!k.length){z.A(6);break}return u(z,hn(h,a,h.D,h.h.streaming.retryParameters),7);case 7:t=z.h,v=jn(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Pi(y),d="text/vtt";case 6:w={id:h.Yd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Mj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.X,primary:!1,trickModeVideo:null,
489
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=Zc(w.mimeType,w.codecs);C=ed(x);if(!C)throw new O(2,2,2014,d);h.i.textStreams.push(w);Om(h);return z.return(ae(w))}})};
490
- q.jf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:if(c.l!=Dm&&c.l!=Rm)throw new O(1,7,7004);if(c.l==Rm)throw new O(1,2,2016);if(b){z.A(2);break}return u(z,fn(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=kc;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new O(1,4,4045);return u(z,hn(c,a,c.D,c.h.streaming.retryParameters),4);case 4:f=z.h;g=fd[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
491
- segmentEnd:e,vttOffset:0};l=M(f);m=h.parseMedia(l,k);n=[];p={};t=r(m);for(v=t.next();!v.done;p={Rb:p.Rb},v=t.next())y=v.value,p.Rb=ec([a],[y.payload])[0],w=new qi(y.startTime,y.endTime,function(B){return function(){return[B.Rb]}}(p),0,null,null,0,0,Infinity),p.Rb.includes("#xywh")&&(x=p.Rb.split("#xywh=")[1].split(","),4===x.length&&w.Ye({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),n.push(w);C={id:c.Yd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
492
- segmentIndex:new Jj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Wb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(C);Om(c);return z.return(be(C))}})};
493
- q.gf=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=Dm&&d.l!=Rm)throw new O(1,7,7004);if(c){k.A(2);break}return u(k,fn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,gn(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.He();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.s.ma(f,"load",l);d.s.ma(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k.return(h);
494
- case 5:throw new O(1,2,2012);}})};function fn(a,b){var c,d;return G(function(e){switch(e.g){case 1:c=Ug(b);if(d=kn[c])return e.return(d);D(e,2);return u(e,Wg(b,a.D,a.h.streaming.retryParameters),4);case 4:d=e.h;ta(e,3);break;case 2:ua(e);case 3:if(d)return e.return(d);throw new O(1,2,2011,c);}})}
495
- function gn(a,b,c,d,e,f,g){var h,k,l,m;return G(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,hn(a,b,a.D,a.h.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=jn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Pi(l),e="text/vtt");m=document.createElement("track");var p=a.V,t=b;try{if(p.g.enabled){var v=pl(p);v.ot=vl;v.su=!0;var y=rl(v);var w=sl(t,y)}else w=t}catch(x){Xa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=t}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
496
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n.return(m)})}function hn(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){e=jf;f=cf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&nl(k,f,{ot:vl,su:!0})}catch(l){Xa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
497
- function jn(a,b,c,d){var e=fd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=M(b),b=c.parseMedia(b,a),bl(b,d);throw new O(2,2,2014,c);}q.ke=function(a,b){this.ec.width=a;this.ec.height=b};q.ce=function(a){if(this.l==Dm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.nc||d.ra||d.Ka||(d.nc=!1,kk(b,d,a));b=!0}}else b=!1;return b};
498
- q.If=function(){Wa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Jf=function(){return this.Yc};
499
- function Pl(a){var b=El();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.ce(d))}};b.textDisplayFactory=function(){return a.Uc?new Uk(a.g,a.Uc):new Pk(a.g)};return b}q.$e=function(a){this.Uc=a};
500
- function sm(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 Nj;h={id:a.Yd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
501
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:jc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function rm(a,b){return G(function(c){if(1==c.g)return u(c,ln(a,b),2);Zm(a,b);A(c)})}
502
- function ln(a,b){var c;return G(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Md(c,b),2);Nm(b);A(d)})}function Zm(a,b){if(a.l!=gm){Ld(b.variants,a.h.restrictions,a.ec)&&a.j&&Om(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,tm(a,c.keySystem,e.video),tm(a,c.keySystem,e.audio);mn(a,b)}}
503
- function tm(a,b,c){if(c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,vg(a.m,e.initDataType,e.initData)}}}
504
- function Im(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return G(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);n=(m=k.segmentIndex.Cb(l))?m.next().value:null;if(!n)return t.return(null);p=n.startTime;return t.return(p)})},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)})}
505
- function nm(a){var b=a.Fd();if(a.o&&a.M&&a.B){var c=a.H;c.j=b;Pj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);ym(a)}b=(new Map).set("buffering",b);a.dispatchEvent(bm("buffering",b))}function zm(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=bm("ratechange"),a.dispatchEvent(b))}function ym(a){if(a.o&&a.M){var b=a.o.g;a.M.g==Ge?Il(b,"buffering"):a.g.paused?Il(b,"paused"):a.g.ended?Il(b,"ended"):Il(b,"playing")}}
506
- function Pm(a){try{mn(a,a.i)}catch(c){return mm(a,c),!1}var b=a.i.variants.filter(function(c){return he(c)});b=a.ub.create(b);a.u.setVariants(Array.from(b.values()));return!0}function cm(a){return Pm(a)?a.u.chooseVariant():null}function $m(a){var b=cm(a);b&&Bm(a,b,!0,!0,0)}
507
- function Bm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&ok(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));ok(a.j,b,d,e,void 0,c);d=null;f&&(d=$d(f));b=$d(b);c?Jm(a,d,b):nn(a,d,b)}}function bn(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ge(c);b=ge(b);nn(a,c,b)}
508
- function Km(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=od(a.h.preferredTextLanguage);c=od(c.language);if(2==a.h.autoShowText)return nd(c,d);if(3==a.h.autoShowText)return a=od(b.language),nd(c,d)&&!nd(a,c);Wa("Invalid autoShowText setting!");return!1}function Jm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Ii(a.L,c);c=bm("adaptation",b);on(a,c)}function Om(a){var b=bm("trackschanged");on(a,b)}
509
- function nn(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Ii(a.L,c);c=bm("variantchanged",b);on(a,c)}function an(a){var b=bm("textchanged");on(a,b)}function Lm(a){var b=bm("texttrackvisibility");on(a,b)}function Mm(a){var b=(new Map).set("newStatus",a.h.abr.enabled);on(a,bm("abrstatuschanged",b))}
510
- function pn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Xa().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Ld(d.variants,a.h.restrictions,a.ec);b=cm(a);if(!b)return!1;d=a.Na().video.reduce(function(g,h){return g+h.end-h.start},0);Bm(a,b,!1,!0,d);a.af.N(c);return!0}
511
- function mm(a,b){if(a.l!=gm)if(pn(a,b))b.handled=!0;else{var c=bm("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function qm(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(bm(b,c))}
512
- function lm(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)}
513
- function wm(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!qn.includes(l)}h!=f.allowedByKeySystem&&
514
- (e=!0)}}}if(!e||Pm(a))(b=a.j.l)&&!b.allowedByKeySystem&&$m(a),e&&Om(a)}}function xm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=bm("expirationupdated");a.dispatchEvent(b)}function Am(a,b,c){0<b&&(a.U()||a.Ze(b));b=a.getDuration();c<b&&(a.U()||a.Aa(c))}
515
- function mn(a,b){a=a.m?a.m.Qc():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?qn.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
516
- missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new O(2,4,4012,a);}function Nm(a){if(!a.variants.some(he))throw new O(2,4,4032);}function on(a,b){G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=gm&&a.dispatchEvent(b);A(c)})}function dn(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(od(c.language)):b.add("und");return b}
517
- function cn(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=od(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
518
- h.push({language:l,role:m,label:n})}});return h}function hm(){return new O(2,7,7E3)}function am(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Hk(){return{mediaElement:null,mimeType:null,startTime:null,ne:NaN,uri:null}}function im(a){return new Promise(function(b,c){a.mb=function(){return c(hm())};a.bd=function(){return b()};a.onError=function(d){return c(d)};a.dd=function(){return c(hm())}})}K("shaka.Player",V);
519
- V.prototype.setVideoContainer=V.prototype.$e;V.prototype.getManifestParserFactory=V.prototype.Jf;V.prototype.getManifest=V.prototype.If;V.prototype.retryStreaming=V.prototype.ce;V.prototype.setMaxHardwareResolution=V.prototype.ke;V.prototype.addChaptersTrack=V.prototype.gf;V.prototype.addThumbnailsTrack=V.prototype.jf;V.prototype.addTextTrackAsync=V.prototype.hf;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.Na;V.prototype.getPresentationStartTimeAsDate=V.prototype.Ie;
520
- V.prototype.getPlayheadTimeAsDate=V.prototype.Of;V.prototype.setTextTrackVisibility=V.prototype.yg;V.prototype.getChapters=V.prototype.Cf;V.prototype.getChaptersTracks=V.prototype.He;V.prototype.isTextTrackVisible=V.prototype.Hd;V.prototype.selectVariantsByLabel=V.prototype.tg;V.prototype.selectTextLanguage=V.prototype.he;V.prototype.selectAudioLanguage=V.prototype.ge;V.prototype.getTextLanguages=V.prototype.Qf;V.prototype.getAudioLanguages=V.prototype.zf;V.prototype.getTextLanguagesAndRoles=V.prototype.Rf;
521
- V.prototype.getAudioLanguagesAndRoles=V.prototype.Af;V.prototype.selectVariantTrack=V.prototype.Te;V.prototype.selectTextTrack=V.prototype.Se;V.prototype.getThumbnails=V.prototype.Tf;V.prototype.getImageTracks=V.prototype.Ff;V.prototype.getTextTracks=V.prototype.Fb;V.prototype.getVariantTracks=V.prototype.Xa;V.prototype.cancelTrickPlay=V.prototype.pf;V.prototype.trickPlay=V.prototype.Ag;V.prototype.getPlaybackRate=V.prototype.Rc;V.prototype.isBuffering=V.prototype.Fd;V.prototype.getKeyStatuses=V.prototype.Qc;
522
- V.prototype.getExpiration=V.prototype.ic;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.Xf;V.prototype.seekRange=V.prototype.uc;V.prototype.isAudioOnly=V.prototype.Zf;V.prototype.isInProgress=V.prototype.jb;V.prototype.isLive=V.prototype.U;V.prototype.getAdManager=V.prototype.Ge;V.prototype.getAssetUri=V.prototype.Dd;V.prototype.getNetworkingEngine=V.prototype.jc;V.prototype.getMediaElement=V.prototype.Lf;
523
- V.prototype.getLoadMode=V.prototype.Hf;V.prototype.resetConfiguration=V.prototype.rg;V.prototype.getBufferFullness=V.prototype.Bf;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.Fg;V.prototype.unload=V.prototype.re;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.lf;V.prototype.attach=V.prototype.Yb;
524
- V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return G(function(h){if(1==h.g)return b={},a?u(h,Mg(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(oc()){for(var l in Tg)k[l]=!0;for(var m in Vg)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]=oc()?!!Tg[n]:pc(n);for(var p in l)k[p]=
525
- oc()?!!Vg[p]:pc(l[p]);c=k;p='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ha(Yi));
526
- k={};p=r(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=oc()?ed(l)?!0:eb(l)||Tc(l):pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=rn;for(g in f)e[g]=f[g]();return h.return(e)})};
527
- V.isBrowserSupported=function(){window.Promise||Wa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||tc("Trident/"))return!1;var a=yc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:oc()?!0:pc("application/x-mpegurl")};V.setAdManagerFactory=function(a){Rl=a};
528
- V.registerSupportPlugin=function(a,b){rn[a]=b};V.prototype.destroy=V.prototype.destroy;var gm=0,Ol=1,Dm=2,Rm=3;V.LoadMode={DESTROYED:gm,NOT_LOADED:Ol,MEDIA_SOURCE:Dm,SRC_EQUALS:Rm};V.version="v4.3.5";var sn=["4","3"];se=new function(a){this.g=a;this.i=te;this.h=ue}(new qe(Number(sn[0]),Number(sn[1])));
529
- var qn=["output-restricted","internal-error"],rn={},Rl=null,fm={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"},kn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
530
- ssa:"text/x-ssa",ass:"text/x-ssa"};function tn(){this.h=[];this.j=this.i=this.g=0};function W(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new mf;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=W.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
413
+ minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1}};e.trackSelectionCallback=function(g){return G(function(h){return h.return(Dl(g,f.preferredAudioLanguage))})};return f}
414
+ function El(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return vl(a,b,c||Cl(),d,"")}
415
+ function Dl(a,b){var c=a.filter(function(g){return"variant"==g.type}),d=[],e=ud(b,c.map(function(g){return g.language}));e&&(d=c.filter(function(g){return nd(g.language)==e}));0==d.length&&(d=c.filter(function(g){return g.primary}));0==d.length&&(c.map(function(g){return g.language}),d=c);var f=d.filter(function(g){return g.height&&480>=g.height});f.length&&(f.sort(function(g,h){return h.height-g.height}),d=f.filter(function(g){return g.height==f[0].height}));b=[];d.length&&(c=Math.floor(d.length/
416
+ 2),d.sort(function(g,h){return g.bandwidth-h.bandwidth}),b.push(d[c]));a=r(a);for(d=a.next();!d.done;d=a.next())d=d.value,d.type!=ic&&"image"!=d.type||b.push(d);return b}K("shaka.util.PlayerConfiguration",Bl);Bl.mergeConfigObjects=El;Bl.createDefault=Cl;function Fl(){this.g=null;this.h=[]}function Gl(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 Hl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=r(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}
417
+ function Il(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 Jl(){this.i=this.h=null;this.g=[]}function Kl(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 Ll(){this.u=this.A=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.M=this.P=this.H=this.J=this.L=this.l=this.o=NaN;this.g=new Fl;this.h=new Jl};function V(a,b){Te.call(this);var c=this;this.l=Ml;this.Vc=this.g=null;this.ca=!1;this.Yc=new lf;this.Yb=new lf;this.u=new lf;this.Ob=this.i=this.Zc=this.J=this.j=this.ka=this.L=this.df=this.V=this.Fa=this.M=this.Wc=this.H=this.yb=this.A=this.G=this.m=this.D=null;this.ec=!1;this.Od=this.s=null;this.Zd=1E9;this.h=Nl(this);this.fc={width:Infinity,height:Infinity};this.o=null;this.vb=new ze(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.wb=this.h.preferredTextLanguage;
418
+ this.dc=this.h.preferredTextRole;this.ac=this.h.preferForcedSubs;this.$b=[];this.hc=null;b&&b(this);this.D=Ol(this);this.D.ke(this.h.streaming.forceHTTPS);this.F=null;Pl&&(this.F=Pl());this.Yc.C(window,"online",function(){c.de()});this.P={name:"detach"};this.W={name:"attach"};this.ea={name:"unload"};this.$d={name:"manifest-parser"};this.Yd={name:"manifest"};this.xb={name:"media-source"};this.Rd={name:"drm-engine"};this.ba={name:"load"};this.ee={name:"src-equals-drm-engine"};this.zb={name:"src-equals"};
419
+ var d=new Map;d.set(this.W,function(e,f){return Oe(Ql(c,e,f))});d.set(this.P,function(e){e.mediaElement&&(c.Yb.ob(),e.mediaElement=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Oe(e)});d.set(this.ea,function(e){return Oe(Rl(c,e))});d.set(this.xb,function(e){e=Sl(c,e);return Oe(e)});d.set(this.$d,function(e,f){e=Tl(c,e,f);return Oe(e)});d.set(this.Yd,function(e){return Ul(c,e)});d.set(this.Rd,function(e){e=Vl(c,e);return Oe(e)});d.set(this.ba,function(e,f){return Oe(Wl(c,e,f))});d.set(this.ee,
420
+ function(e,f){e=Xl(c,e,f);return Oe(e)});d.set(this.zb,function(e,f){return Yl(c,e,f)});this.Ga=new Ek(this.P,{Nf:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.W);e==c.W&&(k=g==c.P||f.mediaElement!=h.mediaElement?c.P:g==c.W?c.W:g==c.xb||g==c.ba?c.xb:g==c.zb?c.ee:null);e==c.xb&&(k=g==c.ba&&f.mediaElement==h.mediaElement?c.$d:c.ea);e==c.$d&&(k=Zl(c.ba,c.Yd,c.ea,g,f,h));e==c.Yd&&(k=Zl(c.ba,c.Rd,c.ea,g,f,h));e==c.Rd&&(k=Zl(c.ba,c.ba,c.ea,g,f,h));e==c.ee&&(k=g==c.zb&&f.mediaElement==h.mediaElement?
421
+ c.zb:c.ea);if(e==c.ba||e==c.zb)k=c.ea;e==c.ea&&(k=h.mediaElement&&f.mediaElement==h.mediaElement?c.W:c.P);return k},zf:function(e,f,g){c.dispatchEvent($l("onstatechange",(new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return G(function(f){return 1==f.g?u(f,Rl(c,e),2):f.return(e.mediaElement?c.W:c.P)})},gg:function(e){c.dispatchEvent($l("onstateidle",(new Map).set("state",e.name)))}});this.bf=new P(function(){Kd(c.i.variants,c.h.restrictions,c.fc)&&am(c)});a&&this.Zb(a,
422
+ !0)}qa(V,Te);function bm(a){null!=a.L&&(a.L.release(),a.L=null)}function cm(a,b){if(b.lcevc.enabled){var c=a.Ya();c&&c[0]&&c[0].videoMimeType==dm.ts&&(qc()||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Xa("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));bm(a);null==a.L&&(a.L=new Fi(a.g,a.df,b.lcevc),a.G&&(a.G.F=a.L))}else bm(a)}function $l(a,b){return new S(a,b)}q=V.prototype;
423
+ q.destroy=function(){var a=this,b;return G(function(c){switch(c.g){case 1:if(a.l==em)return c.return();bm(a);a.l=em;b=Jk(a.Ga,function(){return{node:a.P,payload:Fk(),hb:!1}});return u(c,new Promise(function(d){b.Kb=function(){};b.cd=function(){d()};b.nb=function(){d()};b.onError=function(){d()};b.ed=function(){d()}}),2);case 2:return u(c,a.Ga.destroy(),3);case 3:a.Yc&&(a.Yc.release(),a.Yc=null);a.Yb&&(a.Yb.release(),a.Yb=null);a.u&&(a.u.release(),a.u=null);a.Od=null;a.h=null;a.o=null;a.Vc=null;a.V=
424
+ null;if(!a.D){c.B(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:a.s&&(a.s.release(),a.s=null),Te.prototype.release.call(a),B(c)}})};q.Zb=function(a,b){b=void 0===b?!0:b;if(this.l==em)return Promise.reject(fm());var c=Fk();c.mediaElement=a;nc()||(b=!1);var d=b?this.xb:this.W;a=Jk(this.Ga,function(){return{node:d,payload:c,hb:!1}});a.Kb=function(){};return gm(a)};q.mf=function(a){this.df=a};
425
+ q.detach=function(){var a=this;if(this.l==em)return Promise.reject(fm());var b=Jk(this.Ga,function(){return{node:a.P,payload:Fk(),hb:!1}});b.Kb=function(){};return gm(b)};q.se=function(a){var b=this;a=void 0===a?!0:a;if(this.l==em)return Promise.reject(fm());this.ec=!1;nc()||(a=!1);bm(this);var c=Fk(),d=Jk(this.Ga,function(e){var f=e.mediaElement&&a?b.xb:e.mediaElement?b.W:b.P;c.mediaElement=e.mediaElement;return{node:f,payload:c,hb:!1}});d.Kb=function(){};return gm(d)};q.Hg=function(a){this.hc=a};
426
+ q.load=function(a,b,c){var d=this;this.hc=null;this.ec=!1;if(this.l==em)return Promise.reject(fm());this.dispatchEvent($l("loading"));var e=Fk();e.uri=a;e.oe=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=hm(this,e)?this.zb:this.ba,g=Jk(this.Ga,function(h){if(null==h.mediaElement)return null;e.mediaElement=h.mediaElement;return{node:f,payload:e,hb:!0}});this.o=new Ll;this.V=im(this);g.Kb=function(){};return new Promise(function(h,k){g.ed=function(){return k(new O(2,7,7002))};g.cd=
427
+ function(){h();d.dispatchEvent($l("loaded"))};g.nb=function(){return k(fm())};g.onError=function(l){return k(l)}})};function hm(a,b){if(!nc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Tg(d),c=dm[c]);if(c){if(""==(b.mediaElement||pc()).canPlayType(c))return!1;if(!nc()||!(c in Sg||Tg(d)in Ug)||("application/x-mpegurl"===c||"application/vnd.apple.mpegurl"===c)&&a.h.streaming.preferNativeHls)return!0;if(vc())return a.h.streaming.useNativeHlsOnSafari}return!1}
428
+ function Ql(a,b,c){null==b.mediaElement&&(b.mediaElement=c.mediaElement,a.Yb.C(b.mediaElement,"error",function(){var d=jm(a);d&&km(a,d)}));a.g=b.mediaElement;return Promise.resolve()}
429
+ function Rl(a,b){var c,d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:return a.l!=em&&(a.l=Ml),c=a.$b.map(function(n){return n()}),a.$b=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent($l("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;a.Fa&&(a.Fa.release(),a.Fa=null);b.mediaElement&&a.u.ob();a.bf.stop();a.yb&&(a.yb.release(),a.yb=null);a.Wc&&(a.Wc.stop(),a.Wc=null);if(!a.J){p.B(3);break}return u(p,a.J.stop(),4);case 4:a.J=null,a.Zc=null;case 3:if(!a.s){p.B(5);break}return u(p,a.s.stop(),
430
+ 5);case 5:if(!a.j){p.B(7);break}return u(p,a.j.destroy(),8);case 8:a.j=null;case 7:a.H&&(a.H.release(),a.H=null);a.A&&(a.A.release(),a.A=null);if(!a.G){p.B(9);break}return u(p,a.G.destroy(),10);case 10:a.G=null;case 9:if(a.F)a.F.onAssetUnload();if(!b.mediaElement||!b.mediaElement.src){p.B(11);break}return u(p,new Promise(function(n){return(new P(n)).O(.1)}),12);case 12:for(b.mediaElement.removeAttribute("src"),b.mediaElement.load();b.mediaElement.lastChild;)b.mediaElement.removeChild(b.mediaElement.firstChild);
431
+ case 11:if(!a.m){p.B(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.Ob=null;a.M=null;if(a.i){d=r(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new Ll;a.Vd=null;lm(a);B(p)}})}
432
+ function Sl(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.Vd=c,e=mm(b.mediaElement,d,function(k,l,m){nm(a,k,l,m)},a.L),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.H=g,u(h,e.J,2);a.G=e;B(h)})}
433
+ function Tl(a,b,c){var d,e,f,g;return G(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.D,a.Ob=d,f=a,u(h,Rg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Zc=h.h;a.J=a.Zc();g=Ue(a.h.manifest);c.mediaElement&&"AUDIO"===c.mediaElement.nodeName&&(g.disableVideo=!0);a.J.configure(g);B(h)})}
434
+ function Ul(a,b){var c=b.uri;b=a.D;a.Fa=new Uj(function(){return a.vc()});a.Fa.addEventListener("regionadd",function(f){f=f.region;om(a,"timelineregionadded",f);if(a.F)a.F.onDashTimedMetadata(f)});a.ka=null;a.h.streaming.observeQualityChanges&&(a.ka=new Qj(function(){return a.Ma()}),a.ka.addEventListener("qualitychange",function(f){var g=f.quality;f=f.position;g=(new Map).set("mediaQuality",{bandwidth:g.bandwidth,audioSamplingRate:g.audioSamplingRate,codecs:g.codecs,contentType:g.contentType,frameRate:g.frameRate,
435
+ height:g.height,mimeType:g.mimeType,channelsCount:g.channelsCount,pixelAspectRatio:g.pixelAspectRatio,width:g.width}).set("position",f);a.dispatchEvent($l("mediaqualitychanged",g))}));var d={networkingEngine:b,modifyManifestRequest:function(f,g){var h=a.V;try{h.g.enabled&&(h.o=g.format,ll(h,f,{ot:ol,su:!h.i}))}catch(k){Ya("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",k)}},modifySegmentRequest:function(f,g){bl(a.V,f,g)},filter:function(f){return pm(a,f)},makeTextStreamsForClosedCaptions:function(f){return qm(a,
436
+ f)},onTimelineRegionAdded:function(f){var g=a.Fa;a:{var h=r(g.g);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.schemeIdUri==f.schemeIdUri&&k.id==f.id&&k.startTime==f.startTime&&k.endTime==f.endTime){h=k;break a}h=null}null==h&&(g.g.add(f),f=new S("regionadd",new Map([["region",f]])),g.dispatchEvent(f))},onEvent:function(f){return a.dispatchEvent(f)},onError:function(f){return km(a,f)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
437
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(f){var g=a.m?a.m.g:null;g&&a.m.u&&rm(a,g.keySystem,f)}},e=Date.now()/1E3;return new Ke(function(){var f,g,h,k;return G(function(l){if(1==l.g)return f=a,u(l,a.J.start(c,d),2);f.i=l.h;g=$l("manifestparsed");a.dispatchEvent(g);if(0==a.i.variants.length)throw new O(2,4,4036);sm(a.i);h=Date.now()/1E3;k=h-e;a.o.F=k;B(l)})}(),function(){return a.J.stop()})}
438
+ function Vl(a,b){var c,d;return G(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=tm(a,{lb:a.D,onError:function(f){km(a,f)},dd:function(f){um(a,f)},onExpirationUpdated:function(f,g){vm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c,a.L&&(f=a.L,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,lg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Zb(b.mediaElement),3):u(e,pm(a,a.i),0)})}
439
+ function Wl(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D,z;return G(function(A){switch(A.g){case 1:b.startTime=c.startTime;null!=a.hc&&(b.startTime=a.hc,a.hc=null);d=b.mediaElement;e=b.uri;a.Ob=e;a.H=new Mj({Uc:function(){return d.playbackRate},Qc:function(){return d.defaultPlaybackRate},me:function(E){d.playbackRate=E},Oe:function(E){d.currentTime+=E}});f=function(){return wm(a)};g=function(){return xm(a)};a.u.C(d,"playing",f);a.u.C(d,"pause",f);a.u.C(d,"ended",f);a.u.C(d,"ratechange",g);cm(a,a.h);
440
+ h=a.h.abrFactory;a.s&&a.Od==h||(a.Od=h,a.s=h(),"function"!=typeof a.s.setMediaElement&&(qe("AbrManager","Please use an AbrManager with setMediaElement function."),a.s.setMediaElement=function(){}),a.s.configure(a.h.abr));a.vb=new ze(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.wb=a.h.preferredTextLanguage;a.dc=a.h.preferredTextRole;a.ac=a.h.preferForcedSubs;ym(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.s.init(function(E,F,H){a.j&&E!=a.j.l&&
441
+ zm(a,E,!0,void 0===F?!1:F,void 0===H?0:H)});a.s.setMediaElement(d);wd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Am(a);a.j.configure(a.h.streaming);a.l=Bm;d.textTracks&&a.u.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":Cm(a,E)}});a.dispatchEvent($l("streaming"));k=null;(l=a.j.l)||(k=am(a));m=[];p=l||k;n=r([p.video,p.audio]);for(t=n.next();!t.done;t=n.next())(v=t.value)&&!v.segmentIndex&&
442
+ m.push(v.createSegmentIndex());if(!(0<m.length)){A.B(2);break}return u(A,Promise.all(m),2);case 2:a.A=Dm(a,b.startTime);a.yb=Em(a);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Fm(a,y);if(l){A.B(4);break}zm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){A.B(5);break}w=a.A.Jc();return u(A,Gm(k,w),6);case 6:x=A.h,a.A.Bd(x);case 5:Hm(a,null,Zd(k));case 4:return a.A.zd(),D=a.Gb().find(function(E){return E.active}),D||((z=ie(a.i.textStreams,a.wb,a.dc,a.ac)[0]||null)&&Kl(a.o.h,z,!0),
443
+ k&&(z?(k.audio&&Im(a,k.audio,z)&&(a.ca=!0),a.ca&&a.G.m.setTextVisibility(!0),Jm(a)):a.ca=!1),z&&(a.h.streaming.alwaysStreamText||a.Id())&&nk(a.j,z)),u(A,a.j.start(),7);case 7:a.h.abr.enabled&&(a.s.enable(),Km(a)),Nd(a.j?a.j.l:null,a.i),Lm(a.i),Mm(a),Nm(a),a.i.variants.some(function(E){return E.primary}),a.ec=!0,a.u.ia(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.oe}),B(A)}})}
444
+ function Xl(a,b,c){var d,e,f,g,h,k,l;return G(function(m){return 1==m.g?(d=jc,e=Date.now()/1E3,f=!0,a.m=tm(a,{lb:a.D,onError:function(p){km(a,p)},dd:function(p){um(a,p)},onExpirationUpdated:function(p,n){vm(a,p,n)},onEvent:function(p){a.dispatchEvent(p);"drmsessionupdate"==p.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Tg(g),k=dm[h],"application/x-mpegurl"==k&&vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
445
+ primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?bd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
446
+ a.m.W=!0,u(m,lg(a.m,[l],[]),2)):u(m,a.m.Zb(b.mediaElement),0)})}
447
+ function Yl(a,b,c){function d(){return wm(a)}b.uri=c.uri;b.startTime=c.startTime;a.Ob=b.uri;var e=b.mediaElement;a.A=new Aj(e);var f=!1;a.$b.push(function(){f=!0});null!=b.startTime&&a.A.Bd(b.startTime);a.H=new Mj({Uc:function(){return e.playbackRate},Qc:function(){return e.defaultPlaybackRate},me:function(k){e.playbackRate=k},Oe:function(k){e.currentTime+=k}});Fm(a,a.h.streaming.rebufferingGoal);a.u.C(e,"playing",d);a.u.C(e,"pause",d);a.u.C(e,"ended",d);a.u.C(e,"ratechange",function(){return xm(a)});
448
+ "none"!=e.preload&&a.u.ia(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.oe});e.audioTracks&&(a.u.C(e.audioTracks,"addtrack",function(){return Mm(a)}),a.u.C(e.audioTracks,"removetrack",function(){return Mm(a)}),a.u.C(e.audioTracks,"change",function(){return Mm(a)}));e.textTracks&&(a.u.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Om(a,k);break;case "chapters":Cm(a,k);break;default:Mm(a)}}),a.u.C(e.textTracks,"removetrack",function(){return Mm(a)}),
449
+ a.u.C(e.textTracks,"change",function(){return Mm(a)}));var g=Tg(b.uri);e.src=ml(a.V,b.uri,dm[g]);(tc()||sc("Web0S"))&&e.load();a.l=Pm;a.dispatchEvent($l("streaming"));var h=new kc;rj(e,HTMLMediaElement.HAVE_METADATA,a.u,function(){a.A.zd();h.resolve()});rj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){var k;return G(function(l){if(1==l.g)return Qm(a),k=Rm(a),k.find(function(m){return"disabled"!=m.mode})?(0<k.length&&(a.ca=!0),l.B(2)):u(l,new Promise(function(m){a.u.ia(e.textTracks,"change",
450
+ m);(new P(m)).O(1)}),2);if(f)return l.return();Sm(a);B(l)})});e.error?h.reject(jm(a)):"none"==e.preload&&(Xa('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.u.ia(e,"error",function(){h.reject(jm(a))});return(new Ke(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})).Z(function(){a.ec=
451
+ !0})}function Qm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.he(b);var c=a.h.preferredVariantRole;""!=c&&a.he(b,c)}}function Sm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ie(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ie(b,d,c)}}
452
+ function Om(a,b){if("metadata"==b.kind){b.mode="hidden";a.u.C(b,"cuechange",function(){if(b.activeCues)for(var d=r(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Tm(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new P(function(){var d=Um(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Nb().O(.5);a.$b.push(function(){c.stop()})}}
453
+ function nm(a,b,c,d){b=r(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=r(e.frames),k=h.next();!k.done;k=h.next())Tm(a,f,g,"org.id3",k.value);if(a.F)a.F.onHlsTimedMetadata(e,f)}}function Tm(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent($l("metadata",b))}
454
+ function Cm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new P(function(){b.mode="hidden"})).Nb().O(.5);a.$b.push(function(){c.stop()})}}function sm(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 tm(a,b){return new eg(b,a.h.drm.updateExpirationTime)}
455
+ function Ol(a){return new Ye(function(b,c){a.s&&a.s.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent($l("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent($l("downloadfailed",b))})}
456
+ function Dm(a,b){return new Bj(a.g,a.i,a.h.streaming,b,function(){a.yb&&Pj(a.yb,!0);a.j&&a.j.wc();a.M&&Vm(a)},function(c){return a.dispatchEvent(c)})}
457
+ function Em(a){var b=new Vj(a.Fa);b.addEventListener("enter",function(d){om(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){om(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(om(a,"timelineregionenter",e),om(a,"timelineregionexit",e))});var c=new Oj(a.g);c.g.add(b);a.ka&&c.g.add(a.ka);return c}function Fm(a,b){a.M=new De;a.M.g=Fe;Ge(a.M,b,Math.min(.5,b/2));lm(a);a.Wc=(new P(function(){Vm(a)})).Ca(.25)}
458
+ function Vm(a){switch(a.l){case Pm:if(a.g.ended)var b=!0;else{var c=si(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Bm:a:if(a.g.ended||Qi(a.G))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.gb();var d=si(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ui(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ee:Fe;c.g=d;b!=d&&lm(a)}function mm(a,b,c,d){return new Ki(a,b,c,d)}
459
+ function im(a){return new al({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Ma:function(){return a.Ma()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ya:function(){return a.Ya()},Sc:function(){return a.Sc()},U:function(){return a.U()}},a.h.cmcd)}
460
+ function Am(a){return new bk(a.i,{Tc:function(){return a.A?a.A.Jc():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},modifySegmentRequest:function(b,c){bl(a.V,b,c)},N:a.G,lb:a.D,onError:function(b){return km(a,b)},onEvent:function(b){return a.dispatchEvent(b)},ig:function(){a.J&&a.J.update&&a.J.update()},Xd:function(b,c,d){a.A&&a.A.Pe();Vm(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent($l("segmentappended",b))},hg:function(b,c){(c=c.Pd)&&a.ka&&
461
+ Sj(a.ka,c,b)},ye:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&!d.J&&["audio","video"].includes(b)){c=new If(L(c));var e=0,f=r(c.data);for(b=f.next();!b.done;b=f.next())e+=b.value.length;if(0==e)d=Promise.resolve();else{e=new Uint8Array(e);f=0;c=r(c.data);for(b=c.next();!b.done;b=c.next())b=b.value,e.set(b,f),f+=b.length;ug(d,"cenc",e);d=d.o}}else d=Promise.resolve();return d},jg:function(b,c,d){nm(a,b,c,d)}})}
462
+ q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=wl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(qe("streaming.forceTransmuxTS configuration","Please Use streaming.forceTransmux instead."),a.streaming.forceTransmux=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=
463
+ .01));var c=El(this.h,a,Nl(this));Wm(this);return c};
464
+ function Wm(a){if(a.J){var b=Ue(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Xm(a,a.i)}catch(f){km(a,f)}a.s&&Nm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Ym(a)}a.D&&a.D.ke(a.h.streaming.forceHTTPS);if(a.G&&(a.G.configure(a.h.mediaSource),a.G.H=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Vd!=b)){var c=b(),d=a.G,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
465
+ e.destroy());d.g&&(d.g.j=c);a.Vd=b;a.j&&(b=a.j,(c=b.j.get(ic))&&lk(b,c.stream,!0,0,!0))}a.s&&(a.s.configure(a.h.abr),a.h.abr.enabled?a.s.enable():a.s.disable(),Km(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ge(a.M,b,Math.min(.5,b/2)));a.i&&ym(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}q.getConfiguration=function(){var a=Nl(this);El(a,this.h,Nl(this));return a};
466
+ q.Cf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.vc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};q.tg=function(){for(var a in this.h)delete this.h[a];El(this.h,Nl(this),Nl(this));Wm(this)};q.If=function(){return this.l};q.Mf=function(){return this.g};q.kc=function(){return this.D};q.Ed=function(){return this.Ob};
467
+ q.He=function(){return this.F?this.F:null};q.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};q.jb=function(){return this.i?this.i.presentationTimeline.jb():!1};q.$f=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
468
+ q.vc=function(){if(!this.ec)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.Eb(),end:a.Na()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.Yf=function(){this.U()&&(this.g.currentTime=this.vc().end)};q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.m?this.m.g:null};q.jc=function(){return this.m?this.m.jc():Infinity};
469
+ q.Rc=function(){return this.m?this.m.Rc():{}};q.Gd=function(){return this.M?this.M.g==Fe:!1};q.Sc=function(){return this.g?this.H?this.H.i:1:0};q.Cg=function(a){0==a?Xa("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==Bm&&(this.s.playbackRateChanged(a),kk(this.j,1<Math.abs(a))))};q.qf=function(){var a=this.H.Qc();this.l==Pm&&this.H.set(a);this.l==Bm&&(this.H.set(a),this.s.playbackRateChanged(a),kk(this.j,!1))};
470
+ q.Ya=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=r(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ge(e)){var f=Zd(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 fe(g)}):[]};
471
+ q.Gb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=r(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=$d(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Rm(this).map(function(f){return de(f)}):[]};q.Gf=function(){return this.i?this.i.imageStreams.map(function(a){return ae(a)}):[]};
472
+ q.Uf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D,z,A,E,F;return G(function(H){if(1==H.g)return c.i?(d=c.i.imageStreams.find(function(I){return I.id==a}))?d.segmentIndex?H.B(3):u(H,d.createSegmentIndex(),3):H.return(null):H.B(2);if(2!=H.g){e=d.segmentIndex.find(b);if(null==e)return H.return(null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return H.return(null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;t=l/p;v=m*p;
473
+ y=f.l-f.startTime;w=f.s||y/v;x=f.startTime;z=D=0;1<v&&(A=Math.floor((b-f.startTime)/w),x=f.startTime+A*w,D=A%m*n,z=Math.floor(A/m)*t);E=!1;if(F=f.o)E=!0,t=F.height,D=F.positionX,z=F.positionY,n=F.width;return H.return({imageHeight:l,imageWidth:k,height:t,positionX:D,positionY:z,startTime:x,duration:w,uris:f.ya(),width:n,sprite:E})}return H.return(null)})};
474
+ q.Te=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Kl(this.o.h,b,!1),nk(this.j,b),Zm(this),this.wb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Rm(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,be(c)==a.id?c.mode=this.ca?"showing":"hidden":c.mode="disabled";Zm(this)}};
475
+ q.Ue=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Xa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ge(d)&&(zm(this,d,!1,b,c),this.vb=new ye(d),Nm(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,
476
+ be(c)==a.id){$m(this,c);break}};q.Bf=function(){return an(this.Ya())};q.Sf=function(){return an(this.Gb())};q.Af=function(){return Array.from(bn(this.Ya()))};q.Rf=function(){return Array.from(bn(this.Gb()))};
477
+ q.he=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.A){this.vb=new ze(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.vb.create(this.i.variants);c=null;d=r(d.values());for(var e=d.next();!e.done;e=d.next())if(e=e.value,!c||b(c,a)>b(e,a))c=e;c?(b=Zd(c),this.Ue(b,!0)):Ym(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
478
+ a=nd(a);d=c=null;e=r(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=fe(f);nd(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?$m(this,d):c&&$m(this,c)}};
479
+ q.ie=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.A){if(this.wb=a,this.dc=b||"",this.ac=c,(a=ie(this.i.textStreams,this.wb,this.dc,this.ac)[0]||null)&&a!=this.j.o&&(Kl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Id()))nk(this.j,a),Zm(this)}else{var d=nd(a);(a=this.Gb().find(function(e){return nd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Te(a)}};
480
+ q.vg=function(a){if(this.i&&this.A){for(var b=null,c=r(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.vb=new ze(b.language,"",0,a),Ym(this))}else if(this.g&&this.g.audioTracks){c=Array.from(this.g.audioTracks);b=null;c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,d.label==a&&(b=d);b&&$m(this,b)}};
481
+ q.Id=function(){var a=this.ca;return this.G?this.G.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Rm(this).some(function(b){return"showing"==b.mode}):a};q.Ie=function(){return this.g&&this.g.src&&this.g.textTracks?cn(this).map(function(a){return de(a)}):[]};
482
+ q.Df=function(a){var b=nd(a),c=cn(this).filter(function(h){return nd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=r(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=r(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
483
+ function Rm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Um(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function cn(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
484
+ q.Ag=function(a){a=!!a;if(this.ca!=a){this.ca=a;if(this.l==Bm)this.G.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=ie(this.i.textStreams,this.wb,this.dc,this.ac),0<a.length&&(nk(this.j,a[0]),Zm(this))):jk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Rm(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")}Jm(this)}};
485
+ q.Pf=function(){if(!this.U())return null;var a=this.Ga.l,b=0;if(this.A)b=this.A.Jc();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.i+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
486
+ q.Je=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};q.Ma=function(){if(this.l==Bm)return this.G.Ma();var a={total:[],audio:[],video:[],text:[]};this.l==Pm&&(a.total=vi(this.g.buffered));return a};
487
+ q.getStats=function(){if(this.l!=Bm&&this.l!=Pm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};wm(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
488
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.A&&(this.o.M=this.A.ue(),this.o.P=this.A.ve());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.L=Number(c.droppedVideoFrames);b.J=d;this.o.H=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.H?c.H:NaN):c=NaN;this.o.s=c;if(this.l==Bm){if(c=this.j.l)this.o.A=(this.H?this.H.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.U()&&(c=this.Je().valueOf()+
489
+ 1E3*this.vc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.s.getBandwidthEstimate();this.o.u=c}this.l==Pm&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.A;d=e.J;var f=e.L,g=e.H,h=e.P,k=e.M,l=e.u,m=e.i,p=e.m,n=e.F,t=e.j,v=Hl(e.g,"playing"),y=Hl(e.g,"paused"),w=Hl(e.g,"buffering"),x=e.s,D=e.D,z=e.G,A=Il(e.g),E=[];e=r(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
490
+ id:F.id,type:F.type,fromAdaptation:F.fromAdaptation,bandwidth:F.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:p,manifestTimeSeconds:n,drmTimeSeconds:t,playTime:v,pauseTime:y,bufferingTime:w,licenseTime:x,liveLatency:D,maxSegmentDuration:z,stateHistory:A,switchHistory:E}};
491
+ q.jf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,t,v,y,w,x,D;return G(function(z){switch(z.g){case 1:if(h.l!=Bm&&h.l!=Pm)throw new O(1,7,7004);if(d){z.B(2);break}return u(z,dn(h,a),3);case 3:d=z.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(A){}if(h.l!=Pm){z.B(4);break}g&&(c="forced");return u(z,en(h,a,b,c,d,f||"",k),5);case 5:l=h.Gb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Mm(h),z.return(m);throw new O(1,2,2012);case 4:p=
492
+ jc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new O(1,4,4033);if(!k.length){z.B(6);break}return u(z,fn(h,a,h.D,h.h.streaming.retryParameters),7);case 7:t=z.h,v=gn(h,t,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ni(y),d="text/vtt";case 6:w={id:h.Zd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Kj(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.X,primary:!1,trickModeVideo:null,
493
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};x=Yc(w.mimeType,w.codecs);D=dd(x);if(!D)throw new O(2,2,2014,d);h.i.textStreams.push(w);Mm(h);return z.return($d(w))}})};
494
+ q.kf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D;return G(function(z){switch(z.g){case 1:if(c.l!=Bm&&c.l!=Pm)throw new O(1,7,7004);if(c.l==Pm)throw new O(1,2,2016);if(b){z.B(2);break}return u(z,dn(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=jc;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new O(1,4,4045);return u(z,fn(c,a,c.D,c.h.streaming.retryParameters),4);case 4:f=z.h;g=ed[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
495
+ segmentEnd:e,vttOffset:0};l=L(f);m=h.parseMedia(l,k);p=[];n={};t=r(m);for(v=t.next();!v.done;n={Sb:n.Sb},v=t.next())y=v.value,n.Sb=dc([a],[y.payload])[0],w=new T(y.startTime,y.endTime,function(A){return function(){return[A.Sb]}}(n),0,null,null,0,0,Infinity),n.Sb.includes("#xywh")&&(x=n.Sb.split("#xywh=")[1].split(","),4===x.length&&w.Ze({height:parseInt(x[3],10),positionX:parseInt(x[0],10),positionY:parseInt(x[1],10),width:parseInt(x[2],10)})),p.push(w);D={id:c.Zd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
496
+ segmentIndex:new Hj(p),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Xb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(D);Mm(c);return z.return(ae(D))}})};
497
+ q.hf=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=Bm&&d.l!=Pm)throw new O(1,7,7004);if(c){k.B(2);break}return u(k,dn(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,en(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Ie();h=g.find(function(l){return l.language==b});if(!h){k.B(5);break}return u(k,new Promise(function(l,m){d.u.ia(f,"load",l);d.u.ia(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k.return(h);
498
+ case 5:throw new O(1,2,2012);}})};function dn(a,b){var c,d;return G(function(e){switch(e.g){case 1:c=Tg(b);if(d=hn[c])return e.return(d);C(e,2);return u(e,Vg(b,a.D,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:wa(e);case 3:if(d)return e.return(d);throw new O(1,2,2011,c);}})}
499
+ function en(a,b,c,d,e,f,g){var h,k,l,m;return G(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,fn(a,b,a.D,a.h.streaming.retryParameters),3):p.B(2);2!=p.g&&(h=p.h,k=gn(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ni(l),e="text/vtt");m=document.createElement("track");var n=a.V,t=b;try{if(n.g.enabled){var v=nl(n);v.ot=tl;v.su=!0;var y=pl(v);var w=ql(t,y)}else w=t}catch(x){Ya("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=t}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
500
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p.return(m)})}function fn(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){e=hf;f=bf([b],d);f.method="GET";var k=a.V;try{k.g.enabled&&ll(k,f,{ot:tl,su:!0})}catch(l){Ya("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
501
+ function gn(a,b,c,d){var e=ed[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=L(b),b=c.parseMedia(b,a),$k(b,d);throw new O(2,2,2014,c);}q.le=function(a,b){this.fc.width=a;this.fc.height=b};q.de=function(a){if(this.l==Bm){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=r(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.oc||d.sa||d.Ka||(d.oc=!1,ik(b,d,a));b=!0}}else b=!1;return b};
502
+ q.Jf=function(){Xa("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Kf=function(){return this.Zc};
503
+ function Nl(a){var b=Cl();b.streaming.failureCallback=function(c){if(a.U()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.de(d))}};b.textDisplayFactory=function(){return a.Vc?new Sk(a.g,a.Vc):new Nk(a.g)};return b}q.af=function(a){this.Vc=a};
504
+ function qm(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 Lj;h={id:a.Zd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
505
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:ic,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function pm(a,b){return G(function(c){if(1==c.g)return u(c,jn(a,b),2);Xm(a,b);B(c)})}
506
+ function jn(a,b){var c;return G(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Ld(c,b),2);Lm(b);B(d)})}function Xm(a,b){if(a.l!=em){Kd(b.variants,a.h.restrictions,a.fc)&&a.j&&Mm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=r(b.variants),e=d.next();!e.done;e=d.next())e=e.value,rm(a,c.keySystem,e.video),rm(a,c.keySystem,e.audio);kn(a,b)}}
507
+ function rm(a,b,c){if(c){c=r(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=r(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,ug(a.m,e.initDataType,e.initData)}}}
508
+ function Gm(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return G(function(t){if(1==t.g)return k?u(t,k.createSegmentIndex(),2):t.return(null);p=(m=k.segmentIndex.Db(l))?m.next().value:null;if(!p)return t.return(null);n=p.startTime;return t.return(n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
509
+ function lm(a){var b=a.Gd();if(a.o&&a.M&&a.A){var c=a.H;c.j=b;Nj(c);a.V&&(c=a.V,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);wm(a)}b=(new Map).set("buffering",b);a.dispatchEvent($l("buffering",b))}function xm(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=$l("ratechange"),a.dispatchEvent(b))}function wm(a){if(a.o&&a.M){var b=a.o.g;a.M.g==Fe?Gl(b,"buffering"):a.g.paused?Gl(b,"paused"):a.g.ended?Gl(b,"ended"):Gl(b,"playing")}}
510
+ function Nm(a){try{kn(a,a.i)}catch(c){return km(a,c),!1}var b=a.i.variants.filter(function(c){return ge(c)});b=a.vb.create(b);a.s.setVariants(Array.from(b.values()));return!0}function am(a){return Nm(a)?a.s.chooseVariant():null}function Ym(a){var b=am(a);b&&zm(a,b,!0,!0,0)}
511
+ function zm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&mk(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));mk(a.j,b,d,e,void 0,c);d=null;f&&(d=Zd(f));b=Zd(b);c?Hm(a,d,b):ln(a,d,b)}}function $m(a,b){var c=Array.from(a.g.audioTracks).find(function(d){return d.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=fe(c);b=fe(b);ln(a,c,b)}
512
+ function Im(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=nd(a.h.preferredTextLanguage);c=nd(c.language);if(2==a.h.autoShowText)return md(c,d);if(3==a.h.autoShowText)return a=nd(b.language),md(c,d)&&!md(a,c);Xa("Invalid autoShowText setting!");return!1}function Hm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Gi(a.L,c);c=$l("adaptation",b);mn(a,c)}function Mm(a){var b=$l("trackschanged");mn(a,b)}
513
+ function ln(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.L&&Gi(a.L,c);c=$l("variantchanged",b);mn(a,c)}function Zm(a){var b=$l("textchanged");mn(a,b)}function Jm(a){var b=$l("texttrackvisibility");mn(a,b)}function Km(a){var b=(new Map).set("newStatus",a.h.abr.enabled);mn(a,$l("abrstatuschanged",b))}
514
+ function nn(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||a.l!=Bm||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;b=a.Ya().find(function(g){return g.active});for(var d=a.i,e=r(d.variants),f=e.next();!f.done;f=e.next())f=f.value,f.id===b.id&&(f.disabledUntilTime=Date.now()/1E3+c);Kd(d.variants,a.h.restrictions,a.fc);b=am(a);if(!b)return!1;d=a.Ma().video.reduce(function(g,h){return g+h.end-h.start},0);zm(a,b,!1,!0,d);a.bf.O(c);return!0}
515
+ function km(a,b){if(a.l!=em)if(nn(a,b))b.handled=!0;else{var c=$l("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function om(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($l(b,c))}
516
+ function jm(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)}
517
+ function um(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!on.includes(l)}h!=f.allowedByKeySystem&&
518
+ (e=!0)}}}if(!e||Nm(a))(b=a.j.l)&&!b.allowedByKeySystem&&Ym(a),e&&Mm(a)}}function vm(a,b,c){if(a.J&&a.J.onExpirationUpdated)a.J.onExpirationUpdated(b,c);b=$l("expirationupdated");a.dispatchEvent(b)}function ym(a,b,c){0<b&&(a.U()||a.$e(b));b=a.getDuration();c<b&&(a.U()||a.Aa(c))}
519
+ function kn(a,b){a=a.m?a.m.Rc():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=r(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=r(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=r(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var p=a[c?"00":m];p?on.includes(p)&&g.add(p):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
520
+ missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new O(2,4,4012,a);}function Lm(a){if(!a.variants.some(ge))throw new O(2,4,4032);}function mn(a,b){G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=em&&a.dispatchEvent(b);B(c)})}function bn(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(nd(c.language)):b.add("und");return b}
521
+ function an(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=nd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=r(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var p=null;c.has(l)&&c.get(l).has(m)&&(p=c.get(l).get(m));
522
+ h.push({language:l,role:m,label:p})}});return h}function fm(){return new O(2,7,7E3)}function Zl(a,b,c,d,e,f){return d==a&&e.mediaElement==f.mediaElement&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Fk(){return{mediaElement:null,mimeType:null,startTime:null,oe:NaN,uri:null}}function gm(a){return new Promise(function(b,c){a.nb=function(){return c(fm())};a.cd=function(){return b()};a.onError=function(d){return c(d)};a.ed=function(){return c(fm())}})}K("shaka.Player",V);
523
+ V.prototype.setVideoContainer=V.prototype.af;V.prototype.getManifestParserFactory=V.prototype.Kf;V.prototype.getManifest=V.prototype.Jf;V.prototype.retryStreaming=V.prototype.de;V.prototype.setMaxHardwareResolution=V.prototype.le;V.prototype.addChaptersTrack=V.prototype.hf;V.prototype.addThumbnailsTrack=V.prototype.kf;V.prototype.addTextTrackAsync=V.prototype.jf;V.prototype.getStats=V.prototype.getStats;V.prototype.getBufferedInfo=V.prototype.Ma;V.prototype.getPresentationStartTimeAsDate=V.prototype.Je;
524
+ V.prototype.getPlayheadTimeAsDate=V.prototype.Pf;V.prototype.setTextTrackVisibility=V.prototype.Ag;V.prototype.getChapters=V.prototype.Df;V.prototype.getChaptersTracks=V.prototype.Ie;V.prototype.isTextTrackVisible=V.prototype.Id;V.prototype.selectVariantsByLabel=V.prototype.vg;V.prototype.selectTextLanguage=V.prototype.ie;V.prototype.selectAudioLanguage=V.prototype.he;V.prototype.getTextLanguages=V.prototype.Rf;V.prototype.getAudioLanguages=V.prototype.Af;V.prototype.getTextLanguagesAndRoles=V.prototype.Sf;
525
+ V.prototype.getAudioLanguagesAndRoles=V.prototype.Bf;V.prototype.selectVariantTrack=V.prototype.Ue;V.prototype.selectTextTrack=V.prototype.Te;V.prototype.getThumbnails=V.prototype.Uf;V.prototype.getImageTracks=V.prototype.Gf;V.prototype.getTextTracks=V.prototype.Gb;V.prototype.getVariantTracks=V.prototype.Ya;V.prototype.cancelTrickPlay=V.prototype.qf;V.prototype.trickPlay=V.prototype.Cg;V.prototype.getPlaybackRate=V.prototype.Sc;V.prototype.isBuffering=V.prototype.Gd;V.prototype.getKeyStatuses=V.prototype.Rc;
526
+ V.prototype.getExpiration=V.prototype.jc;V.prototype.drmInfo=V.prototype.drmInfo;V.prototype.keySystem=V.prototype.keySystem;V.prototype.goToLive=V.prototype.Yf;V.prototype.seekRange=V.prototype.vc;V.prototype.isAudioOnly=V.prototype.$f;V.prototype.isInProgress=V.prototype.jb;V.prototype.isLive=V.prototype.U;V.prototype.getAdManager=V.prototype.He;V.prototype.getAssetUri=V.prototype.Ed;V.prototype.getNetworkingEngine=V.prototype.kc;V.prototype.getMediaElement=V.prototype.Mf;
527
+ V.prototype.getLoadMode=V.prototype.If;V.prototype.resetConfiguration=V.prototype.tg;V.prototype.getBufferFullness=V.prototype.Cf;V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.configure=V.prototype.configure;V.prototype.load=V.prototype.load;V.prototype.updateStartTime=V.prototype.Hg;V.prototype.unload=V.prototype.se;V.prototype.detach=V.prototype.detach;V.prototype.attachCanvas=V.prototype.mf;V.prototype.attach=V.prototype.Zb;
528
+ V.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return G(function(h){if(1==h.g)return b={},a?u(h,Lg(),3):h.B(2);2!=h.g&&(b=h.h);var k={};if(nc()){for(var l in Sg)k[l]=!0;for(var m in Ug)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=nc()?!!Sg[p]:oc(p);for(var n in l)k[n]=
529
+ nc()?!!Ug[n]:oc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(Wi));
530
+ k={};n=r(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=nc()?dd(l)?!0:db(l)||Sc(l):oc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=pn;for(g in f)e[g]=f[g]();return h.return(e)})};
531
+ V.isBrowserSupported=function(){window.Promise||Xa("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||sc("Trident/"))return!1;var a=xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:nc()?!0:oc("application/x-mpegurl")};V.setAdManagerFactory=function(a){Pl=a};
532
+ V.registerSupportPlugin=function(a,b){pn[a]=b};V.prototype.destroy=V.prototype.destroy;var em=0,Ml=1,Bm=2,Pm=3;V.LoadMode={DESTROYED:em,NOT_LOADED:Ml,MEDIA_SOURCE:Bm,SRC_EQUALS:Pm};V.version="v4.3.7";var qn=["4","3"];re=new function(a){this.g=a;this.i=se;this.h=te}(new pe(Number(qn[0]),Number(qn[1])));
533
+ var on=["output-restricted","internal-error"],pn={},Pl=null,dm={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"},hn={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
534
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function rn(){this.h=[];this.j=this.i=this.g=0};function W(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new lf;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=W.prototype;q.getDuration=function(){return this.h.getDuration()};q.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.g.getRemainingTime()};q.isPaused=function(){return this.i};
531
535
  q.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.g.getAdSkippableState()};q.skip=function(){return this.g.skip()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.resume()};q.getVolume=function(){return this.g.getVolume()};q.setVolume=function(a){return this.g.setVolume(a)};q.isMuted=function(){return 0==this.g.getVolume()};
532
536
  q.isLinear=function(){return this.h.isLinear()};q.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};q.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
533
537
  q.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.h.getTitle()};q.getDescription=function(){return this.h.getDescription()};q.release=function(){this.g=this.h=null};K("shaka.ads.ClientSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getDescription=W.prototype.getDescription;W.prototype.getTitle=W.prototype.getTitle;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;
534
538
  W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;
535
- W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function un(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new mf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.5");this.g=null;this.h.ma(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){vn(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
536
- function(f){wn(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()})}un.prototype.stop=function(){this.g&&this.g.stop();this.o&&Tk(this.o)};un.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function wn(a,b){b.getError();xn(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
537
- function vn(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}yn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,zn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
538
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,zn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,zn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,zn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
539
- {once:!0})}catch(e){xn(a,null)}}function zn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
540
- function yn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new S(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){wn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){An(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){An(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
541
- function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){xn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){xn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
539
+ W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function sn(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new lf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.3.7");this.g=null;this.h.ia(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){tn(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
540
+ function(f){un(e,f)});this.h.C(this.i,"ended",function(){e.m.contentComplete()})}sn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Rk(this.o)};sn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function un(a,b){b.getError();vn(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
541
+ function tn(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){b=[];c=r(c);for(var d=c.next();!d.done;d=c.next())b.push({start:d.value,end:null});a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",b)))}wn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,xn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
542
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,xn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,xn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,xn(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.h.ia(a.i,"play",function(){a.g.start()})}catch(e){vn(a,
543
+ null)}}function xn(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
544
+ function wn(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new S(d,c))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){un(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){yn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){yn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
545
+ function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){vn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){vn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
542
546
  a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
543
547
  a.h.C(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,
544
548
  google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
545
- function An(a,b){var c=b.getAd();c?(a.j=new W(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new S("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.muted?0:a.i.volume))):Wa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}function xn(a,b){a.l(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.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)};
549
+ function yn(a,b){var c=b.getAd();c?(a.j=new W(c,a.g,a.i),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new S("ad-started",b)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause(),a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))):Xa("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
550
+ function vn(a,b){a.l(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.ended||a.i.play())};function X(a,b){this.i=a;this.h=null;this.g=b}q=X.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)};
546
551
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return!0};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};
547
552
  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.getTitle=function(){return this.i.getTitle()};q.getDescription=function(){return this.i.getDescription()};q.release=function(){this.g=this.h=this.i=null};K("shaka.ads.ServerSideAd",X);X.prototype.release=X.prototype.release;X.prototype.getDescription=X.prototype.getDescription;X.prototype.getTitle=X.prototype.getTitle;
548
553
  X.prototype.getPositionInSequence=X.prototype.getPositionInSequence;X.prototype.getSequenceLength=X.prototype.getSequenceLength;X.prototype.setMuted=X.prototype.setMuted;X.prototype.resize=X.prototype.resize;X.prototype.isLinear=X.prototype.isLinear;X.prototype.isMuted=X.prototype.isMuted;X.prototype.setVolume=X.prototype.setVolume;X.prototype.getVolume=X.prototype.getVolume;X.prototype.play=X.prototype.play;X.prototype.pause=X.prototype.pause;X.prototype.skip=X.prototype.skip;
549
- X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;X.prototype.getDuration=X.prototype.getDuration;function Bn(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.B="";this.D=[];this.h=new mf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Cn(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
550
- e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.l);e.u&&(e.m.h=e.u);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
554
+ X.prototype.canSkipNow=X.prototype.canSkipNow;X.prototype.getTimeUntilSkippable=X.prototype.getTimeUntilSkippable;X.prototype.isSkippable=X.prototype.isSkippable;X.prototype.isPaused=X.prototype.isPaused;X.prototype.getRemainingTime=X.prototype.getRemainingTime;X.prototype.getMinSuggestedDuration=X.prototype.getMinSuggestedDuration;X.prototype.getDuration=X.prototype.getDuration;function zn(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.A="";this.D=[];this.h=new lf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){An(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.A.length?
555
+ e.j.resolve(e.A):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new X(f,e.l);e.u&&(e.m.h=e.u);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
551
556
  var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
552
557
  this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
553
- f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Bn.prototype.stop=function(){this.B="";this.o=null;this.D=[]};Bn.prototype.release=function(){this.stop();this.h&&this.h.release()};Bn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
554
- function Cn(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){Ue.call(this);this.g=this.i=null;this.h=new tn;this.j=navigator.language}oa(Y,Ue);q=Y.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new un(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
555
- q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Ue.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new tn};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
556
- 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 Bn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
557
- 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)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.5";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
558
- (c.F=!0),c.j=new lc,c.g.requestStream(a),c.B=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Wa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.5";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.D};
558
+ f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}zn.prototype.stop=function(){this.A="";this.o=null;this.D=[]};zn.prototype.release=function(){this.stop();this.h&&this.h.release()};zn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
559
+ function An(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.o=c,a.l.currentTime=d.start)}})};function Y(){Te.call(this);this.g=this.i=null;this.h=new rn;this.j=navigator.language}qa(Y,Te);q=Y.prototype;q.setLocale=function(a){this.j=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new O(2,10,1E4);this.i&&this.i.release();this.i=new sn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
560
+ q.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Te.prototype.release.call(this)};q.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new rn};q.requestClientSideAds=function(a){if(!this.i)throw new O(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
561
+ 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 zn(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
562
+ 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)&&Xa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.7";c=this.g;c.j?a=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
563
+ (c.F=!0),c.j=new kc,c.g.requestStream(a),c.A=b||"",c.G=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Xa('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.7";this.g.g.replaceAdTagParameters(a)};q.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.D};
559
564
  q.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};q.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};K("shaka.ads.AdManager",Y);
560
565
  Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getServerSideCuePoints=Y.prototype.getServerSideCuePoints;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;
561
566
  Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.release=Y.prototype.release;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";
562
567
  Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";
563
- Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Rl=function(){return new Y};function Dn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
564
- TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(xi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
565
- function En(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Fn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
566
- function Fn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
567
- var Gn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Hn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),In=["loop","playbackRate"],Jn=["pause","play"],Kn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
568
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Ln={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Mn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Nn=[["getConfiguration","configure"]],On=[["isTextTrackVisible","setTextTrackVisibility"]],Pn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
569
- Qn=["attach","attachCanvas","detach","load","unload"];function Rn(a,b,c,d,e,f,g){var h=this;this.G=a;this.M=g;this.j=new P(b);this.O=c;this.u=!1;this.s=d;this.F=e;this.J=f;this.h=this.m=!1;this.L="";this.o=null;this.B=function(){return Sn(h)};this.D=function(k,l){k=En(l);switch(k.type){case "event":var m=k.targetName,n=Se(k.event);h.s(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.O(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.i[n],delete h.i[n],k)if(p){n=new O(p.severity,p.category,
570
- p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;Tn.add(this)}q=Rn.prototype;q.destroy=function(){Tn.delete(this);Un(this);Vn&&Xn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.sa=function(){return this.h};q.ae=function(){return this.L};
571
- q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Mb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.M,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Tn),d=c.next();!d.done;d=c.next())Yn(d.value,b)},function(b){for(var c=r(Tn),d=c.next();!d.done;d=c.next())d=d.value,Zn="available"==b,d.j.Mb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Zn&&this.j.N($n);(a=Vn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
572
- Yn(this,a):Vn=null}else window.__onGCastApiAvailable!==ao&&(bo=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=ao)};q.ie=function(a){this.o=a;this.h&&co(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return G(function(c){if(!b.m)throw new O(1,8,8E3);if(!Zn)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new lc;chrome.cast.requestSession(function(d){return eo(b,a,d)},function(d){return fo(b,d)});return u(c,b.l,0)})};
573
- function go(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return eo(a,b,c)},function(c){return fo(a,c)})}}q.Ab=function(){if(this.h){Un(this);if(Vn){Xn(this);try{Vn.stop(function(){},function(){})}catch(a){}Vn=null}Sn(this)}};
574
- q.get=function(a,b){var c=this;if("video"==a){if(Jn.includes(b))return function(){return c.Qe.apply(c,[a,b].concat(ha(Fa.apply(0,arguments))))}}else if("player"==a){if(Mn[b]&&!this.get("player","isLive")())return function(){};if(Pn.includes(b))return function(){return c.Qe.apply(c,[a,b].concat(ha(Fa.apply(0,arguments))))};if(Qn.includes(b))return function(){return c.og.apply(c,[a,b].concat(ha(Fa.apply(0,arguments))))};if(Kn[b]||Ln[b])return function(){return c.g[a][b]}}return this.g[a][b]};
575
- q.set=function(a,b,c){this.g[a][b]=c;co(this,{type:"set",targetName:a,property:b,value:c})};function eo(a,b,c){Vn=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Sn(a);co(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function fo(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))}
576
- q.Qe=function(a,b){co(this,{type:"call",targetName:a,methodName:b,args:Fa.apply(2,arguments)})};q.og=function(a,b){var c=Fa.apply(2,arguments),d=new lc,e=this.H.toString();this.H++;this.i[e]=d;try{co(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Yn(a,b){var c=a.J();a.l=new lc;a.u=!0;eo(a,c,b)}function Xn(a){var b=Vn;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
577
- function Sn(a){var b=Vn?"connected"==Vn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Un(a)}a.h=b;a.L=b?Vn.receiver.friendlyName:"";a.j.Mb()}function Un(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function co(a,b){b=Dn(b);var c=Vn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Za)}catch(d){throw b=new O(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.s("player",c),a.Ab(),b;}}var $n=.02,Zn=!1,Vn=null,bo=null,Tn=new Set;
578
- function ao(a){bo?window.__onGCastApiAvailable=bo:delete window.__onGCastApiAvailable;bo=null;if(a)for(var b=r(Tn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function ho(a,b,c,d){d=void 0===d?!1:d;Ue.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.B=d;this.u=new Map;this.g=new Rn(c,function(){return io(e)},function(){return jo(e)},function(f,g){return ko(e,f,g)},function(){return lo(e)},function(){return mo(e)},d);no(this)}oa(ho,Ue);q=ho.prototype;
579
- q.destroy=function(a){a&&this.g.Ab();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Ue.prototype.release.call(this);return Promise.all(a)};q.Wf=function(){return this.l};q.Nf=function(){return this.s};q.nf=function(){return this.g.m&&Zn};q.sa=function(){return this.g.sa()};q.ae=function(){return this.g.ae()};
580
- q.cast=function(){var a=this,b;return G(function(c){return 1==c.g?(b=mo(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.re(),0):c.return()})};q.ie=function(a){this.g.ie(a)};q.zg=function(){go(this.g)};q.Ab=function(){this.g.Ab()};
581
- q.qf=function(a,b){b=void 0===b?!1:b;var c=this;return G(function(d){if(1==d.g){if(a==c.D&&b==c.B)return d.return();c.D=a;c.B=b;c.g.Ab();return u(d,c.g.destroy(),2)}c.g=null;c.g=new Rn(a,function(){return io(c)},function(){return jo(c)},function(e,f){return ko(c,e,f)},function(){return lo(c)},function(){return mo(c)},b);c.g.init();A(d)})};
582
- function no(a){a.g.init();a.m=new mf;for(var b=r(Gn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.sa()||(f=Se(f),a.j.dispatchEvent(f))});for(var d in Te)a.m.C(a.h,Te[d],function(f){a.g.sa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Sb=e,Object.defineProperty(a.l,b.Sb,{configurable:!1,enumerable:!0,get:function(f){return function(){return oo(a,f.Sb)}}(b),set:function(f){return function(g){var h=f.Sb;a.g.sa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Sb:b.Sb};a.s={};po(a,
583
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return qo(a,f)}})});ro(a);a.j=new Ue;a.j.Wc=a.l;a.o=new Ue;a.o.Wc=a.s}function ro(a){var b=new Map;po(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
584
- function po(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
585
- function mo(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Dd(),startTime:null};a.i.pause();for(var c=r(In),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(Nn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(On);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function io(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
586
- function jo(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
587
- function lo(a){for(var b=r(Nn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(In);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(In),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(On);for(k=
568
+ Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Pl=function(){return new Y};function Bn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);b=r(Object.getOwnPropertyNames(c));for(d=b.next();!d.done;d=b.next())e.add(d.value);b={};e=r(e);for(d=e.next();!d.done;d=e.next())d=d.value,b[d]=c[d];c={__type__:"Error",contents:b}}else if(c instanceof
569
+ TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=r(vi(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
570
+ function Cn(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=Dn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
571
+ function Dn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
572
+ var En="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Fn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Gn=["loop","playbackRate"],Hn=["pause","play"],In={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
573
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},Jn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},Kn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ln=[["getConfiguration","configure"]],Mn=[["isTextTrackVisible","setTextTrackVisibility"]],Nn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
574
+ On=["attach","attachCanvas","detach","load","unload"];function Pn(a,b,c,d,e,f,g){var h=this;this.G=a;this.M=g;this.j=new P(b);this.P=c;this.u=!1;this.s=d;this.F=e;this.J=f;this.h=this.m=!1;this.L="";this.o=null;this.A=function(){return Qn(h)};this.D=function(k,l){k=Cn(l);switch(k.type){case "event":var m=k.targetName,p=Re(k.event);h.s(m,p);break;case "update":m=k.update;for(p in m){k=h.g[p]||{};for(var n in m[p])k[n]=m[p][n]}h.u&&(h.P(),h.u=!1);break;case "asyncComplete":if(p=k.id,n=k.error,k=h.i[p],delete h.i[p],k)if(n){p=new O(n.severity,n.category,
575
+ n.code);for(m in n)p[m]=n[m];k.reject(p)}else k.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;Rn.add(this)}q=Pn.prototype;q.destroy=function(){Rn.delete(this);Sn(this);Tn&&Un(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.A=this.l=this.i=this.g=this.o=null;return Promise.resolve()};q.ta=function(){return this.h};q.be=function(){return this.L};
576
+ q.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Nb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.M,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Rn),d=c.next();!d.done;d=c.next())Wn(d.value,b)},function(b){for(var c=r(Rn),d=c.next();!d.done;d=c.next())d=d.value,Xn="available"==b,d.j.Nb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Xn&&this.j.O(Yn);(a=Tn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
577
+ Wn(this,a):Tn=null}else window.__onGCastApiAvailable!==Zn&&($n=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Zn)};q.je=function(a){this.o=a;this.h&&ao(this,{type:"appData",appData:this.o})};q.cast=function(a){var b=this;return G(function(c){if(!b.m)throw new O(1,8,8E3);if(!Xn)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new kc;chrome.cast.requestSession(function(d){return bo(b,a,d)},function(d){return co(b,d)});return u(c,b.l,0)})};
578
+ function eo(a){if(a.h){var b=a.J();chrome.cast.requestSession(function(c){return bo(a,b,c)},function(c){return co(a,c)})}}q.Bb=function(){if(this.h){Sn(this);if(Tn){Un(this);try{Tn.stop(function(){},function(){})}catch(a){}Tn=null}Qn(this)}};
579
+ q.get=function(a,b){var c=this;if("video"==a){if(Hn.includes(b))return function(){return c.Re.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(Kn[b]&&!this.get("player","isLive")())return function(){};if(Nn.includes(b))return function(){return c.Re.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(On.includes(b))return function(){return c.qg.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(In[b]||Jn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
580
+ q.set=function(a,b,c){this.g[a][b]=c;ao(this,{type:"set",targetName:a,property:b,value:c})};function bo(a,b,c){Tn=c;c.addUpdateListener(a.A);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Qn(a);ao(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function co(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))}
581
+ q.Re=function(a,b){ao(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};q.qg=function(a,b){var c=Ia.apply(2,arguments),d=new kc,e=this.H.toString();this.H++;this.i[e]=d;try{ao(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Wn(a,b){var c=a.J();a.l=new kc;a.u=!0;bo(a,c,b)}function Un(a){var b=Tn;b.removeUpdateListener(a.A);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
582
+ function Qn(a){var b=Tn?"connected"==Tn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Sn(a)}a.h=b;a.L=b?Tn.receiver.friendlyName:"";a.j.Nb()}function Sn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function ao(a,b){b=Bn(b);var c=Tn;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},$a)}catch(d){throw b=new O(2,8,8005,d),c=new S("error",(new Map).set("detail",b)),a.s("player",c),a.Bb(),b;}}var Yn=.02,Xn=!1,Tn=null,$n=null,Rn=new Set;
583
+ function Zn(a){$n?window.__onGCastApiAvailable=$n:delete window.__onGCastApiAvailable;$n=null;if(a)for(var b=r(Rn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function fo(a,b,c,d){d=void 0===d?!1:d;Te.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.A=d;this.u=new Map;this.g=new Pn(c,function(){return go(e)},function(){return ho(e)},function(f,g){return io(e,f,g)},function(){return jo(e)},function(){return ko(e)},d);lo(this)}qa(fo,Te);q=fo.prototype;
584
+ q.destroy=function(a){a&&this.g.Bb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Te.prototype.release.call(this);return Promise.all(a)};q.Xf=function(){return this.l};q.Of=function(){return this.s};q.pf=function(){return this.g.m&&Xn};q.ta=function(){return this.g.ta()};q.be=function(){return this.g.be()};
585
+ q.cast=function(){var a=this,b;return G(function(c){return 1==c.g?(b=ko(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.se(),0):c.return()})};q.je=function(a){this.g.je(a)};q.Bg=function(){eo(this.g)};q.Bb=function(){this.g.Bb()};
586
+ q.rf=function(a,b){b=void 0===b?!1:b;var c=this;return G(function(d){if(1==d.g){if(a==c.D&&b==c.A)return d.return();c.D=a;c.A=b;c.g.Bb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new Pn(a,function(){return go(c)},function(){return ho(c)},function(e,f){return io(c,e,f)},function(){return jo(c)},function(){return ko(c)},b);c.g.init();B(d)})};
587
+ function lo(a){a.g.init();a.m=new lf;for(var b=r(En),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.ta()||(f=Re(f),a.j.dispatchEvent(f))});for(var d in Se)a.m.C(a.h,Se[d],function(f){a.g.ta()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Tb=e,Object.defineProperty(a.l,b.Tb,{configurable:!1,enumerable:!0,get:function(f){return function(){return mo(a,f.Tb)}}(b),set:function(f){return function(g){var h=f.Tb;a.g.ta()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Tb:b.Tb};a.s={};no(a,
588
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return oo(a,f)}})});po(a);a.j=new Te;a.j.Xc=a.l;a.o=new Te;a.o.Xc=a.s}function po(a){var b=new Map;no(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.u.set(c,d):a.u.set(d,c)):b.set(d,c)})}
589
+ function no(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=r(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
590
+ function ko(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Ed(),startTime:null};a.i.pause();for(var c=r(Gn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=r(Ln);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=r(Mn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function go(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
591
+ function ho(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
592
+ function jo(a){for(var b=r(Ln),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=r(Gn);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=r(Gn),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=r(Mn);for(k=
588
593
  h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new S("error",h);a.h.dispatchEvent(h)})}
589
- function oo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.sa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
590
- function qo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.jc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Ge()};
591
- if("setVideoContainer"==b)return function(c){return a.h.$e(c)};if(a.g.sa()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.sa()&&0==Object.keys(a.g.g.video).length&&(Kn[b]||Ln[b])||!a.g.sa()?a.h[b].bind(a.h):a.g.get("player",b)}
592
- function ko(a,b,c){a.g.sa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}K("shaka.cast.CastProxy",ho);ho.prototype.changeReceiverId=ho.prototype.qf;ho.prototype.forceDisconnect=ho.prototype.Ab;ho.prototype.suggestDisconnect=ho.prototype.zg;ho.prototype.setAppData=ho.prototype.ie;ho.prototype.cast=ho.prototype.cast;ho.prototype.receiverName=ho.prototype.ae;ho.prototype.isCasting=ho.prototype.sa;ho.prototype.canCast=ho.prototype.nf;ho.prototype.getPlayer=ho.prototype.Nf;
593
- ho.prototype.getVideo=ho.prototype.Wf;ho.prototype.destroy=ho.prototype.destroy;function so(a,b,c,d){Ue.call(this);var e=this;this.g=a;this.h=b;this.j=new mf;this.H={video:a,player:b};this.D=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.u=!0;this.s=this.l=null;this.G=new P(function(){to(e)});uo(this)}oa(so,Ue);q=so.prototype;q.isConnected=function(){return this.F};q.$f=function(){return this.o};q.wg=function(a){this.i=a};q.uf=function(){this.i=null};
594
- q.xg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.vg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.ug=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
595
- q.destroy=function(){var a=this,b,c;return G(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Ue.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
596
- function uo(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return vo(a)};b.onSenderDisconnected=function(){return vo(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&wo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);wo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return xo(a,
597
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return yo(a,e)};b.start();b=r(Gn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return zo(a,"video",e)});for(var d in Te)a.j.C(a.h,Te[d],function(e){return zo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ke(3840,2160):a.h.ke(1920,1080);a.j.C(a.g,"loadeddata",function(){a.B=!0});a.j.C(a.h,"loading",function(){a.o=
598
- !1;Ao(a)});a.j.C(a.g,"playing",function(){a.o=!1;Ao(a)});a.j.C(a.g,"pause",function(){Ao(a)});a.j.C(a.h,"unloading",function(){a.o=!0;Ao(a)});a.j.C(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.o=!0,Ao(a))})).N(Bo)})}function vo(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Ao(a)}
599
- function Ao(a){var b;G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new S("caststatuschanged");a.dispatchEvent(b);Co(a)||Do(a);A(c)})}
600
- function Eo(a,b,c){var d,e,f,g,h,k,l,m,n,p;G(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,D(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:ta(t,3);break;case 5:return g=ua(t),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
601
- a.g.autoplay=f;b.manifest&&(a.g.play(),Do(a));A(t)}})}function zo(a,b,c){a.h&&(to(a),wo(a,{type:"event",targetName:b,event:c},a.l))}
602
- function to(a){a.G.N(Fo);for(var b={video:{},player:{}},c=r(Hn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Mn)0==a.m%Mn[e]&&(b.player[e]=a.h[e]());for(var f in Kn)0==a.m%Kn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;wo(a,{type:"update",update:b},a.l);for(var g in Ln)0==a.m%Ln[g]&&(b={player:{}},b.player[g]=a.h[g](),wo(a,{type:"update",update:b},a.l));a.B&&(a.m+=
603
- 1);Co(a)}function Co(a){return a.u&&(a.g.duration||a.h.U())?(Go(a),a.u=!1,!0):!1}function Go(a,b){var c={contentId:a.h.Dd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Do(a,void 0===b?0:b,c)}
604
- function yo(a,b){var c=En(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;Eo(a,c.initState,c.appData);to(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
605
- "player"==d&&"load"==e&&(a.m=0,a.B=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Ho(a,g,f,null)},function(h){return Ho(a,g,f,h)})}}
606
- function xo(a,b){var c=En(b.data);switch(c.type){case "PLAY":a.g.play();Do(a);break;case "PAUSE":a.g.pause();Do(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Do(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Do(a));break;case "STOP":a.h.re().then(function(){a.h&&Do(a)});break;case "GET_STATUS":Go(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
607
- null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Do(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Go(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");wo(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:wo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
608
- function Ho(a,b,c,d){a.h&&wo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function wo(a,b,c,d){a.F&&(a=Dn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Do(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Io:a.h.Fd()?Jo:a.g.paused?Ko:Lo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);wo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
609
- K("shaka.cast.CastReceiver",so);so.prototype.destroy=so.prototype.destroy;so.prototype.setContentArtist=so.prototype.ug;so.prototype.setContentImage=so.prototype.vg;so.prototype.setContentTitle=so.prototype.xg;so.prototype.clearContentMetadata=so.prototype.uf;so.prototype.setContentMetadata=so.prototype.wg;so.prototype.isIdle=so.prototype.$f;so.prototype.isConnected=so.prototype.isConnected;var Fo=.5,Bo=5,Io="IDLE",Lo="PLAYING",Jo="BUFFERING",Ko="PAUSED";function Mo(a,b,c){var d=No(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.fe?(e=h.init||e,!1):!0}),f.length&&(a=Oo(e,f,c,g),0==a.length&&(a=[fc("",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(fc(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
610
- r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Be:g,sh:e,drmInfos:a,Fe:!0}}function Po(a,b,c,d){var e=Mo(a,c,d);if(b.Fe){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.Fe=!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.Be||b.Be}
611
- function Qo(a){var b=0,c=Lb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=M(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
612
- function Ro(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 So(a){a=Nf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Lc(a.textContent);a=Qo(a).filter(function(b){return b.type===To})[0];if(!a)return"";a=Dc(a.value,!0);return(a=cg(a,"WRMHEADER"))?Ro(a):""}
613
- function Oo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.fe];if(g){var h;if(h=Nf(f.node,"urn:microsoft:playready","pro")){h=Lc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Kf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.fe)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
614
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Kf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=fc(g,f.init||a||h||k);if(g=Uo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function No(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=Vo(c.value))&&b.push(c);return b}
615
- function Vo(a){var b=a.getAttribute("schemeIdUri"),c=Qf(a,"urn:mpeg:cenc:2013","default_KID"),d=Of(a,"urn:mpeg:cenc:2013","pssh").map(Sf);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:Lc(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,fe:b,keyId:c,init:0<e.length?e:null}}
616
- var To=1,Uo=(new Map).set("com.widevine.alpha",function(a){return(a=Nf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",So).set("com.microsoft.playready.recommendation",So).set("com.microsoft.playready.software",So).set("com.microsoft.playready.hardware",So).set("org.w3.clearkey",function(a){return(a=Nf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Wo(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=
594
+ function mo(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ta()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ta()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
595
+ function oo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.kc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.He()};
596
+ if("setVideoContainer"==b)return function(c){return a.h.af(c)};if(a.g.ta()){if("getManifest"==b||"drmInfo"==b)return function(){Xa(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Xa(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ta()&&0==Object.keys(a.g.g.video).length&&(In[b]||Jn[b])||!a.g.ta()?a.h[b].bind(a.h):a.g.get("player",b)}
597
+ function io(a,b,c){a.g.ta()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}K("shaka.cast.CastProxy",fo);fo.prototype.changeReceiverId=fo.prototype.rf;fo.prototype.forceDisconnect=fo.prototype.Bb;fo.prototype.suggestDisconnect=fo.prototype.Bg;fo.prototype.setAppData=fo.prototype.je;fo.prototype.cast=fo.prototype.cast;fo.prototype.receiverName=fo.prototype.be;fo.prototype.isCasting=fo.prototype.ta;fo.prototype.canCast=fo.prototype.pf;fo.prototype.getPlayer=fo.prototype.Of;
598
+ fo.prototype.getVideo=fo.prototype.Xf;fo.prototype.destroy=fo.prototype.destroy;function qo(a,b,c,d){Te.call(this);var e=this;this.g=a;this.h=b;this.j=new lf;this.H={video:a,player:b};this.D=c||function(){};this.J=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.A=!1;this.u=!0;this.s=this.l=null;this.G=new P(function(){ro(e)});so(this)}qa(qo,Te);q=qo.prototype;q.isConnected=function(){return this.F};q.ag=function(){return this.o};q.yg=function(a){this.i=a};q.vf=function(){this.i=null};
599
+ q.zg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.xg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.wg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
600
+ q.destroy=function(){var a=this,b,c;return G(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.H=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Te.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();B(d)})};
601
+ function so(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return to(a)};b.onSenderDisconnected=function(){return to(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&uo(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);uo(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return vo(a,
602
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return wo(a,e)};b.start();b=r(En);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return xo(a,"video",e)});for(var d in Se)a.j.C(a.h,Se[d],function(e){return xo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.le(3840,2160):a.h.le(1920,1080);a.j.C(a.g,"loadeddata",function(){a.A=!0});a.j.C(a.h,"loading",function(){a.o=
603
+ !1;yo(a)});a.j.C(a.g,"playing",function(){a.o=!1;yo(a)});a.j.C(a.g,"pause",function(){yo(a)});a.j.C(a.h,"unloading",function(){a.o=!0;yo(a)});a.j.C(a.g,"ended",function(){(new P(function(){a.g&&a.g.ended&&(a.o=!0,yo(a))})).O(zo)})}function to(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;yo(a)}
604
+ function yo(a){var b;G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c.return();b=new S("caststatuschanged");a.dispatchEvent(b);Ao(a)||Bo(a);B(c)})}
605
+ function Co(a,b,c){var d,e,f,g,h,k,l,m,p,n;G(function(t){switch(t.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,C(t,5),u(t,a.h.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:va(t,3);break;case 5:return g=wa(t),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),t.return();case 3:if(!a.h)return t.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(p in b.playerAfterLoad)n=b.playerAfterLoad[p],a.h[p](n);
606
+ a.g.autoplay=f;b.manifest&&(a.g.play(),Bo(a));B(t)}})}function xo(a,b,c){a.h&&(ro(a),uo(a,{type:"event",targetName:b,event:c},a.l))}
607
+ function ro(a){a.G.O(Do);for(var b={video:{},player:{}},c=r(Fn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in Kn)0==a.m%Kn[e]&&(b.player[e]=a.h[e]());for(var f in In)0==a.m%In[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;uo(a,{type:"update",update:b},a.l);for(var g in Jn)0==a.m%Jn[g]&&(b={player:{}},b.player[g]=a.h[g](),uo(a,{type:"update",update:b},a.l));a.A&&(a.m+=
608
+ 1);Ao(a)}function Ao(a){return a.u&&(a.g.duration||a.h.U())?(Eo(a),a.u=!1,!0):!1}function Eo(a,b){var c={contentId:a.h.Ed(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Bo(a,void 0===b?0:b,c)}
609
+ function wo(a,b){var c=Cn(b.data);switch(c.type){case "init":a.m=0;a.A=!1;a.u=!0;Co(a,c.initState,c.appData);ro(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.H[d][e]=c;break;case "call":d=a.H[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=c.methodName;
610
+ "player"==d&&"load"==e&&(a.m=0,a.A=!1);var f=c.id,g=b.senderId;b=a.H[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Fo(a,g,f,null)},function(h){return Fo(a,g,f,h)})}}
611
+ function vo(a,b){var c=Cn(b.data);switch(c.type){case "PLAY":a.g.play();Bo(a);break;case "PAUSE":a.g.pause();Bo(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),Bo(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),Bo(a));break;case "STOP":a.h.se().then(function(){a.h&&Bo(a)});break;case "GET_STATUS":Eo(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
612
+ null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||Bo(a);break;case "LOAD":a.m=0;a.A=!1;a.u=!1;b=c.media;d=c.currentTime;e=a.J(b.contentId);f=c.autoplay||!0;a.D(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&Eo(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");uo(a,{requestId:Number(c.requestId),type:h},a.s)});break;default:uo(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
613
+ function Fo(a,b,c,d){a.h&&uo(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function uo(a,b,c,d){a.F&&(a=Bn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Bo(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Go:a.h.Gd()?Ho:a.g.paused?Io:Jo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);uo(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
614
+ K("shaka.cast.CastReceiver",qo);qo.prototype.destroy=qo.prototype.destroy;qo.prototype.setContentArtist=qo.prototype.wg;qo.prototype.setContentImage=qo.prototype.xg;qo.prototype.setContentTitle=qo.prototype.zg;qo.prototype.clearContentMetadata=qo.prototype.vf;qo.prototype.setContentMetadata=qo.prototype.yg;qo.prototype.isIdle=qo.prototype.ag;qo.prototype.isConnected=qo.prototype.isConnected;var Do=.5,zo=5,Go="IDLE",Jo="PLAYING",Ho="BUFFERING",Io="PAUSED";function Ko(a,b,c){var d=Lo(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.ge?(e=h.init||e,!1):!0}),f.length&&(a=Mo(e,f,c,g),0==a.length&&(a=[ec("",e)])));if(d.length&&(b||!f.length))for(a=[],b=r(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(ec(c,e));if(g=Array.from(g)[0]||null)for(b=r(a),c=b.next();!c.done;c=b.next())for(c=
615
+ r(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{Ce:g,uh:e,drmInfos:a,Ge:!0}}function No(a,b,c,d){var e=Ko(a,c,d);if(b.Ge){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.Ge=!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.Ce||b.Ce}
616
+ function Oo(a){var b=0,c=Jb(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=L(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
617
+ function Po(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 Qo(a){a=Mf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Kc(a.textContent);a=Oo(a).filter(function(b){return b.type===Ro})[0];if(!a)return"";a=Cc(a.value,!0);return(a=bg(a,"WRMHEADER"))?Po(a):""}
618
+ function Mo(a,b,c,d){var e=[];b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.ge];if(g){var h;if(h=Mf(f.node,"urn:microsoft:playready","pro")){h=Kc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Jf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.ge)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
619
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Jf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=ec(g,f.init||a||h||k);if(g=So.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function Lo(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=To(c.value))&&b.push(c);return b}
620
+ function To(a){var b=a.getAttribute("schemeIdUri"),c=Pf(a,"urn:mpeg:cenc:2013","default_KID"),d=Nf(a,"urn:mpeg:cenc:2013","pssh").map(Rf);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:Kc(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,ge:b,keyId:c,init:0<e.length?e:null}}
621
+ var Ro=1,So=(new Map).set("com.widevine.alpha",function(a){return(a=Mf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Qo).set("com.microsoft.playready.recommendation",Qo).set("com.microsoft.playready.software",Qo).set("com.microsoft.playready.hardware",Qo).set("org.w3.clearkey",function(a){return(a=Mf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Uo(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=
617
622
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
618
- function Xo(a,b){var c=Yo(a,b,"timescale"),d=1;c&&(d=Zf(c)||1);var e=Yo(a,b,"duration");c=Zf(e||"");"image"==a.I.contentType&&(c=ag(e||""));c&&(c/=d);var f=Yo(a,b,"startNumber");e=Number(Yo(a,b,"presentationTimeOffset"))||0;var g=$f(f||"");if(null==f||null==g)g=1;f=Zo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.T.duration||Infinity;f=Mf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],n=f[l+1],p=Uf(m,"t",$f),t=Uf(m,"d",$f);m=Uf(m,"r",Yf);null!=p&&(p-=e);if(!t)break;p=null!=p?p:k;m=m||0;if(0>
619
- m)if(n){n=Uf(n,"t",$f);if(null==n)break;else if(p>=n)break;m=Math.ceil((n-p)/t)-1}else{if(Infinity==a)break;else if(p/b>=a)break;m=Math.ceil((a*b-p)/t)-1}0<h.length&&p!=k&&(h[h.length-1].end=p/b);for(n=0;n<=m;++n)k=p+t,h.push({start:p/b,end:k/b,Dg:p}),p=k}b=h}return{timescale:d,ia:c,Lb:g,Sa:e/d||0,se:e,timeline:b}}function Yo(a,b,c){return[b(a.I),b(a.fa),b(a.$)].filter(dc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
620
- function Zo(a,b,c){return[b(a.I),b(a.fa),b(a.$)].filter(dc).map(function(d){return Lf(d,c)}).reduce(function(d,e){return d||e})}
621
- function $o(a,b,c,d,e,f){for(var g=Qf(a,"http://www.w3.org/1999/xlink","href"),h=Qf(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 Me(new O(2,4,4028));if("onLoad"!=h)return Me(new O(2,4,4027));var m=ec([d],[g]);return e.request(0,cf(m,b)).Y(function(n){n=eg(n.data,a.tagName);if(!n)return Me(new O(2,4,4001,g));
622
- 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 ap(a,b,c,m[0],e,f+1)})}
623
- function ap(a,b,c,d,e,f){f=void 0===f?0:f;if(Qf(a,"http://www.w3.org/1999/xlink","href")){var g=$o(a,b,c,d,e,f);c&&(g=g.Y(void 0,function(){return ap(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"==Qf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(ap(k,b,c,d,e,f)));return Qe(g).Y(function(){return a})};function bp(a,b,c,d,e,f,g){var h,k=(new zf).P("sidx",function(l){h=cp(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
624
- function cp(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.$a(),m=g.reader.$a();g.reader.skip(2);var n=g.reader.$d();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.K(),t=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.K();g.reader.skip(4);if(1==t)throw new O(2,3,3006);h.push(new qi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function dp(a){this.h=Lb(a);this.g=new wf(this.h,0)}dp.prototype.ha=function(){return this.g.ha()};
625
- function ep(a){var b=fp(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=fp(a);a:{d=r(gp);for(var e=d.next();!e.done;e=d.next())if(Gb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Z();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Z()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Z();d=Lb(a.h,a.g.Z(),b);a.g.skip(b);return new hp(c,d)}
626
- function fp(a){var b=a.g.Z(),c=a.g.Ra();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return M(a.h,b,c)}var gp=[[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 hp(a,b){this.id=a;this.g=b}
627
- function ip(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=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function jp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new dp(a.g);for(var n=null,p=null;a.ha();){var t=ep(a);if(187==t.id){var v=kp(t);v&&(t=c*v.Eg,v=b+v.ng,null!=n&&m.push(new qi(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new qi(n+g,d+g,l,p,null,f,g,h,k));return m}
628
- function kp(a){var b=new dp(a.g);a=ep(b);if(179!=a.id)throw new O(2,3,3013);a=ip(a);b=ep(b);if(183!=b.id)throw new O(2,3,3012);b=new dp(b.g);for(var c=0;b.ha();){var d=ep(b);if(241==d.id){c=ip(d);break}}return{Eg:a,ng:c}};function lp(a,b){b=Zo(a,b,"Initialization");if(!b)return null;var c=a.I.wa,d=b.getAttribute("sourceURL");d&&(c=ec(a.I.wa,[d]));d=0;var e=null;if(b=Uf(b,"range",Xf))d=b.start,e=b.end;return new oi(function(){return c},d,e,mp(a))}
629
- function np(a,b){var c=Number(Yo(a,op,"presentationTimeOffset"))||0,d=Yo(a,op,"timescale"),e=1;d&&(e=Zf(d)||1);var f=c/e||0,g=lp(a,op);pp(a,g);var h=We(a);return{Bb:function(){var k=Zo(h,op,"RepresentationIndex");var l=h.I.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=ec(h.I.wa,[k]));k=qp(h);return rp(h,b,g,l,k.start,k.end,f)}}}
630
- function rp(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,C,z,B,E;return G(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Ma||!a.T.Gd,l=a.T.start,m=a.T.duration,n=a.I.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.ya(),c.Ba,c.ka):null],p=null,u(F,Promise.all(v),2);y=F.h;w=y[0];x=y[1]||null;C=null;z=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var H=bp(w,e,d,c,z,B,E);else{H=new dp(x);if(440786851!=ep(H).id)throw new O(2,3,3008);var I=ep(H);if(408125543!=I.id)throw new O(2,3,3009);H=I.g.byteOffset;
631
- I=new dp(I.g);for(var J=null;I.ha();){var L=ep(I);if(357149030==L.id){J=L;break}}if(!J)throw new O(2,3,3010);J=new dp(J.g);L=1E6;for(I=null;J.ha();){var R=ep(J);if(2807729==R.id)L=ip(R);else if(17545==R.id)if(4==R.g.byteLength)I=R.g.getFloat32(0);else if(8==R.g.byteLength)I=R.g.getFloat64(0);else throw new O(2,3,3003);}if(null==I)throw new O(2,3,3011);J=L/1E9;I*=J;L=ep(new dp(w));if(475249515!=L.id)throw new O(2,3,3007);H=jp(L,H,J,I,d,c,z,B,E)}C=H;h.Ib(C);t=new Jj(C);k&&t.Wa(B,E,!0);return F.return(t)})}
632
- function op(a){return a.wc}function qp(a){var b=Zo(a,op,"RepresentationIndex");a=Yo(a,op,"indexRange");a=Xf(a||"");b&&(a=Uf(b,"range",Xf,a));return a}function pp(a,b){sp(a,b);if(!qp(a))throw new O(2,4,4002);}function sp(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=jc&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
633
- function mp(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.ad,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function tp(a,b){var c=lp(a,up),d=vp(a);if(!d.ia&&!d.timeline&&1<d.Gb.length)throw new O(2,4,4002);if(!d.ia&&!a.T.duration&&!d.timeline&&1==d.Gb.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.$.id&&a.I.id&&(f=b[a.$.id+","+a.I.id])&&(e=f.segmentIndex);var g=wp(a.T.start,a.T.duration,a.I.wa,d,c);b=!e;e?e.Hb(g,a.presentationTimeline.Pa()):e=new Jj(g);a.presentationTimeline.Ib(g);a.Ma&&a.T.Gd||e.Wa(a.T.start,a.T.duration?a.T.start+a.T.duration:
634
- Infinity,b);f&&(f.segmentIndex=e);return{Bb:function(){e&&0!=e.g.length||e.pc(g);return Promise.resolve(e)}}}function up(a){return a.ab}function vp(a){var b=xp(a);a=Xo(a,up);var c=a.Lb;0==c&&(c=1);var d=0;a.ia?d=a.ia*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ia:a.ia,startTime:d,Lb:c,Sa:a.Sa,timeline:a.timeline,Gb:b}}
635
- function wp(a,b,c,d,e){var f=d.Gb.length;d.timeline&&d.timeline.length!=d.Gb.length&&(f=Math.min(d.timeline.length,d.Gb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={od:m.od},n++){var p=d.Gb[n];m.od=ec(c,[p.dg]);var t=void 0;t=null!=d.ia?l+d.ia:d.timeline?d.timeline[n].end:l+b;k.push(new qi(a+l,a+t,function(v){return function(){return v.od}}(m),p.start,p.end,e,g,a,h));l=t}return k}
636
- function xp(a){return[a.I.ab,a.fa.ab,a.$.ab].filter(dc).map(function(b){return Mf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ke&&(a.Ke=!0);var c=b.getAttribute("media");b=Uf(b,"mediaRange",Xf,{start:0,end:null});return{dg:c,start:b.start,end:b.end}})};function yp(a,b,c,d,e,f){var g=zp(a),h=Ap(a);Bp(h);var k=We(a);if(h.oc)return sp(a,g),{Bb:function(){var t=Wo(h.oc,k.I.id,null,k.bandwidth||null,null);t=ec(k.I.wa,[t]);return rp(k,b,g,t,0,null,h.Sa)}};if(h.ia)return d||"image"===a.fa.contentType||(a.presentationTimeline.Sd(h.ia),a.presentationTimeline.Td(a.T.start)),{Bb:function(){return Cp(k,h,e,g,f)}};var l=null;d=d=null;a.$.id&&a.I.id&&(d=a.$.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=Dp(k,h,g);c=a.T.start;var n=a.T.duration?a.T.start+a.T.duration:
637
- Infinity,p=!(a.Ma&&a.T.Gd);l?(p&&(new Jj(m)).Wa(c,n,!0),l.Hb(m,a.presentationTimeline.Pa())):l=new Jj(m);a.presentationTimeline.Ib(m);p&&l.Wa(c,n);d&&a.Ma&&(d.segmentIndex=l);return{Bb:function(){l&&0!=l.g.length||l.pc(m);return Promise.resolve(l)}}}function Ep(a){return a.xc}function Ap(a){var b=Xo(a,Ep),c=Yo(a,Ep,"media");a=Yo(a,Ep,"index");return{ia:b.ia,timescale:b.timescale,Lb:b.Lb,Sa:b.Sa,se:b.se,timeline:b.timeline,Pd:c,oc:a}}
638
- function Bp(a){var b=a.oc?1:0;b+=a.timeline?1:0;b+=a.ia?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.oc&&(a.timeline=null),a.ia=null);if(!a.oc&&!a.Pd)throw new O(2,4,4002);}
639
- function Cp(a,b,c,d,e){function f(J){var L=(J-t)*p,R=L+b.Sa,Q=L+l;L=Q+p;var U=Math.min(L,h());Q=new qi(Q,U,function(){var N=Wo(y,x,J,w,R*v);return ec(C,[N])},0,null,d,z,l,h());Q.j=L;return Q}function g(){var J=[Math.max(k.Pa(),l),Math.min(k.gb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+t})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.T.start,m=a.$.id,n=a.T.duration,p=b.ia,t=b.Lb,v=b.timescale,
640
- y=b.Pd,w=a.bandwidth||null,x=a.I.id,C=a.I.wa,z=l-b.Sa,B=g();a=a.Ma?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var E=a;E<=B;++E){var F=f(E);c.push(F)}var H=new Jj(c);c=k.gb()<h();E=k.U();if(c||E){var I=Math.max(a,B+1);H.fd(p,function(){var J=k.Pa();H.eb(J);var L=r(g());L.next();L=L.next().value;for(var R=[];I<=L;){var Q=f(I);R.push(Q);I++}return J>h()&&!R.length?null:R})}return Promise.resolve(H)}
641
- function Dp(a,b,c){var d=a.T.start,e=a.T.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={nd:h.nd,rd:h.rd,ud:h.ud,kd:h.kd,wd:h.wd,ld:h.ld},k++){var l=b.timeline[k],m=l.start,n=l.Dg;l=l.end;h.ud=k+b.Lb;h.wd=n+b.se;h.rd=a.I.id;h.kd=a.bandwidth||null;h.nd=b.Pd;h.ld=a.I.wa;g.push(new qi(d+m,d+l,function(p){return function(){var t=Wo(p.nd,p.rd,p.ud,p.kd||null,p.wd);return ec(p.ld,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
642
- function zp(a){var b=Yo(a,Ep,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.wa;return new oi(function(){var f=Wo(b,c,null,d,null);return ec(e,[f])},0,null,mp(a))};function Fp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Fp.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=[]};
643
- function Gp(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C,z,B,E,F,H,I,J,L,R,Q,U,N,wa,va;return G(function(Ma){switch(Ma.g){case 1:d=kc;Hp(b);Ip(b);Jp(b);Kp(b);if(!c&&1==b.length){e=b[0];a.g=e.Kc;a.h=e.gd;a.j=e.textStreams;a.i=e.imageStreams;Ma.A(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Ma.return();k=b.map(function(Sa){return Sa.Kc});l=b.map(function(Sa){return Sa.gd});m=b.map(function(Sa){return Sa.textStreams});n=b.map(function(Sa){return Sa.imageStreams});
644
- p=r(m);for(t=p.next();!t.done;t=p.next())v=t.value,v.push(Lp(d.X));y=r(n);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Lp(d.Wb));return u(Ma,Mp(a.g,k,f,Np,Op),3);case 3:return u(Ma,Mp(a.h,l,f,Np,Op),4);case 4:return u(Ma,Mp(a.j,m,f,Np,Op),5);case 5:return u(Ma,Mp(a.i,n,f,Np,Op),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(J=r(a.g),L=J.next();!L.done;L=J.next())for(R=L.value,Q=r(a.h),U=Q.next();!U.done;U=Q.next())N=U.value,wa=Pg(R.drmInfos,N.drmInfos),R.drmInfos.length&&N.drmInfos.length&&
645
- !wa.length||(va=C++,z.push({id:va,language:R.language,primary:R.primary,audio:R,video:N,bandwidth:(R.bandwidth||0)+(N.bandwidth||0),drmInfos:wa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),E=r(B),F=E.next();!F.done;F=E.next())H=F.value,I=C++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.Hc?H:null,video:H.type==d.va?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
646
- a.l=z;A(Ma)}})}function Hp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Kc),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&&ib(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Kc=c}}
647
- function Jp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&ib(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
648
- function Ip(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.gd),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&&ib(e.roles,h.roles)&&vf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.gd=c}}
649
- function Kp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.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}}
650
- function Pp(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C,z,B,E,F,H,I,J,L,R;return G(function(Q){switch(Q.g){case 1:b=kc;if(1==a.length)return Q.return(a[0]);c=a.map(function(U){return U.filter(function(N){return N.type==b.Hc})});d=a.map(function(U){return U.filter(function(N){return N.type==b.va})});e=a.map(function(U){return U.filter(function(N){return N.type==b.X})});f=a.map(function(U){return U.filter(function(N){return N.type==b.Wb})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,k.push(Qp(b.X));
651
- l=r(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Qp(b.Wb));return u(Q,Mp([],c,0,Rp,Sp),2);case 2:return p=Q.h,u(Q,Mp([],d,0,Rp,Sp),3);case 3:return t=Q.h,u(Q,Mp([],e,0,Rp,Sp),4);case 4:return v=Q.h,u(Q,Mp([],f,0,Rp,Sp),5);case 5:y=Q.h;w=0;if(t.length&&p.length)for(E=r(p),F=E.next();!F.done;F=E.next())for(H=F.value,I=r(t),J=I.next();!J.done;J=I.next())L=J.value,R=w++,L.variantIds.push(R),H.variantIds.push(R);else for(x=t.concat(p),C=r(x),z=C.next();!z.done;z=C.next())B=z.value,B.variantIds=
652
- [w++];return Q.return(t.concat(p).concat(v).concat(y))}})}
653
- function Mp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,y,w,x,C,z,B,E,F,H,I,J;return G(function(L){switch(L.g){case 1:f=kc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){L.A(4);break}m=l.value;return u(L,Tp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new O(2,4,4037);l=k.next();L.A(2);break;case 4:p=r(g);for(t=p.next();!t.done;t=p.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(C=Up(x,b,d,e,g))&&a.push(C);z=r(g);for(t=z.next();!t.done;t=
654
- z.next())for(B=t.value,E={},F=r(B),w=F.next();!w.done;E={Va:E.Va},w=F.next())if(E.Va=w.value,H=E.Va.type==f.X&&!E.Va.language,I=E.Va.type==f.Wb&&!E.Va.tilesLayout,!H&&!I&&(J=a.some(function(R){return function(Q){return Q.mimeType==R.Va.mimeType&&ad(Q.codecs)==ad(R.Va.codecs)}}(E))))throw new O(2,4,4037);return L.return(a)}})}function Tp(a,b,c,d,e){return G(function(f){if(1==f.g)return Vp(b,a),a.matchedStreams?a.segmentIndex?u(f,Wp(a,c),2):f.A(2):f.return(!1);Xp(a,c,d,e);return f.return(!0)})}
655
- function Wp(a,b){var c,d,e,f,g,h,k;return G(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Nj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.l.push(k.segmentIndex);A(l)})}
656
- function Up(a,b,c,d,e){var f=c(a);Vp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return G(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Nj;return u(g,Wp(f,0),0)})});if(!f.matchedStreams)return null;Xp(f,0,d,e);return f}function Xp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==sd(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
657
- function Np(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
658
- function Rp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
659
- function Op(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ha(f),ha(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Pg(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||
660
- (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Np(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Op(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Op(a.trickModeVideo,b)}
661
- function Sp(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)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
662
- function Vp(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Yp,video:Yp,text:Zp,image:$p}[e.type],g={audio:aq,video:bq,text:cq,image:dq}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function Yp(a,b){var c;!(c=b.mimeType!=a.mimeType||ad(b.codecs)!=ad(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Pg(a,b).length:1));return c?!1:!0}
663
- function Zp(a,b){return a.language?b.language?0==sd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function $p(a){return a.tilesLayout?!0:!1}
664
- function aq(a,b,c){if(a.id==c.id)return!0;var d=sd(a.language,b.language),e=sd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
665
- d=eq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==fq)return!0;if(d==gq)return!1;d=eq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==fq?!0:d==gq?!1:a.bandwidth&&hq(a.bandwidth,b.bandwidth,c.bandwidth)==fq?!0:!1}
666
- function bq(a,b,c){if(a.id==c.id)return!0;var d=eq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==fq)return!0;if(d==gq)return!1;if(a.frameRate){d=eq(a.frameRate,b.frameRate,c.frameRate);if(d==fq)return!0;if(d==gq)return!1}return a.bandwidth&&hq(a.bandwidth,b.bandwidth,c.bandwidth)==fq?!0:!1}
667
- function cq(a,b,c){if(a.id==c.id)return!0;var d=sd(a.language,b.language),e=sd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
668
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function dq(a,b,c){return a.id==c.id?!0:eq(a.width*a.height,b.width*b.height,c.width*c.height)==fq?!0:!1}function Qp(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}}
669
- function Lp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jj([]),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}}
670
- function eq(a,b,c){if(b==a&&a!=c)return gq;if(c==a&&a!=b)return fq;if(b>a){if(c<=a||c-a<b-a)return fq;if(c-a>b-a)return gq}else{if(c>a)return gq;if(a-c<a-b)return fq;if(a-c>a-b)return gq}return iq}function hq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?fq:b<a?gq:iq}var fq=1,iq=0,gq=-1;function jq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.L={};this.j=new Fp;this.F=0;this.H=new Pa(5);this.D=new P(function(){kq(a)});this.o=new Xe;this.s=null;this.J=[];this.u=Infinity;this.B=!1}q=jq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){if(1==e.g)return c.B=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,lq(c),2);d=e.h;c.h&&mq(c,d);if(!c.h)throw new O(2,7,7001);return e.return(c.i)})};
671
- q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};q.update=function(){var a=this,b;return G(function(c){if(1==c.g)return D(c,2),u(c,lq(a),4);if(2!=c.g)return ta(c,0);b=ua(c);if(!a.h||!b)return c.return();a.h.onError(b);A(c)})};q.onExpirationUpdated=function(){};
672
- function lq(a){var b,c,d,e,f,g,h;return G(function(k){if(1==k.g)return b=cf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Ye(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,nq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.H.sample(1,h);return k.return(h)})}
673
- function nq(a,b,c){var d,e,f,g,h;return G(function(k){if(1==k.g){d=eg(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(oq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=ap(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ye(a.o,g);return u(k,g.promise,2)}h=k.h;return k.return(oq(a,h,c))})}
674
- function oq(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C,z,B,E,F,H,I,J,L,R,Q,U,N,wa,va,Ma,Sa;return G(function(Ga){switch(Ga.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Mf(b,"Location").map(Sf).filter(dc);0<f.length&&(g=ec(e,f),e=a.m=g);h=Mf(b,"BaseURL");k=h.map(Sf);l=ec(e,k);m=0;h&&h.length&&(m=Uf(h[0],"availabilityTimeOffset",ag)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Uf(b,"minBufferTime",Wf)||0);a.F=Uf(b,"minimumUpdatePeriod",Wf,-1);t=Uf(b,"availabilityStartTime",Vf);v=Uf(b,"timeShiftBufferDepth",
675
- Wf);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=Uf(b,"suggestedPresentationDelay",Wf));x=a.g.dash.ignoreMaxSegmentDuration;C=null;x||(C=Uf(b,"maxSegmentDuration",Wf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=r(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.eb(B.Pa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=w?w:I,B=new T(t,J,a.g.dash.autoCorrectDrift);B.yc("static"==z);(L=B.U())&&!isNaN(a.g.availabilityWindowOverride)&&
676
- (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.me(v);R=b.getAttribute("profiles")||"";Q={Ma:"static"!=z,presentationTimeline:B,$:null,T:null,fa:null,I:null,bandwidth:0,Ke:!1,zb:m,profiles:R.split(",")};U=pq(a,Q,l,b);N=U.duration;wa=U.periods;"static"!=z&&U.De||B.Aa(N||Infinity);a.u&&!a.B&&(va=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Ue(a.u):a.u&&Wa("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.");
677
- B.Sd(C||1);return u(Ga,Gp(a.j,wa,Q.Ma),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ga.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:a.g.dash.sequenceMode};if(!B.df()){Ga.A(4);break}Ma=Mf(b,"UTCTiming");return u(Ga,qq(a,l,Ma),5);case 5:Sa=Ga.h;if(!a.h)return Ga.return();B.Ve(Sa);case 4:B.Md();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
678
- A(Ga)}})}
679
- function pq(a,b,c,d){var e=Uf(d,"mediaPresentationDuration",Wf),f=[],g=0;d=Mf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Uf(k,"start",Wf,g),n=k.id,p=Uf(k,"duration",Wf),t=null;if(l){var v=Uf(l,"start",Wf);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.J.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=rq(a,b,c,{start:m,duration:t,node:k,Gd:null==t||!l});f.push(g);b.$.id&&t&&(a.L[b.$.id]=t);if(null==t){g=null;
680
- break}g=m+t}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,De:!1}:{periods:f,duration:g,De:!0}}
681
- function rq(a,b,c,d){b.$=sq(d.node,null,c);b.T=d;b.$.zb=b.zb;b.$.id||(b.$.id="__shaka_period_"+d.start);var e=Mf(d.node,"EventStream");c=b.presentationTimeline.Pa();e=r(e);for(var f=e.next();!f.done;f=e.next())tq(a,d.start,d.duration,f.value,c);c=Mf(d.node,"AdaptationSet").map(function(m){return uq(a,b,m)}).filter(dc);if(b.Ma){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.qg);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=
682
- c.filter(function(m){return!m.qe});c=c.filter(function(m){return m.qe});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.qe.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={Gc:h.Gc},l=k.next())h.Gc=l.value,h.Gc.trickModeVideo=e.streams.find(function(m){return function(n){return ad(m.Gc.codecs)==ad(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:vq(d,"audio");g=a.g.disableVideo?[]:vq(d,"video");f=a.g.disableText?
683
- []:vq(d,jc);c=a.g.disableThumbnails?[]:vq(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.$.id,Kc:d,gd:e,textStreams:g,imageStreams:f}}
684
- function vq(a,b){return a.filter(function(c){return c.contentType==b})}
685
- function uq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.fa=sq(c,b.$,null);var e=!1,f=Mf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(dc),h=void 0,k=b.fa.contentType==jc;k&&(h="subtitle");f=r(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
686
- l}}var n;m=Mf(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=Mf(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"),
687
- 10)));m=Mf(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 y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,C=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],C=x[1]||"und"):(w="CC"+p,2==t.length?p+=2:p++,C=x);v.set(w,od(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
688
- 1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,x=w),v.set(y,od(x));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=Mf(c,"ContentProtection");var z=Mo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=od(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Mf(c,"Label"))&&l.length&&
689
- (l=l[0],l.textContent&&(E=l.textContent));l=Mf(c,"Representation");c=l.map(function(F){if(F=wq(a,b,z,h,B,E,e,g,v,F))F.hdr=F.hdr||n;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.fa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.fa.contentType||"application"==b.fa.contentType)for(b.fa.contentType=xq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.fa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
690
- m.value,p=r(z.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(F){return F.getAttribute("id")}).filter(dc);return{id:b.fa.id||"__fake__"+a.G++,contentType:b.fa.contentType,language:B,th:e,streams:c,drmInfos:z.drmInfos,qe:f,qg:k}}
691
- function wq(a,b,c,d,e,f,g,h,k,l){b.I=sq(l,b.fa,null);a.u=Math.min(a.u,b.I.zb);if(!yq(b.I))return null;var m=b.T.start;b.bandwidth=Uf(l,"bandwidth",Zf)||0;var n=b.I.contentType,p=n==jc||"application"==n;n="image"==n;try{var t=function(H,I,J){return zq(a,H,I,J)};if(b.I.wc)var v=np(b,t);else if(b.I.ab)v=tp(b,a.l);else if(b.I.xc)v=yp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var y=b.I.wa,w=b.T.duration||0;v={Bb:function(){return Promise.resolve(Mj(m,w,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
692
- throw H;}t=Mf(l,"ContentProtection");t=Po(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Mf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(x=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Mf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
693
- (z=l.getAttribute("value")),!z))return null;var B;l=b.I.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=b.I.id?b.$.id+","+b.I.id:"",F={id:a.G++,originalId:b.I.id,createSegmentIndex:function(){var H,I,J;return G(function(L){if(1==L.g){I=(H=E&&b.Ma&&a.l[E])?a.l[E]:F;if(I.segmentIndex)return L.A(0);J=I;return u(L,v.Bb(),3)}J.segmentIndex=L.h;A(L)})},closeSegmentIndex:function(){F.segmentIndex&&
694
- (F.segmentIndex.release(),F.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.fa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.I.ad,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:x,closedCaptions:k,
695
- hdr:B,tilesLayout:z,matchedStreams:[]};E&&b.Ma&&!a.l[E]&&(a.l[E]=F);return F}function kq(a){var b,c;G(function(d){switch(d.g){case 1:return b=0,D(d,2),u(d,lq(a),4);case 4:b=d.h;ta(d,3);break;case 2:c=ua(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();mq(a,b);A(d)}})}function mq(a,b){0>a.F||a.D.N(Math.max(3,a.F-b,Qa(a.H)))}
696
- function sq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ad:null,audioSamplingRate:null,zb:0};c=c||b.wa;var d=Mf(a,"BaseURL"),e=d.map(Sf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Uf(a,"frameRate",bg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Mf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
697
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Mf(a,"AudioChannelConfiguration");m=Aq(m)||b.ad;p=Uf(a,"audioSamplingRate",$f)||b.audioSamplingRate;f||(f=xq(g,h));var t=Lf(a,"SegmentBase"),v=Lf(a,"SegmentTemplate"),y=t?Uf(t,"availabilityTimeOffset",ag)||0:0,w=v?Uf(v,"availabilityTimeOffset",ag)||0:0;d=d&&d.length?Uf(d[0],"availabilityTimeOffset",ag)||0:0;d=b.zb+d+y+w;return{wa:ec(c,e),wc:t||b.wc,ab:Lf(a,"SegmentList")||b.ab,xc:v||b.xc,width:Uf(a,"width",$f)||b.width,height:Uf(a,
698
- "height",$f)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ad:m,audioSamplingRate:p,zb:d}}
699
- function Aq(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=
700
- 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 yq(a){var b=a.wc?1:0;b+=a.ab?1:0;b+=a.xc?1:0;if(0==b)return a.contentType==jc||"application"==a.contentType?!0:!1;1!=b&&(a.wc&&(a.ab=null),a.xc=null);return!0}
701
- function Bq(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(1==m.g)return e=ec(b,[c]),f=cf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Ye(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Cc(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
702
- function qq(a,b,c){var d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;D(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.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.A(8);
703
- 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":Wa("NTP UTCTiming scheme is not supported");break;default:Wa("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return u(n,Bq(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return u(n,Bq(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:ta(n,
704
- 3);break;case 5:ua(n);case 3:g=f.next();n.A(2);break;case 4:return Wa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
705
- function tq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Uf(d,"timescale",$f)||1;d=r(Mf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Uf(k,"presentationTime",$f)||0,m=Uf(k,"duration",$f)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
706
- function zq(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=jf,f=ck(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Ye(a.o,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function xq(a,b){return ed(Zc(a,b))?jc:a.split("/")[0]}K("shaka.dash.DashParser",jq);Vg.mpd=function(){return new jq};Tg["application/dash+xml"]=function(){return new jq};Tg["video/vnd.mpeg.dash.mpd"]=function(){return new jq};function Cq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Dq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Dq.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};
707
- Dq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Eq(a,b){a=a.getAttribute(b);if(!a)throw new O(2,4,4023,b);return a.value}function Fq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Gq(a,b){this.name=a;this.value=b};function Hq(a,b){return a.filter(function(c){return c.name==b})}function Iq(a,b){return a.filter(function(c){return Eq(c,"TYPE")==b})}function Jq(a,b){a=Hq(a,b);return a.length?a[0]:null}function Kq(a,b){var c=0;c=void 0===c?0:c;return(a=Jq(a,b))?Number(a.value):c}function Lq(a,b){return ec([a],[b])[0]};function Mq(a){this.h=a;this.g=0}function Nq(a){Oq(a,/[ \t]+/gm)}function Oq(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Pq(a){return a.g==a.h.length?null:(a=Oq(a,/[^ \t\n]*/gm))?a[0]:null};function Qq(){this.g=0}
708
- function Rq(a,b,c){b=Cc(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=Sq(a,g),--a.g,Tq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Sq(a,h);if(Uq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
709
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Sq(a,m),Tq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Lq(d,m.trim()),h&&g.push(h),e.push(new Fq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new Fq("",g,k)));return new Cq(c,b,f,e)}f.push(h);
710
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new Gq("URI",k)),e=!0)}}return new Cq(c,b,f)}function Sq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Mq(d);var f;(f=Oq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Oq(d,g);)c.push(new Gq(f[1],f[2]||f[3])),Nq(d)}return new Dq(a,b,c,e)}
711
- var Tq="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(" "),Uq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Vq(){}function Wq(a){try{var b=Xq(a);return Oe({uri:a,Oe:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Me(c)}}function Xq(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=Lc(a):e=Gc(a);return{data:e,contentType:c}}
712
- K("shaka.net.DataUriPlugin",Vq);Vq.parse=Wq;$e("data",Wq);function Yq(){var a=this;this.g=this.i=null;this.Fa=1;this.o=new Map;this.u=new Map;this.F=new Map;this.F.set("video",new Map);this.F.set("audio",new Map);this.F.set(jc,new Map);this.F.set("image",new Map);this.ua=new Set;this.h=new Map;this.j=null;this.M="";this.W=new Qq;this.O=0;this.B=-1;this.H=Infinity;this.Ga=!1;this.m=new P(function(){Zq(a)});this.ea=$q;this.D=null;this.ca=0;this.J=Infinity;this.V=this.da=0;this.G=new Xe;this.L=new Map;this.s=new Map;this.ba=new Map;this.l=!1}q=Yq.prototype;
713
- q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,ar(c,a),2)):3!=e.g?(d=e.h,c.M=d.uri,u(e,br(c,d.data,a),3)):e.return(c.D)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ua.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
714
- q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){if(!cr(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(n){return n.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(dr(a,g));return u(m,Promise.all(b),2)}er(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.mc});d.length&&!h&&(k=fr,gr(a,k.ff),l=d.map(function(n){return n.Ya}),a.j.Aa(Math.min.apply(Math,ha(l))),a.i.updateDuration());A(m)})};
715
- function hr(a,b){return cr(a)?a.F.get(b.type):b.$c}
716
- function dr(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C;return G(function(z){if(1==z.g)return c=b.Jc,d=new Nb(c),a.l&&b.Mc&&Qb(d,new Sb("_HLS_skip=YES")),u(z,ar(a,d.toString()),2);e=z.h;if(!b.stream.segmentIndex)return z.return();f=Rq(a.W,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=Hq(f.g,"EXT-X-DEFINE");h=ir(a,g);k=b.stream;l=hr(a,b);m=jr(f,k.mimeType);n=m.keyIds;p=m.drmInfos;t=function(B,E){return B.size===E.size&&[].concat(ha(B)).every(function(F){return E.has(F)})};t(k.keyIds,n)||(k.keyIds=
717
- n,k.drmInfos=p,a.i.newDrmInfo(k));v=kr(a,f,k.type,l,h);k.segmentIndex.Hb(v,a.j.Pa());v.length&&(y=Kq(f.g,"EXT-X-MEDIA-SEQUENCE"),w=l.get(y),k.segmentIndex.eb(w));x=v[v.length-1];if(C=Jq(f.g,"EXT-X-ENDLIST"))b.mc=!0,b.Ya=x.endTime;A(z)})}q.onExpirationUpdated=function(){};
718
- function lr(a,b){for(var c=-1==a.B,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=hr(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.B=Math.max(a.B,k));e.Cd=k;break}}}}if(!(0>a.B))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.B-c.Cd),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),mr(a,c,d)}
719
- function nr(a,b){if(Infinity==a.H){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.H=Math.min(a.H,d.g))}}b=a.H;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Va("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Ac,"Expect AV sync issues!");else for(mr(a,c,f.g-b-f.startTime),c=r(e),e=c.next();!e.done;e=c.next())e.value.oe(b)}}}
720
- function mr(a,b,c){b.Ya+=c;a=hr(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
721
- function br(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C,z,B,E,F,H,I,J,L,R,Q,U,N,wa,va,Ma,Sa;return G(function(Ga){switch(Ga.g){case 1:d=Rq(a.W,b,a.M);e=Hq(d.g,"EXT-X-DEFINE");for(var Kb=r(e),Ja=Kb.next();!Ja.done;Ja=Kb.next()){var Ua=Ja.value;Ja=Z(Ua,"NAME");Ua=Z(Ua,"VALUE");Ja&&Ua&&(a.o.has(Ja)||a.o.set(Ja,Ua))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new Nb(d.segments[0].i),I=H.qa.split(".").pop(),(J=or[I])?F=J:"ts"!==I&&"mp4"!==I&&(pr[I]?(J=pr[I],
722
- L=a.g.hls.defaultAudioCodec,F=J+'; codecs="'+L+'"'):qr[I]&&(J=qr[I],R=a.g.hls.defaultVideoCodec,F=J+'; codecs="'+R+'"'))),Q=F.split(";")[0],U=Q.split("/")[0],N=cd(F),wa=new Map,u(Ga,rr(a,d,c,c,N,U,"",!0,"Media Playlist",null,wa,null,!1,!1,Q),5);k=Hq(d.g,"EXT-X-MEDIA");l=Hq(d.g,"EXT-X-STREAM-INF");m=Hq(d.g,"EXT-X-IMAGE-STREAM-INF");n=Hq(d.g,"EXT-X-SESSION-KEY");Kb=r(l);for(Ja=Kb.next();!Ja.done;Ja=Kb.next()){var Zb=Ja.value;Ua=Z(Zb,"AUDIO");Ja=Z(Zb,"VIDEO");var pb=Z(Zb,"SUBTITLES");Zb=sr(a,Zb);if(pb){var Wn=
723
- hc(jc,Zb);a.s.set(pb,Wn);hb(Zb,Wn)}Ua&&(pb=hc("audio",Zb),pb||(pb=a.g.hls.defaultAudioCodec),a.s.set(Ua,pb));Ja&&(Ua=hc("video",Zb),Ua||(Ua=a.g.hls.defaultVideoCodec),a.s.set(Ja,Ua))}p=Hq(d.g,"EXT-X-SESSION-DATA");t=r(p);for(v=t.next();!v.done;v=t.next())if(y=v.value,w=Z(y,"DATA-ID"),x=Z(y,"URI"),C=Z(y,"LANGUAGE"),z=Z(y,"VALUE"),B=(new Map).set("id",w),x&&B.set("uri",Lq(a.M,x)),C&&B.set("language",C),z&&B.set("value",z),E=new S("sessiondata",B),a.i)a.i.onEvent(E);tr(a,k);Kb=Iq(k,"CLOSED-CAPTIONS");
724
- Kb=r(Kb);for(Ja=Kb.next();!Ja.done;Ja=Kb.next())pb=Ja.value,Ja=ur(pb),Ua=Eq(pb,"GROUP-ID"),pb=Eq(pb,"INSTREAM-ID"),a.L.get(Ua)||a.L.set(Ua,new Map),a.L.get(Ua).set(pb,Ja);f=vr(a,l,n);g=wr(a,k);return u(Ga,xr(a,m),4);case 4:h=Ga.h;Ga.A(3);break;case 5:va=Ga.h,a.h.set(c,va),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==U?va.stream:null,video:"video"==U?va.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,
725
- 7,7001);a.j=new T(null,0);a.j.yc(!0);1==d.type&&(cr(a)&&(yr(a),Ma=a.O,a.m.N(Ma)),Sa=Array.from(a.h.values()),zr(a,Sa),Ar(a));a.D={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.D);A(Ga)}})}
726
- function Ar(a){if(cr(a)){if(a.O=a.J,a.ea==Br){var b=Cr(a);a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.me(b)}}else a.j.Aa(Cr(a));a.j.Md()}function ir(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
727
- function wr(a,b){var c=Iq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Dr(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Eq(d.value,"GROUP-ID");if(d=a.s.get(e))if(e=a.u.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Er(jc,d)||Fr(jc)}}return b.filter(function(g){return g})}
728
- function xr(a,b){var c,d;return G(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return G(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);D(l,2);return u(l,Gr(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=ua(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
729
- function tr(a,b){b=b.filter(function(d){var e=Z(d,"URI")||"";return"SUBTITLES"!=Z(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Dr(a,c.value)}
730
- function vr(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Eq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Z(f,"KEYFORMAT")||"identity",f=(g=Hr[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Z(k,"FRAME-RATE"),m=Number(Z(k,"AVERAGE-BANDWIDTH"))||Number(Eq(k,"BANDWIDTH")),n=Z(k,"RESOLUTION");n=r(n?n.split("x"):[null,null]);var p=n.next().value,t=n.next().value,
731
- v=Z(k,"VIDEO-RANGE");k=Ir(a,k);n=k.audio;k=k.video;for(var y=r(k),w=y.next();!w.done;w=y.next())if(w=w.value.stream)w.width=Number(p)||void 0,w.height=Number(t)||void 0,w.frameRate=Number(l)||void 0,w.hdr=v||void 0;l=a.g.disableAudio;if(!n.length||l)n=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];n=r(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=p?p.stream:null)v.drmInfos=d,v.keyIds=e;if(y=x?x.stream:null)y.drmInfos=d,y.keyIds=
732
- e;w=p?p.stream.drmInfos:null;var C=x?x.stream.drmInfos:null;x=(x?x.Ac:"")+" - "+(p?p.Ac:"");v&&y&&w.length&&C.length&&!(0<Pg(w,C).length)||a.ua.has(x)||(v={id:a.Fa++,language:v?v.language:"und",primary:!!v&&v.primary||!!y&&y.primary,audio:v,video:y,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ua.add(x))}return l}).reduce(bc,[]);return b=b.filter(function(k){return null!=k})}
733
- function Ir(a,b){var c=sr(a,b),d=Z(b,"AUDIO"),e=Z(b,"VIDEO"),f=d||e;f=f&&a.u.has(f)?a.u.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Eq(b,"URI"),h=d.audio.find(function(m){return m&&m.Ac==g}),k=hc("video",c),l=hc("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Jr(a,b,c,f),d[a.stream.type]=[a]);return d}
734
- function sr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=bd(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function ur(a){a=Z(a,"LANGUAGE")||"und";return od(a)}
735
- function Dr(a,b){var c=Eq(b,"GROUP-ID"),d="",e=Eq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=jc);var f=e;f!=jc&&c&&a.s.has(c)&&(d=a.s.get(c));e=Kr(Eq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);var g=ur(b),h=Z(b,"NAME"),k="YES"==Z(b,"DEFAULT");var l="audio"==f?(l=Z(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Z(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var n=Z(b,"CHARACTERISTICS");b="YES"==Z(b,"FORCED");d=Lr(a,e,d,f,g,k,h,l,null,n,b,m);a.u.has(c)?a.u.get(c).push(d):a.u.set(c,
736
- [d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
737
- function Gr(a,b){var c,d,e,f,g,h,k,l,m,n;return G(function(p){if(1==p.g){c=Kr(Eq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p.return(a.h.get(c));e=ur(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Lr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?p.return(a.h.get(c)):(k=Z(b,"RESOLUTION"))?u(p,h.stream.createSegmentIndex(),3):p.A(2)}2!=p.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
738
- Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p.return(h)})}function Jr(a,b,c,d){var e=Kr(Eq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);b=Z(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.L.get(b):null;c=gc(d,c);d=Lr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
739
- function Lr(a,b,c,d,e,f,g,h,k,l,m,n){function p(C){var z,B,E,F,H,I,J,L,R,Q,U,N,wa;return G(function(va){if(1==va.g)return u(va,ar(a,y.Jc),2);if(3!=va.g){z=va.h;if(C.aborted)return va.return();B=z.uri;E=Rq(a.W,z.data,B);F=cr(a);return u(va,rr(a,E,b,B,c,d,e,f,g,h,k,l,m,n),3)}H=va.h;if(C.aborted)return va.return();I=H.stream;cr(a)&&!F&&yr(a);y.Jc=B;y.Ya=H.Ya;y.Mc=H.Mc;y.mc=H.mc;y.$c=H.$c;y.Ld=!0;v.segmentIndex=I.segmentIndex;v.encrypted=I.encrypted;v.drmInfos=I.drmInfos;v.keyIds=I.keyIds;v.mimeType=
740
- I.mimeType;Yi.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.i.newDrmInfo(v);J=kc;if(d==J.va||d==J.Hc)for(L=r(a.h.values()),R=L.next();!R.done;R=L.next())Q=R.value,Q.Ld||Q.type!=d||(Q.stream.mimeType=I.mimeType,Yi.includes(Q.stream.mimeType)&&(Q.stream.codecs=""));Mr(a)&&(a.Ga?zr(a,[y]):(a.Ga=!0,U=Array.from(a.h.values()),N=U.filter(function(Ma){return Ma.stream.segmentIndex}),zr(a,N),Ar(a),wa=a.O,0<wa&&a.m.N(wa)));A(va)})}var t=Lq(a.M,b),v=Nr(a,c,d,e,f,g,h,k,l,m,n);Yi.includes(v.mimeType)&&
741
- (v.codecs="");var y={stream:v,type:d,Ac:b,Jc:t,Ya:0,$c:new Map,Mc:!1,mc:!1,Cd:-1,Ld:!1},w=null,x=new AbortController;v.createSegmentIndex=function(){if(w)return w;x=new AbortController;return w=new Promise(function(C){C(p(x.signal))})};v.closeSegmentIndex=function(){w&&!v.segmentIndex&&x.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);w=null};return y}
742
- function Cr(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Ya));return b}function er(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Kj(d.segmentIndex,function(e){c.push(e)});a.j.Ib(c)}
743
- function zr(a,b){if(!cr(a))for(var c=Cr(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Wa(0,c);c=r(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,Yi.includes(e.mimeType)&&(e.codecs="");er(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?lr(a,b):nr(a,b)}
744
- function Mr(a){if(!a.D)return!1;var b=[],c=[];a=r(a.D.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
745
- function rr(a,b,c,d,e,f,g,h,k,l,m,n,p,t,v){var y,w,x,C,z,B,E,F,H,I,J,L,R,Q,U;return G(function(N){if(1==N.g){if(1!=b.type)throw new O(2,4,4017);y=Hq(b.g,"EXT-X-DEFINE");w=ir(a,y);Or(a,b);return v?N.A(2):u(N,Pr(a,f,e,b,w),3)}2!=N.g&&(v=N.h);x=jr(b,v);C=x.drmInfos;z=x.keyIds;B=x.encrypted;E=x.kf;if(B&&!C.length&&!E)throw new O(2,4,4026);F=cr(a)?a.F.get(f):new Map;H=a.l;I=kr(a,b,f,F,w);H!=a.l&&Or(a,b);J=I[I.length-1].endTime;L=new Jj(I);Q=(R=Jq(b.g,"EXT-X-SERVER-CONTROL"))?null!=R.getAttribute("CAN-SKIP-UNTIL"):
746
- !1;U=Nr(a,e,f,g,h,k,l,m,n,p,t);U.segmentIndex=L;U.encrypted=B;U.drmInfos=C;U.keyIds=z;U.mimeType=v;return N.return({stream:U,type:f,Ac:c,Jc:d,Ya:J,Mc:Q,mc:!1,Cd:-1,$c:F,Ld:!1})})}
747
- function Nr(a,b,c,d,e,f,g,h,k,l,m){var n=Er(c,b)||Fr(c);return{id:a.Fa++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n,codecs:b,kind:c==jc?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:k?k.split(","):[],forced:l,channelsCount:g,audioSamplingRate:null,spatialAudio:m,closedCaptions:h,
623
+ function Vo(a,b){var c=Wo(a,b,"timescale"),d=1;c&&(d=Yf(c)||1);var e=Wo(a,b,"duration");c=Yf(e||"");"image"==a.I.contentType&&(c=$f(e||""));c&&(c/=d);var f=Wo(a,b,"startNumber");e=Number(Wo(a,b,"presentationTimeOffset"))||0;var g=Zf(f||"");if(null==f||null==g)g=1;f=Xo(a,b,"SegmentTimeline");b=null;if(f){b=d;a=a.T.duration||Infinity;f=Lf(f,"S");for(var h=[],k=-e,l=0;l<f.length;++l){var m=f[l],p=f[l+1],n=Tf(m,"t",Zf),t=Tf(m,"d",Zf);m=Tf(m,"r",Xf);null!=n&&(n-=e);if(!t)break;n=null!=n?n:k;m=m||0;if(0>
624
+ m)if(p){p=Tf(p,"t",Zf);if(null==p)break;else if(n>=p)break;m=Math.ceil((p-n)/t)-1}else{if(Infinity==a)break;else if(n/b>=a)break;m=Math.ceil((a*b-n)/t)-1}0<h.length&&n!=k&&(h[h.length-1].end=n/b);for(p=0;p<=m;++p)k=n+t,h.push({start:n/b,end:k/b,Fg:n}),n=k}b=h}return{timescale:d,ja:c,Mb:g,Sa:e/d||0,te:e,timeline:b}}function Wo(a,b,c){return[b(a.I),b(a.fa),b(a.aa)].filter(cc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
625
+ function Xo(a,b,c){return[b(a.I),b(a.fa),b(a.aa)].filter(cc).map(function(d){return Kf(d,c)}).reduce(function(d,e){return d||e})}
626
+ function Yo(a,b,c,d,e,f){for(var g=Pf(a,"http://www.w3.org/1999/xlink","href"),h=Pf(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 Le(new O(2,4,4028));if("onLoad"!=h)return Le(new O(2,4,4027));var m=dc([d],[g]);return e.request(0,bf(m,b)).Z(function(p){p=dg(p.data,a.tagName);if(!p)return Le(new O(2,4,4001,g));
627
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=r(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Zo(a,b,c,m[0],e,f+1)})}
628
+ function Zo(a,b,c,d,e,f){f=void 0===f?0:f;if(Pf(a,"http://www.w3.org/1999/xlink","href")){var g=Yo(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return Zo(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"==Pf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Zo(k,b,c,d,e,f)));return Pe(g).Z(function(){return a})};function $o(a,b,c,d,e,f,g){var h,k=(new yf).R("sidx",function(l){h=ap(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
629
+ function ap(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.K();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.K();var m=g.reader.K()}else l=g.reader.$a(),m=g.reader.$a();g.reader.skip(2);var p=g.reader.ae();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.K(),t=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.K();g.reader.skip(4);if(1==t)throw new O(2,3,3006);h.push(new T(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function bp(a){this.h=Jb(a);this.g=new vf(this.h,0)}bp.prototype.ha=function(){return this.g.ha()};
630
+ function cp(a){var b=dp(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=dp(a);a:{d=r(ep);for(var e=d.next();!e.done;e=d.next())if(Fb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new O(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Jb(a.h,a.g.$(),b);a.g.skip(b);return new fp(c,d)}
631
+ function dp(a){var b=a.g.$(),c=a.g.Ra();if(0==c)throw new O(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return L(a.h,b,c)}var ep=[[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 fp(a,b){this.id=a;this.g=b}
632
+ function gp(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=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function hp(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new bp(a.g);for(var p=null,n=null;a.ha();){var t=cp(a);if(187==t.id){var v=ip(t);v&&(t=c*v.Gg,v=b+v.pg,null!=p&&m.push(new T(p+g,t+g,l,n,v-1,f,g,h,k)),p=t,n=v)}}null!=p&&m.push(new T(p+g,d+g,l,n,null,f,g,h,k));return m}
633
+ function ip(a){var b=new bp(a.g);a=cp(b);if(179!=a.id)throw new O(2,3,3013);a=gp(a);b=cp(b);if(183!=b.id)throw new O(2,3,3012);b=new bp(b.g);for(var c=0;b.ha();){var d=cp(b);if(241==d.id){c=gp(d);break}}return{Gg:a,pg:c}};function jp(a,b){b=Xo(a,b,"Initialization");if(!b)return null;var c=a.I.wa,d=b.getAttribute("sourceURL");d&&(c=dc(a.I.wa,[d]));d=0;var e=null;if(b=Tf(b,"range",Wf))d=b.start,e=b.end;return new ni(function(){return c},d,e,kp(a))}
634
+ function lp(a,b){var c=Number(Wo(a,mp,"presentationTimeOffset"))||0,d=Wo(a,mp,"timescale"),e=1;d&&(e=Yf(d)||1);var f=c/e||0,g=jp(a,mp);np(a,g);var h=Ve(a);return{Cb:function(){var k=Xo(h,mp,"RepresentationIndex");var l=h.I.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=dc(h.I.wa,[k]));k=op(h);return pp(h,b,g,l,k.start,k.end,f)}}}
635
+ function pp(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,D,z,A,E;return G(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Wa||!a.T.Hd,l=a.T.start,m=a.T.duration,p=a.I.mimeType.split("/")[1],n=b,t=null,v=[n(d,e,f),"webm"==p?n(c.ya(),c.Ba,c.ma):null],n=null,u(F,Promise.all(v),2);y=F.h;w=y[0];x=y[1]||null;D=null;z=l-g;A=l;E=m?l+m:Infinity;if("mp4"==p)var H=$o(w,e,d,c,z,A,E);else{H=new bp(x);if(440786851!=cp(H).id)throw new O(2,3,3008);var I=cp(H);if(408125543!=I.id)throw new O(2,3,3009);H=I.g.byteOffset;
636
+ I=new bp(I.g);for(var J=null;I.ha();){var N=cp(I);if(357149030==N.id){J=N;break}}if(!J)throw new O(2,3,3010);J=new bp(J.g);N=1E6;for(I=null;J.ha();){var R=cp(J);if(2807729==R.id)N=gp(R);else if(17545==R.id)if(4==R.g.byteLength)I=R.g.getFloat32(0);else if(8==R.g.byteLength)I=R.g.getFloat64(0);else throw new O(2,3,3003);}if(null==I)throw new O(2,3,3011);J=N/1E9;I*=J;N=cp(new bp(w));if(475249515!=N.id)throw new O(2,3,3007);H=hp(N,H,J,I,d,c,z,A,E)}D=H;h.Jb(D);t=new Hj(D);k&&t.Xa(A,E,!0);return F.return(t)})}
637
+ function mp(a){return a.xc}function op(a){var b=Xo(a,mp,"RepresentationIndex");a=Wo(a,mp,"indexRange");a=Wf(a||"");b&&(a=Tf(b,"range",Wf,a));return a}function np(a,b){qp(a,b);if(!op(a))throw new O(2,4,4002);}function qp(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=ic&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
638
+ function kp(a){var b=a.I;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.bd,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function rp(a,b){var c=jp(a,sp),d=tp(a);if(!d.ja&&!d.timeline&&1<d.Hb.length)throw new O(2,4,4002);if(!d.ja&&!a.T.duration&&!d.timeline&&1==d.Hb.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.aa.id&&a.I.id&&(f=b[a.aa.id+","+a.I.id])&&(e=f.segmentIndex);var g=up(a.T.start,a.T.duration,a.I.wa,d,c);b=!e;e?e.Ib(g,a.presentationTimeline.Oa()):e=new Hj(g);a.presentationTimeline.Jb(g);a.Wa&&a.T.Hd||e.Xa(a.T.start,a.T.duration?a.T.start+a.T.duration:
639
+ Infinity,b);f&&(f.segmentIndex=e);return{Cb:function(){e&&0!=e.g.length||e.qc(g);return Promise.resolve(e)}}}function sp(a){return a.ab}function tp(a){var b=vp(a);a=Vo(a,sp);var c=a.Mb;0==c&&(c=1);var d=0;a.ja?d=a.ja*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ja:a.ja,startTime:d,Mb:c,Sa:a.Sa,timeline:a.timeline,Hb:b}}
640
+ function up(a,b,c,d,e){var f=d.Hb.length;d.timeline&&d.timeline.length!=d.Hb.length&&(f=Math.min(d.timeline.length,d.Hb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={pd:m.pd},p++){var n=d.Hb[p];m.pd=dc(c,[n.fg]);var t=void 0;t=null!=d.ja?l+d.ja:d.timeline?d.timeline[p].end:l+b;k.push(new T(a+l,a+t,function(v){return function(){return v.pd}}(m),n.start,n.end,e,g,a,h));l=t}return k}
641
+ function vp(a){return[a.I.ab,a.fa.ab,a.aa.ab].filter(cc).map(function(b){return Lf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Le&&(a.Le=!0);var c=b.getAttribute("media");b=Tf(b,"mediaRange",Wf,{start:0,end:null});return{fg:c,start:b.start,end:b.end}})};function wp(a,b,c,d,e,f){var g=xp(a),h=yp(a);zp(h);var k=Ve(a);if(h.pc)return qp(a,g),{Cb:function(){var t=Uo(h.pc,k.I.id,null,k.bandwidth||null,null);t=dc(k.I.wa,[t]);return pp(k,b,g,t,0,null,h.Sa)}};if(h.ja)return d||"image"===a.fa.contentType||(a.presentationTimeline.Td(h.ja),a.presentationTimeline.Ud(a.T.start)),{Cb:function(){return Ap(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.I.id&&(d=a.aa.id+","+a.I.id,d=c[d])&&(l=d.segmentIndex);var m=Bp(k,h,g);c=a.T.start;var p=a.T.duration?a.T.start+a.T.duration:
642
+ Infinity,n=!(a.Wa&&a.T.Hd);l?(n&&(new Hj(m)).Xa(c,p,!0),l.Ib(m,a.presentationTimeline.Oa())):l=new Hj(m);a.presentationTimeline.Jb(m);n&&l.Xa(c,p);d&&a.Wa&&(d.segmentIndex=l);return{Cb:function(){l&&0!=l.g.length||l.qc(m);return Promise.resolve(l)}}}function Cp(a){return a.yc}function yp(a){var b=Vo(a,Cp),c=Wo(a,Cp,"media");a=Wo(a,Cp,"index");return{ja:b.ja,timescale:b.timescale,Mb:b.Mb,Sa:b.Sa,te:b.te,timeline:b.timeline,Qd:c,pc:a}}
643
+ function zp(a){var b=a.pc?1:0;b+=a.timeline?1:0;b+=a.ja?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.pc&&(a.timeline=null),a.ja=null);if(!a.pc&&!a.Qd)throw new O(2,4,4002);}
644
+ function Ap(a,b,c,d,e){function f(J){var N=(J-t)*n,R=N+b.Sa,Q=N+l;N=Q+n;var ba=Math.min(N,h());Q=new T(Q,ba,function(){var M=Uo(y,x,J,w,R*v);return dc(D,[M])},0,null,d,z,l,h());Q.l=N;return Q}function g(){var J=[Math.max(k.Oa(),l),Math.min(k.gb(),h())].map(function(N){return N-l});return[Math.ceil(J[0]/n),Math.ceil(J[1]/n)-1].map(function(N){return N+t})}function h(){var J=null!=m&&e[m]||p;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.T.start,m=a.aa.id,p=a.T.duration,n=b.ja,t=b.Mb,v=b.timescale,
645
+ y=b.Qd,w=a.bandwidth||null,x=a.I.id,D=a.I.wa,z=l-b.Sa,A=g();a=a.Wa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var E=a;E<=A;++E){var F=f(E);c.push(F)}var H=new Hj(c);c=k.gb()<h();E=k.U();if(c||E){var I=Math.max(a,A+1);H.gd(n,function(){var J=k.Oa();H.eb(J);var N=r(g());N.next();N=N.next().value;for(var R=[];I<=N;){var Q=f(I);R.push(Q);I++}return J>h()&&!R.length?null:R})}return Promise.resolve(H)}
646
+ function Bp(a,b,c){var d=a.T.start,e=a.T.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={od:h.od,sd:h.sd,vd:h.vd,ld:h.ld,xd:h.xd,md:h.md},k++){var l=b.timeline[k],m=l.start,p=l.Fg;l=l.end;h.vd=k+b.Mb;h.xd=p+b.te;h.sd=a.I.id;h.ld=a.bandwidth||null;h.od=b.Qd;h.md=a.I.wa;g.push(new T(d+m,d+l,function(n){return function(){var t=Uo(n.od,n.sd,n.vd,n.ld||null,n.xd);return dc(n.md,[t]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
647
+ function xp(a){var b=Wo(a,Cp,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.wa;return new ni(function(){var f=Uo(b,c,null,d,null);return dc(e,[f])},0,null,kp(a))};function Dp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}Dp.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=[]};
648
+ function Ep(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D,z,A,E,F,H,I,J,N,R,Q,ba,M,ja,Fa;return G(function(xa){switch(xa.g){case 1:d=jc;Fp(b);Gp(b);Hp(b);Ip(b);if(!c&&1==b.length){e=b[0];a.g=e.Lc;a.h=e.hd;a.j=e.textStreams;a.i=e.imageStreams;xa.B(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return xa.return();k=b.map(function(Na){return Na.Lc});l=b.map(function(Na){return Na.hd});m=b.map(function(Na){return Na.textStreams});p=b.map(function(Na){return Na.imageStreams});
649
+ n=r(m);for(t=n.next();!t.done;t=n.next())v=t.value,v.push(Jp(d.X));y=r(p);for(w=y.next();!w.done;w=y.next())x=w.value,x.push(Jp(d.Xb));return u(xa,Kp(a.g,k,f,Lp,Mp),3);case 3:return u(xa,Kp(a.h,l,f,Lp,Mp),4);case 4:return u(xa,Kp(a.j,m,f,Lp,Mp),5);case 5:return u(xa,Kp(a.i,p,f,Lp,Mp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(J=r(a.g),N=J.next();!N.done;N=J.next())for(R=N.value,Q=r(a.h),ba=Q.next();!ba.done;ba=Q.next())M=ba.value,ja=Og(R.drmInfos,M.drmInfos),R.drmInfos.length&&M.drmInfos.length&&
650
+ !ja.length||(Fa=D++,z.push({id:Fa,language:R.language,primary:R.primary,audio:R,video:M,bandwidth:(R.bandwidth||0)+(M.bandwidth||0),drmInfos:ja,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),E=r(A),F=E.next();!F.done;F=E.next())H=F.value,I=D++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.Ic?H:null,video:H.type==d.va?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
651
+ a.l=z;B(xa)}})}function Fp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Lc),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&&hb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Lc=c}}
652
+ function Hp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&hb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
653
+ function Gp(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.hd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&hb(e.roles,h.roles)&&uf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.hd=c}}
654
+ function Ip(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}}
655
+ function Np(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D,z,A,E,F,H,I,J,N,R;return G(function(Q){switch(Q.g){case 1:b=jc;if(1==a.length)return Q.return(a[0]);c=a.map(function(ba){return ba.filter(function(M){return M.type==b.Ic})});d=a.map(function(ba){return ba.filter(function(M){return M.type==b.va})});e=a.map(function(ba){return ba.filter(function(M){return M.type==b.X})});f=a.map(function(ba){return ba.filter(function(M){return M.type==b.Xb})});g=r(e);for(h=g.next();!h.done;h=g.next())k=h.value,
656
+ k.push(Op(b.X));l=r(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(Op(b.Xb));return u(Q,Kp([],c,0,Pp,Qp),2);case 2:return n=Q.h,u(Q,Kp([],d,0,Pp,Qp),3);case 3:return t=Q.h,u(Q,Kp([],e,0,Pp,Qp),4);case 4:return v=Q.h,u(Q,Kp([],f,0,Pp,Qp),5);case 5:y=Q.h;w=0;if(t.length&&n.length)for(E=r(n),F=E.next();!F.done;F=E.next())for(H=F.value,I=r(t),J=I.next();!J.done;J=I.next())N=J.value,R=w++,N.variantIds.push(R),H.variantIds.push(R);else for(x=t.concat(n),D=r(x),z=D.next();!z.done;z=D.next())A=z.value,
657
+ A.variantIds=[w++];return Q.return(t.concat(n).concat(v).concat(y))}})}
658
+ function Kp(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v,y,w,x,D,z,A,E,F,H,I,J;return G(function(N){switch(N.g){case 1:f=jc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=r(a);l=k.next();case 2:if(l.done){N.B(4);break}m=l.value;return u(N,Rp(m,b,c,e,g),5);case 5:p=N.h;if(!p)throw new O(2,4,4037);l=k.next();N.B(2);break;case 4:n=r(g);for(t=n.next();!t.done;t=n.next())for(v=t.value,y=r(v),w=y.next();!w.done;w=y.next())x=w.value,(D=Sp(x,b,d,e,g))&&a.push(D);z=r(g);for(t=z.next();!t.done;t=
659
+ z.next())for(A=t.value,E={},F=r(A),w=F.next();!w.done;E={Va:E.Va},w=F.next())if(E.Va=w.value,H=E.Va.type==f.X&&!E.Va.language,I=E.Va.type==f.Xb&&!E.Va.tilesLayout,!H&&!I&&(J=a.some(function(R){return function(Q){return Q.mimeType==R.Va.mimeType&&$c(Q.codecs)==$c(R.Va.codecs)}}(E))))throw new O(2,4,4037);return N.return(a)}})}function Rp(a,b,c,d,e){return G(function(f){if(1==f.g)return Tp(b,a),a.matchedStreams?a.segmentIndex?u(f,Up(a,c),2):f.B(2):f.return(!1);Vp(a,c,d,e);return f.return(!0)})}
660
+ function Up(a,b){var c,d,e,f,g,h,k;return G(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Lj)for(h=b;h<d.length;h++)k=d[h],k.segmentIndex&&a.segmentIndex.l.push(k.segmentIndex);B(l)})}
661
+ function Sp(a,b,c,d,e){var f=c(a);Tp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return G(function(g){if(f.segmentIndex)return g.B(0);f.segmentIndex=new Lj;return u(g,Up(f,0),0)})});if(!f.matchedStreams||!f.matchedStreams.length)return null;Vp(f,0,d,e);return f}function Vp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==rd(a.language,g.language)&&(h=!1);h&&d[f].delete(g)}}
662
+ function Lp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=r(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
663
+ function Pp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
664
+ function Mp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Og(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||
665
+ (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Lp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Mp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Mp(a.trickModeVideo,b)}
666
+ function Qp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=r(b.closedCaptions),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;a.closedCaptions.set(c,d)}}
667
+ function Tp(a,b){var c=[];a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=b,f={audio:Wp,video:Wp,text:Xp,image:Yp}[e.type],g={audio:Zp,video:$p,text:aq,image:bq}[e.type],h=null;d=r(d.value);for(var k=d.next();!k.done;k=d.next())k=k.value,!f(e,k)||h&&!g(e,h,k)||(h=k);e=h;if(!e)return;c.push(e)}b.matchedStreams=c}function Wp(a,b){var c;!(c=b.mimeType!=a.mimeType||$c(b.codecs)!=$c(a.codecs))&&(c=a.drmInfos)&&(a=a.drmInfos,b=b.drmInfos,c=!(a.length&&b.length?0<Og(a,b).length:1));return c?!1:!0}
668
+ function Xp(a,b){return a.language?b.language?0==rd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Yp(a){return a.tilesLayout?!0:!1}
669
+ function Zp(a,b,c){if(a.id==c.id)return!0;var d=rd(a.language,b.language),e=rd(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
670
+ d=cq(a.channelsCount,b.channelsCount,c.channelsCount);if(d==dq)return!0;if(d==eq)return!1;d=cq(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==dq?!0:d==eq?!1:a.bandwidth&&fq(a.bandwidth,b.bandwidth,c.bandwidth)==dq?!0:!1}
671
+ function $p(a,b,c){if(a.id==c.id)return!0;var d=cq(a.width*a.height,b.width*b.height,c.width*c.height);if(d==dq)return!0;if(d==eq)return!1;if(a.frameRate){d=cq(a.frameRate,b.frameRate,c.frameRate);if(d==dq)return!0;if(d==eq)return!1}return a.bandwidth&&fq(a.bandwidth,b.bandwidth,c.bandwidth)==dq?!0:!1}
672
+ function aq(a,b,c){if(a.id==c.id)return!0;var d=rd(a.language,b.language),e=rd(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!=
673
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function bq(a,b,c){return a.id==c.id?!0:cq(a.width*a.height,b.width*b.height,c.width*c.height)==dq?!0:!1}function Op(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}}
674
+ function Jp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Hj([]),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}}
675
+ function cq(a,b,c){if(b==a&&a!=c)return eq;if(c==a&&a!=b)return dq;if(b>a){if(c<=a||c-a<b-a)return dq;if(c-a>b-a)return eq}else{if(c>a)return eq;if(a-c<a-b)return dq;if(a-c>a-b)return eq}return gq}function fq(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?dq:b<a?eq:gq}var dq=1,gq=0,eq=-1;function hq(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.L={};this.j=new Dp;this.F=0;this.H=new Ra(5);this.D=new P(function(){iq(a)});this.o=new We;this.s=null;this.J=[];this.u=Infinity;this.A=!1}q=hq.prototype;q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){if(1==e.g)return c.A=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,jq(c),2);d=e.h;c.h&&kq(c,d);if(!c.h)throw new O(2,7,7001);return e.return(c.i)})};
676
+ q.stop=function(){for(var a=r(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};q.update=function(){var a=this,b;return G(function(c){if(1==c.g)return C(c,2),u(c,jq(a),4);if(2!=c.g)return va(c,0);b=wa(c);if(!a.h||!b)return c.return();a.h.onError(b);B(c)})};q.onExpirationUpdated=function(){};
677
+ function jq(a){var b,c,d,e,f,g,h;return G(function(k){if(1==k.g)return b=bf(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Xe(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k.return(0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,lq(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.H.sample(1,h);return k.return(h)})}
678
+ function lq(a,b,c){var d,e,f,g,h;return G(function(k){if(1==k.g){d=dg(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k.return(mq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Zo(d,a.g.retryParameters,f,c,a.h.networkingEngine);Xe(a.o,g);return u(k,g.promise,2)}h=k.h;return k.return(mq(a,h,c))})}
679
+ function mq(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D,z,A,E,F,H,I,J,N,R,Q,ba,M,ja,Fa,xa,Na;return G(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Lf(b,"Location").map(Rf).filter(cc);0<f.length&&(g=dc(e,f),e=a.m=g);h=Lf(b,"BaseURL");k=h.map(Rf);l=dc(e,k);m=0;h&&h.length&&(m=Tf(h[0],"availabilityTimeOffset",$f)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=Tf(b,"minBufferTime",Vf)||0);a.F=Tf(b,"minimumUpdatePeriod",Vf,-1);t=Tf(b,"availabilityStartTime",Uf);v=Tf(b,
680
+ "timeShiftBufferDepth",Vf);y=a.g.dash.ignoreSuggestedPresentationDelay;w=null;y||(w=Tf(b,"suggestedPresentationDelay",Vf));x=a.g.dash.ignoreMaxSegmentDuration;D=null;x||(D=Tf(b,"maxSegmentDuration",Vf));z=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,E=r(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.eb(A.Oa());else I=a.g.defaultPresentationDelay||1.5*n,J=null!=w?w:I,A=new U(t,J,a.g.dash.autoCorrectDrift);A.zc("static"==z);(N=A.U())&&
681
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.ne(v);R=b.getAttribute("profiles")||"";Q={Wa:"static"!=z,presentationTimeline:A,aa:null,T:null,fa:null,I:null,bandwidth:0,Le:!1,Ab:m,profiles:R.split(",")};ba=nq(a,Q,l,b);M=ba.duration;ja=ba.periods;"static"!=z&&ba.Ee||A.Aa(M||Infinity);a.u&&!a.A&&(Fa=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.A=a.h.isLowLatencyMode());a.A?A.Ve(a.u):a.u&&Xa("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
682
+ A.Td(D||1);return u(Ha,Ep(a.j,ja,Q.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ha.B(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:a.g.dash.sequenceMode};if(!A.ef()){Ha.B(4);break}xa=Lf(b,"UTCTiming");return u(Ha,oq(a,l,xa),5);case 5:Na=Ha.h;if(!a.h)return Ha.return();A.We(Na);case 4:A.Nd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
683
+ B(Ha)}})}
684
+ function nq(a,b,c,d){var e=Tf(d,"mediaPresentationDuration",Vf),f=[],g=0;d=Lf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Tf(k,"start",Vf,g),p=k.id,n=Tf(k,"duration",Vf),t=null;if(l){var v=Tf(l,"start",Vf);null!=v&&(t=v-m)}else null!=e&&(t=e-m);null==t&&(t=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.J.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=pq(a,b,c,{start:m,duration:t,node:k,Hd:null==t||!l});f.push(g);b.aa.id&&t&&(a.L[b.aa.id]=t);if(null==t){g=
685
+ null;break}g=m+t}}a.J=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Ee:!1}:{periods:f,duration:g,Ee:!0}}
686
+ function pq(a,b,c,d){b.aa=qq(d.node,null,c);b.T=d;b.aa.Ab=b.Ab;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Lf(d.node,"EventStream");c=b.presentationTimeline.Oa();e=r(e);for(var f=e.next();!f.done;f=e.next())rq(a,d.start,d.duration,f.value,c);c=Lf(d.node,"AdaptationSet").map(function(m){return sq(a,b,m)}).filter(cc);if(b.Wa){d=[];e=r(c);for(f=e.next();!f.done;f=e.next()){f=r(f.value.sg);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);
687
+ }d=c.filter(function(m){return!m.re});c=c.filter(function(m){return m.re});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.re.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={Hc:h.Hc},l=k.next())h.Hc=l.value,h.Hc.trickModeVideo=e.streams.find(function(m){return function(p){return $c(m.Hc.codecs)==$c(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:tq(d,"audio");g=a.g.disableVideo?[]:tq(d,"video");f=a.g.disableText?
688
+ []:tq(d,ic);c=a.g.disableThumbnails?[]:tq(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,ia(h.value.streams));e=[];g=r(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=r(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=r(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Lc:d,hd:e,textStreams:g,imageStreams:f}}
689
+ function tq(a,b){return a.filter(function(c){return c.contentType==b})}
690
+ function sq(a,b,c){function d(F){switch(F){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.fa=qq(c,b.aa,null);var e=!1,f=Lf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter(cc),h=void 0,k=b.fa.contentType==ic;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=
691
+ l}}var p;m=Lf(c,"EssentialProperty");f=null;l=!1;m=r(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var t=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==t?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==t?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=Lf(c,"SupplementalProperty");m=r(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
692
+ 10)));m=Lf(c,"Accessibility");var v=new Map;m=r(m);for(n=m.next();!n.done;n=m.next())if(t=n.value,n=t.getAttribute("schemeIdUri"),t=t.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=t){t=t.split(";");for(var y=r(t),w=y.next();!w.done;w=y.next()){var x=w.value,D=w=void 0;x.includes("=")?(x=x.split("="),w=x[0].startsWith("CC")?x[0]:"CC"+x[0],D=x[1]||"und"):(w="CC"+n,2==t.length?n+=2:n++,D=x);v.set(w,nd(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
693
+ 1,null!=t)for(t=r(t.split(";")),w=t.next();!w.done;w=t.next())w=w.value,x=y=void 0,w.includes("=")?(w=w.split("="),y="svc"+w[0],x=w[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,x=w),v.set(y,nd(x));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=t&&(g.push(t),"captions"==t&&(h="caption"));if(l)return null;l=Lf(c,"ContentProtection");var z=Ko(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=nd(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Lf(c,"Label"))&&l.length&&
694
+ (l=l[0],l.textContent&&(E=l.textContent));l=Lf(c,"Representation");c=l.map(function(F){if(F=uq(a,b,z,h,A,E,e,g,v,F))F.hdr=F.hdr||p;return F}).filter(function(F){return!!F});if(0==c.length){f="image"==b.fa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.fa.contentType||"application"==b.fa.contentType)for(b.fa.contentType=vq(c[0].mimeType,c[0].codecs),k=r(c),m=k.next();!m.done;m=k.next())m.value.type=b.fa.contentType;k=r(c);for(m=k.next();!m.done;m=k.next())for(m=
695
+ m.value,n=r(z.drmInfos),t=n.next();!t.done;t=n.next())t=t.value,t.keyIds=t.keyIds&&m.keyIds?new Set([].concat(ia(t.keyIds),ia(m.keyIds))):t.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter(cc);return{id:b.fa.id||"__fake__"+a.G++,contentType:b.fa.contentType,language:A,vh:e,streams:c,drmInfos:z.drmInfos,re:f,sg:k}}
696
+ function uq(a,b,c,d,e,f,g,h,k,l){b.I=qq(l,b.fa,null);a.u=Math.min(a.u,b.I.Ab);if(!wq(b.I))return null;var m=b.T.start;b.bandwidth=Tf(l,"bandwidth",Yf)||0;var p=b.I.contentType,n=p==ic||"application"==p;p="image"==p;try{var t=function(F,H,I){return xq(a,F,H,I)};if(b.I.xc)var v=lp(b,t);else if(b.I.ab)v=rp(b,a.l);else if(b.I.yc)v=wp(b,t,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.L);else{var y=b.I.wa,w=b.T.duration||0;v={Cb:function(){return Promise.resolve(Kj(m,w,y))}}}}catch(F){if((n||p)&&4002==F.code)return null;
697
+ throw F;}t=Lf(l,"ContentProtection");t=No(t,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);t=new Set(t?[t]:[]);var x=!1;Lf(l,"SupplementalProperty").some(function(F){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==F.getAttribute("schemeIdUri")&&"JOC"==F.getAttribute("value")})&&(x=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(p&&((l=Lf(l,"EssentialProperty").find(function(F){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(F.getAttribute("schemeIdUri"))}))&&
698
+ (z=l.getAttribute("value")),!z))return null;var A;l=b.I.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"))&&(A="PQ");l=b.I.id?b.aa.id+","+b.I.id:"";var E=l&&a.l[l]?a.l[l]:{id:a.G++,originalId:b.I.id,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){E.segmentIndex&&(E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.I.mimeType,codecs:b.I.codecs,
699
+ frameRate:b.I.frameRate,pixelAspectRatio:b.I.pixelAspectRatio,bandwidth:b.bandwidth,width:b.I.width,height:b.I.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:t,language:e,label:f,type:b.fa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.I.bd,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:x,closedCaptions:k,hdr:A,tilesLayout:z,matchedStreams:[]};E.createSegmentIndex=function(){var F;return G(function(H){if(1==
700
+ H.g){if(E.segmentIndex)return H.B(0);F=E;return u(H,v.Cb(),3)}F.segmentIndex=H.h;B(H)})};l&&b.Wa&&!a.l[l]&&(a.l[l]=E);return E}function iq(a){var b,c;G(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,jq(a),4);case 4:b=d.h;va(d,3);break;case 2:c=wa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d.return();kq(a,b);B(d)}})}function kq(a,b){0>a.F||a.D.O(Math.max(3,a.F-b,Sa(a.H)))}
701
+ function qq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,bd:null,audioSamplingRate:null,Ab:0};c=c||b.wa;var d=Lf(a,"BaseURL"),e=d.map(Rf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Tf(a,"frameRate",ag)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Lf(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=r(m);for(var n=m.next();!n.done;n=
702
+ m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=Lf(a,"AudioChannelConfiguration");m=yq(m)||b.bd;n=Tf(a,"audioSamplingRate",Zf)||b.audioSamplingRate;f||(f=vq(g,h));var t=Kf(a,"SegmentBase"),v=Kf(a,"SegmentTemplate"),y=t?Tf(t,"availabilityTimeOffset",$f)||0:0,w=v?Tf(v,"availabilityTimeOffset",$f)||0:0;d=d&&d.length?Tf(d[0],"availabilityTimeOffset",$f)||0:0;d=b.Ab+d+y+w;return{wa:dc(c,e),xc:t||b.xc,ab:Kf(a,"SegmentList")||b.ab,yc:v||b.yc,width:Tf(a,"width",Zf)||b.width,height:Tf(a,
703
+ "height",Zf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),bd:m,audioSamplingRate:n,Ab:d}}
704
+ function yq(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=
705
+ 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 wq(a){var b=a.xc?1:0;b+=a.ab?1:0;b+=a.yc?1:0;if(0==b)return a.contentType==ic||"application"==a.contentType?!0:!1;1!=b&&(a.xc&&(a.ab=null),a.yc=null);return!0}
706
+ function zq(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(1==m.g)return e=dc(b,[c]),f=bf(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Xe(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m.return(0);k=h.headers.date}else k=Bc(h.data);l=Date.parse(k);return isNaN(l)?m.return(0):m.return(l-Date.now())})}
707
+ function oq(a,b,c){var d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){p.B(4);break}h=g.value;C(p,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return p.B(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return p.B(8);
708
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p.return(isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Xa("NTP UTCTiming scheme is not supported");break;default:Xa("Unrecognized scheme in UTCTiming element",k)}p.B(9);break;case 7:return u(p,zq(a,b,l,"HEAD"),10);case 10:return p.return(p.h);case 8:return u(p,zq(a,b,l,"GET"),11);case 11:return p.return(p.h);case 9:va(p,
709
+ 3);break;case 5:wa(p);case 3:g=f.next();p.B(2);break;case 4:return Xa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}})}
710
+ function rq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Tf(d,"timescale",Zf)||1;d=r(Lf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Tf(k,"presentationTime",Zf)||0,m=Tf(k,"duration",Zf)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
711
+ function xq(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=hf,f=ak(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Xe(a.o,h),u(l,h.promise,2);k=l.h;return l.return(k.data)})}function vq(a,b){return dd(Yc(a,b))?ic:a.split("/")[0]}K("shaka.dash.DashParser",hq);Ug.mpd=function(){return new hq};Sg["application/dash+xml"]=function(){return new hq};Sg["video/vnd.mpeg.dash.mpd"]=function(){return new hq};function Aq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function Bq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}Bq.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};
712
+ Bq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Cq(a,b){a=a.getAttribute(b);if(!a)throw new O(2,4,4023,b);return a.value}function Dq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function Eq(a,b){this.name=a;this.value=b};function Fq(a,b){return a.filter(function(c){return c.name==b})}function Gq(a,b){return a.filter(function(c){return Cq(c,"TYPE")==b})}function Hq(a,b){a=Fq(a,b);return a.length?a[0]:null}function Iq(a,b){var c=0;c=void 0===c?0:c;return(a=Hq(a,b))?Number(a.value):c}function Jq(a,b){return dc([a],[b])[0]};function Kq(a){this.h=a;this.g=0}function Lq(a){Mq(a,/[ \t]+/gm)}function Mq(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function Nq(a){return a.g==a.h.length?null:(a=Mq(a,/[^ \t\n]*/gm))?a[0]:null};function Oq(){this.g=0}
713
+ function Pq(a,b,c){b=Bc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new 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=Qq(a,g),--a.g,Rq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Qq(a,h);if(Sq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
714
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=r(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Qq(a,m),Rq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?null!=Z(m,"BYTERANGE-START")?null!=Z(m,"BYTERANGE-LENGTH")&&k.push(m):k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Jq(d,m.trim()),h&&g.push(h),e.push(new Dq(m,g,k)),g=[],k=[]);k.length&&
715
+ (h&&g.push(h),e.push(new Dq("",g,k)));return new Aq(c,b,f,e)}f.push(h);"EXT-X-STREAM-INF"==h.name&&(h.g.push(new Eq("URI",k)),e=!0)}}return new Aq(c,b,f)}function Qq(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new O(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new Kq(d);var f;(f=Mq(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=Mq(d,g);)c.push(new Eq(f[1],f[2]||f[3])),Lq(d)}return new Bq(a,b,c,e)}
716
+ var Rq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),Sq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Tq(){}function Uq(a){try{var b=Vq(a);return Ne({uri:a,originalUri:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Le(c)}}
717
+ function Vq(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=Kc(a):e=Fc(a);return{data:e,contentType:c}}K("shaka.net.DataUriPlugin",Tq);Tq.parse=Uq;Ze("data",Uq);function Wq(){var a=this;this.g=this.i=null;this.Fa=1;this.o=new Map;this.u=new Map;this.F=new Map;this.F.set("video",new Map);this.F.set("audio",new Map);this.F.set(ic,new Map);this.F.set("image",new Map);this.ka=new Set;this.h=new Map;this.j=null;this.M="";this.W=new Oq;this.P=0;this.A=-1;this.H=Infinity;this.Ga=!1;this.m=new P(function(){Xq(a)});this.ea=Yq;this.D=null;this.ca=0;this.J=Infinity;this.V=this.da=0;this.G=new We;this.L=new Map;this.s=new Map;this.ba=new Map;this.l=!1}q=Wq.prototype;
718
+ q.configure=function(a){this.g=a};q.start=function(a,b){var c=this,d;return G(function(e){return 1==e.g?(c.i=b,c.l=b.isLowLatencyMode(),u(e,Zq(c,a),2)):3!=e.g?(d=e.h,c.M=d.uri,u(e,$q(c,d.data,a),3)):e.return(c.D)})};q.stop=function(){this.m&&(this.m.stop(),this.m=null);var a=[];this.G&&(a.push(this.G.destroy()),this.G=null);this.g=this.i=null;this.ka.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
719
+ q.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){if(!ar(a))return m.return();b=[];c=Array.from(a.h.values());d=c.filter(function(p){return p.stream.segmentIndex});e=r(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(br(a,g));return u(m,Promise.all(b),2)}cr(a,d.map(function(p){return p.stream}));h=d.some(function(p){return 0==p.nc});d.length&&!h&&(k=dr,er(a,k.gf),l=d.map(function(p){return p.Pa}),a.j.Aa(Math.min.apply(Math,ia(l))),a.i.updateDuration());h&&fr(a);
720
+ B(m)})};function gr(a,b){return ar(a)?a.F.get(b.type):b.ad}
721
+ function br(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D,z;return G(function(A){if(1==A.g)return c=b.Kc,d=new Mb(c),a.l&&b.Nc&&Pb(d,new Rb("_HLS_skip=YES")),u(A,Zq(a,d.toString()),2);e=A.h;if(!b.stream.segmentIndex)return A.return();f=Pq(a.W,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=Fq(f.g,"EXT-X-DEFINE");h=hr(a,g);k=b.stream;l=gr(a,b);m=ir(f,k.mimeType);p=m.keyIds;n=m.drmInfos;t=function(E,F){return E.size===F.size&&[].concat(ia(E)).every(function(H){return F.has(H)})};t(k.keyIds,p)||(k.keyIds=
722
+ p,k.drmInfos=n,a.i.newDrmInfo(k));v=jr(a,f,k.type,l,h);k.segmentIndex.Ib(v,a.j.Oa());v.length&&(y=Iq(f.g,"EXT-X-MEDIA-SEQUENCE"),w=l.get(y),k.segmentIndex.eb(w));x=v[0];b.kb=x.startTime;D=v[v.length-1];b.Pa=D.endTime;if(z=Hq(f.g,"EXT-X-ENDLIST"))b.nc=!0;B(A)})}q.onExpirationUpdated=function(){};
723
+ function kr(a,b){for(var c=-1==a.A,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=gr(a,e);if(f=f.g[0]||null){g=r(g);for(var h=g.next();!h.done;h=g.next()){h=r(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.A=Math.max(a.A,k));e.Dd=k;break}}}}if(!(0>a.A))for(b=r(b),e=b.next();!e.done;e=b.next())if(c=e.value,d=c.stream.segmentIndex)if(d.g.splice(0,a.A-c.Dd),d=d.g[0]||null)d=-d.startTime,c.stream.segmentIndex.offset(d),lr(a,c,d)}
724
+ function mr(a,b){if(Infinity==a.H){b=r(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value.stream.segmentIndex.g[0]||null;null!=d&&null!=d.g&&(a.H=Math.min(a.H,d.g))}}b=a.H;if(Infinity!=b)for(d=r(a.h.values()),c=d.next();!c.done;c=d.next()){c=c.value;var e=c.stream.segmentIndex;if(null!=e){var f=e.g[0]||null;if(null==f.g)Wa("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.Bc,"Expect AV sync issues!");else for(lr(a,c,f.g-b-f.startTime),c=r(e),e=c.next();!e.done;e=c.next())e.value.pe(b)}}}
725
+ function lr(a,b,c){b.kb+=c;b.Pa+=c;a=gr(a,b);b=r(a);for(var d=b.next();!d.done;d=b.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
726
+ function $q(a,b,c){var d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D,z,A,E,F,H,I,J,N,R,Q,ba,M,ja,Fa,xa,Na;return G(function(Ha){switch(Ha.g){case 1:d=Pq(a.W,b,a.M);e=Fq(d.g,"EXT-X-DEFINE");for(var Lb=r(e),Ka=Lb.next();!Ka.done;Ka=Lb.next()){var Ua=Ka.value;Ka=Z(Ua,"NAME");Ua=Z(Ua,"VALUE");Ka&&Ua&&(a.o.has(Ka)||a.o.set(Ka,Ua))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new Mb(d.segments[0].i),I=H.ra.split(".").pop(),(J=nr[I])?F=J:"ts"!==I&&"mp4"!==I&&(or[I]?(J=or[I],
727
+ N=a.g.hls.defaultAudioCodec,F=J+'; codecs="'+N+'"'):pr[I]&&(J=pr[I],R=a.g.hls.defaultVideoCodec,F=J+'; codecs="'+R+'"'))),Q=F.split(";")[0],ba=Q.split("/")[0],M=bd(F),ja=new Map,u(Ha,qr(a,d,c,c,M,ba,"",!0,"Media Playlist",null,ja,null,!1,!1,Q),5);k=Fq(d.g,"EXT-X-MEDIA");l=Fq(d.g,"EXT-X-STREAM-INF");m=Fq(d.g,"EXT-X-IMAGE-STREAM-INF");p=Fq(d.g,"EXT-X-SESSION-KEY");Lb=r(l);for(Ka=Lb.next();!Ka.done;Ka=Lb.next()){var Zb=Ka.value;Ua=Z(Zb,"AUDIO");Ka=Z(Zb,"VIDEO");var pb=Z(Zb,"SUBTITLES");Zb=rr(a,Zb);if(pb){var Vn=
728
+ gc(ic,Zb);a.s.set(pb,Vn);gb(Zb,Vn)}Ua&&(pb=gc("audio",Zb),pb||(pb=a.g.hls.defaultAudioCodec),a.s.set(Ua,pb));Ka&&(Ua=gc("video",Zb),Ua||(Ua=a.g.hls.defaultVideoCodec),a.s.set(Ka,Ua))}n=Fq(d.g,"EXT-X-SESSION-DATA");t=r(n);for(v=t.next();!v.done;v=t.next())if(y=v.value,w=Z(y,"DATA-ID"),x=Z(y,"URI"),D=Z(y,"LANGUAGE"),z=Z(y,"VALUE"),A=(new Map).set("id",w),x&&A.set("uri",Jq(a.M,x)),D&&A.set("language",D),z&&A.set("value",z),E=new S("sessiondata",A),a.i)a.i.onEvent(E);sr(a,k);Lb=Gq(k,"CLOSED-CAPTIONS");
729
+ Lb=r(Lb);for(Ka=Lb.next();!Ka.done;Ka=Lb.next())pb=Ka.value,Ka=tr(pb),Ua=Cq(pb,"GROUP-ID"),pb=Cq(pb,"INSTREAM-ID"),a.L.get(Ua)||a.L.set(Ua,new Map),a.L.get(Ua).set(pb,Ka);f=ur(a,l,p);g=vr(a,k);return u(Ha,wr(a,m),4);case 4:h=Ha.h;Ha.B(3);break;case 5:Fa=Ha.h,a.h.set(c,Fa),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==ba?Fa.stream:null,video:"video"==ba?Fa.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,
730
+ 7,7001);a.j=new U(null,0);a.j.zc(!0);1==d.type&&(ar(a)&&(xr(a),xa=a.P,a.m.O(xa)),Na=Array.from(a.h.values()),yr(a,Na),fr(a));a.D={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.D);B(Ha)}})}
731
+ function fr(a){if(ar(a)){if(a.P=a.J,a.ea==zr){for(var b,c=b=Infinity,d=r(a.h.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&(b=Math.min(b,e.Pa),c=Math.min(c,e.kb));b-=c;a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.ne(b)}}else a.j.Aa(Ar(a));a.j.Nd()}
732
+ function hr(a,b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=Z(e,"NAME");var f=Z(e,"VALUE");e=Z(e,"IMPORT");d&&f&&c.set(d,f);e&&(d=a.o.get(e))&&c.set(e,d)}return c}
733
+ function vr(a,b){var c=Gq(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return Br(a,g).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=Cq(d.value,"GROUP-ID");if(d=a.s.get(e))if(e=a.u.get(e)){e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=Cr(ic,d)||Dr(ic)}}return b.filter(function(g){return g})}
734
+ function wr(a,b){var c,d;return G(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return G(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l.return(null);C(l,2);return u(l,Er(a,f),4)}if(2!=l.g)return h=l.h,l.return(h.stream);k=wa(l);if(a.g.hls.ignoreImageStreamFailures)return l.return(null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e.return(d.filter(function(f){return f}))})}
735
+ function sr(a,b){b=b.filter(function(d){var e=Z(d,"URI")||"";return"SUBTITLES"!=Z(d,"TYPE")&&""!=e});b=r(b);for(var c=b.next();!c.done;c=b.next())Br(a,c.value)}
736
+ function ur(a,b,c){var d=[],e=new Set;if(0<c.length){c=r(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=Cq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Z(f,"KEYFORMAT")||"identity",f=(g=Fr[g])?g(f,""):null)){if(f.keyIds){g=r(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Z(k,"FRAME-RATE"),m=Number(Z(k,"AVERAGE-BANDWIDTH"))||Number(Cq(k,"BANDWIDTH")),p=Z(k,"RESOLUTION");p=r(p?p.split("x"):[null,null]);var n=p.next().value,t=p.next().value,
737
+ v=Z(k,"VIDEO-RANGE");k=Gr(a,k);p=k.audio;k=k.video;for(var y=r(k),w=y.next();!w.done;w=y.next())if(w=w.value.stream)w.width=Number(n)||void 0,w.height=Number(t)||void 0,w.frameRate=Number(l)||void 0,w.hdr=v||void 0;l=a.g.disableAudio;if(!p.length||l)p=[null];l=a.g.disableVideo;if(!k.length||l)k=[null];l=[];p=r(p);for(n=p.next();!n.done;n=p.next())for(n=n.value,t=r(k),v=t.next();!v.done;v=t.next()){var x=v.value;if(v=n?n.stream:null)v.drmInfos=d,v.keyIds=e;if(y=x?x.stream:null)y.drmInfos=d,y.keyIds=
738
+ e;w=n?n.stream.drmInfos:null;var D=x?x.stream.drmInfos:null;x=(x?x.Bc:"")+" - "+(n?n.Bc:"");v&&y&&w.length&&D.length&&!(0<Og(w,D).length)||a.ka.has(x)||(v={id:a.Fa++,language:v?v.language:"und",primary:!!v&&v.primary||!!y&&y.primary,audio:v,video:y,bandwidth:m,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},l.push(v),a.ka.add(x))}return l}).reduce(ac,[]);return b=b.filter(function(k){return null!=k})}
739
+ function Gr(a,b){var c=rr(a,b),d=Z(b,"AUDIO"),e=Z(b,"VIDEO"),f=d||e;f=f&&a.u.has(f)?a.u.get(f):[];d={audio:d?f:[],video:e?f:[]};e=!1;var g=Cq(b,"URI"),h=d.audio.find(function(m){return m&&m.Bc==g}),k=gc("video",c),l=gc("audio",c);l&&!k?f="audio":!f.length&&l&&k?(f="video",c=[[k,l].join()]):d.audio.length&&h?(f="audio",e=!0):f=d.video.length&&!d.audio.length?"audio":"video";e||(a=Hr(a,b,c,f),d[a.stream.type]=[a]);return d}
740
+ function rr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);c=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);a=new Set;b=[];c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=ad(d)[0];a.has(e)||(b.push(d),a.add(e))}return b}function tr(a){a=Z(a,"LANGUAGE")||"und";return nd(a)}
741
+ function Br(a,b){var c=Cq(b,"GROUP-ID"),d="",e=Cq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=ic);var f=e;f==ic?d=Z(b,"CODECS")||"":c&&a.s.has(c)&&(d=a.s.get(c));e=Ir(Cq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);var g=tr(b),h=Z(b,"NAME"),k="YES"==Z(b,"DEFAULT");var l="audio"==f?(l=Z(b,"CHANNELS"))?parseInt(l.split("/")[0],10):null:null;var m="audio"==f?(m=Z(b,"CHANNELS"))?m.includes("/JOC"):!1:!1;var p=Z(b,"CHARACTERISTICS");b="YES"==Z(b,"FORCED");d=Jr(a,e,d,f,g,k,h,l,null,p,b,m);a.u.has(c)?a.u.get(c).push(d):
742
+ a.u.set(c,[d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
743
+ function Er(a,b){var c,d,e,f,g,h,k,l,m,p;return G(function(n){if(1==n.g){c=Ir(Cq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return n.return(a.h.get(c));e=tr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=Jr(a,c,d,"image",e,!1,f,null,null,g,!1,!1);return a.h.has(c)?n.return(a.h.get(c)):(k=Z(b,"RESOLUTION"))?u(n,h.stream.createSegmentIndex(),3):n.B(2)}2!=n.g&&(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
744
+ Number(m.split("x")[1]));if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.h.set(c,h);return n.return(h)})}function Hr(a,b,c,d){var e=Ir(Cq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);b=Z(b,"CLOSED-CAPTIONS");b="video"==d&&b&&"NONE"!=b?a.L.get(b):null;c=fc(d,c);d=Jr(a,e,c,d,"und",!1,null,null,b,null,!1,!1);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
745
+ function Jr(a,b,c,d,e,f,g,h,k,l,m,p){function n(D){var z,A,E,F,H,I,J,N,R,Q,ba,M,ja,Fa;return G(function(xa){if(1==xa.g)return u(xa,Zq(a,y.Kc),2);if(3!=xa.g){z=xa.h;if(D.aborted)return xa.return();A=z.uri;E=Pq(a.W,z.data,A);F=ar(a);return u(xa,qr(a,E,b,A,c,d,e,f,g,h,k,l,m,p),3)}H=xa.h;if(D.aborted)return xa.return();I=H.stream;ar(a)&&!F&&xr(a);y.Kc=A;y.kb=H.kb;y.Pa=H.Pa;y.Nc=H.Nc;y.nc=H.nc;y.ad=H.ad;y.Md=!0;v.segmentIndex=I.segmentIndex;v.encrypted=I.encrypted;v.drmInfos=I.drmInfos;v.keyIds=I.keyIds;
746
+ v.mimeType=I.mimeType;Wi.includes(v.mimeType)&&(v.codecs="");v.drmInfos.length&&a.i.newDrmInfo(v);J=jc;if(d==J.va||d==J.Ic)for(N=r(a.h.values()),R=N.next();!R.done;R=N.next())Q=R.value,Q.Md||Q.type!=d||(Q.stream.mimeType=I.mimeType,Wi.includes(Q.stream.mimeType)&&(Q.stream.codecs=""));d==J.X&&(ba=I.segmentIndex.get(0))&&ba.h&&(v.mimeType="application/mp4");Kr(a)&&(a.Ga?yr(a,[y]):(a.Ga=!0,M=Array.from(a.h.values()),ja=M.filter(function(Na){return Na.stream.segmentIndex}),yr(a,ja),fr(a),Fa=a.P,0<Fa&&
747
+ a.m.O(Fa)));B(xa)})}var t=Jq(a.M,b),v=Lr(a,c,d,e,f,g,h,k,l,m,p);Wi.includes(v.mimeType)&&(v.codecs="");var y={stream:v,type:d,Bc:b,Kc:t,kb:0,Pa:0,ad:new Map,Nc:!1,nc:!1,Dd:-1,Md:!1},w=null,x=new AbortController;v.createSegmentIndex=function(){if(w)return w;x=new AbortController;return w=new Promise(function(D){D(n(x.signal))})};v.closeSegmentIndex=function(){w&&!v.segmentIndex&&x.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);w=null};return y}
748
+ function Ar(a){var b=Infinity;a=r(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Pa));return b}function cr(a,b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&Ij(d.segmentIndex,function(e){c.push(e)});a.j.Jb(c)}
749
+ function yr(a,b){if(!ar(a))for(var c=Ar(a),d=r(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Xa(0,c);c=r(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,Wi.includes(e.mimeType)&&(e.codecs="");cr(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?kr(a,b):mr(a,b)}
750
+ function Kr(a){if(!a.D)return!1;var b=[],c=[];a=r(a.D.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
751
+ function qr(a,b,c,d,e,f,g,h,k,l,m,p,n,t,v){var y,w,x,D,z,A,E,F,H,I,J,N,R,Q,ba,M;return G(function(ja){if(1==ja.g){if(1!=b.type)throw new O(2,4,4017);y=Fq(b.g,"EXT-X-DEFINE");w=hr(a,y);Mr(a,b);return v?ja.B(2):u(ja,Nr(a,f,e,b,w),3)}2!=ja.g&&(v=ja.h);x=ir(b,v);D=x.drmInfos;z=x.keyIds;A=x.encrypted;E=x.lf;if(A&&!D.length&&!E)throw new O(2,4,4026);F=ar(a)?a.F.get(f):new Map;H=a.l;I=jr(a,b,f,F,w);H!=a.l&&Mr(a,b);J=I[0].startTime;N=I[I.length-1].endTime;R=new Hj(I);ba=(Q=Hq(b.g,"EXT-X-SERVER-CONTROL"))?
752
+ null!=Q.getAttribute("CAN-SKIP-UNTIL"):!1;M=Lr(a,e,f,g,h,k,l,m,p,n,t);M.segmentIndex=R;M.encrypted=A;M.drmInfos=D;M.keyIds=z;M.mimeType=v;return ja.return({stream:M,type:f,Bc:c,Kc:d,kb:J,Pa:N,Nc:ba,nc:!1,Dd:-1,ad:F,Md:!1})})}
753
+ function Lr(a,b,c,d,e,f,g,h,k,l,m){var p=Cr(c,b)||Dr(c);return{id:a.Fa++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:p,codecs:b,kind:c==ic?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,label:f,type:c,primary:e,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:k?k.split(","):[],forced:l,channelsCount:g,audioSamplingRate:null,spatialAudio:m,closedCaptions:h,
748
754
  hdr:void 0,tilesLayout:void 0}}
749
- function jr(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Hq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ha(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Eq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=Hr[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,kf:d}}
750
- function Qr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Wa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Mc(e.substr(2));if(16!=f.byteLength)throw new O(2,4,4043);}else d=Kq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Lq(c.h,Eq(b,"URI"));var g=cf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return G(function(n){if(1==n.g)return u(n,
751
- Rr(a,g,6),2);if(3!=n.g){k=n.h;if(!k.data||16!=k.data.byteLength)throw new O(2,4,4044);l={name:"AES-CBC"};m=h;return u(n,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=n.h;h.fetchKey=void 0;A(n)})}};return h}
752
- function Or(a,b){var c=Jq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Jq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)gr(a,$q);else{c?gr(a,Br):gr(a,Sr);d=Jq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Jq(b.g,"EXT-X-PART-INF");a.l&&c?(a.da=Number(Eq(c,"PART-TARGET")),a.J=Math.min(a.da,a.J),b=Jq(b.g,"EXT-X-SERVER-CONTROL"),a.V=b?Number(Eq(b,"PART-HOLD-BACK")):0):a.J=Math.min(d,a.J);a.ca=Math.max(d,a.ca)}}
753
- function yr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.ca*a.g.hls.liveSegmentsDelay;a.j.Xe(0);a.j.We(b);a.j.yc(!1)}function Tr(a,b,c,d){c=Jq(c,"EXT-X-MAP");if(!c)return null;var e=Eq(c,"URI");d=Kr(Lq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ba.has(b)||(c=Ur(d,c),a.ba.set(b,c));return a.ba.get(b)}function Ur(a,b){var c=0,d=null;if(b=Z(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new oi(function(){return[a]},c,d)}
754
- function Vr(a,b,c,d,e,f,g,h,k){var l=d.g,m=Kr(d.i,f),n=Jq(l,"EXTINF"),p=f=0,t=null;d.h.length&&!a.l&&Wa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var y=Jq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Vf(y.value))}y=ri;Jq(l,"EXT-X-GAP")&&(y=2);if(!n){if(0==d.h.length)throw new O(2,4,4024,"EXTINF");
755
- if(!a.l)return null}var w=[];if(a.l)for(var x={},C=0;C<d.h.length;x={pd:x.pd},C++){var z=d.h[C],B=0==C?c:w[w.length-1],E=0==C?e:B.endTime,F=Number(Z(z,"DURATION"))||a.da;if(F){F=E+F;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=r(Wr(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))x.pd=Lq(g,B),B=ri,"YES"==Z(z,"GAP")&&(B=2),w.push(new qi(E,F,function(J){return function(){return[J.pd]}}(x),H,I,b,0,0,Infinity,[],"",null,null,B))}}n?
756
- f=e+Number(n.value.split(",")[0]):f=w[w.length-1].endTime;(a=Jq(l,"EXT-X-BYTERANGE"))?(t=r(Wr(c,a.value)),p=t.next().value,t=t.next().value):w.length&&(p=w[0].Ba,t=w[w.length-1].ka);c="";a=null;"image"==h&&(c="1x1",h=Jq(l,"EXT-X-TILES"))&&(c=Eq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new qi(e,f,function(){return m.length?[m]:[]},p,t,b,0,0,Infinity,w,c,a,v,y,k)}function Wr(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ka+1,d=c+b-1);return[c,d]}
757
- function kr(a,b,c,d,e){var f=b.segments,g=void 0,h=Kq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Kq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Jq(b.g,"EXT-X-SKIP");l=l?Number(Z(l,"SKIPPED-SEGMENTS")):0;var m=k+l,n=0;cr(a)&&d.has(m)&&(n=d.get(m));for(var p=[],t=null,v=0;v<f.length;v++){var y=f[v],w=0==v?n:t.endTime;m=k+l+v;Jq(y.g,"EXT-X-DISCONTINUITY")&&h++;var x=r(y.g);for(var C=x.next();!C.done;C=x.next())C=C.value,"EXT-X-KEY"==C.name&&("AES-128"==Eq(C,"METHOD")?g=Qr(a,C,b):g=void 0);d.set(m,w);x=Tr(a,b.h,y.g,e);
758
- !a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(t=y=Vr(a,x,t,y,w,e,b.h,c,g))y.m=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.B&&m<a.B||p.push(y)}if(b=p.some(function(z){return null!=z.g}))for(c={},d=0;d<p.length;c={Qb:c.Qb,Pb:c.Pb,Bc:c.Bc,Ta:c.Ta,Ob:c.Ob},d++)if(c.Ta=p[d],null==c.Ta.g)for(c.Pb=0,c.Qb=d,e=function(z){return function(){var B=p[z.Qb];if(B){if(null!=B.g)return B.g+z.Pb;z.Pb-=B.endTime-B.startTime;z.Qb+=1}return null}}(c),c.Ob=0,c.Bc=d,
759
- f=function(z){return function(){var B=p[z.Bc];if(B){B!=z.Ta&&(z.Ob+=B.endTime-B.startTime);if(null!=B.g)return B.g+z.Ob;--z.Bc}return null}}(c);null==c.Ta.g;)c.Ta.g=f(),null==c.Ta.g&&(c.Ta.g=e());if(b)for(c=r(p),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.H;if(b&&Infinity!=a)for(b=r(p),d=b.next();!d.done;d=b.next())d.value.oe(a);return p}
760
- function Kr(a,b){a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new O(2,4,4039,e);}}return a}function Er(a,b){if(a==jc){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
761
- function Fr(a){return a==jc?"text/vtt":Xr[a].mp4}function Pr(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v;return G(function(y){if(1==y.g){f=jf;g=Math.trunc((d.segments.length-1)/2);h=Kr(d.segments[g].i,e);k=new Nb(h);l=k.qa.split(".").pop();m=Xr[b];if((n=m[l])||(n=or[l])||(n=Er(b,c)))return y.return(n);p=cf([h],a.g.retryParameters);p.method="HEAD";return u(y,Rr(a,p,f),2)}t=y.h;return(v=t.headers["content-type"])?y.return(v.split(";")[0]):y.return(Fr(b))})}
762
- function ar(a,b){b=cf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return Rr(a,b,0)}function Zq(a){var b,c;G(function(d){if(1==d.g){if(!a.i)return d.return();D(d,2);return u(d,a.update(),4)}if(2!=d.g)return cr(a)&&(b=a.O,a.m.N(b)),ta(d,0);c=ua(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.N(.1);A(d)})}function cr(a){return a.ea!=$q}function gr(a,b){a.ea=b;a.j&&a.j.yc(!cr(a));cr(a)||a.m.stop()}
763
- function Rr(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b);Ye(a.G,b);return b.promise}K("shaka.hls.HlsParser",Yq);
764
- var or={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},pr={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},qr={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},Xr={audio:pr,video:qr,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
765
- vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Hr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new O(2,4,4041);return fc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Eq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
766
- b=Eq(a,"URI");b=Xq(b);b=M(b.data);b=fc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Eq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Eq(a,"URI");a=Xq(a);a=M(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Kf(a,b,new Set,0);return fc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
767
- Eq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?fc("org.w3.clearkey",null):null}},$q="VOD",Sr="EVENT",Br="LIVE",fr={ff:$q,Og:Sr,Sg:Br};tc("Tizen 3")||tc("Tizen 2")||vc()||(Vg.m3u8=function(){return new Yq},Tg["application/x-mpegurl"]=function(){return new Yq},Tg["application/vnd.apple.mpegurl"]=function(){return new Yq});function Yr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Oe:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Fc(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Zr(){}function $r(a,b,c,d,e){var f=new as;tf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new bs,h={ye:!1,bf:!1};a=cs(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Le(a,function(){h.ye=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new P(function(){h.bf=!0;g.abort()});k.N(b/1E3);a.finally(function(){k.stop()})}return a}
768
- function cs(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,y,w,x,C,z;return G(function(B){switch(B.g){case 1:return h=ds,k=es,p=n=0,t=Date.now(),D(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(fs(l.headers)),v=l.clone().body.getReader(),w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,x=function(E){function F(){var H,I;return G(function(J){switch(J.g){case 1:return D(J,2),u(J,v.read(),4);case 4:H=J.h;ta(J,3);break;case 2:return ua(J),J.return();case 3:if(H.done){J.A(5);break}n+=H.value.byteLength;if(!g){J.A(5);
769
- break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-t||H.done)e(I-t,n-p,w-n),p=n,t=I;H.done?E.close():(E.enqueue(H.value),F());A(J)}})}F()},new k({start:x}),u(B,l.arrayBuffer(),5);case 5:m=B.h;ta(B,3);break;case 2:C=ua(B);if(d.ye)throw new O(1,1,7001,a,b);if(d.bf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,C,b);case 3:return z=fs(l.headers),B.return(Yr(z,m,l.status,a,l.url,b))}})}function fs(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
770
- function gs(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",Zr);Zr.isSupported=gs;Zr.parse=$r;var ds=window.fetch,bs=window.AbortController,es=window.ReadableStream,as=window.Headers;gs()&&($e("http",$r,2,!0),$e("https",$r,2,!0),$e("blob",$r,2,!0));function hs(){}
771
- function is(a,b,c,d,e){var f=new js,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new O(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var t=ks(f);e(t);n=!0}};f.onload=function(){var t=ks(f),v=f.response;try{var y=Yr(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new O(1,1,1002,a,t,
772
- c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Le(k,function(){f.abort();return Promise.resolve()})}
773
- function ks(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}K("shaka.net.HttpXHRPlugin",hs);hs.parse=is;var js=window.XMLHttpRequest;$e("http",is,1,!0);$e("https",is,1,!0);$e("blob",is,1,!0);function ls(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ms(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.ka}function ns(a,b){return ck(a.g.ya(),a.g.Ba,a.g.ka,b.streaming.retryParameters)};function os(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function ps(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}os.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 qs(a){var b=this;this.o=a;this.j=new Map;this.i=new kf(function(){return rs(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new os}qs.prototype.destroy=function(){return this.i.destroy()};function ss(a,b,c){a.m=b;a.l=c}function rs(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
774
- function ts(a,b,c,d,e,f){lf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return G(function(v){if(1==v.g)return u(v,us(a,c),2);h=v.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=M(h),l=new Jf(k),l.data)n=Number(m),p=l.data[n],t=l.g[n],a.l(p,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function vs(a){return G(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
775
- function us(a,b){var c,d,e,f;return G(function(g){if(1==g.g)return c=jf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;hb(a.h,e);return g.return(f.data)})};function ws(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}ws.prototype.abort=function(){var a=this;return G(function(b){if(1==b.g){try{a.i.abort()}catch(c){}D(b,2);return u(b,a.g,4)}if(2!=b.g)return ta(b,0);ua(b);A(b)})};
776
- function xs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return G(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return u(g,b(f.key,f.value,f),2)}f.continue();A(g)})}})}ws.prototype.store=function(){return this.h};ws.prototype.promise=function(){return this.g};function ys(a){this.h=a;this.g=[]}ys.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function zs(a,b){return As(a,b,"readwrite")}function As(a,b,c){c=a.h.transaction([b],c);var d=new ws(c,b);a.g.push(d);d.promise().then(function(){hb(a.g,d)},function(){hb(a.g,d)});return d};function Bs(a,b,c){this.h=new ys(a);this.i=b;this.g=c}q=Bs.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return Cs(this.i)};q.removeSegments=function(a,b){return Ds(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Es(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.ze(e)}))})};q.addManifests=function(){return Cs(this.g)};
777
- q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function Fs(a,b,c){a=zs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=zs(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Ds(this,this.g,a,b)};
778
- q.getManifests=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Es(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.bc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=As(a.h,a.g,"readonly"),c=new Map,u(d,xs(b,function(e,f){var g;return G(function(h){if(1==h.g)return u(h,a.bc(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.ze=function(a){return a};q.bc=function(a){return Promise.resolve(a)};
779
- function Cs(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=zs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Fc:g.Fc},k=h.next())l=k.value,g.Fc=e.add(l),g.Fc.onsuccess=function(n){return function(){f.push(n.Fc.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
780
- function Ds(a,b,c,d){a=zs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Ec:e.Ec},f=c.next())e.Ec=f.value,b.delete(e.Ec).onsuccess=function(g){return function(){return d(g.Ec)}}(e);return a.promise()}
781
- function Es(a,b,c){var d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=As(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Vb:h.Vb,Tb:h.Tb},l=k.next())h.Tb=l.value,h.Vb=e.get(h.Tb),h.Vb.onsuccess=function(n){return function(){void 0==n.Vb.result&&g.push(n.Tb);f[n.Tb]=n.Vb.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 Gs(a){this.g=new ys(a)}Gs.prototype.destroy=function(){return this.g.destroy()};Gs.prototype.getAll=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=As(a.g,"session-ids","readonly"),c=[],u(d,xs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Gs.prototype.add=function(a){var b=zs(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()};
782
- Gs.prototype.remove=function(a){var b=this,c;return G(function(d){return 1==d.g?(c=zs(b.g,"session-ids"),u(d,xs(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Hs(){this.g=new Map}Hs.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)};Hs.prototype.init=function(){var a=this;Is.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
783
- function Js(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{za:d,ja:f},ja:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function Ks(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({za:d,ja:f},e)})})}
784
- function Ls(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 Ms(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Ns(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()}
785
- function Os(a){var b,c,d;return G(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Is,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Ps(a,b){Is.set(a,b)}K("shaka.offline.StorageMuxer",Hs);Hs.unregister=function(a){Is.delete(a)};Hs.register=Ps;Hs.prototype.destroy=Hs.prototype.destroy;var Is=new Map;function Qs(){Bs.apply(this,arguments)}oa(Qs,Bs);Qs.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return G(function(g){d=zs(c.h,c.g);e=d.store();f=new lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new O(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
786
- Qs.prototype.bc=function(a){var b,c,d,e,f,g;return G(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=Rs(a.periods[c],e),b.push(f);return u(h,Pp(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
787
- function Rs(a,b){Ss(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Ts(e,a.startTime,b)})}
788
- function Ts(a,b,c){var d=a.initSegmentUri?Us(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=Us(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
789
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Qs.prototype.ze=function(a){return{data:a.data}};function Us(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);}
790
- function Ss(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++,
791
- 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 Vs(){Bs.apply(this,arguments)}oa(Vs,Bs);
792
- Vs.prototype.bc=function(a){var b,c,d,e,f,g;return G(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(Ws(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Pp(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
755
+ function ir(a,b){var c=[];if(a.segments){a=r(a.segments);for(var d=a.next();!d.done;d=a.next())d=Fq(d.value.g,"EXT-X-KEY"),c.push.apply(c,ia(d))}d=a=!1;var e=[],f=new Set;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=Cq(g,"METHOD");if("NONE"!=h)if(a=!0,"AES-128"==h)d=!0;else if(h=Z(g,"KEYFORMAT")||"identity",g=(h=Fr[h])?h(g,b):null){if(g.keyIds){h=r(g.keyIds);for(var k=h.next();!k.done;k=h.next())f.add(k.value)}e.push(g)}}return{drmInfos:e,keyIds:f,encrypted:a,lf:d}}
756
+ function Or(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Xa("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Lc(e.substr(2));if(16!=f.byteLength)throw new O(2,4,4043);}else d=Iq(c.g,"EXT-X-MEDIA-SEQUENCE");b=Jq(c.h,Cq(b,"URI"));var g=bf([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l,m;return G(function(p){if(1==p.g)return u(p,
757
+ Pr(a,g,6),2);if(3!=p.g){k=p.h;if(!k.data||16!=k.data.byteLength)throw new O(2,4,4044);l={name:"AES-CBC"};m=h;return u(p,window.crypto.subtle.importKey("raw",k.data,l,!0,["decrypt"]),3)}m.cryptoKey=p.h;h.fetchKey=void 0;B(p)})}};return h}
758
+ function Mr(a,b){var c=Hq(b.g,"EXT-X-PLAYLIST-TYPE"),d=Hq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)er(a,Yq);else{c?er(a,zr):er(a,Qr);d=Hq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new O(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Hq(b.g,"EXT-X-PART-INF");a.l&&c?(a.da=Number(Cq(c,"PART-TARGET")),a.J=Math.min(a.da,a.J),b=Hq(b.g,"EXT-X-SERVER-CONTROL"),a.V=b?Number(Cq(b,"PART-HOLD-BACK")):0):a.J=Math.min(d,a.J);a.ca=Math.max(d,a.ca)}}
759
+ function xr(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.V?a.V:a.ca*a.g.hls.liveSegmentsDelay;a.j.Ye(0);a.j.Xe(b);a.j.zc(!1)}function Rr(a,b,c,d){c=Hq(c,"EXT-X-MAP");if(!c)return null;var e=Cq(c,"URI");d=Ir(Jq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ba.has(b)||(c=Sr(d,c),a.ba.set(b,c));return a.ba.get(b)}function Sr(a,b){var c=0,d=null;if(b=Z(b,"BYTERANGE"))c=b.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1;return new ni(function(){return[a]},c,d)}
760
+ function Tr(a,b,c,d,e,f,g,h,k,l){var m=d.g,p=Ir(d.i,f),n=Hq(m,"EXTINF"),t=f=0,v=null;d.h.length&&!a.l&&Xa("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=Hq(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(y=Uf(w.value))}w=pi;Hq(m,"EXT-X-GAP")&&(w=2);if(!n){if(0==d.h.length)throw new O(2,4,4024,
761
+ "EXTINF");if(!a.l)return null}var x=[];if(a.l)for(var D={},z=0;z<d.h.length;D={qd:D.qd},z++){var A=d.h[z],E=0==z?c:x[x.length-1],F=0==z?e:E.endTime,H=Number(Z(A,"DURATION"))||a.da;if(H){H=F+H;var I=0,J=null;"EXT-X-PRELOAD-HINT"==A.name?I=(I=Z(A,"BYTERANGE-START"))?Number(I):0:(I=Z(A,"BYTERANGE"),J=r(Ur(E,I)),I=J.next().value,J=J.next().value);if(E=Z(A,"URI"))D.qd=Jq(g,E),E=pi,"YES"==Z(A,"GAP")&&(E=2),F=new T(F,H,function(N){return function(){return[N.qd]}}(D),I,J,b,0,0,Infinity,[],"",null,null,E),
762
+ "EXT-X-PRELOAD-HINT"==A.name&&F.Ne(),x.push(F)}}n?f=e+Number(n.value.split(",")[0]):f=x[x.length-1].endTime;(a=Hq(m,"EXT-X-BYTERANGE"))?(v=r(Ur(c,a.value)),t=v.next().value,v=v.next().value):x.length&&(t=x[0].Ba,v=x[x.length-1].ma);c="";a=null;"image"==h&&(c="1x1",h=Hq(m,"EXT-X-TILES"))&&(c=Cq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new T(e,f,function(){return p.length?[p]:[]},t,v,b,k,0,Infinity,x,c,a,y,w,l)}
763
+ function Ur(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.ma+1,d=c+b-1);return[c,d]}
764
+ function jr(a,b,c,d,e){var f=b.segments,g=void 0,h=Iq(b.g,"EXT-X-DISCONTINUITY-SEQUENCE"),k=Iq(b.g,"EXT-X-MEDIA-SEQUENCE"),l=Hq(b.g,"EXT-X-SKIP");l=l?Number(Z(l,"SKIPPED-SEGMENTS")):0;var m=k+l,p=0;ar(a)&&d.has(m)&&(p=d.get(m));for(var n=[],t=null,v=p,y=0;y<f.length;y++){var w=f[y],x=0==y?p:t.endTime;m=k+l+y;Hq(w.g,"EXT-X-DISCONTINUITY")&&(h++,v=x);var D=r(w.g);for(var z=D.next();!z.done;z=D.next())z=z.value,"EXT-X-KEY"==z.name&&("AES-128"==Cq(z,"METHOD")?g=Or(a,z,b):g=void 0);d.set(m,x);D=Rr(a,b.h,
765
+ w.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());if(t=w=Tr(a,D,t,w,x,e,b.h,c,v,g))w.j=h,a.g.hls.ignoreManifestProgramDateTime&&null!=a.A&&m<a.A||n.push(w)}if(b=n.some(function(A){return null!=A.g}))for(c={},d=0;d<n.length;c={Rb:c.Rb,Qb:c.Qb,Cc:c.Cc,Ta:c.Ta,Pb:c.Pb},d++)if(c.Ta=n[d],null==c.Ta.g)for(c.Qb=0,c.Rb=d,e=function(A){return function(){var E=n[A.Rb];if(E){if(null!=E.g)return E.g+A.Qb;A.Qb-=E.endTime-E.startTime;A.Rb+=1}return null}}(c),c.Pb=
766
+ 0,c.Cc=d,f=function(A){return function(){var E=n[A.Cc];if(E){E!=A.Ta&&(A.Pb+=E.endTime-E.startTime);if(null!=E.g)return E.g+A.Pb;--A.Cc}return null}}(c);null==c.Ta.g;)c.Ta.g=f(),null==c.Ta.g&&(c.Ta.g=e());if(b)for(c=r(n),d=c.next();!d.done;d=c.next())for(e=d.value,d=e.g,e=r(e.i),f=e.next();!f.done;f=e.next())f=f.value,f.g=d,d+=f.endTime-f.startTime;a=a.H;if(b&&Infinity!=a)for(b=r(n),d=b.next();!d.done;d=b.next())d.value.pe(a);return n}
767
+ function Ir(a,b){if(!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=r(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new O(2,4,4039,e);}}return a}function Cr(a,b){if(a==ic){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":null:"image/jpeg"}
768
+ function Dr(a){return a==ic?"text/vtt":Vr[a].mp4}function Nr(a,b,c,d,e){var f,g,h,k,l,m,p,n,t,v;return G(function(y){if(1==y.g){f=hf;g=Math.trunc((d.segments.length-1)/2);h=Ir(d.segments[g].i,e);k=new Mb(h);l=k.ra.split(".").pop();m=Vr[b];if((p=m[l])||(p=nr[l])||(p=Cr(b,c)))return y.return(p);n=bf([h],a.g.retryParameters);n.method="HEAD";return u(y,Pr(a,n,f),2)}t=y.h;return(v=t.headers["content-type"])?y.return(v.split(";")[0]):y.return(Dr(b))})}
769
+ function Zq(a,b){b=bf([b],a.g.retryParameters);a.i.modifyManifestRequest(b,{format:"h"});return Pr(a,b,0)}function Xq(a){var b,c;G(function(d){if(1==d.g){if(!a.i)return d.return();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return ar(a)&&(b=a.P,a.m.O(b)),va(d,0);c=wa(d);if(!a.i)return d.return();c.severity=1;a.i.onError(c);a.m.O(.1);B(d)})}function ar(a){return a.ea!=Yq}function er(a,b){a.ea=b;a.j&&a.j.zc(!ar(a));ar(a)||a.m.stop()}
770
+ function Pr(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b);Xe(a.G,b);return b.promise}K("shaka.hls.HlsParser",Wq);
771
+ var nr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},or={mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},pr={mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},Vr={audio:or,video:pr,text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",
772
+ vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},Fr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new O(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new O(2,4,4041);return ec("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Cq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
773
+ b=Cq(a,"URI");b=Vq(b);b=L(b.data);b=ec("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=Cq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Cq(a,"URI");a=Vq(a);a=L(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Jf(a,b,new Set,0);return ec("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
774
+ Cq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?ec("org.w3.clearkey",null):null}},Yq="VOD",Qr="EVENT",zr="LIVE",dr={gf:Yq,Qg:Qr,Ug:zr};sc("Tizen 3")||sc("Tizen 2")||uc()||(Ug.m3u8=function(){return new Wq},Sg["application/x-mpegurl"]=function(){return new Wq},Sg["application/vnd.apple.mpegurl"]=function(){return new Wq});function Wr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ec(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Xr(){}function Yr(a,b,c,d,e){var f=new Zr;sf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new $r,h={ze:!1,cf:!1};a=as(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Ke(a,function(){h.ze=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new P(function(){h.cf=!0;g.abort()});k.O(b/1E3);a.finally(function(){k.stop()})}return a}
775
+ function as(a,b,c,d,e,f,g){var h,k,l,m,p,n,t,v,y,w,x,D,z;return G(function(A){switch(A.g){case 1:return h=bs,k=cs,n=p=0,t=Date.now(),C(A,2),u(A,h(a,c),4);case 4:l=A.h;f(ds(l.headers));if("HEAD"==c.method){A.B(5);break}v=l.clone().body.getReader();w=(y=l.headers.get("Content-Length"))?parseInt(y,10):0;x=function(E){function F(){var H,I;return G(function(J){switch(J.g){case 1:return C(J,2),u(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return wa(J),J.return();case 3:if(H.done){J.B(5);break}p+=H.value.byteLength;
776
+ if(!g){J.B(5);break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-t||H.done)e(I-t,p-n,w-p),n=p,t=I;H.done?E.close():(E.enqueue(H.value),F());B(J)}})}F()};new k({start:x});return u(A,l.arrayBuffer(),6);case 6:m=A.h;case 5:va(A,3);break;case 2:D=wa(A);if(d.ze)throw new O(1,1,7001,a,b);if(d.cf)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,D,b);case 3:return z=ds(l.headers),A.return(Wr(z,m,l.status,a,l.url,b))}})}function ds(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
777
+ function es(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",Xr);Xr.isSupported=es;Xr.parse=Yr;var bs=window.fetch,$r=window.AbortController,cs=window.ReadableStream,Zr=window.Headers;es()&&(Ze("http",Yr,2,!0),Ze("https",Yr,2,!0),Ze("blob",Yr,2,!0));function fs(){}
778
+ function gs(a,b,c,d,e){var f=new hs,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new O(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var t=is(f);e(t);p=!0}};f.onload=function(){var t=is(f),v=f.response;try{var y=Wr(t,v,f.status,a,f.responseURL,c);l(y)}catch(w){m(w)}};f.onerror=function(t){m(new O(1,1,1002,a,t,
779
+ c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(t){var v=Date.now();if(100<v-g||t.lengthComputable&&t.loaded==t.total)d(v-g,t.loaded-h,t.total-t.loaded),h=t.loaded,g=v};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new Ke(k,function(){f.abort();return Promise.resolve()})}
780
+ function is(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}K("shaka.net.HttpXHRPlugin",fs);fs.parse=gs;var hs=window.XMLHttpRequest;Ze("http",gs,1,!0);Ze("https",gs,1,!0);Ze("blob",gs,1,!0);function js(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function ks(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.ma}function ls(a,b){return ak(a.g.ya(),a.g.Ba,a.g.ma,b.streaming.retryParameters)};function ms(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function ns(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}ms.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 os(a){var b=this;this.o=a;this.j=new Map;this.i=new jf(function(){return ps(b).catch(function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new ms}os.prototype.destroy=function(){return this.i.destroy()};function qs(a,b,c){a.m=b;a.l=c}function ps(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
781
+ function rs(a,b,c,d,e,f){kf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,t;return G(function(v){if(1==v.g)return u(v,ss(a,c),2);h=v.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=L(h),l=new If(k),l.data)p=Number(m),n=l.data[p],t=l.g[p],a.l(n,t);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v.return(f(h))})});a.j.set(b,g)}function ts(a){return G(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b.return(a.g.h)})}
782
+ function ss(a,b){var c,d,e,f;return G(function(g){if(1==g.g)return c=hf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;gb(a.h,e);return g.return(f.data)})};function us(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new kc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}us.prototype.abort=function(){var a=this;return G(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);wa(b);B(b)})};
783
+ function vs(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return G(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();B(g)})}})}us.prototype.store=function(){return this.h};us.prototype.promise=function(){return this.g};function ws(a){this.h=a;this.g=[]}ws.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function xs(a,b){return ys(a,b,"readwrite")}function ys(a,b,c){c=a.h.transaction([b],c);var d=new us(c,b);a.g.push(d);d.promise().then(function(){gb(a.g,d)},function(){gb(a.g,d)});return d};function zs(a,b,c){this.h=new ws(a);this.i=b;this.g=c}q=zs.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return As(this.i)};q.removeSegments=function(a,b){return Bs(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Cs(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Ae(e)}))})};q.addManifests=function(){return As(this.g)};
784
+ q.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function Ds(a,b,c){a=xs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=xs(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return Bs(this,this.g,a,b)};
785
+ q.getManifests=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,Cs(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.cc(e)})))})};q.getAllManifests=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=ys(a.h,a.g,"readonly"),c=new Map,u(d,vs(b,function(e,f){var g;return G(function(h){if(1==h.g)return u(h,a.cc(f),2);g=h.h;c.set(e,g);B(h)})}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};q.Ae=function(a){return a};q.cc=function(a){return Promise.resolve(a)};
786
+ function As(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=xs(c.h,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={Gc:g.Gc},k=h.next())l=k.value,g.Gc=e.add(l),g.Gc.onsuccess=function(p){return function(){f.push(p.Gc.result)}}(g);return u(m,d.promise(),2)}return m.return(f)})};
787
+ function Bs(a,b,c,d){a=xs(a.h,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={Fc:e.Fc},f=c.next())e.Fc=f.value,b.delete(e.Fc).onsuccess=function(g){return function(){return d(g.Fc)}}(e);return a.promise()}
788
+ function Cs(a,b,c){var d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=ys(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Wb:h.Wb,Ub:h.Ub},l=k.next())h.Ub=l.value,h.Wb=e.get(h.Ub),h.Wb.onsuccess=function(p){return function(){void 0==p.Wb.result&&g.push(p.Ub);f[p.Ub]=p.Wb.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(p){return f[p]}))})};function Es(a){this.g=new ws(a)}Es.prototype.destroy=function(){return this.g.destroy()};Es.prototype.getAll=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=ys(a.g,"session-ids","readonly"),c=[],u(d,vs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d.return(c)})};Es.prototype.add=function(a){var b=xs(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()};
789
+ Es.prototype.remove=function(a){var b=this,c;return G(function(d){return 1==d.g?(c=xs(b.g,"session-ids"),u(d,vs(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):u(d,c.promise(),0)})};function Fs(){this.g=new Map}Fs.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)};Fs.prototype.init=function(){var a=this;Gs.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=r(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
790
+ function Hs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{za:d,la:f},la:e})})});if(b)return b;throw new O(2,9,9013,"Could not find a cell that supports add-operations");}function Is(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({za:d,la:f},e)})})}
791
+ function Js(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 Ks(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function Ls(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()}
792
+ function Ms(a){var b,c,d;return G(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Gs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.B(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Ns(a,b){Gs.set(a,b)}K("shaka.offline.StorageMuxer",Fs);Fs.unregister=function(a){Gs.delete(a)};Fs.register=Ns;Fs.prototype.destroy=Fs.prototype.destroy;var Gs=new Map;function Os(){zs.apply(this,arguments)}qa(Os,zs);Os.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return G(function(g){d=xs(c.h,c.g);e=d.store();f=new kc;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)})};
793
+ Os.prototype.cc=function(a){var b,c,d,e,f,g;return G(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=Ps(a.periods[c],e),b.push(f);return u(h,Np(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
794
+ function Ps(a,b){Qs(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Rs(e,a.startTime,b)})}
795
+ function Rs(a,b,c){var d=a.initSegmentUri?Ss(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=Ss(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
796
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}Os.prototype.Ae=function(a){return{data:a.data}};function Ss(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);}
797
+ function Qs(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++,
798
+ 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 Ts(){zs.apply(this,arguments)}qa(Ts,zs);
799
+ Ts.prototype.cc=function(a){var b,c,d,e,f,g;return G(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(Us(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Np(b),2)}g=h.h;return h.return({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==a.expiration?
793
800
  Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
794
- function Ws(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,
795
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Xs(){Bs.apply(this,arguments)}oa(Xs,Bs);q=Xs.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Fs(this,a,b)};q.bc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ys(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ys.prototype;
796
- q.init=function(){var a=this,b=new lc,c=!1,d=new P(function(){c=!0;b.reject(new O(2,9,9017))});d.N(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Qs(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Vs(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
797
- new Vs(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Xs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Gs(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new O(2,
798
- 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
801
+ function Us(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,
802
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Vs(){zs.apply(this,arguments)}qa(Vs,zs);q=Vs.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return Ds(this,a,b)};q.cc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Ws(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=Ws.prototype;
803
+ q.init=function(){var a=this,b=new kc,c=!1,d=new P(function(){c=!0;b.reject(new O(2,9,9017))});d.O(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new Os(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Ts(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
804
+ new Ts(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Vs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Es(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=r(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new O(2,
805
+ 9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.B(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),B(b)}})};
799
806
  q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
800
- q.erase=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Zs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
801
- function Zs(){var a=new lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new O(2,9,9001,b.error));c.preventDefault()};return a}Ps("idb",function(){return tc("CrKey")||sc()||!window.indexedDB?null:new Ys});function $s(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}$s.prototype.za=function(){return this.i};$s.prototype.ja=function(){return this.h};$s.prototype.key=function(){return this.l};$s.prototype.toString=function(){return this.j};
802
- function at(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 $s(b,c,d,Number(a[4])):null};function bt(a,b){this.h=a;this.g=b}
803
- function ct(a,b){var c=new T(null,0);c.Aa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=dt(a,d,e,c);e=b.streams.filter(function(l){return l.type==jc}).map(function(l){return et(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return et(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=
807
+ q.erase=function(){var a=this;return G(function(b){switch(b.g){case 1:if(!a.g){b.B(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.B(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.B(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.B(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,Xs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
808
+ function Xs(){var a=new kc,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}Ns("idb",function(){return sc("CrKey")||rc()||!window.indexedDB?null:new Ws});function Ys(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Ys.prototype.za=function(){return this.i};Ys.prototype.la=function(){return this.h};Ys.prototype.key=function(){return this.l};Ys.prototype.toString=function(){return this.j};
809
+ function Zs(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 Ys(b,c,d,Number(a[4])):null};function $s(a,b){this.h=a;this.g=b}
810
+ function at(a,b){var c=new U(null,0);c.Aa(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=bt(a,d,e,c);e=b.streams.filter(function(l){return l.type==ic}).map(function(l){return ct(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ct(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=
804
811
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
805
- function dt(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
806
- b.next())for(e=e.value,g=et(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=et(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}
807
- function et(a,b,c){var d=b.segments.map(function(e){return ft(a,e)});c.Ib(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Jj(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,
808
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function ft(a,b){var c=new $s("segment",a.h,a.g,b.dataKey);return new qi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?gt(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
809
- function gt(a,b){var c=new $s("segment",a.h,a.g,b);return new oi(function(){return[c.toString()]},0,null)};function ht(){this.g=null}q=ht.prototype;q.configure=function(){};
810
- q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:d=at(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new Hs;sa(m);return u(m,e.init(),4);case 4:return u(m,Ls(e,d.za(),d.ja()),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 bt(d.za(),d.ja()),l=ct(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()};
812
+ function bt(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=r(b);for(e=b.next();!e.done;e=
813
+ b.next())for(e=e.value,g=ct(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=ct(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}
814
+ function ct(a,b,c){var d=b.segments.map(function(e){return dt(a,e)});c.Jb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Hj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
815
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function dt(a,b){var c=new Ys("segment",a.h,a.g,b.dataKey);return new T(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?et(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
816
+ function et(a,b){var c=new Ys("segment",a.h,a.g,b);return new ni(function(){return[c.toString()]},0,null)};function ft(){this.g=null}q=ft.prototype;q.configure=function(){};
817
+ q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:d=Zs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new Fs;ua(m);return u(m,e.init(),4);case 4:return u(m,Js(e,d.za(),d.la()),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 $s(d.za(),d.la()),l=at(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return ya(m),u(m,e.destroy(),7);case 7:za(m,0)}})};q.stop=function(){return Promise.resolve()};
811
818
  q.update=function(){};
812
- q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return d=c.g,e=new Hs,D(m,2,3),u(m,e.init(),5);case 5:return u(m,Ls(e,d.za(),d.ja()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return xa(m),u(m,e.destroy(),10);case 10:ya(m,0);break;case 2:ua(m),m.A(3)}})};
813
- Tg["application/x-offline-manifest"]=function(){return new ht};function it(){}function jt(a){var b=at(a);b&&"manifest"==b.g?(a={uri:a,Oe:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Oe(a)):a=b&&"segment"==b.g?kt(b.key(),b):Me(new O(2,1,9004,a));return a}function kt(a,b){var c=new Hs;return Oe(void 0).Y(function(){return c.init()}).Y(function(){return Ls(c,b.za(),b.ja())}).Y(function(d){return d.getSegments([b.key()])}).Y(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}
814
- K("shaka.offline.OfflineScheme",it);it.plugin=jt;$e("offline",jt);function lt(a,b,c){var d,e,f,g,h,k;return G(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),y=v.next();!y.done;y=v.next())if(y=y.value,mt(y.info,p)){y.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.A(4);break}g=f.value;h=nt(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})}
815
- function nt(a,b,c){var d,e;return G(function(f){switch(f.g){case 1:return d=new fg({kb:b,onError:function(){},cd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(f,2),d.configure(a),u(f,ng(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:ta(f,3);break;case 2:return ua(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return D(f,6),u(f,yg(d),8);case 8:ta(f,7);break;case 6:return ua(f),u(f,d.destroy(),
816
- 9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return G(function(h){if(1==h.g)return D(h,2),u(h,zg(d,g),4);if(2!=h.g)return e.push(g),ta(h,0);ua(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
817
- function mt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ib(a.audioCapabilities,b.audioCapabilities,c)&&ib(a.videoCapabilities,b.videoCapabilities,c)};function ot(a,b,c){var d=b.presentationTimeline.getDuration();b=pt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function qt(a,b){var c=ct(new bt(a.za(),a.ja()),b),d=b.appMetadata||{};c=pt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
818
- function pt(a){var b=[],c=ie(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push($d(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ae(c.value));return b};function rt(){this.g={}}function st(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function tt(a,b){a.g[b.id]=b.bandwidth||2048}function ut(a,b){a=a.g[b];null==a&&(a=0);return a};function vt(a){var b=this;if(a&&a.constructor!=V)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.jc()):(this.h=El(),this.g=new Ze);this.i=[];this.j=[];var c=!a;this.l=new kf(function(){var d,e,f,g,h;return G(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return rs(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
819
- case 4:b.h=null,b.g=null,A(k)}})})}function wt(){if(oc())a:{var a=r(Is.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=vt.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yl(a,b));return Gl(this.h,a)};q.getConfiguration=function(){var a=El();Gl(a,this.h,El());return a};q.jc=function(){return this.g};
820
- q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new qs(this.g);this.j.push(f);b=xt(this,a,b||{},function(){var g;return G(function(h){if(1==h.g)return u(h,Sg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Le(b,function(){return rs(f)});b.finally(function(){hb(d.j,f)});return yt(this,b)};
821
- function xt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w,x,C,z;return G(function(B){switch(B.g){case 1:return zt(),h=g=null,k=new Hs,n=m=l=null,D(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,At(a,b,g,e),6);case 6:p=B.h;Bt(a);t=!p.presentationTimeline.U()&&!p.presentationTimeline.jb();if(!t)throw new O(2,9,9005,b);return u(B,Ct(a,p,function(E){n=n||E},e),7);case 7:h=B.h;Bt(a);if(n)throw n;return u(B,Dt(p,e),8);case 8:return u(B,k.init(),9);case 9:return Bt(a),u(B,Js(k),10);case 10:return l=B.h,Bt(a),v=Et(h,
822
- p,b,c,e,f),y=v.ag,w=v.pe,u(B,l.ja.addManifests([y]),11);case 11:x=B.h;Bt(a);m=x[0];Bt(a);if(n)throw n;return u(B,Ft(a,w,m,y,f,e,l.ja,p,h),12);case 12:return Bt(a),C=new $s("manifest",l.path.za,l.path.ja,m),B.return(qt(C,y));case 3:return xa(B),u(B,k.destroy(),13);case 13:if(!g){B.A(14);break}return u(B,g.stop(),14);case 14:if(!h){B.A(16);break}return u(B,h.destroy(),16);case 16:ya(B,0);break;case 2:z=ua(B);if(null==m){B.A(18);break}return u(B,Gt(m),18);case 18:throw n||z;}})}
823
- function Ft(a,b,c,d,e,f,g,h,k){var l,m,n,p,t,v,y,w,x,C;return G(function(z){switch(z.g){case 1:l={};m=0;n=function(B,E){var F,H,I,J,L,R,Q;return G(function(U){if(1==U.g){F={};H=r(B);for(I=H.next();!I.done;F={cb:F.cb},I=H.next())F.cb=I.value,J=ns(F.cb,f),L=F.cb.i,R=F.cb.h,Q=function(N){return function(wa){var va,Ma,Sa;return G(function(Ga){if(1==Ga.g)return u(Ga,g.addSegments([{data:wa}]),2);va=Ga.h;Bt(a);Ma=N.cb.g;Sa=ms(Ma);l[Sa]=va[0];m+=wa.byteLength;A(Ga)})}}(F),ts(e,F.cb.groupId,J,L,R,Q);return u(U,
824
- vs(e),2)}if(!E)return U.A(0);Bt(a);Ht(h,d,k,f);return u(U,g.updateManifest(c,d),0)})};p=!1;D(z,2);if(!It(h)||!p||Jt(h)){z.A(4);break}return u(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return Bt(a),b=b.filter(function(B){return!B.h}),t=l,v=m,l={},m=0,u(z,Kt(g,c,d,t,v,function(){return Bt(a)}),6);case 6:Bt(a);case 4:if(p){z.A(7);break}return u(z,n(b,!1),8);case 8:return Bt(a),y=l,w=m,l={},m=0,u(z,Kt(g,c,d,y,w,function(){return Bt(a)}),9);case 9:Bt(a);case 7:ta(z,0);break;case 2:return x=ua(z),
825
- C=Object.values(l),u(z,g.removeSegments(C,function(){}),10);case 10:throw x;}})}function Gt(a){var b,c,d,e;return G(function(f){switch(f.g){case 1:return b=new Hs,u(f,b.init(),2);case 2:return u(f,Js(b),3);case 3:return c=f.h,d=new $s("manifest",c.path.za,c.path.ja,a),u(f,b.destroy(),4);case 4:return e=new vt,u(f,e.remove(d.toString()),0)}})}
826
- function Kt(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,y,w;return G(function(x){switch(x.g){case 1:g=!1;D(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=r(m.segments),p=n.next();!p.done;p=n.next())t=p.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
827
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();ta(x,0);break;case 2:return y=ua(x),u(x,Gt(b),5);case 5:if(g){x.A(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
828
- function Dt(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x,C,z,B,E,F,H,I,J,L,R,Q,U,N;return G(function(wa){switch(wa.g){case 1:return c={width:Infinity,height:Infinity},Jd(a,b.restrictions,c),u(wa,Nd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;xd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push($d(m));n=r(a.textStreams);for(p=n.next();!p.done;p=n.next())t=p.value,
829
- d.push(ae(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(be(w));return u(wa,b.offline.trackSelectionCallback(d),3);case 3:x=wa.h;C=a.presentationTimeline.getDuration();z=0;B=r(x);for(E=B.next();!E.done;E=B.next())F=E.value,H=F.bandwidth*C/8,z+=H;D(wa,4);return u(wa,b.offline.downloadSizeCallback(z),6);case 6:I=wa.h;if(!I)throw new O(2,9,9014);ta(wa,5);break;case 4:J=ua(wa);if(J instanceof O)throw J;throw new O(2,9,9015);case 5:L=new Set;R=new Set;Q=new Set;U=r(x);for(E=
830
- U.next();!E.done;E=U.next())N=E.value,"variant"==N.type&&L.add(N.id),"text"==N.type&&R.add(N.id),"image"==N.type&&Q.add(N.id);a.variants=a.variants.filter(function(va){return L.has(va.id)});a.textStreams=a.textStreams.filter(function(va){return R.has(va.id)});a.imageStreams=a.imageStreams.filter(function(va){return Q.has(va.id)});Lt(a);A(wa)}})}
831
- function Et(a,b,c,d,e,f){var g=ot(c,b,d),h=e.offline.progressCallback;ss(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&vg(a,"cenc",t)});var k=It(b)&&!Jt(b),l=null;k&&(l=Mt.get(a.g.keySystem));for(var m=new rt,n=r(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=r(b.imageStreams);for(p=n.next();!p.done;p=n.next())tt(m,p.value);p=r(b.variants);for(n=p.next();!n.done;n=p.next())st(m,n.value);m=Nt(f,m,b,e);f=m.streams;m=m.pe;p=a.g;n=e.offline.usePersistentLicense;
832
- p&&n&&(p.initData=[]);return{ag:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ic(),streams:f,sessionIds:n?Eg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},pe:m}}function It(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
833
- function Jt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Ht(a,b,c,d){b.expiration=c.ic();c=Eg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(It(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}q.remove=function(a){return Ot(this,Pt(this,a))};
834
- function Pt(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:zt();c=at(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Hs;sa(k);return u(k,e.init(),4);case 4:return u(k,Ls(e,d.za(),d.ja()),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([Qt(a,h,e),Rt(f,d,h)]),2);case 2:return xa(k),u(k,e.destroy(),8);case 8:ya(k,0)}})}
835
- function St(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:Zc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Zc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Qt(a,b,c){return G(function(d){return u(d,Tt(a.g,a.h.drm,c,b),0)})}
836
- function Rt(a,b,c){function d(){}var e=Ut(c);qt(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.pg=function(){return Ot(this,Vt(this))};
837
- function Vt(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:return zt(),b=a.g,c=a.h.drm,d=new Hs,e=!1,sa(n),u(n,d.init(),4);case 4:f=[],Ms(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,lt(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.A(5);break;case 2:return xa(n),u(n,d.destroy(),11);case 11:ya(n,3);break;case 3:return n.return(!e)}})}
838
- q.list=function(){return Ot(this,Wt())};function Wt(){var a,b,c;return G(function(d){switch(d.g){case 1:return zt(),a=[],b=new Hs,sa(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Ks(b,function(e,f){c=c.then(function(){var g;return G(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=qt(new $s("manifest",e.za,e.ja,l),k);a.push(k)});A(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)}})}
839
- function At(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},
840
- c.configure(d.manifest),Bt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Bt(a),k=Xt(h),u(l,Promise.all(rf(k,function(m){return m.createSegmentIndex()})),3);Bt(a);if(e)throw e;return l.return(h)})}
841
- function Ct(a,b,c,d){var e;return G(function(f){switch(f.g){case 1:return e=new fg({kb:a.g,onError:c,cd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,kg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,yg(e),3);case 3:return u(f,xg(e),4);case 4:return f.return(e)}})}
842
- function Nt(a,b,c,d){var e=new Map,f=Xt(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Yt(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),pe:Array.from(e.values())}}
843
- function Yt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
844
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Zt(d,c.presentationTimeline.Pa(),function(l){var m=ms(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=ut(b,d.id)*p;p=ps(a.g,p);f.set(m,new ls(l,p,k,!1))}l.h&&(n=ms(l.h),f.has(n)||(p=.5*ut(b,d.id),p=ps(a.g,p),f.set(n,new ls(l.h,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
845
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Zt(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 Bt(a){if(a.l.g)throw new O(2,9,7001);}function zt(){if(!wt())throw new O(2,9,9E3);}function Ot(a,b){return G(function(c){if(1==c.g)return a.i.push(b),sa(c),u(c,b,4);if(2!=c.g)return c.return(c.h);xa(c);hb(a.i,b);return ya(c,0)})}
846
- function yt(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){hb(a.i,c)})}function Ut(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
847
- function Tt(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Ns(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:St(d,!1),videoCapabilities:St(d,!0)}});return u(h,lt(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)})}
848
- function Xt(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}
849
- function Lt(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",vt);vt.deleteAll=function(){var a;return G(function(b){return 1==b.g?(a=new Hs,sa(b),u(b,Os(a),2)):5!=b.g?(xa(b),u(b,a.destroy(),5)):ya(b,0)})};vt.prototype.list=vt.prototype.list;
850
- vt.prototype.removeEmeSessions=vt.prototype.pg;vt.prototype.remove=vt.prototype.remove;vt.prototype.store=vt.prototype.store;vt.prototype.getNetworkingEngine=vt.prototype.jc;vt.prototype.getConfiguration=vt.prototype.getConfiguration;vt.prototype.configure=vt.prototype.configure;vt.prototype.destroy=vt.prototype.destroy;vt.support=wt;
851
- var Mt=(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");
852
- rn.offline=wt;function $t(){}function au(a,b){a={priority:b||0,mf:a};for(b=0;b<bu.length;b++)if(bu[b].priority<a.priority){bu.splice(b,0,a);return}bu.push(a)}K("shaka.polyfill",$t);$t.register=au;$t.installAll=function(){for(var a=r(bu),b=a.next();!b.done;b=a.next()){b=b.value;try{b.mf()}catch(c){Wa("Error installing polyfill!",c)}}};var bu=[];function cu(){this.g=new du}function eu(){window.AbortController||(window.AbortController=cu,window.AbortSignal=du)}cu.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};da.Object.defineProperties(cu.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});$t.AbortController=cu;cu.install=eu;
853
- function du(){Ue.call(this);this.h=!1;this.g=void 0;this.onabort=null}oa(du,Ue);da.Object.defineProperties(du.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});au(eu);function fu(){}function gu(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())hu(b.value)}function hu(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}$t.Aria=fu;fu.install=gu;au(gu);function iu(){}function ju(){ku()}$t.EncryptionScheme=iu;iu.install=ju;au(ju,-2);function lu(){}
854
- function mu(){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}}),
855
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",nu);document.addEventListener("webkitfullscreenerror",nu);document.addEventListener("mozfullscreenchange",nu);document.addEventListener("mozfullscreenerror",nu);document.addEventListener("MSFullscreenChange",nu);document.addEventListener("MSFullscreenError",nu)}}
856
- function nu(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)}$t.Fullscreen=lu;lu.install=mu;au(mu);function ou(){}function pu(){var a=!0;if(wc()||tc("PlayStation 5")||xc()||tc("Web0S")||uc()||tc("CrKey")||tc("PC=EOS")||tc("Hisense")||tc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),qu=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=ru)}
857
- function ru(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,y,w,x;return G(function(C){switch(C.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return C.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!oc())return C.return(b);if(c){if(tc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var z=c.contentType;c.width&&c.height&&(z+="; width="+c.width+"; height="+c.height);c.framerate&&(z+="; framerate="+c.framerate);"pq"===
858
- c.transferFunction&&(z+="; eotf=smpte2084");z=cast.__platform__.canDisplayType(z)}else z=eb(c.contentType);else z=eb(c.contentType);e=z;if(!e)return C.return(b)}if(d&&(f=d.contentType,g=eb(f),!g))return C.return(b)}else if("file"==a.type){if(c&&(h=c.contentType,k=pc(h),!k)||d&&(l=d.contentType,m=pc(l),!m))return C.return(b)}else return C.return(b);if(!a.keySystemConfiguration)return b.supported=!0,C.return(Promise.resolve(b));n=a.keySystemConfiguration;p=[];t=[];n.audio&&(v={robustness:n.audio.robustness||
859
- "",contentType:a.audio.contentType},p.push(v));n.video&&(y={robustness:n.video.robustness||"",contentType:a.video.contentType},t.push(y));w={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};p.length&&(w.audioCapabilities=p);t.length&&(w.videoCapabilities=t);D(C,3);return u(C,navigator.requestMediaKeySystemAccess(n.keySystem,[w]),5);case 5:x=C.h;ta(C,4);break;case 3:ua(C);case 4:x&&(b.supported=!0,b.keySystemAccess=
860
- x);case 2:return C.return(b)}})}$t.MediaCapabilities=ou;ou.install=pu;var qu=null;ou.originalMcap=qu;au(pu,-1);function su(){}function tu(){var a=yc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?uu():a?12>=a?(vu(),wu()):15>=a&&vu():rc()?xu():(tc("Tizen 2")||tc("Tizen 3")||tc("Tizen 4"))&&yu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&zu()}
861
- function vu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Fa.apply(0,arguments));b.abort=function(){};return b}}function wu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function xu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
862
- function yu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=bd(b)[0]&&a(b)}}function uu(){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)}}
863
- function zu(){var a=MediaSource.isTypeSupported;tc("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)})}$t.MediaSource=su;su.install=tu;au(tu);function Au(){}function Bu(){screen.orientation||void 0!=window.orientation&&Cu()}function Cu(){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 Du;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}$t.Orientation=Au;
864
- Au.install=Bu;function Du(){Ue.call(this);this.type="";this.angle=0}oa(Du,Ue);
865
- Du.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)};
866
- Du.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};au(Bu);function Eu(){}var Fu,Gu,Hu,Iu,Ju,Ku;function Lu(a,b){try{var c=new Mu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Nu(a){var b=this.mediaKeys;b&&b!=a&&Ou(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Ou(a,this):Promise.resolve()}
867
- function Pu(a){a=M(a.initData);if(Lb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Dc(a.subarray(4),!0);a=Gc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ib(a);this.dispatchEvent(b)}$t.PatchedMediaKeysApple=Eu;
868
- Eu.uninstall=function(){Fu&&(Fu=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Gu),HTMLMediaElement.prototype.setMediaKeys=Hu,window.MediaKeys=Iu,window.MediaKeySystemAccess=Ju,navigator.requestMediaKeySystemAccess=Ku,Gu=Ku=Hu=Ju=Iu=null,window.shakaMediaKeysPolyfill=!1)};
869
- Eu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Fu=!0,Gu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Hu=HTMLMediaElement.prototype.setMediaKeys,Iu=window.MediaKeys,Ju=window.MediaKeySystemAccess,Ku=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Nu;window.MediaKeys=Qu;window.MediaKeySystemAccess=Mu;navigator.requestMediaKeySystemAccess=
870
- Lu;window.shakaMediaKeysPolyfill=!0}};
871
- function Mu(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
819
+ q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return d=c.g,e=new Fs,C(m,2,3),u(m,e.init(),5);case 5:return u(m,Js(e,d.za(),d.la()),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.B(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),u(m,e.destroy(),10);case 10:za(m,0);break;case 2:wa(m),m.B(3)}})};
820
+ Sg["application/x-offline-manifest"]=function(){return new ft};function gt(){}function ht(a){var b=Zs(a);b&&"manifest"==b.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ne(a)):a=b&&"segment"==b.g?it(b.key(),b):Le(new O(2,1,9004,a));return a}
821
+ function it(a,b){var c=new Fs;return Ne(void 0).Z(function(){return c.init()}).Z(function(){return Js(c,b.za(),b.la())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}}).finally(function(){return c.destroy()})}K("shaka.offline.OfflineScheme",gt);gt.plugin=ht;Ze("offline",ht);function jt(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:d=[];for(var m=[],p=r(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var t=!1,v=r(m),y=v.next();!y.done;y=v.next())if(y=y.value,kt(y.info,n)){y.sessionIds.push(n.sessionId);t=!0;break}t||m.push({info:n,sessionIds:[n.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.B(4);break}g=f.value;h=lt(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.B(2);break;case 4:return l.return(d)}})}
822
+ function lt(a,b,c){var d,e;return G(function(f){switch(f.g){case 1:return d=new eg({lb:b,onError:function(){},dd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,mg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return wa(f),u(f,d.destroy(),5);case 5:return f.return([]);case 3:return C(f,6),u(f,xg(d),8);case 8:va(f,7);break;case 6:return wa(f),u(f,d.destroy(),
823
+ 9);case 9:return f.return([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return G(function(h){if(1==h.g)return C(h,2),u(h,yg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);wa(h);B(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f.return(e)}})}
824
+ function kt(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&hb(a.audioCapabilities,b.audioCapabilities,c)&&hb(a.videoCapabilities,b.videoCapabilities,c)};function mt(a,b,c){var d=b.presentationTimeline.getDuration();b=nt(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function ot(a,b){var c=at(new $s(a.za(),a.la()),b),d=b.appMetadata||{};c=nt(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
825
+ function nt(a){var b=[],c=he(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(Zd(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push($d(c.value));return b};function pt(){this.g={}}function qt(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function rt(a,b){a.g[b.id]=b.bandwidth||2048}function st(a,b){a=a.g[b];null==a&&(a=0);return a};function tt(a){var b=this;if(a&&a.constructor!=V)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.kc()):(this.h=Cl(),this.g=new Ye);this.i=[];this.j=[];var c=!a;this.l=new jf(function(){var d,e,f,g,h;return G(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return ps(l)})),2);case 2:d=function(){};e=[];f=r(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.B(4);break}return u(k,b.g.destroy(),4);
826
+ case 4:b.h=null,b.g=null,B(k)}})})}function ut(){if(nc())a:{var a=r(Gs.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=tt.prototype;q.destroy=function(){return this.l.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=wl(a,b));return El(this.h,a)};q.getConfiguration=function(){var a=Cl();El(a,this.h,Cl());return a};q.kc=function(){return this.g};
827
+ q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new os(this.g);this.j.push(f);b=vt(this,a,b||{},function(){var g;return G(function(h){if(1==h.g)return u(h,Rg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h.return(g())})},e,f);b=new Ke(b,function(){return ps(f)});b.finally(function(){gb(d.j,f)});return wt(this,b)};
828
+ function vt(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w,x,D,z;return G(function(A){switch(A.g){case 1:return xt(),h=g=null,k=new Fs,p=m=l=null,C(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,yt(a,b,g,e),6);case 6:n=A.h;zt(a);t=!n.presentationTimeline.U()&&!n.presentationTimeline.jb();if(!t)throw new O(2,9,9005,b);return u(A,At(a,n,function(E){p=p||E},e),7);case 7:h=A.h;zt(a);if(p)throw p;return u(A,Bt(n,e),8);case 8:return u(A,k.init(),9);case 9:return zt(a),u(A,Hs(k),10);case 10:return l=A.h,zt(a),v=Ct(h,
829
+ n,b,c,e,f),y=v.cg,w=v.qe,u(A,l.la.addManifests([y]),11);case 11:x=A.h;zt(a);m=x[0];zt(a);if(p)throw p;return u(A,Dt(a,w,m,y,f,e,l.la,n,h),12);case 12:return zt(a),D=new Ys("manifest",l.path.za,l.path.la,m),A.return(ot(D,y));case 3:return ya(A),u(A,k.destroy(),13);case 13:if(!g){A.B(14);break}return u(A,g.stop(),14);case 14:if(!h){A.B(16);break}return u(A,h.destroy(),16);case 16:za(A,0);break;case 2:z=wa(A);if(null==m){A.B(18);break}return u(A,Et(m),18);case 18:throw p||z;}})}
830
+ function Dt(a,b,c,d,e,f,g,h,k){var l,m,p,n,t,v,y,w,x,D;return G(function(z){switch(z.g){case 1:l={};m=0;p=function(A,E){var F,H,I,J,N,R,Q;return G(function(ba){if(1==ba.g){F={};H=r(A);for(I=H.next();!I.done;F={cb:F.cb},I=H.next())F.cb=I.value,J=ls(F.cb,f),N=F.cb.i,R=F.cb.h,Q=function(M){return function(ja){var Fa,xa,Na;return G(function(Ha){if(1==Ha.g)return u(Ha,g.addSegments([{data:ja}]),2);Fa=Ha.h;zt(a);xa=M.cb.g;Na=ks(xa);l[Na]=Fa[0];m+=ja.byteLength;B(Ha)})}}(F),rs(e,F.cb.groupId,J,N,R,Q);return u(ba,
831
+ ts(e),2)}if(!E)return ba.B(0);zt(a);Ft(h,d,k,f);return u(ba,g.updateManifest(c,d),0)})};n=!1;C(z,2);if(!Gt(h)||!n||Ht(h)){z.B(4);break}return u(z,p(b.filter(function(A){return A.h}),!0),5);case 5:return zt(a),b=b.filter(function(A){return!A.h}),t=l,v=m,l={},m=0,u(z,It(g,c,d,t,v,function(){return zt(a)}),6);case 6:zt(a);case 4:if(n){z.B(7);break}return u(z,p(b,!1),8);case 8:return zt(a),y=l,w=m,l={},m=0,u(z,It(g,c,d,y,w,function(){return zt(a)}),9);case 9:zt(a);case 7:va(z,0);break;case 2:return x=
832
+ wa(z),D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw x;}})}function Et(a){var b,c,d,e;return G(function(f){switch(f.g){case 1:return b=new Fs,u(f,b.init(),2);case 2:return u(f,Hs(b),3);case 3:return c=f.h,d=new Ys("manifest",c.path.za,c.path.la,a),u(f,b.destroy(),4);case 4:return e=new tt,u(f,e.remove(d.toString()),0)}})}
833
+ function It(a,b,c,d,e,f){var g,h,k,l,m,p,n,t,v,y,w;return G(function(x){switch(x.g){case 1:g=!1;C(x,2);h=!0;k=r(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=r(m.segments),n=p.next();!n.done;n=p.next())t=n.value,v=t.pendingSegmentRefId?d[t.pendingSegmentRefId]:null,null!=v&&(t.dataKey=v,t.pendingSegmentRefId=void 0),v=t.pendingInitSegmentRefId?d[t.pendingInitSegmentRefId]:null,null!=v&&(t.initSegmentKey=v,t.pendingInitSegmentRefId=void 0),t.pendingSegmentRefId&&(h=!1),t.pendingInitSegmentRefId&&
834
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(x,a.updateManifest(b,c),4);case 4:g=!0;f();va(x,0);break;case 2:return y=wa(x),u(x,Et(b),5);case 5:if(g){x.B(6);break}w=Object.values(d);return u(x,a.removeSegments(w,function(){}),6);case 6:throw y;}})}
835
+ function Bt(a,b){var c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D,z,A,E,F,H,I,J,N,R,Q,ba,M;return G(function(ja){switch(ja.g){case 1:return c={width:Infinity,height:Infinity},Id(a,b.restrictions,c),u(ja,Md(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;wd(a,g,h,e,f);k=r(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Zd(m));p=r(a.textStreams);for(n=p.next();!n.done;n=p.next())t=n.value,
836
+ d.push($d(t));v=r(a.imageStreams);for(y=v.next();!y.done;y=v.next())w=y.value,d.push(ae(w));return u(ja,b.offline.trackSelectionCallback(d),3);case 3:x=ja.h;D=a.presentationTimeline.getDuration();z=0;A=r(x);for(E=A.next();!E.done;E=A.next())F=E.value,H=F.bandwidth*D/8,z+=H;C(ja,4);return u(ja,b.offline.downloadSizeCallback(z),6);case 6:I=ja.h;if(!I)throw new O(2,9,9014);va(ja,5);break;case 4:J=wa(ja);if(J instanceof O)throw J;throw new O(2,9,9015);case 5:N=new Set;R=new Set;Q=new Set;ba=r(x);for(E=
837
+ ba.next();!E.done;E=ba.next())M=E.value,"variant"==M.type&&N.add(M.id),"text"==M.type&&R.add(M.id),"image"==M.type&&Q.add(M.id);a.variants=a.variants.filter(function(Fa){return N.has(Fa.id)});a.textStreams=a.textStreams.filter(function(Fa){return R.has(Fa.id)});a.imageStreams=a.imageStreams.filter(function(Fa){return Q.has(Fa.id)});Jt(a);B(ja)}})}
838
+ function Ct(a,b,c,d,e,f){var g=mt(c,b,d),h=e.offline.progressCallback;qs(f,function(t,v){g.size=v;h(g,t)},function(t,v){k&&e.offline.usePersistentLicense&&l==v&&ug(a,"cenc",t)});var k=Gt(b)&&!Ht(b),l=null;k&&(l=Kt.get(a.g.keySystem));for(var m=new pt,p=r(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=r(b.imageStreams);for(n=p.next();!n.done;n=p.next())rt(m,n.value);n=r(b.variants);for(p=n.next();!p.done;p=n.next())qt(m,p.value);m=Lt(f,m,b,e);f=m.streams;m=m.qe;n=a.g;p=e.offline.usePersistentLicense;
839
+ n&&p&&(n.initData=[]);return{cg:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.jc(),streams:f,sessionIds:p?Dg(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},qe:m}}function Gt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
840
+ function Ht(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function Ft(a,b,c,d){b.expiration=c.jc();c=Dg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Gt(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}q.remove=function(a){return Mt(this,Nt(this,a))};
841
+ function Nt(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:xt();c=Zs(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new Fs;ua(k);return u(k,e.init(),4);case 4:return u(k,Js(e,d.za(),d.la()),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([Ot(a,h,e),Pt(f,d,h)]),2);case 2:return ya(k),u(k,e.destroy(),8);case 8:za(k,0)}})}
842
+ function Qt(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:Yc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Yc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Ot(a,b,c){return G(function(d){return u(d,Rt(a.g,a.h.drm,c,b),0)})}
843
+ function Pt(a,b,c){function d(){}var e=St(c);ot(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.rg=function(){return Mt(this,Tt(this))};
844
+ function Tt(a){var b,c,d,e,f,g,h,k,l,m;return G(function(p){switch(p.g){case 1:return xt(),b=a.g,c=a.h.drm,d=new Fs,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],Ks(d,function(n){return f.push(n)}),g=r(f),h=g.next();case 5:if(h.done){p.B(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,jt(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.B(5);break;case 2:return ya(p),u(p,d.destroy(),11);case 11:za(p,3);break;case 3:return p.return(!e)}})}
845
+ q.list=function(){return Mt(this,Ut())};function Ut(){var a,b,c;return G(function(d){switch(d.g){case 1:return xt(),a=[],b=new Fs,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Is(b,function(e,f){c=c.then(function(){var g;return G(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=ot(new Ys("manifest",e.za,e.la,l),k);a.push(k)});B(h)})})}),u(d,c,2);case 2:return ya(d),u(d,b.destroy(),6);case 6:za(d,3);break;case 3:return d.return(a)}})}
846
+ function yt(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){}},
847
+ c.configure(d.manifest),zt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,zt(a),k=Vt(h),u(l,Promise.all(qf(k,function(m){return m.createSegmentIndex()})),3);zt(a);if(e)throw e;return l.return(h)})}
848
+ function At(a,b,c,d){var e;return G(function(f){switch(f.g){case 1:return e=new eg({lb:a.g,onError:c,dd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,jg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,xg(e),3);case 3:return u(f,wg(e),4);case 4:return f.return(e)}})}
849
+ function Lt(a,b,c,d){var e=new Map,f=Vt(c),g=new Map;f=r(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Wt(a,b,c,h,d,e);g.set(h.id,k)}a=r(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),qe:Array.from(e.values())}}
850
+ function Wt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
851
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Xt(d,c.presentationTimeline.Oa(),function(l){var m=ks(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=st(b,d.id)*n;n=ns(a.g,n);f.set(m,new js(l,n,k,!1))}l.h&&(p=ks(l.h),f.has(p)||(n=.5*st(b,d.id),n=ns(a.g,n),f.set(p,new js(l.h,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
852
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Xt(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 zt(a){if(a.l.g)throw new O(2,9,7001);}function xt(){if(!ut())throw new O(2,9,9E3);}function Mt(a,b){return G(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c.return(c.h);ya(c);gb(a.i,b);return za(c,0)})}
853
+ function wt(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){gb(a.i,c)})}function St(a){var b=new Set;a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
854
+ function Rt(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=Ls(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Qt(d,!1),videoCapabilities:Qt(d,!0)}});return u(h,jt(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)})}
855
+ function Vt(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}
856
+ function Jt(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",tt);tt.deleteAll=function(){var a;return G(function(b){return 1==b.g?(a=new Fs,ua(b),u(b,Ms(a),2)):5!=b.g?(ya(b),u(b,a.destroy(),5)):za(b,0)})};tt.prototype.list=tt.prototype.list;
857
+ tt.prototype.removeEmeSessions=tt.prototype.rg;tt.prototype.remove=tt.prototype.remove;tt.prototype.store=tt.prototype.store;tt.prototype.getNetworkingEngine=tt.prototype.kc;tt.prototype.getConfiguration=tt.prototype.getConfiguration;tt.prototype.configure=tt.prototype.configure;tt.prototype.destroy=tt.prototype.destroy;tt.support=ut;
858
+ var Kt=(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");
859
+ pn.offline=ut;function Yt(){}function Zt(a,b){a={priority:b||0,nf:a};for(b=0;b<$t.length;b++)if($t[b].priority<a.priority){$t.splice(b,0,a);return}$t.push(a)}K("shaka.polyfill",Yt);Yt.register=Zt;Yt.installAll=function(){for(var a=r($t),b=a.next();!b.done;b=a.next()){b=b.value;try{b.nf()}catch(c){Xa("Error installing polyfill!",c)}}};var $t=[];function au(){this.g=new bu}function cu(){window.AbortController||(window.AbortController=au,window.AbortSignal=bu)}au.prototype.abort=function(a){var b=this.g;if(!b.h){b.h=!0;b.g=a;void 0===b.g&&(b.g=new DOMException("signal is aborted without reason","AbortError"));a=new S("abort");if(b.onabort)b.onabort(a);b.dispatchEvent(a)}};ea.Object.defineProperties(au.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Yt.AbortController=au;au.install=cu;
860
+ function bu(){Te.call(this);this.h=!1;this.g=void 0;this.onabort=null}qa(bu,Te);ea.Object.defineProperties(bu.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}});Zt(cu);function du(){}function eu(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=r(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())fu(b.value)}function fu(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}Yt.Aria=du;du.install=eu;Zt(eu);function gu(){}function hu(){iu()}Yt.EncryptionScheme=gu;gu.install=hu;Zt(hu,-2);function ju(){}
861
+ function ku(){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}}),
862
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",lu);document.addEventListener("webkitfullscreenerror",lu);document.addEventListener("mozfullscreenchange",lu);document.addEventListener("mozfullscreenerror",lu);document.addEventListener("MSFullscreenChange",lu);document.addEventListener("MSFullscreenError",lu)}}
863
+ function lu(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)}Yt.Fullscreen=ju;ju.install=ku;Zt(ku);function mu(){}function nu(){var a=!0;if(vc()||sc("PlayStation 5")||wc()||sc("Web0S")||tc()||sc("CrKey")||sc("PC=EOS")||sc("Hisense")||sc("VIDAA"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),ou=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=pu)}
864
+ function pu(a){var b,c,d,e,f,g,h,k,l,m,p,n,t,v,y,w,x,D;return G(function(z){switch(z.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return z.return(b);c=a.video;d=a.audio;if("media-source"==a.type){if(!nc())return z.return(b);if(c){if(sc("CrKey"))if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var A=c.contentType;c.width&&c.height&&(A+="; width="+c.width+"; height="+c.height);c.framerate&&(A+="; framerate="+c.framerate);"pq"===
865
+ c.transferFunction&&(A+="; eotf=smpte2084");e=cast.__platform__.canDisplayType(A)}else e=db(c.contentType);else tc()?(f=c.contentType,c.width&&c.height&&(f+="; width="+c.width,f+="; height="+c.height),c.framerate&&(f+="; framerate="+c.framerate),c.bitrate&&(f+="; bitrate="+c.bitrate),e=db(f)):e=db(c.contentType);if(!e)return z.return(b)}if(d&&(g=d.contentType,h=db(g),!h))return z.return(b)}else if("file"==a.type){if(c&&(k=c.contentType,l=oc(k),!l)||d&&(m=d.contentType,p=oc(m),!p))return z.return(b)}else return z.return(b);
866
+ if(!a.keySystemConfiguration)return b.supported=!0,z.return(Promise.resolve(b));n=a.keySystemConfiguration;t=[];v=[];n.audio&&(y={robustness:n.audio.robustness||"",contentType:a.audio.contentType},t.push(y));n.video&&(w={robustness:n.video.robustness||"",contentType:a.video.contentType},v.push(w));x={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes};t.length&&(x.audioCapabilities=t);v.length&&(x.videoCapabilities=
867
+ v);C(z,3);return u(z,navigator.requestMediaKeySystemAccess(n.keySystem,[x]),5);case 5:D=z.h;va(z,4);break;case 3:wa(z);case 4:D&&(b.supported=!0,b.keySystemAccess=D);case 2:return z.return(b)}})}Yt.MediaCapabilities=mu;mu.install=nu;var ou=null;mu.originalMcap=ou;Zt(nu,-1);function qu(){}function ru(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?su():a?12>=a?(tu(),uu()):15>=a&&tu():qc()?vu():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&wu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&xu()}
868
+ function tu(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function uu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function vu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"!=b.split(";")[0].split("/")[1]&&a(b)}}
869
+ function wu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=ad(b)[0]&&a(b)}}function su(){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)}}
870
+ function xu(){var a=MediaSource.isTypeSupported;sc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}Yt.MediaSource=qu;qu.install=ru;Zt(ru);function yu(){}function zu(){screen.orientation||void 0!=window.orientation&&Au()}function Au(){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 Bu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}Yt.Orientation=yu;
871
+ yu.install=zu;function Bu(){Te.call(this);this.type="";this.angle=0}qa(Bu,Te);
872
+ Bu.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)};
873
+ Bu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Zt(zu);function Cu(){}var Du,Eu,Fu,Gu,Hu,Iu;function Ju(a,b){try{var c=new Ku(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Lu(a){var b=this.mediaKeys;b&&b!=a&&Mu(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Mu(a,this):Promise.resolve()}
874
+ function Nu(a){a=L(a.initData);if(Jb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Fc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Hb(a);this.dispatchEvent(b)}Yt.PatchedMediaKeysApple=Cu;
875
+ Cu.uninstall=function(){Du&&(Du=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Eu),HTMLMediaElement.prototype.setMediaKeys=Fu,window.MediaKeys=Gu,window.MediaKeySystemAccess=Hu,navigator.requestMediaKeySystemAccess=Iu,Eu=Iu=Fu=Hu=Gu=null,window.shakaMediaKeysPolyfill=!1)};
876
+ Cu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)Du=!0,Eu=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Fu=HTMLMediaElement.prototype.setMediaKeys,Gu=window.MediaKeys,Hu=window.MediaKeySystemAccess,Iu=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Lu;window.MediaKeys=Ou;window.MediaKeySystemAccess=Ku;navigator.requestMediaKeySystemAccess=
877
+ Ju;window.shakaMediaKeysPolyfill=!0}};
878
+ function Ku(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=r(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=r(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
872
879
  g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=r(c.videoCapabilities),g=c.next();!g.done;g=c.next())f=g.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
873
- Mu.prototype.createMediaKeys=function(){var a=new Qu(this.keySystem);return Promise.resolve(a)};Mu.prototype.getConfiguration=function(){return this.g};function Qu(a){this.h=new WebKitMediaKeys(a);this.g=new mf}Qu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Ru(this.h,a)};Qu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
874
- function Ou(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",Pu);try{return tj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Ru(a){Ue.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new mf;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new Su}oa(Ru,Ue);q=Ru.prototype;
875
- q.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",M(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Eb()?"license-request":"license-renewal").set("message",Ib(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(Tu(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
876
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Tu(c,"output-not-allowed");break;default:Tu(c,"internal-error")}});Tu(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
877
- q.update=function(a){this.g=new lc;try{this.i.update(M(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Tu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
878
- function Su(){this.size=0;this.g=void 0}q=Su.prototype;q.Eb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Qg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Qg.value();return this.g&&Gb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function Uu(){}function Vu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Wu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xu,window.MediaKeys=Yu,window.MediaKeySystemAccess=Zu,window.shakaMediaKeysPolyfill=!0)}function Wu(){return Promise.reject(Error("The key system specified is not supported."))}
879
- function Xu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}$t.PatchedMediaKeysNop=Uu;Uu.install=Vu;function Yu(){throw new TypeError("Illegal constructor.");}Yu.prototype.createSession=function(){};Yu.prototype.setServerCertificate=function(){};function Zu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Zu.prototype.getConfiguration=function(){};Zu.prototype.createMediaKeys=function(){};au(Vu,-10);function $u(){}
880
- function av(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)bv="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=cv;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=dv;window.MediaKeys=ev;window.MediaKeySystemAccess=fv;window.shakaMediaKeysPolyfill=!0}}
881
- function gv(a){var b=bv;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function cv(a,b){try{var c=new fv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function dv(a){var b=this.mediaKeys;b&&b!=a&&hv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&hv(a,this);return Promise.resolve()}$t.PatchedMediaKeysWebkit=$u;$u.install=av;
882
- function fv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
880
+ Ku.prototype.createMediaKeys=function(){var a=new Ou(this.keySystem);return Promise.resolve(a)};Ku.prototype.getConfiguration=function(){return this.g};function Ou(a){this.h=new WebKitMediaKeys(a);this.g=new lf}Ou.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Pu(this.h,a)};Ou.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
881
+ function Mu(a,b){a.g.ob();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",Nu);try{return rj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Pu(a){Te.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new lf;this.sessionId="";this.expiration=NaN;this.closed=new kc;this.keyStatuses=new Qu}qa(Pu,Te);q=Pu.prototype;
882
+ q.generateRequest=function(a,b){var c=this;this.h=new kc;try{var d=this.l.createSession("video/mp4",L(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Fb()?"license-request":"license-renewal").set("message",Hb(e.message));e=new S("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(Ru(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
883
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ru(c,"output-not-allowed");break;default:Ru(c,"internal-error")}});Ru(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
884
+ q.update=function(a){this.g=new kc;try{this.i.update(L(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ob()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Ru(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}
885
+ function Qu(){this.size=0;this.g=void 0}q=Qu.prototype;q.Fb=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Pg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Pg.value();return this.g&&Fb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};function Su(){}function Tu(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Uu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Vu,window.MediaKeys=Wu,window.MediaKeySystemAccess=Xu,window.shakaMediaKeysPolyfill=!0)}function Uu(){return Promise.reject(Error("The key system specified is not supported."))}
886
+ function Vu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}Yt.PatchedMediaKeysNop=Su;Su.install=Tu;function Wu(){throw new TypeError("Illegal constructor.");}Wu.prototype.createSession=function(){};Wu.prototype.setServerCertificate=function(){};function Xu(){this.keySystem="";throw new TypeError("Illegal constructor.");}Xu.prototype.getConfiguration=function(){};Xu.prototype.createMediaKeys=function(){};Zt(Tu,-10);function Yu(){}
887
+ function Zu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)$u="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=av;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=bv;window.MediaKeys=cv;window.MediaKeySystemAccess=dv;window.shakaMediaKeysPolyfill=!0}}
888
+ function ev(a){var b=$u;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function av(a,b){try{var c=new dv(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function bv(a){var b=this.mediaKeys;b&&b!=a&&fv(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&fv(a,this);return Promise.resolve()}Yt.PatchedMediaKeysWebkit=Yu;Yu.install=Zu;
889
+ function dv(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=r(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),
883
890
  l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=r(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
884
- d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}fv.prototype.createMediaKeys=function(){var a=new ev(this.g);return Promise.resolve(a)};fv.prototype.getConfiguration=function(){return this.h};function ev(a){this.l=a;this.h=null;this.g=new mf;this.i=[];this.j=new Map}
885
- function hv(a,b){a.h=b;a.g.nb();var c=bv;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ib(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=iv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Eb()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=iv(a,d.sessionId))jv(d,"usable"),
886
- d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=iv(a,d.sessionId);e&&e.handleError(d)}))}ev.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new kv(b,this.l,a);this.i.push(a);return a};ev.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
887
- function iv(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 kv(a,b,c){Ue.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new lv}oa(kv,Ue);q=kv.prototype;
888
- 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?jv(this,"output-restricted"):1==b?jv(this,"expired"):jv(this,"internal-error"))};
889
- function mv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=M(Gc("LOAD_SESSION|"+c));else{var e=Gc("PERSISTENT|");d=Oc(e,b)}else d=M(b)}catch(g){return Promise.reject(g)}a.h=new lc;var f=gv("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}})).N(.01)}return a.h}
890
- function nv(a,b,c){if(a.g)a.g.then(function(){return nv(a,b,c)}).catch(function(){return nv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Cc(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=Lc(e.keys[0].k);e=Lc(e.keys[0].kid)}else d=M(c),e=null;var f=gv("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
891
- function jv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return mv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?mv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new lc;nv(this,b,a);return b};
892
- 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=gv("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 lv(){this.size=0;this.g=void 0}q=lv.prototype;q.Eb=function(){return this.g};
893
- q.forEach=function(a){this.g&&a(this.g,Qg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Qg.value();return this.g&&Gb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var bv="";au(av);function ov(){}function pv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=qv,Object.defineProperty(a,"disablePictureInPicture",{get:rv,set:sv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=tv,document.addEventListener("webkitpresentationmodechanged",uv,!0))}}
894
- function uv(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)}
895
- function qv(){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 tv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
896
- function rv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function sv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}$t.PiPWebkit=ov;ov.install=pv;au(pv);function vv(){}function wv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=xv))}function xv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}$t.RandomUUID=vv;vv.install=wv;au(wv);function yv(){}function zv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Av)}function Av(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}$t.StorageEstimate=yv;yv.install=zv;au(zv);function Bv(){}function Cv(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Dv})}function Dv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}$t.Symbol=Bv;Bv.install=Cv;au(Cv);function Ev(){}function Fv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}$t.VideoPlayPromise=Ev;Ev.install=Fv;au(Fv);function Gv(){}function Hv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||vc())&&(a.getVideoPlaybackQuality=Iv)}}function Iv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}$t.VideoPlaybackQuality=Gv;Gv.install=Hv;au(Hv);function Jv(){}function Kv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Lv;else if(6==b)a=Mv;else{try{var c=!!Lv(1,2,"")}catch(d){c=!1}c&&(a=Lv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Lv(a,b,c){return new window.TextTrackCue(a,b,c)}function Mv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}$t.VTTCue=Jv;Jv.install=Kv;au(Kv);function Nv(){}Nv.prototype.parseInit=function(){};Nv.prototype.setSequenceMode=function(){};Nv.prototype.parseMedia=function(a,b){var c=null,d=[];a=Cc(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=Ov.exec(e))){var f=Pv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new kb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};K("shaka.text.LrcTextParser",Nv);Nv.prototype.parseMedia=Nv.prototype.parseMedia;
897
- Nv.prototype.setSequenceMode=Nv.prototype.setSequenceMode;Nv.prototype.parseInit=Nv.prototype.parseInit;var Ov=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Pv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;fd["application/x-subtitle-lrc"]=function(){return new Nv};function Qv(){}Qv.prototype.parseInit=function(){};Qv.prototype.setSequenceMode=function(){};
898
- Qv.prototype.parseMedia=function(a,b){var c=Cc(a);a=[];if(""==c)return a;var d=cg(c,"tt");if(!d)throw new O(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Rf(d,Rv,"frameRate"),f=Rf(d,Rv,"subFrameRate"),g=Rf(d,Rv,"frameRateMultiplier"),h=Rf(d,Rv,"tickRate"),k=Rf(d,Rv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Rf(d,Sv,"extent");if("default"!=l&&"preserve"!=l)throw new O(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new Tv(e,f,
899
- g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Pf(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var n=r(d),p=n.next();!p.done;p=n.next()){var t=p.value;p=new mb;var v=t.getAttribute("xml:id");if(v){p.id=v;var y=null;m&&(y=Uv.exec(m)||Vv.exec(m));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,x;if(w=Wv(t,g,"extent"))w=(x=Uv.exec(w))||Vv.exec(w),
900
- null!=w&&(p.width=Number(w[1]),p.height=Number(w[2]),x||(null!=v&&(p.width=100*p.width/v),null!=y&&(p.height=100*p.height/y)),p.widthUnits=x||null!=v?Db:0,p.heightUnits=x||null!=y?Db:0);if(t=Wv(t,g,"origin"))w=(x=Uv.exec(t))||Vv.exec(t),null!=w&&(p.viewportAnchorX=Number(w[1]),p.viewportAnchorY=Number(w[2]),x||(null!=y&&(p.viewportAnchorY=100*p.viewportAnchorY/y),null!=v&&(p.viewportAnchorX=100*p.viewportAnchorX/v)),p.viewportAnchorUnits=x||null!=v?Db:0)}else p=null;p&&h.push(p)}if(Mf(c,"p").length)throw new O(2,
901
- 2,2001,"<p> can only be inside <div> in TTML");m=r(Mf(c,"div"));for(n=m.next();!n.done;n=m.next())if(Mf(n.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Xv(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
902
- function Xv(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(Yv),y=v.next();!y.done&&!(t=Zv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
903
- a=[];if(!y)for(var w=r(p.childNodes),x=w.next();!x.done;x=w.next())(x=Xv(x.value,b,c,d,e,f,g,h,k,p,m))&&a.push(x);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;x=$v(p,c);w=x.start;for(x=x.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)x=aw(n,c,w,x),w=x.start,x=x.end,n=n.parentNode;null==w&&(w=0);w+=b.periodStart;x=null==x?Infinity:x+b.periodStart;w=Math.max(w,b.segmentStart);
904
- x=Math.min(x,b.segmentEnd);if(!C&&0<a.length)for(w=Infinity,x=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==p.tagName)return e=new kb(w,x,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new kb(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Zv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==
905
- z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&(g=Zv(l,"region",f,"")[0]);bw(b,p,g,t,e,v,0==a.length);return b}
906
- function bw(a,b,c,d,e,f,g){f=f||g;"rtl"==cw(b,c,e,"direction",f)&&(a.direction="rtl");g=cw(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=lb);(g=cw(b,c,e,"textAlign",!0))?(a.positionAlign=dw[g],a.lineAlign=ew[g],a.textAlign=xb[g.toUpperCase()]):a.textAlign=ob;if(g=cw(b,c,e,"displayAlign",!0))a.displayAlign=yb[g.toUpperCase()];if(g=cw(b,c,e,"color",f))a.color=g;if(g=cw(b,c,e,"backgroundColor",
907
- f))a.backgroundColor=g;if(g=cw(b,c,e,"border",f))a.border=g;if(g=cw(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=cw(b,c,e,"fontWeight",f))&&
908
- "bold"==g&&(a.fontWeight=700);g=cw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=cw(b,c,e,"lineHeight",f))&&g.match(fw)&&(a.lineHeight=g);(g=cw(b,c,e,"fontSize",f))&&(g.match(fw)||g.match(gw))&&(a.fontSize=g);if(g=cw(b,c,e,"fontStyle",f))a.fontStyle=Cb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=cw(b,c,e,"textOutline",
909
- f))d=d.split(" "),d[0].match(fw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(fw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=cw(b,c,e,"letterSpacing",f))&&d.match(fw)&&(a.letterSpacing=d);(d=cw(b,c,e,"linePadding",f))&&d.match(fw)&&(a.linePadding=d);if(f=cw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Wv(c,e,"textDecoration"))&&hw(a,c);(b=iw(b,e,"textDecoration"))&&hw(a,b)}
910
- function hw(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&hb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&hb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
911
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&hb(a.textDecoration,"overline")}}function cw(a,b,c,d,e){e=void 0===e?!0:e;return(a=iw(a,c,d))?a:e?Wv(b,c,d):null}function Wv(a,b,c){if(!a)return null;var d=Rf(a,Sv,c);return d?d:jw(a,b,c)}function iw(a,b,c){var d=Rf(a,Sv,c);return d?d:jw(a,b,c)}
912
- function jw(a,b,c){a=Zv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Qf(a[e],"urn:ebu:tt:style",c);f||(f=Rf(a[e],Sv,c));f||(f=iw(a[e],b,c));f&&(d=f)}return d}
913
- function Zv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Qf(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 aw(a,b,c,d){a=$v(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}}
914
- function $v(a,b){var c=kw(a.getAttribute("begin"),b),d=kw(a.getAttribute("end"),b);a=kw(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
915
- function kw(a,b){var c=null;if(lw.test(a)){a=lw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(mw.test(a))c=nw(mw,a);else if(ow.test(a))c=nw(ow,a);else if(pw.test(a))a=pw.exec(a),c=Number(a[1])/b.frameRate;else if(qw.test(a))a=qw.exec(a),c=Number(a[1])/b.g;else if(rw.test(a))c=nw(rw,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
916
- function nw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}K("shaka.text.TtmlTextParser",Qv);Qv.prototype.parseMedia=Qv.prototype.parseMedia;Qv.prototype.setSequenceMode=Qv.prototype.setSequenceMode;Qv.prototype.parseInit=Qv.prototype.parseInit;
917
- function Tv(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]))}
918
- var Uv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,gw=/^(\d{1,2}(?:\.\d+)?|100)%$/,fw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Vv=/^(\d+)px (\d+)px$/,lw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ow=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,pw=/^(\d*(?:\.\d*)?)f$/,qw=/^(\d*(?:\.\d*)?)t$/,rw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),ew={left:sb,center:"center",right:"end",start:sb,
919
- end:"end"},dw={left:"line-left",center:"center",right:"line-right"},Rv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Sv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Yv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];fd["application/ttml+xml"]=function(){return new Qv};function sw(){this.g=new Qv}sw.prototype.parseInit=function(a){var b=!1;(new zf).box("moov",Ef).box("trak",Ef).box("mdia",Ef).box("minf",Ef).box("stbl",Ef).P("stsd",Gf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};sw.prototype.setSequenceMode=function(){};sw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new zf).box("mdat",If(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};
920
- K("shaka.text.Mp4TtmlParser",sw);sw.prototype.parseMedia=sw.prototype.parseMedia;sw.prototype.setSequenceMode=sw.prototype.setSequenceMode;sw.prototype.parseInit=sw.prototype.parseInit;fd['application/mp4; codecs="stpp"']=function(){return new sw};fd['application/mp4; codecs="stpp.ttml"']=function(){return new sw};fd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new sw};fd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new sw};function tw(){this.g=!1}tw.prototype.parseInit=function(){};tw.prototype.setSequenceMode=function(a){this.g=a};
921
- tw.prototype.parseMedia=function(a,b){a=Cc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new O(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=uw(new Mq(d[1]));if(null==a)throw new O(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
922
- e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Mq(d);var f=new mb;Pq(d);Nq(d);for(var g=Pq(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
923
- (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Nq(d);g=Pq(d)}b.push(f)}e=new Map;vw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
924
- (g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new kb(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var t=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(700<=parseInt(t,10)||"bold"==
925
- t)m=!0,l.fontWeight=700;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=vb;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine="noWrap"!=t}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
926
- g=new Mq(f[0]);k=uw(g);n=Oq(g,/[ \t]+--\x3e[ \t]+/g);l=uw(g);if(null==k||null==n||null==l)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new kb(k,l,"");ww(m,f,e);Nq(g);for(k=Pq(g);k;)xw(f,k,b),Nq(g),k=Pq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
927
- function vw(a){for(var b=r(Object.entries(Ab)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new kb(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(Bb));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new kb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
928
- function ww(a,b,c){0===c.size&&vw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
929
- a.substr(f,e-f),f.match(yw)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
930
- ">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=cg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=zw(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())Aw(e.value,b,d,c);b.nestedCues=d}else b.payload=zw(a)}
931
- function Bw(a,b){return a&&0<a.length?a:b}
932
- function Aw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=Bw(h.backgroundColor,e.backgroundColor),e.color=Bw(h.color,e.color),e.fontFamily=Bw(h.fontFamily,e.fontFamily),e.fontSize=Bw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
933
- h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=uw(new Mq(g)))e.startTime=g}}if(Tf(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=zw(a),c.push(f)),f=!1;else for(b=
934
- r(a.childNodes),a=b.next();!a.done;a=b.next())Aw(a.value,e,c,d)}
935
- function xw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=ob:a.textAlign=xb[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"==
936
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Cw(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=zb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=rb,a.line=Number(c[1]),c[2]&&(a.lineAlign=zb[c[2].toUpperCase()])}function Cw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
937
- function uw(a){a=Oq(a,yw);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function zw(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}K("shaka.text.VttTextParser",tw);tw.prototype.parseMedia=tw.prototype.parseMedia;
938
- tw.prototype.setSequenceMode=tw.prototype.setSequenceMode;tw.prototype.parseInit=tw.prototype.parseInit;var yw=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;fd["text/vtt"]=function(){return new tw};fd['text/vtt; codecs="vtt"']=function(){return new tw};fd['text/vtt; codecs="wvtt"']=function(){return new tw};function Dw(){this.g=null}Dw.prototype.parseInit=function(a){var b=this,c=!1;(new zf).box("moov",Ef).box("trak",Ef).box("mdia",Ef).P("mdhd",function(d){d=fi(d.reader,d.version);b.g=d.timescale}).box("minf",Ef).box("stbl",Ef).P("stsd",Gf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};Dw.prototype.setSequenceMode=function(){};
939
- Dw.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 zf).box("moof",Ef).box("traf",Ef).P("tfdt",function(z){g=!0;c=ei(z.reader,z.version).we}).P("tfhd",function(z){l=di(z.reader,z.flags).Ce}).P("trun",function(z){h=!0;d=gi(z.reader,z.version,z.flags).Re}).box("mdat",If(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);a=c;for(var m=new wf(e,0),n=r(d),p=n.next();!p.done;p=n.next()){p=p.value;var t=p.ee||l,v=p.ed?
940
- c+p.ed:a;a=v+(t||0);var y=0;do{var w=m.K();y+=w;var x=m.K(),C=null;"vttc"==Df(x)?8<w&&(C=m.Za(w-8)):m.skip(w-8);t&&C&&(w=Ew(C,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&y<p.sampleSize)}return f.filter(dc)};function Ew(a,b,c){var d,e,f;(new zf).box("payl",If(function(g){d=Cc(g)})).box("iden",If(function(g){e=Cc(g)})).box("sttg",If(function(g){f=Cc(g)})).parse(a);return d?Fw(d,e,f,b,c):null}
941
- function Fw(a,b,c,d,e){d=new kb(d,e,"");ww(a,d,new Map);b&&(d.id=b);if(c)for(a=new Mq(c),b=Pq(a);b;)xw(d,b,[]),Nq(a),b=Pq(a);return d}K("shaka.text.Mp4VttParser",Dw);Dw.prototype.parseMedia=Dw.prototype.parseMedia;Dw.prototype.setSequenceMode=Dw.prototype.setSequenceMode;Dw.prototype.parseInit=Dw.prototype.parseInit;fd['application/mp4; codecs="wvtt"']=function(){return new Dw};function Gw(){}Gw.prototype.parseInit=function(){};Gw.prototype.setSequenceMode=function(){};Gw.prototype.parseMedia=function(a){var b=Cc(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 Mq(c[0]),e=Hw(d),f=Oq(d,/,/g);d=Hw(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 kb(e,d,c.slice(1).join("\n").trim()))}return a};
942
- function Hw(a){a=Oq(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",Gw);Gw.prototype.parseMedia=Gw.prototype.parseMedia;Gw.prototype.setSequenceMode=Gw.prototype.setSequenceMode;Gw.prototype.parseInit=Gw.prototype.parseInit;fd["text/x-subviewer"]=function(){return new Gw};function Iw(){this.g=new tw}Iw.prototype.parseInit=function(){};Iw.prototype.setSequenceMode=function(){};Iw.prototype.parseMedia=function(a,b){a=Cc(a);a=Jw(a);a=M(Gc(a));return this.g.parseMedia(a,b)};function Jw(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",Iw);
943
- Iw.srt2webvtt=Jw;Iw.prototype.parseMedia=Iw.prototype.parseMedia;Iw.prototype.setSequenceMode=Iw.prototype.setSequenceMode;Iw.prototype.parseInit=Iw.prototype.parseInit;fd["text/srt"]=function(){return new Iw};function Kw(){}Kw.prototype.parseInit=function(){};Kw.prototype.setSequenceMode=function(){};
944
- Kw.prototype.parseMedia=function(a){var b="",c="";a=Cc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Lw.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=Mw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Nw);else if("Style"==e){e=f.split(Nw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
945
- [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={vd:e.vd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Mw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Nw);else if("Dialogue"==f){g=g.split(Nw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Ow(f.Start);var k=Ow(f.End);g=new kb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.vd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.vd}}(e)))&&Pw(g,f);d.push(g)}return d};
946
- function Pw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Qw(c))a.color=c;if(c=b.BackColour)if(c=Qw(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=tb;a.textAlign="start";break;case 2:a.displayAlign=tb;a.textAlign=ob;break;case 3:a.displayAlign=tb;a.textAlign="end";
947
- break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=ob;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=ob;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
948
- function Qw(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 Ow(a){a=Rw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}K("shaka.text.SsaTextParser",Kw);Kw.prototype.parseMedia=Kw.prototype.parseMedia;Kw.prototype.setSequenceMode=Kw.prototype.setSequenceMode;Kw.prototype.parseInit=Kw.prototype.parseInit;
949
- var Lw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Mw=/^\s*([^:]+):\s*(.*)/,Nw=/\s*,\s*/,Rw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;fd["text/x-ssa"]=function(){return new Kw};/*
891
+ d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}dv.prototype.createMediaKeys=function(){var a=new cv(this.g);return Promise.resolve(a)};dv.prototype.getConfiguration=function(){return this.h};function cv(a){this.l=a;this.h=null;this.g=new lf;this.i=[];this.j=new Map}
892
+ function fv(a,b){a.h=b;a.g.ob();var c=$u;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Hb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=gv(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Fb()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=gv(a,d.sessionId))hv(d,"usable"),
893
+ d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=gv(a,d.sessionId);e&&e.handleError(d)}))}cv.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new iv(b,this.l,a);this.i.push(a);return a};cv.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
894
+ function gv(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 iv(a,b,c){Te.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new kc;this.keyStatuses=new jv}qa(iv,Te);q=iv.prototype;
895
+ 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?hv(this,"output-restricted"):1==b?hv(this,"expired"):hv(this,"internal-error"))};
896
+ function kv(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=L(Fc("LOAD_SESSION|"+c));else{var e=Fc("PERSISTENT|");d=Nc(e,b)}else d=L(b)}catch(g){return Promise.reject(g)}a.h=new kc;var f=ev("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}})).O(.01)}return a.h}
897
+ function lv(a,b,c){if(a.g)a.g.then(function(){return lv(a,b,c)}).catch(function(){return lv(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Kc(e.keys[0].k);e=Kc(e.keys[0].kid)}else d=L(c),e=null;var f=ev("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
898
+ function hv(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new S("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return kv(this,b,null)};q.load=function(a){return"persistent-license"==this.l?kv(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new kc;lv(this,b,a);return b};
899
+ 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=ev("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 jv(){this.size=0;this.g=void 0}q=jv.prototype;q.Fb=function(){return this.g};
900
+ q.forEach=function(a){this.g&&a(this.g,Pg.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Pg.value();return this.g&&Fb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var $u="";Zt(Zu);function mv(){}function nv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=ov,Object.defineProperty(a,"disablePictureInPicture",{get:pv,set:qv,enumerable:!0,configurable:!0}),document.exitPictureInPicture=rv,document.addEventListener("webkitpresentationmodechanged",sv,!0))}}
901
+ function sv(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)}
902
+ function ov(){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 rv(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
903
+ function pv(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function qv(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}Yt.PiPWebkit=mv;mv.install=nv;Zt(nv);function tv(){}function uv(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=vv))}function vv(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}Yt.RandomUUID=tv;tv.install=uv;Zt(uv);function wv(){}function xv(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=yv)}function yv(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Yt.StorageEstimate=wv;wv.install=xv;Zt(xv);function zv(){}function Av(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Bv})}function Bv(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}Yt.Symbol=zv;zv.install=Av;Zt(Av);function Cv(){}function Dv(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}Yt.VideoPlayPromise=Cv;Cv.install=Dv;Zt(Dv);function Ev(){}function Fv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||uc())&&(a.getVideoPlaybackQuality=Gv)}}function Gv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Yt.VideoPlaybackQuality=Ev;Ev.install=Fv;Zt(Fv);function Hv(){}function Iv(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Jv;else if(6==b)a=Kv;else{try{var c=!!Jv(1,2,"")}catch(d){c=!1}c&&(a=Jv)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Jv(a,b,c){return new window.TextTrackCue(a,b,c)}function Kv(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Yt.VTTCue=Hv;Hv.install=Iv;Zt(Iv);function Lv(){}Lv.prototype.parseInit=function(){};Lv.prototype.setSequenceMode=function(){};Lv.prototype.parseMedia=function(a,b){var c=null,d=[];a=Bc(a).split(/\r?\n/);a=r(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=Mv.exec(e))){var f=Nv.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new jb(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};K("shaka.text.LrcTextParser",Lv);Lv.prototype.parseMedia=Lv.prototype.parseMedia;
904
+ Lv.prototype.setSequenceMode=Lv.prototype.setSequenceMode;Lv.prototype.parseInit=Lv.prototype.parseInit;var Mv=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Nv=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ed["application/x-subtitle-lrc"]=function(){return new Lv};function Ov(){}Ov.prototype.parseInit=function(){};Ov.prototype.setSequenceMode=function(){};
905
+ Ov.prototype.parseMedia=function(a,b){var c=Bc(a);a=[];if(""==c)return a;var d=bg(c,"tt");if(!d)throw new O(2,2,2005,"Failed to parse TTML.");c=d.getElementsByTagName("body")[0];if(!c)return[];var e=Qf(d,Pv,"frameRate"),f=Qf(d,Pv,"subFrameRate"),g=Qf(d,Pv,"frameRateMultiplier"),h=Qf(d,Pv,"tickRate"),k=Qf(d,Pv,"cellResolution"),l=d.getAttribute("xml:space")||"default",m=Qf(d,Qv,"extent");if("default"!=l&&"preserve"!=l)throw new O(2,2,2005,"Invalid xml:space value: "+l);l="default"==l;e=new Rv(e,f,
906
+ g,h);k=k?(k=/^(\d+) (\d+)$/.exec(k))?{columns:parseInt(k[1],10),rows:parseInt(k[2],10)}:null:null;f=(f=d.getElementsByTagName("metadata")[0])?Of(f):[];g=Array.from(d.getElementsByTagName("style"));d=Array.from(d.getElementsByTagName("region"));h=[];for(var p=r(d),n=p.next();!n.done;n=p.next()){var t=n.value;n=new lb;var v=t.getAttribute("xml:id");if(v){n.id=v;var y=null;m&&(y=Sv.exec(m)||Tv.exec(m));v=y?Number(y[1]):null;y=y?Number(y[2]):null;var w,x;if(w=Uv(t,g,"extent"))w=(x=Sv.exec(w))||Tv.exec(w),
907
+ null!=w&&(n.width=Number(w[1]),n.height=Number(w[2]),x||(null!=v&&(n.width=100*n.width/v),null!=y&&(n.height=100*n.height/y)),n.widthUnits=x||null!=v?Cb:0,n.heightUnits=x||null!=y?Cb:0);if(t=Uv(t,g,"origin"))w=(x=Sv.exec(t))||Tv.exec(t),null!=w&&(n.viewportAnchorX=Number(w[1]),n.viewportAnchorY=Number(w[2]),x||(null!=y&&(n.viewportAnchorY=100*n.viewportAnchorY/y),null!=v&&(n.viewportAnchorX=100*n.viewportAnchorX/v)),n.viewportAnchorUnits=x||null!=v?Cb:0)}else n=null;n&&h.push(n)}if(Lf(c,"p").length)throw new O(2,
908
+ 2,2001,"<p> can only be inside <div> in TTML");m=r(Lf(c,"div"));for(p=m.next();!p.done;p=m.next())if(Lf(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(b=Vv(c,b,e,f,g,d,h,l,k,null,!1))b.backgroundColor||(b.backgroundColor="transparent"),a.push(b);return a};
909
+ function Vv(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var t=null,v=r(Wv),y=v.next();!y.done&&!(t=Xv(n,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||t)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
910
+ a=[];if(!y)for(var w=r(n.childNodes),x=w.next();!x.done;x=w.next())(x=Vv(x.value,b,c,d,e,f,g,h,k,n,m))&&a.push(x);d=null!=l;w=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||w||"br"==n.tagName||0!=a.length||d&&!h))return null;x=Yv(n,c);w=x.start;for(x=x.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)x=Zv(p,c,w,x),w=x.start,x=x.end,p=p.parentNode;null==w&&(w=0);w+=b.periodStart;x=null==x?Infinity:x+b.periodStart;w=Math.max(w,b.segmentStart);
911
+ x=Math.min(x,b.segmentEnd);if(!D&&0<a.length)for(w=Infinity,x=0,b=r(a),c=b.next();!c.done;c=b.next())c=c.value,w=Math.min(w,c.startTime),x=Math.max(x,c.endTime);if("br"==n.tagName)return e=new jb(w,x,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new jb(w,x,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=Xv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==
912
+ z})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&(g=Xv(l,"region",f,"")[0]);$v(b,n,g,t,e,v,0==a.length);return b}
913
+ function $v(a,b,c,d,e,f,g){f=f||g;"rtl"==aw(b,c,e,"direction",f)&&(a.direction="rtl");g=aw(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=kb);(g=aw(b,c,e,"textAlign",!0))?(a.positionAlign=bw[g],a.lineAlign=cw[g],a.textAlign=wb[g.toUpperCase()]):a.textAlign=nb;if(g=aw(b,c,e,"displayAlign",!0))a.displayAlign=xb[g.toUpperCase()];if(g=aw(b,c,e,"color",f))a.color=g;if(g=aw(b,c,e,"backgroundColor",
914
+ f))a.backgroundColor=g;if(g=aw(b,c,e,"border",f))a.border=g;if(g=aw(b,c,e,"fontFamily",f))switch(g){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=g}(g=aw(b,c,e,"fontWeight",f))&&
915
+ "bold"==g&&(a.fontWeight=700);g=aw(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=aw(b,c,e,"lineHeight",f))&&g.match(dw)&&(a.lineHeight=g);(g=aw(b,c,e,"fontSize",f))&&(g.match(dw)||g.match(ew))&&(a.fontSize=g);if(g=aw(b,c,e,"fontStyle",f))a.fontStyle=Bb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=aw(b,c,e,"textOutline",
916
+ f))d=d.split(" "),d[0].match(dw)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(dw)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=aw(b,c,e,"letterSpacing",f))&&d.match(dw)&&(a.letterSpacing=d);(d=aw(b,c,e,"linePadding",f))&&d.match(dw)&&(a.linePadding=d);if(f=aw(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=Uv(c,e,"textDecoration"))&&fw(a,c);(b=gw(b,e,"textDecoration"))&&fw(a,b)}
917
+ function fw(a,b){b=r(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&gb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&gb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
918
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&gb(a.textDecoration,"overline")}}function aw(a,b,c,d,e){e=void 0===e?!0:e;return(a=gw(a,c,d))?a:e?Uv(b,c,d):null}function Uv(a,b,c){if(!a)return null;var d=Qf(a,Qv,c);return d?d:hw(a,b,c)}function gw(a,b,c){var d=Qf(a,Qv,c);return d?d:hw(a,b,c)}
919
+ function hw(a,b,c){a=Xv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Pf(a[e],"urn:ebu:tt:style",c);f||(f=Qf(a[e],Qv,c));f||(f=gw(a[e],b,c));f&&(d=f)}return d}
920
+ function Xv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Pf(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 Zv(a,b,c,d){a=Yv(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}}
921
+ function Yv(a,b){var c=iw(a.getAttribute("begin"),b),d=iw(a.getAttribute("end"),b);a=iw(a.getAttribute("dur"),b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
922
+ function iw(a,b){var c=null;if(jw.test(a)){a=jw.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(kw.test(a))c=lw(kw,a);else if(mw.test(a))c=lw(mw,a);else if(nw.test(a))a=nw.exec(a),c=Number(a[1])/b.frameRate;else if(ow.test(a))a=ow.exec(a),c=Number(a[1])/b.g;else if(pw.test(a))c=lw(pw,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
923
+ function lw(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}K("shaka.text.TtmlTextParser",Ov);Ov.prototype.parseMedia=Ov.prototype.parseMedia;Ov.prototype.setSequenceMode=Ov.prototype.setSequenceMode;Ov.prototype.parseInit=Ov.prototype.parseInit;
924
+ function Rv(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]))}
925
+ var Sv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ew=/^(\d{1,2}(?:\.\d+)?|100)%$/,dw=/^(\d+px|\d+em|\d*\.?\d+c)$/,Tv=/^(\d+)px (\d+)px$/,jw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,kw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,mw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,nw=/^(\d*(?:\.\d*)?)f$/,ow=/^(\d*(?:\.\d*)?)t$/,pw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),cw={left:rb,center:"center",right:"end",start:rb,
926
+ end:"end"},bw={left:"line-left",center:"center",right:"line-right"},Pv=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Qv=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Wv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ed["application/ttml+xml"]=function(){return new Ov};function qw(){this.g=new Ov}qw.prototype.parseInit=function(a){var b=!1;(new yf).box("moov",Df).box("trak",Df).box("mdia",Df).box("minf",Df).box("stbl",Df).R("stsd",Ff).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};qw.prototype.setSequenceMode=function(){};qw.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new yf).box("mdat",Hf(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new O(2,2,2007);return e};
927
+ K("shaka.text.Mp4TtmlParser",qw);qw.prototype.parseMedia=qw.prototype.parseMedia;qw.prototype.setSequenceMode=qw.prototype.setSequenceMode;qw.prototype.parseInit=qw.prototype.parseInit;ed['application/mp4; codecs="stpp"']=function(){return new qw};ed['application/mp4; codecs="stpp.ttml"']=function(){return new qw};ed['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new qw};ed['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new qw};function rw(){this.g=!1}rw.prototype.parseInit=function(){};rw.prototype.setSequenceMode=function(a){this.g=a};
928
+ rw.prototype.parseMedia=function(a,b){a=Bc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new O(2,2,2E3);a=b.vttOffset;if(c[0].includes("X-TIMESTAMP-MAP")&&this.g){var d=c[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),e=c[0].match(/MPEGTS:(\d+)/m);if(d&&e){a=sw(new Kq(d[1]));if(null==a)throw new O(2,2,2E3);e=Number(e[1]);for(d=b.segmentStart-b.periodStart;95443.7176888889<=d;)d-=95443.7176888889,e+=8589934592;a=b.periodStart+
929
+ e/9E4-a}}b=[];e=r(c[0].split("\n"));for(d=e.next();!d.done;d=e.next())if(d=d.value,/^Region:/.test(d)){d=new Kq(d);var f=new lb;Nq(d);Lq(d);for(var g=Nq(d);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?
930
+ (h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");Lq(d);g=Nq(d)}b.push(f)}e=new Map;tw(e);d=[];c=r(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&(g=-1));h=r(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&
931
+ (g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=e.get(g))||(l=new jb(0,0,""));for(var m=!1,p=0;p<k.length;p++){var n=/^\s*([^:]+):\s*(.*)/.exec(k[p]);if(n){var t=n[2].trim().replace(";","");switch(n[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=t;break;case "color":m=!0;l.color=t;break;case "font-family":m=!0;l.fontFamily=t;break;case "font-size":m=!0;l.fontSize=t;break;case "font-weight":if(700<=parseInt(t,10)||"bold"==
932
+ t)m=!0,l.fontWeight=700;break;case "font-style":switch(t){case "normal":m=!0;l.fontStyle=ub;break;case "italic":m=!0;l.fontStyle="italic";break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(t);break;case "text-shadow":m=!0;l.textShadow=t;break;case "white-space":m=!0,l.wrapLine="noWrap"!=t}}}m&&e.set(g,l)}}m=a;if(1==f.length&&!f[0]||/^NOTE($|[ \t])/.test(f[0])||"STYLE"==f[0]||"REGION"==f[0])f=null;else{h=null;f[0].includes("--\x3e")||(h=f[0],f.splice(0,1));
933
+ g=new Kq(f[0]);k=sw(g);p=Mq(g,/[ \t]+--\x3e[ \t]+/g);l=sw(g);if(null==k||null==p||null==l)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");k+=m;l+=m;m=f.slice(1).join("\n").trim();e.has("global")?(f=e.get("global").clone(),f.startTime=k,f.endTime=l,f.payload=""):f=new jb(k,l,"");uw(m,f,e);Lq(g);for(k=Nq(g);k;)vw(f,k,b),Lq(g),k=Nq(g);null!=h&&(f.id=h)}f&&d.push(f)}return d};
934
+ function tw(a){for(var b=r(Object.entries(zb)),c=b.next();!c.done;c=b.next()){var d=r(c.value);c=d.next().value;d=d.next().value;var e=new jb(0,0,"");e.color=d;a.set("."+c,e)}b=r(Object.entries(Ab));for(c=b.next();!c.done;c=b.next())d=r(c.value),c=d.next().value,d=d.next().value,e=new jb(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
935
+ function uw(a,b,c){0===c.size&&tw(c);a:{var d=a;a=[];for(var e=-1,f="",g=0;g<d.length;g++)if("/"===d[g]&&0<g&&"<"===d[g-1]){var h=d.indexOf(">",g);if(h<=g){a=d;break a}if((h=d.substring(g+1,h))&&"c"===h){var k=a.pop();k?k===h?(f+="/"+h+">",g+=h.length+1):k.startsWith("c.")?(g+=h.length+1,f+="/"+k+">"):f+=d[g]:f+=d[g]}else f+=d[g]}else"<"===d[g]?(e=g+1,"c"!=d[e]&&(e=-1)):">"===d[g]&&0<e&&(a.push(d.substr(e,g-e)),e=-1),f+=d[g];a=f}d=[];f=-1;for(e=0;e<a.length;e++)"<"===a[e]?f=e+1:">"===a[e]&&0<f&&(f=
936
+ a.substr(f,e-f),f.match(ww)&&d.push(f),f=-1);d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,a=a.replace("<"+e+">",'<div time="'+e+'">'),a+="</div>";a:{e=a;f=[];g=-1;d="";a=!1;for(h=0;h<e.length;h++)if("/"===e[h]){k=e.indexOf(">",h);if(-1===k){a=e;break a}if((k=e.substring(h+1,k))&&"v"==k){a=!0;var l=null;f.length&&(l=f[f.length-1]);if(l){if(l===k)d+="/"+k+">";else{if(!l.startsWith("v")){d+=e[h];continue}d+="/"+l+">"}h+=k.length+1}else d+=e[h]}else d+=e[h]}else"<"===e[h]?(g=h+1,"v"!=e[g]&&(g=-1)):
937
+ ">"===e[h]&&0<g&&(f.push(e.substr(g,h-g)),g=-1),d+=e[h];e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,g=f.replace(" ",".voice-"),d=d.replace("<"+f+">","<"+g+">"),d=d.replace("</"+f+">","</"+g+">"),a||(d+="</"+g+">");a=d}if(e=bg("<span>"+a+"</span>","span")){d=[];e=e.childNodes;if(1==e.length&&(f=e[0],f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE)){b.payload=xw(a);return}a=r(e);for(e=a.next();!e.done;e=a.next())yw(e.value,b,d,c);b.nestedCues=d}else b.payload=xw(a)}
938
+ function zw(a,b){return a&&0<a.length?a:b}
939
+ function yw(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/(?=[ .])+/g)),g=f.next();!g.done;g=f.next()){var h=g=g.value;if(h.startsWith(".voice-")){var k=h.split("-").pop();h='v[voice="'+k+'"]';d.has(h)||(h="v[voice="+k+"]")}d.has(h)&&(h=d.get(h))&&(e.backgroundColor=zw(h.backgroundColor,e.backgroundColor),e.color=zw(h.color,e.color),e.fontFamily=zw(h.fontFamily,e.fontFamily),e.fontSize=zw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=
940
+ h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine);switch(g){case "br":g=b.clone();g.lineBreak=!0;c.push(g);break;case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=sw(new Kq(g)))e.startTime=g}}if(Sf(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=xw(a),c.push(f)),f=!1;else for(b=
941
+ r(a.childNodes),a=b.next();!a.done;a=b.next())yw(a.value,e,c,d)}
942
+ function vw(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=nb:a.textAlign=wb[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"==
943
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Aw(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=yb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=qb,a.line=Number(c[1]),c[2]&&(a.lineAlign=yb[c[2].toUpperCase()])}function Aw(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}
944
+ function sw(a){a=Mq(a,ww);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}function xw(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}K("shaka.text.VttTextParser",rw);rw.prototype.parseMedia=rw.prototype.parseMedia;
945
+ rw.prototype.setSequenceMode=rw.prototype.setSequenceMode;rw.prototype.parseInit=rw.prototype.parseInit;var ww=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;ed["text/vtt"]=function(){return new rw};ed['text/vtt; codecs="vtt"']=function(){return new rw};ed['text/vtt; codecs="wvtt"']=function(){return new rw};function Bw(){this.g=null}Bw.prototype.parseInit=function(a){var b=this,c=!1;(new yf).box("moov",Df).box("trak",Df).box("mdia",Df).R("mdhd",function(d){d=ei(d.reader,d.version);b.g=d.timescale}).box("minf",Df).box("stbl",Df).R("stsd",Ff).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};Bw.prototype.setSequenceMode=function(){};
946
+ Bw.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new O(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new yf).box("moof",Df).box("traf",Df).R("tfdt",function(z){g=!0;c=di(z.reader,z.version).xe}).R("tfhd",function(z){l=ci(z.reader,z.flags).De}).R("trun",function(z){h=!0;d=fi(z.reader,z.version,z.flags).Se}).box("mdat",Hf(function(z){k=!0;e=z})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);a=c;for(var m=new vf(e,0),p=r(d),n=p.next();!n.done;n=p.next()){n=n.value;
947
+ var t=n.fe||l,v=n.fd?c+n.fd:a;a=v+(t||0);var y=0;do{var w=m.K();y+=w;var x=m.K(),D=null;"vttc"==Cf(x)?8<w&&(D=m.Za(w-8)):m.skip(w-8);t&&D&&(w=Cw(D,b.periodStart+v/this.g,b.periodStart+a/this.g),f.push(w))}while(n.sampleSize&&y<n.sampleSize)}return f.filter(cc)};function Cw(a,b,c){var d,e,f;(new yf).box("payl",Hf(function(g){d=Bc(g)})).box("iden",Hf(function(g){e=Bc(g)})).box("sttg",Hf(function(g){f=Bc(g)})).parse(a);return d?Dw(d,e,f,b,c):null}
948
+ function Dw(a,b,c,d,e){d=new jb(d,e,"");uw(a,d,new Map);b&&(d.id=b);if(c)for(a=new Kq(c),b=Nq(a);b;)vw(d,b,[]),Lq(a),b=Nq(a);return d}K("shaka.text.Mp4VttParser",Bw);Bw.prototype.parseMedia=Bw.prototype.parseMedia;Bw.prototype.setSequenceMode=Bw.prototype.setSequenceMode;Bw.prototype.parseInit=Bw.prototype.parseInit;ed['application/mp4; codecs="wvtt"']=function(){return new Bw};function Ew(){}Ew.prototype.parseInit=function(){};Ew.prototype.setSequenceMode=function(){};Ew.prototype.parseMedia=function(a){var b=Bc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Kq(c[0]),e=Fw(d),f=Mq(d,/,/g);d=Fw(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 jb(e,d,c.slice(1).join("\n").trim()))}return a};
949
+ function Fw(a){a=Mq(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",Ew);Ew.prototype.parseMedia=Ew.prototype.parseMedia;Ew.prototype.setSequenceMode=Ew.prototype.setSequenceMode;Ew.prototype.parseInit=Ew.prototype.parseInit;ed["text/x-subviewer"]=function(){return new Ew};function Gw(){this.g=new rw}Gw.prototype.parseInit=function(){};Gw.prototype.setSequenceMode=function(){};Gw.prototype.parseMedia=function(a,b){a=Bc(a);a=Hw(a);a=L(Fc(a));return this.g.parseMedia(a,b)};function Hw(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",Gw);
950
+ Gw.srt2webvtt=Hw;Gw.prototype.parseMedia=Gw.prototype.parseMedia;Gw.prototype.setSequenceMode=Gw.prototype.setSequenceMode;Gw.prototype.parseInit=Gw.prototype.parseInit;ed["text/srt"]=function(){return new Gw};function Iw(){}Iw.prototype.parseInit=function(){};Iw.prototype.setSequenceMode=function(){};
951
+ Iw.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Jw.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=Kw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Lw);else if("Style"==e){e=f.split(Lw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
952
+ [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={wd:e.wd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Kw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Lw);else if("Dialogue"==f){g=g.split(Lw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Mw(f.Start);var k=Mw(f.End);g=new jb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.wd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.wd}}(e)))&&Nw(g,f);d.push(g)}return d};
953
+ function Nw(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Ow(c))a.color=c;if(c=b.BackColour)if(c=Ow(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=sb;a.textAlign="start";break;case 2:a.displayAlign=sb;a.textAlign=nb;break;case 3:a.displayAlign=sb;a.textAlign="end";
954
+ break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=nb;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=nb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}
955
+ function Ow(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 Mw(a){a=Pw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}K("shaka.text.SsaTextParser",Iw);Iw.prototype.parseMedia=Iw.prototype.parseMedia;Iw.prototype.setSequenceMode=Iw.prototype.setSequenceMode;Iw.prototype.parseInit=Iw.prototype.parseInit;
956
+ var Jw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Kw=/^\s*([^:]+):\s*(.*)/,Lw=/\s*,\s*/,Pw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ed["text/x-ssa"]=function(){return new Iw};/*
950
957
  @license
951
958
  EME Encryption Scheme Polyfill
952
959
  Copyright 2019 Google LLC
953
960
  SPDX-License-Identifier: Apache-2.0
954
961
  */
955
- function Sw(){}var Tw;function Uw(){Tw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Tw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Vw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
956
- function Vw(a,b){var c=this,d;return G(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Tw.call(c,a,b),2);d=e.h;if(Ww(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Tw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Xw;return e.return(Xw.call(c,
962
+ function Qw(){}var Rw;function Sw(){Rw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Rw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Tw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
963
+ function Tw(a,b){var c=this,d;return G(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Rw.call(c,a,b),2);d=e.h;if(Uw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Rw,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=Vw;return e.return(Vw.call(c,
957
964
  a,b))})}
958
- function Xw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return G(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Yw(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Zw(h.videoCapabilities,d),l=Zw(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."),
959
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,Tw.call(c,a,e),2)}p=t.h;return t.return(new $w(p,d))})}function Zw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",Sw);Sw.install=Uw;function ax(){}var bx;
960
- function cx(){bx?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(bx=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=dx):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
961
- function dx(a){var b=this,c,d,e;return G(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,bx.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&Ww(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=bx,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
962
- navigator.mediaCapabilities.decodingInfo=ex;if(d){f.A(3);break}e=c;return u(f,fx(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(ex.call(b,a))}})}
963
- function ex(a){var b=this,c,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Yw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,bx.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
964
- new $w(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,fx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
965
- function fx(a){var b,c;return G(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
966
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}K("McEncryptionSchemePolyfill",ax);ax.install=cx;function $w(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
967
- $w.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};$w.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
968
- function Yw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Ww(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}
969
- function gx(){}function ku(){Uw();cx()}K("EncryptionSchemePolyfills",gx);gx.install=ku;"undefined"!==typeof module&&module.exports&&(module.exports=gx);}).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})();
965
+ function Vw(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return G(function(t){if(1==t.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=Ww(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Xw(h.videoCapabilities,d),l=Xw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
966
+ p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(t,Rw.call(c,a,e),2)}n=t.h;return t.return(new Yw(n,d))})}function Xw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",Qw);Qw.install=Sw;function Zw(){}var $w;
967
+ function ax(){$w?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?($w=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=bx):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
968
+ function bx(a){var b=this,c,d,e;return G(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,$w.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f.return(c);if((d=c.keySystemAccess)&&Uw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=$w,f.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
969
+ navigator.mediaCapabilities.decodingInfo=cx;if(d){f.B(3);break}e=c;return u(f,dx(a),4);case 4:return e.keySystemAccess=f.h,f.return(c);case 3:return f.return(cx.call(b,a))}})}
970
+ function cx(a){var b=this,c,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=Ww(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m.return(h):u(m,$w.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
971
+ new Yw(k.keySystemAccess,c);m.B(3);break}if(!a.keySystemConfiguration){m.B(3);break}l=k;return u(m,dx(a),5);case 5:l.keySystemAccess=m.h;case 3:return m.return(k)}})}
972
+ function dx(a){var b,c;return G(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
973
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}K("McEncryptionSchemePolyfill",Zw);Zw.install=ax;function Yw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
974
+ Yw.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};Yw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
975
+ function Ww(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function Uw(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}
976
+ function ex(){}function iu(){Sw();ax()}K("EncryptionSchemePolyfills",ex);ex.install=iu;"undefined"!==typeof module&&module.exports&&(module.exports=ex);}).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})();
970
977
 
971
978
  //# sourceMappingURL=shaka-player.compiled.map