shaka-player 4.2.4 → 4.3.0

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 (137) hide show
  1. package/.github/workflows/sync-labels.yaml +1 -1
  2. package/.github/workflows/update-issues.yaml +1 -1
  3. package/AUTHORS +4 -0
  4. package/CHANGELOG.md +85 -54
  5. package/CONTRIBUTORS +4 -0
  6. package/README.md +14 -0
  7. package/demo/common/assets.js +58 -0
  8. package/demo/common/message_ids.js +22 -1
  9. package/demo/config.js +89 -5
  10. package/demo/demo.less +7 -1
  11. package/demo/index.html +8 -1
  12. package/demo/locales/en.json +21 -1
  13. package/demo/locales/source.json +82 -2
  14. package/demo/main.js +57 -1
  15. package/demo/search.js +2 -0
  16. package/demo/visualizer.js +337 -0
  17. package/demo/visualizer_button.js +103 -0
  18. package/dist/controls.css +1 -1
  19. package/dist/controls.css.map +1 -1
  20. package/dist/demo.compiled.debug.js +83 -58
  21. package/dist/demo.compiled.debug.map +4 -4
  22. package/dist/demo.compiled.js +83 -58
  23. package/dist/demo.compiled.map +4 -4
  24. package/dist/demo.css +1 -1
  25. package/dist/demo.css.map +1 -1
  26. package/dist/deps.js +16 -9
  27. package/dist/locales.js +32 -32
  28. package/dist/receiver.compiled.debug.js +23 -19
  29. package/dist/receiver.compiled.debug.map +3 -3
  30. package/dist/receiver.compiled.js +23 -19
  31. package/dist/receiver.compiled.map +3 -3
  32. package/dist/shaka-player.compiled.d.ts +173 -26
  33. package/dist/shaka-player.compiled.debug.d.ts +173 -26
  34. package/dist/shaka-player.compiled.debug.externs.js +161 -31
  35. package/dist/shaka-player.compiled.debug.js +464 -401
  36. package/dist/shaka-player.compiled.debug.map +4 -4
  37. package/dist/shaka-player.compiled.externs.js +161 -31
  38. package/dist/shaka-player.compiled.js +897 -862
  39. package/dist/shaka-player.compiled.map +4 -4
  40. package/dist/shaka-player.ui.d.ts +173 -26
  41. package/dist/shaka-player.ui.debug.d.ts +173 -26
  42. package/dist/shaka-player.ui.debug.externs.js +161 -31
  43. package/dist/shaka-player.ui.debug.js +488 -422
  44. package/dist/shaka-player.ui.debug.map +4 -4
  45. package/dist/shaka-player.ui.externs.js +161 -31
  46. package/dist/shaka-player.ui.js +1053 -1018
  47. package/dist/shaka-player.ui.map +4 -4
  48. package/docs/design/lcevc-architecture.png +0 -0
  49. package/docs/design/lcevc-demo.png +0 -0
  50. package/docs/design/lcevc-integration.md +72 -0
  51. package/docs/tutorials/fairplay.md +7 -0
  52. package/docs/tutorials/faq.md +1 -1
  53. package/docs/tutorials/ui.md +7 -7
  54. package/docs/tutorials/upgrade.md +6 -0
  55. package/externs/ima.js +13 -1
  56. package/externs/lcevc.js +81 -0
  57. package/externs/mux.js +1 -42
  58. package/externs/shaka/ads.js +11 -1
  59. package/externs/shaka/manifest_parser.js +5 -1
  60. package/externs/shaka/player.js +178 -15
  61. package/lib/abr/simple_abr_manager.js +7 -0
  62. package/lib/ads/ad_manager.js +0 -8
  63. package/lib/ads/client_side_ad.js +15 -0
  64. package/lib/ads/client_side_ad_manager.js +21 -8
  65. package/lib/ads/server_side_ad.js +15 -0
  66. package/lib/ads/server_side_ad_manager.js +3 -3
  67. package/lib/cast/cast_utils.js +2 -0
  68. package/lib/cea/dummy_cea_parser.js +28 -0
  69. package/lib/cea/i_cea_parser.js +14 -2
  70. package/lib/cea/mp4_cea_parser.js +87 -5
  71. package/lib/config/auto_show_text.js +33 -0
  72. package/lib/dash/dash_parser.js +1 -1
  73. package/lib/hls/hls_parser.js +790 -374
  74. package/lib/lcevc/lcevc_dil.js +152 -0
  75. package/lib/media/closed_caption_parser.js +9 -6
  76. package/lib/media/drm_engine.js +14 -6
  77. package/lib/media/media_source_engine.js +106 -26
  78. package/lib/media/presentation_timeline.js +26 -11
  79. package/lib/media/segment_reference.js +49 -1
  80. package/lib/media/streaming_engine.js +142 -12
  81. package/lib/media/transmuxer.js +73 -18
  82. package/lib/offline/storage.js +1 -0
  83. package/lib/player.js +454 -75
  84. package/lib/polyfill/patchedmediakeys_apple.js +55 -1
  85. package/lib/text/ui_text_displayer.js +5 -5
  86. package/lib/text/vtt_text_parser.js +35 -1
  87. package/lib/util/dom_utils.js +0 -1
  88. package/lib/util/error.js +17 -0
  89. package/lib/util/fake_event.js +2 -0
  90. package/lib/util/id3_utils.js +300 -0
  91. package/lib/util/mime_utils.js +3 -6
  92. package/lib/util/mp4_box_parsers.js +15 -5
  93. package/lib/util/platform.js +9 -1
  94. package/lib/util/player_configuration.js +23 -1
  95. package/lib/util/ts_parser.js +499 -0
  96. package/maintained-branches.md +2 -2
  97. package/package.json +4 -1
  98. package/roadmap.md +5 -3
  99. package/test/ads/ad_manager_unit.js +180 -29
  100. package/test/cast/cast_utils_unit.js +3 -1
  101. package/test/dash/dash_parser_content_protection_unit.js +1 -0
  102. package/test/dash/dash_parser_live_unit.js +1 -0
  103. package/test/dash/dash_parser_manifest_unit.js +93 -1
  104. package/test/dash/dash_parser_segment_base_unit.js +1 -0
  105. package/test/dash/dash_parser_segment_list_unit.js +1 -0
  106. package/test/dash/dash_parser_segment_template_unit.js +1 -0
  107. package/test/demo/demo_unit.js +2 -1
  108. package/test/hls/hls_live_unit.js +253 -19
  109. package/test/hls/hls_parser_unit.js +500 -12
  110. package/test/media/closed_caption_parser_unit.js +2 -1
  111. package/test/media/drm_engine_integration.js +3 -1
  112. package/test/media/media_source_engine_integration.js +71 -6
  113. package/test/media/media_source_engine_unit.js +10 -5
  114. package/test/media/streaming_engine_integration.js +4 -1
  115. package/test/media/streaming_engine_unit.js +144 -1
  116. package/test/media/transmuxer_integration.js +21 -10
  117. package/test/player_integration.js +224 -82
  118. package/test/player_unit.js +5 -2
  119. package/test/polyfill/patchedmediakeys_apple_unit.js +124 -0
  120. package/test/test/assets/id3-metadata.aac +0 -0
  121. package/test/test/assets/id3-metadata.ts +0 -0
  122. package/test/test/assets/thumbnails-sprites.vtt +10 -0
  123. package/test/test/assets/thumbnails.vtt +10 -0
  124. package/test/test/util/dash_parser_util.js +2 -0
  125. package/test/test/util/fake_ad.js +21 -0
  126. package/test/test/util/fake_media_source_engine.js +7 -0
  127. package/test/test/util/id3_generator.js +100 -0
  128. package/test/test/util/manifest_generator.js +3 -6
  129. package/test/test/util/simple_fakes.js +4 -0
  130. package/test/test/util/stream_generator.js +38 -0
  131. package/test/test/util/test_scheme.js +43 -14
  132. package/test/text/vtt_text_parser_unit.js +11 -0
  133. package/test/ui/text_displayer_layout_unit.js +14 -0
  134. package/test/util/id3_utils_unit.js +116 -0
  135. package/test/util/ts_parser_unit.js +77 -0
  136. package/ui/less/containers.less +7 -0
  137. package/ui/ui.js +43 -4
@@ -9,918 +9,953 @@
9
9
  Copyright The Closure Library Authors.
10
10
  SPDX-License-Identifier: Apache-2.0
11
11
  */
12
- var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
13
- function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var da=ca(this);function fa(a,b){if(b)a:{for(var c=da,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ba(c,d,{configurable:!0,writable:!0,value:f})}}
14
- fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ba(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
15
- fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
- function t(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=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
- if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
18
- function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.hh=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
- function sa(a,b){a.i={ue:b,Ce:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function A(a){a.g=0}function C(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.ue;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Ce?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function za(a,b){ra(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
21
- function Aa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
22
- function Ba(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ce)throw b.ue;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
- function Ea(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ba(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.s):(sa(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}
24
- function Fa(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function K(a){return Fa(new Ea(new ya(a)))}function Ia(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
- fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=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=
26
- g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
27
- b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
28
- 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;
29
- b.prototype.I=function(g){var h=this.j();g.Gc(h.resolve,h.reject)};b.prototype.L=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,q){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Gc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Gc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Gc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Gc(n(p.length-1),m),k=h.next();
31
- while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
- fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ja(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
- m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!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)&&
34
- Ja(k,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});
35
- fa("Map",function(a){function b(){var h={};return h.Pa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Pa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ja(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,fa:p}}return{id:l,
12
+ var r;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
13
+ 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:{for(var c=ea,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&ca(c,d,{configurable:!0,writable:!0,value:f})}}
14
+ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;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});
15
+ fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=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}
16
+ function t(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=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
17
+ if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;ma=pa.a;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var qa=la;
18
+ function ra(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.yh=b.prototype}function ta(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function ua(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}ta.prototype.s=function(a){this.h=a};
19
+ function wa(a,b){a.i={Ce:b,Je:!0};a.g=a.m||a.j}ta.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}ta.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 xa(a){a.m=0;a.j=2}function za(a,b){a.g=b;a.m=0}function Aa(a){a.m=0;var b=a.i.Ce;a.i=null;return b}function Ba(a){a.u=[a.i];a.m=0;a.j=0}
20
+ function Ca(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.Je?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 Da(a){this.g=new ta;this.h=a}function Ea(a,b){ua(a.g);var c=a.g.l;if(c)return Fa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ga(a)}
21
+ function Fa(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,wa(a.g,g),Ga(a)}a.g.l=null;d.call(a.g,f);return Ga(a)}
22
+ function Ga(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,wa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Je)throw b.Ce;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
+ function Ha(a){this.next=function(b){ua(a.g);a.g.l?b=Fa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ga(a));return b};this["throw"]=function(b){ua(a.g);a.g.l?b=Fa(a,a.g.l["throw"],b,a.g.s):(wa(a.g,b),b=Ga(a));return b};this["return"]=function(b){return Ea(a,b)};this[Symbol.iterator]=function(){return this}}
24
+ function Ia(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())})}function G(a){return Ia(new Ha(new Da(a)))}function Ja(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
+ fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
26
+ 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)}};
27
+ b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(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=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
28
+ function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
+ b.prototype.H=function(g){var h=this.j();g.Kc(h.resolve,h.reject)};b.prototype.K=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,q){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Kc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Kc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Kc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Kc(n(p.length-1),m),k=h.next();
31
+ while(!k.done)})};return b});function Ka(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
+ fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ka(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
+ m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ka(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ka(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
+ Ka(k,g)&&Ka(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ka(k,g)&&Ka(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
+ 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&&Ka(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,fa:p}}return{id:l,
36
36
  list:m,index:-1,fa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "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.fa?l.fa.value=k:(l.fa={next:this.g,Pa:this.g.Pa,head:this.g,key:h,value:k},l.list.push(l.fa),this.g.Pa.next=l.fa,this.g.Pa=l.fa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.fa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.fa.Pa.next=h.fa.next,h.fa.next.Pa=h.fa.Pa,
38
- h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Pa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).fa};e.prototype.get=function(h){return(h=d(this,h).fa)&&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(),
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.fa?l.fa.value=k:(l.fa={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.fa),this.g.Qa.next=l.fa,this.g.Qa=l.fa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.fa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.fa.Qa.next=h.fa.next,h.fa.next.Qa=h.fa.Qa,
38
+ h.fa.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).fa};e.prototype.get=function(h){return(h=d(this,h).fa)&&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(),
39
39
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
40
  fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
- b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{Ae:e,v:f}}return{Ae:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Ae}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
- fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
44
- fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
45
- function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var 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)Ja(d,e)&&(a[e]=d[e])}return a};
46
- fa("Object.assign",function(a){return a||Na});fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Array.prototype.values",function(a){return a?a:function(){return Ma(this,function(b,c){return c})}});
47
- fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Ma(this,function(b,c){return[b,c]})}});
48
- fa("String.prototype.repeat",function(a){return a?a:function(b){var c=La(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ja(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
49
- 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 Oa=this||self;
50
- function M(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
42
+ b.prototype[Symbol.iterator]=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{He:e,v:f}}return{He:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return La(this,b,c).He}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
+ fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,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+""}
44
+ 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){for(var d=Ma(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
45
+ function Na(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 Na(this,function(b){return b})}});var Oa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ka(d,e)&&(a[e]=d[e])}return a};
46
+ fa("Object.assign",function(a){return a||Oa});fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Array.prototype.values",function(a){return a?a:function(){return Na(this,function(b,c){return c})}});
47
+ fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});fa("Array.prototype.entries",function(a){return a?a:function(){return Na(this,function(b,c){return[b,c]})}});
48
+ 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)Ka(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
49
+ 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)Ka(b,d)&&c.push([d,b[d]]);return c}});var Pa=this||self;
50
+ function L(a,b){var c=a.split("."),d=Pa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
51
51
  @license
52
52
  Shaka Player
53
53
  Copyright 2016 Google LLC
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
- 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);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.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)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ia.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Va=cb[2];Ua=cb[1]};function db(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function eb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={jd:d.jd},e=a.next()){d.jd=e.value;e=b.findIndex(function(f){return function(g){return c(f.jd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
57
- function gb(a,b,c){c||(c=db);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 hb(a,b,c){this.startTime=a;this.direction=ib;this.endTime=b;this.payload=c;this.region=new jb;this.position=null;this.positionAlign=kb;this.size=0;this.textAlign=lb;this.writingMode=mb;this.lineInterpretation=nb;this.line=null;this.lineHeight="";this.lineAlign=ob;this.displayAlign=pb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=qb;this.fontStyle=rb;this.linePadding=this.letterSpacing=
56
+ function Qa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Qa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Ra(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Qa(2);this.j=new Qa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.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)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Ra(this.h),Ra(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ja.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Va=cb[2];Ua=cb[1]};function db(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function eb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(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}
57
+ function gb(a,b,c){c||(c=db);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 hb(a,b,c){this.startTime=a;this.direction=ib;this.endTime=b;this.payload=c;this.region=new jb;this.position=null;this.positionAlign=kb;this.size=0;this.textAlign=lb;this.writingMode=mb;this.lineInterpretation=ob;this.line=null;this.lineHeight="";this.lineAlign=pb;this.displayAlign=qb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.textShadow=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rb;this.fontStyle=sb;this.linePadding=this.letterSpacing=
58
58
  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}}hb.prototype.clone=function(){var a=new hb(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
59
- function tb(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(!gb(a.nestedCues,b.nestedCues,tb))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(!gb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",hb);var kb="auto";
60
- hb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:kb};var lb="center",ub={LEFT:"left",RIGHT:"right",CENTER:lb,START:"start",END:"end"};hb.textAlign=ub;var pb="after",vb={BEFORE:"before",CENTER:"center",AFTER:pb};hb.displayAlign=vb;var ib="ltr";hb.direction={HORIZONTAL_LEFT_TO_RIGHT:ib,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var mb="horizontal-tb";hb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:mb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var nb=0;
61
- hb.lineInterpretation={LINE_NUMBER:nb,PERCENTAGE:1};var ob="start",wb={CENTER:"center",START:ob,END:"end"};hb.lineAlign=wb;var xb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};hb.defaultTextColor=xb;var yb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};hb.defaultTextBackgroundColor=yb;var qb=400;hb.fontWeight={NORMAL:qb,BOLD:700};
62
- var rb="normal",zb={NORMAL:rb,ITALIC:"italic",OBLIQUE:"oblique"};hb.fontStyle=zb;hb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ab;this.scroll=Bb}M("shaka.text.CueRegion",jb);var Ab=1;jb.units={PX:0,PERCENTAGE:Ab,LINES:2};var Bb="";jb.scrollMode={NONE:Bb,UP:"up"};function Cb(){}function Db(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Eb(a)==Eb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=Fb(a),d=Fb(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Eb(a){return a instanceof ArrayBuffer?a:a.buffer}function Gb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
63
- function Fb(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,Uint8Array)}function Ib(a,b,c){c=void 0===c?Infinity:c;return Hb(a,void 0===b?0:b,c,DataView)}function Hb(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(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}M("shaka.util.BufferUtils",Cb);Cb.toDataView=Ib;Cb.toUint8=Fb;Cb.toArrayBuffer=Gb;Cb.equal=Db;function Jb(){}M("shaka.dependencies",Jb);Jb.has=function(a){return Kb.has(a)};Jb.add=function(a,b){if(!Lb[a])throw Error(a+" is not supported");Kb.set(a,function(){return b})};var Lb={muxjs:"muxjs"};Jb.Allowed=Lb;var Kb=new Map([["muxjs",function(){return window.muxjs}]]);function N(a,b,c){var d=Ia.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1}N.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};M("shaka.util.Error",N);N.Severity={RECOVERABLE:1,CRITICAL:2};N.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
64
- N.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
65
- CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,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,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,
66
- 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,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,
67
- DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,
68
- NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,HLS_AES_128_INVALID_IV_LENGTH:4043,HLS_AES_128_INVALID_KEY_LENGTH:4044,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,
69
- FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,
70
- ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,
71
- MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
59
+ function tb(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(!gb(a.nestedCues,b.nestedCues,tb))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(!gb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}L("shaka.text.Cue",hb);var kb="auto";
60
+ hb.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:kb};var lb="center",ub={LEFT:"left",RIGHT:"right",CENTER:lb,START:"start",END:"end"};hb.textAlign=ub;var qb="after",vb={BEFORE:"before",CENTER:"center",AFTER:qb};hb.displayAlign=vb;var ib="ltr";hb.direction={HORIZONTAL_LEFT_TO_RIGHT:ib,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var mb="horizontal-tb";hb.writingMode={HORIZONTAL_TOP_TO_BOTTOM:mb,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ob=0;
61
+ hb.lineInterpretation={LINE_NUMBER:ob,PERCENTAGE:1};var pb="start",wb={CENTER:"center",START:pb,END:"end"};hb.lineAlign=wb;var xb={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};hb.defaultTextColor=xb;var yb={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};hb.defaultTextBackgroundColor=yb;var rb=400;hb.fontWeight={NORMAL:rb,BOLD:700};
62
+ var sb="normal",zb={NORMAL:sb,ITALIC:"italic",OBLIQUE:"oblique"};hb.fontStyle=zb;hb.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function jb(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ab;this.scroll=Bb}L("shaka.text.CueRegion",jb);var Ab=1;jb.units={PX:0,PERCENTAGE:Ab,LINES:2};var Bb="";jb.scrollMode={NONE:Bb,UP:"up"};function Cb(){}function Db(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(Eb(a)==Eb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=N(a),d=N(b),e=0;e<a.byteLength;e++)if(c[e]!=d[e])return!1;return!0}function Eb(a){return a instanceof ArrayBuffer?a:a.buffer}function Fb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
63
+ function N(a,b,c){c=void 0===c?Infinity:c;return Gb(a,void 0===b?0:b,c,Uint8Array)}function Hb(a,b,c){c=void 0===c?Infinity:c;return Gb(a,void 0===b?0:b,c,DataView)}function Gb(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(Eb(a),b,Math.min(b+Math.max(c,0),e)-b)}L("shaka.util.BufferUtils",Cb);Cb.toDataView=Hb;Cb.toUint8=N;Cb.toArrayBuffer=Fb;Cb.equal=Db;function O(a,b,c){var d=Ja.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," ")};L("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};
64
+ 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,
65
+ 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,
66
+ 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,
67
+ DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,
68
+ DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,HLS_AES_128_INVALID_IV_LENGTH:4043,HLS_AES_128_INVALID_KEY_LENGTH:4044,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,
69
+ NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,
70
+ LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,
71
+ LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
72
72
  @license
73
73
  Copyright 2008 The Closure Library Authors
74
74
  SPDX-License-Identifier: Apache-2.0
75
75
  */
76
- var Mb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
76
+ var Ib=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
77
77
  @license
78
78
  Copyright 2006 The Closure Library Authors
79
79
  SPDX-License-Identifier: Apache-2.0
80
80
  */
81
- function Nb(a){var b;a instanceof Nb?(Ob(this,a.Ea),this.ob=a.ob,this.Fa=a.Fa,Pb(this,a.Ib),this.ua=a.ua,Qb(this,a.g.clone()),this.fb=a.fb):a&&(b=String(a).match(Mb))?(Ob(this,b[1]||"",!0),this.ob=Rb(b[2]||""),this.Fa=Rb(b[3]||"",!0),Pb(this,b[4]),this.ua=Rb(b[5]||"",!0),Qb(this,b[6]||"",!0),this.fb=Rb(b[7]||"")):this.g=new Sb(null)}r=Nb.prototype;r.Ea="";r.ob="";r.Fa="";r.Ib=null;r.ua="";r.fb="";
82
- r.toString=function(){var a=[],b=this.Ea;b&&a.push(Tb(b,Vb,!0),":");if(b=this.Fa){a.push("//");var c=this.ob;c&&a.push(Tb(c,Vb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ib;null!=b&&a.push(":",String(b))}if(b=this.ua)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Tb(b,"/"==b.charAt(0)?Wb:Xb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fb)&&a.push("#",Tb(b,Yb));return a.join("")};
83
- r.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Nb);var c=!!a.Ea;c?Ob(b,a.Ea):c=!!a.ob;c?b.ob=a.ob:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Ib;var d=a.ua;if(c)Pb(b,a.Ib);else if(c=!!a.ua){if("/"!=d.charAt(0))if(this.Fa&&!this.ua)d="/"+d;else{var e=b.ua.lastIndexOf("/");-1!=e&&(d=b.ua.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
84
- h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ua=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};r.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.Ib=b}else a.Ib=null}function Qb(a,b,c){b instanceof Sb?a.g=b:(c||(b=Tb(b,Zb)),a.g=new Sb(b))}
85
- 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 Vb=/[#\/\?@]/g,Xb=/[#\?:]/g,Wb=/[#\?]/g,Zb=/[#\?@]/g,Yb=/#/g;function Sb(a){this.g=a||null}
86
- function ac(a){if(!a.na&&(a.na={},a.Ic=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Sb.prototype;r.na=null;r.Ic=null;r.add=function(a,b){ac(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Ic++;return this};
87
- r.set=function(a,b){ac(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.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("&")};r.clone=function(){var a=new Sb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Ic=this.Ic}return a};function 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}}
88
- function gc(a,b){if(1==b.length)return b[0];var c=hc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function hc(a,b){for(var c=t(ic[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==jc?"":null}
89
- var jc="text",kc={ra:"video",cb:"audio",X:jc,Ub:"image",tg:"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.P=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.P=function(a){var b=this;this.stop();this.g=(new nc(function(){b.h()})).P(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new nc(function(){b.g.P(a);b.h()})).P(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ca;O.prototype.tickAfter=O.prototype.P;
90
- O.prototype.tickNow=O.prototype.Lb;function oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pc(a){return""!=qc().canPlayType(a)}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!wc()&&!sc("AFT")}function wc(){return sc("PlayStation 4")}
91
- function xc(){if(!vc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function sc(a){return(navigator.userAgent||"").includes(a)}function qc(){if(yc)return yc;zc||(zc=new O(function(){yc=null}));(yc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yc=document.createElement("video"));zc.P(1);return yc}var zc=null,yc=null;function Ac(){}
92
- function Bc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!wc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
93
- (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
94
- function Cc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Dc.value()(d)}
95
- function Hc(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}
96
- function Ic(a){if(window.TextEncoder&&!wc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Jc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Jc;Ac.toUTF8=Ic;Ac.fromBytesAutoDetect=Hc;Ac.fromUTF16=Cc;
97
- Ac.fromUTF8=Bc;var Dc=new mc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Kc(){}function Lc(a){a=Fb(a);a=Dc.value()(a);return btoa(a)}function Mc(a,b){b=void 0==b?!0:b;var c=Lc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Nc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Oc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
98
- function Pc(a){var b=Fb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Qc(){for(var a=Ia.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Kc);Kc.concat=Qc;Kc.toHex=Pc;Kc.fromHex=Oc;Kc.fromBase64=Nc;Kc.toBase64=Mc;Kc.toStandardBase64=Lc;function Rc(){var a=this;this.o=Kb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Qc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Qc.apply(Kc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Rc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
99
- function Sc(a,b){if(!Kb.get("muxjs")()||!Tc(a))return!1;if(b)return MediaSource.isTypeSupported(Uc(b,a));var c=Uc("audio",a),d=Uc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Tc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
100
- function Uc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Vc(a,b){a.l=!0;a.h=new lc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Wc(){}function Xc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Yc(a,b,c){a=Xc(a,b);if(Tc(a)){if(Kb.get("muxjs")())return Uc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
101
- function Zc(a){var b=$c(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 ad(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function $c(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",Wc);Wc.getFullType=Xc;
103
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function bd(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 cd(a){return dd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}bd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
104
- function ed(a,b,c,d){var e,f,g,h;return K(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(Fb(b)),k["return"]();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Fb(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
- bd.prototype.remove=function(a,b){var c=this;return K(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 fd(a,b,c){a.l=b;a.m=c}function gd(a,b,c){a.B=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
106
- function hd(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new hb(c.startTime,c.endTime,c.text)});return b}function id(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())id(a,d.value,c)}
107
- function jd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);id(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=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
108
- a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",bd);bd.prototype.destroy=bd.prototype.destroy;bd.findParser=function(a){return dd[a]};bd.unregisterParser=function(a){delete dd[a]};bd.registerParser=function(a,b){dd[a]=b};var dd={};function kd(){}function ld(a,b){a=Q(a);b=Q(b);return a.split("-")[0]==b.split("-")[0]}function md(a,b){a=Q(a);b=Q(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function nd(a,b){a=Q(a);b=Q(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Q(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=od.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
109
- function pd(a,b){a=Q(a);b=Q(b);return b==a?4:md(b,a)?3:nd(b,a)?2:md(a,b)?1:0}function td(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=od.get(a)||a}function vd(a){return a.language?Q(a.language):a.audio&&a.audio.language?Q(a.audio.language):a.video&&a.video.language?Q(a.video.language):"und"}
110
- function wd(a,b){for(var c=Q(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(Q(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,md(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,nd(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,md(c,f))return f;return null}M("shaka.util.LanguageUtils",kd);kd.findClosestLocale=wd;kd.getLocaleForVariant=vd;
111
- kd.getLocaleForText=function(a){return Q(a.language||"und")};kd.getBase=td;kd.relatedness=pd;kd.areSiblings=function(a,b){var c=td(a),d=td(b);return a!=c&&b!=d&&c==d};kd.normalize=Q;kd.isSiblingOf=nd;kd.isParentOf=md;kd.areLanguageCompatible=ld;kd.areLocaleCompatible=function(a,b){a=Q(a);b=Q(b);return a==b};
112
- var od=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",
81
+ function Jb(a){var b;a instanceof Jb?(Kb(this,a.Da),this.pb=a.pb,this.Fa=a.Fa,Lb(this,a.Jb),this.qa=a.qa,Mb(this,a.g.clone()),this.gb=a.gb):a&&(b=String(a).match(Ib))?(Kb(this,b[1]||"",!0),this.pb=Nb(b[2]||""),this.Fa=Nb(b[3]||"",!0),Lb(this,b[4]),this.qa=Nb(b[5]||"",!0),Mb(this,b[6]||"",!0),this.gb=Nb(b[7]||"")):this.g=new Ob(null)}r=Jb.prototype;r.Da="";r.pb="";r.Fa="";r.Jb=null;r.qa="";r.gb="";
82
+ r.toString=function(){var a=[],b=this.Da;b&&a.push(Pb(b,Qb,!0),":");if(b=this.Fa){a.push("//");var c=this.pb;c&&a.push(Pb(c,Qb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Jb;null!=b&&a.push(":",String(b))}if(b=this.qa)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Pb(b,"/"==b.charAt(0)?Rb:Sb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.gb)&&a.push("#",Pb(b,Tb));return a.join("")};
83
+ r.resolve=function(a){var b=this.clone();"data"===b.Da&&(b=new Jb);var c=!!a.Da;c?Kb(b,a.Da):c=!!a.pb;c?b.pb=a.pb:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Jb;var d=a.qa;if(c)Lb(b,a.Jb);else if(c=!!a.qa){if("/"!=d.charAt(0))if(this.Fa&&!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(""):".."==
84
+ 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?Mb(b,a.g.clone()):c=!!a.gb;c&&(b.gb=a.gb);return b};r.clone=function(){return new Jb(this)};function Kb(a,b,c){a.Da=c?Nb(b,!0):b;a.Da&&(a.Da=a.Da.replace(/:$/,""))}function Lb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Jb=b}else a.Jb=null}function Mb(a,b,c){b instanceof Ob?a.g=b:(c||(b=Pb(b,Vb)),a.g=new Ob(b))}
85
+ function Nb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Pb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Wb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Wb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Qb=/[#\/\?@]/g,Sb=/[#\?:]/g,Rb=/[#\?]/g,Vb=/[#\?@]/g,Tb=/#/g;function Ob(a){this.g=a||null}
86
+ function Xb(a){if(!a.ma&&(a.ma={},a.Nc=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," ")))}}r=Ob.prototype;r.ma=null;r.Nc=null;r.add=function(a,b){Xb(this);this.g=null;var c=this.ma.hasOwnProperty(a)&&this.ma[a];c||(this.ma[a]=c=[]);c.push(b);this.Nc++;return this};
87
+ r.set=function(a,b){Xb(this);this.g=null;this.ma.hasOwnProperty(a)?this.ma[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.ma)return"";var a=[],b;for(b in this.ma)for(var c=encodeURIComponent(b),d=this.ma[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Ob;a.g=this.g;if(this.ma){var b={},c;for(c in this.ma)b[c]=this.ma[c].concat();a.ma=b;a.Nc=this.Nc}return a};function Yb(a,b){return a.concat(b)}function Zb(){}function $b(a){return null!=a};function ac(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Jb(d)});return a.map(function(d){return new Jb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Yb,[]).map(function(d){return d.toString()})}function bc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
88
+ function cc(a,b){if(1==b.length)return b[0];var c=dc(a,b);if(null!=c)return c;throw new O(2,4,4025,b);}function dc(a,b){for(var c=t(ec[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==fc?"":null}
89
+ var fc="text",gc={ua:"video",Gc:"audio",Z:fc,Vb:"image",Fg:"application"},ec={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 hc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}hc.prototype.resolve=function(){};hc.prototype.reject=function(){};function ic(a){this.h=a;this.g=void 0}ic.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function jc(a){this.h=a;this.g=null}jc.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};jc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Q(a){this.h=a;this.g=null}Q.prototype.Lb=function(){this.stop();this.h();return this};Q.prototype.O=function(a){var b=this;this.stop();this.g=(new jc(function(){b.h()})).O(a);return this};Q.prototype.Ba=function(a){var b=this;this.stop();this.g=(new jc(function(){b.g.O(a);b.h()})).O(a);return this};Q.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};L("shaka.util.Timer",Q);Q.prototype.stop=Q.prototype.stop;Q.prototype.tickEvery=Q.prototype.Ba;Q.prototype.tickAfter=Q.prototype.O;
90
+ Q.prototype.tickNow=Q.prototype.Lb;function kc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function lc(a){return""!=mc().canPlayType(a)}function nc(){return oc("Xbox One")}function pc(){return oc("Tizen")}function qc(){return oc("Web0S")&&oc("Chrome/38.0.2125.122 Safari/537.36")}function rc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!pc()&&!oc("PC=EOS")&&!oc("VirginMedia")&&!sc()&&!oc("AFT")}function sc(){return oc("PlayStation 4")}
91
+ function tc(){if(!rc())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 oc(a){return(navigator.userAgent||"").includes(a)}function mc(){if(uc)return uc;vc||(vc=new Q(function(){uc=null}));(uc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(uc=document.createElement("video"));vc.O(1);return uc}var vc=null,uc=null;function wc(){}
92
+ function xc(a){if(!a)return"";a=N(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!sc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==(a[c+
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 yc(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=Hb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return zc.value()(d)}
95
+ function Ac(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=N(a);if(239==c[0]&&187==c[1]&&191==c[2])return xc(c);if(254==c[0]&&255==c[1])return yc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return yc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return yc(a,!1);if(0==c[1]&&0==c[3])return yc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return xc(a);throw new O(2,2,2003);}
96
+ function Bc(a){if(window.TextEncoder&&!sc()){var b=new TextEncoder;return Fb(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 Fb(b)}function Cc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}L("shaka.util.StringUtils",wc);wc.resetFromCharCode=function(){zc.g=void 0};wc.toUTF16=Cc;wc.toUTF8=Bc;wc.fromBytesAutoDetect=Ac;wc.fromUTF16=yc;
97
+ wc.fromUTF8=xc;var zc=new ic(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Va:65536};0<b.Va;b={Va:b.Va},b.Va/=2)if(a(b.Va))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Va)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Va));return e}}(b);return null});function Dc(){}function Ec(a){a=N(a);a=zc.value()(a);return btoa(a)}function Fc(a,b){b=void 0==b?!0:b;var c=Ec(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Gc(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 Hc(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 Ic(a){var b=N(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Jc(){for(var a=Ja.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(N(d),c),c+=d.byteLength;return b}L("shaka.util.Uint8ArrayUtils",Dc);Dc.concat=Jc;Dc.toHex=Ic;Dc.fromHex=Hc;Dc.fromBase64=Gc;Dc.toBase64=Fc;Dc.toStandardBase64=Ec;function Kc(){}L("shaka.dependencies",Kc);Kc.has=function(a){return Lc.has(a)};Kc.add=function(a,b){if(!Mc[a])throw Error(a+" is not supported");Lc.set(a,function(){return b})};var Mc={muxjs:"muxjs"};Kc.Allowed=Mc;var Lc=new Map([["muxjs",function(){return window.muxjs}]]);function Nc(a){var b=this;this.o=a;this.m=Lc.get("muxjs")();this.g=new this.m.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.l=[];this.i=[];this.j=!1;this.g.on("data",function(c){b.i=c.captions;b.l.push(Jc(c.initSegment,c.data))});this.g.on("done",function(){var c={data:Jc.apply(Dc,ia(b.l)),captions:b.i};b.h.resolve(c);b.j=!1})}Nc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
99
+ function Oc(a,b){var c=Pc(a),d="audio/aac"==a.toLowerCase().split(";")[0];if(!Lc.get("muxjs")()||!c&&!d)return!1;if(d)return MediaSource.isTypeSupported('audio/mp4; codecs="mp4a.40.2"');if(b)return MediaSource.isTypeSupported(Qc(b,a));c=Qc("audio",a);d=Qc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Pc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
100
+ function Rc(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp4a.40.2"':Pc(b)?Qc(a,b):b}function Qc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}
101
+ function Sc(a,b){a.j=!0;a.h=new hc;a.l=[];a.i=[];var c=N(b);a.g.push(c);a.g.flush();a.j&&a.h.reject(new O(2,3,3018));return a.h};function Tc(){}function Uc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Vc(a,b,c){a=Uc(a,b);return Oc(a,c)?Rc(c,a):"audio"==c?a.replace("video","audio"):a}
102
+ function Wc(a){var b=Xc(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";
103
+ 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 Yc(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Xc(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}L("shaka.util.MimeUtils",Tc);Tc.getFullType=Uc;
104
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Zc(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 $c(a){return ad[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}Zc.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
105
+ function bd(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(N(b)),k["return"]();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(N(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)})}
106
+ Zc.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 cd(a,b,c){a.l=b;a.m=c}function dd(a,b,c){a.B=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
107
+ function ed(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new hb(c.startTime,c.endTime,c.text)});return b}function fd(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())fd(a,d.value,c)}
108
+ function gd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);fd(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=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
109
+ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}L("shaka.text.TextEngine",Zc);Zc.prototype.destroy=Zc.prototype.destroy;Zc.findParser=function(a){return ad[a]};Zc.unregisterParser=function(a){delete ad[a]};Zc.registerParser=function(a,b){ad[a]=b};var ad={};function hd(){}function id(a,b){a=jd(a);b=jd(b);return a.split("-")[0]==b.split("-")[0]}function kd(a,b){a=jd(a);b=jd(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function ld(a,b){a=jd(a);b=jd(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function jd(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=md.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
110
+ function nd(a,b){a=jd(a);b=jd(b);return b==a?4:kd(b,a)?3:ld(b,a)?2:kd(a,b)?1:0}function od(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=md.get(a)||a}function pd(a){return a.language?jd(a.language):a.audio&&a.audio.language?jd(a.audio.language):a.video&&a.video.language?jd(a.video.language):"und"}
111
+ function qd(a,b){for(var c=jd(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(jd(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,kd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,ld(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,kd(c,f))return f;return null}L("shaka.util.LanguageUtils",hd);hd.findClosestLocale=qd;hd.getLocaleForVariant=pd;
112
+ hd.getLocaleForText=function(a){return jd(a.language||"und")};hd.getBase=od;hd.relatedness=nd;hd.areSiblings=function(a,b){var c=od(a),d=od(b);return a!=c&&b!=d&&c==d};hd.normalize=jd;hd.isSiblingOf=ld;hd.isParentOf=kd;hd.areLanguageCompatible=id;hd.areLocaleCompatible=function(a,b){a=jd(a);b=jd(b);return a==b};
113
+ var md=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
114
  "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
115
  "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
116
  "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
117
  "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 xd(){this.g={}}r=xd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function yd(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function zd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Ad(f,b,c);f=Bd(f,d);b=Cd(f);b=Dd(b);var g=Ed(b,e);a.variants=a.variants.filter(function(h){return Fd(h)==g?!0:!1})}function Cd(a){var b=new xd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Fd(c);b.push(d,c)}return b}
118
- function Dd(a){var b=0,c=new Map,d=a.size();yd(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new xd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
119
- function Ad(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={ud:d.ud},e=b.next())if(d.ud=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.ud)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={fd:d.fd},b=c.next())if(d.fd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.fd)}}(d)),b.length){a=b;break}return a}
120
- function Ed(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Gd||d==Hd){if(a=Id(a,d),1==a.size())return a.keys()[0]}else if(d==Jd)break;return Kd(a)}function Id(a,b){var c=0,d=new xd;yd(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
121
- function Kd(a){var b="",c=Infinity;yd(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Fd(a){var b="";a.video&&(b=Zc(a.video.codecs));var c="";a.audio&&(c=Zc(a.audio.codecs));return b+"-"+c}function Ld(a,b,c){a.variants=a.variants.filter(function(d){return Md(d,b,c)})}
122
- function Md(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;if(0!=a.disabledUntilTime){if(a.disabledUntilTime>Date.now()/1E3)return!1;a.disabledUntilTime=0}return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
123
- function Nd(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Md(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Od(a,b){return K(function(c){if(1==c.g)return u(c,Pd(b,0<b.offlineSessionIds.length),2);Qd(a,b);Rd(b);return u(c,Sd(b),0)})}
124
- function Pd(a,b){return K(function(c){if(1==c.g)return u(c,Td(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Ud(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=gc("video",g);g=gc("audio",g);g=Yc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Yc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Vd(f.codecs),f=Yc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(rc()&&e&&(e.width&&
125
- 1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(Wd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Wd(d));return e});A(c)})}
126
- function Td(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return K(function(D){if(1==D.g)return C(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return w=D.h,y.decodingInfos.push(w),va(D,0);F(D);JSON.stringify(x);A(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Xd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
118
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function rd(){this.g={}}r=rd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function sd(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function td(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=ud(f,b,c);f=vd(f,d);b=wd(f);b=xd(b);var g=yd(b,e);a.variants=a.variants.filter(function(h){return zd(h)==g?!0:!1})}function wd(a){var b=new rd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=zd(c);b.push(d,c)}return b}
119
+ function xd(a){var b=0,c=new Map,d=a.size();sd(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new rd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
120
+ function ud(a,b,c){var d={};b=t(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=t(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}
121
+ function yd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Ad||d==Bd){if(a=Cd(a,d),1==a.size())return a.keys()[0]}else if(d==Dd)break;return Ed(a)}function Cd(a,b){var c=0,d=new rd;sd(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
122
+ function Ed(a){var b="",c=Infinity;sd(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function zd(a){var b="";a.video&&(b=Wc(a.video.codecs));var c="";a.audio&&(c=Wc(a.audio.codecs));return b+"-"+c}function Fd(a,b,c){a.variants=a.variants.filter(function(d){return Gd(d,b,c)})}
123
+ function Gd(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}
124
+ function Hd(a,b,c){var d=!1;a=t(a);for(var e=a.next();!e.done;e=a.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=Gd(e,b,c);f!=e.allowedByApplication&&(d=!0)}return d}function Id(a,b){return G(function(c){if(1==c.g)return u(c,Jd(b,0<b.offlineSessionIds.length),2);Kd(a,b);Ld(b);return u(c,Md(b),0)})}
125
+ function Jd(a,b){return G(function(c){if(1==c.g)return u(c,Nd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Od(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=cc("video",g);g=cc("audio",g);g=Vc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Vc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Pd(f.codecs),f=Vc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(nc()&&e&&(e.width&&
126
+ 1920<e.width||e.height&&1080<e.height)&&(e.codecs.includes("avc1.")||e.codecs.includes("avc3.")))return Za(Qd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Qd(d));return e});A(c)})}
127
+ function Nd(a,b,c){var d,e,f,g,h,k,l,m,n,p,q;return G(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return G(function(C){if(1==C.g)return D(C,2),u(C,e.decodingInfo(x),4);if(2!=C.g)return w=C.h,y.decodingInfos.push(w),za(C,0);Aa(C);JSON.stringify(x);A(C)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Rd(l,b,c),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,f.push(g(l,q));return u(v,Promise.all(f),
127
128
  0)})}
128
- function Xd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=gc("video",g);f=Ud(f);g=gc("audio",g);g=Yc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Ud(f);f=Yc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
129
- break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Vd(d.codecs),f=Yc(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
129
+ function Rd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=cc("video",g);f=Od(f);g=cc("audio",g);g=Vc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Od(f);f=Vc(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";
130
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Pd(d.codecs),f=Vc(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
130
131
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var n=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};n=t(n);for(h=n.next();!h.done;h=n.next()){h=h.value;if(h.initData&&h.initData.length){for(var p=new Set,q=t(h.initData),v=q.next();!v.done;v=q.next())p.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
131
- (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Vd(a){return tc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
132
- function Ud(a){return"vp9"==a?"vp09.00.41.08":a}function Qd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Yd(d,a.audio)||c&&a&&a.video&&!Yd(c,a.video)?!1:!0})}function Rd(a){a.textStreams=a.textStreams.filter(function(b){return cd(Xc(b.mimeType,b.codecs))})}
133
- function Sd(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Zd.has(f)){l.A(5);break}g=$d.get(f);if(!g){Zd.set(f,!1);l.A(5);break}return u(l,ae(g),7);case 7:h=l.h,Zd.set(f,h);case 5:(k=Zd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,A(l)}})}
134
- function ae(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 Yd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
135
- function be(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
132
+ (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Pd(a){return pc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
133
+ function Od(a){return"vp9"==a?"vp09.00.41.08":a}function Kd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Sd(d,a.audio)||c&&a&&a.video&&!Sd(c,a.video)?!1:!0})}function Ld(a){a.textStreams=a.textStreams.filter(function(b){return $c(Uc(b.mimeType,b.codecs))})}
134
+ function Md(a){var b,c,d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Td.has(f)){l.A(5);break}g=Ud.get(f);if(!g){Td.set(f,!1);l.A(5);break}return u(l,Vd(g),7);case 7:h=l.h,Td.set(f,h);case 5:(k=Td.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,A(l)}})}
135
+ function Vd(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)})["catch"](function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Sd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
136
+ function Wd(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
136
137
  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
138
  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 ce(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,
139
+ function Xd(a){return{id:a.id,active:!1,type:fc,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
140
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
140
- function de(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 ee(a){a.__shaka_id||(a.__shaka_id=fe++);return a.__shaka_id}
142
- function ge(a){var b=he(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 ie(a){var b=he(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 he(a){return{id:ee(a),active:!1,type:"",bandwidth:0,language:Q(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 je(a){return a.allowedByApplication&&a.allowedByKeySystem}function ke(a){return a.filter(function(b){return je(b)})}
145
- function Bd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
146
- function le(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=wd(Q(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Q(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=me(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(bc,[]);return a.length?
147
- me(e,a[0]):e}function me(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Wd(a){var b=[];a.audio&&b.push(ne(a.audio));a.video&&b.push(ne(a.video));return b.join(", ")}
148
- function ne(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
149
- var fe=0,Gd="smooth",Hd="powerEfficient",Jd="bandwidth",Zd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),$d=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function oe(){var a=this;this.l=null;this.o=!1;this.i=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.o){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.m=[];this.u=1;this.B=!1;this.h=this.j=this.g=this.s=null;this.D=new O(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}r=oe.prototype;
141
+ function Yd(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
142
+ 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 Zd(a){a.__shaka_id||(a.__shaka_id=$d++);return a.__shaka_id}
143
+ function ae(a){var b=be(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function ce(a){var b=be(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
144
+ function be(a){return{id:Zd(a),active:!1,type:"",bandwidth:0,language:jd(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,
145
+ originalTextId:null,originalImageId:null}}function de(a){return a.allowedByApplication&&a.allowedByKeySystem}function ee(a){return a.filter(function(b){return de(b)})}
146
+ function vd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
147
+ function fe(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=qd(jd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return jd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ge(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Yb,[]);return a.length?
148
+ ge(e,a[0]):e}function ge(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Qd(a){var b=[];a.audio&&b.push(he(a.audio));a.video&&b.push(he(a.video));return b.join(", ")}
149
+ function he(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
150
+ var $d=0,Ad="smooth",Bd="powerEfficient",Dd="bandwidth",Td=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Ud=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ie(){var a=this;this.l=null;this.o=!1;this.i=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.o){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.m=[];this.u=1;this.B=!1;this.h=this.j=this.g=this.s=null;this.D=new Q(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}r=ie.prototype;
150
151
  r.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()};r.init=function(a){this.l=a};
151
- r.chooseVariant=function(){var a=Infinity,b=Infinity;this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=pe(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(qe(this));this.m.length&&!a.length&&(a=pe(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.u)?1:Math.abs(this.u),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},
152
- 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};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
153
- r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.B){var c=this.i;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.i.getBandwidthEstimate(qe(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(qe(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.u=a};
154
- r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.P(re)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function qe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
155
- function pe(a,b,c,d){a&&(b=b.filter(function(e){return Md(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}M("shaka.abr.SimpleAbrManager",oe);oe.prototype.configure=oe.prototype.configure;oe.prototype.setMediaElement=oe.prototype.setMediaElement;oe.prototype.playbackRateChanged=oe.prototype.playbackRateChanged;oe.prototype.setVariants=oe.prototype.setVariants;oe.prototype.getBandwidthEstimate=oe.prototype.getBandwidthEstimate;oe.prototype.segmentDownloaded=oe.prototype.segmentDownloaded;
156
- oe.prototype.disable=oe.prototype.disable;oe.prototype.enable=oe.prototype.enable;oe.prototype.chooseVariant=oe.prototype.chooseVariant;oe.prototype.init=oe.prototype.init;oe.prototype.stop=oe.prototype.stop;var re=1;function se(a,b){this.g=a;this.h=b}se.prototype.toString=function(){return"v"+this.g+"."+this.h};function te(){var a=new se(5,0),b=ue,c=b.g,d=a.h-c.h;(0<(a.g-c.g||d)?b.i:b.h)(b.g,a,"AbrManager","Please use an AbrManager with setMediaElement function.")}function ve(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function we(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var ue=null;function xe(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}xe.prototype.add=function(a){return ye(this.h,a)?(this.g.add(a),!0):!1};
157
- function ye(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)&&ze(c,d)&&Ae(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(ze(c,d)&&Ae(c.roles,d.roles)));return c?!1:!0}xe.prototype.values=function(){return this.g.values()};
158
- function ze(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return $c(f)[0]}),d=b.codecs.split(",").map(function(f){return $c(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function Ae(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function Be(a){this.g=a;this.h=new Ce(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}Be.prototype.create=function(a){var b=this,c=a.filter(function(d){return ye(b.g,d)});return c.length?new xe(c[0],c):this.h.create(a)};function Ce(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
159
- Ce.prototype.create=function(a){var b=[];b=De(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=Ee(b,this.j);a.length&&(b=a);this.g&&(a=Bd(b,this.g),a.length&&(b=a));this.h&&(a=Fe(b,this.h),a.length&&(b=a));a=new xe(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,ye(a.h,c)&&a.add(c);return a};function De(a,b){var c=Q(b),d=wd(c,a.map(function(e){return vd(e)}));return d?a.filter(function(e){return d==vd(e)}):[]}
160
- function Ee(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Fe(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ge(){this.g=He;this.h=(new Map).set(He,2).set(Ie,1)}function Je(a,b,c){a.h.set(He,c).set(Ie,b)}var Ie=0,He=1;function Ke(a,b){var c=Le();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 Me(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).P(c/1E3)}),2)}a.h*=a.m;A(d)})}function Le(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ne(a,b){this.promise=a;this.i=b;this.g=!1}function Oe(a){return new Ne(Promise.reject(a),function(){return Promise.resolve()})}function Pe(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Ne(a,function(){return Promise.resolve()})}function Qe(a){return new Ne(Promise.resolve(a),function(){return Promise.resolve()})}function Re(a){return new Ne(a,function(){return a["catch"](function(){})})}Ne.prototype.abort=function(){this.g=!0;return this.i()};
162
- function Se(a){return new Ne(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ne.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
163
- Ne.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=Te(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new lc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ne(f,function(){return d()})};
164
- function Te(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Ne);Ne.prototype.chain=Ne.prototype.Z;Ne.prototype["finally"]=Ne.prototype["finally"];Ne.all=Se;Ne.prototype.abort=Ne.prototype.abort;Ne.notAbortable=Re;Ne.completed=Qe;Ne.aborted=Pe;Ne.failed=Oe;function R(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
165
- function Ue(a){var b=new R(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}R.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};R.prototype.stopImmediatePropagation=function(){this.g=!0};R.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",R);
166
- var Ve={vg:"abrstatuschanged",wg:"adaptation",xg:"buffering",zg:"downloadfailed",Ag:"downloadheadersreceived",Bg:"drmsessionupdate",Dg:"emsg",Error:"error",Eg:"expirationupdated",Fg:"gapjumped",Hg:"loaded",Ig:"loading",Kg:"manifestparsed",Lg:"mediaqualitychanged",Metadata:"metadata",Ng:"onstatechange",Og:"onstateidle",Pg:"ratechange",Rg:"sessiondata",Sg:"stalldetected",Tg:"streaming",Ug:"textchanged",Vg:"texttrackvisibility",Wg:"timelineregionadded",Xg:"timelineregionenter",Yg:"timelineregionexit",
167
- Zg:"trackschanged",ah:"unloading",bh:"variantchanged"};function We(){this.da=new xd;this.Lc=this}We.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};We.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};We.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=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Lc;a.currentTarget=this.Lc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
168
- We.prototype.release=function(){this.da=null};function Xe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Ze.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function af(a,b,c){We.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(af,We);r=af.prototype;r.ae=function(a){this.o=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Wf:b,Xf:void 0===d?!1:d}}r.Yf=function(a){this.g.add(a)};r.og=function(a){this.g["delete"](a)};r.ef=function(){this.g.clear()};r.Zf=function(a){this.h.add(a)};r.pg=function(a){this.h["delete"](a)};r.ff=function(){this.h.clear()};
169
- function ef(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();We.prototype.release.call(this);return this.m.destroy()};
170
- r.request=function(a,b){var c=this,d=new ff;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new gf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):Le();b.uris=Xe(b.uris);e=hf(this,a,b);var f=e.Z(function(){return jf(c,a,b,new Ke(b.retryParameters,!1),0,null,d)}),g=f.Z(function(n){return kf(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.Z(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.Lf||!c.l||q.fromCache||a!=lf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new gf(m.promise,function(){return m.abort()},d);$e(this.m,e);return e};
172
- function hf(a,b,c){var d=Qe(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={pd:e.pd},f=a.next())e.pd=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.pd(b,c)}}(e));return d.Z(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
173
- function jf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Nb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=df[k])?k.Wf:null;if(!m)return Oe(new N(2,1,1E3,h));var n=k.Xf,p=null,q=null,v=!1,y=!1,x;return Re(Me(d)).Z(function(){if(a.i)return Pe();x=Date.now();var w=m(c.uris[e],c,b,function(B,G,E){p&&p.stop();q&&q.P(z/1E3);a.l&&b==lf&&(a.l(B,G),l=!0,g.g=E)},function(B){a.j&&a.j(B,c,b);y=!0});
174
- if(!n)return w;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;w.abort()}),p.P(D/1E3));var z=c.retryParameters.stallTimeout;z&&(q=new O(function(){v=!0;w.abort()}));return w}).Z(function(w){p&&p.stop();q&&q.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var D={response:w,Lf:l};!y&&a.j&&a.j(w.headers,c,b);return D},function(w){p&&p.stop();q&&q.stop();if(a.s){var D=null,z=0;w instanceof N&&(D=w,1001==w.code&&(z=w.data[1]));a.s(c,D,z,v)}if(a.i)return Pe();v&&(w=new N(1,1,1003,
175
- c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new R("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,jf(a,b,c,d,e,w,g)}throw w;})}
176
- function kf(a,b,c){var d=Qe(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={qd:e.qd},f=a.next())e.qd=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.qd(b,h)}}(e));return d.Z(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",af);af.prototype.request=af.prototype.request;af.prototype.destroy=af.prototype.destroy;af.makeRequest=ef;
177
- af.defaultRetryParameters=function(){return Le()};af.prototype.clearAllResponseFilters=af.prototype.ff;af.prototype.unregisterResponseFilter=af.prototype.pg;af.prototype.registerResponseFilter=af.prototype.Zf;af.prototype.clearAllRequestFilters=af.prototype.ef;af.prototype.unregisterRequestFilter=af.prototype.og;af.prototype.registerRequestFilter=af.prototype.Yf;af.unregisterScheme=function(a){delete df[a]};af.registerScheme=bf;af.prototype.setForceHTTPS=af.prototype.ae;function ff(){this.g=0}
178
- af.NumBytesRemainingClass=ff;function gf(a,b,c){Ne.call(this,a,b);this.h=c}pa(gf,Ne);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new lc;this.i=a}mf.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function nf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function of(){this.g=new xd}r=of.prototype;r.release=function(){this.mb();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.xc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};r.xc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.xc(),this.g.remove(b,e))}};
179
- r.mb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.xc();this.g.g={}}};M("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.mb;of.prototype.unlisten=of.prototype.xc;of.prototype.listenOnce=of.prototype.oa;of.prototype.listen=of.prototype.C;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
180
- pf.prototype.xc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function qf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return rf(a)?b:b.capture||!1}
181
- function rf(a){var b=sf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}sf=b}return b||!1}var sf=void 0;function tf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function uf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function vf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function yf(a,b){this.S=Ib(a);this.h=b==zf;this.g=0}r=yf.prototype;r.ma=function(){return this.g<this.S.byteLength};r.$=function(){return this.g};r.uf=function(){return this.S.byteLength};r.Qa=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw Af();}};r.Sd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Af();}};r.N=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};
182
- r.Je=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};r.Jb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Af();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.S.byteLength)throw Af();var b=Fb(this.S,this.g,a);this.g+=a;return b};
183
- r.skip=function(a){if(this.g+a>this.S.byteLength)throw Af();this.g+=a};r.eg=function(a){if(this.g<a)throw Af();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw Af();this.g=a};r.qc=function(){for(var a=this.g;this.ma()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Fb(this.S,a,this.g-a);this.g+=1;return Bc(a)};function Af(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",yf);yf.prototype.readTerminatedString=yf.prototype.qc;yf.prototype.seek=yf.prototype.seek;yf.prototype.rewind=yf.prototype.eg;
184
- yf.prototype.skip=yf.prototype.skip;yf.prototype.readBytes=yf.prototype.Za;yf.prototype.readUint64=yf.prototype.Jb;yf.prototype.readInt32=yf.prototype.Je;yf.prototype.readUint32=yf.prototype.N;yf.prototype.readUint16=yf.prototype.Sd;yf.prototype.readUint8=yf.prototype.Qa;yf.prototype.getLength=yf.prototype.uf;yf.prototype.getPosition=yf.prototype.$;yf.prototype.hasMoreData=yf.prototype.ma;var zf=1;yf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:zf};function Bf(){this.i=[];this.h=[];this.g=!1}r=Bf.prototype;r.box=function(a,b){var c=Cf(a);this.i[c]=Df;this.h[c]=b;return this};r.U=function(a,b){var c=Cf(a);this.i[c]=Ef;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new yf(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Zc(0,a,b,c)};
185
- r.Zc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Ef){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.Za(d):new Uint8Array(0),b=new yf(b,0),k({parser:this,partialOkay:c||
186
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function Ff(a){for(var b=Gf(a);a.reader.ma()&&!a.parser.g;)a.parser.Zc(a.start+b,a.reader,a.partialOkay)}function Hf(a){for(var b=Gf(a),c=a.reader.N(),d=0;d<c&&(a.parser.Zc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function If(a){return function(b){a(b.reader.Za(b.reader.S.byteLength-b.reader.$()))}}
187
- function Cf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Jf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Gf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Bf);Bf.headerSize=Gf;Bf.typeToString=Jf;Bf.allData=If;Bf.sampleDescription=Hf;Bf.children=Ff;Bf.prototype.parseNext=Bf.prototype.Zc;Bf.prototype.parse=Bf.prototype.parse;Bf.prototype.stop=Bf.prototype.stop;
188
- Bf.prototype.fullBox=Bf.prototype.U;Bf.prototype.box=Bf.prototype.box;var Df=0,Ef=1;function Mf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Bf).box("moov",Ff).box("moof",Ff).U("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Pc(c.reader.Za(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Pc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
189
- function Nf(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Ib(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Oc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Of(a,b){var c=Pf(a,b);return 1!=c.length?null:c[0]}function Qf(a,b,c){a=Rf(a,b,c);return 1!=a.length?null:a[0]}function Pf(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Sf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
190
- function Rf(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Tf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Uf(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Vf(a){return Array.from(a.childNodes).every(Wf)?a.textContent.trim():null}
191
- function Wf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Xf(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Yf(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
192
- function Zf(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
193
- function $f(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function ag(a){a=Number(a);return 0===a%1?a:null}function bg(a){a=Number(a);return 0===a%1&&0<a?a:null}function cg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function dg(a){a=Number(a);return isNaN(a)?null:a}function eg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
194
- function fg(a,b){var c=new DOMParser,d=gg.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function hg(a,b){try{var c=Bc(a);return fg(c,b)}catch(d){return null}}
195
- var gg=new mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ig(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ha=this.ca=!1;this.I=0;this.g=null;this.s=new of;this.i=new Map;this.B=[];this.o=new lc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ia=new Map;this.da=new Map;this.T=new O(function(){return jg(c)});this.M=!1;this.L=[];this.O=!1;this.ea=(new O(function(){kg(c)})).Ca(b);this.o["catch"](function(){});this.j=new mf(function(){return lg(c)});this.Y=!1;this.F=null}r=ig.prototype;r.destroy=function(){return this.j.destroy()};
196
- function lg(a){return K(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,mg(a),2);case 2:if(!a.l){b.A(3);break}C(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,A(b)}})}r.configure=function(a){this.h=a};function ng(a,b,c){a.ha=!0;a.B=[];a.M=c;return og(a,b)}
197
- function pg(a,b,c){a.B=c;a.M=0<c.length;return og(a,b)}function qg(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return rg(a,g,[])}
198
- function og(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g){if(c=sg(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=vf(a.h.servers),tg(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=ug(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,vg(q,vf(a.h.servers),vf(a.h.advanced||{}),a.h.keySystemsMapping);
199
- return u(x,Td(b,a.M,a.Y),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,x["return"](Promise.resolve());y=rg(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
200
- function wg(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c["return"]();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return nf(a.j),c["return"]();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new N(2,6,6003,b.message));case 5:nf(a.j),A(c)}})}function xg(a,b){return K(function(c){if(1==c.g)return u(c,wg(a),2);yg(a,b.initDataType,Fb(b.initData));A(c)})}
201
- r.Yb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.u)return b.s.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d["return"]();b.l=a;b.s.oa(b.l,"play",function(){for(var e=t(b.L),f=e.next();!f.done;f=e.next())zg(b,f.value);b.O=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return mg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.B.length?
202
- u(d,wg(b),2):d.A(2)}Ag(b);c||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(e){return xg(b,e)});A(d)})};
203
- function Bg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=ef([a.g.serverCertificateUri],a.h.retryParameters);C(g,3);c=a.D.kb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
204
- C(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Cg(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Dg(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ja=new lc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);A(f)})}
205
- function Ag(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,yg(a,d.initDataType,d.initData);c=t(a.B);for(d=c.next();!d.done;d=c.next())Dg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function yg(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!sc("Tizen 2"))return;0<a.i.size&&Eg(a)&&(a.o.resolve(),a.o=new lc,a.o["catch"](function(){}));Fg(a,b,c,a.g.sessionType)}}
206
- function Gg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Hg(a){a=a.i.keys();a=tf(a,function(b){return b.sessionId});return Array.from(a)}r.ec=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Nc=function(){return wf(this.da)};
207
- function rg(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Ig(a,c,d);x.A(2);break}return u(x,Jg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);nf(a.j);C(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var w=
208
- f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],G=[],E=[],H=new Set;Kg(D,z,G,B,E,H);var I=a.M?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};D=t(D);for(z=D.next();!z.done;z=
209
- D.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),z=[],B=[],G=[],E=[],H=new Set,Kg(w.drmInfos,z,G,B,E,H),D={keySystem:D,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
210
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,nf(a.j),a.u=v,a.ca=!0,u(x,Bg(a),7);case 7:nf(a.j);va(x,0);break;case 4:y=F(x);nf(a.j,y);a.g=null;a.G.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
211
- function Ig(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(ug(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={nd:d.nd},e=a.next())for(d.nd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
212
- l.nd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
213
- function Jg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);C(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
214
- w.h,w["return"](c);case 6:F(w);case 7:nf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){w.A(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();w.A(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=p){w.A(13);break}C(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:nf(a.j);case 13:h=q.next();w.A(12);break;case 11:return w["return"](c)}})}
215
- function sg(a){a=vf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Oc(f),h=Oc(e);g={kty:"oct",kid:Mc(g,!1),k:Mc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Ic(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
216
- serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
217
- function Dg(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(k):zg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Lg(a,k)});e={initData:null,initDataType:null,loaded:!1,Pd:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);
218
- case 4:f=h.h;nf(a.j);if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Eg(a)&&a.o.resolve();return h["return"](c);case 2:g=F(h),nf(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
219
- function Fg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(f):zg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Lg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Pd:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Mc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
220
- var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}
221
- function zg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;K(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Mc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=ef([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
222
- Gg(a.g.keySystem)&&Mg(g),h=Date.now(),C(x,2),l=a.D.kb.request(2,g),u(x,l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),n=new N(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Mc(k.data);C(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=F(x),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new R("drmsessionupdate");
223
- a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new O(function(){d.loaded=!0;Eg(a)&&a.o.resolve()}),y.P(Ng));A(x)}})}
224
- function Mg(a){var b=Cc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=fg(b,"PlayReadyKeyMessage");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Nc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
225
- function Lg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Gg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||wc())){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Pc(h).slice(0,32);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),
226
- c.close()["catch"](function(){}));Eg(a)&&(a.o.resolve(),a.T.P(Og))}function jg(a){var b=a.ia,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Xc(wf(c))}
227
- function Pg(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,
228
- p;return K(function(q){switch(q.g){case 1:C(q,2);if("org.w3.clearkey"===l&&xc())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,sc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),A(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](wf(f))})}
229
- function Qg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).P(Rg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);A(c)})}
230
- function mg(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return C(g,2),a.ha||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Qg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);A(g)})})),0)})}
231
- function Sg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Da:f.Da},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Da=[];f.Da=f.Da.concat(e.initData||[]);f.Da=f.Da.concat(h.initData||[]);f.Da=f.Da.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Da.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
152
+ r.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=je(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(ke(this));this.m.length&&!a.length&&(a=je(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,
153
+ 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};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
154
+ r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.B){var c=this.i;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.i.getBandwidthEstimate(ke(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(ke(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.u=a};
155
+ r.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(le)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.configure(this.g.advanced)};function ke(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}
156
+ function je(a,b,c,d){a&&(b=b.filter(function(e){return Gd(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}L("shaka.abr.SimpleAbrManager",ie);ie.prototype.configure=ie.prototype.configure;ie.prototype.setMediaElement=ie.prototype.setMediaElement;ie.prototype.playbackRateChanged=ie.prototype.playbackRateChanged;ie.prototype.setVariants=ie.prototype.setVariants;ie.prototype.getBandwidthEstimate=ie.prototype.getBandwidthEstimate;ie.prototype.segmentDownloaded=ie.prototype.segmentDownloaded;
157
+ ie.prototype.disable=ie.prototype.disable;ie.prototype.enable=ie.prototype.enable;ie.prototype.chooseVariant=ie.prototype.chooseVariant;ie.prototype.init=ie.prototype.init;ie.prototype.stop=ie.prototype.stop;var le=1;function me(a,b){this.g=a;this.h=b}me.prototype.toString=function(){return"v"+this.g+"."+this.h};function ne(a,b){var c=new me(5,0),d=oe,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function pe(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function qe(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var oe=null;L("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function re(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}re.prototype.add=function(a){return se(this.h,a)?(this.g.add(a),!0):!1};
158
+ function se(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&te(c,d)&&ue(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(te(c,d)&&ue(c.roles,d.roles)));return c?!1:!0}re.prototype.values=function(){return this.g.values()};
159
+ function te(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return Xc(f)[0]}),d=b.codecs.split(",").map(function(f){return Xc(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function ue(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function ve(a){this.g=a;this.h=new we(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}ve.prototype.create=function(a){var b=this,c=a.filter(function(d){return se(b.g,d)});return c.length?new re(c[0],c):this.h.create(a)};function we(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
160
+ we.prototype.create=function(a){var b=[];b=xe(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ye(b,this.j);a.length&&(b=a);this.g&&(a=vd(b,this.g),a.length&&(b=a));this.h&&(a=ze(b,this.h),a.length&&(b=a));a=new re(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,se(a.h,c)&&a.add(c);return a};function xe(a,b){var c=jd(b),d=qd(c,a.map(function(e){return pd(e)}));return d?a.filter(function(e){return d==pd(e)}):[]}
161
+ function ye(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function ze(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ae(){this.g=Be;this.h=(new Map).set(Be,2).set(Ce,1)}function De(a,b,c){a.h.set(Be,c).set(Ce,b)}var Ce=0,Be=1;function Ee(a,b){var c=Fe();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}
162
+ function Ge(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 Q(e)).O(c/1E3)}),2)}a.h*=a.m;A(d)})}function Fe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function He(a,b){this.promise=a;this.i=b;this.g=!1}function Ie(a){return new He(Promise.reject(a),function(){return Promise.resolve()})}function Je(){var a=Promise.reject(new O(2,7,7001));a["catch"](function(){});return new He(a,function(){return Promise.resolve()})}function Ke(a){return new He(Promise.resolve(a),function(){return Promise.resolve()})}function Le(a){return new He(a,function(){return a["catch"](function(){})})}He.prototype.abort=function(){this.g=!0;return this.i()};
163
+ function Me(a){return new He(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}He.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
164
+ He.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=Ne(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new hc,g=new O(2,7,7001);this.promise.then(c(!0),c(!1));return new He(f,function(){return d()})};
165
+ function Ne(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}L("shaka.util.AbortableOperation",He);He.prototype.chain=He.prototype.Y;He.prototype["finally"]=He.prototype["finally"];He.all=Me;He.prototype.abort=He.prototype.abort;He.notAbortable=Le;He.completed=Ke;He.aborted=Je;He.failed=Ie;function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
166
+ function Oe(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(){};L("shaka.util.FakeEvent",S);
167
+ var Pe={Hg:"abrstatuschanged",Ig:"adaptation",Jg:"buffering",Lg:"downloadfailed",Mg:"downloadheadersreceived",Ng:"drmsessionupdate",Pg:"emsg",bh:"prft",Error:"error",Qg:"expirationupdated",Rg:"gapjumped",Ug:"loaded",Vg:"loading",Xg:"manifestparsed",Yg:"mediaqualitychanged",Metadata:"metadata",$g:"onstatechange",ah:"onstateidle",dh:"ratechange",fh:"segmentappended",gh:"sessiondata",hh:"stalldetected",ih:"streaming",jh:"textchanged",kh:"texttrackvisibility",lh:"timelineregionadded",mh:"timelineregionenter",
168
+ nh:"timelineregionexit",oh:"trackschanged",qh:"unloading",rh:"variantchanged"};function Qe(){this.da=new rd;this.Vc=this}Qe.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Qe.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Qe.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=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Vc;a.currentTarget=this.Vc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
169
+ Qe.prototype.release=function(){this.da=null};function Re(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 Se(a){var b={},c;for(c in a)b[c]=a[c];return b};function Te(){this.g=[]}function Ue(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Te.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Ve(a,b,c){Qe.call(this);this.i=!1;this.m=new Te;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}ra(Ve,Qe);r=Ve.prototype;r.ie=function(a){this.o=a};function We(a,b,c,d){c=c||Xe;var e=Ye[a];if(!e||c>=e.priority)Ye[a]={priority:c,ig:b,jg:void 0===d?!1:d}}r.kg=function(a){this.g.add(a)};r.Ag=function(a){this.g["delete"](a)};r.qf=function(){this.g.clear()};r.lg=function(a){this.h.add(a)};r.Bg=function(a){this.h["delete"](a)};r.rf=function(){this.h.clear()};
170
+ function Ze(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}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Qe.prototype.release.call(this);return this.m.destroy()};
171
+ r.request=function(a,b){var c=this,d=new $e;if(this.i){var e=Promise.reject(new O(2,7,7001));e["catch"](function(){});return new af(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Re(b.retryParameters):Fe();b.uris=Re(b.uris);e=bf(this,a,b);var f=e.Y(function(){return cf(c,a,b,new Ee(b.retryParameters,!1),0,null,d)}),g=f.Y(function(n){return df(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
172
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Y(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.Xf||!c.l||q.fromCache||a!=ef||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new af(m.promise,function(){return m.abort()},d);Ue(this.m,e);return e};
173
+ function bf(a,b,c){var d=Ke(void 0),e={};a=t(a.g);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(){c.body&&(c.body=Fb(c.body));return g.td(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);})}
174
+ function cf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Jb(c.uris[e]),k=h.Da,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Kb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ye[k])?k.ig:null;if(!m)return Ie(new O(2,1,1E3,h));var n=k.jg,p=null,q=null,v=!1,y=!1,x;return Le(Ge(d)).Y(function(){if(a.i)return Je();x=Date.now();var w=m(c.uris[e],c,b,function(B,E,F){p&&p.stop();q&&q.O(z/1E3);a.l&&b==ef&&(a.l(B,E),l=!0,g.g=F)},function(B){a.j&&a.j(B,c,b);y=!0});
175
+ if(!n)return w;var C=c.retryParameters.connectionTimeout;C&&(p=new Q(function(){v=!0;w.abort()}),p.O(C/1E3));var z=c.retryParameters.stallTimeout;z&&(q=new Q(function(){v=!0;w.abort()}));return w}).Y(function(w){p&&p.stop();q&&q.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var C={response:w,Xf:l};!y&&a.j&&a.j(w.headers,c,b);return C},function(w){p&&p.stop();q&&q.stop();if(a.s){var C=null,z=0;w instanceof O&&(C=w,1001==w.code&&(z=w.data[1]));a.s(c,C,z,v)}if(a.i)return Je();v&&(w=new O(1,1,1003,
176
+ c.uris[e],b));if(w instanceof O){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return C=(new Map).set("error",w),C=new S("retry",C),a.dispatchEvent(C),e=(e+1)%c.uris.length,cf(a,b,c,d,e,w,g)}throw w;})}
177
+ function df(a,b,c){var d=Ke(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={ud:e.ud},f=a.next())e.ud=f.value,d=d.Y(function(g){return function(){var h=c.response;h.data&&(h.data=Fb(h.data));return g.ud(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);})}L("shaka.net.NetworkingEngine",Ve);Ve.prototype.request=Ve.prototype.request;Ve.prototype.destroy=Ve.prototype.destroy;Ve.makeRequest=Ze;
178
+ Ve.defaultRetryParameters=function(){return Fe()};Ve.prototype.clearAllResponseFilters=Ve.prototype.rf;Ve.prototype.unregisterResponseFilter=Ve.prototype.Bg;Ve.prototype.registerResponseFilter=Ve.prototype.lg;Ve.prototype.clearAllRequestFilters=Ve.prototype.qf;Ve.prototype.unregisterRequestFilter=Ve.prototype.Ag;Ve.prototype.registerRequestFilter=Ve.prototype.kg;Ve.unregisterScheme=function(a){delete Ye[a]};Ve.registerScheme=We;Ve.prototype.setForceHTTPS=Ve.prototype.ie;function $e(){this.g=0}
179
+ Ve.NumBytesRemainingClass=$e;function af(a,b,c){He.call(this,a,b);this.h=c}ra(af,He);Ve.PendingRequest=af;var ef=1;Ve.RequestType={MANIFEST:0,SEGMENT:ef,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var Xe=3;Ve.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Xe};var Ye={};function ff(a){this.g=!1;this.h=new hc;this.i=a}ff.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 gf(a,b){if(a.g){if(b instanceof O&&7003==b.code)throw b;throw new O(2,7,7003,b);}};function hf(){this.g=new rd}r=hf.prototype;r.release=function(){this.nb();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new jf(a,b,c,d),this.g.push(b,a))};r.na=function(a,b,c,d){function e(g){f.yc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};r.yc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.yc(),this.g.remove(b,e))}};
180
+ r.nb=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.yc();this.g.g={}}};L("shaka.util.EventManager",hf);hf.prototype.removeAll=hf.prototype.nb;hf.prototype.unlisten=hf.prototype.yc;hf.prototype.listenOnce=hf.prototype.na;hf.prototype.listen=hf.prototype.C;hf.prototype.release=hf.prototype.release;function jf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=kf(a,d);this.target.addEventListener(b,c,this.g)}
181
+ jf.prototype.yc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function kf(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 lf(a)?b:b.capture||!1}
182
+ function lf(a){var b=mf;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}mf=b}return b||!1}var mf=void 0;function nf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function of(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function pf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function qf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function rf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function sf(a,b){this.S=Hb(a);this.h=b==tf;this.g=0}r=sf.prototype;r.la=function(){return this.g<this.S.byteLength};r.$=function(){return this.g};r.Ff=function(){return this.S.byteLength};r.Ra=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw uf();}};r.Zd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw uf();}};r.L=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw uf();}};
183
+ r.Oe=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw uf();}};r.ab=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 uf();}if(2097151<b)throw new O(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.$a=function(a){if(this.g+a>this.S.byteLength)throw uf();var b=N(this.S,this.g,a);this.g+=a;return b};
184
+ r.skip=function(a){if(this.g+a>this.S.byteLength)throw uf();this.g+=a};r.rg=function(a){if(this.g<a)throw uf();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw uf();this.g=a};r.rc=function(){for(var a=this.g;this.la()&&0!=this.S.getUint8(this.g);)this.g+=1;a=N(this.S,a,this.g-a);this.g+=1;return xc(a)};function uf(){return new O(2,3,3E3)}L("shaka.util.DataViewReader",sf);sf.prototype.readTerminatedString=sf.prototype.rc;sf.prototype.seek=sf.prototype.seek;sf.prototype.rewind=sf.prototype.rg;
185
+ sf.prototype.skip=sf.prototype.skip;sf.prototype.readBytes=sf.prototype.$a;sf.prototype.readUint64=sf.prototype.ab;sf.prototype.readInt32=sf.prototype.Oe;sf.prototype.readUint32=sf.prototype.L;sf.prototype.readUint16=sf.prototype.Zd;sf.prototype.readUint8=sf.prototype.Ra;sf.prototype.getLength=sf.prototype.Ff;sf.prototype.getPosition=sf.prototype.$;sf.prototype.hasMoreData=sf.prototype.la;var tf=1;sf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:tf};function vf(){this.i=[];this.h=[];this.g=!1}r=vf.prototype;r.box=function(a,b){var c=wf(a);this.i[c]=xf;this.h[c]=b;return this};r.T=function(a,b){var c=wf(a);this.i[c]=yf;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new sf(a,0);for(this.g=!1;a.la()&&!this.g;)this.ed(0,a,b,c)};
186
+ r.ed=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.L(),g=b.L(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.ab();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==yf){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}m=b.L();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.$a(d):new Uint8Array(0),b=new sf(b,0),k({parser:this,partialOkay:c||
187
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function zf(a){for(var b=Af(a);a.reader.la()&&!a.parser.g;)a.parser.ed(a.start+b,a.reader,a.partialOkay)}function Bf(a){for(var b=Af(a),c=a.reader.L(),d=0;d<c&&(a.parser.ed(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Cf(a){return function(b){a(b.reader.$a(b.reader.S.byteLength-b.reader.$()))}}
188
+ function wf(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Df(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Af(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}L("shaka.util.Mp4Parser",vf);vf.headerSize=Af;vf.typeToString=Df;vf.allData=Cf;vf.sampleDescription=Bf;vf.children=zf;vf.prototype.parseNext=vf.prototype.ed;vf.prototype.parse=vf.prototype.parse;vf.prototype.stop=vf.prototype.stop;
189
+ vf.prototype.fullBox=vf.prototype.T;vf.prototype.box=vf.prototype.box;var xf=0,yf=1;function Ef(a){var b=this;this.g=[];this.h=[];this.data=[];(new vf).box("moov",zf).box("moof",zf).T("pssh",function(c){if(!(1<c.version)){var d=N(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Ic(c.reader.$a(16)));if(0<c.version){d=c.reader.L();for(var e=0;e<d;e++){var f=Ic(c.reader.$a(16));b.h.push(f)}}}}).parse(a)}
190
+ function Ff(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=Hb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Hc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Gf(a,b){var c=Hf(a,b);return 1!=c.length?null:c[0]}function If(a,b,c){a=Jf(a,b,c);return 1!=a.length?null:a[0]}function Hf(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function Kf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
191
+ function Jf(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function Lf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Mf(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function Nf(a){return Array.from(a.childNodes).every(Of)?a.textContent.trim():null}
192
+ function Of(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Pf(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 Qf(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}
193
+ function Rf(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}
194
+ function Sf(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 Tf(a){a=Number(a);return 0===a%1?a:null}function Uf(a){a=Number(a);return 0===a%1&&0<a?a:null}function Vf(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Wf(a){a=Number(a);return isNaN(a)?null:a}function Xf(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
195
+ function Yf(a,b){var c=new DOMParser,d=Zf.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function $f(a,b){try{var c=xc(a);return Yf(c,b)}catch(d){return null}}
196
+ var Zf=new ic(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 ag(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.X=!1;this.H=0;this.g=null;this.s=new hf;this.i=new Map;this.B=[];this.o=new hc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ha=new Map;this.ca=new Map;this.P=new Q(function(){return bg(c)});this.M=!1;this.K=[];this.N=!1;this.da=(new Q(function(){cg(c)})).Ba(b);this.o["catch"](function(){});this.j=new ff(function(){return dg(c)});this.W=!1;this.F=null}r=ag.prototype;r.destroy=function(){return this.j.destroy()};
197
+ function dg(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.P.stop(),a.P=null,u(b,eg(a),2);case 2:if(!a.l){b.A(3);break}D(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:za(b,5);break;case 4:Aa(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.W=!1,a.F=null,A(b)}})}r.configure=function(a){this.h=a};function fg(a,b,c){a.ea=!0;a.B=[];a.M=c;return gg(a,b)}
198
+ function hg(a,b,c){a.B=c;a.M=0<c.length;return gg(a,b)}function ig(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 jg(a,g,[])}
199
+ function gg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return G(function(x){if(1==x.g){if(c=kg(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=pf(a.h.servers),lg(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=mg(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,ng(q,pf(a.h.servers),pf(a.h.advanced||{}),a.h.keySystemsMapping);
200
+ return u(x,Nd(b,a.M,a.W),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.X=!0,x["return"](Promise.resolve());y=jg(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
201
+ function og(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 gf(a.j),c["return"]();case 2:return D(c,4),a.F=a.l.setMediaKeys(a.u),u(c,a.F,6);case 6:za(c,5);break;case 4:b=Aa(c),a.m(new O(2,6,6003,b.message));case 5:gf(a.j),A(c)}})}function pg(a,b){return G(function(c){if(1==c.g)return u(c,og(a),2);qg(a,b.initDataType,N(b.initData));A(c)})}
202
+ r.Yb=function(a){var b=this,c;return G(function(d){if(1==d.g){if(!b.u)return b.s.na(a,"encrypted",function(){b.m(new O(2,6,6010))}),d["return"]();b.l=a;b.s.na(b.l,"play",function(){for(var e=t(b.K),f=e.next();!f.done;f=e.next())rg(b,f.value);b.N=!0;b.K=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return eg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.B.length?
203
+ u(d,og(b),2):d.A(2)}sg(b);c||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(e){return pg(b,e)});A(d)})};
204
+ function tg(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=Ze([a.g.serverCertificateUri],a.h.retryParameters);D(g,3);c=a.D.lb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=N(d.data);za(g,4);break;case 3:throw e=Aa(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
+ D(g,6);return u(g,a.u.setServerCertificate(a.g.serverCertificate),8);case 8:za(g,0);break;case 6:throw f=Aa(g),new O(2,6,6004,f.message);}})}function ug(a,b){var c,d,e;return G(function(f){if(1==f.g)return u(f,vg(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 hc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);A(f)})}
206
+ function sg(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,qg(a,d.initDataType,d.initData);c=t(a.B);for(d=c.next();!d.done;d=c.next())vg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function qg(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!oc("Tizen 2"))return;0<a.i.size&&wg(a)&&(a.o.resolve(),a.o=new hc,a.o["catch"](function(){}));xg(a,b,c,a.g.sessionType)}}
207
+ function yg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function zg(a){a=a.i.keys();a=nf(a,function(b){return b.sessionId});return Array.from(a)}r.hc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Qc=function(){return qf(this.ca)};
208
+ function jg(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return G(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Ag(a,c,d);x.A(2);break}return u(x,Bg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new O(2,6,6001);gf(a.j);D(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var w=
209
+ f.keySystem;var C=d.get(f.keySystem);var z=[],B=[],E=[],F=[],H=new Set;Cg(C,z,E,B,F,H);var I=a.M?"persistent-license":"temporary";w={keySystem:w,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=t(C);for(z=C.next();!z.done;z=
210
+ C.next())z=z.value,z.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=z.distinctiveIdentifierRequired),z.persistentStateRequired&&(w.persistentStateRequired=z.persistentStateRequired);C=w}else C=f.keySystem,w=b.get(f.keySystem),z=[],B=[],E=[],F=[],H=new Set,Cg(w.drmInfos,z,E,B,F,H),C={keySystem:C,licenseServerUri:z[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
211
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.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(x,f.createMediaKeys(),6);case 6:return v=x.h,gf(a.j),a.u=v,a.X=!0,u(x,tg(a),7);case 7:gf(a.j);za(x,0);break;case 4:y=Aa(x);gf(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 Ag(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(mg(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=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={rd:d.rd},e=a.next())for(d.rd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
213
+ l.rd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
214
+ function Bg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return G(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new O(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);D(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
215
+ w.h,w["return"](c);case 6:Aa(w);case 7:gf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){w.A(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();w.A(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(C){return!!C.licenseServerUri});if(x!=p){w.A(13);break}D(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:Aa(w);case 16:gf(a.j);case 13:h=q.next();w.A(12);break;case 11:return w["return"](c)}})}
216
+ function kg(a){a=pf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=f;22!=g.length&&(g=Fc(Hc(f),!1));var h=e;22!=h.length&&(h=Fc(Hc(e),!1));g={kty:"oct",kid:g,k:h};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:N(Bc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",
217
+ videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
218
+ function vg(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.N?a.K.push(k):rg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Dg(a,k)});e={initData:null,initDataType:null,loaded:!1,Ud:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);D(h,2);return u(h,c.load(b),4);
219
+ case 4:f=h.h;gf(a.j);if(!f)return a.i["delete"](c),a.m(new O(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;wg(a)&&a.o.resolve();return h["return"](c);case 2:g=Aa(h),gf(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 xg(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.N?a.K.push(f):rg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Dg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Ud: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&&Fc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
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))}})}
222
+ function rg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;G(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Fc(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=Ze([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
+ yg(a.g.keySystem)&&Eg(g),h=Date.now(),D(x,2),l=a.D.lb.request(2,g),u(x,l.promise,4);case 4:k=x.h;za(x,3);break;case 2:return m=Aa(x),n=new O(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.H+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Fc(k.data);D(x,5);return u(x,c.update(k.data),7);case 7:za(x,6);break;case 5:return p=Aa(x),q=new O(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new S("drmsessionupdate");
224
+ a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new Q(function(){d.loaded=!0;wg(a)&&a.o.resolve()}),y.O(Fg));A(x)}})}
225
+ function Eg(a){var b=yc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=Yf(b,"PlayReadyKeyMessage");for(var c=t(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=Gc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
226
+ function Dg(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(yg(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||sc())){k=Hb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Ic(h).slice(0,32);a.ha.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),
227
+ c.close()["catch"](function(){}));wg(a)&&(a.o.resolve(),a.P.O(Gg))}function bg(a){var b=a.ha,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.cd(qf(c))}
228
+ function Hg(){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,
229
+ p;return G(function(q){switch(q.g){case 1:D(q,2);if("org.w3.clearkey"===l&&tc())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,oc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:za(q,0);break;case 2:Aa(q),f.set(l,null),A(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](qf(f))})}
230
+ function Ig(a){var b;return G(function(c){if(1==c.g)return b=new Promise(function(d,e){(new Q(e)).O(Jg)}),D(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return za(c,0);Aa(c);A(c)})}
231
+ function eg(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=t(d);var e=d.next().value,f=d.next().value;return G(function(g){if(1==g.g)return D(g,2),a.ea||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Ig(e),5):u(g,e.remove(),5);if(2!=g.g)return za(g,0);Aa(g);A(g)})})),0)})}
232
+ function Kg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Ca:f.Ca},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ca=[];f.Ca=f.Ca.concat(e.initData||[]);f.Ca=f.Ca.concat(h.initData||[]);f.Ca=f.Ca.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ca.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
232
233
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
233
- initData:f.Da,keyIds:g});break}}return c}function ug(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function kg(a){a.i.forEach(function(b,c){var d=b.Pd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Pd=e)})}function Eg(a){a=a.i.values();return uf(a,function(b){return b.loaded})}
234
- function tg(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
235
- function Kg(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(n){return Db(n,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={Ac:h.Ac},l=k.next())h.Ac=l.value,e.some(function(m){return function(n){var p=
236
- m.Ac;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.Ac)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
237
- function vg(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&(b=b.get(e)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||(a.serverCertificate=
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 Rg=1,Ng=5,Og=.5,Tg=new mc(function(){return Gb(new Uint8Array([0]))});function Ug(){}function Vg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=Wg[d.toLowerCase()]))return k["return"](e);if(f=Xg(a))if(g=Yg[f])return k["return"](g);return d?k.A(2):u(k,Zg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Wg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
239
- function Zg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=ef([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Xg(a){a=(new Nb(a)).ua.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",Ug);Ug.unregisterParserByMime=function(a){delete Wg[a]};Ug.registerParserByMime=function(a,b){Wg[a]=b};
240
- Ug.registerParserByExtension=function(a,b){Yg[a]=b};var Wg={},Yg={};function $g(a){function b(){d=!0}function c(l){f.push(l);Ff(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new Bf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).U("stsd",function(l){e=l;f.push(l);Hf(l)}).U("encv",b).U("enca",b).U("avc1",function(l){g.push({box:l,oc:1701733238})}).U("avc3",function(l){g.push({box:l,oc:1701733238})}).U("ac-3",function(l){g.push({box:l,oc:1701733217})}).U("ec-3",function(l){g.push({box:l,oc:1701733217})}).U("mp4a",function(l){g.push({box:l,oc:1701733217})}).parse(a);
241
- if(d)return a;if(0==g.length||!e)throw ab(Pc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=ah(a,e,k.box,f,k.oc);return a}
242
- function ah(a,b,c,d,e){var f=bh.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);ch(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=rc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,ch(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=Gf(b);a=k.getUint32(b);
243
- k.setUint32(b,a+1);return e}function ch(a,b,c){a=Ib(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var bh=new mc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function dh(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=eh(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){q=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
244
- q||-1===v)p=fh(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(y=p[q]){var x=y.l,w=y.i,D=y.j,z=y.h;if(x!=h||w!=k||D!=l||z!=m)n.payload&&a.nestedCues.push(n),n=eh(d,e,x,w,D,z),h=x,k=w,l=D,m=z;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=fh(d,e),a.nestedCues.push(n));n=eh(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
245
- function eh(a,b,c,d,e,f){a=new hb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function fh(a,b){var c=new hb(a,b,"");c.lineBreak=!0;return c}function gh(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function hh(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";ih(this)}function jh(a,b,c){return dh(new hb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function ih(a){kh(a,0,15);a.g=1}function lh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case mh:d=nh.has(c)?nh.get(c):String.fromCharCode(c);break;case oh:d=ph.get(c);break;case qh:a.i[a.g].pop();d=rh.get(c);break;case sh:a.i[a.g].pop(),d=th.get(c)}d&&a.i[a.g].push(new gh(d,a.m,a.j,a.o,a.l))}}
246
- function uh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function kh(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
247
- var mh=0,oh=1,qh=2,sh=3,nh=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),ph=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),rh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
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"]]),th=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 vh(a,b){this.h=wh;this.o=new hh(a,b);this.i=new hh(a,b);this.l=new hh(a,b);this.g=this.i;this.j=0;this.m=null}function xh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==yh&&a.h!==zh&&(e=jh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,kh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,kh(c,0,15),d.g=15);a.h=yh;d.h=b;return e}function Ah(a){a.h=Bh;a.g=a.l;a.g.h=0}function Ch(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=zh}
250
- var wh=0,Bh=1,yh=3,zh=4,Dh="black green blue cyan red yellow magenta black".split(" "),Eh="white green blue cyan red yellow magenta white_italics".split(" ");function Fh(){this.l=!1;this.B=this.F=0;this.D=Gh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Hh(this)}function Hh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Ih())}function Ih(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Jh(a,b){Kh(a)&&(a.i[a.h][a.g]=new gh(b,a.u,a.o,a.m,a.s),a.g++)}function Kh(a){var b=a.g<a.B&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Fh.prototype.isVisible=function(){return this.l};
251
- function Lh(a,b,c){var d=new hb(a.j,b,"");d.textAlign=a.D===Mh?"left":a.D===Nh?"right":lb;if(c=dh(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Mh=0,Nh=1,Gh=2;function Oh(){this.i=[];this.h=null;this.g=0}function Ph(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 Qh(a.h)),a.h=null,a.g=0))}function Qh(a){this.g=0;this.h=a}Qh.prototype.ma=function(){return this.g<this.h.length};Qh.prototype.$=function(){return this.g};function Rh(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}Qh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function Sh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
252
- function Th(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=Rh(b).value;b=null;c=t(Uh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Lh(e,d,a.i)),Hh(e);return b}if(137===c)for(b=Rh(b).value,b=t(Uh(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=Rh(b).value;b=null;c=t(Uh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Lh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Rh(b).value;
253
- b=null;c=t(Uh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Lh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Rh(b).value,Vh(a,b,d);if(143===c)return d=Vh(a,255,d),Wh(a),d;if(144===c)b.skip(1),d=Rh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Rh(b).value,c=Rh(b).value,b.skip(1),a.g&&(b=Xh((c&48)>>4,(c&12)>>2,c&3),a.g.s=Xh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Rh(b).value,b=Rh(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=Rh(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 Fh;f.j=d;a.h[c]=f}d=Rh(b).value;Rh(b);Rh(b);f=Rh(b).value;var g=Rh(b).value;b=Rh(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 Uh(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 Vh(a,b,c){var d=null;b=t(Uh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Lh(f,c,a.i));a.h[e]=null}return d}function Wh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Xh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Yh[a<<2|b<<1|c]}
256
- var Zh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),Yh="black blue green cyan red magenta yellow white".split(" ");function $h(){this.h=[];this.g=[];this.i=new Oh;this.l=0;this.s=new Map([["CC1",new vh(0,0)],["CC2",new vh(0,1)],["CC3",new vh(1,0)],["CC4",new vh(1,1)]]);this.o=this.m=0;this.j=new Map;ai(this)}function ai(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,ih(b.i),ih(b.l),ih(b.o)}
257
- function bi(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=ci(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Ph(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=di(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
258
- function ci(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.La||!b.xa&&!b.La||!ei(b.xa)||!ei(b.La))return 45<=++a.l&&ai(a),null;a.l=0;b.xa&=127;b.La&=127;if(!b.xa&&!b.La)return null;d=null;if(16===(b.xa&112))a:{var e=b.xa;d=b.La;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Eh[f]:7===f&&(h=!0);
259
- d=1===(d&1);if(c.h!==zh){f=c.g;if(c.h===yh&&e!==f.g){var k=1+e-f.h;uh(f,k,1+f.g-f.h,f.h);kh(f,0,k-1);kh(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",lh(c.g,mh,32),g=!1,e=Eh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Dh[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))lh(c.g,oh,d);else if(18===
260
- (e&246)&&32===(d&224))lh(c.g,e&1?sh:qh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.La){case 32:Ah(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=xh(c,2,d);break;case 38:e=xh(c,3,d);break;case 39:e=xh(c,4,d);break;case 40:lh(c.g,mh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:ih(c.o);Ch(c);break;case 43:Ch(c);break;case 44:e=c.i;g=null;c.h!==zh&&(g=jh(e,c.j,d));kh(e,0,15);e=g;break;case 45:e=c.g;c.h!==yh?e=null:(g=jh(e,c.j,d),h=e.g-e.h+1,uh(e,h-1,h,e.h),kh(e,
261
- 0,h-1),kh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:kh(c.l,0,15);break;case 47:e=null,c.h!==zh&&(e=jh(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Ah(c),c.j=d}d=e;break a}d=null}else e=b.La,lh(c.g,mh,b.xa),lh(c.g,mh,e);return d}
262
- function di(a,b){var c=[];try{for(;b.ma();){var d=Rh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Rh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Sh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Rh(e),l=k.value,m=k.pts;if(16===l){var n=Rh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Kh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.B-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Lh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
263
- v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=Ih()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Lh(q,p,g.i));q.i[q.h]=Ih();q.g=0;break;case 12:q.isVisible()&&(e=Lh(q,p,g.i)),Hh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Th(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?Jh(g.g,"\u266a"):Jh(g.g,
264
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Jh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Zh.has(e)){var w=Zh.get(e);Jh(g.g,w)}else Jh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Jh(g.g,"_"):Jh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function ei(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function fi(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,se:c,jf:d}}function gi(a,b){return{me:1==b?a.Jb():a.N()}}function hi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
265
- function ii(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Wd:null,sampleSize:null,ad:null};c&256&&(g.Wd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.ad=0==b?a.N():a.Je());e.push(g)}return{gh:d,Le:e}};function ji(){this.i=new Map;this.h=this.g=0}
266
- ji.prototype.init=function(a){var b=this,c=[],d=[];(new Bf).box("moov",Ff).box("mvex",Ff).U("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",Ff).U("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",Ff).U("mdhd",function(e){e=hi(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
267
- ji.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Bf).box("moof",Ff).box("traf",Ff).U("trun",function(k){f=ii(k.reader,k.version,k.flags).Le}).U("tfhd",function(k){k=fi(k.reader,k.flags);d=k.se||b.g;e=k.jf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=gi(k.reader,k.version).me}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var x=k.N();if(6==
268
- (k.Qa()&31)){var w=0;q.length>v&&(w=q[v].ad||0);w=(l+w)/m;for(var D=[],z,B=k.Za(x-1),G=z=0;G<B.length;)2==z&&3==B[G]?(z=0,B=[].concat(ia(B)),B.splice(G,1),B=new Uint8Array(B)):0==B[G]?z++:z=0,G++;z=B;for(G=0;G<z.length;){for(B=0;255==z[G];)B+=255,G++;B+=z[G++];for(var E=0;255==z[G];)E+=255,G++;E+=z[G++];4==B&&D.push(z.subarray(G,G+E));G+=E}D=t(D);for(z=D.next();!z.done;z=D.next())c.push({Vf:z.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=q.length>v?l+(q[v].Wd||n):l+n,v++,y=q.length>
269
- v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function ki(){this.h=new ji;this.g=new $h}ki.prototype.init=function(a){this.h.init(a)};
270
- function li(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Vf);if(0<f.length&&(d=a.g,e=e.pts,f=new yf(f,0),181===f.Qa()&&49===f.Sd()&&1195456820===f.N()&&3===f.Qa())){var g=f.Qa();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Qa(),l=(k&4)>>2,m=f.Qa(),n=f.Qa();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,xa:m,La:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return bi(a.g)}
271
- ;function mi(a,b,c,d){this.ya=a;this.Ba=b;this.la=c;this.Jd=void 0===d?null:d}mi.prototype.ic=function(){return this.Ba};mi.prototype.dc=function(){return this.la};function ni(a,b){return a&&b?a.ic()==b.ic()&&a.dc()==b.dc()&&gb(a.ya(),b.ya()):a==b}M("shaka.media.InitSegmentReference",mi);mi.prototype.getEndByte=mi.prototype.dc;mi.prototype.getStartByte=mi.prototype.ic;
272
- function oi(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){l=void 0===l?[]:l;q=void 0===q?pi:q;this.startTime=a;this.j=this.endTime=b;this.o=c;this.Ba=d;this.la=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.m=void 0===n?null:n;this.g=void 0===p?null:p;this.status=q;this.l=void 0===v?null:v}r=oi.prototype;r.ya=function(){return this.o()};r.getStartTime=function(){return this.startTime};r.rf=function(){return this.endTime};r.ic=function(){return this.Ba};
273
- r.dc=function(){return this.la};r.If=function(){return this.tilesLayout};r.Hf=function(){return this.m};r.Cb=function(){return this.status};r.Pf=function(){this.status=qi};M("shaka.media.SegmentReference",oi);oi.prototype.markAsUnavailable=oi.prototype.Pf;oi.prototype.getStatus=oi.prototype.Cb;oi.prototype.getTileDuration=oi.prototype.Hf;oi.prototype.getTilesLayout=oi.prototype.If;oi.prototype.getEndByte=oi.prototype.dc;oi.prototype.getStartByte=oi.prototype.ic;oi.prototype.getEndTime=oi.prototype.rf;
274
- oi.prototype.getStartTime=oi.prototype.getStartTime;oi.prototype.getUris=oi.prototype.ya;var pi=0,qi=1;oi.Status={ug:pi,$g:qi,Jg:2};function ri(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
275
- function ui(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(vi(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}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}function vi(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function xi(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.T=d||function(){};this.i={};this.s=new of;this.o={};this.B=b;this.G=new lc;this.l=yi(this,this.G);this.D=new mf(function(){return zi(e)});this.I="";this.u=!1;this.O=new lc}function yi(a,b){var c=new MediaSource;a.s.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Ai(c);a.j.src=a.I;return c}r=xi.prototype;r.destroy=function(){return this.D.destroy()};
276
- function zi(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](cc)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.o={};a.B=null;a.i=
277
- {};A(l)})}
278
- r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(n){if(1==n.g)return e=kc,u(n,d.G,2);d.u=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={pa:f.pa},h=g.next())f.pa=h.value,k=a.get(f.pa),l=Xc(k.mimeType,k.codecs),f.pa==e.X?Bi(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Sc(l,f.pa)||(d.o[f.pa]=new Rc,l=Uc(f.pa,l)),m=d.l.addSourceBuffer(l),d.s.C(m,"error",function(p){return function(){d.i[p.pa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.s.C(m,"updateend",
279
- function(p){return function(){return Ci(d,p.pa)}}(f)),d.h[f.pa]=m,d.M[f.pa]=l,d.i[f.pa]=[],d.L[f.pa]=!!k.drmInfos.length);A(n)})};function Bi(a,b,c){a.g||(a.g=new bd(a.m));var d=a.g;a=a.F;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,dd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Di(a){return a.l?"ended"==a.l.readyState:!0}function Ei(a,b){return b==jc?a.g.g:ri(Fi(a,b))}
280
- function Gi(a,b){return b==jc?a.g.h:si(Fi(a,b))}function Hi(a,b,c){if(b==jc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Fi(a,b);return ui(a,c)}r.Ma=function(){var a={total:vi(this.j.buffered),audio:vi(Fi(this,"audio")),video:vi(Fi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Fi(a,b){try{return a.h[b].buffered}catch(c){return null}}
281
- function Ii(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E;return K(function(H){switch(H.g){case 1:h=kc;if(b!=h.X){H.A(2);break}if(!a.u){H.A(3);break}return u(H,a.O,4);case 4:k=H.h,a.g.s=k;case 3:return u(H,ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return H["return"]();case 2:if(!a.o[b]){e&&(a.g||Bi(a,"text/vtt",a.u),d?(l=li(a.B,c),l.length&&(m=a.h[h.ra].timestampOffset,jd(a.g,l,d.startTime,d.endTime,m))):a.B.init(c));H.A(6);break}f&&a.o[b].g.resetCaptions();
282
- return u(H,Vc(a.o[b],c),7);case 7:n=H.h,a.g||Bi(a,"text/vtt",a.u),n.metadata&&(p=a.h[b].timestampOffset,a.T(n.metadata,p,d?d.endTime:null)),n.captions&&n.captions.length&&(q=a.h[h.ra].timestampOffset,v=hd(n.captions),jd(a.g,v,d?d.startTime:null,d?d.endTime:null,q)),c=n.data;case 6:c=Ji(a,c,d?d.startTime:null,b);y=a.h[b];x=Ki;if(!a.u||y.mode==x||!d){H.A(8);break}w=b==h.ra||!(h.ra in a.h);if(!w){H.A(9);break}D=[y.appendWindowStart,y.appendWindowEnd];y.appendWindowStart=0;y.appendWindowEnd=Infinity;
283
- z=y.timestampOffset;y.timestampOffset=0;return u(H,Li(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(H,Li(a,b,function(){return Mi(a,b)}),11);case 11:return y.timestampOffset=z,y.appendWindowStart=D[0],y.appendWindowEnd=D[1],B=ri(Fi(a,b)),G=(d.startTime||0)-(B||0),a.O.resolve(G),u(H,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),12);case 12:if(b!=h.ra){H.A(9);break}return u(H,Li(a,b,function(){a.j.currentTime-=.001;Ci(a,b)}),9);case 9:y.mode=x;case 8:return d&&a.u&&b!=h.X&&(f||g)&&
284
- (E=d.startTime,Li(a,b,function(){return Mi(a,b)}),Li(a,b,function(){var I=E;0>I&&(I+=.001);a.h[b].timestampOffset=I;Ci(a,b)})),u(H,Li(a,b,function(){a.h[b].appendBuffer(c)}),15);case 15:A(H)}})}function Oi(a,b){var c=Gi(a,"video")||0;gd(a.g,b,c)}function Pi(a){a.g&&gd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return K(function(f){e=kc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Li(d,a,function(){return Ni(d,a,b,c)}),0)})};
285
- function Qi(a,b){var c;return K(function(d){c=kc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),0)})}r.flush=function(a){var b=this,c;return K(function(d){c=kc;return a==c.X?d["return"]():u(d,Li(b,a,function(){b.j.currentTime-=.001;Ci(b,a)}),0)})};
286
- function Ri(a,b,c,d,e,f){var g;return K(function(h){g=kc;return b==g.X?(f||(a.g.s=c),fd(a.g,d,e),h["return"]()):u(h,Promise.all([Li(a,b,function(){return Mi(a,b)}),f?Promise.resolve():Li(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Ci(a,b)}),Li(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Ci(a,b)})]),0)})}
287
- r.endOfStream=function(a){var b=this;return K(function(c){return u(c,Si(b,function(){Di(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ia=function(a){var b=this;return K(function(c){return u(c,Si(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new lc};b.i[d].unshift(e)}b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function Ni(a,b,c,d){d<=c?Ci(a,b):a.h[b].remove(c,d)}
288
- function Mi(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Ci(a,b)}function Ci(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ti(a,b))}function Li(a,b,c){nf(a.D);c={start:c,p:new lc};a.i[b].push(c);1==a.i[b].length&&Ui(a,b);return c.p}
289
- function Si(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:nf(a.D);c=[];d={};for(e in a.h)d.Sb=new lc,f={start:function(l){return function(){return l.Sb.resolve()}}(d),p:d.Sb},a.i[e].push(f),c.push(d.Sb),1==a.i[e].length&&f.start(),d={Sb:d.Sb};C(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)Ti(a,h)}A(k)}})}function Ti(a,b){a.i[b].shift();Ui(a,b)}
290
- function Ui(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),Ti(a,b)}}function Ji(a,b,c,d){var e=a.L[d];null==c&&e&&(tc()||rc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=$g(b));return b}var Ai=window.URL.createObjectURL,Ki="sequence",Vi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.$c=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.D=0;this.F=!1}r=T.prototype;r.getDuration=function(){return this.i};r.yf=function(){return this.g};r.Ia=function(a){this.i=a};r.Df=function(){return this.l};r.Pe=function(a){this.o=a};r.wc=function(a){this.s=a};r.de=function(a){this.m=a};r.kg=function(a){this.$c=a};r.qf=function(){return this.$c};
291
- r.Gb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Nd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.B&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Hd=function(){this.F=!0};r.Nd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Md=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
292
- r.V=function(){return Infinity==this.i&&!this.s};r.jb=function(){return Infinity!=this.i&&!this.s};r.Oa=function(){return Math.max(this.u,this.gb()-this.m)};r.Qe=function(a){this.u=a};r.gb=function(){return this.V()||this.jb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.hc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.gb()-this.m+a,this.Na()))};r.Bb=function(){return this.hc(0)};
293
- r.Na=function(){return Math.max(0,this.gb()-(this.V()||this.jb()?this.$c:0))};r.Te=function(){return null==this.l||null!=this.h&&this.B?!1:!0};r.Oe=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Oe;T.prototype.usingPresentationStartTime=T.prototype.Te;T.prototype.getSeekRangeEnd=T.prototype.Na;T.prototype.getSeekRangeStart=T.prototype.Bb;T.prototype.getSafeSeekRangeStart=T.prototype.hc;T.prototype.getSegmentAvailabilityEnd=T.prototype.gb;
294
- T.prototype.setUserSeekStart=T.prototype.Qe;T.prototype.getSegmentAvailabilityStart=T.prototype.Oa;T.prototype.isInProgress=T.prototype.jb;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Md;T.prototype.notifyMinSegmentStartTime=T.prototype.Nd;T.prototype.lockStartTime=T.prototype.Hd;T.prototype.notifySegments=T.prototype.Gb;T.prototype.getDelay=T.prototype.qf;T.prototype.setDelay=T.prototype.kg;
295
- T.prototype.setSegmentAvailabilityDuration=T.prototype.de;T.prototype.setStatic=T.prototype.wc;T.prototype.setClockOffset=T.prototype.Pe;T.prototype.getPresentationStartTime=T.prototype.Df;T.prototype.setDuration=T.prototype.Ia;T.prototype.getMaxSegmentDuration=T.prototype.yf;T.prototype.getDuration=T.prototype.getDuration;function Wi(a,b,c){this.l=c;this.j=a;this.s=Xi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Wi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Yi(a,b){a.i=b}function Zi(a){this.g=a}function Xi(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(vi(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function $i(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new of;this.m=!1;this.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return aj(f)});this.j=(new O(function(){aj(f)})).Ca(.25)}$i.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.s=this.o=null};$i.prototype.Qd=function(){this.l=!0;aj(this)};
296
- function aj(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Xi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new R("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.D.gapDetectionThreshold),null==
297
- d||0==d&&!a.l||(e=c.start(d),e>=a.s.Na()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new R("gapjumped")))))}}};function bj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=cj.value().get(b),c.oa(a,b,d))}var cj=new mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function dj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new of;this.i=new ej(a);bj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){fj(d,d.j)})}dj.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function gj(a){return a.m?a.g.currentTime:a.j}function hj(a,b){0<a.g.readyState?ij(a.i,b):bj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){fj(a,a.j)})}
298
- function fj(a,b){.001>Math.abs(a.g.currentTime-b)?jj(a):(a.h.oa(a.g,"seeking",function(){jj(a)}),ij(a.i,0==a.g.currentTime?b:a.g.currentTime))}function jj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function ej(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}ej.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
299
- function ij(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function kj(a){this.g=a;this.j=!1;this.h=null;this.i=new of}r=kj.prototype;r.vd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;bj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.wd=function(a){this.h=this.j?this.h:a};r.Ec=function(){return(this.j?this.g.currentTime:this.h)||0};r.ke=function(){return 0};
300
- r.je=function(){return 0};r.Fe=function(){};
301
- function lj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=mj(a,c,f);this.j=new $i(a,b.presentationTimeline,c,this.o,f);this.h=new dj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=gj(g.h);h=nj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;hj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},oj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=gj(g.h),k=g.g.Bb(),l=g.g.Na();3>
302
- l-k&&(k=l-3);h<k&&(h=nj(g,h),g.i.currentTime=h)}})}r=lj.prototype;r.vd=function(){this.m.Ca(.25)};r.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(){}};r.wd=function(a){hj(this.h,a)};r.Ec=function(){var a=gj(this.h);return 0<this.i.readyState&&!this.i.paused?pj(this,a):a};r.ke=function(){return this.o?this.o.o:0};r.je=function(){return this.j.u};
303
- function oj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.Na():0>b&&(b=a.g.Na()+b);return qj(a,pj(a,b))}r.Fe=function(){this.j.Qd()};function qj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function nj(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.Na(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.hc(c),k=a.g.hc(d);c=a.g.hc(c+d);return b>=g?qj(a,b):b>f?f:b<e?ti(a.i.buffered,k)?k:c:b>=h||ti(a.i.buffered,b)?b:c}
304
- function pj(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.Na();return b>c?c:b}function mj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Wi(new Zi(a),b.stallThreshold,c);Yi(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function rj(a){this.J=a;this.g=null;this.h=0;this.i=!1}r=rj.prototype;r.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};r.Qf=function(){this.i=!0};r.find=function(a){for(var b=this.J.length-1,c=b;0<=c;--c){var d=this.J[c],e=c<b?this.J[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.J.length&&a<this.J[0].startTime?this.h:null};r.get=function(a){if(0==this.J.length)return null;a-=this.h;return 0>a||a>=this.J.length?null:this.J[a]};
305
- r.offset=function(a){if(!this.i)for(var b=t(this.J),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=t(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};r.nc=function(a){!this.i&&a.length&&(this.J=this.J.filter(function(b){return b.startTime<a[0].startTime}),this.J.push.apply(this.J,ia(a)))};r.Fb=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.J.length||d.endTime>c.J[0].startTime)});this.nc(a);this.eb(b)};
306
- r.eb=function(a){if(!this.i){var b=this.J.length;this.J=this.J.filter(function(c){return c.endTime>a});this.h+=b-this.J.length}};
307
- r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.J.length;)if(this.J[this.J.length-1].startTime>=b)this.J.pop();else break;for(;this.J.length;)if(this.J[0].endTime<=a)this.J.shift(),c||this.h++;else break;0!=this.J.length&&(a=this.J[this.J.length-1],this.J[this.J.length-1]=new oi(a.startTime,b,a.o,a.Ba,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.m,a.g,a.status,a.l))}};
308
- r.bd=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.J.push.apply(c.J,ia(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};rj.prototype[Symbol.iterator]=function(){return this.Ab(0)};rj.prototype.Ab=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new sj(this,b,d)};
309
- function tj(a,b,c){return new rj([new oi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",rj);rj.forSingleSegment=tj;rj.prototype.getIteratorForTime=rj.prototype.Ab;rj.prototype.updateEvery=rj.prototype.bd;rj.prototype.fit=rj.prototype.Xa;rj.prototype.evict=rj.prototype.eb;rj.prototype.mergeAndEvict=rj.prototype.Fb;rj.prototype.offset=rj.prototype.offset;rj.prototype.get=rj.prototype.get;rj.prototype.find=rj.prototype.find;rj.prototype.markImmutable=rj.prototype.Qf;
310
- rj.prototype.release=rj.prototype.release;function sj(a,b,c){this.i=a;this.g=b;this.h=c}sj.prototype.hf=function(){return this.g};sj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.ya().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
311
- sj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.ya().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",sj);sj.prototype.next=sj.prototype.next;sj.prototype.current=sj.prototype.current;sj.prototype.currentPosition=sj.prototype.hf;function uj(){rj.call(this,[]);this.j=[]}pa(uj,rj);r=uj.prototype;r.clone=function(){var a=new uj;a.j=this.j.slice();return a};
312
- r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.J.length}return null};r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.J.length}return null};r.offset=function(){};r.nc=function(){};r.eb=function(){};r.Fb=function(){};r.Xa=function(){};r.bd=function(){};
313
- M("shaka.media.MetaSegmentIndex",uj);uj.prototype.updateEvery=uj.prototype.bd;uj.prototype.fit=uj.prototype.Xa;uj.prototype.mergeAndEvict=uj.prototype.Fb;uj.prototype.evict=uj.prototype.eb;uj.prototype.merge=uj.prototype.nc;uj.prototype.offset=uj.prototype.offset;uj.prototype.get=uj.prototype.get;uj.prototype.find=uj.prototype.find;uj.prototype.release=uj.prototype.release;function vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Qc();this.h=new O(function(){b.g.Ee(.25*b.i)})}vj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};vj.prototype.set=function(a){this.i=a;wj(this)};vj.prototype.Mc=function(){return this.g.Mc()};function wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Qc()!=b&&a.g.ce(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Qc()&&a.g.ce(0)};function xj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){yj(b,!1)})).Ca(.25)}xj.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function yj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function zj(a){We.call(this);this.g=new Map;this.h=a}pa(zj,We);zj.prototype.release=function(){this.g.clear();We.prototype.release.call(this)};function Aj(a,b){var c=a.g.get(b);c||(c={pc:[],qe:null,contentType:b},a.g.set(b,c));return c}function Bj(a,b,c){var d=Aj(a,b.contentType);Cj(a,d);a={Jd:b,position:c};d=d.pc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
314
- zj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.pc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Jd;break a}}d=null}if(e=d)e=c.qe,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
315
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.qe=d,JSON.stringify(d),c=new R("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Cj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.pc;b.pc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.pc=[]};function Dj(a){We.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new R("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}pa(Dj,We);Dj.prototype.release=function(){this.g.clear();this.h.stop();We.prototype.release.call(this)};function Ej(a){We.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{qb:null,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Hj,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Ij,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Fj,pb:Hj,ib:function(c,d){return Gj(b,"exit",c,d)}},{qb:Fj,pb:Ij,ib:function(c,d){return Gj(b,"exit",c,d)}},{qb:Hj,pb:Ij,ib:function(c,d){return Gj(b,"skip",c,d)}},{qb:Ij,pb:Hj,ib:function(c,d){return Gj(b,"skip",c,d)}}];this.h=new of;this.h.C(this.i,"regionremove",
316
- function(c){b.g["delete"](c.region)})}pa(Ej,We);Ej.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;We.prototype.release.call(this)};Ej.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Hj:a>d.endTime?Ij:Fj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.qb==e&&h.pb==f&&h.ib(d,b)}};
317
- function Gj(a,b,c,d){b=new R(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hj=1,Fj=2,Ij=3;function Jj(a,b,c,d,e){a=ef(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Kj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.i=new Map;this.B=!1;this.D=null;this.s=!1;this.h=new mf(function(){return Lj(c)})}r=Kj.prototype;r.destroy=function(){return this.h.destroy()};function Lj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Mj(e),b.push(Nj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;A(f)})}
318
- r.configure=function(a){this.j=a;this.D=new Ke({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)};r.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,Oj(a),2);nf(a.h);a.B=!0;A(b)})};
319
- function Pj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=kc,C(k,2),u(k,Qi(a.g.R,c.X),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Xc(b.mimeType,b.codecs);Bi(a.g.R,e,a.m.sequenceMode);f=a.g.R.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=Qj(b),a.i.set(c.X,h),Rj(a,h,0);A(k)}})}function Sj(a){var b=a.i.get(jc);b&&(Mj(b),Nj(b)["catch"](function(){}),a.i["delete"](jc));a.o=null}
320
- function Tj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.nb&&(Uj(a,e,!1,0,!1),c.nb=d)}else if(d=c.nb)c.nb=null,Uj(a,d,!0,0,!1)}}function Vj(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.B&&(b.video&&Uj(a,b.video,c,d,e,f),b.audio&&Uj(a,b.audio,c,d,e,f))}function Wj(a,b){a.o=b;a.B&&Uj(a,b,!0,0,!1)}
321
- function Uj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=jc?g&&(g.nb&&(b.trickModeVideo?(g.nb=b,b=b.trickModeVideo):g.nb=null),g.stream!=b||e)&&(b.type==jc&&Bi(a.g.R,Xc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.le=!!f,c&&(g.ac?g.ed=!0:g.Ha?(g.ab=!0,g.Hc=d,g.ed=!0):(Mj(g),Xj(a,g,!0,d)["catch"](function(h){if(a.g)a.g.onError(h)}))),Yj(a,g)["catch"](function(h){if(a.g)a.g.onError(h)})):Pj(a,b)}
322
- function Yj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.ta)return e["return"]();c=b.stream;d=b.ta;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ta!=d||b.stream!=c)return e["return"]();var f=a.g.Pc();var g=Gi(a.g.R,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.la?k.la-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.la?k.la-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
323
- f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.ta.h.g>h?!0:!1):f=!1;f&&b.ta.abort();A(e)})}
324
- r.tc=function(){for(var a=this.g.Pc(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.ba=null;var e=this.g.R;d==jc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Fi(e,d),e=ti(e,a));if(!e){(null!=Gi(this.g.R,d)||c.Ha)&&Zj(this,c);c.ta&&(c.ta.abort(),c.ta=null);if(d===jc)for(d=this.g.R.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ai(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())Wh(e.value);c.tc=!0}}};
325
- function Zj(a,b){b.ac||b.ab||(b.Ha?(b.ab=!0,b.Hc=0):null==Ei(a.g.R,b.type)?null==b.Sa&&Rj(a,b,0):(Mj(b),Xj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
326
- function Oj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=kc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.cb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.ra,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.R;f=a.j.forceTransmuxTS;return u(n,e.init(c,f,a.m.sequenceMode),2)}nf(a.h);a.updateDuration();g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||(m=Qj(l),a.i.set(k,m),Rj(a,m,0));A(n)})}
327
- function Qj(a){return{stream:a,type:a.type,ba:null,za:null,Uc:null,Gd:null,Fd:null,Ed:null,nb:null,endOfStream:!1,Ha:!1,Sa:null,ab:!1,Hc:0,ed:!1,ac:!1,tc:!0,Ud:!1,jc:!1,ta:null}}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Ia(a):this.g.R.Ia(Math.pow(2,32))};
328
- function ak(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.h);if(b.Ha||null==b.Sa||b.ac)return h["return"]();b.Sa=null;if(!b.ab){h.A(2);break}return u(h,Xj(a,b,b.ed,b.Hc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Sa&&Rj(a,b,0),h["return"]();case 4:C(h,6);d=bk(a,b);null!=d&&(Rj(a,b,d),b.jc=!1);va(h,7);break;case 6:return e=
329
- F(h),u(h,ck(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.R.endOfStream(),10);case 10:nf(a.h),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),A(h)}})}
330
- function bk(a,b){if(dk(b))return Oi(a.g.R,b.stream.originalId||""),null;b.type==jc&&Pi(a.g.R);var c=a.g.Pc(),d=b.za?b.za.endTime:c,e=Hi(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Gi(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(jc))&&dk(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=ek(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
331
- f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,dk(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.za?h.za.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.j.updateIntervalSeconds;fk(a,b,c,e)["catch"](function(){});return null}
332
- function ek(a,b,c,d){if(b.ba)return b.ba.current();if(b.za||d)return b.ba=b.stream.segmentIndex.Ab(b.za?b.za.endTime:d),b.ba&&b.ba.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.Ab(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.Ab(c),e=b.ba&&b.ba.next().value);return e}
333
- function fk(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:e=kc;f=b.stream;g=b.ba;b.Ha=!0;C(z,2);if(2==d.Cb())throw new N(1,1,1011);return u(z,gk(a,b,d),4);case 4:nf(a.h);if(a.s)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h&&!d.l)return n=new Uint8Array(0),q=p=!1,v=function(B){var G,E,H;return K(function(I){if(p)return I["return"]();q=!0;nf(a.h);if(a.s)return I["return"]();n=hk(n,B);G=
334
- !1;E=0;(new Bf).box("mdat",function(J){E=J.size+J.start;G=!0}).parse(n,!1,!0);if(!G)return I.A(0);H=n.subarray(0,E);n=n.subarray(E);return u(I,ik(a,b,c,f,d,H),0)})},u(z,jk(a,b,d,v),11);l=jk(a,b,d);return u(z,l,7);case 7:m=z.h;nf(a.h);if(a.s)return z["return"]();if(!d.l){z.A(8);break}return u(z,kk(m,d,g),9);case 9:m=z.h;case 8:return nf(a.h),b.ab?(b.Ha=!1,Rj(a,b,0),z["return"]()):u(z,ik(a,b,c,f,d,m),6);case 11:y=z.h;if(q){z.A(6);break}p=!0;nf(a.h);return a.s?z["return"]():b.ab?(b.Ha=!1,Rj(a,b,0),z["return"]()):
335
- u(z,ik(a,b,c,f,d,y),6);case 6:nf(a.h);if(a.s)return z["return"]();b.za=d;g.next();b.Ha=!1;b.Ud=!1;x=a.g.R.Ma();w=x[b.type];$a(JSON.stringify(w));b.ab||a.g.Qd();Rj(a,b,0);va(z,0);break;case 2:D=F(z);nf(a.h,D);if(a.s)return z["return"]();b.Ha=!1;if(7001==D.code)b.Ha=!1,b.Sa=null,Rj(a,b,0),z.A(0);else if(b.type==e.X&&a.j.ignoreTextStreamFailures)a.i["delete"](e.X),z.A(0);else if(3017==D.code)lk(a,b,D),z.A(0);else return b.jc=!0,D.severity=2,u(z,ck(a,D),0)}})}
336
- function kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h["return"](window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function hk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
337
- function lk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Ud})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.jc=!0;a.s=!0;a.g.onError(c);return}b.Ud=!0}Rj(a,b,4)}
338
- function gk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Gd||e!=b.Fd||f!=b.Ed)h=function(){var n;return K(function(p){if(1==p.g)return C(p,2),b.Fd=e,b.Ed=f,b.Gd=g,u(p,Ri(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return va(p,0);n=F(p);b.Fd=null;b.Ed=null;b.Gd=null;throw n;})},d.push(h());!ni(c.i,b.Uc)&&(b.Uc=c.i)&&(k=jk(a,b,c.i),l=function(){var n,p,q;return K(function(v){switch(v.g){case 1:return C(v,
339
- 2),u(v,k,4);case 4:return n=v.h,nf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,a.g.ne(b.type,n),5);case 5:return u(v,Ii(a.g.R,b.type,n,null,p),6);case 6:va(v,0);break;case 2:throw q=F(v),b.Uc=null,q;}})},a.g.Tf(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
340
- function ik(a,b,c,d,e,f){var g,h,k;return K(function(l){switch(l.g){case 1:return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.j.dispatchAllEmsgBoxes)&&(new Bf).U("emsg",function(m){var n=d.emsgSchemeIdUris;if(0===m.version){var p=m.reader.qc();var q=m.reader.qc();var v=m.reader.N();var y=m.reader.N();var x=m.reader.N();var w=m.reader.N();var D=e.startTime+y/v}else v=m.reader.N(),D=m.reader.Jb()/v+e.timestampOffset,y=D-e.startTime,x=m.reader.N(),
341
- w=m.reader.N(),p=m.reader.qc(),q=m.reader.qc();m=m.reader.Za(m.reader.S.byteLength-m.reader.$());if(n&&n.includes(p)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.Uf():(n=(new Map).set("detail",{startTime:D,endTime:D+x/v,schemeIdUri:p,value:q,timescale:v,presentationTimeDelta:y,eventDuration:x,id:w,messageData:m}),n=new R("emsg",n),a.g.onEvent(n))}).parse(f),u(l,mk(a,b,c),2);case 2:return nf(a.h),h=b.tc,b.tc=!1,k=b.le,b.le=!1,u(l,a.g.ne(b.type,f),3);case 3:return u(l,Ii(a.g.R,b.type,
342
- f,e,g,h,k),4);case 4:nf(a.h),A(l)}})}function mk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Ei(a.g.R,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.R.remove(b.type,e,e+g),2)}nf(a.h);A(h)})}function dk(a){return a&&a.type==jc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
343
- function jk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Jj(c.ya(),c.Ba,c.la,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof mi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.kb.request(e,f),b.ta=h,u(l,h.promise,2);k=l.h;b.ta=null;return l["return"](k.data)})}
344
- function Xj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.ab=!1,b.ed=!1,b.Hc=0,b.ac=!0,b.za=null,b.Uc=null,b.ba=null,d?(e=a.g.Pc(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,Qi(a.g.R,b.type),4);if(3!=g.g)return nf(a.h),c?u(g,a.g.R.flush(b.type),3):g.A(3);nf(a.h);b.ac=!1;b.endOfStream=!1;Rj(a,b,0);A(g)})}
345
- function Rj(a,b,c){var d=b.type;if(d!=jc||a.i.has(d))b.Sa=(new nc(function(){var e;return K(function(f){if(1==f.g)return C(f,2),u(f,ak(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).P(c)}function Mj(a){null!=a.Sa&&(a.Sa.stop(),a.Sa=null)}function Nj(a){return K(function(b){return a.ta?u(b,a.ta.abort(),0):b.A(0)})}function ck(a,b){return K(function(c){if(1==c.g)return u(c,Me(a.D),2);nf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);A(c)})};function nk(a,b){var c=ok(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return pk(d)});this.s=new mf(function(){return qk(d)})}nk.prototype.destroy=function(){return this.s.destroy()};function qk(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),rk(a),u(e,a.u,2);a.g&&a.g.Ga.lb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.lb();a.g=null;a.m=[];a.j=null;A(e)})}
346
- function sk(a,b){var c={Hb:function(){},Wc:function(){},lb:function(){},onError:function(){},Yc:function(){},fh:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();rk(a);return c}
347
- function pk(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.hb)var c=!1;else{a.g&&(a.g.Ga.lb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Hb(),a.g={node:d.node,payload:d.payload,hb:d.hb,Ga:c.Ga}):c.Ga.Yc();c=!0}c?c=Promise.resolve():a.g?c=tk(a):(a.j.Sf(a.i),a.o=new lc,c=a.o);b=u(b,c,1)}return b})}
348
- function tk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Af(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.kf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ga.Wc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ga.lb();else a.g.Ga.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function rk(a){a.o&&(a.o.resolve(),a.o=null)};function uk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=uk.prototype;r.remove=function(a,b){if(!this.g)return!1;vk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
234
+ initData:f.Ca,keyIds:g});break}}return c}function mg(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function cg(a){a.i.forEach(function(b,c){var d=b.Ud,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Ud=e)})}function wg(a){a=a.i.values();return of(a,function(b){return b.loaded})}
235
+ function lg(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
236
+ function Cg(a,b,c,d,e,f){var g={};a=t(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(n){return Db(n,m.pa.serverCertificate)}}(g))||c.push(g.pa.serverCertificate));if(g.pa.initData){h={};for(var k=t(g.pa.initData),l=k.next();!l.done;h={Cc:h.Cc},l=k.next())h.Cc=l.value,e.some(function(m){return function(n){var p=
237
+ m.Cc;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.Cc)}if(g.pa.keyIds)for(h=t(g.pa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
238
+ function ng(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 Jg=1,Fg=5,Gg=.5,Lg=new ic(function(){return Fb(new Uint8Array([0]))});function Mg(){}function Ng(a,b,c,d){var e,f,g,h;return G(function(k){if(1==k.g){if(d&&(e=Og[d.toLowerCase()]))return k["return"](e);if(f=Pg(a))if(g=Qg[f])return k["return"](g);return d?k.A(2):u(k,Rg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=Og[d]))return k["return"](h);throw new O(2,4,4E3,a);})}
240
+ function Rg(a,b,c){var d,e,f;return G(function(g){if(1==g.g)return d=Ze([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Pg(a){a=(new Jb(a)).qa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}L("shaka.media.ManifestParser",Mg);Mg.unregisterParserByMime=function(a){delete Og[a]};Mg.registerParserByMime=function(a,b){Og[a]=b};
241
+ Mg.registerParserByExtension=function(a,b){Qg[a]=b};var Og={},Qg={};function Sg(a){function b(){d=!0}function c(l){f.push(l);zf(l)}a=N(a);var d=!1,e,f=[],g=[];(new vf).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);Bf(l)}).T("encv",b).T("enca",b).T("avc1",function(l){g.push({box:l,pc:1701733238})}).T("avc3",function(l){g.push({box:l,pc:1701733238})}).T("ac-3",function(l){g.push({box:l,pc:1701733217})}).T("ec-3",function(l){g.push({box:l,pc:1701733217})}).T("mp4a",function(l){g.push({box:l,pc:1701733217})}).parse(a);
242
+ if(d)return a;if(0==g.length||!e)throw ab(Ic(a)),new O(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=Tg(a,e,k.box,f,k.pc);return a}
243
+ function Tg(a,b,c,d,e){var f=Ug.value(),g=a.subarray(c.start,c.start+c.size),h=Hb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Hb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Vg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=nc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Vg(e,d.start,d.size+k.byteLength);k=Hb(e,b.start);b=Af(b);a=k.getUint32(b);
244
+ k.setUint32(b,a+1);return e}function Vg(a,b,c){a=Hb(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 Ug=new ic(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 Wg(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=Xg(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],q=-1,v=-1,y=0;y<p.length;y++)if(null!=p[y]&&""!==p[y].g.trim()){q=y;break}for(y=p.length-1;0<=y;y--)if(null!=p[y]&&""!==p[y].g.trim()){v=y;break}if(-1===
245
+ q||-1===v)p=Yg(d,e),a.nestedCues.push(p);else{for(;q<=v;q++)if(y=p[q]){var x=y.l,w=y.i,C=y.j,z=y.h;if(x!=h||w!=k||C!=l||z!=m)n.payload&&a.nestedCues.push(n),n=Xg(d,e,x,w,C,z),h=x,k=w,l=C,m=z;n.payload+=y.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Yg(d,e),a.nestedCues.push(n));n=Xg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
246
+ function Xg(a,b,c,d,e,f){a=new hb(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Yg(a,b){var c=new hb(a,b,"");c.lineBreak=!0;return c}function Zg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function $g(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";ah(this)}function bh(a,b,c){return Wg(new hb(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function ah(a){ch(a,0,15);a.g=1}function dh(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case eh:d=fh.has(c)?fh.get(c):String.fromCharCode(c);break;case gh:d=hh.get(c);break;case ih:a.i[a.g].pop();d=jh.get(c);break;case kh:a.i[a.g].pop(),d=lh.get(c)}d&&a.i[a.g].push(new Zg(d,a.m,a.j,a.o,a.l))}}
247
+ function mh(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 ch(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
248
+ var eh=0,gh=1,ih=2,kh=3,fh=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"]]),hh=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"]]),jh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
249
+ [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"]]),lh=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
250
+ [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 nh(a,b){this.h=oh;this.o=new $g(a,b);this.i=new $g(a,b);this.l=new $g(a,b);this.g=this.i;this.j=0;this.m=null}function ph(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==qh&&a.h!==rh&&(e=bh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,ch(c,0,15),c=a.l,c.g=0<c.h?c.h:0,ch(c,0,15),d.g=15);a.h=qh;d.h=b;return e}function sh(a){a.h=th;a.g=a.l;a.g.h=0}function uh(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=rh}
251
+ var oh=0,th=1,qh=3,rh=4,vh="black green blue cyan red yellow magenta black".split(" "),wh="white green blue cyan red yellow magenta white_italics".split(" ");function xh(){this.l=!1;this.B=this.F=0;this.D=yh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";zh(this)}function zh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Ah())}function Ah(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Bh(a,b){Ch(a)&&(a.i[a.h][a.g]=new Zg(b,a.u,a.o,a.m,a.s),a.g++)}function Ch(a){var b=a.g<a.B&&0<=a.g;return a.h<a.F&&0<=a.h&&b}xh.prototype.isVisible=function(){return this.l};
252
+ function Dh(a,b,c){var d=new hb(a.j,b,"");d.textAlign=a.D===Eh?"left":a.D===Fh?"right":lb;if(c=Wg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Eh=0,Fh=1,yh=2;function Gh(){this.i=[];this.h=null;this.g=0}function Hh(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 Ih(a.h)),a.h=null,a.g=0))}function Ih(a){this.g=0;this.h=a}Ih.prototype.la=function(){return this.g<this.h.length};Ih.prototype.$=function(){return this.g};function Jh(a){if(!a.la())throw new O(2,2,3E3);return a.h[a.g++]}Ih.prototype.skip=function(a){if(this.g+a>this.h.length)throw new O(2,2,3E3);this.g+=a};function Kh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
253
+ function Lh(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=Jh(b).value;b=null;c=t(Mh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Dh(e,d,a.i)),zh(e);return b}if(137===c)for(b=Jh(b).value,b=t(Mh(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=Jh(b).value;b=null;c=t(Mh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Dh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Jh(b).value;
254
+ b=null;c=t(Mh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Dh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Jh(b).value,Nh(a,b,d);if(143===c)return d=Nh(a,255,d),Oh(a),d;if(144===c)b.skip(1),d=Jh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Jh(b).value,c=Jh(b).value,b.skip(1),a.g&&(b=Ph((c&48)>>4,(c&12)>>2,c&3),a.g.s=Ph((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Jh(b).value,b=Jh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
255
+ b.skip(1),d=Jh(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 xh;f.j=d;a.h[c]=f}d=Jh(b).value;Jh(b);Jh(b);f=Jh(b).value;var g=Jh(b).value;b=Jh(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 Mh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
256
+ function Nh(a,b,c){var d=null;b=t(Mh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Dh(f,c,a.i));a.h[e]=null}return d}function Oh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Ph(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Qh[a<<2|b<<1|c]}
257
+ var Rh=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"]]),Qh="black blue green cyan red magenta yellow white".split(" ");function Sh(){this.h=[];this.g=[];this.i=new Gh;this.l=0;this.s=new Map([["CC1",new nh(0,0)],["CC2",new nh(0,1)],["CC3",new nh(1,0)],["CC4",new nh(1,1)]]);this.o=this.m=0;this.j=new Map;Th(this)}function Th(a){a.m=0;a.o=0;a=t(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,ah(b.i),ah(b.l),ah(b.o)}
258
+ function Uh(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=t(a.h),e=d.next();!e.done;e=d.next())(e=Vh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Hh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Wh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
259
+ function Vh(a,b){var c=b.type;if(16===(b.wa&112)){var d=b.wa>>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.wa&&255===b.La||!b.wa&&!b.La||!Xh(b.wa)||!Xh(b.La))return 45<=++a.l&&Th(a),null;a.l=0;b.wa&=127;b.La&=127;if(!b.wa&&!b.La)return null;d=null;if(16===(b.wa&112))a:{var e=b.wa;d=b.La;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=wh[f]:7===f&&(h=!0);
260
+ d=1===(d&1);if(c.h!==rh){f=c.g;if(c.h===qh&&e!==f.g){var k=1+e-f.h;mh(f,k,1+f.g-f.h,f.h);ch(f,0,k-1);ch(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",dh(c.g,eh,32),g=!1,e=wh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=vh[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))dh(c.g,gh,d);else if(18===
261
+ (e&246)&&32===(d&224))dh(c.g,e&1?kh:ih,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.La){case 32:sh(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=ph(c,2,d);break;case 38:e=ph(c,3,d);break;case 39:e=ph(c,4,d);break;case 40:dh(c.g,eh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:ah(c.o);uh(c);break;case 43:uh(c);break;case 44:e=c.i;g=null;c.h!==rh&&(g=bh(e,c.j,d));ch(e,0,15);e=g;break;case 45:e=c.g;c.h!==qh?e=null:(g=bh(e,c.j,d),h=e.g-e.h+1,mh(e,h-1,h,e.h),ch(e,
262
+ 0,h-1),ch(e,e.g,15-e.g),c.j=d,e=g);break;case 46:ch(c.l,0,15);break;case 47:e=null,c.h!==rh&&(e=bh(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,sh(c),c.j=d}d=e;break a}d=null}else e=b.La,dh(c.g,eh,b.wa),dh(c.g,eh,e);return d}
263
+ function Wh(a,b){var c=[];try{for(;b.la();){var d=Jh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Jh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Kh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Jh(e),l=k.value,m=k.pts;if(16===l){var n=Jh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Ch(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.B-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Dh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
264
+ v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=Ah()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Dh(q,p,g.i));q.i[q.h]=Ah();q.g=0;break;case 12:q.isVisible()&&(e=Dh(q,p,g.i)),zh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Lh(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?Bh(g.g,"\u266a"):Bh(g.g,
265
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Bh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Rh.has(e)){var w=Rh.get(e);Bh(g.g,w)}else Bh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Bh(g.g,"_"):Bh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(C){if(C instanceof O&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Xh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Yh(){}Yh.prototype.init=function(){};Yh.prototype.parse=function(){return[]};function Zh(a,b){var c=null,d=null,e=null,f=a.L();b&1&&(e=a.ab());b&2&&a.skip(4);b&8&&(c=a.L());b&16&&(d=a.L());return{trackId:f,Ae:c,wf:d,sh:e}}function $h(a,b){return{ue:1==b?a.ab():a.L()}}function ai(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.L()}}
266
+ function bi(a,b,c){var d=a.L(),e=[],f=null;c&1&&(f=a.L());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={de:null,sampleSize:null,fd:null};c&256&&(h.de=a.L());c&512&&(h.sampleSize=a.L());c&1024&&a.skip(4);c&2048&&(h.fd=0==b?a.L():a.Oe());e.push(h)}return{xh:d,Qe:e,vf:f}};function ci(){this.j=new Map;this.i=this.h=0;this.g=di}
267
+ ci.prototype.init=function(a){function b(f){return function(){c.g=f}}var c=this,d=[],e=[];(new vf).box("moov",zf).box("mvex",zf).T("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.L();g=g.L();c.h=f;c.i=g}).box("trak",zf).T("tkhd",function(f){var g=f.reader;1==f.version?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));f=g.L();d.push(f)}).box("mdia",zf).T("mdhd",function(f){f=ai(f.reader,f.version);e.push(f.timescale)}).box("minf",zf).box("stbl",zf).T("stsd",Bf).box("avc1",b(ei)).box("avc3",b(ei)).box("hev1",
268
+ b(fi)).box("hvc1",b(fi)).box("dvh1",b(fi)).box("dvhe",b(fi)).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new O(2,2,2010);this.g==di&&Va("Unable to determine bitstream format for CEA parsing!");d.forEach(function(f,g){c.j.set(f,e[g])})};
269
+ ci.prototype.parse=function(a){var b=this;if(this.g==di)return[];var c=[],d=this.h,e=this.i,f=[],g=null,h=null,k=null,l=9E4;(new vf).box("moof",function(m){g=m.start;zf(m)}).box("traf",zf).T("trun",function(m){m=bi(m.reader,m.version,m.flags);f=m.Qe;h=m.vf}).T("tfhd",function(m){m=Zh(m.reader,m.flags);d=m.Ae||b.h;e=m.wf||b.i;m=m.trackId;b.j.has(m)&&(l=b.j.get(m))}).T("tfdt",function(m){k=$h(m.reader,m.version).ue}).box("mdat",function(m){if(null===k)throw new O(2,2,2010);a:{var n=m.reader,p=k,q=l,
270
+ v=d,y=e,x=f,w=0,C=y;x.length&&(C=x[0].sampleSize||y);for(n.skip((g||0)+(h||0)-m.start-8);n.la();){m=n.L();var z=n.Ra();switch(b.g){case ei:z&=31;z=6==z;break;case fi:z=z>>1&63;z=39==z||40==z;break;default:break a}if(z){z=0;x.length>w&&(z=x[w].fd||0);z=(p+z)/q;for(var B=[],E,F=n.$a(m-1),H=E=0;H<F.length;)2==E&&3==F[H]?(E=0,F=[].concat(ia(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++];
271
+ 4==F&&B.push(E.subarray(H,H+I));H+=I}B=t(B);for(E=B.next();!E.done;E=B.next())c.push({hg:E.value,pts:z})}else try{n.skip(m-1)}catch(J){break}C-=m+4;0==C&&(p=x.length>w?p+(x[w].de||v):p+v,w++,C=x.length>w?x[w].sampleSize||y:y)}}}).parse(a,!1);return c};var di=0,ei=1,fi=2;function gi(a){this.h=new Yh;a.includes("video/mp4")&&(this.h=new ci);this.g=new Sh}gi.prototype.init=function(a){this.h.init(a)};
272
+ function hi(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=N(e.hg);if(0<f.length&&(d=a.g,e=e.pts,f=new sf(f,0),181===f.Ra()&&49===f.Zd()&&1195456820===f.L()&&3===f.Ra())){var g=f.Ra();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Ra(),l=(k&4)>>2,m=f.Ra(),n=f.Ra();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,wa:m,La:n,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:n,order:d.g.length})))}}}}return Uh(a.g)}
273
+ ;function ii(a,b,c,d,e){this.xa=a;this.Aa=b;this.ka=c;this.Od=void 0===d?null:d;this.timescale=e}ii.prototype.kc=function(){return this.Aa};ii.prototype.fc=function(){return this.ka};function ji(a,b){return a&&b?a.kc()==b.kc()&&a.fc()==b.fc()&&gb(a.xa(),b.xa()):a==b}L("shaka.media.InitSegmentReference",ii);ii.prototype.getEndByte=ii.prototype.fc;ii.prototype.getStartByte=ii.prototype.kc;
274
+ function ki(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){l=void 0===l?[]:l;q=void 0===q?li:q;this.startTime=a;this.j=this.endTime=b;this.s=c;this.Aa=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.o=void 0===n?null:n;this.g=void 0===p?null:p;this.status=q;this.l=void 0===v?null:v;this.m=null}r=ki.prototype;r.xa=function(){return this.s()};r.getStartTime=function(){return this.startTime};r.Df=function(){return this.endTime};
275
+ r.kc=function(){return this.Aa};r.fc=function(){return this.ka};r.Uf=function(){return this.tilesLayout};r.Tf=function(){return this.o};r.Db=function(){return this.status};r.ag=function(){this.status=mi};r.Xe=function(a){this.m=a};r.Rf=function(){return this.m};L("shaka.media.SegmentReference",ki);ki.prototype.getThumbnailSprite=ki.prototype.Rf;ki.prototype.setThumbnailSprite=ki.prototype.Xe;ki.prototype.markAsUnavailable=ki.prototype.ag;ki.prototype.getStatus=ki.prototype.Db;
276
+ ki.prototype.getTileDuration=ki.prototype.Tf;ki.prototype.getTilesLayout=ki.prototype.Uf;ki.prototype.getEndByte=ki.prototype.fc;ki.prototype.getStartByte=ki.prototype.kc;ki.prototype.getEndTime=ki.prototype.Df;ki.prototype.getStartTime=ki.prototype.getStartTime;ki.prototype.getUris=ki.prototype.xa;var li=0,mi=1;ki.Status={Gg:li,ph:mi,Wg:2};function ni(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 oi(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function pi(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 qi(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(ri(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function si(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=ri(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function ri(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
+ @license
279
+ Shaka Player
280
+ Copyright 2022 Google LLC
281
+ SPDX-License-Identifier: Apache-2.0
282
+ */
283
+ function ti(){}function ui(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 vi(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=xc(N(a.data,1,c));a=xc(N(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=xc(N(a.data,1,c));a=xc(N(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=xc(N(a.data,0,d));a=Fb(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=xc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=xc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Fb(a.data),b):null}
286
+ function wi(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=ui(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=ui(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=vi(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
+ L("shaka.util.Id3Utils",ti);ti.getID3Frames=wi;function xi(){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
+ xi.prototype.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,yi(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]&
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.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=
290
+ a.subarray(h,e+188);null==this.m&&(h=zi(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=zi(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 zi(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),wh: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 Ai(a){for(var b=[],c=new Uint8Array(0),d=a.i.length-1;0<=d;d--){c=Jc(a.i[d],c);var e=zi(c);e&&(b.unshift({cueTime:e.pts?e.pts/9E4:null,data:e.data,frames:wi(e.data),dts:e.dts,pts:e.pts}),c=new Uint8Array(0))}return b}xi.prototype.getStartTime=function(){return{audio:this.h,video:this.m}};function yi(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71===a[c]&&71===a[c+188]&&71===a[c+376])return c;c++}return-1}L("shaka.util.TsParser",xi);function Bi(a,b,c){this.g=null;this.i=-1;this.j=a;this.h=b;this.l=c;"undefined"===typeof libDPIModule&&Va("Could not Find LCEVC Library dependencies on this page");"undefined"===typeof LcevcDil?Va("Could not Find LCEVC Library on this page"):LcevcDil.SupportObject.SupportStatus||Va(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))}Bi.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Ci(a,b){var c=Di;switch(b.mimeType){case "video/webm":c=Ei;break;case "video/mp4":c=Fi}a.g&&(a.i=b.id,a.g.setLevelSwitching(b.id,!0),a.g.setContainerFormat(c))}L("shaka.lcevc.Dil",Bi);Bi.prototype.release=Bi.prototype.release;var Di=0,Ei=1,Fi=2;function Gi(a,b,c,d){var e=this;this.j=a;this.F=null;this.m=b;this.h={};this.M={};this.P={};this.g=null;this.H=!1;this.W=c||function(){};this.D=d||null;this.i={};this.u=new hf;this.o={};this.s=null;this.K=new hc;this.l=Hi(this,this.K);this.G=new ff(function(){return Ii(e)});this.N="";this.B=!1;this.X=new hc}function Hi(a,b){var c=new MediaSource;a.u.na(c,"sourceopen",function(){URL.revokeObjectURL(a.N);b.resolve()});a.N=Ji(c);a.j.src=a.N;return c}r=Gi.prototype;r.destroy=function(){return this.G.destroy()};
294
+ function Ii(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"](Zb)),f=t(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=
295
+ null;a.i={};a.D=null;A(l)})}
296
+ r.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=gc,u(p,d.K,2);d.B=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={oa:f.oa},h=g.next())f.oa=h.value,k=a.get(f.oa),l=Uc(k.mimeType,k.codecs),f.oa==e.Z?Ki(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Oc(l,f.oa)||(d.o[f.oa]=new Nc(l),l=Rc(f.oa,l)),m=l+d.F.sourceBufferExtraFeatures,n=d.l.addSourceBuffer(m),d.u.C(n,"error",function(q){return function(){d.i[q.oa][0].p.reject(new O(2,3,3014,d.j.error?
297
+ d.j.error.code:0))}}(f)),d.u.C(n,"updateend",function(q){return function(){return Li(d,q.oa)}}(f)),d.h[f.oa]=n,d.M[f.oa]=l,d.i[f.oa]=[],d.P[f.oa]=!!k.drmInfos.length);A(p)})};r.configure=function(a){this.F=a};function Ki(a,b,c){a.g||(a.g=new Zc(a.m));var d=a.g;a=a.H;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,ad[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Mi(a){return a.l?"ended"==a.l.readyState:!0}
298
+ function Ni(a,b){return b==fc?a.g.g:ni(Oi(a,b))}function Pi(a,b){return b==fc?a.g.h:oi(Oi(a,b))}function Qi(a,b,c){if(b==fc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Oi(a,b);return qi(a,c)}r.Ma=function(){var a={total:ri(this.j.buffered),audio:ri(Oi(this,"audio")),video:ri(Oi(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 Oi(a,b){try{return a.h[b].buffered}catch(c){return null}}
299
+ function Ri(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,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P;return G(function(K){switch(K.g){case 1:h=gc;if(b!=h.Z){K.A(2);break}if(!a.B){K.A(3);break}return u(K,a.X,4);case 4:k=K.h,a.g.s=k;case 3:return u(K,bd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return K["return"]();case 2:l=N(c);m=a.M[b];a.o[b]&&(m=a.o[b].o);0>yi(l)?Si.includes(m)&&(q=wi(l),q.length&&d&&(v={cueTime:d.startTime,data:l,frames:q,dts:d.startTime,pts:d.startTime},a.W([v],
300
+ 0,d.endTime))):(n=Ai((new xi).parse(l)),n.length&&(p=a.h[b].timestampOffset,a.W(n,p,d?d.endTime:null)));if(!a.o[b]){e&&b==h.ua&&(a.g||Ki(a,"text/vtt",a.B),a.s||(a.s=new gi(m)),d?(y=hi(a.s,c),y.length&&(x=a.h[h.ua].timestampOffset,gd(a.g,y,d.startTime,d.endTime,x))):a.s.init(c));K.A(6);break}f&&a.o[b].g.resetCaptions();return u(K,Sc(a.o[b],c),7);case 7:w=K.h,a.g||Ki(a,"text/vtt",a.B),w.captions&&w.captions.length&&(C=a.h[h.ua].timestampOffset,z=ed(w.captions),gd(a.g,z,d?d.startTime:null,d?d.endTime:
301
+ null,C)),c=w.data;case 6:c=Ti(a,c,d?d.startTime:null,b);B=a.h[b];E=Ui;if(!a.B||B.mode==E||!d){K.A(8);break}F=b==h.ua||!(h.ua in a.h);if(!F){K.A(9);break}H=[B.appendWindowStart,B.appendWindowEnd];B.appendWindowStart=0;B.appendWindowEnd=Infinity;I=B.timestampOffset;B.timestampOffset=0;return u(K,Vi(a,b,function(){return Wi(a,b,c)}),10);case 10:return u(K,Vi(a,b,function(){return Xi(a,b)}),11);case 11:return B.timestampOffset=I,B.appendWindowStart=H[0],B.appendWindowEnd=H[1],J=ni(Oi(a,b)),M=(d.startTime||
302
+ 0)-(J||0),a.X.resolve(M),u(K,Vi(a,b,function(){return Yi(a,b,0,a.l.duration)}),12);case 12:if(b!=h.ua){K.A(9);break}return u(K,Vi(a,b,function(){a.j.currentTime-=.001;Li(a,b)}),9);case 9:B.mode=E;case 8:return d&&a.B&&b!=h.Z&&(f||g)&&(P=d.startTime,Vi(a,b,function(){return Xi(a,b)}),Vi(a,b,function(){var Y=P;0>Y&&(Y+=.001);a.h[b].timestampOffset=Y;Li(a,b)})),u(K,Vi(a,b,function(){Wi(a,b,c)}),15);case 15:A(K)}})}function Zi(a,b){var c=Pi(a,"video")||0;dd(a.g,b,c)}function $i(a){a.g&&dd(a.g,"",0)}
303
+ r.remove=function(a,b,c){var d=this,e;return G(function(f){e=gc;return a==e.Z?u(f,d.g.remove(b,c),0):u(f,Vi(d,a,function(){return Yi(d,a,b,c)}),0)})};function aj(a,b){var c;return G(function(d){c=gc;return b==c.Z?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Vi(a,b,function(){return Yi(a,b,0,a.l.duration)}),0)})}r.flush=function(a){var b=this,c;return G(function(d){c=gc;return a==c.Z?d["return"]():u(d,Vi(b,a,function(){b.j.currentTime-=.001;Li(b,a)}),0)})};
304
+ function bj(a,b,c,d,e,f){var g;return G(function(h){g=gc;return b==g.Z?(f||(a.g.s=c),cd(a.g,d,e),h["return"]()):u(h,Promise.all([Vi(a,b,function(){return Xi(a,b)}),f?Promise.resolve():Vi(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Li(a,b)}),Vi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Li(a,b)})]),0)})}
305
+ r.endOfStream=function(a){var b=this;return G(function(c){return u(c,cj(b,function(){Mi(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ia=function(a){var b=this;return G(function(c){return u(c,cj(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new hc};b.i[d].unshift(e)}b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function Wi(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 Yi(a,b,c,d){d<=c?Li(a,b):a.h[b].remove(c,d)}function Xi(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Li(a,b)}function Li(a,b){var c=a.i[b][0];c&&(c.p.resolve(),dj(a,b))}function Vi(a,b,c){gf(a.G);c={start:c,p:new hc};a.i[b].push(c);1==a.i[b].length&&ej(a,b);return c.p}
307
+ function cj(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:gf(a.G);c=[];d={};for(e in a.h)d.Tb=new hc,f={start:function(l){return function(){return l.Tb.resolve()}}(d),p:d.Tb},a.i[e].push(f),c.push(d.Tb),1==a.i[e].length&&f.start(),d={Tb:d.Tb};D(k,2);return u(k,Promise.all(c),4);case 4:za(k,3);break;case 2:throw g=Aa(k),g;case 3:try{b()}catch(l){throw new O(2,3,3015,l);}finally{for(h in a.h)dj(a,h)}A(k)}})}function dj(a,b){a.i[b].shift();ej(a,b)}
308
+ function ej(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)),dj(a,b)}}function Ti(a,b,c,d){var e=a.P[d];null==c&&e&&(pc()||nc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=Sg(b));return b}var Ji=window.URL.createObjectURL,Ui="sequence",Si=["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}r=T.prototype;r.getDuration=function(){return this.j};r.Jf=function(){return this.g};r.We=function(a){this.i=a};r.Ia=function(a){this.j=a};r.Of=function(){return this.i};r.Ue=function(a){this.s=a};r.xc=function(a){this.u=a};r.le=function(a){this.o=a};r.Ve=function(a){this.m=a};r.Cf=function(){return this.m};
309
+ r.Hb=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime;a=t(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.Sd(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)}};r.Md=function(){this.G=!0};r.Sd=function(a){this.l=null==this.l?a:Math.min(this.l,a)};r.Rd=function(a){this.g=Math.max(this.g,a)};
310
+ r.offset=function(a){null!=this.l&&(this.l+=a);null!=this.h&&(this.h+=a)};r.U=function(){return Infinity==this.j&&!this.u};r.kb=function(){return Infinity!=this.j&&!this.u};r.Oa=function(){return Math.max(this.B,this.hb()-this.o)};r.Ye=function(a){this.B=a};r.hb=function(){return this.U()||this.kb()?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
+ r.jc=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.hb()-this.o+a,this.Na()))};r.Cb=function(){return this.jc(0)};r.Na=function(){return Math.max(0,this.hb()-(this.U()||this.kb()?this.m:0))};r.cf=function(){return null==this.i||null!=this.h&&this.D?!1:!0};r.Te=function(a){this.F=a};L("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Te;T.prototype.usingPresentationStartTime=T.prototype.cf;
312
+ T.prototype.getSeekRangeEnd=T.prototype.Na;T.prototype.getSeekRangeStart=T.prototype.Cb;T.prototype.getSafeSeekRangeStart=T.prototype.jc;T.prototype.getSegmentAvailabilityEnd=T.prototype.hb;T.prototype.setUserSeekStart=T.prototype.Ye;T.prototype.getSegmentAvailabilityStart=T.prototype.Oa;T.prototype.isInProgress=T.prototype.kb;T.prototype.isLive=T.prototype.U;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Rd;T.prototype.notifyMinSegmentStartTime=T.prototype.Sd;
313
+ T.prototype.lockStartTime=T.prototype.Md;T.prototype.notifySegments=T.prototype.Hb;T.prototype.getDelay=T.prototype.Cf;T.prototype.setDelay=T.prototype.Ve;T.prototype.setSegmentAvailabilityDuration=T.prototype.le;T.prototype.setStatic=T.prototype.xc;T.prototype.setClockOffset=T.prototype.Ue;T.prototype.getPresentationStartTime=T.prototype.Of;T.prototype.setDuration=T.prototype.Ia;T.prototype.setPresentationStartTime=T.prototype.We;T.prototype.getMaxSegmentDuration=T.prototype.Jf;
314
+ T.prototype.getDuration=T.prototype.getDuration;function fj(a,b,c){this.l=c;this.j=a;this.s=gj(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}fj.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function hj(a,b){a.i=b}function ij(a){this.g=a}function gj(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(ri(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 jj(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new hf;this.m=!1;this.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return kj(f)});this.j=(new Q(function(){kj(f)})).Ba(.25)}jj.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};jj.prototype.Vd=function(){this.l=!0;kj(this)};
315
+ function kj(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=gj(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=si(c,b,a.D.gapDetectionThreshold),null==
316
+ 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 lj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=mj.value().get(b),c.na(a,b,d))}var mj=new ic(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function nj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new hf;this.i=new oj(a);lj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){pj(d,d.j)})}nj.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 qj(a){return a.m?a.g.currentTime:a.j}function rj(a,b){0<a.g.readyState?sj(a.i,b):lj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){pj(a,a.j)})}
317
+ function pj(a,b){.001>Math.abs(a.g.currentTime-b)?tj(a):(a.h.na(a.g,"seeking",function(){tj(a)}),sj(a.i,0==a.g.currentTime?b:a.g.currentTime))}function tj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function oj(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new Q(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}oj.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
318
+ function sj(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ba(.1)};function uj(a){this.g=a;this.j=!1;this.h=null;this.i=new hf}r=uj.prototype;r.zd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.na(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;lj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.Bd=function(a){this.h=this.j?this.h:a};r.Hc=function(){return(this.j?this.g.currentTime:this.h)||0};r.se=function(){return 0};
319
+ r.re=function(){return 0};r.Me=function(){};
320
+ function vj(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=wj(a,c,f);this.j=new jj(a,b.presentationTimeline,c,this.o,f);this.h=new nj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=qj(g.h);h=xj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;rj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},yj(this,d));this.m=new Q(function(){if(0!=g.i.readyState&&!g.i.paused){var h=qj(g.h),k=g.g.Cb(),l=g.g.Na();3>
321
+ l-k&&(k=l-3);h<k&&(h=xj(g,h),g.i.currentTime=h)}})}r=vj.prototype;r.zd=function(){this.m.Ba(.25)};r.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(){}};r.Bd=function(a){rj(this.h,a)};r.Hc=function(){var a=qj(this.h);return 0<this.i.readyState&&!this.i.paused?zj(this,a):a};r.se=function(){return this.o?this.o.o:0};r.re=function(){return this.j.u};
322
+ function yj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Cb():a.g.Na():0>b&&(b=a.g.Na()+b);return Aj(a,zj(a,b))}r.Me=function(){this.j.Vd()};function Aj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function xj(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Cb(),f=a.g.Na(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.jc(c),k=a.g.jc(d);c=a.g.jc(c+d);return b>=g?Aj(a,b):b>f?f:b<e?pi(a.i.buffered,k)?k:c:b>=h||pi(a.i.buffered,b)?b:c}
323
+ function zj(a,b){var c=a.g.Cb();if(b<c)return c;c=a.g.Na();return b>c?c:b}function wj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new fj(new ij(a),b.stallThreshold,c);hj(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function Bj(a){this.g=a;this.h=null;this.i=0;this.j=!1}r=Bj.prototype;r.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)};r.bg=function(){this.j=!0};function Cj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b(d.value)}r.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
+ r.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};r.offset=function(a){if(!this.j)for(var b=t(this.g),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=t(c.i);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};r.oc=function(a){!this.j&&a.length&&(this.g=this.g.filter(function(b){return b.startTime<a[0].startTime}),this.g.push.apply(this.g,ia(a)))};
325
+ r.Gb=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.oc(a);this.fb(b)};r.fb=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
+ r.Ya=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 ki(a.startTime,b,a.s,a.Aa,a.ka,a.h,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.i,a.tilesLayout,a.o,a.g,a.status,a.l))}};
327
+ r.gd=function(a,b){var c=this;this.j||(this.h&&this.h.stop(),this.h=new Q(function(){var d=b();d?c.g.push.apply(c.g,ia(d)):(c.h.stop(),c.h=null)}),this.h.Ba(a))};Bj.prototype[Symbol.iterator]=function(){return this.Bb(0)};Bj.prototype.Bb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.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 Dj(this,b,d)};
328
+ function Ej(a,b,c){return new Bj([new ki(a,a+b,function(){return c},0,null,null,a,a,a+b)])}L("shaka.media.SegmentIndex",Bj);Bj.forSingleSegment=Ej;Bj.prototype.getIteratorForTime=Bj.prototype.Bb;Bj.prototype.updateEvery=Bj.prototype.gd;Bj.prototype.fit=Bj.prototype.Ya;Bj.prototype.evict=Bj.prototype.fb;Bj.prototype.mergeAndEvict=Bj.prototype.Gb;Bj.prototype.offset=Bj.prototype.offset;Bj.prototype.get=Bj.prototype.get;Bj.prototype.find=Bj.prototype.find;Bj.prototype.markImmutable=Bj.prototype.bg;
329
+ Bj.prototype.release=Bj.prototype.release;function Dj(a,b,c){this.i=a;this.g=b;this.h=c}Dj.prototype.uf=function(){return this.g};Dj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.i.length&&a.xa().length&&this.h>=a.i.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.i.length?a.i[this.h]:a};
330
+ Dj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.i.length?(this.h++,a.xa().length&&this.h==a.i.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};L("shaka.media.SegmentIterator",Dj);Dj.prototype.next=Dj.prototype.next;Dj.prototype.current=Dj.prototype.current;Dj.prototype.currentPosition=Dj.prototype.uf;function Fj(){Bj.call(this,[]);this.l=[]}ra(Fj,Bj);r=Fj.prototype;r.clone=function(){var a=new Fj;a.l=this.l.slice();return a};
331
+ r.release=function(){for(var a=t(this.l),b=a.next();!b.done;b=a.next())b.value.release();this.l=[]};r.find=function(a){for(var b=0,c=t(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};r.get=function(a){for(var b=0,c=t(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};r.offset=function(){};r.oc=function(){};r.fb=function(){};r.Gb=function(){};r.Ya=function(){};r.gd=function(){};
332
+ L("shaka.media.MetaSegmentIndex",Fj);Fj.prototype.updateEvery=Fj.prototype.gd;Fj.prototype.fit=Fj.prototype.Ya;Fj.prototype.mergeAndEvict=Fj.prototype.Gb;Fj.prototype.evict=Fj.prototype.fb;Fj.prototype.merge=Fj.prototype.oc;Fj.prototype.offset=Fj.prototype.offset;Fj.prototype.get=Fj.prototype.get;Fj.prototype.find=Fj.prototype.find;Fj.prototype.release=Fj.prototype.release;function Gj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Tc();this.h=new Q(function(){b.g.Le(.25*b.i)})}Gj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Gj.prototype.set=function(a){this.i=a;Hj(this)};Gj.prototype.Pc=function(){return this.g.Pc()};function Hj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Tc()!=b&&a.g.ke(b);return}catch(c){}a.h.Ba(.25);0!=a.g.Tc()&&a.g.ke(0)};function Ij(a){var b=this;this.h=a;this.g=new Set;this.i=(new Q(function(){Jj(b,!1)})).Ba(.25)}Ij.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Jj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Kj(a){Qe.call(this);this.g=new Map;this.h=a}ra(Kj,Qe);Kj.prototype.release=function(){this.g.clear();Qe.prototype.release.call(this)};function Lj(a,b){var c=a.g.get(b);c||(c={qc:[],ye:null,contentType:b},a.g.set(b,c));return c}function Mj(a,b,c){var d=Lj(a,b.contentType);Nj(a,d);a={Od:b,position:c};d=d.qc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
333
+ Kj.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.qc;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.ye,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.ye=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Nj(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.qc;b.qc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.qc=[]};function Oj(a){Qe.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new Q(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ba(2)}ra(Oj,Qe);Oj.prototype.release=function(){this.g.clear();this.h.stop();Qe.prototype.release.call(this)};function Pj(a){Qe.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{rb:null,qb:Qj,jb:function(c,d){return Rj(b,"enter",c,d)}},{rb:Sj,qb:Qj,jb:function(c,d){return Rj(b,"enter",c,d)}},{rb:Tj,qb:Qj,jb:function(c,d){return Rj(b,"enter",c,d)}},{rb:Qj,qb:Sj,jb:function(c,d){return Rj(b,"exit",c,d)}},{rb:Qj,qb:Tj,jb:function(c,d){return Rj(b,"exit",c,d)}},{rb:Sj,qb:Tj,jb:function(c,d){return Rj(b,"skip",c,d)}},{rb:Tj,qb:Sj,jb:function(c,d){return Rj(b,"skip",c,d)}}];this.h=new hf;this.h.C(this.i,"regionremove",
335
+ function(c){b.g["delete"](c.region)})}ra(Pj,Qe);Pj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Qe.prototype.release.call(this)};Pj.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Sj:a>d.endTime?Tj:Qj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.rb==e&&h.qb==f&&h.jb(d,b)}};
336
+ function Rj(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Sj=1,Qj=2,Tj=3;function Uj(a,b,c,d,e){a=Ze(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Vj(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 ff(function(){return Wj(c)})}r=Vj.prototype;r.destroy=function(){return this.h.destroy()};function Wj(a){var b,c,d,e;return G(function(f){if(1==f.g){b=[];c=t(a.j.values());for(d=c.next();!d.done;d=c.next())e=d.value,Xj(e),b.push(Yj(e));return u(f,Promise.all(b),2)}a.j.clear();a.g=null;a.m=null;a.i=null;A(f)})}
337
+ r.configure=function(a){this.i=a;this.F=new Ee({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)};r.start=function(){var a=this;return G(function(b){if(1==b.g)return u(b,Zj(a),2);gf(a.h);a.B=!0;A(b)})};
338
+ function ak(a,b){var c,d,e,f,g,h;G(function(k){switch(k.g){case 1:return c=gc,D(k,2),u(k,aj(a.g.R,c.Z),4);case 4:za(k,3);break;case 2:if(d=Aa(k),a.g)a.g.onError(d);case 3:e=Uc(b.mimeType,b.codecs);Ki(a.g.R,e,a.m.sequenceMode);f=a.g.R.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=bk(b),a.j.set(c.Z,h),ck(a,h,0);A(k)}})}function dk(a){var b=a.j.get(fc);b&&(Xj(b),Yj(b)["catch"](function(){}),a.j["delete"](fc));a.o=null}
339
+ function ek(a,b){var c=a.j.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.ob&&(fk(a,e,!1,0,!1),c.ob=d)}else if(d=c.ob)c.ob=null,fk(a,d,!0,0,!1)}}function gk(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&&fk(a,b.video,c,d,e,f),b.audio&&fk(a,b.audio,c,d,e,f))}function hk(a,b){a.o=b;a.B&&fk(a,b,!0,0,!1)}
340
+ function fk(a,b,c,d,e,f){var g=a.j.get(b.type);g||b.type!=fc?g&&(g.ob&&(b.trickModeVideo?(g.ob=b,b=b.trickModeVideo):g.ob=null),g.stream!=b||e)&&(b.type==fc&&Ki(a.g.R,Uc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.te=!!f,c&&(g.ac?g.jd=!0:g.Ha?(g.cb=!0,g.Mc=d,g.jd=!0):(Xj(g),ik(a,g,!0,d)["catch"](function(h){if(a.g)a.g.onError(h)}))),jk(a,g)["catch"](function(h){if(a.g)a.g.onError(h)})):ak(a,b)}
341
+ function jk(a,b){var c,d;return G(function(e){if(1==e.g){if(!b.sa)return e["return"]();c=b.stream;d=b.sa;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.sa!=d||b.stream!=c)return e["return"]();var f=a.g.Sc();var g=Pi(a.g.R,b.type),h=b.stream.segmentIndex.find(b.ya?b.ya.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.ka?k.ka-k.Aa:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.h)&&(h+=(k.ka?k.ka-k.Aa:null)||0),k=a.g.getBandwidthEstimate(),
342
+ f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.sa.h.g>h?!0:!1):f=!1;f&&b.sa.abort();A(e)})}
343
+ r.uc=function(){for(var a=this.g.Sc(),b=t(this.j.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.j.get(d);c.ba=null;var e=this.g.R;d==fc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Oi(e,d),e=pi(e,a));if(!e){(null!=Pi(this.g.R,d)||c.Ha)&&kk(this,c);c.sa&&(c.sa.abort(),c.sa=null);if(d===fc&&(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,Th(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())Oh(e.value);c.uc=!0}}};
344
+ function kk(a,b){b.ac||b.cb||(b.Ha?(b.cb=!0,b.Mc=0):null==Ni(a.g.R,b.type)?null==b.Ta&&ck(a,b,0):(Xj(b),ik(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
345
+ function Zj(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){if(1==n.g){b=gc;if(!a.l)throw new O(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.Gc,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.ua,a.l.video),d.add(a.l.video));a.o&&(c.set(b.Z,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)}gf(a.h);a.updateDuration();g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.j.has(k)||(m=bk(l),a.j.set(k,m),ck(a,m,0));A(n)})}
346
+ function bk(a){return{stream:a,type:a.type,ba:null,ya:null,Zc:null,Kd:null,Jd:null,Id:null,ob:null,endOfStream:!1,Ha:!1,Ta:null,cb:!1,Mc:0,jd:!1,ac:!1,uc:!0,ae:!1,mc:!1,sa:null}}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Ia(a):this.g.R.Ia(Math.pow(2,32))};
347
+ function lk(a,b){var c,d,e,f,g;return G(function(h){switch(h.g){case 1:gf(a.h);if(b.Ha||null==b.Ta||b.ac)return h["return"]();b.Ta=null;if(!b.cb){h.A(2);break}return u(h,ik(a,b,b.jd,b.Mc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ta&&ck(a,b,0),h["return"]();case 4:D(h,6);d=mk(a,b);null!=d&&(ck(a,b,d),b.mc=!1);za(h,7);break;case 6:return e=
348
+ Aa(h),u(h,nk(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:gf(a.h),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),A(h)}})}
349
+ function mk(a,b){if(ok(b))return Zi(a.g.R,b.stream.originalId||""),null;b.type==fc&&$i(a.g.R);var c=a.g.Sc(),d=b.ya?b.ya.endTime:c,e=Qi(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=Pi(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.j.get(fc))&&ok(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=pk(a,b,c,h);if(!e)return a.i.updateIntervalSeconds;
350
+ f=Infinity;g=Array.from(a.j.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,ok(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.ya?h.ya.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;qk(a,b,c,e)["catch"](function(){});return null}
351
+ function pk(a,b,c,d){if(b.ba)return b.ba.current();if(b.ya||d)return b.ba=b.stream.segmentIndex.Bb(b.ya?b.ya.endTime:d),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.Bb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.Bb(c),e=b.ba&&b.ba.next().value);return e}
352
+ function qk(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y,x,w,C;return G(function(z){switch(z.g){case 1:e=gc;f=b.stream;g=b.ba;b.Ha=!0;D(z,2);if(2==d.Db())throw new O(1,1,1011);return u(z,rk(a,b,d),4);case 4:gf(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),q=p=!1,v=function(B){var E,F,H;return G(function(I){if(p)return I["return"]();q=!0;gf(a.h);if(a.s)return I["return"]();n=sk(n,B);E=
353
+ !1;F=0;(new vf).box("mdat",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,tk(a,b,c,f,d,H),0)})},u(z,uk(a,b,d,v),11);l=uk(a,b,d);return u(z,l,7);case 7:m=z.h;gf(a.h);if(a.s)return z["return"]();if(!d.l){z.A(8);break}return u(z,vk(m,d,g),9);case 9:m=z.h;case 8:return gf(a.h),b.cb?(b.Ha=!1,ck(a,b,0),z["return"]()):u(z,tk(a,b,c,f,d,m),6);case 11:y=z.h;if(q){z.A(6);break}p=!0;gf(a.h);return a.s?z["return"]():b.cb?(b.Ha=!1,ck(a,b,0),z["return"]()):
354
+ u(z,tk(a,b,c,f,d,y),6);case 6:gf(a.h);if(a.s)return z["return"]();b.ya=d;g.next();b.Ha=!1;b.ae=!1;x=a.g.R.Ma();w=x[b.type];$a(JSON.stringify(w));b.cb||a.g.Vd(d.startTime,d.endTime,b.type);ck(a,b,0);za(z,0);break;case 2:C=Aa(z);gf(a.h,C);if(a.s)return z["return"]();b.Ha=!1;if(7001==C.code)b.Ha=!1,b.Ta=null,ck(a,b,0),z.A(0);else if(b.type==e.Z&&a.i.ignoreTextStreamFailures)a.j["delete"](e.Z),z.A(0);else if(3017==C.code)wk(a,b,C),z.A(0);else return b.mc=!0,C.severity=2,u(z,nk(a,C),0)}})}
355
+ function vk(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=N(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 sk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
356
+ function wk(a,b,c){if(!Array.from(a.j.values()).some(function(e){return e!=b&&e.ae})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.mc=!0;a.s=!0;a.g.onError(c);return}b.ae=!0}ck(a,b,4)}
357
+ function rk(a,b,c){var d,e,f,g,h,k,l;return G(function(m){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 n;return G(function(p){if(1==p.g)return D(p,2),b.Jd=e,b.Id=f,b.Kd=g,u(p,bj(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return za(p,0);n=Aa(p);b.Jd=null;b.Id=null;b.Kd=null;throw n;})},d.push(h());!ji(c.h,b.Zc)&&(b.Zc=c.h)&&(k=uk(a,b,c.h),l=function(){var n,p,q,v;return G(function(y){switch(y.g){case 1:return D(y,
358
+ 2),u(y,k,4);case 4:return n=y.h,gf(a.h),p=new vf,p.box("moov",zf).box("trak",zf).box("mdia",zf).T("mdhd",function(x){x=ai(x.reader||0,x.version||0);c.h.timescale=x.timescale}).parse(n),q=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(y,a.g.ve(b.type,n),5);case 5:return u(y,Ri(a.g.R,b.type,n,null,q),6);case 6:za(y,0);break;case 2:throw v=Aa(y),b.Zc=null,v;}})},a.g.eg(c.startTime,c.h),d.push(l()));return u(m,Promise.all(d),0)})}
359
+ function tk(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 vf;k&&h.T("emsg",function(q){var v=d.emsgSchemeIdUris;if(0===q.version){var y=q.reader.rc();var x=q.reader.rc();var w=q.reader.L();var C=q.reader.L();var z=q.reader.L();var B=q.reader.L();var E=e.startTime+C/w}else w=q.reader.L(),E=q.reader.ab()/w+e.timestampOffset,
360
+ C=E-e.startTime,z=q.reader.L(),B=q.reader.L(),y=q.reader.rc(),x=q.reader.rc();q=q.reader.$a(q.reader.S.byteLength-q.reader.$());if(v&&v.includes(y)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==y?a.g.fg():"https://aomedia.org/emsg/ID3"==y?(v=wi(q),v.length&&e&&a.g.gg([{cueTime:e.startTime,data:q,frames:v,dts:e.startTime,pts:e.startTime}],0,e.endTime)):(v=(new Map).set("detail",{startTime:E,endTime:E+z/w,schemeIdUri:y,value:x,timescale:w,presentationTimeDelta:C,eventDuration:z,id:B,messageData:q}),
361
+ v=new S("emsg",v),a.g.onEvent(v))});l&&h.T("prft",function(q){a:{if(!a.D&&e.h.timescale){q.reader.L();var v=q.reader.L(),y=q.reader.L();v=1E3*v+y/Math.pow(2,32)*1E3;if(0===q.version)var x=q.reader.L();else try{x=q.reader.ab()}catch(w){a.D=!0;x=void 0;break a}q=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+v)).getTime();x=(new Map).set("detail",{wallClockTime:q,programStartDate:new Date(q-x/e.h.timescale*1E3)});x=new S("prft",x);a.g.onEvent(x);a.D=!0}x=void 0}return x});(k||l)&&h.parse(f);
362
+ return u(p,xk(a,b,c),2);case 2:return gf(a.h),m=b.uc,b.uc=!1,n=b.te,b.te=!1,u(p,a.g.ve(b.type,f),3);case 3:return u(p,Ri(a.g.R,b.type,f,e,g,m,n),4);case 4:gf(a.h),A(p)}})}function xk(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=Ni(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)}gf(a.h);A(h)})}
363
+ function ok(a){return a&&a.type==fc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}function uk(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=ef,f=Uj(c.xa(),c.Aa,c.ka,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof ii,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.lb.request(e,f),b.sa=h,u(l,h.promise,2);k=l.h;b.sa=null;return l["return"](k.data)})}
364
+ function ik(a,b,c,d){var e,f;return G(function(g){if(1==g.g)return b.cb=!1,b.jd=!1,b.Mc=0,b.ac=!0,b.ya=null,b.Zc=null,b.ba=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,aj(a.g.R,b.type),4);if(3!=g.g)return gf(a.h),c?u(g,a.g.R.flush(b.type),3):g.A(3);gf(a.h);b.ac=!1;b.endOfStream=!1;ck(a,b,0);A(g)})}
365
+ function ck(a,b,c){var d=b.type;if(d!=fc||a.j.has(d))b.Ta=(new jc(function(){var e;return G(function(f){if(1==f.g)return D(f,2),u(f,lk(a,b),4);if(2!=f.g)return za(f,0);e=Aa(f);if(a.g)a.g.onError(e);A(f)})})).O(c)}function Xj(a){null!=a.Ta&&(a.Ta.stop(),a.Ta=null)}function Yj(a){return G(function(b){return a.sa?u(b,a.sa.abort(),0):b.A(0)})}function nk(a,b){return G(function(c){if(1==c.g)return u(c,Ge(a.F),2);gf(a.h);a.g.onError(b);b.handled||a.i.failureCallback(b);A(c)})};function yk(a,b){var c=zk(),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 Ak(d)});this.s=new ff(function(){return Bk(d)})}yk.prototype.destroy=function(){return this.s.destroy()};function Bk(a){var b,c,d;return G(function(e){if(1==e.g)return a.h&&a.h.abort(),Ck(a),u(e,a.u,2);a.g&&a.g.Ga.mb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.mb();a.g=null;a.m=[];a.j=null;A(e)})}
366
+ function Dk(a,b){var c={Ib:function(){},bd:function(){},mb:function(){},onError:function(){},dd:function(){},vh:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Ck(a);return c}
367
+ function Ak(a){return G(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.ib)var c=!1;else{a.g&&(a.g.Ga.mb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Ib(),a.g={node:d.node,payload:d.payload,ib:d.ib,Ga:c.Ga}):c.Ga.dd();c=!0}c?c=Promise.resolve():a.g?c=Ek(a):(a.j.dg(a.i),a.o=new hc,c=a.o);b=u(b,c,1)}return b})}
368
+ function Ek(a){var b,c;return G(function(d){switch(d.g){case 1:return a.i=a.j.Lf(a.i,a.l,a.g.node,a.g.payload),D(d,2),a.h=a.j.xf(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ga.bd(),a.g=null);za(d,0);break;case 2:b=Aa(d);if(7001==b.code)a.g.Ga.mb();else a.g.Ga.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,A(d)}})}function Ck(a){a.o&&(a.o.resolve(),a.o=null)};function Fk(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Fk.prototype;r.remove=function(a,b){if(!this.g)return!1;Gk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
349
369
  r.append=function(a){function b(h,k){for(var l=t(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
350
- l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={rb:f.rb},g=d.next())f.rb=g.value,a.some(function(h){return function(k){return k.startTime==h.rb.startTime&&k.endTime==h.rb.endTime&&k.text==h.rb.payload?!0:!1}}(f))||(g=wk(f.rb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
351
- e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(vk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
352
- function wk(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
353
- function vk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",uk);uk.prototype.setTextVisibility=uk.prototype.setTextVisibility;uk.prototype.isTextVisible=uk.prototype.isTextVisible;uk.prototype.destroy=uk.prototype.destroy;uk.prototype.append=uk.prototype.append;uk.prototype.remove=uk.prototype.remove;function xk(){}function yk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",xk);xk.removeAllChildren=yk;function zk(a,b){var c=this;this.j=!1;this.i=[];this.B=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.u=(new O(function(){Ak(c)})).Ca(.25);this.h=new Map;this.s=new of;this.s.C(document,"fullscreenchange",function(){Ak(c,!0)});this.l=null;"ResizeObserver"in
354
- window&&(this.l=new ResizeObserver(function(){Ak(c,!0)}),this.l.observe(this.g));this.o=new Map}r=zk.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={zc:c.zc},d=a.next())c.zc=d.value,b.some(function(e){return function(f){return tb(f,e.zc)}}(c))||this.i.push(c.zc);Ak(this)};
355
- r.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)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Ak(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
356
- function Bk(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.Ue:null;l&&(g.push(l.xd),l.rc&&g.push(l.rc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Ck(a,k,e),l=a.h.get(k),n=l.Ue,f=!0));0<k.nestedCues.length&&n&&Bk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=q.startTime?
357
- p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.rc?(c.appendChild(d.rc),d.rc.appendChild(d.xd)):c.appendChild(d.xd)}}function Ak(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())yk(e.value);yk(a.g);a.h.clear();a.o.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Bk(a,a.i,a.g,c,[])}}}
358
- function Ck(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&&Dk(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.o.has(c.id))c=a.o.get(c.id);else{e=document.createElement("span");var g=c.heightUnits==Ab?"%":"px",h=c.widthUnits==Ab?"%":"px",k=c.viewportAnchorUnits==Ab?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position=
359
- "absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(c.id,e);c=e}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{xd:f,Ue:e,rc:c})}
360
- function Dk(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Ek(c.linePadding,c,a.m);f.paddingRight=Ek(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
361
- "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Fk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent=
362
- "before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Ek(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mb?(f.width="100%",c.lineAlign==ob?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==ob?
363
- f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height="100%",c.lineAlign==ob?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==mb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
364
- f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==mb?f.width=c.size+"%":f.height=c.size+"%")}function Ek(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}
365
- function Fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",zk);zk.prototype.setTextVisibility=zk.prototype.setTextVisibility;zk.prototype.isTextVisible=zk.prototype.isTextVisible;zk.prototype.remove=zk.prototype.remove;zk.prototype.destroy=zk.prototype.destroy;zk.prototype.append=zk.prototype.append;function Gk(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},
370
+ l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={sb:f.sb},g=d.next())f.sb=g.value,a.some(function(h){return function(k){return k.startTime==h.sb.startTime&&k.endTime==h.sb.endTime&&k.text==h.sb.payload?!0:!1}}(f))||(g=Hk(f.sb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
371
+ e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(Gk(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
372
+ function Hk(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}
373
+ function Gk(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}L("shaka.text.SimpleTextDisplayer",Fk);Fk.prototype.setTextVisibility=Fk.prototype.setTextVisibility;Fk.prototype.isTextVisible=Fk.prototype.isTextVisible;Fk.prototype.destroy=Fk.prototype.destroy;Fk.prototype.append=Fk.prototype.append;Fk.prototype.remove=Fk.prototype.remove;function Ik(){}function Jk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}L("shaka.util.Dom",Ik);Ik.removeAllChildren=Jk;function Kk(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 Q(function(){Lk(c)})).Ba(.25);this.h=new Map;this.s=new hf;this.s.C(document,"fullscreenchange",function(){Lk(c,!0)});this.l=null;"ResizeObserver"in
374
+ window&&(this.l=new ResizeObserver(function(){Lk(c,!0)}),this.l.observe(this.g));this.o=new Map}r=Kk.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={Bc:c.Bc},d=a.next())c.Bc=d.value,b.some(function(e){return function(f){return tb(f,e.Bc)}}(c))||this.i.push(c.Bc);Lk(this)};
375
+ r.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)};r.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});Lk(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
376
+ function Mk(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.df:null;l&&(g.push(l.Cd),l.sc&&g.push(l.sc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Nk(a,k,e),l=a.h.get(k),n=l.df,f=!0));0<k.nestedCues.length&&n&&Mk(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,q){return p.startTime!=q.startTime?
377
+ p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.sc?(c.appendChild(d.sc),d.sc.appendChild(d.Cd)):c.appendChild(d.Cd)}}function Lk(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())Jk(e.value);Jk(a.g);a.h.clear();a.o.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Mk(a,a.i,a.g,c,[])}}}
378
+ function Nk(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&&Ok(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.o.has(c.id))c=a.o.get(c.id);else{e=document.createElement("span");var g=c.heightUnits==Ab?"%":"px",h=c.widthUnits==Ab?"%":"px",k=c.viewportAnchorUnits==Ab?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position=
379
+ "absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(c.id,e);c=e}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{Cd:f,df:e,sc:c})}
380
+ function Ok(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=Pk(c.linePadding,c,a.m);f.paddingRight=Pk(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
381
+ "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=Qk(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=
382
+ "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=Pk(c.fontSize,c,a.m);null!=c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=100-c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==
383
+ pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=100-c.line+"%")):(f.height="100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=100-c.line+"%")));f.lineHeight=c.lineHeight;null!=c.position&&(c.writingMode==mb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&
384
+ f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==mb?f.width=c.size+"%":f.height=c.size+"%")}function Pk(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}}
385
+ function Qk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}L("shaka.text.UITextDisplayer",Kk);Kk.prototype.setTextVisibility=Kk.prototype.setTextVisibility;Kk.prototype.isTextVisible=Kk.prototype.isTextVisible;Kk.prototype.remove=Kk.prototype.remove;Kk.prototype.destroy=Kk.prototype.destroy;Kk.prototype.append=Kk.prototype.append;function Rk(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},
366
386
  "");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");break;case "right":k.push("align:right");break;case lb:k.push("align:middle");
367
- break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function Hk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Ik(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.V()?Jk:Kk};d.ot=Lk(c);var e=d.ot===Mk||d.ot===Nk||d.ot===Ok||d.ot===Pk;e&&(d.bl=Qk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Pk&&(d.tb=Rk(a,d.ot)/1E3);Sk(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
368
- function Tk(a,b,c){try{if(!a.g.enabled)return b;var d=Uk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Ok;break a;case "application/x-mpegurl":e=Vk;break a}e=void 0}d.ot=e;d.su=!0;var f=Wk(d);return Xk(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Uk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
369
- function Sk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Uk(a));c.pr=a.h.Oc();var e=c.ot===Mk||c.ot===Ok;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Yk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Wk(c);f&&(b.uris=b.uris.map(function(g){return Xk(g,f)}))}}}
370
- function Lk(a){var b=a.type;if(a.init)return Zk;if("video"==b)return a.codecs.includes(",")?Ok:Mk;if("audio"==b)return Nk;if("text"==b)return"application/mp4"===a.mimeType?Pk:$k}function Qk(a,b){var c=a.h.Ma()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
371
- function Rk(a,b){var c=a.h.Ya();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Mk:return d.videoBandwidth||NaN;case Nk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
372
- function Wk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
373
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Yk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=Wk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
374
- function Xk(a,b){if(!b||a.includes("offline:"))return a;var c=new Nb(a);c.g.set("CMCD",b);return c.toString()}var Vk="m",Nk="a",Mk="v",Ok="av",Zk="i",$k="c",Pk="tt",Kk="v",Jk="l";M("shaka.util.CmcdManager.StreamingFormat",{yg:"d",Gg:"h",Qg:"s",Mg:"o"});function al(){}
375
- function bl(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Xe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Xe(l)),k=bl(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
376
- k),g=!1)}return g}function cl(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function dl(a,b){return a&&b}M("shaka.util.ConfigUtils",al);al.convertToConfigObject=cl;al.mergeConfigObjects=bl;function el(){}
377
- function fl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Le(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return dl([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:rc()},c={retryParameters:Le(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,
387
+ break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}L("shaka.text.WebVttGenerator",function(){});function Sk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Tk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?Uk:Vk};d.ot=Wk(c);var e=d.ot===Xk||d.ot===Yk||d.ot===Zk||d.ot===$k;e&&(d.bl=al(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==$k&&(d.tb=bl(a,d.ot)/1E3);cl(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
388
+ function dl(a,b,c){try{if(!a.g.enabled)return b;var d=el(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Zk;break a;case "application/x-mpegurl":e=fl;break a}e=void 0}d.ot=e;d.su=!0;var f=gl(d);return hl(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function el(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}}
389
+ function cl(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,el(a));c.pr=a.h.Rc();var e=c.ot===Xk||c.ot===Zk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=il(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=gl(c);f&&(b.uris=b.uris.map(function(g){return hl(g,f)}))}}}
390
+ function Wk(a){var b=a.type;if(a.init)return jl;if("video"==b)return a.codecs.includes(",")?Zk:Xk;if("audio"==b)return Yk;if("text"==b)return"application/mp4"===a.mimeType?$k:kl}function al(a,b){var c=a.h.Ma()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
391
+ function bl(a,b){var c=a.h.Pa();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case Xk:return d.videoBandwidth||NaN;case Yk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
392
+ function gl(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
393
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function il(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=gl(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
394
+ function hl(a,b){if(!b||a.includes("offline:"))return a;var c=new Jb(a);c.g.set("CMCD",b);return c.toString()}var fl="m",Yk="a",Xk="v",Zk="av",jl="i",kl="c",$k="tt",Vk="v",Uk="l";L("shaka.util.CmcdManager.StreamingFormat",{Kg:"d",Sg:"h",eh:"s",Zg:"o"});function ll(){}
395
+ function ml(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]=Re(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Re(l)),k=ml(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
396
+ k),g=!1)}return g}function nl(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 ol(a,b){return a&&b}L("shaka.util.ConfigUtils",ll);ll.convertToConfigObject=nl;ll.mergeConfigObjects=ml;function pl(){}
397
+ function ql(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Fe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return ol([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:nc()},c={retryParameters:Fe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,
378
398
  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","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
379
- "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return dl([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:Le(),failureCallback:function(g){return dl([g],void 0)},
380
- rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30};if(sc("Web0S")||tc()||sc("CrKey"))d.stallSkip=
381
- 0;var e={trackSelectionCallback:function(g){return K(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return dl([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new oe},
382
- abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,ignoreDevicePixelRatio:!1},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",
383
- preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h["return"](gl(g,
384
- f.preferredAudioLanguage))})};return f}function hl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return bl(a,b,c||fl(),d,"")}
385
- function gl(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=wd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Q(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
386
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=jc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",el);el.mergeConfigObjects=hl;el.createDefault=fl;function il(){this.g=null;this.h=[]}function jl(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 kl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
387
- function ll(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function ml(){this.i=this.h=null;this.g=[]}function nl(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 ol(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.I=this.L=this.M=this.l=this.o=NaN;this.g=new il;this.h=new ml};function U(a,b){We.call(this);var c=this;this.l=pl;this.Jc=this.g=null;this.ha=!1;this.Rc=new of;this.Wb=new of;this.s=new of;this.Cd=this.u=this.Vb=this.i=this.Sc=this.I=this.j=this.ia=this.T=this.Tc=this.M=this.Kc=this.G=this.vb=this.B=this.L=this.m=this.F=null;this.Ie=1E9;this.h=ql(this);this.$b={width:Infinity,height:Infinity};this.o=null;this.Ka=new Ce(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.sb=this.h.preferredTextLanguage;this.Zb=this.h.preferredTextRole;
388
- this.Xb=this.h.preferForcedSubs;this.Mb=[];this.cc=null;b&&b(this);this.F=rl(this);this.F.ae(this.h.streaming.forceHTTPS);this.D=null;sl&&(this.D=sl());this.Rc.C(window,"online",function(){c.Vd()});this.O={name:"detach"};this.Y={name:"attach"};this.ea={name:"unload"};this.Od={name:"manifest-parser"};this.Ld={name:"manifest"};this.ub={name:"media-source"};this.Dd={name:"drm-engine"};this.ca={name:"load"};this.Rd={name:"src-equals-drm-engine"};this.wb={name:"src-equals"};var d=new Map;d.set(this.Y,
389
- function(e,f){return Re(tl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Wb.mb(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Re(e)});d.set(this.ea,function(e){return Re(ul(c,e))});d.set(this.ub,function(e){e=vl(c,e);return Re(e)});d.set(this.Od,function(e,f){var g=wl(c,e,f);return Re(g)});d.set(this.Ld,function(e){return xl(c,e)});d.set(this.Dd,function(e){e=yl(c,e);return Re(e)});d.set(this.ca,function(e,f){return Re(zl(c,e,f))});d.set(this.Rd,function(e,f){var g=Al(c,e,f);return Re(g)});
390
- d.set(this.wb,function(e,f){return Bl(c,e,f)});this.va=new nk(this.O,{Af:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Y);e==c.Y&&(k=g==c.O||f.K!=h.K?c.O:g==c.Y?c.Y:g==c.ub||g==c.ca?c.ub:g==c.wb?c.Rd:null);e==c.ub&&(k=g==c.ca&&f.K==h.K?c.Od:c.ea);e==c.Od&&(k=Cl(c.ca,c.Ld,c.ea,g,f,h));e==c.Ld&&(k=Cl(c.ca,c.Dd,c.ea,g,f,h));e==c.Dd&&(k=Cl(c.ca,c.ca,c.ea,g,f,h));e==c.Rd&&(k=g==c.wb&&f.K==h.K?c.wb:c.ea);if(e==c.ca||e==c.wb)k=c.ea;e==c.ea&&(k=h.K&&f.K==h.K?c.Y:c.O);return k},kf:function(e,f,g){c.dispatchEvent(Dl("onstatechange",
391
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,ul(c,e),2):f["return"](e.K?c.Y:c.O)})},Sf:function(e){c.dispatchEvent(Dl("onstateidle",(new Map).set("state",e.name)))}});this.He=new O(function(){Nd(c.i.variants,c.h.restrictions,c.$b)&&El(c)});a&&this.Yb(a,!0)}pa(U,We);function Dl(a,b){return new R(a,b)}r=U.prototype;
392
- r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Fl)return c["return"]();a.l=Fl;b=sk(a.va,function(){return{node:a.O,payload:ok(),hb:!1}});return u(c,new Promise(function(d){b.Hb=function(){};b.Wc=function(){d()};b.lb=function(){d()};b.onError=function(){d()};b.Yc=function(){d()}}),2);case 2:return u(c,a.va.destroy(),3);case 3:a.Rc&&(a.Rc.release(),a.Rc=null);a.Wb&&(a.Wb.release(),a.Wb=null);a.s&&(a.s.release(),a.s=null);a.Cd=null;a.u=null;a.h=null;a.o=null;a.Jc=null;
393
- a.T=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:We.prototype.release.call(a),A(c)}})};r.Yb=function(a,b){b=void 0===b?!0:b;if(this.l==Fl)return Promise.reject(Gl());var c=ok();c.K=a;oc()||(b=!1);var d=b?this.ub:this.Y,e=sk(this.va,function(){return{node:d,payload:c,hb:!1}});e.Hb=function(){};return Hl(e)};r.detach=function(){var a=this;if(this.l==Fl)return Promise.reject(Gl());var b=sk(this.va,function(){return{node:a.O,payload:ok(),hb:!1}});b.Hb=function(){};return Hl(b)};
394
- r.he=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Fl)return Promise.reject(Gl());oc()||(a=!1);var c=ok(),d=sk(this.va,function(e){var f=e.K&&a?b.ub:e.K?b.Y:b.O;c.K=e.K;return{node:f,payload:c,hb:!1}});d.Hb=function(){};return Hl(d)};r.sg=function(a){this.cc=a};
395
- r.load=function(a,b,c){var d=this;this.cc=null;if(this.l==Fl)return Promise.reject(Gl());this.dispatchEvent(Dl("loading"));var e=ok();e.uri=a;e.ee=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Il(this,e)?this.wb:this.ca,g=sk(this.va,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,hb:!0}});this.o=new ol;this.T=Jl(this);g.Hb=function(){};return new Promise(function(h,k){g.Yc=function(){return k(new N(2,7,7002))};g.Wc=function(){h();d.dispatchEvent(Dl("loaded"))};
396
- g.lb=function(){return k(Gl())};g.onError=function(l){return k(l)}})};function Il(a,b){if(!oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Xg(d),c=Kl[c]);if(c){if(""==(b.K||qc()).canPlayType(c))return!1;if(!oc()||!(c in Wg||Xg(d)in Yg)||a.h.streaming.preferNativeHls)return!0;if(vc())return a.h.streaming.useNativeHlsOnSafari}return!1}function tl(a,b,c){null==b.K&&(b.K=c.K,a.Wb.C(b.K,"error",function(){var d=Ll(a);d&&Ml(a,d)}));a.g=b.K;return Promise.resolve()}
397
- function ul(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=Fl&&(a.l=pl),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Dl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.s.mb();a.He.stop();a.vb&&(a.vb.release(),a.vb=null);a.Kc&&(a.Kc.stop(),a.Kc=null);if(!a.I){n.A(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Sc=null;case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.A(7);break}return u(n,
398
- a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.B&&(a.B.release(),a.B=null);if(!a.L){n.A(9);break}return u(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.K||!b.K.src){n.A(11);break}return u(n,new Promise(function(p){return(new O(p)).P(.1)}),12);case 12:for(b.K.removeAttribute("src"),b.K.load();b.K.lastChild;)b.K.removeChild(b.K.firstChild);case 11:if(!a.m){n.A(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Vb=null;a.M=null;if(a.i){d=
399
- t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new ol;a.Id=null;Nl(a);A(n)}})}
400
- function vl(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new ki,d=a.h.textDisplayFactory,e=d(),a.Id=d,f=Ol(b.K,c,e,function(l,m,n){l=t(l);for(var p=l.next();!p.done;p=l.next())if(p=p.value,p.data&&p.cueTime&&p.frames){for(var q=p.cueTime+m,v=n,y=t(p.frames),x=y.next();!x.done;x=y.next())Pl(a,q,v,"ID3",x.value);if(a.D)a.D.onHlsTimedMetadata(p,q)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;A(k)})}
401
- function wl(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Vb=d,f=a,u(h,Vg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Sc=h.h;a.I=a.Sc();g=Xe(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);A(h)})}
402
- function xl(a,b){var c=b.uri,d=a.F;a.Tc=new Dj(function(){return a.sc()});a.Tc.addEventListener("regionadd",function(g){g=g.region;Ql(a,"timelineregionadded",g);if(a.D)a.D.onDashTimedMetadata(g)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new zj(function(){return a.Ma()}),a.ia.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,
403
- height:h.height,mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Dl("mediaqualitychanged",h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.T;try{k.g.enabled&&(k.o=h.format,Sk(k,g,{ot:Vk,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Ik(a.T,g,h)},filter:function(g){return Rl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Sl(a,
404
- g)},onTimelineRegionAdded:function(g){var h=a.Tc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new R("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ml(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
405
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},f=Date.now()/1E3;return new Ne(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=Dl("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);Tl(a.i);k=Date.now()/1E3;l=k-f;a.o.F=l;A(m)})}(),function(){return a.I.stop()})}
406
- function yl(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Ul(a,{kb:a.F,onError:function(f){Ml(a,f)},Xc:function(f){Vl(a,f)},onExpirationUpdated:function(f,g){Wl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,pg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Yb(b.K),3):u(e,Rl(a,a.i),0)})}
407
- function zl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.cc&&(b.startTime=a.cc,a.cc=null);d=b.K;e=b.uri;a.Vb=e;a.G=new vj({Qc:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},ce:function(x){d.playbackRate=x},Ee:function(x){d.currentTime+=x}});f=function(){return Xl(a)};g=function(){return Yl(a)};a.s.C(d,"playing",f);a.s.C(d,"pause",f);a.s.C(d,"ended",f);a.s.C(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.Cd==h||
408
- (a.Cd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(te(),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.Ka=new Ce(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.sb=a.h.preferredTextLanguage;a.Zb=a.h.preferredTextRole;a.Xb=a.h.preferForcedSubs;Zl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&$l(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.u.setMediaElement(d);a.B=am(a,b.startTime);a.vb=bm(a);
409
- k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);cm(a,k);zd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=dm(a);a.j.configure(a.h.streaming);a.l=em;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":fm(a,x)}});a.dispatchEvent(Dl("streaming"));l=null;if(m=a.Ya().find(function(x){return x.active})){y.A(2);break}l=El(a);$l(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);
410
- break}n=a.B.Ec();return u(y,gm(l,n),4);case 4:p=y.h,a.B.wd(p);case 3:hm(a,null,be(l));case 2:return a.B.vd(),q=a.Db().find(function(x){return x.active}),q||((v=le(a.i.textStreams,a.sb,a.Zb,a.Xb)[0]||null)&&nl(a.o.h,v,!0),l&&(v?(l.audio&&im(a,l.audio,v)&&(a.ha=!0),a.ha&&a.L.m.setTextVisibility(!0),jm(a)):a.ha=!1),v&&(a.h.streaming.alwaysStreamText||a.Bd())&&Wj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),km(a)),Qd(a.j?a.j.l:null,a.i),lm(a.i),mm(a),nm(a),a.i.variants.some(function(x){return x.primary}),
411
- a.s.oa(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ee}),A(y)}})}
412
- function Al(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=kc,e=Date.now()/1E3,f=!0,a.m=Ul(a,{kb:a.F,onError:function(n){Ml(a,n)},Xc:function(n){Vl(a,n)},onExpirationUpdated:function(n,p){Wl(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=Xg(g),k=Kl[h],"application/x-mpegurl"==k&&vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
413
- primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ra,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
414
- a.m.Y=!0,u(m,pg(a.m,[l],[]),2)):u(m,a.m.Yb(b.K),0)})}
415
- function Bl(a,b,c){function d(){return Xl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Vb=b.uri;var e=b.K;a.B=new kj(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.B.wd(b.startTime);a.G=new vj({Qc:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},ce:function(k){e.playbackRate=k},Ee:function(k){e.currentTime+=k}});cm(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 Yl(a)});"none"!=
416
- e.preload&&a.s.oa(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ee});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return mm(a)}),a.s.C(e.audioTracks,"removetrack",function(){return mm(a)}),a.s.C(e.audioTracks,"change",function(){return mm(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":om(a,k);break;case "chapters":fm(a,k);break;default:mm(a)}}),a.s.C(e.textTracks,"removetrack",function(){return mm(a)}),a.s.C(e.textTracks,
417
- "change",function(){return mm(a)}));var g=Xg(b.uri);e.src=Tk(a.T,b.uri,Kl[g]);(tc()||sc("Web0S"))&&e.load();a.l=pm;a.dispatchEvent(Dl("streaming"));var h=new lc;bj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.vd();h.resolve()});bj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return K(function(l){if(1==l.g)return qm(a),k=rm(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.oa(e.textTracks,"change",m);(new O(m)).P(1)}),2);if(f)return l["return"]();
418
- sm(a);A(l)})});e.error?h.reject(Ll(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.s.oa(e,"error",function(){h.reject(Ll(a))});return new Ne(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
419
- function qm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Yd(b);var c=a.h.preferredVariantRole;""!=c&&a.Yd(b,c)}}function sm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Zd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Zd(b,d,c)}}
420
- function om(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Pl(a,e.startTime,e.endTime,e.type,e.value),a.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=tm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().P(.5);a.Mb.push(function(){c.stop()})}}
421
- function Pl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Dl("metadata",b))}function fm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Lb().P(.5);a.Mb.push(function(){c.stop()})}}function Tl(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 Ul(a,b){return new ig(b,a.h.drm.updateExpirationTime)}
422
- function rl(a){return new af(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Dl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Dl("downloadfailed",b))})}
423
- function am(a,b){return new lj(a.g,a.i,a.h.streaming,b,function(){a.vb&&yj(a.vb,!0);a.j&&a.j.tc();a.M&&um(a)},function(c){return a.dispatchEvent(c)})}
424
- function bm(a){var b=new Ej(a.Tc);b.addEventListener("enter",function(d){Ql(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ql(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ql(a,"timelineregionenter",e),Ql(a,"timelineregionexit",e))});var c=new xj(a.g);c.g.add(b);a.ia&&c.g.add(a.ia);return c}function cm(a,b){a.M=new Ge;a.M.g=Ie;Je(a.M,b,Math.min(.5,b/2));Nl(a);a.Kc=(new O(function(){um(a)})).Ca(.25)}
425
- function um(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 em:a:if(a.g.ended||Di(a.L))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.gb();var d=si(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ui(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?He:Ie;c.g=d;b!=d&&Nl(a)}function Ol(a,b,c,d){return new xi(a,b,c,d)}
426
- function Jl(a){return new Hk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ma:function(){return a.Ma()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ya:function(){return a.Ya()},Oc:function(){return a.Oc()},V:function(){return a.V()}},a.h.cmcd)}
427
- function dm(a){return new Kj(a.i,{Pc:function(){return a.B.Ec()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Ik(a.T,b,c)},R:a.L,kb:a.F,onError:function(b){return Ml(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Uf:function(){a.I&&a.I.update&&a.I.update()},Qd:function(){a.B&&a.B.Fe();um(a)},Tf:function(b,c){var d=c.Jd;d&&a.ia&&Bj(a.ia,d,b)},ne:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){for(var e=
428
- new Mf(Fb(c)),f=0,g=t(e.data),h=g.next();!h.done;h=g.next())f+=h.value.length;if(0==f)d=Promise.resolve();else{f=new Uint8Array(f);g=0;e=t(e.data);for(h=e.next();!h.done;h=e.next())h=h.value,f.set(h,g),g+=h.length;yg(d,"cenc",f);d=d.o}}else d=Promise.resolve();return d}})}
429
- r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cl(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=hl(this.h,a,ql(this));vm(this);return c};
430
- function vm(a){if(a.I){var b=Xe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{wm(a,a.i)}catch(f){Ml(a,f)}a.u&&nm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||xm(a)}a.F&&a.F.ae(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Id!=b)){var c=b(),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
431
- c);a.Id=b;a.j&&(b=a.j,(c=b.i.get(jc))&&Uj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),km(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Je(a.M,b,Math.min(.5,b/2)));a.i&&Zl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=ql(this);hl(a,this.h,ql(this));return a};
432
- r.nf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.sc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.dg=function(){for(var a in this.h)delete this.h[a];hl(this.h,ql(this),ql(this));vm(this)};r.vf=function(){return this.l};r.zf=function(){return this.g};r.fc=function(){return this.F};r.yd=function(){return this.Vb};
433
- r.we=function(){return this.D?this.D:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};r.jb=function(){return this.i?this.i.presentationTimeline.jb():!1};r.Mf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
434
- r.sc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Bb(),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}};r.Kf=function(){this.V()&&(this.g.currentTime=this.sc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.ec=function(){return this.m?this.m.ec():Infinity};r.Nc=function(){return this.m?this.m.Nc():{}};
435
- r.zd=function(){return this.M?this.M.g==Ie:!1};r.Oc=function(){return this.g?this.G?this.G.i:1:0};r.ng=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==em&&(this.u.playbackRateChanged(a),Tj(this.j,1<Math.abs(a))))};r.cf=function(){var a=this.G.Mc();this.l==pm&&this.G.set(a);this.l==em&&(this.G.set(a),this.u.playbackRateChanged(a),Tj(this.j,!1))};
436
- r.Ya=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,je(e)){var f=be(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ie(g)}):[]};
437
- r.Db=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ce(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 ge(f)}):[]};r.tf=function(){return this.i?this.i.imageStreams.map(function(a){return de(a)}):[]};
438
- r.Gf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.A(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);n=parseInt(h[2],10);p=k/m;q=l/n;
439
- v=m*n;y=f.j-f.startTime;x=f.m||y/v;w=f.startTime;z=D=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,D=B%m*p,z=Math.floor(B/m)*q);return G["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:z,startTime:w,duration:x,uris:f.ya(),width:p})}return G["return"](null)})};
440
- r.Me=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(nl(this.o.h,b,!1),Wj(this.j,b),ym(this),this.sb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=rm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ee(c)==a.id?c.mode=this.ha?"showing":"hidden":c.mode="disabled";ym(this)}};
441
- r.Ne=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&je(d)&&($l(this,d,!1,b,c),this.Ka=new Be(d),nm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
442
- ee(c)==a.id){zm(this,c);break}};r.mf=function(){return Am(this.Ya())};r.Ff=function(){return Am(this.Db())};r.lf=function(){return Array.from(Bm(this.Ya()))};r.Ef=function(){return Array.from(Bm(this.Db()))};
443
- r.Yd=function(a,b){if(this.i&&this.B){this.Ka=new Ce(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.Ka.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=be(f),this.Ne(c,!0)):xm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Q(a);f=d=null;e=
444
- t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ie(g);Q(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?zm(this,f):d&&zm(this,d)}};
445
- r.Zd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.sb=a,this.Zb=b||"",this.Xb=c,(a=le(this.i.textStreams,this.sb,this.Zb,this.Xb)[0]||null)&&a!=this.j.o&&(nl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Bd()))Wj(this.j,a),ym(this)}else{var d=Q(a);(a=this.Db().find(function(e){return Q(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Me(a)}};
446
- r.fg=function(a){if(this.i&&this.B){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ka=new Ce(b.language,"",0,a),xm(this))}};r.Bd=function(){var a=this.ha;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?rm(this).some(function(b){return"showing"==b.mode}):a};r.xe=function(){return this.g&&this.g.src&&this.g.textTracks?Cm(this).map(function(a){return ge(a)}):[]};
447
- r.pf=function(a){var b=Q(a),c=Cm(this).filter(function(g){return Q(g.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
448
- 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 tm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Cm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
449
- r.lg=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==em)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.sb,this.Zb,this.Xb),0<a.length&&(Wj(this.j,a[0]),ym(this))):Sj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=rm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}jm(this)}};
450
- r.Cf=function(){if(!this.V())return null;var a=this.va.l,b=0;if(this.B)b=this.B.Ec();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
451
- r.ye=function(){if(!this.V())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ma=function(){if(this.l==em)return this.L.Ma();var a={total:[],audio:[],video:[],text:[]};this.l==pm&&(a.total=vi(this.g.buffered));return a};
452
- r.getStats=function(){if(this.l!=em&&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:[]};Xl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
453
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.O=this.B.je(),this.o.T=this.B.ke());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.L=d;this.o.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.o.s=c;if(this.l==em){if(c=this.j.l)this.o.B=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.ye().valueOf()+
454
- 1E3*this.sc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==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.B;d=e.L;var f=e.M,g=e.I,h=e.T,k=e.O,l=e.u,m=e.i,n=e.m,p=e.F,q=e.j,v=kl(e.g,"playing"),y=kl(e.g,"paused"),x=kl(e.g,"buffering"),w=e.s,D=e.D,z=e.G,B=ll(e.g),G=[];e=t(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
455
- id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:v,pauseTime:y,bufferingTime:x,licenseTime:w,liveLatency:D,maxSegmentDuration:z,stateHistory:B,switchHistory:G}};
456
- r.Ze=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:if(h.l!=em&&h.l!=pm)throw new N(1,7,7004);if(d){z.A(2);break}return u(z,Dm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=pm){z.A(4);break}g&&(c="forced");return u(z,Em(h,a,b,c,d,f||"",k),5);case 5:l=h.Db();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return mm(h),z["return"](m);throw new N(1,2,2012);case 4:n=
457
- kc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.A(6);break}return u(z,Fm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=z.h,v=Gm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ai(y),d="text/vtt";case 6:x={id:h.Ie++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:tj(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,
458
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Xc(x.mimeType,x.codecs);D=cd(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);mm(h);return z["return"](ce(x))}})};
459
- r.Ye=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=em&&d.l!=pm)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,Dm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Em(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.xe();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.s.oa(f,"load",l);d.s.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
460
- case 5:throw new N(1,2,2012);}})};function Dm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=Xg(b);if(d=Hm[c])return e["return"](d);C(e,2);return u(e,Zg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
461
- function Em(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Fm(a,b,a.F,a.h.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=Gm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ai(l),e="text/vtt");m=document.createElement("track");var p=a.T,q=b;try{if(p.g.enabled){var v=Uk(p);v.ot=$k;v.su=!0;var y=Wk(v);var x=Xk(q,y)}else x=q}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
462
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}function Fm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=lf;f=ef([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&Sk(k,f,{ot:$k,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
463
- function Gm(a,b,c,d){var e=dd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fb(b),b=c.parseMedia(b,a),Gk(b,d);throw new N(2,2,2014,c);}r.be=function(a,b){this.$b.width=a;this.$b.height=b};r.Vd=function(a){if(this.l==em){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=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,d.jc&&(d.jc=!1,Rj(b,d,a));b=!0}}else b=!1;return b};
464
- r.wf=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.xf=function(){return this.Sc};
465
- function ql(a){var b=fl();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Vd(d))}};b.textDisplayFactory=function(){return a.Jc?new zk(a.g,a.Jc):new uk(a.g)};return b}r.Re=function(a){this.Jc=a};
466
- function Sl(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new uj;h={id:a.Ie++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
467
- 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 Rl(a,b){return K(function(c){if(1==c.g)return u(c,Im(a,b),2);wm(a,b);A(c)})}
468
- function Im(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Od(c,b),2);lm(b);A(d)})}
469
- function wm(a,b){if(a.l!=Fl){Nd(b.variants,a.h.restrictions,a.$b)&&a.j&&mm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=t(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,yg(a.m,g.initDataType,g.initData)}}Jm(a,b)}}
470
- function gm(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return K(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);n=(m=k.segmentIndex.Ab(l))?m.next().value:null;if(!n)return q["return"](null);p=n.startTime;return q["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)})}
471
- function Nl(a){var b=a.zd();if(a.o&&a.M&&a.B){var c=a.G;c.j=b;wj(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Xl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Dl("buffering",b))}function Yl(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Dl("ratechange"),a.dispatchEvent(b))}function Xl(a){if(a.o&&a.M){var b=a.o.g;a.M.g==Ie?jl(b,"buffering"):a.g.paused?jl(b,"paused"):a.g.ended?jl(b,"ended"):jl(b,"playing")}}
472
- function nm(a){try{Jm(a,a.i)}catch(c){return Ml(a,c),!1}var b=a.i.variants.filter(function(c){return je(c)});b=a.Ka.create(b);a.u.setVariants(Array.from(b.values()));return!0}function El(a){return nm(a)?a.u.chooseVariant():null}function xm(a){var b=El(a);b&&$l(a,b,!0,!0,0)}
473
- function $l(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Vj(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Vj(a.j,b,d,e,void 0,c);d=null;f&&(d=be(f));b=be(b);c?hm(a,d,b):Km(a,d,b)}}function zm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ie(c);var d=ie(b);Km(a,c,d)}
474
- function im(a,b,c){a=Q(a.h.preferredTextLanguage);b=Q(b.language);c=Q(c.language);return ld(c,a)&&!ld(b,c)}function hm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Dl("adaptation",b);Lm(a,b)}function mm(a){var b=Dl("trackschanged");Lm(a,b)}function Km(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Dl("variantchanged",b);Lm(a,b)}function ym(a){var b=Dl("textchanged");Lm(a,b)}function jm(a){var b=Dl("texttrackvisibility");Lm(a,b)}
475
- function km(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Lm(a,Dl("abrstatuschanged",b))}
476
- function Mm(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;for(var d=a.Ya().find(function(h){return h.active}),e=a.i,f=t(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);Nd(e.variants,a.h.restrictions,a.$b);d=El(a);if(!d)return!1;e=a.Ma().video.reduce(function(h,k){return h+k.end-k.start},0);$l(a,d,!1,!0,e);a.He.P(c);return!0}
477
- function Ml(a,b){if(a.l!=Fl)if(Mm(a,b))b.handled=!0;else{var c=Dl("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function Ql(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(Dl(b,c))}
478
- function Ll(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
479
- function Vl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Nm.includes(l)}h!=f.allowedByKeySystem&&
480
- (e=!0)}}}if(!e||nm(a))(d=a.j.l)&&!d.allowedByKeySystem&&xm(a),e&&mm(a)}}function Wl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Dl("expirationupdated");a.dispatchEvent(b)}function Zl(a,b,c){0<b&&(a.V()||a.Qe(b));b=a.getDuration();c<b&&(a.V()||a.Ia(c))}
481
- function Jm(a,b){var c=a.m?a.m.Nc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?Nm.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
482
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function lm(a){if(!a.variants.some(je))throw new N(2,4,4032);}function Lm(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Fl&&a.dispatchEvent(b);A(c)})}function Bm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Q(c.language)):b.add("und");return b}
483
- function Am(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Q(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
484
- h.push({language:l,role:n,label:p})}});return h}function Gl(){return new N(2,7,7E3)}function Cl(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function ok(){return{K:null,mimeType:null,startTime:null,ee:NaN,uri:null}}function Hl(a){return new Promise(function(b,c){a.lb=function(){return c(Gl())};a.Wc=function(){return b()};a.onError=function(d){return c(d)};a.Yc=function(){return c(Gl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Re;
485
- U.prototype.getManifestParserFactory=U.prototype.xf;U.prototype.getManifest=U.prototype.wf;U.prototype.retryStreaming=U.prototype.Vd;U.prototype.setMaxHardwareResolution=U.prototype.be;U.prototype.addChaptersTrack=U.prototype.Ye;U.prototype.addTextTrackAsync=U.prototype.Ze;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ma;U.prototype.getPresentationStartTimeAsDate=U.prototype.ye;U.prototype.getPlayheadTimeAsDate=U.prototype.Cf;
486
- U.prototype.setTextTrackVisibility=U.prototype.lg;U.prototype.getChapters=U.prototype.pf;U.prototype.getChaptersTracks=U.prototype.xe;U.prototype.isTextTrackVisible=U.prototype.Bd;U.prototype.selectVariantsByLabel=U.prototype.fg;U.prototype.selectTextLanguage=U.prototype.Zd;U.prototype.selectAudioLanguage=U.prototype.Yd;U.prototype.getTextLanguages=U.prototype.Ef;U.prototype.getAudioLanguages=U.prototype.lf;U.prototype.getTextLanguagesAndRoles=U.prototype.Ff;
487
- U.prototype.getAudioLanguagesAndRoles=U.prototype.mf;U.prototype.selectVariantTrack=U.prototype.Ne;U.prototype.selectTextTrack=U.prototype.Me;U.prototype.getThumbnails=U.prototype.Gf;U.prototype.getImageTracks=U.prototype.tf;U.prototype.getTextTracks=U.prototype.Db;U.prototype.getVariantTracks=U.prototype.Ya;U.prototype.cancelTrickPlay=U.prototype.cf;U.prototype.trickPlay=U.prototype.ng;U.prototype.getPlaybackRate=U.prototype.Oc;U.prototype.isBuffering=U.prototype.zd;U.prototype.getKeyStatuses=U.prototype.Nc;
488
- U.prototype.getExpiration=U.prototype.ec;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Kf;U.prototype.seekRange=U.prototype.sc;U.prototype.isAudioOnly=U.prototype.Mf;U.prototype.isInProgress=U.prototype.jb;U.prototype.isLive=U.prototype.V;U.prototype.getAdManager=U.prototype.we;U.prototype.getAssetUri=U.prototype.yd;U.prototype.getNetworkingEngine=U.prototype.fc;U.prototype.getMediaElement=U.prototype.zf;
489
- U.prototype.getLoadMode=U.prototype.vf;U.prototype.resetConfiguration=U.prototype.dg;U.prototype.getBufferFullness=U.prototype.nf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.sg;U.prototype.unload=U.prototype.he;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Yb;
490
- U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?u(h,Pg(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(oc()){for(var l in Wg)k[l]=!0;for(var m in Yg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=oc()?!!Wg[n]:pc(n);for(var p in l)k[p]=
491
- oc()?!!Yg[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(ia(Vi));
492
- k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=oc()?cd(l)?!0:MediaSource.isTypeSupported(l)||Sc(l):pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Om;for(g in f)e[g]=f[g]();return h["return"](e)})};
493
- U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||sc("Trident/"))return!1;var a=xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:oc()?!0:pc("application/x-mpegurl")};U.setAdManagerFactory=function(a){sl=a};
494
- U.registerSupportPlugin=function(a,b){Om[a]=b};U.prototype.destroy=U.prototype.destroy;var Fl=0,pl=1,em=2,pm=3;U.LoadMode={DESTROYED:Fl,NOT_LOADED:pl,MEDIA_SOURCE:em,SRC_EQUALS:pm};U.version="v4.2.4";var Pm=["4","2"];ue=new function(a){this.g=a;this.i=ve;this.h=we}(new se(Number(Pm[0]),Number(Pm[1])));
495
- var Nm=["output-restricted","internal-error"],Om={},sl=null,Kl={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"},Hm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
496
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Qm(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new of;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
399
+ "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return ol([g],g)},sequenceMode:!1},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3}},d={retryParameters:Fe(),
400
+ failureCallback:function(g){return ol([g],void 0)},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,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,
401
+ parsePrftBox:!1};if(oc("Web0S")||pc()||oc("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<.95*h.quota)})},progressCallback:function(g,h){return ol([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,
402
+ streaming:d,mediaSource:{sourceBufferExtraFeatures:""},offline:e,abrFactory:function(){return new ie},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,
403
+ 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,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,
404
+ 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"](rl(g,f.preferredAudioLanguage))})};return f}
405
+ function sl(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 ml(a,b,c||ql(),d,"")}
406
+ function rl(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=qd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return jd(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
407
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=fc&&"image"!=g.type||c.push(g);return c}L("shaka.util.PlayerConfiguration",pl);pl.mergeConfigObjects=sl;pl.createDefault=ql;function tl(){this.g=null;this.h=[]}function ul(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 vl(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
408
+ function wl(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function xl(){this.i=this.h=null;this.g=[]}function yl(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 zl(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.N=this.P=this.H=this.K=this.M=this.l=this.o=NaN;this.g=new tl;this.h=new xl};function U(a,b){Qe.call(this);var c=this;this.l=Al;this.Oc=this.g=null;this.ha=!1;this.Wc=new hf;this.Mb=new hf;this.s=new hf;this.Wb=this.i=this.Xc=this.K=this.j=this.ta=this.M=this.bf=this.W=this.Yc=this.N=this.Uc=this.H=this.wb=this.B=this.G=this.m=this.D=null;this.cc=!1;this.Nd=this.u=null;this.Xd=1E9;this.h=Bl(this);this.dc={width:Infinity,height:Infinity};this.o=null;this.Ka=new we(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.ub=this.h.preferredTextLanguage;
409
+ this.$b=this.h.preferredTextRole;this.Zb=this.h.preferForcedSubs;this.Xb=[];this.ec=null;b&&b(this);this.D=Cl(this);this.D.ie(this.h.streaming.forceHTTPS);this.F=null;Dl&&(this.F=Dl());this.Wc.C(window,"online",function(){c.be()});this.P={name:"detach"};this.X={name:"attach"};this.ea={name:"unload"};this.Yd={name:"manifest-parser"};this.Wd={name:"manifest"};this.vb={name:"media-source"};this.Qd={name:"drm-engine"};this.ca={name:"load"};this.ce={name:"src-equals-drm-engine"};this.xb={name:"src-equals"};
410
+ var d=new Map;d.set(this.X,function(e,f){return Le(El(c,e,f))});d.set(this.P,function(e){e.J&&(c.Mb.nb(),e.J=null);c.F&&c.F.release();c.g=null;e=Promise.resolve();return Le(e)});d.set(this.ea,function(e){return Le(Fl(c,e))});d.set(this.vb,function(e){e=Gl(c,e);return Le(e)});d.set(this.Yd,function(e,f){var g=Hl(c,e,f);return Le(g)});d.set(this.Wd,function(e){return Il(c,e)});d.set(this.Qd,function(e){e=Jl(c,e);return Le(e)});d.set(this.ca,function(e,f){return Le(Kl(c,e,f))});d.set(this.ce,function(e,
411
+ f){var g=Ll(c,e,f);return Le(g)});d.set(this.xb,function(e,f){return Ml(c,e,f)});this.Ea=new yk(this.P,{Lf:function(e,f,g,h){var k=null;e==c.P&&(k=g==c.P?c.P:c.X);e==c.X&&(k=g==c.P||f.J!=h.J?c.P:g==c.X?c.X:g==c.vb||g==c.ca?c.vb:g==c.xb?c.ce:null);e==c.vb&&(k=g==c.ca&&f.J==h.J?c.Yd:c.ea);e==c.Yd&&(k=Nl(c.ca,c.Wd,c.ea,g,f,h));e==c.Wd&&(k=Nl(c.ca,c.Qd,c.ea,g,f,h));e==c.Qd&&(k=Nl(c.ca,c.ca,c.ea,g,f,h));e==c.ce&&(k=g==c.xb&&f.J==h.J?c.xb:c.ea);if(e==c.ca||e==c.xb)k=c.ea;e==c.ea&&(k=h.J&&f.J==h.J?c.X:c.P);
412
+ return k},xf:function(e,f,g){c.dispatchEvent(Ol("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,Fl(c,e),2):f["return"](e.J?c.X:c.P)})},dg:function(e){c.dispatchEvent(Ol("onstateidle",(new Map).set("state",e.name)))}});this.$e=new Q(function(){Hd(c.i.variants,c.h.restrictions,c.dc)&&Pl(c)});a&&this.Yb(a,!0)}ra(U,Qe);function Ql(a){null!=a.M&&(a.M.release(),a.M=null)}
413
+ function Rl(a,b){if(b.lcevc.enabled){var c=a.Pa();c&&c[0]&&c[0].videoMimeType==Sl.ts&&(navigator.userAgent.match(/Edge?\//)||navigator.userAgent.match(/Edge\//))&&(b.streaming.forceTransmux||Va("LCEVC Warning: For MPEG-2 TS decoding the config.streaming.forceTransmux must be enabled."));Ql(a);null==a.M&&(a.M=new Bi(a.g,a.bf,b.lcevc),a.G&&(a.G.D=a.M))}else Ql(a)}function Ol(a,b){return new S(a,b)}r=U.prototype;
414
+ r.destroy=function(){var a=this,b;return G(function(c){switch(c.g){case 1:if(a.l==Tl)return c["return"]();Ql(a);a.l=Tl;b=Dk(a.Ea,function(){return{node:a.P,payload:zk(),ib:!1}});return u(c,new Promise(function(d){b.Ib=function(){};b.bd=function(){d()};b.mb=function(){d()};b.onError=function(){d()};b.dd=function(){d()}}),2);case 2:return u(c,a.Ea.destroy(),3);case 3:a.Wc&&(a.Wc.release(),a.Wc=null);a.Mb&&(a.Mb.release(),a.Mb=null);a.s&&(a.s.release(),a.s=null);a.Nd=null;a.u=null;a.h=null;a.o=null;
415
+ a.Oc=null;a.W=null;if(!a.D){c.A(4);break}return u(c,a.D.destroy(),5);case 5:a.D=null;case 4:Qe.prototype.release.call(a),A(c)}})};r.Yb=function(a,b){b=void 0===b?!0:b;if(this.l==Tl)return Promise.reject(Ul());var c=zk();c.J=a;kc()||(b=!1);var d=b?this.vb:this.X,e=Dk(this.Ea,function(){return{node:d,payload:c,ib:!1}});e.Ib=function(){};return Vl(e)};r.kf=function(a){this.bf=a};
416
+ r.detach=function(){var a=this;if(this.l==Tl)return Promise.reject(Ul());var b=Dk(this.Ea,function(){return{node:a.P,payload:zk(),ib:!1}});b.Ib=function(){};return Vl(b)};r.pe=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Tl)return Promise.reject(Ul());this.cc=!1;kc()||(a=!1);Ql(this);var c=zk(),d=Dk(this.Ea,function(e){var f=e.J&&a?b.vb:e.J?b.X:b.P;c.J=e.J;return{node:f,payload:c,ib:!1}});d.Ib=function(){};return Vl(d)};r.Eg=function(a){this.ec=a};
417
+ r.load=function(a,b,c){var d=this;this.ec=null;this.cc=!1;if(this.l==Tl)return Promise.reject(Ul());this.dispatchEvent(Ol("loading"));var e=zk();e.uri=a;e.me=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Wl(this,e)?this.xb:this.ca,g=Dk(this.Ea,function(h){if(null==h.J)return null;e.J=h.J;return{node:f,payload:e,ib:!0}});this.o=new zl;this.W=Xl(this);g.Ib=function(){};return new Promise(function(h,k){g.dd=function(){return k(new O(2,7,7002))};g.bd=function(){h();d.dispatchEvent(Ol("loaded"))};
418
+ g.mb=function(){return k(Ul())};g.onError=function(l){return k(l)}})};function Wl(a,b){if(!kc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Pg(d),c=Sl[c]);if(c){if(""==(b.J||mc()).canPlayType(c))return!1;if(!kc()||!(c in Og||Pg(d)in Qg)||a.h.streaming.preferNativeHls)return!0;if(rc())return a.h.streaming.useNativeHlsOnSafari}return!1}function El(a,b,c){null==b.J&&(b.J=c.J,a.Mb.C(b.J,"error",function(){var d=Yl(a);d&&Zl(a,d)}));a.g=b.J;return Promise.resolve()}
419
+ function Fl(a,b){var c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:return a.l!=Tl&&(a.l=Al),c=a.Xb.map(function(p){return p()}),a.Xb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Ol("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.J&&a.s.nb();a.$e.stop();a.wb&&(a.wb.release(),a.wb=null);a.Uc&&(a.Uc.stop(),a.Uc=null);if(!a.K){n.A(3);break}return u(n,a.K.stop(),4);case 4:a.K=null,a.Xc=null;case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.A(7);break}return u(n,
420
+ 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.J||!b.J.src){n.A(11);break}return u(n,new Promise(function(p){return(new Q(p)).O(.1)}),12);case 12:for(b.J.removeAttribute("src"),b.J.load();b.J.lastChild;)b.J.removeChild(b.J.firstChild);case 11:if(!a.m){n.A(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Wb=null;a.N=null;if(a.i){d=
421
+ t(a.i.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.o=new zl;a.Td=null;$l(a);A(n)}})}
422
+ function Gl(a,b){var c,d,e,f,g;return G(function(h){if(1==h.g)return c=a.h.textDisplayFactory,d=c(),a.Td=c,e=am(b.J,d,function(k,l,m){bm(a,k,l,m)},a.M),e.configure(a.h.mediaSource),f=a.h.manifest,g=f.segmentRelativeVttTiming,e.H=g,u(h,e.K,2);a.G=e;A(h)})}
423
+ function Hl(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.Wb=d,f=a,u(h,Ng(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Xc=h.h;a.K=a.Xc();g=Re(a.h.manifest);c.J&&"AUDIO"===c.J.nodeName&&(g.disableVideo=!0);a.K.configure(g);A(h)})}
424
+ function Il(a,b){var c=b.uri,d=a.D;a.Yc=new Oj(function(){return a.tc()});a.Yc.addEventListener("regionadd",function(g){g=g.region;cm(a,"timelineregionadded",g);if(a.F)a.F.onDashTimedMetadata(g)});a.ta=null;a.h.streaming.observeQualityChanges&&(a.ta=new Kj(function(){return a.Ma()}),a.ta.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,
425
+ height:h.height,mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Ol("mediaqualitychanged",h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,cl(k,g,{ot:fl,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Tk(a.W,g,h)},filter:function(g){return dm(a,g)},makeTextStreamsForClosedCaptions:function(g){return em(a,
426
+ g)},onTimelineRegionAdded:function(g){var h=a.Yc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new S("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Zl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
427
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()},newDrmInfo:function(g){var h=a.m?a.m.g:null;h&&a.m.u&&fm(a,h.keySystem,g)}},f=Date.now()/1E3;return new He(function(){var g,h,k,l;return G(function(m){if(1==m.g)return g=a,u(m,a.K.start(c,e),2);g.i=m.h;h=Ol("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new O(2,4,4036);gm(a.i);k=Date.now()/1E3;l=k-f;a.o.F=l;A(m)})}(),function(){return a.K.stop()})}
428
+ function Jl(a,b){var c,d;return G(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=hm(a,{lb:a.D,onError:function(f){Zl(a,f)},cd:function(f){im(a,f)},onExpirationUpdated:function(f,g){jm(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c,a.M&&(f=a.M,f.g&&f.h.classList.add("shaka-hidden")))}}),a.m.configure(a.h.drm),u(e,hg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Yb(b.J),3):u(e,dm(a,a.i),0)})}
429
+ function Kl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z;return G(function(B){switch(B.g){case 1:b.startTime=c.startTime;null!=a.ec&&(b.startTime=a.ec,a.ec=null);d=b.J;e=b.uri;a.Wb=e;a.H=new Gj({Tc:function(){return d.playbackRate},Pc:function(){return d.defaultPlaybackRate},ke:function(E){d.playbackRate=E},Le:function(E){d.currentTime+=E}});f=function(){return km(a)};g=function(){return lm(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);Rl(a,a.h);h=a.h.abrFactory;
430
+ a.u&&a.Nd==h||(a.Nd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(ne("AbrManager","Please use an AbrManager with setMediaElement function."),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.Ka=new we(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.ub=a.h.preferredTextLanguage;a.$b=a.h.preferredTextRole;a.Zb=a.h.preferForcedSubs;mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(E,F,H){a.j&&E!=a.j.l&&nm(a,E,!0,void 0===
431
+ F?!1:F,void 0===H?0:H)});a.u.setMediaElement(d);td(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=om(a);a.j.configure(a.h.streaming);a.l=pm;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(E){if(E.track)switch(E=E.track,E.kind){case "chapters":qm(a,E)}});a.dispatchEvent(Ol("streaming"));k=null;(l=a.Pa().find(function(E){return E.active}))||(k=Pl(a));m=[];n=l||k;p=t([n.video,n.audio]);for(q=p.next();!q.done;q=p.next())(v=
432
+ q.value)&&!v.segmentIndex&&m.push(v.createSegmentIndex());if(!(0<m.length)){B.A(2);break}return u(B,Promise.all(m),2);case 2:a.B=rm(a,b.startTime);a.wb=sm(a);y=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);tm(a,y);if(l){B.A(4);break}nm(a,k,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){B.A(5);break}x=a.B.Hc();return u(B,um(k,x),6);case 6:w=B.h,a.B.Bd(w);case 5:vm(a,null,Wd(k));case 4:return a.B.zd(),C=a.Eb().find(function(E){return E.active}),C||((z=fe(a.i.textStreams,a.ub,a.$b,a.Zb)[0]||
433
+ null)&&yl(a.o.h,z,!0),k&&(z?(k.audio&&wm(a,k.audio,z)&&(a.ha=!0),a.ha&&a.G.m.setTextVisibility(!0),xm(a)):a.ha=!1),z&&(a.h.streaming.alwaysStreamText||a.Hd())&&hk(a.j,z)),u(B,a.j.start(),7);case 7:a.h.abr.enabled&&(a.u.enable(),ym(a)),Kd(a.j?a.j.l:null,a.i),zm(a.i),Am(a),Bm(a),a.i.variants.some(function(E){return E.primary}),a.cc=!0,a.s.na(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.me}),A(B)}})}
434
+ function Ll(a,b,c){var d,e,f,g,h,k,l;return G(function(m){return 1==m.g?(d=gc,e=Date.now()/1E3,f=!0,a.m=hm(a,{lb:a.D,onError:function(n){Zl(a,n)},cd:function(n){im(a,n)},onExpirationUpdated:function(n,p){jm(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=Pg(g),k=Sl[h],"application/x-mpegurl"==k&&rc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
435
+ 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?Yc(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ua,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
436
+ a.m.W=!0,u(m,hg(a.m,[l],[]),2)):u(m,a.m.Yb(b.J),0)})}
437
+ function Ml(a,b,c){function d(){return km(a)}b.uri=c.uri;b.startTime=c.startTime;a.Wb=b.uri;var e=b.J;a.B=new uj(e);var f=!1;a.Xb.push(function(){f=!0});null!=b.startTime&&a.B.Bd(b.startTime);a.H=new Gj({Tc:function(){return e.playbackRate},Pc:function(){return e.defaultPlaybackRate},ke:function(k){e.playbackRate=k},Le:function(k){e.currentTime+=k}});tm(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 lm(a)});"none"!=
438
+ e.preload&&a.s.na(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.me});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return Am(a)}),a.s.C(e.audioTracks,"removetrack",function(){return Am(a)}),a.s.C(e.audioTracks,"change",function(){return Am(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Cm(a,k);break;case "chapters":qm(a,k);break;default:Am(a)}}),a.s.C(e.textTracks,"removetrack",function(){return Am(a)}),a.s.C(e.textTracks,
439
+ "change",function(){return Am(a)}));var g=Pg(b.uri);e.src=dl(a.W,b.uri,Sl[g]);(pc()||oc("Web0S"))&&e.load();a.l=Dm;a.dispatchEvent(Ol("streaming"));var h=new hc;lj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.zd();h.resolve()});lj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return G(function(l){if(1==l.g)return Em(a),k=Fm(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.na(e.textTracks,"change",m);(new Q(m)).O(1)}),2);if(f)return l["return"]();
440
+ Gm(a);A(l)})});e.error?h.reject(Yl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.s.na(e,"error",function(){h.reject(Yl(a))});return(new He(h,function(){h.reject(new O(2,7,7001));return Promise.resolve()})).Y(function(){a.cc=!0})}
441
+ function Em(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.fe(b);var c=a.h.preferredVariantRole;""!=c&&a.fe(b,c)}}function Gm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.ge(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.ge(b,d,c)}}
442
+ function Cm(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,Hm(a,e.startTime,e.endTime,e.type,e.value),a.F)a.F.onCueMetadataChange(e.value)});var c=(new Q(function(){var d=Im(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().O(.5);a.Xb.push(function(){c.stop()})}}
443
+ function bm(a,b,c,d){b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.data&&e.cueTime&&e.frames){var f=e.cueTime+c,g=d;g&&f>g&&(g=f);for(var h=t(e.frames),k=h.next();!k.done;k=h.next())Hm(a,f,g,"org.id3",k.value);if(a.F)a.F.onHlsTimedMetadata(e,f)}}function Hm(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Ol("metadata",b))}
444
+ function qm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new Q(function(){b.mode="hidden"})).Lb().O(.5);a.Xb.push(function(){c.stop()})}}function gm(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 hm(a,b){return new ag(b,a.h.drm.updateExpirationTime)}
445
+ function Cl(a){return new Ve(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(Ol("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Ol("downloadfailed",b))})}
446
+ function rm(a,b){return new vj(a.g,a.i,a.h.streaming,b,function(){a.wb&&Jj(a.wb,!0);a.j&&a.j.uc();a.N&&Jm(a)},function(c){return a.dispatchEvent(c)})}
447
+ function sm(a){var b=new Pj(a.Yc);b.addEventListener("enter",function(d){cm(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){cm(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(cm(a,"timelineregionenter",e),cm(a,"timelineregionexit",e))});var c=new Ij(a.g);c.g.add(b);a.ta&&c.g.add(a.ta);return c}function tm(a,b){a.N=new Ae;a.N.g=Ce;De(a.N,b,Math.min(.5,b/2));$l(a);a.Uc=(new Q(function(){Jm(a)})).Ba(.25)}
448
+ function Jm(a){switch(a.l){case Dm:if(a.g.ended)var b=!0;else{var c=oi(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case pm:a:if(a.g.ended||Mi(a.G))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.hb();var d=oi(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=qi(a.g.buffered,a.g.currentTime);c=a.N;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Be:Ce;c.g=d;b!=d&&$l(a)}function am(a,b,c,d){return new Gi(a,b,c,d)}
449
+ function Xl(a){return new Sk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ma:function(){return a.Ma()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Pa:function(){return a.Pa()},Rc:function(){return a.Rc()},U:function(){return a.U()}},a.h.cmcd)}
450
+ function om(a){return new Vj(a.i,{Sc:function(){return a.B?a.B.Hc():0},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Tk(a.W,b,c)},R:a.G,lb:a.D,onError:function(b){return Zl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},fg:function(){a.K&&a.K.update&&a.K.update()},Vd:function(b,c,d){a.B&&a.B.Me();Jm(a);b=(new Map).set("start",b).set("end",c).set("contentType",d);a.dispatchEvent(Ol("segmentappended",b))},eg:function(b,c){var d=c.Od;d&&a.ta&&
451
+ Mj(a.ta,d,b)},ve:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){for(var e=new Ef(N(c)),f=0,g=t(e.data),h=g.next();!h.done;h=g.next())f+=h.value.length;if(0==f)d=Promise.resolve();else{f=new Uint8Array(f);g=0;e=t(e.data);for(h=e.next();!h.done;h=e.next())h=h.value,f.set(h,g),g+=h.length;qg(d,"cenc",f);d=d.o}}else d=Promise.resolve();return d},gg:function(b,c,d){bm(a,b,c,d)}})}
452
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=nl(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(ne("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=
453
+ .01));var c=sl(this.h,a,Bl(this));Km(this);return c};
454
+ function Km(a){if(a.K){var b=Re(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.K.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{Lm(a,a.i)}catch(f){Zl(a,f)}a.u&&Bm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||Mm(a)}a.D&&a.D.ie(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.Td!=b)){var c=b(),d=a.G,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),
455
+ e.destroy());d.g&&(d.g.i=c);a.Td=b;a.j&&(b=a.j,(c=b.j.get(fc))&&fk(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),ym(a));a.N&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),De(a.N,b,Math.min(.5,b/2)));a.i&&mm(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Bl(this);sl(a,this.h,Bl(this));return a};
456
+ r.Af=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.tc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.qg=function(){for(var a in this.h)delete this.h[a];sl(this.h,Bl(this),Bl(this));Km(this)};r.Gf=function(){return this.l};r.Kf=function(){return this.g};r.ic=function(){return this.D};r.Ed=function(){return this.Wb};
457
+ r.Ee=function(){return this.F?this.F:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.kb=function(){return this.i?this.i.presentationTimeline.kb():!1};r.Yf=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};
458
+ r.tc=function(){if(!this.cc)return{start:0,end:0};if(this.i){var a=this.i.presentationTimeline;return{start:a.Cb(),end:a.Na()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.Wf=function(){this.U()&&(this.g.currentTime=this.tc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.hc=function(){return this.m?this.m.hc():Infinity};
459
+ r.Qc=function(){return this.m?this.m.Qc():{}};r.Gd=function(){return this.N?this.N.g==Ce:!1};r.Rc=function(){return this.g?this.H?this.H.i:1:0};r.zg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.H.set(a),this.l==pm&&(this.u.playbackRateChanged(a),ek(this.j,1<Math.abs(a))))};r.nf=function(){var a=this.H.Pc();this.l==Dm&&this.H.set(a);this.l==pm&&(this.H.set(a),this.u.playbackRateChanged(a),ek(this.j,!1))};
460
+ r.Pa=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,de(e)){var f=Wd(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return ce(g)}):[]};
461
+ r.Eb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Xd(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Fm(this).map(function(f){return ae(f)}):[]};r.Ef=function(){return this.i?this.i.imageStreams.map(function(a){return Yd(a)}):[]};
462
+ r.Sf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,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;q=
463
+ l/n;v=m*n;y=f.j-f.startTime;x=f.o||y/v;w=f.startTime;z=C=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,C=B%m*p,z=Math.floor(B/m)*q);E=!1;if(F=f.m)E=!0,q=F.height,C=F.positionX,z=F.positionY,p=F.width;return H["return"]({imageHeight:l,imageWidth:k,height:q,positionX:C,positionY:z,startTime:w,duration:x,uris:f.xa(),width:p,sprite:E})}return H["return"](null)})};
464
+ r.Re=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&&(yl(this.o.h,b,!1),hk(this.j,b),Nm(this),this.ub=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Fm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,Zd(c)==a.id?c.mode=this.ha?"showing":"hidden":c.mode="disabled";Nm(this)}};
465
+ r.Se=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&de(d)&&(nm(this,d,!1,b,c),this.Ka=new ve(d),Bm(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
466
+ Zd(c)==a.id){Om(this,c);break}};r.zf=function(){return Pm(this.Pa())};r.Qf=function(){return Pm(this.Eb())};r.yf=function(){return Array.from(Qm(this.Pa()))};r.Pf=function(){return Array.from(Qm(this.Eb()))};
467
+ r.fe=function(a,b,c){c=void 0===c?0:c;if(this.i&&this.B){this.Ka=new we(a,b||"",c,"");b=function(h,k){return h.video||k.video?h.video&&k.video?Math.abs((h.video.height||0)-(k.video.height||0))+Math.abs((h.video.width||0)-(k.video.width||0)):Infinity:0};a=this.j.l;var d=this.Ka.create(this.i.variants);c=null;d=t(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=Wd(c),this.Se(b,!0)):Mm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);
468
+ a=jd(a);d=c=null;e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=ce(f);jd(g.language)==a&&(c=f,b?g.roles.includes(b)&&(d=f):0==g.roles.length&&(d=f))}d?Om(this,d):c&&Om(this,c)}};
469
+ r.ge=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.ub=a,this.$b=b||"",this.Zb=c,(a=fe(this.i.textStreams,this.ub,this.$b,this.Zb)[0]||null)&&a!=this.j.o&&(yl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Hd()))hk(this.j,a),Nm(this)}else{var d=jd(a);(a=this.Eb().find(function(e){return jd(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Re(a)}};
470
+ r.sg=function(a){if(this.i&&this.B){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Ka=new we(b.language,"",0,a),Mm(this))}};r.Hd=function(){var a=this.ha;return this.G?this.G.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Fm(this).some(function(b){return"showing"==b.mode}):a};r.Fe=function(){return this.g&&this.g.src&&this.g.textTracks?Rm(this).map(function(a){return ae(a)}):[]};
471
+ r.Bf=function(a){var b=jd(a),c=Rm(this).filter(function(g){return jd(g.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
472
+ function Fm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Im(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Rm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
473
+ r.xg=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==pm)this.G.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=fe(this.i.textStreams,this.ub,this.$b,this.Zb),0<a.length&&(hk(this.j,a[0]),Nm(this))):dk(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Fm(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}xm(this)}};
474
+ r.Nf=function(){if(!this.U())return null;var a=this.Ea.l,b=0;if(this.B)b=this.B.Hc();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};
475
+ r.Ge=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};r.Ma=function(){if(this.l==pm)return this.G.Ma();var a={total:[],audio:[],video:[],text:[]};this.l==Dm&&(a.total=ri(this.g.buffered));return a};
476
+ r.getStats=function(){if(this.l!=pm&&this.l!=Dm)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:[]};km(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
477
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.N=this.B.re(),this.o.P=this.B.se());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.K=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==pm){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.Ge().valueOf()+
478
+ 1E3*this.tc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==Dm&&(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.K;var f=e.M,g=e.H,h=e.P,k=e.N,l=e.u,m=e.i,n=e.m,p=e.F,q=e.j,v=vl(e.g,"playing"),y=vl(e.g,"paused"),x=vl(e.g,"buffering"),w=e.s,C=e.D,z=e.G,B=wl(e.g),E=[];e=t(e.h.g);for(var F=e.next();!F.done;F=e.next())F=F.value,E.push({timestamp:F.timestamp,
479
+ 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:q,playTime:v,pauseTime:y,bufferingTime:x,licenseTime:w,liveLatency:C,maxSegmentDuration:z,stateHistory:B,switchHistory:E}};
480
+ r.gf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,x,w,C;return G(function(z){switch(z.g){case 1:if(h.l!=pm&&h.l!=Dm)throw new O(1,7,7004);if(d){z.A(2);break}return u(z,Sm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.F)try{k=h.F.getServerSideCuePoints()}catch(B){}if(h.l!=Dm){z.A(4);break}g&&(c="forced");return u(z,Tm(h,a,b,c,d,f||"",k),5);case 5:l=h.Eb();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return Am(h),z["return"](m);throw new O(1,2,2012);case 4:n=
481
+ gc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new O(1,4,4033);if(!k.length){z.A(6);break}return u(z,Um(h,a,h.D,h.h.streaming.retryParameters),7);case 7:q=z.h,v=Vm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ji(y),d="text/vtt";case 6:x={id:h.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Ej(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.Z,primary:!1,trickModeVideo:null,
482
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Uc(x.mimeType,x.codecs);C=$c(w);if(!C)throw new O(2,2,2014,d);h.i.textStreams.push(x);Am(h);return z["return"](Xd(x))}})};
483
+ r.hf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C;return G(function(z){switch(z.g){case 1:if(c.l!=pm&&c.l!=Dm)throw new O(1,7,7004);if(c.l==Dm)throw new O(1,2,2016);if(b){z.A(2);break}return u(z,Sm(c,a),3);case 3:b=z.h;case 2:if("text/vtt"!=b)throw new O(1,2,2017,a);d=gc;e=c.i.presentationTimeline.getDuration();if(Infinity==e)throw new O(1,4,4045);return u(z,Um(c,a,c.D,c.h.streaming.retryParameters),4);case 4:f=z.h;g=ad[b];if(!g)throw new O(2,2,2014,b);h=g();k={periodStart:0,segmentStart:0,
484
+ segmentEnd:e,vttOffset:0};l=N(f);m=h.parseMedia(l,k);n=[];p={};q=t(m);for(v=q.next();!v.done;p={Qb:p.Qb},v=q.next())y=v.value,p.Qb=ac([a],[y.payload])[0],x=new ki(y.startTime,y.endTime,function(B){return function(){return[B.Qb]}}(p),0,null,null,0,0,Infinity),p.Qb.includes("#xywh")&&(w=p.Qb.split("#xywh=")[1].split(","),4===w.length&&x.Xe({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),n.push(x);C={id:c.Xd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},
485
+ segmentIndex:new Bj(n),mimeType:b||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.Vb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1"};c.i.imageStreams.push(C);Am(c);return z["return"](Yd(C))}})};
486
+ r.ff=function(a,b,c){var d=this,e,f,g,h;return G(function(k){switch(k.g){case 1:if(d.l!=pm&&d.l!=Dm)throw new O(1,7,7004);if(c){k.A(2);break}return u(k,Sm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.F)try{e=d.F.getServerSideCuePoints()}catch(l){}return u(k,Tm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.Fe();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.na(f,"load",l);d.s.na(f,"error",function(){m(new O(1,2,2015))})}),6);case 6:return k["return"](h);
487
+ case 5:throw new O(1,2,2012);}})};function Sm(a,b){var c,d;return G(function(e){switch(e.g){case 1:c=Pg(b);if(d=Wm[c])return e["return"](d);D(e,2);return u(e,Rg(b,a.D,a.h.streaming.retryParameters),4);case 4:d=e.h;za(e,3);break;case 2:Aa(e);case 3:if(d)return e["return"](d);throw new O(1,2,2011,c);}})}
488
+ function Tm(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,Um(a,b,a.D,a.h.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=Vm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ji(l),e="text/vtt");m=document.createElement("track");var p=a.W,q=b;try{if(p.g.enabled){var v=el(p);v.ot=kl;v.su=!0;var y=gl(v);var x=hl(q,y)}else x=q}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
489
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}function Um(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){e=ef;f=Ze([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&cl(k,f,{ot:kl,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
490
+ function Vm(a,b,c,d){var e=ad[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=N(b),b=c.parseMedia(b,a),Rk(b,d);throw new O(2,2,2014,c);}r.je=function(a,b){this.dc.width=a;this.dc.height=b};r.be=function(a){if(this.l==pm){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=t(b.j.values()),d=c.next();!d.done;d=c.next())d=d.value,d.mc&&(d.mc=!1,ck(b,d,a));b=!0}}else b=!1;return b};
491
+ r.Hf=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.If=function(){return this.Xc};
492
+ function Bl(a){var b=ql();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.be(d))}};b.textDisplayFactory=function(){return a.Oc?new Kk(a.g,a.Oc):new Fk(a.g)};return b}r.Ze=function(a){this.Oc=a};
493
+ function em(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Fj;h={id:a.Xd++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
494
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:fc,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 dm(a,b){return G(function(c){if(1==c.g)return u(c,Xm(a,b),2);Lm(a,b);A(c)})}
495
+ function Xm(a,b){var c;return G(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Id(c,b),2);zm(b);A(d)})}function Lm(a,b){if(a.l!=Tl){Hd(b.variants,a.h.restrictions,a.dc)&&a.j&&Am(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next())e=e.value,fm(a,c.keySystem,e.video),fm(a,c.keySystem,e.audio);Ym(a,b)}}
496
+ function fm(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,qg(a.m,e.initDataType,e.initData)}}}
497
+ function um(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(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);n=(m=k.segmentIndex.Bb(l))?m.next().value:null;if(!n)return q["return"](null);p=n.startTime;return q["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)})}
498
+ function $l(a){var b=a.Gd();if(a.o&&a.N&&a.B){var c=a.H;c.j=b;Hj(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);km(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Ol("buffering",b))}function lm(a){var b=a.g.playbackRate;0!=b&&(a.H&&a.H.set(b),b=Ol("ratechange"),a.dispatchEvent(b))}function km(a){if(a.o&&a.N){var b=a.o.g;a.N.g==Ce?ul(b,"buffering"):a.g.paused?ul(b,"paused"):a.g.ended?ul(b,"ended"):ul(b,"playing")}}
499
+ function Bm(a){try{Ym(a,a.i)}catch(c){return Zl(a,c),!1}var b=a.i.variants.filter(function(c){return de(c)});b=a.Ka.create(b);a.u.setVariants(Array.from(b.values()));return!0}function Pl(a){return Bm(a)?a.u.chooseVariant():null}function Mm(a){var b=Pl(a);b&&nm(a,b,!0,!0,0)}
500
+ function nm(a,b,c,d,e){var f=a.j.l;if(b==f)d&&gk(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}));gk(a.j,b,d,e,void 0,c);d=null;f&&(d=Wd(f));b=Wd(b);c?vm(a,d,b):Zm(a,d,b)}}function Om(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=ce(c);var d=ce(b);Zm(a,c,d)}
501
+ function wm(a,b,c){if(0==a.h.autoShowText)return!1;if(1==a.h.autoShowText)return!0;var d=jd(a.h.preferredTextLanguage);c=jd(c.language);if(2==a.h.autoShowText)return id(c,d);if(3==a.h.autoShowText)return a=jd(b.language),id(c,d)&&!id(a,c);Va("Invalid autoShowText setting!");return!1}function vm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Ci(a.M,c);c=Ol("adaptation",b);$m(a,c)}function Am(a){var b=Ol("trackschanged");$m(a,b)}
502
+ function Zm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);a.M&&Ci(a.M,c);c=Ol("variantchanged",b);$m(a,c)}function Nm(a){var b=Ol("textchanged");$m(a,b)}function xm(a){var b=Ol("texttrackvisibility");$m(a,b)}function ym(a){var b=(new Map).set("newStatus",a.h.abr.enabled);$m(a,Ol("abrstatuschanged",b))}
503
+ function an(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;for(var d=a.Pa().find(function(h){return h.active}),e=a.i,f=t(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);Hd(e.variants,a.h.restrictions,a.dc);d=Pl(a);if(!d)return!1;e=a.Ma().video.reduce(function(h,k){return h+k.end-k.start},0);nm(a,d,!1,!0,e);a.$e.O(c);return!0}
504
+ function Zl(a,b){if(a.l!=Tl)if(an(a,b))b.handled=!0;else{var c=Ol("error",(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function cm(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(Ol(b,c))}
505
+ function Yl(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)}
506
+ function im(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!bn.includes(l)}h!=f.allowedByKeySystem&&
507
+ (e=!0)}}}if(!e||Bm(a))(d=a.j.l)&&!d.allowedByKeySystem&&Mm(a),e&&Am(a)}}function jm(a,b,c){if(a.K&&a.K.onExpirationUpdated)a.K.onExpirationUpdated(b,c);b=Ol("expirationupdated");a.dispatchEvent(b)}function mm(a,b,c){0<b&&(a.U()||a.Ye(b));b=a.getDuration();c<b&&(a.U()||a.Ia(c))}
508
+ function Ym(a,b){var c=a.m?a.m.Qc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?bn.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
509
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new O(2,4,4012,c);}function zm(a){if(!a.variants.some(de))throw new O(2,4,4032);}function $m(a,b){G(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Tl&&a.dispatchEvent(b);A(c)})}function Qm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(jd(c.language)):b.add("und");return b}
510
+ function Pm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=jd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
511
+ h.push({language:l,role:n,label:p})}});return h}function Ul(){return new O(2,7,7E3)}function Nl(a,b,c,d,e,f){return d==a&&e.J==f.J&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function zk(){return{J:null,mimeType:null,startTime:null,me:NaN,uri:null}}function Vl(a){return new Promise(function(b,c){a.mb=function(){return c(Ul())};a.bd=function(){return b()};a.onError=function(d){return c(d)};a.dd=function(){return c(Ul())}})}L("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Ze;
512
+ U.prototype.getManifestParserFactory=U.prototype.If;U.prototype.getManifest=U.prototype.Hf;U.prototype.retryStreaming=U.prototype.be;U.prototype.setMaxHardwareResolution=U.prototype.je;U.prototype.addChaptersTrack=U.prototype.ff;U.prototype.addThumbnailsTrack=U.prototype.hf;U.prototype.addTextTrackAsync=U.prototype.gf;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ma;U.prototype.getPresentationStartTimeAsDate=U.prototype.Ge;U.prototype.getPlayheadTimeAsDate=U.prototype.Nf;
513
+ U.prototype.setTextTrackVisibility=U.prototype.xg;U.prototype.getChapters=U.prototype.Bf;U.prototype.getChaptersTracks=U.prototype.Fe;U.prototype.isTextTrackVisible=U.prototype.Hd;U.prototype.selectVariantsByLabel=U.prototype.sg;U.prototype.selectTextLanguage=U.prototype.ge;U.prototype.selectAudioLanguage=U.prototype.fe;U.prototype.getTextLanguages=U.prototype.Pf;U.prototype.getAudioLanguages=U.prototype.yf;U.prototype.getTextLanguagesAndRoles=U.prototype.Qf;
514
+ U.prototype.getAudioLanguagesAndRoles=U.prototype.zf;U.prototype.selectVariantTrack=U.prototype.Se;U.prototype.selectTextTrack=U.prototype.Re;U.prototype.getThumbnails=U.prototype.Sf;U.prototype.getImageTracks=U.prototype.Ef;U.prototype.getTextTracks=U.prototype.Eb;U.prototype.getVariantTracks=U.prototype.Pa;U.prototype.cancelTrickPlay=U.prototype.nf;U.prototype.trickPlay=U.prototype.zg;U.prototype.getPlaybackRate=U.prototype.Rc;U.prototype.isBuffering=U.prototype.Gd;U.prototype.getKeyStatuses=U.prototype.Qc;
515
+ U.prototype.getExpiration=U.prototype.hc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Wf;U.prototype.seekRange=U.prototype.tc;U.prototype.isAudioOnly=U.prototype.Yf;U.prototype.isInProgress=U.prototype.kb;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.Ee;U.prototype.getAssetUri=U.prototype.Ed;U.prototype.getNetworkingEngine=U.prototype.ic;U.prototype.getMediaElement=U.prototype.Kf;
516
+ U.prototype.getLoadMode=U.prototype.Gf;U.prototype.resetConfiguration=U.prototype.qg;U.prototype.getBufferFullness=U.prototype.Af;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.Eg;U.prototype.unload=U.prototype.pe;U.prototype.detach=U.prototype.detach;U.prototype.attachCanvas=U.prototype.kf;U.prototype.attach=U.prototype.Yb;
517
+ U.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,Hg(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(kc()){for(var l in Og)k[l]=!0;for(var m in Qg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=kc()?!!Og[n]:lc(n);for(var p in l)k[p]=
518
+ kc()?!!Qg[p]:lc(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(ia(Si));
519
+ k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=kc()?$c(l)?!0:MediaSource.isTypeSupported(l)||Oc(l):lc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=cn;for(g in f)e[g]=f[g]();return h["return"](e)})};
520
+ U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||oc("Trident/"))return!1;var a=tc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:kc()?!0:lc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Dl=a};
521
+ U.registerSupportPlugin=function(a,b){cn[a]=b};U.prototype.destroy=U.prototype.destroy;var Tl=0,Al=1,pm=2,Dm=3;U.LoadMode={DESTROYED:Tl,NOT_LOADED:Al,MEDIA_SOURCE:pm,SRC_EQUALS:Dm};U.version="v4.3.0";var dn=["4","3"];oe=new function(a){this.g=a;this.i=pe;this.h=qe}(new me(Number(dn[0]),Number(dn[1])));
522
+ var bn=["output-restricted","internal-error"],cn={},Dl=null,Sl={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"},Wm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
523
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function en(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new hf;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})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
497
524
  r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
498
525
  r.isLinear=function(){return this.h.isLinear()};r.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)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
499
- r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;
500
- V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;
501
- V.prototype.getDuration=V.prototype.getDuration;function Rm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new of;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.2.4");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Sm(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
502
- function(f){Tm(e,f)});this.i.onended=function(){e.m.contentComplete()}}Rm.prototype.stop=function(){this.g&&this.g.stop();this.o&&yk(this.o)};Rm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Tm(a,b){b.getError();Um(a,null);a.l(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
503
- function Sm(a,b){a.l(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new R("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Vm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Wm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
504
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Wm(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,Wm(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,Wm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
505
- {once:!0})}catch(f){Um(a,null)}}function Wm(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
506
- function Vm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new R(d,e))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Tm(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Xm(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){Xm(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,
507
- 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){Um(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Um(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")});
508
- a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.C(a.g,
509
- google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,google.ima.AdEvent.Type.AD_METADATA,
510
- function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Xm(a,b){var c=b.getAd();a.j=new V(c,a.g,a.i);c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new R("ad-started",c));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
511
- function Um(a,b){a.l(new R("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
526
+ r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.h.getTitle()};r.getDescription=function(){return this.h.getDescription()};r.release=function(){this.g=this.h=null};L("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getDescription=V.prototype.getDescription;V.prototype.getTitle=V.prototype.getTitle;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;
527
+ V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;
528
+ V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function fn(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 hf;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.0");this.g=null;this.h.na(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){gn(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
529
+ function(f){hn(e,f)});this.i.onended=function(){e.m.contentComplete()}}fn.prototype.stop=function(){this.g&&this.g.stop();this.o&&Jk(this.o)};fn.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function hn(a,b){b.getError();jn(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
530
+ function gn(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){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",d)))}kn(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
531
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,ln(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,ln(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,ln(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
532
+ {once:!0})}catch(f){jn(a,null)}}function ln(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
533
+ function kn(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new S(d,e))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){hn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){mn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){mn(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,
534
+ 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){jn(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){jn(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")});
535
+ 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")});
536
+ 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,
537
+ 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")})}
538
+ function mn(a,b){var c=b.getAd();c?(a.j=new V(c,a.g,a.i),c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new S("ad-started",c)),a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())):Va("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}function jn(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.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
512
539
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
513
- r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;
514
- W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
515
- W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Ym(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.B="";this.D=[];this.h=new of;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new R("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Zm(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
516
- e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new W(f,e.l);e.u&&(e.m.h=e.u);e.i(new R("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");
517
- 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 R("ad-first-quartile"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new R("ad-midpoint"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new R("ad-third-quartile"))});
518
- this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new R("ad-complete"));e.i(new R("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 R("ad-skipped"));e.i(new R("ad-stopped"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
519
- f;e.i(new R("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Ym.prototype.stop=function(){this.B="";this.o=null;this.D=[]};Ym.prototype.release=function(){this.stop();this.h&&this.h.release()};Ym.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
520
- function Zm(a,b){a.i(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){We.call(this);this.g=this.i=null;this.h=new Qm;this.j=navigator.language}pa(X,We);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Rm(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)})};
521
- r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);We.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new R("ad-stopped"));this.h=new Qm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
522
- r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Ym(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)})};
523
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.2.4";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
524
- (c.F=!0),c.j=new lc,c.g.requestStream(a),c.B=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.2.4";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
525
- r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.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)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",X);
540
+ r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.getTitle=function(){return this.i.getTitle()};r.getDescription=function(){return this.i.getDescription()};r.release=function(){this.g=this.h=this.i=null};L("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getDescription=W.prototype.getDescription;W.prototype.getTitle=W.prototype.getTitle;
541
+ W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;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;
542
+ W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;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 nn(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 hf;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){on(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
543
+ e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new W(f,e.l);e.u&&(e.m.h=e.u);e.i(new 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");
544
+ 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"))});
545
+ 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=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
546
+ f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}nn.prototype.stop=function(){this.B="";this.o=null;this.D=[]};nn.prototype.release=function(){this.stop();this.h&&this.h.release()};nn.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
547
+ function on(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.C(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Qe.call(this);this.g=this.i=null;this.h=new en;this.j=navigator.language}ra(X,Qe);r=X.prototype;r.setLocale=function(a){this.j=a};r.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 fn(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)})};
548
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Qe.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new en};r.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)};
549
+ r.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 nn(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)})};
550
+ r.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)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.3.0";c=this.g;var d=b;c.j?c=Promise.reject(new O(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
551
+ (c.F=!0),c.j=new hc,c.g.requestStream(a),c.B=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new O(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.3.0";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new O(1,10,10003);return this.g.D};
552
+ r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.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)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};L("shaka.ads.AdManager",X);
526
553
  X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
527
554
  X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
528
555
  X.AD_VOLUME_CHANGED="ad-volume-changed";X.AD_MUTED="ad-muted";X.AD_PAUSED="ad-paused";X.AD_RESUMED="ad-resumed";X.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";X.CUEPOINTS_CHANGED="ad-cue-points-changed";X.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";X.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";X.AD_CLICKED="ad-clicked";X.AD_PROGRESS="ad-progress";X.AD_BUFFERING="ad-buffering";X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";
529
- X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";sl=function(){return new X};function $m(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof R){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
530
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(vi(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
531
- function an(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=bn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
532
- function bn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
533
- var cn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),dn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),en=["loop","playbackRate"],fn=["pause","play"],gn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
534
- isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},hn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},jn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},kn=[["getConfiguration","configure"]],mn=[["isTextTrackVisible","setTextTrackVisibility"]],nn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
535
- on=["attach","detach","load","unload"];function pn(a,b,c,d,e,f,g){var h=this;this.G=a;this.O=g;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return qn(h)};this.D=function(k,l){var m=an(l);switch(m.type){case "event":var n=m.targetName;m=Ue(m.event);h.s(n,m);break;case "update":n=m.update;for(var p in n){m=h.g[p]||{};for(var q in n[p])m[q]=n[p][q]}h.u&&(h.T(),h.u=!1);break;case "asyncComplete":if(p=m.id,m=m.error,q=h.i[p],delete h.i[p],q)if(m){p=new N(m.severity,m.category,
536
- m.code);for(n in m)p[n]=m[n];q.reject(p)}else q.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;rn.add(this)}r=pn.prototype;r.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.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.sa=function(){return this.h};r.Td=function(){return this.M};
537
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(rn),d=c.next();!d.done;d=c.next())vn(d.value,b)},function(b){for(var c=t(rn),d=c.next();!d.done;d=c.next())d=d.value,wn="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});wn&&this.j.P(xn);(a=tn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
538
- vn(this,a):tn=null}else window.__onGCastApiAvailable!==yn&&(zn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=yn)};r.$d=function(a){this.o=a;this.h&&An(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!wn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new lc;chrome.cast.requestSession(function(d){return Bn(b,a,d)},function(d){return Cn(b,d)});return u(c,b.l,0)})};
539
- function Dn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return Bn(a,b,c)},function(c){return Cn(a,c)})}}r.yb=function(){if(this.h){sn(this);if(tn){un(this);try{tn.stop(function(){},function(){})}catch(a){}tn=null}qn(this)}};
540
- r.get=function(a,b){var c=this;if("video"==a){if(fn.includes(b))return function(){return c.Ke.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(jn[b]&&!this.get("player","isLive")())return function(){};if(nn.includes(b))return function(){return c.Ke.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(on.includes(b))return function(){return c.ag.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(gn[b]||hn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
541
- r.set=function(a,b,c){this.g[a][b]=c;An(this,{type:"set",targetName:a,property:b,value:c})};function Bn(a,b,c){tn=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);qn(a);An(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Cn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
542
- r.Ke=function(a,b){An(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};r.ag=function(a,b){var c=Ia.apply(2,arguments),d=new lc,e=this.I.toString();this.I++;this.i[e]=d;try{An(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function vn(a,b){var c=a.L();a.l=new lc;a.u=!0;Bn(a,c,b)}function un(a){var b=tn;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
543
- 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.M=b?tn.receiver.friendlyName:"";a.j.Lb()}function sn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function An(a,b){var c=$m(b),d=tn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ya)}catch(e){throw c=new N(2,8,8005,e),d=new R("error",(new Map).set("detail",c)),a.s("player",d),a.yb(),c;}}var xn=.02,wn=!1,tn=null,zn=null,rn=new Set;
544
- function yn(a){zn?window.__onGCastApiAvailable=zn:delete window.__onGCastApiAvailable;zn=null;if(a)for(var b=t(rn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function En(a,b,c,d){d=void 0===d?!1:d;We.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 pn(c,function(){return Fn(e)},function(){return Gn(e)},function(f,g){return Hn(e,f,g)},function(){return In(e)},function(){return Jn(e)},d);Kn(this)}pa(En,We);r=En.prototype;
545
- r.destroy=function(a){a&&this.g.yb();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;We.prototype.release.call(this);return Promise.all(a)};r.Jf=function(){return this.l};r.Bf=function(){return this.s};r.af=function(){return this.g.m&&wn};r.sa=function(){return this.g.sa()};r.Td=function(){return this.g.Td()};
546
- r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Jn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.he(),0):c["return"]()})};r.$d=function(a){this.g.$d(a)};r.mg=function(){Dn(this.g)};r.yb=function(){this.g.yb()};
547
- r.df=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.D&&b==c.B)return d["return"]();c.D=a;c.B=b;c.g.yb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new pn(a,function(){return Fn(c)},function(){return Gn(c)},function(e,f){return Hn(c,e,f)},function(){return In(c)},function(){return Jn(c)},b);c.g.init();A(d)})};
548
- function Kn(a){a.g.init();a.m=new of;for(var b=t(cn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.sa()||(f=Ue(f),a.j.dispatchEvent(f))});for(var d in Ve)a.m.C(a.h,Ve[d],function(f){a.g.sa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Qb=e,Object.defineProperty(a.l,b.Qb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ln(a,f.Qb)}}(b),set:function(f){return function(g){var h=f.Qb;a.g.sa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qb:b.Qb};a.s={};Mn(a,
549
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Nn(a,f)}})});On(a);a.j=new We;a.j.Lc=a.l;a.o=new We;a.o.Lc=a.s}function On(a){var b=new Map;Mn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
550
- function Mn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
551
- function Jn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yd(),startTime:null};a.i.pause();for(var c=t(en),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(kn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(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 Fn(a){var b=new R("caststatuschanged");a.dispatchEvent(b)}
552
- function Gn(a){var b=new R(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
553
- function In(a){for(var b=t(kn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(en);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(en),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(mn);for(k=
554
- 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 R("error",h);a.h.dispatchEvent(h)})}
555
- function Ln(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):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
556
- function Nn(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.fc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.we()};
557
- if("setVideoContainer"==b)return function(c){return a.h.Re(c)};if(a.g.sa()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.sa()&&0==Object.keys(a.g.g.video).length&&(gn[b]||hn[b])||!a.g.sa()?a.h[b].bind(a.h):a.g.get("player",b)}
558
- function Hn(a,b,c){a.g.sa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",En);En.prototype.changeReceiverId=En.prototype.df;En.prototype.forceDisconnect=En.prototype.yb;En.prototype.suggestDisconnect=En.prototype.mg;En.prototype.setAppData=En.prototype.$d;En.prototype.cast=En.prototype.cast;En.prototype.receiverName=En.prototype.Td;En.prototype.isCasting=En.prototype.sa;En.prototype.canCast=En.prototype.af;En.prototype.getPlayer=En.prototype.Bf;
559
- En.prototype.getVideo=En.prototype.Jf;En.prototype.destroy=En.prototype.destroy;function Pn(a,b,c,d){We.call(this);var e=this;this.g=a;this.h=b;this.j=new of;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.B=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Qn(e)});Rn(this)}pa(Pn,We);r=Pn.prototype;r.isConnected=function(){return this.F};r.Nf=function(){return this.o};r.ig=function(a){this.i=a};r.gf=function(){this.i=null};
560
- r.jg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.hg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.gg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
561
- r.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.I=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,We.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
562
- function Rn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Sn(a)};b.onSenderDisconnected=function(){return Sn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Tn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Tn(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 Un(a,
563
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Vn(a,e)};b.start();b=t(cn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return Wn(a,"video",e)});for(var d in Ve)a.j.C(a.h,Ve[d],function(e){return Wn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.be(3840,2160):a.h.be(1920,1080);a.j.C(a.g,"loadeddata",function(){a.B=!0});a.j.C(a.h,"loading",function(){a.o=
564
- !1;Xn(a)});a.j.C(a.g,"playing",function(){a.o=!1;Xn(a)});a.j.C(a.g,"pause",function(){Xn(a)});a.j.C(a.h,"unloading",function(){a.o=!0;Xn(a)});a.j.C(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,Xn(a))})).P(Yn)})}function Sn(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Xn(a)}
565
- function Xn(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new R("caststatuschanged");a.dispatchEvent(b);Zn(a)||$n(a);A(c)})}
566
- function ao(a,b,c){var d,e,f,g,h,k,l,m,n,p;K(function(q){switch(q.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(q,5),u(q,a.h.load(b.manifest,b.startTime),7)):u(q,Promise.resolve(),3);case 7:va(q,3);break;case 5:return g=F(q),h=(new Map).set("detail",g),k=new R("error",h),a.h&&a.h.dispatchEvent(k),q["return"]();case 3:if(!a.h)return q["return"]();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],
567
- a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play(),$n(a));A(q)}})}function Wn(a,b,c){a.h&&(Qn(a),Tn(a,{type:"event",targetName:b,event:c},a.l))}
568
- function Qn(a){a.G.P(bo);for(var b={video:{},player:{}},c=t(dn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in jn)0==a.m%jn[e]&&(b.player[e]=a.h[e]());for(var f in gn)0==a.m%gn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Tn(a,{type:"update",update:b},a.l);for(var g in hn)0==a.m%hn[g]&&(b={player:{}},b.player[g]=a.h[g](),Tn(a,{type:"update",update:b},a.l));a.B&&(a.m+=
569
- 1);Zn(a)}function Zn(a){return a.u&&(a.g.duration||a.h.V())?(co(a),a.u=!1,!0):!1}function co(a,b){var c={contentId:a.h.yd(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);$n(a,void 0===b?0:b,c)}
570
- function Vn(a,b){var c=an(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;ao(a,c.initState,c.appData);Qn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
571
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!1);var g=c.id,h=b.senderId;f=a.I[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return eo(a,h,g,null)},function(k){return eo(a,h,g,k)})}}
572
- function Un(a,b){var c=an(b.data);switch(c.type){case "PLAY":a.g.play();$n(a);break;case "PAUSE":a.g.pause();$n(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),$n(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),$n(a));break;case "STOP":a.h.he().then(function(){a.h&&$n(a)});break;case "GET_STATUS":co(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
573
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||$n(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&co(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Tn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Tn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
574
- function eo(a,b,c,d){a.h&&Tn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Tn(a,b,c,d){a.F&&(a=$m(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function $n(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?fo:a.h.zd()?go:a.g.paused?ho:io,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Tn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
575
- M("shaka.cast.CastReceiver",Pn);Pn.prototype.destroy=Pn.prototype.destroy;Pn.prototype.setContentArtist=Pn.prototype.gg;Pn.prototype.setContentImage=Pn.prototype.hg;Pn.prototype.setContentTitle=Pn.prototype.jg;Pn.prototype.clearContentMetadata=Pn.prototype.gf;Pn.prototype.setContentMetadata=Pn.prototype.ig;Pn.prototype.isIdle=Pn.prototype.Nf;Pn.prototype.isConnected=Pn.prototype.isConnected;var bo=.5,Yn=5,fo="IDLE",io="PLAYING",go="BUFFERING",ho="PAUSED";function jo(a,b,c){var d=ko(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Xd?(e=h.init||e,!1):!0}),f.length&&(a=lo(e,f,c,g),0==a.length&&(a=[fc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(fc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
576
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{re:g,dh:e,drmInfos:a,ve:!0}}function mo(a,b,c,d){var e=jo(a,c,d);if(b.ve){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ve=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.re||b.re}
577
- function no(a){var b=0,c=Ib(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
578
- function oo(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function po(a){a=Qf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Nc(a.textContent);a=no(a).filter(function(b){return b.type===qo})[0];if(!a)return"";a=Cc(a.value,!0);return(a=fg(a,"WRMHEADER"))?oo(a):""}
579
- function lo(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Xd];if(g){var h;if(h=Qf(f.node,"urn:microsoft:playready","pro")){h=Nc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Nf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Xd)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
580
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Nf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=fc(g,f.init||a||h||k);if(g=ro.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function ko(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=so(c.value))&&b.push(c);return b}
581
- function so(a){var b=a.getAttribute("schemeIdUri"),c=Tf(a,"urn:mpeg:cenc:2013","default_KID"),d=Rf(a,"urn:mpeg:cenc:2013","pssh").map(Vf);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Nc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Xd:b,keyId:c,init:0<e.length?e:null}}
582
- var qo=1,ro=(new Map).set("com.widevine.alpha",function(a){return(a=Qf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",po).set("com.microsoft.playready.recommendation",po).set("com.microsoft.playready.software",po).set("com.microsoft.playready.hardware",po).set("org.w3.clearkey",function(a){return(a=Qf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function to(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=
556
+ X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Dl=function(){return new X};function pn(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
557
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(ri(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
558
+ function qn(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=rn(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
559
+ function rn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
560
+ var sn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),tn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),un=["loop","playbackRate"],vn=["pause","play"],wn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
561
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},xn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},yn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},zn=[["getConfiguration","configure"]],Bn=[["isTextTrackVisible","setTextTrackVisibility"]],Cn="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
562
+ Dn=["attach","attachCanvas","detach","load","unload"];function En(a,b,c,d,e,f,g){var h=this;this.G=a;this.N=g;this.j=new Q(b);this.P=c;this.u=!1;this.s=d;this.F=e;this.K=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return Fn(h)};this.D=function(k,l){var m=qn(l);switch(m.type){case "event":var n=m.targetName;m=Oe(m.event);h.s(n,m);break;case "update":n=m.update;for(var p in n){m=h.g[p]||{};for(var q in n[p])m[q]=n[p][q]}h.u&&(h.P(),h.u=!1);break;case "asyncComplete":if(p=m.id,m=m.error,q=h.i[p],delete h.i[p],q)if(m){p=new O(m.severity,m.category,
563
+ m.code);for(n in m)p[n]=m[n];q.reject(p)}else q.resolve()}};this.g={video:{},player:{}};this.H=0;this.i={};this.l=null;Gn.add(this)}r=En.prototype;r.destroy=function(){Gn["delete"](this);Hn(this);In&&Jn(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()};r.ra=function(){return this.h};r.$d=function(){return this.M};
564
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.N,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Gn),d=c.next();!d.done;d=c.next())Kn(d.value,b)},function(b){for(var c=t(Gn),d=c.next();!d.done;d=c.next())d=d.value,Ln="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Ln&&this.j.O(Mn);(a=In)&&a.status!=chrome.cast.SessionStatus.STOPPED?
565
+ Kn(this,a):In=null}else window.__onGCastApiAvailable!==Nn&&(On=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Nn)};r.he=function(a){this.o=a;this.h&&Pn(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return G(function(c){if(!b.m)throw new O(1,8,8E3);if(!Ln)throw new O(1,8,8001);if(b.h)throw new O(1,8,8002);b.l=new hc;chrome.cast.requestSession(function(d){return Qn(b,a,d)},function(d){return Rn(b,d)});return u(c,b.l,0)})};
566
+ function Sn(a){if(a.h){var b=a.K();chrome.cast.requestSession(function(c){return Qn(a,b,c)},function(c){return Rn(a,c)})}}r.zb=function(){if(this.h){Hn(this);if(In){Jn(this);try{In.stop(function(){},function(){})}catch(a){}In=null}Fn(this)}};
567
+ r.get=function(a,b){var c=this;if("video"==a){if(vn.includes(b))return function(){return c.Pe.apply(c,[a,b].concat(ia(Ja.apply(0,arguments))))}}else if("player"==a){if(yn[b]&&!this.get("player","isLive")())return function(){};if(Cn.includes(b))return function(){return c.Pe.apply(c,[a,b].concat(ia(Ja.apply(0,arguments))))};if(Dn.includes(b))return function(){return c.ng.apply(c,[a,b].concat(ia(Ja.apply(0,arguments))))};if(wn[b]||xn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
568
+ r.set=function(a,b,c){this.g[a][b]=c;Pn(this,{type:"set",targetName:a,property:b,value:c})};function Qn(a,b,c){In=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);Fn(a);Pn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Rn(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))}
569
+ r.Pe=function(a,b){Pn(this,{type:"call",targetName:a,methodName:b,args:Ja.apply(2,arguments)})};r.ng=function(a,b){var c=Ja.apply(2,arguments),d=new hc,e=this.H.toString();this.H++;this.i[e]=d;try{Pn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Kn(a,b){var c=a.K();a.l=new hc;a.u=!0;Qn(a,c,b)}function Jn(a){var b=In;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
570
+ function Fn(a){var b=In?"connected"==In.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};Hn(a)}a.h=b;a.M=b?In.receiver.friendlyName:"";a.j.Lb()}function Hn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new O(1,7,7E3))}}function Pn(a,b){var c=pn(b),d=In;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ya)}catch(e){throw c=new O(2,8,8005,e),d=new S("error",(new Map).set("detail",c)),a.s("player",d),a.zb(),c;}}var Mn=.02,Ln=!1,In=null,On=null,Gn=new Set;
571
+ function Nn(a){On?window.__onGCastApiAvailable=On:delete window.__onGCastApiAvailable;On=null;if(a)for(var b=t(Gn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Tn(a,b,c,d){d=void 0===d?!1:d;Qe.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 En(c,function(){return Un(e)},function(){return Vn(e)},function(f,g){return Wn(e,f,g)},function(){return Xn(e)},function(){return Yn(e)},d);Zn(this)}ra(Tn,Qe);r=Tn.prototype;
572
+ r.destroy=function(a){a&&this.g.zb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Qe.prototype.release.call(this);return Promise.all(a)};r.Vf=function(){return this.l};r.Mf=function(){return this.s};r.mf=function(){return this.g.m&&Ln};r.ra=function(){return this.g.ra()};r.$d=function(){return this.g.$d()};
573
+ r.cast=function(){var a=this,b;return G(function(c){return 1==c.g?(b=Yn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.pe(),0):c["return"]()})};r.he=function(a){this.g.he(a)};r.yg=function(){Sn(this.g)};r.zb=function(){this.g.zb()};
574
+ r.pf=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.zb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new En(a,function(){return Un(c)},function(){return Vn(c)},function(e,f){return Wn(c,e,f)},function(){return Xn(c)},function(){return Yn(c)},b);c.g.init();A(d)})};
575
+ function Zn(a){a.g.init();a.m=new hf;for(var b=t(sn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.ra()||(f=Oe(f),a.j.dispatchEvent(f))});for(var d in Pe)a.m.C(a.h,Pe[d],function(f){a.g.ra()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Rb=e,Object.defineProperty(a.l,b.Rb,{configurable:!1,enumerable:!0,get:function(f){return function(){return $n(a,f.Rb)}}(b),set:function(f){return function(g){var h=f.Rb;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Rb:b.Rb};a.s={};ao(a,
576
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return bo(a,f)}})});co(a);a.j=new Qe;a.j.Vc=a.l;a.o=new Qe;a.o.Vc=a.s}function co(a){var b=new Map;ao(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
577
+ function ao(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
578
+ function Yn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.Ed(),startTime:null};a.i.pause();for(var c=t(un),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(zn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Bn);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 Un(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
579
+ function Vn(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
580
+ function Xn(a){for(var b=t(zn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(un);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(un),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(Bn);for(k=
581
+ 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)})}
582
+ function $n(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.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
583
+ function bo(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.ic()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.Ee()};
584
+ if("setVideoContainer"==b)return function(c){return a.h.Ze(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&(wn[b]||xn[b])||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}
585
+ function Wn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}L("shaka.cast.CastProxy",Tn);Tn.prototype.changeReceiverId=Tn.prototype.pf;Tn.prototype.forceDisconnect=Tn.prototype.zb;Tn.prototype.suggestDisconnect=Tn.prototype.yg;Tn.prototype.setAppData=Tn.prototype.he;Tn.prototype.cast=Tn.prototype.cast;Tn.prototype.receiverName=Tn.prototype.$d;Tn.prototype.isCasting=Tn.prototype.ra;Tn.prototype.canCast=Tn.prototype.mf;Tn.prototype.getPlayer=Tn.prototype.Mf;
586
+ Tn.prototype.getVideo=Tn.prototype.Vf;Tn.prototype.destroy=Tn.prototype.destroy;function eo(a,b,c,d){Qe.call(this);var e=this;this.g=a;this.h=b;this.j=new hf;this.H={video:a,player:b};this.D=c||function(){};this.K=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 Q(function(){fo(e)});go(this)}ra(eo,Qe);r=eo.prototype;r.isConnected=function(){return this.F};r.Zf=function(){return this.o};r.vg=function(a){this.i=a};r.tf=function(){this.i=null};
587
+ r.wg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.ug=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.tg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
588
+ r.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,Qe.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
589
+ function go(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return ho(a)};b.onSenderDisconnected=function(){return ho(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&io(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);io(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 jo(a,
590
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return ko(a,e)};b.start();b=t(sn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return lo(a,"video",e)});for(var d in Pe)a.j.C(a.h,Pe[d],function(e){return lo(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.je(3840,2160):a.h.je(1920,1080);a.j.C(a.g,"loadeddata",function(){a.B=!0});a.j.C(a.h,"loading",function(){a.o=
591
+ !1;mo(a)});a.j.C(a.g,"playing",function(){a.o=!1;mo(a)});a.j.C(a.g,"pause",function(){mo(a)});a.j.C(a.h,"unloading",function(){a.o=!0;mo(a)});a.j.C(a.g,"ended",function(){(new Q(function(){a.g&&a.g.ended&&(a.o=!0,mo(a))})).O(no)})}function ho(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;mo(a)}
592
+ function mo(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);oo(a)||po(a);A(c)})}
593
+ function qo(a,b,c){var d,e,f,g,h,k,l,m,n,p;G(function(q){switch(q.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(q,5),u(q,a.h.load(b.manifest,b.startTime),7)):u(q,Promise.resolve(),3);case 7:za(q,3);break;case 5:return g=Aa(q),h=(new Map).set("detail",g),k=new S("error",h),a.h&&a.h.dispatchEvent(k),q["return"]();case 3:if(!a.h)return q["return"]();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],
594
+ a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play(),po(a));A(q)}})}function lo(a,b,c){a.h&&(fo(a),io(a,{type:"event",targetName:b,event:c},a.l))}
595
+ function fo(a){a.G.O(ro);for(var b={video:{},player:{}},c=t(tn),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 yn)0==a.m%yn[e]&&(b.player[e]=a.h[e]());for(var f in wn)0==a.m%wn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;io(a,{type:"update",update:b},a.l);for(var g in xn)0==a.m%xn[g]&&(b={player:{}},b.player[g]=a.h[g](),io(a,{type:"update",update:b},a.l));a.B&&(a.m+=
596
+ 1);oo(a)}function oo(a){return a.u&&(a.g.duration||a.h.U())?(so(a),a.u=!1,!0):!1}function so(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);po(a,void 0===b?0:b,c)}
597
+ function ko(a,b){var c=qn(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;qo(a,c.initState,c.appData);fo(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.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=
598
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!1);var g=c.id,h=b.senderId;f=a.H[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return to(a,h,g,null)},function(k){return to(a,h,g,k)})}}
599
+ function jo(a,b){var c=qn(b.data);switch(c.type){case "PLAY":a.g.play();po(a);break;case "PAUSE":a.g.pause();po(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),po(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),po(a));break;case "STOP":a.h.pe().then(function(){a.h&&po(a)});break;case "GET_STATUS":so(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
600
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||po(a);break;case "LOAD":a.m=0;a.B=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.K(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&so(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");io(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:io(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
601
+ function to(a,b,c,d){a.h&&io(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function io(a,b,c,d){a.F&&(a=pn(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function po(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?uo:a.h.Gd()?vo:a.g.paused?wo:xo,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);io(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
602
+ L("shaka.cast.CastReceiver",eo);eo.prototype.destroy=eo.prototype.destroy;eo.prototype.setContentArtist=eo.prototype.tg;eo.prototype.setContentImage=eo.prototype.ug;eo.prototype.setContentTitle=eo.prototype.wg;eo.prototype.clearContentMetadata=eo.prototype.tf;eo.prototype.setContentMetadata=eo.prototype.vg;eo.prototype.isIdle=eo.prototype.Zf;eo.prototype.isConnected=eo.prototype.isConnected;var ro=.5,no=5,uo="IDLE",xo="PLAYING",vo="BUFFERING",wo="PAUSED";function yo(a,b,c){var d=zo(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.ee?(e=h.init||e,!1):!0}),f.length&&(a=Ao(e,f,c,g),0==a.length&&(a=[bc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(bc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
603
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ze:g,th:e,drmInfos:a,De:!0}}function Bo(a,b,c,d){var e=yo(a,c,d);if(b.De){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.De=!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.ze||b.ze}
604
+ function Co(a){var b=0,c=Hb(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=N(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
605
+ function Do(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Eo(a){a=If(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Gc(a.textContent);a=Co(a).filter(function(b){return b.type===Fo})[0];if(!a)return"";a=yc(a.value,!0);return(a=Yf(a,"WRMHEADER"))?Do(a):""}
606
+ function Ao(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.ee];if(g){var h;if(h=If(f.node,"urn:microsoft:playready","pro")){h=Gc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Ff(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.ee)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,
607
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Ff(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=bc(g,f.init||a||h||k);if(g=Go.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function zo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Ho(c.value))&&b.push(c);return b}
608
+ function Ho(a){var b=a.getAttribute("schemeIdUri"),c=Lf(a,"urn:mpeg:cenc:2013","default_KID"),d=Jf(a,"urn:mpeg:cenc:2013","pssh").map(Nf);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:Gc(f),keyId:null}})}catch(f){throw new O(2,4,4007);}return{node:a,ee:b,keyId:c,init:0<e.length?e:null}}
609
+ var Fo=1,Go=(new Map).set("com.widevine.alpha",function(a){return(a=If(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Eo).set("com.microsoft.playready.recommendation",Eo).set("com.microsoft.playready.software",Eo).set("com.microsoft.playready.hardware",Eo).set("org.w3.clearkey",function(a){return(a=If(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Io(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=
583
610
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
584
- function uo(a,b){var c=vo(a,b,"timescale"),d=1;c&&(d=bg(c)||1);var e=vo(a,b,"duration");c=bg(e||"");"image"==a.H.contentType&&(c=dg(e||""));c&&(c/=d);var f=vo(a,b,"startNumber");e=Number(vo(a,b,"presentationTimeOffset"))||0;var g=cg(f||"");if(null==f||null==g)g=1;var h=wo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.W.duration||Infinity;h=Pf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Xf(p,"t",cg),y=Xf(p,"d",cg);p=Xf(p,"r",ag);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
585
- p||0;if(0>p)if(q){q=Xf(q,"t",cg);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,qg:v}),v=m}f=l}return{timescale:d,ga:c,Kb:g,Ra:e/d||0,ie:e,timeline:f}}function vo(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(dc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
586
- function wo(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(dc).map(function(d){return Of(d,c)}).reduce(function(d,e){return d||e})}
587
- function xo(a,b,c,d,e,f){for(var g=Tf(a,"http://www.w3.org/1999/xlink","href"),h=Tf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Oe(new N(2,4,4028));if("onLoad"!=h)return Oe(new N(2,4,4027));var m=ec([d],[g]);return e.request(0,ef(m,b)).Z(function(n){n=hg(n.data,a.tagName);if(!n)return Oe(new N(2,4,4001,g));
588
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return yo(a,b,c,m[0],e,f+1)})}
589
- function yo(a,b,c,d,e,f){f=void 0===f?0:f;if(Tf(a,"http://www.w3.org/1999/xlink","href")){var g=xo(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return yo(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Tf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(yo(k,b,c,d,e,f)));return Se(g).Z(function(){return a})};function zo(a,b,c,d,e,f,g){var h,k=(new Bf).U("sidx",function(l){h=Ao(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
590
- function Ao(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Jb(),m=g.reader.Jb();g.reader.skip(2);var n=g.reader.Sd();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.N(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new oi(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 Bo(a){this.h=Ib(a);this.g=new yf(this.h,0)}Bo.prototype.ma=function(){return this.g.ma()};
591
- function Co(a){var b=Do(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Do(a);a:{d=t(Eo);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Ib(a.h,a.g.$(),b);a.g.skip(b);return new Fo(c,d)}
592
- function Do(a){var b=a.g.$(),c=a.g.Qa();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Eo=[[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 Fo(a,b){this.id=a;this.g=b}
593
- function Go(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Ho(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Bo(a.g);for(var n=null,p=null;a.ma();){var q=Co(a);if(187==q.id){var v=Io(q);v&&(q=c*v.rg,v=b+v.$f,null!=n&&m.push(new oi(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new oi(n+g,d+g,l,p,null,f,g,h,k));return m}
594
- function Io(a){var b=new Bo(a.g);a=Co(b);if(179!=a.id)throw new N(2,3,3013);a=Go(a);b=Co(b);if(183!=b.id)throw new N(2,3,3012);b=new Bo(b.g);for(var c=0;b.ma();){var d=Co(b);if(241==d.id){c=Go(d);break}}return{rg:a,$f:c}};function Jo(a,b){var c=wo(a,b,"Initialization");if(!c)return null;var d=a.H.wa,e=c.getAttribute("sourceURL");e&&(d=ec(a.H.wa,[e]));e=0;var f=null;if(c=Xf(c,"range",$f))e=c.start,f=c.end;return new mi(function(){return d},e,f,Ko(a))}
595
- function Lo(a,b){var c=Number(vo(a,Mo,"presentationTimeOffset"))||0,d=vo(a,Mo,"timescale"),e=1;d&&(e=bg(d)||1);var f=c/e||0,g=Jo(a,Mo);No(a,g);var h=Ye(a);return{zb:function(){var k=wo(h,Mo,"RepresentationIndex"),l=h.H.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=ec(h.H.wa,[k]));k=Oo(h);return Po(h,b,g,l,k.start,k.end,f)}}}
596
- function Po(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,z,B,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wa||!a.W.De,l=a.W.start,m=a.W.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ya(),c.Ba,c.la):null],p=null,u(E,Promise.all(v),2);y=E.h;x=y[0];w=y[1]||null;D=null;z=l-g;B=l;G=m?l+m:Infinity;if("mp4"==n)var H=zo(x,e,d,c,z,B,G);else{H=new Bo(w);if(440786851!=Co(H).id)throw new N(2,3,3008);var I=Co(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
597
- I=new Bo(I.g);for(var J=null;I.ma();){var L=Co(I);if(357149030==L.id){J=L;break}}if(!J)throw new N(2,3,3010);J=new Bo(J.g);L=1E6;for(I=null;J.ma();){var P=Co(J);if(2807729==P.id)L=Go(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=L/1E9;I*=J;L=Co(new Bo(x));if(475249515!=L.id)throw new N(2,3,3007);H=Ho(L,H,J,I,d,c,z,B,G)}D=H;h.Gb(D);q=new rj(D);k&&q.Xa(B,G,!0);return E["return"](q)})}
598
- function Mo(a){return a.uc}function Oo(a){var b=wo(a,Mo,"RepresentationIndex");a=vo(a,Mo,"indexRange");a=$f(a||"");b&&(a=Xf(b,"range",$f,a));return a}function No(a,b){Qo(a,b);if(!Oo(a))throw new N(2,4,4002);}function Qo(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=jc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
599
- function Ko(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Ro(a,b){var c=Jo(a,So),d=To(a);if(!d.ga&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ga&&!a.W.duration&&!d.timeline&&1==d.Eb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=Uo(a.W.start,a.W.duration,a.H.wa,d,c);c=!e;e?e.Fb(g,a.presentationTimeline.Oa()):e=new rj(g);a.presentationTimeline.Gb(g);a.Wa&&a.W.De||e.Xa(a.W.start,a.W.duration?a.W.start+a.W.duration:
600
- Infinity,c);f&&(f.segmentIndex=e);return{zb:function(){e&&0!=e.J.length||e.nc(g);return Promise.resolve(e)}}}function So(a){return a.$a}function To(a){var b=Vo(a);a=uo(a,So);var c=a.Kb;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Kb:c,Ra:a.Ra,timeline:a.timeline,Eb:b}}
601
- function Uo(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Ra,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={ld:m.ld},n++){var p=d.Eb[n];m.ld=ec(c,[p.Rf]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new oi(a+l,a+q,function(v){return function(){return v.ld}}(m),p.start,p.end,e,g,a,h));l=q}return k}
602
- function Vo(a){return[a.H.$a,a.ja.$a,a.aa.$a].filter(dc).map(function(b){return Pf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Be&&(a.Be=!0);var c=b.getAttribute("media");b=Xf(b,"mediaRange",$f,{start:0,end:null});return{Rf:c,start:b.start,end:b.end}})};function Wo(a,b,c,d,e,f){var g=Xo(a),h=Yo(a);Zo(h);var k=Ye(a);if(h.kc)return Qo(a,g),{zb:function(){var q=to(h.kc,k.H.id,null,k.bandwidth||null,null);q=ec(k.H.wa,[q]);return Po(k,b,g,q,0,null,h.Ra)}};if(h.ga)return d||(a.presentationTimeline.Md(h.ga),a.presentationTimeline.Nd(a.W.start)),{zb:function(){return $o(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=ap(k,h,g);c=a.W.start;var n=a.W.duration?a.W.start+a.W.duration:Infinity,p=Infinity!=
603
- n;l?(p&&(new rj(m)).Xa(c,n,!0),l.Fb(m,a.presentationTimeline.Oa())):l=new rj(m);a.presentationTimeline.Gb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{zb:function(){l&&0!=l.J.length||l.nc(m);return Promise.resolve(l)}}}function bp(a){return a.vc}function Yo(a){var b=uo(a,bp),c=vo(a,bp,"media");a=vo(a,bp,"index");return{ga:b.ga,timescale:b.timescale,Kb:b.Kb,Ra:b.Ra,ie:b.ie,timeline:b.timeline,Kd:c,kc:a}}
604
- function Zo(a){var b=a.kc?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.kc&&(a.timeline=null),a.ga=null);if(!a.kc&&!a.Kd)throw new N(2,4,4002);}
605
- function $o(a,b,c,d,e){function f(J){var L=(J-q)*p,P=L+b.Ra,S=L+l;L=S+p;var Y=Math.min(L,h());S=new oi(S,Y,function(){var ea=to(y,w,J,x,P*v);return ec(D,[ea])},0,null,d,z,l,h());S.j=L;return S}function g(){var J=[Math.max(k.Oa(),l),Math.min(k.gb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.aa.id,n=a.W.duration,p=b.ga,q=b.Kb,v=b.timescale,
606
- y=b.Kd,x=a.bandwidth||null,w=a.H.id,D=a.H.wa,z=l-b.Ra,B=g();a=a.Wa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var G=a;G<=B;++G){var E=f(G);c.push(E)}var H=new rj(c);c=k.gb()<h();G=k.V();if(c||G){var I=Math.max(a,B+1);H.bd(p,function(){var J=k.Oa();H.eb(J);var L=t(g());L.next();L=L.next().value;for(var P=[];I<=L;){var S=f(I);P.push(S);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
607
- function ap(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Ra;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={kd:h.kd,od:h.od,rd:h.rd,gd:h.gd,td:h.td,hd:h.hd},k++){var l=b.timeline[k],m=l.start,n=l.qg;l=l.end;h.rd=k+b.Kb;h.td=n+b.ie;h.od=a.H.id;h.gd=a.bandwidth||null;h.kd=b.Kd;h.hd=a.H.wa;g.push(new oi(d+m,d+l,function(p){return function(){var q=to(p.kd,p.od,p.rd,p.gd||null,p.td);return ec(p.hd,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
608
- function Xo(a){var b=vo(a,bp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.wa;return new mi(function(){var f=to(b,c,null,d,null);return ec(e,[f])},0,null,Ko(a))};function cp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}cp.prototype.release=function(){for(var a=t(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=[]};
609
- function dp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca;return K(function(Da){switch(Da.g){case 1:d=kc;ep(b);fp(b);gp(b);hp(b);if(!c&&1==b.length){e=b[0];a.g=e.Fc;a.h=e.dd;a.j=e.textStreams;a.i=e.imageStreams;Da.A(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return Da["return"]();k=b.map(function(Ga){return Ga.Fc});l=b.map(function(Ga){return Ga.dd});m=b.map(function(Ga){return Ga.textStreams});n=b.map(function(Ga){return Ga.imageStreams});
610
- p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(ip(d.X));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(ip(d.Ub));return u(Da,jp(a.g,k,f,kp,lp),3);case 3:return u(Da,jp(a.h,l,f,kp,lp),4);case 4:return u(Da,jp(a.j,m,f,kp,lp),5);case 5:return u(Da,jp(a.i,n,f,kp,lp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(J=t(a.g),L=J.next();!L.done;L=J.next())for(P=L.value,S=t(a.h),Y=S.next();!Y.done;Y=S.next())ea=Y.value,ta=Sg(P.drmInfos,ea.drmInfos),P.drmInfos.length&&ea.drmInfos.length&&
611
- !ta.length||(Ca=D++,z.push({id:Ca,language:P.language,primary:P.primary,audio:P,video:ea,bandwidth:(P.bandwidth||0)+(ea.bandwidth||0),drmInfos:ta,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),G=t(B),E=G.next();!E.done;E=G.next())H=E.value,I=D++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.cb?H:null,video:H.type==d.ra?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
612
- a.l=z;A(Da)}})}function ep(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Fc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Fc=c}}
613
- function gp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
614
- function fp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.dd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&fb(e.roles,h.roles)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.dd=c}}
615
- function hp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
616
- function mp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P;return K(function(S){switch(S.g){case 1:b=kc;if(1==a.length)return S["return"](a[0]);c=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.cb})});d=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.ra})});e=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.X})});f=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.Ub})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
617
- k.push(np(b.X));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(np(b.Ub));return u(S,jp([],c,0,op,pp),2);case 2:return p=S.h,u(S,jp([],d,0,op,pp),3);case 3:return q=S.h,u(S,jp([],e,0,op,pp),4);case 4:return v=S.h,u(S,jp([],f,0,op,pp),5);case 5:y=S.h;x=0;if(q.length&&p.length)for(G=t(p),E=G.next();!E.done;E=G.next())for(H=E.value,I=t(q),J=I.next();!J.done;J=I.next())L=J.value,P=x++,L.variantIds.push(P),H.variantIds.push(P);else for(w=q.concat(p),D=t(w),z=D.next();!z.done;z=D.next())B=z.value,
618
- B.variantIds=[x++];return S["return"](q.concat(p).concat(v).concat(y))}})}
619
- function jp(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J;return K(function(L){switch(L.g){case 1:f=kc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){L.A(4);break}m=l.value;return u(L,qp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new N(2,4,4037);l=k.next();L.A(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,y=t(v),x=y.next();!x.done;x=y.next())w=x.value,(D=rp(w,b,d,e,g))&&a.push(D);z=t(g);for(q=z.next();!q.done;q=
620
- z.next())for(B=q.value,G={},E=t(B),x=E.next();!x.done;G={Va:G.Va},x=E.next())if(G.Va=x.value,H=G.Va.type==f.X&&!G.Va.language,I=G.Va.type==f.Ub&&!G.Va.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(S){return S.mimeType==P.Va.mimeType&&Zc(S.codecs)==Zc(P.Va.codecs)}}(G))))throw new N(2,4,4037);return L["return"](a)}})}
621
- function qp(a,b,c,d,e){return K(function(f){if(1==f.g)return sp(b,a),a.matchedStreams?a.segmentIndex?u(f,tp(a,c),2):f.A(2):f["return"](!1);up(a,c,d,e);return f["return"](!0)})}
622
- function tp(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof uj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
623
- function rp(a,b,c,d,e){var f=c(a);sp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new uj;return u(g,tp(f,0),0)})});if(!f.matchedStreams)return null;up(f,0,d,e);return f}function up(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==pd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
624
- function kp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
625
- function op(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
626
- function lp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=Sg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
627
- (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=kp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),lp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&lp(a.trickModeVideo,b)}
628
- function pp(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){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
629
- function sp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:vp,video:vp,text:wp,image:xp}[f.type],h={audio:yp,video:zp,text:Ap,image:Bp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function vp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Zc(b.codecs)!=Zc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Sg(c,d).length:1)}return c?!1:!0}
630
- function wp(a,b){return a.language?b.language?0==pd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function xp(a){return a.tilesLayout?!0:!1}
631
- function yp(a,b,c){if(a.id==c.id)return!0;var d=pd(a.language,b.language),e=pd(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;
632
- d=Cp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Dp)return!0;if(d==Ep)return!1;d=Cp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Dp?!0:d==Ep?!1:a.bandwidth&&Fp(a.bandwidth,b.bandwidth,c.bandwidth)==Dp?!0:!1}
633
- function zp(a,b,c){if(a.id==c.id)return!0;var d=Cp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Dp)return!0;if(d==Ep)return!1;if(a.frameRate){d=Cp(a.frameRate,b.frameRate,c.frameRate);if(d==Dp)return!0;if(d==Ep)return!1}return a.bandwidth&&Fp(a.bandwidth,b.bandwidth,c.bandwidth)==Dp?!0:!1}
634
- function Ap(a,b,c){if(a.id==c.id)return!0;var d=pd(a.language,b.language),e=pd(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!=
635
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Bp(a,b,c){return a.id==c.id?!0:Cp(a.width*a.height,b.width*b.height,c.width*c.height)==Dp?!0:!1}function np(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}}
636
- function ip(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new rj([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
637
- function Cp(a,b,c){if(b==a&&a!=c)return Ep;if(c==a&&a!=b)return Dp;if(b>a){if(c<=a||c-a<b-a)return Dp;if(c-a>b-a)return Ep}else{if(c>a)return Ep;if(a-c<a-b)return Dp;if(a-c>a-b)return Ep}return Gp}function Fp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Dp:b<a?Ep:Gp}var Dp=1,Gp=0,Ep=-1;function Hp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new cp;this.F=0;this.I=new Pa(5);this.D=new O(function(){Ip(a)});this.o=new Ze;this.s=null;this.L=[];this.u=Infinity;this.B=!1}r=Hp.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.B=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Jp(c),2);d=e.h;c.h&&Kp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
638
- r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return C(c,2),u(c,Jp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};r.onExpirationUpdated=function(){};
639
- function Jp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=ef(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),$e(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Lp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
640
- function Lp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=hg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Mp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=yo(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Mp(a,h,c))})}
641
- function Mp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga;return K(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Pf(b,"Location").map(Vf).filter(dc);0<f.length&&(g=ec(e,f),e=a.m=g);h=Pf(b,"BaseURL");k=h.map(Vf);l=ec(e,k);m=0;h&&h.length&&(m=Xf(h[0],"availabilityTimeOffset",dg)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Xf(b,"minBufferTime",Zf)||0);a.F=Xf(b,"minimumUpdatePeriod",Zf,-1);q=Xf(b,"availabilityStartTime",Yf);v=Xf(b,
642
- "timeShiftBufferDepth",Zf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Xf(b,"suggestedPresentationDelay",Zf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Xf(b,"maxSegmentDuration",Zf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.eb(B.Oa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:I,B=new T(q,J,a.g.dash.autoCorrectDrift);B.wc("static"==z);(L=B.V())&&
643
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.de(v);P=b.getAttribute("profiles")||"";S={Wa:"static"!=z,presentationTimeline:B,aa:null,W:null,ja:null,H:null,bandwidth:0,Be:!1,xb:m,profiles:P.split(",")};Y=Np(a,S,l,b);ea=Y.duration;ta=Y.periods;"static"!=z&&Y.te||B.Ia(ea||Infinity);a.u&&!a.B&&(Ca=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Oe(a.u):a.u&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
644
- B.Md(D||1);return u(Ha,dp(a.j,ta,S.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ha.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:!1};if(!B.Te()){Ha.A(4);break}Da=Pf(b,"UTCTiming");return u(Ha,Op(a,l,Da),5);case 5:Ga=Ha.h;if(!a.h)return Ha["return"]();B.Pe(Ga);case 4:B.Hd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ha)}})}
645
- function Np(a,b,c,d){var e=Xf(d,"mediaPresentationDuration",Zf),f=[],g=0;d=Pf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Xf(k,"start",Zf,g),n=k.id,p=Xf(k,"duration",Zf),q=null;if(l){var v=Xf(l,"start",Zf);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Pp(a,b,c,{start:m,duration:q,node:k,De:null==q||!l});f.push(g);b.aa.id&&q&&(a.M[b.aa.id]=q);if(null==q){g=
646
- null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,te:!1}:{periods:f,duration:g,te:!0}}
647
- function Pp(a,b,c,d){b.aa=Qp(d.node,null,c);b.W=d;b.aa.xb=b.xb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Pf(d.node,"EventStream");c=b.presentationTimeline.Oa();e=t(e);for(var f=e.next();!f.done;f=e.next())Rp(a,d.start,d.duration,f.value,c);c=Pf(d.node,"AdaptationSet").map(function(m){return Sp(a,b,m)}).filter(dc);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.cg);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
648
- }d=c.filter(function(m){return!m.ge});c=c.filter(function(m){return m.ge});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ge.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Dc:h.Dc},l=k.next())h.Dc=l.value,h.Dc.trickModeVideo=e.streams.find(function(m){return function(n){return Zc(m.Dc.codecs)==Zc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Tp(d,"audio");g=a.g.disableVideo?[]:Tp(d,"video");f=a.g.disableText?
649
- []:Tp(d,jc);c=a.g.disableThumbnails?[]:Tp(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Fc:d,dd:e,textStreams:g,imageStreams:f}}
650
- function Tp(a,b){return a.filter(function(c){return c.contentType==b})}
651
- function Sp(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ja=Qp(c,b.aa,null);var e=!1,f=Pf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(dc),h=void 0,k=b.ja.contentType==jc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
652
- l}}var n;m=Pf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Pf(c,"SupplementalProperty");m=t(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"),
653
- 10)));m=Pf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var y=t(q),x=y.next();!x.done;x=y.next()){var w=x.value,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,D=w);v.set(x,Q(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
654
- 1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,Q(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Pf(c,"ContentProtection");var z=jo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Q(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Pf(c,"Label"))&&l.length&&
655
- (l=l[0],l.textContent&&(G=l.textContent));l=Pf(c,"Representation");c=l.map(function(E){if(E=Up(a,b,z,h,B,G,e,g,v,E))E.hdr=E.hdr||n;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ja.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ja.contentType||"application"==b.ja.contentType)for(b.ja.contentType=Vp(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ja.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
656
- m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(dc);return{id:b.ja.id||"__fake__"+a.G++,contentType:b.ja.contentType,language:B,eh:e,streams:c,drmInfos:z.drmInfos,ge:f,cg:k}}
657
- function Up(a,b,c,d,e,f,g,h,k,l){b.H=Qp(l,b.ja,null);a.u=Math.min(a.u,b.H.xb);if(!Wp(b.H))return null;var m=b.W.start;b.bandwidth=Xf(l,"bandwidth",bg)||0;var n=b.H.contentType,p=n==jc||"application"==n;n="image"==n;try{var q=function(H,I,J){return Xp(a,H,I,J)};if(b.H.uc)var v=Lo(b,q);else if(b.H.$a)v=Ro(b,a.l);else if(b.H.vc)v=Wo(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.H.wa,x=b.W.duration||0;v={zb:function(){return Promise.resolve(tj(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
658
- throw H;}q=Pf(l,"ContentProtection");q=mo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;Pf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Pf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
659
- (z=l.getAttribute("value")),!z))return null;var B;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(B="PQ");var G=b.H.id?b.aa.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,I,J;return K(function(L){if(1==L.g){I=(H=G&&b.Wa&&a.l[G])?a.l[G]:E;if(I.segmentIndex)return L.A(0);J=I;return u(L,v.zb(),3)}J.segmentIndex=L.h;A(L)})},closeSegmentIndex:function(){E.segmentIndex&&
660
- (E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ja.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Vc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:w,closedCaptions:k,
661
- hdr:B,tilesLayout:z,matchedStreams:[]};G&&b.Wa&&!a.l[G]&&(a.l[G]=E);return E}function Ip(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Jp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Kp(a,b);A(d)}})}function Kp(a,b){0>a.F||a.D.P(Math.max(3,a.F-b,Qa(a.I)))}
662
- function Qp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vc:null,audioSamplingRate:null,xb:0};c=c||b.wa;var d=Pf(a,"BaseURL"),e=d.map(Vf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Xf(a,"frameRate",eg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Pf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
663
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Pf(a,"AudioChannelConfiguration");m=Yp(m)||b.Vc;p=Xf(a,"audioSamplingRate",cg)||b.audioSamplingRate;f||(f=Vp(g,h));var q=Of(a,"SegmentBase"),v=Of(a,"SegmentTemplate"),y=q?Xf(q,"availabilityTimeOffset",dg)||0:0,x=v?Xf(v,"availabilityTimeOffset",dg)||0:0;d=d&&d.length?Xf(d[0],"availabilityTimeOffset",dg)||0:0;d=b.xb+d+y+x;return{wa:ec(c,e),uc:q||b.uc,$a:Of(a,"SegmentList")||b.$a,vc:v||b.vc,width:Xf(a,"width",cg)||b.width,height:Xf(a,
664
- "height",cg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Vc:m,audioSamplingRate:p,xb:d}}
665
- function Yp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
666
- 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 Wp(a){var b=a.uc?1:0;b+=a.$a?1:0;b+=a.vc?1:0;if(0==b)return a.contentType==jc||"application"==a.contentType?!0:!1;1!=b&&(a.uc&&(a.$a=null),a.vc=null);return!0}
667
- function Zp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=ec(b,[c]),f=ef(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),$e(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Bc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
668
- function Op(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;C(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);
669
- 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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return u(n,Zp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Zp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
670
- case 9:va(n,3);break;case 5:F(n);case 3:g=f.next();n.A(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
671
- function Rp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Xf(d,"timescale",cg)||1;d=t(Pf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Xf(k,"presentationTime",cg)||0,m=Xf(k,"duration",cg)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
672
- function Xp(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Jj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),$e(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Vp(a,b){return cd(Xc(a,b))?jc:a.split("/")[0]}M("shaka.dash.DashParser",Hp);Yg.mpd=function(){return new Hp};Wg["application/dash+xml"]=function(){return new Hp};Wg["video/vnd.mpeg.dash.mpd"]=function(){return new Hp};function $p(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function aq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}aq.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};
673
- aq.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 bq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function cq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function dq(a,b){this.name=a;this.value=b};function eq(a,b){return a.filter(function(c){return c.name==b})}function fq(a,b){return a.filter(function(c){return bq(c,"TYPE")==b})}function gq(a,b){var c=eq(a,b);return c.length?c[0]:null}function hq(a){var b=0;b=void 0===b?0:b;return(a=gq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function iq(a,b){return ec([a],[b])[0]};function jq(a){this.h=a;this.g=0}function kq(a){lq(a,/[ \t]+/gm)}function lq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function mq(a){return a.g==a.h.length?null:(a=lq(a,/[^ \t\n]*/gm))?a[0]:null};function nq(){this.g=0}
674
- function oq(a,b,c){b=Bc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=pq(a,g),--a.g,qq.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=pq(a,h);if(rq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
675
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=pq(a,m),qq.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=iq(d,m.trim()),h&&g.push(h),e.push(new cq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new cq("",g,k)));return new $p(c,b,f,e)}f.push(h);
676
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new dq("URI",k)),e=!0)}}return new $p(c,b,f)}function pq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new jq(f);var h;(h=lq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=lq(f,k);)d.push(new dq(h[1],h[2]||h[3])),kq(f)}return new aq(c,e,d,g)}
677
- var qq="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(" "),rq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function sq(){}function tq(a){try{var b=uq(a);return Qe({uri:a,Ge:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Oe(c)}}function uq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Nc(a):e=Ic(a);return{data:e,contentType:c}}
678
- M("shaka.net.DataUriPlugin",sq);sq.parse=tq;bf("data",tq);function vq(){var a=this;this.g=this.i=null;this.Ka=1;this.o=new Map;this.u=new Map;this.va=new Set;this.h=new Map;this.j=null;this.M="";this.ca=new nq;this.ia=0;this.T=!1;this.O=null;this.B=new O(function(){wq(a)});this.l=xq;this.I=null;this.ea=0;this.F=Infinity;this.Y=this.ha=0;this.D=new Ze;this.G=[];this.L=new Map;this.s=new Map;this.da=new Map;this.m=!1}r=vq.prototype;r.configure=function(a){this.g=a};
679
- r.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.m=b.isLowLatencyMode(),u(f,yq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,zq(c,d.data,a),3);e=c.ia;0<e&&c.B.P(e);return f["return"](c.I)})};r.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.i=null;this.va.clear();this.I=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
680
- r.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.l==xq)return h["return"]();b=[];c=Array.from(a.h.values());return c.length?u(h,Aq(a,c[0]),2):h.A(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Aq(a,c[d]));return u(h,Promise.all(b),4)}Bq(a);e=c.some(function(k){return 0==k.ze});e||(f=Cq,Dq(a,f.We),g=c.map(function(k){return k.lc}),a.j.Ia(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
681
- function Aq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return c=b.Xe,d=new Nb(c),a.m&&b.bf&&Qb(d,new Sb("_HLS_skip=YES")),u(v,yq(a,d.toString()),2);e=v.h;f=oq(a.ca,e.data,e.uri);if(1!=f.type)throw new N(2,4,4017);g=eq(f.g,"EXT-X-DEFINE");h=Eq(a,g);k=b.stream;l=Fq(a,f,k.type,b.mc,h);a.G.push(l);k.segmentIndex.Fb(l,a.j.Oa());l.length&&(m=hq(f.g),n=b.mc.get(m),k.segmentIndex.eb(n));p=l[l.length-1];if(q=gq(f.g,"EXT-X-ENDLIST"))b.ze=!0,b.lc=p.endTime;A(v)})}r.onExpirationUpdated=function(){};
682
- function Gq(a){if(!a.T){for(var b=-1,c=new Map,d=t(a.h.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.J[0]||null))for(var g=t(e.mc),h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.O=b;b=t(a.h.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.O-c.get(d),e.J.splice(0,f),(e=e.J[0]||null)&&Hq(d,-e.startTime);a.T=!0}}}
683
- function Iq(a){if(!a.T){for(var b=Infinity,c=t(a.h.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.J[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=t(a.h.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.J[0]||null,null==e.g?Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.cd,"Expect AV sync issues!"):Hq(d,e.g-b-e.startTime))}a.T=!0}}}
684
- function Hq(a,b){a.stream.segmentIndex.offset(b);a.lc+=b;for(var c=t(a.mc),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.mc.set(d,e+b)}}
685
- function zq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga,Ha,Ec,Ub,qd,rd,sb,sd,Fc,Gc;return K(function(Ra){switch(Ra.g){case 1:d=oq(a.ca,b,a.M);e=eq(d.g,"EXT-X-DEFINE");Jq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],I=ad(G),J=new Map,u(Ra,Kq(a,d,c,c,I,H,"",!0,"Media Playlist",null,J,null,!1,!1,E),8);k=eq(d.g,"EXT-X-MEDIA");l=eq(d.g,"EXT-X-STREAM-INF");m=eq(d.g,"EXT-X-IMAGE-STREAM-INF");Lq(a,l);n=
686
- eq(d.g,"EXT-X-SESSION-DATA");p=t(n);for(q=p.next();!q.done;q=p.next())if(v=q.value,y=Z(v,"DATA-ID"),x=Z(v,"URI"),w=Z(v,"LANGUAGE"),D=Z(v,"VALUE"),z=(new Map).set("id",y),x&&z.set("uri",iq(a.M,x)),w&&z.set("language",w),D&&z.set("value",D),B=new R("sessiondata",z),a.i)a.i.onEvent(B);return u(Ra,Mq(a,k),4);case 4:return Nq(a,k),u(Ra,Oq(a,l),5);case 5:return f=Ra.h,u(Ra,Pq(a,k),6);case 6:return g=Ra.h,u(Ra,Qq(a,m),7);case 7:h=Ra.h;Ra.A(3);break;case 8:L=Ra.h,a.h.set(c,L),f.push({id:0,language:"und",
687
- disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Gq(a):Iq(a);P=Infinity;S=t(a.h.values());for(Y=S.next();!Y.done;Y=S.next())ea=Y.value,"text"!=ea.stream.type&&(P=Math.min(P,ea.lc));a.l!=xq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.ea),a.j.wc(!1)):(a.j=new T(null,0),
688
- a.j.wc(!0));if(a.l!=xq)a.ia=a.F,ta=Cq,a.l==ta.Ve&&(Ca=a.j.$c,isNaN(a.g.availabilityWindowOverride)||(Ca=a.g.availabilityWindowOverride),a.j.de(Ca));else for(a.j.Ia(P),Da=t(a.h.values()),Y=Da.next();!Y.done;Y=Da.next())Ga=Y.value,Ga.stream.segmentIndex.Xa(0,P);a.G=[];Ha=[];Ec=t(f);for(Ub=Ec.next();!Ub.done;Ub=Ec.next())for(qd=Ub.value,rd=t([qd.video,qd.audio]),sb=rd.next();!sb.done;sb=rd.next())(sd=sb.value)&&Ha.push(sd);return u(Ra,Promise.all(Ha.map(function(Kf){return K(function(Lf){return u(Lf,
689
- Kf.createSegmentIndex(),0)})})),9);case 9:Fc=t(Ha);for(sb=Fc.next();!sb.done;sb=Fc.next())Gc=sb.value,a.G.push(Gc.segmentIndex.J);Bq(a);a.j.Hd();a.I={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.I);A(Ra)}})}function Jq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}
690
- function Eq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
691
- function Lq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=Rq(a,e);if(g){var h=hc(jc,e);a.s.set(g,h);eb(e,h)}f&&(g=hc("audio",e),g||(g=a.g.hls.defaultAudioCodec),a.s.set(f,g));d&&(f=hc("video",e),f||(f=a.g.hls.defaultVideoCodec),a.s.set(d,f))}}
692
- function Pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return c=fq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return K(function(z){if(1==z.g){if(x=a.g.disableText)return z["return"](null);C(z,2);return u(z,Sq(a,y),4)}if(2!=z.g)return w=z.h,z["return"](w.stream);D=F(z);if(a.g.hls.ignoreTextStreamFailures)return z["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=bq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
693
- t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
694
- function Qq(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,Tq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
695
- function Mq(a,b){var c;return K(function(d){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});c=b.map(function(e){return Sq(a,e)});return u(d,Promise.all(c),0)})}
696
- function Oq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,n,p,q,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(bq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,Uq(a,g),2);v=y.h;for(var x=y["return"],w=v.audio,D=v.video,z=t(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||void 0,
697
- B.frameRate=Number(h)||void 0,B.hdr=q||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var G=t(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=B?B.stream:null;var I=H?H.stream:null,J=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.cd:"")+" - "+(B?B.cd:"");E&&I&&J.length&&L.length&&!(0<Sg(J,L).length)||a.va.has(H)||(E={id:a.Ka++,language:E?E.language:"und",primary:!!E&&E.primary||
698
- !!I&&I.primary,audio:E,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(E),a.va.add(H))}}return x.call(y,z)})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(bc,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
699
- function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g)return c=kc,d=Rq(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,n=bq(b,"URI"),p=k.audio.find(function(w){return w&&w.cd==n}),q=hc(c.ra,d),(v=hc(c.cb,d))&&!q?l=c.cb:!h.length&&v&&q?(l=c.ra,d=[[q,v].join()]):k.audio.length&&p?(l=c.cb,m=!0):l=k.video.length?c.cb:c.ra,m?x.A(2):u(x,Vq(a,b,d,l),3);2!=x.g&&(y=x.h,k[y.stream.type]=[y]);Wq(k);return x["return"](k)})}
700
- function Rq(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=$c(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Xq(a){a=Z(a,"LANGUAGE")||"und";return Q(a)}
701
- function Wq(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Nq(a,b){var c=fq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Xq(e);var f=bq(e,"GROUP-ID");e=bq(e,"INSTREAM-ID");a.L.get(f)||a.L.set(f,new Map);a.L.get(f).set(e,d)}}
702
- function Sq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g){c=bq(b,"GROUP-ID");d="";var w=bq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=jc);e=w;e!=jc&&c&&a.s.has(c)&&(d=a.s.get(c));f=Yq(bq(b,"URI"),a.o);if(a.h.has(f))return x["return"](a.h.get(f));g=Xq(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;n=w;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
703
- v="YES"==q;return u(x,Zq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,y);return x["return"](y)})}
704
- function Tq(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g){c=Yq(bq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Xq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Zq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(a.h.has(c))return p["return"](a.h.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*Number(m.split("x")[1]);
705
- if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}function Vq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=Yq(bq(b,"URI"),a.o);if(a.h.has(e))return k["return"](a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.L.get(l):null;g=gc(d,c);return u(k,Zq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
706
- function Zq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v;return K(function(y){if(1==y.g)return p=iq(a.M,b),u(y,yq(a,p),2);q=y.h;p=q.uri;v=oq(a.ca,q.data,p);return y["return"](Kq(a,v,b,p,c,d,e,f,g,h,k,l,m,n))})}
707
- function Kq(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){var y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga,Ha,Ec,Ub,qd,rd,sb,sd,Fc,Gc,Ra,Kf,Lf,ln;return K(function(ud){if(1==ud.g){if(1!=b.type)throw new N(2,4,4017);y=eq(b.g,"EXT-X-DEFINE");x=Eq(a,y);$q(a,b);return v?ud.A(2):u(ud,ar(a,f,e,b,x),3)}2!=ud.g&&(v=ud.h);w=[];if(b.segments)for(D=t(b.segments),z=D.next();!z.done;z=D.next())B=z.value,G=eq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;I=[];J=new Set;L=t(w);for(P=L.next();!P.done;P=L.next())if(S=P.value,Y=
708
- bq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(ea=bq(S,"KEYFORMAT"),Ca=(ta=br[ea])?ta(S,v):null){if(Ca.keyIds)for(Da=t(Ca.keyIds),Ga=Da.next();!Ga.done;Ga=Da.next())Ha=Ga.value,J.add(Ha);I.push(Ca)}if(E&&!I.length&&!H)throw new N(2,4,4026);Vi.includes(v)&&(e="");Ec=new Map;Ub=Fq(a,b,f,Ec,x);qd=Ub[Ub.length-1].endTime;rd=new rj(Ub);sb=f==jc?"subtitle":void 0;sd=[];if(n)for(Fc=t(n.split(",")),Gc=Fc.next();!Gc.done;Gc=Fc.next())Ra=Gc.value,sd.push(Ra);Lf=(Kf=gq(b.g,"EXT-X-SERVER-CONTROL"))?
709
- null!=Kf.getAttribute("CAN-SKIP-UNTIL"):!1;ln={id:a.Ka++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:rd,mimeType:v,codecs:e,kind:sb,encrypted:E,drmInfos:I,keyIds:J,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:sd,forced:p,channelsCount:l,audioSamplingRate:null,spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return ud["return"]({stream:ln,
710
- cd:c,Xe:d,lc:qd,mc:Ec,bf:Lf,ze:!1})})}
711
- function cr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Oc(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=hq(c.g);b=iq(c.h,bq(b,"URI"));var g=ef([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l;return K(function(m){if(1==m.g)return u(m,dr(a,g,6),2);if(3!=m.g){k=
712
- m.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l=h;return u(m,window.crypto.subtle.importKey("raw",k.data,"AES-CBC",!0,["decrypt"]),3)}l.cryptoKey=m.h;h.fetchKey=void 0;A(m)})}};return h}
713
- function $q(a,b){var c=gq(b.g,"EXT-X-PLAYLIST-TYPE"),d=gq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Dq(a,xq);else{c?Dq(a,er):Dq(a,fr);d=gq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=gq(b.g,"EXT-X-PART-INF");a.m&&c?(a.ha=Number(bq(c,"PART-TARGET")),a.F=Math.min(a.ha,a.F),c=gq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(bq(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ea=Math.max(d,a.ea)}}
714
- function gr(a,b,c,d){c=gq(c,"EXT-X-MAP");if(!c)return null;var e=bq(c,"URI");d=Yq(iq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=hr(d,c),a.da.set(b,c));return a.da.get(b)}function hr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new mi(function(){return[a]},c,d)}
715
- function ir(a,b,c,d,e,f,g,h,k){var l=d.g,m=Yq(d.i,f),n=gq(l,"EXTINF"),p=f=0,q=null;d.h.length&&!a.m&&Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var y=gq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Yf(y.value))}y=pi;gq(l,"EXT-X-GAP")&&(y=2);if(!n){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
716
- if(!a.m)return null}var x=[];if(a.m)for(var w={},D=0;D<d.h.length;w={md:w.md},D++){var z=d.h[D],B=0==D?c:x[x.length-1],G=0==D?e:B.endTime,E=Number(Z(z,"DURATION"))||a.ha;if(E){E=G+E;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=t(jr(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))w.md=iq(g,B),B=pi,"YES"==Z(z,"GAP")&&(B=2),x.push(new oi(G,E,function(J){return function(){return[J.md]}}(w),H,I,b,0,0,Infinity,[],"",null,null,B))}}n?
717
- f=e+Number(n.value.split(",")[0]):f=x[x.length-1].endTime;(a=gq(l,"EXT-X-BYTERANGE"))?(q=t(jr(c,a.value)),p=q.next().value,q=q.next().value):x.length&&(p=x[0].Ba,q=x[x.length-1].la);c="";a=null;"image"==h&&(c="1x1",h=gq(l,"EXT-X-TILES"))&&(c=bq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new oi(e,f,function(){return m.length?[m]:[]},p,q,b,0,0,Infinity,x,c,a,v,y,k)}function jr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.la+1,d=c+d-1);return[c,d]}
718
- function Bq(a){if(a.j){for(var b=t(a.G),c=b.next();!c.done;c=b.next())a.j.Gb(c.value);a.G=[]}}
719
- function Fq(a,b,c,d,e){var f=b.segments,g=void 0,h=hq(b.g),k=gq(b.g,"EXT-X-SKIP");k=k?Number(Z(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;a.l!=xq&&d.has(l)&&(m=d.get(l));for(var n=[],p=null,q=0;q<f.length;q++){var v=f[q],y=0==q?m:p.endTime;l=h+k+q;var x=t(v.g);for(var w=x.next();!w.done;w=x.next())w=w.value,"EXT-X-KEY"==w.name&&"AES-128"==bq(w,"METHOD")&&(g=cr(a,w,b));d.set(l,y);x=gr(a,b.h,v.g,e);!a.m&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.m=a.i.isLowLatencyMode());(p=v=ir(a,x,p,v,
720
- y,e,b.h,c,g))&&(a.g.hls.ignoreManifestProgramDateTime&&null!=a.O&&l<a.O||n.push(v))}if(a=n.some(function(D){return null!=D.g}))for(b={},c=0;c<n.length;b={Pb:b.Pb,Ob:b.Ob,yc:b.yc,Ta:b.Ta,Nb:b.Nb},c++)if(b.Ta=n[c],null==b.Ta.g)for(b.Ob=0,b.Pb=c,d=function(D){return function(){var z=n[D.Pb];if(z){if(null!=z.g)return z.g+D.Ob;D.Ob-=z.endTime-z.startTime;D.Pb+=1}return null}}(b),b.Nb=0,b.yc=c,e=function(D){return function(){var z=n[D.yc];if(z){z!=D.Ta&&(D.Nb+=z.endTime-z.startTime);if(null!=z.g)return z.g+
721
- D.Nb;--D.yc}return null}}(b);null==b.Ta.g;)b.Ta.g=e(),null==b.Ta.g&&(b.Ta.g=d());if(a)for(a=t(n),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.g,c=t(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return n}function Yq(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
722
- function ar(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){if(1==w.g){f=kc;g=lf;h=Math.trunc((d.segments.length-1)/2);k=Yq(d.segments[h].i,e);l=new Nb(k);m=l.ua.split(".").pop();n=kr[b];if((p=n[m])||(p=lr[m]))return w["return"](p);if(b==f.X){if("vtt"==c||"wvtt"==c)return w["return"]("text/vtt");if(c&&""!==c)return w["return"]("application/mp4")}if(b==f.Ub&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=ef([k],a.g.retryParameters);q.method="HEAD";return u(w,dr(a,q,g),2)}v=w.h;y=v.headers["content-type"];
723
- if(!y){if(b==f.X)return w["return"]("text/vtt");x=n.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function yq(a,b){var c=ef([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return dr(a,c,0)}function wq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return a.l!=xq&&(b=a.ia,a.B.P(b)),va(d,0);c=F(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.B.P(.1);A(d)})}
724
- function Dq(a,b){a.l=b;a.j&&a.j.wc(a.l==xq);a.l!=xq||a.B.stop()}function dr(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);$e(a.D,b);return b.promise}M("shaka.hls.HlsParser",vq);
725
- var lr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},kr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"txt/vtt",
726
- ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},br={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return fc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=bq(a,
727
- "URI");b=uq(b);b=Fb(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=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=bq(a,"URI");a=uq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Nf(a,b,new Set,0);return fc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},xq="VOD",fr=
728
- "EVENT",er="LIVE",Cq={We:xq,Cg:fr,Ve:er};sc("Tizen 3")||sc("Tizen 2")||uc()||(Yg.m3u8=function(){return new vq},Wg["application/x-mpegurl"]=function(){return new vq},Wg["application/vnd.apple.mpegurl"]=function(){return new vq});function mr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ge:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Hc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function nr(){}function or(a,b,c,d,e){var f=new pr;vf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new qr,h={oe:!1,Se:!1};a=rr(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 Ne(a,function(){h.oe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Se=!0;g.abort()});k.P(b/1E3);a["finally"](function(){k.stop()})}return a}
729
- function rr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,z;return K(function(B){switch(B.g){case 1:return h=sr,k=tr,p=n=0,q=Date.now(),C(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(ur(l.headers)),v=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(G){function E(){var H,I;return K(function(J){switch(J.g){case 1:return C(J,2),u(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return F(J),J["return"]();case 3:if(H.done){J.A(5);break}n+=H.value.byteLength;if(!g){J.A(5);
730
- break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?G.close():(G.enqueue(H.value),E());A(J)}})}E()},new k({start:w}),u(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=F(B);if(d.oe)throw new N(1,1,7001,a,b);if(d.Se)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return z=ur(l.headers),B["return"](mr(z,m,l.status,a,l.url,b))}})}function ur(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
731
- function vr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",nr);nr.isSupported=vr;nr.parse=or;var sr=window.fetch,qr=window.AbortController,tr=window.ReadableStream,pr=window.Headers;vr()&&(bf("http",or,2,!0),bf("https",or,2,!0),bf("blob",or,2,!0));function wr(){}
732
- function xr(a,b,c,d,e){var f=new yr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=zr(f);e(q);n=!0}};f.onload=function(){var q=zr(f),v=f.response;try{var y=mr(q,v,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
733
- c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ne(k,function(){f.abort();return Promise.resolve()})}
734
- function zr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",wr);wr.parse=xr;var yr=window.XMLHttpRequest;bf("http",xr,1,!0);bf("https",xr,1,!0);bf("blob",xr,1,!0);function Ar(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Br(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.la}function Cr(a,b){return Jj(a.g.ya(),a.g.Ba,a.g.la,b.streaming.retryParameters)};function Dr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Er(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Dr.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 Fr(a){var b=this;this.o=a;this.j=new Map;this.i=new mf(function(){return Gr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Dr}Fr.prototype.destroy=function(){return this.i.destroy()};function Hr(a,b,c){a.m=b;a.l=c}function Gr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
735
- function Ir(a,b,c,d,e,f){nf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return u(v,Jr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new Mf(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);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 Kr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
736
- function Jr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=lf,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g["return"](f.data)})};function Lr(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()}}Lr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);A(b)})};
737
- function Mr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();A(g)})}})}Lr.prototype.store=function(){return this.h};Lr.prototype.promise=function(){return this.g};function Nr(a){this.h=a;this.g=[]}Nr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Or(a,b){return Pr(a,b,"readwrite")}function Pr(a,b,c){c=a.h.transaction([b],c);var d=new Lr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Qr(a,b,c){this.h=new Nr(a);this.i=b;this.g=c}r=Qr.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Rr(this.i)};r.removeSegments=function(a,b){return Sr(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Tr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.pe(e)}))})};r.addManifests=function(){return Rr(this.g)};
738
- r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function Ur(a,b,c){a=Or(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Or(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()};r.removeManifests=function(a,b){return Sr(this,this.g,a,b)};
739
- r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Tr(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.bc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Pr(a.h,a.g,"readonly"),c=new Map,u(d,Mr(b,function(e,f){var g;return K(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)})};r.pe=function(a){return a};r.bc=function(a){return Promise.resolve(a)};
740
- function Rr(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Or(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Cc:g.Cc},k=h.next())l=k.value,g.Cc=e.add(l),g.Cc.onsuccess=function(n){return function(){f.push(n.Cc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
741
- function Sr(a,b,c,d){a=Or(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Bc:e.Bc},f=c.next())e.Bc=f.value,b["delete"](e.Bc).onsuccess=function(g){return function(){return d(g.Bc)}}(e);return a.promise()}
742
- function Tr(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Pr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Tb:h.Tb,Rb:h.Rb},l=k.next())h.Rb=l.value,h.Tb=e.get(h.Rb),h.Tb.onsuccess=function(n){return function(){void 0==n.Tb.result&&g.push(n.Rb);f[n.Rb]=n.Tb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Vr(a){this.g=new Nr(a)}Vr.prototype.destroy=function(){return this.g.destroy()};Vr.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Pr(a.g,"session-ids","readonly"),c=[],u(d,Mr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Vr.prototype.add=function(a){var b=Or(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
743
- Vr.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Or(b.g,"session-ids"),u(d,Mr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Wr(){this.g=new Map}Wr.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};Wr.prototype.init=function(){var a=this;Xr.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
744
- function Yr(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Aa:d,ka:f},ka:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function Zr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,ka:f},e)})})}
745
- function $r(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function as(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function bs(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
746
- function cs(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=Xr,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 ds(a,b){Xr.set(a,b)}M("shaka.offline.StorageMuxer",Wr);Wr.unregister=function(a){Xr["delete"](a)};Wr.register=ds;Wr.prototype.destroy=Wr.prototype.destroy;var Xr=new Map;function es(){Qr.apply(this,arguments)}pa(es,Qr);es.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Or(c.h,c.g);e=d.store();f=new lc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
747
- es.prototype.bc=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=fs(a.periods[c],e),b.push(f);return u(h,mp(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})})};
748
- function fs(a,b){gs(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return hs(e,a.startTime,b)})}
749
- function hs(a,b,c){var d=a.initSegmentUri?is(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=is(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
750
- 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}}es.prototype.pe=function(a){return{data:a.data}};function is(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
751
- function gs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
752
- f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function js(){Qr.apply(this,arguments)}pa(js,Qr);
753
- js.prototype.bc=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(ks(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,mp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
611
+ function Jo(a,b){var c=Ko(a,b,"timescale"),d=1;c&&(d=Uf(c)||1);var e=Ko(a,b,"duration");c=Uf(e||"");"image"==a.I.contentType&&(c=Wf(e||""));c&&(c/=d);var f=Ko(a,b,"startNumber");e=Number(Ko(a,b,"presentationTimeOffset"))||0;var g=Vf(f||"");if(null==f||null==g)g=1;var h=Lo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.V.duration||Infinity;h=Hf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Pf(p,"t",Vf),y=Pf(p,"d",Vf);p=Pf(p,"r",Tf);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
612
+ p||0;if(0>p)if(q){q=Pf(q,"t",Vf);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,Cg:v}),v=m}f=l}return{timescale:d,ga:c,Kb:g,Sa:e/d||0,qe:e,timeline:f}}function Ko(a,b,c){return[b(a.I),b(a.ia),b(a.aa)].filter($b).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
613
+ function Lo(a,b,c){return[b(a.I),b(a.ia),b(a.aa)].filter($b).map(function(d){return Gf(d,c)}).reduce(function(d,e){return d||e})}
614
+ function Mo(a,b,c,d,e,f){for(var g=Lf(a,"http://www.w3.org/1999/xlink","href"),h=Lf(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ie(new O(2,4,4028));if("onLoad"!=h)return Ie(new O(2,4,4027));var m=ac([d],[g]);return e.request(0,Ze(m,b)).Y(function(n){n=$f(n.data,a.tagName);if(!n)return Ie(new O(2,4,4001,g));
615
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return No(a,b,c,m[0],e,f+1)})}
616
+ function No(a,b,c,d,e,f){f=void 0===f?0:f;if(Lf(a,"http://www.w3.org/1999/xlink","href")){var g=Mo(a,b,c,d,e,f);c&&(g=g.Y(void 0,function(){return No(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Lf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(No(k,b,c,d,e,f)));return Me(g).Y(function(){return a})};function Oo(a,b,c,d,e,f,g){var h,k=(new vf).T("sidx",function(l){h=Po(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new O(2,3,3004);}
617
+ function Po(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.L();if(0==k)throw new O(2,3,3005);if(0==g.version){var l=g.reader.L();var m=g.reader.L()}else l=g.reader.ab(),m=g.reader.ab();g.reader.skip(2);var n=g.reader.Zd();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.L(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.L();g.reader.skip(4);if(1==q)throw new O(2,3,3006);h.push(new ki(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 Qo(a){this.h=Hb(a);this.g=new sf(this.h,0)}Qo.prototype.la=function(){return this.g.la()};
618
+ function Ro(a){var b=So(a);if(7<b.length)throw new O(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=So(a);a:{d=t(To);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new 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=Hb(a.h,a.g.$(),b);a.g.skip(b);return new Uo(c,d)}
619
+ function So(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 N(a.h,b,c)}var To=[[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 Uo(a,b){this.id=a;this.g=b}
620
+ function Vo(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 Wo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Qo(a.g);for(var n=null,p=null;a.la();){var q=Ro(a);if(187==q.id){var v=Xo(q);v&&(q=c*v.Dg,v=b+v.mg,null!=n&&m.push(new ki(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new ki(n+g,d+g,l,p,null,f,g,h,k));return m}
621
+ function Xo(a){var b=new Qo(a.g);a=Ro(b);if(179!=a.id)throw new O(2,3,3013);a=Vo(a);b=Ro(b);if(183!=b.id)throw new O(2,3,3012);b=new Qo(b.g);for(var c=0;b.la();){var d=Ro(b);if(241==d.id){c=Vo(d);break}}return{Dg:a,mg:c}};function Yo(a,b){var c=Lo(a,b,"Initialization");if(!c)return null;var d=a.I.va,e=c.getAttribute("sourceURL");e&&(d=ac(a.I.va,[e]));e=0;var f=null;if(c=Pf(c,"range",Sf))e=c.start,f=c.end;return new ii(function(){return d},e,f,Zo(a))}
622
+ function $o(a,b){var c=Number(Ko(a,ap,"presentationTimeOffset"))||0,d=Ko(a,ap,"timescale"),e=1;d&&(e=Uf(d)||1);var f=c/e||0,g=Yo(a,ap);bp(a,g);var h=Se(a);return{Ab:function(){var k=Lo(h,ap,"RepresentationIndex"),l=h.I.va;k&&(k=k.getAttribute("sourceURL"))&&(l=ac(h.I.va,[k]));k=cp(h);return dp(h,b,g,l,k.start,k.end,f)}}}
623
+ function dp(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,C,z,B,E;return G(function(F){if(1==F.g)return h=a.presentationTimeline,k=!a.Xa||!a.V.Ke,l=a.V.start,m=a.V.duration,n=a.I.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.xa(),c.Aa,c.ka):null],p=null,u(F,Promise.all(v),2);y=F.h;x=y[0];w=y[1]||null;C=null;z=l-g;B=l;E=m?l+m:Infinity;if("mp4"==n)var H=Oo(x,e,d,c,z,B,E);else{H=new Qo(w);if(440786851!=Ro(H).id)throw new O(2,3,3008);var I=Ro(H);if(408125543!=I.id)throw new O(2,3,3009);H=I.g.byteOffset;
624
+ I=new Qo(I.g);for(var J=null;I.la();){var M=Ro(I);if(357149030==M.id){J=M;break}}if(!J)throw new O(2,3,3010);J=new Qo(J.g);M=1E6;for(I=null;J.la();){var P=Ro(J);if(2807729==P.id)M=Vo(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new O(2,3,3003);}if(null==I)throw new O(2,3,3011);J=M/1E9;I*=J;M=Ro(new Qo(x));if(475249515!=M.id)throw new O(2,3,3007);H=Wo(M,H,J,I,d,c,z,B,E)}C=H;h.Hb(C);q=new Bj(C);k&&q.Ya(B,E,!0);return F["return"](q)})}
625
+ function ap(a){return a.vc}function cp(a){var b=Lo(a,ap,"RepresentationIndex");a=Ko(a,ap,"indexRange");a=Sf(a||"");b&&(a=Pf(b,"range",Sf,a));return a}function bp(a,b){ep(a,b);if(!cp(a))throw new O(2,4,4002);}function ep(a,b){var c=a.I.mimeType.split("/")[1];if(a.I.contentType!=fc&&"mp4"!=c&&"webm"!=c)throw new O(2,4,4006);if("webm"==c&&!b)throw new O(2,4,4005);}
626
+ function Zo(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 fp(a,b){var c=Yo(a,gp),d=hp(a);if(!d.ga&&!d.timeline&&1<d.Fb.length)throw new O(2,4,4002);if(!d.ga&&!a.V.duration&&!d.timeline&&1==d.Fb.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=ip(a.V.start,a.V.duration,a.I.va,d,c);c=!e;e?e.Gb(g,a.presentationTimeline.Oa()):e=new Bj(g);a.presentationTimeline.Hb(g);a.Xa&&a.V.Ke||e.Ya(a.V.start,a.V.duration?a.V.start+a.V.duration:
627
+ Infinity,c);f&&(f.segmentIndex=e);return{Ab:function(){e&&0!=e.g.length||e.oc(g);return Promise.resolve(e)}}}function gp(a){return a.bb}function hp(a){var b=jp(a);a=Jo(a,gp);var c=a.Kb;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Kb:c,Sa:a.Sa,timeline:a.timeline,Fb:b}}
628
+ function ip(a,b,c,d,e){var f=d.Fb.length;d.timeline&&d.timeline.length!=d.Fb.length&&(f=Math.min(d.timeline.length,d.Fb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={pd:m.pd},n++){var p=d.Fb[n];m.pd=ac(c,[p.cg]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new ki(a+l,a+q,function(v){return function(){return v.pd}}(m),p.start,p.end,e,g,a,h));l=q}return k}
629
+ function jp(a){return[a.I.bb,a.ia.bb,a.aa.bb].filter($b).map(function(b){return Hf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ie&&(a.Ie=!0);var c=b.getAttribute("media");b=Pf(b,"mediaRange",Sf,{start:0,end:null});return{cg:c,start:b.start,end:b.end}})};function kp(a,b,c,d,e,f){var g=lp(a),h=mp(a);np(h);var k=Se(a);if(h.nc)return ep(a,g),{Ab:function(){var q=Io(h.nc,k.I.id,null,k.bandwidth||null,null);q=ac(k.I.va,[q]);return dp(k,b,g,q,0,null,h.Sa)}};if(h.ga)return d||(a.presentationTimeline.Rd(h.ga),a.presentationTimeline.Sd(a.V.start)),{Ab:function(){return op(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=pp(k,h,g);c=a.V.start;var n=a.V.duration?a.V.start+a.V.duration:Infinity,p=Infinity!=
630
+ n;l?(p&&(new Bj(m)).Ya(c,n,!0),l.Gb(m,a.presentationTimeline.Oa())):l=new Bj(m);a.presentationTimeline.Hb(m);p&&l.Ya(c,n);d&&a.Xa&&(d.segmentIndex=l);return{Ab:function(){l&&0!=l.g.length||l.oc(m);return Promise.resolve(l)}}}function qp(a){return a.wc}function mp(a){var b=Jo(a,qp),c=Ko(a,qp,"media");a=Ko(a,qp,"index");return{ga:b.ga,timescale:b.timescale,Kb:b.Kb,Sa:b.Sa,qe:b.qe,timeline:b.timeline,Pd:c,nc:a}}
631
+ function np(a){var b=a.nc?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new O(2,4,4002);1!=b&&(a.nc&&(a.timeline=null),a.ga=null);if(!a.nc&&!a.Pd)throw new O(2,4,4002);}
632
+ function op(a,b,c,d,e){function f(J){var M=(J-q)*p,P=M+b.Sa,K=M+l;M=K+p;var Y=Math.min(M,h());K=new ki(K,Y,function(){var ba=Io(y,w,J,x,P*v);return ac(C,[ba])},0,null,d,z,l,h());K.j=M;return K}function g(){var J=[Math.max(k.Oa(),l),Math.min(k.hb(),h())].map(function(M){return M-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(M){return M+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.aa.id,n=a.V.duration,p=b.ga,q=b.Kb,v=b.timescale,
633
+ y=b.Pd,x=a.bandwidth||null,w=a.I.id,C=a.I.va,z=l-b.Sa,B=g();a=a.Xa?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 Bj(c);c=k.hb()<h();E=k.U();if(c||E){var I=Math.max(a,B+1);H.gd(p,function(){var J=k.Oa();H.fb(J);var M=t(g());M.next();M=M.next().value;for(var P=[];I<=M;){var K=f(I);P.push(K);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
634
+ function pp(a,b,c){var d=a.V.start,e=a.V.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,n=l.Cg;l=l.end;h.vd=k+b.Kb;h.xd=n+b.qe;h.sd=a.I.id;h.ld=a.bandwidth||null;h.od=b.Pd;h.md=a.I.va;g.push(new ki(d+m,d+l,function(p){return function(){var q=Io(p.od,p.sd,p.vd,p.ld||null,p.xd);return ac(p.md,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
635
+ function lp(a){var b=Ko(a,qp,"initialization");if(!b)return null;var c=a.I.id,d=a.bandwidth||null,e=a.I.va;return new ii(function(){var f=Io(b,c,null,d,null);return ac(e,[f])},0,null,Zo(a))};function rp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}rp.prototype.release=function(){for(var a=t(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=[]};
636
+ function sp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba,sa,va;return G(function(ka){switch(ka.g){case 1:d=gc;tp(b);up(b);vp(b);wp(b);if(!c&&1==b.length){e=b[0];a.g=e.Jc;a.h=e.hd;a.j=e.textStreams;a.i=e.imageStreams;ka.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 ka["return"]();k=b.map(function(na){return na.Jc});l=b.map(function(na){return na.hd});m=b.map(function(na){return na.textStreams});n=b.map(function(na){return na.imageStreams});
637
+ p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(xp(d.Z));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(xp(d.Vb));return u(ka,yp(a.g,k,f,zp,Ap),3);case 3:return u(ka,yp(a.h,l,f,zp,Ap),4);case 4:return u(ka,yp(a.j,m,f,zp,Ap),5);case 5:return u(ka,yp(a.i,n,f,zp,Ap),2);case 2:C=0;z=[];if(a.h.length&&a.g.length)for(J=t(a.g),M=J.next();!M.done;M=J.next())for(P=M.value,K=t(a.h),Y=K.next();!Y.done;Y=K.next())ba=Y.value,sa=Kg(P.drmInfos,ba.drmInfos),P.drmInfos.length&&ba.drmInfos.length&&
638
+ !sa.length||(va=C++,z.push({id:va,language:P.language,primary:P.primary,audio:P,video:ba,bandwidth:(P.bandwidth||0)+(ba.bandwidth||0),drmInfos:sa,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),E=t(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.Gc?H:null,video:H.type==d.ua?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
639
+ a.l=z;A(ka)}})}function tp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Jc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Jc=c}}
640
+ function vp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
641
+ function up(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.hd),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&fb(e.roles,h.roles)&&rf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.hd=c}}
642
+ function wp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
643
+ function Bp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P;return G(function(K){switch(K.g){case 1:b=gc;if(1==a.length)return K["return"](a[0]);c=a.map(function(Y){return Y.filter(function(ba){return ba.type==b.Gc})});d=a.map(function(Y){return Y.filter(function(ba){return ba.type==b.ua})});e=a.map(function(Y){return Y.filter(function(ba){return ba.type==b.Z})});f=a.map(function(Y){return Y.filter(function(ba){return ba.type==b.Vb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
644
+ k.push(Cp(b.Z));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(Cp(b.Vb));return u(K,yp([],c,0,Dp,Ep),2);case 2:return p=K.h,u(K,yp([],d,0,Dp,Ep),3);case 3:return q=K.h,u(K,yp([],e,0,Dp,Ep),4);case 4:return v=K.h,u(K,yp([],f,0,Dp,Ep),5);case 5:y=K.h;x=0;if(q.length&&p.length)for(E=t(p),F=E.next();!F.done;F=E.next())for(H=F.value,I=t(q),J=I.next();!J.done;J=I.next())M=J.value,P=x++,M.variantIds.push(P),H.variantIds.push(P);else for(w=q.concat(p),C=t(w),z=C.next();!z.done;z=C.next())B=z.value,
645
+ B.variantIds=[x++];return K["return"](q.concat(p).concat(v).concat(y))}})}
646
+ function yp(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J;return G(function(M){switch(M.g){case 1:f=gc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){M.A(4);break}m=l.value;return u(M,Fp(m,b,c,e,g),5);case 5:n=M.h;if(!n)throw new O(2,4,4037);l=k.next();M.A(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,y=t(v),x=y.next();!x.done;x=y.next())w=x.value,(C=Gp(w,b,d,e,g))&&a.push(C);z=t(g);for(q=z.next();!q.done;q=
647
+ z.next())for(B=q.value,E={},F=t(B),x=F.next();!x.done;E={Wa:E.Wa},x=F.next())if(E.Wa=x.value,H=E.Wa.type==f.Z&&!E.Wa.language,I=E.Wa.type==f.Vb&&!E.Wa.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(K){return K.mimeType==P.Wa.mimeType&&Wc(K.codecs)==Wc(P.Wa.codecs)}}(E))))throw new O(2,4,4037);return M["return"](a)}})}
648
+ function Fp(a,b,c,d,e){return G(function(f){if(1==f.g)return Hp(b,a),a.matchedStreams?a.segmentIndex?u(f,Ip(a,c),2):f.A(2):f["return"](!1);Jp(a,c,d,e);return f["return"](!0)})}
649
+ function Ip(a,b){var c,d,e,f,g,h,k;return G(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Fj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.l.push(k.segmentIndex);A(l)})}
650
+ function Gp(a,b,c,d,e){var f=c(a);Hp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return G(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Fj;return u(g,Ip(f,0),0)})});if(!f.matchedStreams)return null;Jp(f,0,d,e);return f}function Jp(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==nd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
651
+ function zp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
652
+ function Dp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
653
+ function Ap(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=Kg(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||
654
+ (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=zp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),Ap(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&Ap(a.trickModeVideo,b)}
655
+ function Ep(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){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
656
+ function Hp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Kp,video:Kp,text:Lp,image:Mp}[f.type],h={audio:Np,video:Op,text:Pp,image:Qp}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Kp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Wc(b.codecs)!=Wc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Kg(c,d).length:1)}return c?!1:!0}
657
+ function Lp(a,b){return a.language?b.language?0==nd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Mp(a){return a.tilesLayout?!0:!1}
658
+ function Np(a,b,c){if(a.id==c.id)return!0;var d=nd(a.language,b.language),e=nd(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;
659
+ d=Rp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Sp)return!0;if(d==Tp)return!1;d=Rp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Sp?!0:d==Tp?!1:a.bandwidth&&Up(a.bandwidth,b.bandwidth,c.bandwidth)==Sp?!0:!1}
660
+ function Op(a,b,c){if(a.id==c.id)return!0;var d=Rp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Sp)return!0;if(d==Tp)return!1;if(a.frameRate){d=Rp(a.frameRate,b.frameRate,c.frameRate);if(d==Sp)return!0;if(d==Tp)return!1}return a.bandwidth&&Up(a.bandwidth,b.bandwidth,c.bandwidth)==Sp?!0:!1}
661
+ function Pp(a,b,c){if(a.id==c.id)return!0;var d=nd(a.language,b.language),e=nd(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!=
662
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Qp(a,b,c){return a.id==c.id?!0:Rp(a.width*a.height,b.width*b.height,c.width*c.height)==Sp?!0:!1}function Cp(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}}
663
+ function xp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Bj([]),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}}
664
+ function Rp(a,b,c){if(b==a&&a!=c)return Tp;if(c==a&&a!=b)return Sp;if(b>a){if(c<=a||c-a<b-a)return Sp;if(c-a>b-a)return Tp}else{if(c>a)return Tp;if(a-c<a-b)return Sp;if(a-c>a-b)return Tp}return Vp}function Up(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Sp:b<a?Tp:Vp}var Sp=1,Vp=0,Tp=-1;function Wp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new rp;this.F=0;this.H=new Qa(5);this.D=new Q(function(){Xp(a)});this.o=new Te;this.s=null;this.K=[];this.u=Infinity;this.B=!1}r=Wp.prototype;r.configure=function(a){this.g=a};r.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,Yp(c),2);d=e.h;c.h&&Zp(c,d);if(!c.h)throw new O(2,7,7001);return e["return"](c.i)})};
665
+ r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return G(function(c){if(1==c.g)return D(c,2),u(c,Yp(a),4);if(2!=c.g)return za(c,0);b=Aa(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};r.onExpirationUpdated=function(){};
666
+ function Yp(a){var b,c,d,e,f,g,h;return G(function(k){if(1==k.g)return b=Ze(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Ue(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,$p(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.H.sample(1,h);return k["return"](h)})}
667
+ function $p(a,b,c){var d,e,f,g,h;return G(function(k){if(1==k.g){d=$f(b,"MPD");if(!d)throw new O(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](aq(a,d,c));f=a.g.dash.xlinkFailGracefully;g=No(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ue(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](aq(a,h,c))})}
668
+ function aq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba,sa,va,ka,na;return G(function(R){switch(R.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Hf(b,"Location").map(Nf).filter($b);0<f.length&&(g=ac(e,f),e=a.m=g);h=Hf(b,"BaseURL");k=h.map(Nf);l=ac(e,k);m=0;h&&h.length&&(m=Pf(h[0],"availabilityTimeOffset",Wf)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Pf(b,"minBufferTime",Rf)||0);a.F=Pf(b,"minimumUpdatePeriod",Rf,-1);q=Pf(b,"availabilityStartTime",Qf);v=Pf(b,"timeShiftBufferDepth",
669
+ Rf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Pf(b,"suggestedPresentationDelay",Rf));w=a.g.dash.ignoreMaxSegmentDuration;C=null;w||(C=Pf(b,"maxSegmentDuration",Rf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,E=t(Object.values(a.l)),F=E.next();!F.done;F=E.next())H=F.value,H.segmentIndex&&H.segmentIndex.fb(B.Oa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:I,B=new T(q,J,a.g.dash.autoCorrectDrift);B.xc("static"==z);(M=B.U())&&!isNaN(a.g.availabilityWindowOverride)&&
670
+ (v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.le(v);P=b.getAttribute("profiles")||"";K={Xa:"static"!=z,presentationTimeline:B,aa:null,V:null,ia:null,I:null,bandwidth:0,Ie:!1,yb:m,profiles:P.split(",")};Y=bq(a,K,l,b);ba=Y.duration;sa=Y.periods;"static"!=z&&Y.Be||B.Ia(ba||Infinity);a.u&&!a.B&&(va=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Te(a.u):a.u&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
671
+ B.Rd(C||1);return u(R,sp(a.j,sa,K.Xa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);R.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.cf()){R.A(4);break}ka=Hf(b,"UTCTiming");return u(R,cq(a,l,ka),5);case 5:na=R.h;if(!a.h)return R["return"]();B.Ue(na);case 4:B.Md();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),
672
+ A(R)}})}
673
+ function bq(a,b,c,d){var e=Pf(d,"mediaPresentationDuration",Rf),f=[],g=0;d=Hf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Pf(k,"start",Rf,g),n=k.id,p=Pf(k,"duration",Rf),q=null;if(l){var v=Pf(l,"start",Rf);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.K.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=dq(a,b,c,{start:m,duration:q,node:k,Ke:null==q||!l});f.push(g);b.aa.id&&q&&(a.M[b.aa.id]=q);if(null==q){g=
674
+ null;break}g=m+q}}a.K=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,Be:!1}:{periods:f,duration:g,Be:!0}}
675
+ function dq(a,b,c,d){b.aa=eq(d.node,null,c);b.V=d;b.aa.yb=b.yb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Hf(d.node,"EventStream");c=b.presentationTimeline.Oa();e=t(e);for(var f=e.next();!f.done;f=e.next())fq(a,d.start,d.duration,f.value,c);c=Hf(d.node,"AdaptationSet").map(function(m){return gq(a,b,m)}).filter($b);if(b.Xa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.pg);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);
676
+ }d=c.filter(function(m){return!m.oe});c=c.filter(function(m){return m.oe});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.oe.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Fc:h.Fc},l=k.next())h.Fc=l.value,h.Fc.trickModeVideo=e.streams.find(function(m){return function(n){return Wc(m.Fc.codecs)==Wc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:hq(d,"audio");g=a.g.disableVideo?[]:hq(d,"video");f=a.g.disableText?
677
+ []:hq(d,fc);c=a.g.disableThumbnails?[]:hq(d,"image");if(!g.length&&!e.length)throw new O(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Jc:d,hd:e,textStreams:g,imageStreams:f}}
678
+ function hq(a,b){return a.filter(function(c){return c.contentType==b})}
679
+ function gq(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.ia=eq(c,b.aa,null);var e=!1,f=Hf(c,"Role"),g=f.map(function(F){return F.getAttribute("value")}).filter($b),h=void 0,k=b.ia.contentType==fc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
680
+ l}}var n;m=Hf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Hf(c,"SupplementalProperty");m=t(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"),
681
+ 10)));m=Hf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=1,null!=q){q=q.split(";");for(var y=t(q),x=y.next();!x.done;x=y.next()){var w=x.value,C=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],C=w[1]||"und"):(x="CC"+p,2==q.length?p+=2:p++,C=w);v.set(x,jd(C))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
682
+ 1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+p,p++,w=x),v.set(y,jd(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Hf(c,"ContentProtection");var z=yo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=jd(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(l=Hf(c,"Label"))&&l.length&&
683
+ (l=l[0],l.textContent&&(E=l.textContent));l=Hf(c,"Representation");c=l.map(function(F){if(F=iq(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.ia.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new O(2,4,4003);}if(!b.ia.contentType||"application"==b.ia.contentType)for(b.ia.contentType=jq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ia.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
684
+ m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(F){return F.getAttribute("id")}).filter($b);return{id:b.ia.id||"__fake__"+a.G++,contentType:b.ia.contentType,language:B,uh:e,streams:c,drmInfos:z.drmInfos,oe:f,pg:k}}
685
+ function iq(a,b,c,d,e,f,g,h,k,l){b.I=eq(l,b.ia,null);a.u=Math.min(a.u,b.I.yb);if(!kq(b.I))return null;var m=b.V.start;b.bandwidth=Pf(l,"bandwidth",Uf)||0;var n=b.I.contentType,p=n==fc||"application"==n;n="image"==n;try{var q=function(H,I,J){return lq(a,H,I,J)};if(b.I.vc)var v=$o(b,q);else if(b.I.bb)v=fp(b,a.l);else if(b.I.wc)v=kp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.I.va,x=b.V.duration||0;v={Ab:function(){return Promise.resolve(Ej(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
686
+ throw H;}q=Hf(l,"ContentProtection");q=Bo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;Hf(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var C=!1;p&&(C=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Hf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
687
+ (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.aa.id+","+b.I.id:"",F={id:a.G++,originalId:b.I.id,createSegmentIndex:function(){var H,I,J;return G(function(M){if(1==M.g){I=(H=E&&b.Xa&&a.l[E])?a.l[E]:F;if(I.segmentIndex)return M.A(0);J=I;return u(M,v.Ab(),3)}J.segmentIndex=M.h;A(M)})},closeSegmentIndex:function(){F.segmentIndex&&
688
+ (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:q,language:e,label:f,type:b.ia.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.I.emsgSchemeIdUris,roles:h,forced:C,channelsCount:b.I.ad,audioSamplingRate:b.I.audioSamplingRate,spatialAudio:w,closedCaptions:k,
689
+ hdr:B,tilesLayout:z,matchedStreams:[]};E&&b.Xa&&!a.l[E]&&(a.l[E]=F);return F}function Xp(a){var b,c;G(function(d){switch(d.g){case 1:return b=0,D(d,2),u(d,Yp(a),4);case 4:b=d.h;za(d,3);break;case 2:c=Aa(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Zp(a,b);A(d)}})}function Zp(a,b){0>a.F||a.D.O(Math.max(3,a.F-b,Ra(a.H)))}
690
+ function eq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,ad:null,audioSamplingRate:null,yb:0};c=c||b.va;var d=Hf(a,"BaseURL"),e=d.map(Nf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Pf(a,"frameRate",Xf)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Hf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
691
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Hf(a,"AudioChannelConfiguration");m=mq(m)||b.ad;p=Pf(a,"audioSamplingRate",Vf)||b.audioSamplingRate;f||(f=jq(g,h));var q=Gf(a,"SegmentBase"),v=Gf(a,"SegmentTemplate"),y=q?Pf(q,"availabilityTimeOffset",Wf)||0:0,x=v?Pf(v,"availabilityTimeOffset",Wf)||0:0;d=d&&d.length?Pf(d[0],"availabilityTimeOffset",Wf)||0:0;d=b.yb+d+y+x;return{va:ac(c,e),vc:q||b.vc,bb:Gf(a,"SegmentList")||b.bb,wc:v||b.wc,width:Pf(a,"width",Vf)||b.width,height:Pf(a,
692
+ "height",Vf)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),ad:m,audioSamplingRate:p,yb:d}}
693
+ function mq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
694
+ 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 kq(a){var b=a.vc?1:0;b+=a.bb?1:0;b+=a.wc?1:0;if(0==b)return a.contentType==fc||"application"==a.contentType?!0:!1;1!=b&&(a.vc&&(a.bb=null),a.wc=null);return!0}
695
+ function nq(a,b,c,d){var e,f,g,h,k,l;return G(function(m){if(1==m.g)return e=ac(b,[c]),f=Ze(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Ue(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=xc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
696
+ function cq(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=t(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);
697
+ 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":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return u(n,nq(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,nq(a,b,l,"GET"),11);case 11:return n["return"](n.h);
698
+ case 9:za(n,3);break;case 5:Aa(n);case 3:g=f.next();n.A(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
699
+ function fq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Pf(d,"timescale",Vf)||1;d=t(Hf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Pf(k,"presentationTime",Vf)||0,m=Pf(k,"duration",Vf)||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))}}
700
+ function lq(a,b,c,d){var e,f,g,h,k;return G(function(l){if(1==l.g)return e=ef,f=Uj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Ue(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function jq(a,b){return $c(Uc(a,b))?fc:a.split("/")[0]}L("shaka.dash.DashParser",Wp);Qg.mpd=function(){return new Wp};Og["application/dash+xml"]=function(){return new Wp};Og["video/vnd.mpeg.dash.mpd"]=function(){return new Wp};function oq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function pq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}pq.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};
701
+ pq.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 qq(a,b){var c=a.getAttribute(b);if(!c)throw new O(2,4,4023,b);return c.value}function rq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function sq(a,b){this.name=a;this.value=b};function tq(a,b){return a.filter(function(c){return c.name==b})}function uq(a,b){return a.filter(function(c){return qq(c,"TYPE")==b})}function vq(a,b){var c=tq(a,b);return c.length?c[0]:null}function wq(a){var b=0;b=void 0===b?0:b;return(a=vq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function xq(a,b){return ac([a],[b])[0]};function yq(a){this.h=a;this.g=0}function zq(a){Aq(a,/[ \t]+/gm)}function Aq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function Bq(a){return a.g==a.h.length?null:(a=Aq(a,/[^ \t\n]*/gm))?a[0]:null};function Cq(){this.g=0}
702
+ function Dq(a,b,c){b=xc(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=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Eq(a,g),--a.g,Fq.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=Eq(a,h);if(Gq.includes(h.name)){if(1!=b)throw new O(2,4,4017);
703
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Eq(a,m),Fq.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=xq(d,m.trim()),h&&g.push(h),e.push(new rq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new rq("",g,k)));return new oq(c,b,f,e)}f.push(h);
704
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new sq("URI",k)),e=!0)}}return new oq(c,b,f)}function Eq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new O(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new yq(f);var h;(h=Aq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Aq(f,k);)d.push(new sq(h[1],h[2]||h[3])),zq(f)}return new pq(c,e,d,g)}
705
+ var Fq="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(" "),Gq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Hq(){}function Iq(a){try{var b=Jq(a);return Ke({uri:a,Ne:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ie(c)}}function Jq(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=Gc(a):e=Bc(a);return{data:e,contentType:c}}
706
+ L("shaka.net.DataUriPlugin",Hq);Hq.parse=Iq;We("data",Iq);function Kq(){var a=this;this.g=this.i=null;this.Ea=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(fc,new Map);this.F.set("image",new Map);this.ta=new Set;this.h=new Map;this.j=null;this.N="";this.X=new Cq;this.P=0;this.B=-1;this.M=Infinity;this.Ka=!1;this.m=new Q(function(){Lq(a)});this.ha=Mq;this.D=null;this.da=0;this.H=Infinity;this.W=this.ea=0;this.G=new Te;this.K=new Map;this.s=new Map;this.ca=new Map;this.l=!1}r=Kq.prototype;
707
+ r.configure=function(a){this.g=a};r.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,Nq(c,a),2)):3!=e.g?(d=e.h,c.N=d.uri,u(e,Oq(c,d.data,a),3)):e["return"](c.D)})};r.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.ta.clear();this.D=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
708
+ r.update=function(){var a=this,b,c,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){if(!Pq(a))return m["return"]();b=[];c=Array.from(a.h.values());d=c.filter(function(n){return n.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Qq(a,g));return u(m,Promise.all(b),2)}Rq(a,d.map(function(n){return n.stream}));h=d.some(function(n){return 0==n.lc});d.length&&!h&&(k=Sq,Tq(a,k.ef),l=c.map(function(n){return n.Za}),a.j.Ia(Math.min.apply(Math,ia(l))),a.i.updateDuration());A(m)})};
709
+ function Uq(a,b){return Pq(a)?a.F.get(b.type):b.$c}
710
+ function Qq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C;return G(function(z){if(1==z.g)return c=b.Ic,d=new Jb(c),a.l&&b.Lc&&Mb(d,new Ob("_HLS_skip=YES")),u(z,Nq(a,d.toString()),2);e=z.h;if(!b.stream.segmentIndex)return z["return"]();f=Dq(a.X,e.data,e.uri);if(1!=f.type)throw new O(2,4,4017);g=tq(f.g,"EXT-X-DEFINE");h=Vq(a,g);k=b.stream;l=Uq(a,b);m=Wq(f,k.mimeType);n=m.keyIds;p=m.drmInfos;q=function(B,E){return B.size===E.size&&[].concat(ia(B)).every(function(F){return E.has(F)})};q(k.keyIds,n)||(k.keyIds=
711
+ n,k.drmInfos=p,a.i.newDrmInfo(k));v=Xq(a,f,k.type,l,h);k.segmentIndex.Gb(v,a.j.Oa());v.length&&(y=wq(f.g),x=l.get(y),k.segmentIndex.fb(x));w=v[v.length-1];if(C=vq(f.g,"EXT-X-ENDLIST"))b.lc=!0,b.Za=w.endTime;A(z)})}r.onExpirationUpdated=function(){};
712
+ function Yq(a,b){for(var c=-1==a.B,d=t(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex,g=Uq(a,e);if(f=f.g[0]||null){g=t(g);for(var h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(a.B=Math.max(a.B,k));e.Dd=k;break}}}}if(!(0>a.B))for(c=t(b),e=c.next();!e.done;e=c.next())if(d=e.value,e=d.stream.segmentIndex)e.g.splice(0,a.B-d.Dd),(e=e.g[0]||null)&&Zq(a,d,-e.startTime)}
713
+ function $q(a,b){if(Infinity==a.M)for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value.stream.segmentIndex.g[0]||null;null!=e&&null!=e.g&&(a.M=Math.min(a.M,e.g))}c=a.M;if(Infinity!=c)for(e=t(a.h.values()),d=e.next();!d.done;d=e.next()){d=d.value;var f=d.stream.segmentIndex;null!=f&&(f=f.g[0]||null,null==f.g?Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.zc,"Expect AV sync issues!"):Zq(a,d,f.g-c-f.startTime))}}
714
+ function Zq(a,b,c){b.stream.segmentIndex.offset(c);b.Za+=c;a=Uq(a,b);b=t(a);for(var d=b.next();!d.done;d=b.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.set(d,e+c)}}
715
+ function Oq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba,sa,va;return G(function(ka){switch(ka.g){case 1:d=Dq(a.X,b,a.N);e=tq(d.g,"EXT-X-DEFINE");for(var na=t(e),R=na.next();!R.done;R=na.next()){var ya=R.value;R=Z(ya,"NAME");ya=Z(ya,"VALUE");R&&ya&&(a.o.has(R)||a.o.set(R,ya))}f=[];g=[];h=[];if(1==d.type)return F=a.g.hls.mediaPlaylistFullMimeType,d.segments.length&&(H=new Jb(d.segments[0].i),I=H.qa.split(".").pop(),(J=ar[I])&&(F=J)),M=F.split(";")[0],P=M.split("/")[0],K=Yc(F),
716
+ Y=new Map,u(ka,br(a,d,c,c,K,P,"",!0,"Media Playlist",null,Y,null,!1,!1,M),5);k=tq(d.g,"EXT-X-MEDIA");l=tq(d.g,"EXT-X-STREAM-INF");m=tq(d.g,"EXT-X-IMAGE-STREAM-INF");n=tq(d.g,"EXT-X-SESSION-KEY");na=t(l);for(R=na.next();!R.done;R=na.next()){var Ub=R.value;ya=Z(Ub,"AUDIO");R=Z(Ub,"VIDEO");var nb=Z(Ub,"SUBTITLES");Ub=cr(a,Ub);if(nb){var An=dc(fc,Ub);a.s.set(nb,An);eb(Ub,An)}ya&&(nb=dc("audio",Ub),nb||(nb=a.g.hls.defaultAudioCodec),a.s.set(ya,nb));R&&(ya=dc("video",Ub),ya||(ya=a.g.hls.defaultVideoCodec),
717
+ a.s.set(R,ya))}p=tq(d.g,"EXT-X-SESSION-DATA");q=t(p);for(v=q.next();!v.done;v=q.next())if(y=v.value,x=Z(y,"DATA-ID"),w=Z(y,"URI"),C=Z(y,"LANGUAGE"),z=Z(y,"VALUE"),B=(new Map).set("id",x),w&&B.set("uri",xq(a.N,w)),C&&B.set("language",C),z&&B.set("value",z),E=new S("sessiondata",B),a.i)a.i.onEvent(E);dr(a,k);na=uq(k,"CLOSED-CAPTIONS");na=t(na);for(R=na.next();!R.done;R=na.next())nb=R.value,R=er(nb),ya=qq(nb,"GROUP-ID"),nb=qq(nb,"INSTREAM-ID"),a.K.get(ya)||a.K.set(ya,new Map),a.K.get(ya).set(nb,R);f=
718
+ fr(a,l,n);g=gr(a,k);return u(ka,hr(a,m),4);case 4:h=ka.h;ka.A(3);break;case 5:ba=ka.h,a.h.set(c,ba),f.push({id:0,language:"und",disabledUntilTime:0,primary:!0,audio:"audio"==P?ba.stream:null,video:"video"==P?ba.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new O(2,7,7001);a.j=new T(null,0);a.j.xc(!0);1==d.type&&(Pq(a)&&(ir(a),sa=a.P,a.m.O(sa)),va=Array.from(a.h.values()),jr(a,va),kr(a));a.D={presentationTimeline:a.j,variants:f,textStreams:g,
719
+ imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.D);A(ka)}})}function kr(a){if(Pq(a)){if(a.P=a.H,a.ha==lr){var b=mr(a);a.g.hls.useSafariBehaviorForLive&&(b=a.j.m);isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.j.le(b)}}else a.j.Ia(mr(a));a.j.Md()}
720
+ function Vq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}
721
+ function gr(a,b){var c=uq(b,"SUBTITLES"),d=c.map(function(h){if(a.g.disableText)return null;try{return nr(a,h).stream}catch(k){if(a.g.hls.ignoreTextStreamFailures)return null;throw k;}});c=t(c);for(var e=c.next();!e.done;e=c.next()){var f=qq(e.value,"GROUP-ID");if(e=a.s.get(f))if(f=a.u.get(f)){f=t(f);for(var g=f.next();!g.done;g=f.next())g.value.stream.codecs=e}}return d.filter(function(h){return h})}
722
+ function hr(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,or(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=Aa(l);if(a.g.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
723
+ function dr(a,b){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});for(var c=t(b),d=c.next();!d.done;d=c.next())nr(a,d.value)}
724
+ function fr(a,b,c){var d=[],e=new Set;if(0<c.length){c=t(c);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=qq(f,"METHOD");if("NONE"!=g&&"AES-128"!=g&&(g=Z(f,"KEYFORMAT")||"identity",f=(g=pr[g])?g(f,""):null)){if(f.keyIds){g=t(f.keyIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}d.push(f)}}}b=b.map(function(k){var l=Z(k,"FRAME-RATE"),m=Number(Z(k,"AVERAGE-BANDWIDTH"))||Number(qq(k,"BANDWIDTH")),n=Z(k,"RESOLUTION");n=t(n?n.split("x"):[null,null]);var p=n.next().value,q=n.next().value,
725
+ v=Z(k,"VIDEO-RANGE");k=qr(a,k);n=k.audio;k=k.video;for(var y=t(k),x=y.next();!x.done;x=y.next())if(x=x.value.stream)x.width=Number(p)||void 0,x.height=Number(q)||void 0,x.frameRate=Number(l)||void 0,x.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=t(n);for(p=n.next();!p.done;p=n.next())for(p=p.value,q=t(k),v=q.next();!v.done;v=q.next()){var w=v.value;if(v=p?p.stream:null)v.drmInfos=d,v.keyIds=e;if(y=w?w.stream:null)y.drmInfos=d,y.keyIds=
726
+ e;x=p?p.stream.drmInfos:null;var C=w?w.stream.drmInfos:null;w=(w?w.zc:"")+" - "+(p?p.zc:"");v&&y&&x.length&&C.length&&!(0<Kg(x,C).length)||a.ta.has(w)||(v={id:a.Ea++,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.ta.add(w))}return l}).reduce(Yb,[]);return b=b.filter(function(k){return null!=k})}
727
+ function qr(a,b){var c=cr(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=qq(b,"URI"),h=d.audio.find(function(m){return m&&m.zc==g}),k=dc("video",c),l=dc("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?"audio":"video";e||(c=rr(a,b,c,f),d[c.stream.type]=[c]);return d}
728
+ function cr(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Xc(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function er(a){a=Z(a,"LANGUAGE")||"und";return jd(a)}
729
+ function nr(a,b){var c=qq(b,"GROUP-ID"),d="",e=qq(b,"TYPE").toLowerCase();"subtitles"==e&&(e=fc);var f=e;f!=fc&&c&&a.s.has(c)&&(d=a.s.get(c));e=sr(qq(b,"URI"),a.o);if(a.h.has(e))return a.h.get(e);var g=er(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"),p="YES"==Z(b,"FORCED");d=tr(a,e,d,f,g,k,h,l,null,n,p,m);a.u.has(c)?a.u.get(c).push(d):a.u.set(c,
730
+ [d]);if(a.h.has(e))return a.h.get(e);a.h.set(e,d);return d}
731
+ function or(a,b){var c,d,e,f,g,h,k,l,m,n;return G(function(p){if(1==p.g){c=sr(qq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=er(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");h=tr(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=
732
+ Number(k.split("x")[1])*Number(m.split("x")[1]));if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}function rr(a,b,c,d){var e=sr(qq(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.K.get(b):null;c=cc(d,c);d=tr(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}
733
+ function tr(a,b,c,d,e,f,g,h,k,l,m,n){function p(C){var z,B,E,F,H,I,J,M,P,K,Y,ba,sa;return G(function(va){if(1==va.g)return u(va,Nq(a,y.Ic),2);if(3!=va.g){z=va.h;if(C.aborted)return va["return"]();B=z.uri;E=Dq(a.X,z.data,B);F=Pq(a);return u(va,br(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;Pq(a)&&!F&&ir(a);y.Ic=B;y.Za=H.Za;y.Lc=H.Lc;y.lc=H.lc;y.$c=H.$c;y.Ld=!0;v.segmentIndex=I.segmentIndex;v.encrypted=I.encrypted;v.drmInfos=I.drmInfos;v.keyIds=I.keyIds;v.kind=
734
+ I.kind;v.roles=I.roles;v.mimeType=I.mimeType;v.drmInfos.length&&a.i.newDrmInfo(v);J=gc;if(d==J.ua||d==J.Gc)for(M=t(a.h.values()),P=M.next();!P.done;P=M.next())K=P.value,K.Ld||K.type!=d||(K.stream.mimeType=I.mimeType);ur(a)&&(a.Ka?jr(a,[y]):(a.Ka=!0,Y=Array.from(a.h.values()),ba=Y.filter(function(ka){return ka.stream.segmentIndex}),jr(a,ba),kr(a),sa=a.P,0<sa&&a.m.O(sa)));A(va)})}var q=xq(a.N,b),v=vr(a,c,d,e,f,g,h,k,m,n);Si.includes(v.mimeType)&&(v.codecs="");var y={stream:v,type:d,zc:b,Ic:q,Za:0,$c:new Map,
735
+ Lc:!1,lc:!1,Dd:-1,Ld:!1},x=null,w=new AbortController;v.createSegmentIndex=function(){if(x)return x;w=new AbortController;return x=new Promise(function(C){C(p(w.signal))})};v.closeSegmentIndex=function(){x&&!v.segmentIndex&&w.abort();v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null);x=null};return y}function mr(a){var b=Infinity;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(b=Math.min(b,c.Za));return b}
736
+ function Rq(a,b){for(var c=[],d=t(b),e=d.next();!e.done;e=d.next())e=e.value,e.segmentIndex&&Cj(e.segmentIndex,function(f){c.push(f)});a.j.Hb(c)}function jr(a,b){if(!Pq(a))for(var c=mr(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.Ya(0,c);c=t(b);for(e=c.next();!e.done;e=c.next())e=e.value.stream,Si.includes(e.mimeType)&&(e.codecs="");Rq(a,b.map(function(f){return f.stream}));a.g.hls.ignoreManifestProgramDateTime?Yq(a,b):$q(a,b)}
737
+ function ur(a){if(!a.D)return!1;var b=[],c=[];a=t(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}
738
+ function br(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){var y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba,sa,va,ka;return G(function(na){if(1==na.g){if(1!=b.type)throw new O(2,4,4017);y=tq(b.g,"EXT-X-DEFINE");x=Vq(a,y);var R=vq(b.g,"EXT-X-PLAYLIST-TYPE"),ya=vq(b.g,"EXT-X-ENDLIST");ya=R&&"VOD"==R.value||ya;R=R&&"EVENT"==R.value&&!ya;R=!ya&&!R;if(ya)Tq(a,Mq);else{R?Tq(a,lr):Tq(a,wr);ya=vq(b.g,"EXT-X-TARGETDURATION");if(!ya)throw new O(2,4,4024,"EXT-X-TARGETDURATION");ya=Number(ya.value);R=vq(b.g,"EXT-X-PART-INF");a.l&&R?(a.ea=
739
+ Number(qq(R,"PART-TARGET")),a.H=Math.min(a.ea,a.H),R=vq(b.g,"EXT-X-SERVER-CONTROL"),a.W=R?Number(qq(R,"PART-HOLD-BACK")):0):a.H=Math.min(ya,a.H);a.da=Math.max(ya,a.da)}return v?na.A(2):u(na,xr(a,f,e,b,x),3)}2!=na.g&&(v=na.h);w=Wq(b,v);C=w.drmInfos;z=w.keyIds;B=w.encrypted;E=w.jf;if(B&&!C.length&&!E)throw new O(2,4,4026);F=Pq(a)?a.F.get(f):new Map;H=Xq(a,b,f,F,x);I=H[H.length-1].endTime;J=new Bj(H);M=f==fc?"subtitle":void 0;P=[];if(n)for(K=t(n.split(",")),Y=K.next();!Y.done;Y=K.next())ba=Y.value,P.push(ba);
740
+ va=(sa=vq(b.g,"EXT-X-SERVER-CONTROL"))?null!=sa.getAttribute("CAN-SKIP-UNTIL"):!1;ka=vr(a,e,f,g,h,k,l,m,p,q);ka.segmentIndex=J;ka.encrypted=B;ka.drmInfos=C;ka.keyIds=z;ka.kind=M;ka.roles=P;ka.mimeType=v;return na["return"]({stream:ka,type:f,zc:c,Ic:d,Za:I,Lc:va,lc:!1,Dd:-1,$c:F,Ld:!1})})}
741
+ function vr(a,b,c,d,e,f,g,h,k,l){var m=yr(c,b)||(c==fc?"text/vtt":zr[c].mp4);return{id:a.Ea++,originalId:f,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:m,codecs:b,kind: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:[],forced:k,channelsCount:g,audioSamplingRate:null,spatialAudio:l,closedCaptions:h,
742
+ hdr:void 0,tilesLayout:void 0}}
743
+ function Wq(a,b){var c=[];if(a.segments)for(var d=t(a.segments),e=d.next();!e.done;e=d.next())e=tq(e.value.g,"EXT-X-KEY"),c.push.apply(c,ia(e));e=d=!1;var f=[],g=new Set;c=t(c);for(var h=c.next();!h.done;h=c.next()){h=h.value;var k=qq(h,"METHOD");if("NONE"!=k)if(d=!0,"AES-128"==k)e=!0;else if(k=Z(h,"KEYFORMAT")||"identity",h=(k=pr[k])?k(h,b):null){if(h.keyIds){k=t(h.keyIds);for(var l=k.next();!l.done;l=k.next())g.add(l.value)}f.push(h)}}return{drmInfos:f,keyIds:g,encrypted:d,jf:e}}
744
+ function Ar(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new O(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Hc(e.substr(2));if(16!=f.byteLength)throw new O(2,4,4043);}else d=wq(c.g);b=xq(c.h,qq(b,"URI"));var g=Ze([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l;return G(function(m){if(1==m.g)return u(m,Br(a,g,6),2);if(3!=m.g){k=
745
+ m.h;if(!k.data||16!=k.data.byteLength)throw new O(2,4,4044);l=h;return u(m,window.crypto.subtle.importKey("raw",k.data,"AES-CBC",!0,["decrypt"]),3)}l.cryptoKey=m.h;h.fetchKey=void 0;A(m)})}};return h}function ir(a){var b=a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.W?a.W:a.da*a.g.hls.liveSegmentsDelay;a.j.We(0);a.j.Ve(b);a.j.xc(!1)}
746
+ function Cr(a,b,c,d){c=vq(c,"EXT-X-MAP");if(!c)return null;var e=qq(c,"URI");d=sr(xq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.ca.has(b)||(c=Dr(d,c),a.ca.set(b,c));return a.ca.get(b)}function Dr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new ii(function(){return[a]},c,d)}
747
+ function Er(a,b,c,d,e,f,g,h,k){var l=d.g,m=sr(d.i,f),n=vq(l,"EXTINF"),p=f=0,q=null;d.h.length&&!a.l&&Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var y=vq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Qf(y.value))}y=li;vq(l,"EXT-X-GAP")&&(y=2);if(!n){if(0==d.h.length)throw new O(2,4,4024,"EXTINF");
748
+ if(!a.l)return null}var x=[];if(a.l)for(var w={},C=0;C<d.h.length;w={qd:w.qd},C++){var z=d.h[C],B=0==C?c:x[x.length-1],E=0==C?e:B.endTime,F=Number(Z(z,"DURATION"))||a.ea;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=t(Fr(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))w.qd=xq(g,B),B=li,"YES"==Z(z,"GAP")&&(B=2),x.push(new ki(E,F,function(J){return function(){return[J.qd]}}(w),H,I,b,0,0,Infinity,[],"",null,null,B))}}n?
749
+ f=e+Number(n.value.split(",")[0]):f=x[x.length-1].endTime;(a=vq(l,"EXT-X-BYTERANGE"))?(q=t(Fr(c,a.value)),p=q.next().value,q=q.next().value):x.length&&(p=x[0].Aa,q=x[x.length-1].ka);c="";a=null;"image"==h&&(c="1x1",h=vq(l,"EXT-X-TILES"))&&(c=qq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new ki(e,f,function(){return m.length?[m]:[]},p,q,b,0,0,Infinity,x,c,a,v,y,k)}function Fr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.ka+1,d=c+d-1);return[c,d]}
750
+ function Xq(a,b,c,d,e){var f=b.segments,g=void 0,h=wq(b.g),k=vq(b.g,"EXT-X-SKIP");k=k?Number(Z(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;Pq(a)&&d.has(l)&&(m=d.get(l));for(var n=[],p=null,q=0;q<f.length;q++){var v=f[q],y=0==q?m:p.endTime;l=h+k+q;var x=t(v.g);for(var w=x.next();!w.done;w=x.next())w=w.value,"EXT-X-KEY"==w.name&&"AES-128"==qq(w,"METHOD")&&(g=Ar(a,w,b));d.set(l,y);x=Cr(a,b.h,v.g,e);!a.l&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.l=a.i.isLowLatencyMode());(p=v=Er(a,x,p,v,y,
751
+ e,b.h,c,g))&&(a.g.hls.ignoreManifestProgramDateTime&&null!=a.B&&l<a.B||n.push(v))}if(a=n.some(function(C){return null!=C.g}))for(b={},c=0;c<n.length;b={Pb:b.Pb,Ob:b.Ob,Ac:b.Ac,Ua:b.Ua,Nb:b.Nb},c++)if(b.Ua=n[c],null==b.Ua.g)for(b.Ob=0,b.Pb=c,d=function(C){return function(){var z=n[C.Pb];if(z){if(null!=z.g)return z.g+C.Ob;C.Ob-=z.endTime-z.startTime;C.Pb+=1}return null}}(b),b.Nb=0,b.Ac=c,e=function(C){return function(){var z=n[C.Ac];if(z){z!=C.Ua&&(C.Nb+=z.endTime-z.startTime);if(null!=z.g)return z.g+
752
+ C.Nb;--C.Ac}return null}}(b);null==b.Ua.g;)b.Ua.g=e(),null==b.Ua.g&&(b.Ua.g=d());if(a)for(a=t(n),b=a.next();!b.done;b=a.next())for(c=b.value,b=c.g,c=t(c.i),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return n}function sr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new O(2,4,4039,f);}}return c}
753
+ function yr(a,b){if(a==fc){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"}
754
+ function xr(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v;return G(function(y){if(1==y.g){f=ef;g=Math.trunc((d.segments.length-1)/2);h=sr(d.segments[g].i,e);k=new Jb(h);l=k.qa.split(".").pop();m=zr[b];if((n=m[l])||(n=ar[l])||(n=yr(b,c)))return y["return"](n);p=Ze([h],a.g.retryParameters);p.method="HEAD";return u(y,Br(a,p,f),2)}q=y.h;return(v=q.headers["content-type"])?y["return"](v.split(";")[0]):y["return"](b==fc?"text/vtt":zr[b].mp4)})}
755
+ function Nq(a,b){var c=Ze([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return Br(a,c,0)}function Lq(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 Pq(a)&&(b=a.P,a.m.O(b)),za(d,0);c=Aa(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.m.O(.1);A(d)})}function Pq(a){return a.ha!=Mq}function Tq(a,b){a.ha=b;a.j&&a.j.xc(!Pq(a));Pq(a)||a.m.stop()}
756
+ function Br(a,b,c){if(!a.G)throw new O(2,7,7001);b=a.i.networkingEngine.request(c,b);Ue(a.G,b);return b.promise}L("shaka.hls.HlsParser",Kq);
757
+ var ar={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},zr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"txt/vtt",
758
+ ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},pr={"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 bc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=qq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;
759
+ b=qq(a,"URI");b=Jq(b);b=N(b.data);b=bc("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=qq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=qq(a,"URI");a=Jq(a);a=N(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=Ff(a,b,new Set,0);return bc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])},identity:function(a){a=
760
+ qq(a,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(a)?bc("org.w3.clearkey",null):null}},Mq="VOD",wr="EVENT",lr="LIVE",Sq={ef:Mq,Og:wr,Tg:lr};oc("Tizen 3")||oc("Tizen 2")||qc()||(Qg.m3u8=function(){return new Kq},Og["application/x-mpegurl"]=function(){return new Kq},Og["application/vnd.apple.mpegurl"]=function(){return new Kq});function Gr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ne:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ac(b)}catch(g){}throw new O(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Hr(){}function Ir(a,b,c,d,e){var f=new Jr;pf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Kr,h={we:!1,af:!1};a=Lr(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 He(a,function(){h.we=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new Q(function(){h.af=!0;g.abort()});k.O(b/1E3);a["finally"](function(){k.stop()})}return a}
761
+ function Lr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,C,z;return G(function(B){switch(B.g){case 1:return h=Mr,k=Nr,p=n=0,q=Date.now(),D(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(Or(l.headers)),v=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=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;za(J,3);break;case 2:return Aa(J),J["return"]();case 3:if(H.done){J.A(5);break}n+=H.value.byteLength;if(!g){J.A(5);
762
+ break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?E.close():(E.enqueue(H.value),F());A(J)}})}F()},new k({start:w}),u(B,l.arrayBuffer(),5);case 5:m=B.h;za(B,3);break;case 2:C=Aa(B);if(d.we)throw new O(1,1,7001,a,b);if(d.af)throw new O(1,1,1003,a,b);throw new O(1,1,1002,a,C,b);case 3:return z=Or(l.headers),B["return"](Gr(z,m,l.status,a,l.url,b))}})}function Or(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
763
+ function Pr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}L("shaka.net.HttpFetchPlugin",Hr);Hr.isSupported=Pr;Hr.parse=Ir;var Mr=window.fetch,Kr=window.AbortController,Nr=window.ReadableStream,Jr=window.Headers;Pr()&&(We("http",Ir,2,!0),We("https",Ir,2,!0),We("blob",Ir,2,!0));function Qr(){}
764
+ function Rr(a,b,c,d,e){var f=new Sr,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 q=Tr(f);e(q);n=!0}};f.onload=function(){var q=Tr(f),v=f.response;try{var y=Gr(q,v,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(q){m(new O(1,1,1002,a,q,
765
+ c))};f.ontimeout=function(){m(new O(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new He(k,function(){f.abort();return Promise.resolve()})}
766
+ function Tr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}L("shaka.net.HttpXHRPlugin",Qr);Qr.parse=Rr;var Sr=window.XMLHttpRequest;We("http",Rr,1,!0);We("https",Rr,1,!0);We("blob",Rr,1,!0);function Ur(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Vr(a){return a.xa().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Aa+":"+a.ka}function Wr(a,b){return Uj(a.g.xa(),a.g.Aa,a.g.ka,b.streaming.retryParameters)};function Xr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Yr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Xr.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 Zr(a){var b=this;this.o=a;this.j=new Map;this.i=new ff(function(){return $r(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Xr}Zr.prototype.destroy=function(){return this.i.destroy()};function as(a,b,c){a.m=b;a.l=c}function $r(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
767
+ function bs(a,b,c,d,e,f){gf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return G(function(v){if(1==v.g)return u(v,cs(a,c),2);h=v.h;if(a.i.g)throw new O(2,9,7001);if(e)for(m in k=N(h),l=new Ef(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,q);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 ds(a){return G(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
768
+ function cs(a,b){var c,d,e,f;return G(function(g){if(1==g.g)return c=ef,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g["return"](f.data)})};function es(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new hc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}es.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 za(b,0);Aa(b);A(b)})};
769
+ function fs(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)})}})}es.prototype.store=function(){return this.h};es.prototype.promise=function(){return this.g};function gs(a){this.h=a;this.g=[]}gs.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function hs(a,b){return is(a,b,"readwrite")}function is(a,b,c){c=a.h.transaction([b],c);var d=new es(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function js(a,b,c){this.h=new gs(a);this.i=b;this.g=c}r=js.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return ks(this.i)};r.removeSegments=function(a,b){return ls(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,ms(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.xe(e)}))})};r.addManifests=function(){return ks(this.g)};
770
+ r.updateManifest=function(){return Promise.reject(new O(2,9,9016,"Cannot modify values in "+this.g))};function ns(a,b,c){a=hs(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=hs(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()};r.removeManifests=function(a,b){return ls(this,this.g,a,b)};
771
+ r.getManifests=function(a){var b=this,c;return G(function(d){if(1==d.g)return u(d,ms(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.bc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=is(a.h,a.g,"readonly"),c=new Map,u(d,fs(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)})};r.xe=function(a){return a};r.bc=function(a){return Promise.resolve(a)};
772
+ function ks(a){return Promise.reject(new O(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=hs(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Ec:g.Ec},k=h.next())l=k.value,g.Ec=e.add(l),g.Ec.onsuccess=function(n){return function(){f.push(n.Ec.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
773
+ function ls(a,b,c,d){a=hs(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Dc:e.Dc},f=c.next())e.Dc=f.value,b["delete"](e.Dc).onsuccess=function(g){return function(){return d(g.Dc)}}(e);return a.promise()}
774
+ function ms(a,b,c){var d,e,f,g,h,k,l;return G(function(m){if(1==m.g){d=is(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Ub:h.Ub,Sb:h.Sb},l=k.next())h.Sb=l.value,h.Ub=e.get(h.Sb),h.Ub.onsuccess=function(n){return function(){void 0==n.Ub.result&&g.push(n.Sb);f[n.Sb]=n.Ub.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 os(a){this.g=new gs(a)}os.prototype.destroy=function(){return this.g.destroy()};os.prototype.getAll=function(){var a=this,b,c;return G(function(d){return 1==d.g?(b=is(a.g,"session-ids","readonly"),c=[],u(d,fs(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};os.prototype.add=function(a){var b=hs(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
775
+ os.prototype.remove=function(a){var b=this,c;return G(function(d){return 1==d.g?(c=hs(b.g,"session-ids"),u(d,fs(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function ps(){this.g=new Map}ps.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};ps.prototype.init=function(){var a=this;qs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
776
+ function rs(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 ss(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({za:d,ja:f},e)})})}
777
+ function ts(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 us(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function vs(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()}
778
+ function ws(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=qs,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 xs(a,b){qs.set(a,b)}L("shaka.offline.StorageMuxer",ps);ps.unregister=function(a){qs["delete"](a)};ps.register=xs;ps.prototype.destroy=ps.prototype.destroy;var qs=new Map;function ys(){js.apply(this,arguments)}ra(ys,js);ys.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return G(function(g){d=hs(c.h,c.g);e=d.store();f=new hc;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)})};
779
+ ys.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=zs(a.periods[c],e),b.push(f);return u(h,Bp(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})})};
780
+ function zs(a,b){As(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Bs(e,a.startTime,b)})}
781
+ function Bs(a,b,c){var d=a.initSegmentUri?Cs(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=Cs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
782
+ 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}}ys.prototype.xe=function(a){return{data:a.data}};function Cs(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);}
783
+ function As(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
784
+ f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Ds(){js.apply(this,arguments)}ra(Ds,js);
785
+ Ds.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=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Es(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,Bp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
754
786
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
755
- function ks(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,
756
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ls(){Qr.apply(this,arguments)}pa(ls,Qr);r=ls.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return Ur(this,a,b)};r.bc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ms(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ms.prototype;
757
- r.init=function(){var a=this,b=new lc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.P(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new es(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new js(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
758
- new js(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ls(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Vr(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new N(2,
759
- 9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),A(b)}})};
787
+ function Es(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,
788
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function Fs(){js.apply(this,arguments)}ra(Fs,js);r=Fs.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return ns(this,a,b)};r.bc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Gs(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=Gs.prototype;
789
+ r.init=function(){var a=this,b=new hc,c=!1,d=new Q(function(){c=!0;b.reject(new O(2,9,9017))});d.O(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new ys(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new Ds(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
790
+ new Ds(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new Fs(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new os(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new O(2,
791
+ 9,9001,e.error)),d.stop(),f.preventDefault())};return b};r.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)}})};
760
792
  r.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};r.getEmeSessionCell=function(){return this.m};
761
- r.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,ns(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
762
- function ns(){var a=new lc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}ds("idb",function(){return sc("CrKey")||rc()||!window.indexedDB?null:new ms});function os(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}os.prototype.Aa=function(){return this.i};os.prototype.ka=function(){return this.h};os.prototype.key=function(){return this.l};os.prototype.toString=function(){return this.j};
763
- function ps(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 os(b,c,d,Number(a[4])):null};function qs(a,b){this.h=a;this.g=b}
764
- function rs(a,b){var c=new T(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=ss(a,d,e,c);e=b.streams.filter(function(l){return l.type==jc}).map(function(l){return ts(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ts(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
793
+ r.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,Hs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
794
+ function Hs(){var a=new hc,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}xs("idb",function(){return oc("CrKey")||nc()||!window.indexedDB?null:new Gs});function Is(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}Is.prototype.za=function(){return this.i};Is.prototype.ja=function(){return this.h};Is.prototype.key=function(){return this.l};Is.prototype.toString=function(){return this.j};
795
+ function Js(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 Is(b,c,d,Number(a[4])):null};function Ks(a,b){this.h=a;this.g=b}
796
+ function Ls(a,b){var c=new T(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Ms(a,d,e,c);e=b.streams.filter(function(l){return l.type==fc}).map(function(l){return Ns(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ns(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
765
797
  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}}
766
- function ss(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
767
- b.next())for(e=e.value,g=ts(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=ts(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
768
- function ts(a,b,c){var d=b.segments.map(function(e){return us(a,e)});c.Gb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new rj(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
769
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function us(a,b){var c=new os("segment",a.h,a.g,b.dataKey);return new oi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?vs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
770
- function vs(a,b){var c=new os("segment",a.h,a.g,b);return new mi(function(){return[c.toString()]},0,null)};function ws(){this.g=null}r=ws.prototype;r.configure=function(){};
771
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=ps(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Wr;ua(m);return u(m,e.init(),4);case 4:return u(m,$r(e,d.Aa(),d.ka()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new qs(d.Aa(),d.ka()),l=rs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
772
- r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new Wr,C(m,2,3),u(m,e.init(),5);case 5:return u(m,$r(e,d.Aa(),d.ka()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
773
- Wg["application/x-offline-manifest"]=function(){return new ws};function xs(){}function ys(a){var b=ps(a);b&&"manifest"==b.g?(a={uri:a,Ge:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Qe(a)):a=b&&"segment"==b.g?zs(b.key(),b):Oe(new N(2,1,9004,a));return a}
774
- function zs(a,b){var c=new Wr;return Qe(void 0).Z(function(){return c.init()}).Z(function(){return $r(c,b.Aa(),b.ka())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",xs);xs.plugin=ys;bf("offline",ys);function As(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,Bs(y.info,p)){y.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Cs(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)}})}
775
- function Cs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new ig({kb:b,onError:function(){},Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,qg(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return C(f,6),u(f,Bg(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
776
- 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return C(h,2),u(h,Cg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
777
- function Bs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function Ds(a,b,c){var d=b.presentationTimeline.getDuration();b=Es(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Fs(a,b){var c=rs(new qs(a.Aa(),a.ka()),b),d=b.appMetadata||{};c=Es(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}}
778
- function Es(a){var b=[],c=ke(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(be(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ce(c.value));return b};function Gs(){this.g={}}function Hs(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 Is(a,b){a.g[b.id]=b.bandwidth||2048}function Js(a,b){var c=a.g[b];null==c&&(c=0);return c};function Ks(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.fc()):(this.h=fl(),this.g=new af);this.i=[];this.j=[];var c=!a;this.l=new mf(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Gr(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
779
- case 4:b.h=null,b.g=null,A(k)}})})}function Ls(){if(oc())a:{var a=t(Xr.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}r=Ks.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cl(a,b));return hl(this.h,a)};r.getConfiguration=function(){var a=fl();hl(a,this.h,fl());return a};r.fc=function(){return this.g};
780
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Fr(this.g);this.j.push(f);b=Ms(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,Vg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new Ne(b,function(){return Gr(f)});b["finally"](function(){eb(d.j,f)});return Ns(this,b)};
781
- function Ms(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,z;return K(function(B){switch(B.g){case 1:return Os(),h=g=null,k=new Wr,n=m=l=null,C(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,Ps(a,b,g,e),6);case 6:p=B.h;Qs(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.jb();if(!q)throw new N(2,9,9005,b);return u(B,Rs(a,p,function(G){n=n||G},e),7);case 7:h=B.h;Qs(a);if(n)throw n;return u(B,Ss(p,e),8);case 8:return u(B,k.init(),9);case 9:return Qs(a),u(B,Yr(k),10);case 10:return l=B.h,Qs(a),v=Ts(h,
782
- p,b,c,e,f),y=v.Of,x=v.fe,u(B,l.ka.addManifests([y]),11);case 11:w=B.h;Qs(a);m=w[0];Qs(a);if(n)throw n;return u(B,Us(a,x,m,y,f,e,l.ka,p,h),12);case 12:return Qs(a),D=new os("manifest",l.path.Aa,l.path.ka,m),B["return"](Fs(D,y));case 3:return wa(B),u(B,k.destroy(),13);case 13:if(!g){B.A(14);break}return u(B,g.stop(),14);case 14:if(!h){B.A(16);break}return u(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=F(B);if(null==m){B.A(18);break}return u(B,Vs(m),18);case 18:throw n||z;}})}
783
- function Us(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:l={};m=0;n=function(B,G){var E,H,I,J,L,P,S;return K(function(Y){if(1==Y.g){E={};H=t(B);for(I=H.next();!I.done;E={bb:E.bb},I=H.next())E.bb=I.value,J=Cr(E.bb,f),L=E.bb.i,P=E.bb.h,S=function(ea){return function(ta){var Ca,Da,Ga;return K(function(Ha){if(1==Ha.g)return u(Ha,g.addSegments([{data:ta}]),2);Ca=Ha.h;Qs(a);Da=ea.bb.g;Ga=Br(Da);l[Ga]=Ca[0];m+=ta.byteLength;A(Ha)})}}(E),Ir(e,E.bb.groupId,J,L,P,S);return u(Y,
784
- Kr(e),2)}if(!G)return Y.A(0);Qs(a);Ws(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};p=!1;C(z,2);if(!Xs(h)||!p||Ys(h)){z.A(4);break}return u(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return Qs(a),b=b.filter(function(B){return!B.h}),q=l,v=m,l={},m=0,u(z,Zs(g,c,d,q,v,function(){return Qs(a)}),6);case 6:Qs(a);case 4:if(p){z.A(7);break}return u(z,n(b,!1),8);case 8:return Qs(a),y=l,x=m,l={},m=0,u(z,Zs(g,c,d,y,x,function(){return Qs(a)}),9);case 9:Qs(a);case 7:va(z,0);break;case 2:return w=F(z),
785
- D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function Vs(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Wr,u(f,b.init(),2);case 2:return u(f,Yr(b),3);case 3:return c=f.h,d=new os("manifest",c.path.Aa,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Ks,u(f,e.remove(d.toString()),0)}})}
786
- function Zs(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w.g){case 1:g=!1;C(w,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
787
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=F(w),u(w,Vs(b),5);case 5:if(g){w.A(6);break}x=Object.values(d);return u(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
788
- function Ss(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea;return K(function(ta){switch(ta.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(ta,Pd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;zd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(be(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
789
- d.push(ce(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(de(x));return u(ta,b.offline.trackSelectionCallback(d),3);case 3:w=ta.h;D=a.presentationTimeline.getDuration();z=0;B=t(w);for(G=B.next();!G.done;G=B.next())E=G.value,H=E.bandwidth*D/8,z+=H;C(ta,4);return u(ta,b.offline.downloadSizeCallback(z),6);case 6:I=ta.h;if(!I)throw new N(2,9,9014);va(ta,5);break;case 4:J=F(ta);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:L=new Set;P=new Set;S=new Set;Y=t(w);for(G=
790
- Y.next();!G.done;G=Y.next())ea=G.value,"variant"==ea.type&&L.add(ea.id),"text"==ea.type&&P.add(ea.id),"image"==ea.type&&S.add(ea.id);a.variants=a.variants.filter(function(Ca){return L.has(Ca.id)});a.textStreams=a.textStreams.filter(function(Ca){return P.has(Ca.id)});a.imageStreams=a.imageStreams.filter(function(Ca){return S.has(Ca.id)});$s(a);A(ta)}})}
791
- function Ts(a,b,c,d,e,f){var g=Ds(c,b,d),h=e.offline.progressCallback;Hr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&yg(a,"cenc",q)});var k=Xs(b)&&!Ys(b),l=null;k&&(l=at.get(a.g.keySystem));for(var m=new Gs,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Is(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Hs(m,n.value);m=bt(f,m,b,e);f=m.streams;m=m.fe;p=a.g;n=e.offline.usePersistentLicense;
792
- p&&n&&(p.initData=[]);return{Of:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ec(),streams:f,sessionIds:n?Hg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},fe:m}}function Xs(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
793
- function Ys(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 Ws(a,b,c,d){b.expiration=c.ec();c=Hg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Xs(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return ct(this,dt(this,a))};
794
- function dt(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Os();c=ps(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Wr;ua(k);return u(k,e.init(),4);case 4:return u(k,$r(e,d.Aa(),d.ka()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([et(a,h,e),ft(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
795
- function gt(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function et(a,b,c){return K(function(d){return u(d,ht(a.g,a.h.drm,c,b),0)})}
796
- function ft(a,b,c){function d(){}var e=it(c);Fs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.bg=function(){return ct(this,jt(this))};
797
- function jt(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return Os(),b=a.g,c=a.h.drm,d=new Wr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],as(d,function(p){return f.push(p)}),g=t(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,As(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 wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
798
- r.list=function(){return ct(this,kt())};function kt(){var a,b,c;return K(function(d){switch(d.g){case 1:return Os(),a=[],b=new Wr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Zr(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Fs(new os("manifest",e.Aa,e.ka,l),k);a.push(m)});A(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
799
- function Ps(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){}},c.configure(d.manifest),
800
- Qs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Qs(a),k=lt(h),u(l,Promise.all(tf(k,function(m){return m.createSegmentIndex()})),3);Qs(a);if(e)throw e;return l["return"](h)})}
801
- function Rs(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new ig({kb:a.g,onError:c,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,ng(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Bg(e),3);case 3:return u(f,Ag(e),4);case 4:return f["return"](e)}})}
802
- function bt(a,b,c,d){var e=new Map,f=lt(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=mt(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),fe:Array.from(e.values())}}
803
- function mt(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,
804
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;nt(d,c.presentationTimeline.Oa(),function(l){var m=Br(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Js(b,d.id)*p;p=Er(a.g,p);f.set(m,new Ar(l,p,k,!1))}l.i&&(n=Br(l.i),f.has(n)||(p=.5*Js(b,d.id),p=Er(a.g,p),f.set(n,new Ar(l.i,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,
805
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function nt(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 Qs(a){if(a.l.g)throw new N(2,9,7001);}function Os(){if(!Ls())throw new N(2,9,9E3);}function ct(a,b){return K(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);wa(c);eb(a.i,b);return xa(c,0)})}
806
- function Ns(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function it(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
807
- function ht(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=bs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:gt(d,!1),videoCapabilities:gt(d,!0)}});return u(h,As(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)})}
808
- function lt(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
809
- function $s(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",Ks);Ks.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Wr,ua(b),u(b,cs(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Ks.prototype.list=Ks.prototype.list;
810
- Ks.prototype.removeEmeSessions=Ks.prototype.bg;Ks.prototype.remove=Ks.prototype.remove;Ks.prototype.store=Ks.prototype.store;Ks.prototype.getNetworkingEngine=Ks.prototype.fc;Ks.prototype.getConfiguration=Ks.prototype.getConfiguration;Ks.prototype.configure=Ks.prototype.configure;Ks.prototype.destroy=Ks.prototype.destroy;Ks.support=Ls;
811
- var at=(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");
812
- Om.offline=Ls;function ot(){}function pt(a,b){for(var c={priority:b||0,$e:a},d=0;d<qt.length;d++)if(qt[d].priority<c.priority){qt.splice(d,0,c);return}qt.push(c)}M("shaka.polyfill",ot);ot.register=pt;ot.installAll=function(){for(var a=t(qt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.$e()}catch(c){Va("Error installing polyfill!",c)}}};var qt=[];function rt(){}function st(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())tt(b.value)}function tt(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)}})}ot.Aria=rt;rt.install=st;pt(st);function ut(){}function vt(){wt()}ot.EncryptionScheme=ut;ut.install=vt;pt(vt,-2);function xt(){}
813
- function yt(){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}}),
814
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",zt);document.addEventListener("webkitfullscreenerror",zt);document.addEventListener("mozfullscreenchange",zt);document.addEventListener("mozfullscreenerror",zt);document.addEventListener("MSFullscreenChange",zt);document.addEventListener("MSFullscreenError",zt)}}
815
- function zt(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)}ot.Fullscreen=xt;xt.install=yt;pt(yt);function At(){}function Bt(){var a=!0;if(vc()||sc("PlayStation 5")||wc()||sc("Web0S")||tc()||sc("CrKey")||sc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Ct=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Dt)}
816
- function Dt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!oc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=pc(g),!h)||a.audio&&(k=a.audio.contentType,
817
- l=pc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
818
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);C(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}ot.MediaCapabilities=At;At.install=Bt;var Ct=null;At.originalMcap=Ct;pt(Bt,-1);function Et(){}function Ft(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Gt():a?12>=a?(Ht(),It()):Ht():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&Jt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Kt()}
819
- function Ht(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function It(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Jt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=$c(b)[0]&&a(b)}}
820
- function Gt(){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)}}
821
- function Kt(){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)})}ot.MediaSource=Et;Et.install=Ft;pt(Ft);function Lt(){}function Mt(){screen.orientation||void 0!=window.orientation&&Nt()}function Nt(){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 Ot;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new R("change");b.dispatchEvent(c)})}ot.Orientation=Lt;
822
- Lt.install=Mt;function Ot(){We.call(this);this.type="";this.angle=0}pa(Ot,We);
823
- Ot.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)};
824
- Ot.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};pt(Mt);function Pt(){}function Qt(a,b){try{var c=new Rt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function St(a){var b=this.mediaKeys;b&&b!=a&&Tt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Tt(a,this):Promise.resolve()}function Ut(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}
825
- ot.PatchedMediaKeysApple=Pt;Pt.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=St,window.MediaKeys=Vt,window.MediaKeySystemAccess=Rt,navigator.requestMediaKeySystemAccess=Qt,window.shakaMediaKeysPolyfill=!0)};
826
- function Rt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
798
+ function Ms(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
799
+ b.next())for(e=e.value,g=Ns(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ns(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
800
+ function Ns(a,b,c){var d=b.segments.map(function(e){return Os(a,e)});c.Hb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Bj(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,
801
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Os(a,b){var c=new Is("segment",a.h,a.g,b.dataKey);return new ki(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Ps(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
802
+ function Ps(a,b){var c=new Is("segment",a.h,a.g,b);return new ii(function(){return[c.toString()]},0,null)};function Qs(){this.g=null}r=Qs.prototype;r.configure=function(){};
803
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return G(function(m){switch(m.g){case 1:d=Js(a);c.g=d;if(null==d||"manifest"!=d.g)throw new O(2,1,9004,a);e=new ps;xa(m);return u(m,e.init(),4);case 4:return u(m,ts(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 Ks(d.za(),d.ja()),l=Ls(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return Ba(m),u(m,e.destroy(),7);case 7:Ca(m,0)}})};r.stop=function(){return Promise.resolve()};
804
+ r.update=function(){};
805
+ r.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 ps,D(m,2,3),u(m,e.init(),5);case 5:return u(m,ts(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 Ba(m),u(m,e.destroy(),10);case 10:Ca(m,0);break;case 2:Aa(m),m.A(3)}})};
806
+ Og["application/x-offline-manifest"]=function(){return new Qs};function Rs(){}function Ss(a){var b=Js(a);b&&"manifest"==b.g?(a={uri:a,Ne:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ke(a)):a=b&&"segment"==b.g?Ts(b.key(),b):Ie(new O(2,1,9004,a));return a}
807
+ function Ts(a,b){var c=new ps;return Ke(void 0).Y(function(){return c.init()}).Y(function(){return ts(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()})}L("shaka.offline.OfflineScheme",Rs);Rs.plugin=Ss;We("offline",Ss);function Us(a,b,c){var d,e,f,g,h,k;return G(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,Vs(y.info,p)){y.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Ws(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)}})}
808
+ function Ws(a,b,c){var d,e;return G(function(f){switch(f.g){case 1:return d=new ag({lb:b,onError:function(){},cd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),D(f,2),d.configure(a),u(f,ig(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:za(f,3);break;case 2:return Aa(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return D(f,6),u(f,tg(d),8);case 8:za(f,7);break;case 6:return Aa(f),u(f,d.destroy(),
809
+ 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,ug(d,g),4);if(2!=h.g)return e.push(g),za(h,0);Aa(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
810
+ function Vs(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function Xs(a,b,c){var d=b.presentationTimeline.getDuration();b=Ys(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Zs(a,b){var c=Ls(new Ks(a.za(),a.ja()),b),d=b.appMetadata||{};c=Ys(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}}
811
+ function Ys(a){var b=[],c=ee(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Wd(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Xd(c.value));return b};function $s(){this.g={}}function at(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 bt(a,b){a.g[b.id]=b.bandwidth||2048}function ct(a,b){var c=a.g[b];null==c&&(c=0);return c};function dt(a){var b=this;if(a&&a.constructor!=U)throw new O(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.ic()):(this.h=ql(),this.g=new Ve);this.i=[];this.j=[];var c=!a;this.l=new ff(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 $r(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
812
+ case 4:b.h=null,b.g=null,A(k)}})})}function et(){if(kc())a:{var a=t(qs.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}r=dt.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=nl(a,b));return sl(this.h,a)};r.getConfiguration=function(){var a=ql();sl(a,this.h,ql());return a};r.ic=function(){return this.g};
813
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Zr(this.g);this.j.push(f);b=ft(this,a,b||{},function(){var g;return G(function(h){if(1==h.g)return u(h,Ng(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new He(b,function(){return $r(f)});b["finally"](function(){eb(d.j,f)});return gt(this,b)};
814
+ function ft(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,C,z;return G(function(B){switch(B.g){case 1:return ht(),h=g=null,k=new ps,n=m=l=null,D(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,it(a,b,g,e),6);case 6:p=B.h;jt(a);q=!p.presentationTimeline.U()&&!p.presentationTimeline.kb();if(!q)throw new O(2,9,9005,b);return u(B,kt(a,p,function(E){n=n||E},e),7);case 7:h=B.h;jt(a);if(n)throw n;return u(B,lt(p,e),8);case 8:return u(B,k.init(),9);case 9:return jt(a),u(B,rs(k),10);case 10:return l=B.h,jt(a),v=mt(h,
815
+ p,b,c,e,f),y=v.$f,x=v.ne,u(B,l.ja.addManifests([y]),11);case 11:w=B.h;jt(a);m=w[0];jt(a);if(n)throw n;return u(B,nt(a,x,m,y,f,e,l.ja,p,h),12);case 12:return jt(a),C=new Is("manifest",l.path.za,l.path.ja,m),B["return"](Zs(C,y));case 3:return Ba(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:Ca(B,0);break;case 2:z=Aa(B);if(null==m){B.A(18);break}return u(B,ot(m),18);case 18:throw n||z;}})}
816
+ function nt(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x,w,C;return G(function(z){switch(z.g){case 1:l={};m=0;n=function(B,E){var F,H,I,J,M,P,K;return G(function(Y){if(1==Y.g){F={};H=t(B);for(I=H.next();!I.done;F={eb:F.eb},I=H.next())F.eb=I.value,J=Wr(F.eb,f),M=F.eb.i,P=F.eb.h,K=function(ba){return function(sa){var va,ka,na;return G(function(R){if(1==R.g)return u(R,g.addSegments([{data:sa}]),2);va=R.h;jt(a);ka=ba.eb.g;na=Vr(ka);l[na]=va[0];m+=sa.byteLength;A(R)})}}(F),bs(e,F.eb.groupId,J,M,P,K);return u(Y,
817
+ ds(e),2)}if(!E)return Y.A(0);jt(a);pt(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};p=!1;D(z,2);if(!qt(h)||!p||rt(h)){z.A(4);break}return u(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return jt(a),b=b.filter(function(B){return!B.h}),q=l,v=m,l={},m=0,u(z,st(g,c,d,q,v,function(){return jt(a)}),6);case 6:jt(a);case 4:if(p){z.A(7);break}return u(z,n(b,!1),8);case 8:return jt(a),y=l,x=m,l={},m=0,u(z,st(g,c,d,y,x,function(){return jt(a)}),9);case 9:jt(a);case 7:za(z,0);break;case 2:return w=Aa(z),
818
+ C=Object.values(l),u(z,g.removeSegments(C,function(){}),10);case 10:throw w;}})}function ot(a){var b,c,d,e;return G(function(f){switch(f.g){case 1:return b=new ps,u(f,b.init(),2);case 2:return u(f,rs(b),3);case 3:return c=f.h,d=new Is("manifest",c.path.za,c.path.ja,a),u(f,b.destroy(),4);case 4:return e=new dt,u(f,e.remove(d.toString()),0)}})}
819
+ function st(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x;return G(function(w){switch(w.g){case 1:g=!1;D(w,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
820
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();za(w,0);break;case 2:return y=Aa(w),u(w,ot(b),5);case 5:if(g){w.A(6);break}x=Object.values(d);return u(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
821
+ function lt(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,C,z,B,E,F,H,I,J,M,P,K,Y,ba;return G(function(sa){switch(sa.g){case 1:return c={width:Infinity,height:Infinity},Fd(a,b.restrictions,c),u(sa,Jd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;td(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(Wd(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
822
+ d.push(Xd(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(Yd(x));return u(sa,b.offline.trackSelectionCallback(d),3);case 3:w=sa.h;C=a.presentationTimeline.getDuration();z=0;B=t(w);for(E=B.next();!E.done;E=B.next())F=E.value,H=F.bandwidth*C/8,z+=H;D(sa,4);return u(sa,b.offline.downloadSizeCallback(z),6);case 6:I=sa.h;if(!I)throw new O(2,9,9014);za(sa,5);break;case 4:J=Aa(sa);if(J instanceof O)throw J;throw new O(2,9,9015);case 5:M=new Set;P=new Set;K=new Set;Y=t(w);for(E=
823
+ Y.next();!E.done;E=Y.next())ba=E.value,"variant"==ba.type&&M.add(ba.id),"text"==ba.type&&P.add(ba.id),"image"==ba.type&&K.add(ba.id);a.variants=a.variants.filter(function(va){return M.has(va.id)});a.textStreams=a.textStreams.filter(function(va){return P.has(va.id)});a.imageStreams=a.imageStreams.filter(function(va){return K.has(va.id)});tt(a);A(sa)}})}
824
+ function mt(a,b,c,d,e,f){var g=Xs(c,b,d),h=e.offline.progressCallback;as(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&qg(a,"cenc",q)});var k=qt(b)&&!rt(b),l=null;k&&(l=ut.get(a.g.keySystem));for(var m=new $s,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())bt(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())at(m,n.value);m=vt(f,m,b,e);f=m.streams;m=m.ne;p=a.g;n=e.offline.usePersistentLicense;
825
+ p&&n&&(p.initData=[]);return{$f:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.hc(),streams:f,sessionIds:n?zg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ne:m}}function qt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
826
+ function rt(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 pt(a,b,c,d){b.expiration=c.hc();c=zg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(qt(a)&&d.offline.usePersistentLicense&&!c.length)throw new O(2,9,9007);}r.remove=function(a){return wt(this,xt(this,a))};
827
+ function xt(a,b){var c,d,e,f,g,h;return G(function(k){switch(k.g){case 1:ht();c=Js(b);if(null==c||"manifest"!=c.g)throw new O(2,9,9004,b);d=c;e=new ps;xa(k);return u(k,e.init(),4);case 4:return u(k,ts(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([yt(a,h,e),zt(f,d,h)]),2);case 2:return Ba(k),u(k,e.destroy(),8);case 8:Ca(k,0)}})}
828
+ function At(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Uc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Uc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function yt(a,b,c){return G(function(d){return u(d,Bt(a.g,a.h.drm,c,b),0)})}
829
+ function zt(a,b,c){function d(){}var e=Ct(c);Zs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.og=function(){return wt(this,Dt(this))};
830
+ function Dt(a){var b,c,d,e,f,g,h,k,l,m;return G(function(n){switch(n.g){case 1:return ht(),b=a.g,c=a.h.drm,d=new ps,e=!1,xa(n),u(n,d.init(),4);case 4:f=[],us(d,function(p){return f.push(p)}),g=t(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,Us(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 Ba(n),u(n,d.destroy(),11);case 11:Ca(n,3);break;case 3:return n["return"](!e)}})}
831
+ r.list=function(){return wt(this,Et())};function Et(){var a,b,c;return G(function(d){switch(d.g){case 1:return ht(),a=[],b=new ps,xa(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),ss(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){var m=Zs(new Is("manifest",e.za,e.ja,l),k);a.push(m)});A(h)})})}),u(d,c,2);case 2:return Ba(d),u(d,b.destroy(),6);case 6:Ca(d,3);break;case 3:return d["return"](a)}})}
832
+ function it(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(){}},
833
+ c.configure(d.manifest),jt(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,jt(a),k=Ft(h),u(l,Promise.all(nf(k,function(m){return m.createSegmentIndex()})),3);jt(a);if(e)throw e;return l["return"](h)})}
834
+ function kt(a,b,c,d){var e;return G(function(f){switch(f.g){case 1:return e=new ag({lb:a.g,onError:c,cd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,fg(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,tg(e),3);case 3:return u(f,sg(e),4);case 4:return f["return"](e)}})}
835
+ function vt(a,b,c,d){var e=new Map,f=Ft(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=Gt(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ne:Array.from(e.values())}}
836
+ function Gt(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,
837
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;Ht(d,c.presentationTimeline.Oa(),function(l){var m=Vr(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=ct(b,d.id)*p;p=Yr(a.g,p);f.set(m,new Ur(l,p,k,!1))}l.h&&(n=Vr(l.h),f.has(n)||(p=.5*ct(b,d.id),p=Yr(a.g,p),f.set(n,new Ur(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,
838
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function Ht(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 jt(a){if(a.l.g)throw new O(2,9,7001);}function ht(){if(!et())throw new O(2,9,9E3);}function wt(a,b){return G(function(c){if(1==c.g)return a.i.push(b),xa(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);Ba(c);eb(a.i,b);return Ca(c,0)})}
839
+ function gt(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function Ct(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
840
+ function Bt(a,b,c,d){var e,f,g;return G(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=vs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:At(d,!1),videoCapabilities:At(d,!0)}});return u(h,Us(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)})}
841
+ function Ft(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
842
+ function tt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}L("shaka.offline.Storage",dt);dt.deleteAll=function(){var a;return G(function(b){return 1==b.g?(a=new ps,xa(b),u(b,ws(a),2)):5!=b.g?(Ba(b),u(b,a.destroy(),5)):Ca(b,0)})};dt.prototype.list=dt.prototype.list;
843
+ dt.prototype.removeEmeSessions=dt.prototype.og;dt.prototype.remove=dt.prototype.remove;dt.prototype.store=dt.prototype.store;dt.prototype.getNetworkingEngine=dt.prototype.ic;dt.prototype.getConfiguration=dt.prototype.getConfiguration;dt.prototype.configure=dt.prototype.configure;dt.prototype.destroy=dt.prototype.destroy;dt.support=et;
844
+ var ut=(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");
845
+ cn.offline=et;function It(){}function Jt(a,b){for(var c={priority:b||0,lf:a},d=0;d<Kt.length;d++)if(Kt[d].priority<c.priority){Kt.splice(d,0,c);return}Kt.push(c)}L("shaka.polyfill",It);It.register=Jt;It.installAll=function(){for(var a=t(Kt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.lf()}catch(c){Va("Error installing polyfill!",c)}}};var Kt=[];function Lt(){}function Mt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Nt(b.value)}function Nt(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)}})}It.Aria=Lt;Lt.install=Mt;Jt(Mt);function Ot(){}function Pt(){Qt()}It.EncryptionScheme=Ot;Ot.install=Pt;Jt(Pt,-2);function Rt(){}
846
+ function St(){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}}),
847
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Tt);document.addEventListener("webkitfullscreenerror",Tt);document.addEventListener("mozfullscreenchange",Tt);document.addEventListener("mozfullscreenerror",Tt);document.addEventListener("MSFullscreenChange",Tt);document.addEventListener("MSFullscreenError",Tt)}}
848
+ function Tt(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)}It.Fullscreen=Rt;Rt.install=St;Jt(St);function Ut(){}function Vt(){var a=!0;if(rc()||oc("PlayStation 5")||sc()||oc("Web0S")||pc()||oc("CrKey")||oc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Wt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Xt)}
849
+ function Xt(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return G(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!kc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=lc(g),!h)||a.audio&&(k=a.audio.contentType,
850
+ l=lc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;n=[];p=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
851
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);D(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;za(w,4);break;case 3:Aa(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}It.MediaCapabilities=Ut;Ut.install=Vt;var Wt=null;Ut.originalMcap=Wt;Jt(Vt,-1);function Yt(){}function Zt(){var a=tc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?$t():a?12>=a?(au(),bu()):au():(oc("Tizen 2")||oc("Tizen 3")||oc("Tizen 4"))&&cu());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&du()}
852
+ function au(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ja.apply(0,arguments));b.abort=function(){};return b}}function bu(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function cu(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=Xc(b)[0]&&a(b)}}
853
+ function $t(){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)}}
854
+ function du(){var a=MediaSource.isTypeSupported;oc("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)})}It.MediaSource=Yt;Yt.install=Zt;Jt(Zt);function eu(){}function fu(){screen.orientation||void 0!=window.orientation&&gu()}function gu(){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 hu;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}It.Orientation=eu;
855
+ eu.install=fu;function hu(){Qe.call(this);this.type="";this.angle=0}ra(hu,Qe);
856
+ hu.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)};
857
+ hu.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Jt(fu);function 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()}function nu(a){a=N(a.initData);if(Hb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=yc(a.subarray(4),!0);a=Bc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Fb(a);this.dispatchEvent(b)}
858
+ It.PatchedMediaKeysApple=iu;iu.uninstall=function(){this.g&&(this.g=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",this.h),HTMLMediaElement.prototype.setMediaKeys=this.i,window.MediaKeys=this.m,window.MediaKeySystemAccess=this.l,navigator.requestMediaKeySystemAccess=this.j,this.h=this.j=this.i=this.l=this.m=null,window.shakaMediaKeysPolyfill=!1)};
859
+ iu.install=function(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)this.g=!0,this.h=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),this.i=HTMLMediaElement.prototype.setMediaKeys,this.m=window.MediaKeys,this.l=window.MediaKeySystemAccess,this.j=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=lu;window.MediaKeys=ou;window.MediaKeySystemAccess=
860
+ ku;navigator.requestMediaKeySystemAccess=ju;window.shakaMediaKeysPolyfill=!0}};
861
+ function ku(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
827
862
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
828
- Rt.prototype.createMediaKeys=function(){var a=new Vt(this.keySystem);return Promise.resolve(a)};Rt.prototype.getConfiguration=function(){return this.g};function Vt(a){this.h=new WebKitMediaKeys(a);this.g=new of}Vt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Wt(this.h,a)};Vt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
829
- function Tt(a,b){a.g.mb();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",Ut);try{return bj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Wt(a){We.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new Xt}pa(Wt,We);r=Wt.prototype;
830
- r.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Cb()?"license-request":"license-renewal").set("message",Gb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(Yt(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
831
- 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:Yt(c,"output-not-allowed");break;default:Yt(c,"internal-error")}});Yt(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
832
- r.update=function(a){this.g=new lc;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.mb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Yt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
833
- function Xt(){this.size=0;this.g=void 0}r=Xt.prototype;r.Cb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Tg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};function Zt(){}function $t(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=au,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=bu,window.MediaKeys=cu,window.MediaKeySystemAccess=du,window.shakaMediaKeysPolyfill=!0)}function au(){return Promise.reject(Error("The key system specified is not supported."))}
834
- function bu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}ot.PatchedMediaKeysNop=Zt;Zt.install=$t;function cu(){throw new TypeError("Illegal constructor.");}cu.prototype.createSession=function(){};cu.prototype.setServerCertificate=function(){};function du(){this.keySystem="";throw new TypeError("Illegal constructor.");}du.prototype.getConfiguration=function(){};du.prototype.createMediaKeys=function(){};pt($t,-10);function eu(){}
835
- function fu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)gu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=hu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=iu;window.MediaKeys=ju;window.MediaKeySystemAccess=ku;window.shakaMediaKeysPolyfill=!0}}
836
- function lu(a){var b=gu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function hu(a,b){try{var c=new ku(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function iu(a){var b=this.mediaKeys;b&&b!=a&&mu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&mu(a,this);return Promise.resolve()}ot.PatchedMediaKeysWebkit=eu;eu.install=fu;
837
- function ku(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
863
+ 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 hf}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)};
864
+ function mu(a,b){a.g.nb();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",nu);try{return lj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function pu(a){Qe.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new hf;this.sessionId="";this.expiration=NaN;this.closed=new hc;this.keyStatuses=new qu}ra(pu,Qe);r=pu.prototype;
865
+ r.generateRequest=function(a,b){var c=this;this.h=new hc;try{var d=this.l.createSession("video/mp4",N(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Db()?"license-request":"license-renewal").set("message",Fb(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",
866
+ 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};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
867
+ r.update=function(a){this.g=new hc;try{this.i.update(N(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.nb()}catch(a){this.closed.reject(a)}return this.closed};r.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;c=new S("keystatuseschange");a.dispatchEvent(c)}
868
+ function qu(){this.size=0;this.g=void 0}r=qu.prototype;r.Db=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Lg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Lg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.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."))}
869
+ function vu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}It.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(){};Jt(tu,-10);function yu(){}
870
+ function zu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Au="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Bu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Cu;window.MediaKeys=Du;window.MediaKeySystemAccess=Eu;window.shakaMediaKeysPolyfill=!0}}
871
+ function Fu(a){var b=Au;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Bu(a,b){try{var c=new Eu(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Cu(a){var b=this.mediaKeys;b&&b!=a&&Gu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Gu(a,this);return Promise.resolve()}It.PatchedMediaKeysWebkit=yu;yu.install=zu;
872
+ function Eu(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
838
873
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
839
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}ku.prototype.createMediaKeys=function(){var a=new ju(this.g);return Promise.resolve(a)};ku.prototype.getConfiguration=function(){return this.h};function ju(a){this.l=a;this.h=null;this.g=new of;this.i=[];this.j=new Map}
840
- function mu(a,b){a.h=b;a.g.mb();var c=gu;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=nu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Cb()?"licenserequest":"licenserenewal").set("message",d.message),d=new R("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=nu(a,d.sessionId))ou(d,"usable"),
841
- d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=nu(a,d.sessionId);e&&e.handleError(d)}))}ju.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 pu(b,this.l,a);this.i.push(a);return a};ju.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
842
- function nu(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 pu(a,b,c){We.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 qu}pa(pu,We);r=pu.prototype;
843
- r.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?ou(this,"output-restricted"):1==b?ou(this,"expired"):ou(this,"internal-error"))};
844
- function ru(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Fb(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Qc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new lc;var f=lu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).P(.01)}return a.h}
845
- function su(a,b,c){if(a.g)a.g.then(function(){return su(a,b,c)})["catch"](function(){return su(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Bc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Nc(e.keys[0].k);e=Nc(e.keys[0].kid)}else d=Fb(c),e=null;var f=lu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
846
- function ou(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return ru(this,b,null)};r.load=function(a){return"persistent-license"==this.l?ru(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new lc;su(this,b,a);return b};
847
- r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=lu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function qu(){this.size=0;this.g=void 0}r=qu.prototype;r.Cb=function(){return this.g};
848
- r.forEach=function(a){this.g&&a(this.g,Tg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var gu="";pt(fu);function tu(){}function uu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=vu,Object.defineProperty(a,"disablePictureInPicture",{get:wu,set:xu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=yu,document.addEventListener("webkitpresentationmodechanged",zu,!0))}}
849
- function zu(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)}
850
- function vu(){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 yu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
851
- function wu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function xu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}ot.PiPWebkit=tu;tu.install=uu;pt(uu);function Au(){}function Bu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Cu))}function Cu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}ot.RandomUUID=Au;Au.install=Bu;pt(Bu);function Du(){}function Eu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Fu)}function Fu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}ot.StorageEstimate=Du;Du.install=Eu;pt(Eu);function Gu(){}function Hu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Iu})}function Iu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}ot.Symbol=Gu;Gu.install=Hu;pt(Hu);function Ju(){}function Ku(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}ot.VideoPlayPromise=Ju;Ju.install=Ku;pt(Ku);function Lu(){}function Mu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||uc())&&(a.getVideoPlaybackQuality=Nu)}}function Nu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}ot.VideoPlaybackQuality=Lu;Lu.install=Mu;pt(Mu);function Ou(){}function Pu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Qu;else if(6==b)a=Ru;else{try{var c=!!Qu(1,2,"")}catch(d){c=!1}c&&(a=Qu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Qu(a,b,c){return new window.TextTrackCue(a,b,c)}function Ru(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}ot.VTTCue=Ou;Ou.install=Pu;pt(Pu);function Su(){}Su.prototype.parseInit=function(){};Su.prototype.setSequenceMode=function(){};Su.prototype.parseMedia=function(a,b){var c=null,d=[],e=Bc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Tu.exec(f))){var g=Uu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new hb(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",Su);Su.prototype.parseMedia=Su.prototype.parseMedia;
852
- Su.prototype.setSequenceMode=Su.prototype.setSequenceMode;Su.prototype.parseInit=Su.prototype.parseInit;var Tu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Uu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;dd["application/x-subtitle-lrc"]=function(){return new Su};function Vu(){}Vu.prototype.parseInit=function(){};Vu.prototype.setSequenceMode=function(){};
853
- Vu.prototype.parseMedia=function(a,b){var c=Bc(a),d=[];if(""==c)return d;var e=fg(c,"tt");if(!e)throw new N(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=Uf(e,Wu,"frameRate"),g=Uf(e,Wu,"subFrameRate"),h=Uf(e,Wu,"frameRateMultiplier"),k=Uf(e,Wu,"tickRate"),l=Uf(e,Wu,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Uf(e,Xu,"extent");if("default"!=m&&"preserve"!=m)throw new N(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Yu(f,g,
854
- h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Sf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new jb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;n&&(x=Zu.exec(n)||$u.exec(n));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=av(v,h,"extent"))w=(D=Zu.exec(w))||$u.exec(w),
855
- null!=w&&(q.width=Number(w[1]),q.height=Number(w[2]),D||(null!=y&&(q.width=100*q.width/y),null!=x&&(q.height=100*q.height/x)),q.widthUnits=D||null!=y?Ab:0,q.heightUnits=D||null!=x?Ab:0);if(v=av(v,h,"origin"))w=(D=Zu.exec(v))||$u.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=Number(w[2]),D||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=D||null!=y?Ab:0)}else q=null;q&&k.push(q)}if(Pf(c,"p").length)throw new N(2,
856
- 2,2001,"<p> can only be inside <div> in TTML");n=t(Pf(c,"div"));for(p=n.next();!p.done;p=n.next())if(Pf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(c=bv(c,b.periodStart,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
857
- function bv(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 q=null,v=t(cv),y=v.next();!y.done&&!(q=dv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)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});
858
- a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=bv(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=ev(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=fv(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(x=Infinity,w=0,b=t(a),
859
- c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new hb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=dv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
860
- (g=dv(l,"region",f,"")[0]);gv(b,p,g,q,e,v,0==a.length);return b}
861
- function gv(a,b,c,d,e,f,g){f=f||g;"rtl"==hv(b,c,e,"direction",f)&&(a.direction="rtl");g=hv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=ib);(g=hv(b,c,e,"textAlign",!0))?(a.positionAlign=iv[g],a.lineAlign=jv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;if(g=hv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=hv(b,c,e,"color",f))a.color=g;if(g=hv(b,c,e,"backgroundColor",
862
- f))a.backgroundColor=g;if(g=hv(b,c,e,"border",f))a.border=g;if(g=hv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=hv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=hv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=hv(b,c,e,"lineHeight",f))&&g.match(kv)&&(a.lineHeight=g);(g=hv(b,c,e,"fontSize",f))&&(g.match(kv)||g.match(lv))&&(a.fontSize=g);if(g=hv(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
863
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=hv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(kv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(kv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=hv(b,c,e,"letterSpacing",f))&&d.match(kv)&&(a.letterSpacing=d);(d=hv(b,c,e,"linePadding",f))&&d.match(kv)&&(a.linePadding=d);if(f=hv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=av(c,e,"textDecoration"))&&mv(a,c);(b=
864
- nv(b,e,"textDecoration"))&&mv(a,b)}
865
- function mv(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
866
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function hv(a,b,c,d,e){e=void 0===e?!0:e;return(a=nv(a,c,d))?a:e?av(b,c,d):null}function av(a,b,c){if(!a)return null;var d=Uf(a,Xu,c);return d?d:ov(a,b,c)}function nv(a,b,c){var d=Uf(a,Xu,c);return d?d:ov(a,b,c)}
867
- function ov(a,b,c){a=dv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Tf(a[e],"urn:ebu:tt:style",c);f||(f=Uf(a[e],Xu,c));f||(f=nv(a[e],b,c));f&&(d=f)}return d}
868
- function dv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Tf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function fv(a,b,c,d){a=ev(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}}
869
- function ev(a,b){var c=pv(a.getAttribute("begin"),b),d=pv(a.getAttribute("end"),b),e=pv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
870
- function pv(a,b){var c=null;if(qv.test(a)){c=qv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(rv.test(a))c=sv(rv,a);else if(tv.test(a))c=sv(tv,a);else if(uv.test(a))c=uv.exec(a),c=Number(c[1])/b.frameRate;else if(vv.test(a))c=vv.exec(a),c=Number(c[1])/b.g;else if(wv.test(a))c=sv(wv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
871
- function sv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Vu);Vu.prototype.parseMedia=Vu.prototype.parseMedia;Vu.prototype.setSequenceMode=Vu.prototype.setSequenceMode;Vu.prototype.parseInit=Vu.prototype.parseInit;
872
- function Yu(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]))}
873
- var Zu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,lv=/^(\d{1,2}(?:\.\d+)?|100)%$/,kv=/^(\d+px|\d+em|\d*\.?\d+c)$/,$u=/^(\d+)px (\d+)px$/,qv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,rv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,tv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,uv=/^(\d*(?:\.\d*)?)f$/,vv=/^(\d*(?:\.\d*)?)t$/,wv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),jv={left:ob,center:"center",right:"end",start:ob,
874
- end:"end"},iv={left:"line-left",center:"center",right:"line-right"},Wu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Xu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],cv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];dd["application/ttml+xml"]=function(){return new Vu};function xv(){this.g=new Vu}xv.prototype.parseInit=function(a){var b=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};xv.prototype.setSequenceMode=function(){};xv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new Bf).box("mdat",If(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};
875
- M("shaka.text.Mp4TtmlParser",xv);xv.prototype.parseMedia=xv.prototype.parseMedia;xv.prototype.setSequenceMode=xv.prototype.setSequenceMode;xv.prototype.parseInit=xv.prototype.parseInit;dd['application/mp4; codecs="stpp"']=function(){return new xv};dd['application/mp4; codecs="stpp.ttml"']=function(){return new xv};dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new xv};dd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new xv};function yv(){this.g=!1}yv.prototype.parseInit=function(){};yv.prototype.setSequenceMode=function(a){this.g=a};
876
- yv.prototype.parseMedia=function(a,b){var c=Bc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=zv(new jq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+
877
- f/9E4-c}}f=[];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new jq(g);var h=new jb;mq(g);kq(g);for(var k=mq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
878
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");kq(g);k=mq(g)}f.push(h)}e=new Map;Av(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new hb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
879
- /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=rb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
880
- !0;m.opacity=parseFloat(v);break;case "text-shadow":n=!0;m.textShadow=v;break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new jq(h[0]);m=zv(k);q=lq(k,/[ \t]+--\x3e[ \t]+/g);n=zv(k);if(null==m||null==q||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),
881
- h.startTime=m,h.endTime=n,h.payload=""):h=new hb(m,n,"");Bv(p,h,e);kq(k);for(m=mq(k);m;)Cv(h,m,f),kq(k),m=mq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Av(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new hb(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new hb(0,0,""),e.backgroundColor=d,a.set(c,e)}
882
- function Bv(a,b,c){0===c.size&&Av(c);a=Dv(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(Ev)&&d.push(e),e=-1);d=t(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=fg("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=t(f);for(f=a.next();!f.done;f=a.next())Fv(f.value,b,d,c);b.nestedCues=
883
- d}else b.payload=a}function Dv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Gv(a,b){return a&&0<a.length?a:b}
884
- function Fv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Gv(h.backgroundColor,e.backgroundColor),e.color=Gv(h.color,e.color),e.fontFamily=Gv(h.fontFamily,e.fontFamily),e.fontSize=Gv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
885
- "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=zv(new jq(g)))e.startTime=g}}if(Wf(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Fv(a.value,e,c,d)}
886
- function Cv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
887
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Hv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=nb,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function Hv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
888
- function zv(a){a=lq(a,Ev);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",yv);yv.prototype.parseMedia=yv.prototype.parseMedia;yv.prototype.setSequenceMode=yv.prototype.setSequenceMode;yv.prototype.parseInit=yv.prototype.parseInit;var Ev=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;dd["text/vtt"]=function(){return new yv};dd['text/vtt; codecs="vtt"']=function(){return new yv};
889
- dd['text/vtt; codecs="wvtt"']=function(){return new yv};function Iv(){this.g=null}Iv.prototype.parseInit=function(a){var b=this,c=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).U("mdhd",function(d){d=hi(d.reader,d.version);b.g=d.timescale}).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};Iv.prototype.setSequenceMode=function(){};
890
- Iv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Bf).box("moof",Ff).box("traf",Ff).U("tfdt",function(B){g=!0;c=gi(B.reader,B.version).me}).U("tfhd",function(B){l=fi(B.reader,B.flags).se}).U("trun",function(B){h=!0;d=ii(B.reader,B.version,B.flags).Le}).box("mdat",If(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new yf(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Wd||l,y=q.ad?
891
- c+q.ad:m;m=y+(v||0);var x=0;do{var w=n.N();x+=w;var D=n.N(),z=null;"vttc"==Jf(D)?8<w&&(z=n.Za(w-8)):n.skip(w-8);v&&z&&(w=Jv(z,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(dc)};function Jv(a,b,c){var d,e,f;(new Bf).box("payl",If(function(g){d=Bc(g)})).box("iden",If(function(g){e=Bc(g)})).box("sttg",If(function(g){f=Bc(g)})).parse(a);return d?Kv(d,e,f,b,c):null}
892
- function Kv(a,b,c,d,e){d=new hb(d,e,"");Bv(a,d,new Map);b&&(d.id=b);if(c)for(a=new jq(c),b=mq(a);b;)Cv(d,b,[]),kq(a),b=mq(a);return d}M("shaka.text.Mp4VttParser",Iv);Iv.prototype.parseMedia=Iv.prototype.parseMedia;Iv.prototype.setSequenceMode=Iv.prototype.setSequenceMode;Iv.prototype.parseInit=Iv.prototype.parseInit;dd['application/mp4; codecs="wvtt"']=function(){return new Iv};function Lv(){}Lv.prototype.parseInit=function(){};Lv.prototype.setSequenceMode=function(){};Lv.prototype.parseMedia=function(a){var b=Bc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new jq(c[0]),e=Mv(d),f=lq(d,/,/g);d=Mv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new hb(e,d,c.slice(1).join("\n").trim()))}return a};
893
- function Mv(a){a=lq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",Lv);Lv.prototype.parseMedia=Lv.prototype.parseMedia;Lv.prototype.setSequenceMode=Lv.prototype.setSequenceMode;Lv.prototype.parseInit=Lv.prototype.parseInit;dd["text/x-subviewer"]=function(){return new Lv};function Nv(){this.g=new yv}Nv.prototype.parseInit=function(){};Nv.prototype.setSequenceMode=function(){};Nv.prototype.parseMedia=function(a,b){var c=Bc(a);c=Ov(c);c=Fb(Ic(c));return this.g.parseMedia(c,b)};function Ov(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",Nv);
894
- Nv.srt2webvtt=Ov;Nv.prototype.parseMedia=Nv.prototype.parseMedia;Nv.prototype.setSequenceMode=Nv.prototype.setSequenceMode;Nv.prototype.parseInit=Nv.prototype.parseInit;dd["text/srt"]=function(){return new Nv};function Pv(){}Pv.prototype.parseInit=function(){};Pv.prototype.setSequenceMode=function(){};
895
- Pv.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Qv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Rv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Sv);else if("Style"==e){e=f.split(Sv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
896
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={sd:e.sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Rv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Sv);else if("Dialogue"==f){g=g.split(Sv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Tv(f.Start);var k=Tv(f.End);g=new hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.sd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.sd}}(e)))&&Uv(g,f);d.push(g)}return d};
897
- function Uv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Vv(c))a.color=c;if(c=b.BackColour)if(c=Vv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=pb;a.textAlign="start";break;case 2:a.displayAlign=pb;a.textAlign=lb;break;case 3:a.displayAlign=pb;a.textAlign="end";
874
+ d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Eu.prototype.createMediaKeys=function(){var a=new Du(this.g);return Promise.resolve(a)};Eu.prototype.getConfiguration=function(){return this.h};function Du(a){this.l=a;this.h=null;this.g=new hf;this.i=[];this.j=new Map}
875
+ function Gu(a,b){a.h=b;a.g.nb();var c=Au;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Fb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=Hu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Db()?"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=Hu(a,d.sessionId))Iu(d,"usable"),
876
+ d.g&&d.g.resolve(),d.g=null}),a.g.C(b,c+"keyerror",function(d){var e=Hu(a,d.sessionId);e&&e.handleError(d)}))}Du.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new Ju(b,this.l,a);this.i.push(a);return a};Du.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
877
+ function Hu(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function Ju(a,b,c){Qe.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 hc;this.keyStatuses=new Ku}ra(Ju,Qe);r=Ju.prototype;
878
+ r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Iu(this,"output-restricted"):1==b?Iu(this,"expired"):Iu(this,"internal-error"))};
879
+ function Lu(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=N(Bc("LOAD_SESSION|"+c));else{var e=Bc("PERSISTENT|");d=Jc(e,b)}else d=N(b)}catch(g){return Promise.reject(g)}a.h=new hc;var f=Fu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new Q(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).O(.01)}return a.h}
880
+ function Mu(a,b,c){if(a.g)a.g.then(function(){return Mu(a,b,c)})["catch"](function(){return Mu(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=xc(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=Gc(e.keys[0].k);e=Gc(e.keys[0].kid)}else d=N(c),e=null;var f=Fu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
881
+ function Iu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new S("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return Lu(this,b,null)};r.load=function(a){return"persistent-license"==this.l?Lu(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new hc;Mu(this,b,a);return b};
882
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Fu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function Ku(){this.size=0;this.g=void 0}r=Ku.prototype;r.Db=function(){return this.g};
883
+ r.forEach=function(a){this.g&&a(this.g,Lg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Lg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var Au="";Jt(zu);function Nu(){}function Ou(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Pu,Object.defineProperty(a,"disablePictureInPicture",{get:Qu,set:Ru,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Su,document.addEventListener("webkitpresentationmodechanged",Tu,!0))}}
884
+ function Tu(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
885
+ function Pu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Su(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
886
+ function Qu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Ru(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}It.PiPWebkit=Nu;Nu.install=Ou;Jt(Ou);function Uu(){}function Vu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Wu))}function Wu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}It.RandomUUID=Uu;Uu.install=Vu;Jt(Vu);function Xu(){}function Yu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Zu)}function Zu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}It.StorageEstimate=Xu;Xu.install=Yu;Jt(Yu);function $u(){}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}It.Symbol=$u;$u.install=av;Jt(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}}}It.VideoPlayPromise=cv;cv.install=dv;Jt(dv);function ev(){}function fv(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||qc())&&(a.getVideoPlaybackQuality=gv)}}function gv(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}It.VideoPlaybackQuality=ev;ev.install=fv;Jt(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)}It.VTTCue=hv;hv.install=iv;Jt(iv);function lv(){}lv.prototype.parseInit=function(){};lv.prototype.setSequenceMode=function(){};lv.prototype.parseMedia=function(a,b){var c=null,d=[],e=xc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=mv.exec(f))){var g=nv.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new hb(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};L("shaka.text.LrcTextParser",lv);lv.prototype.parseMedia=lv.prototype.parseMedia;
887
+ 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})?)$/;ad["application/x-subtitle-lrc"]=function(){return new lv};function ov(){}ov.prototype.parseInit=function(){};ov.prototype.setSequenceMode=function(){};
888
+ ov.prototype.parseMedia=function(a,b){var c=xc(a),d=[];if(""==c)return d;var e=Yf(c,"tt");if(!e)throw new O(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=Mf(e,pv,"frameRate"),g=Mf(e,pv,"subFrameRate"),h=Mf(e,pv,"frameRateMultiplier"),k=Mf(e,pv,"tickRate"),l=Mf(e,pv,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Mf(e,qv,"extent");if("default"!=m&&"preserve"!=m)throw new O(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new rv(f,g,
889
+ h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Kf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new jb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;n&&(x=sv.exec(n)||tv.exec(n));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,C;if(w=uv(v,h,"extent"))w=(C=sv.exec(w))||tv.exec(w),
890
+ null!=w&&(q.width=Number(w[1]),q.height=Number(w[2]),C||(null!=y&&(q.width=100*q.width/y),null!=x&&(q.height=100*q.height/x)),q.widthUnits=C||null!=y?Ab:0,q.heightUnits=C||null!=x?Ab:0);if(v=uv(v,h,"origin"))w=(C=sv.exec(v))||tv.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=Number(w[2]),C||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=C||null!=y?Ab:0)}else q=null;q&&k.push(q)}if(Hf(c,"p").length)throw new O(2,
891
+ 2,2001,"<p> can only be inside <div> in TTML");n=t(Hf(c,"div"));for(p=n.next();!p.done;p=n.next())if(Hf(p.value,"span").length)throw new O(2,2,2001,"<span> can only be inside <p> in TTML");if(c=vv(c,b.periodStart,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
892
+ function vv(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 q=null,v=t(wv),y=v.next();!y.done&&!(q=xv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)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});
893
+ a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=vv(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var C=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(C||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=yv(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=zv(n,c,x,w),x=w.start,w=w.end,n=n.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!C&&0<a.length)for(x=Infinity,w=0,b=t(a),
894
+ c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==p.tagName)return e=new hb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=xv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
895
+ (g=xv(l,"region",f,"")[0]);Av(b,p,g,q,e,v,0==a.length);return b}
896
+ function Av(a,b,c,d,e,f,g){f=f||g;"rtl"==Bv(b,c,e,"direction",f)&&(a.direction="rtl");g=Bv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=ib);(g=Bv(b,c,e,"textAlign",!0))?(a.positionAlign=Cv[g],a.lineAlign=Dv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;if(g=Bv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=Bv(b,c,e,"color",f))a.color=g;if(g=Bv(b,c,e,"backgroundColor",
897
+ f))a.backgroundColor=g;if(g=Bv(b,c,e,"border",f))a.border=g;if(g=Bv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=Bv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=Bv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=Bv(b,c,e,"lineHeight",f))&&g.match(Ev)&&(a.lineHeight=g);(g=Bv(b,c,e,"fontSize",f))&&(g.match(Ev)||g.match(Fv))&&(a.fontSize=g);if(g=Bv(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
898
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=Bv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(Ev)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(Ev)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=Bv(b,c,e,"letterSpacing",f))&&d.match(Ev)&&(a.letterSpacing=d);(d=Bv(b,c,e,"linePadding",f))&&d.match(Ev)&&(a.linePadding=d);if(f=Bv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=uv(c,e,"textDecoration"))&&Gv(a,c);(b=
899
+ Hv(b,e,"textDecoration"))&&Gv(a,b)}
900
+ function Gv(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
901
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function Bv(a,b,c,d,e){e=void 0===e?!0:e;return(a=Hv(a,c,d))?a:e?uv(b,c,d):null}function uv(a,b,c){if(!a)return null;var d=Mf(a,qv,c);return d?d:Iv(a,b,c)}function Hv(a,b,c){var d=Mf(a,qv,c);return d?d:Iv(a,b,c)}
902
+ function Iv(a,b,c){a=xv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Lf(a[e],"urn:ebu:tt:style",c);f||(f=Mf(a[e],qv,c));f||(f=Hv(a[e],b,c));f&&(d=f)}return d}
903
+ 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?Lf(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function 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}}
904
+ function yv(a,b){var c=Jv(a.getAttribute("begin"),b),d=Jv(a.getAttribute("end"),b),e=Jv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
905
+ function Jv(a,b){var c=null;if(Kv.test(a)){c=Kv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(Lv.test(a))c=Mv(Lv,a);else if(Nv.test(a))c=Mv(Nv,a);else if(Ov.test(a))c=Ov.exec(a),c=Number(c[1])/b.frameRate;else if(Pv.test(a))c=Pv.exec(a),c=Number(c[1])/b.g;else if(Qv.test(a))c=Mv(Qv,a);else if(a)throw new O(2,2,2001,"Could not parse cue time range in TTML");return c}
906
+ function Mv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}L("shaka.text.TtmlTextParser",ov);ov.prototype.parseMedia=ov.prototype.parseMedia;ov.prototype.setSequenceMode=ov.prototype.setSequenceMode;ov.prototype.parseInit=ov.prototype.parseInit;
907
+ 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]))}
908
+ var sv=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Fv=/^(\d{1,2}(?:\.\d+)?|100)%$/,Ev=/^(\d+px|\d+em|\d*\.?\d+c)$/,tv=/^(\d+)px (\d+)px$/,Kv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Lv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Nv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Ov=/^(\d*(?:\.\d*)?)f$/,Pv=/^(\d*(?:\.\d*)?)t$/,Qv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Dv={left:pb,center:"center",right:"end",start:pb,
909
+ end:"end"},Cv={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"];ad["application/ttml+xml"]=function(){return new ov};function Rv(){this.g=new ov}Rv.prototype.parseInit=function(a){var b=!1;(new vf).box("moov",zf).box("trak",zf).box("mdia",zf).box("minf",zf).box("stbl",zf).T("stsd",Bf).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new O(2,2,2007);};Rv.prototype.setSequenceMode=function(){};Rv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new vf).box("mdat",Cf(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};
910
+ L("shaka.text.Mp4TtmlParser",Rv);Rv.prototype.parseMedia=Rv.prototype.parseMedia;Rv.prototype.setSequenceMode=Rv.prototype.setSequenceMode;Rv.prototype.parseInit=Rv.prototype.parseInit;ad['application/mp4; codecs="stpp"']=function(){return new Rv};ad['application/mp4; codecs="stpp.ttml"']=function(){return new Rv};ad['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Rv};ad['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Rv};function Sv(){this.g=!1}Sv.prototype.parseInit=function(){};Sv.prototype.setSequenceMode=function(a){this.g=a};
911
+ Sv.prototype.parseMedia=function(a,b){var c=xc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new O(2,2,2E3);c=b.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Tv(new yq(e[1]));if(null==c)throw new O(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+
912
+ f/9E4-c}}f=[];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new yq(g);var h=new jb;Bq(g);zq(g);for(var k=Bq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
913
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");zq(g);k=Bq(g)}f.push(h)}e=new Map;Uv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new hb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
914
+ /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=sb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
915
+ !0;m.opacity=parseFloat(v);break;case "text-shadow":n=!0;m.textShadow=v;break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new yq(h[0]);m=Tv(k);q=Aq(k,/[ \t]+--\x3e[ \t]+/g);n=Tv(k);if(null==m||null==q||null==n)throw new O(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=Vv(h.slice(1).join("\n").trim());e.has("global")?(h=e.get("global").clone(),
916
+ h.startTime=m,h.endTime=n,h.payload=""):h=new hb(m,n,"");Wv(p,h,e);zq(k);for(m=Bq(k);m;)Xv(h,m,f),zq(k),m=Bq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Uv(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new hb(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new hb(0,0,""),e.backgroundColor=d,a.set(c,e)}
917
+ function Wv(a,b,c){0===c.size&&Uv(c);a=Yv(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(Zv)&&d.push(e),e=-1);d=t(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=Yf("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=t(f);for(f=a.next();!f.done;f=a.next())$v(f.value,b,d,c);b.nestedCues=
918
+ d}else b.payload=a}function Yv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function aw(a,b){return a&&0<a.length?a:b}
919
+ function $v(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=aw(h.backgroundColor,e.backgroundColor),e.color=aw(h.color,e.color),e.fontFamily=aw(h.fontFamily,e.fontFamily),e.fontSize=aw(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
920
+ "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=Tv(new yq(g)))e.startTime=g}}if(Of(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())$v(a.value,e,c,d)}
921
+ function Xv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=lb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
922
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=bw(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function bw(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
923
+ function Tv(a){a=Aq(a,Zv);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 Vv(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},c=/&(?:amp|lt|gt|quot|#(0+)?39);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||"'"}):a||""}L("shaka.text.VttTextParser",Sv);Sv.prototype.parseMedia=Sv.prototype.parseMedia;Sv.prototype.setSequenceMode=Sv.prototype.setSequenceMode;
924
+ Sv.prototype.parseInit=Sv.prototype.parseInit;var Zv=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;ad["text/vtt"]=function(){return new Sv};ad['text/vtt; codecs="vtt"']=function(){return new Sv};ad['text/vtt; codecs="wvtt"']=function(){return new Sv};function cw(){this.g=null}cw.prototype.parseInit=function(a){var b=this,c=!1;(new vf).box("moov",zf).box("trak",zf).box("mdia",zf).T("mdhd",function(d){d=ai(d.reader,d.version);b.g=d.timescale}).box("minf",zf).box("stbl",zf).T("stsd",Bf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new O(2,2,2008);if(!c)throw new O(2,2,2008);};cw.prototype.setSequenceMode=function(){};
925
+ cw.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 vf).box("moof",zf).box("traf",zf).T("tfdt",function(B){g=!0;c=$h(B.reader,B.version).ue}).T("tfhd",function(B){l=Zh(B.reader,B.flags).Ae}).T("trun",function(B){h=!0;d=bi(B.reader,B.version,B.flags).Qe}).box("mdat",Cf(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new O(2,2,2008);for(var m=c,n=new sf(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.de||l,y=q.fd?
926
+ c+q.fd:m;m=y+(v||0);var x=0;do{var w=n.L();x+=w;var C=n.L(),z=null;"vttc"==Df(C)?8<w&&(z=n.$a(w-8)):n.skip(w-8);v&&z&&(w=dw(z,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter($b)};function dw(a,b,c){var d,e,f;(new vf).box("payl",Cf(function(g){d=xc(g)})).box("iden",Cf(function(g){e=xc(g)})).box("sttg",Cf(function(g){f=xc(g)})).parse(a);return d?ew(d,e,f,b,c):null}
927
+ function ew(a,b,c,d,e){d=new hb(d,e,"");Wv(a,d,new Map);b&&(d.id=b);if(c)for(a=new yq(c),b=Bq(a);b;)Xv(d,b,[]),zq(a),b=Bq(a);return d}L("shaka.text.Mp4VttParser",cw);cw.prototype.parseMedia=cw.prototype.parseMedia;cw.prototype.setSequenceMode=cw.prototype.setSequenceMode;cw.prototype.parseInit=cw.prototype.parseInit;ad['application/mp4; codecs="wvtt"']=function(){return new cw};function fw(){}fw.prototype.parseInit=function(){};fw.prototype.setSequenceMode=function(){};fw.prototype.parseMedia=function(a){var b=xc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new yq(c[0]),e=gw(d),f=Aq(d,/,/g);d=gw(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 hb(e,d,c.slice(1).join("\n").trim()))}return a};
928
+ function gw(a){a=Aq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}L("shaka.text.SbvTextParser",fw);fw.prototype.parseMedia=fw.prototype.parseMedia;fw.prototype.setSequenceMode=fw.prototype.setSequenceMode;fw.prototype.parseInit=fw.prototype.parseInit;ad["text/x-subviewer"]=function(){return new fw};function hw(){this.g=new Sv}hw.prototype.parseInit=function(){};hw.prototype.setSequenceMode=function(){};hw.prototype.parseMedia=function(a,b){var c=xc(a);c=iw(c);c=N(Bc(c));return this.g.parseMedia(c,b)};function iw(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}L("shaka.text.SrtTextParser",hw);
929
+ hw.srt2webvtt=iw;hw.prototype.parseMedia=hw.prototype.parseMedia;hw.prototype.setSequenceMode=hw.prototype.setSequenceMode;hw.prototype.parseInit=hw.prototype.parseInit;ad["text/srt"]=function(){return new hw};function jw(){}jw.prototype.parseInit=function(){};jw.prototype.setSequenceMode=function(){};
930
+ jw.prototype.parseMedia=function(a){var b="",c="";a=xc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=kw.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=lw.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(mw);else if("Style"==e){e=f.split(mw);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
931
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={wd:e.wd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=lw.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(mw);else if("Dialogue"==f){g=g.split(mw);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=nw(f.Start);var k=nw(f.End);g=new hb(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)))&&ow(g,f);d.push(g)}return d};
932
+ function ow(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=pw(c))a.color=c;if(c=b.BackColour)if(c=pw(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=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=lb;break;case 3:a.displayAlign=qb;a.textAlign="end";
898
933
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=lb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=lb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
899
- function Vv(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 Tv(a){a=Wv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Pv);Pv.prototype.parseMedia=Pv.prototype.parseMedia;Pv.prototype.setSequenceMode=Pv.prototype.setSequenceMode;Pv.prototype.parseInit=Pv.prototype.parseInit;
900
- var Qv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Rv=/^\s*([^:]+):\s*(.*)/,Sv=/\s*,\s*/,Wv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;dd["text/x-ssa"]=function(){return new Pv};function Xv(){}function Yv(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Jc(b,!0):e=b;a=Hc(a);a=Jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",Xv);
901
- Xv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Gb(Nc(c)))}};Xv.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Xv.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
902
- Xv.verimatrixFairPlayRequest=function(a,b){if(2===a){var c=Fb(b.body);c=Mc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Ic("spc="+c)}};Xv.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Yv(a,d,b)};
903
- Xv.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split(";").pop();return Yv(a,c,b)};Xv.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split("skd://").pop();return Yv(a,c,b)};Xv.initDataTransform=Yv;Xv.defaultGetContentId=function(a){a=Hc(a);return(new Nb(a)).Fa};
904
- Xv.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},C(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
934
+ function pw(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 nw(a){a=qw.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}L("shaka.text.SsaTextParser",jw);jw.prototype.parseMedia=jw.prototype.parseMedia;jw.prototype.setSequenceMode=jw.prototype.setSequenceMode;jw.prototype.parseInit=jw.prototype.parseInit;
935
+ var kw=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,lw=/^\s*([^:]+):\s*(.*)/,mw=/\s*,\s*/,qw=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ad["text/x-ssa"]=function(){return new jw};function rw(){}function sw(a,b,c){function d(h){Hb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(N(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new O(2,6,6015);var e;"string"==typeof b?e=Cc(b,!0):e=b;a=Ac(a);a=Cc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}L("shaka.util.FairPlayUtils",rw);
936
+ rw.commonFairPlayResponse=function(a,b){if(2===a){try{var c=xc(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Fb(Gc(c)))}};rw.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};rw.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
937
+ rw.verimatrixFairPlayRequest=function(a,b){if(2===a){var c=N(b.body);c=Fc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Bc("spc="+c)}};rw.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ac(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 sw(a,d,b)};
938
+ rw.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ac(a).split(";").pop();return sw(a,c,b)};rw.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ac(a).split("skd://").pop();return sw(a,c,b)};rw.initDataTransform=sw;rw.defaultGetContentId=function(a){a=Ac(a);return(new Jb(a)).Fa};
939
+ rw.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);Aa(b);return b["return"](!1)})};/*
905
940
  @license
906
941
  EME Encryption Scheme Polyfill
907
942
  Copyright 2019 Google LLC
908
943
  SPDX-License-Identifier: Apache-2.0
909
944
  */
910
- function Zv(){}var $v;function aw(){$v?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?($v=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=bw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
911
- function bw(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,$v.call(c,a,b),2);d=e.h;if(cw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=$v,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=dw;return e["return"](dw.call(c,
945
+ function tw(){}var uw;function vw(){uw?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(uw=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=ww):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
946
+ function ww(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,uw.call(c,a,b),2);d=e.h;if(xw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=uw,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=yw;return e["return"](yw.call(c,
912
947
  a,b))})}
913
- function dw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=ew(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=fw(h.videoCapabilities,d),l=fw(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."),
914
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,$v.call(c,a,e),2)}p=q.h;return q["return"](new gw(p,d))})}function fw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Zv);Zv.install=aw;function hw(){}var iw;
915
- function jw(){iw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(iw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=kw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
916
- function kw(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,iw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&cw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=iw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
917
- navigator.mediaCapabilities.decodingInfo=lw;if(d){f.A(3);break}e=c;return u(f,mw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](lw.call(b,a))}})}
918
- function lw(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=ew(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,iw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
919
- new gw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,mw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
920
- function mw(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
921
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}M("McEncryptionSchemePolyfill",hw);hw.install=jw;function gw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
922
- gw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};gw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
923
- function ew(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 cw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
924
- function nw(){}function wt(){aw();jw()}M("EncryptionSchemePolyfills",nw);nw.install=wt;"undefined"!==typeof module&&module.exports&&(module.exports=nw);}).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})();
948
+ function yw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return G(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=zw(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=Aw(h.videoCapabilities,d),l=Aw(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."),
949
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,uw.call(c,a,e),2)}p=q.h;return q["return"](new Bw(p,d))})}function Aw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}L("EmeEncryptionSchemePolyfill",tw);tw.install=vw;function Cw(){}var Dw;
950
+ function Ew(){Dw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(Dw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Fw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
951
+ function Fw(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,Dw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&xw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Dw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
952
+ navigator.mediaCapabilities.decodingInfo=Gw;if(d){f.A(3);break}e=c;return u(f,Hw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](Gw.call(b,a))}})}
953
+ function Gw(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=zw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,Dw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
954
+ new Bw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,Hw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
955
+ function Hw(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,
956
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}L("McEncryptionSchemePolyfill",Cw);Cw.install=Ew;function Bw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
957
+ Bw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};Bw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
958
+ function zw(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 xw(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}
959
+ function Iw(){}function Qt(){vw();Ew()}L("EncryptionSchemePolyfills",Iw);Iw.install=Qt;"undefined"!==typeof module&&module.exports&&(module.exports=Iw);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
925
960
 
926
961
  //# sourceMappingURL=shaka-player.compiled.map