shaka-player 2.5.4 → 2.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/.csslintrc +13 -0
  2. package/CHANGELOG.md +56 -0
  3. package/build/build.py +4 -1
  4. package/build/check.py +17 -0
  5. package/build/compiler.py +40 -0
  6. package/build/types/core +1 -0
  7. package/build/types/ui +4 -1
  8. package/demo/asset_card.js +41 -11
  9. package/demo/cast_receiver/receiver_app.css +19 -13
  10. package/demo/close_button.js +0 -6
  11. package/demo/common/asset.js +6 -1
  12. package/demo/common/assets.js +72 -14
  13. package/demo/demo.less +105 -16
  14. package/demo/index.html +8 -5
  15. package/demo/load.js +5 -7
  16. package/demo/main.js +81 -16
  17. package/dist/.csslintstamp +0 -0
  18. package/dist/controls.css +1 -1
  19. package/dist/controls.css.map +1 -1
  20. package/dist/demo.compiled.debug.js +46 -39
  21. package/dist/demo.compiled.debug.map +3 -3
  22. package/dist/demo.compiled.js +46 -39
  23. package/dist/demo.compiled.map +3 -3
  24. package/dist/demo.css +1 -1
  25. package/dist/demo.css.map +1 -1
  26. package/dist/deps.js +11 -7
  27. package/dist/receiver.compiled.debug.js +10 -6
  28. package/dist/receiver.compiled.debug.map +3 -3
  29. package/dist/receiver.compiled.js +10 -6
  30. package/dist/receiver.compiled.map +3 -3
  31. package/dist/shaka-player.compiled.debug.externs.js +123 -92
  32. package/dist/shaka-player.compiled.debug.js +113 -105
  33. package/dist/shaka-player.compiled.debug.map +4 -4
  34. package/dist/shaka-player.compiled.externs.js +123 -92
  35. package/dist/shaka-player.compiled.js +551 -548
  36. package/dist/shaka-player.compiled.map +4 -4
  37. package/dist/shaka-player.ui.debug.externs.js +170 -101
  38. package/dist/shaka-player.ui.debug.js +187 -188
  39. package/dist/shaka-player.ui.debug.map +4 -4
  40. package/dist/shaka-player.ui.externs.js +170 -101
  41. package/dist/shaka-player.ui.js +651 -651
  42. package/dist/shaka-player.ui.map +3 -3
  43. package/docs/tutorials/drm-config.md +1 -0
  44. package/docs/tutorials/fairplay.md +77 -0
  45. package/docs/tutorials/index.json +1 -0
  46. package/docs/tutorials/ui-customization.md +3 -0
  47. package/docs/tutorials/ui.md +3 -1
  48. package/externs/mediasession.js +16 -1
  49. package/externs/shaka/net.js +5 -1
  50. package/externs/shaka/player.js +136 -90
  51. package/externs/webkitmediakeys.js +4 -0
  52. package/lib/dash/content_protection.js +33 -1
  53. package/lib/dash/dash_parser.js +12 -4
  54. package/lib/hls/hls_parser.js +20 -4
  55. package/lib/media/drm_engine.js +29 -2
  56. package/lib/media/media_source_engine.js +7 -3
  57. package/lib/media/playhead.js +8 -3
  58. package/lib/media/streaming_engine.js +24 -8
  59. package/lib/media/video_wrapper.js +8 -3
  60. package/lib/net/networking_engine.js +1 -0
  61. package/lib/player.js +3 -2
  62. package/lib/polyfill/patchedmediakeys_apple.js +2 -72
  63. package/lib/util/error.js +12 -0
  64. package/lib/util/fairplay_utils.js +122 -0
  65. package/lib/util/player_configuration.js +5 -0
  66. package/lib/util/pssh.js +41 -0
  67. package/package.json +4 -3
  68. package/shaka-player.uncompiled.js +5 -1
  69. package/test/dash/dash_parser_content_protection_unit.js +35 -1
  70. package/test/dash/dash_parser_manifest_unit.js +31 -0
  71. package/test/hls/hls_live_unit.js +7 -1
  72. package/test/hls/hls_parser_unit.js +50 -0
  73. package/test/media/media_source_engine_integration.js +12 -0
  74. package/test/media/playhead_unit.js +2 -0
  75. package/test/player_external.js +3 -2
  76. package/test/player_integration.js +75 -0
  77. package/test/test/externs/jasmine.js +6 -0
  78. package/test/test/util/test_scheme.js +32 -1
  79. package/test/test/util/ui_utils.js +41 -0
  80. package/test/ui/ui_unit.js +129 -3
  81. package/ui/audio_language_selection.js +17 -96
  82. package/ui/big_play_button.js +61 -0
  83. package/ui/controls.js +111 -86
  84. package/ui/controls.less +3 -5
  85. package/ui/externs/ui.js +14 -2
  86. package/ui/fullscreen_button.js +2 -52
  87. package/ui/less/buttons.less +8 -8
  88. package/ui/less/containers.less +21 -21
  89. package/ui/less/general.less +11 -0
  90. package/ui/less/other_elements.less +2 -1
  91. package/ui/less/overflow_menu.less +11 -10
  92. package/ui/less/range_elements.less +6 -0
  93. package/ui/less/spinner.less +2 -0
  94. package/ui/pip_button.js +1 -1
  95. package/ui/{play_pause_button.js → play_button.js} +17 -47
  96. package/ui/resolution_selection.js +41 -104
  97. package/ui/seek_bar.js +15 -17
  98. package/ui/settings_menu.js +113 -0
  99. package/ui/small_play_button.js +73 -0
  100. package/ui/text_displayer.js +2 -2
  101. package/ui/text_selection.js +39 -105
  102. package/ui/ui.js +12 -0
@@ -1,35 +1,35 @@
1
1
  (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){var p,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ca="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function da(){da=function(){};ca.Symbol||(ca.Symbol=ea)}var ea=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
2
- function ha(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ia(this)}});ha=function(){}}function ia(b){var c=0;return ja(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ja(b){ha();b={next:b};b[ca.Symbol.iterator]=function(){return this};return b}function r(b){ha();var c=b[Symbol.iterator];return c?c.call(b):ia(b)}
3
- function la(b,c){if(c){for(var d=ca,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
4
- la("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.j()})};var f=ca.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.j=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
2
+ function fa(){da();var b=ca.Symbol.iterator;b||(b=ca.Symbol.iterator=ca.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return ha(this)}});fa=function(){}}function ha(b){var c=0;return ja(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ja(b){fa();b={next:b};b[ca.Symbol.iterator]=function(){return this};return b}function r(b){fa();var c=b[Symbol.iterator];return c?c.call(b):ha(b)}
3
+ function ka(b,c){if(c){for(var d=ca,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
4
+ ka("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.j()})};var f=ca.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.j=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
5
5
  [];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.v),reject:b(this.f)}};c.prototype.v=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.w(b);else{a:switch(typeof b){case "object":var d=null!=b;break a;case "function":d=!0;
6
6
  break a;default:d=!1}d?this.u(b):this.j(b)}};c.prototype.u=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.D(c,b):this.j(b)};c.prototype.f=function(b){this.l(2,b)};c.prototype.j=function(b){this.l(1,b)};c.prototype.l=function(b,c){if(0!=this.b)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.b);this.b=b;this.g=c;this.o()};c.prototype.o=function(){if(null!=this.a){for(var b=0;b<this.a.length;++b)g.b(this.a[b]);this.a=null}};
7
- var g=new d;c.prototype.w=function(b){var c=this.c();b.vc(c.resolve,c.reject)};c.prototype.D=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(D){g(D)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.vc(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.vc=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
7
+ var g=new d;c.prototype.w=function(b){var c=this.c();b.vc(c.resolve,c.reject)};c.prototype.D=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(E){g(E)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.vc(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.vc=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
8
8
  case 2:c(e.g);break;default:throw Error("Unexpected state: "+e.b);}}var e=this;null==this.a?g.b(d):this.a.push(d)};c.resolve=e;c.reject=function(b){return new c(function(c,d){d(b)})};c.race=function(b){return new c(function(c,d){for(var f=r(b),g=f.next();!g.done;g=f.next())e(g.value).vc(c,d)})};c.all=function(b){var d=r(b),f=d.next();return f.done?e([]):new c(function(b,c){function g(c){return function(d){h[c]=d;k--;0==k&&b(h)}}var h=[],k=0;do h.push(void 0),k++,e(f.value).vc(g(h.length-1),c),f=d.next();
9
- while(!f.done)})};return c});la("Promise.prototype.finally",function(b){return b?b: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;})})}});function ma(b){function c(c){return b.next(c)}function d(c){return b["throw"](c)}return new Promise(function(e,f){function g(b){b.done?e(b.value):Promise.resolve(b.value).then(c,d).then(g,f)}g(b.next())})}function t(b){return ma(b())}
10
- var na="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},oa;if("function"==typeof Object.setPrototypeOf)oa=Object.setPrototypeOf;else{var pa;a:{var qa={kf:!0},ra={};try{ra.__proto__=qa;pa=ra.kf;break a}catch(b){}pa=!1}oa=pa?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var ta=oa;
11
- function ua(b,c){b.prototype=na(c.prototype);b.prototype.constructor=b;if(ta)ta(b,c);else for(var d in c)if("prototype"!=d)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(c,d);e&&Object.defineProperty(b,d,e)}else b[d]=c[d];b.bh=c.prototype}function wa(){this.g=!1;this.c=null;this.A=void 0;this.s=1;this.b=this.f=0;this.l=this.a=null}function xa(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}wa.prototype.j=function(b){this.A=b};
12
- function ya(b,c){b.a={ae:c,oe:!0};b.s=b.f||b.b}wa.prototype["return"]=function(b){this.a={"return":b};this.s=this.b};function u(b,c,d){b.s=d;return{value:c}}wa.prototype.C=function(b){this.s=b};function v(b){b.s=0}function za(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function Aa(b,c){b.f=0;b.b=c||0}function Ba(b,c){b.s=c;b.f=0}function Ca(b){b.f=0;var c=b.a.ae;b.a=null;return c}function Fa(b){b.l=[b.a];b.f=0;b.b=0}
13
- function Ga(b,c){var d=b.l.splice(0)[0];(d=b.a=b.a||d)?d.oe?b.s=b.f||b.b:void 0!=d.C&&b.b<d.C?(b.s=d.C,b.a=null):b.s=b.b:b.s=c}function Ha(b){this.a=new wa;this.b=b}function Ia(b,c){xa(b.a);var d=b.a.c;if(d)return La(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return Ma(b)}
14
- function La(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,ya(b.a,h),Ma(b)}b.a.c=null;e.call(b.a,g);return Ma(b)}
15
- function Ma(b){for(;b.a.s;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.A=void 0,ya(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.oe)throw c.ae;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
16
- function Na(b){this.next=function(c){xa(b.a);b.a.c?c=La(b,b.a.c.next,c,b.a.j):(b.a.j(c),c=Ma(b));return c};this["throw"]=function(c){xa(b.a);b.a.c?c=La(b,b.a.c["throw"],c,b.a.j):(ya(b.a,c),c=Ma(b));return c};this["return"]=function(c){return Ia(b,c)};ha();this[Symbol.iterator]=function(){return this}}function y(b,c){Na.prototype=b.prototype;return new Na(new Ha(c))}function Oa(b){if(!(b instanceof Array)){b=r(b);for(var c,d=[];!(c=b.next()).done;)d.push(c.value);b=d}return b}
9
+ while(!f.done)})};return c});ka("Promise.prototype.finally",function(b){return b?b: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;})})}});function ma(b){function c(c){return b.next(c)}function d(c){return b["throw"](c)}return new Promise(function(e,f){function g(b){b.done?e(b.value):Promise.resolve(b.value).then(c,d).then(g,f)}g(b.next())})}function t(b){return ma(b())}
10
+ var na="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},oa;if("function"==typeof Object.setPrototypeOf)oa=Object.setPrototypeOf;else{var pa;a:{var qa={mf:!0},ra={};try{ra.__proto__=qa;pa=ra.mf;break a}catch(b){}pa=!1}oa=pa?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var ta=oa;
11
+ function ua(b,c){b.prototype=na(c.prototype);b.prototype.constructor=b;if(ta)ta(b,c);else for(var d in c)if("prototype"!=d)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(c,d);e&&Object.defineProperty(b,d,e)}else b[d]=c[d];b.eh=c.prototype}function xa(){this.g=!1;this.c=null;this.A=void 0;this.s=1;this.b=this.f=0;this.l=this.a=null}function ya(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}xa.prototype.j=function(b){this.A=b};
12
+ function za(b,c){b.a={ee:c,qe:!0};b.s=b.f||b.b}xa.prototype["return"]=function(b){this.a={"return":b};this.s=this.b};function u(b,c,d){b.s=d;return{value:c}}xa.prototype.C=function(b){this.s=b};function v(b){b.s=0}function Aa(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function Ba(b,c){b.f=0;b.b=c||0}function Ca(b,c){b.s=c;b.f=0}function Da(b){b.f=0;var c=b.a.ee;b.a=null;return c}function Fa(b){b.l=[b.a];b.f=0;b.b=0}
13
+ function Ga(b,c){var d=b.l.splice(0)[0];(d=b.a=b.a||d)?d.qe?b.s=b.f||b.b:void 0!=d.C&&b.b<d.C?(b.s=d.C,b.a=null):b.s=b.b:b.s=c}function Ha(b){this.a=new xa;this.b=b}function Ia(b,c){ya(b.a);var d=b.a.c;if(d)return La(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return Ma(b)}
14
+ function La(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,za(b.a,h),Ma(b)}b.a.c=null;e.call(b.a,g);return Ma(b)}
15
+ function Ma(b){for(;b.a.s;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.A=void 0,za(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.qe)throw c.ee;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
16
+ function Na(b){this.next=function(c){ya(b.a);b.a.c?c=La(b,b.a.c.next,c,b.a.j):(b.a.j(c),c=Ma(b));return c};this["throw"]=function(c){ya(b.a);b.a.c?c=La(b,b.a.c["throw"],c,b.a.j):(za(b.a,c),c=Ma(b));return c};this["return"]=function(c){return Ia(b,c)};fa();this[Symbol.iterator]=function(){return this}}function y(b,c){Na.prototype=b.prototype;return new Na(new Ha(c))}function Oa(b){if(!(b instanceof Array)){b=r(b);for(var c,d=[];!(c=b.next()).done;)d.push(c.value);b=d}return b}
17
17
  function Sa(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
18
- la("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){da();ha();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Sa(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
18
+ ka("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){da();fa();b=r(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Sa(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
19
19
  var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!Sa(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Sa(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Sa(b,f)&&Sa(b[f],this.a)};c.prototype["delete"]=function(b){return Sa(b,f)&&Sa(b[f],this.a)?delete b[f][this.a]:!1};return c});
20
- la("Map",function(b){function c(){var b={};return b.Ua=b.next=b.head=b}function d(b,c){var d=b.a;return ja(function(){if(d){for(;d.head!=b.a;)d=d.Ua;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Sa(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,ha:k}}return{id:d,
20
+ ka("Map",function(b){function c(){var b={};return b.Ta=b.next=b.head=b}function d(b,c){var d=b.a;return ja(function(){if(d){for(;d.head!=b.a;)d=d.Ta;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Sa(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,ha:k}}return{id:d,
21
21
  list:e,index:-1,ha:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=r(b);for(var d;!(d=b.next()).done;)d=d.value,this.set(d[0],d[1])}}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b(r([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||
22
- "t"!=f.value[1]||!e.next().done?!1:!0}catch(q){return!1}}())return b;da();ha();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.ha?d.ha.value=c:(d.ha={next:this.a,Ua:this.a.Ua,head:this.a,key:b,value:c},d.list.push(d.ha),this.a.Ua.next=d.ha,this.a.Ua=d.ha,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.ha&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.ha.Ua.next=b.ha.next,b.ha.next.Ua=b.ha.Ua,
23
- b.ha.head=null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Ua=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).ha};f.prototype.get=function(b){return(b=e(this,b).ha)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),
22
+ "t"!=f.value[1]||!e.next().done?!1:!0}catch(q){return!1}}())return b;da();fa();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.ha?d.ha.value=c:(d.ha={next:this.a,Ta:this.a.Ta,head:this.a,key:b,value:c},d.list.push(d.ha),this.a.Ta.next=d.ha,this.a.Ta=d.ha,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.ha&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.ha.Ta.next=b.ha.next,b.ha.next.Ta=b.ha.Ta,
23
+ b.ha.head=null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Ta=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).ha};f.prototype.get=function(b){return(b=e(this,b).ha)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),
24
24
  e;!(e=d.next()).done;)e=e.value,b.call(c,e[1],e[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var h=0;return f});
25
- la("Set",function(b){function c(b){this.a=new Map;if(b){b=r(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(r([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
26
- g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;da();ha();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
27
- c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function Ta(b,c){ha();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}la("Array.prototype.keys",function(b){return b?b:function(){return Ta(this,function(b){return b})}});
28
- la("Array.from",function(b){return b?b:function(b,d,e){ha();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});function Ua(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{je:f,cf:g}}return{je:-1,cf:void 0}}
29
- la("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Ua(this,b,d).je}});la("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});la("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});
30
- function Va(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}la("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Va(this,b,"includes").indexOf(b,d||0)}});
31
- la("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Va(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});la("Array.prototype.find",function(b){return b?b:function(b,d){return Ua(this,b,d).cf}});var Wa=this;Wa.a=!0;
32
- function z(b,c){var d=b.split("."),e=Wa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Xa(b,c){function d(){}d.prototype=c.prototype;b.bh=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ph=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*
25
+ ka("Set",function(b){function c(b){this.a=new Map;if(b){b=r(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(r([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
26
+ g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;da();fa();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
27
+ c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function Ta(b,c){fa();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}ka("Array.prototype.keys",function(b){return b?b:function(){return Ta(this,function(b){return b})}});
28
+ ka("Array.from",function(b){return b?b:function(b,d,e){fa();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});function Ua(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{le:f,ef:g}}return{le:-1,ef:void 0}}
29
+ ka("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Ua(this,b,d).le}});ka("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});ka("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});
30
+ function Va(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}ka("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Va(this,b,"includes").indexOf(b,d||0)}});
31
+ ka("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Va(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return Ua(this,b,d).ef}});var Wa=this;Wa.a=!0;
32
+ function z(b,c){var d=b.split("."),e=Wa;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}function Xa(b,c){function d(){}d.prototype=c.prototype;b.eh=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.rh=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*
33
33
 
34
34
  Copyright 2016 Google Inc.
35
35
 
@@ -45,576 +45,579 @@ function z(b,c){var d=b.split("."),e=Wa;d[0]in e||!e.execScript||e.execScript("v
45
45
  See the License for the specific language governing permissions and
46
46
  limitations under the License.
47
47
  */
48
- function B(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}B.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};B.prototype.stopImmediatePropagation=function(){this.a=!0};B.prototype.stopPropagation=function(){};function Ya(){}function Za(){}function $a(){}window.console&&window.console.log.bind&&(Za=console.warn.bind(console),Ya=console.error.bind(console));function bb(){this.a={}}p=bb.prototype;p.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};p.get=function(b){return(b=this.a[b])?b.slice():null};p.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};p.remove=function(b,c){var d=this.a[b];if(d)for(var e=0;e<d.length;++e)d[e]==c&&(d.splice(e,1),--e)};p.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function cb(){this.fd=new bb;this.rc=this}cb.prototype.addEventListener=function(b,c){this.fd.push(b,c)};cb.prototype.removeEventListener=function(b,c){this.fd.remove(b,c)};cb.prototype.dispatchEvent=function(b){for(var c=this.fd.get(b.type)||[],d=0;d<c.length;++d){b.target=this.rc;b.currentTarget=this.rc;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function db(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function eb(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0}function fb(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(c(e.value))return!0;return!1}function gb(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c(f)&&d.push(f);return d};function hb(b,c){b=C(b);c=C(c);return b.split("-")[0]==c.split("-")[0]}function ib(b,c){b=C(b);c=C(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function C(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=jb.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function kb(b){var c=b.indexOf("-");b=0<=c?b.substring(0,c):b;b=b.toLowerCase();return b=jb.get(b)||b}
49
- function lb(b){return b.language?C(b.language):b.audio&&b.audio.language?C(b.audio.language):b.video&&b.video.language?C(b.video.language):"und"}
50
- function mb(b,c){for(var d=C(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(C(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,ib(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=C(h);k=C(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,ib(d,f))return f;return null}
48
+ function A(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}A.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};A.prototype.stopImmediatePropagation=function(){this.a=!0};A.prototype.stopPropagation=function(){};function Ya(){}function Za(){}function $a(){}window.console&&window.console.log.bind&&(Za=console.warn.bind(console),Ya=console.error.bind(console));function bb(){this.a={}}p=bb.prototype;p.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};p.get=function(b){return(b=this.a[b])?b.slice():null};p.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};p.remove=function(b,c){var d=this.a[b];if(d)for(var e=0;e<d.length;++e)d[e]==c&&(d.splice(e,1),--e)};p.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function cb(){this.hd=new bb;this.rc=this}cb.prototype.addEventListener=function(b,c){this.hd.push(b,c)};cb.prototype.removeEventListener=function(b,c){this.hd.remove(b,c)};cb.prototype.dispatchEvent=function(b){for(var c=this.hd.get(b.type)||[],d=0;d<c.length;++d){b.target=this.rc;b.currentTarget=this.rc;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function db(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function eb(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0}function fb(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())if(c(e.value))return!0;return!1}function gb(b,c){for(var d=[],e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c(f)&&d.push(f);return d};function hb(b,c){b=B(b);c=B(c);return b.split("-")[0]==c.split("-")[0]}function ib(b,c){b=B(b);c=B(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function B(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=jb.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function kb(b){var c=b.indexOf("-");b=0<=c?b.substring(0,c):b;b=b.toLowerCase();return b=jb.get(b)||b}
49
+ function lb(b){return b.language?B(b.language):b.audio&&b.audio.language?B(b.audio.language):b.video&&b.video.language?B(b.video.language):"und"}
50
+ function mb(b,c){for(var d=B(b),e=new Set,f=r(c),g=f.next();!g.done;g=f.next())e.add(B(g.value));f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=r(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,ib(g,d))return g;f=r(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=B(h);k=B(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=r(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,ib(d,f))return f;return null}
51
51
  var jb=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",
52
52
  "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",
53
53
  "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",
54
54
  "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",
55
55
  "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",
56
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function E(b){this.g=C(b);this.f=new Map;this.b=new Set;this.c=new Map;this.a=new cb}z("shaka.ui.Localization",E);E.prototype.addEventListener=function(b,c,d){this.a.addEventListener(b,c,d)};E.prototype.addEventListener=E.prototype.addEventListener;E.prototype.removeEventListener=function(b,c,d){this.a.removeEventListener(b,c,d||void 0)};E.prototype.removeEventListener=E.prototype.removeEventListener;E.prototype.dispatchEvent=function(b){return this.a.dispatchEvent(b)};E.prototype.dispatchEvent=E.prototype.dispatchEvent;
57
- E.prototype.Xd=function(b){var c=this;this.b.clear();b=r(b);for(var d=b.next();!d.done;d=b.next())this.b.add(C(d.value));qb(this);this.a.dispatchEvent(new B("locale-changed"));b=gb(this.b,function(b){return!c.c.has(b)});b.length&&this.a.dispatchEvent(new B("unknown-locales",{locales:b}))};E.prototype.changeLocale=E.prototype.Xd;
58
- E.prototype.Y=function(b,c,d){var e=rb;b=C(b);void 0===d&&(d=e.jf);var f=this.c.get(b)||new Map;c.forEach(function(b,c){f.has(c)&&d!=e.jf||f.set(c,b)});this.c.set(b,f);qb(this);this.a.dispatchEvent(new B("locale-updated"));return this};E.prototype.insert=E.prototype.Y;E.prototype.Og=function(b){for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,this.resolve(d))};E.prototype.resolveDictionary=E.prototype.Og;
59
- E.prototype.resolve=function(b){var c=this.f.get(b);if(c)return c;b={locales:Array.from(this.b),missing:b};this.a.dispatchEvent(new B("unknown-localization",b));return""};E.prototype.resolve=E.prototype.resolve;
60
- function qb(b){for(var c=b.c,d=b.g,e=b.b,f=new Set,g={},h=r(e),k=h.next();!k.done;g={locale:g.locale},k=h.next()){g.locale=k.value;f.add(g.locale);f.add(kb(g.locale));k=gb(c.keys(),function(b){return function(c){var d=b.locale,e=kb(c),f=kb(d);return c!=e&&d!=f&&e==f}}(g));k.sort();var l=r(k);for(k=l.next();!k.done;k=l.next())f.add(k.value);k=gb(c.keys(),function(b){return function(c){return kb(c)==b.locale}}(g));k.sort();l=r(k);for(k=l.next();!k.done;k=l.next())f.add(k.value)}f.add(d);d=[];f=r(f);
61
- for(k=f.next();!k.done;k=f.next())(k=c.get(k.value))&&d.push(k);d.reverse();b.f.clear();c=r(d);for(k=c.next();!k.done;k=c.next())k.value.forEach(function(c,d){b.f.set(d,c)});c=b.f.keys();f=new Set;d=r(b.b);for(k=d.next();!k.done;k=d.next())k=b.c.get(k.value)||new Map,sb(k,c,f);0<f.size&&(e={locales:Array.from(e),missing:Array.from(f)},b.a.dispatchEvent(new B("missing-localizations",e)))}function sb(b,c,d){c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,b.get(e)||d.add(e)}
62
- var rb={USE_OLD:0,USE_NEW:1};E.ConflictResolution=rb;E.UNKNOWN_LOCALES="unknown-locales";E.UNKNOWN_LOCALIZATION="unknown-localization";E.MISSING_LOCALIZATIONS="missing-localizations";E.LOCALE_CHANGED="locale-changed";E.LOCALE_UPDATED="locale-updated";function tb(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function ub(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function vb(b){return b.a/(1-Math.pow(b.c,b.b))};function wb(){this.b=new tb(2);this.c=new tb(5);this.a=0}wb.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(vb(this.b),vb(this.c))};var xb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function yb(b){var c;b instanceof yb?(zb(this,b.La),this.ub=b.ub,this.Ha=b.Ha,Ab(this,b.Qb),this.xa=b.xa,Bb(this,b.a.clone()),this.ib=b.ib):b&&(c=String(b).match(xb))?(zb(this,c[1]||"",!0),this.ub=Cb(c[2]||""),this.Ha=Cb(c[3]||"",!0),Ab(this,c[4]),this.xa=Cb(c[5]||"",!0),Bb(this,c[6]||"",!0),this.ib=Cb(c[7]||"")):this.a=new Db(null)}p=yb.prototype;p.La="";p.ub="";p.Ha="";p.Qb=null;p.xa="";p.ib="";
56
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function D(b){this.g=B(b);this.f=new Map;this.b=new Set;this.c=new Map;this.a=new cb}z("shaka.ui.Localization",D);D.prototype.addEventListener=function(b,c,d){this.a.addEventListener(b,c,d)};D.prototype.addEventListener=D.prototype.addEventListener;D.prototype.removeEventListener=function(b,c,d){this.a.removeEventListener(b,c,d||void 0)};D.prototype.removeEventListener=D.prototype.removeEventListener;D.prototype.dispatchEvent=function(b){return this.a.dispatchEvent(b)};D.prototype.dispatchEvent=D.prototype.dispatchEvent;
57
+ D.prototype.$d=function(b){var c=this;this.b.clear();b=r(b);for(var d=b.next();!d.done;d=b.next())this.b.add(B(d.value));nb(this);this.a.dispatchEvent(new A("locale-changed"));b=gb(this.b,function(b){return!c.c.has(b)});b.length&&this.a.dispatchEvent(new A("unknown-locales",{locales:b}))};D.prototype.changeLocale=D.prototype.$d;
58
+ D.prototype.Y=function(b,c,d){var e=rb;b=B(b);void 0===d&&(d=e.lf);var f=this.c.get(b)||new Map;c.forEach(function(b,c){f.has(c)&&d!=e.lf||f.set(c,b)});this.c.set(b,f);nb(this);this.a.dispatchEvent(new A("locale-updated"));return this};D.prototype.insert=D.prototype.Y;D.prototype.Qg=function(b){for(var c=r(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,this.resolve(d))};D.prototype.resolveDictionary=D.prototype.Qg;
59
+ D.prototype.resolve=function(b){var c=this.f.get(b);if(c)return c;b={locales:Array.from(this.b),missing:b};this.a.dispatchEvent(new A("unknown-localization",b));return""};D.prototype.resolve=D.prototype.resolve;
60
+ function nb(b){for(var c=b.c,d=b.g,e=b.b,f=new Set,g={},h=r(e),k=h.next();!k.done;g={locale:g.locale},k=h.next()){g.locale=k.value;f.add(g.locale);f.add(kb(g.locale));k=gb(c.keys(),function(b){return function(c){var d=b.locale,e=kb(c),f=kb(d);return c!=e&&d!=f&&e==f}}(g));k.sort();var l=r(k);for(k=l.next();!k.done;k=l.next())f.add(k.value);k=gb(c.keys(),function(b){return function(c){return kb(c)==b.locale}}(g));k.sort();l=r(k);for(k=l.next();!k.done;k=l.next())f.add(k.value)}f.add(d);d=[];f=r(f);
61
+ for(k=f.next();!k.done;k=f.next())(k=c.get(k.value))&&d.push(k);d.reverse();b.f.clear();c=r(d);for(k=c.next();!k.done;k=c.next())k.value.forEach(function(c,d){b.f.set(d,c)});c=b.f.keys();f=new Set;d=r(b.b);for(k=d.next();!k.done;k=d.next())k=b.c.get(k.value)||new Map,sb(k,c,f);0<f.size&&(e={locales:Array.from(e),missing:Array.from(f)},b.a.dispatchEvent(new A("missing-localizations",e)))}function sb(b,c,d){c=r(c);for(var e=c.next();!e.done;e=c.next())e=e.value,b.get(e)||d.add(e)}
62
+ var rb={USE_OLD:0,USE_NEW:1};D.ConflictResolution=rb;D.UNKNOWN_LOCALES="unknown-locales";D.UNKNOWN_LOCALIZATION="unknown-localization";D.MISSING_LOCALIZATIONS="missing-localizations";D.LOCALE_CHANGED="locale-changed";D.LOCALE_UPDATED="locale-updated";function tb(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function ub(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function vb(b){return b.a/(1-Math.pow(b.c,b.b))};function wb(){this.b=new tb(2);this.c=new tb(5);this.a=0}wb.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(vb(this.b),vb(this.c))};var xb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function yb(b){var c;b instanceof yb?(zb(this,b.La),this.ub=b.ub,this.Ha=b.Ha,Ab(this,b.Qb),this.xa=b.xa,Bb(this,b.a.clone()),this.ib=b.ib):b&&(c=String(b).match(xb))?(zb(this,c[1]||"",!0),this.ub=Cb(c[2]||""),this.Ha=Cb(c[3]||"",!0),Ab(this,c[4]),this.xa=Cb(c[5]||"",!0),Bb(this,c[6]||"",!0),this.ib=Cb(c[7]||"")):this.a=new Db(null)}p=yb.prototype;p.La="";p.ub="";p.Ha="";p.Qb=null;p.xa="";p.ib="";
63
63
  p.toString=function(){var b=[],c=this.La;c&&b.push(Ib(c,Jb,!0),":");if(c=this.Ha){b.push("//");var d=this.ub;d&&b.push(Ib(d,Jb,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.Qb;null!=c&&b.push(":",String(c))}if(c=this.xa)this.Ha&&"/"!=c.charAt(0)&&b.push("/"),b.push(Ib(c,"/"==c.charAt(0)?Kb:Lb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.ib)&&b.push("#",Ib(c,Mb));return b.join("")};
64
64
  p.resolve=function(b){var c=this.clone();"data"===c.La&&(c=new yb);var d=!!b.La;d?zb(c,b.La):d=!!b.ub;d?c.ub=b.ub:d=!!b.Ha;d?c.Ha=b.Ha:d=null!=b.Qb;var e=b.xa;if(d)Ab(c,b.Qb);else if(d=!!b.xa){if("/"!=e.charAt(0))if(this.Ha&&!this.xa)e="/"+e;else{var f=c.xa.lastIndexOf("/");-1!=f&&(e=c.xa.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;h<e.length;){var k=e[h++];"."==k?f&&h==e.length&&g.push(""):".."==
65
65
  k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.xa=e:d=""!==b.a.toString();d?Bb(c,b.a.clone()):d=!!b.ib;d&&(c.ib=b.ib);return c};p.clone=function(){return new yb(this)};function zb(b,c,d){b.La=d?Cb(c,!0):c;b.La&&(b.La=b.La.replace(/:$/,""))}function Ab(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.Qb=c}else b.Qb=null}function Bb(b,c,d){c instanceof Db?b.a=c:(d||(c=Ib(c,Nb)),b.a=new Db(c))}
66
- function Cb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function Ib(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,Pb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function Pb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var Jb=/[#\/\?@]/g,Lb=/[#\?:]/g,Kb=/[#\?]/g,Nb=/[#\?@]/g,Mb=/#/g;function Db(b){this.a=b||null}p=Db.prototype;p.va=null;p.xc=null;
67
- p.add=function(b,c){if(!this.va&&(this.va={},this.xc=0,this.a))for(var d=this.a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.a=null;(d=this.va.hasOwnProperty(b)&&this.va[b])||(this.va[b]=d=[]);d.push(c);this.xc++;return this};
68
- p.toString=function(){if(this.a)return this.a;if(!this.va)return"";var b=[],c;for(c in this.va)for(var d=encodeURIComponent(c),e=this.va[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};p.clone=function(){var b=new Db;b.a=this.a;if(this.va){var c={},d;for(d in this.va)c[d]=this.va[d].concat();b.va=c;b.xc=this.xc}return b};function Qb(b){this.b=b;this.a=null}Qb.prototype.S=function(b){var c=this;this.stop();var d=!0,e=null;this.a=function(){window.clearTimeout(e);d=!1};e=window.setTimeout(function(){d&&c.b()},1E3*b);return this};Qb.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function F(b){this.b=b;this.a=null}z("shaka.util.Timer",F);F.prototype.Oa=function(){this.stop();this.b();return this};F.prototype.tickNow=F.prototype.Oa;F.prototype.S=function(b){var c=this;this.stop();this.a=(new Qb(function(){c.b()})).S(b);return this};F.prototype.tickAfter=F.prototype.S;F.prototype.Na=function(b){var c=this;this.stop();this.a=(new Qb(function(){c.a.S(b);c.b()})).S(b);return this};F.prototype.tickEvery=F.prototype.Na;F.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};
66
+ function Cb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function Ib(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,Ob),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function Ob(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var Jb=/[#\/\?@]/g,Lb=/[#\?:]/g,Kb=/[#\?]/g,Nb=/[#\?@]/g,Mb=/#/g;function Db(b){this.a=b||null}p=Db.prototype;p.wa=null;p.xc=null;
67
+ p.add=function(b,c){if(!this.wa&&(this.wa={},this.xc=0,this.a))for(var d=this.a.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.a=null;(d=this.wa.hasOwnProperty(b)&&this.wa[b])||(this.wa[b]=d=[]);d.push(c);this.xc++;return this};
68
+ p.toString=function(){if(this.a)return this.a;if(!this.wa)return"";var b=[],c;for(c in this.wa)for(var d=encodeURIComponent(c),e=this.wa[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};p.clone=function(){var b=new Db;b.a=this.a;if(this.wa){var c={},d;for(d in this.wa)c[d]=this.wa[d].concat();b.wa=c;b.xc=this.xc}return b};function Qb(b){this.b=b;this.a=null}Qb.prototype.S=function(b){var c=this;this.stop();var d=!0,e=null;this.a=function(){window.clearTimeout(e);d=!1};e=window.setTimeout(function(){d&&c.b()},1E3*b);return this};Qb.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function F(b){this.b=b;this.a=null}z("shaka.util.Timer",F);F.prototype.Ua=function(){this.stop();this.b();return this};F.prototype.tickNow=F.prototype.Ua;F.prototype.S=function(b){var c=this;this.stop();this.a=(new Qb(function(){c.b()})).S(b);return this};F.prototype.tickAfter=F.prototype.S;F.prototype.Na=function(b){var c=this;this.stop();this.a=(new Qb(function(){c.a.S(b);c.b()})).S(b);return this};F.prototype.tickEvery=F.prototype.Na;F.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};
69
69
  F.prototype.stop=F.prototype.stop;function Rb(b,c){var d=Sb();this.l=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.j=null==b.fuzzFactor?d.fuzzFactor:b.fuzzFactor;this.g=null==b.backoffFactor?d.backoffFactor:b.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===c?!1:c)this.a=1}
70
- function Tb(b){return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:if(b.a>=b.l)if(b.c)b.a=1,b.b=b.f;else return d["return"](Promise.reject());e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.j);return u(d,new Promise(function(b){(new F(b)).S(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function Sb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function G(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}z("shaka.util.Error",G);G.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};G.Severity={RECOVERABLE:1,CRITICAL:2};G.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
71
- G.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,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,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
70
+ function Tb(b){return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:if(b.a>=b.l)if(b.c)b.a=1,b.b=b.f;else return d["return"](Promise.reject());e=b.a;b.a++;if(0==e)return d["return"]();f=b.b*(1+(2*Math.random()-1)*b.j);return u(d,new Promise(function(b){(new F(b)).S(f/1E3)}),2);case 2:b.b*=b.g,v(d)}})})}function Sb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function I(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}z("shaka.util.Error",I);I.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};I.Severity={RECOVERABLE:1,CRITICAL:2};I.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
71
+ I.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,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,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
72
72
  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,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,
73
73
  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,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
74
74
  HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,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,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,INVALID_STREAMS_CHOSEN:5005,
75
- 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,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,
76
- ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,CAST_RECEIVER_APP_ID_MISSING:8007,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,STORE_ALREADY_IN_PROGRESS:9006,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};function I(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}I.prototype.resolve=function(){};I.prototype.reject=function(){};function Ub(b,c){this.promise=b;this.ue=c;this.a=!1}z("shaka.util.AbortableOperation",Ub);function Vb(b){return new Ub(Promise.reject(b),function(){return Promise.resolve()})}Ub.failed=Vb;function Wb(){var b=Promise.reject(new G(2,7,7001));b["catch"](function(){});return new Ub(b,function(){return Promise.resolve()})}Ub.aborted=Wb;function Xb(b){return new Ub(Promise.resolve(b),function(){return Promise.resolve()})}Ub.completed=Xb;
77
- function Yb(b){return new Ub(b,function(){return b["catch"](function(){})})}Ub.notAbortable=Yb;Ub.prototype.abort=function(){this.a=!0;return this.ue()};Ub.prototype.abort=Ub.prototype.abort;function Zb(b){return new Ub(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}Ub.all=Zb;Ub.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};Ub.prototype["finally"]=Ub.prototype["finally"];
78
- Ub.prototype.aa=function(b,c){function d(){f.reject(new G(2,7,7001));return e.abort()}var e=this,f=new I;this.promise.then(function(c){e.a?f.reject(new G(2,7,7001)):b?d=$b(b,c,f):f.resolve(c)},function(b){c?d=$b(c,b,f):f.reject(b)});return new Ub(f,function(){return d()})};Ub.prototype.chain=Ub.prototype.aa;
79
- function $b(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function ac(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function bc(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function cc(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function dc(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
80
- function ec(b,c,d){d||(d=bc);if(b.length!=c.length)return!1;c=c.slice();var e={};b=r(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function fc(){this.a=[]}function gc(b,c){b.a.push(c["finally"](function(){cc(b.a,c)}))}fc.prototype.destroy=function(){var b=[];this.a.forEach(function(c){c.promise["catch"](function(){});b.push(c.abort())});this.a=[];return Promise.all(b)};function K(b){cb.call(this);this.f=!1;this.g=new fc;this.a=new Set;this.b=new Set;this.c=b||null}Xa(K,cb);z("shaka.net.NetworkingEngine",K);var hc={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};K.RequestType=hc;K.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var ic={};function jc(b,c,d){d=d||3;var e=ic[b];if(!e||d>=e.priority)ic[b]={priority:d,Eg:c}}K.registerScheme=jc;K.unregisterScheme=function(b){delete ic[b]};K.prototype.Gg=function(b){this.a.add(b)};
81
- K.prototype.registerRequestFilter=K.prototype.Gg;K.prototype.dh=function(b){this.a["delete"](b)};K.prototype.unregisterRequestFilter=K.prototype.dh;K.prototype.sf=function(){this.a.clear()};K.prototype.clearAllRequestFilters=K.prototype.sf;K.prototype.Hg=function(b){this.b.add(b)};K.prototype.registerResponseFilter=K.prototype.Hg;K.prototype.eh=function(b){this.b["delete"](b)};K.prototype.unregisterResponseFilter=K.prototype.eh;K.prototype.tf=function(){this.b.clear()};
82
- K.prototype.clearAllResponseFilters=K.prototype.tf;function kc(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}K.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};K.prototype.destroy=K.prototype.destroy;
83
- K.prototype.request=function(b,c){var d=this,e=new lc;if(this.f){var f=Promise.reject(new G(2,7,7001));f["catch"](function(){});return new mc(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?ac(c.retryParameters):Sb();c.uris=ac(c.uris);f=nc(this,b,c);var g=f.aa(function(){return oc(d,b,c,new Rb(c.retryParameters,!1),0,null,e)}),h=g.aa(function(c){return pc(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-
84
- k},function(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.aa(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.Yf||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new mc(f.promise,f.ue,e);gc(this.g,f);return f};K.prototype.request=K.prototype.request;
85
- function nc(b,c,d){var e=Xb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={Cd:f.Cd},g=b.next())f.Cd=g.value,e=e.aa(function(b){return function(){return b.Cd(c,d)}}(f));return e.aa(void 0,function(b){if(b&&7001==b.code)throw b;throw new G(2,1,1006,b);})}
86
- function oc(b,c,d,e,f,g,h){var k=new yb(d.uris[f]),l=k.La,m=!1;l||(l=location.protocol,l=l.slice(0,-1),zb(k,l),d.uris[f]=k.toString());var n=(l=ic[l])?l.Eg:null;if(!n)return Vb(new G(2,1,1E3,k));var q;return Yb(Tb(e)).aa(function(){if(b.f)return Wb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).aa(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,Yf:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Wb();if(k&&1==k.severity)return b.dispatchEvent(new B("retry",
87
- {error:k instanceof G?k:null})),f=(f+1)%d.uris.length,oc(b,c,d,e,f,k,h);throw k||g;})}function pc(b,c,d){var e=Xb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.aa(f.value.bind(null,c,d.response));return e.aa(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof G&&(c=b.severity);throw new G(c,1,1007,b);})}function lc(){this.a=0}K.NumBytesRemainingClass=lc;function mc(b,c,d){Ub.call(this,b,c);this.b=d}ua(mc,Ub);K.PendingRequest=mc;mc.all=Zb;mc.notAbortable=Yb;
88
- mc.completed=Xb;mc.aborted=Wb;mc.failed=Vb;function qc(){}z("shaka.util.IReleasable",qc);qc.prototype.release=function(){};function L(){this.a=new bb}z("shaka.util.EventManager",L);L.prototype.release=function(){this.sb();this.a=null};L.prototype.release=L.prototype.release;L.prototype.m=function(b,c,d,e){this.a&&(b=new rc(b,c,d,e),this.a.push(c,b))};L.prototype.listen=L.prototype.m;L.prototype.wa=function(b,c,d,e){function f(e){g.oa(b,c,f);d(e)}var g=this;this.m(b,c,f,e)};L.prototype.listenOnce=L.prototype.wa;
89
- L.prototype.oa=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.oa(),this.a.remove(c,f))}};L.prototype.unlisten=L.prototype.oa;L.prototype.sb=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.oa();this.a.a={}}};L.prototype.removeAll=L.prototype.sb;
90
- function rc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=sc(b,e);this.target.addEventListener(c,d,this.a)}rc.prototype.oa=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};rc.prototype.unlisten=rc.prototype.oa;function sc(b,c){if(void 0==c)return!1;if("boolean"==typeof c)return c;var d=new Set(["passive","capture"]);Object.keys(c).filter(function(b){return!d.has(b)});return tc(b)?c:c.capture||!1}
91
- function tc(b){var c=uc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}uc=c}return c||!1}var uc=void 0;function vc(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function wc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function xc(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function yc(b){var c=[b.mimeType];zc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function Ac(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var zc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Bc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Cc(b){return""!=Dc().canPlayType(b)}function Ec(b){return(navigator.userAgent||"").includes(b)}function Dc(){if(Fc)return Fc;Gc||(Gc=new F(function(){Fc=null}));(Fc=document.querySelector("video")||document.querySelector("audio"))||(Fc=document.createElement("video"));Gc.S(1);return Fc}var Gc=null,Fc=null;function Hc(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=Ic(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new G(2,2,2004);}}z("shaka.util.StringUtils.fromUTF8",Hc);
92
- function Jc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new G(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f<b;f++)d[f]=e.getUint16(2*f,c);return Ic(d)}z("shaka.util.StringUtils.fromUTF16",Jc);
93
- function Mc(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return Hc(c);if(254==c[0]&&255==c[1])return Jc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Jc(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return Jc(b,!1);if(0==c[1]&&0==c[3])return Jc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return Hc(b);throw new G(2,2,2003);}z("shaka.util.StringUtils.fromBytesAutoDetect",Mc);
94
- function Nc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c.buffer}z("shaka.util.StringUtils.toUTF8",Nc);function Oc(b,c){for(var d=new Uint8Array(2*b.length),e=new DataView(d.buffer),f=0;f<b.length;++f)e.setUint16(2*f,b.charCodeAt(f),c);return d.buffer}z("shaka.util.StringUtils.toUTF16",Oc);
95
- function Ic(b){if(!Pc)for(var c=function(b){try{var c=new Uint8Array(b);Oa(c);return!0}catch(g){return!1}},d={size:65536};0<d.size;d={size:d.size},d.size/=2)if(c(d.size)){Pc=function(b){return function(c){for(var d="",e=0;e<c.length;e+=b.size)d+=String.fromCharCode.apply(String,Oa(c.subarray(e,e+b.size)));return d}}(d);break}return Pc(b)}var Pc=null;function Qc(b,c){var d=Ic(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}z("shaka.util.Uint8ArrayUtils.toBase64",Qc);function Rc(b){b=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c}z("shaka.util.Uint8ArrayUtils.fromBase64",Rc);function Sc(b){for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2)c[d/2]=window.parseInt(b.substr(d,2),16);return c}
96
- z("shaka.util.Uint8ArrayUtils.fromHex",Sc);function Tc(b){for(var c="",d=0;d<b.length;++d){var e=b[d].toString(16);1==e.length&&(e="0"+e);c+=e}return c}z("shaka.util.Uint8ArrayUtils.toHex",Tc);function Uc(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;for(var d=0;d<b.length;++d)if(b[d]!=c[d])return!1;return!0}z("shaka.util.Uint8ArrayUtils.equal",Uc);
97
- function Vc(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}z("shaka.util.Uint8ArrayUtils.concat",Vc);function Wc(b){var c=this;this.D=b;this.w=new Set;this.u=this.j=null;this.K=!1;this.a=null;this.l=new L;this.b=new Map;this.v=[];this.o=new I;this.f=null;this.g=function(d){c.o.reject(d);b.onError(d)};this.ea=new Map;this.L=new Map;this.I=new F(function(){return Xc(c)});this.c=!1;this.W=new I;this.F=!1;this.H=[];this.ba=!1;this.U=(new F(function(){Yc(c)})).Na(1);this.o["catch"](function(){})}p=Wc.prototype;
98
- p.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:if(b.c)return u(d,b.W,0);b.c=!0;return u(d,Zc(b),4);case 4:b.W.resolve(),d.C(0)}})})};
99
- function Zc(b){return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return b.l.release(),b.l=null,b.o.reject(),b.U.stop(),b.U=null,b.I.stop(),b.I=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return t(function k(){return y(k,function(d){switch(d.s){case 1:return za(d,2),u(d,$c(b),4);case 4:Ba(d,0);break;case 2:Ca(d),v(d)}})})})})),2);case 2:if(!b.u){d.C(3);break}za(d,4);return u(d,b.u.setMediaKeys(null),6);case 6:Ba(d,
100
- 5);break;case 4:Ca(d);case 5:b.u=null;case 3:b.a=null,b.w.clear(),b.j=null,b.v=[],b.f=null,b.g=null,b.D=null,v(d)}})})}p.configure=function(b){this.f=b};function ad(b,c,d){b.v=[];b.F=d;return bd(b,c)}function cd(b,c,d){b.v=d;b.F=0<d.length;return bd(b,c)}
101
- function dd(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return ed(b,h)}
102
- function bd(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=vc(b.f.servers);fd(c,e)}var f=gd(b);if(f){var g=r(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=r(c);for(e=f.next();!e.done;e=f.next())for(e=r(e.value.drmInfos),g=e.next();!g.done;g=e.next())hd(g.value,vc(b.f.servers),vc(b.f.advanced||{}));e=id(b,c);if(!e.size)return b.K=!0,Promise.resolve();e=ed(b,e);return d?e:e["catch"](function(){})}
103
- p.Wb=function(b){var c=this;if(!this.j)return this.l.wa(b,"encrypted",function(){c.g(new G(2,6,6010))}),Promise.resolve();this.u=b;this.l.wa(this.u,"play",function(){for(var b=0;b<c.H.length;b++)jd(c,c.H[b]);c.ba=!0;c.H=[]});b=this.u.setMediaKeys(this.j);b=b["catch"](function(b){return Promise.reject(new G(2,6,6003,b.message))});var d=kd(this);return Promise.all([b,d]).then(function(){if(c.c)return Promise.reject();ld(c);c.a.initData.length||c.v.length||c.l.m(c.u,"encrypted",function(b){return md(c,
104
- b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.c)return Promise.reject(b)})};function kd(b){return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(!(b.j&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.C(0);break}za(d,3);return u(d,b.j.setServerCertificate(b.a.serverCertificate),5);case 5:Ba(d,0);break;case 3:return e=Ca(d),d["return"](Promise.reject(new G(2,6,6004,e.message)))}})})}
105
- function nd(b,c){return t(function e(){var f,g,h;return y(e,function(e){switch(e.s){case 1:return u(e,od(b,c),2);case 2:f=e.A;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.Pa=new I,g.push(h.Pa);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function ld(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return pd(b,c.initDataType,c.initData)});b.v.forEach(function(c){return od(b,c)});c.length||b.v.length||b.o.resolve();return b.o}
106
- function md(b,c,d){var e=b.b.values();e=r(e);for(var f=e.next();!f.done;f=e.next())if(Uc(d,f.value.initData))return;pd(b,c,d)}p.keySystem=function(){return this.a?this.a.keySystem:""};function qd(b,c){return Ec("Edge/")?!0:b.w.has(c)}function rd(b){b=b.b.keys();b=db(b,function(b){return b.sessionId});return Array.from(b)}p.Bc=function(){var b=Infinity,c=this.b.keys();c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
107
- function id(b,c){for(var d=new Set,e=r(c),f=e.next();!f.done;f=e.next()){var g=r(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=r(d);for(f=e.next();!f.done;f=e.next())hd(f.value,vc(b.f.servers),vc(b.f.advanced||{}));g=b.F?"required":"optional";var h=b.F?["persistent-license"]:["temporary"];e=new Map;d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
108
- label:f.keySystem,drmInfos:[]});d=r(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?xc(g.mimeType,g.codecs):"",l=h?xc(h.mimeType,h.codecs):"",m=r(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var n=e.get(f.keySystem);n.drmInfos.push(f);f.distinctiveIdentifierRequired&&(n.distinctiveIdentifier="required");f.persistentStateRequired&&(n.persistentState="required");g&&n.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&n.videoCapabilities.push({robustness:f.videoRobustness||
75
+ 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,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,
76
+ NO_VIDEO_ELEMENT:7002,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,CAST_RECEIVER_APP_ID_MISSING:8007,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,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,
77
+ NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};function J(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}J.prototype.resolve=function(){};J.prototype.reject=function(){};function K(b,c){this.promise=b;this.we=c;this.a=!1}z("shaka.util.AbortableOperation",K);function Ub(b){return new K(Promise.reject(b),function(){return Promise.resolve()})}K.failed=Ub;function Vb(){var b=Promise.reject(new I(2,7,7001));b["catch"](function(){});return new K(b,function(){return Promise.resolve()})}K.aborted=Vb;function Wb(b){return new K(Promise.resolve(b),function(){return Promise.resolve()})}K.completed=Wb;
78
+ function Xb(b){return new K(b,function(){return b["catch"](function(){})})}K.notAbortable=Xb;K.prototype.abort=function(){this.a=!0;return this.we()};K.prototype.abort=K.prototype.abort;function Yb(b){return new K(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}K.all=Yb;K.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};K.prototype["finally"]=K.prototype["finally"];
79
+ K.prototype.aa=function(b,c){function d(){f.reject(new I(2,7,7001));return e.abort()}var e=this,f=new J;this.promise.then(function(c){e.a?f.reject(new I(2,7,7001)):b?d=Zb(b,c,f):f.resolve(c)},function(b){c?d=Zb(c,b,f):f.reject(b)});return new K(f,function(){return d()})};K.prototype.chain=K.prototype.aa;
80
+ function Zb(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function $b(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function ac(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function bc(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function cc(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
81
+ function dc(b,c,d){d||(d=ac);if(b.length!=c.length)return!1;c=c.slice();var e={};b=r(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function ec(){this.a=[]}function fc(b,c){b.a.push(c["finally"](function(){bc(b.a,c)}))}ec.prototype.destroy=function(){var b=[];this.a.forEach(function(c){c.promise["catch"](function(){});b.push(c.abort())});this.a=[];return Promise.all(b)};function L(b){cb.call(this);this.f=!1;this.g=new ec;this.a=new Set;this.b=new Set;this.c=b||null}Xa(L,cb);z("shaka.net.NetworkingEngine",L);var gc={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};L.RequestType=gc;L.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var hc={};function ic(b,c,d){d=d||3;var e=hc[b];if(!e||d>=e.priority)hc[b]={priority:d,Gg:c}}L.registerScheme=ic;L.unregisterScheme=function(b){delete hc[b]};L.prototype.Ig=function(b){this.a.add(b)};
82
+ L.prototype.registerRequestFilter=L.prototype.Ig;L.prototype.fh=function(b){this.a["delete"](b)};L.prototype.unregisterRequestFilter=L.prototype.fh;L.prototype.uf=function(){this.a.clear()};L.prototype.clearAllRequestFilters=L.prototype.uf;L.prototype.Jg=function(b){this.b.add(b)};L.prototype.registerResponseFilter=L.prototype.Jg;L.prototype.gh=function(b){this.b["delete"](b)};L.prototype.unregisterResponseFilter=L.prototype.gh;L.prototype.vf=function(){this.b.clear()};
83
+ L.prototype.clearAllResponseFilters=L.prototype.vf;function jc(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null,sessionId:null}}L.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};L.prototype.destroy=L.prototype.destroy;
84
+ L.prototype.request=function(b,c){var d=this,e=new kc;if(this.f){var f=Promise.reject(new I(2,7,7001));f["catch"](function(){});return new lc(f,function(){return Promise.resolve()},e)}c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?$b(c.retryParameters):Sb();c.uris=$b(c.uris);f=mc(this,b,c);var g=f.aa(function(){return nc(d,b,c,new Rb(c.retryParameters,!1),0,null,e)}),h=g.aa(function(c){return oc(d,b,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-
85
+ k},function(){});var m=0;g.promise.then(function(){m=Date.now()},function(){});f=h.aa(function(c){var e=Date.now()-m,f=c.response;f.timeMs+=l;f.timeMs+=e;c.$f||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});f=new lc(f.promise,f.we,e);fc(this.g,f);return f};L.prototype.request=L.prototype.request;
86
+ function mc(b,c,d){var e=Wb(void 0),f={};b=r(b.a);for(var g=b.next();!g.done;f={Dd:f.Dd},g=b.next())f.Dd=g.value,e=e.aa(function(b){return function(){return b.Dd(c,d)}}(f));return e.aa(void 0,function(b){if(b&&7001==b.code)throw b;throw new I(2,1,1006,b);})}
87
+ function nc(b,c,d,e,f,g,h){var k=new yb(d.uris[f]),l=k.La,m=!1;l||(l=location.protocol,l=l.slice(0,-1),zb(k,l),d.uris[f]=k.toString());var n=(l=hc[l])?l.Gg:null;if(!n)return Ub(new I(2,1,1E3,k));var q;return Xb(Tb(e)).aa(function(){if(b.f)return Vb();q=Date.now();return n(d.uris[f],d,c,function(d,e,f){b.c&&1==c&&(b.c(d,e),m=!0,h.a=f)})}).aa(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-q);return{response:b,$f:m}},function(k){if(k&&7001==k.code)throw k;if(b.f)return Vb();if(k&&1==k.severity)return b.dispatchEvent(new A("retry",
88
+ {error:k instanceof I?k:null})),f=(f+1)%d.uris.length,nc(b,c,d,e,f,k,h);throw k||g;})}function oc(b,c,d){var e=Wb(void 0);b=r(b.b);for(var f=b.next();!f.done;f=b.next())e=e.aa(f.value.bind(null,c,d.response));return e.aa(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof I&&(c=b.severity);throw new I(c,1,1007,b);})}function kc(){this.a=0}L.NumBytesRemainingClass=kc;function lc(b,c,d){K.call(this,b,c);this.b=d}ua(lc,K);L.PendingRequest=lc;lc.all=Yb;lc.notAbortable=Xb;
89
+ lc.completed=Wb;lc.aborted=Vb;lc.failed=Ub;function pc(){}z("shaka.util.IReleasable",pc);pc.prototype.release=function(){};function M(){this.a=new bb}z("shaka.util.EventManager",M);M.prototype.release=function(){this.sb();this.a=null};M.prototype.release=M.prototype.release;M.prototype.m=function(b,c,d,e){this.a&&(b=new qc(b,c,d,e),this.a.push(c,b))};M.prototype.listen=M.prototype.m;M.prototype.ra=function(b,c,d,e){function f(e){g.oa(b,c,f);d(e)}var g=this;this.m(b,c,f,e)};M.prototype.listenOnce=M.prototype.ra;
90
+ M.prototype.oa=function(b,c,d){if(this.a){var e=this.a.get(c)||[];e=r(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.target!=b||d!=f.listener&&d||(f.oa(),this.a.remove(c,f))}};M.prototype.unlisten=M.prototype.oa;M.prototype.sb=function(){if(this.a){var b=this.a.getAll();b=r(b);for(var c=b.next();!c.done;c=b.next())c.value.oa();this.a.a={}}};M.prototype.removeAll=M.prototype.sb;
91
+ function qc(b,c,d,e){this.target=b;this.type=c;this.listener=d;this.a=rc(b,e);this.target.addEventListener(c,d,this.a)}qc.prototype.oa=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};qc.prototype.unlisten=qc.prototype.oa;function rc(b,c){if(void 0==c)return!1;if("boolean"==typeof c)return c;var d=new Set(["passive","capture"]);Object.keys(c).filter(function(b){return!d.has(b)});return sc(b)?c:c.capture||!1}
92
+ function sc(b){var c=tc;if(void 0==c){c=!1;try{var d={},e={get:function(){c=!0;return!1}};Object.defineProperty(d,"passive",e);Object.defineProperty(d,"capture",e);e=function(){};b.addEventListener("test",e,d);b.removeEventListener("test",e,d)}catch(f){c=!1}tc=c}return c||!1}var tc=void 0;function uc(b){b=new Uint8Array(b);if((new DataView(b.buffer,b.byteOffset,b.byteLength)).getUint32(0,!0)+4!=b.byteLength)throw new RangeError("Malformed FairPlay init data");b=vc(b.subarray(4),!0);return(new yb(b)).Ha}z("shaka.util.FairPlayUtils.defaultGetContentId",uc);
93
+ function wc(b,c,d){function e(b){(new DataView(g.buffer)).setUint32(h,b.byteLength,!0);h+=4;f(b)}function f(b){g.set(b,h);h+=b.byteLength}if(!d||!d.byteLength)throw new I(2,6,6015);c="string"==typeof c?new Uint8Array(xc(c,!0)):new Uint8Array(c);var g=new Uint8Array(8+b.byteLength+c.byteLength+d.byteLength),h=0;f(new Uint8Array(b));e(c);e(new Uint8Array(d));return g}z("shaka.util.FairPlayUtils.initDataTransform",wc);function yc(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function zc(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function Ac(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function Bc(b){var c=[b.mimeType];Cc.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function Dc(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var Cc=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Ec(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function Fc(b){return""!=Gc().canPlayType(b)}function Hc(b){return(navigator.userAgent||"").includes(b)}function Gc(){if(Ic)return Ic;Jc||(Jc=new F(function(){Ic=null}));(Ic=document.querySelector("video")||document.querySelector("audio"))||(Ic=document.createElement("video"));Jc.S(1);return Ic}var Jc=null,Ic=null;function Kc(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=Lc(b);b=escape(b);try{return decodeURIComponent(b)}catch(c){throw new I(2,2,2004);}}z("shaka.util.StringUtils.fromUTF8",Kc);
94
+ function vc(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new I(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f<b;f++)d[f]=e.getUint16(2*f,c);return Lc(d)}z("shaka.util.StringUtils.fromUTF16",vc);
95
+ function Oc(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return Kc(c);if(254==c[0]&&255==c[1])return vc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return vc(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return vc(b,!1);if(0==c[1]&&0==c[3])return vc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return Kc(b);throw new I(2,2,2003);}z("shaka.util.StringUtils.fromBytesAutoDetect",Oc);
96
+ function Pc(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c.buffer}z("shaka.util.StringUtils.toUTF8",Pc);function xc(b,c){for(var d=new Uint8Array(2*b.length),e=new DataView(d.buffer),f=0;f<b.length;++f)e.setUint16(2*f,b.charCodeAt(f),c);return d.buffer}z("shaka.util.StringUtils.toUTF16",xc);
97
+ function Lc(b){if(!Qc)for(var c=function(b){try{var c=new Uint8Array(b);Oa(c);return!0}catch(g){return!1}},d={size:65536};0<d.size;d={size:d.size},d.size/=2)if(c(d.size)){Qc=function(b){return function(c){for(var d="",e=0;e<c.length;e+=b.size)d+=String.fromCharCode.apply(String,Oa(c.subarray(e,e+b.size)));return d}}(d);break}return Qc(b)}var Qc=null;function Rc(b,c){var d=Lc(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}z("shaka.util.Uint8ArrayUtils.toBase64",Rc);function Sc(b){b=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c}z("shaka.util.Uint8ArrayUtils.fromBase64",Sc);function Tc(b){for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2)c[d/2]=window.parseInt(b.substr(d,2),16);return c}
98
+ z("shaka.util.Uint8ArrayUtils.fromHex",Tc);function Uc(b){for(var c="",d=0;d<b.length;++d){var e=b[d].toString(16);1==e.length&&(e="0"+e);c+=e}return c}z("shaka.util.Uint8ArrayUtils.toHex",Uc);function Vc(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;for(var d=0;d<b.length;++d)if(b[d]!=c[d])return!1;return!0}z("shaka.util.Uint8ArrayUtils.equal",Vc);
99
+ function Wc(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}z("shaka.util.Uint8ArrayUtils.concat",Wc);function Xc(b){var c=this;this.D=b;this.w=new Set;this.u=this.j=null;this.K=!1;this.a=null;this.l=new M;this.b=new Map;this.v=[];this.o=new J;this.c=null;this.g=function(d){c.o.reject(d);b.onError(d)};this.ea=new Map;this.M=new Map;this.I=new F(function(){return Yc(c)});this.f=!1;this.W=new J;this.F=!1;this.H=[];this.ba=!1;this.V=(new F(function(){Zc(c)})).Na(1);this.o["catch"](function(){})}p=Xc.prototype;
100
+ p.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:if(b.f)return u(d,b.W,0);b.f=!0;return u(d,$c(b),4);case 4:b.W.resolve(),d.C(0)}})})};
101
+ function $c(b){return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return b.l.release(),b.l=null,b.o.reject(),b.V.stop(),b.V=null,b.I.stop(),b.I=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return t(function k(){return y(k,function(d){switch(d.s){case 1:return Aa(d,2),u(d,ad(b),4);case 4:Ca(d,0);break;case 2:Da(d),v(d)}})})})})),2);case 2:if(!b.u){d.C(3);break}Aa(d,4);return u(d,b.u.setMediaKeys(null),6);case 6:Ca(d,
102
+ 5);break;case 4:Da(d);case 5:b.u=null;case 3:b.a=null,b.w.clear(),b.j=null,b.v=[],b.c=null,b.g=null,b.D=null,v(d)}})})}p.configure=function(b){this.c=b};function bd(b,c,d){b.v=[];b.F=d;return cd(b,c)}function dd(b,c,d){b.v=d;b.F=0<d.length;return cd(b,c)}
103
+ function ed(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return fd(b,h)}
104
+ function cd(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=yc(b.c.servers);gd(c,e)}var f=hd(b);if(f){var g=r(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=r(c);for(e=f.next();!e.done;e=f.next())for(e=r(e.value.drmInfos),g=e.next();!g.done;g=e.next())id(g.value,yc(b.c.servers),yc(b.c.advanced||{}));e=jd(b,c);if(!e.size)return b.K=!0,Promise.resolve();e=fd(b,e);return d?e:e["catch"](function(){})}
105
+ p.Wb=function(b){var c=this;if(!this.j)return this.l.ra(b,"encrypted",function(){c.g(new I(2,6,6010))}),Promise.resolve();this.u=b;this.l.ra(this.u,"play",function(){for(var b=0;b<c.H.length;b++)kd(c,c.H[b]);c.ba=!0;c.H=[]});b=this.u.setMediaKeys(this.j);b=b["catch"](function(b){return Promise.reject(new I(2,6,6003,b.message))});var d=ld(this);return Promise.all([b,d]).then(function(){if(c.f)return Promise.reject();md(c);c.a.initData.length||c.v.length||c.l.m(c.u,"encrypted",function(b){return nd(c,
106
+ b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.f)return Promise.reject(b)})};function ld(b){return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(!(b.j&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.C(0);break}Aa(d,3);return u(d,b.j.setServerCertificate(b.a.serverCertificate),5);case 5:Ca(d,0);break;case 3:return e=Da(d),d["return"](Promise.reject(new I(2,6,6004,e.message)))}})})}
107
+ function od(b,c){return t(function e(){var f,g,h;return y(e,function(e){switch(e.s){case 1:return u(e,pd(b,c),2);case 2:f=e.A;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.Oa=new J,g.push(h.Oa);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function md(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return qd(b,c.initDataType,c.initData)});b.v.forEach(function(c){return pd(b,c)});c.length||b.v.length||b.o.resolve();return b.o}
108
+ function nd(b,c,d){var e=b.b.values();e=r(e);for(var f=e.next();!f.done;f=e.next())if(Vc(d,f.value.initData))return;qd(b,c,d)}p.keySystem=function(){return this.a?this.a.keySystem:""};function rd(b,c){return Hc("Edge/")?!0:b.w.has(c)}function sd(b){b=b.b.keys();b=db(b,function(b){return b.sessionId});return Array.from(b)}p.Bc=function(){var b=Infinity,c=this.b.keys();c=r(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
109
+ function jd(b,c){for(var d=new Set,e=r(c),f=e.next();!f.done;f=e.next()){var g=r(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=r(d);for(f=e.next();!f.done;f=e.next())id(f.value,yc(b.c.servers),yc(b.c.advanced||{}));g=b.F?"required":"optional";var h=b.F?["persistent-license"]:["temporary"];e=new Map;d=r(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
110
+ label:f.keySystem,drmInfos:[]});d=r(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?Ac(g.mimeType,g.codecs):"",l=h?Ac(h.mimeType,h.codecs):"",m=r(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var n=e.get(f.keySystem);n.drmInfos.push(f);f.distinctiveIdentifierRequired&&(n.distinctiveIdentifier="required");f.persistentStateRequired&&(n.persistentState="required");g&&n.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&n.videoCapabilities.push({robustness:f.videoRobustness||
109
111
  "",contentType:l})}}return e}
110
- function ed(b,c){if(1==c.size&&c.has(""))return Promise.reject(new G(2,6,6E3));for(var d=r(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new I;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.c)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.bind(b));
111
- f=f["catch"](function(){return Promise.reject(new G(2,6,6001))});f=f.then(function(b){if(this.c)return Promise.reject();this.w.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=r(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.w.add(d.value.contentType);e=r(e);for(d=e.next();!d.done;d=e.next())this.w.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],n=[],q=[];sd(d.drmInfos,f,g,n,q);this.a={keySystem:e,licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==
112
- d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:n,keyIds:q};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new G(2,6,6012,this.a.keySystem))}.bind(b)).then(function(b){if(this.c)return Promise.reject();this.j=b;this.K=!0}.bind(b))["catch"](function(b){if(!this.c)return this.a=
113
- null,this.w.clear(),b instanceof G?Promise.reject(b):Promise.reject(new G(2,6,6002,b.message))}.bind(b));d.reject();return f}
114
- function gd(b){b=vc(b.f.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Sc(e),g=Sc(b);f={kty:"oct",kid:Qc(f,!1),k:Qc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(Nc(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
112
+ function fd(b,c){if(1==c.size&&c.has(""))return Promise.reject(new I(2,6,6E3));for(var d=r(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new J;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.f)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.bind(b));
113
+ f=f["catch"](function(){return Promise.reject(new I(2,6,6001))});f=f.then(function(b){if(this.f)return Promise.reject();this.w.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=r(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.w.add(d.value.contentType);e=r(e);for(d=e.next();!d.done;d=e.next())this.w.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],n=[],q=[];td(d.drmInfos,f,g,n,q);this.a={keySystem:e,licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==
114
+ d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:n,keyIds:q};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new I(2,6,6012,this.a.keySystem))}.bind(b)).then(function(b){if(this.f)return Promise.reject();this.j=b;this.K=!0}.bind(b))["catch"](function(b){if(!this.f)return this.a=
115
+ null,this.w.clear(),b instanceof I?Promise.reject(b):Promise.reject(new I(2,6,6002,b.message))}.bind(b));d.reject();return f}
116
+ function hd(b){b=yc(b.c.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Tc(e),g=Tc(b);f={kty:"oct",kid:Rc(f,!1),k:Rc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(Pc(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
115
117
  initData:e,keyIds:[]}}
116
- function od(b,c){try{var d=b.j.createSession("persistent-license")}catch(g){var e=new G(2,6,6005,g.message);b.g(e);return Promise.reject(e)}b.l.m(d,"message",b.De.bind(b));b.l.m(d,"keystatuseschange",b.Be.bind(b));var f={initData:null,loaded:!1,ud:Infinity,Pa:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.c)return Promise.reject();if(b)return f.loaded=!0,td(this)&&this.o.resolve(),d;this.b["delete"](d);this.g(new G(2,6,6013))}.bind(b),function(b){this.c||(this.b["delete"](d),this.g(new G(2,
118
+ function pd(b,c){try{var d=b.j.createSession("persistent-license")}catch(g){var e=new I(2,6,6005,g.message);b.g(e);return Promise.reject(e)}b.l.m(d,"message",b.Fe.bind(b));b.l.m(d,"keystatuseschange",b.De.bind(b));var f={initData:null,loaded:!1,vd:Infinity,Oa:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.f)return Promise.reject();if(b)return f.loaded=!0,ud(this)&&this.o.resolve(),d;this.b["delete"](d);this.g(new I(2,6,6013))}.bind(b),function(b){this.f||(this.b["delete"](d),this.g(new I(2,
117
119
  6,6005,b.message)))}.bind(b))}
118
- function pd(b,c,d){try{var e=b.F?b.j.createSession("persistent-license"):b.j.createSession()}catch(f){b.g(new G(2,6,6005,f.message));return}b.l.m(e,"message",b.De.bind(b));b.l.m(e,"keystatuseschange",b.Be.bind(b));b.b.set(e,{initData:d,loaded:!1,ud:Infinity,Pa:null});e.generateRequest(c,d.buffer)["catch"](function(c){if(!b.c){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new G(2,6,6006,c.message,c,d))}})}
119
- p.De=function(b){this.f.delayLicenseRequestUntilPlayed&&this.u.paused&&!this.ba?this.H.push(b):jd(this,b)};
120
- function jd(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=kc([f],b.f.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||ud(f);b.a.keySystem.startsWith("com.apple.fps")&&vd(f);b.D.Jb.request(2,f).promise.then(function(b){if(this.c)return Promise.reject();
121
- this.a.keySystem.startsWith("com.apple.fps")&&wd(b);return d.update(b.data).then(function(){var b=this;this.D.onEvent(new B("drmsessionupdate"));e&&(e.Pa&&e.Pa.resolve(),(new F(function(){e.loaded=!0;td(b)&&b.o.resolve()})).S(xd))}.bind(this))}.bind(b),function(b){this.c||(b=new G(2,6,6007,b),this.g(b),e&&e.Pa&&e.Pa.reject(b))}.bind(b))["catch"](function(b){this.c||(b=new G(2,6,6008,b.message),this.g(b),e&&e.Pa&&e.Pa.reject(b))}.bind(b))}
122
- function ud(b){var c=Jc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector("value").textContent;b.body=Rc(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
123
- function vd(b){var c=new Uint8Array(b.body);c="spc="+Qc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Nc(c)}function wd(b){try{var c=Hc(b.data)}catch(d){return}c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Rc(c).buffer}
124
- p.Be=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!Ec("Tizen")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=Tc(new Uint8Array(e));
125
- this.ea.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Pa&&(this.b["delete"](b),b.close()["catch"](function(){}));td(this)&&(this.o.resolve(),this.I.S(yd))};function Xc(b){var c=b.ea,d=b.L;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new G(2,6,6014));b.D.Hc(wc(d))}
126
- function zd(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.s){case 1:return za(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.A,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,Ec("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Ba(h,0);break;case 2:Ca(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
127
- persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return wc(e)})}
128
- function Ad(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!qd(b,xc(d.mimeType,d.codecs))||e&&e.encrypted&&!qd(b,xc(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
129
- function Bd(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;e<b.length;e++)for(var f=0;f<c.length;f++)if(b[e].keySystem==c[f].keySystem){var g=b[e];f=c[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);var k=[];k=k.concat(g.keyIds);k=k.concat(f.keyIds);d.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||
130
- f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}function Yc(b){b.b.forEach(function(c,d){var e=c.ud,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.D.onExpirationUpdated(d.sessionId,f),c.ud=f)})}function td(b){b=b.b.values();return eb(b,function(b){return b.loaded})}
131
- function fd(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=r(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
132
- function sd(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return Uc(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&Uc(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
133
- function hd(b,c,d){if(b.keySystem&&("org.w3.clearkey"!=b.keySystem||!b.licenseServerUri)){c.size&&(c=c.get(b.keySystem)||"",b.licenseServerUri=c);b.keyIds||(b.keyIds=[]);if(d=d.get(b.keySystem))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||
134
- (b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function $c(b){return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return e=new Promise(function(b){(new F(b)).S(Cd)}),u(d,Promise.race([b.close().then(function(){return!0}),e.then(function(){return!1})]),2);case 2:v(d)}})})}var Cd=1,xd=5,yd=.5;function Dd(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}Dd.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};Dd.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};Dd.prototype.c=function(){this.a.resetCaptionStream()};function Ed(){}Ed.prototype.init=function(){};Ed.prototype.b=function(){};Ed.prototype.c=function(){};function Fd(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function Gd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function Hd(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}
135
- function Id(b){if(!b)return[];for(var c=[],d=0;d<b.length;d++)c.push({start:b.start(d),end:b.end(d)});return c};var Jd={uf:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},Uc:function(b,c){return b.concat(c)},Fc:function(){},Ya:function(b){return null!=b}};function Kd(b,c){if(0==c.length)return b;var d=c.map(function(b){return new yb(b)});return b.map(function(b){return new yb(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(Jd.Uc,[]).map(function(b){return b.toString()})}function Ld(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var Md={fb:"video",Ub:"audio",Ga:"text",lh:"application"},Nd=1/15;function Od(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.l.bind(this));this.a.on("done",this.j.bind(this))}Od.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function Pd(b,c){return window.muxjs&&"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(Qd(c,b)):MediaSource.isTypeSupported(Qd("audio",b))||MediaSource.isTypeSupported(Qd("video",b)):!1}
136
- function Qd(b,c){var d=c.replace(/mp2t/i,"mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Rd(b,c){b.f=!0;b.b=new I;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new G(2,3,3018));return b.b}
137
- Od.prototype.l=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};Od.prototype.j=function(){var b={data:Vc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Sd(b,c,d){this.startTime=b;this.direction=Ud;this.endTime=c;this.payload=d;this.region=new Vd;this.position=null;this.positionAlign=Wd;this.size=100;this.textAlign=Xd;this.writingMode=Yd;this.lineInterpretation=Zd;this.line=null;this.lineHeight="";this.lineAlign=$d;this.displayAlign=ae;this.fontSize=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=be;this.fontStyle=ce;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}z("shaka.text.Cue",Sd);
138
- var Wd="auto";Sd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Wd};var Xd="center",de={LEFT:"left",RIGHT:"right",CENTER:Xd,START:"start",END:"end"};Sd.textAlign=de;var ae="after",ee={BEFORE:"before",CENTER:"center",AFTER:ae};Sd.displayAlign=ee;var Ud="ltr";Sd.direction={HORIZONTAL_LEFT_TO_RIGHT:Ud,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Yd="horizontal-tb";Sd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Yd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
139
- var Zd=0;Sd.lineInterpretation={LINE_NUMBER:Zd,PERCENTAGE:1};var $d="start",fe={CENTER:"center",START:$d,END:"end"};Sd.lineAlign=fe;var be=400;Sd.fontWeight={NORMAL:be,BOLD:700};var ce="normal",ge={NORMAL:ce,ITALIC:"italic",OBLIQUE:"oblique"};Sd.fontStyle=ge;Sd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
140
- function Vd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=he;this.scroll=ie}z("shaka.text.CueRegion",Vd);var he=1;Vd.units={PX:0,PERCENTAGE:he,LINES:2};var ie="";Vd.scrollMode={NONE:ie,UP:"up"};function je(b){this.g=null;this.c=b;this.f=this.u=0;this.j=Infinity;this.b=this.a=null;this.o="";this.l=new Map}var ke={};z("shaka.text.TextEngine.registerParser",function(b,c){ke[b]=c});z("shaka.text.TextEngine.unregisterParser",function(b){delete ke[b]});function le(b){return ke[b]||window.muxjs&&"application/cea-608"==b?!0:!1}je.prototype.destroy=function(){this.c=this.g=null;this.l.clear();return Promise.resolve()};function me(b,c){"application/cea-608"!=c&&(b.g=new ke[c])}
141
- je.prototype.ed=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new G(2,2,2009,d);}};
142
- function ne(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.u,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.j}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.j)}}.bind(b))}
143
- je.prototype.remove=function(b,c){return Promise.resolve().then(function(){!this.c||!this.c.remove(b,c)||null==this.a||c<=this.a||b>=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&c<this.b?this.a=c:b>this.a&&c>=this.b&&(this.b=b))}.bind(this))};je.prototype.pf=function(b){this.c.append(b)};je.prototype.appendCues=je.prototype.pf;
144
- je.prototype.Pc=function(b,c){this.o=b;var d=this.l.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};je.prototype.setSelectedClosedCaptionId=je.prototype.Pc;
145
- function oe(b,c,d,e,f){var g=d+" "+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.j&&(l=new Sd(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.o&&b.c.append([l]))}f=r(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.l.has(g)||b.l.set(g,new Map),c=r(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
146
- b.l.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.j))};function pe(b,c,d){this.f=b;this.g=d;this.b={};this.a=null;this.c={};this.l=new L;this.w=!1;this.o={};this.u=c;b=this.v=new I;c=new MediaSource;this.l.wa(c,"sourceopen",b.resolve);this.f.src=qe(c);this.j=c}var qe=window.URL.createObjectURL;function re(b){var c=xc(b.mimeType,b.codecs),d=yc(b);return le(c)||MediaSource.isTypeSupported(d)||Pd(c,b.type)}p=pe.prototype;
147
- p.destroy=function(){var b=this;this.w=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"](Jd.Fc));for(f=1;f<e.length;++f)e[f].p.reject()}this.a&&c.push(this.a.destroy());this.g&&c.push(this.g.destroy());for(var g in this.o)c.push(this.o[g].destroy());return Promise.all(c).then(function(){b.l&&(b.l.release(),b.l=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.j=null;b.a=null;b.g=null;b.b={};b.o={};b.u=null;b.c={}})};
148
- p.init=function(b,c){var d=this;return t(function f(){var g;return y(f,function(f){switch(f.s){case 1:return g=Md,u(f,d.v,2);case 2:b.forEach(function(b,f){var h=xc(b.mimeType,b.codecs);f==g.Ga?se(d,h):(!c&&MediaSource.isTypeSupported(h)||!Pd(h,f)||(d.o[f]=new Od,h=Qd(f,h)),h=d.j.addSourceBuffer(h),d.l.m(h,"error",d.Vg.bind(d,f)),d.l.m(h,"updateend",d.Nb.bind(d,f)),d.b[f]=h,d.c[f]=[])}),v(f)}})})};function se(b,c){b.a||(b.a=new je(b.g));me(b.a,c)}
149
- function te(b,c){if("text"==c)var d=b.a.a;else d=ue(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function ve(b,c){return"text"==c?b.a.b:Fd(ue(b,c))}function we(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=ue(b,c);return Hd(b,d)}
150
- p.ad=function(b){b.total=Id(this.f.buffered);b.audio=Id(ue(this,"audio"));b.video=Id(ue(this,"video"));b.text=[];if(this.a){var c=this.a.a,d=this.a.b;null!=c&&null!=d&&b.text.push({start:c,end:d})}};function ue(b,c){try{return b.b[c].buffered}catch(d){return null}}
151
- function xe(b,c,d,e,f,g){if("text"==c)return ne(b.a,d,e,f);if(b.o[c])return Rd(b.o[c],d).then(function(b){this.a||se(this,"text/vtt");b.captions&&oe(this.a,b.captions,e,f,this.b.video.timestampOffset);return ye(this,c,this.Xe.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||se(b,"text/vtt"),null==e&&null==f?b.u.init(d):b.u.b(d,function(c){c.length&&oe(b.a,c,e,f,b.b.video.timestampOffset)}));return ye(b,c,b.Xe.bind(b,c,d))}p.Pc=function(b){var c=ve(this,"video")||0;this.a.Pc(b,c)};
152
- p.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):ye(this,b,this.Ye.bind(this,b,c,d))};function ze(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.u.c();return b.a.remove(0,Infinity)}return ye(b,c,b.Ye.bind(b,c,0,b.j.duration))}p.flush=function(b){return"text"==b?Promise.resolve():ye(this,b,this.yf.bind(this,b))};
153
- function Ae(b,c,d,e,f){return"text"==c?(b.a.u=d,b=b.a,b.f=e,b.j=f,Promise.resolve()):Promise.all([ye(b,c,b.lf.bind(b,c)),ye(b,c,b.Ug.bind(b,c,d)),ye(b,c,b.Rg.bind(b,c,e,f))])}p.endOfStream=function(b){return Be(this,function(){b?this.j.endOfStream(b):this.j.endOfStream()}.bind(this))};p.Ma=function(b){return Be(this,function(){this.j.duration=b}.bind(this))};p.ia=function(){return this.j.duration};p.Xe=function(b,c){this.b[b].appendBuffer(c)};
154
- p.Ye=function(b,c,d){d<=c?this.Nb(b):this.b[b].remove(c,d)};p.lf=function(b){var c=this.b[b].appendWindowStart,d=this.b[b].appendWindowEnd;this.b[b].abort();this.b[b].appendWindowStart=c;this.b[b].appendWindowEnd=d;this.Nb(b)};p.yf=function(b){this.f.currentTime-=.001;this.Nb(b)};p.Ug=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.Nb(b)};p.Rg=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.Nb(b)};
155
- p.Vg=function(b){this.c[b][0].p.reject(new G(2,3,3014,this.f.error?this.f.error.code:0))};p.Nb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),Ce(this,b))};function ye(b,c,d){if(b.w)return Promise.reject();d={start:d,p:new I};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new G(2,3,3017,c)):d.p.reject(new G(2,3,3015,e)),Ce(b,c)}return d.p}
156
- function Be(b,c){if(b.w)return Promise.reject();var d=[],e;for(e in b.b){var f=new I,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new G(2,3,3015,l))}for(var d in this.b)Ce(this,d);return b}.bind(b),function(b){throw b;}.bind(b))}function Ce(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new G(2,3,3015,e)),Ce(b,c)}};function De(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function Ee(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=De(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}
157
- function Fe(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.K&&!Ad(b,e))return!1;var f=e.audio;e=e.video;return f&&!re(f)||e&&!re(e)||f&&c&&!Ge(f,c)||e&&d&&!Ge(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return le(xc(b.mimeType,b.codecs))})}function Ge(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0}
158
- function He(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "),
120
+ function qd(b,c,d){try{var e=b.F?b.j.createSession("persistent-license"):b.j.createSession()}catch(h){b.g(new I(2,6,6005,h.message));return}b.l.m(e,"message",b.Fe.bind(b));b.l.m(e,"keystatuseschange",b.De.bind(b));b.b.set(e,{initData:d,loaded:!1,vd:Infinity,Oa:null});try{if(b.c.initDataTransform)d=b.c.initDataTransform(d);else if(b.keySystem().startsWith("com.apple.fps")){var f=b.a.serverCertificate,g=uc(d);d=wc(d,g,f)}}catch(h){c=h;h instanceof I||(c=new I(2,6,6016,h));b.g(c);return}e.generateRequest(c,
121
+ d.buffer)["catch"](function(c){if(!b.f){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new I(2,6,6006,c.message,c,d))}})}p.Fe=function(b){this.c.delayLicenseRequestUntilPlayed&&this.u.paused&&!this.ba?this.H.push(b):kd(this,b)};
122
+ function kd(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.c.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=jc([f],b.c.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;f.sessionId=d.sessionId;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||vd(f);b.a.keySystem.startsWith("com.apple.fps")&&b.c.fairPlayTransform&&wd(f);b.D.Jb.request(2,
123
+ f).promise.then(function(b){if(this.f)return Promise.reject();this.a.keySystem.startsWith("com.apple.fps")&&this.c.fairPlayTransform&&xd(b);return d.update(b.data).then(function(){var b=this;this.D.onEvent(new A("drmsessionupdate"));e&&(e.Oa&&e.Oa.resolve(),(new F(function(){e.loaded=!0;ud(b)&&b.o.resolve()})).S(yd))}.bind(this))}.bind(b),function(b){this.f||(b=new I(2,6,6007,b),this.g(b),e&&e.Oa&&e.Oa.reject(b))}.bind(b))["catch"](function(b){this.f||(b=new I(2,6,6008,b.message),this.g(b),e&&e.Oa&&
124
+ e.Oa.reject(b))}.bind(b))}function vd(b){var c=vc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector("value").textContent;b.body=Sc(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
125
+ function wd(b){var c=new Uint8Array(b.body);c="spc="+Rc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Pc(c)}function xd(b){try{var c=Kc(b.data)}catch(d){return}c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6));try{c=JSON.parse(c).ckc}catch(d){}b.data=Sc(c).buffer}
126
+ p.De=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!Hc("Tizen")){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=Uc(new Uint8Array(e));
127
+ this.ea.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Oa&&(this.b["delete"](b),b.close()["catch"](function(){}));ud(this)&&(this.o.resolve(),this.I.S(zd))};function Yc(b){var c=b.ea,d=b.M;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new I(2,6,6014));b.D.Ic(zc(d))}
128
+ function Ad(){function b(b){return t(function h(){var c,f,m;return y(h,function(h){switch(h.s){case 1:return Aa(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.A,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,Hc("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Ca(h,0);break;case 2:Da(h),e.set(b,null),v(h)}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
129
+ persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return zc(e)})}
130
+ function Bd(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!rd(b,Ac(d.mimeType,d.codecs))||e&&e.encrypted&&!rd(b,Ac(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
131
+ function Cd(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;e<b.length;e++)for(var f=0;f<c.length;f++)if(b[e].keySystem==c[f].keySystem){var g=b[e];f=c[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);var k=[];k=k.concat(g.keyIds);k=k.concat(f.keyIds);d.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||
132
+ f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}function Zc(b){b.b.forEach(function(c,d){var e=c.vd,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.D.onExpirationUpdated(d.sessionId,f),c.vd=f)})}function ud(b){b=b.b.values();return eb(b,function(b){return b.loaded})}
133
+ function gd(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=r(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
134
+ function td(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return Vc(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&Vc(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
135
+ function id(b,c,d){if(b.keySystem&&("org.w3.clearkey"!=b.keySystem||!b.licenseServerUri)){c.size&&(c=c.get(b.keySystem)||"",b.licenseServerUri=c);b.keyIds||(b.keyIds=[]);if(d=d.get(b.keySystem))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||
136
+ (b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function ad(b){return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return e=new Promise(function(b){(new F(b)).S(Dd)}),u(d,Promise.race([b.close().then(function(){return!0}),e.then(function(){return!1})]),2);case 2:v(d)}})})}var Dd=1,yd=5,zd=.5;function Ed(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}Ed.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};Ed.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};Ed.prototype.c=function(){this.a.resetCaptionStream()};function Fd(){}Fd.prototype.init=function(){};Fd.prototype.b=function(){};Fd.prototype.c=function(){};function Gd(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function Hd(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function Id(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}
137
+ function Jd(b){if(!b)return[];for(var c=[],d=0;d<b.length;d++)c.push({start:b.start(d),end:b.end(d)});return c};var Kd={wf:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},Vc:function(b,c){return b.concat(c)},Gc:function(){},Ya:function(b){return null!=b}};function Ld(b,c){if(0==c.length)return b;var d=c.map(function(b){return new yb(b)});return b.map(function(b){return new yb(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(Kd.Vc,[]).map(function(b){return b.toString()})}function Md(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var Nd={fb:"video",Ub:"audio",Ga:"text",nh:"application"},Od=1/15;function Pd(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.l.bind(this));this.a.on("done",this.j.bind(this))}Pd.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function Qd(b,c){return window.muxjs&&"mp2t"==b.toLowerCase().split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(Rd(c,b)):MediaSource.isTypeSupported(Rd("audio",b))||MediaSource.isTypeSupported(Rd("video",b)):!1}
138
+ function Rd(b,c){var d=c.replace(/mp2t/i,"mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Sd(b,c){b.f=!0;b.b=new J;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new I(2,3,3018));return b.b}
139
+ Pd.prototype.l=function(b){this.c=b.captions;var c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};Pd.prototype.j=function(){var b={data:Wc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function Td(b,c,d){this.startTime=b;this.direction=Vd;this.endTime=c;this.payload=d;this.region=new Wd;this.position=null;this.positionAlign=Xd;this.size=100;this.textAlign=Yd;this.writingMode=Zd;this.lineInterpretation=$d;this.line=null;this.lineHeight="";this.lineAlign=ae;this.displayAlign=be;this.fontSize=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=ce;this.fontStyle=de;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}z("shaka.text.Cue",Td);
140
+ var Xd="auto";Td.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Xd};var Yd="center",ee={LEFT:"left",RIGHT:"right",CENTER:Yd,START:"start",END:"end"};Td.textAlign=ee;var be="after",fe={BEFORE:"before",CENTER:"center",AFTER:be};Td.displayAlign=fe;var Vd="ltr";Td.direction={HORIZONTAL_LEFT_TO_RIGHT:Vd,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Zd="horizontal-tb";Td.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Zd,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
141
+ var $d=0;Td.lineInterpretation={LINE_NUMBER:$d,PERCENTAGE:1};var ae="start",ge={CENTER:"center",START:ae,END:"end"};Td.lineAlign=ge;var ce=400;Td.fontWeight={NORMAL:ce,BOLD:700};var de="normal",he={NORMAL:de,ITALIC:"italic",OBLIQUE:"oblique"};Td.fontStyle=he;Td.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
142
+ function Wd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=ie;this.scroll=je}z("shaka.text.CueRegion",Wd);var ie=1;Wd.units={PX:0,PERCENTAGE:ie,LINES:2};var je="";Wd.scrollMode={NONE:je,UP:"up"};function ke(b){this.g=null;this.c=b;this.f=this.u=0;this.j=Infinity;this.b=this.a=null;this.o="";this.l=new Map}var le={};z("shaka.text.TextEngine.registerParser",function(b,c){le[b]=c});z("shaka.text.TextEngine.unregisterParser",function(b){delete le[b]});function me(b){return le[b]||window.muxjs&&"application/cea-608"==b?!0:!1}ke.prototype.destroy=function(){this.c=this.g=null;this.l.clear();return Promise.resolve()};function ne(b,c){"application/cea-608"!=c&&(b.g=new le[c])}
143
+ ke.prototype.gd=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new I(2,2,2009,d);}};
144
+ function oe(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.u,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.j}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.j)}}.bind(b))}
145
+ ke.prototype.remove=function(b,c){return Promise.resolve().then(function(){!this.c||!this.c.remove(b,c)||null==this.a||c<=this.a||b>=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&c<this.b?this.a=c:b>this.a&&c>=this.b&&(this.b=b))}.bind(this))};ke.prototype.rf=function(b){this.c.append(b)};ke.prototype.appendCues=ke.prototype.rf;
146
+ ke.prototype.Qc=function(b,c){this.o=b;var d=this.l.get(b);if(d)for(var e=r(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};ke.prototype.setSelectedClosedCaptionId=ke.prototype.Qc;
147
+ function pe(b,c,d,e,f){var g=d+" "+e,h=new Map;c=r(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.j&&(l=new Td(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.o&&b.c.append([l]))}f=r(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.l.has(g)||b.l.set(g,new Map),c=r(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
148
+ b.l.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.j))};function qe(b,c,d){this.f=b;this.g=d;this.b={};this.a=null;this.c={};this.l=new M;this.w=!1;this.o={};this.u=c;b=this.v=new J;c=new MediaSource;this.l.ra(c,"sourceopen",b.resolve);this.f.src=re(c);this.j=c}var re=window.URL.createObjectURL;function se(b){var c=Ac(b.mimeType,b.codecs),d=Bc(b);return me(c)||MediaSource.isTypeSupported(d)||Qd(c,b.type)}p=qe.prototype;
149
+ p.destroy=function(){var b=this;this.w=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"](Kd.Gc));for(f=1;f<e.length;++f)e[f].p.reject()}this.a&&c.push(this.a.destroy());this.g&&c.push(this.g.destroy());for(var g in this.o)c.push(this.o[g].destroy());return Promise.all(c).then(function(){b.l&&(b.l.release(),b.l=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.j=null;b.a=null;b.g=null;b.b={};b.o={};b.u=null;b.c={}})};
150
+ p.init=function(b,c){var d=this;return t(function f(){var g;return y(f,function(f){switch(f.s){case 1:return g=Nd,u(f,d.v,2);case 2:b.forEach(function(b,f){var h=Ac(b.mimeType,b.codecs);f==g.Ga?te(d,h):(!c&&MediaSource.isTypeSupported(h)||!Qd(h,f)||(d.o[f]=new Pd,h=Rd(f,h)),h=d.j.addSourceBuffer(h),d.l.m(h,"error",d.Xg.bind(d,f)),d.l.m(h,"updateend",d.Nb.bind(d,f)),d.b[f]=h,d.c[f]=[])}),v(f)}})})};function te(b,c){b.a||(b.a=new ke(b.g));ne(b.a,c)}
151
+ function ue(b){return b.j?"ended"==b.j.readyState:!0}function ve(b,c){if("text"==c)var d=b.a.a;else d=we(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function xe(b,c){return"text"==c?b.a.b:Gd(we(b,c))}function ye(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=we(b,c);return Id(b,d)}
152
+ p.cd=function(b){b.total=Jd(this.f.buffered);b.audio=Jd(we(this,"audio"));b.video=Jd(we(this,"video"));b.text=[];if(this.a){var c=this.a.a,d=this.a.b;null!=c&&null!=d&&b.text.push({start:c,end:d})}};function we(b,c){try{return b.b[c].buffered}catch(d){return null}}
153
+ function ze(b,c,d,e,f,g){if("text"==c)return oe(b.a,d,e,f);if(b.o[c])return Sd(b.o[c],d).then(function(b){this.a||te(this,"text/vtt");b.captions&&pe(this.a,b.captions,e,f,this.b.video.timestampOffset);return Ae(this,c,this.Ze.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||te(b,"text/vtt"),null==e&&null==f?b.u.init(d):b.u.b(d,function(c){c.length&&pe(b.a,c,e,f,b.b.video.timestampOffset)}));return Ae(b,c,b.Ze.bind(b,c,d))}p.Qc=function(b){var c=xe(this,"video")||0;this.a.Qc(b,c)};
154
+ p.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):Ae(this,b,this.$e.bind(this,b,c,d))};function Be(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.u.c();return b.a.remove(0,Infinity)}return Ae(b,c,b.$e.bind(b,c,0,b.j.duration))}p.flush=function(b){return"text"==b?Promise.resolve():Ae(this,b,this.Af.bind(this,b))};
155
+ function Ce(b,c,d,e,f){return"text"==c?(b.a.u=d,b=b.a,b.f=e,b.j=f,Promise.resolve()):Promise.all([Ae(b,c,b.nf.bind(b,c)),Ae(b,c,b.Wg.bind(b,c,d)),Ae(b,c,b.Tg.bind(b,c,e,f))])}p.endOfStream=function(b){return De(this,function(){ue(this)||(b?this.j.endOfStream(b):this.j.endOfStream())}.bind(this))};p.Ma=function(b){return De(this,function(){this.j.duration=b}.bind(this))};p.ia=function(){return this.j.duration};p.Ze=function(b,c){this.b[b].appendBuffer(c)};
156
+ p.$e=function(b,c,d){d<=c?this.Nb(b):this.b[b].remove(c,d)};p.nf=function(b){var c=this.b[b].appendWindowStart,d=this.b[b].appendWindowEnd;this.b[b].abort();this.b[b].appendWindowStart=c;this.b[b].appendWindowEnd=d;this.Nb(b)};p.Af=function(b){this.f.currentTime-=.001;this.Nb(b)};p.Wg=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.Nb(b)};p.Tg=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.Nb(b)};
157
+ p.Xg=function(b){this.c[b][0].p.reject(new I(2,3,3014,this.f.error?this.f.error.code:0))};p.Nb=function(b){var c=this.c[b][0];c&&(c.p.resolve(),Ee(this,b))};function Ae(b,c,d){if(b.w)return Promise.reject();d={start:d,p:new J};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new I(2,3,3017,c)):d.p.reject(new I(2,3,3015,e)),Ee(b,c)}return d.p}
158
+ function De(b,c){if(b.w)return Promise.reject();var d=[],e;for(e in b.b){var f=new J,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new I(2,3,3015,l))}for(var d in this.b)Ee(this,d);return b}.bind(b),function(b){throw b;}.bind(b))}function Ee(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new I(2,3,3015,e)),Ee(b,c)}};function Fe(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0}function Ge(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=Fe(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}
159
+ function He(b,c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.K&&!Bd(b,e))return!1;var f=e.audio;e=e.video;return f&&!se(f)||e&&!se(e)||f&&c&&!Ie(f,c)||e&&d&&!Ie(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return me(Ac(b.mimeType,b.codecs))})}function Ie(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0}
160
+ function Je(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "),
159
161
  audioCodec:e,videoCodec:f,primary:b.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||
160
- null,b.label=c.label,b.audioRoles=c.roles);return b}function Ie(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}
161
- function Je(b){b.__shaka_id||(b.__shaka_id=Ke++);return b.__shaka_id}var Ke=0;function Le(b){return{id:Je(b),active:!1,type:"",bandwidth:0,language:C(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
162
- function Me(b){return b.allowedByApplication&&b.allowedByKeySystem}function Ne(b){return b.filter(function(b){return Me(b)})}
163
- function Oe(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}
164
- function Pe(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=mb(C(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return C(b.language)==h}))}if(d){if(b=Qe(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(Jd.Uc,[]);return b.length?Qe(e,b[0]):e}
165
- function Qe(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Re(b,c,d){for(var e=0;e<d.length;e++)if(d[e].audio==b&&d[e].video==c)return d[e];return null}function Se(b){var c=[];b.audio&&c.push(b.audio);b.video&&c.push(b.video);return c};function M(){this.j=null;this.g=!1;this.b=new wb;this.c=[];this.l=!1;this.a=this.f=null}z("shaka.abr.SimpleAbrManager",M);M.prototype.stop=function(){this.j=null;this.g=!1;this.c=[];this.f=null};M.prototype.stop=M.prototype.stop;M.prototype.init=function(b){this.j=b};M.prototype.init=M.prototype.init;
166
- M.prototype.chooseVariant=function(){var b=Te(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Te(null,this.c),b=[b[0]]);for(var d=b[0]||null,e=0;e<b.length;++e){var f=b[e],g=(b[e+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.f=Date.now();return d};M.prototype.chooseVariant=M.prototype.chooseVariant;M.prototype.enable=function(){this.g=!0};
167
- M.prototype.enable=M.prototype.enable;M.prototype.disable=function(){this.g=!1};M.prototype.disable=M.prototype.disable;M.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;ub(d.b,f,e);ub(d.c,f,e)}if(null!=this.f&&this.g)a:{if(!this.l){if(!(128E3<=this.b.a))break a;this.l=!0}else if(Date.now()-this.f<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.j(d)}};
168
- M.prototype.segmentDownloaded=M.prototype.segmentDownloaded;M.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};M.prototype.getBandwidthEstimate=M.prototype.getBandwidthEstimate;M.prototype.setVariants=function(b){this.c=b};M.prototype.setVariants=M.prototype.setVariants;M.prototype.configure=function(b){this.a=b};M.prototype.configure=M.prototype.configure;
169
- function Te(b,c){b&&(c=c.filter(function(c){return De(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Ue(b,c){this.a=b;this.b=c}Ue.prototype.toString=function(){return"v"+this.a+"."+this.b};function Ve(b,c){var d=new Ue(2,6),e=We,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Xe(b,c,d,e){Za([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Ye(b,c,d,e){Ya([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var We=null;var Ze="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),$e="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),af=["loop","playbackRate"],bf=["pause","play"],cf="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),df={getAssetUri:2,
170
- getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},ef={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},ff=[["getConfiguration","configure"]],gf=[["isTextTrackVisible","setTextTrackVisibility"]],
171
- hf="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),jf=["attach","detach","load","unload"];
172
- function kf(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof B){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;f<d.length;++f)c.start.push(d.start(f)),c.end.push(d.end(f));else c=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
173
- d:0>d?"-Infinity":"Infinity":d;return c}})}function lf(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?mf(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function mf(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function nf(b,c,d,e,f,g){this.L=b;this.f=new F(c);this.K=d;this.o=!1;this.H=e;this.I=f;this.D=g;this.b=this.j=!1;this.F="";this.l=null;this.u=this.ye.bind(this);this.v=this.ng.bind(this);this.a={video:{},player:{}};this.w=0;this.c={};this.g=null}var of=!1,pf=null;p=nf.prototype;p.destroy=function(){qf(this);pf&&rf(this);this.f&&(this.f.stop(),this.f=null);this.I=this.H=null;this.b=this.j=!1;this.v=this.u=this.g=this.c=this.a=this.l=null;return Promise.resolve()};p.$=function(){return this.b};
174
- p.Nc=function(){return this.F};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.j=!0;this.f.Oa();var b=new chrome.cast.SessionRequest(this.L);b=new chrome.cast.ApiConfig(b,this.ze.bind(this),this.ug.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});of&&this.f.S(.02);(b=pf)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.ze(b):pf=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
175
- p.Fd=function(b){this.l=b;this.b&&sf({type:"appData",appData:this.l})};p.cast=function(b){if(!this.j)return Promise.reject(new G(1,8,8E3));if(!of)return Promise.reject(new G(1,8,8001));if(this.b)return Promise.reject(new G(1,8,8002));this.g=new I;chrome.cast.requestSession(this.wd.bind(this,b),this.xe.bind(this));return this.g};p.Yb=function(){this.b&&(qf(this),pf&&(rf(this),pf.stop(function(){},function(){}),pf=null))};
176
- p.get=function(b,c){if("video"==b){if(bf.includes(c))return this.Le.bind(this,b,c)}else if("player"==b){if(ef[c]&&!this.get("player","isLive")())return function(){};if(hf.includes(c))return this.Le.bind(this,b,c);if(jf.includes(c))return this.Jg.bind(this,b,c);if(df[c])return this.He.bind(this,b,c)}return this.He(b,c)};p.set=function(b,c,d){this.a[b][c]=d;sf({type:"set",targetName:b,property:c,value:d})};
177
- p.wd=function(b,c){pf=c;c.addUpdateListener(this.u);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.v);this.ye();sf({type:"init",initState:b,appData:this.l});this.g.resolve()};p.xe=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.g.reject(new G(2,8,c,b))};p.He=function(b,c){return this.a[b][c]};
178
- p.Le=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];sf({type:"call",targetName:b,methodName:c,args:e})};p.Jg=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new I;var g=this.w.toString();this.w++;this.c[g]=f;sf({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};p.ze=function(b){var c=this.D();this.g=new I;this.o=!0;this.wd(c,b)};p.ug=function(b){of="available"==b;this.f.Oa()};
179
- function rf(b){var c=pf;c.removeUpdateListener(b.u);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.v)}p.ye=function(){var b=pf?"connected"==pf.status:!1;if(this.b&&!b){this.I();for(var c in this.a)this.a[c]={};qf(this)}this.F=(this.b=b)?pf.receiver.friendlyName:"";this.f.Oa()};function qf(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new G(1,7,7E3))}}
180
- p.ng=function(b,c){var d=lf(c);switch(d.type){case "event":var e=d.event;this.H(d.targetName,new B(e.type,e));break;case "update":e=d.update;for(var f in e){d=this.a[f]||{};for(var g in e[f])d[g]=e[f][g]}this.o&&(this.K(),this.o=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new G(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function sf(b){b=kf(b);pf.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},$a)};function N(b,c,d){var e=this;cb.call(this);this.c=b;this.b=c;this.l=this.g=this.f=this.o=this.j=null;if(this.u=d)this.a=new nf(d,function(){return tf(e)},function(){return uf(e)},function(b,c){return vf(e,b,c)},function(){return wf(e)},function(){return xf(e)});yf(this)}Xa(N,cb);z("shaka.cast.CastProxy",N);
181
- N.prototype.destroy=function(b){b&&this.a&&this.a.Yb();this.l&&(this.l.release(),this.l=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.o=this.j=this.c=null;return Promise.all(b)};N.prototype.destroy=N.prototype.destroy;N.prototype.bc=function(){return this.j};N.prototype.getVideo=N.prototype.bc;N.prototype.Wa=function(){return this.o};N.prototype.getPlayer=N.prototype.Wa;N.prototype.Ud=function(){return this.a?this.a.j&&of:!1};
182
- N.prototype.canCast=N.prototype.Ud;N.prototype.$=function(){return this.a?this.a.$():!1};N.prototype.isCasting=N.prototype.$;N.prototype.Nc=function(){return this.a?this.a.Nc():""};N.prototype.receiverName=N.prototype.Nc;N.prototype.cast=function(){if(!this.a)throw new G(1,8,8007);var b=xf(this);return this.a.cast(b).then(function(){if(this.b)return this.b.Qd()}.bind(this))};N.prototype.cast=N.prototype.cast;N.prototype.Fd=function(b){this.a&&this.a.Fd(b)};N.prototype.setAppData=N.prototype.Fd;
183
- N.prototype.Ze=function(){if(this.a){var b=this.a;if(b.b){var c=b.D();chrome.cast.requestSession(b.wd.bind(b,c),b.xe.bind(b))}}};N.prototype.suggestDisconnect=N.prototype.Ze;
184
- N.prototype.Yd=function(b){var c=this;return t(function e(){return y(e,function(e){switch(e.s){case 1:if(b==c.u)return e["return"]();c.u=b;if(!c.a){e.C(2);break}c.a.Yb();return u(e,c.a.destroy(),3);case 3:c.a=null;case 2:c.a=new nf(b,function(){return tf(c)},function(){return uf(c)},function(b,e){return vf(c,b,e)},function(){return wf(c)},function(){return xf(c)}),c.a.init(),v(e)}})})};N.prototype.changeReceiverId=N.prototype.Yd;N.prototype.Yb=function(){this.a&&this.a.Yb()};
185
- N.prototype.forceDisconnect=N.prototype.Yb;function yf(b){b.a&&b.a.init();b.l=new L;Ze.forEach(function(b){this.l.m(this.c,b,this.jh.bind(this))}.bind(b));cf.forEach(function(b){this.l.m(this.b,b,this.Dg.bind(this))}.bind(b));b.j={};for(var c in b.c)Object.defineProperty(b.j,c,{configurable:!1,enumerable:!0,get:b.ih.bind(b,c),set:b.kh.bind(b,c)});b.o={};for(var d in b.b)Object.defineProperty(b.o,d,{configurable:!1,enumerable:!0,get:b.Ge.bind(b,d)});b.f=new cb;b.f.rc=b.j;b.g=new cb;b.g.rc=b.o}
186
- function xf(b){var c={video:{},player:{},playerAfterLoad:{},manifest:b.b.zc(),startTime:null};b.c.pause();af.forEach(function(b){c.video[b]=this.c[b]}.bind(b));b.c.ended||(c.startTime=b.c.currentTime);ff.forEach(function(b){var d=b[1];b=this.b[b[0]]();c.player[d]=b}.bind(b));gf.forEach(function(b){var d=b[1];b=this.b[b[0]]();c.playerAfterLoad[d]=b}.bind(b));return c}function tf(b){b.dispatchEvent(new B("caststatuschanged"))}function uf(b){b.f.dispatchEvent(new B(b.j.paused?"pause":"play"))}
187
- function wf(b){ff.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(b));var c=b.a.get("player","getAssetUri")(),d=b.a.get("video","ended"),e=Promise.resolve(),f=b.c.autoplay,g=null;d||(g=b.a.get("video","currentTime"));c&&(b.c.autoplay=!1,e=b.b.load(c,g));var h={};af.forEach(function(b){h[b]=this.a.get("video",b)}.bind(b));e.then(function(){b.c&&(af.forEach(function(b){this.c[b]=h[b]}.bind(b)),gf.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(b)),
188
- b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new B("error",{detail:c}))})}p=N.prototype;p.ih=function(b){if("addEventListener"==b)return this.f.addEventListener.bind(this.f);if("removeEventListener"==b)return this.f.removeEventListener.bind(this.f);if(this.a&&this.a.$()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a&&this.a.$()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
189
- p.kh=function(b,c){this.a&&this.a.$()?this.a.set("video",b,c):this.c[b]=c};p.jh=function(b){this.a&&this.a.$()||this.f.dispatchEvent(new B(b.type,b))};
190
- p.Ge=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.j}.bind(this);if("getSharedConfiguration"==b)return this.a?this.a.get("player","getConfiguration"):this.b.getConfiguration();if("getNetworkingEngine"==b)return this.b.Zb.bind(this.b);if(this.a&&this.a.$()){if("getManifest"==b||"drmInfo"==b)return function(){Za(b+"() does not work while casting!");
191
- return null};if("getManifestUri"==b)return Ve("getManifestUri",'Please use "getAssetUri" instead.'),this.Ge("getAssetUri");if("attach"==b||"detach"==b)return function(){Za(b+"() does not work while casting!");return Promise.resolve()}}return this.a&&this.a.$()&&0==Object.keys(this.a.a.video).length&&df[b]||!this.a||!this.a.$()?this.b[b].bind(this.b):this.a.get("player",b)};p.Dg=function(b){this.a&&this.a.$()||this.g.dispatchEvent(b)};
192
- function vf(b,c,d){b.a.$()&&("video"==c?b.f.dispatchEvent(d):"player"==c&&b.g.dispatchEvent(d))};function zf(b,c,d,e){var f=this;cb.call(this);this.a=b;this.b=c;this.c=new L;this.F={video:b,player:c};this.v=d||function(){};this.H=e||function(b){return b};this.w=!1;this.j=!0;this.g=0;this.u=!1;this.o=!0;this.l=this.f=null;this.D=new F(function(){Af(f)});Bf(this)}Xa(zf,cb);z("shaka.cast.CastReceiver",zf);zf.prototype.isConnected=function(){return this.w};zf.prototype.isConnected=zf.prototype.isConnected;zf.prototype.ag=function(){return this.j};zf.prototype.isIdle=zf.prototype.ag;
193
- zf.prototype.destroy=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return b.c&&(b.c.release(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),b.D&&(b.D.stop(),b.D=null),b.a=null,b.F=null,b.v=null,b.w=!1,b.j=!0,b.f=null,b.l=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),v(d)}})})};zf.prototype.destroy=zf.prototype.destroy;
194
- function Bf(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.Ce.bind(b);c.onSenderDisconnected=b.Ce.bind(b);c.onSystemVolumeChanged=b.xf.bind(b);b.l=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.l.onMessage=b.hg.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.wg.bind(b);c.start();Ze.forEach(function(b){this.c.m(this.a,b,this.Ie.bind(this,"video"))}.bind(b));cf.forEach(function(b){this.c.m(this.b,b,this.Ie.bind(this,"player"))}.bind(b));
195
- cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.Hd(3840,2160):b.b.Hd(1920,1080);b.c.m(b.a,"loadeddata",function(){this.u=!0}.bind(b));b.c.m(b.b,"loading",function(){this.j=!1;Cf(this)}.bind(b));b.c.m(b.a,"playing",function(){this.j=!1;Cf(this)}.bind(b));b.c.m(b.a,"pause",function(){Cf(this)}.bind(b));b.c.m(b.b,"unloading",function(){this.j=!0;Cf(this)}.bind(b));b.c.m(b.a,"ended",function(){var b=this;(new F(function(){b.a&&b.a.ended&&
196
- (b.j=!0,Cf(b))})).S(5)}.bind(b))}p=zf.prototype;p.Ce=function(){this.g=0;this.o=!0;this.w=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Cf(this)};function Cf(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new B("caststatuschanged")),Df(this)||Ef(this,0))}.bind(b))}
197
- function Ff(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.v(d);d=Promise.resolve();var f=b.a.autoplay;c.manifest&&(b.a.autoplay=!1,d=b.b.load(c.manifest,c.startTime));d.then(function(){if(b.b){for(var d in c.video)b.a[d]=c.video[d];for(var e in c.playerAfterLoad)b.b[e](c.playerAfterLoad[e]);b.a.autoplay=f;c.manifest&&(b.a.play(),Ef(b,0))}},function(c){b.b.dispatchEvent(new B("error",{detail:c}))})}p.Ie=function(b,c){this.b&&(Af(this),Gf(this,{type:"event",targetName:b,event:c},this.f))};
198
- function Af(b){b.D.S(.5);var c={video:{},player:{}};$e.forEach(function(b){c.video[b]=this.a[b]}.bind(b));if(b.b.V())for(var d in ef)0==b.g%ef[d]&&(c.player[d]=b.b[d]());for(var e in df)0==b.g%df[e]&&(c.player[e]=b.b[e]());if(d=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())c.video.volume=d.level,c.video.muted=d.muted;b.u&&(b.g+=1);Gf(b,{type:"update",update:c},b.f);Df(b)}function Df(b){return b.o&&(b.a.duration||b.b.V())?(Hf(b),b.o=!1,!0):!1}
199
- function Hf(b){var c={contentId:b.b.zc(),streamType:b.b.V()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};Ef(b,0,c)}p.xf=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&Gf(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);Gf(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
200
- p.wg=function(b){var c=lf(b.data);switch(c.type){case "init":this.g=0;this.u=!1;this.o=!0;Ff(this,c.initState,c.appData);Af(this);break;case "appData":this.v(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}}this.F[d][e]=c;break;case "call":d=this.F[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=
201
- c.targetName;e=c.methodName;"player"==d&&"load"==e&&(this.g=0,this.u=!1);f=c.id;b=b.senderId;var g=this.F[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.o=!0}.bind(this)));c.then(this.Se.bind(this,b,f,null),this.Se.bind(this,b,f))}};
202
- p.hg=function(b){var c=lf(b.data);switch(c.type){case "PLAY":this.a.play();Ef(this,0);break;case "PAUSE":this.a.pause();Ef(this,0);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(this.a.currentTime=Number(b));d&&"PLAYBACK_START"==d?(this.a.play(),Ef(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),Ef(this,0));break;case "STOP":this.b.Qd().then(function(){this.b&&Ef(this,0)}.bind(this));break;case "GET_STATUS":Ef(this,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=
203
- d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||Ef(this,0);break;case "LOAD":this.g=0;this.o=this.u=!1;b=c.media;d=c.currentTime;e=this.H(b.contentId);f=c.autoplay||!0;this.v(b.customData);f&&(this.a.autoplay=!0);this.b.load(e,d).then(function(){this.b&&Hf(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");Gf(this,{requestId:Number(c.requestId),type:d},
204
- this.l)}.bind(this));break;default:Gf(this,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.l)}};p.Se=function(b,c,d){this.b&&Gf(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function Gf(b,c,d,e){b.w&&(b=kf(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
205
- function Ef(b,c,d){var e=b.a.playbackRate;var f=If;f=b.j?f.IDLE:b.b.Gb()?f.df:b.a.paused?f.gf:f.hf;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);Gf(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.l)}var If={IDLE:"IDLE",hf:"PLAYING",df:"BUFFERING",gf:"PAUSED"};var O={yc:function(b,c){var d=O.X(b,c);return 1!=d.length?null:d[0]},be:function(b,c,d){b=O.ce(b,c,d);return 1!=b.length?null:b[0]},X:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},ce:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},Ac:function(b){return Array.prototype.every.call(b.childNodes,
206
- function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},O:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},Ag:function(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)},Ta:function(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);
207
- if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null},Lc:function(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null},parseInt:function(b){b=Number(b);return 0===b%1?b:null},Kc:function(b){b=Number(b);return 0===b%1&&0<b?b:null},Ob:function(b){b=Number(b);return 0===
208
- b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},wf:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1])/Number(c[2]):Number(b);return isNaN(b)?null:b},Fe:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},Ee:function(b,c){try{var d=Hc(b);return O.Fe(d,c)}catch(e){}}};var Jf=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
209
- function Kf(b,c,d){var e=Lf(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new G(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.Oe?(f=b.init||f,!1):!0}),g.length&&(b=Mf(f,c,g),0==b.length&&(b=[Ld("",f)])));if(e.length&&(d||!g.length))for(b=[],c=r(Jf.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(Ld(d,f));if(h=Array.from(h)[0]||null)for(c=r(b),d=c.next();!d.done;d=c.next())for(d=
210
- r(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{Zd:h,qh:f,drmInfos:b,ee:!0}}function Nf(b,c,d,e){var f=Kf(b,c,e);if(d.ee){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.ee=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new G(2,4,4008);return f.Zd||d.Zd}
211
- function Of(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function Pf(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
212
- function Mf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Jf.get(f.Oe);if(g){var h=Ld(g,f.init||b);if(g=Qf.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}
213
- var Qf=(new Map).set("com.widevine.alpha",function(b){return(b=O.be(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=O.be(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=Rc(b.textContent);b=Of(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=Jc(b.value,!0);return(b=O.Fe(b,"WRMHEADER"))?Pf(b):""});function Lf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=Rf(d.value))&&c.push(d);return c}
214
- function Rf(b){var c=b.getAttribute("schemeIdUri"),d=O.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=O.ce(b,"urn:mpeg:cenc:2013","pssh").map(O.Ac);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new G(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Rc(b),keyId:null}})}catch(g){throw new G(2,4,4007);}return{node:b,Oe:c,keyId:d,init:0<f.length?f:null}};function Sf(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);"Time"==c&&(f=Math.round(f));switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
162
+ null,b.label=c.label,b.audioRoles=c.roles);return b}function Ke(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}}
163
+ function Le(b){b.__shaka_id||(b.__shaka_id=Me++);return b.__shaka_id}var Me=0;function Ne(b){return{id:Le(b),active:!1,type:"",bandwidth:0,language:B(b.language),label:b.label,kind:b.kind,width:null,height:null,frameRate:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
164
+ function Oe(b){return b.allowedByApplication&&b.allowedByKeySystem}function Pe(b){return b.filter(function(b){return Oe(b)})}
165
+ function Qe(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}),e=new Map;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=f.audio.channelsCount;e.has(g)||e.set(g,[]);e.get(g).push(f)}d=Array.from(e.keys());if(0==d.length)return b;f=d.filter(function(b){return b<=c});return f.length?e.get(Math.max.apply(null,f)):e.get(Math.min.apply(null,d))}
166
+ function Re(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=mb(B(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return B(b.language)==h}))}if(d){if(b=Se(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(Kd.Vc,[]);return b.length?Se(e,b[0]):e}
167
+ function Se(b,c){return b.filter(function(b){return b.roles.includes(c)})}function Te(b,c,d){for(var e=0;e<d.length;e++)if(d[e].audio==b&&d[e].video==c)return d[e];return null}function Ue(b){var c=[];b.audio&&c.push(b.audio);b.video&&c.push(b.video);return c};function N(){this.j=null;this.g=!1;this.b=new wb;this.c=[];this.l=!1;this.a=this.f=null}z("shaka.abr.SimpleAbrManager",N);N.prototype.stop=function(){this.j=null;this.g=!1;this.c=[];this.f=null};N.prototype.stop=N.prototype.stop;N.prototype.init=function(b){this.j=b};N.prototype.init=N.prototype.init;
168
+ N.prototype.chooseVariant=function(){var b=Ve(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Ve(null,this.c),b=[b[0]]);for(var d=b[0]||null,e=0;e<b.length;++e){var f=b[e],g=(b[e+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.f=Date.now();return d};N.prototype.chooseVariant=N.prototype.chooseVariant;N.prototype.enable=function(){this.g=!0};
169
+ N.prototype.enable=N.prototype.enable;N.prototype.disable=function(){this.g=!1};N.prototype.disable=N.prototype.disable;N.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;ub(d.b,f,e);ub(d.c,f,e)}if(null!=this.f&&this.g)a:{if(!this.l){if(!(128E3<=this.b.a))break a;this.l=!0}else if(Date.now()-this.f<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.j(d)}};
170
+ N.prototype.segmentDownloaded=N.prototype.segmentDownloaded;N.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};N.prototype.getBandwidthEstimate=N.prototype.getBandwidthEstimate;N.prototype.setVariants=function(b){this.c=b};N.prototype.setVariants=N.prototype.setVariants;N.prototype.configure=function(b){this.a=b};N.prototype.configure=N.prototype.configure;
171
+ function Ve(b,c){b&&(c=c.filter(function(c){return Fe(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function We(b,c){this.a=b;this.b=c}We.prototype.toString=function(){return"v"+this.a+"."+this.b};function Xe(b,c){var d=new We(2,6),e=Ye,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Ze(b,c,d,e){Za([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function $e(b,c,d,e){Ya([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Ye=null;var af="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),bf="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),cf=["loop","playbackRate"],df=["pause","play"],ef="abrstatuschanged adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),ff={getAssetUri:2,
172
+ getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},gf={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},hf=[["getConfiguration","configure"]],jf=[["isTextTrackVisible","setTextTrackVisibility"]],
173
+ kf="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),lf=["attach","detach","load","unload"];
174
+ function mf(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof A){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;f<d.length;++f)c.start.push(d.start(f)),c.end.push(d.end(f));else c=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
175
+ d:0>d?"-Infinity":"Infinity":d;return c}})}function nf(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?of(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function of(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function pf(b,c,d,e,f,g){this.M=b;this.f=new F(c);this.K=d;this.o=!1;this.H=e;this.I=f;this.D=g;this.b=this.j=!1;this.F="";this.l=null;this.u=this.Ae.bind(this);this.v=this.pg.bind(this);this.a={video:{},player:{}};this.w=0;this.c={};this.g=null}var qf=!1,rf=null;p=pf.prototype;p.destroy=function(){sf(this);rf&&tf(this);this.f&&(this.f.stop(),this.f=null);this.I=this.H=null;this.b=this.j=!1;this.v=this.u=this.g=this.c=this.a=this.l=null;return Promise.resolve()};p.$=function(){return this.b};
176
+ p.Oc=function(){return this.F};p.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.j=!0;this.f.Ua();var b=new chrome.cast.SessionRequest(this.M);b=new chrome.cast.ApiConfig(b,this.Be.bind(this),this.wg.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});qf&&this.f.S(.02);(b=rf)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Be(b):rf=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
177
+ p.Gd=function(b){this.l=b;this.b&&uf({type:"appData",appData:this.l})};p.cast=function(b){if(!this.j)return Promise.reject(new I(1,8,8E3));if(!qf)return Promise.reject(new I(1,8,8001));if(this.b)return Promise.reject(new I(1,8,8002));this.g=new J;chrome.cast.requestSession(this.xd.bind(this,b),this.ze.bind(this));return this.g};p.Yb=function(){this.b&&(sf(this),rf&&(tf(this),rf.stop(function(){},function(){}),rf=null))};
178
+ p.get=function(b,c){if("video"==b){if(df.includes(c))return this.Ne.bind(this,b,c)}else if("player"==b){if(gf[c]&&!this.get("player","isLive")())return function(){};if(kf.includes(c))return this.Ne.bind(this,b,c);if(lf.includes(c))return this.Lg.bind(this,b,c);if(ff[c])return this.Je.bind(this,b,c)}return this.Je(b,c)};p.set=function(b,c,d){this.a[b][c]=d;uf({type:"set",targetName:b,property:c,value:d})};
179
+ p.xd=function(b,c){rf=c;c.addUpdateListener(this.u);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.v);this.Ae();uf({type:"init",initState:b,appData:this.l});this.g.resolve()};p.ze=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.g.reject(new I(2,8,c,b))};p.Je=function(b,c){return this.a[b][c]};
180
+ p.Ne=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];uf({type:"call",targetName:b,methodName:c,args:e})};p.Lg=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new J;var g=this.w.toString();this.w++;this.c[g]=f;uf({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};p.Be=function(b){var c=this.D();this.g=new J;this.o=!0;this.xd(c,b)};p.wg=function(b){qf="available"==b;this.f.Ua()};
181
+ function tf(b){var c=rf;c.removeUpdateListener(b.u);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.v)}p.Ae=function(){var b=rf?"connected"==rf.status:!1;if(this.b&&!b){this.I();for(var c in this.a)this.a[c]={};sf(this)}this.F=(this.b=b)?rf.receiver.friendlyName:"";this.f.Ua()};function sf(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new I(1,7,7E3))}}
182
+ p.pg=function(b,c){var d=nf(c);switch(d.type){case "event":var e=d.event;this.H(d.targetName,new A(e.type,e));break;case "update":e=d.update;for(var f in e){d=this.a[f]||{};for(var g in e[f])d[g]=e[f][g]}this.o&&(this.K(),this.o=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new I(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function uf(b){b=mf(b);rf.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},$a)};function O(b,c,d){var e=this;cb.call(this);this.c=b;this.b=c;this.l=this.g=this.f=this.o=this.j=null;if(this.u=d)this.a=new pf(d,function(){return vf(e)},function(){return wf(e)},function(b,c){return xf(e,b,c)},function(){return yf(e)},function(){return zf(e)});Af(this)}Xa(O,cb);z("shaka.cast.CastProxy",O);
183
+ O.prototype.destroy=function(b){b&&this.a&&this.a.Yb();this.l&&(this.l.release(),this.l=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.o=this.j=this.c=null;return Promise.all(b)};O.prototype.destroy=O.prototype.destroy;O.prototype.bc=function(){return this.j};O.prototype.getVideo=O.prototype.bc;O.prototype.Wa=function(){return this.o};O.prototype.getPlayer=O.prototype.Wa;O.prototype.Xd=function(){return this.a?this.a.j&&qf:!1};
184
+ O.prototype.canCast=O.prototype.Xd;O.prototype.$=function(){return this.a?this.a.$():!1};O.prototype.isCasting=O.prototype.$;O.prototype.Oc=function(){return this.a?this.a.Oc():""};O.prototype.receiverName=O.prototype.Oc;O.prototype.cast=function(){if(!this.a)throw new I(1,8,8007);var b=zf(this);return this.a.cast(b).then(function(){if(this.b)return this.b.Td()}.bind(this))};O.prototype.cast=O.prototype.cast;O.prototype.Gd=function(b){this.a&&this.a.Gd(b)};O.prototype.setAppData=O.prototype.Gd;
185
+ O.prototype.bf=function(){if(this.a){var b=this.a;if(b.b){var c=b.D();chrome.cast.requestSession(b.xd.bind(b,c),b.ze.bind(b))}}};O.prototype.suggestDisconnect=O.prototype.bf;
186
+ O.prototype.ae=function(b){var c=this;return t(function e(){return y(e,function(e){switch(e.s){case 1:if(b==c.u)return e["return"]();c.u=b;if(!c.a){e.C(2);break}c.a.Yb();return u(e,c.a.destroy(),3);case 3:c.a=null;case 2:c.a=new pf(b,function(){return vf(c)},function(){return wf(c)},function(b,e){return xf(c,b,e)},function(){return yf(c)},function(){return zf(c)}),c.a.init(),v(e)}})})};O.prototype.changeReceiverId=O.prototype.ae;O.prototype.Yb=function(){this.a&&this.a.Yb()};
187
+ O.prototype.forceDisconnect=O.prototype.Yb;function Af(b){b.a&&b.a.init();b.l=new M;af.forEach(function(b){this.l.m(this.c,b,this.lh.bind(this))}.bind(b));ef.forEach(function(b){this.l.m(this.b,b,this.Fg.bind(this))}.bind(b));b.j={};for(var c in b.c)Object.defineProperty(b.j,c,{configurable:!1,enumerable:!0,get:b.kh.bind(b,c),set:b.mh.bind(b,c)});b.o={};for(var d in b.b)Object.defineProperty(b.o,d,{configurable:!1,enumerable:!0,get:b.Ie.bind(b,d)});b.f=new cb;b.f.rc=b.j;b.g=new cb;b.g.rc=b.o}
188
+ function zf(b){var c={video:{},player:{},playerAfterLoad:{},manifest:b.b.zc(),startTime:null};b.c.pause();cf.forEach(function(b){c.video[b]=this.c[b]}.bind(b));b.c.ended||(c.startTime=b.c.currentTime);hf.forEach(function(b){var d=b[1];b=this.b[b[0]]();c.player[d]=b}.bind(b));jf.forEach(function(b){var d=b[1];b=this.b[b[0]]();c.playerAfterLoad[d]=b}.bind(b));return c}function vf(b){b.dispatchEvent(new A("caststatuschanged"))}function wf(b){b.f.dispatchEvent(new A(b.j.paused?"pause":"play"))}
189
+ function yf(b){hf.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(b));var c=b.a.get("player","getAssetUri")(),d=b.a.get("video","ended"),e=Promise.resolve(),f=b.c.autoplay,g=null;d||(g=b.a.get("video","currentTime"));c&&(b.c.autoplay=!1,e=b.b.load(c,g));var h={};cf.forEach(function(b){h[b]=this.a.get("video",b)}.bind(b));e.then(function(){b.c&&(cf.forEach(function(b){this.c[b]=h[b]}.bind(b)),jf.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(b)),
190
+ b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new A("error",{detail:c}))})}p=O.prototype;p.kh=function(b){if("addEventListener"==b)return this.f.addEventListener.bind(this.f);if("removeEventListener"==b)return this.f.removeEventListener.bind(this.f);if(this.a&&this.a.$()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a&&this.a.$()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
191
+ p.mh=function(b,c){this.a&&this.a.$()?this.a.set("video",b,c):this.c[b]=c};p.lh=function(b){this.a&&this.a.$()||this.f.dispatchEvent(new A(b.type,b))};
192
+ p.Ie=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.j}.bind(this);if("getSharedConfiguration"==b)return this.a?this.a.get("player","getConfiguration"):this.b.getConfiguration();if("getNetworkingEngine"==b)return this.b.Zb.bind(this.b);if(this.a&&this.a.$()){if("getManifest"==b||"drmInfo"==b)return function(){Za(b+"() does not work while casting!");
193
+ return null};if("getManifestUri"==b)return Xe("getManifestUri",'Please use "getAssetUri" instead.'),this.Ie("getAssetUri");if("attach"==b||"detach"==b)return function(){Za(b+"() does not work while casting!");return Promise.resolve()}}return this.a&&this.a.$()&&0==Object.keys(this.a.a.video).length&&ff[b]||!this.a||!this.a.$()?this.b[b].bind(this.b):this.a.get("player",b)};p.Fg=function(b){this.a&&this.a.$()||this.g.dispatchEvent(b)};
194
+ function xf(b,c,d){b.a.$()&&("video"==c?b.f.dispatchEvent(d):"player"==c&&b.g.dispatchEvent(d))};function Bf(b,c,d,e){var f=this;cb.call(this);this.a=b;this.b=c;this.c=new M;this.F={video:b,player:c};this.v=d||function(){};this.H=e||function(b){return b};this.w=!1;this.j=!0;this.g=0;this.u=!1;this.o=!0;this.l=this.f=null;this.D=new F(function(){Cf(f)});Df(this)}Xa(Bf,cb);z("shaka.cast.CastReceiver",Bf);Bf.prototype.isConnected=function(){return this.w};Bf.prototype.isConnected=Bf.prototype.isConnected;Bf.prototype.dg=function(){return this.j};Bf.prototype.isIdle=Bf.prototype.dg;
195
+ Bf.prototype.destroy=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return b.c&&(b.c.release(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),b.D&&(b.D.stop(),b.D=null),b.a=null,b.F=null,b.v=null,b.w=!1,b.j=!0,b.f=null,b.l=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),v(d)}})})};Bf.prototype.destroy=Bf.prototype.destroy;
196
+ function Df(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.Ee.bind(b);c.onSenderDisconnected=b.Ee.bind(b);c.onSystemVolumeChanged=b.zf.bind(b);b.l=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.l.onMessage=b.jg.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.yg.bind(b);c.start();af.forEach(function(b){this.c.m(this.a,b,this.Ke.bind(this,"video"))}.bind(b));ef.forEach(function(b){this.c.m(this.b,b,this.Ke.bind(this,"player"))}.bind(b));
197
+ cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.Id(3840,2160):b.b.Id(1920,1080);b.c.m(b.a,"loadeddata",function(){this.u=!0}.bind(b));b.c.m(b.b,"loading",function(){this.j=!1;Ef(this)}.bind(b));b.c.m(b.a,"playing",function(){this.j=!1;Ef(this)}.bind(b));b.c.m(b.a,"pause",function(){Ef(this)}.bind(b));b.c.m(b.b,"unloading",function(){this.j=!0;Ef(this)}.bind(b));b.c.m(b.a,"ended",function(){var b=this;(new F(function(){b.a&&b.a.ended&&
198
+ (b.j=!0,Ef(b))})).S(5)}.bind(b))}p=Bf.prototype;p.Ee=function(){this.g=0;this.o=!0;this.w=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Ef(this)};function Ef(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new A("caststatuschanged")),Ff(this)||Gf(this,0))}.bind(b))}
199
+ function Hf(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.v(d);d=Promise.resolve();var f=b.a.autoplay;c.manifest&&(b.a.autoplay=!1,d=b.b.load(c.manifest,c.startTime));d.then(function(){if(b.b){for(var d in c.video)b.a[d]=c.video[d];for(var e in c.playerAfterLoad)b.b[e](c.playerAfterLoad[e]);b.a.autoplay=f;c.manifest&&(b.a.play(),Gf(b,0))}},function(c){b.b.dispatchEvent(new A("error",{detail:c}))})}p.Ke=function(b,c){this.b&&(Cf(this),If(this,{type:"event",targetName:b,event:c},this.f))};
200
+ function Cf(b){b.D.S(.5);var c={video:{},player:{}};bf.forEach(function(b){c.video[b]=this.a[b]}.bind(b));if(b.b.U())for(var d in gf)0==b.g%gf[d]&&(c.player[d]=b.b[d]());for(var e in ff)0==b.g%ff[e]&&(c.player[e]=b.b[e]());if(d=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())c.video.volume=d.level,c.video.muted=d.muted;b.u&&(b.g+=1);If(b,{type:"update",update:c},b.f);Ff(b)}function Ff(b){return b.o&&(b.a.duration||b.b.U())?(Jf(b),b.o=!1,!0):!1}
201
+ function Jf(b){var c={contentId:b.b.zc(),streamType:b.b.U()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};Gf(b,0,c)}p.zf=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&If(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);If(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
202
+ p.yg=function(b){var c=nf(b.data);switch(c.type){case "init":this.g=0;this.u=!1;this.o=!0;Hf(this,c.initState,c.appData);Cf(this);break;case "appData":this.v(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}}this.F[d][e]=c;break;case "call":d=this.F[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=
203
+ c.targetName;e=c.methodName;"player"==d&&"load"==e&&(this.g=0,this.u=!1);f=c.id;b=b.senderId;var g=this.F[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.o=!0}.bind(this)));c.then(this.Ue.bind(this,b,f,null),this.Ue.bind(this,b,f))}};
204
+ p.jg=function(b){var c=nf(b.data);switch(c.type){case "PLAY":this.a.play();Gf(this,0);break;case "PAUSE":this.a.pause();Gf(this,0);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(this.a.currentTime=Number(b));d&&"PLAYBACK_START"==d?(this.a.play(),Gf(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),Gf(this,0));break;case "STOP":this.b.Td().then(function(){this.b&&Gf(this,0)}.bind(this));break;case "GET_STATUS":Gf(this,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=
205
+ d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||Gf(this,0);break;case "LOAD":this.g=0;this.o=this.u=!1;b=c.media;d=c.currentTime;e=this.H(b.contentId);f=c.autoplay||!0;this.v(b.customData);f&&(this.a.autoplay=!0);this.b.load(e,d).then(function(){this.b&&Jf(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");If(this,{requestId:Number(c.requestId),type:d},
206
+ this.l)}.bind(this));break;default:If(this,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.l)}};p.Ue=function(b,c,d){this.b&&If(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function If(b,c,d,e){b.w&&(b=mf(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
207
+ function Gf(b,c,d){var e=b.a.playbackRate;var f=Kf;f=b.j?f.IDLE:b.b.Gb()?f.gf:b.a.paused?f.jf:f.kf;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);If(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.l)}var Kf={IDLE:"IDLE",kf:"PLAYING",gf:"BUFFERING",jf:"PAUSED"};function P(b,c){this.P=b;this.b=c==Lf;this.a=0}z("shaka.util.DataViewReader",P);var Lf=1;P.Endianness={oh:0,ph:Lf};P.prototype.Ia=function(){return this.a<this.P.byteLength};P.prototype.hasMoreData=P.prototype.Ia;P.prototype.na=function(){return this.a};P.prototype.getPosition=P.prototype.na;P.prototype.Jf=function(){return this.P.byteLength};P.prototype.getLength=P.prototype.Jf;P.prototype.za=function(){try{var b=this.P.getUint8(this.a);this.a+=1;return b}catch(c){Mf()}};P.prototype.readUint8=P.prototype.za;
208
+ P.prototype.hc=function(){try{var b=this.P.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Mf()}};P.prototype.readUint16=P.prototype.hc;P.prototype.J=function(){try{var b=this.P.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Mf()}};P.prototype.readUint32=P.prototype.J;P.prototype.Me=function(){try{var b=this.P.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Mf()}};P.prototype.readInt32=P.prototype.Me;
209
+ P.prototype.Rb=function(){try{if(this.b){var b=this.P.getUint32(this.a,!0);var c=this.P.getUint32(this.a+4,!0)}else c=this.P.getUint32(this.a,!1),b=this.P.getUint32(this.a+4,!1)}catch(d){Mf()}if(2097151<c)throw new I(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};P.prototype.readUint64=P.prototype.Rb;P.prototype.rb=function(b){this.a+b>this.P.byteLength&&Mf();var c=new Uint8Array(this.P.buffer,this.P.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};P.prototype.readBytes=P.prototype.rb;
210
+ P.prototype.R=function(b){this.a+b>this.P.byteLength&&Mf();this.a+=b};P.prototype.skip=P.prototype.R;P.prototype.Pe=function(b){this.a<b&&Mf();this.a-=b};P.prototype.rewind=P.prototype.Pe;P.prototype.seek=function(b){(0>b||b>this.P.byteLength)&&Mf();this.a=b};P.prototype.seek=P.prototype.seek;P.prototype.Ad=function(){for(var b=this.a;this.Ia()&&0!=this.P.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.P.buffer,this.P.byteOffset+b,this.a-b);this.a+=1;return Kc(b)};
211
+ P.prototype.readTerminatedString=P.prototype.Ad;function Mf(){throw new I(2,3,3E3);};function Q(){this.c=[];this.b=[];this.a=!1}z("shaka.util.Mp4Parser",Q);Q.prototype.L=function(b,c){var d=Nf(b);this.c[d]=0;this.b[d]=c;return this};Q.prototype.box=Q.prototype.L;Q.prototype.va=function(b,c){var d=Nf(b);this.c[d]=1;this.b[d]=c;return this};Q.prototype.fullBox=Q.prototype.va;Q.prototype.stop=function(){this.a=!0};Q.prototype.stop=Q.prototype.stop;
212
+ Q.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new P(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.Ia()&&!this.a;)this.Kc(0,d,c)};Q.prototype.parse=Q.prototype.parse;
213
+ Q.prototype.Kc=function(b,c,d){var e=c.na(),f=c.J(),g=c.J();switch(f){case 0:f=c.P.byteLength-e;break;case 1:f=c.Rb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.J(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.P.byteLength&&(g=c.P.byteLength);g-=c.na();c=0<g?c.rb(g):new Uint8Array(0);c=new P(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.R(Math.min(e+f-c.na(),c.P.byteLength-c.na()))};
214
+ Q.prototype.parseNext=Q.prototype.Kc;function Of(b){for(;b.reader.Ia()&&!b.parser.a;)b.parser.Kc(b.start,b.reader,b.partialOkay)}Q.children=Of;function Pf(b){for(var c=b.reader.J();0<c&&!b.parser.a;--c)b.parser.Kc(b.start,b.reader,b.partialOkay)}Q.sampleDescription=Pf;function Qf(b){return function(c){b(c.reader.rb(c.reader.P.byteLength-c.reader.na()))}}Q.allData=Qf;function Nf(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
215
+ function Rf(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}Q.typeToString=Rf;function Sf(b){this.f=[];this.b=[];this.a=[];(new Q).va("pssh",this.c.bind(this)).parse(b.buffer)}Sf.prototype.c=function(b){if(!(1<b.version)){var c=Uc(b.reader.rb(16)),d=[];if(0<b.version)for(var e=b.reader.J(),f=0;f<e;++f){var g=Uc(b.reader.rb(16));d.push(g)}e=b.reader.J();b.reader.R(e);this.b.push.apply(this.b,d);this.f.push(c);this.a.push({start:b.start,end:b.start+b.size-1})}};var R={yc:function(b,c){var d=R.X(b,c);return 1!=d.length?null:d[0]},ad:function(b,c,d){b=R.fe(b,c,d);return 1!=b.length?null:b[0]},X:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},fe:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},Ac:function(b){return Array.prototype.every.call(b.childNodes,
216
+ function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},O:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},Cg:function(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)},Sa:function(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);
217
+ if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null},Mc:function(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null},parseInt:function(b){b=Number(b);return 0===b%1?b:null},Lc:function(b){b=Number(b);return 0===b%1&&0<b?b:null},Ob:function(b){b=Number(b);return 0===
218
+ b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},yf:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1])/Number(c[2]):Number(b);return isNaN(b)?null:b},He:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},Ge:function(b,c){try{var d=Kc(b);return R.He(d,c)}catch(e){}}};var Tf=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
219
+ function Uf(b,c,d){var e=Vf(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new I(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.Qe?(f=b.init||f,!1):!0}),g.length&&(b=Wf(f,c,g),0==b.length&&(b=[Md("",f)])));if(e.length&&(d||!g.length))for(b=[],c=r(Tf.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(Md(d,f));if(h=Array.from(h)[0]||null)for(c=r(b),d=c.next();!d.done;d=c.next())for(d=
220
+ r(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{be:h,sh:f,drmInfos:b,ge:!0}}function Xf(b,c,d,e){var f=Uf(b,c,e);if(d.ge){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.ge=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new I(2,4,4008);return f.be||d.be}
221
+ function Yf(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function Zf(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
222
+ function Wf(b,c,d){var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=Tf.get(f.Qe);if(g){var h;if(h=R.ad(f.node,"urn:microsoft:playready","pro")){h=Sc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=h.length,m=k.length+16+l,n=new ArrayBuffer(m),q=new Uint8Array(n);n=new DataView(n);var w=0;n.setUint32(w,m);w+=4;n.setUint32(w,1886614376);w+=4;n.setUint32(w,0);w+=4;q.set(k,w);w+=k.length;n.setUint32(w,l);w+=4;q.set(h,w);h=[{initData:q,
223
+ initDataType:"cenc",keyId:f.keyId}]}else h=null;h=Md(g,f.init||b||h);if(g=$f.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=r(f),g=f.next();!g.done;g=f.next())e.push(g.value)}return e}
224
+ var $f=(new Map).set("com.widevine.alpha",function(b){return(b=R.ad(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=R.ad(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=Sc(b.textContent);b=Yf(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=vc(b.value,!0);return(b=R.He(b,"WRMHEADER"))?Zf(b):""});function Vf(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next())(d=ag(d.value))&&c.push(d);return c}
225
+ function ag(b){var c=b.getAttribute("schemeIdUri"),d=R.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=R.fe(b,"urn:mpeg:cenc:2013","pssh").map(R.Ac);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new I(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Sc(b),keyId:null}})}catch(g){throw new I(2,4,4007);}return{node:b,Qe:c,keyId:d,init:0<f.length?f:null}};function bg(b,c,d,e,f){var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);"Time"==c&&(f=Math.round(f));switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
215
226
  window.parseInt(d,10)||1;return Array(Math.max(0,d-b.length)+1).join("0")+b})}
216
- function Tf(b,c){var d=Uf(b,c,"timescale"),e=1;d&&(e=O.Kc(d)||1);d=Uf(b,c,"duration");(d=O.Kc(d||""))&&(d/=e);var f=Uf(b,c,"startNumber"),g=Number(Uf(b,c,"presentationTimeOffset"))||0,h=O.Ob(f||"");if(null==f||null==h)h=1;var k=Vf(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.Z.duration||Infinity;k=O.X(k,"S");for(var m=[],n=0,q=0;q<k.length;++q){var x=k[q],w=O.O(x,"t",O.Ob),A=O.O(x,"d",O.Ob);x=O.O(x,"r",O.parseInt);null!=w&&(w-=g);if(!A)break;w=null!=w?w:n;x=x||0;if(0>x)if(q+1<k.length){x=O.O(k[q+
217
- 1],"t",O.Ob);if(null==x)break;else if(w>=x)break;x=Math.ceil((x-w)/A)-1}else{if(Infinity==l)break;else if(w/f>=l)break;x=Math.ceil((l*f-w)/A)-1}0<m.length&&w!=n&&(m[m.length-1].end=w/f);for(var D=0;D<=x;++D)n=w+A,m.push({start:w/f,end:n/f,fh:w}),w=n}f=m}return{timescale:e,ka:d,tb:h,Aa:g/e||0,Rd:g,T:f}}function Uf(b,c,d){return[c(b.G),c(b.ra),c(b.ya)].filter(Jd.Ya).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
218
- function Vf(b,c,d){return[c(b.G),c(b.ra),c(b.ya)].filter(Jd.Ya).map(function(b){return O.yc(b,d)}).reduce(function(b,c){return b||c})}
219
- function Wf(b,c,d,e,f,g){for(var h=O.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=O.getAttributeNS(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<b.attributes.length;l++){var m=b.attributes[l];"http://www.w3.org/1999/xlink"==m.namespaceURI&&(b.removeAttributeNS(m.namespaceURI,m.localName),--l)}if(5<=g)return Vb(new G(2,4,4028));if("onLoad"!=k)return Vb(new G(2,4,4027));var n=Kd([e],[h]);return f.request(0,kc(n,c)).aa(function(e){e=O.Ee(e.data,b.tagName);if(!e)return Vb(new G(2,
220
- 4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return Xf(b,c,d,n[0],f,g+1)})}
221
- function Xf(b,c,d,e,f,g){g=void 0===g?0:g;if(O.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=Wf(b,c,d,e,f,g);d&&(h=h.aa(void 0,function(){return Xf(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==O.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push(Xf(l,c,d,e,f,g)))}return Zb(h).aa(function(){return b})};function Yf(b,c,d){this.c=b;this.b=c;this.a=d}z("shaka.media.InitSegmentReference",Yf);Yf.prototype.Wc=function(){return this.c()};Yf.prototype.createUris=Yf.prototype.Wc;Yf.prototype.dd=function(){return this.b};Yf.prototype.getStartByte=Yf.prototype.dd;Yf.prototype.bd=function(){return this.a};Yf.prototype.getEndByte=Yf.prototype.bd;function P(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}z("shaka.media.SegmentReference",P);P.prototype.na=function(){return this.position};
222
- P.prototype.getPosition=P.prototype.na;P.prototype.ed=function(){return this.startTime};P.prototype.getStartTime=P.prototype.ed;P.prototype.Ff=function(){return this.endTime};P.prototype.getEndTime=P.prototype.Ff;P.prototype.Wc=function(){return this.c()};P.prototype.createUris=P.prototype.Wc;P.prototype.dd=function(){return this.b};P.prototype.getStartByte=P.prototype.dd;P.prototype.bd=function(){return this.a};P.prototype.getEndByte=P.prototype.bd;function Q(b,c){this.P=b;this.b=c==Zf;this.a=0}z("shaka.util.DataViewReader",Q);var Zf=1;Q.Endianness={mh:0,nh:Zf};Q.prototype.Ia=function(){return this.a<this.P.byteLength};Q.prototype.hasMoreData=Q.prototype.Ia;Q.prototype.na=function(){return this.a};Q.prototype.getPosition=Q.prototype.na;Q.prototype.Hf=function(){return this.P.byteLength};Q.prototype.getLength=Q.prototype.Hf;Q.prototype.za=function(){try{var b=this.P.getUint8(this.a);this.a+=1;return b}catch(c){$f()}};Q.prototype.readUint8=Q.prototype.za;
223
- Q.prototype.hc=function(){try{var b=this.P.getUint16(this.a,this.b);this.a+=2;return b}catch(c){$f()}};Q.prototype.readUint16=Q.prototype.hc;Q.prototype.J=function(){try{var b=this.P.getUint32(this.a,this.b);this.a+=4;return b}catch(c){$f()}};Q.prototype.readUint32=Q.prototype.J;Q.prototype.Ke=function(){try{var b=this.P.getInt32(this.a,this.b);this.a+=4;return b}catch(c){$f()}};Q.prototype.readInt32=Q.prototype.Ke;
224
- Q.prototype.Rb=function(){try{if(this.b){var b=this.P.getUint32(this.a,!0);var c=this.P.getUint32(this.a+4,!0)}else c=this.P.getUint32(this.a,!1),b=this.P.getUint32(this.a+4,!1)}catch(d){$f()}if(2097151<c)throw new G(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};Q.prototype.readUint64=Q.prototype.Rb;Q.prototype.rb=function(b){this.a+b>this.P.byteLength&&$f();var c=new Uint8Array(this.P.buffer,this.P.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};Q.prototype.readBytes=Q.prototype.rb;
225
- Q.prototype.R=function(b){this.a+b>this.P.byteLength&&$f();this.a+=b};Q.prototype.skip=Q.prototype.R;Q.prototype.Ne=function(b){this.a<b&&$f();this.a-=b};Q.prototype.rewind=Q.prototype.Ne;Q.prototype.seek=function(b){(0>b||b>this.P.byteLength)&&$f();this.a=b};Q.prototype.seek=Q.prototype.seek;Q.prototype.zd=function(){for(var b=this.a;this.Ia()&&0!=this.P.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.P.buffer,this.P.byteOffset+b,this.a-b);this.a+=1;return Hc(b)};
226
- Q.prototype.readTerminatedString=Q.prototype.zd;function $f(){throw new G(2,3,3E3);};function R(){this.c=[];this.b=[];this.a=!1}z("shaka.util.Mp4Parser",R);R.prototype.M=function(b,c){var d=ag(b);this.c[d]=0;this.b[d]=c;return this};R.prototype.box=R.prototype.M;R.prototype.ua=function(b,c){var d=ag(b);this.c[d]=1;this.b[d]=c;return this};R.prototype.fullBox=R.prototype.ua;R.prototype.stop=function(){this.a=!0};R.prototype.stop=R.prototype.stop;
227
- R.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new Q(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.Ia()&&!this.a;)this.Jc(0,d,c)};R.prototype.parse=R.prototype.parse;
228
- R.prototype.Jc=function(b,c,d){var e=c.na(),f=c.J(),g=c.J();switch(f){case 0:f=c.P.byteLength-e;break;case 1:f=c.Rb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.J(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.P.byteLength&&(g=c.P.byteLength);g-=c.na();c=0<g?c.rb(g):new Uint8Array(0);c=new Q(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.R(Math.min(e+f-c.na(),c.P.byteLength-c.na()))};
229
- R.prototype.parseNext=R.prototype.Jc;function bg(b){for(;b.reader.Ia()&&!b.parser.a;)b.parser.Jc(b.start,b.reader,b.partialOkay)}R.children=bg;function cg(b){for(var c=b.reader.J();0<c&&!b.parser.a;--c)b.parser.Jc(b.start,b.reader,b.partialOkay)}R.sampleDescription=cg;function dg(b){return function(c){b(c.reader.rb(c.reader.P.byteLength-c.reader.na()))}}R.allData=dg;function ag(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
230
- function eg(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}R.typeToString=eg;function fg(b,c,d,e){var f,g=(new R).ua("sidx",function(b){f=gg(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new G(2,3,3004);}
231
- function gg(b,c,d,e){var f=[];e.reader.R(4);var g=e.reader.J();if(0==g)throw new G(2,3,3005);if(0==e.version){var h=e.reader.J();var k=e.reader.J()}else h=e.reader.Rb(),k=e.reader.Rb();e.reader.R(2);var l=e.reader.hc();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.J(),n=(m&2147483648)>>>31;m&=2147483647;var q=e.reader.J();e.reader.R(4);if(1==n)throw new G(2,3,3006);f.push(new P(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function hg(b){this.a=b}z("shaka.media.SegmentIndex",hg);hg.prototype.destroy=function(){this.a=null;return Promise.resolve()};hg.prototype.destroy=hg.prototype.destroy;hg.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};hg.prototype.find=hg.prototype.find;
232
- hg.prototype.get=function(b){if(0==this.a.length)return null;b-=this.a[0].position;return 0>b||b>=this.a.length?null:this.a[b]};hg.prototype.get=hg.prototype.get;hg.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};hg.prototype.offset=hg.prototype.offset;
233
- hg.prototype.pd=function(b){for(var c=[],d=0,e=0;d<this.a.length&&e<b.length;){var f=this.a[d],g=b[e];f.startTime<g.startTime?(c.push(f),d++):(f.startTime>g.startTime?0==d&&c.push(g):(.1<Math.abs(f.endTime-g.endTime)?c.push(new P(f.position,g.startTime,g.endTime,g.c,g.b,g.a)):c.push(f),d++),e++)}for(;d<this.a.length;)c.push(this.a[d++]);if(c.length)for(d=c[c.length-1].position+1;e<b.length;)f=b[e++],f=new P(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};hg.prototype.merge=hg.prototype.pd;
234
- hg.prototype.Yc=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};hg.prototype.evict=hg.prototype.Yc;function ig(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new P(d.position,d.startTime,c,d.c,d.b,d.a)}};function jg(b){this.b=b;this.a=new Q(b,0);kg||(kg=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var kg;jg.prototype.Ia=function(){return this.a.Ia()};
235
- function lg(b){var c=mg(b);if(7<c.length)throw new G(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=mg(b);a:{for(e=0;e<kg.length;e++)if(Uc(d,kg[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.na();else{if(8==d.length&&d[1]&224)throw new G(2,3,3001);e=d[0]&(1<<8-d.length)-1;for(var f=1;f<d.length;f++)e=256*e+d[f];d=e}d=b.a.na()+d<=b.b.byteLength?d:b.b.byteLength-b.a.na();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.na(),d);b.a.R(d);return new ng(c,e)}
236
- function mg(b){var c=b.a.za(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new G(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.za();return e}function ng(b,c){this.id=b;this.a=c}function og(b){if(8<b.a.byteLength)throw new G(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new G(2,3,3001);for(var c=0,d=0;d<b.a.byteLength;d++){var e=b.a.getUint8(d);c=256*c+e}return c};function pg(){}
237
- pg.prototype.parse=function(b,c,d,e){var f;c=new jg(new DataView(c));if(440786851!=lg(c).id)throw new G(2,3,3008);var g=lg(c);if(408125543!=g.id)throw new G(2,3,3009);c=g.a.byteOffset;g=new jg(g.a);for(f=null;g.Ia();){var h=lg(g);if(357149030==h.id){f=h;break}}if(!f)throw new G(2,3,3010);g=new jg(f.a);f=1E6;for(h=null;g.Ia();){var k=lg(g);if(2807729==k.id)f=og(k);else if(17545==k.id)if(h=k,4==h.a.byteLength)h=h.a.getFloat32(0);else if(8==h.a.byteLength)h=h.a.getFloat64(0);else throw new G(2,3,3003);
238
- }if(null==h)throw new G(2,3,3011);g=f/1E9;f=h*g;b=lg(new jg(new DataView(b)));if(475249515!=b.id)throw new G(2,3,3007);return qg(b,c,g,f,d,e)};function qg(b,c,d,e,f,g){function h(){return f}var k=[];b=new jg(b.a);for(var l=null,m=null;b.Ia();){var n=lg(b);if(187==n.id){var q=rg(n);q&&(n=d*q.gh,q=c+q.Ig,null!=l&&k.push(new P(k.length,l-g,n-g,h,m,q-1)),l=n,m=q)}}null!=l&&k.push(new P(k.length,l-g,e-g,h,m,null));return k}
239
- function rg(b){var c=new jg(b.a);b=lg(c);if(179!=b.id)throw new G(2,3,3013);b=og(b);c=lg(c);if(183!=c.id)throw new G(2,3,3012);c=new jg(c.a);for(var d=0;c.Ia();){var e=lg(c);if(241==e.id){d=og(e);break}}return{gh:b,Ig:d}};function sg(b,c){var d=Vf(b,c,"Initialization");if(!d)return null;var e=b.G.Ba,f=d.getAttribute("sourceURL");f&&(e=Kd(b.G.Ba,[f]));f=0;var g=null;if(d=O.O(d,"range",O.Lc))f=d.start,g=d.end;return new Yf(function(){return e},f,g)}
240
- function tg(b,c){var d=Number(Uf(b,ug,"presentationTimeOffset"))||0,e=Uf(b,ug,"timescale"),f=1;e&&(f=O.Kc(e)||1);d=d/f||0;e=sg(b,ug);var g=b.G.contentType;f=b.G.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new G(2,4,4006);if("webm"==f&&!e)throw new G(2,4,4005);g=Vf(b,ug,"RepresentationIndex");var h=Uf(b,ug,"indexRange"),k=b.G.Ba;h=O.Lc(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=Kd(b.G.Ba,[l]));h=O.O(g,"range",O.Lc,h)}if(!h)throw new G(2,4,4002);f=vg(b,c,e,k,h.start,h.end,
227
+ function cg(b,c){var d=dg(b,c,"timescale"),e=1;d&&(e=R.Lc(d)||1);d=dg(b,c,"duration");(d=R.Lc(d||""))&&(d/=e);var f=dg(b,c,"startNumber"),g=Number(dg(b,c,"presentationTimeOffset"))||0,h=R.Ob(f||"");if(null==f||null==h)h=1;var k=eg(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.Z.duration||Infinity;k=R.X(k,"S");for(var m=[],n=0,q=0;q<k.length;++q){var w=k[q],x=R.O(w,"t",R.Ob),C=R.O(w,"d",R.Ob);w=R.O(w,"r",R.parseInt);null!=x&&(x-=g);if(!C)break;x=null!=x?x:n;w=w||0;if(0>w)if(q+1<k.length){w=R.O(k[q+
228
+ 1],"t",R.Ob);if(null==w)break;else if(x>=w)break;w=Math.ceil((w-x)/C)-1}else{if(Infinity==l)break;else if(x/f>=l)break;w=Math.ceil((l*f-x)/C)-1}0<m.length&&x!=n&&(m[m.length-1].end=x/f);for(var E=0;E<=w;++E)n=x+C,m.push({start:x/f,end:n/f,hh:x}),x=n}f=m}return{timescale:e,ka:d,tb:h,Aa:g/e||0,Ud:g,T:f}}function dg(b,c,d){return[c(b.G),c(b.qa),c(b.ya)].filter(Kd.Ya).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
229
+ function eg(b,c,d){return[c(b.G),c(b.qa),c(b.ya)].filter(Kd.Ya).map(function(b){return R.yc(b,d)}).reduce(function(b,c){return b||c})}
230
+ function fg(b,c,d,e,f,g){for(var h=R.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=R.getAttributeNS(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<b.attributes.length;l++){var m=b.attributes[l];"http://www.w3.org/1999/xlink"==m.namespaceURI&&(b.removeAttributeNS(m.namespaceURI,m.localName),--l)}if(5<=g)return Ub(new I(2,4,4028));if("onLoad"!=k)return Ub(new I(2,4,4027));var n=Ld([e],[h]);return f.request(0,jc(n,c)).aa(function(e){e=R.Ge(e.data,b.tagName);if(!e)return Ub(new I(2,
231
+ 4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return gg(b,c,d,n[0],f,g+1)})}
232
+ function gg(b,c,d,e,f,g){g=void 0===g?0:g;if(R.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=fg(b,c,d,e,f,g);d&&(h=h.aa(void 0,function(){return gg(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==R.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push(gg(l,c,d,e,f,g)))}return Yb(h).aa(function(){return b})};function hg(b,c,d){this.c=b;this.b=c;this.a=d}z("shaka.media.InitSegmentReference",hg);hg.prototype.Xc=function(){return this.c()};hg.prototype.createUris=hg.prototype.Xc;hg.prototype.fd=function(){return this.b};hg.prototype.getStartByte=hg.prototype.fd;hg.prototype.dd=function(){return this.a};hg.prototype.getEndByte=hg.prototype.dd;function S(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}z("shaka.media.SegmentReference",S);S.prototype.na=function(){return this.position};
233
+ S.prototype.getPosition=S.prototype.na;S.prototype.gd=function(){return this.startTime};S.prototype.getStartTime=S.prototype.gd;S.prototype.Hf=function(){return this.endTime};S.prototype.getEndTime=S.prototype.Hf;S.prototype.Xc=function(){return this.c()};S.prototype.createUris=S.prototype.Xc;S.prototype.fd=function(){return this.b};S.prototype.getStartByte=S.prototype.fd;S.prototype.dd=function(){return this.a};S.prototype.getEndByte=S.prototype.dd;function ig(b,c,d,e){var f,g=(new Q).va("sidx",function(b){f=jg(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new I(2,3,3004);}
234
+ function jg(b,c,d,e){var f=[];e.reader.R(4);var g=e.reader.J();if(0==g)throw new I(2,3,3005);if(0==e.version){var h=e.reader.J();var k=e.reader.J()}else h=e.reader.Rb(),k=e.reader.Rb();e.reader.R(2);var l=e.reader.hc();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.J(),n=(m&2147483648)>>>31;m&=2147483647;var q=e.reader.J();e.reader.R(4);if(1==n)throw new I(2,3,3006);f.push(new S(f.length,h/g-c,(h+q)/g-c,function(){return d},b,b+m-1));h+=q;b+=m}e.parser.stop();return f};function kg(b){this.a=b}z("shaka.media.SegmentIndex",kg);kg.prototype.destroy=function(){this.a=null;return Promise.resolve()};kg.prototype.destroy=kg.prototype.destroy;kg.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};kg.prototype.find=kg.prototype.find;
235
+ kg.prototype.get=function(b){if(0==this.a.length)return null;b-=this.a[0].position;return 0>b||b>=this.a.length?null:this.a[b]};kg.prototype.get=kg.prototype.get;kg.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};kg.prototype.offset=kg.prototype.offset;
236
+ kg.prototype.qd=function(b){for(var c=[],d=0,e=0;d<this.a.length&&e<b.length;){var f=this.a[d],g=b[e];f.startTime<g.startTime?(c.push(f),d++):(f.startTime>g.startTime?0==d&&c.push(g):(.1<Math.abs(f.endTime-g.endTime)?c.push(new S(f.position,g.startTime,g.endTime,g.c,g.b,g.a)):c.push(f),d++),e++)}for(;d<this.a.length;)c.push(this.a[d++]);if(c.length)for(d=c[c.length-1].position+1;e<b.length;)f=b[e++],f=new S(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};kg.prototype.merge=kg.prototype.qd;
237
+ kg.prototype.Zc=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};kg.prototype.evict=kg.prototype.Zc;function lg(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[b.a.length-1];b.a[b.a.length-1]=new S(d.position,d.startTime,c,d.c,d.b,d.a)}};function mg(b){this.b=b;this.a=new P(b,0);ng||(ng=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var ng;mg.prototype.Ia=function(){return this.a.Ia()};
238
+ function og(b){var c=pg(b);if(7<c.length)throw new I(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=pg(b);a:{for(e=0;e<ng.length;e++)if(Vc(d,ng[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.na();else{if(8==d.length&&d[1]&224)throw new I(2,3,3001);e=d[0]&(1<<8-d.length)-1;for(var f=1;f<d.length;f++)e=256*e+d[f];d=e}d=b.a.na()+d<=b.b.byteLength?d:b.b.byteLength-b.a.na();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.na(),d);b.a.R(d);return new qg(c,e)}
239
+ function pg(b){var c=b.a.za(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new I(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.za();return e}function qg(b,c){this.id=b;this.a=c}function rg(b){if(8<b.a.byteLength)throw new I(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new I(2,3,3001);for(var c=0,d=0;d<b.a.byteLength;d++){var e=b.a.getUint8(d);c=256*c+e}return c};function sg(){}
240
+ sg.prototype.parse=function(b,c,d,e){var f;c=new mg(new DataView(c));if(440786851!=og(c).id)throw new I(2,3,3008);var g=og(c);if(408125543!=g.id)throw new I(2,3,3009);c=g.a.byteOffset;g=new mg(g.a);for(f=null;g.Ia();){var h=og(g);if(357149030==h.id){f=h;break}}if(!f)throw new I(2,3,3010);g=new mg(f.a);f=1E6;for(h=null;g.Ia();){var k=og(g);if(2807729==k.id)f=rg(k);else if(17545==k.id)if(h=k,4==h.a.byteLength)h=h.a.getFloat32(0);else if(8==h.a.byteLength)h=h.a.getFloat64(0);else throw new I(2,3,3003);
241
+ }if(null==h)throw new I(2,3,3011);g=f/1E9;f=h*g;b=og(new mg(new DataView(b)));if(475249515!=b.id)throw new I(2,3,3007);return tg(b,c,g,f,d,e)};function tg(b,c,d,e,f,g){function h(){return f}var k=[];b=new mg(b.a);for(var l=null,m=null;b.Ia();){var n=og(b);if(187==n.id){var q=ug(n);q&&(n=d*q.ih,q=c+q.Kg,null!=l&&k.push(new S(k.length,l-g,n-g,h,m,q-1)),l=n,m=q)}}null!=l&&k.push(new S(k.length,l-g,e-g,h,m,null));return k}
242
+ function ug(b){var c=new mg(b.a);b=og(c);if(179!=b.id)throw new I(2,3,3013);b=rg(b);c=og(c);if(183!=c.id)throw new I(2,3,3012);c=new mg(c.a);for(var d=0;c.Ia();){var e=og(c);if(241==e.id){d=rg(e);break}}return{ih:b,Kg:d}};function vg(b,c){var d=eg(b,c,"Initialization");if(!d)return null;var e=b.G.Ba,f=d.getAttribute("sourceURL");f&&(e=Ld(b.G.Ba,[f]));f=0;var g=null;if(d=R.O(d,"range",R.Mc))f=d.start,g=d.end;return new hg(function(){return e},f,g)}
243
+ function wg(b,c){var d=Number(dg(b,xg,"presentationTimeOffset"))||0,e=dg(b,xg,"timescale"),f=1;e&&(f=R.Lc(e)||1);d=d/f||0;e=vg(b,xg);var g=b.G.contentType;f=b.G.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new I(2,4,4006);if("webm"==f&&!e)throw new I(2,4,4005);g=eg(b,xg,"RepresentationIndex");var h=dg(b,xg,"indexRange"),k=b.G.Ba;h=R.Mc(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=Ld(b.G.Ba,[l]));h=R.O(g,"range",R.Mc,h)}if(!h)throw new I(2,4,4002);f=yg(b,c,e,k,h.start,h.end,
241
244
  f,d);return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,Aa:d}}
242
- function vg(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.Bb||!b.Z.kd,n=b.Z.start,q=b.Z.duration,x=c,w=null;return{createSegmentIndex:function(){var b=[x(e,f,g),"webm"==h?x(d.c(),d.b,d.a):null];x=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?fg(c,f,e,k):(new pg).parse(c,b,e,k);l.Kb(c,n);w=new hg(c);m&&ig(w,q)})},findSegmentPosition:function(b){return w.find(b)},getSegmentReference:function(b){return w.get(b)}}}function ug(b){return b.jc};function wg(b,c){var d=sg(b,xg);var e=yg(b);var f=Tf(b,xg),g=f.tb;0==g&&(g=1);var h=0;f.ka?h=f.ka*(g-1):f.T&&0<f.T.length&&(h=f.T[0].start);e={ka:f.ka,startTime:h,tb:g,Aa:f.Aa,T:f.T,Ib:e};if(!e.ka&&!e.T&&1<e.Ib.length)throw new G(2,4,4002);if(!e.ka&&!b.Z.duration&&!e.T&&1==e.Ib.length)throw new G(2,4,4002);if(e.T&&0==e.T.length)throw new G(2,4,4002);g=f=null;b.ya.id&&b.G.id&&(g=b.ya.id+","+b.G.id,f=c[g]);h=zg(b.Z.duration,e.tb,b.G.Ba,e);f?(f.pd(h),g=b.presentationTimeline.ac(),f.Yc(g-b.Z.start)):
243
- (b.presentationTimeline.Kb(h,b.Z.start),f=new hg(h),g&&b.Bb&&(c[g]=f));b.Bb&&b.Z.kd||ig(f,b.Z.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,Aa:e.Aa}}function xg(b){return b.bb}
244
- function zg(b,c,d,e){var f=e.Ib.length;e.T&&e.T.length!=e.Ib.length&&(f=Math.min(e.T.length,e.Ib.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.Ib[k],m=Kd(d,[l.eg]),n=void 0;n=null!=e.ka?h+e.ka:e.T?e.T[k].end:h+b;g.push(new P(k+c,h,n,function(b){return b}.bind(null,m),l.start,l.end));h=n}return g}
245
- function yg(b){return[b.G.bb,b.ra.bb,b.ya.bb].filter(Jd.Ya).map(function(b){return O.X(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.le&&(b.le=!0);var d=c.getAttribute("media");c=O.O(c,"mediaRange",O.Lc,{start:0,end:null});return{eg:d,start:c.start,end:c.end}})};function Ag(b,c,d,e){var f=Bg(b);var g=Tf(b,Cg);var h=Uf(b,Cg,"media"),k=Uf(b,Cg,"index");g={ka:g.ka,timescale:g.timescale,tb:g.tb,Aa:g.Aa,Rd:g.Rd,T:g.T,od:h,dc:k};h=g.dc?1:0;h+=g.T?1:0;h+=g.ka?1:0;if(0==h)throw new G(2,4,4002);1!=h&&(g.dc&&(g.T=null),g.ka=null);if(!g.dc&&!g.od)throw new G(2,4,4002);if(g.dc){d=b.G.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new G(2,4,4006);if("webm"==d&&!f)throw new G(2,4,4005);e=Sf(g.dc,b.G.id,null,b.bandwidth||null,null);e=Kd(b.G.Ba,[e]);b=vg(b,c,f,e,0,
246
- null,d,g.Aa)}else g.ka?(e||(b.presentationTimeline.rd(g.ka),b.presentationTimeline.sd(b.Z.start)),b=Dg(b,g)):(h=c=null,b.ya.id&&b.G.id&&(h=b.ya.id+","+b.G.id,c=d[h]),k=Eg(b,g),e=!b.Bb||!b.Z.kd,c?(e&&ig(new hg(k),b.Z.duration),c.pd(k),d=b.presentationTimeline.ac(),c.Yc(d-b.Z.start)):(b.presentationTimeline.Kb(k,b.Z.start),c=new hg(k),h&&b.Bb&&(d[h]=c)),e&&ig(c,b.Z.duration),b={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:c.find.bind(c),getSegmentReference:c.get.bind(c)});return{createSegmentIndex:b.createSegmentIndex,
247
- findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,Aa:g.Aa}}function Cg(b){return b.lc}
248
- function Dg(b,c){var d=b.Z.duration,e=c.ka,f=c.tb,g=c.timescale,h=c.od,k=b.bandwidth||null,l=b.G.id,m=b.G.Ba;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0>b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new P(b,c,n,function(){var d=Sf(h,l,b+f,k,c*g);return Kd(m,[d])},0,null)}}}
249
- function Eg(b,c){for(var d=[],e=0;e<c.T.length;e++){var f=e+c.tb;d.push(new P(f,c.T[e].start,c.T[e].end,function(b,c,d,e,f,n){b=Sf(b,c,f,d,n);return Kd(e,[b]).map(function(b){return b.toString()})}.bind(null,c.od,b.G.id,b.bandwidth||null,b.G.Ba,f,c.T[e].fh+c.Rd),0,null))}return d}function Bg(b){var c=Uf(b,Cg,"initialization");if(!c)return null;var d=b.G.id,e=b.bandwidth||null,f=b.G.Ba;return new Yf(function(){var b=Sf(c,d,null,e,null);return Kd(f,[b])},0,null)};var S={Pb:{},gc:{},Bd:function(b,c){S.gc[b]=c}};z("shaka.media.ManifestParser.registerParserByExtension",S.Bd);S.ic=function(b,c){S.Pb[b]=c};z("shaka.media.ManifestParser.registerParserByMime",S.ic);
250
- S.Fg=function(){var b={};if(Bc()){for(var c in S.Pb)b[c]=!0;for(var d in S.gc)b[d]=!0}c={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};d=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var e=d.next();!e.done;e=d.next())e=e.value,b[e]=Bc()?!!S.Pb[e]:Cc(e);for(var f in c)b[f]=Bc()?!!S.gc[f]:Cc(c[f]);return b};
251
- S.create=function(b,c,d,e){return t(function g(){var h,k;return y(g,function(g){switch(g.s){case 1:return za(g,2),u(g,S.Gf(b,c,d,e),4);case 4:return h=g.A,g["return"](new h);case 2:throw k=Ca(g),k.severity=2,k;}})})};
252
- S.Gf=function(b,c,d,e){return t(function g(){var h,k,l,m,n;return y(g,function(g){switch(g.s){case 1:h=S;if(e&&(k=h.Pb[e.toLowerCase()]))return g["return"](k);if(l=h.getExtension(b))if(m=h.gc[l])return g["return"](m);if(e){g.C(2);break}return u(g,h.Qf(b,c,d),3);case 3:if(e=g.A)if(n=S.Pb[e])return g["return"](n);case 2:throw new G(2,4,4E3,b);}})})};
253
- S.Qf=function(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.s){case 1:return g=kc([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.A,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};S.getExtension=function(b){b=(new yb(b)).xa.split("/").pop().split(".");return 1==b.length?"":b.pop().toLowerCase()};S.isSupported=function(b,c){return Bc()?c in S.Pb||S.getExtension(b)in S.gc?!0:!1:!1};function T(b,c,d){this.f=b;this.Mc=c;this.j=this.g=Infinity;this.a=1;this.b=this.c=null;this.o=0;this.u=!0;this.l=0;this.v=void 0===d?!0:d}z("shaka.media.PresentationTimeline",T);T.prototype.ia=function(){return this.g};T.prototype.getDuration=T.prototype.ia;T.prototype.Ma=function(b){this.g=b};T.prototype.setDuration=T.prototype.Ma;T.prototype.Tf=function(){return this.f};T.prototype.getPresentationStartTime=T.prototype.Tf;T.prototype.Te=function(b){this.o=b};T.prototype.setClockOffset=T.prototype.Te;
254
- T.prototype.mc=function(b){this.u=b};T.prototype.setStatic=T.prototype.mc;T.prototype.Jd=function(b){this.j=b};T.prototype.setSegmentAvailabilityDuration=T.prototype.Jd;T.prototype.Sg=function(b){this.Mc=b};T.prototype.setDelay=T.prototype.Sg;T.prototype.Ef=function(){return this.Mc};T.prototype.getDelay=T.prototype.Ef;
255
- T.prototype.Kb=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.sd(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.v&&(this.f=(Date.now()+this.o)/1E3-this.b-this.a)}};T.prototype.notifySegments=T.prototype.Kb;T.prototype.sd=function(b){this.c=null==this.c?b:Math.min(this.c,b)};T.prototype.notifyMinSegmentStartTime=T.prototype.sd;T.prototype.rd=function(b){this.a=Math.max(this.a,b)};
256
- T.prototype.notifyMaxSegmentDuration=T.prototype.rd;T.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};T.prototype.offset=T.prototype.offset;T.prototype.V=function(){return Infinity==this.g&&!this.u};T.prototype.isLive=T.prototype.V;T.prototype.pb=function(){return Infinity!=this.g&&!this.u};T.prototype.isInProgress=T.prototype.pb;T.prototype.ac=function(){if(Infinity==this.j)return this.l;var b=this.Eb()-this.j;return Math.max(this.l,b)};
257
- T.prototype.getSegmentAvailabilityStart=T.prototype.ac;T.prototype.We=function(b){this.l=b};T.prototype.setUserSeekStart=T.prototype.We;T.prototype.Eb=function(){return this.V()||this.pb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.a-this.f),this.g):this.g};T.prototype.getSegmentAvailabilityEnd=T.prototype.Eb;T.prototype.$b=function(b){var c=Math.max(this.c,this.l);if(Infinity==this.j)return c;var d=this.Eb()-this.j;b=Math.min(d+b,this.Ra());return Math.max(c,b)};
258
- T.prototype.getSafeSeekRangeStart=T.prototype.$b;T.prototype.Db=function(){return this.$b(0)};T.prototype.getSeekRangeStart=T.prototype.Db;T.prototype.Ra=function(){var b=this.V()||this.pb()?this.Mc:0;return Math.max(0,this.Eb()-b)};T.prototype.getSeekRangeEnd=T.prototype.Ra;T.prototype.bf=function(){return null==this.f||null!=this.b?!1:!0};T.prototype.usingPresentationStartTime=T.prototype.bf;function Fg(b,c,d,e){b=kc(b,e);if(0!=c||null!=d)b.headers.Range=d?"bytes="+c+"-"+d:"bytes="+c+"-";return b};function Gg(){var b=this;this.a=this.b=null;this.f=[];this.c=null;this.o=[];this.j=1;this.u={};this.v=0;this.w=new tb(5);this.l=new F(function(){Hg(b)});this.g=new fc}z("shaka.dash.DashParser",Gg);p=Gg.prototype;p.configure=function(b){this.b=b};p.start=function(b,c){var d=this;return t(function f(){var g;return y(f,function(f){switch(f.s){case 1:return d.f=[b],d.a=c,u(f,Ig(d),2);case 2:g=f.A;d.a&&Jg(d,g);if(!d.a)throw new G(2,7,7001);return f["return"](d.c)}})})};
259
- p.stop=function(){this.b=this.a=null;this.f=[];this.c=null;this.o=[];this.u={};null!=this.l&&(this.l.stop(),this.l=null);return this.g.destroy()};p.update=function(){Ig(this)["catch"](function(b){if(this.a)this.a.onError(b)}.bind(this))};p.onExpirationUpdated=function(){};
260
- function Ig(b){var c=Date.now(),d=b.a.networkingEngine.request(0,kc(b.f,b.b.retryParameters));gc(b.g,d);return d.promise.then(function(c){if(b.a)return c.uri&&!b.f.includes(c.uri)&&b.f.unshift(c.uri),Kg(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;ub(b.w,1,d);return d})}function Kg(b,c,d){c=O.Ee(c,"MPD");if(!c)throw new G(2,4,4001,d);c=Xf(c,b.b.retryParameters,b.b.dash.xlinkFailGracefully,d,b.a.networkingEngine);gc(b.g,c);return c.promise.then(function(c){return Lg(b,c,d)})}
261
- function Lg(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,D,H,J,ba,fa,Da,Ja,ka,va,Ea,sa,ab,Ka,Eb,Pa,nb;return y(f,function(f){switch(f.s){case 1:l=Jd;m=O;n=[d];q=m.X(c,"Location").map(m.Ac).filter(l.Ya);0<q.length&&(x=Kd(n,q),n=b.f=x);w=m.X(c,"BaseURL").map(m.Ac);A=Kd(n,w);D=b.b.dash.ignoreMinBufferTime;H=0;D||(H=m.O(c,"minBufferTime",m.Ta));b.v=m.O(c,"minimumUpdatePeriod",m.Ta,-1);J=m.O(c,"availabilityStartTime",m.Ag);ba=m.O(c,"timeShiftBufferDepth",m.Ta);fa=m.O(c,"suggestedPresentationDelay",
262
- m.Ta);Da=m.O(c,"maxSegmentDuration",m.Ta);Ja=c.getAttribute("type")||"static";b.c?ka=b.c.presentationTimeline:(va=Math.max(b.b.dash.defaultPresentationDelay,1.5*H),Ea=null!=fa?fa:va,ka=new T(J,Ea,b.b.dash.autoCorrectDrift));sa={Bb:"static"!=Ja,presentationTimeline:ka,ya:null,Z:null,ra:null,G:null,bandwidth:0,le:!1};for(var Kc=sa,Fb=A,Ob=O.O(c,"mediaPresentationDuration",O.Ta),Gb=[],Qa=0,Lc=O.X(c,"Period"),pb=0;pb<Lc.length;pb++){var Ra=Lc[pb];Qa=O.O(Ra,"start",O.Ta,Qa);var Td=O.O(Ra,"duration",O.Ta),
263
- Hb=null;if(pb!=Lc.length-1){var ob=O.O(Lc[pb+1],"start",O.Ta);null!=ob&&(Hb=ob-Qa)}else null!=Ob&&(Hb=Ob-Qa);null==Hb&&(Hb=Td);Ra=Mg(b,Kc,Fb,{start:Qa,duration:Hb,node:Ra,kd:null==Hb||pb==Lc.length-1});Gb.push(Ra);Td=Kc.ya.id;b.o.includes(Td)||(b.o.push(Td),b.c&&(b.a.filterNewPeriod(Ra),b.c.periods.push(Ra)));if(null==Hb){Qa=null;break}Qa+=Hb}null==b.c&&b.a.filterAllPeriods(Gb);null!=Ob?(g=Gb,h=Ob,k=!1):(g=Gb,h=Qa,k=!0);ab=h;Ka=g;ka.mc("static"==Ja);"static"!=Ja&&k||ka.Ma(ab||Infinity);(Eb=ka.V())&&
264
- !isNaN(b.b.availabilityWindowOverride)&&(ba=b.b.availabilityWindowOverride);null==ba&&(ba=Infinity);ka.Jd(ba);ka.rd(Da||1);if(b.c){f.C(0);break}b.c={presentationTimeline:ka,periods:Ka,offlineSessionIds:[],minBufferTime:H||0};if(!ka.bf()){f.C(0);break}Pa=m.X(c,"UTCTiming");return u(f,Ng(b,A,Pa),4);case 4:nb=f.A;if(!b.a)return f["return"]();ka.Te(nb);v(f)}})})}
265
- function Mg(b,c,d,e){c.ya=Og(e.node,null,d);c.Z=e;c.ya.id||(c.ya.id="__shaka_period_"+e.start);O.X(e.node,"EventStream").forEach(b.Bg.bind(b,e.start,e.duration));d=O.X(e.node,"AdaptationSet").map(b.zg.bind(b,c)).filter(Jd.Ya);if(c.Bb){c=[];for(var f=r(d),g=f.next();!g.done;g=f.next()){g=r(g.value.Lg);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new G(2,4,4018);}var k=d.filter(function(b){return!b.Od});d.filter(function(b){return b.Od}).forEach(function(b){var c=
266
- b.streams[0],d=b.Od;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=Pg(k,"video");f=Pg(k,"audio");if(!c.length&&!f.length)throw new G(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)Qg(b,f[g],c[h],d);b=Pg(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function Pg(b,c){return b.filter(function(b){return b.contentType==c})}
267
- function Qg(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<Bd(f,g).length:1){g=Bd(c.drmInfos,d.drmInfos);for(var h=0;h<c.streams.length;h++)for(var k=0;k<d.streams.length;k++)f=(d.streams[k].bandwidth||0)+(c.streams[h].bandwidth||0),f={id:b.j++,language:c.language,primary:c.nd||d.nd,audio:c.streams[h],video:d.streams[k],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}}else for(g=c||d,h=0;h<g.streams.length;h++)f=g.streams[h].bandwidth||
268
- 0,f={id:b.j++,language:g.language||"und",primary:g.nd,audio:c?g.streams[h]:null,video:d?g.streams[h]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
269
- p.zg=function(b,c){b.ra=Og(c,b.ya,null);var d=!1,e=O.X(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter(Jd.Ya),g=void 0,h="text"==b.ra.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,n=!1;O.X(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
270
- m=b.getAttribute("value"):n=!0});k=O.X(c,"Accessibility");var q=new Map;e={};k=r(k);for(l=k.next();!l.done;e={Xb:e.Xb},l=k.next()){l=l.value;var x=l.getAttribute("schemeIdUri");if("urn:scte:dash:cc:cea-608:2015"==x||"urn:scte:dash:cc:cea-708:2015"==x)e.Xb=1,l=l.getAttribute("value"),null!=l?l.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.Xb,b.Xb+=2;q.set(d,C(c))}}(e)):
271
- q.set("CC1","und")}if(n)return null;e=O.X(c,"ContentProtection");var w=Kf(e,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);e=C(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=O.X(c,"Representation");f=k.map(this.Cg.bind(this,b,w,g,e,l,d,f,q)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new G(2,4,4003);}b.ra.contentType&&"application"!=b.ra.contentType||(b.ra.contentType=Rg(f[0].mimeType,f[0].codecs),f.forEach(function(c){c.type=b.ra.contentType}));f.forEach(function(b){w.drmInfos.forEach(function(c){b.keyId&&
272
- c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter(Jd.Ya);return{id:b.ra.id||"__fake__"+this.j++,contentType:b.ra.contentType,language:e,nd:d,streams:f,drmInfos:w.drmInfos,Od:m,Lg:h}};
273
- p.Cg=function(b,c,d,e,f,g,h,k,l){b.G=Og(l,b.ra,null);if(!Sg(b.G))return null;b.bandwidth=O.O(l,"bandwidth",O.Kc)||0;var m=b.G.contentType;m="text"==m||"application"==m;try{var n=this.Mg.bind(this);if(b.G.jc)var q=tg(b,n);else if(b.G.bb)q=wg(b,this.u);else if(b.G.lc)q=Ag(b,n,this.u,!!this.c);else{var x=b.G.Ba,w=b.Z.duration||0;q={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<w?1:null},getSegmentReference:function(b){return 1!=b?null:new P(1,0,w,function(){return x},
274
- 0,null)},initSegmentReference:null,Aa:0}}}catch(A){if(m&&4002==A.code)return null;throw A;}l=O.X(l,"ContentProtection");l=Nf(l,this.b.dash.customScheme,c,this.b.dash.ignoreDrmInfo);return{id:this.j++,originalId:b.G.id,createSegmentIndex:q.createSegmentIndex,findSegmentPosition:q.findSegmentPosition,getSegmentReference:q.getSegmentReference,initSegmentReference:q.initSegmentReference,presentationTimeOffset:q.Aa,mimeType:b.G.mimeType,codecs:b.G.codecs,frameRate:b.G.frameRate,bandwidth:b.bandwidth,width:b.G.width,
275
- height:b.G.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.ra.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.G.emsgSchemeIdUris,roles:h,channelsCount:b.G.td,closedCaptions:k}};function Hg(b){t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return e=0,za(d,2),u(d,Ig(b),4);case 4:e=d.A;Ba(d,3);break;case 2:f=Ca(d),b.a&&(f.severity=1,b.a.onError(f));case 3:if(!b.a)return d["return"]();Jg(b,e);v(d)}})})}
276
- function Jg(b,c){0>b.v||b.l.S(Math.max(3,b.v-c,vb(b.w)))}
277
- function Og(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,td:null};d=d||c.Ba;var e=O.Ob,f=O.wf,g=O.X(b,"BaseURL").map(O.Ac),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=O.O(b,"frameRate",f)||c.frameRate;var m=O.X(b,"InbandEventStream"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute("schemeIdUri"),n.includes(q)||n.push(q);m=O.X(b,
278
- "AudioChannelConfiguration");m=Tg(m)||c.td;h||(h=Rg(k,l));return{Ba:Kd(d,g),jc:O.yc(b,"SegmentBase")||c.jc,bb:O.yc(b,"SegmentList")||c.bb,lc:O.yc(b,"SegmentTemplate")||c.lc,width:O.O(b,"width",e)||c.width,height:O.O(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute("id"),td:m}}
279
- function Tg(b){for(var c=0;c<b.length;++c){var d=b[c],e=d.getAttribute("schemeIdUri");if(e&&(d=d.getAttribute("value")))switch(e){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":e=parseInt(d,10);if(!e)continue;return e;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(e=parseInt(d,
280
- 16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function Sg(b){var c=b.jc?1:0;c+=b.bb?1:0;c+=b.lc?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.jc&&(b.bb=null),b.lc=null);return!0}
281
- function Ug(b,c,d,e){c=Kd(c,[d]);c=kc(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);gc(b.g,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=Hc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
282
- function Ng(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return Jd.uf(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Ug(this,c,b,"HEAD");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 Ug(this,
245
+ function yg(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.Bb||!b.Z.ld,n=b.Z.start,q=b.Z.duration,w=c,x=null;return{createSegmentIndex:function(){var b=[w(e,f,g),"webm"==h?w(d.c(),d.b,d.a):null];w=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?ig(c,f,e,k):(new sg).parse(c,b,e,k);l.Kb(c,n);x=new kg(c);m&&lg(x,q)})},findSegmentPosition:function(b){return x.find(b)},getSegmentReference:function(b){return x.get(b)}}}function xg(b){return b.jc};function zg(b,c){var d=vg(b,Ag);var e=Bg(b);var f=cg(b,Ag),g=f.tb;0==g&&(g=1);var h=0;f.ka?h=f.ka*(g-1):f.T&&0<f.T.length&&(h=f.T[0].start);e={ka:f.ka,startTime:h,tb:g,Aa:f.Aa,T:f.T,Ib:e};if(!e.ka&&!e.T&&1<e.Ib.length)throw new I(2,4,4002);if(!e.ka&&!b.Z.duration&&!e.T&&1==e.Ib.length)throw new I(2,4,4002);if(e.T&&0==e.T.length)throw new I(2,4,4002);g=f=null;b.ya.id&&b.G.id&&(g=b.ya.id+","+b.G.id,f=c[g]);h=Cg(b.Z.duration,e.tb,b.G.Ba,e);f?(f.qd(h),g=b.presentationTimeline.ac(),f.Zc(g-b.Z.start)):
246
+ (b.presentationTimeline.Kb(h,b.Z.start),f=new kg(h),g&&b.Bb&&(c[g]=f));b.Bb&&b.Z.ld||lg(f,b.Z.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,Aa:e.Aa}}function Ag(b){return b.bb}
247
+ function Cg(b,c,d,e){var f=e.Ib.length;e.T&&e.T.length!=e.Ib.length&&(f=Math.min(e.T.length,e.Ib.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.Ib[k],m=Ld(d,[l.gg]),n=void 0;n=null!=e.ka?h+e.ka:e.T?e.T[k].end:h+b;g.push(new S(k+c,h,n,function(b){return b}.bind(null,m),l.start,l.end));h=n}return g}
248
+ function Bg(b){return[b.G.bb,b.qa.bb,b.ya.bb].filter(Kd.Ya).map(function(b){return R.X(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.oe&&(b.oe=!0);var d=c.getAttribute("media");c=R.O(c,"mediaRange",R.Mc,{start:0,end:null});return{gg:d,start:c.start,end:c.end}})};function Dg(b,c,d,e){var f=Eg(b);var g=cg(b,Fg);var h=dg(b,Fg,"media"),k=dg(b,Fg,"index");g={ka:g.ka,timescale:g.timescale,tb:g.tb,Aa:g.Aa,Ud:g.Ud,T:g.T,pd:h,dc:k};h=g.dc?1:0;h+=g.T?1:0;h+=g.ka?1:0;if(0==h)throw new I(2,4,4002);1!=h&&(g.dc&&(g.T=null),g.ka=null);if(!g.dc&&!g.pd)throw new I(2,4,4002);if(g.dc){d=b.G.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new I(2,4,4006);if("webm"==d&&!f)throw new I(2,4,4005);e=bg(g.dc,b.G.id,null,b.bandwidth||null,null);e=Ld(b.G.Ba,[e]);b=yg(b,c,f,e,0,
249
+ null,d,g.Aa)}else g.ka?(e||(b.presentationTimeline.sd(g.ka),b.presentationTimeline.td(b.Z.start)),b=Gg(b,g)):(h=c=null,b.ya.id&&b.G.id&&(h=b.ya.id+","+b.G.id,c=d[h]),k=Hg(b,g),e=!b.Bb||!b.Z.ld,c?(e&&lg(new kg(k),b.Z.duration),c.qd(k),d=b.presentationTimeline.ac(),c.Zc(d-b.Z.start)):(b.presentationTimeline.Kb(k,b.Z.start),c=new kg(k),h&&b.Bb&&(d[h]=c)),e&&lg(c,b.Z.duration),b={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:c.find.bind(c),getSegmentReference:c.get.bind(c)});return{createSegmentIndex:b.createSegmentIndex,
250
+ findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,Aa:g.Aa}}function Fg(b){return b.lc}
251
+ function Gg(b,c){var d=b.Z.duration,e=c.ka,f=c.tb,g=c.timescale,h=c.pd,k=b.bandwidth||null,l=b.G.id,m=b.G.Ba;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0>b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,n=c+e;d&&(n=Math.min(n,d));return 0>n||d&&c>=d?null:new S(b,c,n,function(){var d=bg(h,l,b+f,k,c*g);return Ld(m,[d])},0,null)}}}
252
+ function Hg(b,c){for(var d=[],e=0;e<c.T.length;e++){var f=e+c.tb;d.push(new S(f,c.T[e].start,c.T[e].end,function(b,c,d,e,f,n){b=bg(b,c,f,d,n);return Ld(e,[b]).map(function(b){return b.toString()})}.bind(null,c.pd,b.G.id,b.bandwidth||null,b.G.Ba,f,c.T[e].hh+c.Ud),0,null))}return d}function Eg(b){var c=dg(b,Fg,"initialization");if(!c)return null;var d=b.G.id,e=b.bandwidth||null,f=b.G.Ba;return new hg(function(){var b=bg(c,d,null,e,null);return Ld(f,[b])},0,null)};var T={Pb:{},gc:{},Cd:function(b,c){T.gc[b]=c}};z("shaka.media.ManifestParser.registerParserByExtension",T.Cd);T.ic=function(b,c){T.Pb[b]=c};z("shaka.media.ManifestParser.registerParserByMime",T.ic);
253
+ T.Hg=function(){var b={};if(Ec()){for(var c in T.Pb)b[c]=!0;for(var d in T.gc)b[d]=!0}c={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};d=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var e=d.next();!e.done;e=d.next())e=e.value,b[e]=Ec()?!!T.Pb[e]:Fc(e);for(var f in c)b[f]=Ec()?!!T.gc[f]:Fc(c[f]);return b};
254
+ T.create=function(b,c,d,e){return t(function g(){var h,k;return y(g,function(g){switch(g.s){case 1:return Aa(g,2),u(g,T.If(b,c,d,e),4);case 4:return h=g.A,g["return"](new h);case 2:throw k=Da(g),k.severity=2,k;}})})};
255
+ T.If=function(b,c,d,e){return t(function g(){var h,k,l,m,n;return y(g,function(g){switch(g.s){case 1:h=T;if(e&&(k=h.Pb[e.toLowerCase()]))return g["return"](k);if(l=h.getExtension(b))if(m=h.gc[l])return g["return"](m);if(e){g.C(2);break}return u(g,h.Sf(b,c,d),3);case 3:if(e=g.A)if(n=T.Pb[e])return g["return"](n);case 2:throw new I(2,4,4E3,b);}})})};
256
+ T.Sf=function(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.s){case 1:return g=jc([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.A,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};T.getExtension=function(b){b=(new yb(b)).xa.split("/").pop().split(".");return 1==b.length?"":b.pop().toLowerCase()};T.isSupported=function(b,c){return Ec()?c in T.Pb||T.getExtension(b)in T.gc?!0:!1:!1};function U(b,c,d){this.f=b;this.Nc=c;this.j=this.g=Infinity;this.a=1;this.b=this.c=null;this.o=0;this.u=!0;this.l=0;this.v=void 0===d?!0:d}z("shaka.media.PresentationTimeline",U);U.prototype.ia=function(){return this.g};U.prototype.getDuration=U.prototype.ia;U.prototype.Ma=function(b){this.g=b};U.prototype.setDuration=U.prototype.Ma;U.prototype.Vf=function(){return this.f};U.prototype.getPresentationStartTime=U.prototype.Vf;U.prototype.Ve=function(b){this.o=b};U.prototype.setClockOffset=U.prototype.Ve;
257
+ U.prototype.mc=function(b){this.u=b};U.prototype.setStatic=U.prototype.mc;U.prototype.Ld=function(b){this.j=b};U.prototype.setSegmentAvailabilityDuration=U.prototype.Ld;U.prototype.Ug=function(b){this.Nc=b};U.prototype.setDelay=U.prototype.Ug;U.prototype.Gf=function(){return this.Nc};U.prototype.getDelay=U.prototype.Gf;
258
+ U.prototype.Kb=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.td(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.v&&(this.f=(Date.now()+this.o)/1E3-this.b-this.a)}};U.prototype.notifySegments=U.prototype.Kb;U.prototype.td=function(b){this.c=null==this.c?b:Math.min(this.c,b)};U.prototype.notifyMinSegmentStartTime=U.prototype.td;U.prototype.sd=function(b){this.a=Math.max(this.a,b)};
259
+ U.prototype.notifyMaxSegmentDuration=U.prototype.sd;U.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};U.prototype.offset=U.prototype.offset;U.prototype.U=function(){return Infinity==this.g&&!this.u};U.prototype.isLive=U.prototype.U;U.prototype.pb=function(){return Infinity!=this.g&&!this.u};U.prototype.isInProgress=U.prototype.pb;U.prototype.ac=function(){if(Infinity==this.j)return this.l;var b=this.Eb()-this.j;return Math.max(this.l,b)};
260
+ U.prototype.getSegmentAvailabilityStart=U.prototype.ac;U.prototype.Ye=function(b){this.l=b};U.prototype.setUserSeekStart=U.prototype.Ye;U.prototype.Eb=function(){return this.U()||this.pb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.a-this.f),this.g):this.g};U.prototype.getSegmentAvailabilityEnd=U.prototype.Eb;U.prototype.$b=function(b){var c=Math.max(this.c,this.l);if(Infinity==this.j)return c;var d=this.Eb()-this.j;b=Math.min(d+b,this.Qa());return Math.max(c,b)};
261
+ U.prototype.getSafeSeekRangeStart=U.prototype.$b;U.prototype.Db=function(){return this.$b(0)};U.prototype.getSeekRangeStart=U.prototype.Db;U.prototype.Qa=function(){var b=this.U()||this.pb()?this.Nc:0;return Math.max(0,this.Eb()-b)};U.prototype.getSeekRangeEnd=U.prototype.Qa;U.prototype.df=function(){return null==this.f||null!=this.b?!1:!0};U.prototype.usingPresentationStartTime=U.prototype.df;function Ig(b,c,d,e){b=jc(b,e);if(0!=c||null!=d)b.headers.Range=d?"bytes="+c+"-"+d:"bytes="+c+"-";return b};function Jg(){var b=this;this.a=this.b=null;this.f=[];this.c=null;this.o=[];this.j=1;this.u={};this.v=0;this.w=new tb(5);this.l=new F(function(){Kg(b)});this.g=new ec}z("shaka.dash.DashParser",Jg);p=Jg.prototype;p.configure=function(b){this.b=b};p.start=function(b,c){var d=this;return t(function f(){var g;return y(f,function(f){switch(f.s){case 1:return d.f=[b],d.a=c,u(f,Lg(d),2);case 2:g=f.A;d.a&&Mg(d,g);if(!d.a)throw new I(2,7,7001);return f["return"](d.c)}})})};
262
+ p.stop=function(){this.b=this.a=null;this.f=[];this.c=null;this.o=[];this.u={};null!=this.l&&(this.l.stop(),this.l=null);return this.g.destroy()};p.update=function(){Lg(this)["catch"](function(b){if(this.a)this.a.onError(b)}.bind(this))};p.onExpirationUpdated=function(){};
263
+ function Lg(b){var c=Date.now(),d=b.a.networkingEngine.request(0,jc(b.f,b.b.retryParameters));fc(b.g,d);return d.promise.then(function(c){if(b.a)return c.uri&&!b.f.includes(c.uri)&&b.f.unshift(c.uri),Ng(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;ub(b.w,1,d);return d})}function Ng(b,c,d){c=R.Ge(c,"MPD");if(!c)throw new I(2,4,4001,d);c=gg(c,b.b.retryParameters,b.b.dash.xlinkFailGracefully,d,b.a.networkingEngine);fc(b.g,c);return c.promise.then(function(c){return Og(b,c,d)})}
264
+ function Og(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,C,E,G,H,ba,ia,va,Ja,la,wa,Ea,sa,ab,Ka,Eb,Pa,ob;return y(f,function(f){switch(f.s){case 1:l=Kd;m=R;n=[d];q=m.X(c,"Location").map(m.Ac).filter(l.Ya);0<q.length&&(w=Ld(n,q),n=b.f=w);x=m.X(c,"BaseURL").map(m.Ac);C=Ld(n,x);E=b.b.dash.ignoreMinBufferTime;G=0;E||(G=m.O(c,"minBufferTime",m.Sa));b.v=m.O(c,"minimumUpdatePeriod",m.Sa,-1);H=m.O(c,"availabilityStartTime",m.Cg);ba=m.O(c,"timeShiftBufferDepth",m.Sa);ia=m.O(c,"suggestedPresentationDelay",
265
+ m.Sa);va=m.O(c,"maxSegmentDuration",m.Sa);Ja=c.getAttribute("type")||"static";b.c?la=b.c.presentationTimeline:(wa=Math.max(b.b.dash.defaultPresentationDelay,1.5*G),Ea=null!=ia?ia:wa,la=new U(H,Ea,b.b.dash.autoCorrectDrift));sa={Bb:"static"!=Ja,presentationTimeline:la,ya:null,Z:null,qa:null,G:null,bandwidth:0,oe:!1};for(var Mc=sa,Fb=C,Pb=R.O(c,"mediaPresentationDuration",R.Sa),Gb=[],Qa=0,Nc=R.X(c,"Period"),qb=0;qb<Nc.length;qb++){var Ra=Nc[qb];Qa=R.O(Ra,"start",R.Sa,Qa);var Ud=R.O(Ra,"duration",R.Sa),
266
+ Hb=null;if(qb!=Nc.length-1){var pb=R.O(Nc[qb+1],"start",R.Sa);null!=pb&&(Hb=pb-Qa)}else null!=Pb&&(Hb=Pb-Qa);null==Hb&&(Hb=Ud);Ra=Pg(b,Mc,Fb,{start:Qa,duration:Hb,node:Ra,ld:null==Hb||qb==Nc.length-1});Gb.push(Ra);Ud=Mc.ya.id;b.o.includes(Ud)||(b.o.push(Ud),b.c&&(b.a.filterNewPeriod(Ra),b.c.periods.push(Ra)));if(null==Hb){Qa=null;break}Qa+=Hb}null==b.c&&b.a.filterAllPeriods(Gb);null!=Pb?(g=Gb,h=Pb,k=!1):(g=Gb,h=Qa,k=!0);ab=h;Ka=g;la.mc("static"==Ja);"static"!=Ja&&k||la.Ma(ab||Infinity);(Eb=la.U())&&
267
+ !isNaN(b.b.availabilityWindowOverride)&&(ba=b.b.availabilityWindowOverride);null==ba&&(ba=Infinity);la.Ld(ba);la.sd(va||1);if(b.c){f.C(0);break}b.c={presentationTimeline:la,periods:Ka,offlineSessionIds:[],minBufferTime:G||0};if(!la.df()){f.C(0);break}Pa=m.X(c,"UTCTiming");return u(f,Qg(b,C,Pa),4);case 4:ob=f.A;if(!b.a)return f["return"]();la.Ve(ob);v(f)}})})}
268
+ function Pg(b,c,d,e){c.ya=Rg(e.node,null,d);c.Z=e;c.ya.id||(c.ya.id="__shaka_period_"+e.start);R.X(e.node,"EventStream").forEach(b.Dg.bind(b,e.start,e.duration));d=R.X(e.node,"AdaptationSet").map(b.Bg.bind(b,c)).filter(Kd.Ya);if(c.Bb){c=[];for(var f=r(d),g=f.next();!g.done;g=f.next()){g=r(g.value.Ng);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new I(2,4,4018);}var k=d.filter(function(b){return!b.Rd});d.filter(function(b){return b.Rd}).forEach(function(b){var c=
269
+ b.streams[0],d=b.Rd;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=Sg(k,"video");f=Sg(k,"audio");if(!c.length&&!f.length)throw new I(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)Tg(b,f[g],c[h],d);b=Sg(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function Sg(b,c){return b.filter(function(b){return b.contentType==c})}
270
+ function Tg(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<Cd(f,g).length:1){g=Cd(c.drmInfos,d.drmInfos);for(var h=0;h<c.streams.length;h++)for(var k=0;k<d.streams.length;k++)f=(d.streams[k].bandwidth||0)+(c.streams[h].bandwidth||0),f={id:b.j++,language:c.language,primary:c.od||d.od,audio:c.streams[h],video:d.streams[k],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}}else for(g=c||d,h=0;h<g.streams.length;h++)f=g.streams[h].bandwidth||
271
+ 0,f={id:b.j++,language:g.language||"und",primary:g.od,audio:c?g.streams[h]:null,video:d?g.streams[h]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
272
+ p.Bg=function(b,c){b.qa=Rg(c,b.ya,null);var d=!1,e=R.X(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter(Kd.Ya),g=void 0,h="text"==b.qa.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,n=!1;R.X(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
273
+ m=b.getAttribute("value"):n=!0});k=R.X(c,"Accessibility");var q=new Map;e={};k=r(k);for(l=k.next();!l.done;e={Xb:e.Xb},l=k.next()){var w=l.value;l=w.getAttribute("schemeIdUri");w=w.getAttribute("value");"urn:scte:dash:cc:cea-608:2015"==l||"urn:scte:dash:cc:cea-708:2015"==l?(e.Xb=1,null!=w?w.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.Xb,b.Xb+=2;q.set(d,B(c))}}(e)):
274
+ q.set("CC1","und")):"urn:mpeg:dash:role:2011"==l&&null!=w&&(f.push(w),"captions"==w&&(g="caption"))}if(n)return null;e=R.X(c,"ContentProtection");var x=Uf(e,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);e=B(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=R.X(c,"Representation");f=k.map(this.Eg.bind(this,b,x,g,e,l,d,f,q)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new I(2,4,4003);}b.qa.contentType&&"application"!=b.qa.contentType||(b.qa.contentType=Ug(f[0].mimeType,
275
+ f[0].codecs),f.forEach(function(c){c.type=b.qa.contentType}));f.forEach(function(b){x.drmInfos.forEach(function(c){b.keyId&&c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter(Kd.Ya);return{id:b.qa.id||"__fake__"+this.j++,contentType:b.qa.contentType,language:e,od:d,streams:f,drmInfos:x.drmInfos,Rd:m,Ng:h}};
276
+ p.Eg=function(b,c,d,e,f,g,h,k,l){b.G=Rg(l,b.qa,null);if(!Vg(b.G))return null;b.bandwidth=R.O(l,"bandwidth",R.Lc)||0;var m=b.G.contentType;m="text"==m||"application"==m;try{var n=this.Og.bind(this);if(b.G.jc)var q=wg(b,n);else if(b.G.bb)q=zg(b,this.u);else if(b.G.lc)q=Dg(b,n,this.u,!!this.c);else{var w=b.G.Ba,x=b.Z.duration||0;q={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<x?1:null},getSegmentReference:function(b){return 1!=b?null:new S(1,0,x,function(){return w},
277
+ 0,null)},initSegmentReference:null,Aa:0}}}catch(C){if(m&&4002==C.code)return null;throw C;}l=R.X(l,"ContentProtection");l=Xf(l,this.b.dash.customScheme,c,this.b.dash.ignoreDrmInfo);return{id:this.j++,originalId:b.G.id,createSegmentIndex:q.createSegmentIndex,findSegmentPosition:q.findSegmentPosition,getSegmentReference:q.getSegmentReference,initSegmentReference:q.initSegmentReference,presentationTimeOffset:q.Aa,mimeType:b.G.mimeType,codecs:b.G.codecs,frameRate:b.G.frameRate,bandwidth:b.bandwidth,width:b.G.width,
278
+ height:b.G.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.qa.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.G.emsgSchemeIdUris,roles:h,channelsCount:b.G.ud,closedCaptions:k}};function Kg(b){t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return e=0,Aa(d,2),u(d,Lg(b),4);case 4:e=d.A;Ca(d,3);break;case 2:f=Da(d),b.a&&(f.severity=1,b.a.onError(f));case 3:if(!b.a)return d["return"]();Mg(b,e);v(d)}})})}
279
+ function Mg(b,c){0>b.v||b.l.S(Math.max(3,b.v-c,vb(b.w)))}
280
+ function Rg(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,ud:null};d=d||c.Ba;var e=R.Ob,f=R.yf,g=R.X(b,"BaseURL").map(R.Ac),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=R.O(b,"frameRate",f)||c.frameRate;var m=R.X(b,"InbandEventStream"),n=c.emsgSchemeIdUris.slice();m=r(m);for(var q=m.next();!q.done;q=m.next())q=q.value.getAttribute("schemeIdUri"),n.includes(q)||n.push(q);m=R.X(b,
281
+ "AudioChannelConfiguration");m=Wg(m)||c.ud;h||(h=Ug(k,l));return{Ba:Ld(d,g),jc:R.yc(b,"SegmentBase")||c.jc,bb:R.yc(b,"SegmentList")||c.bb,lc:R.yc(b,"SegmentTemplate")||c.lc,width:R.O(b,"width",e)||c.width,height:R.O(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:n,id:b.getAttribute("id"),ud:m}}
282
+ function Wg(b){for(var c=0;c<b.length;++c){var d=b[c],e=d.getAttribute("schemeIdUri");if(e&&(d=d.getAttribute("value")))switch(e){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":e=parseInt(d,10);if(!e)continue;return e;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(e=parseInt(d,
283
+ 16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function Vg(b){var c=b.jc?1:0;c+=b.bb?1:0;c+=b.lc?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.jc&&(b.bb=null),b.lc=null);return!0}
284
+ function Xg(b,c,d,e){c=Ld(c,[d]);c=jc(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(4,c);fc(b.g,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=Kc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
285
+ function Qg(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.b.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return Kd.wf(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Xg(this,c,b,"HEAD");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 Xg(this,
283
286
  c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return Za("NTP UTCTiming scheme is not supported"),Promise.reject();default:return Za("Unrecognized scheme in UTCTiming element",d),Promise.reject()}}.bind(b))["catch"](function(){Za("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!");
284
- return 0})}p.Bg=function(b,c,d){var e=O.Ob,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=O.O(d,"timescale",e)||1;O.X(d,"Event").forEach(function(d){var k=O.O(d,"presentationTime",e)||0,m=O.O(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};
285
- p.Mg=function(b,c,d){b=Fg(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);gc(this.g,b);return b.promise.then(function(b){return b.data})};function Rg(b,c){return le(xc(b,c))?"text":b.split("/")[0]}S.Bd("mpd",Gg);S.ic("application/dash+xml",Gg);function Vg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Wg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Wg.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function Xg(b,c){this.name=b;this.value=c}
286
- Wg.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function Yg(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function Zg(b,c){this.b=c;this.a=b};var $g={Cb:function(b,c){return b.filter(function(b){return b.name==c})},jb:function(b,c){var d=$g.Cb(b,c);return d.length?d[0]:null},$c:function(b,c,d){return b.filter(function(b){var e=b.getAttribute("TYPE");b=b.getAttribute("GROUP-ID");return e.value==c&&b.value==d})},Vc:function(b,c){return Kd([b],[c])[0]},jd:function(b){return/^#(?!EXT)/m.test(b)}};function ah(b){this.b=b;this.a=0}function bh(b){ch(b,/[ \t]+/gm)}function ch(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Pg:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Pg}function dh(b){return b.a==b.b.length?null:(b=ch(b,/[^ \t\n]*/gm))?b[0]:null};function eh(){this.a=0}
287
- function fh(b,c,d){c=Hc(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new G(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!$g.jd(e[f])){var g=gh(b,e[f]);--b.a;if(hh.includes(g.name)){c=1;break}else"EXT-X-STREAM-INF"==g.name&&(f+=1)}f=[];for(g=1;g<e.length;)if($g.jd(e[g]))g+=1;else{var h=gh(b,e[g]);if(ih.includes(h.name)){if(1!=c)throw new G(2,4,4017);e=e.splice(g,e.length-g);b=jh(b,d,e,f);return new Vg(d,c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==
288
- h.name&&(h.a.push(new Xg("URI",e[g])),g+=1)}return new Vg(d,c,f)}function jh(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=gh(b,d),hh.includes(d.name)?e.push(d):g.push(d);else{if($g.jd(d))return[];d=$g.Vc(c,d.trim());f.push(new Zg(d,g));g=[]}});return f}
289
- function gh(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new G(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new ah(g);var k;(k=ch(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=ch(g,l);)e.push(new Xg(k[1],k[2]||k[3]))}return new Wg(d,f,e,h)}var hh="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),ih="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function kh(b){try{var c=kh.parse(b);return Xb({uri:b,xd:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return Vb(d)}}z("shaka.net.DataUriPlugin",kh);
290
- kh.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new G(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new G(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=Rc(c).buffer;else{if(e)throw new G(2,1,1005,b);b=Nc(c)}return{data:b,contentType:d[0]}};jc("data",kh);function lh(){var b=this;this.c=this.g=null;this.W=1;this.F=new Map;this.L=new Set;this.a=new Map;this.b=null;this.w="";this.v=new eh;this.K=0;this.j=new F(function(){mh(b)});this.f=nh;this.u=null;this.D=0;this.H=Infinity;this.l=new fc;this.I=[];this.o=new Map;this.U=!1}z("shaka.hls.HlsParser",lh);p=lh.prototype;p.configure=function(b){this.c=b};
291
- p.start=function(b,c){var d=this;return t(function f(){var g,h;return y(f,function(f){switch(f.s){case 1:return d.g=c,u(f,oh(d,b),2);case 2:return g=f.A,d.w=g.uri,u(f,ph(d,g.data),3);case 3:return h=d.K,0<h&&d.j.S(h),f["return"](d.u)}})})};p.stop=function(){this.j&&(this.j.stop(),this.j=null);var b=[];this.l&&(b.push(this.l.destroy()),this.l=null);this.c=this.g=null;this.F.clear();this.L.clear();this.a.clear();this.u=null;return Promise.all(b)};
292
- p.update=function(){if(this.f!=qh.gb){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(rh(this,d.value));return Promise.all(b)}};
293
- function rh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A;return y(e,function(e){switch(e.s){case 1:return f=$g,g=qh,h=c.mf,u(e,oh(b,h),2);case 2:k=e.A;l=fh(b.v,k.data,k.uri);if(1!=l.type)throw new G(2,4,4017);n=(m=f.jb(l.a,"EXT-X-MEDIA-SEQUENCE"))?Number(m.value):0;q=c.stream;return u(e,sh(b,c.Qc,l,n,q.mimeType,q.codecs),3);case 3:x=e.A;c.kc.a=x;w=x[x.length-1];if(A=f.jb(l.a,"EXT-X-ENDLIST"))th(b,g.gb),b.b.Ma(w.endTime);v(e)}})})}p.onExpirationUpdated=function(){};
294
- function ph(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A;return y(e,function(e){switch(e.s){case 1:f=fh(b.v,c,b.w);if(0!=f.type)throw new G(2,4,4022);return u(e,uh(b,f),2);case 2:g=e.A;if(!b.g)throw new G(2,7,7001);if(b.U&&0==g.variants.length)throw new G(2,4,4034);b.g.filterAllPeriods([g]);h=Infinity;k=0;l=Infinity;for(var H=r(b.a.values()),J=H.next();!J.done;J=H.next())m=J.value,h=Math.min(h,m.qd),k=Math.max(k,m.qd),"text"!=m.stream.type&&(l=Math.min(l,m.duration));b.f!=qh.gb?(b.b=new T(0,
295
- 3*b.D),b.b.mc(!1)):(b.b=new T(null,0),b.b.mc(!0));vh(b);if(b.f!=qh.gb){b.K=b.H;n=qh;b.f==n.Sd&&(q=b.b.Mc,isNaN(b.c.availabilityWindowOverride)||(q=b.c.availabilityWindowOverride),b.b.Jd(q));for(x=0;95443.7176888889<=k;)x+=95443.7176888889,k-=95443.7176888889;if(x)for(H=r(b.a.values()),J=H.next();!J.done;J=H.next())w=J.value,95443.7176888889>w.qd&&(w.stream.presentationTimeOffset=-x,w.kc.offset(x))}else for(b.b.Ma(l),b.b.offset(-h),H=r(b.a.values()),J=H.next();!J.done;J=H.next())A=J.value,A.stream.presentationTimeOffset=
296
- h,A.kc.offset(-h),ig(A.kc,l);b.u={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}
297
- function uh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w,A,D;return y(e,function(e){switch(e.s){case 1:return f=$g,g=Jd,h=c.a,k=f.Cb(c.a,"EXT-X-MEDIA"),l=k.filter(function(b){return"SUBTITLES"==wh(b,"TYPE")}.bind(b)),m=l.map(function(b){return xh(this,b)}.bind(b)),n=k.filter(function(b){return"CLOSED-CAPTIONS"==wh(b,"TYPE")}),yh(b,n),u(e,Promise.all(m),2);case 2:return q=e.A,x=f.Cb(h,"EXT-X-STREAM-INF"),w=x.map(function(b){return zh(this,b,c)}.bind(b)),u(e,Promise.all(w),3);case 3:return A=
298
- e.A,D=A.reduce(g.Uc,[]),D=D.filter(function(b){return null!=b}),e["return"]({startTime:0,variants:D,textStreams:q})}})})}
299
- function zh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,D,H,J,ba,fa,Da,Ja,ka,va,Ea,sa,ab,Ka,Eb,Pa,nb,ob;return y(f,function(f){switch(f.s){case 1:g=Md;h=$g;k=Yg(c,"CODECS","avc1.42E01E,mp4a.40.2");l=Ah(k.split(/\s*,\s*/));m=c.getAttribute("RESOLUTION");q=n=null;x=Yg(c,"FRAME-RATE");w=Number(wh(c,"BANDWIDTH"));m&&(A=m.value.split("x"),n=A[0],q=A[1]);D=h.Cb(d.a,"EXT-X-MEDIA");D=D.filter(function(b){return"CLOSED-CAPTIONS"!=wh(b,"TYPE")});D=D.filter(function(b){var c=Yg(b,"URI")||"";return"SUBTITLES"==
300
- (Yg(b,"TYPE")||"")||""!=c});H=Yg(c,"AUDIO");J=Yg(c,"VIDEO");H?D=h.$c(D,"AUDIO",H):J&&(D=h.$c(D,"VIDEO",J));if(ba=Bh(g.Ga,l)){if(fa=Yg(c,"SUBTITLES"))Da=h.$c(D,"SUBTITLES",fa),Da.length&&(Ja=b.F.get(Da[0].id),Ja.stream.codecs=ba);cc(l,ba)}ka=D.map(function(b){return Ch(this,b,l)}.bind(b));va=[];Ea=[];return u(f,Promise.all(ka),2);case 2:ab=f.A;ab=ab.filter(function(b){return null!=b});H?va=ab:J&&(Ea=ab);Eb=!1;va.length||Ea.length?va.length?(nb=wh(c,"URI"),ob=va[0].Qc,nb==ob?(Ka=g.Ub,Eb=!0):Ka=g.fb):
301
- Ka=g.Ub:1==l.length?(Pa=Bh(g.fb,l),Ka=m||x||Pa?g.fb:g.Ub):(Ka=g.fb,l=[l.join(",")]);if(Eb){f.C(3);break}return u(f,Dh(b,c,l,Ka),4);case 4:sa=f.A;case 3:if(sa)sa.stream.type==g.Ub?va=[sa]:Ea=[sa];else if(null===sa)return f["return"]([]);Ea&&Eh(Ea);va&&Eh(va);return f["return"](Fh(b,va,Ea,w,n,q,x))}})})}function Eh(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})}
302
- function Fh(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var x=q?q.stream:null,w=l?l.drmInfos:null,A=q?q.drmInfos:null;q=(q?q.Qc:"")+" - "+(l?l.Qc:"");var D=void 0;if(n&&x)if(w.length&&A.length?0<Bd(w,A).length:1)D=Bd(w,
303
- A);else continue;else n?D=w:x&&(D=A);b.L.has(q)||(n=Gh(b,n,x,e,D),k.push(n),b.L.add(q))}}return k}function Gh(b,c,d,e,f){return{id:b.W++,language:c?c.language:"und",primary:!!c&&c.primary||!!d&&d.primary,audio:c,video:d,bandwidth:e,drmInfos:f,allowedByApplication:!0,allowedByKeySystem:!0}}function xh(b,c){return t(function e(){var f;return y(e,function(e){switch(e.s){case 1:return wh(c,"TYPE"),u(e,Ch(b,c,[]),2);case 2:return f=e.A,e["return"](f.stream)}})})}
304
- function yh(b,c){for(var d=r(c),e=d.next();!e.done;e=d.next()){e=e.value;wh(e,"TYPE");var f=Yg(e,"LANGUAGE")||"und";f=C(f);var g=wh(e,"GROUP-ID");e=wh(e,"INSTREAM-ID");b.o.get(g)||b.o.set(g,new Map);b.o.get(g).set(e,f)}}
305
- function Ch(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w,A,D;return y(f,function(f){switch(f.s){case 1:g=wh(c,"URI");if(b.a.has(g))return f["return"](b.a.get(g));h=wh(c,"TYPE").toLowerCase();k=Md;"subtitles"==h&&(h=k.Ga);l=C(Yg(c,"LANGUAGE","und"));m=Yg(c,"NAME");n=c.getAttribute("DEFAULT");q=c.getAttribute("AUTOSELECT");x=Yg(c,"CHANNELS");if("audio"==h)if(x){var H=x.split("/")[0];H=parseInt(H,10)}else H=null;else H=null;w=H;A=!!n||!!q;return u(f,Hh(b,g,d,h,l,A,m,w,null),2);case 2:D=f.A;if(null==
306
- D)return f["return"](null);if(b.a.has(g))return f["return"](b.a.get(g));b.F.set(c.id,D);b.a.set(g,D);return f["return"](D)}})})}
307
- function Dh(b,c,d,e){return t(function g(){var h,k,l,m,n;return y(g,function(g){switch(g.s){case 1:h=Md;k=wh(c,"URI");if(b.a.has(k))return g["return"](b.a.get(k));l=Yg(c,"CLOSED-CAPTIONS");m=null;e==h.fb&&l&&"NONE"!=l&&(m=b.o.get(l));return u(g,Hh(b,k,d,e,"und",!1,null,null,m),2);case 2:n=g.A;if(null==n)return g["return"](null);if(b.a.has(k))return g["return"](b.a.get(k));b.a.set(k,n);return g["return"](n)}})})}
308
- function Hh(b,c,d,e,f,g,h,k,l){return t(function n(){var q,x,w,A,D,H,J,ba,fa,Da,Ja,ka,va,Ea,sa,ab,Ka,Eb,Pa,nb,ob,Kc,Fb,Ob,Gb,Qa;return y(n,function(n){switch(n.s){case 1:return q=$g,x=q.Vc(b.w,c),A="",u(n,oh(b,x),2);case 2:H=n.A;x=H.uri;w=fh(b.v,H.data,x);if(1!=w.type)throw new G(2,4,4017);J=[];w.segments.forEach(function(b){b=q.Cb(b.b,"EXT-X-KEY");J.push.apply(J,b)});ba=!1;fa=[];Da=null;for(var pb=r(J),Ra=pb.next();!Ra.done;Ra=pb.next())if(Ja=Ra.value,ka=wh(Ja,"METHOD"),"NONE"!=ka){ba=!0;if("AES-128"==
309
- ka)return b.U=!0,n["return"](null);va=wh(Ja,"KEYFORMAT");if(sa=(Ea=Ih[va])?Ea(Ja):null)sa.keyIds.length&&(Da=sa.keyIds[0]),fa.push(sa)}if(ba&&!fa.length)throw new G(2,4,4026);Jh(b,w);A=Kh(e,d);return u(n,Lh(b,e,A,w),3);case 3:return D=ab=n.A,Eb=(Ka=q.jb(w.a,"EXT-X-MEDIA-SEQUENCE"))?Number(Ka.value):0,u(n,sh(b,c,w,Eb,D,A),4);case 4:return Pa=n.A,nb=Pa[0].startTime,ob=Pa[Pa.length-1].endTime,Kc=ob-nb,Fb=new hg(Pa),Ob=Mh(w),Gb=void 0,"text"==e&&(Gb="subtitle"),Qa={id:b.W++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),
310
- findSegmentPosition:Fb.find.bind(Fb),getSegmentReference:Fb.get.bind(Fb),initSegmentReference:Ob,presentationTimeOffset:0,mimeType:D,codecs:A,kind:Gb,encrypted:ba,keyId:Da,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},n["return"]({stream:Qa,kc:Fb,drmInfos:fa,Qc:c,mf:x,qd:nb,rh:ob,duration:Kc})}})})}
311
- function Jh(b,c){var d=qh,e=$g.jb(c.a,"EXT-X-PLAYLIST-TYPE"),f=$g.jb(c.a,"EXT-X-ENDLIST");f=e&&"VOD"==e.value||f;e=e&&"EVENT"==e.value&&!f;e=!f&&!e;f?th(b,d.gb):(e?th(b,d.Sd):th(b,d.ef),d=Nh(c.a,"EXT-X-TARGETDURATION"),d=Number(d.value),b.D=Math.max(d,b.D),b.H=Math.min(d,b.H))}
312
- function Mh(b){var c=$g.Cb(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new G(2,4,4020);c=c[0];var d=wh(c,"URI"),e=$g.Vc(b.b,d);b=0;d=null;if(c=Yg(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new Yf(function(){return[e]},b,d)}
313
- function Oh(b,c,d,e){var f=c.b,g=c.a;c=Nh(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=$g.jb(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new P(d,e,c,function(){return[g]},h,k)}function vh(b){b.b&&(b.I.forEach(function(c){b.b.Kb(c,0)}),b.I=[])}
314
- function sh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,x,w,A,D,H,J,ba;return y(k,function(k){switch(k.s){case 1:return l=d.segments,m=[],n=l[0].a,q=Oh(null,l[0],e,0),x=Mh(d),u(k,Ph(b,c,x,q,f,g),2);case 2:w=k.A;n.split("/").pop();for(var fa=0;fa<l.length;++fa)A=l[fa],D=m[m.length-1],H=0==fa?w:D.endTime,J=e+fa,ba=Oh(D,A,J,H),m.push(ba);b.I.push(m);vh(b);return k["return"](m)}})})}
315
- function Qh(b,c){return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.s){case 1:return f=hc,g=Fg(c.c(),c.b,c.b+2048-1,b.c.retryParameters),h=Fg(c.c(),c.b,c.a,b.c.retryParameters),za(e,2),u(e,Rh(b,g,f.Td),4);case 4:return k=e.A,e["return"](k);case 2:l=Ca(e);if(7001==l.code)throw l;Za("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",g.uris[0]);return u(e,Rh(b,h,f.Td),
287
+ return 0})}p.Dg=function(b,c,d){var e=R.Ob,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=R.O(d,"timescale",e)||1;R.X(d,"Event").forEach(function(d){var k=R.O(d,"presentationTime",e)||0,m=R.O(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};
288
+ p.Og=function(b,c,d){b=Ig(b,c,d,this.b.retryParameters);b=this.a.networkingEngine.request(1,b);fc(this.g,b);return b.promise.then(function(b){return b.data})};function Ug(b,c){return me(Ac(b,c))?"text":b.split("/")[0]}T.Cd("mpd",Jg);T.ic("application/dash+xml",Jg);function Yg(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Zg(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Zg.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function $g(b,c){this.name=b;this.value=c}
289
+ Zg.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function ah(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function bh(b,c){this.b=c;this.a=b};var ch={Cb:function(b,c){return b.filter(function(b){return b.name==c})},jb:function(b,c){var d=ch.Cb(b,c);return d.length?d[0]:null},bd:function(b,c,d){return b.filter(function(b){var e=b.getAttribute("TYPE");b=b.getAttribute("GROUP-ID");return e.value==c&&b.value==d})},Wc:function(b,c){return Ld([b],[c])[0]},kd:function(b){return/^#(?!EXT)/m.test(b)}};function dh(b){this.b=b;this.a=0}function eh(b){fh(b,/[ \t]+/gm)}function fh(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Rg:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Rg}function gh(b){return b.a==b.b.length?null:(b=fh(b,/[^ \t\n]*/gm))?b[0]:null};function hh(){this.a=0}
290
+ function ih(b,c,d){c=Kc(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new I(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!ch.kd(e[f])){var g=jh(b,e[f]);--b.a;if(kh.includes(g.name)){c=1;break}else"EXT-X-STREAM-INF"==g.name&&(f+=1)}f=[];for(g=1;g<e.length;)if(ch.kd(e[g]))g+=1;else{var h=jh(b,e[g]);if(lh.includes(h.name)){if(1!=c)throw new I(2,4,4017);e=e.splice(g,e.length-g);b=mh(b,d,e,f);return new Yg(d,c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==
291
+ h.name&&(h.a.push(new $g("URI",e[g])),g+=1)}return new Yg(d,c,f)}function mh(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=jh(b,d),kh.includes(d.name)?e.push(d):g.push(d);else{if(ch.kd(d))return[];d=ch.Wc(c,d.trim());f.push(new bh(d,g));g=[]}});return f}
292
+ function jh(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new I(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new dh(g);var k;(k=fh(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=fh(g,l);)e.push(new $g(k[1],k[2]||k[3]))}return new Zg(d,f,e,h)}var kh="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),lh="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function nh(b){try{var c=nh.parse(b);return Wb({uri:b,yd:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return Ub(d)}}z("shaka.net.DataUriPlugin",nh);
293
+ nh.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new I(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new I(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=Sc(c).buffer;else{if(e)throw new I(2,1,1005,b);b=Pc(c)}return{data:b,contentType:d[0]}};ic("data",nh);function oh(){var b=this;this.c=this.g=null;this.W=1;this.F=new Map;this.M=new Set;this.a=new Map;this.b=null;this.w="";this.v=new hh;this.K=0;this.j=new F(function(){ph(b)});this.f=qh;this.u=null;this.D=0;this.H=Infinity;this.l=new ec;this.I=[];this.o=new Map;this.V=!1}z("shaka.hls.HlsParser",oh);p=oh.prototype;p.configure=function(b){this.c=b};
294
+ p.start=function(b,c){var d=this;return t(function f(){var g,h;return y(f,function(f){switch(f.s){case 1:return d.g=c,u(f,rh(d,b),2);case 2:return g=f.A,d.w=g.uri,u(f,sh(d,g.data),3);case 3:return h=d.K,0<h&&d.j.S(h),f["return"](d.u)}})})};p.stop=function(){this.j&&(this.j.stop(),this.j=null);var b=[];this.l&&(b.push(this.l.destroy()),this.l=null);this.c=this.g=null;this.F.clear();this.M.clear();this.a.clear();this.u=null;return Promise.all(b)};
295
+ p.update=function(){if(this.f!=th.gb){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(uh(this,d.value));return Promise.all(b)}};
296
+ function uh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,C;return y(e,function(e){switch(e.s){case 1:return f=ch,g=th,h=c.pf,u(e,rh(b,h),2);case 2:k=e.A;l=ih(b.v,k.data,k.uri);if(1!=l.type)throw new I(2,4,4017);n=(m=f.jb(l.a,"EXT-X-MEDIA-SEQUENCE"))?Number(m.value):0;q=c.stream;return u(e,vh(b,c.Rc,l,n,q.mimeType,q.codecs),3);case 3:w=e.A;c.kc.a=w;x=w[w.length-1];if(C=f.jb(l.a,"EXT-X-ENDLIST"))wh(b,g.gb),b.b.Ma(x.endTime);v(e)}})})}p.onExpirationUpdated=function(){};
297
+ function sh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,C;return y(e,function(e){switch(e.s){case 1:f=ih(b.v,c,b.w);if(0!=f.type)throw new I(2,4,4022);return u(e,xh(b,f),2);case 2:g=e.A;if(!b.g)throw new I(2,7,7001);if(b.V&&0==g.variants.length)throw new I(2,4,4034);b.g.filterAllPeriods([g]);h=Infinity;k=0;l=Infinity;for(var G=r(b.a.values()),H=G.next();!H.done;H=G.next())m=H.value,h=Math.min(h,m.rd),k=Math.max(k,m.rd),"text"!=m.stream.type&&(l=Math.min(l,m.duration));b.f!=th.gb?(b.b=new U(0,
298
+ 3*b.D),b.b.mc(!1)):(b.b=new U(null,0),b.b.mc(!0));yh(b);if(b.f!=th.gb){b.K=b.H;n=th;b.f==n.Vd&&(q=b.b.Nc,isNaN(b.c.availabilityWindowOverride)||(q=b.c.availabilityWindowOverride),b.b.Ld(q));for(w=0;95443.7176888889<=k;)w+=95443.7176888889,k-=95443.7176888889;if(w)for(G=r(b.a.values()),H=G.next();!H.done;H=G.next())x=H.value,95443.7176888889>x.rd&&(x.stream.presentationTimeOffset=-w,x.kc.offset(w))}else for(b.b.Ma(l),b.b.offset(-h),G=r(b.a.values()),H=G.next();!H.done;H=G.next())C=H.value,C.stream.presentationTimeOffset=
299
+ h,C.kc.offset(-h),lg(C.kc,l);b.u={presentationTimeline:b.b,periods:[g],offlineSessionIds:[],minBufferTime:0};v(e)}})})}
300
+ function xh(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x,C,E;return y(e,function(e){switch(e.s){case 1:return f=ch,g=Kd,h=c.a,k=f.Cb(c.a,"EXT-X-MEDIA"),l=k.filter(function(b){return"SUBTITLES"==zh(b,"TYPE")}.bind(b)),m=l.map(function(b){var c=this;return t(function va(){var e;return y(va,function(f){switch(f.s){case 1:return Aa(f,2),u(f,Ah(c,b),4);case 4:return f["return"](f.A);case 2:e=Da(f);if(c.c.hls.ignoreTextStreamFailures)return f["return"](null);throw e;}})})}.bind(b)),n=k.filter(function(b){return"CLOSED-CAPTIONS"==
301
+ zh(b,"TYPE")}),Bh(b,n),u(e,Promise.all(m),2);case 2:return q=e.A,w=f.Cb(h,"EXT-X-STREAM-INF"),x=w.map(function(b){return Ch(this,b,c)}.bind(b)),u(e,Promise.all(x),3);case 3:return C=e.A,E=C.reduce(g.Vc,[]),E=E.filter(function(b){return null!=b}),e["return"]({startTime:0,variants:E,textStreams:q.filter(function(b){return null!=b})})}})})}
302
+ function Ch(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,C,E,G,H,ba,ia,va,Ja,la,wa,Ea,sa,ab,Ka,Eb,Pa,ob,pb;return y(f,function(f){switch(f.s){case 1:g=Nd;h=ch;k=ah(c,"CODECS","avc1.42E01E,mp4a.40.2");l=Dh(k.split(/\s*,\s*/));m=c.getAttribute("RESOLUTION");q=n=null;w=ah(c,"FRAME-RATE");x=Number(zh(c,"BANDWIDTH"));m&&(C=m.value.split("x"),n=C[0],q=C[1]);E=h.Cb(d.a,"EXT-X-MEDIA");E=E.filter(function(b){return"CLOSED-CAPTIONS"!=zh(b,"TYPE")});E=E.filter(function(b){var c=ah(b,"URI")||"";return"SUBTITLES"==
303
+ (ah(b,"TYPE")||"")||""!=c});G=ah(c,"AUDIO");H=ah(c,"VIDEO");G?E=h.bd(E,"AUDIO",G):H&&(E=h.bd(E,"VIDEO",H));if(ba=Eh(g.Ga,l)){if(ia=ah(c,"SUBTITLES"))if(va=h.bd(E,"SUBTITLES",ia),va.length&&(Ja=b.F.get(va[0].id)))Ja.stream.codecs=ba;bc(l,ba)}la=E.map(function(b){return Fh(this,b,l)}.bind(b));wa=[];Ea=[];return u(f,Promise.all(la),2);case 2:ab=f.A;ab=ab.filter(function(b){return null!=b});G?wa=ab:H&&(Ea=ab);Eb=!1;wa.length||Ea.length?wa.length?(ob=zh(c,"URI"),pb=wa[0].Rc,ob==pb?(Ka=g.Ub,Eb=!0):Ka=g.fb):
304
+ Ka=g.Ub:1==l.length?(Pa=Eh(g.fb,l),Ka=m||w||Pa?g.fb:g.Ub):(Ka=g.fb,l=[l.join(",")]);if(Eb){f.C(3);break}return u(f,Gh(b,c,l,Ka),4);case 4:sa=f.A;case 3:if(sa)sa.stream.type==g.Ub?wa=[sa]:Ea=[sa];else if(null===sa)return f["return"]([]);Ea&&Hh(Ea);wa&&Hh(wa);return f["return"](Ih(b,wa,Ea,x,n,q,w))}})})}function Hh(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})}
305
+ function Ih(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);var k=[];c=r(c);for(var l=c.next();!l.done;l=c.next()){l=l.value;for(var m=r(d),n=m.next();!n.done;n=m.next()){var q=n.value;n=l?l.stream:null;var w=q?q.stream:null,x=l?l.drmInfos:null,C=q?q.drmInfos:null;q=(q?q.Rc:"")+" - "+(l?l.Rc:"");var E=void 0;if(n&&w)if(x.length&&C.length?0<Cd(x,C).length:1)E=Cd(x,
306
+ C);else continue;else n?E=x:w&&(E=C);b.M.has(q)||(n=Jh(b,n,w,e,E),k.push(n),b.M.add(q))}}return k}function Jh(b,c,d,e,f){return{id:b.W++,language:c?c.language:"und",primary:!!c&&c.primary||!!d&&d.primary,audio:c,video:d,bandwidth:e,drmInfos:f,allowedByApplication:!0,allowedByKeySystem:!0}}function Ah(b,c){return t(function e(){var f;return y(e,function(e){switch(e.s){case 1:return zh(c,"TYPE"),u(e,Fh(b,c,[]),2);case 2:return f=e.A,e["return"](f.stream)}})})}
307
+ function Bh(b,c){for(var d=r(c),e=d.next();!e.done;e=d.next()){e=e.value;zh(e,"TYPE");var f=ah(e,"LANGUAGE")||"und";f=B(f);var g=zh(e,"GROUP-ID");e=zh(e,"INSTREAM-ID");b.o.get(g)||b.o.set(g,new Map);b.o.get(g).set(e,f)}}
308
+ function Fh(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x,C,E;return y(f,function(f){switch(f.s){case 1:g=zh(c,"URI");if(b.a.has(g))return f["return"](b.a.get(g));h=zh(c,"TYPE").toLowerCase();k=Nd;"subtitles"==h&&(h=k.Ga);l=B(ah(c,"LANGUAGE","und"));m=ah(c,"NAME");n=c.getAttribute("DEFAULT");q=c.getAttribute("AUTOSELECT");w=ah(c,"CHANNELS");if("audio"==h)if(w){var G=w.split("/")[0];G=parseInt(G,10)}else G=null;else G=null;x=G;C=!!n||!!q;return u(f,Kh(b,g,d,h,l,C,m,x,null),2);case 2:E=f.A;if(null==
309
+ E)return f["return"](null);if(b.a.has(g))return f["return"](b.a.get(g));b.F.set(c.id,E);b.a.set(g,E);return f["return"](E)}})})}
310
+ function Gh(b,c,d,e){return t(function g(){var h,k,l,m,n;return y(g,function(g){switch(g.s){case 1:h=Nd;k=zh(c,"URI");if(b.a.has(k))return g["return"](b.a.get(k));l=ah(c,"CLOSED-CAPTIONS");m=null;e==h.fb&&l&&"NONE"!=l&&(m=b.o.get(l));return u(g,Kh(b,k,d,e,"und",!1,null,null,m),2);case 2:n=g.A;if(null==n)return g["return"](null);if(b.a.has(k))return g["return"](b.a.get(k));b.a.set(k,n);return g["return"](n)}})})}
311
+ function Kh(b,c,d,e,f,g,h,k,l){return t(function n(){var q,w,x,C,E,G,H,ba,ia,va,Ja,la,wa,Ea,sa,ab,Ka,Eb,Pa,ob,pb,Mc,Fb,Pb,Gb,Qa;return y(n,function(n){switch(n.s){case 1:return q=ch,w=q.Wc(b.w,c),C="",u(n,rh(b,w),2);case 2:G=n.A;w=G.uri;x=ih(b.v,G.data,w);if(1!=x.type)throw new I(2,4,4017);H=[];x.segments.forEach(function(b){b=q.Cb(b.b,"EXT-X-KEY");H.push.apply(H,b)});ba=!1;ia=[];va=null;for(var qb=r(H),Ra=qb.next();!Ra.done;Ra=qb.next())if(Ja=Ra.value,la=zh(Ja,"METHOD"),"NONE"!=la){ba=!0;if("AES-128"==
312
+ la)return b.V=!0,n["return"](null);wa=zh(Ja,"KEYFORMAT");if(sa=(Ea=Lh[wa])?Ea(Ja):null)sa.keyIds.length&&(va=sa.keyIds[0]),ia.push(sa)}if(ba&&!ia.length)throw new I(2,4,4026);Mh(b,x);C=Nh(e,d);return u(n,Oh(b,e,C,x),3);case 3:return E=ab=n.A,Eb=(Ka=q.jb(x.a,"EXT-X-MEDIA-SEQUENCE"))?Number(Ka.value):0,u(n,vh(b,c,x,Eb,E,C),4);case 4:return Pa=n.A,ob=Pa[0].startTime,pb=Pa[Pa.length-1].endTime,Mc=pb-ob,Fb=new kg(Pa),Pb=Ph(x),Gb=void 0,"text"==e&&(Gb="subtitle"),Qa={id:b.W++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),
313
+ findSegmentPosition:Fb.find.bind(Fb),getSegmentReference:Fb.get.bind(Fb),initSegmentReference:Pb,presentationTimeOffset:0,mimeType:E,codecs:C,kind:Gb,encrypted:ba,keyId:va,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},n["return"]({stream:Qa,kc:Fb,drmInfos:ia,Rc:c,pf:w,rd:ob,uh:pb,duration:Mc})}})})}
314
+ function Mh(b,c){var d=th,e=ch.jb(c.a,"EXT-X-PLAYLIST-TYPE"),f=ch.jb(c.a,"EXT-X-ENDLIST");f=e&&"VOD"==e.value||f;e=e&&"EVENT"==e.value&&!f;e=!f&&!e;f?wh(b,d.gb):(e?wh(b,d.Vd):wh(b,d.hf),d=Qh(c.a,"EXT-X-TARGETDURATION"),d=Number(d.value),b.D=Math.max(d,b.D),b.H=Math.min(d,b.H))}
315
+ function Ph(b){var c=ch.Cb(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new I(2,4,4020);c=c[0];var d=zh(c,"URI"),e=ch.Wc(b.b,d);b=0;d=null;if(c=ah(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new hg(function(){return[e]},b,d)}
316
+ function Rh(b,c,d,e){var f=c.b,g=c.a;c=Qh(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=ch.jb(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new S(d,e,c,function(){return[g]},h,k)}function yh(b){b.b&&(b.I.forEach(function(c){b.b.Kb(c,0)}),b.I=[])}
317
+ function vh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,w,x,C,E,G,H,ba;return y(k,function(k){switch(k.s){case 1:return l=d.segments,m=[],n=l[0].a,q=Rh(null,l[0],e,0),w=Ph(d),u(k,Sh(b,c,w,q,f,g),2);case 2:x=k.A;n.split("/").pop();for(var ia=0;ia<l.length;++ia)C=l[ia],E=m[m.length-1],G=0==ia?x:E.endTime,H=e+ia,ba=Rh(E,C,H,G),m.push(ba);b.I.push(m);yh(b);return k["return"](m)}})})}
318
+ function Th(b,c){return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.s){case 1:return f=gc,g=Ig(c.c(),c.b,c.b+2048-1,b.c.retryParameters),h=Ig(c.c(),c.b,c.a,b.c.retryParameters),Aa(e,2),u(e,Uh(b,g,f.Wd),4);case 4:return k=e.A,e["return"](k);case 2:l=Da(e);if(7001==l.code)throw l;Za("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",g.uris[0]);return u(e,Uh(b,h,f.Wd),
316
319
  5);case 5:return m=e.A,e["return"](m)}})})}
317
- function Ph(b,c,d,e,f,g){return t(function k(){var l,m,n,q,x,w,A,D,H;return y(k,function(k){switch(k.s){case 1:if(b.u&&(l=b.a.get(c),m=l.kc,n=m.get(e.position)))return k["return"](n.startTime);if("audio/mpeg"==f)return k["return"](0);if("video/mp4"!=f&&"audio/mp4"!=f){k.C(2);break}q=[Qh(b,e)];d&&q.push(Qh(b,d));return u(k,Promise.all(q),3);case 3:return x=k.A,w=x[0],A=x[1]||x[0],k["return"](Sh(w.data,A.data));case 2:if("video/mp2t"!=f){k.C(4);break}return u(k,Qh(b,e),5);case 5:return D=k.A,k["return"](Th(D.data));
318
- case 4:if("application/mp4"!=f&&!f.startsWith("text/")){k.C(6);break}return u(k,Qh(b,e),7);case 7:return H=k.A,k["return"](Uh(f,g,H.data));case 6:throw new G(2,4,4030);}})})}
319
- function Sh(b,c){var d=0;(new R).M("moov",bg).M("trak",bg).M("mdia",bg).ua("mdhd",function(b){b.reader.R(0==b.version?8:16);d=b.reader.J();b.parser.stop()}).parse(c,!0);if(!d)throw new G(2,4,4030);var e=0,f=!1;(new R).M("moof",bg).M("traf",bg).ua("tfdt",function(b){e=(0==b.version?b.reader.J():b.reader.Rb())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new G(2,4,4030);return e}
320
- function Th(b){function c(){throw new G(2,4,4030);}b=new Q(new DataView(b),0);for(var d=0,e=0;;)if(d=b.na(),e=b.za(),71!=e&&c(),b.hc()&16384||c(),e=(b.za()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.za(),b.R(e)),1!=b.J()>>8)b.seek(d+188),e=b.za(),71!=e&&(b.seek(d+192),e=b.za()),71!=e&&(b.seek(d+204),e=b.za()),71!=e&&c(),b.Ne(1);else return b.R(3),d=b.za()>>6,0!=d&&1!=d||c(),0==b.za()&&c(),d=b.za(),e=b.hc(),b=b.hc(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
321
- function Uh(b,c,d){b=xc(b,c);if(!le(b))return 0;c=new je(null);me(c,b);return c.ed(d)}function Ah(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Ac(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function Bh(b,c){for(var d=Vh[b],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(d[e].test(c[f].trim()))return c[f].trim();return"text"==b?"":null}function Kh(b,c){if(1==c.length)return c[0];var d=Bh(b,c);if(null!=d)return d;throw new G(2,4,4025,c);}
322
- function Lh(b,c,d,e){return t(function g(){var h,k,l,m,n,q,x,w,A,D;return y(g,function(g){switch(g.s){case 1:h=Md;k=hc;l=e.segments[0].a;m=new yb(l);n=m.xa.split(".").pop();q=Wh[c];if(x=q[n])return g["return"](x);if(c==h.Ga)return d&&"vtt"!=d?g["return"]("application/mp4"):g["return"]("text/vtt");w=kc([l],b.c.retryParameters);w.method="HEAD";return u(g,Rh(b,w,k.Td),2);case 2:A=g.A;D=A.headers["content-type"];if(!D)throw new G(2,4,4021,n);return g["return"](D.split(";")[0])}})})}
323
- function wh(b,c){var d=b.getAttribute(c);if(!d)throw new G(2,4,4023,c);return d.value}function Nh(b,c){var d=$g.jb(b,c);if(!d)throw new G(2,4,4024,c);return d}function oh(b,c){return Rh(b,kc([c],b.c.retryParameters),hc.oh)}
324
- var Vh={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Wh={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
325
- function mh(b){t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:if(!b.g)return d["return"]();za(d,2);return u(d,b.update(),4);case 4:e=b.K;b.j.S(e);Ba(d,0);break;case 2:f=Ca(d),f.severity=1,b.g.onError(f),b.j.S(.1),v(d)}})})}function th(b,c){b.f=c;b.b&&b.b.mc(b.f==qh.gb);b.f!=qh.gb||b.j.stop()}function Rh(b,c,d){if(!b.l)throw new G(2,7,7001);c=b.g.networkingEngine.request(d,c);gc(b.l,c);return c.promise}
326
- var Ih={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=wh(b,"METHOD");Ve("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=wh(b,"URI");c=kh.parse(c);c=new Uint8Array(c.data);c=Ld("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=Yg(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},nh="VOD",qh={gb:nh,ef:"EVENT",Sd:"LIVE"};S.Bd("m3u8",lh);
327
- S.ic("application/x-mpegurl",lh);S.ic("application/vnd.apple.mpegurl",lh);function Xh(){this.a=new Map}function Yh(b,c,d){Zh(b,c).text=d}function Zh(b,c){b.a.has(c)||b.a.set(c,new $h);return b.a.get(c)}function $h(){this.text=this.variant=null};function ai(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=r(c),e=d.next();!e.done;e=d.next())this.add(e.value)}ai.prototype.add=function(b){return bi(this.a,b)?(this.b.add(b),!0):!1};function bi(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&ci(d,e)&&di(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(ci(d,e)&&di(d.roles,e.roles)));return d?!1:!0}
328
- ai.prototype.values=function(){return this.b.values()};function ci(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return Ac(b)[0]}),e=c.codecs.split(",").map(function(b){return Ac(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
329
- function di(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=r(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function ei(b){this.a=b;this.b=new fi(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}ei.prototype.create=function(b){var c=this,d=b.filter(function(b){return bi(c.a,b)});return d.length?new ai(d[0],d):this.b.create(b)};function fi(b,c,d){this.c=b;this.b=c;this.a=d}
330
- fi.prototype.create=function(b){var c=[];c=gi(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=hi(c,this.b),b.length&&(c=b));this.a&&(b=Oe(c,this.a),b.length&&(c=b));b=new ai(c[0]);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,bi(b.a,d)&&b.add(d);return b};function gi(b,c){var d=C(c),e=mb(d,b.map(function(b){return lb(b)}));return e?b.filter(function(b){return e==lb(b)}):[]}
331
- function hi(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function ii(b,c){this.a=ji;this.b=(new Map).set(ji,c).set(ki,b)}var ki=0,ji=1;function li(b,c){this.f=b;this.g=mi(b);this.b=b.a.currentTime;this.c=Date.now()/1E3;this.j=c;this.a=function(){}}li.prototype.release=function(){this.f=null;this.a=function(){}};function ni(b,c){b.a=c}function oi(b){this.a=b}function mi(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function pi(b,c,d,e,f){var g=this;this.a=b;this.w=c;this.v=d;this.o=f;this.f=new L;this.l=!1;this.u=b.readyState;this.c=!1;this.b=e;this.j=!1;this.f.m(b,"waiting",function(){return qi(g)});this.g=(new F(function(){qi(g)})).Na(.25)}pi.prototype.release=function(){this.f&&(this.f.release(),this.f=null);null!=this.g&&(this.g.stop(),this.g=null);this.b&&(this.b.release(),this.b=null);this.a=this.w=this.o=null};pi.prototype.vd=function(){this.j=!0;qi(this)};
332
- function qi(b){if(0!=b.a.readyState){if(b.a.seeking){if(!b.l)return}else b.l=!1;if(!b.a.paused){b.a.readyState!=b.u&&(b.c=!1,b.u=b.a.readyState);var c=b.v.smallGapLimit,d=b.a.currentTime,e=b.a.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=Ec("Edge/")||Ec("Trident/")||Ec("Tizen")||Ec("CrKey")?.5:.1;for(var g=0;g<e.length;g++)if(e.start(g)>d&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.b){b=b.b;d=b.f;e=mi(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.b!=
333
- d||b.g!=e)b.c=f,b.b=d,b.g=e;d=f-b.c;d>=b.j&&e&&b.a(b.b,d)}}else if(0!=f||b.j){g=e.start(f);var h=b.w.Ra();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=!0,d=new B("largegap",{currentTime:d,gapSize:h}),d.cancelable=!0,b.o(d),b.v.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.a.currentTime=g)}}}}};function ri(b){var c=this;this.c=b;this.a=new Set;this.b=(new F(function(){si(c,!1)})).Na(.25)}ri.prototype.release=function(){this.b.stop();for(var b=r(this.a),c=b.next();!c.done;c=b.next())c.value.release();this.a.clear()};function si(b,c){for(var d=r(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function ti(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function ui(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function vi(b){this.c=b;this.a=null;this.b=function(){}}vi.prototype.release=function(){this.a=this.c=null;this.b=function(){}};vi.prototype.g=function(b){var c=this.a,d=this.c.periods;b=ui(d,b)||d[0];c!=b&&this.b(b);this.a=b};function wi(b,c){b.b=c};function xi(b){var c=this;this.a=b;this.f=!1;this.c=this.a.Cc();this.b=new F(function(){c.a.qe(.25*c.c)})}xi.prototype.release=function(){this.b&&(this.b.stop(),this.b=null);this.a=null};xi.prototype.set=function(b){this.c=b;yi(this)};function yi(b){b.b.stop();var c=b.f?0:b.c;if(0<=c)try{b.a.Cc()!=c&&b.a.Id(c);return}catch(d){}b.b.Na(.25);0!=b.a.Cc()&&b.a.Id(0)};function zi(b,c,d){this.a=b;this.f=c;this.g=d;this.b=new L;this.c=new Ai(b);0<b.readyState?Bi(this,d):Ci(this,d)}zi.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.f=function(){};this.a=null};function Di(b){return 0<b.a.readyState?b.a.currentTime:b.g}function Ci(b,c){b.g=c;b.b.oa(b.a,"loadedmetadata");b.b.wa(b.a,"loadedmetadata",function(){Bi(b,c)})}
334
- function Bi(b,c){.001>Math.abs(b.a.currentTime-c)?Ei(b):(b.b.wa(b.a,"seeking",function(){Ei(b)}),Fi(b.c,0==b.a.currentTime?c:b.a.currentTime))}function Ei(b){b.b.m(b.a,"seeking",function(){return b.f()})}function Ai(b){var c=this;this.b=b;this.j=10;this.g=this.f=this.c=0;this.a=new F(function(){0>=c.c?c.a.stop():c.b.currentTime!=c.f?c.a.stop():(c.b.currentTime=c.g,c.c--)})}Ai.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
335
- function Fi(b,c){b.f=b.b.currentTime;b.g=c;b.c=b.j;b.b.currentTime=c;b.a.Na(.1)};function Gi(b){function c(){d.f=!0;null!=d.b&&(d.a.currentTime=d.b)}var d=this;this.a=b;this.f=!1;this.b=null;this.c=new L;0==this.a.readyState?this.c.wa(this.a,"loadedmetadata",c):c()}Gi.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.a=null};Gi.prototype.u=function(b){this.b=this.f?this.b:b};Gi.prototype.j=function(){return(this.f?this.a.currentTime:this.b)||0};Gi.prototype.v=function(){};
336
- function Hi(b,c,d,e,f,g){var h=this;this.b=b;this.a=c.presentationTimeline;this.D=c.minBufferTime||0;this.g=d;this.w=f;this.o=null;this.f=new pi(b,c.presentationTimeline,d,Ii(b,d),g);this.c=new zi(b,function(){a:{var b=h.f;b.l=!0;b.j=!1;b.c=!1;var c=Di(h.c);b=Ji(h,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!h.o||h.o<c-1)){h.o=c;c=h.c;0<c.a.readyState?Fi(c.c,b):Ci(c,b);b=void 0;break a}h.w();b=void 0}return b},Ki(this,e));this.l=(new F(function(){if(0!=h.b.readyState&&!h.b.paused){var b=
337
- h.b.currentTime,c=h.a.Db(),d=h.a.Ra();3>d-c&&(c=d-3);b<c&&(b=Ji(h,b),h.b.currentTime=b)}})).Na(.25)}Hi.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.f&&(this.f.release(),this.f=null);this.l&&(this.l.stop(),this.l=null);this.b=this.c=this.a=this.g=null;this.w=function(){}};Hi.prototype.u=function(b){var c=this.c;0<c.a.readyState?Fi(c.c,b):Ci(c,b)};Hi.prototype.j=function(){var b=Di(this.c);return 0<this.b.readyState&&!this.b.paused?Li(this,b):b};
338
- function Ki(b,c){null==c?c=Infinity>b.a.ia()?b.a.Db():b.a.Ra():0>c&&(c=b.a.Ra()+c);return Mi(b,Li(b,c))}Hi.prototype.v=function(){this.f.vd()};function Mi(b,c){var d=b.a.ia();return c>=d?d-b.g.durationBackoff:c}function Ji(b,c){var d=Gd.bind(null,b.b.buffered),e=Math.max(b.D,b.g.rebufferingGoal),f=b.g.safeSeekOffset,g=b.a.Db(),h=b.a.Ra(),k=b.a.ia();3>h-g&&(g=h-3);var l=b.a.$b(e),m=b.a.$b(f);e=b.a.$b(e+f);return c>=k?Mi(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}
339
- function Li(b,c){var d=b.a.Db();if(c<d)return d;d=b.a.Ra();return c>d?d:c}function Ii(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new li(new oi(b),c.stallThreshold);ni(e,function(){b.currentTime+=d});return e};function Ni(){this.b=function(){};this.a=new Set}Ni.prototype.release=function(){this.b=function(){};this.a.clear()};function Oi(b,c){b.b=c};function Pi(b){var c=this;this.j=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.l=[{wb:null,vb:Qi,ob:function(b,e){return c.a(b,e)}},{wb:Ri,vb:Qi,ob:function(b,e){return c.a(b,e)}},{wb:Si,vb:Qi,ob:function(b,e){return c.a(b,e)}},{wb:Qi,vb:Ri,ob:function(b,e){return c.b(b,e)}},{wb:Qi,vb:Si,ob:function(b,e){return c.b(b,e)}},{wb:Ri,vb:Si,ob:function(b,e){return c.c(b,e)}},{wb:Si,vb:Ri,ob:function(b,e){return c.c(b,e)}}]}
340
- Pi.prototype.release=function(){this.j=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Pi.prototype.g=function(b,c){for(var d=r(this.j.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?Ri:b>e.endTime?Si:Qi;this.f.set(e,g);for(var h=r(this.l),k=h.next();!k.done;k=h.next())k=k.value,k.wb==f&&k.vb==g&&k.ob(e,c)}};function Ti(b,c,d,e){b.a=c;b.b=d;b.c=e}var Ri=1,Qi=2,Si=3;function Ui(b,c){this.a=c;this.c=b;this.g=null;this.o=1;this.w=Promise.resolve();this.j=[];this.l=new Map;this.b=new Map;this.v=!1;this.H=null;this.F=this.f=this.u=!1;this.D=0}Ui.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Vi(c.value);this.b.clear();this.l.clear();this.g=this.j=this.w=this.c=this.a=null;this.f=!0;return Promise.resolve()};
341
- Ui.prototype.configure=function(b){this.g=b;this.H=new Rb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};
342
- Ui.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.s){case 1:return e=b.a.kb(),f=Wi(b,e),g=b.a.we(b.c.periods[f]),g.variant||g.text?u(d,Xi(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](new G(2,5,5005));case 2:if(b.f)return d["return"]();b.a&&b.a.jg&&b.a.jg();v(d)}})})};function Yi(b){return Zi(b,"audio")}function $i(b){return Zi(b,"video")}
343
- function Zi(b,c){var d=b.b.get(c);return d?d.ab||d.stream:null}
344
- function aj(b,c){return t(function e(){var f,g,h,k,l,m,n,q,x,w;return y(e,function(e){switch(e.s){case 1:return f=Md,u(e,ze(b.a.N,f.Ga),2);case 2:return b.D++,b.F=!1,g=b.D,h=b.a.N,k=new Map,l=new Set,k.set(f.Ga,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e["return"]():u(e,bj(b,l),4);case 4:if(b.f)return e["return"]();n=(m=b.a.N.g.isTextVisible())||b.g.alwaysStreamText;b.D!=g||b.b.has(f.Ga)||b.F||!n||(q=b.a.kb(),x=Wi(b,q),w=cj(c,x,0),b.b.set(f.Ga,w),dj(b,w,0));v(e)}})})}
345
- function ej(b,c){var d=b.b.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.ab&&(fj(b,f,!1,0,!1),d.ab=e)}else if(e=d.ab)d.ab=null,fj(b,e,!0,0,!1)}}function gj(b,c,d,e){c.video&&fj(b,c.video,d,e,!1);c.audio&&fj(b,c.audio,d,e,!1)}
346
- function fj(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&"text"==c.type&&b.g.ignoreTextStreamFailures)aj(b,c);else if(g){var h=hj(b,c),k=Array.from(b.b.values()).every(function(b){return b.Ca==g.Ca});d&&h!=g.Ca&&k?b.b.forEach(function(c){ij(b,c)}):(g.ab&&(c.trickModeVideo?(g.ab=c,c=c.trickModeVideo):g.ab=null),(k=b.j[h])&&k.Sb&&(k=b.l.get(c.id))&&k.Sb&&(g.stream!=c||f)&&("text"==c.type&&se(b.a.N,xc(c.mimeType,c.codecs)),g.stream=c,g.Ec=!0,jj(b,g,h)&&g.fc.abort(),d&&(g.hb?g.Rc=!0:g.$a?(g.eb=!0,g.wc=e,g.Rc=
347
- !0):(Vi(g),kj(b,g,!0,e)["catch"](function(c){if(b.a)b.a.onError(c)})))))}}function jj(b,c,d){if(!c.fc)return!1;var e=b.a.kb(),f=ve(b.a.N,c.type);d=(d=lj(b,c,e,f,d))?d.a?d.a-d.b:null:null;if(null==d)return!1;var g=c.stream.initSegmentReference;g&&(d+=(g.a?g.a-g.b:null)||0);g=b.a.getBandwidthEstimate();return 8*d/g<f-e-Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal)||c.fc.b.a>d?!0:!1}
348
- function mj(b){function c(c){var f=b.a.N;"text"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&d<c.b):(c=ue(f,c),c=Gd(c,d,e));return c}var d=b.a.kb(),e=b.g.smallGapLimit,f=Wi(b,d);if(eb(b.b.values(),function(b){return b.Ca==f}))for(var g=r(b.b.keys()),h=g.next();!h.done;h=g.next())h=h.value,c(h)||ij(b,b.b.get(h));else eb(b.b.keys(),c)||b.b.forEach(function(c){ij(b,c)})}
349
- function ij(b,c){c.hb||c.eb||(c.$a?(c.eb=!0,c.wc=0):null==te(b.a.N,c.type)?null==c.Va&&dj(b,c,0):(Vi(c),kj(b,c,!1,0)["catch"](function(c){if(b.a)b.a.onError(c)})))}
350
- function Xi(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w;return y(h,function(h){switch(h.s){case 1:return k=b.a.kb(),l=Wi(b,k),m=Md,n=new Map,q=new Set,c&&(n.set(m.Ub,c),q.add(c)),d&&(n.set(m.fb,d),q.add(d)),e&&(n.set(m.Ga,e),q.add(e)),x=b.a.N,w=b.g.forceTransmuxTS,u(h,x.init(n,w),2);case 2:if(b.f)return h["return"]();nj(b);return u(h,bj(b,q),3);case 3:if(b.f)return h["return"]();n.forEach(function(c,d){if(!b.b.has(d)){var e=cj(c,l,f);b.b.set(d,e);dj(b,e,0)}});v(h)}})})}
351
- function cj(b,c,d){return{stream:b,type:b.type,Hb:null,Sa:null,ab:null,Ec:!0,Ca:c,endOfStream:!1,$a:!1,Va:null,eb:!1,wc:0,Rc:!1,hb:!1,Ad:!1,cc:!1,Me:d||0,fc:null}}
352
- function oj(b,c){var d=b.j[c];if(d)return d.promise;d={promise:new I,Sb:!1};b.j[c]=d;for(var e=new Set,f=r(b.c.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=r(b.c.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.w=b.w.then(function(){if(!this.f)return bj(this,e)}.bind(b)).then(function(){this.f||(this.j[c].promise.resolve(),this.j[c].Sb=!0)}.bind(b))["catch"](function(b){this.f||
320
+ function Sh(b,c,d,e,f,g){return t(function k(){var l,m,n,q,w,x,C,E,G;return y(k,function(k){switch(k.s){case 1:if(b.u&&(l=b.a.get(c),m=l.kc,n=m.get(e.position)))return k["return"](n.startTime);if("audio/mpeg"==f)return k["return"](0);if("video/mp4"!=f&&"audio/mp4"!=f){k.C(2);break}q=[Th(b,e)];d&&q.push(Th(b,d));return u(k,Promise.all(q),3);case 3:return w=k.A,x=w[0],C=w[1]||w[0],k["return"](Vh(x.data,C.data));case 2:if("video/mp2t"!=f){k.C(4);break}return u(k,Th(b,e),5);case 5:return E=k.A,k["return"](Wh(E.data));
321
+ case 4:if("application/mp4"!=f&&!f.startsWith("text/")){k.C(6);break}return u(k,Th(b,e),7);case 7:return G=k.A,k["return"](Xh(f,g,G.data));case 6:if("video/webm"==f)return k["return"](null);throw new I(2,4,4030);}})})}
322
+ function Vh(b,c){var d=0;(new Q).L("moov",Of).L("trak",Of).L("mdia",Of).va("mdhd",function(b){b.reader.R(0==b.version?8:16);d=b.reader.J();b.parser.stop()}).parse(c,!0);if(!d)throw new I(2,4,4030);var e=0,f=!1;(new Q).L("moof",Of).L("traf",Of).va("tfdt",function(b){e=(0==b.version?b.reader.J():b.reader.Rb())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new I(2,4,4030);return e}
323
+ function Wh(b){function c(){throw new I(2,4,4030);}b=new P(new DataView(b),0);for(var d=0,e=0;;)if(d=b.na(),e=b.za(),71!=e&&c(),b.hc()&16384||c(),e=(b.za()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.za(),b.R(e)),1!=b.J()>>8)b.seek(d+188),e=b.za(),71!=e&&(b.seek(d+192),e=b.za()),71!=e&&(b.seek(d+204),e=b.za()),71!=e&&c(),b.Pe(1);else return b.R(3),d=b.za()>>6,0!=d&&1!=d||c(),0==b.za()&&c(),d=b.za(),e=b.hc(),b=b.hc(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
324
+ function Xh(b,c,d){b=Ac(b,c);if(!me(b))return 0;c=new ke(null);ne(c,b);return c.gd(d)}function Dh(b){var c=new Set,d=[];b=r(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=Dc(e)[0];c.has(f)||(d.push(e),c.add(f))}return d}function Eh(b,c){for(var d=Yh[b],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(d[e].test(c[f].trim()))return c[f].trim();return"text"==b?"":null}function Nh(b,c){if(1==c.length)return c[0];var d=Eh(b,c);if(null!=d)return d;throw new I(2,4,4025,c);}
325
+ function Oh(b,c,d,e){return t(function g(){var h,k,l,m,n,q,w,x,C,E;return y(g,function(g){switch(g.s){case 1:h=Nd;k=gc;l=e.segments[0].a;m=new yb(l);n=m.xa.split(".").pop();q=Zh[c];if(w=q[n])return g["return"](w);if(c==h.Ga)return d&&"vtt"!=d?g["return"]("application/mp4"):g["return"]("text/vtt");x=jc([l],b.c.retryParameters);x.method="HEAD";return u(g,Uh(b,x,k.Wd),2);case 2:C=g.A;E=C.headers["content-type"];if(!E)throw new I(2,4,4021,n);return g["return"](E.split(";")[0])}})})}
326
+ function zh(b,c){var d=b.getAttribute(c);if(!d)throw new I(2,4,4023,c);return d.value}function Qh(b,c){var d=ch.jb(b,c);if(!d)throw new I(2,4,4024,c);return d}function rh(b,c){return Uh(b,jc([c],b.c.retryParameters),gc.qh)}
327
+ var Yh={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Zh={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
328
+ function ph(b){t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:if(!b.g)return d["return"]();Aa(d,2);return u(d,b.update(),4);case 4:e=b.K;b.j.S(e);Ca(d,0);break;case 2:f=Da(d),f.severity=1,b.g.onError(f),b.j.S(.1),v(d)}})})}function wh(b,c){b.f=c;b.b&&b.b.mc(b.f==th.gb);b.f!=th.gb||b.j.stop()}function Uh(b,c,d){if(!b.l)throw new I(2,7,7001);c=b.g.networkingEngine.request(d,c);fc(b.l,c);return c.promise}
329
+ var Lh={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=zh(b,"METHOD");Xe("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=zh(b,"URI");c=nh.parse(c);c=new Uint8Array(c.data);c=Md("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=ah(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},qh="VOD",th={gb:qh,hf:"EVENT",Vd:"LIVE"};T.Cd("m3u8",oh);
330
+ T.ic("application/x-mpegurl",oh);T.ic("application/vnd.apple.mpegurl",oh);function $h(){this.a=new Map}function ai(b,c,d){bi(b,c).text=d}function bi(b,c){b.a.has(c)||b.a.set(c,new ci);return b.a.get(c)}function ci(){this.text=this.variant=null};function di(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=r(c),e=d.next();!e.done;e=d.next())this.add(e.value)}di.prototype.add=function(b){return ei(this.a,b)?(this.b.add(b),!0):!1};function ei(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&fi(d,e)&&gi(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(fi(d,e)&&gi(d.roles,e.roles)));return d?!1:!0}
331
+ di.prototype.values=function(){return this.b.values()};function fi(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return Dc(b)[0]}),e=c.codecs.split(",").map(function(b){return Dc(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
332
+ function gi(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=r(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function hi(b){this.a=b;this.b=new ii(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}hi.prototype.create=function(b){var c=this,d=b.filter(function(b){return ei(c.a,b)});return d.length?new di(d[0],d):this.b.create(b)};function ii(b,c,d){this.c=b;this.b=c;this.a=d}
333
+ ii.prototype.create=function(b){var c=[];c=ji(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=ki(c,this.b),b.length&&(c=b));this.a&&(b=Qe(c,this.a),b.length&&(c=b));b=new di(c[0]);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,ei(b.a,d)&&b.add(d);return b};function ji(b,c){var d=B(c),e=mb(d,b.map(function(b){return lb(b)}));return e?b.filter(function(b){return e==lb(b)}):[]}
334
+ function ki(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function li(b,c){this.a=mi;this.b=(new Map).set(mi,c).set(ni,b)}var ni=0,mi=1;function oi(b,c){this.f=b;this.g=pi(b);this.b=b.a.currentTime;this.c=Date.now()/1E3;this.j=c;this.a=function(){}}oi.prototype.release=function(){this.f=null;this.a=function(){}};function qi(b,c){b.a=c}function ri(b){this.a=b}function pi(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function si(b,c,d,e,f){var g=this;this.a=b;this.w=c;this.v=d;this.o=f;this.f=new M;this.l=!1;this.u=b.readyState;this.c=!1;this.b=e;this.j=!1;this.f.m(b,"waiting",function(){return ti(g)});this.g=(new F(function(){ti(g)})).Na(.25)}si.prototype.release=function(){this.f&&(this.f.release(),this.f=null);null!=this.g&&(this.g.stop(),this.g=null);this.b&&(this.b.release(),this.b=null);this.a=this.w=this.o=null};si.prototype.wd=function(){this.j=!0;ti(this)};
335
+ function ti(b){if(0!=b.a.readyState){if(b.a.seeking){if(!b.l)return}else b.l=!1;if(!b.a.paused){b.a.readyState!=b.u&&(b.c=!1,b.u=b.a.readyState);var c=b.v.smallGapLimit,d=b.a.currentTime,e=b.a.buffered;a:{if(e&&e.length&&!(1==e.length&&1E-6>e.end(0)-e.start(0))){var f=Hc("Edge/")||Hc("Trident/")||Hc("Tizen")||Hc("CrKey")?.5:.1;for(var g=0;g<e.length;g++)if(e.start(g)>d&&(0==g||e.end(g-1)-d<=f)){f=g;break a}}f=null}if(null==f){if(b.b){b=b.b;d=b.f;e=pi(d);d=d.a.currentTime;f=Date.now()/1E3;if(b.b!=
336
+ d||b.g!=e)b.c=f,b.b=d,b.g=e;d=f-b.c;d>=b.j&&e&&b.a(b.b,d)}}else if(0!=f||b.j){g=e.start(f);var h=b.w.Qa();if(!(g>=h)){h=g-d;c=h<=c;var k=!1;.001>h||(c||b.c||(b.c=!0,d=new A("largegap",{currentTime:d,gapSize:h}),d.cancelable=!0,b.o(d),b.v.jumpLargeGaps&&!d.defaultPrevented&&(k=!0)),!c&&!k)||(0!=f&&e.end(f-1),b.a.currentTime=g)}}}}};function ui(b){var c=this;this.c=b;this.a=new Set;this.b=(new F(function(){vi(c,!1)})).Na(.25)}ui.prototype.release=function(){this.b.stop();for(var b=r(this.a),c=b.next();!c.done;c=b.next())c.value.release();this.a.clear()};function vi(b,c){for(var d=r(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function wi(b){var c=[];b=r(b);for(var d=b.next();!d.done;d=b.next()){d=r(d.value.variants);for(var e=d.next();!e.done;e=d.next())c.push(e.value)}return c}function xi(b,c){for(var d=null,e=r(b),f=e.next();!f.done;f=e.next())f=f.value,c>=f.startTime&&(d=f);return d};function yi(b){this.c=b;this.a=null;this.b=function(){}}yi.prototype.release=function(){this.a=this.c=null;this.b=function(){}};yi.prototype.g=function(b){var c=this.a,d=this.c.periods;b=xi(d,b)||d[0];c!=b&&this.b(b);this.a=b};function zi(b,c){b.b=c};function Ai(b){var c=this;this.a=b;this.f=!1;this.c=this.a.Cc();this.b=new F(function(){c.a.se(.25*c.c)})}Ai.prototype.release=function(){this.b&&(this.b.stop(),this.b=null);this.a=null};Ai.prototype.set=function(b){this.c=b;Bi(this)};function Bi(b){b.b.stop();var c=b.f?0:b.c;if(0<=c)try{b.a.Cc()!=c&&b.a.Jd(c);return}catch(d){}b.b.Na(.25);0!=b.a.Cc()&&b.a.Jd(0)};function Ci(b,c,d){this.a=b;this.f=c;this.g=d;this.j=!1;this.b=new M;this.c=new Di(b);0<b.readyState?Ei(this,d):Fi(this,d)}Ci.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.f=function(){};this.a=null};function Gi(b){return b.j?b.a.currentTime:b.g}function Fi(b,c){b.g=c;b.b.oa(b.a,"loadedmetadata");b.b.ra(b.a,"loadedmetadata",function(){Ei(b,c)})}
337
+ function Ei(b,c){.001>Math.abs(b.a.currentTime-c)?Hi(b):(b.b.ra(b.a,"seeking",function(){Hi(b)}),Ii(b.c,0==b.a.currentTime?c:b.a.currentTime))}function Hi(b){b.j=!0;b.b.m(b.a,"seeking",function(){return b.f()})}function Di(b){var c=this;this.b=b;this.j=10;this.g=this.f=this.c=0;this.a=new F(function(){0>=c.c?c.a.stop():c.b.currentTime!=c.f?c.a.stop():(c.b.currentTime=c.g,c.c--)})}Di.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
338
+ function Ii(b,c){b.f=b.b.currentTime;b.g=c;b.c=b.j;b.b.currentTime=c;b.a.Na(.1)};function Ji(b){function c(){null==d.c?d.f=!0:(d.b.ra(d.a,"seeking",function(){d.f=!0}),d.a.currentTime=d.c)}var d=this;this.a=b;this.f=!1;this.c=null;this.b=new M;0==this.a.readyState?this.b.ra(this.a,"loadedmetadata",c):c()}Ji.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.a=null};Ji.prototype.u=function(b){this.c=this.f?this.c:b};Ji.prototype.j=function(){return(this.f?this.a.currentTime:this.c)||0};Ji.prototype.v=function(){};
339
+ function Ki(b,c,d,e,f,g){var h=this;this.b=b;this.a=c.presentationTimeline;this.D=c.minBufferTime||0;this.g=d;this.w=f;this.o=null;this.f=new si(b,c.presentationTimeline,d,Li(b,d),g);this.c=new Ci(b,function(){a:{var b=h.f;b.l=!0;b.j=!1;b.c=!1;var c=Gi(h.c);b=Mi(h,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!h.o||h.o<c-1)){h.o=c;c=h.c;0<c.a.readyState?Ii(c.c,b):Fi(c,b);b=void 0;break a}h.w();b=void 0}return b},Ni(this,e));this.l=(new F(function(){if(0!=h.b.readyState&&!h.b.paused){var b=
340
+ h.b.currentTime,c=h.a.Db(),d=h.a.Qa();3>d-c&&(c=d-3);b<c&&(b=Mi(h,b),h.b.currentTime=b)}})).Na(.25)}Ki.prototype.release=function(){this.c&&(this.c.release(),this.c=null);this.f&&(this.f.release(),this.f=null);this.l&&(this.l.stop(),this.l=null);this.b=this.c=this.a=this.g=null;this.w=function(){}};Ki.prototype.u=function(b){var c=this.c;0<c.a.readyState?Ii(c.c,b):Fi(c,b)};Ki.prototype.j=function(){var b=Gi(this.c);return 0<this.b.readyState&&!this.b.paused?Oi(this,b):b};
341
+ function Ni(b,c){null==c?c=Infinity>b.a.ia()?b.a.Db():b.a.Qa():0>c&&(c=b.a.Qa()+c);return Pi(b,Oi(b,c))}Ki.prototype.v=function(){this.f.wd()};function Pi(b,c){var d=b.a.ia();return c>=d?d-b.g.durationBackoff:c}function Mi(b,c){var d=Hd.bind(null,b.b.buffered),e=Math.max(b.D,b.g.rebufferingGoal),f=b.g.safeSeekOffset,g=b.a.Db(),h=b.a.Qa(),k=b.a.ia();3>h-g&&(g=h-3);var l=b.a.$b(e),m=b.a.$b(f);e=b.a.$b(e+f);return c>=k?Pi(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}
342
+ function Oi(b,c){var d=b.a.Db();if(c<d)return d;d=b.a.Qa();return c>d?d:c}function Li(b,c){if(!c.stallEnabled)return null;var d=c.stallSkip,e=new oi(new ri(b),c.stallThreshold);qi(e,function(){b.currentTime+=d});return e};function Qi(){this.b=function(){};this.a=new Set}Qi.prototype.release=function(){this.b=function(){};this.a.clear()};function Ri(b,c){b.b=c};function Si(b){var c=this;this.j=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.l=[{wb:null,vb:Ti,ob:function(b,e){return c.a(b,e)}},{wb:Ui,vb:Ti,ob:function(b,e){return c.a(b,e)}},{wb:Vi,vb:Ti,ob:function(b,e){return c.a(b,e)}},{wb:Ti,vb:Ui,ob:function(b,e){return c.b(b,e)}},{wb:Ti,vb:Vi,ob:function(b,e){return c.b(b,e)}},{wb:Ui,vb:Vi,ob:function(b,e){return c.c(b,e)}},{wb:Vi,vb:Ui,ob:function(b,e){return c.c(b,e)}}]}
343
+ Si.prototype.release=function(){this.j=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Si.prototype.g=function(b,c){for(var d=r(this.j.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?Ui:b>e.endTime?Vi:Ti;this.f.set(e,g);for(var h=r(this.l),k=h.next();!k.done;k=h.next())k=k.value,k.wb==f&&k.vb==g&&k.ob(e,c)}};function Wi(b,c,d,e){b.a=c;b.b=d;b.c=e}var Ui=1,Ti=2,Vi=3;function Xi(b,c){this.a=c;this.c=b;this.g=null;this.o=1;this.w=Promise.resolve();this.j=[];this.l=new Map;this.b=new Map;this.v=!1;this.H=null;this.F=this.f=this.u=!1;this.D=0}Xi.prototype.destroy=function(){for(var b=r(this.b.values()),c=b.next();!c.done;c=b.next())Yi(c.value);this.b.clear();this.l.clear();this.g=this.j=this.w=this.c=this.a=null;this.f=!0;return Promise.resolve()};
344
+ Xi.prototype.configure=function(b){this.g=b;this.H=new Rb({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};
345
+ Xi.prototype.start=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.s){case 1:return e=b.a.kb(),f=Zi(b,e),g=b.a.ye(b.c.periods[f]),g.variant||g.text?u(d,$i(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](new I(2,5,5005));case 2:if(b.f)return d["return"]();b.a&&b.a.lg&&b.a.lg();v(d)}})})};function aj(b){return bj(b,"audio")}function cj(b){return bj(b,"video")}
346
+ function bj(b,c){var d=b.b.get(c);return d?d.ab||d.stream:null}
347
+ function dj(b,c){return t(function e(){var f,g,h,k,l,m,n,q,w,x;return y(e,function(e){switch(e.s){case 1:return f=Nd,u(e,Be(b.a.N,f.Ga),2);case 2:return b.D++,b.F=!1,g=b.D,h=b.a.N,k=new Map,l=new Set,k.set(f.Ga,c),l.add(c),u(e,h.init(k,!1),3);case 3:return b.f?e["return"]():u(e,ej(b,l),4);case 4:if(b.f)return e["return"]();n=(m=b.a.N.g.isTextVisible())||b.g.alwaysStreamText;b.D!=g||b.b.has(f.Ga)||b.F||!n||(q=b.a.kb(),w=Zi(b,q),x=fj(c,w,0),b.b.set(f.Ga,x),gj(b,x,0));v(e)}})})}
348
+ function hj(b,c){var d=b.b.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.ab&&(ij(b,f,!1,0,!1),d.ab=e)}else if(e=d.ab)d.ab=null,ij(b,e,!0,0,!1)}}function jj(b,c,d,e){c.video&&ij(b,c.video,d,e,!1);c.audio&&ij(b,c.audio,d,e,!1)}
349
+ function ij(b,c,d,e,f){var g=b.b.get(c.type);if(!g&&"text"==c.type&&b.g.ignoreTextStreamFailures)dj(b,c);else if(g){var h=kj(b,c),k=Array.from(b.b.values()).every(function(b){return b.Ca==g.Ca});d&&h!=g.Ca&&k?b.b.forEach(function(c){lj(b,c)}):(g.ab&&(c.trickModeVideo?(g.ab=c,c=c.trickModeVideo):g.ab=null),(k=b.j[h])&&k.Sb&&(k=b.l.get(c.id))&&k.Sb&&(g.stream!=c||f)&&("text"==c.type&&te(b.a.N,Ac(c.mimeType,c.codecs)),g.stream=c,g.Fc=!0,mj(b,g,h)&&g.fc.abort(),d&&(g.hb?g.Sc=!0:g.$a?(g.eb=!0,g.wc=e,g.Sc=
350
+ !0):(Yi(g),nj(b,g,!0,e)["catch"](function(c){if(b.a)b.a.onError(c)})))))}}function mj(b,c,d){if(!c.fc)return!1;var e=b.a.kb(),f=xe(b.a.N,c.type);d=(d=oj(b,c,e,f,d))?d.a?d.a-d.b:null:null;if(null==d)return!1;var g=c.stream.initSegmentReference;g&&(d+=(g.a?g.a-g.b:null)||0);g=b.a.getBandwidthEstimate();return 8*d/g<f-e-Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal)||c.fc.b.a>d?!0:!1}
351
+ function pj(b){function c(c){var f=b.a.N;"text"==c?(c=f.a,c=null==c.a||null==c.b?!1:d>=c.a&&d<c.b):(c=we(f,c),c=Hd(c,d,e));return c}var d=b.a.kb(),e=b.g.smallGapLimit,f=Zi(b,d);if(eb(b.b.values(),function(b){return b.Ca==f}))for(var g=r(b.b.keys()),h=g.next();!h.done;h=g.next())h=h.value,c(h)||lj(b,b.b.get(h));else eb(b.b.keys(),c)||b.b.forEach(function(c){lj(b,c)})}
352
+ function lj(b,c){c.hb||c.eb||(c.$a?(c.eb=!0,c.wc=0):null==ve(b.a.N,c.type)?null==c.Va&&gj(b,c,0):(Yi(c),nj(b,c,!1,0)["catch"](function(c){if(b.a)b.a.onError(c)})))}
353
+ function $i(b,c,d,e,f){return t(function h(){var k,l,m,n,q,w,x;return y(h,function(h){switch(h.s){case 1:return k=b.a.kb(),l=Zi(b,k),m=Nd,n=new Map,q=new Set,c&&(n.set(m.Ub,c),q.add(c)),d&&(n.set(m.fb,d),q.add(d)),e&&(n.set(m.Ga,e),q.add(e)),w=b.a.N,x=b.g.forceTransmuxTS,u(h,w.init(n,x),2);case 2:if(b.f)return h["return"]();qj(b);return u(h,ej(b,q),3);case 3:if(b.f)return h["return"]();n.forEach(function(c,d){if(!b.b.has(d)){var e=fj(c,l,f);b.b.set(d,e);gj(b,e,0)}});v(h)}})})}
354
+ function fj(b,c,d){return{stream:b,type:b.type,Hb:null,Ra:null,ab:null,Fc:!0,Ca:c,endOfStream:!1,$a:!1,Va:null,eb:!1,wc:0,Sc:!1,hb:!1,Bd:!1,cc:!1,Oe:d||0,fc:null}}
355
+ function rj(b,c){var d=b.j[c];if(d)return d.promise;d={promise:new J,Sb:!1};b.j[c]=d;for(var e=new Set,f=r(b.c.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=r(b.c.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.w=b.w.then(function(){if(!this.f)return ej(this,e)}.bind(b)).then(function(){this.f||(this.j[c].promise.resolve(),this.j[c].Sb=!0)}.bind(b))["catch"](function(b){this.f||
353
356
  (this.j[c].promise["catch"](function(){}),this.j[c].promise.reject(),delete this.j[c],this.a.onError(b))}.bind(b));return d.promise}
354
- function bj(b,c){return t(function e(){var f,g,h,k,l,m,n;return y(e,function(e){switch(e.s){case 1:f=[];for(var q=r(c),w=q.next();!w.done;w=q.next())g=w.value,(h=b.l.get(g.id))?f.push(h.promise):(b.l.set(g.id,{promise:new I,Sb:!1}),f.push(g.createSegmentIndex()));za(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();Ba(e,3);break;case 2:k=Ca(e);if(b.f)return e["return"]();e=r(c);for(w=e.next();!w.done;w=e.next())l=w.value,b.l.get(l.id).promise["catch"](function(){}),b.l.get(l.id).promise.reject(),
355
- b.l["delete"](l.id);throw k;case 3:q=r(c);for(w=q.next();!w.done;w=q.next())m=w.value,n=b.l.get(m.id),n.Sb||(n.promise.resolve(),n.Sb=!0);v(e)}})})}function nj(b){var c=b.c.presentationTimeline.ia();Infinity>c?b.a.N.Ma(c):b.a.N.Ma(Math.pow(2,32))}
356
- function pj(b,c){if(!b.f&&!c.$a&&null!=c.Va&&!c.hb)if(c.Va=null,c.eb)kj(b,c,c.Rc,c.wc);else{try{var d=qj(b,c);null!=d&&(dj(b,c,d),c.cc=!1)}catch(e){rj(b,e);return}d=Array.from(b.b.values());sj(b,c);b.v&&d.every(function(b){return b.endOfStream})&&b.a.N.endOfStream().then(function(){if(!this.f){var b=this.a.N.ia();0!=b&&b<this.c.presentationTimeline.ia()&&this.c.presentationTimeline.Ma(b)}}.bind(b))}}
357
- function qj(b,c){function d(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}if(d(c))return b.a.N.Pc(c.stream.originalId||""),null;var e=b.a.kb(),f=tj(b,c,e),g=hj(b,c.stream),h=Wi(b,f),k=we(b.a.N,c.type,e),l=Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.o;if(f>=b.c.presentationTimeline.ia())return c.endOfStream=!0,"video"==c.type&&(f=b.b.get("text"))&&"application/cea-608"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.Ca=h;if(h!=g)return null;
358
- if(k>=l)return.5;h=ve(b.a.N,c.type);h=lj(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.b.values()).forEach(function(c){d(c)||(c=tj(b,c,e),m=Math.min(m,c))});if(f>=m+b.c.presentationTimeline.a)return 1;c.Me=0;uj(b,c,e,g,h);return null}function tj(b,c,d){if(!c.Hb||!c.Sa)return Math.max(d,c.Me);d=hj(b,c.Hb);return b.c.periods[d].startTime+c.Sa.endTime}
359
- function lj(b,c,d,e,f){if(c.Sa&&c.stream==c.Hb)return vj(b,c,f,c.Sa.position+1);c.Sa?(d=hj(b,c.Hb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.Sa.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=vj(b,c,f,Math.max(0,d-1)));return g||vj(b,c,f,d)}
360
- function vj(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.ac();e=e.Eb();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
361
- function uj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.ia(),l=b.c.periods[e+1];e=wj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.$a=!0;c.Ec=!1;k=xj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.u)return yj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.u||(c.$a=!1,c.Ad=!1,c.eb||this.a.vd(),dj(this,c,0),zj(this,h))}.bind(b))["catch"](function(b){this.f||this.u||(c.$a=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.b["delete"]("text"):
362
- 7001==b.code?(c.$a=!1,c.Va=null,dj(this,c,0)):3017==b.code?Aj(this,c,b):(c.cc=!0,b.severity=2,rj(this,b)))}.bind(b))}function Aj(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Ad})){var e=Math.round(100*b.o);if(20<e)b.o-=.2;else if(4<e)b.o-=.04;else{c.cc=!0;b.u=!0;b.a.onError(d);return}c.Ad=!0}dj(b,c,4)}
363
- function wj(b,c,d,e,f){if(!c.Ec)return Promise.resolve();d=Ae(b.a.N,c.type,b.c.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=xj(b,c,c.stream.initSegmentReference).then(function(b){if(!this.f)return xe(this.a.N,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.Ec=!0;return Promise.reject(b)});return Promise.all([d,b])}
364
- function yj(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new R).ua("emsg",b.I.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return Bj(b,c,d).then(function(){if(!this.f)return xe(this.a.N,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.Hb=f,c.Sa=g,Promise.resolve()}.bind(b))}
365
- Ui.prototype.I=function(b,c,d,e){var f=e.reader.zd(),g=e.reader.zd(),h=e.reader.J(),k=e.reader.J(),l=e.reader.J(),m=e.reader.J();e=e.reader.rb(e.reader.P.byteLength-e.reader.na());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.lg();else this.a.onEvent(new B("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
366
- function Bj(b,c,d){var e=Math.max(b.g.bufferBehind,b.c.presentationTimeline.a),f=te(b.a.N,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.N.remove(c.type,f,f+d).then(function(){}.bind(b))}
367
- function zj(b,c){if(!b.v){var d=Array.from(b.b.values());if(1!=d.length||"text"!=d[0].type)b.v=d.every(function(b){return"text"==b.type?!0:!b.eb&&!b.hb&&b.Sa});if(b.v){d=hj(b,c);b.j[d]||oj(b,d).then(function(){this.f||this.a.ve()}.bind(b))["catch"](Jd.Fc);for(d=0;d<b.c.periods.length;++d)oj(b,d)["catch"](Jd.Fc);b.a.xg&&b.a.xg()}}}
368
- function sj(b,c){var d=hj(b,c.stream);if(c.Ca!=d){var e=c.Ca,f=Array.from(b.b.values());f.every(function(b){return b.Ca==e})&&f.every(Cj)&&oj(b,e).then(function(){if(!this.f&&f.every(function(b){var c=Cj(b),d=hj(this,b.stream);return c&&b.Ca==e&&d!=e}.bind(this))){var b=this.c.periods[e],c=this.a.we(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=r(this.b.keys());for(c=l.next();!c.done;c=
369
- l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new G(2,5,5005));return}l=r(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.b.has(c))if("text"==c)Xi(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new G(2,5,5005));return}b=r(Array.from(this.b.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(fj(this,l,!1,0,!1),dj(this,this.b.get(c),0)):this.b["delete"](c);this.a.ve()}}.bind(b))["catch"](Jd.Fc)}}
370
- function Cj(b){return!b.$a&&null==b.Va&&!b.eb&&!b.hb}function Wi(b,c){var d=ui(b.c.periods,c+Nd);return d?b.c.periods.indexOf(d):0}function hj(b,c){for(var d=b.c.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=r(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=r(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}
371
- function xj(b,c,d){d=Fg(d.c(),d.b,d.a,b.g.retryParameters);b=b.a.Jb.request(1,d);c.fc=b;return b.promise.then(function(b){c.fc=null;return b.data})}
372
- function kj(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.s){case 1:return c.eb=!1,c.Rc=!1,c.wc=0,c.hb=!0,e?(k=b.a.kb(),l=b.a.N.ia(),h=b.a.N.remove(c.type,k+e,l)):h=ze(b.a.N,c.type).then(function(){if(!this.f&&d)return this.a.N.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.Hb=null;c.Sa=null;c.hb=!1;c.endOfStream=!1;dj(b,c,0);v(g)}})})}
373
- function dj(b,c,d){c.Va=(new Qb(function(){return t(function f(){var d;return y(f,function(f){switch(f.s){case 1:return za(f,2),u(f,pj(b,c),4);case 4:Ba(f,0);break;case 2:d=Ca(f);if(b.a)b.a.onError(d);v(f)}})})})).S(d)}function Vi(b){null!=b.Va&&(b.Va.stop(),b.Va=null)}function rj(b,c){Tb(b.H).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function Dj(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return{uri:f||e,xd:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=Mc(c)}catch(h){}throw new G(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function Ej(b,c,d,e){var f=new Ej.b;vc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new Ej.a,h={Wd:!1,$e:!1};b=Ej.o(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h,e);b=new Ub(b,function(){h.Wd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new F(function(){h.$e=!0;g.abort()});k.S(c/1E3);b["finally"](function(){k.stop()})}return b}z("shaka.net.HttpFetchPlugin",Ej);
374
- Ej.o=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,x,w,A,D,H,J,ba,fa,Da;return y(h,function(h){switch(h.s){case 1:return k=Ej.g,l=Ej.c,x=q=0,w=Date.now(),za(h,2),u(h,k(b,d),4);case 4:return m=h.A,A=m.clone().body.getReader(),H=(D=m.headers.get("Content-Length"))?parseInt(D,10):0,J=function(b){function c(){return t(function sa(){var d,e;return y(sa,function(h){switch(h.s){case 1:return za(h,2),u(h,A.read(),4);case 4:d=h.A;Ba(h,3);break;case 2:return Ca(h),h["return"]();case 3:d.done||(q+=
375
- d.value.byteLength);e=Date.now();if(100<e-w||d.done)f(e-w,q-x,H-q),x=q,w=e;d.done?b.close():(b.enqueue(d.value),c());v(h)}})})}c()},new l({start:J}),u(h,m.arrayBuffer(),5);case 5:n=h.A;Ba(h,3);break;case 2:ba=Ca(h);if(e.Wd)throw new G(1,1,7001,b,c);if(e.$e)throw new G(1,1,1003,b,c);throw new G(1,1,1002,b,ba,c);case 3:return fa={},Da=m.headers,Da.forEach(function(b,c){fa[c.trim()]=b}),h["return"](Dj(fa,n,m.status,b,m.url,c))}})})};
376
- Ej.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};Ej.isSupported=Ej.isSupported;Ej.g=window.fetch;Ej.a=window.AbortController;Ej.c=window.ReadableStream;Ej.b=window.Headers;Ej.isSupported()&&(jc("http",Ej,2),jc("https",Ej,2));function Fj(b,c,d,e){var f=new Fj.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new G(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=Dj(f,c.response,c.status,b,c.responseURL,
377
- d);k(h)}catch(H){m(H)}};f.onerror=function(c){m(new G(1,1,1002,b,c,d))};f.ontimeout=function(){m(new G(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h,b.total-b.loaded),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new Ub(k,function(){f.abort();return Promise.resolve()})}z("shaka.net.HttpXHRPlugin",Fj);Fj.f=window.XMLHttpRequest;jc("http",Fj,1);
378
- jc("https",Fj,1);function Gj(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function Hj(b,c){b.b+=c;var d=b.g;b.g++;b.c.set(d,c);return d}Gj.prototype.close=function(b,c){if(this.c.has(b)){var d=this.c.get(b);this.c["delete"](b);this.f+=d;this.a+=c}};function Ij(b,c){this.g=b;this.b=new Map;this.c=!1;this.f=c;this.a=new Gj}Ij.prototype.destroy=function(){this.c=!0;return Promise.all(this.b.values()).then(function(){},function(){})};
379
- function Jj(b,c,d,e,f){var g=Hj(b.a,e);e=b.b.get(c)||Promise.resolve();b.b.set(c,e.then(function(){return t(function k(){var c;return y(k,function(e){switch(e.s){case 1:return u(e,Kj(b,d),2);case 2:c=e.A;if(b.c)throw new G(2,9,7001);b.a.close(g,c.byteLength);var k=b.a;b.f(0==k.b?0:k.f/k.b,b.a.a);return e["return"](f(c))}})})}))}function Lj(b){return t(function d(){return y(d,function(d){switch(d.s){case 1:return u(d,Promise.all(b.b.values()),2);case 2:return d["return"](b.a.a)}})})}
380
- function Kj(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.s){case 1:return f=b.g.request(1,c),u(e,f.promise,2);case 2:return g=e.A,e["return"](g.data)}})})};function Mj(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new I;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}Mj.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
381
- function Nj(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}Mj.prototype.store=function(){return this.b};Mj.prototype.promise=function(){return this.a};function Oj(b){this.b=b;this.a=[]}Oj.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function Pj(b,c){return Qj(b,c,"readonly")}function Rj(b,c){return Qj(b,c,"readwrite")}function Qj(b,c,d){d=b.b.transaction([c],d);var e=new Mj(d,c);b.a.push(e);e.promise().then(function(){cc(b.a,e)},function(){cc(b.a,e)});return e};function Sj(b){this.a=new Oj(b)}Sj.prototype.destroy=function(){return this.a.destroy()};Sj.prototype.getAll=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return e=Pj(b.a,"session-ids"),f=[],u(d,Nj(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};Sj.prototype.add=function(b){var c=Rj(this.a,"session-ids"),d=c.store();b=r(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
382
- Sj.prototype.remove=function(b){var c=this;return t(function e(){var f;return y(e,function(e){switch(e.s){case 1:return f=Rj(c.a,"session-ids"),u(e,Nj(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function Tj(){this.a=new Map}Tj.prototype.destroy=function(){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Tj.prototype.init=function(){var b=this;Uj.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=r(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
383
- function Vj(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{Ka:e,ma:d},ma:b})})});if(c)return c;throw new G(2,9,9013,"Could not find a cell that supports add-operations");}function Wj(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({Ka:e,ma:d},b)})})}
384
- function Xj(b,c,d){b=b.a.get(c);if(!b)throw new G(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new G(2,9,9013,"Could not find cell with name "+d);return c}function Yj(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function Zj(b){var c=Array.from(b.a.keys());if(!c.length)throw new G(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
385
- Tj.prototype.erase=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.s){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Uj,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.C(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function ak(b,c){Uj.set(b,c)}z("shaka.offline.StorageMuxer.register",ak);z("shaka.offline.StorageMuxer.unregister",function(b){Uj["delete"](b)});
386
- var Uj=new Map;function bk(b){this.a=new Oj(b)}p=bk.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return ck("segment")};p.removeSegments=function(b,c){return dk(this,"segment",b,c)};p.getSegments=function(b){return ek(this,"segment",b).then(function(b){return b.map(fk)})};p.addManifests=function(){return ck("manifest")};
387
- p.updateManifestExpiration=function(b,c){var d=Rj(this.a,"manifest"),e=d.store(),f=new I;e.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,e.put(d),f.resolve()):f.reject(new G(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};p.removeManifests=function(b,c){return dk(this,"manifest",b,c)};p.getManifests=function(b){return ek(this,"manifest",b).then(function(b){return b.map(gk)})};
388
- p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return e=Pj(b.a,"manifest"),f=new Map,u(d,Nj(e,function(b,d){f.set(b,gk(d))}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};function ck(b){return Promise.reject(new G(2,9,9011,"Cannot add new value to "+b))}function dk(b,c,d,e){b=Rj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
389
- function ek(b,c,d){b=Pj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){e.get(b).onsuccess=function(c){c=c.target.result;void 0==c&&g.push(b);f[b]=c}});return b.promise().then(function(){return g.length?Promise.reject(new G(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
390
- function gk(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(hk),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function hk(b){ik(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(jk)}}
391
- function jk(b){var c=b.Zf?kk(b.Zf):null;return{id:b.id,originalId:null,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(lk),variantIds:b.variantIds}}function lk(b){var c=kk(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
392
- function fk(b){return{data:b.data}}function kk(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new G(2,9,9004,"Could not parse uri "+b);}
393
- function ik(b){var c=b.streams.filter(function(b){return"audio"==b.contentType}),d=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!d.every(function(b){return b.variantIds})){c.forEach(function(b){b.variantIds=[]});d.forEach(function(b){b.variantIds=[]});var e=0;if(d.length&&!c.length){var f=e++;d.forEach(function(b){b.variantIds.push(f)})}if(!d.length&&c.length){var g=e++;c.forEach(function(b){b.variantIds.push(g)})}d.length&&c.length&&c.forEach(function(b){d.forEach(function(c){var d=
394
- e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function mk(b,c,d,e){this.a=new Oj(b);this.c=c;this.b=d;this.f=e}p=mk.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return this.f};p.addSegments=function(b){return nk(this,this.c,b)};p.removeSegments=function(b,c){return ok(this,this.c,b,c)};p.getSegments=function(b){return pk(this,this.c,b)};p.addManifests=function(b){return nk(this,this.b,b)};
395
- p.updateManifestExpiration=function(b,c){var d=Rj(this.a,this.b),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};p.removeManifests=function(b,c){return ok(this,this.b,b,c)};p.getManifests=function(b){return pk(this,this.b,b)};
396
- p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return e=Pj(b.a,b.b),f=new Map,u(d,Nj(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
397
- function nk(b,c,d){if(b.f)return Promise.reject(new G(1,9,9011,"Cannot add new value to "+c));b=Rj(b.a,c);var e=b.store(),f=[];d.forEach(function(b){e.add(b).onsuccess=function(b){f.push(b.target.result)}});return b.promise().then(function(){return f})}function ok(b,c,d,e){b=Rj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
398
- function pk(b,c,d){b=Pj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){var c=e.get(b);c.onsuccess=function(){void 0==c.result&&g.push(b);f[b]=c.result}});return b.promise().then(function(){return g.length?Promise.reject(new G(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function qk(){this.g=this.c=this.b=this.a=this.f=null}p=qk.prototype;
399
- p.init=function(){var b=this,c=new I,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new bk(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new mk(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new mk(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
400
- new Sj(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=r(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new G(2,9,9001,d.error));b.preventDefault()};return c};
357
+ function ej(b,c){return t(function e(){var f,g,h,k,l,m,n;return y(e,function(e){switch(e.s){case 1:f=[];for(var q=r(c),x=q.next();!x.done;x=q.next())g=x.value,(h=b.l.get(g.id))?f.push(h.promise):(b.l.set(g.id,{promise:new J,Sb:!1}),f.push(g.createSegmentIndex()));Aa(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();Ca(e,3);break;case 2:k=Da(e);if(b.f)return e["return"]();e=r(c);for(x=e.next();!x.done;x=e.next())l=x.value,b.l.get(l.id).promise["catch"](function(){}),b.l.get(l.id).promise.reject(),
358
+ b.l["delete"](l.id);throw k;case 3:q=r(c);for(x=q.next();!x.done;x=q.next())m=x.value,n=b.l.get(m.id),n.Sb||(n.promise.resolve(),n.Sb=!0);v(e)}})})}function qj(b){var c=b.c.presentationTimeline.ia();Infinity>c?b.a.N.Ma(c):b.a.N.Ma(Math.pow(2,32))}
359
+ function sj(b,c){if(!b.f&&!c.$a&&null!=c.Va&&!c.hb)if(c.Va=null,c.eb)nj(b,c,c.Sc,c.wc);else{try{var d=tj(b,c);null!=d&&(gj(b,c,d),c.cc=!1)}catch(e){uj(b,e);return}d=Array.from(b.b.values());vj(b,c);b.v&&d.every(function(b){return b.endOfStream})&&b.a.N.endOfStream().then(function(){if(!this.f){var b=this.a.N.ia();0!=b&&b<this.c.presentationTimeline.ia()&&this.c.presentationTimeline.Ma(b)}}.bind(b))}}
360
+ function tj(b,c){if(wj(c))return b.a.N.Qc(c.stream.originalId||""),null;var d=b.a.kb(),e=xj(b,c,d),f=kj(b,c.stream),g=Zi(b,e),h=ye(b.a.N,c.type,d),k=Math.max(b.c.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.o;if(e>=b.c.presentationTimeline.ia())return c.endOfStream=!0,"video"==c.type&&(e=b.b.get("text"))&&"application/cea-608"==e.stream.mimeType&&(e.endOfStream=!0),null;c.endOfStream=!1;c.Ca=g;if(g!=f)return null;if(h>=k)return.5;g=xe(b.a.N,c.type);g=oj(b,c,d,g,f);if(!g)return 1;var l=
361
+ Infinity;Array.from(b.b.values()).forEach(function(c){wj(c)||(c=xj(b,c,d),l=Math.min(l,c))});if(e>=l+b.c.presentationTimeline.a)return 1;c.Oe=0;yj(b,c,d,f,g);return null}function xj(b,c,d){if(!c.Hb||!c.Ra)return Math.max(d,c.Oe);d=kj(b,c.Hb);return b.c.periods[d].startTime+c.Ra.endTime}
362
+ function oj(b,c,d,e,f){if(c.Ra&&c.stream==c.Hb)return zj(b,c,f,c.Ra.position+1);c.Ra?(d=kj(b,c.Hb),d=c.stream.findSegmentPosition(Math.max(0,b.c.periods[d].startTime+c.Ra.endTime-b.c.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.c.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=zj(b,c,f,Math.max(0,d-1)));return g||zj(b,c,f,d)}
363
+ function zj(b,c,d,e){d=b.c.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.c.presentationTimeline;b=e.ac();e=e.Eb();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
364
+ function yj(b,c,d,e,f){var g=b.c.periods[e],h=c.stream,k=b.c.presentationTimeline.ia(),l=b.c.periods[e+1];e=Aj(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.$a=!0;c.Fc=!1;k=Bj(b,c,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.u)return Cj(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.u||(c.$a=!1,c.Bd=!1,c.eb||this.a.wd(),gj(this,c,0),Dj(this,h))}.bind(b))["catch"](function(b){this.f||this.u||(c.$a=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.b["delete"]("text"):
365
+ 7001==b.code?(c.$a=!1,c.Va=null,gj(this,c,0)):3017==b.code?Ej(this,c,b):(c.cc=!0,b.severity=2,uj(this,b)))}.bind(b))}function Ej(b,c,d){if(!Array.from(b.b.values()).some(function(b){return b!=c&&b.Bd})){var e=Math.round(100*b.o);if(20<e)b.o-=.2;else if(4<e)b.o-=.04;else{c.cc=!0;b.u=!0;b.a.onError(d);return}c.Bd=!0}gj(b,c,4)}
366
+ function Aj(b,c,d,e,f){if(!c.Fc)return Promise.resolve();d=Ce(b.a.N,c.type,b.c.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=Bj(b,c,c.stream.initSegmentReference).then(function(b){if(!this.f)return ze(this.a.N,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.Fc=!0;return Promise.reject(b)});return Promise.all([d,b])}
367
+ function Cj(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new Q).va("emsg",b.I.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return Fj(b,c,d).then(function(){if(!this.f)return ze(this.a.N,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.Hb=f,c.Ra=g,Promise.resolve()}.bind(b))}
368
+ Xi.prototype.I=function(b,c,d,e){var f=e.reader.Ad(),g=e.reader.Ad(),h=e.reader.J(),k=e.reader.J(),l=e.reader.J(),m=e.reader.J();e=e.reader.rb(e.reader.P.byteLength-e.reader.na());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.ng();else this.a.onEvent(new A("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
369
+ function Fj(b,c,d){var e=Math.max(b.g.bufferBehind,b.c.presentationTimeline.a),f=ve(b.a.N,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.N.remove(c.type,f,f+d).then(function(){}.bind(b))}
370
+ function Dj(b,c){if(!b.v){var d=Array.from(b.b.values());if(1!=d.length||"text"!=d[0].type)b.v=d.every(function(b){return"text"==b.type?!0:!b.eb&&!b.hb&&b.Ra});if(b.v){d=kj(b,c);b.j[d]||rj(b,d).then(function(){this.f||this.a.xe()}.bind(b))["catch"](Kd.Gc);for(d=0;d<b.c.periods.length;++d)rj(b,d)["catch"](Kd.Gc);b.a.zg&&b.a.zg()}}}
371
+ function vj(b,c){var d=kj(b,c.stream);if(c.Ca!=d){var e=c.Ca,f=Array.from(b.b.values());f.every(function(b){return b.Ca==e||wj(b)})&&f.every(Gj)&&rj(b,e).then(function(){if(!this.f&&f.every(function(b){var c=Gj(b),d=kj(this,b.stream);return wj(b)?!0:c&&b.Ca==e&&d!=e}.bind(this))){var b=this.c.periods[e],c=this.a.ye(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=r(this.b.keys());for(c=
372
+ l.next();!c.done;c=l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new I(2,5,5005));return}l=r(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.b.has(c))if("text"==c)$i(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new I(2,5,5005));return}b=r(Array.from(this.b.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(ij(this,l,!1,0,!1),gj(this,this.b.get(c),0)):this.b["delete"](c);this.a.xe()}}.bind(b))["catch"](Kd.Gc)}}
373
+ function wj(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}function Gj(b){return!b.$a&&null==b.Va&&!b.eb&&!b.hb}function Zi(b,c){var d=xi(b.c.periods,c+Od);return d?b.c.periods.indexOf(d):0}
374
+ function kj(b,c){for(var d=b.c.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=r(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=r(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}function Bj(b,c,d){d=Ig(d.c(),d.b,d.a,b.g.retryParameters);b=b.a.Jb.request(1,d);c.fc=b;return b.promise.then(function(b){c.fc=null;return b.data})}
375
+ function nj(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.s){case 1:return c.eb=!1,c.Sc=!1,c.wc=0,c.hb=!0,e?(k=b.a.kb(),l=b.a.N.ia(),h=b.a.N.remove(c.type,k+e,l)):h=Be(b.a.N,c.type).then(function(){if(!this.f&&d)return this.a.N.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.Hb=null;c.Ra=null;c.hb=!1;c.endOfStream=!1;gj(b,c,0);v(g)}})})}
376
+ function gj(b,c,d){c.Va=(new Qb(function(){return t(function f(){var d;return y(f,function(f){switch(f.s){case 1:return Aa(f,2),u(f,sj(b,c),4);case 4:Ca(f,0);break;case 2:d=Da(f);if(b.a)b.a.onError(d);v(f)}})})})).S(d)}function Yi(b){null!=b.Va&&(b.Va.stop(),b.Va=null)}function uj(b,c){Tb(b.H).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function Hj(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return{uri:f||e,yd:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=Oc(c)}catch(h){}throw new I(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function Ij(b,c,d,e){var f=new Ij.b;yc(c.headers).forEach(function(b,c){f.append(c,b)});var g=new Ij.a,h={Zd:!1,cf:!1};b=Ij.o(b,d,{body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h,e);b=new K(b,function(){h.Zd=!0;g.abort();return Promise.resolve()});if(c=c.retryParameters.timeout){var k=new F(function(){h.cf=!0;g.abort()});k.S(c/1E3);b["finally"](function(){k.stop()})}return b}z("shaka.net.HttpFetchPlugin",Ij);
377
+ Ij.o=function(b,c,d,e,f){return t(function h(){var k,l,m,n,q,w,x,C,E,G,H,ba,ia,va;return y(h,function(h){switch(h.s){case 1:return k=Ij.g,l=Ij.c,w=q=0,x=Date.now(),Aa(h,2),u(h,k(b,d),4);case 4:return m=h.A,C=m.clone().body.getReader(),G=(E=m.headers.get("Content-Length"))?parseInt(E,10):0,H=function(b){function c(){return t(function sa(){var d,e;return y(sa,function(h){switch(h.s){case 1:return Aa(h,2),u(h,C.read(),4);case 4:d=h.A;Ca(h,3);break;case 2:return Da(h),h["return"]();case 3:d.done||(q+=
378
+ d.value.byteLength);e=Date.now();if(100<e-x||d.done)f(e-x,q-w,G-q),w=q,x=e;d.done?b.close():(b.enqueue(d.value),c());v(h)}})})}c()},new l({start:H}),u(h,m.arrayBuffer(),5);case 5:n=h.A;Ca(h,3);break;case 2:ba=Da(h);if(e.Zd)throw new I(1,1,7001,b,c);if(e.cf)throw new I(1,1,1003,b,c);throw new I(1,1,1002,b,ba,c);case 3:return ia={},va=m.headers,va.forEach(function(b,c){ia[c.trim()]=b}),h["return"](Hj(ia,n,m.status,b,m.url,c))}})})};
379
+ Ij.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};Ij.isSupported=Ij.isSupported;Ij.g=window.fetch;Ij.a=window.AbortController;Ij.c=window.ReadableStream;Ij.b=window.Headers;Ij.isSupported()&&(ic("http",Ij,2),ic("https",Ij,2));function Jj(b,c,d,e){var f=new Jj.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new I(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=r(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=Hj(f,c.response,c.status,b,c.responseURL,
380
+ d);k(h)}catch(G){m(G)}};f.onerror=function(c){m(new I(1,1,1002,b,c,d))};f.ontimeout=function(){m(new I(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h,b.total-b.loaded),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new K(k,function(){f.abort();return Promise.resolve()})}z("shaka.net.HttpXHRPlugin",Jj);Jj.f=window.XMLHttpRequest;ic("http",Jj,1);
381
+ ic("https",Jj,1);function Kj(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function Lj(b,c){b.b+=c;var d=b.g;b.g++;b.c.set(d,c);return d}Kj.prototype.close=function(b,c){if(this.c.has(b)){var d=this.c.get(b);this.c["delete"](b);this.f+=d;this.a+=c}};function Mj(b,c){this.g=b;this.b=new Map;this.c=!1;this.f=c;this.a=new Kj}Mj.prototype.destroy=function(){this.c=!0;return Promise.all(this.b.values()).then(function(){},function(){})};
382
+ function Nj(b,c,d,e,f){var g=Lj(b.a,e);e=b.b.get(c)||Promise.resolve();b.b.set(c,e.then(function(){return t(function k(){var c;return y(k,function(e){switch(e.s){case 1:return u(e,Oj(b,d),2);case 2:c=e.A;if(b.c)throw new I(2,9,7001);b.a.close(g,c.byteLength);var k=b.a;b.f(0==k.b?0:k.f/k.b,b.a.a);return e["return"](f(c))}})})}))}function Pj(b){return t(function d(){return y(d,function(d){switch(d.s){case 1:return u(d,Promise.all(b.b.values()),2);case 2:return d["return"](b.a.a)}})})}
383
+ function Oj(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.s){case 1:return f=b.g.request(1,c),u(e,f.promise,2);case 2:return g=e.A,e["return"](g.data)}})})};function Qj(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new J;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}Qj.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
384
+ function Rj(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}Qj.prototype.store=function(){return this.b};Qj.prototype.promise=function(){return this.a};function Sj(b){this.b=b;this.a=[]}Sj.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function Tj(b,c){return Uj(b,c,"readonly")}function Vj(b,c){return Uj(b,c,"readwrite")}function Uj(b,c,d){d=b.b.transaction([c],d);var e=new Qj(d,c);b.a.push(e);e.promise().then(function(){bc(b.a,e)},function(){bc(b.a,e)});return e};function Wj(b){this.a=new Sj(b)}Wj.prototype.destroy=function(){return this.a.destroy()};Wj.prototype.getAll=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return e=Tj(b.a,"session-ids"),f=[],u(d,Rj(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};Wj.prototype.add=function(b){var c=Vj(this.a,"session-ids"),d=c.store();b=r(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
385
+ Wj.prototype.remove=function(b){var c=this;return t(function e(){var f;return y(e,function(e){switch(e.s){case 1:return f=Vj(c.a,"session-ids"),u(e,Rj(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function Xj(){this.a=new Map}Xj.prototype.destroy=function(){for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Xj.prototype.init=function(){var b=this;Yj.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=r(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
386
+ function Zj(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{Ka:e,ma:d},ma:b})})});if(c)return c;throw new I(2,9,9013,"Could not find a cell that supports add-operations");}function ak(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({Ka:e,ma:d},b)})})}
387
+ function bk(b,c,d){b=b.a.get(c);if(!b)throw new I(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new I(2,9,9013,"Could not find cell with name "+d);return c}function ck(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function dk(b){var c=Array.from(b.a.keys());if(!c.length)throw new I(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
388
+ Xj.prototype.erase=function(){var b=this;return t(function d(){var e,f,g;return y(d,function(d){switch(d.s){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Yj,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.C(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function ek(b,c){Yj.set(b,c)}z("shaka.offline.StorageMuxer.register",ek);z("shaka.offline.StorageMuxer.unregister",function(b){Yj["delete"](b)});
389
+ var Yj=new Map;function fk(b){this.a=new Sj(b)}p=fk.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return!0};p.addSegments=function(){return gk("segment")};p.removeSegments=function(b,c){return hk(this,"segment",b,c)};p.getSegments=function(b){return ik(this,"segment",b).then(function(b){return b.map(jk)})};p.addManifests=function(){return gk("manifest")};
390
+ p.updateManifestExpiration=function(b,c){var d=Vj(this.a,"manifest"),e=d.store(),f=new J;e.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,e.put(d),f.resolve()):f.reject(new I(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};p.removeManifests=function(b,c){return hk(this,"manifest",b,c)};p.getManifests=function(b){return ik(this,"manifest",b).then(function(b){return b.map(kk)})};
391
+ p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return e=Tj(b.a,"manifest"),f=new Map,u(d,Rj(e,function(b,d){f.set(b,kk(d))}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};function gk(b){return Promise.reject(new I(2,9,9011,"Cannot add new value to "+b))}function hk(b,c,d,e){b=Vj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
392
+ function ik(b,c,d){b=Tj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){e.get(b).onsuccess=function(c){c=c.target.result;void 0==c&&g.push(b);f[b]=c}});return b.promise().then(function(){return g.length?Promise.reject(new I(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
393
+ function kk(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(lk),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function lk(b){mk(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(nk)}}
394
+ function nk(b){var c=b.ag?ok(b.ag):null;return{id:b.id,originalId:null,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(pk),variantIds:b.variantIds}}function pk(b){var c=ok(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
395
+ function jk(b){return{data:b.data}}function ok(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new I(2,9,9004,"Could not parse uri "+b);}
396
+ function mk(b){var c=b.streams.filter(function(b){return"audio"==b.contentType}),d=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!d.every(function(b){return b.variantIds})){c.forEach(function(b){b.variantIds=[]});d.forEach(function(b){b.variantIds=[]});var e=0;if(d.length&&!c.length){var f=e++;d.forEach(function(b){b.variantIds.push(f)})}if(!d.length&&c.length){var g=e++;c.forEach(function(b){b.variantIds.push(g)})}d.length&&c.length&&c.forEach(function(b){d.forEach(function(c){var d=
397
+ e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function qk(b,c,d,e){this.a=new Sj(b);this.c=c;this.b=d;this.f=e}p=qk.prototype;p.destroy=function(){return this.a.destroy()};p.hasFixedKeySpace=function(){return this.f};p.addSegments=function(b){return rk(this,this.c,b)};p.removeSegments=function(b,c){return sk(this,this.c,b,c)};p.getSegments=function(b){return tk(this,this.c,b)};p.addManifests=function(b){return rk(this,this.b,b)};
398
+ p.updateManifestExpiration=function(b,c){var d=Vj(this.a,this.b),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};p.removeManifests=function(b,c){return sk(this,this.b,b,c)};p.getManifests=function(b){return tk(this,this.b,b)};
399
+ p.getAllManifests=function(){var b=this;return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return e=Tj(b.a,b.b),f=new Map,u(d,Rj(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
400
+ function rk(b,c,d){if(b.f)return Promise.reject(new I(1,9,9011,"Cannot add new value to "+c));b=Vj(b.a,c);var e=b.store(),f=[];d.forEach(function(b){e.add(b).onsuccess=function(b){f.push(b.target.result)}});return b.promise().then(function(){return f})}function sk(b,c,d,e){b=Vj(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
401
+ function tk(b,c,d){b=Tj(b.a,c);var e=b.store(),f={},g=[];d.forEach(function(b){var c=e.get(b);c.onsuccess=function(){void 0==c.result&&g.push(b);f[b]=c.result}});return b.promise().then(function(){return g.length?Promise.reject(new I(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function uk(){this.g=this.c=this.b=this.a=this.f=null}p=uk.prototype;
402
+ p.init=function(){var b=this,c=new J,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new fk(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new qk(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new qk(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
403
+ new Wj(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=r(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new I(2,9,9001,d.error));b.preventDefault()};return c};
401
404
  p.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:if(!b.a){d.C(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.C(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.C(6);break}return u(d,b.c.destroy(),6);case 6:if(!b.g){d.C(8);break}return u(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),v(d)}})})};p.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};p.getEmeSessionCell=function(){return this.g};
402
- p.erase=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:if(!b.a){d.C(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.C(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.C(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,rk(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
403
- function rk(){var b=new I,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new G(2,9,9001,c.error));d.preventDefault()};return b}ak("idb",function(){return window.indexedDB?new qk:null});function sk(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}sk.prototype.Ka=function(){return this.g};sk.prototype.ma=function(){return this.f};sk.prototype.key=function(){return this.c};sk.prototype.toString=function(){return this.b};
404
- function tk(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new sk(c,d,e,Number(b[4])):null};function uk(b,c){this.b=b;this.a=c}function vk(b,c){var d=new T(null,0);d.Ma(c.duration);var e=c.periods.map(function(c){return wk(b,c,d)}),f=c.drmInfo?[c.drmInfo]:[];c.drmInfo&&e.forEach(function(b){b.variants.forEach(function(b){b.drmInfos=f})});return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
405
- function wk(b,c,d){var e=c.streams.filter(function(b){return"audio"==b.contentType}),f=c.streams.filter(function(b){return"video"==b.contentType});e=xk(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return yk(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return zk(b,d,c)});d.Kb(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
406
- function xk(b,c,d){for(var e=new Set,f=r(c),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(d);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=r(c);for(e=c.next();!e.done;e=c.next())for(e=
407
- e.value,g=yk(b,e),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;d=r(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=yk(b,e),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
408
- function yk(b,c){var d=c.segments.map(function(c,d){return zk(b,d,c)}),e=new hg(d);d={id:c.id,originalId:c.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(b){return e.find(b)},getSegmentReference:function(b){return e.get(b)},initSegmentReference:null,presentationTimeOffset:c.presentationTimeOffset,mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,
409
- language:c.language,label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=Ak(b,c.initSegmentKey));return d}function zk(b,c,d){var e=new sk("segment",b.b,b.a,d.dataKey);return new P(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function Ak(b,c){var d=new sk("segment",b.b,b.a,c);return new Yf(function(){return[d.toString()]},0,null)};function Bk(){this.a=null}p=Bk.prototype;p.configure=function(){};
410
- p.start=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.s){case 1:f=tk(b);c.a=f;if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new G(2,1,9004,f)));g=new Tj;Aa(e,2);return u(e,g.init(),4);case 4:return u(e,Xj(g,f.Ka(),f.ma()),5);case 5:return h=e.A,u(e,h.getManifests([f.key()]),6);case 6:return k=e.A,l=k[0],m=new uk(f.Ka(),f.ma()),e["return"](vk(m,l));case 2:return Fa(e),u(e,g.destroy(),7);case 7:Ga(e,0)}})})};p.stop=function(){return Promise.resolve()};
405
+ p.erase=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:if(!b.a){d.C(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.C(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.C(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,vk(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
406
+ function vk(){var b=new J,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new I(2,9,9001,c.error));d.preventDefault()};return b}ek("idb",function(){return window.indexedDB?new uk:null});function wk(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}wk.prototype.Ka=function(){return this.g};wk.prototype.ma=function(){return this.f};wk.prototype.key=function(){return this.c};wk.prototype.toString=function(){return this.b};
407
+ function xk(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new wk(c,d,e,Number(b[4])):null};function yk(b,c){this.b=b;this.a=c}function zk(b,c){var d=new U(null,0);d.Ma(c.duration);var e=c.periods.map(function(c){return Ak(b,c,d)}),f=c.drmInfo?[c.drmInfo]:[];c.drmInfo&&e.forEach(function(b){b.variants.forEach(function(b){b.drmInfos=f})});return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
408
+ function Ak(b,c,d){var e=c.streams.filter(function(b){return"audio"==b.contentType}),f=c.streams.filter(function(b){return"video"==b.contentType});e=Bk(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return Ck(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return Dk(b,d,c)});d.Kb(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
409
+ function Bk(b,c,d){for(var e=new Set,f=r(c),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(d);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=r(c);for(e=c.next();!e.done;e=c.next())for(e=
410
+ e.value,g=Ck(b,e),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;d=r(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=Ck(b,e),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
411
+ function Ck(b,c){var d=c.segments.map(function(c,d){return Dk(b,d,c)}),e=new kg(d);d={id:c.id,originalId:c.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(b){return e.find(b)},getSegmentReference:function(b){return e.get(b)},initSegmentReference:null,presentationTimeOffset:c.presentationTimeOffset,mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,
412
+ language:c.language,label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=Ek(b,c.initSegmentKey));return d}function Dk(b,c,d){var e=new wk("segment",b.b,b.a,d.dataKey);return new S(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function Ek(b,c){var d=new wk("segment",b.b,b.a,c);return new hg(function(){return[d.toString()]},0,null)};function Fk(){this.a=null}p=Fk.prototype;p.configure=function(){};
413
+ p.start=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.s){case 1:f=xk(b);c.a=f;if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new I(2,1,9004,f)));g=new Xj;Ba(e,2);return u(e,g.init(),4);case 4:return u(e,bk(g,f.Ka(),f.ma()),5);case 5:return h=e.A,u(e,h.getManifests([f.key()]),6);case 6:return k=e.A,l=k[0],m=new yk(f.Ka(),f.ma()),e["return"](zk(m,l));case 2:return Fa(e),u(e,g.destroy(),7);case 7:Ga(e,0)}})})};p.stop=function(){return Promise.resolve()};
411
414
  p.update=function(){};
412
- p.onExpirationUpdated=function(b,c){var d=this;return t(function f(){var g,h,k,l,m,n,q;return y(f,function(f){switch(f.s){case 1:return g=d.a,h=new Tj,za(f,2,3),u(f,h.init(),5);case 5:return u(f,Xj(h,g.Ka(),g.ma()),6);case 6:return k=f.A,u(f,k.getManifests([g.key()]),7);case 7:l=f.A;m=l[0];n=m.sessionIds.includes(b);q=void 0==m.expiration||m.expiration>c;if(!n||!q){f.C(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Fa(f),u(f,h.destroy(),10);case 10:Ga(f,0);break;case 2:Ca(f),
413
- f.C(3)}})})};S.ic("application/x-offline-manifest",Bk);function Ck(b){var c=tk(b);return c&&"manifest"==c.a?Ck.j(b):c&&"segment"==c.a?Ck.l(c.key(),c):Vb(new G(2,1,9004,b))}z("shaka.offline.OfflineScheme",Ck);Ck.j=function(b){b={uri:b,xd:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Xb(b)};
414
- Ck.l=function(b,c){var d=new Tj;return Xb(void 0).aa(function(){return d.init()}).aa(function(){return Xj(d,c.Ka(),c.ma())}).aa(function(b){return b.getSegments([c.key()])}).aa(function(b){return{uri:c,xd:c,data:b[0].data,headers:{}}})["finally"](function(){return d.destroy()})};jc("offline",Ck);function Dk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.s){case 1:g=[];for(var q=[],w=r(d),A=w.next();!A.done;A=w.next()){A=A.value;for(var D=!1,H=r(q),J=H.next();!J.done;J=H.next())if(J=J.value,Ek(J.info,A)){J.sessionIds.push(A.sessionId);D=!0;break}D||q.push({info:A,sessionIds:[A.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.C(4);break}l=k.value;m=Fk(b,c,l);return u(f,m,5);case 5:n=f.A;g=g.concat(n);k=h.next();f.C(2);break;case 4:return f["return"](g)}})})}
415
- function Fk(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.s){case 1:return g=new Wc({Jb:c,onError:function(){},Hc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),za(f,2),g.configure(b),u(f,dd(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Ba(f,3);break;case 2:return Ca(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return za(f,6),u(f,kd(g),8);case 8:Ba(f,7);break;case 6:return Ca(f),
416
- u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.s){case 1:return za(c,2),u(c,nd(g,b),4);case 4:h.push(b);Ba(c,0);break;case 2:Ca(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
417
- function Ek(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&ec(b.audioCapabilities,c.audioCapabilities,d)&&ec(b.videoCapabilities,c.videoCapabilities,d)};function Gk(b,c){var d=Hk(),e=this;this.g=c;this.c=b;this.l=d;this.j=null;this.f=[];this.b=this.a=null;this.o=!0;this.u=Promise.resolve().then(function(){return Ik(e)})}Gk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return b.o=!1,b.b&&b.b.abort(),Jk(b),u(d,b.u,2);case 2:b.a&&b.a.Ja.qb();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.Ja.qb();b.a=null;b.f=[];b.g=null;v(d)}})})};
418
- function Kk(b,c){var d={Mb:function(){},Gc:function(){},qb:function(){},onError:function(){},Ic:function(){},sh:function(){}};b.f.push({create:c,Ja:d});b.b&&b.b.abort();Jk(b);return d}
419
- function Ik(b){return t(function d(){return y(d,function(d){switch(d.s){case 1:if(b.o){if(0==b.f.length||b.a&&!b.a.mb)var e=!1;else{b.a&&(b.a.Ja.qb(),b.a=null);e=b.f.shift();var g=e.create(b.l);g?(e.Ja.Mb(),b.a={node:g.node,payload:g.payload,mb:g.mb,Ja:e.Ja}):e.Ja.Ic();e=!0}e?e=Promise.resolve():b.a?e=Lk(b):(b.g.ig(b.c),b.j=new I,e=b.j);return u(d,e,1)}d.C(0)}})})}
420
- function Lk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return b.c=b.g.Rf(b.c,b.l,b.a.node,b.a.payload),za(d,2),b.b=b.g.vf(b.c,b.l,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.Ja.Gc(),b.a=null);Ba(d,0);break;case 2:e=Ca(d);if(7001==e.code)b.a.Ja.qb();else b.a.Ja.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.l,e),5);case 5:f.c=d.A,v(d)}})})}function Jk(b){b.j&&(b.j.resolve(),b.j=null)};function Mk(b){this.a=null;for(var c=0;c<b.textTracks.length;++c){var d=b.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.a=d)}this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}z("shaka.text.SimpleTextDisplayer",Mk);Mk.prototype.remove=function(b,c){if(!this.a)return!1;Nk(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};Mk.prototype.remove=Mk.prototype.remove;
421
- Mk.prototype.append=function(b){for(var c=Ok,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};Mk.prototype.append=Mk.prototype.append;Mk.prototype.destroy=function(){this.a&&Nk(this.a,function(){return!0});this.a=null;return Promise.resolve()};Mk.prototype.destroy=Mk.prototype.destroy;
422
- Mk.prototype.isTextVisible=function(){return"showing"==this.a.mode};Mk.prototype.isTextVisible=Mk.prototype.isTextVisible;Mk.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};Mk.prototype.setTextVisibility=Mk.prototype.setTextVisibility;
423
- function Ok(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
424
- function Nk(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function Pk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=ac(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=ac(m)),l=Pk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z("shaka.util.ConfigUtils.mergeConfigObjects",Pk);
425
- function Qk(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(".",f);if(0>f)break;if(0==f||"\\"!=b[f-1])g=b.substring(g,f).replace(/\\\./g,"."),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\./g,".")]=c;return d}z("shaka.util.ConfigUtils.convertToConfigObject",Qk);function Rk(){}z("shaka.util.PlayerConfiguration",Rk);
426
- function Sk(){var b=5E5,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:Sb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},e={retryParameters:Sb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},f={retryParameters:Sb(),failureCallback:function(){},
427
- rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};Ec("Web0S")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:M,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,
428
- bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};
429
- g.trackSelectionCallback=function(b){return Tk(b,h.preferredAudioLanguage)};return h}function Uk(b,c,d){var e={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Pk(b,c,d||Sk(),e,"")}Rk.mergeConfigObjects=Uk;
430
- function Tk(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=mb(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return C(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
431
- 2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function Vk(){this.a=null;this.b=[]}function Wk(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function Xk(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}
432
- function Yk(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function Zk(){this.b=this.c=null;this.a=[]};function $k(){this.f=this.o=this.b=this.j=this.l=this.g=this.u=NaN;this.a=new Vk;this.c=new Zk};function U(b,c){var d=this;cb.call(this);this.j=al;this.a=null;this.xb=!1;this.l=new L;this.Sc=this.o=this.Vb=this.c=this.u=this.f=this.nc=this.K=this.pc=this.U=this.Fa=this.v=this.F=this.g=this.H=null;this.Je=1E9;this.sc=new Set;this.zb=!0;this.qa=null;this.se=!1;this.re=0;this.ea=null;this.W=new Xh;this.b=bl(this);this.tc={width:Infinity,height:Infinity};this.w=null;this.qc=new fi(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.ba=this.b.preferredTextLanguage;
433
- this.Da=this.b.preferredTextRole;c&&c(this);this.H=cl(this);this.l.m(window,"online",function(){d.Dd()});this.D={name:"detach"};this.I={name:"attach"};this.sa={name:"unload"};this.ld={name:"manifest-parser"};this.hd={name:"manifest"};this.Ea={name:"media-source"};this.Tc={name:"drm-engine"};this.L={name:"load"};this.md={name:"src-equals-drm-engine"};this.yb={name:"src-equals"};var e=new Map;e.set(this.I,function(b,c){return Yb(dl(d,b,c))});e.set(this.D,function(b){b.B&&(d.l.oa(b.B,"error"),b.B=null);
434
- d.a=null;b=Promise.resolve();return Yb(b)});e.set(this.sa,function(b){return Yb(el(d,b))});e.set(this.Ea,function(b){b=fl(d,b);return Yb(b)});e.set(this.ld,function(b,c){var e=gl(d,b,c);return Yb(e)});e.set(this.hd,function(b){return hl(d,b)});e.set(this.Tc,function(){var b=il(d);return Yb(b)});e.set(this.L,function(b,c){return Yb(jl(d,b,c))});e.set(this.md,function(b){b=kl(d,b);return Yb(b)});e.set(this.yb,function(b,c){return ll(d,b,c)});this.Ab=new Gk(this.D,{Rf:function(b,c,e,k){var f=null;b==
435
- d.D&&(f=e==d.D?d.D:d.I);b==d.I&&(f=e==d.D||c.B!=k.B?d.D:e==d.I?d.I:e==d.Ea||e==d.L?d.Ea:e==d.yb?d.md:null);b==d.Ea&&(f=e==d.L&&c.B==k.B?d.ld:d.sa);b==d.ld&&(f=ml(d.L,d.hd,d.sa,e,c,k));b==d.hd&&(f=ml(d.L,d.Tc,d.sa,e,c,k));b==d.Tc&&(f=ml(d.L,d.L,d.sa,e,c,k));b==d.md&&(f=e==d.yb&&c.B==k.B?d.yb:d.sa);if(b==d.L||b==d.yb)f=d.sa;b==d.sa&&(f=k.B&&c.B==k.B?d.I:d.D);return f},vf:function(b,c,h){d.dispatchEvent(new B("onstatechange",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,
436
- function(c){switch(c.s){case 1:return u(c,el(d,b),2);case 2:return c["return"](b.B?d.I:d.D)}})})},ig:function(b){d.dispatchEvent(new B("onstateidle",{state:b.name}))}});b&&this.Wb(b,!0)}Xa(U,cb);z("shaka.Player",U);
437
- U.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(b.j==nl)return d["return"]();b.j=nl;e=Kk(b.Ab,function(){return{node:b.D,payload:Hk(),mb:!1}});return u(d,new Promise(function(b){e.Mb=function(){};e.Gc=function(){b()};e.qb=function(){b()};e.onError=function(){b()};e.Ic=function(){b()}}),2);case 2:return u(d,b.Ab.destroy(),3);case 3:b.l&&(b.l.release(),b.l=null);b.Sc=null;b.o=null;b.b=null;if(!b.H){d.C(0);break}return u(d,b.H.destroy(),
438
- 5);case 5:b.H=null,v(d)}})})};U.prototype.destroy=U.prototype.destroy;U.version="v2.5.4";var ol=["2","5"];We=new function(b){this.a=b;this.c=Xe;this.b=Ye}(new Ue(Number(ol[0]),Number(ol[1])));var pl=["output-restricted","internal-error"],ql={};U.registerSupportPlugin=function(b,c){ql[b]=c};
439
- function rl(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?Bc()?!0:Cc("application/x-mpegurl"):!1}U.isBrowserSupported=rl;
440
- U.probeSupport=function(){return zd().then(function(b){for(var c=S.Fg(),d={},e=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",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(",")),f=
441
- e.next();!f.done;f=e.next()){f=f.value;d[f]=Bc()?le(f)?!0:MediaSource.isTypeSupported(f)||Pd(f):Cc(f);var g=f.split(";")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in ql)b[h]=ql[h]();return b})};U.prototype.Wb=function(b,c){c=void 0===c?!0:c;if(this.j==nl)return Promise.reject(sl());var d=Hk();d.B=b;Bc()||(c=!1);var e=c?this.Ea:this.I,f=Kk(this.Ab,function(){return{node:e,payload:d,mb:!1}});f.Mb=function(){};return tl(f)};U.prototype.attach=U.prototype.Wb;
442
- U.prototype.detach=function(){var b=this;if(this.j==nl)return Promise.reject(sl());var c=Kk(this.Ab,function(){return{node:b.D,payload:Hk(),mb:!1}});c.Mb=function(){};return tl(c)};U.prototype.detach=U.prototype.detach;U.prototype.Qd=function(b){var c=this;b=void 0===b?!0:b;if(this.j==nl)return Promise.reject(sl());Bc()||(b=!1);var d=Hk(),e=Kk(this.Ab,function(e){var f=e.B&&b?c.Ea:e.B?c.I:c.D;d.B=e.B;return{node:f,payload:d,mb:!1}});e.Mb=function(){};return tl(e)};U.prototype.unload=U.prototype.Qd;
443
- U.prototype.load=function(b,c,d){if(this.j==nl)return Promise.reject(sl());this.dispatchEvent(new B("loading"));var e=Hk();e.uri=b;e.Md=Date.now()/1E3;d&&"string"!=typeof d&&(Ve("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),e.Qa=function(){return new d});d&&"string"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=ul(e)?this.yb:this.L,g=Kk(this.Ab,function(b){if(null==b.B)return null;e.B=b.B;return{node:f,payload:e,mb:!0}});g.Mb=function(){};
444
- return new Promise(function(b,c){g.Ic=function(){return c(new G(2,7,7002))};g.Gc=function(){return b()};g.qb=function(){return c(sl())};g.onError=function(b){return c(b)}})};U.prototype.load=U.prototype.load;
445
- function ul(b){if(b.Qa)return!1;if(!Bc())return!0;var c=b.mimeType;b=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[S.getExtension(b)]);return c?Cc(c)?S.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes("Apple"):!0:!1:!1}function dl(b,c,d){null==c.B&&(c.B=d.B,b.l.m(c.B,"error",function(){var c=vl(b);c&&b.cb(c)}));b.a=c.B;return Promise.resolve()}
446
- function el(b,c){return t(function e(){return y(e,function(e){switch(e.s){case 1:b.j!=nl&&(b.j=al);b.dispatchEvent(new B("unloading"));c.Qa=null;c.mimeType=null;c.startTime=null;c.uri=null;c.B&&(b.l.oa(c.B,"loadeddata"),b.l.oa(c.B,"playing"),b.l.oa(c.B,"pause"),b.l.oa(c.B,"ended"),b.l.oa(c.B,"ratechange"));b.Fa&&(b.Fa.release(),b.Fa=null);b.pc&&(b.pc.stop(),b.pc=null);if(!b.u){e.C(2);break}return u(e,b.u.stop(),3);case 3:b.u=null;case 2:if(!b.o){e.C(4);break}return u(e,b.o.stop(),4);case 4:if(!b.f){e.C(6);
447
- break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.v&&(b.v.release(),b.v=null);if(!b.F){e.C(8);break}return u(e,b.F.destroy(),9);case 9:b.F=null;case 8:c.B&&c.B.src&&(c.B.removeAttribute("src"),c.B.load());if(!b.g){e.C(10);break}return u(e,b.g.destroy(),11);case 11:b.g=null;case 10:b.W.a.clear(),b.Vb=null,b.K=null,b.sc.clear(),b.c=null,b.w=null,b.Xc=null,b.zb=!0,wl(b),v(e)}})})}
448
- function fl(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.s){case 1:return f=window.muxjs?new Dd:new Ed,g=b.b.textDisplayFactory,h=new g,b.Xc=g,k=new pe(c.B,f,h),u(e,k.v,2);case 2:b.F=k,v(e)}})})}
449
- function gl(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.s){case 1:c.Qa=d.Qa;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.H;b.Vb=g;if(c.Qa){b.u=c.Qa();f.C(2);break}k=b;return u(f,S.create(g,h,b.b.manifest.retryParameters,c.mimeType),3);case 3:k.u=f.A;case 2:b.u.configure(b.b.manifest),v(f)}})})}
450
- function hl(b,c){var d=c.uri,e=b.H;b.nc=new Ni;Oi(b.nc,function(c){xl(b,"timelineregionadded",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.Zc(c)},filterAllPeriods:function(c){return yl(b,c)},onTimelineRegionAdded:function(c){var d=b.nc;a:{var e=r(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.cb(c)}};
451
- return new Ub(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.s){case 1:return c=b,u(e,b.u.start(d,f),2);case 2:c.c=e.A;b.dispatchEvent(new B("manifestparsed"));if(0==b.c.periods.length)throw new G(2,4,4014);zl(b.c.periods);v(e)}})})}),function(){return b.u.stop()})}
452
- function il(b){return t(function d(){return y(d,function(d){switch(d.s){case 1:return b.g=new Wc({Jb:b.H,onError:function(d){b.cb(d)},Hc:function(d){Al(b,d)},onExpirationUpdated:function(d,e){Bl(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.g.configure(b.b.drm),u(d,cd(b.g,ti(b.c.periods),b.c.offlineSessionIds),2);case 2:yl(b,b.c.periods),v(d)}})})}
453
- function jl(b,c,d){return t(function f(){var g,h,k,l,m,n,q,x,w;return y(f,function(f){switch(f.s){case 1:return c.startTime=d.startTime,g=c.B,h=c.uri,b.Vb=h,b.w=new $k,k=function(){return Cl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.U.set(c)},b.l.m(g,"playing",k),b.l.m(g,"pause",k),b.l.m(g,"ended",k),b.l.m(g,"ratechange",l),m=b.b.abrFactory,b.o&&b.Sc==m||(b.Sc=m,b.o=new m,b.o.configure(b.b.abr)),Dl(b,b.c.periods),b.qc=new fi(b.b.preferredAudioLanguage,b.b.preferredVariantRole,b.b.preferredAudioChannelCount),
454
- b.ba=b.b.preferredTextLanguage,El(b.c.presentationTimeline,b.b.playRangeStart,b.b.playRangeEnd),u(f,b.g.Wb(g),2);case 2:return b.o.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.c.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}Fl(b,g,c,!0);b.f&&(gj(b.f,c,d,f),Gl(b))}),b.v=Hl(b,c.startTime),b.Fa=Il(b),b.U=new xi({Cc:function(){return c.B.playbackRate},Id:function(b){c.B.playbackRate=b},qe:function(b){c.B.currentTime+=b}}),
455
- n=Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),Jl(b,n),b.f=Kl(b),b.f.configure(b.b.streaming),Ll(b),b.j=Ml,b.dispatchEvent(new B("streaming")),u(f,b.f.start(),3);case 3:b.b.streaming.startAtSegmentBoundary&&(q=b.v.j(),x=Nl(b,q),b.v.u(x)),b.c.periods.forEach(b.Zc.bind(b)),Ol(b),Gl(b),w=Pl(b),w.variants.some(function(b){return b.primary}),Ql(b,w.variants),b.l.wa(g,"loadeddata",function(){b.w.b=Date.now()/1E3-d.Md}),v(f)}})})}
456
- function kl(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.s){case 1:return f=Md,b.g=new Wc({Jb:b.H,onError:function(c){b.cb(c)},Hc:function(c){Al(b,c)},onExpirationUpdated:function(c,e){Bl(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.g.configure(b.b.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,
457
- presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:f.fb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,cd(b.g,[g],[]),2);case 2:return u(e,b.g.Wb(c.B),0)}})})}
458
- function ll(b,c,d){function e(){return Cl(b)}c.uri=d.uri;c.startTime=d.startTime;b.Vb=c.uri;b.w=new $k;b.v=new Gi(c.B);null!=c.startTime&&b.v.u(c.startTime);b.U=new xi({Cc:function(){return c.B.playbackRate},Id:function(b){c.B.playbackRate=b},qe:function(b){c.B.currentTime+=b}});Jl(b,b.b.streaming.rebufferingGoal);b.l.m(c.B,"playing",e);b.l.m(c.B,"pause",e);b.l.m(c.B,"ended",e);b.l.wa(c.B,"loadeddata",function(){b.w.b=Date.now()/1E3-d.Md});b.a.audioTracks&&(b.l.m(b.a.audioTracks,"addtrack",function(){return Ol(b)}),
459
- b.l.m(b.a.audioTracks,"removetrack",function(){return Ol(b)}));if(b.a.textTracks){var f=b.a.textTracks;b.l.m(f,"addtrack",function(){return Ol(b)});b.l.m(f,"removetrack",function(){return Ol(b)})}c.B.src=c.uri;b.j=Rl;b.dispatchEvent(new B("streaming"));var g=new I;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(vl(b)):(b.l.wa(b.a,"loadeddata",function(){g.resolve()}),b.l.wa(b.a,"error",function(){g.reject(vl(b))}));return new Ub(g,function(){g.reject(new G(2,7,7001));
460
- return Promise.resolve()})}function zl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}
461
- function Ll(b){function c(b){var c="";b.video&&(c=Ac(b.video.codecs)[0]);var d="";b.audio&&(d=Ac(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=Oe(d,b.b.preferredAudioChannelCount);var e=new bb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h<g&&(f=b,g=h)});b.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
462
- f?!0:!1})})}function cl(b){return new K(function(c,d){b.o&&b.o.segmentDownloaded(c,d)})}function Hl(b,c){return new Hi(b.a,b.c,b.b.streaming,c,function(){b.Fa&&si(b.Fa,!0);b.f&&mj(b.f)},function(c){return b.dispatchEvent(c)})}
463
- function Il(b){var c=new vi(b.c);wi(c,function(){Ol(b)});var d=new Pi(b.nc);Ti(d,function(c){xl(b,"timelineregionenter",c)},function(c){xl(b,"timelineregionexit",c)},function(c,d){d||(xl(b,"timelineregionenter",c),xl(b,"timelineregionexit",c))});var e=new ri(b.a);e.a.add(c);e.a.add(d);return e}
464
- function Jl(b,c){b.K=new ii(c,Math.min(.5,c/2));b.K.a=ki;wl(b);b.pc=(new F(function(){switch(b.j){case Rl:var c=b.a.ended?!0:Fd(b.a.buffered)>=b.a.duration-.1;break;case Ml:a:{var e;(e=b.a.ended)||(e=b.F,e=e.j?"ended"==e.j.readyState:!0);if(e)c=!0;else{if(b.c.presentationTimeline.V()&&(e=b.c.presentationTimeline.Eb(),Fd(b.a.buffered)>=e)){c=!0;break a}c=!1}}break;default:c=!1}var f=Hd(b.a.buffered,b.a.currentTime);e=b.K;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?ji:ki;e.a=f;c!=f&&wl(b)})).Na(.25)}
465
- function Kl(b){return new Ui(b.c,{kb:function(){return b.v.j()},getBandwidthEstimate:function(){return b.o.getBandwidthEstimate()},N:b.F,Jb:b.H,we:b.gg.bind(b),ve:b.rf.bind(b),onError:b.cb.bind(b),onEvent:function(c){return b.dispatchEvent(c)},lg:b.mg.bind(b),vd:b.vg.bind(b)})}U.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Qk(b,c));var d=Uk(this.b,b,bl(this));Sl(this);return d};U.prototype.configure=U.prototype.configure;
466
- function Sl(b){b.u&&b.u.configure(b.b.manifest);b.g&&b.g.configure(b.b.drm);if(b.f){b.f.configure(b.b.streaming);try{b.c.periods.forEach(b.Zc.bind(b))}catch(g){b.cb(g)}var c=Yi(b.f),d=$i(b.f),e=Pl(b);c=Re(c,d,e.variants);b.o&&c&&c.allowedByApplication&&c.allowedByKeySystem?Ql(b,e.variants):Tl(b,e)}if(b.F&&(e=b.b.textDisplayFactory,b.Xc!=e)){c=new e;d=b.F;var f=d.g;d.g=c;f&&(c.setTextVisibility(f.isTextVisible()),f.destroy());d.a&&(d.a.c=c);b.Xc=e;b.f&&(e=b.f,(c=e.b.get("text"))&&fj(e,c.stream,!0,
467
- 0,!0))}b.o&&(b.o.configure(b.b.abr),b.b.abr.enabled&&!b.zb?b.o.enable():b.o.disable(),Ul(b))}U.prototype.getConfiguration=function(){var b=bl(this);Uk(b,this.b,bl(this));return b};U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.Ng=function(){for(var b in this.b)delete this.b[b];Uk(this.b,bl(this),bl(this));Sl(this)};U.prototype.resetConfiguration=U.prototype.Ng;U.prototype.If=function(){return this.j};U.prototype.getLoadMode=U.prototype.If;U.prototype.Pf=function(){return this.a};
468
- U.prototype.getMediaElement=U.prototype.Pf;U.prototype.Zb=function(){return this.H};U.prototype.getNetworkingEngine=U.prototype.Zb;U.prototype.zc=function(){return this.Vb};U.prototype.getAssetUri=U.prototype.zc;U.prototype.Of=function(){Ve("getManifestUri",'Please use "getAssetUri" instead.');return this.zc()};U.prototype.getManifestUri=U.prototype.Of;U.prototype.V=function(){return this.c?this.c.presentationTimeline.V():this.a&&this.a.src?Infinity==this.a.duration:!1};U.prototype.isLive=U.prototype.V;
469
- U.prototype.pb=function(){return this.c?this.c.presentationTimeline.pb():!1};U.prototype.isInProgress=U.prototype.pb;U.prototype.me=function(){if(this.c){if(!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};U.prototype.isAudioOnly=U.prototype.me;
470
- U.prototype.Tb=function(){if(this.c){var b=this.c.presentationTimeline;return{start:b.Db(),end:b.Ra()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};U.prototype.seekRange=U.prototype.Tb;U.prototype.keySystem=function(){return this.g?this.g.keySystem():""};U.prototype.keySystem=U.prototype.keySystem;U.prototype.drmInfo=function(){return this.g?this.g.a:null};U.prototype.drmInfo=U.prototype.drmInfo;
471
- U.prototype.Bc=function(){return this.g?this.g.Bc():Infinity};U.prototype.getExpiration=U.prototype.Bc;U.prototype.Gb=function(){return this.K?this.K.a==ki:!1};U.prototype.isBuffering=U.prototype.Gb;U.prototype.cd=function(){if(this.U){var b=this.U;b=b.f?0:b.c}else b=0;return b};U.prototype.getPlaybackRate=U.prototype.cd;U.prototype.Pd=function(b){0==b?Za("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.U.set(b),this.j==Ml&&ej(this.f,1<Math.abs(b)))};
472
- U.prototype.trickPlay=U.prototype.Pd;U.prototype.Vd=function(){this.j==Rl&&this.U.set(1);this.j==Ml&&(this.U.set(1),ej(this.f,!1))};U.prototype.cancelTrickPlay=U.prototype.Vd;
473
- U.prototype.Fb=function(){if(this.c&&this.v){for(var b=Vl(this),c=[],d=r(Wl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=He(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(b){var c=Le(b);c.active=b.enabled;c.type="variant";c.originalAudioId=b.id;"main"==b.kind?(c.primary=!0,c.roles=["main"],c.audioRoles=["main"]):c.audioRoles=[];return c}):[]};U.prototype.getVariantTracks=U.prototype.Fb;
474
- U.prototype.Xa=function(){if(this.c&&this.v){for(var b=Xl(this),c=[],d=r(Yl(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=Ie(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map(function(b){var c=Le(b);c.active="disabled"!=b.mode;c.type="text";c.originalTextId=b.id;"captions"==b.kind&&(c.mimeType="application/cea-608");return c}):[]};U.prototype.getTextTracks=U.prototype.Xa;
475
- U.prototype.Ed=function(b){if(this.c&&this.f){var c=Pl(this),d=c.textStreams.find(function(c){return c.id==b.id});d&&(Zl(this,c,d,!1),$l(this,d),this.ba=d.language)}else if(this.a&&this.a.src&&this.a.textTracks){c=Array.from(this.a.textTracks);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Je(d)==b.id?d.mode=this.xb?"showing":"hidden":d.mode="disabled";am(this)}};U.prototype.selectTextTrack=U.prototype.Ed;
476
- U.prototype.Qg=function(){Ve("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.Xa().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.Ed(b[0])};U.prototype.selectEmbeddedTextTrack=U.prototype.Qg;
477
- U.prototype.hh=function(){Ve("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.Xa().filter(function(b){return b.active})[0];return b?"application/cea-608"==b.mimeType:!1};U.prototype.usingEmbeddedTextTrack=U.prototype.hh;
478
- U.prototype.Re=function(b,c,d){d=void 0===d?0:d;if(this.c&&this.f){var e=Pl(this);this.b.abr.enabled&&Za("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var f=e.variants.find(function(c){return c.id==b.id});f&&Me(f)&&(Fl(this,e,f,!1),bm(this,f,c,d),this.qc=new ei(f),Ql(this,e.variants))}else if(this.a&&this.a.audioTracks){c=Array.from(this.a.audioTracks);c=r(c);for(d=c.next();!d.done;d=
479
- c.next())d=d.value,Je(d)==b.id&&(d.enabled=!0);cm(this)}};U.prototype.selectVariantTrack=U.prototype.Re;U.prototype.zf=function(){return dm(this.Fb())};U.prototype.getAudioLanguagesAndRoles=U.prototype.zf;U.prototype.ie=function(){return dm(this.Xa())};U.prototype.getTextLanguagesAndRoles=U.prototype.ie;U.prototype.fe=function(){return Array.from(em(this.Fb()))};U.prototype.getAudioLanguages=U.prototype.fe;U.prototype.Wf=function(){return Array.from(em(this.Xa()))};U.prototype.getTextLanguages=U.prototype.Wf;
480
- U.prototype.Pe=function(b,c){if(this.c&&this.v){var d=Pl(this);this.qc=new fi(b,c||"",0);Tl(this,d)}else if(this.a&&this.a.audioTracks){d=Array.from(this.a.audioTracks);d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.language==b&&(e.enabled=!0);cm(this)}};U.prototype.selectAudioLanguage=U.prototype.Pe;
481
- U.prototype.Qe=function(b,c){if(this.c&&this.v){var d=Pl(this);this.ba=b;this.Da=c||"";var e=Pe(d.textStreams,this.ba,this.Da)[0]||null;e&&(Zl(this,d,e,!1),(this.b.streaming.alwaysStreamText||this.Za())&&$l(this,e))}else(d=this.Xa().filter(function(c){return c.language==b})[0])&&this.Ed(d)};U.prototype.selectTextLanguage=U.prototype.Qe;
482
- U.prototype.Za=function(){var b=this.xb;return this.c?this.F.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some(function(b){return"showing"==b.mode}):b};U.prototype.isTextTrackVisible=U.prototype.Za;
483
- U.prototype.Kd=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.s){case 1:f=c.xb;g=b;if(f==g)return e["return"]();c.xb=g;if(c.j!=Ml){if(c.a&&c.a.src&&c.a.textTracks){h=Array.from(c.a.textTracks);for(var n=r(h),x=n.next();!x.done;x=n.next())k=x.value,"disabled"!=k.mode&&(k.mode=b?"showing":"hidden")}e.C(2);break}c.F.g.setTextVisibility(b);if(c.b.streaming.alwaysStreamText){e.C(2);break}if(!b){n=c.f;n.F=!0;if(x=n.b.get("text"))Vi(x),n.b["delete"]("text");
484
- e.C(2);break}l=Pl(c);m=Pe(l.textStreams,c.ba,c.Da);if(!(0<m.length)){e.C(2);break}return u(e,aj(c.f,m[0]),2);case 2:fm(c),v(e)}})})};U.prototype.setTextTrackVisibility=U.prototype.Kd;U.prototype.Sf=function(){if(!this.V())return null;if(this.c)return new Date(1E3*(this.c.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*this.a.currentTime)}return null};U.prototype.getPlayheadTimeAsDate=U.prototype.Sf;
485
- U.prototype.Uf=function(){if(!this.V())return null;if(this.c)return new Date(1E3*this.c.presentationTimeline.f);if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:b}return null};U.prototype.getPresentationStartTimeAsDate=U.prototype.Uf;U.prototype.ad=function(){var b={total:[],audio:[],video:[],text:[]};this.j==Rl&&(b.total=Id(this.a.buffered));this.j==Ml&&this.F.ad(b);return b};U.prototype.getBufferedInfo=U.prototype.ad;
486
- U.prototype.getStats=function(){if(this.j!=Ml&&this.j!=Rl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};Cl(this);var b=this.a;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.w,d=Number(b.totalVideoFrames);c.l=Number(b.droppedVideoFrames);c.j=d}if(this.j==Ml){if(b=Vl(this))this.w.o=b.bandwidth;b&&b.video&&(c=this.w,d=b.video.height||
487
- NaN,c.u=b.video.width||NaN,c.g=d);b=this.o.getBandwidthEstimate();this.w.f=b}var e=this.w;b=e.u;c=e.g;d=e.o;var f=e.j,g=e.l,h=e.f,k=e.b,l=Xk(e.a,"playing"),m=Xk(e.a,"paused"),n=Xk(e.a,"buffering"),q=Yk(e.a),x=[];e=r(e.c.a);for(var w=e.next();!w.done;w=e.next())w=w.value,x.push({timestamp:w.timestamp,id:w.id,type:w.type,fromAdaptation:w.fromAdaptation,bandwidth:w.bandwidth});return{width:b,height:c,streamBandwidth:d,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,pauseTime:m,
488
- bufferingTime:n,stateHistory:q,switchHistory:x}};U.prototype.getStats=U.prototype.getStats;
489
- U.prototype.addTextTrack=function(b,c,d,e,f,g){var h=this;return t(function l(){var m,n,q,x,w,A,D,H,J;return y(l,function(l){switch(l.s){case 1:if(h.j==Rl)throw Error("State error!");if(h.j!=Ml)throw Error("State error!");m=Pl(h);n=Md;q=h.c.periods.indexOf(m);x=q+1;w=x>=h.c.periods.length?h.c.presentationTimeline.ia():h.c.periods[x].startTime;A=w-m.startTime;if(Infinity==A)throw new G(1,4,4033);D=new P(1,0,A,function(){return[b]},0,null);H={id:h.Je++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),
490
- findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?D:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.Ga,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.sc.add(H);m.textStreams.push(H);return u(l,aj(h.f,H),2);case 2:return(J=Zi(h.f,"text"))&&Yh(h.W,m,J),h.sc["delete"](H),Tl(h,m),Ol(h),l["return"](Ie(H))}})})};
491
- U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.Hd=function(b,c){this.tc.width=b;this.tc.height=c};U.prototype.setMaxHardwareResolution=U.prototype.Hd;U.prototype.Dd=function(){if(this.j==Ml){var b=this.f;if(b.f)b=!1;else if(b.u)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.cc&&(d.cc=!1,dj(b,d,.1));b=!0}}else b=!1;return b};U.prototype.retryStreaming=U.prototype.Dd;U.prototype.Mf=function(){return this.c};U.prototype.getManifest=U.prototype.Mf;
492
- U.prototype.Nf=function(){return this.u?this.u.constructor:null};U.prototype.getManifestParserFactory=U.prototype.Nf;function Fl(b,c,d,e){Zh(b.W,c).variant=d;b=b.w.c;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}function Zl(b,c,d,e){Yh(b.W,c,d);b=b.w.c;b.b!=d&&(b.b=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"text",fromAdaptation:e,bandwidth:null}))}
493
- function bl(b){var c=Sk();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.V()&&d.includes(c.code)&&(c.severity=1,b.Dd())};c.textDisplayFactory=function(){return new Mk(b.a)};return c}
494
- function Dl(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=r(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=r(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.Je++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
415
+ p.onExpirationUpdated=function(b,c){var d=this;return t(function f(){var g,h,k,l,m,n,q;return y(f,function(f){switch(f.s){case 1:return g=d.a,h=new Xj,Aa(f,2,3),u(f,h.init(),5);case 5:return u(f,bk(h,g.Ka(),g.ma()),6);case 6:return k=f.A,u(f,k.getManifests([g.key()]),7);case 7:l=f.A;m=l[0];n=m.sessionIds.includes(b);q=void 0==m.expiration||m.expiration>c;if(!n||!q){f.C(3);break}return u(f,k.updateManifestExpiration(g.key(),c),3);case 3:return Fa(f),u(f,h.destroy(),10);case 10:Ga(f,0);break;case 2:Da(f),
416
+ f.C(3)}})})};T.ic("application/x-offline-manifest",Fk);function Gk(b){var c=xk(b);return c&&"manifest"==c.a?Gk.j(b):c&&"segment"==c.a?Gk.l(c.key(),c):Ub(new I(2,1,9004,b))}z("shaka.offline.OfflineScheme",Gk);Gk.j=function(b){b={uri:b,yd:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return Wb(b)};
417
+ Gk.l=function(b,c){var d=new Xj;return Wb(void 0).aa(function(){return d.init()}).aa(function(){return bk(d,c.Ka(),c.ma())}).aa(function(b){return b.getSegments([c.key()])}).aa(function(b){return{uri:c,yd:c,data:b[0].data,headers:{}}})["finally"](function(){return d.destroy()})};ic("offline",Gk);function Hk(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.s){case 1:g=[];for(var q=[],x=r(d),C=x.next();!C.done;C=x.next()){C=C.value;for(var E=!1,G=r(q),H=G.next();!H.done;H=G.next())if(H=H.value,Ik(H.info,C)){H.sessionIds.push(C.sessionId);E=!0;break}E||q.push({info:C,sessionIds:[C.sessionId]})}h=r(q);k=h.next();case 2:if(k.done){f.C(4);break}l=k.value;m=Jk(b,c,l);return u(f,m,5);case 5:n=f.A;g=g.concat(n);k=h.next();f.C(2);break;case 4:return f["return"](g)}})})}
418
+ function Jk(b,c,d){return t(function f(){var g,h;return y(f,function(f){switch(f.s){case 1:return g=new Xc({Jb:c,onError:function(){},Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),Aa(f,2),g.configure(b),u(f,ed(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Ca(f,3);break;case 2:return Da(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return Aa(f,6),u(f,ld(g),8);case 8:Ca(f,7);break;case 6:return Da(f),
419
+ u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function n(){return y(n,function(c){switch(c.s){case 1:return Aa(c,2),u(c,od(g,b),4);case 4:h.push(b);Ca(c,0);break;case 2:Da(c),v(c)}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
420
+ function Ik(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&dc(b.audioCapabilities,c.audioCapabilities,d)&&dc(b.videoCapabilities,c.videoCapabilities,d)};function Kk(b,c){var d=Lk(),e=this;this.g=c;this.c=b;this.l=d;this.j=null;this.f=[];this.b=this.a=null;this.o=!0;this.u=Promise.resolve().then(function(){return Mk(e)})}Kk.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return b.o=!1,b.b&&b.b.abort(),Nk(b),u(d,b.u,2);case 2:b.a&&b.a.Ja.qb();for(var f=r(b.f),h=f.next();!h.done;h=f.next())e=h.value,e.Ja.qb();b.a=null;b.f=[];b.g=null;v(d)}})})};
421
+ function Ok(b,c){var d={Mb:function(){},Hc:function(){},qb:function(){},onError:function(){},Jc:function(){},vh:function(){}};b.f.push({create:c,Ja:d});b.b&&b.b.abort();Nk(b);return d}
422
+ function Mk(b){return t(function d(){return y(d,function(d){switch(d.s){case 1:if(b.o){if(0==b.f.length||b.a&&!b.a.mb)var e=!1;else{b.a&&(b.a.Ja.qb(),b.a=null);e=b.f.shift();var g=e.create(b.l);g?(e.Ja.Mb(),b.a={node:g.node,payload:g.payload,mb:g.mb,Ja:e.Ja}):e.Ja.Jc();e=!0}e?e=Promise.resolve():b.a?e=Pk(b):(b.g.kg(b.c),b.j=new J,e=b.j);return u(d,e,1)}d.C(0)}})})}
423
+ function Pk(b){return t(function d(){var e,f;return y(d,function(d){switch(d.s){case 1:return b.c=b.g.Tf(b.c,b.l,b.a.node,b.a.payload),Aa(d,2),b.b=b.g.xf(b.c,b.l,b.a.payload),u(d,b.b.promise,4);case 4:b.b=null;b.c==b.a.node&&(b.a.Ja.Hc(),b.a=null);Ca(d,0);break;case 2:e=Da(d);if(7001==e.code)b.a.Ja.qb();else b.a.Ja.onError(e);b.a=null;b.b=null;f=b;return u(d,b.g.handleError(b.l,e),5);case 5:f.c=d.A,v(d)}})})}function Nk(b){b.j&&(b.j.resolve(),b.j=null)};function Qk(b){this.a=null;for(var c=0;c<b.textTracks.length;++c){var d=b.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.a=d)}this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}z("shaka.text.SimpleTextDisplayer",Qk);Qk.prototype.remove=function(b,c){if(!this.a)return!1;Rk(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};Qk.prototype.remove=Qk.prototype.remove;
424
+ Qk.prototype.append=function(b){for(var c=Sk,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};Qk.prototype.append=Qk.prototype.append;Qk.prototype.destroy=function(){this.a&&Rk(this.a,function(){return!0});this.a=null;return Promise.resolve()};Qk.prototype.destroy=Qk.prototype.destroy;
425
+ Qk.prototype.isTextVisible=function(){return"showing"==this.a.mode};Qk.prototype.isTextVisible=Qk.prototype.isTextVisible;Qk.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};Qk.prototype.setTextVisibility=Qk.prototype.setTextVisibility;
426
+ function Sk(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
427
+ function Rk(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};function Tk(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=$b(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=$b(m)),l=Tk(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}z("shaka.util.ConfigUtils.mergeConfigObjects",Tk);
428
+ function Uk(b,c){for(var d={},e=d,f=0,g=0;;){f=b.indexOf(".",f);if(0>f)break;if(0==f||"\\"!=b[f-1])g=b.substring(g,f).replace(/\\\./g,"."),e[g]={},e=e[g],g=f+1;f+=1}e[b.substring(g).replace(/\\\./g,".")]=c;return d}z("shaka.util.ConfigUtils.convertToConfigObject",Uk);function Vk(){}z("shaka.util.PlayerConfiguration",Vk);
429
+ function Wk(){var b=5E5,c=Infinity;navigator.connection&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={retryParameters:Sb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(b){return b},fairPlayTransform:!0},e={retryParameters:Sb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,
430
+ autoCorrectDrift:!0},hls:{ignoreTextStreamFailures:!1}},f={retryParameters:Sb(),failureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1};Hc("Web0S")&&(f.stallEnabled=!1);var g={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},
431
+ h={drm:d,manifest:e,streaming:f,offline:g,abrFactory:N,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,
432
+ minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};g.trackSelectionCallback=function(b){return Xk(b,h.preferredAudioLanguage)};return h}
433
+ function Yk(b,c,d){var e={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return Tk(b,c,d||Wk(),e,"")}Vk.mergeConfigObjects=Yk;
434
+ function Xk(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=mb(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return B(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
435
+ 2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=r(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function Zk(){this.a=null;this.b=[]}function $k(b,c){if(null==b.a)b.a={timestamp:Date.now()/1E3,state:c,duration:0};else{var d=Date.now()/1E3;b.a.duration=d-b.a.timestamp;b.a.state!=c&&(b.b.push(b.a),b.a={timestamp:d,state:c,duration:0})}}function al(b,c){var d=0;b.a&&b.a.state==c&&(d+=b.a.duration);for(var e=r(b.b),f=e.next();!f.done;f=e.next())f=f.value,d+=f.state==c?f.duration:0;return d}
436
+ function bl(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=r(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d};function cl(){this.b=this.c=null;this.a=[]};function dl(){this.f=this.o=this.b=this.j=this.l=this.g=this.u=NaN;this.a=new Zk;this.c=new cl};function V(b,c){var d=this;cb.call(this);this.j=el;this.a=null;this.xb=!1;this.l=new M;this.Tc=this.o=this.Vb=this.c=this.u=this.f=this.nc=this.K=this.pc=this.V=this.Fa=this.v=this.F=this.g=this.H=null;this.Le=1E9;this.sc=new Set;this.zb=!0;this.sa=null;this.ve=!1;this.ue=0;this.ea=null;this.W=new $h;this.b=fl(this);this.tc={width:Infinity,height:Infinity};this.w=null;this.qc=new ii(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.ba=this.b.preferredTextLanguage;
437
+ this.Da=this.b.preferredTextRole;c&&c(this);this.H=gl(this);this.l.m(window,"online",function(){d.Ed()});this.D={name:"detach"};this.I={name:"attach"};this.ua={name:"unload"};this.md={name:"manifest-parser"};this.jd={name:"manifest"};this.Ea={name:"media-source"};this.Uc={name:"drm-engine"};this.M={name:"load"};this.nd={name:"src-equals-drm-engine"};this.yb={name:"src-equals"};var e=new Map;e.set(this.I,function(b,c){return Xb(hl(d,b,c))});e.set(this.D,function(b){b.B&&(d.l.oa(b.B,"error"),b.B=null);
438
+ d.a=null;b=Promise.resolve();return Xb(b)});e.set(this.ua,function(b){return Xb(il(d,b))});e.set(this.Ea,function(b){b=jl(d,b);return Xb(b)});e.set(this.md,function(b,c){var e=kl(d,b,c);return Xb(e)});e.set(this.jd,function(b){return ll(d,b)});e.set(this.Uc,function(){var b=ml(d);return Xb(b)});e.set(this.M,function(b,c){return Xb(nl(d,b,c))});e.set(this.nd,function(b){b=ol(d,b);return Xb(b)});e.set(this.yb,function(b,c){return pl(d,b,c)});this.Ab=new Kk(this.D,{Tf:function(b,c,e,k){var f=null;b==
439
+ d.D&&(f=e==d.D?d.D:d.I);b==d.I&&(f=e==d.D||c.B!=k.B?d.D:e==d.I?d.I:e==d.Ea||e==d.M?d.Ea:e==d.yb?d.nd:null);b==d.Ea&&(f=e==d.M&&c.B==k.B?d.md:d.ua);b==d.md&&(f=ql(d.M,d.jd,d.ua,e,c,k));b==d.jd&&(f=ql(d.M,d.Uc,d.ua,e,c,k));b==d.Uc&&(f=ql(d.M,d.M,d.ua,e,c,k));b==d.nd&&(f=e==d.yb&&c.B==k.B?d.yb:d.ua);if(b==d.M||b==d.yb)f=d.ua;b==d.ua&&(f=k.B&&c.B==k.B?d.I:d.D);return f},xf:function(b,c,h){d.dispatchEvent(new A("onstatechange",{state:b.name}));return e.get(b)(c,h)},handleError:function(b){return t(function h(){return y(h,
440
+ function(c){switch(c.s){case 1:return u(c,il(d,b),2);case 2:return c["return"](b.B?d.I:d.D)}})})},kg:function(b){d.dispatchEvent(new A("onstateidle",{state:b.name}))}});b&&this.Wb(b,!0)}Xa(V,cb);z("shaka.Player",V);
441
+ V.prototype.destroy=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(b.j==rl)return d["return"]();b.j=rl;e=Ok(b.Ab,function(){return{node:b.D,payload:Lk(),mb:!1}});return u(d,new Promise(function(b){e.Mb=function(){};e.Hc=function(){b()};e.qb=function(){b()};e.onError=function(){b()};e.Jc=function(){b()}}),2);case 2:return u(d,b.Ab.destroy(),3);case 3:b.l&&(b.l.release(),b.l=null);b.Tc=null;b.o=null;b.b=null;if(!b.H){d.C(0);break}return u(d,b.H.destroy(),
442
+ 5);case 5:b.H=null,v(d)}})})};V.prototype.destroy=V.prototype.destroy;V.version="v2.5.5";var sl=["2","5"];Ye=new function(b){this.a=b;this.c=Ze;this.b=$e}(new We(Number(sl[0]),Number(sl[1])));var tl=["output-restricted","internal-error"],ul={};V.registerSupportPlugin=function(b,c){ul[b]=c};
443
+ function vl(){return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration?Ec()?!0:Fc("application/x-mpegurl"):!1}V.isBrowserSupported=vl;
444
+ V.probeSupport=function(){return Ad().then(function(b){for(var c=T.Hg(),d={},e=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",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(",")),f=
445
+ e.next();!f.done;f=e.next()){f=f.value;d[f]=Ec()?me(f)?!0:MediaSource.isTypeSupported(f)||Qd(f):Fc(f);var g=f.split(";")[0];d[g]=d[g]||d[f]}b={manifest:c,media:d,drm:b};for(var h in ul)b[h]=ul[h]();return b})};V.prototype.Wb=function(b,c){c=void 0===c?!0:c;if(this.j==rl)return Promise.reject(wl());var d=Lk();d.B=b;Ec()||(c=!1);var e=c?this.Ea:this.I,f=Ok(this.Ab,function(){return{node:e,payload:d,mb:!1}});f.Mb=function(){};return xl(f)};V.prototype.attach=V.prototype.Wb;
446
+ V.prototype.detach=function(){var b=this;if(this.j==rl)return Promise.reject(wl());var c=Ok(this.Ab,function(){return{node:b.D,payload:Lk(),mb:!1}});c.Mb=function(){};return xl(c)};V.prototype.detach=V.prototype.detach;V.prototype.Td=function(b){var c=this;b=void 0===b?!0:b;if(this.j==rl)return Promise.reject(wl());Ec()||(b=!1);var d=Lk(),e=Ok(this.Ab,function(e){var f=e.B&&b?c.Ea:e.B?c.I:c.D;d.B=e.B;return{node:f,payload:d,mb:!1}});e.Mb=function(){};return xl(e)};V.prototype.unload=V.prototype.Td;
447
+ V.prototype.load=function(b,c,d){if(this.j==rl)return Promise.reject(wl());this.dispatchEvent(new A("loading"));var e=Lk();e.uri=b;e.Od=Date.now()/1E3;d&&"string"!=typeof d&&(Xe("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),e.Pa=function(){return new d});d&&"string"==typeof d&&(e.mimeType=d);void 0!==c&&(e.startTime=c);var f=yl(e)?this.yb:this.M,g=Ok(this.Ab,function(b){if(null==b.B)return null;e.B=b.B;return{node:f,payload:e,mb:!0}});g.Mb=function(){};
448
+ return new Promise(function(b,c){g.Jc=function(){return c(new I(2,7,7002))};g.Hc=function(){return b()};g.qb=function(){return c(wl())};g.onError=function(b){return c(b)}})};V.prototype.load=V.prototype.load;
449
+ function yl(b){if(b.Pa)return!1;if(!Ec())return!0;var c=b.mimeType;b=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",ts:"video/mp2t",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac"}[T.getExtension(b)]);return c?Fc(c)?T.isSupported(b,c)?!!navigator.vendor&&navigator.vendor.includes("Apple"):!0:!1:!1}function hl(b,c,d){null==c.B&&(c.B=d.B,b.l.m(c.B,"error",function(){var c=zl(b);c&&b.cb(c)}));b.a=c.B;return Promise.resolve()}
450
+ function il(b,c){return t(function e(){return y(e,function(e){switch(e.s){case 1:b.j!=rl&&(b.j=el);b.dispatchEvent(new A("unloading"));c.Pa=null;c.mimeType=null;c.startTime=null;c.uri=null;c.B&&(b.l.oa(c.B,"loadeddata"),b.l.oa(c.B,"playing"),b.l.oa(c.B,"pause"),b.l.oa(c.B,"ended"),b.l.oa(c.B,"ratechange"));b.Fa&&(b.Fa.release(),b.Fa=null);b.pc&&(b.pc.stop(),b.pc=null);if(!b.u){e.C(2);break}return u(e,b.u.stop(),3);case 3:b.u=null;case 2:if(!b.o){e.C(4);break}return u(e,b.o.stop(),4);case 4:if(!b.f){e.C(6);
451
+ break}return u(e,b.f.destroy(),7);case 7:b.f=null;case 6:b.v&&(b.v.release(),b.v=null);if(!b.F){e.C(8);break}return u(e,b.F.destroy(),9);case 9:b.F=null;case 8:c.B&&c.B.src&&(c.B.removeAttribute("src"),c.B.load());if(!b.g){e.C(10);break}return u(e,b.g.destroy(),11);case 11:b.g=null;case 10:b.W.a.clear(),b.Vb=null,b.K=null,b.sc.clear(),b.c=null,b.w=null,b.Yc=null,b.zb=!0,Al(b),v(e)}})})}
452
+ function jl(b,c){return t(function e(){var f,g,h,k;return y(e,function(e){switch(e.s){case 1:return f=window.muxjs?new Ed:new Fd,g=b.b.textDisplayFactory,h=new g,b.Yc=g,k=new qe(c.B,f,h),u(e,k.v,2);case 2:b.F=k,v(e)}})})}
453
+ function kl(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.s){case 1:c.Pa=d.Pa;c.mimeType=d.mimeType;c.uri=d.uri;g=c.uri;h=b.H;b.Vb=g;if(c.Pa){b.u=c.Pa();f.C(2);break}k=b;return u(f,T.create(g,h,b.b.manifest.retryParameters,c.mimeType),3);case 3:k.u=f.A;case 2:b.u.configure(b.b.manifest),v(f)}})})}
454
+ function ll(b,c){var d=c.uri,e=b.H;b.nc=new Qi;Ri(b.nc,function(c){Bl(b,"timelineregionadded",c)});var f={networkingEngine:e,filterNewPeriod:function(c){return b.$c(c)},filterAllPeriods:function(c){return Cl(b,c)},onTimelineRegionAdded:function(c){var d=b.nc;a:{var e=r(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:function(c){return b.dispatchEvent(c)},onError:function(c){return b.cb(c)}};
455
+ return new K(Promise.resolve().then(function(){return t(function h(){var c;return y(h,function(e){switch(e.s){case 1:return c=b,u(e,b.u.start(d,f),2);case 2:c.c=e.A;b.dispatchEvent(new A("manifestparsed"));if(0==b.c.periods.length)throw new I(2,4,4014);Dl(b.c.periods);v(e)}})})}),function(){return b.u.stop()})}
456
+ function ml(b){return t(function d(){return y(d,function(d){switch(d.s){case 1:return b.g=new Xc({Jb:b.H,onError:function(d){b.cb(d)},Ic:function(d){El(b,d)},onExpirationUpdated:function(d,e){Fl(b,d,e)},onEvent:function(d){b.dispatchEvent(d)}}),b.g.configure(b.b.drm),u(d,dd(b.g,wi(b.c.periods),b.c.offlineSessionIds),2);case 2:Cl(b,b.c.periods),v(d)}})})}
457
+ function nl(b,c,d){return t(function f(){var g,h,k,l,m,n,q,w,x;return y(f,function(f){switch(f.s){case 1:return c.startTime=d.startTime,g=c.B,h=c.uri,b.Vb=h,b.w=new dl,k=function(){return Gl(b)},l=function(){var c=b.a.playbackRate;0!=c&&b.V.set(c)},b.l.m(g,"playing",k),b.l.m(g,"pause",k),b.l.m(g,"ended",k),b.l.m(g,"ratechange",l),m=b.b.abrFactory,b.o&&b.Tc==m||(b.Tc=m,b.o=new m,b.o.configure(b.b.abr)),Hl(b,b.c.periods),b.qc=new ii(b.b.preferredAudioLanguage,b.b.preferredVariantRole,b.b.preferredAudioChannelCount),
458
+ b.ba=b.b.preferredTextLanguage,Il(b.c.presentationTimeline,b.b.playRangeStart,b.b.playRangeEnd),u(f,b.g.Wb(g),2);case 2:return b.o.init(function(c,d,f){d=void 0===d?!1:d;f=void 0===f?0:f;a:{var g=r(b.c.periods);for(var h=g.next();!h.done;h=g.next())if(h=h.value,h.variants.includes(c)){g=h;break a}g=null}Jl(b,g,c,!0);b.f&&(jj(b.f,c,d,f),Kl(b))}),b.v=Ll(b,c.startTime),b.Fa=Ml(b),b.V=new Ai({Cc:function(){return c.B.playbackRate},Jd:function(b){c.B.playbackRate=b},se:function(b){c.B.currentTime+=b}}),
459
+ n=Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),Nl(b,n),b.f=Ol(b),b.f.configure(b.b.streaming),Pl(b),b.j=Ql,b.dispatchEvent(new A("streaming")),u(f,b.f.start(),3);case 3:b.b.streaming.startAtSegmentBoundary&&(q=b.v.j(),w=Rl(b,q),b.v.u(w)),b.c.periods.forEach(b.$c.bind(b)),Sl(b),Kl(b),x=Tl(b)||b.c.periods[0],x.variants.some(function(b){return b.primary}),Ul(b,x.variants),b.l.ra(g,"loadeddata",function(){b.w.b=Date.now()/1E3-d.Od}),v(f)}})})}
460
+ function ol(b,c){return t(function e(){var f,g;return y(e,function(e){switch(e.s){case 1:return f=Nd,b.g=new Xc({Jb:b.H,onError:function(c){b.cb(c)},Ic:function(c){El(b,c)},onExpirationUpdated:function(c,e){Fl(b,c,e)},onEvent:function(c){b.dispatchEvent(c)}}),b.g.configure(b.b.drm),g={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,
461
+ presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:f.fb,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},u(e,dd(b.g,[g],[]),2);case 2:return u(e,b.g.Wb(c.B),0)}})})}
462
+ function pl(b,c,d){function e(){return Gl(b)}c.uri=d.uri;c.startTime=d.startTime;b.Vb=c.uri;b.w=new dl;b.v=new Ji(c.B);null!=c.startTime&&b.v.u(c.startTime);b.V=new Ai({Cc:function(){return c.B.playbackRate},Jd:function(b){c.B.playbackRate=b},se:function(b){c.B.currentTime+=b}});Nl(b,b.b.streaming.rebufferingGoal);b.l.m(c.B,"playing",e);b.l.m(c.B,"pause",e);b.l.m(c.B,"ended",e);b.l.ra(c.B,"loadeddata",function(){b.w.b=Date.now()/1E3-d.Od});b.a.audioTracks&&(b.l.m(b.a.audioTracks,"addtrack",function(){return Sl(b)}),
463
+ b.l.m(b.a.audioTracks,"removetrack",function(){return Sl(b)}));if(b.a.textTracks){var f=b.a.textTracks;b.l.m(f,"addtrack",function(){return Sl(b)});b.l.m(f,"removetrack",function(){return Sl(b)})}c.B.src=c.uri;b.j=Vl;b.dispatchEvent(new A("streaming"));var g=new J;b.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?g.resolve():b.a.error?g.reject(zl(b)):(b.l.ra(b.a,"loadeddata",function(){g.resolve()}),b.l.ra(b.a,"error",function(){g.reject(zl(b))}));return new K(g,function(){g.reject(new I(2,7,7001));
464
+ return Promise.resolve()})}function Dl(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.some(function(b){return b.variants.some(c)})&&b.forEach(function(b){b.variants=b.variants.filter(c)})}
465
+ function Pl(b){function c(b){var c="";b.video&&(c=Dc(b.video.codecs)[0]);var d="";b.audio&&(d=Dc(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=Qe(d,b.b.preferredAudioChannelCount);var e=new bb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h<g&&(f=b,g=h)});b.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
466
+ f?!0:!1})})}function gl(b){return new L(function(c,d){b.o&&b.o.segmentDownloaded(c,d)})}function Ll(b,c){return new Ki(b.a,b.c,b.b.streaming,c,function(){b.Fa&&vi(b.Fa,!0);b.f&&pj(b.f)},function(c){return b.dispatchEvent(c)})}
467
+ function Ml(b){var c=new yi(b.c);zi(c,function(){Sl(b)});var d=new Si(b.nc);Wi(d,function(c){Bl(b,"timelineregionenter",c)},function(c){Bl(b,"timelineregionexit",c)},function(c,d){d||(Bl(b,"timelineregionenter",c),Bl(b,"timelineregionexit",c))});var e=new ui(b.a);e.a.add(c);e.a.add(d);return e}
468
+ function Nl(b,c){b.K=new li(c,Math.min(.5,c/2));b.K.a=ni;Al(b);b.pc=(new F(function(){switch(b.j){case Vl:var c=b.a.ended?!0:Gd(b.a.buffered)>=b.a.duration-.1;break;case Ql:a:if(b.a.ended||ue(b.F))c=!0;else{if(b.c.presentationTimeline.U()){var e=b.c.presentationTimeline.Eb();if(Gd(b.a.buffered)>=e){c=!0;break a}}c=!1}break;default:c=!1}var f=Id(b.a.buffered,b.a.currentTime);e=b.K;var g=c,h=e.b.get(e.a);c=e.a;f=g||f>=h?mi:ni;e.a=f;c!=f&&Al(b)})).Na(.25)}
469
+ function Ol(b){return new Xi(b.c,{kb:function(){return b.v.j()},getBandwidthEstimate:function(){return b.o.getBandwidthEstimate()},N:b.F,Jb:b.H,ye:b.ig.bind(b),xe:b.tf.bind(b),onError:b.cb.bind(b),onEvent:function(c){return b.dispatchEvent(c)},ng:b.og.bind(b),wd:b.xg.bind(b)})}V.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Uk(b,c));var d=Yk(this.b,b,fl(this));Wl(this);return d};V.prototype.configure=V.prototype.configure;
470
+ function Wl(b){b.u&&b.u.configure(b.b.manifest);b.g&&b.g.configure(b.b.drm);if(b.f){b.f.configure(b.b.streaming);try{b.c.periods.forEach(b.$c.bind(b))}catch(g){b.cb(g)}var c=aj(b.f),d=cj(b.f),e=Tl(b);c=Te(c,d,e.variants);b.o&&c&&c.allowedByApplication&&c.allowedByKeySystem?Ul(b,e.variants):Xl(b,e)}if(b.F&&(e=b.b.textDisplayFactory,b.Yc!=e)){c=new e;d=b.F;var f=d.g;d.g=c;f&&(c.setTextVisibility(f.isTextVisible()),f.destroy());d.a&&(d.a.c=c);b.Yc=e;b.f&&(e=b.f,(c=e.b.get("text"))&&ij(e,c.stream,!0,
471
+ 0,!0))}b.o&&(b.o.configure(b.b.abr),b.b.abr.enabled&&!b.zb?b.o.enable():b.o.disable(),Yl(b))}V.prototype.getConfiguration=function(){var b=fl(this);Yk(b,this.b,fl(this));return b};V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.Pg=function(){for(var b in this.b)delete this.b[b];Yk(this.b,fl(this),fl(this));Wl(this)};V.prototype.resetConfiguration=V.prototype.Pg;V.prototype.Kf=function(){return this.j};V.prototype.getLoadMode=V.prototype.Kf;V.prototype.Rf=function(){return this.a};
472
+ V.prototype.getMediaElement=V.prototype.Rf;V.prototype.Zb=function(){return this.H};V.prototype.getNetworkingEngine=V.prototype.Zb;V.prototype.zc=function(){return this.Vb};V.prototype.getAssetUri=V.prototype.zc;V.prototype.Qf=function(){Xe("getManifestUri",'Please use "getAssetUri" instead.');return this.zc()};V.prototype.getManifestUri=V.prototype.Qf;V.prototype.U=function(){return this.c?this.c.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};V.prototype.isLive=V.prototype.U;
473
+ V.prototype.pb=function(){return this.c?this.c.presentationTimeline.pb():!1};V.prototype.isInProgress=V.prototype.pb;V.prototype.pe=function(){if(this.c){if(!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};V.prototype.isAudioOnly=V.prototype.pe;
474
+ V.prototype.Tb=function(){if(this.c){var b=this.c.presentationTimeline;return{start:b.Db(),end:b.Qa()}}return this.a&&this.a.src&&(b=this.a.seekable,b.length)?{start:b.start(0),end:b.end(b.length-1)}:{start:0,end:0}};V.prototype.seekRange=V.prototype.Tb;V.prototype.keySystem=function(){return this.g?this.g.keySystem():""};V.prototype.keySystem=V.prototype.keySystem;V.prototype.drmInfo=function(){return this.g?this.g.a:null};V.prototype.drmInfo=V.prototype.drmInfo;
475
+ V.prototype.Bc=function(){return this.g?this.g.Bc():Infinity};V.prototype.getExpiration=V.prototype.Bc;V.prototype.Gb=function(){return this.K?this.K.a==ni:!1};V.prototype.isBuffering=V.prototype.Gb;V.prototype.ed=function(){if(this.V){var b=this.V;b=b.f?0:b.c}else b=0;return b};V.prototype.getPlaybackRate=V.prototype.ed;V.prototype.Sd=function(b){0==b?Za("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.V.set(b),this.j==Ql&&hj(this.f,1<Math.abs(b)))};
476
+ V.prototype.trickPlay=V.prototype.Sd;V.prototype.Yd=function(){this.j==Vl&&this.V.set(1);this.j==Ql&&(this.V.set(1),hj(this.f,!1))};V.prototype.cancelTrickPlay=V.prototype.Yd;
477
+ V.prototype.Fb=function(){if(this.c&&this.v){for(var b=Zl(this),c=[],d=r($l(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=Je(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(b){var c=Ne(b);c.active=b.enabled;c.type="variant";c.originalAudioId=b.id;"main"==b.kind?(c.primary=!0,c.roles=["main"],c.audioRoles=["main"]):c.audioRoles=[];return c}):[]};V.prototype.getVariantTracks=V.prototype.Fb;
478
+ V.prototype.Xa=function(){if(this.c&&this.v){for(var b=am(this),c=[],d=r(bm(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=Ke(e);f.active=e==b;c.push(f)}return c}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map(function(b){var c=Ne(b);c.active="disabled"!=b.mode;c.type="text";c.originalTextId=b.id;"captions"==b.kind&&(c.mimeType="application/cea-608");return c}):[]};V.prototype.getTextTracks=V.prototype.Xa;
479
+ V.prototype.Fd=function(b){if(this.c&&this.f){var c=Tl(this),d=c.textStreams.find(function(c){return c.id==b.id});d&&(cm(this,c,d,!1),dm(this,d),this.ba=d.language)}else if(this.a&&this.a.src&&this.a.textTracks){c=Array.from(this.a.textTracks);c=r(c);for(d=c.next();!d.done;d=c.next())d=d.value,Le(d)==b.id?d.mode=this.xb?"showing":"hidden":d.mode="disabled";em(this)}};V.prototype.selectTextTrack=V.prototype.Fd;
480
+ V.prototype.Sg=function(){Xe("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.Xa().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.Fd(b[0])};V.prototype.selectEmbeddedTextTrack=V.prototype.Sg;
481
+ V.prototype.jh=function(){Xe("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.Xa().filter(function(b){return b.active})[0];return b?"application/cea-608"==b.mimeType:!1};V.prototype.usingEmbeddedTextTrack=V.prototype.jh;
482
+ V.prototype.Te=function(b,c,d){d=void 0===d?0:d;if(this.c&&this.f){var e=Tl(this);this.b.abr.enabled&&Za("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var f=e.variants.find(function(c){return c.id==b.id});f&&Oe(f)&&(Jl(this,e,f,!1),fm(this,f,c,d),this.qc=new hi(f),Ul(this,e.variants))}else if(this.a&&this.a.audioTracks){c=Array.from(this.a.audioTracks);c=r(c);for(d=c.next();!d.done;d=
483
+ c.next())d=d.value,Le(d)==b.id&&(d.enabled=!0);gm(this)}};V.prototype.selectVariantTrack=V.prototype.Te;V.prototype.Bf=function(){return hm(this.Fb())};V.prototype.getAudioLanguagesAndRoles=V.prototype.Bf;V.prototype.ke=function(){return hm(this.Xa())};V.prototype.getTextLanguagesAndRoles=V.prototype.ke;V.prototype.ie=function(){return Array.from(im(this.Fb()))};V.prototype.getAudioLanguages=V.prototype.ie;V.prototype.Yf=function(){return Array.from(im(this.Xa()))};V.prototype.getTextLanguages=V.prototype.Yf;
484
+ V.prototype.Re=function(b,c){if(this.c&&this.v){var d=Tl(this);this.qc=new ii(b,c||"",0);Xl(this,d)}else if(this.a&&this.a.audioTracks){d=Array.from(this.a.audioTracks);d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.language==b&&(e.enabled=!0);gm(this)}};V.prototype.selectAudioLanguage=V.prototype.Re;
485
+ V.prototype.Se=function(b,c){if(this.c&&this.v){var d=Tl(this);this.ba=b;this.Da=c||"";var e=Re(d.textStreams,this.ba,this.Da)[0]||null;e&&(cm(this,d,e,!1),(this.b.streaming.alwaysStreamText||this.Za())&&dm(this,e))}else(d=this.Xa().filter(function(c){return c.language==b})[0])&&this.Fd(d)};V.prototype.selectTextLanguage=V.prototype.Se;
486
+ V.prototype.Za=function(){var b=this.xb;return this.c?this.F.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some(function(b){return"showing"==b.mode}):b};V.prototype.isTextTrackVisible=V.prototype.Za;
487
+ V.prototype.Md=function(b){var c=this;return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.s){case 1:f=c.xb;g=b;if(f==g)return e["return"]();c.xb=g;if(c.j!=Ql){if(c.a&&c.a.src&&c.a.textTracks){h=Array.from(c.a.textTracks);for(var n=r(h),w=n.next();!w.done;w=n.next())k=w.value,"disabled"!=k.mode&&(k.mode=b?"showing":"hidden")}e.C(2);break}c.F.g.setTextVisibility(b);if(c.b.streaming.alwaysStreamText){e.C(2);break}if(!b){n=c.f;n.F=!0;if(w=n.b.get("text"))Yi(w),n.b["delete"]("text");
488
+ e.C(2);break}l=Tl(c);m=Re(l.textStreams,c.ba,c.Da);if(!(0<m.length)){e.C(2);break}return u(e,dj(c.f,m[0]),2);case 2:jm(c),v(e)}})})};V.prototype.setTextTrackVisibility=V.prototype.Md;V.prototype.Uf=function(){if(!this.U())return null;if(this.c)return new Date(1E3*(this.c.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:new Date(b.getTime()+1E3*this.a.currentTime)}return null};V.prototype.getPlayheadTimeAsDate=V.prototype.Uf;
489
+ V.prototype.Wf=function(){if(!this.U())return null;if(this.c)return new Date(1E3*this.c.presentationTimeline.f);if(this.a&&this.a.getStartDate){var b=this.a.getStartDate();return isNaN(b.getTime())?null:b}return null};V.prototype.getPresentationStartTimeAsDate=V.prototype.Wf;V.prototype.cd=function(){var b={total:[],audio:[],video:[],text:[]};this.j==Vl&&(b.total=Jd(this.a.buffered));this.j==Ql&&this.F.cd(b);return b};V.prototype.getBufferedInfo=V.prototype.cd;
490
+ V.prototype.getStats=function(){if(this.j!=Ql&&this.j!=Vl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};Gl(this);var b=this.a;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.w,d=Number(b.totalVideoFrames);c.l=Number(b.droppedVideoFrames);c.j=d}if(this.j==Ql){if(b=Zl(this))this.w.o=b.bandwidth;b&&b.video&&(c=this.w,d=b.video.height||
491
+ NaN,c.u=b.video.width||NaN,c.g=d);b=this.o.getBandwidthEstimate();this.w.f=b}var e=this.w;b=e.u;c=e.g;d=e.o;var f=e.j,g=e.l,h=e.f,k=e.b,l=al(e.a,"playing"),m=al(e.a,"paused"),n=al(e.a,"buffering"),q=bl(e.a),w=[];e=r(e.c.a);for(var x=e.next();!x.done;x=e.next())x=x.value,w.push({timestamp:x.timestamp,id:x.id,type:x.type,fromAdaptation:x.fromAdaptation,bandwidth:x.bandwidth});return{width:b,height:c,streamBandwidth:d,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,pauseTime:m,
492
+ bufferingTime:n,stateHistory:q,switchHistory:w}};V.prototype.getStats=V.prototype.getStats;
493
+ V.prototype.addTextTrack=function(b,c,d,e,f,g){var h=this;return t(function l(){var m,n,q,w,x,C,E,G,H;return y(l,function(l){switch(l.s){case 1:if(h.j==Vl)throw Error("State error!");if(h.j!=Ql)throw Error("State error!");m=Tl(h);n=Nd;q=h.c.periods.indexOf(m);w=q+1;x=w>=h.c.periods.length?h.c.presentationTimeline.ia():h.c.periods[w].startTime;C=x-m.startTime;if(Infinity==C)throw new I(1,4,4033);E=new S(1,0,C,function(){return[b]},0,null);G={id:h.Le++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),
494
+ findSegmentPosition:function(){return 1},getSegmentReference:function(b){return 1==b?E:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:n.Ga,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};h.sc.add(G);m.textStreams.push(G);return u(l,dj(h.f,G),2);case 2:return(H=bj(h.f,"text"))&&ai(h.W,m,H),h.sc["delete"](G),Xl(h,m),Sl(h),l["return"](Ke(G))}})})};
495
+ V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.Id=function(b,c){this.tc.width=b;this.tc.height=c};V.prototype.setMaxHardwareResolution=V.prototype.Id;V.prototype.Ed=function(){if(this.j==Ql){var b=this.f;if(b.f)b=!1;else if(b.u)b=!1;else{for(var c=r(b.b.values()),d=c.next();!d.done;d=c.next())d=d.value,d.cc&&(d.cc=!1,gj(b,d,.1));b=!0}}else b=!1;return b};V.prototype.retryStreaming=V.prototype.Ed;V.prototype.Of=function(){return this.c};V.prototype.getManifest=V.prototype.Of;
496
+ V.prototype.Pf=function(){return this.u?this.u.constructor:null};V.prototype.getManifestParserFactory=V.prototype.Pf;function Jl(b,c,d,e){bi(b.W,c).variant=d;b=b.w.c;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}function cm(b,c,d,e){ai(b.W,c,d);b=b.w.c;b.b!=d&&(b.b=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"text",fromAdaptation:e,bandwidth:null}))}
497
+ function fl(b){var c=Wk();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.Ed())};c.textDisplayFactory=function(){return new Qk(b.a)};return c}
498
+ function Hl(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=r(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=r(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.Le++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
495
499
  codecs:"",kind:"caption",encrypted:!1,keyId:null,language:h.closedCaptions.get(l),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:h.roles,channelsCount:null,closedCaptions:null};f.set(l,m)}}f=r(f.values());for(g=f.next();!g.done;g=f.next())e.textStreams.push(g.value)}}
496
- function yl(b,c){var d=b.f?Yi(b.f):null,e=b.f?$i(b.f):null;c.forEach(Fe.bind(null,b.g,d,e));d=dc(c,function(b){return b.variants.some(Me)});if(0==d)throw new G(2,4,4032);if(d<c.length)throw new G(2,4,4011);c.forEach(function(b){Ee(b.variants,this.b.restrictions,this.tc)&&this.f&&Pl(this)==b&&Ol(this);gm(this,b.variants)}.bind(b))}p=U.prototype;
497
- p.Zc=function(b){var c=this.f?Yi(this.f):null,d=this.f?$i(this.f):null;Fe(this.g,c,d,b);c=b.variants;if(!c.some(Me))throw new G(2,4,4011);gm(this,b.variants);Ee(c,this.b.restrictions,this.tc)&&this.f&&Pl(this)==b&&Ol(this);if(b=this.g?this.g.a:null)for(c=r(c),d=c.next();!d.done;d=c.next()){d=r(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=r(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,md(this.g,f.initDataType,f.initData)}}};
498
- function bm(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.zb?(b.qa=c,b.se=d,b.re=e):(gj(b.f,c,d,e),cm(b))}function $l(b,c){b.zb?b.ea=c:(fj(b.f,c,!0,0,!1),am(b))}function Nl(b,c){function d(b,c){if(!b)return null;var d=b.findSegmentPosition(c-g.startTime);return null==d?null:(d=b.getSegmentReference(d))?d.startTime+g.startTime:null}var e=Yi(b.f),f=$i(b.f),g=Pl(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
499
- function wl(b){var c=b.Gb();if(b.w&&b.K&&b.v){var d=b.U;d.f=c;yi(d);Cl(b)}b.dispatchEvent(new B("buffering",{buffering:c}))}function Cl(b){if(b.w&&b.K){var c=b.w.a;b.K.a==ki?Wk(c,"buffering"):b.a.paused?Wk(c,"paused"):b.a.ended?Wk(c,"ended"):Wk(c,"playing")}}function Ql(b,c){try{gm(b,c)}catch(e){return b.cb(e),null}var d=c.filter(function(b){return Me(b)});d=b.qc.create(d);b.o.setVariants(Array.from(d.values()));return b.o.chooseVariant()}
500
- function Tl(b,c){var d=Ql(b,c.variants);d&&(Fl(b,c,d,!0),bm(b,d,!0));(d=Pe(c.textStreams,b.ba,b.Da)[0]||null)&&(b.b.streaming.alwaysStreamText||b.Za())&&(Zl(b,c,d,!0),$l(b,d));Gl(b)}
501
- p.gg=function(b){try{this.zb=!0;this.o.disable();Ul(this);var c=Ql(this,b.variants),d=Pe(b.textStreams,this.ba,this.Da)[0]||null;this.qa&&(b.variants.includes(this.qa)&&(c=this.qa),this.qa=null);this.ea&&(b.textStreams.includes(this.ea)&&(d=this.ea),this.ea=null);c&&Fl(this,b,c,!0);d&&Zl(this,b,d,!0);var e=this.f,f=e.b.get("video");if(f)var g=e.c.periods[f.Ca];else{var h=e.b.get("audio");g=h?e.c.periods[h.Ca]:null}var k=c?c.audio:null;if(!g&&d){var l;if(l=k){b=d;var m=C(this.b.preferredTextLanguage),
502
- n=C(k.language),q=C(b.language);l=hb(q,m)&&!hb(n,q)}l&&(this.xb=!0);this.xb&&this.F.g.setTextVisibility(!0);fm(this)}return this.b.streaming.alwaysStreamText||this.Za()?{variant:c,text:d}:{variant:c,text:null}}catch(x){return this.cb(x),{variant:null,text:null}}};p.rf=function(){this.zb=!1;this.b.abr.enabled&&(this.o.enable(),Ul(this));this.qa&&(gj(this.f,this.qa,this.se,this.re),cm(this),this.qa=null);this.ea&&(fj(this.f,this.ea,!0,0,!1),am(this),this.ea=null)};
503
- p.mg=function(){this.u&&this.u.update&&this.u.update()};p.vg=function(){this.v&&this.v.v()};function Gl(b){hm(b,new B("adaptation"))}function Ol(b){hm(b,new B("trackschanged"))}function cm(b){hm(b,new B("variantchanged"))}function am(b){hm(b,new B("textchanged"))}function fm(b){hm(b,new B("texttrackvisibility"))}function Ul(b){hm(b,new B("abrstatuschanged",{fg:b.b.abr.enabled}))}p.cb=function(b){if(this.j!=nl){var c=new B("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};
504
- function xl(b,c,d){b.dispatchEvent(new B(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}function vl(b){if(!b.a.error)return null;var c=b.a.error.code;if(1==c)return null;var d=b.a.error.msExtendedCode;d&&(0>d&&(d+=Math.pow(2,32)),d=d.toString(16));return new G(2,3,3016,c,d,b.a.error.message)}
505
- function Al(b,c){if(b.f){var d=Pl(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){Se(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!pl.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Yi(b.f);var h=$i(b.f);(f=Re(f,h,d.variants))&&!f.allowedByKeySystem&&Tl(b,d);e&&(Ol(b),Ql(b,d.variants))}}
506
- function Bl(b,c,d){if(b.u&&b.u.onExpirationUpdated)b.u.onExpirationUpdated(c,d);b.dispatchEvent(new B("expirationupdated"))}function El(b,c,d){0<c&&(b.V()||b.We(c));d<b.ia()&&(b.V()||b.Ma(d))}
507
- function gm(b,c){var d=b.g?wc(b.g.L):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=r(c),m=l.next();!m.done;m=l.next()){m=m.value;var n=[];m.audio&&n.push(m.audio);m.video&&n.push(m.video);n=r(n);for(var q=n.next();!q.done;q=n.next())if(q=q.value,q.keyId){var x=d[e?"00":q.keyId];x?pl.includes(x)&&(k.includes(x)||k.push(x)):h.includes(q.keyId)||h.push(q.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new G(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
508
- restrictedKeyStatuses:k});}function hm(b,c){t(function e(){return y(e,function(e){switch(e.s){case 1:return u(e,Promise.resolve(),2);case 2:b.j!=nl&&b.dispatchEvent(c),v(e)}})})}function em(b){var c=new Set;b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.language?c.add(C(d.language)):c.add("und");return c}
509
- function dm(b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d="und";var f=[];e.language&&(d=C(e.language));"variant"==e.type?f=e.audioRoles:f=e.roles;f&&f.length||(f=[""]);c.has(d)||c.set(d,new Set);e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,c.get(d).add(f)}var g=[];c.forEach(function(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())g.push({language:c,role:e.value})});return g}
510
- function Wl(b){b=Pl(b);return null==b?[]:b.variants.filter(function(b){return Me(b)})}function Yl(b){var c=Pl(b);return null==c?[]:c.textStreams.filter(function(c){return!b.sc.has(c)})}function Pl(b){var c=b.v.j(),d=null;b=r(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function Vl(b){var c=Pl(b);return Zh(b.W,c).variant}
511
- function Xl(b){var c=Pl(b);if(null==c)return null;if(!Zh(b.W,c).text){var d=Pe(c.textStreams,b.ba,b.Da);d.length&&Yh(b.W,c,d[0])}return Zh(b.W,c).text}function sl(){return new G(2,7,7E3)}function ml(b,c,d,e,f,g){return e==b&&f.B==g.B&&f.uri==g.uri&&f.mimeType==g.mimeType&&f.Qa==g.Qa?c:d}function Hk(){return{Qa:null,B:null,mimeType:null,startTime:null,Md:null,uri:null}}
512
- function tl(b){return new Promise(function(c,d){b.qb=function(){return d(sl())};b.Gc=function(){return c()};b.onError=function(b){return d(b)};b.Ic=function(){return d(sl())}})}var nl=0,al=1,Ml=2,Rl=3;U.LoadMode={DESTROYED:nl,NOT_LOADED:al,MEDIA_SOURCE:Ml,SRC_EQUALS:Rl};function im(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.ia();c=jm(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function km(b,c){var d=wk(new uk(b.Ka(),b.ma()),c.periods[0],new T(null,0)),e=c.appMetadata||{};d=jm(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
513
- function jm(b){var c=[],d=Ne(b.variants);d=r(d);for(var e=d.next();!e.done;e=d.next())c.push(He(e.value));b=r(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(Ie(d.value));return c};function lm(){this.a={}}function mm(b,c,d){d=d.endTime-d.startTime;return nm(b,c)*d}function nm(b,c){var d=b.a[c];null==d&&(d=0);return d};function om(b){this.a=!1;this.b=new I;this.c=b}om.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function pm(b,c){for(var d={width:Infinity,height:Infinity},e=r(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return De(b,c,d)})}function qm(b){b=r(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&re(b.audio));b.video&&(c=c&&re(b.video));return c})}
514
- function rm(b,c){for(var d=r(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return Ad(c,b)})}function sm(b){var c=new tm;b.periods.forEach(function(b,d){var e=um(b.variants);if(0==d){e=r(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else vm(c,e)});b=r(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return c.contains(new wm(b))})}
515
- function xm(b,c){var d=new tm;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return d.contains(new wm(b))}));c(b);d=um(b.variants)})}function wm(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function tm(){this.a=[]}tm.prototype.add=function(b){this.contains(b)||this.a.push(b)};function vm(b,c){b.a=b.a.filter(function(b){return c.contains(b)})}
516
- tm.prototype.contains=function(b){return this.a.some(function(c){return b.b==c.b&&b.a==c.a&&b.f==c.f&&b.c==c.c})};function um(b){var c=new tm;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(new wm(d.value));return c};function V(b){var c=this;if(b&&b.constructor!=U)throw new G(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.Zb()):(this.a=Sk(),this.b=new K);this.f=!1;this.c=[];this.g=[];var d=!b;this.j=new om(function(){return t(function f(){var b;return y(f,function(f){switch(f.s){case 1:return b=function(){},u(f,Promise.all(c.g.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.C(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,v(f)}})})})}z("shaka.offline.Storage",V);
517
- function ym(){if(Bc())a:{var b=r(Uj.values());for(var c=b.next();!c.done;c=b.next())if(c=c.value,c=c()){c.destroy();b=!0;break a}b=!1}else b=!1;return b}V.support=ym;V.prototype.destroy=function(){return this.j.destroy()};V.prototype.destroy=V.prototype.destroy;
518
- V.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Qk(b,c));var d=b,e=!1;null!=d.trackSelectionCallback&&(e=!0,d.offline=d.offline||{},d.offline.trackSelectionCallback=d.trackSelectionCallback,delete d.trackSelectionCallback);null!=d.progressCallback&&(e=!0,d.offline=d.offline||{},d.offline.progressCallback=d.progressCallback,delete d.progressCallback);null!=d.usePersistentLicense&&(e=!0,d.offline=d.offline||{},d.offline.usePersistentLicense=d.usePersistentLicense,delete d.usePersistentLicense);
519
- e&&Ve("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return Uk(this.a,b)};V.prototype.configure=V.prototype.configure;V.prototype.getConfiguration=function(){var b=Sk();Uk(b,this.a,Sk());return b};V.prototype.getConfiguration=V.prototype.getConfiguration;V.prototype.Zb=function(){return this.b};V.prototype.getNetworkingEngine=V.prototype.Zb;
520
- V.prototype.store=function(b,c,d){var e=this;return zm(this,Am(this,b,c||{},function(){return t(function g(){var c,k;return y(g,function(g){switch(g.s){case 1:return d&&"string"!=typeof d?(Ve("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,S.create(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.A,g["return"](k)}})})}))};V.prototype.store=V.prototype.store;V.prototype.Vf=function(){return this.f};
521
- V.prototype.getStoreInProgress=V.prototype.Vf;
522
- function Am(b,c,d,e){return t(function g(){var h,k,l,m,n,q,x,w,A,D;return y(g,function(g){switch(g.s){case 1:Bm();if(b.f)return g["return"](Promise.reject(new G(2,9,9006)));b.f=!0;return u(g,Cm(b,c,e),2);case 2:h=g.A;Dm(b);k=!h.presentationTimeline.V()&&!h.presentationTimeline.pb();if(!k)throw new G(2,9,9005,c);l=null;m=new Tj;q=n=null;za(g,3,4);return u(g,Em(b,h,function(b){q=q||b}),6);case 6:l=g.A;Dm(b);if(q)throw q;Fm(b,h,l);return u(g,m.init(),7);case 7:return Dm(b),u(g,Vj(m),8);case 8:return n=
523
- g.A,Dm(b),u(g,Gm(b,n.ma,l,h,c,d),9);case 9:x=g.A;Dm(b);if(q)throw q;return u(g,n.ma.addManifests([x]),10);case 10:return w=g.A,Dm(b),A=new sk("manifest",n.path.Ka,n.path.ma,w[0]),g["return"](km(A,x));case 4:return Fa(g),b.f=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.C(12);break}return u(g,l.destroy(),12);case 12:Ga(g,0);break;case 3:D=Ca(g);if(!n){g.C(14);break}return u(g,n.ma.removeSegments(b.c,function(){}),14);case 14:throw q||D;}})})}
524
- function Fm(b,c,d){pm(c,b.a.restrictions);qm(c);rm(c,d);sm(c);xm(c,function(c){for(var d=[],e=r(c.variants),h=e.next();!h.done;h=e.next())d.push(He(h.value));e=r(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(Ie(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
525
- Hm(c)}function Gm(b,c,d,e,f,g){return t(function k(){var l,m,n,q;return y(k,function(k){switch(k.s){case 1:return l=im(f,e,g),m=new Ij(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),Aa(k,2),q=n=Im(b,m,c,d,e,f,g),u(k,Lj(m),4);case 4:return q.size=k.A,k["return"](n);case 2:return Fa(k),u(k,m.destroy(),5);case 5:Ga(k,0)}})})}V.prototype.remove=function(b){return zm(this,Jm(this,b))};V.prototype.remove=V.prototype.remove;
526
- function Jm(b,c){return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.s){case 1:Bm();f=tk(c);if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new G(2,9,9004,c)));g=f;h=new Tj;Aa(e,2);return u(e,h.init(),4);case 4:return u(e,Xj(h,g.Ka(),g.ma()),5);case 5:return k=e.A,u(e,k.getManifests([g.key()]),6);case 6:return l=e.A,m=l[0],u(e,Promise.all([Km(b,m,h),Lm(b,k,g,m)]),2);case 2:return Fa(e),u(e,h.destroy(),8);case 8:Ga(e,0)}})})}
527
- function Mm(b,c){for(var d=[],e=r(b.periods),f=e.next();!f.done;f=e.next()){f=r(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:xc(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:xc(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function Km(b,c,d){return t(function f(){return y(f,function(f){switch(f.s){case 1:return u(f,Nm(b.b,b.a.drm,d,c),0)}})})}
528
- function Lm(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Om(e),h=g.length+1,k=0,l=km(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}V.prototype.Kg=function(){return zm(this,Pm(this))};V.prototype.removeEmeSessions=V.prototype.Kg;
529
- function Pm(b){return t(function d(){var e,f,g,h,k,l,m,n,q;return y(d,function(d){switch(d.s){case 1:return Bm(),e=b.b,f=b.a.drm,g=new Tj,h=!1,Aa(d,2),u(d,g.init(),4);case 4:k=[];Yj(g,function(b){return k.push(b)});l=Promise.resolve();m={};n=r(k);for(q=n.next();!q.done;m={Oc:m.Oc},q=n.next())m.Oc=q.value,l=l.then(function(b){return function(){return t(function D(){var d,g;return y(D,function(k){switch(k.s){case 1:return u(k,b.Oc.getAll(),2);case 2:return d=k.A,u(k,Dk(f,e,d),3);case 3:return g=k.A,
530
- u(k,b.Oc.remove(g),4);case 4:g.length!=d.length&&(h=!0),v(k)}})})}}(m));return u(d,l,2);case 2:return Fa(d),u(d,g.destroy(),6);case 6:Ga(d,3);break;case 3:return d["return"](!h)}})})}V.prototype.list=function(){return zm(this,Qm())};V.prototype.list=V.prototype.list;
531
- function Qm(){return t(function c(){var d,e,f;return y(c,function(c){switch(c.s){case 1:return Bm(),d=[],e=new Tj,Aa(c,2),u(c,e.init(),4);case 4:return f=Promise.resolve(),Wj(e,function(c,e){f=f.then(function(){return t(function m(){var f;return y(m,function(g){switch(g.s){case 1:return u(g,e.getAllManifests(),2);case 2:f=g.A,f.forEach(function(e,f){var g=km(new sk("manifest",c.Ka,c.ma,f),e);d.push(g)}),v(g)}})})})}),u(c,f,2);case 2:return Fa(c),u(c,e.destroy(),6);case 6:Ga(c,3);break;case 3:return c["return"](d)}})})}
532
- function Cm(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.s){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.A,l.configure(b.a.manifest),Dm(b),Aa(f,3),u(f,l.start(c,k),5);case 5:return m=f.A,Dm(b),n=Rm(m),u(f,Promise.all(Array.from(n).map(function(b){return b.createSegmentIndex()})),6);case 6:Dm(b);
533
- if(g)throw g;return f["return"](m);case 3:return Fa(f),u(f,l.stop(),7);case 7:Ga(f,0)}})})}function Em(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.s){case 1:return g=new Wc({Jb:b.b,onError:d,Hc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=ti(c.periods),k=b.a,g.configure(k.drm),u(f,ad(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,kd(g),3);case 3:return u(f,ld(g),4);case 4:return f["return"](g)}})})}
534
- function Im(b,c,d,e,f,g,h){var k=new lm,l=f.periods.map(function(e){return Sm(b,c,d,k,f,e)}),m=e.a,n=rd(e);if(m&&b.a.offline.usePersistentLicense){if(!n.length)throw new G(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.ia(),size:0,expiration:e.Bc(),periods:l,sessionIds:b.a.offline.usePersistentLicense?n:[],drmInfo:m,appMetadata:h}}
535
- function Sm(b,c,d,e,f,g){f.periods.forEach(function(b){b.variants.forEach(function(b){var c=b.audio,d=b.video;c&&!d&&(e.a[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(e.a[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var f=c.bandwidth||393216,g=d.bandwidth||b.bandwidth-f;0>=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=Rm(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Tm(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
500
+ function Cl(b,c){var d=b.f?aj(b.f):null,e=b.f?cj(b.f):null;c.forEach(He.bind(null,b.g,d,e));d=cc(c,function(b){return b.variants.some(Oe)});if(0==d)throw new I(2,4,4032);if(d<c.length)throw new I(2,4,4011);c.forEach(function(b){Ge(b.variants,this.b.restrictions,this.tc)&&this.f&&Tl(this)==b&&Sl(this);km(this,b.variants)}.bind(b))}p=V.prototype;
501
+ p.$c=function(b){var c=this.f?aj(this.f):null,d=this.f?cj(this.f):null;He(this.g,c,d,b);c=b.variants;if(!c.some(Oe))throw new I(2,4,4011);km(this,b.variants);Ge(c,this.b.restrictions,this.tc)&&this.f&&Tl(this)==b&&Sl(this);if(b=this.g?this.g.a:null)for(c=r(c),d=c.next();!d.done;d=c.next()){d=r(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=r(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,nd(this.g,f.initDataType,f.initData)}}};
502
+ function fm(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.zb?(b.sa=c,b.ve=d,b.ue=e):(jj(b.f,c,d,e),gm(b))}function dm(b,c){b.zb?b.ea=c:(ij(b.f,c,!0,0,!1),em(b))}function Rl(b,c){function d(b,c){if(!b)return null;var d=b.findSegmentPosition(c-g.startTime);return null==d?null:(d=b.getSegmentReference(d))?d.startTime+g.startTime:null}var e=aj(b.f),f=cj(b.f),g=Tl(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
503
+ function Al(b){var c=b.Gb();if(b.w&&b.K&&b.v){var d=b.V;d.f=c;Bi(d);Gl(b)}b.dispatchEvent(new A("buffering",{buffering:c}))}function Gl(b){if(b.w&&b.K){var c=b.w.a;b.K.a==ni?$k(c,"buffering"):b.a.paused?$k(c,"paused"):b.a.ended?$k(c,"ended"):$k(c,"playing")}}function Ul(b,c){try{km(b,c)}catch(e){return b.cb(e),null}var d=c.filter(function(b){return Oe(b)});d=b.qc.create(d);b.o.setVariants(Array.from(d.values()));return b.o.chooseVariant()}
504
+ function Xl(b,c){var d=Ul(b,c.variants);d&&(Jl(b,c,d,!0),fm(b,d,!0));(d=Re(c.textStreams,b.ba,b.Da)[0]||null)&&(b.b.streaming.alwaysStreamText||b.Za())&&(cm(b,c,d,!0),dm(b,d));Kl(b)}
505
+ p.ig=function(b){try{this.zb=!0;this.o.disable();Yl(this);var c=Ul(this,b.variants),d=Re(b.textStreams,this.ba,this.Da)[0]||null;this.sa&&(b.variants.includes(this.sa)&&(c=this.sa),this.sa=null);this.ea&&(b.textStreams.includes(this.ea)&&(d=this.ea),this.ea=null);c&&Jl(this,b,c,!0);d&&cm(this,b,d,!0);var e=this.f,f=e.b.get("video");if(f)var g=e.c.periods[f.Ca];else{var h=e.b.get("audio");g=h?e.c.periods[h.Ca]:null}var k=c?c.audio:null;if(!g&&d){var l;if(l=k){b=d;var m=B(this.b.preferredTextLanguage),
506
+ n=B(k.language),q=B(b.language);l=hb(q,m)&&!hb(n,q)}l&&(this.xb=!0);this.xb&&this.F.g.setTextVisibility(!0);jm(this)}return this.b.streaming.alwaysStreamText||this.Za()?{variant:c,text:d}:{variant:c,text:null}}catch(w){return this.cb(w),{variant:null,text:null}}};p.tf=function(){this.zb=!1;this.b.abr.enabled&&(this.o.enable(),Yl(this));this.sa&&(jj(this.f,this.sa,this.ve,this.ue),gm(this),this.sa=null);this.ea&&(ij(this.f,this.ea,!0,0,!1),em(this),this.ea=null)};
507
+ p.og=function(){this.u&&this.u.update&&this.u.update()};p.xg=function(){this.v&&this.v.v()};function Kl(b){lm(b,new A("adaptation"))}function Sl(b){lm(b,new A("trackschanged"))}function gm(b){lm(b,new A("variantchanged"))}function em(b){lm(b,new A("textchanged"))}function jm(b){lm(b,new A("texttrackvisibility"))}function Yl(b){lm(b,new A("abrstatuschanged",{hg:b.b.abr.enabled}))}p.cb=function(b){if(this.j!=rl){var c=new A("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};
508
+ function Bl(b,c,d){b.dispatchEvent(new A(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}function zl(b){if(!b.a.error)return null;var c=b.a.error.code;if(1==c)return null;var d=b.a.error.msExtendedCode;d&&(0>d&&(d+=Math.pow(2,32)),d=d.toString(16));return new I(2,3,3016,c,d,b.a.error.message)}
509
+ function El(b,c){if(b.f){var d=Tl(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){Ue(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!tl.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=aj(b.f);var h=cj(b.f);(f=Te(f,h,d.variants))&&!f.allowedByKeySystem&&Xl(b,d);e&&(Sl(b),Ul(b,d.variants))}}
510
+ function Fl(b,c,d){if(b.u&&b.u.onExpirationUpdated)b.u.onExpirationUpdated(c,d);b.dispatchEvent(new A("expirationupdated"))}function Il(b,c,d){0<c&&(b.U()||b.Ye(c));d<b.ia()&&(b.U()||b.Ma(d))}
511
+ function km(b,c){var d=b.g?zc(b.g.M):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=r(c),m=l.next();!m.done;m=l.next()){m=m.value;var n=[];m.audio&&n.push(m.audio);m.video&&n.push(m.video);n=r(n);for(var q=n.next();!q.done;q=n.next())if(q=q.value,q.keyId){var w=d[e?"00":q.keyId];w?tl.includes(w)&&(k.includes(w)||k.push(w)):h.includes(q.keyId)||h.push(q.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new I(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
512
+ restrictedKeyStatuses:k});}function lm(b,c){t(function e(){return y(e,function(e){switch(e.s){case 1:return u(e,Promise.resolve(),2);case 2:b.j!=rl&&b.dispatchEvent(c),v(e)}})})}function im(b){var c=new Set;b=r(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.language?c.add(B(d.language)):c.add("und");return c}
513
+ function hm(b){var c=new Map;b=r(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d="und";var f=[];e.language&&(d=B(e.language));"variant"==e.type?f=e.audioRoles:f=e.roles;f&&f.length||(f=[""]);c.has(d)||c.set(d,new Set);e=r(f);for(f=e.next();!f.done;f=e.next())f=f.value,c.get(d).add(f)}var g=[];c.forEach(function(b,c){for(var d=r(b),e=d.next();!e.done;e=d.next())g.push({language:c,role:e.value})});return g}
514
+ function $l(b){b=Tl(b);return null==b?[]:b.variants.filter(function(b){return Oe(b)})}function bm(b){var c=Tl(b);return null==c?[]:c.textStreams.filter(function(c){return!b.sc.has(c)})}function Tl(b){var c=b.v.j(),d=null;b=r(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function Zl(b){var c=Tl(b);return bi(b.W,c).variant}
515
+ function am(b){var c=Tl(b);if(null==c)return null;if(!bi(b.W,c).text){var d=Re(c.textStreams,b.ba,b.Da);d.length&&ai(b.W,c,d[0])}return bi(b.W,c).text}function wl(){return new I(2,7,7E3)}function ql(b,c,d,e,f,g){return e==b&&f.B==g.B&&f.uri==g.uri&&f.mimeType==g.mimeType&&f.Pa==g.Pa?c:d}function Lk(){return{Pa:null,B:null,mimeType:null,startTime:null,Od:null,uri:null}}
516
+ function xl(b){return new Promise(function(c,d){b.qb=function(){return d(wl())};b.Hc=function(){return c()};b.onError=function(b){return d(b)};b.Jc=function(){return d(wl())}})}var rl=0,el=1,Ql=2,Vl=3;V.LoadMode={DESTROYED:rl,NOT_LOADED:el,MEDIA_SOURCE:Ql,SRC_EQUALS:Vl};function mm(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.ia();c=nm(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function om(b,c){var d=Ak(new yk(b.Ka(),b.ma()),c.periods[0],new U(null,0)),e=c.appMetadata||{};d=nm(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
517
+ function nm(b){var c=[],d=Pe(b.variants);d=r(d);for(var e=d.next();!e.done;e=d.next())c.push(Je(e.value));b=r(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(Ke(d.value));return c};function pm(){this.a={}}function qm(b,c,d){d=d.endTime-d.startTime;return rm(b,c)*d}function rm(b,c){var d=b.a[c];null==d&&(d=0);return d};function sm(b){this.a=!1;this.b=new J;this.c=b}sm.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function tm(b,c){for(var d={width:Infinity,height:Infinity},e=r(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return Fe(b,c,d)})}function um(b){b=r(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&se(b.audio));b.video&&(c=c&&se(b.video));return c})}
518
+ function vm(b,c){for(var d=r(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return Bd(c,b)})}function wm(b){var c=new xm;b.periods.forEach(function(b,d){var e=ym(b.variants);if(0==d){e=r(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else zm(c,e)});b=r(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return c.contains(new Am(b))})}
519
+ function Bm(b,c){var d=new xm;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return d.contains(new Am(b))}));c(b);d=ym(b.variants)})}function Am(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function xm(){this.a=[]}xm.prototype.add=function(b){this.contains(b)||this.a.push(b)};function zm(b,c){b.a=b.a.filter(function(b){return c.contains(b)})}
520
+ xm.prototype.contains=function(b){return this.a.some(function(c){return b.b==c.b&&b.a==c.a&&b.f==c.f&&b.c==c.c})};function ym(b){var c=new xm;b=r(b);for(var d=b.next();!d.done;d=b.next())c.add(new Am(d.value));return c};function W(b){var c=this;if(b&&b.constructor!=V)throw new I(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.Zb()):(this.a=Wk(),this.b=new L);this.f=!1;this.c=[];this.g=[];var d=!b;this.j=new sm(function(){return t(function f(){var b;return y(f,function(f){switch(f.s){case 1:return b=function(){},u(f,Promise.all(c.g.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.C(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,v(f)}})})})}z("shaka.offline.Storage",W);
521
+ function Cm(){if(Ec())a:{var b=r(Yj.values());for(var c=b.next();!c.done;c=b.next())if(c=c.value,c=c()){c.destroy();b=!0;break a}b=!1}else b=!1;return b}W.support=Cm;W.prototype.destroy=function(){return this.j.destroy()};W.prototype.destroy=W.prototype.destroy;
522
+ W.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Uk(b,c));var d=b,e=!1;null!=d.trackSelectionCallback&&(e=!0,d.offline=d.offline||{},d.offline.trackSelectionCallback=d.trackSelectionCallback,delete d.trackSelectionCallback);null!=d.progressCallback&&(e=!0,d.offline=d.offline||{},d.offline.progressCallback=d.progressCallback,delete d.progressCallback);null!=d.usePersistentLicense&&(e=!0,d.offline=d.offline||{},d.offline.usePersistentLicense=d.usePersistentLicense,delete d.usePersistentLicense);
523
+ e&&Xe("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return Yk(this.a,b)};W.prototype.configure=W.prototype.configure;W.prototype.getConfiguration=function(){var b=Wk();Yk(b,this.a,Wk());return b};W.prototype.getConfiguration=W.prototype.getConfiguration;W.prototype.Zb=function(){return this.b};W.prototype.getNetworkingEngine=W.prototype.Zb;
524
+ W.prototype.store=function(b,c,d){var e=this;return Dm(this,Em(this,b,c||{},function(){return t(function g(){var c,k;return y(g,function(g){switch(g.s){case 1:return d&&"string"!=typeof d?(Xe("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,T.create(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.A,g["return"](k)}})})}))};W.prototype.store=W.prototype.store;W.prototype.Xf=function(){return this.f};
525
+ W.prototype.getStoreInProgress=W.prototype.Xf;
526
+ function Em(b,c,d,e){return t(function g(){var h,k,l,m,n,q,w,x,C,E;return y(g,function(g){switch(g.s){case 1:Fm();if(b.f)return g["return"](Promise.reject(new I(2,9,9006)));b.f=!0;return u(g,Gm(b,c,e),2);case 2:h=g.A;Hm(b);k=!h.presentationTimeline.U()&&!h.presentationTimeline.pb();if(!k)throw new I(2,9,9005,c);l=null;m=new Xj;q=n=null;Aa(g,3,4);return u(g,Im(b,h,function(b){q=q||b}),6);case 6:l=g.A;Hm(b);if(q)throw q;Jm(b,h,l);return u(g,m.init(),7);case 7:return Hm(b),u(g,Zj(m),8);case 8:return n=
527
+ g.A,Hm(b),u(g,Km(b,n.ma,l,h,c,d),9);case 9:w=g.A;Hm(b);if(q)throw q;return u(g,n.ma.addManifests([w]),10);case 10:return x=g.A,Hm(b),C=new wk("manifest",n.path.Ka,n.path.ma,x[0]),g["return"](om(C,w));case 4:return Fa(g),b.f=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.C(12);break}return u(g,l.destroy(),12);case 12:Ga(g,0);break;case 3:E=Da(g);if(!n){g.C(14);break}return u(g,n.ma.removeSegments(b.c,function(){}),14);case 14:throw q||E;}})})}
528
+ function Jm(b,c,d){tm(c,b.a.restrictions);um(c);vm(c,d);wm(c);Bm(c,function(c){for(var d=[],e=r(c.variants),h=e.next();!h.done;h=e.next())d.push(Je(h.value));e=r(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(Ke(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
529
+ Lm(c)}function Km(b,c,d,e,f,g){return t(function k(){var l,m,n,q;return y(k,function(k){switch(k.s){case 1:return l=mm(f,e,g),m=new Mj(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),Ba(k,2),q=n=Mm(b,m,c,d,e,f,g),u(k,Pj(m),4);case 4:return q.size=k.A,k["return"](n);case 2:return Fa(k),u(k,m.destroy(),5);case 5:Ga(k,0)}})})}W.prototype.remove=function(b){return Dm(this,Nm(this,b))};W.prototype.remove=W.prototype.remove;
530
+ function Nm(b,c){return t(function e(){var f,g,h,k,l,m;return y(e,function(e){switch(e.s){case 1:Fm();f=xk(c);if(null==f||"manifest"!=f.a)return e["return"](Promise.reject(new I(2,9,9004,c)));g=f;h=new Xj;Ba(e,2);return u(e,h.init(),4);case 4:return u(e,bk(h,g.Ka(),g.ma()),5);case 5:return k=e.A,u(e,k.getManifests([g.key()]),6);case 6:return l=e.A,m=l[0],u(e,Promise.all([Om(b,m,h),Pm(b,k,g,m)]),2);case 2:return Fa(e),u(e,h.destroy(),8);case 8:Ga(e,0)}})})}
531
+ function Qm(b,c){for(var d=[],e=r(b.periods),f=e.next();!f.done;f=e.next()){f=r(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:Ac(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:Ac(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function Om(b,c,d){return t(function f(){return y(f,function(f){switch(f.s){case 1:return u(f,Rm(b.b,b.a.drm,d,c),0)}})})}
532
+ function Pm(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Sm(e),h=g.length+1,k=0,l=om(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}W.prototype.Mg=function(){return Dm(this,Tm(this))};W.prototype.removeEmeSessions=W.prototype.Mg;
533
+ function Tm(b){return t(function d(){var e,f,g,h,k,l,m,n,q;return y(d,function(d){switch(d.s){case 1:return Fm(),e=b.b,f=b.a.drm,g=new Xj,h=!1,Ba(d,2),u(d,g.init(),4);case 4:k=[];ck(g,function(b){return k.push(b)});l=Promise.resolve();m={};n=r(k);for(q=n.next();!q.done;m={Pc:m.Pc},q=n.next())m.Pc=q.value,l=l.then(function(b){return function(){return t(function E(){var d,g;return y(E,function(k){switch(k.s){case 1:return u(k,b.Pc.getAll(),2);case 2:return d=k.A,u(k,Hk(f,e,d),3);case 3:return g=k.A,
534
+ u(k,b.Pc.remove(g),4);case 4:g.length!=d.length&&(h=!0),v(k)}})})}}(m));return u(d,l,2);case 2:return Fa(d),u(d,g.destroy(),6);case 6:Ga(d,3);break;case 3:return d["return"](!h)}})})}W.prototype.list=function(){return Dm(this,Um())};W.prototype.list=W.prototype.list;
535
+ function Um(){return t(function c(){var d,e,f;return y(c,function(c){switch(c.s){case 1:return Fm(),d=[],e=new Xj,Ba(c,2),u(c,e.init(),4);case 4:return f=Promise.resolve(),ak(e,function(c,e){f=f.then(function(){return t(function m(){var f;return y(m,function(g){switch(g.s){case 1:return u(g,e.getAllManifests(),2);case 2:f=g.A,f.forEach(function(e,f){var g=om(new wk("manifest",c.Ka,c.ma,f),e);d.push(g)}),v(g)}})})})}),u(c,f,2);case 2:return Fa(c),u(c,e.destroy(),6);case 6:Ga(c,3);break;case 3:return c["return"](d)}})})}
536
+ function Gm(b,c,d){return t(function f(){var g,h,k,l,m,n;return y(f,function(f){switch(f.s){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.A,l.configure(b.a.manifest),Hm(b),Ba(f,3),u(f,l.start(c,k),5);case 5:return m=f.A,Hm(b),n=Vm(m),u(f,Promise.all(Array.from(n).map(function(b){return b.createSegmentIndex()})),6);case 6:Hm(b);
537
+ if(g)throw g;return f["return"](m);case 3:return Fa(f),u(f,l.stop(),7);case 7:Ga(f,0)}})})}function Im(b,c,d){return t(function f(){var g,h,k;return y(f,function(f){switch(f.s){case 1:return g=new Xc({Jb:b.b,onError:d,Ic:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=wi(c.periods),k=b.a,g.configure(k.drm),u(f,bd(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,ld(g),3);case 3:return u(f,md(g),4);case 4:return f["return"](g)}})})}
538
+ function Mm(b,c,d,e,f,g,h){var k=new pm,l=f.periods.map(function(e){return Wm(b,c,d,k,f,e)}),m=e.a,n=sd(e);if(m&&b.a.offline.usePersistentLicense){if(!n.length)throw new I(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.ia(),size:0,expiration:e.Bc(),periods:l,sessionIds:b.a.offline.usePersistentLicense?n:[],drmInfo:m,appMetadata:h}}
539
+ function Wm(b,c,d,e,f,g){f.periods.forEach(function(b){b.variants.forEach(function(b){var c=b.audio,d=b.video;c&&!d&&(e.a[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(e.a[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var f=c.bandwidth||393216,g=d.bandwidth||b.bandwidth-f;0>=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var h=Vm(f),k=new Map;h=r(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Xm(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
536
540
  k.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}
537
- function Tm(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.ac();var k=g.id;Um(g,f,function(f){var l=Fg(f.c(),f.b,f.a,b.a.streaming.retryParameters);Jj(c,k,
538
- l,mm(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=Fg(f.c(),f.b,f.a,b.a.streaming.retryParameters),Jj(c,k,f,.5*nm(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}
539
- function Um(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function Dm(b){if(b.j.a)throw new G(2,9,7001);}function Bm(){if(!ym())throw new G(2,9,9E3);}function zm(b,c){return t(function e(){return y(e,function(e){switch(e.s){case 1:return b.g.push(c),Aa(e,2),u(e,c,4);case 4:return e["return"](e.A);case 2:Fa(e),cc(b.g,c),Ga(e,0)}})})}
540
- function Om(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}V.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.s){case 1:return d=new Tj,Aa(c,2),u(c,d.erase(),2);case 2:return Fa(c),u(c,d.destroy(),5);case 5:Ga(c,0)}})})};
541
- function Nm(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.s){case 1:if(!e.drmInfo)return g["return"]();h=Zj(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:Mm(e,!1),videoCapabilities:Mm(e,!0)}});return u(g,Dk(c,b,k),2);case 2:return l=g.A,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
542
- 0)}})})}function Rm(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function Hm(b){if(0==b.periods.length)throw new G(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Vm(c.value)}
543
- function Vm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}ql.offline=ym;function Wm(){for(var b=0;b<Xm.length;++b)Xm[b].qf()}z("shaka.polyfill.installAll",Wm);var Xm=[];function Ym(b,c){c=c||0;for(var d={priority:c,qf:b},e=0;e<Xm.length;e++)if(Xm[e].priority<c){Xm.splice(e,0,d);return}Xm.push(d)}z("shaka.polyfill.register",Ym);function Zm(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
544
- Ym(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
545
- "fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Zm);document.addEventListener("webkitfullscreenerror",Zm);document.addEventListener("mozfullscreenchange",Zm);document.addEventListener("mozfullscreenerror",Zm);document.addEventListener("MSFullscreenChange",Zm);document.addEventListener("MSFullscreenError",Zm)}});Ym(function(){Ec("CrKey")&&delete window.indexedDB});function $m(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,b,c,d)}Ym(function(){Ec("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=$m)});Ym(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});Ym(function(){});function an(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function bn(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
546
- function cn(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.ke=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].$d=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
547
- function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",dn,!1);c||(this.addEventListener("sourceclose",en,!1),c=!0);return e}}function dn(b){var c=b.target,d=c.mediaSource_;if(d.ke){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.$d=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].$d)return;d.ke=!1}}
548
- function en(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",dn,!1);b.removeEventListener("sourceclose",en,!1)}function fn(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:b(c)}}function gn(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=Ac(c)[0]&&b(c)}}
549
- function hn(){var b=MediaSource.isTypeSupported,c=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(d){for(var e=d.split(/ *; */),f=e[0],g={},h=1;h<e.length;++h){var k=e[h].split("="),l=k[0];k=k[1].replace(/"(.*)"/,"$1");g[l]=k}e=g.codecs;if(!e)return b(d);var m=!1,n=!1;d=e.split(",").filter(function(b){c.test(b)&&(n=!0);/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});n&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var q in g)f+="; "+q+'="'+g[q]+'"';return cast.__platform__.canDisplayType(f)}}
550
- Ym(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)hn();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;fn();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))an();else if(b.includes("Version/10"))an(),cn();else if(b.includes("Version/11")||b.includes("Version/12"))an(),bn()}else Ec("Tizen")&&gn()});function jn(b,c){try{var d=new kn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
551
- function kn(b,c){this.keySystem=b;if(b.startsWith("com.apple.fps"))for(var d=r(c),e=d.next();!e.done;e=d.next()){var f=e.value;if("required"==f.persistentState)e=null;else{e={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label};var g=!1,h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){g=!0;var m=l.contentType.split(";")[0];
541
+ function Xm(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.ac();var k=g.id;Ym(g,f,function(f){var l=Ig(f.c(),f.b,f.a,b.a.streaming.retryParameters);Nj(c,k,
542
+ l,qm(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});if(f=g.initSegmentReference)f=Ig(f.c(),f.b,f.a,b.a.streaming.retryParameters),Nj(c,k,f,.5*rm(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}
543
+ function Ym(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function Hm(b){if(b.j.a)throw new I(2,9,7001);}function Fm(){if(!Cm())throw new I(2,9,9E3);}function Dm(b,c){return t(function e(){return y(e,function(e){switch(e.s){case 1:return b.g.push(c),Ba(e,2),u(e,c,4);case 4:return e["return"](e.A);case 2:Fa(e),bc(b.g,c),Ga(e,0)}})})}
544
+ function Sm(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}W.deleteAll=function(){return t(function c(){var d;return y(c,function(c){switch(c.s){case 1:return d=new Xj,Ba(c,2),u(c,d.erase(),2);case 2:return Fa(c),u(c,d.destroy(),5);case 5:Ga(c,0)}})})};
545
+ function Rm(b,c,d,e){return t(function g(){var h,k,l;return y(g,function(g){switch(g.s){case 1:if(!e.drmInfo)return g["return"]();h=dk(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:Qm(e,!1),videoCapabilities:Qm(e,!0)}});return u(g,Hk(c,b,k),2);case 2:return l=g.A,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
546
+ 0)}})})}function Vm(b){var c=new Set;b=r(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=r(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=r(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function Lm(b){if(0==b.periods.length)throw new I(2,4,4014);b=r(b.periods);for(var c=b.next();!c.done;c=b.next())Zm(c.value)}
547
+ function Zm(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=r(c),e=d.next();!e.done;e=d.next()){e=r(c);for(var f=e.next();!f.done;f=e.next());}c=r(b);for(d=c.next();!d.done;d=c.next())for(d=r(b),e=d.next();!e.done;e=d.next());}ul.offline=Cm;function $m(){for(var b=0;b<an.length;++b)an[b].sf()}z("shaka.polyfill.installAll",$m);var an=[];function bn(b,c){c=c||0;for(var d={priority:c,sf:b},e=0;e<an.length;e++)if(an[e].priority<c){an.splice(e,0,d);return}an.push(d)}z("shaka.polyfill.register",bn);function cn(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
548
+ bn(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
549
+ "fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",cn);document.addEventListener("webkitfullscreenerror",cn);document.addEventListener("mozfullscreenchange",cn);document.addEventListener("mozfullscreenerror",cn);document.addEventListener("MSFullscreenChange",cn);document.addEventListener("MSFullscreenError",cn)}});bn(function(){Hc("CrKey")&&delete window.indexedDB});function dn(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,b,c,d)}bn(function(){Hc("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=dn)});bn(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});bn(function(){});function en(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function fn(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
550
+ function gn(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.me=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].ce=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
551
+ function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",hn,!1);c||(this.addEventListener("sourceclose",jn,!1),c=!0);return e}}function hn(b){var c=b.target,d=c.mediaSource_;if(d.me){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.ce=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].ce)return;d.me=!1}}
552
+ function jn(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",hn,!1);b.removeEventListener("sourceclose",jn,!1)}function kn(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:b(c)}}function ln(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=Dc(c)[0]&&b(c)}}
553
+ function mn(){var b=MediaSource.isTypeSupported,c=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(d){for(var e=d.split(/ *; */),f=e[0],g={},h=1;h<e.length;++h){var k=e[h].split("="),l=k[0];k=k[1].replace(/"(.*)"/,"$1");g[l]=k}e=g.codecs;if(!e)return b(d);var m=!1,n=!1;d=e.split(",").filter(function(b){c.test(b)&&(n=!0);/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});n&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var q in g)f+="; "+q+'="'+g[q]+'"';return cast.__platform__.canDisplayType(f)}}
554
+ bn(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)mn();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;kn();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))en();else if(b.includes("Version/10"))en(),gn();else if(b.includes("Version/11")||b.includes("Version/12"))en(),fn()}else Hc("Tizen")&&ln()});function nn(b,c){try{var d=new on(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
555
+ function on(b,c){this.keySystem=b;if(b.startsWith("com.apple.fps"))for(var d=r(c),e=d.next();!e.done;e=d.next()){var f=e.value;if("required"==f.persistentState)e=null;else{e={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label};var g=!1,h=!1;if(f.audioCapabilities)for(var k=r(f.audioCapabilities),l=k.next();!l.done;l=k.next())if(l=l.value,l.contentType){g=!0;var m=l.contentType.split(";")[0];
552
556
  WebKitMediaKeys.isTypeSupported(this.keySystem,m)&&(e.audioCapabilities.push(l),h=!0)}if(f.videoCapabilities)for(f=r(f.videoCapabilities),l=f.next();!l.done;l=f.next())k=l.value,k.contentType&&(g=!0,l=k.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(e.videoCapabilities.push(k),h=!0));g||(h=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));e=h?e:null}if(e){this.a=e;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;
553
- throw d;}kn.prototype.createMediaKeys=function(){var b=new ln(this.keySystem);return Promise.resolve(b)};kn.prototype.getConfiguration=function(){return this.a};function mn(b){var c=this.mediaKeys;c&&c!=b&&nn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?nn(b,this):Promise.resolve()}function ln(b){this.b=new WebKitMediaKeys(b);this.a=new L;this.c=null}
554
- ln.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new on(this.b,b)};ln.prototype.setServerCertificate=function(b){this.c=b?new Uint8Array(b):null;return Promise.resolve(!0)};
555
- function nn(b,c){b.a.sb();if(!c)return Promise.resolve();b.a.m(c,"webkitneedkey",pn);try{return 1<=c.readyState?c.webkitSetMediaKeys(b.b):b.a.wa(c,"loadedmetadata",function(){c.webkitSetMediaKeys(b.b)}),Promise.resolve()}catch(d){return Promise.reject(d)}}function on(b){cb.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new L;this.sessionId="";this.expiration=NaN;this.closed=new I;this.keyStatuses=new qn}Xa(on,cb);p=on.prototype;
556
- p.generateRequest=function(b,c){this.a=new I;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c)),this.f.m(this.c,"webkitkeymessage",this.Yg.bind(this)),this.f.m(this.c,"webkitkeyadded",this.Wg.bind(this)),this.f.m(this.c,"webkitkeyerror",this.Xg.bind(this)),rn(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(b){this.b=new I;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
557
- p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.sb()}catch(b){this.closed.reject(b)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
558
- function sn(b,c){function d(b){(new DataView(g.buffer)).setUint32(h,b.byteLength,!0);h+=4;g.set(b,h);h+=b.byteLength}var e=new Uint8Array(b);if((new DataView(e.buffer)).getUint32(0,!0)+4!=e.byteLength)throw Error("Malformed init data!");var f=Jc(e.slice(4),!0);f=(new yb(f)).Ha;f=new Uint8Array(Oc(f,!0));var g=new Uint8Array(e.byteLength+4+f.byteLength+4+c.byteLength),h=0;g.set(e,h);h+=e.byteLength;d(f);d(new Uint8Array(c));return g}
559
- function pn(b){var c=this.mediaKeys.c,d=new Event("encrypted");d.initDataType="cenc";d.initData=sn(b.initData,c);this.dispatchEvent(d)}p.Yg=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new B("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.Wg=function(){this.b&&(rn(this,"usable"),this.b.resolve(),this.b=null)};
560
- p.Xg=function(){var b=Error("EME PatchedMediaKeysApple key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:rn(this,"output-not-allowed");break;default:rn(this,"internal-error")}};function rn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new B("keystatuseschange"))}
561
- function qn(){this.size=0;this.a=void 0}var tn;p=qn.prototype;p.forEach=function(b){this.a&&b(this.a,tn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=tn;return this.a&&Uc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
562
- Ym(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(tn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=mn,window.MediaKeys=ln,window.MediaKeySystemAccess=kn,navigator.requestMediaKeySystemAccess=jn)});function un(b){this.f=[];this.b=[];this.a=[];(new R).ua("pssh",this.c.bind(this)).parse(b.buffer)}un.prototype.c=function(b){if(!(1<b.version)){var c=Tc(b.reader.rb(16)),d=[];if(0<b.version)for(var e=b.reader.J(),f=0;f<e;++f){var g=Tc(b.reader.rb(16));d.push(g)}e=b.reader.J();b.reader.R(e);this.b.push.apply(this.b,d);this.f.push(c);this.a.push({start:b.start,end:b.start+b.size-1})}};function vn(b,c){try{var d=new wn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
563
- function wn(b,c){this.keySystem=b;for(var d=!1,e=0;e<c.length;++e){var f=c[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=0;k<f.audioCapabilities.length;++k){var l=f.audioCapabilities[k];if(l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),d=!0)}}if(f.videoCapabilities)for(k=
564
- 0;k<f.videoCapabilities.length;++k)l=f.videoCapabilities[k],l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}wn.prototype.createMediaKeys=function(){var b=new xn(this.keySystem);return Promise.resolve(b)};
565
- wn.prototype.getConfiguration=function(){return this.a};function yn(b){var c=this.mediaKeys;c&&c!=b&&zn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?zn(b,this):Promise.resolve()}function xn(b){this.a=new MSMediaKeys(b);this.b=new L}xn.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new An(this.a,b)};xn.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
566
- function zn(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}b.b.sb();if(!c)return Promise.resolve();b.b.m(c,"msneedkey",Bn);var e=b;try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(f){return Promise.reject(f)}}function An(b){cb.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new L;this.sessionId="";this.expiration=NaN;this.closed=new I;this.keyStatuses=new Cn}Xa(An,cb);p=An.prototype;
567
- p.generateRequest=function(b,c){this.a=new I;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),this.f.m(this.c,"mskeymessage",this.sg.bind(this)),this.f.m(this.c,"mskeyadded",this.qg.bind(this)),this.f.m(this.c,"mskeyerror",this.rg.bind(this)),Dn(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(b){this.b=new I;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
568
- p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.sb()}catch(b){this.closed.reject(b)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Bn(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=En(b.initData);this.dispatchEvent(c)}}
569
- function En(b){if(!b)return b;var c=new un(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=r(d);for(d=e.next();!d.done;c={Dc:c.Dc},d=e.next())c.Dc=d.value,b.some(function(b){return function(c){return Uc(c,b.Dc)}}(c))||b.push(c.Dc);c=0;e=r(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=r(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
570
- p.sg=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new B("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.qg=function(){this.a?(Dn(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Dn(this,"usable"),this.b.resolve(),this.b=null)};
571
- p.rg=function(){var b=Error("EME PatchedMediaKeysMs key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Dn(this,"output-not-allowed");break;default:Dn(this,"internal-error")}};function Dn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new B("keystatuseschange"))}
572
- function Cn(){this.size=0;this.a=void 0}var Fn;p=Cn.prototype;p.forEach=function(b){this.a&&b(this.a,Fn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=Fn;return this.a&&Uc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
573
- Ym(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(Fn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yn,window.MediaKeys=xn,window.MediaKeySystemAccess=wn,navigator.requestMediaKeySystemAccess=vn)});function Gn(){return Promise.reject(Error("The key system specified is not supported."))}function Hn(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function In(){throw new TypeError("Illegal constructor.");}In.prototype.createSession=function(){};In.prototype.setServerCertificate=function(){};function Jn(){throw new TypeError("Illegal constructor.");}Jn.prototype.getConfiguration=function(){};Jn.prototype.createMediaKeys=function(){};
574
- Ym(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Gn,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Hn,window.MediaKeys=In,window.MediaKeySystemAccess=Jn)},-10);var Kn="";function Ln(b){var c=Kn;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function Mn(b,c){try{var d=new Nn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function On(b){var c=this.mediaKeys;c&&c!=b&&Pn(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&Pn(b,this);return Promise.resolve()}
575
- function Nn(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var n=
557
+ throw d;}on.prototype.createMediaKeys=function(){var b=new pn(this.keySystem);return Promise.resolve(b)};on.prototype.getConfiguration=function(){return this.a};function qn(b){var c=this.mediaKeys;c&&c!=b&&rn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?rn(b,this):Promise.resolve()}function pn(b){this.b=new WebKitMediaKeys(b);this.a=new M}
558
+ pn.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new sn(this.b,b)};pn.prototype.setServerCertificate=function(b){b&&new Uint8Array(b);return Promise.resolve(!0)};
559
+ function rn(b,c){b.a.sb();if(!c)return Promise.resolve();b.a.m(c,"webkitneedkey",tn);try{return 1<=c.readyState?c.webkitSetMediaKeys(b.b):b.a.ra(c,"loadedmetadata",function(){c.webkitSetMediaKeys(b.b)}),Promise.resolve()}catch(d){return Promise.reject(d)}}function sn(b){cb.call(this);this.b=null;this.g=b;this.c=this.a=null;this.f=new M;this.sessionId="";this.expiration=NaN;this.closed=new J;this.keyStatuses=new un}Xa(sn,cb);p=sn.prototype;
560
+ p.generateRequest=function(b,c){this.a=new J;try{this.b=this.g.createSession("video/mp4",new Uint8Array(c)),this.sessionId=this.b.sessionId||"",this.f.m(this.b,"webkitkeymessage",this.$g.bind(this)),this.f.m(this.b,"webkitkeyadded",this.Yg.bind(this)),this.f.m(this.b,"webkitkeyerror",this.Zg.bind(this)),vn(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(b){this.c=new J;try{this.b.update(new Uint8Array(b))}catch(c){this.c.reject(c)}return this.c};
561
+ p.close=function(){try{this.b.close(),this.closed.resolve(),this.f.sb()}catch(b){this.closed.reject(b)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function tn(b){var c=new Event("encrypted");c.initDataType="cenc";c.initData=b.initData;this.dispatchEvent(c)}
562
+ p.$g=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new A("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.Yg=function(){this.c&&(vn(this,"usable"),this.c.resolve(),this.c=null)};
563
+ p.Zg=function(){var b=Error("EME PatchedMediaKeysApple key error");b.errorCode=this.b.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.c)this.c.reject(b),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:vn(this,"output-not-allowed");break;default:vn(this,"internal-error")}};function vn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new A("keystatuseschange"))}
564
+ function un(){this.size=0;this.a=void 0}var wn;p=un.prototype;p.forEach=function(b){this.a&&b(this.a,wn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=wn;return this.a&&Vc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
565
+ bn(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(wn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=qn,window.MediaKeys=pn,window.MediaKeySystemAccess=on,navigator.requestMediaKeySystemAccess=nn)});function xn(b,c){try{var d=new yn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
566
+ function yn(b,c){this.keySystem=b;for(var d=!1,e=0;e<c.length;++e){var f=c[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=0;k<f.audioCapabilities.length;++k){var l=f.audioCapabilities[k];if(l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),d=!0)}}if(f.videoCapabilities)for(k=
567
+ 0;k<f.videoCapabilities.length;++k)l=f.videoCapabilities[k],l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}yn.prototype.createMediaKeys=function(){var b=new zn(this.keySystem);return Promise.resolve(b)};
568
+ yn.prototype.getConfiguration=function(){return this.a};function An(b){var c=this.mediaKeys;c&&c!=b&&Bn(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?Bn(b,this):Promise.resolve()}function zn(b){this.a=new MSMediaKeys(b);this.b=new M}zn.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new Cn(this.a,b)};zn.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
569
+ function Bn(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}b.b.sb();if(!c)return Promise.resolve();b.b.m(c,"msneedkey",Dn);var e=b;try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(f){return Promise.reject(f)}}function Cn(b){cb.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new M;this.sessionId="";this.expiration=NaN;this.closed=new J;this.keyStatuses=new En}Xa(Cn,cb);p=Cn.prototype;
570
+ p.generateRequest=function(b,c){this.a=new J;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),this.f.m(this.c,"mskeymessage",this.vg.bind(this)),this.f.m(this.c,"mskeyadded",this.sg.bind(this)),this.f.m(this.c,"mskeyerror",this.ug.bind(this)),Fn(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};p.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};p.update=function(b){this.b=new J;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
571
+ p.close=function(){try{this.c.close(),this.closed.resolve(),this.f.sb()}catch(b){this.closed.reject(b)}return this.closed};p.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Dn(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=Gn(b.initData);this.dispatchEvent(c)}}
572
+ function Gn(b){if(!b)return b;var c=new Sf(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=r(d);for(d=e.next();!d.done;c={Ec:c.Ec},d=e.next())c.Ec=d.value,b.some(function(b){return function(c){return Vc(c,b.Ec)}}(c))||b.push(c.Ec);c=0;e=r(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=r(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
573
+ p.vg=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new A("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};p.sg=function(){this.a?(Fn(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Fn(this,"usable"),this.b.resolve(),this.b=null)};
574
+ p.ug=function(){var b=Error("EME PatchedMediaKeysMs key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Fn(this,"output-not-allowed");break;default:Fn(this,"internal-error")}};function Fn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new A("keystatuseschange"))}
575
+ function En(){this.size=0;this.a=void 0}var Hn;p=En.prototype;p.forEach=function(b){this.a&&b(this.a,Hn)};p.get=function(b){if(this.has(b))return this.a};p.has=function(b){var c=Hn;return this.a&&Vc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
576
+ bn(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(Hn=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=An,window.MediaKeys=zn,window.MediaKeySystemAccess=yn,navigator.requestMediaKeySystemAccess=xn)});function In(){return Promise.reject(Error("The key system specified is not supported."))}function Jn(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Kn(){throw new TypeError("Illegal constructor.");}Kn.prototype.createSession=function(){};Kn.prototype.setServerCertificate=function(){};function Ln(){throw new TypeError("Illegal constructor.");}Ln.prototype.getConfiguration=function(){};Ln.prototype.createMediaKeys=function(){};
577
+ bn(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=In,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Jn,window.MediaKeys=Kn,window.MediaKeySystemAccess=Ln)},-10);var Mn="";function Nn(b){var c=Mn;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function On(b,c){try{var d=new Pn(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function Qn(b){var c=this.mediaKeys;c&&c!=b&&Rn(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&Rn(b,this);return Promise.resolve()}
578
+ function Pn(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var n=
576
579
  h.audioCapabilities[m];if(n.contentType){l=!0;var q=n.contentType.split(";")[0];f.canPlayType(q,this.a)&&(k.audioCapabilities.push(n),e=!0)}}if(h.videoCapabilities)for(m=0;m<h.videoCapabilities.length;++m)n=h.videoCapabilities[m],n.contentType&&(l=!0,f.canPlayType(n.contentType,this.a)&&(k.videoCapabilities.push(n),e=!0));l||(e=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==h.persistentState&&(d?(k.persistentState="required",k.sessionTypes=["persistent-license"]):
577
- e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}Nn.prototype.createMediaKeys=function(){var b=new Qn(this.a);return Promise.resolve(b)};Nn.prototype.getConfiguration=function(){return this.b};function Qn(b){this.g=b;this.b=null;this.a=new L;this.c=[];this.f={}}
578
- function Pn(b,c){b.b=c;b.a.sb();var d=Kn;c&&(b.a.m(c,d+"needkey",b.yg.bind(b)),b.a.m(c,d+"keymessage",b.ah.bind(b)),b.a.m(c,d+"keyadded",b.Zg.bind(b)),b.a.m(c,d+"keyerror",b.$g.bind(b)))}p=Qn.prototype;p.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new Rn(c,this.g,b);this.c.push(b);return b};
579
- p.setServerCertificate=function(){return Promise.resolve(!1)};p.yg=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};p.ah=function(b){var c=Sn(this,b.sessionId);c&&(b=new B("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
580
- p.Zg=function(b){if(b=Sn(this,b.sessionId))Tn(b,"usable"),b.a&&b.a.resolve(),b.a=null};p.$g=function(b){var c=Sn(this,b.sessionId);c&&c.handleError(b)};function Sn(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function Rn(b,c,d){cb.call(this);this.f=b;this.j=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new I;this.keyStatuses=new Un}Xa(Rn,cb);p=Rn.prototype;
581
- p.handleError=function(b){var c=Error("EME v0.1b key error");c.errorCode=b.errorCode;c.errorCode.systemCode=b.systemCode;!b.sessionId&&this.b?(c.method="generateRequest",45==b.systemCode&&(c.message="Unsupported session type."),this.b.reject(c),this.b=null):b.sessionId&&this.a?(c.method="update",this.a.reject(c),this.a=null):(c=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Tn(this,"output-restricted"):1==c?Tn(this,"expired"):Tn(this,"internal-error"))};
582
- function Vn(b,c,d){if(b.j)return Promise.reject(Error("The session is already initialized."));b.j=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(Nc("LOAD_SESSION|"+d));else{var f=Nc("PERSISTENT|"),g=new Uint8Array(f.byteLength+c.byteLength);g.set(new Uint8Array(f),0);g.set(new Uint8Array(c),f.byteLength);e=g}else e=new Uint8Array(c)}catch(k){return Promise.reject(k)}b.b=new I;var h=Ln("generateKeyRequest");try{b.f[h](b.c,e)}catch(k){if("InvalidStateError"!=k.name)return b.b=null,Promise.reject(k);
580
+ e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}Pn.prototype.createMediaKeys=function(){var b=new Sn(this.a);return Promise.resolve(b)};Pn.prototype.getConfiguration=function(){return this.b};function Sn(b){this.g=b;this.b=null;this.a=new M;this.c=[];this.f={}}
581
+ function Rn(b,c){b.b=c;b.a.sb();var d=Mn;c&&(b.a.m(c,d+"needkey",b.Ag.bind(b)),b.a.m(c,d+"keymessage",b.dh.bind(b)),b.a.m(c,d+"keyadded",b.ah.bind(b)),b.a.m(c,d+"keyerror",b.bh.bind(b)))}p=Sn.prototype;p.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new Tn(c,this.g,b);this.c.push(b);return b};
582
+ p.setServerCertificate=function(){return Promise.resolve(!1)};p.Ag=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};p.dh=function(b){var c=Un(this,b.sessionId);c&&(b=new A("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
583
+ p.ah=function(b){if(b=Un(this,b.sessionId))Vn(b,"usable"),b.a&&b.a.resolve(),b.a=null};p.bh=function(b){var c=Un(this,b.sessionId);c&&c.handleError(b)};function Un(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function Tn(b,c,d){cb.call(this);this.f=b;this.j=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new J;this.keyStatuses=new Wn}Xa(Tn,cb);p=Tn.prototype;
584
+ p.handleError=function(b){var c=Error("EME v0.1b key error");c.errorCode=b.errorCode;c.errorCode.systemCode=b.systemCode;!b.sessionId&&this.b?(c.method="generateRequest",45==b.systemCode&&(c.message="Unsupported session type."),this.b.reject(c),this.b=null):b.sessionId&&this.a?(c.method="update",this.a.reject(c),this.a=null):(c=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Vn(this,"output-restricted"):1==c?Vn(this,"expired"):Vn(this,"internal-error"))};
585
+ function Xn(b,c,d){if(b.j)return Promise.reject(Error("The session is already initialized."));b.j=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(Pc("LOAD_SESSION|"+d));else{var f=Pc("PERSISTENT|"),g=new Uint8Array(f.byteLength+c.byteLength);g.set(new Uint8Array(f),0);g.set(new Uint8Array(c),f.byteLength);e=g}else e=new Uint8Array(c)}catch(k){return Promise.reject(k)}b.b=new J;var h=Nn("generateKeyRequest");try{b.f[h](b.c,e)}catch(k){if("InvalidStateError"!=k.name)return b.b=null,Promise.reject(k);
583
586
  (new F(function(){try{b.f[h](b.c,e)}catch(l){b.b.reject(l),b.b=null}})).S(.01)}return b.b}
584
- p.Ld=function(b,c){if(this.a)this.a.then(this.Ld.bind(this,b,c))["catch"](this.Ld.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=Hc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);d=Rc(e.keys[0].k);e=Rc(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=Ln("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
585
- function Tn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new B("keystatuseschange"))}p.generateRequest=function(b,c){return Vn(this,c,null)};p.load=function(b){return"persistent-license"==this.g?Vn(this,null,b):Promise.reject(Error("Not a persistent session."))};p.update=function(b){var c=new I;this.Ld(c,b);return c};
586
- p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=Ln("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Un(){this.size=0;this.a=void 0}var Wn;p=Un.prototype;p.forEach=function(b){this.a&&b(this.a,Wn)};p.get=function(b){if(this.has(b))return this.a};
587
- p.has=function(b){var c=Wn;return this.a&&Uc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
588
- Ym(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Kn="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;Wn=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=Mn;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=On;window.MediaKeys=Qn;window.MediaKeySystemAccess=
589
- Nn}});function Xn(b){b=b.target;if("picture-in-picture"==b.webkitPresentationMode){document.pictureInPictureElement=b;var c=new Event("enterpictureinpicture");b.dispatchEvent(c)}else document.pictureInPictureElement==b&&(document.pictureInPictureElement=null),c=new Event("leavepictureinpicture"),b.dispatchEvent(c)}
590
- function Yn(){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 Zn(){var b=document.pictureInPictureElement;return b?(b.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
591
- Ym(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;b.requestPictureInPicture&&document.exitPictureInPicture||!b.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,b.requestPictureInPicture=Yn,document.exitPictureInPicture=Zn,document.addEventListener("webkitpresentationmodechanged",Xn,!0))}});Ym(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function $n(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Ym(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=$n)}});function ao(b,c,d){return new window.TextTrackCue(b,c,d)}function bo(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}Ym(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=ao;else if(6==b)window.VTTCue=bo;else{try{var c=!!ao(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=ao)}}});function co(){}co.prototype.parseInit=function(){};
592
- co.prototype.parseMedia=function(b,c){var d=Hc(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(fa){throw new G(2,2,2005);}if(g){if(g=g.getElementsByTagName("tt")[0]){var h=O.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var k=O.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var l=O.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var m=O.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","tickRate");
593
- d=g.getAttribute("xml:space")||"default";f=g.getAttribute("tts:extent")}else throw new G(2,2,2005);if("default"!=d&&"preserve"!=d)throw new G(2,2,2005);d="default"==d;h=new eo(h,k,l,m);k=fo(g.getElementsByTagName("metadata")[0]);l=fo(g.getElementsByTagName("styling")[0]);m=fo(g.getElementsByTagName("layout")[0]);for(var n=[],q=0;q<m.length;q++){var x=m[q],w=l,A=f;var D=new Vd;var H=x.getAttribute("xml:id");if(H){D.id=H;H=null;A&&(H=go.exec(A)||ho.exec(A));A=H?Number(H[1]):null;H=H?Number(H[2]):null;
594
- var J,ba;if(J=io(x,w,"extent"))J=(ba=go.exec(J))||ho.exec(J),null!=J&&(D.width=null!=A?100*Number(J[1])/A:Number(J[1]),D.height=null!=H?100*Number(J[2])/H:Number(J[2]),D.widthUnits=ba||null!=A?he:0,D.heightUnits=ba||null!=H?he:0);if(x=io(x,w,"origin"))J=(ba=go.exec(x))||ho.exec(x),null!=J&&(D.viewportAnchorX=null!=H?100*Number(J[1])/H:Number(J[1]),D.viewportAnchorY=null!=A?100*Number(J[2])/A:Number(J[2]),D.viewportAnchorUnits=ba||null!=A?he:0)}else D=null;D&&n.push(D)}f=fo(g.getElementsByTagName("body")[0]);
595
- for(g=0;g<f.length;g++)(q=jo(f[g],c.periodStart,h,k,l,m,n,d))&&e.push(q)}return e};
596
- var go=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,ko=/^(\d+px|\d+em)$/,ho=/^(\d+)px (\d+)px$/,lo=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,mo=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,no=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,oo=/^(\d*(?:\.\d*)?)f$/,po=/^(\d*(?:\.\d*)?)t$/,qo=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,ro={left:$d,center:"center",right:"end",start:$d,end:"end"},so={left:"line-left",center:"center",right:"line-right"};
597
- function fo(b){var c=[];if(!b)return c;for(var d=b.childNodes,e=0;e<d.length;e++){var f="span"==d[e].nodeName&&"p"==b.nodeName;d[e].nodeType!=Node.ELEMENT_NODE||"br"==d[e].nodeName||f||(f=fo(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function to(b,c){for(var d=b.childNodes,e=0;e<d.length;e++)if("br"==d[e].nodeName&&0<e)d[e-1].textContent+="\n";else if(0<d[e].childNodes.length)to(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
598
- function jo(b,c,d,e,f,g,h,k){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;to(b,k);k=uo(b.getAttribute("begin"),d);var l=uo(b.getAttribute("end"),d);d=uo(b.getAttribute("dur"),d);var m=b.textContent;null==l&&null!=d&&(l=k+d);if(null==k||null==l)throw new G(2,2,2001);c=new Sd(k+c,l+c,m);if((g=vo(b,"region",g,""))&&g.getAttribute("xml:id")){var n=g.getAttribute("xml:id");h=h.filter(function(b){return b.id==n});c.region=h[0]}e=vo(b,"smpte:backgroundImage",
599
- e,"#");wo(c,b,g,e,f);return c}
600
- function wo(b,c,d,e,f){"rtl"==xo(c,d,f,"direction")&&(b.direction="rtl");var g=xo(c,d,f,"writingMode");"tb"==g||"tblr"==g?b.writingMode="vertical-lr":"tbrl"==g?b.writingMode="vertical-rl":"rltb"==g||"rl"==g?b.direction="rtl":g&&(b.direction=Ud);if(g=xo(c,d,f,"textAlign"))b.positionAlign=so[g],b.lineAlign=ro[g],b.textAlign=de[g.toUpperCase()];if(g=xo(c,d,f,"displayAlign"))b.displayAlign=ee[g.toUpperCase()];if(g=xo(c,d,f,"color"))b.color=g;if(g=xo(c,d,f,"backgroundColor"))b.backgroundColor=g;if(g=xo(c,
601
- d,f,"fontFamily"))b.fontFamily=g;(g=xo(c,d,f,"fontWeight"))&&"bold"==g&&(b.fontWeight=700);(g=xo(c,d,f,"wrapOption"))&&"noWrap"==g&&(b.wrapLine=!1);(g=xo(c,d,f,"lineHeight"))&&g.match(ko)&&(b.lineHeight=g);(g=xo(c,d,f,"fontSize"))&&g.match(ko)&&(b.fontSize=g);if(g=xo(c,d,f,"fontStyle"))b.fontStyle=ge[g.toUpperCase()];if(e){g=e.getAttribute("imagetype");var h=e.getAttribute("encoding");e=e.textContent.trim();"PNG"==g&&"Base64"==h&&e&&(b.backgroundImage="data:image/png;base64,"+e)}(d=io(d,f,"textDecoration"))&&
602
- yo(b,d);(c=zo(c,f,"textDecoration"))&&yo(b,c)}
603
- function yo(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&cc(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&cc(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
604
- b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&cc(b.textDecoration,"overline")}}function xo(b,c,d,e){return(b=zo(b,d,e))?b:io(c,d,e)}function io(b,c,d){for(var e=fo(b),f=0;f<e.length;f++){var g=O.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=vo(b,"style",c,""))?O.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
605
- function zo(b,c,d){return(b=vo(b,"style",c,""))?O.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function vo(b,c,d,e){if(!b||1>d.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b<d.length;b++)if(e+d[b].getAttribute("xml:id")==c){f=d[b];break}return f}
606
- function uo(b,c){var d=null;if(lo.test(b)){d=lo.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else mo.test(b)?d=Ao(mo,b):no.test(b)?d=Ao(no,b):oo.test(b)?(d=oo.exec(b),d=Number(d[1])/c.frameRate):po.test(b)?(d=po.exec(b),d=Number(d[1])/c.a):qo.test(b)&&(d=Ao(qo,b));return d}
607
- function Ao(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function eo(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=Number(b[1])/Number(b[2]))}ke["application/ttml+xml"]=co;function Bo(){this.a=new co}Bo.prototype.parseInit=function(b){var c=!1;(new R).M("moov",bg).M("trak",bg).M("mdia",bg).M("minf",bg).M("stbl",bg).ua("stsd",cg).M("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new G(2,2,2007);};Bo.prototype.parseMedia=function(b,c){var d=!1,e=[];(new R).M("mdat",dg(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new G(2,2,2007);return e};ke['application/mp4; codecs="stpp"']=Bo;
608
- ke['application/mp4; codecs="stpp.TTML.im1t"']=Bo;function Co(){}Co.prototype.parseInit=function(){};
609
- Co.prototype.parseMedia=function(b,c){var d=Hc(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");d=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new G(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes("X-TIMESTAMP-MAP"))){var f=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=d[0].match(/MPEGTS:(\d+)/m);if(f&&g){e=Do(new ah(f[1]));if(null==e)throw new G(2,2,2E3);e=c.periodStart+(Number(g[1])/9E4-e)}}g=[];var h=d[0].split("\n");for(f=1;f<h.length;f++)if(/^Region:/.test(h[f])){var k=
610
- new ah(h[f]),l=new Vd;dh(k);bh(k);for(var m=dh(k);m;){var n=l,q=m;(m=/^id=(.*)$/.exec(q))?n.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(q))?n.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(q))?(n.height=Number(m[1]),n.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.regionAnchorX=Number(m[1]),n.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.viewportAnchorX=Number(m[1]),n.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(q)&&(n.scroll=
611
- "up");bh(k);m=dh(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;q=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));n=new ah(m[0]);var x=Do(n),w=ch(n,/[ \t]+--\x3e[ \t]+/g),A=Do(n);if(null==x||null==w||null==A)throw new G(2,2,2001);m=new Sd(x+q,A+q,m.slice(1).join("\n").trim());bh(n);for(q=dh(n);q;)Eo(m,q,h),bh(n),q=dh(n);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
612
- function Eo(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=Xd:b.textAlign=de[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==
613
- c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=Fo(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=fe[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=Zd,b.line=Number(d[1]),d[2]&&(b.lineAlign=fe[d[2].toUpperCase()])}function Fo(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
614
- function Do(b){b=ch(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}ke["text/vtt"]=Co;ke['text/vtt; codecs="vtt"']=Co;function Go(){this.a=null}Go.prototype.parseInit=function(b){var c=!1;(new R).M("moov",bg).M("trak",bg).M("mdia",bg).ua("mdhd",function(b){0==b.version?(b.reader.R(4),b.reader.R(4),this.a=b.reader.J(),b.reader.R(4)):(b.reader.R(8),b.reader.R(8),this.a=b.reader.J(),b.reader.R(8));b.reader.R(4)}.bind(this)).M("minf",bg).M("stbl",bg).ua("stsd",cg).M("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new G(2,2,2008);if(!c)throw new G(2,2,2008);};
615
- Go.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new G(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,n=null;(new R).M("moof",bg).M("traf",bg).ua("tfdt",function(b){k=!0;e=0==b.version?b.reader.J():b.reader.Rb()}).ua("tfhd",function(b){var c=b.flags;b=b.reader;b.R(4);c&1&&b.R(8);c&2&&b.R(4);n=c&8?b.J():null}).ua("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.J();d&1&&b.R(4);d&4&&b.R(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,Nd:null};d&256&&
616
- (k.duration=b.J());d&512&&(k.sampleSize=b.J());d&1024&&b.R(4);d&2048&&(k.Nd=0==c?b.J():b.Ke());g.push(k)}f=g}).M("mdat",dg(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new G(2,2,2008);var q=e,x=new DataView(g.buffer,g.byteOffset,g.byteLength),w=new Q(x,0);f.forEach(function(b){var f=b.duration||n,g=b.Nd?e+b.Nd:q;q=g+(f||0);var k=0;do{var l=w.J();k+=l;var m=w.J(),x=null;"vttc"==eg(m)?8<l&&(x=w.rb(l-8)):w.R(l-8);f&&x&&h.push(Ho(x,c.periodStart+g/d.a,c.periodStart+q/d.a))}while(b.sampleSize&&
617
- k<b.sampleSize)});return h.filter(Jd.Ya)};function Ho(b,c,d){var e,f,g;(new R).M("payl",dg(function(b){e=Hc(b)})).M("iden",dg(function(b){f=Hc(b)})).M("sttg",dg(function(b){g=Hc(b)})).parse(b);return e?Io(e,f,g,c,d):null}function Io(b,c,d,e,f){b=new Sd(e,f,b);c&&(b.id=c);if(d)for(c=new ah(d),d=dh(c);d;)Eo(b,d,[]),bh(c),d=dh(c);return b}ke['application/mp4; codecs="wvtt"']=Go;function W(b){return document.createElement(b)}z("shaka.util.Dom.createHTMLElement",W);z("shaka.util.Dom.createVideoElement",function(){var b=document.createElement("video");b.muted=!0;b.width=600;b.height=400;return b});z("shaka.util.Dom.asHTMLElement",function(b){return b});z("shaka.util.Dom.asHTMLMediaElement",function(b){return b});function Jo(b){for(;b.firstChild;)b.removeChild(b.firstChild)}z("shaka.util.Dom.removeAllChildren",Jo);/*
587
+ p.Nd=function(b,c){if(this.a)this.a.then(this.Nd.bind(this,b,c))["catch"](this.Nd.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=Kc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);d=Sc(e.keys[0].k);e=Sc(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=Nn("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
588
+ function Vn(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new A("keystatuseschange"))}p.generateRequest=function(b,c){return Xn(this,c,null)};p.load=function(b){return"persistent-license"==this.g?Xn(this,null,b):Promise.reject(Error("Not a persistent session."))};p.update=function(b){var c=new J;this.Nd(c,b);return c};
589
+ p.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=Nn("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};p.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Wn(){this.size=0;this.a=void 0}var Yn;p=Wn.prototype;p.forEach=function(b){this.a&&b(this.a,Yn)};p.get=function(b){if(this.has(b))return this.a};
590
+ p.has=function(b){var c=Yn;return this.a&&Vc(new Uint8Array(b),new Uint8Array(c))?!0:!1};p.entries=function(){};p.keys=function(){};p.values=function(){};
591
+ bn(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Mn="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;Yn=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=On;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Qn;window.MediaKeys=Sn;window.MediaKeySystemAccess=
592
+ Pn}});function Zn(b){b=b.target;if("picture-in-picture"==b.webkitPresentationMode){document.pictureInPictureElement=b;var c=new Event("enterpictureinpicture");b.dispatchEvent(c)}else document.pictureInPictureElement==b&&(document.pictureInPictureElement=null),c=new Event("leavepictureinpicture"),b.dispatchEvent(c)}
593
+ function $n(){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 ao(){var b=document.pictureInPictureElement;return b?(b.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
594
+ bn(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;b.requestPictureInPicture&&document.exitPictureInPicture||!b.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,b.requestPictureInPicture=$n,document.exitPictureInPicture=ao,document.addEventListener("webkitpresentationmodechanged",Zn,!0))}});bn(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function bo(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}bn(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=bo)}});function co(b,c,d){return new window.TextTrackCue(b,c,d)}function eo(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}bn(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=co;else if(6==b)window.VTTCue=eo;else{try{var c=!!co(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=co)}}});function fo(){}fo.prototype.parseInit=function(){};
595
+ fo.prototype.parseMedia=function(b,c){var d=Kc(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(ia){throw new I(2,2,2005);}if(g){if(g=g.getElementsByTagName("tt")[0]){var h=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var k=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var l=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var m=R.getAttributeNS(g,"http://www.w3.org/ns/ttml#parameter","tickRate");
596
+ d=g.getAttribute("xml:space")||"default";f=g.getAttribute("tts:extent")}else throw new I(2,2,2005);if("default"!=d&&"preserve"!=d)throw new I(2,2,2005);d="default"==d;h=new go(h,k,l,m);k=ho(g.getElementsByTagName("metadata")[0]);l=ho(g.getElementsByTagName("styling")[0]);m=ho(g.getElementsByTagName("layout")[0]);for(var n=[],q=0;q<m.length;q++){var w=m[q],x=l,C=f;var E=new Wd;var G=w.getAttribute("xml:id");if(G){E.id=G;G=null;C&&(G=io.exec(C)||jo.exec(C));C=G?Number(G[1]):null;G=G?Number(G[2]):null;
597
+ var H,ba;if(H=ko(w,x,"extent"))H=(ba=io.exec(H))||jo.exec(H),null!=H&&(E.width=null!=C?100*Number(H[1])/C:Number(H[1]),E.height=null!=G?100*Number(H[2])/G:Number(H[2]),E.widthUnits=ba||null!=C?ie:0,E.heightUnits=ba||null!=G?ie:0);if(w=ko(w,x,"origin"))H=(ba=io.exec(w))||jo.exec(w),null!=H&&(E.viewportAnchorX=null!=G?100*Number(H[1])/G:Number(H[1]),E.viewportAnchorY=null!=C?100*Number(H[2])/C:Number(H[2]),E.viewportAnchorUnits=ba||null!=C?ie:0)}else E=null;E&&n.push(E)}f=ho(g.getElementsByTagName("body")[0]);
598
+ for(g=0;g<f.length;g++)(q=lo(f[g],c.periodStart,h,k,l,m,n,d))&&e.push(q)}return e};
599
+ var io=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,mo=/^(\d+px|\d+em)$/,jo=/^(\d+)px (\d+)px$/,no=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,oo=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,po=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,qo=/^(\d*(?:\.\d*)?)f$/,ro=/^(\d*(?:\.\d*)?)t$/,so=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,to={left:ae,center:"center",right:"end",start:ae,end:"end"},uo={left:"line-left",center:"center",right:"line-right"};
600
+ function ho(b){var c=[];if(!b)return c;for(var d=b.childNodes,e=0;e<d.length;e++){var f="span"==d[e].nodeName&&"p"==b.nodeName;d[e].nodeType!=Node.ELEMENT_NODE||"br"==d[e].nodeName||f||(f=ho(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function vo(b,c){for(var d=b.childNodes,e=0;e<d.length;e++)if("br"==d[e].nodeName&&0<e)d[e-1].textContent+="\n";else if(0<d[e].childNodes.length)vo(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
601
+ function lo(b,c,d,e,f,g,h,k){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;vo(b,k);k=wo(b.getAttribute("begin"),d);var l=wo(b.getAttribute("end"),d);d=wo(b.getAttribute("dur"),d);var m=b.textContent;null==l&&null!=d&&(l=k+d);if(null==k||null==l)throw new I(2,2,2001);c=new Td(k+c,l+c,m);if((g=xo(b,"region",g,""))&&g.getAttribute("xml:id")){var n=g.getAttribute("xml:id");h=h.filter(function(b){return b.id==n});c.region=h[0]}e=xo(b,"smpte:backgroundImage",
602
+ e,"#");yo(c,b,g,e,f);return c}
603
+ function yo(b,c,d,e,f){"rtl"==zo(c,d,f,"direction")&&(b.direction="rtl");var g=zo(c,d,f,"writingMode");"tb"==g||"tblr"==g?b.writingMode="vertical-lr":"tbrl"==g?b.writingMode="vertical-rl":"rltb"==g||"rl"==g?b.direction="rtl":g&&(b.direction=Vd);if(g=zo(c,d,f,"textAlign"))b.positionAlign=uo[g],b.lineAlign=to[g],b.textAlign=ee[g.toUpperCase()];if(g=zo(c,d,f,"displayAlign"))b.displayAlign=fe[g.toUpperCase()];if(g=zo(c,d,f,"color"))b.color=g;if(g=zo(c,d,f,"backgroundColor"))b.backgroundColor=g;if(g=zo(c,
604
+ d,f,"fontFamily"))b.fontFamily=g;(g=zo(c,d,f,"fontWeight"))&&"bold"==g&&(b.fontWeight=700);(g=zo(c,d,f,"wrapOption"))&&"noWrap"==g&&(b.wrapLine=!1);(g=zo(c,d,f,"lineHeight"))&&g.match(mo)&&(b.lineHeight=g);(g=zo(c,d,f,"fontSize"))&&g.match(mo)&&(b.fontSize=g);if(g=zo(c,d,f,"fontStyle"))b.fontStyle=he[g.toUpperCase()];if(e){g=e.getAttribute("imagetype");var h=e.getAttribute("encoding");e=e.textContent.trim();"PNG"==g&&"Base64"==h&&e&&(b.backgroundImage="data:image/png;base64,"+e)}(d=ko(d,f,"textDecoration"))&&
605
+ Ao(b,d);(c=Bo(c,f,"textDecoration"))&&Ao(b,c)}
606
+ function Ao(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&bc(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&bc(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
607
+ b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&bc(b.textDecoration,"overline")}}function zo(b,c,d,e){return(b=Bo(b,d,e))?b:ko(c,d,e)}function ko(b,c,d){for(var e=ho(b),f=0;f<e.length;f++){var g=R.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=xo(b,"style",c,""))?R.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
608
+ function Bo(b,c,d){return(b=xo(b,"style",c,""))?R.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function xo(b,c,d,e){if(!b||1>d.length)return null;var f=null,g=b;for(b=null;g&&!(b=g.getAttribute(c))&&(g=g.parentNode,g instanceof Element););if(c=b)for(b=0;b<d.length;b++)if(e+d[b].getAttribute("xml:id")==c){f=d[b];break}return f}
609
+ function wo(b,c){var d=null;if(no.test(b)){d=no.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else oo.test(b)?d=Co(oo,b):po.test(b)?d=Co(po,b):qo.test(b)?(d=qo.exec(b),d=Number(d[1])/c.frameRate):ro.test(b)?(d=ro.exec(b),d=Number(d[1])/c.a):so.test(b)&&(d=Co(so,b));return d}
610
+ function Co(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function go(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=Number(b[1])/Number(b[2]))}le["application/ttml+xml"]=fo;function Do(){this.a=new fo}Do.prototype.parseInit=function(b){var c=!1;(new Q).L("moov",Of).L("trak",Of).L("mdia",Of).L("minf",Of).L("stbl",Of).va("stsd",Pf).L("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new I(2,2,2007);};Do.prototype.parseMedia=function(b,c){var d=!1,e=[];(new Q).L("mdat",Qf(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new I(2,2,2007);return e};le['application/mp4; codecs="stpp"']=Do;
611
+ le['application/mp4; codecs="stpp.TTML.im1t"']=Do;function Eo(){}Eo.prototype.parseInit=function(){};
612
+ Eo.prototype.parseMedia=function(b,c){var d=Kc(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");d=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new I(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes("X-TIMESTAMP-MAP"))){var f=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=d[0].match(/MPEGTS:(\d+)/m);if(f&&g){e=Fo(new dh(f[1]));if(null==e)throw new I(2,2,2E3);e=c.periodStart+(Number(g[1])/9E4-e)}}g=[];var h=d[0].split("\n");for(f=1;f<h.length;f++)if(/^Region:/.test(h[f])){var k=
613
+ new dh(h[f]),l=new Wd;gh(k);eh(k);for(var m=gh(k);m;){var n=l,q=m;(m=/^id=(.*)$/.exec(q))?n.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(q))?n.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(q))?(n.height=Number(m[1]),n.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.regionAnchorX=Number(m[1]),n.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(q))?(n.viewportAnchorX=Number(m[1]),n.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(q)&&(n.scroll=
614
+ "up");eh(k);m=gh(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;q=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));n=new dh(m[0]);var w=Fo(n),x=fh(n,/[ \t]+--\x3e[ \t]+/g),C=Fo(n);if(null==w||null==x||null==C)throw new I(2,2,2001);m=new Td(w+q,C+q,m.slice(1).join("\n").trim());eh(n);for(q=gh(n);q;)Go(m,q,h),eh(n),q=gh(n);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
615
+ function Go(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=Yd:b.textAlign=ee[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==
616
+ c?"line-right":"center");else if(e=/^region:(.*)$/.exec(c)){if(c=Ho(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=ge[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=$d,b.line=Number(d[1]),d[2]&&(b.lineAlign=ge[d[2].toUpperCase()])}function Ho(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
617
+ function Fo(b){b=fh(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}le["text/vtt"]=Eo;le['text/vtt; codecs="vtt"']=Eo;function Io(){this.a=null}Io.prototype.parseInit=function(b){var c=!1;(new Q).L("moov",Of).L("trak",Of).L("mdia",Of).va("mdhd",function(b){0==b.version?(b.reader.R(4),b.reader.R(4),this.a=b.reader.J(),b.reader.R(4)):(b.reader.R(8),b.reader.R(8),this.a=b.reader.J(),b.reader.R(8));b.reader.R(4)}.bind(this)).L("minf",Of).L("stbl",Of).va("stsd",Pf).L("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new I(2,2,2008);if(!c)throw new I(2,2,2008);};
618
+ Io.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new I(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,n=null;(new Q).L("moof",Of).L("traf",Of).va("tfdt",function(b){k=!0;e=0==b.version?b.reader.J():b.reader.Rb()}).va("tfhd",function(b){var c=b.flags;b=b.reader;b.R(4);c&1&&b.R(8);c&2&&b.R(4);n=c&8?b.J():null}).va("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.J();d&1&&b.R(4);d&4&&b.R(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,Pd:null};d&256&&
619
+ (k.duration=b.J());d&512&&(k.sampleSize=b.J());d&1024&&b.R(4);d&2048&&(k.Pd=0==c?b.J():b.Me());g.push(k)}f=g}).L("mdat",Qf(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new I(2,2,2008);var q=e,w=new DataView(g.buffer,g.byteOffset,g.byteLength),x=new P(w,0);f.forEach(function(b){var f=b.duration||n,g=b.Pd?e+b.Pd:q;q=g+(f||0);var k=0;do{var l=x.J();k+=l;var m=x.J(),w=null;"vttc"==Rf(m)?8<l&&(w=x.rb(l-8)):x.R(l-8);f&&w&&h.push(Jo(w,c.periodStart+g/d.a,c.periodStart+q/d.a))}while(b.sampleSize&&
620
+ k<b.sampleSize)});return h.filter(Kd.Ya)};function Jo(b,c,d){var e,f,g;(new Q).L("payl",Qf(function(b){e=Kc(b)})).L("iden",Qf(function(b){f=Kc(b)})).L("sttg",Qf(function(b){g=Kc(b)})).parse(b);return e?Ko(e,f,g,c,d):null}function Ko(b,c,d,e,f){b=new Td(e,f,b);c&&(b.id=c);if(d)for(c=new dh(d),d=gh(c);d;)Go(b,d,[]),eh(c),d=gh(c);return b}le['application/mp4; codecs="wvtt"']=Io;function X(b){return document.createElement(b)}z("shaka.util.Dom.createHTMLElement",X);z("shaka.util.Dom.createVideoElement",function(){var b=document.createElement("video");b.muted=!0;b.width=600;b.height=400;return b});z("shaka.util.Dom.asHTMLElement",function(b){return b});z("shaka.util.Dom.asHTMLMediaElement",function(b){return b});function Lo(b){for(;b.firstChild;)b.removeChild(b.firstChild)}z("shaka.util.Dom.removeAllChildren",Lo);/*
618
621
 
619
622
  Copyright 2013 Ali Al Dallal
620
623
 
@@ -638,7 +641,7 @@ k<b.sampleSize)});return h.filter(Jd.Ya)};function Ho(b,c,d){var e,f,g;(new R).M
638
641
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
639
642
  SOFTWARE.
640
643
  */
641
- for(var Ko={ach:{h:"Lwo",i:"Acholi"},ady:{h:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",i:"Adyghe"},af:{h:"Afrikaans",i:"Afrikaans"},"af-NA":{h:"Afrikaans (Namibia)",i:"Afrikaans (Namibia)"},"af-ZA":{h:"Afrikaans (South Africa)",i:"Afrikaans (South Africa)"},ak:{h:"T\u0255\u0265i",i:"Akan"},ar:{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic"},"ar-AR":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic"},"ar-MA":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic (Morocco)"},
644
+ for(var Mo={ach:{h:"Lwo",i:"Acholi"},ady:{h:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",i:"Adyghe"},af:{h:"Afrikaans",i:"Afrikaans"},"af-NA":{h:"Afrikaans (Namibia)",i:"Afrikaans (Namibia)"},"af-ZA":{h:"Afrikaans (South Africa)",i:"Afrikaans (South Africa)"},ak:{h:"T\u0255\u0265i",i:"Akan"},ar:{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic"},"ar-AR":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic"},"ar-MA":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic (Morocco)"},
642
645
  "ar-SA":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",i:"Arabic (Saudi Arabia)"},"ay-BO":{h:"Aymar aru",i:"Aymara"},az:{h:"Az\u0259rbaycan dili",i:"Azerbaijani"},"az-AZ":{h:"Az\u0259rbaycan dili",i:"Azerbaijani"},"be-BY":{h:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",i:"Belarusian"},bg:{h:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",i:"Bulgarian"},"bg-BG":{h:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
643
646
  i:"Bulgarian"},bn:{h:"\u09ac\u09be\u0982\u09b2\u09be",i:"Bengali"},"bn-IN":{h:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",i:"Bengali (India)"},"bn-BD":{h:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",i:"Bengali (Bangladesh)"},"bs-BA":{h:"Bosanski",i:"Bosnian"},ca:{h:"Catal\u00e0",i:"Catalan"},"ca-ES":{h:"Catal\u00e0",i:"Catalan"},cak:{h:"Maya Kaqchikel",i:"Kaqchikel"},"ck-US":{h:"\u13e3\u13b3\u13a9 (tsalagi)",i:"Cherokee"},cs:{h:"\u010ce\u0161tina",
644
647
  i:"Czech"},"cs-CZ":{h:"\u010ce\u0161tina",i:"Czech"},cy:{h:"Cymraeg",i:"Welsh"},"cy-GB":{h:"Cymraeg",i:"Welsh"},da:{h:"Dansk",i:"Danish"},"da-DK":{h:"Dansk",i:"Danish"},de:{h:"Deutsch",i:"German"},"de-AT":{h:"Deutsch (\u00d6sterreich)",i:"German (Austria)"},"de-DE":{h:"Deutsch (Deutschland)",i:"German (Germany)"},"de-CH":{h:"Deutsch (Schweiz)",i:"German (Switzerland)"},dsb:{h:"Dolnoserb\u0161\u0107ina",i:"Lower Sorbian"},el:{h:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",i:"Greek"},"el-GR":{h:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
@@ -659,36 +662,39 @@ i:"Slovak"},"sk-SK":{h:"Sloven\u010dina (Slovakia)",i:"Slovak (Slovakia)"},sl:{h
659
662
  sw:{h:"Kiswahili",i:"Swahili"},"sw-KE":{h:"Kiswahili",i:"Swahili (Kenya)"},ta:{h:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",i:"Tamil"},"ta-IN":{h:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",i:"Tamil"},te:{h:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",i:"Telugu"},"te-IN":{h:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",i:"Telugu"},tg:{h:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",i:"Tajik"},"tg-TJ":{h:"\u0442\u043e\u04b7\u0438\u043a\u04e3",i:"Tajik"},th:{h:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
660
663
  i:"Thai"},"th-TH":{h:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",i:"Thai (Thailand)"},tl:{h:"Filipino",i:"Filipino"},"tl-PH":{h:"Filipino",i:"Filipino"},tlh:{h:"tlhIngan-Hol",i:"Klingon"},tr:{h:"T\u00fcrk\u00e7e",i:"Turkish"},"tr-TR":{h:"T\u00fcrk\u00e7e",i:"Turkish"},"tt-RU":{h:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",i:"Tatar"},uk:{h:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",i:"Ukrainian"},"uk-UA":{h:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
661
664
  i:"Ukrainian"},ur:{h:"\u0627\u0631\u062f\u0648",i:"Urdu"},"ur-PK":{h:"\u0627\u0631\u062f\u0648",i:"Urdu"},uz:{h:"O'zbek",i:"Uzbek"},"uz-UZ":{h:"O'zbek",i:"Uzbek"},vi:{h:"Ti\u1ebfng Vi\u1ec7t",i:"Vietnamese"},"vi-VN":{h:"Ti\u1ebfng Vi\u1ec7t",i:"Vietnamese"},"xh-ZA":{h:"isiXhosa",i:"Xhosa"},yi:{h:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",i:"Yiddish"},"yi-DE":{h:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",i:"Yiddish (German)"},zh:{h:"\u4e2d\u6587",i:"Chinese"},"zh-HANS":{h:"\u4e2d\u6587\u7b80\u4f53",
662
- i:"Chinese Simplified"},"zh-HANT":{h:"\u4e2d\u6587\u7e41\u9ad4",i:"Chinese Traditional"},"zh-CN":{h:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",i:"Chinese Simplified (China)"},"zh-HK":{h:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",i:"Chinese Traditional (Hong Kong)"},"zh-SG":{h:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",i:"Chinese Simplified (Singapore)"},"zh-TW":{h:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",i:"Chinese Traditional (Taiwan)"},"zu-ZA":{h:"isiZulu",i:"Zulu"}},Lo=r(Object.keys(Ko)),Mo=Lo.next();!Mo.done;Mo=
663
- Lo.next()){var No=Mo.value;Ko[No.toLowerCase()]=Ko[No]};function X(b,c){this.parent=b;this.controls=c;this.eventManager=new L;this.localization=this.controls.v;this.player=this.controls.Wa();this.video=this.controls.bc()}z("shaka.ui.Element",X);X.prototype.destroy=function(){this.eventManager.release();this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null;return Promise.resolve()};X.prototype.destroy=X.prototype.destroy;function Oo(b,c,d,e,f,g,h){var k=b.filter(function(b){return 1==b.active})[0];b=Po(c,"shaka-back-to-overflow-button");Qo(c);c.appendChild(b);d.forEach(function(b){var d=W("button");d.addEventListener("click",function(){e(b)});var l=W("span");l.textContent=Ro(b,h);d.appendChild(l);f&&b==k.language&&(d.appendChild(So()),l.classList.add("shaka-chosen-item"),d.setAttribute("aria-selected","true"),g.textContent=l.textContent);c.appendChild(d)})}
664
- function Ro(b,c){if(!b&&!c)return"";switch(b){case "mul":return c.resolve("MULTIPLE_LANGUAGES");case "und":return c.resolve("UNDETERMINED_LANGUAGE");case "zxx":return c.resolve("NOT_APPLICABLE")}var d=kb(b);return b in Ko?Ko[b].h:d in Ko?Ko[d].h+" ("+b+")":c.resolve("UNRECOGNIZED_LANGUAGE")+" ("+b+")"};function To(b,c,d,e){X.call(this,b,c);var f=this;this.b=W("div");this.b.classList.add("shaka-range-container");this.b.classList.add.apply(this.b.classList,Oa(d));this.c=!1;this.a=document.createElement("input");this.a.classList.add("shaka-range-element");this.a.classList.add.apply(this.a.classList,Oa(e));this.a.type="range";this.a.step="any";this.a.min="0";this.a.max="1";this.a.value="0";this.b.appendChild(this.a);this.parent.appendChild(this.b);this.eventManager.m(this.a,"mousedown",function(){f.c=
665
- !0;f.l()});this.eventManager.m(this.a,"touchstart",function(b){f.c=!0;Uo(f,b);f.l()},{passive:!0});this.eventManager.m(this.a,"input",function(){f.g()});this.eventManager.m(this.a,"touchmove",function(b){Uo(f,b);f.g()});this.eventManager.m(this.a,"touchend",function(b){f.c=!1;Uo(f,b);f.j()});this.eventManager.m(this.a,"mouseup",function(){f.c=!1;f.j()})}ua(To,X);z("shaka.ui.RangeElement",To);To.prototype.l=function(){};To.prototype.g=function(){};To.prototype.j=function(){};
666
- function Vo(b,c){b.c||(b.a.value=c)}function Uo(b,c){c.preventDefault();var d=c.changedTouches[0],e=b.a.getBoundingClientRect();d=b.a.max/e.width*(d.clientX-e.left);d<b.a.min?d=b.a.min:d>b.a.max&&(d=b.a.max);b.a.value=d};z("shaka.ui.Utils.getFirstDescendantWithClassName",function(b,c){return Po(b,c)});function Po(b,c){var d=b.getElementsByClassName(c);return d.length?d[0]:null}function Wo(b){b&&(b=Po(b,"shaka-chosen-item"))&&b.parentElement.focus()}function So(){var b=W("i");b.classList.add("material-icons");b.classList.add("shaka-chosen-item");b.textContent="done";b.setAttribute("aria-hidden","true");return b}
667
- function Y(b,c){b&&(c?(b.classList.add("shaka-displayed"),b.classList.remove("shaka-hidden")):(b.classList.add("shaka-hidden"),b.classList.remove("shaka-displayed")))}z("shaka.ui.Utils.setDisplay",Y);function Qo(b){for(;b.firstChild;)b.removeChild(b.firstChild)}z("shaka.ui.Utils.removeAllChildren",Qo);function Xo(b,c){To.call(this,b,c,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var d=this;this.f=new F(function(){d.video.currentTime=parseFloat(d.a.value)});this.eventManager.m(this.localization,"locale-updated",function(){return Yo(d)});this.eventManager.m(this.localization,"locale-changed",function(){return Yo(d)});Vo(this,this.video.currentTime);Zo(this);Yo(this)}ua(Xo,To);z("shaka.ui.SeekBar",Xo);
668
- Xo.prototype.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:return b.f&&(b.f.stop(),b.f=null),u(d,To.prototype.destroy.call(b),0)}})})};Xo.prototype.l=function(){this.video.pause()};Xo.prototype.g=function(){this.video.duration&&(Zo(this),this.f.S(.125))};Xo.prototype.j=function(){this.f.Oa();this.video.play()};
669
- function Zo(b){var c=parseFloat(b.a.value),d=b.video.buffered.length,e=d?b.video.buffered.start(0):0,f=d?b.video.buffered.end(d-1):0,g=b.player.Tb(),h=g.end-g.start,k=g.end;b.a.min=g.start;b.a.max=k;b.player.V()&&5>h?Y(b.b,!1):(Y(b.b,!0),k=["to right"],0==d?k.push("#000 0%"):(d=(Math.max(e,g.start)-g.start)/h||0,f=(Math.min(f,g.end)-g.start)/h||0,c=(Math.min(Math.max(c,g.start),g.end)-g.start)/h||0,k.push("rgba(255, 255, 255, 0.3) "+100*d+"%"),k.push("rgb(255, 255, 255) "+100*d+"%"),k.push("rgb(255, 255, 255) "+
670
- 100*c+"%"),k.push("rgba(255, 255, 255, 0.54) "+100*c+"%"),k.push("rgba(255, 255, 255, 0.54) "+100*f+"%"),k.push("rgba(255, 255, 255, 0.3) "+100*f+"%")),b.b.style.background="linear-gradient("+k.join(",")+")")}function Yo(b){b.a.setAttribute("aria-label",b.localization.resolve("SEEK"))};function Z(b,c,d,e){var f=this;cb.call(this);this.I=!0;this.ba=!1;this.w=e;this.g=new N(d,b,this.w.castReceiverAppId);this.sa=!0;this.a=this.g.bc();this.Fa=d;this.o=this.g.Wa();this.ea=b;this.f=c;this.j=null;this.H=[];this.L=new F(function(){f.f.style.cursor="none";f.a.paused||f.ba?$o(f,1):$o(f,0)});this.l=new F(function(){for(var b=r(f.H),c=b.next();!c.done;c=b.next())Y(c.value,!1)});this.qa=new F(function(){ap(f)&&bp(f)});this.u=null;this.Da=[];this.v=cp();this.b=new L;this.configure(this.w);dp(this);
671
- ep(this);this.U=new Set;fp(this);this.qa.Na(.125)}Xa(Z,cb);z("shaka.ui.Controls",Z);var gp=new Map;
672
- Z.prototype.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:b.b&&(b.b.release(),b.b=null);b.L&&(b.L.stop(),b.L=null);b.l&&(b.l.stop(),b.l=null);b.qa&&(b.qa.stop(),b.qa=null);if(!b.g){d.C(2);break}return u(d,b.g.destroy(),3);case 3:b.g=null;case 2:if(!b.ea){d.C(4);break}return u(d,b.ea.destroy(),5);case 5:b.ea=null;case 4:return b.o=null,b.Fa=null,b.a=null,b.v=null,b.U.clear(),u(d,Promise.all(b.Da.map(function(b){return b.destroy()})),6);case 6:b.Da=[];
673
- if(b.j)return u(d,b.j.destroy(),0);d.C(0)}})})};Z.prototype.destroy=Z.prototype.destroy;function hp(b,c){gp.set(b,c)}Z.registerElement=hp;Z.prototype.nf=function(b){this.sa=b;fp(this)};Z.prototype.allowCast=Z.prototype.nf;Z.prototype.dg=function(){this.Lb()};Z.prototype.loadComplete=Z.prototype.dg;
674
- Z.prototype.configure=function(b){this.w=b;this.g.Yd(b.castReceiverAppId);this.c?(Jo(this.c),this.f.removeChild(this.D)):ip(this);this.j&&(this.j.destroy(),this.j=null);this.f.classList.add("shaka-video-container");this.a.classList.add("shaka-video");this.Ea=W("div");this.Ea.classList.add("shaka-play-button-container");this.c.appendChild(this.Ea);this.F=W("button");this.F.classList.add("shaka-play-button");this.Ea.appendChild(this.F);this.Lb();this.D=W("div");this.D.classList.add("shaka-spinner-container");
675
- this.f.appendChild(this.D);var c=W("div");c.classList.add("shaka-spinner");this.D.appendChild(c);b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("class","shaka-spinner-svg");b.setAttribute("viewBox","0 0 30 30");c.appendChild(b);c=document.createElementNS("http://www.w3.org/2000/svg","circle");c.setAttribute("class","shaka-spinner-path");c.setAttribute("cx","15");c.setAttribute("cy","15");c.setAttribute("r","14.5");c.setAttribute("fill","none");c.setAttribute("stroke-width",
676
- "1");c.setAttribute("stroke-miterlimit","10");b.appendChild(c);this.W=W("div");this.W.classList.add("shaka-bottom-controls");this.c.appendChild(this.W);this.K=W("div");this.K.classList.add("shaka-controls-button-panel");this.K.classList.add("shaka-no-propagation");this.K.classList.add("shaka-show-controls-on-mouse-over");this.W.appendChild(this.K);for(b=0;b<this.w.controlPanelElements.length;b++)c=this.w.controlPanelElements[b],gp.get(c)?(c=gp.get(c),this.Da.push(c.create(this.K,this))):Za("Unrecognized control panel element requested:",
677
- c);this.H=Array.from(this.f.getElementsByClassName("shaka-settings-menu"));if(this.w.addSeekBar)this.j=new Xo(this.W,this);else for(b=r(this.H),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");ep(this)};Z.prototype.configure=Z.prototype.configure;Z.prototype.Gd=function(b){(this.I=b)?(Y(this.c,!0),Y(this.D,this.o.Gb()),this.a.tabIndex=-1,this.a.controls=!1):(Y(this.c,!1),Y(this.D,!1));this.Lb()};Z.prototype.setEnabledShakaControls=Z.prototype.Gd;
678
- Z.prototype.Ue=function(b){this.a.controls=b;this.a.tabIndex=b?0:-1;b&&this.Gd(!1)};Z.prototype.setEnabledNativeControls=Z.prototype.Ue;Z.prototype.Af=function(){return this.g};Z.prototype.getCastProxy=Z.prototype.Af;Z.prototype.Lf=function(){return this.v};Z.prototype.getLocalization=Z.prototype.Lf;Z.prototype.Xf=function(){return this.f};Z.prototype.getVideoContainer=Z.prototype.Xf;Z.prototype.bc=function(){return this.a};Z.prototype.getVideo=Z.prototype.bc;Z.prototype.Kf=function(){return this.Fa};
679
- Z.prototype.getLocalVideo=Z.prototype.Kf;Z.prototype.Wa=function(){return this.o};Z.prototype.getPlayer=Z.prototype.Wa;Z.prototype.Jf=function(){return this.ea};Z.prototype.getLocalPlayer=Z.prototype.Jf;Z.prototype.Df=function(){return this.c};Z.prototype.getControlsContainer=Z.prototype.Df;Z.prototype.Bf=function(){return this.w};Z.prototype.getConfig=Z.prototype.Bf;Z.prototype.cg=function(){return!1};Z.prototype.isSeeking=Z.prototype.cg;Z.prototype.$f=function(){return this.sa};
680
- Z.prototype.isCastAllowed=Z.prototype.$f;Z.prototype.ge=function(){return this.j?parseFloat(this.j.a.value):this.a.currentTime};Z.prototype.getDisplayTime=Z.prototype.ge;Z.prototype.Ve=function(b){this.u=b};Z.prototype.setLastTouchEventTime=Z.prototype.Ve;Z.prototype.yd=function(){this.ba=!0};Z.prototype.overrideCssShowControls=Z.prototype.yd;Z.prototype.uc=function(){return this.H.some(function(b){return b.classList.contains("shaka-displayed")})};Z.prototype.anySettingsMenusAreOpen=Z.prototype.uc;
681
- Z.prototype.gd=function(){this.l.Oa()};Z.prototype.hideSettingsMenus=Z.prototype.gd;function dp(b){b.F.setAttribute("aria-label",b.v.resolve(b.a.paused?"PLAY":"PAUSE"))}function ip(b){b.c=W("div");b.c.classList.add("shaka-controls-container");b.f.appendChild(b.c);b.b.m(b.c,"touchstart",function(c){b.a.duration&&(ap(b)?b.u=Date.now():(b.ec(c),c.preventDefault()))},{passive:!1});b.b.m(b.c,"click",function(){b.I&&(b.uc()?b.l.Oa():jp(b))})}
682
- function ep(b){b.b.m(b.o,"buffering",function(){b.I&&Y(b.D,b.o.Gb())});b.I&&Y(b.D,b.o.Gb());b.b.m(window,"keydown",b.Ae.bind(b));b.b.m(b.a,"play",b.Lb.bind(b));b.b.m(b.a,"pause",b.Lb.bind(b));b.b.m(b.a,"ended",b.Lb.bind(b));for(var c=b.f.getElementsByClassName("shaka-no-propagation"),d=0;d<c.length;d++)b.b.m(c[d],"click",function(b){b.stopPropagation()});c=b.f.getElementsByClassName("shaka-show-controls-on-mouse-over");for(d=0;d<c.length;d++){var e=c[d];b.b.m(e,"mouseover",function(){b.ba=!0});b.b.m(e,
683
- "mouseleave",function(){b.ba=!1})}b.b.m(b.f,"mousemove",b.ec.bind(b));b.b.m(b.f,"touchmove",b.ec.bind(b),{passive:!0});b.b.m(b.f,"touchend",b.ec.bind(b),{passive:!0});b.b.m(b.f,"mouseleave",b.pg.bind(b));b.b.m(b.K,"click",function(){b.l.Oa()});b.b.m(b.g,"caststatuschanged",function(){fp(b)});b.b.m(b.f,"keyup",b.kg.bind(b));b.b.m(b.v,"locale-updated",function(){return dp(b)});b.b.m(b.v,"locale-changed",function(){return dp(b)})}p=Z.prototype;
684
- p.ec=function(b){"mousemove"==b.type&&this.c.classList.remove("shaka-keyboard-navigation");"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?this.u=Date.now():this.u+1E3<Date.now()&&(this.u=null);this.u&&"mousemove"==b.type||(this.f.style.cursor="",this.l.stop(),ap(this)||(bp(this),$o(this,1)),this.L.stop(),"touchend"!=b.type&&"keyup"!=b.type&&this.u||this.L.S(3))};p.pg=function(){this.u||this.L.Oa()};
685
- function jp(b){b.I&&b.a.duration&&(b.o.Vd(),b.a.paused?b.a.play():b.a.pause())}function fp(b){var c=b.g.$();b.dispatchEvent(new B("caststatuschanged",{fg:c}));c?b.c.setAttribute("casting","true"):b.c.removeAttribute("casting")}p.Lb=function(){this.a.ended&&!this.a.paused&&this.a.pause();this.I&&this.a.paused?(this.F.setAttribute("icon","play"),this.F.setAttribute("aria-label",this.v.resolve("PLAY"))):(this.F.setAttribute("icon","pause"),this.F.setAttribute("aria-label",this.v.resolve("PAUSE")))};
686
- p.kg=function(b){var c=b.key,d=document.activeElement,e=d&&d.classList?d.classList.contains("shaka-volume-bar"):!1,f=d&&d.classList&&d.classList.contains("shaka-seek-bar");this.c.contains(d)&&this.ec(b);this.U["delete"](b.keyCode);switch(c){case "ArrowLeft":e||kp(this,this.a.currentTime-5);break;case "ArrowRight":e||kp(this,this.a.currentTime+5);break;case "Home":kp(this,this.o.Tb().start);break;case "End":kp(this,this.o.Tb().end);break;case " ":f&&jp(this)}};
687
- function ap(b){return b.I?b.g&&b.g.$()?!0:null!=b.c.getAttribute("shown"):!1}function kp(b,c){b.a.currentTime=c;ap(b)&&bp(b)}function bp(b){if(b.j)if(Vo(b.j,b.a.currentTime),Zo(b.j),b.j.b.classList.contains("shaka-hidden")){var c=r(b.H);for(d=c.next();!d.done;d=c.next())d.value.classList.add("shaka-low-position")}else{c=r(b.H);for(var d=c.next();!d.done;d=c.next())d.value.classList.remove("shaka-low-position")}b.dispatchEvent(new B("timeandseekrangeupdated"))}
688
- p.Ae=function(b){this.U.add(b.keyCode);var c=this.uc();9==b.keyCode&&(this.c.classList.add("shaka-keyboard-navigation"),this.b.m(window,"mousedown",this.og.bind(this)));27==b.keyCode&&this.l.Oa();c&&this.U.has(9)&&lp(this,b)};
689
- function lp(b,c){var d=b.H.filter(function(b){return b.classList.contains("shaka-displayed")})[0];if(d.childNodes.length){for(var e=d.firstElementChild;e&&e.classList.contains("shaka-hidden");)e=e.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var f=document.activeElement;b.U.has(16)?f==e&&(c.preventDefault(),d.focus()):f==d&&(c.preventDefault(),e.focus())}}p.og=function(){this.b.oa(window,"mousedown");this.b.m(window,"keydown",this.Ae.bind(this))};
690
- function $o(b,c){1==c?b.c.setAttribute("shown","true"):(b.c.removeAttribute("shown"),b.l.S(2))}
691
- function cp(){var b=new E("en");b.Y("ar",new Map([["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],
665
+ i:"Chinese Simplified"},"zh-HANT":{h:"\u4e2d\u6587\u7e41\u9ad4",i:"Chinese Traditional"},"zh-CN":{h:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",i:"Chinese Simplified (China)"},"zh-HK":{h:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",i:"Chinese Traditional (Hong Kong)"},"zh-SG":{h:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",i:"Chinese Simplified (Singapore)"},"zh-TW":{h:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",i:"Chinese Traditional (Taiwan)"},"zu-ZA":{h:"isiZulu",i:"Zulu"}},No=r(Object.keys(Mo)),Oo=No.next();!Oo.done;Oo=
666
+ No.next()){var Po=Oo.value;Mo[Po.toLowerCase()]=Mo[Po]};function Qo(b,c,d,e,f,g,h){var k=b.filter(function(b){return 1==b.active})[0];b=Ro(c,"shaka-back-to-overflow-button");So(c);c.appendChild(b);d.forEach(function(b){var d=X("button");d.addEventListener("click",function(){e(b)});var l=X("span");l.textContent=To(b,h);d.appendChild(l);f&&b==k.language&&(d.appendChild(Uo()),l.classList.add("shaka-chosen-item"),d.setAttribute("aria-selected","true"),g.textContent=l.textContent);c.appendChild(d)})}
667
+ function To(b,c){if(!b&&!c)return"";switch(b){case "mul":return c.resolve("MULTIPLE_LANGUAGES");case "und":return c.resolve("UNDETERMINED_LANGUAGE");case "zxx":return c.resolve("NOT_APPLICABLE")}var d=kb(b);return b in Mo?Mo[b].h:d in Mo?Mo[d].h+" ("+b+")":c.resolve("UNRECOGNIZED_LANGUAGE")+" ("+b+")"};function Y(b,c){this.parent=b;this.controls=c;this.eventManager=new M;this.localization=this.controls.Da;this.player=this.controls.Wa();this.video=this.controls.bc()}z("shaka.ui.Element",Y);Y.prototype.destroy=function(){this.eventManager.release();this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null;return Promise.resolve()};Y.prototype.destroy=Y.prototype.destroy;function Vo(b,c,d,e){Y.call(this,b,c);var f=this;this.b=X("div");this.b.classList.add("shaka-range-container");this.b.classList.add.apply(this.b.classList,Oa(d));this.c=!1;this.a=document.createElement("input");this.a.classList.add("shaka-range-element");this.a.classList.add.apply(this.a.classList,Oa(e));this.a.type="range";this.a.step="any";this.a.min="0";this.a.max="1";this.a.value="0";this.b.appendChild(this.a);this.parent.appendChild(this.b);this.eventManager.m(this.a,"mousedown",function(){f.c=
668
+ !0;f.l()});this.eventManager.m(this.a,"touchstart",function(b){f.c=!0;Wo(f,b);f.l()},{passive:!0});this.eventManager.m(this.a,"input",function(){f.g()});this.eventManager.m(this.a,"touchmove",function(b){Wo(f,b);f.g()});this.eventManager.m(this.a,"touchend",function(b){f.c=!1;Wo(f,b);f.j()});this.eventManager.m(this.a,"mouseup",function(){f.c=!1;f.j()})}ua(Vo,Y);z("shaka.ui.RangeElement",Vo);Vo.prototype.l=function(){};Vo.prototype.g=function(){};Vo.prototype.j=function(){};
669
+ function Xo(b,c){b.c||(b.a.value=c)}function Wo(b,c){c.preventDefault();var d=c.changedTouches[0],e=b.a.getBoundingClientRect();d=b.a.max/e.width*(d.clientX-e.left);d<b.a.min?d=b.a.min:d>b.a.max&&(d=b.a.max);b.a.value=d};z("shaka.ui.Utils.getFirstDescendantWithClassName",function(b,c){return Ro(b,c)});function Ro(b,c){var d=b.getElementsByClassName(c);return d.length?d[0]:null}function Yo(b){b&&(b=Ro(b,"shaka-chosen-item"))&&b.parentElement.focus()}function Uo(){var b=X("i");b.classList.add("material-icons");b.classList.add("shaka-chosen-item");b.textContent="done";b.setAttribute("aria-hidden","true");return b}
670
+ function Zo(b,c){b&&(c?(b.classList.add("shaka-displayed"),b.classList.remove("shaka-hidden")):(b.classList.add("shaka-hidden"),b.classList.remove("shaka-displayed")))}z("shaka.ui.Utils.setDisplay",Zo);function So(b){for(;b.firstChild;)b.removeChild(b.firstChild)}z("shaka.ui.Utils.removeAllChildren",So);function $o(b,c){Vo.call(this,b,c,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var d=this;this.f=new F(function(){d.video.currentTime=parseFloat(d.a.value)});this.eventManager.m(this.localization,"locale-updated",function(){return ap(d)});this.eventManager.m(this.localization,"locale-changed",function(){return ap(d)});Xo(this,this.video.currentTime);bp(this);ap(this)}ua($o,Vo);z("shaka.ui.SeekBar",$o);
671
+ $o.prototype.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:return b.f&&(b.f.stop(),b.f=null),u(d,Vo.prototype.destroy.call(b),0)}})})};$o.prototype.l=function(){this.controls.Kd(!0);this.video.pause()};$o.prototype.g=function(){this.video.duration&&(bp(this),this.f.S(.125))};$o.prototype.j=function(){this.f.Ua();this.controls.Kd(!1);this.video.play()};
672
+ function bp(b){var c=parseFloat(b.a.value),d=b.video.buffered.length,e=d?b.video.buffered.start(0):0,f=d?b.video.buffered.end(d-1):0,g=b.player.Tb(),h=g.end-g.start,k=g.end;b.a.min=g.start;b.a.max=k;b.player.U()&&5>h?Zo(b.b,!1):(Zo(b.b,!0),0==d?b.b.style.background="rgba(255, 255, 255, 0.3)":(d=(Math.max(e,g.start)-g.start)/h||0,f=(Math.min(f,g.end)-g.start)/h||0,c=(Math.min(Math.max(c,g.start),g.end)-g.start)/h||0,b.b.style.background="linear-gradient("+["to right","rgba(255, 255, 255, 0.3) "+100*
673
+ d+"%","rgb(255, 255, 255) "+100*d+"%","rgb(255, 255, 255) "+100*c+"%","rgba(255, 255, 255, 0.54) "+100*c+"%","rgba(255, 255, 255, 0.54) "+100*f+"%","rgba(255, 255, 255, 0.3) "+100*f+"%"].join()+")"))}function ap(b){b.a.setAttribute("aria-label",b.localization.resolve("SEEK"))};function Z(b,c,d,e){var f=this;cb.call(this);this.I=!0;this.W=!1;this.l=e;this.g=new O(d,b,this.l.castReceiverAppId);this.sa=!0;this.b=this.g.bc();this.Fa=d;this.o=this.g.Wa();this.ba=b;this.f=c;this.j=null;this.K=!1;this.D=[];this.H=new F(function(){f.f.style.cursor="none";f.b.paused&&!f.K||f.W?cp(f,1):cp(f,0)});this.u=new F(function(){for(var b=r(f.D),c=b.next();!c.done;c=b.next())Zo(c.value,!1)});this.ea=new F(function(){dp(f)&&ep(f)});this.v=null;this.ua=[];this.Da=fp();this.a=new M;this.configure(this.l);
674
+ gp(this);this.M=new Set;hp(this);this.ea.Na(.125)}Xa(Z,cb);z("shaka.ui.Controls",Z);var ip=new Map;
675
+ Z.prototype.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:b.a&&(b.a.release(),b.a=null);b.H&&(b.H.stop(),b.H=null);b.u&&(b.u.stop(),b.u=null);b.ea&&(b.ea.stop(),b.ea=null);if(!b.g){d.C(2);break}return u(d,b.g.destroy(),3);case 3:b.g=null;case 2:if(!b.ba){d.C(4);break}return u(d,b.ba.destroy(),5);case 5:b.ba=null;case 4:return b.o=null,b.Fa=null,b.b=null,b.Da=null,b.M.clear(),u(d,Promise.all(b.ua.map(function(b){return b.destroy()})),6);case 6:b.ua=[];
676
+ if(b.j)return u(d,b.j.destroy(),0);d.C(0)}})})};Z.prototype.destroy=Z.prototype.destroy;function jp(b,c){ip.set(b,c)}Z.registerElement=jp;Z.prototype.qf=function(b){this.sa=b;hp(this)};Z.prototype.allowCast=Z.prototype.qf;Z.prototype.fg=function(){this.Lb()};Z.prototype.loadComplete=Z.prototype.fg;
677
+ Z.prototype.configure=function(b){var c=this;this.l=b;this.g.ae(b.castReceiverAppId);this.j&&(this.j.destroy(),this.j=null);this.Ea&&(this.Ea.destroy(),this.Ea=null);this.c?(Lo(this.c),this.f.removeChild(this.w)):kp(this);lp(this);this.Lb();b=r(this.f.getElementsByClassName("shaka-no-propagation"));for(var d=b.next();!d.done;d=b.next()){d=d.value;var e=function(b){return b.stopPropagation()};this.a.m(d,"click",e);this.a.m(d,"dblclick",e)}b=r(this.f.getElementsByClassName("shaka-show-controls-on-mouse-over"));
678
+ for(d=b.next();!d.done;d=b.next())d=d.value,this.a.m(d,"mouseover",function(){c.W=!0}),this.a.m(d,"mouseleave",function(){c.W=!1})};Z.prototype.configure=Z.prototype.configure;Z.prototype.Hd=function(b){(this.I=b)?(Zo(this.c,!0),Zo(this.w,this.o.Gb()),this.b.tabIndex=-1,this.b.controls=!1):(Zo(this.c,!1),Zo(this.w,!1));this.Lb()};Z.prototype.setEnabledShakaControls=Z.prototype.Hd;Z.prototype.Kd=function(b){this.K=b};Z.prototype.setSeeking=Z.prototype.Kd;
679
+ Z.prototype.We=function(b){this.b.controls=b;this.b.tabIndex=b?0:-1;b&&this.Hd(!1)};Z.prototype.setEnabledNativeControls=Z.prototype.We;Z.prototype.Cf=function(){return this.g};Z.prototype.getCastProxy=Z.prototype.Cf;Z.prototype.Nf=function(){return this.Da};Z.prototype.getLocalization=Z.prototype.Nf;
680
+ Z.prototype.Qd=function(){var b=this;return t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(document.fullscreenElement){document.exitFullscreen();d.C(0);break}Aa(d,3);if(!document.pictureInPictureElement){d.C(5);break}return u(d,document.exitPictureInPicture(),5);case 5:Ca(d,4);break;case 3:e=Da(d),b.dispatchEvent(new A("error",{detail:e}));case 4:return u(d,b.f.requestFullscreen(),0)}})})};Z.prototype.toggleFullScreen=Z.prototype.Qd;Z.prototype.Zf=function(){return this.f};
681
+ Z.prototype.getVideoContainer=Z.prototype.Zf;Z.prototype.bc=function(){return this.b};Z.prototype.getVideo=Z.prototype.bc;Z.prototype.Mf=function(){return this.Fa};Z.prototype.getLocalVideo=Z.prototype.Mf;Z.prototype.Wa=function(){return this.o};Z.prototype.getPlayer=Z.prototype.Wa;Z.prototype.Lf=function(){return this.ba};Z.prototype.getLocalPlayer=Z.prototype.Lf;Z.prototype.Ff=function(){return this.c};Z.prototype.getControlsContainer=Z.prototype.Ff;Z.prototype.Df=function(){return this.l};
682
+ Z.prototype.getConfig=Z.prototype.Df;Z.prototype.eg=function(){return this.K};Z.prototype.isSeeking=Z.prototype.eg;Z.prototype.cg=function(){return this.sa};Z.prototype.isCastAllowed=Z.prototype.cg;Z.prototype.je=function(){return this.j?parseFloat(this.j.a.value):this.b.currentTime};Z.prototype.getDisplayTime=Z.prototype.je;Z.prototype.Xe=function(b){this.v=b};Z.prototype.setLastTouchEventTime=Z.prototype.Xe;Z.prototype.zd=function(){this.W=!0};Z.prototype.overrideCssShowControls=Z.prototype.zd;
683
+ Z.prototype.uc=function(){return this.D.some(function(b){return b.classList.contains("shaka-displayed")})};Z.prototype.anySettingsMenusAreOpen=Z.prototype.uc;Z.prototype.Dc=function(){this.u.Ua()};Z.prototype.hideSettingsMenus=Z.prototype.Dc;
684
+ function lp(b){b.f.classList.add("shaka-video-container");b.b.classList.add("shaka-video");if(b.l.addBigPlayButton){var c=X("div");c.classList.add("shaka-play-button-container");b.c.appendChild(c);b.Ea=new mp(c,b)}b.w=X("div");b.w.classList.add("shaka-spinner-container");b.f.appendChild(b.w);var d=X("div");d.classList.add("shaka-spinner");b.w.appendChild(d);c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("class","shaka-spinner-svg");c.setAttribute("viewBox","0 0 30 30");
685
+ d.appendChild(c);d=document.createElementNS("http://www.w3.org/2000/svg","circle");d.setAttribute("class","shaka-spinner-path");d.setAttribute("cx","15");d.setAttribute("cy","15");d.setAttribute("r","14.5");d.setAttribute("fill","none");d.setAttribute("stroke-width","1");d.setAttribute("stroke-miterlimit","10");c.appendChild(d);np(b);b.D=Array.from(b.f.getElementsByClassName("shaka-settings-menu"));if(b.l.addSeekBar)b.j=new $o(b.V,b);else for(b=r(b.D),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position")}
686
+ function kp(b){b.c=X("div");b.c.classList.add("shaka-controls-container");b.f.appendChild(b.c);b.a.m(b.c,"touchstart",function(c){b.b.duration&&(dp(b)?b.v=Date.now():(b.ec(c),c.preventDefault()))},{passive:!1});b.a.m(b.c,"click",function(){b.I&&(b.uc()?b.u.Ua():op(b))})}
687
+ function np(b){b.V=X("div");b.V.classList.add("shaka-bottom-controls");b.c.appendChild(b.V);b.F=X("div");b.F.classList.add("shaka-controls-button-panel");b.F.classList.add("shaka-no-propagation");b.F.classList.add("shaka-show-controls-on-mouse-over");b.V.appendChild(b.F);b.a.m(b.F,"click",function(){b.Dc()});for(var c=0;c<b.l.controlPanelElements.length;c++){var d=b.l.controlPanelElements[c];ip.get(d)?(d=ip.get(d),b.ua.push(d.create(b.F,b))):Za("Unrecognized control panel element requested:",d)}}
688
+ function gp(b){b.a.m(b.o,"buffering",function(){b.I&&Zo(b.w,b.o.Gb())});b.I&&Zo(b.w,b.o.Gb());b.a.m(window,"keydown",b.Ce.bind(b));b.a.m(b.c,"dblclick",function(){return b.Qd()});b.a.m(b.b,"play",b.Lb.bind(b));b.a.m(b.b,"pause",b.Lb.bind(b));b.a.m(b.b,"ended",b.Lb.bind(b));b.a.m(b.f,"mousemove",b.ec.bind(b));b.a.m(b.f,"touchmove",b.ec.bind(b),{passive:!0});b.a.m(b.f,"touchend",b.ec.bind(b),{passive:!0});b.a.m(b.f,"mouseleave",b.rg.bind(b));b.a.m(b.g,"caststatuschanged",function(){hp(b)});b.a.m(b.f,
689
+ "keyup",b.mg.bind(b));screen.orientation&&b.a.m(screen.orientation,"change",function(){b.b&&0!=b.b.readyState&&!b.g.$()&&(screen.orientation.type.includes("landscape")&&!document.fullscreenElement?b.f.requestFullscreen():screen.orientation.type.includes("portrait")&&document.fullscreenElement&&document.exitFullscreen())})}p=Z.prototype;
690
+ p.ec=function(b){"mousemove"==b.type&&this.c.classList.remove("shaka-keyboard-navigation");"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?this.v=Date.now():this.v+1E3<Date.now()&&(this.v=null);this.v&&"mousemove"==b.type||(this.f.style.cursor="",this.u.stop(),dp(this)||(ep(this),cp(this,1)),this.H.stop(),"touchend"!=b.type&&"keyup"!=b.type&&this.v||this.H.S(3))};p.rg=function(){this.v||this.H.Ua()};
691
+ function op(b){b.I&&b.b.duration&&(b.o.Yd(),b.b.paused?b.b.play():b.b.pause())}function hp(b){var c=b.g.$();b.dispatchEvent(new A("caststatuschanged",{hg:c}));c?b.c.setAttribute("casting","true"):b.c.removeAttribute("casting")}p.Lb=function(){this.b.ended&&!this.b.paused&&this.b.pause()};
692
+ p.mg=function(b){var c=b.key,d=document.activeElement,e=d&&d.classList?d.classList.contains("shaka-volume-bar"):!1,f=d&&d.classList&&d.classList.contains("shaka-seek-bar");this.c.contains(d)&&this.ec(b);this.M["delete"](b.keyCode);switch(c){case "ArrowLeft":e||pp(this,this.b.currentTime-5);break;case "ArrowRight":e||pp(this,this.b.currentTime+5);break;case "Home":pp(this,this.o.Tb().start);break;case "End":pp(this,this.o.Tb().end);break;case " ":f&&op(this)}};
693
+ function dp(b){return b.I?b.g&&b.g.$()?!0:null!=b.c.getAttribute("shown"):!1}function pp(b,c){b.b.currentTime=c;dp(b)&&ep(b)}function ep(b){if(b.j)if(Xo(b.j,b.b.currentTime),bp(b.j),b.j.b.classList.contains("shaka-hidden")){var c=r(b.D);for(d=c.next();!d.done;d=c.next())d.value.classList.add("shaka-low-position")}else{c=r(b.D);for(var d=c.next();!d.done;d=c.next())d.value.classList.remove("shaka-low-position")}b.dispatchEvent(new A("timeandseekrangeupdated"))}
694
+ p.Ce=function(b){this.M.add(b.keyCode);var c=this.uc();9==b.keyCode&&(this.c.classList.add("shaka-keyboard-navigation"),this.a.m(window,"mousedown",this.qg.bind(this)));27==b.keyCode&&this.u.Ua();c&&this.M.has(9)&&qp(this,b)};
695
+ function qp(b,c){var d=b.D.filter(function(b){return b.classList.contains("shaka-displayed")})[0];if(d.childNodes.length){for(var e=d.firstElementChild;e&&e.classList.contains("shaka-hidden");)e=e.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var f=document.activeElement;b.M.has(16)?f==e&&(c.preventDefault(),d.focus()):f==d&&(c.preventDefault(),e.focus())}}p.qg=function(){this.a.oa(window,"mousedown");this.a.m(window,"keydown",this.Ce.bind(this))};
696
+ function cp(b,c){1==c?b.c.setAttribute("shown","true"):(b.c.removeAttribute("shown"),b.u.S(2))}
697
+ function fp(){var b=new D("en");b.Y("ar",new Map([["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],
692
698
  ["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["MORE_SETTINGS","\u0625\u0639\u062f\u0627\u062f\u0627\u062a \u0625\u0636\u0627\u0641\u064a\u0629"],
693
699
  ["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u062a\u0634\u063a\u064a\u0644"],["RESOLUTION",""],["REWIND","\u0625\u0631\u062c\u0627\u0639"],["SEEK",
694
700
  "\u0634\u0631\u064a\u0637 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0628\u062d\u062b"],["SKIP_TO_LIVE","\u0645\u0628\u0627\u0634\u0631"],["UNDETERMINED_LANGUAGE","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629"],["UNMUTE","\u0625\u0644\u063a\u0627\u0621 \u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["UNRECOGNIZED_LANGUAGE","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629"],["VOLUME","\u0627\u0644\u062d\u062c\u0645"]]));b.Y("de",new Map([["AUTO_QUALITY","Automatisch"],["BACK",
@@ -729,59 +735,53 @@ function cp(){var b=new E("en");b.Y("ar",new Map([["AUTO_QUALITY","\u062a\u0644\
729
735
  ["EXIT_PICTURE_IN_PICTURE","\u9000\u51fa\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["FAST_FORWARD","\u5feb\u8fdb"],["FULL_SCREEN","\u5168\u5c4f"],["LANGUAGE","\u8bed\u8a00"],["LIVE","\u76f4\u64ad"],["MORE_SETTINGS","\u66f4\u591a\u8bbe\u7f6e"],["MUTE","\u9759\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u5173\u95ed"],["ON","\u5f00\u542f"],["PAUSE","\u6682\u505c"],["PICTURE_IN_PICTURE","\u753b\u4e2d\u753b"],["PLAY","\u64ad\u653e"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],
730
736
  ["SEEK","\u64ad\u653e\u6ed1\u5757"],["SKIP_TO_LIVE","\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u77e5"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],["UNRECOGNIZED_LANGUAGE","\u672a\u77e5"],["VOLUME","\u97f3\u91cf"]]));b.Y("zh-TW",new Map([["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e\u2026"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u7d50\u675f\u5168\u87a2\u5e55"],["EXIT_PICTURE_IN_PICTURE",
731
737
  "\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["MORE_SETTINGS","\u66f4\u591a\u8a2d\u5b9a"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND","\u5012\u8f49"],["SEEK","\u641c\u5c0b\u6ed1\u687f"],
732
- ["SKIP_TO_LIVE","\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u77e5"],["UNMUTE","\u89e3\u9664\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u672a\u77e5"],["VOLUME","\u97f3\u91cf"]]));b.Xd(navigator.languages||[]);return b};function mp(b,c){X.call(this,b,c);var d=this;this.g=this.controls.w;this.f=this.controls.c;this.c=[];this.b=W("button");this.b.classList.add("shaka-overflow-menu-button");this.b.classList.add("shaka-no-propagation");this.b.classList.add("material-icons");this.b.textContent="more_vert";this.parent.appendChild(this.b);this.a=W("div");this.a.classList.add("shaka-overflow-menu");this.a.classList.add("shaka-no-propagation");this.a.classList.add("shaka-show-controls-on-mouse-over");this.a.classList.add("shaka-settings-menu");
733
- this.f.appendChild(this.a);np(this);for(var e=this.controls.f.getElementsByClassName("shaka-back-to-overflow-button"),f=0;f<e.length;f++)this.eventManager.m(e[f],"click",function(){d.controls.gd();Y(d.a,!0);d.a.childNodes.length&&d.a.childNodes[0].focus();d.controls.yd()});this.eventManager.m(this.localization,"locale-updated",function(){op(d)});this.eventManager.m(this.localization,"locale-changed",function(){op(d)});this.eventManager.m(this.controls,"submenuopen",function(){Y(d.a,!1)});this.eventManager.m(this.a,
734
- "touchstart",function(b){d.controls.Ve(Date.now());b.stopPropagation()});this.eventManager.m(this.b,"click",function(){pp(d)});this.eventManager.m(this.f,"touchstart",function(b){d.a.classList.contains("shaka-displayed")&&(Y(d.a,!1),b.preventDefault())});op(this)}ua(mp,X);z("shaka.ui.OverflowMenu",mp);
735
- mp.prototype.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:return b.f=null,u(d,Promise.all(b.c.map(function(b){return b.destroy()})),2);case 2:return b.c=[],u(d,X.prototype.destroy.call(b),0)}})})};function qp(b,c){rp.set(b,c)}mp.registerElement=qp;
736
- function np(b){for(var c=0;c<b.g.overflowMenuButtons.length;c++){var d=b.g.overflowMenuButtons[c];rp.get(d)?(d=rp.get(d),b.c.push(d.create(b.a,b.controls))):Za("Unrecognized overflow menu element requested:",d)}}function pp(b){if(b.controls.uc())b.controls.gd();else{Y(b.a,!0);b.controls.yd();var c=function(b){return 0==b.classList.contains("shaka-hidden")};fb(b.a.childNodes,c)&&gb(b.a.childNodes,c)[0].focus()}}function op(b){b.b.setAttribute("aria-label",b.localization.resolve("MORE_SETTINGS"))}
737
- function sp(){}sp.prototype.create=function(b,c){return new mp(b,c)};hp("overflow_menu",new sp);var rp=new Map;function tp(b,c){X.call(this,b,c);var d=this;up(this);vp(this);this.eventManager.m(this.localization,"locale-updated",function(){wp(d)});this.eventManager.m(this.localization,"locale-changed",function(){wp(d)});this.eventManager.m(this.player,"trackschanged",function(){var b=0<d.player.Fb().length;Y(d.b,b);xp(d)});this.eventManager.m(this.player,"variantchanged",function(){xp(d)});this.eventManager.m(this.b,"click",function(){d.controls.dispatchEvent(new B("submenuopen"));Y(d.a,!0);Wo(d.a)});wp(this);
738
- xp(this)}ua(tp,X);z("shaka.ui.AudioLanguageSelection",tp);
739
- function vp(b){b.a=W("div");b.a.classList.add("shaka-audio-languages");b.a.classList.add("shaka-no-propagation");b.a.classList.add("shaka-show-controls-on-mouse-over");b.a.classList.add("shaka-settings-menu");b.c=W("button");b.c.classList.add("shaka-back-to-overflow-button");b.a.appendChild(b.c);var c=W("i");c.classList.add("material-icons");c.textContent="arrow_back";b.c.appendChild(c);b.j=W("span");b.c.appendChild(b.j);b.controls.c.appendChild(b.a)}
740
- function up(b){b.b=W("button");b.b.classList.add("shaka-language-button");var c=W("i");c.classList.add("material-icons");c.textContent="language";b.b.appendChild(c);c=W("label");c.classList.add("shaka-overflow-button-label");b.g=W("span");b.g.classList.add("languageSpan");c.appendChild(b.g);b.f=W("span");b.f.classList.add("shaka-current-selection-span");var d=b.player.getConfiguration().preferredAudioLanguage;b.f.textContent=Ro(d,b.localization);c.appendChild(b.f);b.b.appendChild(c);b.parent.appendChild(b.b)}
741
- function xp(b){var c=b.player.Fb(),d=b.player.fe();Oo(c,b.a,d,b.l.bind(b),!0,b.f,b.localization);Wo(b.a);b.controls.dispatchEvent(new B("languageselectionupdated"))}tp.prototype.l=function(b){this.player.Pe(b)};function wp(b){b.c.setAttribute("aria-label",b.localization.resolve("BACK"));b.b.setAttribute("aria-label",b.localization.resolve("LANGUAGE"));b.g.textContent=b.localization.resolve("LANGUAGE");b.j.textContent=b.localization.resolve("LANGUAGE")}function yp(){}
742
- yp.prototype.create=function(b,c){return new tp(b,c)};qp("language",new yp);function zp(b,c){X.call(this,b,c);var d=this;this.b=this.controls.g;this.a=W("button");this.a.classList.add("shaka-cast-button");this.a.setAttribute("aria-pressed","false");this.c=W("i");this.c.classList.add("material-icons");this.c.textContent="cast";this.a.appendChild(this.c);var e=W("label");e.classList.add("shaka-overflow-button-label");this.g=W("span");e.appendChild(this.g);this.f=W("span");this.f.classList.add("shaka-current-selection-span");e.appendChild(this.f);this.a.appendChild(e);this.parent.appendChild(this.a);
743
- Ap(this);Bp(this);this.eventManager.m(this.localization,"locale-updated",function(){Ap(d)});this.eventManager.m(this.localization,"locale-changed",function(){Ap(d)});this.eventManager.m(this.a,"click",function(){Cp(d)});this.eventManager.m(this.controls,"caststatuschanged",function(){Bp(d)})}ua(zp,X);z("shaka.ui.CastButton",zp);
744
- function Cp(b){t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(b.b.$()){b.b.Ze();d.C(0);break}za(d,3);b.a.disabled=!0;return u(d,b.b.cast(),5);case 5:b.a.disabled=!1;Ba(d,0);break;case 3:e=Ca(d),b.a.disabled=!1,8004!=e.code&&b.controls.dispatchEvent(new B("error",{detail:e})),v(d)}})})}
745
- function Bp(b){var c=b.b.Ud()&&b.controls.sa,d=b.b.$();Y(b.a,c);b.c.textContent=d?"cast_connected":"cast";c&&(d?b.a.setAttribute("aria-pressed","true"):b.a.setAttribute("aria-pressed","false"));Dp(b)}function Dp(b){b.f.textContent=b.b.$()?b.b.Nc():b.localization.resolve("OFF")}function Ap(b){b.a.setAttribute("aria-label",b.localization.resolve("CAST"));b.g.textContent=b.localization.resolve("CAST");Dp(b)}function Ep(){}Ep.prototype.create=function(b,c){return new zp(b,c)};qp("cast",new Ep);function Fp(b,c){X.call(this,b,c);var d=this;this.a=W("button");this.a.classList.add("material-icons");this.a.classList.add("shaka-fast-forward-button");this.a.textContent="fast_forward";this.parent.appendChild(this.a);Gp(this);this.eventManager.m(this.localization,"locale-updated",function(){Gp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Gp(d)});this.eventManager.m(this.a,"click",function(){if(d.video.duration){var b=d.player.cd();d.player.Pd(0>b||4<b?1:2*b)}})}ua(Fp,X);
746
- z("shaka.ui.FastForwardButton",Fp);function Gp(b){b.a.setAttribute("aria-label",b.localization.resolve("FAST_FORWARD"))}function Hp(){}Hp.prototype.create=function(b,c){return new Fp(b,c)};hp("fast_forward",new Hp);function Ip(b,c){X.call(this,b,c);var d=this;this.a=W("button");this.a.classList.add("shaka-fullscreen-button");this.a.classList.add("material-icons");document.fullscreenEnabled||this.a.classList.add("shaka-hidden");this.a.textContent="fullscreen";this.parent.appendChild(this.a);Jp(this);this.b=this.controls.f;this.eventManager.m(this.localization,"locale-updated",function(){Jp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Jp(d)});this.eventManager.m(this.a,"click",function(){Kp(d)});
747
- screen.orientation&&this.eventManager.m(screen.orientation,"change",function(){d.video&&0!=d.video.readyState&&!d.controls.g.$()&&(screen.orientation.type.includes("landscape")&&!document.fullscreenElement?d.b.requestFullscreen():screen.orientation.type.includes("portrait")&&document.fullscreenElement&&document.exitFullscreen())});this.eventManager.m(document,"fullscreenchange",function(){d.a.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Jp(d)})}ua(Ip,X);
748
- z("shaka.ui.FullscreenButton",Ip);function Jp(b){b.a.setAttribute("aria-label",b.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN"))}
749
- function Kp(b){t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(document.fullscreenElement){document.exitFullscreen();d.C(0);break}za(d,3);if(!document.pictureInPictureElement){d.C(5);break}return u(d,document.exitPictureInPicture(),5);case 5:Ba(d,4);break;case 3:e=Ca(d),b.controls.dispatchEvent(new B("error",{detail:e}));case 4:return u(d,b.b.requestFullscreen(),0)}})})}function Lp(){}Lp.prototype.create=function(b,c){return new Ip(b,c)};hp("fullscreen",new Lp);function Mp(b,c){X.call(this,b,c);var d=this;this.a=W("button");this.a.classList.add("shaka-mute-button");this.a.classList.add("material-icons");this.a.textContent="volume_up";this.parent.appendChild(this.a);Np(this);this.eventManager.m(this.localization,"locale-updated",function(){Np(d)});this.eventManager.m(this.localization,"locale-changed",function(){Np(d)});this.eventManager.m(this.a,"click",function(){d.video.muted=!d.video.muted});this.eventManager.m(this.video,"volumechange",function(){Np(d);
750
- d.a.textContent=d.video.muted?"volume_off":"volume_up"})}ua(Mp,X);z("shaka.ui.MuteButton",Mp);function Np(b){b.a.setAttribute("aria-label",b.localization.resolve(b.video.muted?"UNMUTE":"MUTE"))}function Op(){}Op.prototype.create=function(b,c){return new Mp(b,c)};hp("mute",new Op);function Pp(b,c){X.call(this,b,c);var d=this;this.g=this.controls.Fa;this.a=W("button");this.a.classList.add("shaka-pip-button");this.c=W("i");this.c.classList.add("material-icons");this.c.textContent="picture_in_picture_alt";this.a.appendChild(this.c);var e=W("label");e.classList.add("shaka-overflow-button-label");this.f=W("span");this.f.textContent=this.localization.resolve("PICTURE_IN_PICTURE");e.appendChild(this.f);this.b=W("span");this.b.classList.add("shaka-current-selection-span");e.appendChild(this.b);
751
- this.a.appendChild(e);Qp(this);this.parent.appendChild(this.a);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Y(this.a,!1);this.eventManager.m(this.localization,"locale-updated",function(){Qp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Qp(d)});this.eventManager.m(this.a,"click",function(){Rp(d)});this.eventManager.m(this.g,"enterpictureinpicture",function(){d.c.textContent="branding_watermark";d.a.setAttribute("aria-label",d.localization.resolve("EXIT_PICTURE_IN_PICTURE"));
752
- d.b.textContent=d.localization.resolve("ON")});this.eventManager.m(this.g,"leavepictureinpicture",function(){d.c.textContent="picture_in_picture_alt";d.a.setAttribute("aria-label",d.localization.resolve("ENTER_PICTURE_IN_PICTURE"));d.b.textContent=d.localization.resolve("OFF")});this.eventManager.m(this.controls,"caststatuschange",function(b){b.newStatus?document.pictureInPictureEnabled&&!d.video.disablePictureInPicture&&Y(d.a,!1):document.pictureInPictureEnabled&&!d.video.disablePictureInPicture&&
753
- Y(d.a,!0)});this.eventManager.m(this.player,"trackschanged",function(){Sp(d)})}ua(Pp,X);z("shaka.ui.PipButton",Pp);function Rp(b){t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return za(d,2),document.pictureInPictureElement?u(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(d,b.video.requestPictureInPicture(),5));case 5:Ba(d,0);break;case 2:e=Ca(d),b.controls.dispatchEvent(new B("error",{detail:e})),v(d)}})})}
754
- function Qp(b){b.f.textContent=b.localization.resolve("PICTURE_IN_PICTURE");b.a.setAttribute("aria-label",b.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE"));b.b.textContent=b.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
755
- function Sp(b){t(function d(){return y(d,function(d){switch(d.s){case 1:if(document.pictureInPictureEnabled&&!b.video.disablePictureInPicture)if(b.player&&b.player.me()){if(Y(b.a,!1),document.pictureInPictureElement)return u(d,document.exitPictureInPicture(),0)}else Y(b.a,!0);else Y(b.a,!1);d.C(0)}})})}function Tp(){}Tp.prototype.create=function(b,c){return new Pp(b,c)};qp("picture_in_picture",new Tp);function Up(b,c){X.call(this,b,c);var d=this;this.a=W("button");this.a.classList.add("shaka-play-pause-button");this.a.classList.add("material-icons");this.parent.appendChild(this.a);Vp(this);Wp(this);this.eventManager.m(this.localization,"locale-updated",function(){Wp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Wp(d)});this.eventManager.m(this.video,"play",function(){Wp(d);Vp(d)});this.eventManager.m(this.video,"pause",function(){Wp(d);Vp(d)});this.eventManager.m(this.a,
756
- "click",function(){d.video.paused?d.video.play():d.video.pause()})}ua(Up,X);z("shaka.ui.PlayPauseButton",Up);function Wp(b){b.a.setAttribute("aria-label",b.localization.resolve(b.video.paused?"PLAY":"PAUSE"))}function Vp(b){b.a.textContent=b.video.paused?"play_arrow":"pause"}function Xp(){}Xp.prototype.create=function(b,c){return new Up(b,c)};hp("play_pause",new Xp);function Yp(b,c){X.call(this,b,c);var d=this;this.a=W("button");this.a.classList.add("shaka-current-time");Zp(this,"0:00");this.parent.appendChild(this.a);this.eventManager.m(this.a,"click",function(){d.player.V()&&(d.video.currentTime=d.player.Tb().end)});this.eventManager.m(this.controls,"timeandseekrangeupdated",function(){var b=d.controls.ge(),c=d.video.duration,g=d.player.Tb(),h=g.end-g.start;d.player.V()?(b=Math.max(0,Math.floor(g.end-b)),c=3600<=h,1<=b?(Zp(d,"- "+$p(b,c)),d.a.disabled=!1):
757
- (Zp(d,d.localization.resolve("LIVE")),d.a.disabled=!0)):(g=3600<=c,b=$p(b,g),c&&(b+=" / "+$p(c,g)),Zp(d,b),d.a.disabled=!0)});this.eventManager.m(this.player,"trackschanged",function(){d.player.V()&&d.a.setAttribute("aria-label",d.localization.resolve("SKIP_TO_LIVE"))})}ua(Yp,X);z("shaka.ui.PresentationTimeTracker",Yp);function Zp(b,c){c!=b.a.textContent&&(b.a.textContent=c)}
758
- function $p(b,c){var d=Math.floor(b/3600),e=Math.floor(b/60%60),f=Math.floor(b%60);10>f&&(f="0"+f);f=e+":"+f;c&&(10>e&&(f="0"+f),f=d+":"+f);return f}function aq(){}aq.prototype.create=function(b,c){return new Yp(b,c)};hp("time_and_duration",new aq);function bq(b,c){X.call(this,b,c);var d=this;cq(this);dq(this);this.eventManager.m(this.localization,"locale-updated",function(){eq(d)});this.eventManager.m(this.localization,"locale-changed",function(){eq(d)});this.eventManager.m(this.b,"click",function(){d.controls.dispatchEvent(new B("submenuopen"));Y(d.a,!0);Wo(d.a)});this.eventManager.m(this.player,"variantchanged",function(){fq(d)});this.eventManager.m(this.player,"trackschanged",function(){fq(d)});this.eventManager.m(this.player,"abrstatuschanged",
759
- function(){fq(d)});fq(this);eq(this)}ua(bq,X);z("shaka.ui.ResolutionSelection",bq);function cq(b){b.b=W("button");b.b.classList.add("shaka-resolution-button");var c=W("i");c.classList.add("material-icons");c.textContent="settings";b.b.appendChild(c);c=W("label");c.classList.add("shaka-overflow-button-label");b.l=W("span");c.appendChild(b.l);b.g=W("span");b.g.classList.add("shaka-current-selection-span");c.appendChild(b.g);b.b.appendChild(c);b.parent.appendChild(b.b)}
760
- function dq(b){b.a=W("div");b.a.classList.add("shaka-resolutions");b.a.classList.add("shaka-no-propagation");b.a.classList.add("shaka-show-controls-on-mouse-over");b.a.classList.add("shaka-settings-menu");b.f=W("button");b.f.classList.add("shaka-back-to-overflow-button");b.a.appendChild(b.f);var c=W("i");c.classList.add("material-icons");c.textContent="arrow_back";b.f.appendChild(c);b.j=W("span");b.f.appendChild(b.j);b.controls.c.appendChild(b.a)}
761
- function fq(b){var c=b.player.Fb();if(c.length&&!c[0].height)Y(b.a,!1),Y(b.b,!1);else{Y(b.b,!0);c.sort(function(b,c){return b.height-c.height});c.reverse();var d=c.find(function(b){return b.active});if(d){var e=d.language;c=c.filter(function(b){return b.language==e})}var f=Po(b.a,"shaka-back-to-overflow-button");Qo(b.a);b.a.appendChild(f);var g=b.player.getConfiguration().abr.enabled;c.forEach(function(c){var e=W("button");e.classList.add("explicit-resolution");b.eventManager.m(e,"click",b.o.bind(b,
762
- c));var f=W("span");f.textContent=c.height+"p";e.appendChild(f);g||c!=d||(e.setAttribute("aria-selected","true"),e.appendChild(So()),f.classList.add("shaka-chosen-item"),b.g.textContent=f.textContent);b.a.appendChild(e)});c=W("button");c.classList.add("shaka-enable-abr-button");b.eventManager.m(c,"click",function(){this.player.configure({abr:{enabled:!0}});fq(this)}.bind(b));b.c=W("span");b.c.classList.add("shaka-auto-span");b.c.textContent=b.localization.resolve("AUTO_QUALITY");c.appendChild(b.c);
763
- g&&(c.setAttribute("aria-selected","true"),c.appendChild(So()),b.c.classList.add("shaka-chosen-item"),b.g.textContent=b.localization.resolve("AUTO_QUALITY"));b.a.appendChild(c);Wo(b.a);b.controls.dispatchEvent(new B("resolutionselectionupdated"))}}bq.prototype.o=function(b){this.player.configure({abr:{enabled:!1}});this.player.Re(b,!0)};
764
- function eq(b){b.b.setAttribute("aria-label",b.localization.resolve("RESOLUTION"));b.f.setAttribute("aria-label",b.localization.resolve("RESOLUTION"));b.j.textContent=b.localization.resolve("RESOLUTION");b.l.textContent=b.localization.resolve("RESOLUTION");b.c.textContent=b.localization.resolve("AUTO_QUALITY");b.player.getConfiguration().abr.enabled&&(b.g.textContent=b.localization.resolve("AUTO_QUALITY"))}function gq(){}gq.prototype.create=function(b,c){return new bq(b,c)};qp("quality",new gq);function hq(b,c){X.call(this,b,c);var d=this;this.a=W("button");this.a.classList.add("material-icons");this.a.classList.add("shaka-rewind-button");this.a.textContent="fast_rewind";this.parent.appendChild(this.a);iq(this);this.eventManager.m(this.localization,"locale-updated",function(){iq(d)});this.eventManager.m(this.localization,"locale-changed",function(){iq(d)});this.eventManager.m(this.a,"click",function(){if(d.video.duration){var b=d.player.cd();d.player.Pd(0<b||-4>b?-1:2*b)}})}ua(hq,X);
765
- z("shaka.ui.RewindButton",hq);function iq(b){b.a.setAttribute("aria-label",b.localization.resolve("REWIND"))}function jq(){}jq.prototype.create=function(b,c){return new hq(b,c)};hp("rewind",new jq);function kq(b,c){X.call(this,b,c);var d=W("div");d.classList.add("shaka-spacer");d.setAttribute("aria-hidden",!0);this.parent.appendChild(d)}ua(kq,X);z("shaka.ui.Spacer",kq);function lq(){}lq.prototype.create=function(b,c){return new kq(b,c)};hp("spacer",new lq);function mq(b,c){var d=this;this.f=!1;this.c=[];this.l=b;this.j=c;this.a=W("div");this.a.classList.add("shaka-text-container");this.j.appendChild(this.a);this.g=(new F(function(){nq(d)})).Na(.25);this.b=new Map}z("shaka.ui.TextDisplayer",mq);mq.prototype.append=function(b){this.c=this.c.concat(b)};mq.prototype.append=mq.prototype.append;mq.prototype.destroy=function(){this.j.removeChild(this.a);this.a=null;this.f=!1;this.c=[];this.g&&this.g.stop();this.b.clear()};mq.prototype.destroy=mq.prototype.destroy;
766
- mq.prototype.remove=function(b,c){if(!this.a)return!1;for(var d=new Set,e=r(this.c),f=e.next();!f.done;f=e.next())f=f.value,f.startTime>b&&f.endTime<c&&d.add(f);e=r(d);for(f=e.next();!f.done;f=e.next()){f=f.value;var g=this.b.get(f);g&&(this.a.removeChild(g),this.b["delete"](f))}this.c=this.c.filter(function(b){return!d.has(b)});return!0};mq.prototype.remove=mq.prototype.remove;mq.prototype.isTextVisible=function(){return this.f};mq.prototype.isTextVisible=mq.prototype.isTextVisible;
767
- mq.prototype.setTextVisibility=function(b){this.f=b};mq.prototype.setTextVisibility=mq.prototype.setTextVisibility;
768
- function nq(b){for(var c=b.l.currentTime,d=r(b.b.keys()),e=d.next();!e.done;e=d.next())if(e=e.value,!(b.f&&e.startTime<=c&&e.endTime>=c)){var f=b.b.get(e);b.a.removeChild(f);b.b["delete"](e)}d=b.c.filter(function(d){return b.f&&d.startTime<=c&&d.endTime>=c&&!b.b.has(d)}).sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime-c.endTime});d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,f=W("span"),oq(b,f,e),b.b.set(e,f),b.a.appendChild(f)}
769
- function oq(b,c,d){var e=c.style;b=b.a.style;e.whiteSpace="pre";c.textContent=d.payload;e.backgroundColor=d.backgroundColor;e.color=d.color;e.direction=d.direction;d.backgroundImage&&(e.backgroundImage="url('"+d.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition="center",""==d.backgroundColor&&(e.backgroundColor="transparent"));if(d.backgroundImage&&d.region){c=he;var f=d.region.widthUnits==c?"%":"px";e.height=d.region.height+(d.region.heightUnits==
770
- c?"%":"px");e.width=d.region.width+f}b.alignItems="before"==d.displayAlign?"flex-start":"center"==d.displayAlign?"flex-top":"flex-end";e.fontFamily=d.fontFamily;e.fontWeight=d.fontWeight.toString();e.fontSize=d.fontSize;e.fontStyle=d.fontStyle;d.line&&1==d.lineInterpretation&&(d.writingMode==Yd?d.lineAlign==$d?b.top=d.line+"%":"end"==d.lineAlign&&(b.bottom=d.line+"%"):"vertical-lr"==d.writingMode?d.lineAlign==$d?b.left=d.line+"%":"end"==d.lineAlign&&(b.right=d.line+"%"):d.lineAlign==$d?b.right=d.line+
771
- "%":"end"==d.lineAlign&&(b.left=d.line+"%"));e.lineHeight=d.lineHeight;d.position&&(d.writingMode==Yd?b.paddingLeft=d.position:b.paddingTop=d.position);"line-left"==d.positionAlign?b.cssFloat="left":"line-right"==d.positionAlign?b.cssFloat="right":b.margin="auto";e.textAlign=d.textAlign;e.textDecoration=d.textDecoration.join(" ");e.writingMode=d.writingMode;d.writingMode==Yd?b.width=d.size+"%":b.height=d.size+"%"};function pq(b,c){X.call(this,b,c);var d=this;qq(this);rq(this);this.eventManager.m(this.localization,"locale-updated",function(){sq(d);tq(d)});this.eventManager.m(this.localization,"locale-changed",function(){sq(d);tq(d)});this.eventManager.m(this.player,"texttrackvisibility",function(){uq(d)});this.eventManager.m(this.b,"click",function(){d.controls.dispatchEvent(new B("submenuopen"));Y(d.a,!0);Wo(d.a)});this.eventManager.m(this.player,"textchanged",function(){tq(d)});this.eventManager.m(this.player,
772
- "trackschanged",function(){var b=0<d.player.Xa().length;Y(d.b,b);tq(d)});uq(this);sq(this);tq(this)}ua(pq,X);z("shaka.ui.TextSelection",pq);
773
- function qq(b){b.b=W("button");b.b.classList.add("shaka-caption-button");b.c=W("i");b.c.classList.add("material-icons");b.c.textContent="closed_caption";b.player&&b.player.Za()?b.b.setAttribute("aria-pressed","true"):b.b.setAttribute("aria-pressed","false");b.b.appendChild(b.c);var c=W("label");c.classList.add("shaka-overflow-button-label");b.o=W("span");c.appendChild(b.o);b.j=W("span");b.j.classList.add("shaka-current-selection-span");c.appendChild(b.j);b.b.appendChild(c);b.parent.appendChild(b.b)}
774
- function rq(b){b.a=W("div");b.a.classList.add("shaka-text-languages");b.a.classList.add("shaka-no-propagation");b.a.classList.add("shaka-show-controls-on-mouse-over");b.a.classList.add("shaka-settings-menu");b.f=W("button");b.f.classList.add("shaka-back-to-overflow-button");b.a.appendChild(b.f);var c=W("i");c.classList.add("material-icons");c.textContent="arrow_back";b.f.appendChild(c);b.l=W("span");b.f.appendChild(b.l);c=W("button");c.setAttribute("aria-selected","true");b.a.appendChild(c);c.appendChild(So());
775
- b.g=W("span");b.g.classList.add("shaka-auto-span");c.appendChild(b.g);b.controls.c.appendChild(b.a)}function uq(b){b.player.Za()?(b.c.classList.add("shaka-captions-on"),b.c.classList.remove("shaka-captions-off"),b.b.setAttribute("aria-pressed","true")):(b.c.classList.add("shaka-captions-off"),b.c.classList.remove("shaka-captions-on"),b.b.setAttribute("aria-pressed","false"));b.controls.dispatchEvent(new B("captionselectionupdated"))}
776
- function tq(b){var c=b.player.Xa(),d=b.player.ie().map(function(b){return b.language});Oo(c,b.a,d,b.u.bind(b),b.player.Za(),b.j,b.localization);c=W("button");c.classList.add("shaka-turn-captions-off-button");b.eventManager.m(c,"click",function(){b.player.Kd(!1)["catch"](function(){});tq(b)});c.appendChild(b.g);b.a.appendChild(c);b.player.Za()||(c.setAttribute("aria-selected","true"),c.appendChild(So()),b.g.classList.add("shaka-chosen-item"),b.j.textContent=b.localization.resolve("OFF"));Wo(b.a);b.controls.dispatchEvent(new B("captionselectionupdated"))}
777
- pq.prototype.u=function(b){var c=this;return t(function e(){return y(e,function(e){switch(e.s){case 1:return u(e,c.player.Kd(!0),2);case 2:c.player&&c.player.Qe(b),v(e)}})})};function sq(b){b.b.setAttribute("aria-label",b.localization.resolve("CAPTIONS"));b.f.setAttribute("aria-label",b.localization.resolve("BACK"));b.o.textContent=b.localization.resolve("CAPTIONS");b.l.textContent=b.localization.resolve("CAPTIONS");b.g.textContent=b.localization.resolve("OFF")}function vq(){}
778
- vq.prototype.create=function(b,c){return new pq(b,c)};qp("captions",new vq);function wq(b,c,d){this.c=b;this.b=xq();c.dataset.shakaPlayerContainer="";c.ui=this;this.pe()&&c.classList.add("shaka-mobile");this.a=new Z(b,c,d,this.b);this.configure({})}z("shaka.ui.Overlay",wq);wq.prototype.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:return u(d,b.a.destroy(),2);case 2:return b.a=null,u(d,b.c.destroy(),3);case 3:b.c=null,v(d)}})})};wq.prototype.destroy=wq.prototype.destroy;wq.prototype.pe=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)};
779
- wq.prototype.isMobile=wq.prototype.pe;wq.prototype.getConfiguration=function(){var b=xq();Pk(b,this.b,xq(),{},"");return b};wq.prototype.getConfiguration=wq.prototype.getConfiguration;wq.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Qk(b,c));Pk(this.b,b,xq(),{},"");this.b.castReceiverAppId&&!this.b.overflowMenuButtons.includes("cast")&&this.b.overflowMenuButtons.push("cast");this.a.configure(this.b);this.a.dispatchEvent(new B("uiupdated"))};wq.prototype.configure=wq.prototype.configure;
780
- wq.prototype.Wa=function(){Ve("ui.Overlay.getPlayer()","Please use getControls().getPlayer() instead.");return this.a.Wa()};wq.prototype.getPlayer=wq.prototype.Wa;wq.prototype.Cf=function(){return this.a};wq.prototype.getControls=wq.prototype.Cf;wq.prototype.Tg=function(b){this.a.Gd(b)};wq.prototype.setEnabled=wq.prototype.Tg;
781
- function xq(){return{controlPanelElements:"time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:["captions","quality","language","picture_in_picture","cast"],addSeekBar:!0,castReceiverAppId:""}}
782
- function yq(){Wm();if(rl()){var b=document.querySelectorAll("[data-shaka-player-container]"),c=document.querySelectorAll("[data-shaka-player]");if(c.length||b.length)if(c.length&&!b.length)for(b=0;b<c.length;b++){var d=c[b],e=document.createElement("div");d.parentElement.replaceChild(e,d);e.appendChild(d);var f="";d.dataset&&d.dataset.shakaPlayerCastReceiverId&&(f=d.dataset.shakaPlayerCastReceiverId);e=zq(e,d);e.configure({castReceiverAppId:f});d.controls&&e.a.Ue(!0)}else for(d=0;d<b.length;d++){f=
783
- b[d];e="";f.dataset&&f.dataset.shakaPlayerCastReceiverId&&(e=f.dataset.shakaPlayerCastReceiverId);for(var g=null,h=0;h<c.length;h++)if(c[h].parentElement==f){g=c[h];break}g||(g=document.createElement("video"),g.setAttribute("playsinline",""),f.appendChild(g));g.dataset&&g.dataset.shakaPlayerCastReceiverId&&(e=g.dataset.shakaPlayerCastReceiverId);zq(f,g).configure({castReceiverAppId:e})}Aq("shaka-ui-loaded")}else Aq("shaka-ui-load-failed")}
784
- function Aq(b){var c=document.createEvent("CustomEvent");c.initCustomEvent(b,!1,!1,null);document.dispatchEvent(c)}function zq(b,c){var d=new U(c),e=new wq(d,b,c);c.controls||d.configure("textDisplayFactory",function(){return new mq(c,b)});b.ui=e;return c.ui=e}"complete"==document.readyState?Promise.resolve().then(yq):window.addEventListener("load",yq);function Bq(b,c){To.call(this,b,c,["shaka-volume-bar-container"],["shaka-volume-bar"]);var d=this;this.eventManager.m(this.video,"volumechange",function(){return Cq(d)});this.eventManager.m(this.localization,"locale-updated",function(){return Dq(d)});this.eventManager.m(this.localization,"locale-changed",function(){return Dq(d)});Cq(this);Dq(this)}ua(Bq,To);z("shaka.ui.VolumeBar",Bq);Bq.prototype.g=function(){this.video.volume=parseFloat(this.a.value);this.video.muted=0==this.video.volume?!0:!1};
785
- function Cq(b){b.video.muted?Vo(b,0):Vo(b,b.video.volume);var c=["to right"];c.push("rgb(255, 255, 255)"+100*parseFloat(b.a.value)+"%");c.push("rgba(255, 255, 255, 0.54)"+100*parseFloat(b.a.value)+"%");c.push("rgba(255, 255, 255, 0.54)100%");b.b.style.background="linear-gradient("+c.join(",")+")"}function Dq(b){b.a.setAttribute("aria-label",b.localization.resolve("VOLUME"))}function Eq(){}Eq.prototype.create=function(b,c){return new Bq(b,c)};hp("volume",new Eq);}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
738
+ ["SKIP_TO_LIVE","\u76f4\u64ad"],["UNDETERMINED_LANGUAGE","\u672a\u77e5"],["UNMUTE","\u89e3\u9664\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u672a\u77e5"],["VOLUME","\u97f3\u91cf"]]));b.$d(navigator.languages||[]);return b};function rp(b,c){Y.call(this,b,c);var d=this;this.g=this.controls.l;this.f=this.controls.c;this.c=[];this.b=X("button");this.b.classList.add("shaka-overflow-menu-button");this.b.classList.add("shaka-no-propagation");this.b.classList.add("material-icons");this.b.textContent="more_vert";this.parent.appendChild(this.b);this.a=X("div");this.a.classList.add("shaka-overflow-menu");this.a.classList.add("shaka-no-propagation");this.a.classList.add("shaka-show-controls-on-mouse-over");this.a.classList.add("shaka-settings-menu");
739
+ this.f.appendChild(this.a);sp(this);for(var e=this.controls.f.getElementsByClassName("shaka-back-to-overflow-button"),f=0;f<e.length;f++)this.eventManager.m(e[f],"click",function(){d.controls.Dc();Zo(d.a,!0);d.a.childNodes.length&&d.a.childNodes[0].focus();d.controls.zd()});this.eventManager.m(this.localization,"locale-updated",function(){tp(d)});this.eventManager.m(this.localization,"locale-changed",function(){tp(d)});this.eventManager.m(this.controls,"submenuopen",function(){Zo(d.a,!1)});this.eventManager.m(this.a,
740
+ "touchstart",function(b){d.controls.Xe(Date.now());b.stopPropagation()});this.eventManager.m(this.b,"click",function(){up(d)});this.eventManager.m(this.f,"touchstart",function(b){d.a.classList.contains("shaka-displayed")&&(Zo(d.a,!1),b.preventDefault())});tp(this)}ua(rp,Y);z("shaka.ui.OverflowMenu",rp);
741
+ rp.prototype.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:return b.f=null,u(d,Promise.all(b.c.map(function(b){return b.destroy()})),2);case 2:return b.c=[],u(d,Y.prototype.destroy.call(b),0)}})})};function vp(b,c){wp.set(b,c)}rp.registerElement=vp;
742
+ function sp(b){for(var c=0;c<b.g.overflowMenuButtons.length;c++){var d=b.g.overflowMenuButtons[c];wp.get(d)?(d=wp.get(d),b.c.push(d.create(b.a,b.controls))):Za("Unrecognized overflow menu element requested:",d)}}function up(b){if(b.controls.uc())b.controls.Dc();else{Zo(b.a,!0);b.controls.zd();var c=function(b){return 0==b.classList.contains("shaka-hidden")};fb(b.a.childNodes,c)&&gb(b.a.childNodes,c)[0].focus()}}
743
+ function tp(b){b.b.setAttribute("aria-label",b.localization.resolve("MORE_SETTINGS"))}function xp(){}xp.prototype.create=function(b,c){return new rp(b,c)};jp("overflow_menu",new xp);var wp=new Map;function yp(b,c,d){Y.call(this,b,c);var e=this;zp(this,d);Ap(this);this.eventManager.m(this.button,"click",function(){e.controls.dispatchEvent(new A("submenuopen"));Zo(e.a,!0);Yo(e.a)})}ua(yp,Y);z("shaka.ui.SettingsMenu",yp);
744
+ function zp(b,c){b.button=X("button");b.f=X("i");b.f.classList.add("material-icons");b.f.textContent=c;b.button.appendChild(b.f);var d=X("label");d.classList.add("shaka-overflow-button-label");b.l=X("span");d.appendChild(b.l);b.b=X("span");b.b.classList.add("shaka-current-selection-span");d.appendChild(b.b);b.button.appendChild(d);b.parent.appendChild(b.button)}
745
+ function Ap(b){b.a=X("div");b.a.classList.add("shaka-no-propagation");b.a.classList.add("shaka-show-controls-on-mouse-over");b.a.classList.add("shaka-settings-menu");b.c=X("button");b.c.classList.add("shaka-back-to-overflow-button");b.a.appendChild(b.c);var c=X("i");c.classList.add("material-icons");c.textContent="arrow_back";b.c.appendChild(c);b.j=X("span");b.c.appendChild(b.j);b.controls.c.appendChild(b.a)};function Bp(b,c){yp.call(this,b,c,"language");var d=this;this.button.classList.add("shaka-language-button");this.a.classList.add("shaka-audio-languages");this.eventManager.m(this.localization,"locale-updated",function(){Cp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Cp(d)});this.eventManager.m(this.player,"trackschanged",function(){var b=0<d.player.Fb().length;Zo(d.button,b);Dp(d)});this.eventManager.m(this.player,"variantchanged",function(){Dp(d)});Cp(this);Dp(this)}
746
+ ua(Bp,yp);z("shaka.ui.AudioLanguageSelection",Bp);function Dp(b){var c=b.player.Fb(),d=b.player.ie();Qo(c,b.a,d,function(c){b.player.Re(c)},!0,b.b,b.localization);Yo(b.a);b.controls.dispatchEvent(new A("languageselectionupdated"))}function Cp(b){b.c.setAttribute("aria-label",b.localization.resolve("BACK"));b.button.setAttribute("aria-label",b.localization.resolve("LANGUAGE"));b.l.textContent=b.localization.resolve("LANGUAGE");b.j.textContent=b.localization.resolve("LANGUAGE")}function Ep(){}
747
+ Ep.prototype.create=function(b,c){return new Bp(b,c)};vp("language",new Ep);function Fp(b,c){Y.call(this,b,c);var d=this;this.button=X("button");this.parent.appendChild(this.button);this.eventManager.m(this.localization,"locale-updated",function(){Gp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Gp(d)});this.eventManager.m(this.video,"play",function(){Gp(d)});this.eventManager.m(this.video,"pause",function(){Gp(d)});this.eventManager.m(this.button,"click",function(){Hp(d)?d.video.play():d.video.pause()})}ua(Fp,Y);z("shaka.ui.PlayButton",Fp);
748
+ function Hp(b){return b.video.paused&&!b.controls.K}function Gp(b){b.button.setAttribute("aria-label",b.localization.resolve(Hp(b)?"PLAY":"PAUSE"))};function mp(b,c){Fp.call(this,b,c);var d=this;this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");Ip(this);Gp(this);this.eventManager.m(this.video,"play",function(){Ip(d)});this.eventManager.m(this.video,"pause",function(){Ip(d)})}ua(mp,Fp);z("shaka.ui.BigPlayButton",mp);function Ip(b){Hp(b)?b.button.setAttribute("icon","play"):b.button.setAttribute("icon","pause")};function Jp(b,c){Y.call(this,b,c);var d=this;this.b=this.controls.g;this.a=X("button");this.a.classList.add("shaka-cast-button");this.a.setAttribute("aria-pressed","false");this.c=X("i");this.c.classList.add("material-icons");this.c.textContent="cast";this.a.appendChild(this.c);var e=X("label");e.classList.add("shaka-overflow-button-label");this.g=X("span");e.appendChild(this.g);this.f=X("span");this.f.classList.add("shaka-current-selection-span");e.appendChild(this.f);this.a.appendChild(e);this.parent.appendChild(this.a);
749
+ Kp(this);Lp(this);this.eventManager.m(this.localization,"locale-updated",function(){Kp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Kp(d)});this.eventManager.m(this.a,"click",function(){Mp(d)});this.eventManager.m(this.controls,"caststatuschanged",function(){Lp(d)})}ua(Jp,Y);z("shaka.ui.CastButton",Jp);
750
+ function Mp(b){t(function d(){var e;return y(d,function(d){switch(d.s){case 1:if(b.b.$()){b.b.bf();d.C(0);break}Aa(d,3);b.a.disabled=!0;return u(d,b.b.cast(),5);case 5:b.a.disabled=!1;Ca(d,0);break;case 3:e=Da(d),b.a.disabled=!1,8004!=e.code&&b.controls.dispatchEvent(new A("error",{detail:e})),v(d)}})})}
751
+ function Lp(b){var c=b.b.Xd()&&b.controls.sa,d=b.b.$();Zo(b.a,c);b.c.textContent=d?"cast_connected":"cast";c&&(d?b.a.setAttribute("aria-pressed","true"):b.a.setAttribute("aria-pressed","false"));Np(b)}function Np(b){b.f.textContent=b.b.$()?b.b.Oc():b.localization.resolve("OFF")}function Kp(b){b.a.setAttribute("aria-label",b.localization.resolve("CAST"));b.g.textContent=b.localization.resolve("CAST");Np(b)}function Op(){}Op.prototype.create=function(b,c){return new Jp(b,c)};vp("cast",new Op);function Pp(b,c){Y.call(this,b,c);var d=this;this.a=X("button");this.a.classList.add("material-icons");this.a.classList.add("shaka-fast-forward-button");this.a.textContent="fast_forward";this.parent.appendChild(this.a);Qp(this);this.eventManager.m(this.localization,"locale-updated",function(){Qp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Qp(d)});this.eventManager.m(this.a,"click",function(){if(d.video.duration){var b=d.player.ed();d.player.Sd(0>b||4<b?1:2*b)}})}ua(Pp,Y);
752
+ z("shaka.ui.FastForwardButton",Pp);function Qp(b){b.a.setAttribute("aria-label",b.localization.resolve("FAST_FORWARD"))}function Rp(){}Rp.prototype.create=function(b,c){return new Pp(b,c)};jp("fast_forward",new Rp);function Sp(b,c){Y.call(this,b,c);var d=this;this.a=X("button");this.a.classList.add("shaka-fullscreen-button");this.a.classList.add("material-icons");document.fullscreenEnabled||this.a.classList.add("shaka-hidden");this.a.textContent="fullscreen";this.parent.appendChild(this.a);Tp(this);this.eventManager.m(this.localization,"locale-updated",function(){Tp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Tp(d)});this.eventManager.m(this.a,"click",function(){d.controls.Qd()});
753
+ this.eventManager.m(document,"fullscreenchange",function(){d.a.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";Tp(d)})}ua(Sp,Y);z("shaka.ui.FullscreenButton",Sp);function Tp(b){b.a.setAttribute("aria-label",b.localization.resolve(document.fullscreenElement?"EXIT_FULL_SCREEN":"FULL_SCREEN"))}function Up(){}Up.prototype.create=function(b,c){return new Sp(b,c)};jp("fullscreen",new Up);function Vp(b,c){Y.call(this,b,c);var d=this;this.a=X("button");this.a.classList.add("shaka-mute-button");this.a.classList.add("material-icons");this.a.textContent="volume_up";this.parent.appendChild(this.a);Wp(this);this.eventManager.m(this.localization,"locale-updated",function(){Wp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Wp(d)});this.eventManager.m(this.a,"click",function(){d.video.muted=!d.video.muted});this.eventManager.m(this.video,"volumechange",function(){Wp(d);
754
+ d.a.textContent=d.video.muted?"volume_off":"volume_up"})}ua(Vp,Y);z("shaka.ui.MuteButton",Vp);function Wp(b){b.a.setAttribute("aria-label",b.localization.resolve(b.video.muted?"UNMUTE":"MUTE"))}function Xp(){}Xp.prototype.create=function(b,c){return new Vp(b,c)};jp("mute",new Xp);function Yp(b,c){Y.call(this,b,c);var d=this;this.g=this.controls.Fa;this.a=X("button");this.a.classList.add("shaka-pip-button");this.c=X("i");this.c.classList.add("material-icons");this.c.textContent="picture_in_picture_alt";this.a.appendChild(this.c);var e=X("label");e.classList.add("shaka-overflow-button-label");this.f=X("span");this.f.textContent=this.localization.resolve("PICTURE_IN_PICTURE");e.appendChild(this.f);this.b=X("span");this.b.classList.add("shaka-current-selection-span");e.appendChild(this.b);
755
+ this.a.appendChild(e);Zp(this);this.parent.appendChild(this.a);document.pictureInPictureEnabled&&!this.video.disablePictureInPicture||Zo(this.a,!1);this.eventManager.m(this.localization,"locale-updated",function(){Zp(d)});this.eventManager.m(this.localization,"locale-changed",function(){Zp(d)});this.eventManager.m(this.a,"click",function(){$p(d)});this.eventManager.m(this.g,"enterpictureinpicture",function(){d.c.textContent="branding_watermark";d.a.setAttribute("aria-label",d.localization.resolve("EXIT_PICTURE_IN_PICTURE"));
756
+ d.b.textContent=d.localization.resolve("ON")});this.eventManager.m(this.g,"leavepictureinpicture",function(){d.c.textContent="picture_in_picture_alt";d.a.setAttribute("aria-label",d.localization.resolve("ENTER_PICTURE_IN_PICTURE"));d.b.textContent=d.localization.resolve("OFF")});this.eventManager.m(this.controls,"caststatuschanged",function(b){b.newStatus?document.pictureInPictureEnabled&&!d.video.disablePictureInPicture&&Zo(d.a,!1):document.pictureInPictureEnabled&&!d.video.disablePictureInPicture&&
757
+ Zo(d.a,!0)});this.eventManager.m(this.player,"trackschanged",function(){aq(d)})}ua(Yp,Y);z("shaka.ui.PipButton",Yp);function $p(b){t(function d(){var e;return y(d,function(d){switch(d.s){case 1:return Aa(d,2),document.pictureInPictureElement?u(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),u(d,b.video.requestPictureInPicture(),5));case 5:Ca(d,0);break;case 2:e=Da(d),b.controls.dispatchEvent(new A("error",{detail:e})),v(d)}})})}
758
+ function Zp(b){b.f.textContent=b.localization.resolve("PICTURE_IN_PICTURE");b.a.setAttribute("aria-label",b.localization.resolve(document.pictureInPictureElement?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE"));b.b.textContent=b.localization.resolve(document.pictureInPictureElement?"ON":"OFF")}
759
+ function aq(b){t(function d(){return y(d,function(d){switch(d.s){case 1:if(document.pictureInPictureEnabled&&!b.video.disablePictureInPicture)if(b.player&&b.player.pe()){if(Zo(b.a,!1),document.pictureInPictureElement)return u(d,document.exitPictureInPicture(),0)}else Zo(b.a,!0);else Zo(b.a,!1);d.C(0)}})})}function bq(){}bq.prototype.create=function(b,c){return new Yp(b,c)};vp("picture_in_picture",new bq);function cq(b,c){Y.call(this,b,c);var d=this;this.a=X("button");this.a.classList.add("shaka-current-time");dq(this,"0:00");this.parent.appendChild(this.a);this.eventManager.m(this.a,"click",function(){d.player.U()&&(d.video.currentTime=d.player.Tb().end)});this.eventManager.m(this.controls,"timeandseekrangeupdated",function(){var b=d.controls.K,c=d.controls.je(),g=d.video.duration,h=d.player.Tb(),k=h.end-h.start;d.player.U()?(c=Math.max(0,Math.floor(h.end-c)),g=3600<=k,1<=c||b?(dq(d,"- "+eq(c,g)),
760
+ d.a.disabled=!1):(dq(d,d.localization.resolve("LIVE")),d.a.disabled=!0)):(b=3600<=g,c=eq(c,b),g&&(c+=" / "+eq(g,b)),dq(d,c),d.a.disabled=!0)});this.eventManager.m(this.player,"trackschanged",function(){d.player.U()&&d.a.setAttribute("aria-label",d.localization.resolve("SKIP_TO_LIVE"))})}ua(cq,Y);z("shaka.ui.PresentationTimeTracker",cq);function dq(b,c){c!=b.a.textContent&&(b.a.textContent=c)}
761
+ function eq(b,c){var d=Math.floor(b/3600),e=Math.floor(b/60%60),f=Math.floor(b%60);10>f&&(f="0"+f);f=e+":"+f;c&&(10>e&&(f="0"+f),f=d+":"+f);return f}function fq(){}fq.prototype.create=function(b,c){return new cq(b,c)};jp("time_and_duration",new fq);function gq(b,c){yp.call(this,b,c,"settings");var d=this;this.button.classList.add("shaka-resolution-button");this.a.classList.add("shaka-resolutions");this.eventManager.m(this.localization,"locale-updated",function(){hq(d)});this.eventManager.m(this.localization,"locale-changed",function(){hq(d)});this.eventManager.m(this.player,"variantchanged",function(){iq(d)});this.eventManager.m(this.player,"trackschanged",function(){iq(d)});this.eventManager.m(this.player,"abrstatuschanged",function(){iq(d)});
762
+ iq(this);hq(this)}ua(gq,yp);z("shaka.ui.ResolutionSelection",gq);
763
+ function iq(b){var c=b.player.Fb();if(c.length&&!c[0].height)Zo(b.a,!1),Zo(b.button,!1);else{Zo(b.button,!0);c.sort(function(b,c){return c.height-b.height});var d=c.find(function(b){return b.active});d&&(c=c.filter(function(b){return b.language==d.language&&b.channelsCount==d.channelsCount}));c=c.filter(function(b,d){return c.findIndex(function(c){return c.height==b.height})==d});var e=Ro(b.a,"shaka-back-to-overflow-button");So(b.a);b.a.appendChild(e);var f=b.player.getConfiguration().abr.enabled;
764
+ c.forEach(function(c){var e=X("button");e.classList.add("explicit-resolution");b.eventManager.m(e,"click",b.o.bind(b,c));var g=X("span");g.textContent=c.height+"p";e.appendChild(g);f||c!=d||(e.setAttribute("aria-selected","true"),e.appendChild(Uo()),g.classList.add("shaka-chosen-item"),b.b.textContent=g.textContent);b.a.appendChild(e)});e=X("button");e.classList.add("shaka-enable-abr-button");b.eventManager.m(e,"click",function(){this.player.configure({abr:{enabled:!0}});iq(this)}.bind(b));b.g=X("span");
765
+ b.g.classList.add("shaka-auto-span");b.g.textContent=b.localization.resolve("AUTO_QUALITY");e.appendChild(b.g);f&&(e.setAttribute("aria-selected","true"),e.appendChild(Uo()),b.g.classList.add("shaka-chosen-item"),b.b.textContent=b.localization.resolve("AUTO_QUALITY"));b.a.appendChild(e);Yo(b.a);b.controls.dispatchEvent(new A("resolutionselectionupdated"))}}gq.prototype.o=function(b){this.player.configure({abr:{enabled:!1}});this.player.Te(b,this.controls.l.clearBufferOnQualityChange)};
766
+ function hq(b){b.button.setAttribute("aria-label",b.localization.resolve("RESOLUTION"));b.c.setAttribute("aria-label",b.localization.resolve("RESOLUTION"));b.j.textContent=b.localization.resolve("RESOLUTION");b.l.textContent=b.localization.resolve("RESOLUTION");b.g.textContent=b.localization.resolve("AUTO_QUALITY");b.player.getConfiguration().abr.enabled&&(b.b.textContent=b.localization.resolve("AUTO_QUALITY"))}function jq(){}jq.prototype.create=function(b,c){return new gq(b,c)};vp("quality",new jq);function kq(b,c){Y.call(this,b,c);var d=this;this.a=X("button");this.a.classList.add("material-icons");this.a.classList.add("shaka-rewind-button");this.a.textContent="fast_rewind";this.parent.appendChild(this.a);lq(this);this.eventManager.m(this.localization,"locale-updated",function(){lq(d)});this.eventManager.m(this.localization,"locale-changed",function(){lq(d)});this.eventManager.m(this.a,"click",function(){if(d.video.duration){var b=d.player.ed();d.player.Sd(0<b||-4>b?-1:2*b)}})}ua(kq,Y);
767
+ z("shaka.ui.RewindButton",kq);function lq(b){b.a.setAttribute("aria-label",b.localization.resolve("REWIND"))}function mq(){}mq.prototype.create=function(b,c){return new kq(b,c)};jp("rewind",new mq);function nq(b,c){Fp.call(this,b,c);var d=this;this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons");oq(this);Gp(this);this.eventManager.m(this.video,"play",function(){oq(d)});this.eventManager.m(this.video,"pause",function(){oq(d)})}ua(nq,Fp);z("shaka.ui.SmallPlayButton",nq);function oq(b){b.button.textContent=Hp(b)?"play_arrow":"pause"}function pq(){}pq.prototype.create=function(b,c){return new nq(b,c)};jp("play_pause",new pq);function qq(b,c){Y.call(this,b,c);var d=X("div");d.classList.add("shaka-spacer");d.setAttribute("aria-hidden",!0);this.parent.appendChild(d)}ua(qq,Y);z("shaka.ui.Spacer",qq);function rq(){}rq.prototype.create=function(b,c){return new qq(b,c)};jp("spacer",new rq);function sq(b,c){var d=this;this.f=!1;this.c=[];this.l=b;this.j=c;this.a=X("div");this.a.classList.add("shaka-text-container");this.j.appendChild(this.a);this.g=(new F(function(){tq(d)})).Na(.25);this.b=new Map}z("shaka.ui.TextDisplayer",sq);sq.prototype.append=function(b){this.c=this.c.concat(b)};sq.prototype.append=sq.prototype.append;sq.prototype.destroy=function(){this.j.removeChild(this.a);this.a=null;this.f=!1;this.c=[];this.g&&this.g.stop();this.b.clear()};sq.prototype.destroy=sq.prototype.destroy;
768
+ sq.prototype.remove=function(b,c){if(!this.a)return!1;for(var d=new Set,e=r(this.c),f=e.next();!f.done;f=e.next())f=f.value,f.startTime>b&&f.endTime<c&&d.add(f);e=r(d);for(f=e.next();!f.done;f=e.next()){f=f.value;var g=this.b.get(f);g&&(this.a.removeChild(g),this.b["delete"](f))}this.c=this.c.filter(function(b){return!d.has(b)});return!0};sq.prototype.remove=sq.prototype.remove;sq.prototype.isTextVisible=function(){return this.f};sq.prototype.isTextVisible=sq.prototype.isTextVisible;
769
+ sq.prototype.setTextVisibility=function(b){this.f=b};sq.prototype.setTextVisibility=sq.prototype.setTextVisibility;
770
+ function tq(b){for(var c=b.l.currentTime,d=r(b.b.keys()),e=d.next();!e.done;e=d.next())if(e=e.value,!(b.f&&e.startTime<=c&&e.endTime>=c)){var f=b.b.get(e);b.a.removeChild(f);b.b["delete"](e)}d=b.c.filter(function(d){return b.f&&d.startTime<=c&&d.endTime>=c&&!b.b.has(d)}).sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime-c.endTime});d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,f=X("span"),uq(b,f,e),b.b.set(e,f),b.a.appendChild(f)}
771
+ function uq(b,c,d){var e=c.style;b=b.a.style;e.whiteSpace="pre-line";c.textContent=d.payload;e.backgroundColor=d.backgroundColor;e.color=d.color;e.direction=d.direction;d.backgroundImage&&(e.backgroundImage="url('"+d.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition="center",""==d.backgroundColor&&(e.backgroundColor="transparent"));if(d.backgroundImage&&d.region){c=ie;var f=d.region.widthUnits==c?"%":"px";e.height=d.region.height+(d.region.heightUnits==
772
+ c?"%":"px");e.width=d.region.width+f}b.alignItems="before"==d.displayAlign?"flex-start":"center"==d.displayAlign?"flex-top":"flex-end";e.fontFamily=d.fontFamily;e.fontWeight=d.fontWeight.toString();e.fontSize=d.fontSize;e.fontStyle=d.fontStyle;d.line&&1==d.lineInterpretation&&(d.writingMode==Zd?d.lineAlign==ae?b.top=d.line+"%":"end"==d.lineAlign&&(b.bottom=d.line+"%"):"vertical-lr"==d.writingMode?d.lineAlign==ae?b.left=d.line+"%":"end"==d.lineAlign&&(b.right=d.line+"%"):d.lineAlign==ae?b.right=d.line+
773
+ "%":"end"==d.lineAlign&&(b.left=d.line+"%"));e.lineHeight=d.lineHeight;d.position&&(d.writingMode==Zd?b.paddingLeft=d.position:b.paddingTop=d.position);"line-left"==d.positionAlign?b.cssFloat="left":"line-right"==d.positionAlign?b.cssFloat="right":b.margin="auto";e.textAlign=d.textAlign;e.textDecoration=d.textDecoration.join(" ");e.writingMode=d.writingMode;d.writingMode==Zd?b.width=d.size+"%":b.height=d.size+"%"};function vq(b,c){yp.call(this,b,c,"closed_caption");var d=this;this.button.classList.add("shaka-caption-button");this.a.classList.add("shaka-text-languages");this.player&&this.player.Za()?this.button.setAttribute("aria-pressed","true"):this.button.setAttribute("aria-pressed","false");wq(this);this.eventManager.m(this.localization,"locale-updated",function(){xq(d);yq(d)});this.eventManager.m(this.localization,"locale-changed",function(){xq(d);yq(d)});this.eventManager.m(this.player,"texttrackvisibility",
774
+ function(){zq(d)});this.eventManager.m(this.player,"textchanged",function(){yq(d)});this.eventManager.m(this.player,"trackschanged",function(){var b=0<d.player.Xa().length;Zo(d.button,b);yq(d)});zq(this);xq(this);yq(this)}ua(vq,yp);z("shaka.ui.TextSelection",vq);function wq(b){var c=X("button");c.setAttribute("aria-selected","true");b.a.appendChild(c);c.appendChild(Uo());b.g=X("span");b.g.classList.add("shaka-auto-span");c.appendChild(b.g)}
775
+ function zq(b){b.player.Za()?(b.f.classList.add("shaka-captions-on"),b.f.classList.remove("shaka-captions-off"),b.button.setAttribute("aria-pressed","true")):(b.f.classList.add("shaka-captions-off"),b.f.classList.remove("shaka-captions-on"),b.button.setAttribute("aria-pressed","false"));b.controls.dispatchEvent(new A("captionselectionupdated"))}
776
+ function yq(b){var c=b.player.Xa(),d=b.player.ke().map(function(b){return b.language});Qo(c,b.a,d,function(c){return Aq(b,c)},b.player.Za(),b.b,b.localization);c=X("button");c.classList.add("shaka-turn-captions-off-button");b.eventManager.m(c,"click",function(){b.player.Md(!1)["catch"](function(){});yq(b)});c.appendChild(b.g);b.a.appendChild(c);b.player.Za()||(c.setAttribute("aria-selected","true"),c.appendChild(Uo()),b.g.classList.add("shaka-chosen-item"),b.b.textContent=b.localization.resolve("OFF"));
777
+ Yo(b.a);b.controls.dispatchEvent(new A("captionselectionupdated"))}function Aq(b,c){return t(function e(){return y(e,function(e){switch(e.s){case 1:return u(e,b.player.Md(!0),2);case 2:b.player&&b.player.Se(c),v(e)}})})}
778
+ function xq(b){b.button.setAttribute("aria-label",b.localization.resolve("CAPTIONS"));b.c.setAttribute("aria-label",b.localization.resolve("BACK"));b.l.textContent=b.localization.resolve("CAPTIONS");b.j.textContent=b.localization.resolve("CAPTIONS");b.g.textContent=b.localization.resolve("OFF")}function Bq(){}Bq.prototype.create=function(b,c){return new vq(b,c)};vp("captions",new Bq);function Cq(b,c,d){this.c=b;this.b=Dq();c.dataset.shakaPlayerContainer="";c.ui=this;this.re()&&c.classList.add("shaka-mobile");this.a=new Z(b,c,d,this.b);this.configure({})}z("shaka.ui.Overlay",Cq);Cq.prototype.destroy=function(){var b=this;return t(function d(){return y(d,function(d){switch(d.s){case 1:return u(d,b.a.destroy(),2);case 2:return b.a=null,u(d,b.c.destroy(),3);case 3:b.c=null,v(d)}})})};Cq.prototype.destroy=Cq.prototype.destroy;Cq.prototype.re=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)};
779
+ Cq.prototype.isMobile=Cq.prototype.re;Cq.prototype.getConfiguration=function(){var b=Dq();Tk(b,this.b,Dq(),{},"");return b};Cq.prototype.getConfiguration=Cq.prototype.getConfiguration;Cq.prototype.configure=function(b,c){2==arguments.length&&"string"==typeof b&&(b=Uk(b,c));Tk(this.b,b,Dq(),{},"");this.b.castReceiverAppId&&!this.b.overflowMenuButtons.includes("cast")&&this.b.overflowMenuButtons.push("cast");this.a.configure(this.b);this.a.dispatchEvent(new A("uiupdated"))};Cq.prototype.configure=Cq.prototype.configure;
780
+ Cq.prototype.Wa=function(){Xe("ui.Overlay.getPlayer()","Please use getControls().getPlayer() instead.");return this.a.Wa()};Cq.prototype.getPlayer=Cq.prototype.Wa;Cq.prototype.Ef=function(){return this.a};Cq.prototype.getControls=Cq.prototype.Ef;Cq.prototype.Vg=function(b){this.a.Hd(b)};Cq.prototype.setEnabled=Cq.prototype.Vg;
781
+ function Dq(){return{controlPanelElements:"time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:["captions","quality","language","picture_in_picture","cast"],addSeekBar:!0,addBigPlayButton:!0,castReceiverAppId:"",clearBufferOnQualityChange:!0}}
782
+ function Eq(){$m();if(vl()){var b=document.querySelectorAll("[data-shaka-player-container]"),c=document.querySelectorAll("[data-shaka-player]");if(c.length||b.length)if(c.length&&!b.length)for(b=0;b<c.length;b++){var d=c[b];if(!d.ui){var e=document.createElement("div");d.parentElement.replaceChild(e,d);e.appendChild(d);var f="";d.dataset&&d.dataset.shakaPlayerCastReceiverId&&(f=d.dataset.shakaPlayerCastReceiverId);e=Fq(e,d);e.configure({castReceiverAppId:f});d.controls&&e.a.We(!0)}}else for(d=0;d<
783
+ b.length;d++)if(f=b[d],!f.ui){e="";f.dataset&&f.dataset.shakaPlayerCastReceiverId&&(e=f.dataset.shakaPlayerCastReceiverId);for(var g=null,h=0;h<c.length;h++)if(c[h].parentElement==f){g=c[h];break}g||(g=document.createElement("video"),g.setAttribute("playsinline",""),f.appendChild(g));g.dataset&&g.dataset.shakaPlayerCastReceiverId&&(e=g.dataset.shakaPlayerCastReceiverId);Fq(f,g).configure({castReceiverAppId:e})}Gq("shaka-ui-loaded")}else Gq("shaka-ui-load-failed")}
784
+ function Gq(b){var c=document.createEvent("CustomEvent");c.initCustomEvent(b,!1,!1,null);document.dispatchEvent(c)}function Fq(b,c){var d=new V(c),e=new Cq(d,b,c);c.controls||d.configure("textDisplayFactory",function(){return new sq(c,b)});b.ui=e;return c.ui=e}"complete"==document.readyState?Promise.resolve().then(Eq):window.addEventListener("load",Eq);function Hq(b,c){Vo.call(this,b,c,["shaka-volume-bar-container"],["shaka-volume-bar"]);var d=this;this.eventManager.m(this.video,"volumechange",function(){return Iq(d)});this.eventManager.m(this.localization,"locale-updated",function(){return Jq(d)});this.eventManager.m(this.localization,"locale-changed",function(){return Jq(d)});Iq(this);Jq(this)}ua(Hq,Vo);z("shaka.ui.VolumeBar",Hq);Hq.prototype.g=function(){this.video.volume=parseFloat(this.a.value);this.video.muted=0==this.video.volume?!0:!1};
785
+ function Iq(b){b.video.muted?Xo(b,0):Xo(b,b.video.volume);var c=["to right"];c.push("rgb(255, 255, 255)"+100*parseFloat(b.a.value)+"%");c.push("rgba(255, 255, 255, 0.54)"+100*parseFloat(b.a.value)+"%");c.push("rgba(255, 255, 255, 0.54)100%");b.b.style.background="linear-gradient("+c.join(",")+")"}function Jq(b){b.a.setAttribute("aria-label",b.localization.resolve("VOLUME"))}function Kq(){}Kq.prototype.create=function(b,c){return new Hq(b,c)};jp("volume",new Kq);}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
786
786
 
787
787
  //# sourceMappingURL=shaka-player.ui.map