text: /*
   @license
   Shaka Player
   Copyright 2016 Google LLC
   SPDX-License-Identifier: Apache-2.0
  */
  (function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global,module){/*
  
   Copyright The Closure Library Authors.
   SPDX-License-Identifier: Apache-2.0
  */
  var q;function ca(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var da="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
  function ea(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var fa=ea(this);function ha(a,b){if(b)a:{for(var c=fa,d=a.split("."),e=0;e<d.length-1;e++){var f=d[e];if(!(f in c))break a;c=c[f]}d=d[d.length-1];e=c[d];f=b(e);f!=e&&null!=f&&da(c,d,{configurable:!0,writable:!0,value:f})}}
  ha("Symbol",function(a){function b(e){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c("jscomp_symbol_"+(e||"")+"_"+d++,e)}function c(e,f){this.a=e;da(this,"description",{configurable:!0,writable:!0,value:f})}if(a)return a;c.prototype.toString=function(){return this.a};var d=0;return b});
  ha("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=fa[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&da(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ia(ca(this))}})}return a});function ia(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
  function r(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ca(a)}}function ja(a){if(!(a instanceof Array)){a=r(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ka="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},la;
  if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else{var ma;a:{var na={oe:!0},oa={};try{oa.__proto__=na;ma=oa.oe;break a}catch(a){}ma=!1}la=ma?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var pa=la;
  function ra(a,b){a.prototype=ka(b.prototype);a.prototype.constructor=a;if(pa)pa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.hg=b.prototype}function sa(){this.j=!1;this.g=null;this.b=void 0;this.a=1;this.f=this.h=0;this.v=this.c=null}function ta(a){if(a.j)throw new TypeError("Generator is already running");a.j=!0}sa.prototype.l=function(a){this.b=a};
  function ua(a,b){a.c={Nd:b,Sd:!0};a.a=a.h||a.f}sa.prototype["return"]=function(a){this.c={"return":a};this.a=this.f};function u(a,b,c){a.a=c;return{value:b}}sa.prototype.m=function(a){this.a=a};function x(a){a.a=0}function A(a,b,c){a.h=b;void 0!=c&&(a.f=c)}function va(a){a.h=0;a.f=2}function wa(a,b){a.a=b;a.h=0}function D(a){a.h=0;var b=a.c.Nd;a.c=null;return b}function ya(a){a.v=[a.c];a.h=0;a.f=0}
  function Aa(a,b){var c=a.v.splice(0)[0];(c=a.c=a.c||c)?c.Sd?a.a=a.h||a.f:void 0!=c.m&&a.f<c.m?(a.a=c.m,a.c=null):a.a=a.f:a.a=b}function Ba(a){this.a=new sa;this.b=a}function Ca(a,b){ta(a.a);var c=a.a.g;if(c)return Da(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.a["return"]);a.a["return"](b);return Ea(a)}
  function Da(a,b,c,d){try{var e=b.call(a.a.g,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.a.j=!1,e;var f=e.value}catch(g){return a.a.g=null,ua(a.a,g),Ea(a)}a.a.g=null;d.call(a.a,f);return Ea(a)}
  function Ea(a){for(;a.a.a;)try{var b=a.b(a.a);if(b)return a.a.j=!1,{value:b.value,done:!1}}catch(c){a.a.b=void 0,ua(a.a,c)}a.a.j=!1;if(a.a.c){b=a.a.c;a.a.c=null;if(b.Sd)throw b.Nd;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
  function Fa(a){this.next=function(b){ta(a.a);a.a.g?b=Da(a,a.a.g.next,b,a.a.l):(a.a.l(b),b=Ea(a));return b};this["throw"]=function(b){ta(a.a);a.a.g?b=Da(a,a.a.g["throw"],b,a.a.l):(ua(a.a,b),b=Ea(a));return b};this["return"]=function(b){return Ca(a,b)};this[Symbol.iterator]=function(){return this}}function Ga(a,b){var c=new Fa(new Ba(b));pa&&a.prototype&&pa(c,a.prototype);return c}
  function Ha(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function J(a){return Ha(new Fa(new Ba(a)))}
  ha("Promise",function(a){function b(g){this.b=0;this.c=void 0;this.a=[];this.j=!1;var h=this.f();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.b=function(g){if(null==this.a){this.a=[];var h=this;this.c(function(){h.g()})}this.a.push(g)};var e=fa.setTimeout;c.prototype.c=function(g){e(g,0)};c.prototype.g=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
  g[h];g[h]=null;try{k()}catch(l){this.f(l)}}}this.a=null};c.prototype.f=function(g){this.c(function(){throw g;})};b.prototype.f=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.D),reject:g(this.g)}};b.prototype.D=function(g){if(g===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.J(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.C(g):this.h(g)}};
  b.prototype.C=function(g){var h=void 0;try{h=g.then}catch(k){this.g(k);return}"function"==typeof h?this.M(h,g):this.h(g)};b.prototype.g=function(g){this.l(2,g)};b.prototype.h=function(g){this.l(1,g)};b.prototype.l=function(g,h){if(0!=this.b)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.b);this.b=g;this.c=h;2===this.b&&this.I();this.v()};b.prototype.I=function(){var g=this;e(function(){if(g.A()){var h=fa.console;"undefined"!==typeof h&&h.error(g.c)}},1)};b.prototype.A=
  function(){if(this.j)return!1;var g=fa.CustomEvent,h=fa.Event,k=fa.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=fa.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.c;return k(g)};b.prototype.v=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.b(this.a[g]);this.a=null}};var f=new c;
  b.prototype.J=function(g){var h=this.f();g.lc(h.resolve,h.reject)};b.prototype.M=function(g,h){var k=this.f();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,t){return"function"==typeof p?function(v){try{l(p(v))}catch(w){m(w)}}:t}var l,m,n=new b(function(p,t){l=p;m=t});this.lc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.lc=function(g,h){function k(){switch(l.b){case 1:g(l.c);break;case 2:h(l.c);
  break;default:throw Error("Unexpected state: "+l.b);}}var l=this;null==this.a?f.b(k):this.a.push(k);this.j=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=r(g),m=l.next();!m.done;m=l.next())d(m.value).lc(h,k)})};b.all=function(g){var h=r(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(w){p[v]=w;t--;0==t&&l(p)}}var p=[],t=0;do p.push(void 0),t++,d(k.value).lc(n(p.length-1),m),k=h.next();
  while(!k.done)})};return b});function Ia(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
  ha("WeakMap",function(a){function b(k){this.a=(h+=Math.random()+1).toString();if(k){k=r(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ia(k,g)){var l=new c;da(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(n){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ia(k,g))throw Error("WeakMap key fail: "+k);k[g][this.a]=l;return this};b.prototype.get=function(k){return d(k)&&Ia(k,g)?k[g][this.a]:void 0};b.prototype.has=function(k){return d(k)&&
  Ia(k,g)&&Ia(k[g],this.a)};b.prototype["delete"]=function(k){return d(k)&&Ia(k,g)&&Ia(k[g],this.a)?delete k[g][this.a]:!1};return b});
  ha("Map",function(a){function b(){var h={};return h.Ma=h.next=h.head=h}function c(h,k){var l=h.a;return ia(function(){if(l){for(;l.head!=h.a;)l=l.Ma;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.b[l];if(m&&Ia(h.b,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,aa:p}}return{id:l,
  list:m,index:-1,aa:void 0}}function e(h){this.b={};this.a=b();this.size=0;if(h){h=r(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(r([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
  "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.b[l.id]=[]);l.aa?l.aa.value=k:(l.aa={next:this.a,Ma:this.a.Ma,head:this.a,key:h,value:k},l.list.push(l.aa),this.a.Ma.next=l.aa,this.a.Ma=l.aa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.aa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.b[h.id],h.aa.Ma.next=h.aa.next,h.aa.next.Ma=h.aa.Ma,
  h.aa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.b={};this.a=this.a.Ma=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).aa};e.prototype.get=function(h){return(h=d(this,h).aa)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
  ha("Set",function(a){function b(c){this.a=new Map;if(c){c=r(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.a.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(r([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.a.set(c,c);this.size=this.a.size;return this};b.prototype["delete"]=function(c){c=this.a["delete"](c);this.size=this.a.size;return c};b.prototype.clear=function(){this.a.clear();this.size=0};b.prototype.has=function(c){return this.a.has(c)};b.prototype.entries=function(){return this.a.entries()};b.prototype.values=function(){return this.a.values()};b.prototype.keys=b.prototype.values;
  b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.a.forEach(function(f){return c.call(d,f,f,e)})};return b});ha("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ha("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});
  function Ja(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}ha("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Ja(this,b,"includes").indexOf(b,c||0)}});
  function Ka(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{ba:e,le:f}}return{ba:-1,le:void 0}}ha("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).ba}});ha("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
  function La(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}ha("Array.prototype.keys",function(a){return a?a:function(){return La(this,function(b){return b})}});ha("Array.prototype.values",function(a){return a?a:function(){return La(this,function(b,c){return c})}});
  ha("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});ha("Array.prototype.find",function(a){return a?a:function(b,c){return Ka(this,b,c).le}});
  ha("String.prototype.repeat",function(a){return a?a:function(b){var c=Ja(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});ha("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=Ja(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
  ha("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});var Ma="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ia(d,e)&&(a[e]=d[e])}return a};ha("Object.assign",function(a){return a||Ma});ha("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Ia(b,d)&&c.push(b[d]);return c}});var Oa=this||self;
  function K(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d[e]&&d[e]!==Object.prototype[e]?d=d[e]:d=d[e]={}:d[e]=b};/*
   @license
   Shaka Player
   Copyright 2016 Google LLC
   SPDX-License-Identifier: Apache-2.0
  */
  function Pa(a){this.c=Math.exp(Math.log(.5)/a);this.b=this.a=0}function Qa(a,b,c){var d=Math.pow(a.c,b);c=c*(1-d)+d*a.a;isNaN(c)||(a.a=c,a.b+=b)}function Ra(a){return a.a/(1-Math.pow(a.c,a.b))};function Sa(){this.b=new Pa(2);this.c=new Pa(5);this.a=0}Sa.prototype.getBandwidthEstimate=function(a){return 128E3>this.a?a:Math.min(Ra(this.b),Ra(this.c))};function Ta(){}function Ua(){}function Va(){}function Wa(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];Ya.has(a)||(Ya.add(a),Va.apply(Ta,ja(c)))}function $a(){}function ab(){}function bb(){}function cb(){}var Ya=new Set;
  if(window.console&&window.console.log.bind){var db={},eb=(db[1]=console.error.bind(console),db[2]=console.warn.bind(console),db[3]=console.info.bind(console),db[4]=console.log.bind(console),db[5]=console.debug.bind(console),db[6]=console.debug.bind(console),db);Va=eb[2];Ua=eb[1]};function fb(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function hb(a,b){for(var c=r(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0}
  var jb=function ib(a){var c;return Ga(ib,function(d){1==d.a&&(c=0);if(3!=d.a)return c<a?u(d,c,3):d.m(0);c++;return d.m(2)})},lb=function kb(a){var c,d,e,f,g,h;return Ga(kb,function(k){1==k.a&&(c=-1,e=d=void 0,f=r(a),g=f.next());if(5!=k.a){if(g.done)return-1==c?k.m(0):u(k,{ba:c,df:d,item:e,next:void 0},0);h=g.value;return 0<=c?u(k,{ba:c,item:e,df:d,next:h},5):k.m(5)}c++;d=e;e=h;g=f.next();return k.m(2)})};function nb(){}function ob(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if(pb(a)==pb(b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;for(var c=qb(a),d=qb(b),e=r(jb(a.byteLength)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}function pb(a){return a instanceof ArrayBuffer?a:a.buffer}function rb(a){return a instanceof ArrayBuffer?a:0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer}
  function qb(a,b,c){c=void 0===c?Infinity:c;return sb(a,void 0===b?0:b,c,Uint8Array)}function tb(a,b,c){c=void 0===c?Infinity:c;return sb(a,void 0===b?0:b,c,DataView)}function sb(a,b,c,d){var e=(a.byteOffset||0)+a.byteLength;b=Math.max(0,Math.min((a.byteOffset||0)+b,e));return new d(pb(a),b,Math.min(b+Math.max(c,0),e)-b)}K("shaka.util.BufferUtils",nb);nb.toDataView=tb;nb.toUint8=qb;nb.toArrayBuffer=rb;nb.equal=ob;function L(a,b,c,d){for(var e=[],f=3;f<arguments.length;++f)e[f-3]=arguments[f];this.severity=a;this.category=b;this.code=c;this.data=e;this.handled=!1}L.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};K("shaka.util.Error",L);L.Severity={RECOVERABLE:1,CRITICAL:2};L.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
  L.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,
  TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,
  MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,
  HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_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,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,
  LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,
  STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004};/*
   @license
   Copyright 2008 The Closure Library Authors
   SPDX-License-Identifier: Apache-2.0
  */
  var ub=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;/*
   @license
   Copyright 2006 The Closure Library Authors
   SPDX-License-Identifier: Apache-2.0
  */
  function vb(a){var b;a instanceof vb?(wb(this,a.Ba),this.gb=a.gb,this.Aa=a.Aa,xb(this,a.zb),this.pa=a.pa,yb(this,a.a.clone()),this.Ya=a.Ya):a&&(b=String(a).match(ub))?(wb(this,b[1]||"",!0),this.gb=zb(b[2]||""),this.Aa=zb(b[3]||"",!0),xb(this,b[4]),this.pa=zb(b[5]||"",!0),yb(this,b[6]||"",!0),this.Ya=zb(b[7]||"")):this.a=new Ab(null)}q=vb.prototype;q.Ba="";q.gb="";q.Aa="";q.zb=null;q.pa="";q.Ya="";
  q.toString=function(){var a=[],b=this.Ba;b&&a.push(Bb(b,Cb,!0),":");if(b=this.Aa){a.push("//");var c=this.gb;c&&a.push(Bb(c,Cb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.zb;null!=b&&a.push(":",String(b))}if(b=this.pa)this.Aa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Bb(b,"/"==b.charAt(0)?Db:Eb,!0));(b=this.a.toString())&&a.push("?",b);(b=this.Ya)&&a.push("#",Bb(b,Fb));return a.join("")};
  q.resolve=function(a){var b=this.clone();"data"===b.Ba&&(b=new vb);var c=!!a.Ba;c?wb(b,a.Ba):c=!!a.gb;c?b.gb=a.gb:c=!!a.Aa;c?b.Aa=a.Aa:c=null!=a.zb;var d=a.pa;if(c)xb(b,a.zb);else if(c=!!a.pa){if("/"!=d.charAt(0))if(this.Aa&&!this.pa)d="/"+d;else{var e=b.pa.lastIndexOf("/");-1!=e&&(d=b.pa.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
  h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.pa=d:c=""!==a.a.toString();c?yb(b,a.a.clone()):c=!!a.Ya;c&&(b.Ya=a.Ya);return b};q.clone=function(){return new vb(this)};function wb(a,b,c){a.Ba=c?zb(b,!0):b;a.Ba&&(a.Ba=a.Ba.replace(/:$/,""))}function xb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.zb=b}else a.zb=null}function yb(a,b,c){b instanceof Ab?a.a=b:(c||(b=Bb(b,Gb)),a.a=new Ab(b))}
  function zb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Bb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Hb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Hb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Cb=/[#\/\?@]/g,Eb=/[#\?:]/g,Db=/[#\?]/g,Gb=/[#\?@]/g,Fb=/#/g;function Ab(a){this.a=a||null}q=Ab.prototype;q.ma=null;q.nc=null;
  q.add=function(a,b){if(!this.ma&&(this.ma={},this.nc=0,this.a))for(var c=this.a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null;if(0<=e){var g=c[d].substring(0,e);f=c[d].substring(e+1)}else g=c[d];g=decodeURIComponent(g.replace(/\+/g," "));f=f||"";this.add(g,decodeURIComponent(f.replace(/\+/g," ")))}this.a=null;(c=this.ma.hasOwnProperty(a)&&this.ma[a])||(this.ma[a]=c=[]);c.push(b);this.nc++;return this};
  q.toString=function(){if(this.a)return this.a;if(!this.ma)return"";var a=[],b;for(b in this.ma)for(var c=encodeURIComponent(b),d=this.ma[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.a=a.join("&")};q.clone=function(){var a=new Ab;a.a=this.a;if(this.ma){var b={},c;for(c in this.ma)b[c]=this.ma[c].concat();a.ma=b;a.nc=this.nc}return a};function Ib(a,b){this.a=a;this.b=b}Ib.prototype.toString=function(){return"v"+this.a+"."+this.b};function Jb(a,b){var c=new Ib(4,0),d=Kb,e=d.a,f=c.b-e.b;(0<(c.a-e.a||f)?d.c:d.b)(d.a,c,a,b)}function Lb(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Mb(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var Kb=null;function Nb(a,b){return a.concat(b)}function Ob(){}function Pb(a){return null!=a}function Qb(a){var b=Object.create(a.prototype||Object.prototype);try{var c=a.call(b);c||(Jb("Factories requiring new","Factories should be plain functions"),c=b)}catch(d){Jb("Factories requiring new","Factories should be plain functions"),c=new a}return c};function Rb(a,b){if(0==b.length)return a;var c=b.map(function(d){return new vb(d)});return a.map(function(d){return new vb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(Nb,[]).map(function(d){return d.toString()})}function Sb(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:b||[],keyIds:new Set}}
  var Tb={Ha:"video",mb:"audio",$:"text",Kf:"image",Cf:"application"};function Ub(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}Ub.prototype.resolve=function(){};Ub.prototype.reject=function(){};function Vb(a){this.b=a;this.a=void 0}Vb.prototype.value=function(){void 0==this.a&&(this.a=this.b());return this.a};function Wb(){}function Xb(a){if(!a)return"";a=qb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));a=(new TextDecoder).decode(a);a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!');return a}
  function Yb(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new L(2,2,2004);var d=Math.floor(a.byteLength/2);c=new Uint16Array(d);a=tb(a);d=r(jb(d));for(var e=d.next();!e.done;e=d.next())e=e.value,c[e]=a.getUint16(2*e,b);return Zb.value()(c)}
  function $b(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=qb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Xb(c);if(254==c[0]&&255==c[1])return Yb(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Yb(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Yb(a,!1);if(0==c[1]&&0==c[3])return Yb(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Xb(a);throw new L(2,2,2003);}function ac(a){var b=new TextEncoder;return rb(b.encode(a))}
  function bc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=r(lb(a)),f=e.next();!f.done;f=e.next())f=f.value,d.setUint16(2*f.ba,f.item.charCodeAt(0),b);return c}K("shaka.util.StringUtils",Wb);Wb.resetFromCharCode=function(){Zb.a=void 0};Wb.toUTF16=bc;Wb.toUTF8=ac;Wb.fromBytesAutoDetect=$b;Wb.fromUTF16=Yb;Wb.fromUTF8=Xb;
  var Zb=new Vb(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Oa:65536};0<b.Oa;b={Oa:b.Oa},b.Oa/=2)if(a(b.Oa))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Oa)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Oa));return e}}(b);return null});function cc(){}function dc(a){a=qb(a);a=Zb.value()(a);return btoa(a)}function ec(a,b){b=void 0==b?!0:b;var c=dc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function fc(a){var b=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));a=new Uint8Array(b.length);b=r(lb(b));for(var c=b.next();!c.done;c=b.next())c=c.value,a[c.ba]=c.item.charCodeAt(0);return a}
  function gc(a){var b=a.length/2,c=new Uint8Array(b);b=r(jb(b));for(var d=b.next();!d.done;d=b.next())d=d.value,c[d]=window.parseInt(a.substr(2*d,2),16);return c}function hc(a){var b=qb(a);a="";b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}
  function ic(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];var d=0,e=r(b);for(c=e.next();!c.done;c=e.next())d+=c.value.byteLength;d=new Uint8Array(d);e=0;b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,d.set(qb(c),e),e+=c.byteLength;return d}K("shaka.util.Uint8ArrayUtils",cc);cc.concat=ic;cc.toHex=hc;cc.fromHex=gc;cc.fromBase64=fc;cc.toBase64=ec;cc.toStandardBase64=dc;
  cc.equal=function(a,b){Jb("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead.");return ob(a,b)};function jc(){}K("shaka.dependencies",jc);jc.has=function(a){return kc.has(a)};jc.add=function(a,b){if(!lc[a])throw Error(a+" is not supported");kc.set(a,b)};var kc=new Map,lc={muxjs:"muxjs"};jc.Allowed=lc;kc.set("muxjs",window.muxjs);function mc(){var a=this;this.j=kc.get("muxjs");this.a=new this.j.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.h=[];this.c=[];this.g=[];this.f=!1;this.a.on("data",function(b){a.c=b.captions;a.g=b.metadata;a.h.push(ic(b.initSegment,b.data))});this.a.on("done",function(){var b={data:ic.apply(cc,ja(a.h)),captions:a.c,metadata:a.g};a.b.resolve(b);a.f=!1})}mc.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};
  function nc(a,b){if(!kc.get("muxjs")||"mp2t"!=a.toLowerCase().split(";")[0].split("/")[1])return!1;if(b)return MediaSource.isTypeSupported(oc(b,a));var c=oc("audio",a),d=oc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}
  function oc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function pc(a,b){a.f=!0;a.b=new Ub;a.h=[];a.c=[];a.g=[];var c=qb(b);a.a.push(c);a.a.flush();a.f&&a.b.reject(new L(2,3,3018));return a.b};function qc(a){this.b=a;this.a=null}qc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.a=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.b()},1E3*a);return this};qc.prototype.stop=function(){this.a&&(this.a(),this.a=null)};function M(a){this.b=a;this.a=null}M.prototype.Xb=function(){this.stop();this.b();return this};M.prototype.S=function(a){var b=this;this.stop();this.a=(new qc(function(){b.b()})).S(a);return this};M.prototype.va=function(a){var b=this;this.stop();this.a=(new qc(function(){b.a.S(a);b.b()})).S(a);return this};M.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)};K("shaka.util.Timer",M);M.prototype.stop=M.prototype.stop;M.prototype.tickEvery=M.prototype.va;M.prototype.tickAfter=M.prototype.S;
  M.prototype.tickNow=M.prototype.Xb;function rc(a,b){var c=sc();this.j=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.f=null==a.baseDelay?c.baseDelay:a.baseDelay;this.h=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.g=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.a=0;this.b=this.f;if(this.c=void 0===b?!1:b)this.a=1}
  function tc(a){var b,c;return J(function(d){if(1==d.a){if(a.a>=a.j)if(a.c)a.a=1,a.b=a.f;else throw new L(2,7,1010);b=a.a;a.a++;if(0==b)return d["return"]();c=a.b*(1+(2*Math.random()-1)*a.h);return u(d,new Promise(function(e){(new M(e)).S(c/1E3)}),2)}a.b*=a.g;x(d)})}function sc(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4}};function uc(a,b){this.promise=a;this.c=b;this.a=!1}function vc(a){return new uc(Promise.reject(a),function(){return Promise.resolve()})}function wc(){var a=Promise.reject(new L(2,7,7001));a["catch"](function(){});return new uc(a,function(){return Promise.resolve()})}function xc(a){return new uc(Promise.resolve(a),function(){return Promise.resolve()})}function yc(a){return new uc(a,function(){return a["catch"](function(){})})}uc.prototype.abort=function(){this.a=!0;return this.c()};
  function zc(a){return new uc(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}uc.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
  uc.prototype.W=function(a,b){function c(h){return function(k){if(e.a&&h)f.reject(g);else{var l=h?a:b;l?d=Ac(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new Ub,g=new L(2,7,7001);this.promise.then(c(!0),c(!1));return new uc(f,function(){return d()})};
  function Ac(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}K("shaka.util.AbortableOperation",uc);uc.prototype.chain=uc.prototype.W;uc.prototype["finally"]=uc.prototype["finally"];uc.all=zc;uc.prototype.abort=uc.prototype.abort;uc.notAbortable=yc;uc.completed=xc;uc.aborted=wc;uc.failed=vc;function O(a,b){b=void 0===b?{}:b;for(var c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}O.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};O.prototype.stopImmediatePropagation=function(){this.a=!0};
  O.prototype.stopPropagation=function(){};K("shaka.util.FakeEvent",O);function Bc(){this.a={}}Bc.prototype.push=function(a,b){this.a.hasOwnProperty(a)?this.a[a].push(b):this.a[a]=[b]};Bc.prototype.get=function(a){return(a=this.a[a])?a.slice():null};Bc.prototype.remove=function(a,b){a in this.a&&(this.a[a]=this.a[a].filter(function(c){return c!=b}))};function Cc(a,b){for(var c in a.a)b(c,a.a[c])};function Dc(){this.Vc=new Bc;this.fc=this}Dc.prototype.addEventListener=function(a,b){this.Vc.push(a,b)};Dc.prototype.removeEventListener=function(a,b){this.Vc.remove(a,b)};Dc.prototype.dispatchEvent=function(a){var b=this.Vc.get(a.type)||[];b=r(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.fc;a.currentTarget=this.fc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.a)break}return a.defaultPrevented};function Ec(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Fc(a){var b={},c;for(c in a)b[c]=a[c];return b};function Gc(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function Hc(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function Ic(a,b,c){c||(c=Gc);if(a.length!=b.length)return!1;b=b.slice();var d={};a=r(a);for(var e=a.next();!e.done;d={Hc:d.Hc},e=a.next()){d.Hc=e.value;e=b.findIndex(function(f){return function(g){return c(f.Hc,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
  function Jc(a,b,c){c||(c=Gc);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function Kc(){this.a=[]}function Lc(a,b){a.a.push(b["finally"](function(){Hc(a.a,b)}))}Kc.prototype.destroy=function(){for(var a=[],b=r(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.a=[];return Promise.all(a)};function Mc(a){Dc.call(this);this.f=!1;this.h=new Kc;this.a=new Set;this.b=new Set;this.c=a||null;this.g=!1}ra(Mc,Dc);q=Mc.prototype;q.zd=function(a){this.g=a};function Nc(a,b,c){c=c||Oc;var d=Pc[a];if(!d||c>=d.priority)Pc[a]={priority:c,cf:b}}q.ef=function(a){this.a.add(a)};q.yf=function(a){this.a["delete"](a)};q.ve=function(){this.a.clear()};q.ff=function(a){this.b.add(a)};q.zf=function(a){this.b["delete"](a)};q.we=function(){this.b.clear()};
  function Qc(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.h.destroy()};
  q.request=function(a,b){var c=this,d=new Rc;if(this.f){var e=Promise.reject(new L(2,7,7001));e["catch"](function(){});return new Sc(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Ec(b.retryParameters):sc();b.uris=Ec(b.uris);e=Tc(this,a,b);var f=e.W(function(){return Uc(c,a,b,new rc(b.retryParameters,!1),0,null,d)}),g=f.W(function(n){return Vc(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
  var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.W(function(n){var p=Date.now()-l,t=n.response;t.timeMs+=k;t.timeMs+=p;n.Ue||!c.c||t.fromCache||a!=Wc||c.c(t.timeMs,t.data.byteLength);return t},function(n){n&&(n.severity=2);throw n;});e=new Sc(m.promise,function(){return m.abort()},d);Lc(this.h,e);return e};
  function Tc(a,b,c){var d=xc(void 0),e={};a=r(a.a);for(var f=a.next();!f.done;e={Mc:e.Mc},f=a.next())e.Mc=f.value,d=d.W(function(g){return function(){c.body&&(c.body=rb(c.body));return g.Mc(b,c)}}(e));return d.W(void 0,function(g){if(g instanceof L&&7001==g.code)throw g;throw new L(2,1,1006,g);})}
  function Uc(a,b,c,d,e,f,g){a.g&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new vb(c.uris[e]),k=h.Ba,l=!1;k||(k=location.protocol,k=k.slice(0,-1),wb(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Pc[k])?k.cf:null;if(!m)return vc(new L(2,1,1E3,h));var n;return yc(tc(d)).W(function(){if(a.f)return wc();n=Date.now();return m(c.uris[e],c,b,function(p,t,v){a.c&&b==Wc&&(a.c(p,t),l=!0,g.a=v)})}).W(function(p){void 0==p.timeMs&&(p.timeMs=Date.now()-n);return{response:p,Ue:l}},function(p){if(a.f)return wc();
  if(p instanceof L){if(7001==p.code)throw p;if(1010==p.code)throw f;if(1==p.severity){var t=new O("retry",{error:p});a.dispatchEvent(t);e=(e+1)%c.uris.length;return Uc(a,b,c,d,e,p,g)}}throw p;})}
  function Vc(a,b,c){var d=xc(void 0),e={};a=r(a.b);for(var f=a.next();!f.done;e={Nc:e.Nc},f=a.next())e.Nc=f.value,d=d.W(function(g){return function(){var h=c.response;h.data&&(h.data=rb(h.data));return g.Nc(b,h)}}(e));return d.W(function(){return c},function(g){var h=2;if(g instanceof L){if(7001==g.code)throw g;h=g.severity}throw new L(h,1,1007,g);})}K("shaka.net.NetworkingEngine",Mc);Mc.prototype.request=Mc.prototype.request;Mc.prototype.destroy=Mc.prototype.destroy;Mc.makeRequest=Qc;
  Mc.defaultRetryParameters=function(){return sc()};Mc.prototype.clearAllResponseFilters=Mc.prototype.we;Mc.prototype.unregisterResponseFilter=Mc.prototype.zf;Mc.prototype.registerResponseFilter=Mc.prototype.ff;Mc.prototype.clearAllRequestFilters=Mc.prototype.ve;Mc.prototype.unregisterRequestFilter=Mc.prototype.yf;Mc.prototype.registerRequestFilter=Mc.prototype.ef;Mc.unregisterScheme=function(a){delete Pc[a]};Mc.registerScheme=Nc;Mc.prototype.setForceHTTPS=Mc.prototype.zd;function Rc(){this.a=0}
  Mc.NumBytesRemainingClass=Rc;function Sc(a,b,c){uc.call(this,a,b);this.b=c}ra(Sc,uc);Mc.PendingRequest=Sc;var Wc=1;Mc.RequestType={MANIFEST:0,SEGMENT:Wc,LICENSE:2,APP:3,TIMING:4};var Oc=3;Mc.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Oc};var Pc={};function Xc(a){this.a=!1;this.b=new Ub;this.c=a}Xc.prototype.destroy=function(){var a=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){a.b.resolve()},function(){a.b.resolve()})};function Yc(a,b){if(a.a){if(b instanceof L&&7003==b.code)throw b;throw new L(2,7,7003,b);}};function Zc(){this.a=new Bc}q=Zc.prototype;q.release=function(){this.eb();this.a=null};q.o=function(a,b,c,d){this.a&&(a=new $c(a,b,c,d),this.a.push(b,a))};q.na=function(a,b,c,d){function e(g){f.wa(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.wa=function(a,b,c){if(this.a){var d=this.a.get(b)||[];d=r(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.wa(),this.a.remove(b,e))}};
  q.eb=function(){if(this.a){var a=this.a,b=[],c;for(c in a.a)b.push.apply(b,ja(a.a[c]));a=r(b);for(b=a.next();!b.done;b=a.next())b.value.wa();this.a.a={}}};K("shaka.util.EventManager",Zc);Zc.prototype.removeAll=Zc.prototype.eb;Zc.prototype.unlisten=Zc.prototype.wa;Zc.prototype.listenOnce=Zc.prototype.na;Zc.prototype.listen=Zc.prototype.o;Zc.prototype.release=Zc.prototype.release;function $c(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.a=ad(a,d);this.target.addEventListener(b,c,this.a)}
  $c.prototype.wa=function(){this.target.removeEventListener(this.type,this.listener,this.a);this.listener=this.target=null;this.a=!1};function ad(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return bd(a)?b:b.capture||!1}
  function bd(a){var b=cd;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}cd=b}return b||!1}var cd=void 0;function dd(){}function ed(a){a=$b(a);return(new vb(a)).Aa}function fd(a,b,c){function d(h){tb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(qb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new L(2,6,6015);var e;"string"==typeof b?e=bc(b,!0):e=b;a=$b(a);a=bc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}K("shaka.util.FairPlayUtils",dd);dd.initDataTransform=fd;dd.defaultGetContentId=ed;function gd(a){for(var b=new Map,c=r(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function hd(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function id(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=r(a),d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function jd(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function kd(a){var b=[a.mimeType];ld.forEach(function(c,d){var e=a[d];e&&b.push(c+'="'+e+'"')});"PQ"==a.hdr&&b.push('eotf="smpte2084"');return b.join(";")}function md(a){a=a.split(".");var b=a[0];a.pop();return b}var ld=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function nd(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function od(a){return""!=pd().canPlayType(a)}function qd(){return rd("Tizen")}function sd(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!qd()}function td(){if(!sd())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function rd(a){return(navigator.userAgent||"").includes(a)}
  function pd(){if(ud)return ud;vd||(vd=new M(function(){ud=null}));(ud=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ud=document.createElement("video"));vd.S(1);return ud}var vd=null,ud=null;function wd(a,b){var c=this;b=void 0===b?1:b;this.u=a;this.l=new Set;this.a=this.h=null;this.M=!1;this.D=0;this.c=null;this.b=new Zc;this.f=new Map;this.v=[];this.j=new Ub;this.i=null;this.g=function(d){c.j.reject(d);a.onError(d)};this.ha=new Map;this.T=new Map;this.J=new M(function(){return xd(c)});this.A=!1;this.C=[];this.I=!1;this.X=(new M(function(){yd(c)})).va(b);this.j["catch"](function(){});this.F=new Xc(function(){return zd(c)})}wd.prototype.destroy=function(){return this.F.destroy()};
  function zd(a){return J(function(b){switch(b.a){case 1:return a.b.release(),a.b=null,a.j.reject(),a.X.stop(),a.X=null,a.J.stop(),a.J=null,u(b,Ad(a),2);case 2:if(!a.a){b.m(3);break}A(b,4);return u(b,a.a.setMediaKeys(null),6);case 6:wa(b,5);break;case 4:D(b);case 5:a.a=null;case 3:a.c=null,a.l.clear(),a.h=null,a.v=[],a.i=null,a.g=function(){},a.u=null,x(b)}})}wd.prototype.configure=function(a){this.i=a};function Bd(a,b,c){a.v=[];a.A=c;return Cd(a,b)}
  function Dd(a,b,c){a.v=c;a.A=0<c.length;return Cd(a,b)}function Ed(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,initData:null,keyIds:null}];g.set(b,e);return Fd(a,g)}
  function Cd(a,b){var c=Gd(a);if(c)for(var d=r(b),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=[c]),e.audio&&(e.audio.drmInfos=[c]);c=b.some(function(g){return g.video&&g.video.drmInfos.length||g.audio&&g.audio.drmInfos.length?!0:!1});c||(d=gd(a.i.servers),Hd(b,d));d=r(b);for(e=d.next();!e.done;e=d.next()){e=e.value;e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())Id(f.value,gd(a.i.servers),gd(a.i.advanced||{}))}d=Jd(a,
  b);if(!d.size)return a.M=!0,Promise.resolve();d=Fd(a,d);return c?d:d["catch"](function(){})}
  wd.prototype.Gb=function(a){var b=this,c,d;return J(function(e){if(1==e.a){if(!b.h)return b.b.na(a,"encrypted",function(){b.g(new L(2,6,6010))}),e["return"]();b.a=a;b.b.na(b.a,"play",function(){for(var f=r(b.C),g=f.next();!g.done;g=f.next())Kd(b,g.value);b.I=!0;b.C=[]});"webkitCurrentPlaybackTargetIsWireless"in b.a&&b.b.o(b.a,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Ad(b)});c=b.a.setMediaKeys(b.h);c=c["catch"](function(f){return Promise.reject(new L(2,6,6003,f.message))});
  return u(e,c,2)}Yc(b.F);Ld(b);b.c.initData.length||b.v.length||(d=function(f){return Md(b,f.initDataType,qb(f.initData))},b.b.o(b.a,"encrypted",d));x(e)})};function Nd(a){var b;return J(function(c){if(1==c.a){if(!(a.h&&a.c&&a.c.serverCertificate&&a.c.serverCertificate.length))return c.m(0);A(c,3);return u(c,a.h.setServerCertificate(a.c.serverCertificate),5)}if(3!=c.a)return wa(c,0);b=D(c);throw new L(2,6,6004,b.message);})}
  function Od(a,b){var c,d,e;return J(function(f){if(1==f.a)return u(f,Pd(a,b),2);c=f.b;if(!c)return f["return"]();d=[];if(e=a.f.get(c))e.Fa=new Ub,d.push(e.Fa);d.push(c.remove());return u(f,Promise.all(d),0)})}function Ld(a){for(var b=(a.c?a.c.initData:[])||[],c=r(b),d=c.next();!d.done;d=c.next())d=d.value,Md(a,d.initDataType,d.initData);c=r(a.v);for(d=c.next();!d.done;d=c.next())Pd(a,d.value);b.length||a.v.length||a.j.resolve();return a.j}
  function Md(a,b,c){var d=a.f.values();d=r(d);for(var e=d.next();!e.done;e=d.next())if(ob(c,e.value.initData)&&!rd("Tizen 2"))return;Sd(a,b,c)}function Td(a){return a?a.keySystem:""}function Ud(a,b){if(navigator.userAgent.match(/Edge\//))return!0;b=b.toLowerCase();if(qd()&&b.includes('codecs="ac-3"')){var c=b.replace("ac-3","ec-3");return a.l.has(b)||a.l.has(c)}return a.l.has(b)}function Vd(a){a=a.f.keys();a=fb(a,function(b){return b.sessionId});return Array.from(a)}
  wd.prototype.Lb=function(){var a=Infinity,b=this.f.keys();b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};
  function Jd(a,b){for(var c=new Set,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(e=f.next();!e.done;e=f.next())c.add(e.value)}d=r(c);for(e=d.next();!e.done;e=d.next())Id(e.value,gd(a.i.servers),gd(a.i.advanced||{}));f=a.A?"required":"optional";var g=a.A?["persistent-license"]:["temporary"];d=new Map;c=r(c);for(e=c.next();!e.done;e=c.next())e=e.value,d.set(e.keySystem,{initDataTypes:["cenc"],audioCapabilities:[],videoCapabilities:[],
  distinctiveIdentifier:"optional",persistentState:f,sessionTypes:g,label:e.keySystem,drmInfos:[]});c=r(b);for(e=c.next();!e.done;e=c.next())for(e=e.value,f=r([e.audio,e.video]),e=f.next();!e.done;e=f.next())if(g=e.value){var h=Wd(g),k=null;"ac-3"==g.codecs.toLowerCase()&&qd()&&(k=Wd(g,"ec-3"));var l=r(g.drmInfos);for(e=l.next();!e.done;e=l.next()){var m=e.value;e=d.get(m.keySystem);e.drmInfos.push(m);m.initData&&m.initData.length&&(e.initDataTypes=ja(new Set(m.initData.map(function(p){return p.initDataType}))).concat());
  m.distinctiveIdentifierRequired&&(e.distinctiveIdentifier="required");m.persistentStateRequired&&(e.persistentState="required");m="audio"==g.type?m.audioRobustness:m.videoRobustness;var n={robustness:m||"",contentType:h};"audio"==g.type?e.audioCapabilities.push(n):e.videoCapabilities.push(n);k&&(m={robustness:m||"",contentType:k},"audio"==g.type?e.audioCapabilities.push(m):e.videoCapabilities.push(m))}}return d}function Wd(a,b){var c=jd(a.mimeType,b||a.codecs);return nc(c)?oc(a.type,c):c}
  function Fd(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,z,C,E,B,H,I,F;return J(function(G){switch(G.a){case 1:if(1==b.size&&b.has(""))throw new L(2,6,6E3);c=r(b.values());for(d=c.next();!d.done;d=c.next())e=d.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;g=r([!0,!1]);h=g.next();case 2:if(h.done){G.m(4);break}k=h.value;l=r(b.keys());m=l.next();case 5:if(m.done){G.m(7);break}n=m.value;p=b.get(n);t=p.drmInfos.some(function(N){return!!N.licenseServerUri});
  if(t!=k){G.m(6);break}A(G,8);return u(G,navigator.requestMediaKeySystemAccess(n,[p]),10);case 10:f=G.b;G.m(7);break;case 8:D(G);case 9:Yc(a.F);case 6:m=l.next();G.m(5);break;case 7:if(f){G.m(4);break}h=g.next();G.m(2);break;case 4:if(!f)throw new L(2,6,6001);Yc(a.F);A(G,11);a.l.clear();v=f.getConfiguration();w=v.audioCapabilities||[];y=v.videoCapabilities||[];z=r(w);for(C=z.next();!C.done;C=z.next())E=C.value,a.l.add(E.contentType.toLowerCase());B=r(y);for(C=B.next();!C.done;C=B.next())H=C.value,
  a.l.add(H.contentType.toLowerCase());a.c=Xd(f.keySystem,b.get(f.keySystem));if(!a.c.licenseServerUri)throw new L(2,6,6012,a.c.keySystem);return u(G,f.createMediaKeys(),13);case 13:return I=G.b,Yc(a.F),a.h=I,a.M=!0,u(G,Nd(a),14);case 14:Yc(a.F);wa(G,0);break;case 11:F=D(G);Yc(a.F,F);a.c=null;a.l.clear();if(F instanceof L)throw F;throw new L(2,6,6002,F.message);}})}
  function Gd(a){a=gd(a.i.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=gc(f),h=gc(e);g={kty:"oct",kid:ec(g,!1),k:ec(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:qb(ac(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
  initData:d,keyIds:new Set(c)}}
  function Pd(a,b){var c,d,e,f,g;return J(function(h){switch(h.a){case 1:try{c=a.h.createSession("persistent-license")}catch(k){return d=new L(2,6,6005,k.message),a.g(d),h["return"](Promise.reject(d))}a.b.o(c,"message",function(k){a.a&&a.i.delayLicenseRequestUntilPlayed&&a.a.paused&&!a.I?a.C.push(k):Kd(a,k)});a.b.o(c,"keystatuseschange",function(k){return Yd(a,k)});e={initData:null,loaded:!1,od:Infinity,Fa:null};a.f.set(c,e);A(h,2);return u(h,c.load(b),4);case 4:f=h.b;Yc(a.F);if(!f)return a.f["delete"](c),
  a.g(new L(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Zd(a)&&a.j.resolve();return h["return"](c);case 2:g=D(h),Yc(a.F,g),a.f["delete"](c),a.g(new L(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
  function Sd(a,b,c){try{var d=a.A?a.h.createSession("persistent-license"):a.h.createSession()}catch(e){a.g(new L(2,6,6005,e.message));return}a.b.o(d,"message",function(e){a.a&&a.i.delayLicenseRequestUntilPlayed&&a.a.paused&&!a.I?a.C.push(e):Kd(a,e)});a.b.o(d,"keystatuseschange",function(e){return Yd(a,e)});a.f.set(d,{initData:c,loaded:!1,od:Infinity,Fa:null});try{c=a.i.initDataTransform(c,b,a.c)}catch(e){b=e;e instanceof L||(b=new L(2,6,6016,e));a.g(b);return}a.i.logLicenseExchange&&ec(c);d.generateRequest(b,
  c)["catch"](function(e){if(!a.F.a){a.f["delete"](d);var f=e.errorCode;if(f&&f.systemCode){var g=f.systemCode;0>g&&(g+=Math.pow(2,32));g="0x"+g.toString(16)}a.g(new L(2,6,6006,e.message,e,g))}})}function $d(a,b,c){"skd"==b&&(b=c.serverCertificate,c=ed(a),a=fd(a,c,b));return a}
  function Kd(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w;J(function(y){switch(y.a){case 1:return c=b.target,a.i.logLicenseExchange&&ec(b.message),d=a.f.get(c),e=a.c.licenseServerUri,f=a.i.advanced[a.c.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Qc([e],a.i.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,"com.microsoft.playready"!=a.c.keySystem&&"com.chromecast.playready"!=a.c.keySystem||
  ae(g),h=Date.now(),A(y,2),l=a.u.wb.request(2,g),u(y,l.promise,4);case 4:k=y.b;wa(y,3);break;case 2:return m=D(y),n=new L(2,6,6007,m),a.g(n),d&&d.Fa&&d.Fa.reject(n),y["return"]();case 3:if(a.F.a)return y["return"]();a.D+=(Date.now()-h)/1E3;a.i.logLicenseExchange&&ec(k.data);A(y,5);return u(y,c.update(k.data),7);case 7:wa(y,6);break;case 5:return p=D(y),t=new L(2,6,6008,p.message),a.g(t),d&&d.Fa&&d.Fa.reject(t),y["return"]();case 6:v=new O("drmsessionupdate"),a.u.onEvent(v),d&&(d.Fa&&d.Fa.resolve(),
  w=new M(function(){d.loaded=!0;Zd(a)&&a.j.resolve()}),w.S(be)),x(y)}})}
  function ae(a){var b=Yb(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=r(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=fc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
  function Yd(a,b){var c=b.target,d=a.f.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if("com.microsoft.playready"==a.c.keySystem&&16==h.byteLength&&(rd("Trident/")||navigator.userAgent.match(/Edge?\//))){k=tb(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),n=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,n,!1)}"com.microsoft.playready"==a.c.keySystem&&"status-pending"==g&&(g="usable");"status-pending"!=g&&(d.loaded=!0);"expired"==g&&
  (e=!0);k=hc(h);a.ha.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Fa&&(a.f["delete"](c),c.close()["catch"](function(){}));Zd(a)&&(a.j.resolve(),a.J.S(ce))}function xd(a){var b=a.ha,c=a.T;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.g(new L(2,6,6014));a.u.uc(hd(c))}
  function de(){var a,b,c,d,e,f,g,h;return J(function(k){return 1==k.a?(a="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(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,c],f=new Map,g=function(l){var m,n,p;
  return J(function(t){switch(t.a){case 1:return A(t,2),u(t,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=t.b,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,rd("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(t,m.createMediaKeys(),5);case 5:wa(t,0);break;case 2:D(t),f.set(l,null),x(t)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](hd(f))})}
  function ee(a){var b;return J(function(c){if(1==c.a)return b=new Promise(function(d,e){(new M(e)).S(fe)}),A(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.a)return wa(c,0);D(c);x(c)})}function Ad(a){var b;return J(function(c){b=Array.from(a.f.keys());a.f.clear();return u(c,Promise.all(b.map(function(d){return J(function(e){if(1==e.a)return A(e,2),u(e,ee(d),4);if(2!=e.a)return wa(e,0);D(e);x(e)})})),0)})}
  function ge(a,b){var c=b.audio,d=b.video;if(c&&c.encrypted){var e=Wd(c);if(!Ud(a,e))return!1}if(d&&d.encrypted&&(e=Wd(d),!Ud(a,e)))return!1;var f=Td(a.c);c=(d?d.drmInfos:[]).concat(c?c.drmInfos:[]);return 0==c.length||c.some(function(g){return g.keySystem==f})}
  function he(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=r(b),g=f.next();!g.done;g=f.next())if(g=g.value,e.keySystem==g.keySystem){f=[];f=f.concat(e.initData||[]);f=f.concat(g.initData||[]);var h=e.keyIds&&g.keyIds?new Set(ja(e.keyIds).concat(ja(g.keyIds))):e.keyIds||g.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||g.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||
  g.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||g.persistentStateRequired,videoRobustness:e.videoRobustness||g.videoRobustness,audioRobustness:e.audioRobustness||g.audioRobustness,serverCertificate:e.serverCertificate||g.serverCertificate,initData:f,keyIds:h});break}}return c}function yd(a){a.f.forEach(function(b,c){var d=b.od,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.u.onExpirationUpdated(c.sessionId,e),b.od=e)})}
  function Zd(a){a=a.f.values();return hb(a,function(b){return b.loaded})}function Hd(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:new Set})});for(var d=r(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
  function Xd(a,b){var c=[],d=[],e=[],f=new Set;ie(b.drmInfos,c,d,e,f);return{keySystem:a,licenseServerUri:c[0],distinctiveIdentifierRequired:"required"==b.distinctiveIdentifier,persistentStateRequired:"required"==b.persistentState,audioRobustness:(b.audioCapabilities?b.audioCapabilities[0].robustness:"")||"",videoRobustness:(b.videoCapabilities?b.videoCapabilities[0].robustness:"")||"",serverCertificate:d[0],initData:e,keyIds:f}}
  function ie(a,b,c,d,e){var f={};a=r(a);for(var g=a.next();!g.done;f={ra:f.ra},g=a.next()){f.ra=g.value;b.includes(f.ra.licenseServerUri)||b.push(f.ra.licenseServerUri);f.ra.serverCertificate&&(c.some(function(l){return function(m){return ob(m,l.ra.serverCertificate)}}(f))||c.push(f.ra.serverCertificate));if(f.ra.initData){g={};for(var h=r(f.ra.initData),k=h.next();!k.done;g={$b:g.$b},k=h.next())g.$b=k.value,d.some(function(l){return function(m){var n=l.$b;return m.keyId&&m.keyId==n.keyId?!0:m.initDataType==
  n.initDataType&&ob(m.initData,n.initData)}}(g))||d.push(g.$b)}if(f.ra.keyIds)for(g=r(f.ra.keyIds),h=g.next();!h.done;h=g.next())e.add(h.value)}}
  function Id(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
  (a.serverCertificate=c.serverCertificate);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var fe=1,be=5,ce=.5,je=new Vb(function(){return rb(new Uint8Array([0]))});function R(a,b){this.O=tb(a);this.b=b==ke;this.a=0}q=R.prototype;q.ga=function(){return this.a<this.O.byteLength};q.Z=function(){return this.a};q.Ee=function(){return this.O.byteLength};q.V=function(){try{var a=this.O.getUint8(this.a);this.a+=1;return a}catch(b){throw le();}};q.Ab=function(){try{var a=this.O.getUint16(this.a,this.b);this.a+=2;return a}catch(b){throw le();}};q.H=function(){try{var a=this.O.getUint32(this.a,this.b);this.a+=4;return a}catch(b){throw le();}};
  q.$d=function(){try{var a=this.O.getInt32(this.a,this.b);this.a+=4;return a}catch(b){throw le();}};q.cb=function(){try{if(this.b){var a=this.O.getUint32(this.a,!0);var b=this.O.getUint32(this.a+4,!0)}else b=this.O.getUint32(this.a,!1),a=this.O.getUint32(this.a+4,!1)}catch(c){throw le();}if(2097151<b)throw new L(2,3,3001);this.a+=8;return b*Math.pow(2,32)+a};q.Ta=function(a){if(this.a+a>this.O.byteLength)throw le();var b=qb(this.O,this.a,a);this.a+=a;return b};
  q.skip=function(a){if(this.a+a>this.O.byteLength)throw le();this.a+=a};q.be=function(a){if(this.a<a)throw le();this.a-=a};q.seek=function(a){if(0>a||a>this.O.byteLength)throw le();this.a=a};q.Tb=function(){for(var a=this.a;this.ga()&&0!=this.O.getUint8(this.a);)this.a+=1;a=qb(this.O,a,this.a-a);this.a+=1;return Xb(a)};function le(){return new L(2,3,3E3)}K("shaka.util.DataViewReader",R);R.prototype.readTerminatedString=R.prototype.Tb;R.prototype.seek=R.prototype.seek;R.prototype.rewind=R.prototype.be;
  R.prototype.skip=R.prototype.skip;R.prototype.readBytes=R.prototype.Ta;R.prototype.readUint64=R.prototype.cb;R.prototype.readInt32=R.prototype.$d;R.prototype.readUint32=R.prototype.H;R.prototype.readUint16=R.prototype.Ab;R.prototype.readUint8=R.prototype.V;R.prototype.getLength=R.prototype.Ee;R.prototype.getPosition=R.prototype.Z;R.prototype.hasMoreData=R.prototype.ga;var ke=1;R.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ke};function me(){this.c=[];this.b=[];this.a=!1}q=me.prototype;q.box=function(a,b){var c=ne(a);this.c[c]=oe;this.b[c]=b;return this};q.P=function(a,b){var c=ne(a);this.c[c]=pe;this.b[c]=b;return this};q.stop=function(){this.a=!0};q.parse=function(a,b,c){a=new R(a,0);for(this.a=!1;a.ga()&&!this.a;)this.wc(0,a,b,c)};
  q.wc=function(a,b,c,d){var e=b.Z(),f=b.H(),g=b.H(),h=!1;switch(f){case 0:f=b.O.byteLength-e;break;case 1:f=b.cb(),h=!0}var k=this.b[g];if(k){var l=null,m=null;this.c[g]==pe&&(m=b.H(),l=m>>>24,m&=16777215);g=e+f;c&&g>b.O.byteLength&&(g=b.O.byteLength);d&&g>b.O.byteLength?this.a=!0:(d=g-b.Z(),b=0<d?b.Ta(d):new Uint8Array(0),b=new R(b,0),k({parser:this,partialOkay:c||!1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.Z(),b.O.byteLength-b.Z()))};
  function qe(a){for(var b=re(a);a.reader.ga()&&!a.parser.a;)a.parser.wc(a.start+b,a.reader,a.partialOkay)}function se(a){var b=re(a),c=a.reader.H();c=r(jb(c));for(var d=c.next();!d.done&&(a.parser.wc(a.start+b,a.reader,a.partialOkay),!a.parser.a);d=c.next());}function te(a){return function(b){a(b.reader.Ta(b.reader.O.byteLength-b.reader.Z()))}}function ne(a){var b=0;a=r(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}
  function ue(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function re(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}K("shaka.util.Mp4Parser",me);me.headerSize=re;me.typeToString=ue;me.allData=te;me.sampleDescription=se;me.children=qe;me.prototype.parseNext=me.prototype.wc;me.prototype.parse=me.prototype.parse;me.prototype.stop=me.prototype.stop;me.prototype.fullBox=me.prototype.P;me.prototype.box=me.prototype.box;var oe=0,pe=1;function ve(a){function b(){d=!0}function c(l){f.push(l);qe(l)}a=qb(a);var d=!1,e,f=[],g=[];(new me).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).P("stsd",function(l){e=l;f.push(l);se(l)}).P("encv",b).P("enca",b).P("avc1",function(l){g.push({box:l,Wd:1701733238})}).P("mp4a",function(l){g.push({box:l,Wd:1701733217})}).parse(a);if(d)return a;if(0==g.length||!e)throw cb(hc(a)),new L(2,3,3019);g.reverse();for(var h=r(g),k=h.next();!k.done;k=h.next())k=k.value,a=we(a,e,k.box,f,
  k.Wd);return a}
  function we(a,b,c,d,e){var f=xe.value(),g=a.subarray(c.start,c.start+c.size),h=tb(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=tb(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);ye(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=rd("Xbox One")?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=r(d);for(d=a.next();!d.done;d=a.next())d=d.value,ye(e,d.start,d.size+k.byteLength);k=tb(e,b.start);b=re(b);
  a=k.getUint32(b);k.setUint32(b,a+1);return e}function ye(a,b,c){a=tb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var xe=new Vb(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function ze(a,b,c){this.startTime=a;this.direction=Ae;this.endTime=b;this.payload=c;this.region=new Be;this.position=null;this.positionAlign=Ce;this.size=0;this.textAlign=De;this.writingMode=Ee;this.lineInterpretation=Fe;this.line=null;this.lineHeight="";this.lineAlign=Ge;this.displayAlign=He;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=Ie;this.fontStyle=Je;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textDecoration=
  [];this.wrapLine=!0;this.id="";this.nestedCues=[];this.spacer=this.lineBreak=!1;this.cellResolution={columns:32,rows:15}}ze.prototype.clone=function(){var a=new ze(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
  function Ke(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!Jc(a.nestedCues,b.nestedCues,Ke))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!Jc(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}K("shaka.text.Cue",ze);var Ce="auto";
  ze.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ce};var De="center",Le={LEFT:"left",RIGHT:"right",CENTER:De,START:"start",END:"end"};ze.textAlign=Le;var He="after",Me={BEFORE:"before",CENTER:"center",AFTER:He};ze.displayAlign=Me;var Ae="ltr";ze.direction={HORIZONTAL_LEFT_TO_RIGHT:Ae,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ee="horizontal-tb";ze.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ee,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Fe=0;
  ze.lineInterpretation={LINE_NUMBER:Fe,PERCENTAGE:1};var Ge="start",Ne={CENTER:"center",START:Ge,END:"end"};ze.lineAlign=Ne;var Ie=400;ze.fontWeight={NORMAL:Ie,BOLD:700};var Je="normal",Oe={NORMAL:Je,ITALIC:"italic",OBLIQUE:"oblique"};ze.fontStyle=Oe;ze.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
  function Be(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Pe;this.scroll=Qe}K("shaka.text.CueRegion",Be);var Pe=1;Be.units={PX:0,PERCENTAGE:Pe,LINES:2};var Qe="";Be.scrollMode={NONE:Qe,UP:"up"};function Re(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(B){return null!=B&&""!=B.a.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(B){return null!=B&&""!=B.a.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Se(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],t=-1,v=-1,w=0;w<p.length;w++)if(null!=p[w]&&""!==p[w].a.trim()){t=w;break}for(w=p.length-1;0<=w;w--)if(null!=p[w]&&""!==p[w].a.trim()){v=w;break}if(-1===
  t||-1===v)p=Te(d,e),a.nestedCues.push(p);else{for(;t<=v;t++)if(w=p[t]){var y=w.g,z=w.c,C=w.f,E=w.b;if(y!=h||z!=k||C!=l||E!=m)n.payload&&a.nestedCues.push(n),n=Se(d,e,y,z,C,E),h=y,k=z,l=C,m=E;n.payload+=w.a}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Te(d,e),a.nestedCues.push(n));n=Se(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
  function Se(a,b,c,d,e,f){a=new ze(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Te(a,b){var c=new ze(a,b,"");c.lineBreak=!0;return c}function Ue(a,b,c,d,e){this.a=a;this.g=b;this.c=c;this.b=d;this.f=e};function Ve(){this.g=!1;this.h=this.l=0;this.j=We;this.c=[];this.a=this.b=this.f=0;this.D=this.A=!1;this.C="white";this.v="black";Xe(this)}function Xe(a){a.c=[];for(var b=0;15>b;b++)a.c.push(Ye())}function Ye(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Ze(a,b){$e(a)&&(a.c[a.b][a.a]=new Ue(b,a.D,a.A,a.v,a.C),a.a++)}function $e(a){var b=a.a<a.h&&0<=a.a;return a.b<a.l&&0<=a.b&&b}Ve.prototype.isVisible=function(){return this.g};
  function af(a,b,c){var d=new ze(a.f,b,"");d.textAlign=a.j===bf?"left":a.j===cf?"right":De;if(c=Re(d,"svc"+c,a.c,a.f,b))a.f=b;return c}var bf=0,cf=1,We=2;function ef(){this.c=[];this.b=null;this.a=0}function ff(a,b){3===b.type?(a.a=2*(b.value&63)-1,a.b=[]):a.b&&(0<a.a&&(a.b.push(b),a.a--),0===a.a&&(a.c.push(new gf(a.b)),a.b=null,a.a=0))}function gf(a){this.a=0;this.b=a}gf.prototype.ga=function(){return this.a<this.b.length};gf.prototype.Z=function(){return this.a};function hf(a){if(!a.ga())throw new L(2,2,3E3);return a.b[a.a++]}gf.prototype.skip=function(a){if(this.a+a>this.b.length)throw new L(2,2,3E3);this.a+=a};function jf(a){this.c=a;this.b=[null,null,null,null,null,null,null,null];this.a=null}
  function kf(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.b[d]&&(a.a=a.b[d]);else{if(136===c){c=hf(b).value;b=null;c=r(lf(a,c));for(var e=c.next();!e.done;e=c.next())e=a.b[e.value],e.isVisible()&&(b=af(e,d,a.c)),Xe(e);return b}if(137===c)for(b=hf(b).value,b=r(lf(a,b)),c=b.next();!c.done;c=b.next())c=a.b[c.value],c.isVisible()||(c.f=d),c.g=!0;else{if(138===c){c=hf(b).value;b=null;c=r(lf(a,c));for(e=c.next();!e.done;e=c.next())e=a.b[e.value],e.isVisible()&&(b=af(e,d,a.c)),e.g=!1;return b}if(139===c){c=hf(b).value;
  b=null;c=r(lf(a,c));for(e=c.next();!e.done;e=c.next())e=a.b[e.value],e.isVisible()?b=af(e,d,a.c):e.f=d,e.g=!e.g;return b}if(140===c)return b=hf(b).value,mf(a,b,d);if(143===c)return d=mf(a,255,d),nf(a),d;if(144===c)b.skip(1),d=hf(b).value,a.a&&(a.a.A=0<(d&128),a.a.D=0<(d&64));else if(145===c)d=hf(b).value,c=hf(b).value,b.skip(1),a.a&&(b=of((c&48)>>4,(c&12)>>2,c&3),a.a.C=of((d&48)>>4,(d&12)>>2,d&3),a.a.v=b);else if(146===c)d=hf(b).value,b=hf(b).value,a.a&&(a=a.a,a.b=d&15,a.a=b&63);else if(151===c)b.skip(1),
  b.skip(1),d=hf(b).value,b.skip(1),a.a&&(a.a.j=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.b[c];if(!e){var f=new Ve;f.f=d;a.b[c]=f}d=hf(b).value;hf(b);hf(b);f=hf(b).value;var g=hf(b).value;b=hf(b).value;e&&0===(b&7)||(b=a.b[c],b.b=0,b.a=0,b.D=!1,b.A=!1,b.C="white",b.v="black");b=a.b[c];b.g=0<(d&32);b.l=(f&15)+1;b.h=(g&63)+1;a.a=a.b[c]}}}return null}
  var lf=function pf(a,b){var d,e;return Ga(pf,function(f){1==f.a&&(d=0);if(5!=f.a)return 8>d?(e=1===(b&1))&&a.b[d]?u(f,d,5):f.m(5):f.m(0);b>>=1;d++;return f.m(2)})};function mf(a,b,c){var d=null;b=r(lf(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.b[e];f.isVisible()&&(d=af(f,c,a.c));a.b[e]=null}return d}function nf(a){a.a=null;a.b=[null,null,null,null,null,null,null,null]}function of(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return qf[a<<2|b<<1|c]}
  var rf=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),qf="black blue green cyan red magenta yellow white".split(" ");function sf(a,b){this.c=[];this.a=1;this.b=0;this.v=a;this.l=b;this.f=this.h=!1;this.g="white";this.j="black";tf(this)}function uf(a,b,c){return Re(new ze(b,c,""),"CC"+(a.v<<1|a.l+1),a.c,b,c)}function tf(a){vf(a,0,15);a.a=1}function wf(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case xf:d=yf.has(c)?yf.get(c):String.fromCharCode(c);break;case zf:d=Af.get(c);break;case Bf:a.c[a.a].pop();d=Cf.get(c);break;case Df:a.c[a.a].pop(),d=Ef.get(c)}d&&a.c[a.a].push(new Ue(d,a.h,a.f,a.j,a.g))}}
  function Ff(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.c[b+d]=a.c[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.c[b+e]=a.c[c+e].map(function(f){return f})}function vf(a,b,c){for(var d=0;d<=c;d++)a.c[b+d]=[]}
  var xf=0,zf=1,Bf=2,Df=3,yf=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Af=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Cf=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
  [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Ef=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
  [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Gf(a,b){this.b=Hf;this.j=new sf(a,b);this.c=new sf(a,b);this.g=new sf(a,b);this.a=this.c;this.f=0;this.h=null}function If(a,b,c){a.a=a.c;var d=a.a,e=null;a.b!==Jf&&a.b!==Kf&&(e=uf(d,a.f,c),c=a.c,c.a=0<c.b?c.b:0,vf(c,0,15),c=a.g,c.a=0<c.b?c.b:0,vf(c,0,15),d.a=15);a.b=Jf;d.b=b;return e}function Lf(a){a.b=Mf;a.a=a.g;a.a.b=0}function Nf(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.a=a.j;a.b=Kf}
  var Hf=0,Mf=1,Jf=3,Kf=4,Of="black green blue cyan red yellow magenta black".split(" "),Pf="white green blue cyan red yellow magenta white_italics".split(" ");function Qf(){this.b=[];this.a=[];this.c=new ef;this.g=0;this.l=new Map([["CC1",new Gf(0,0)],["CC2",new Gf(0,1)],["CC3",new Gf(1,0)],["CC4",new Gf(1,1)]]);this.j=this.h=0;this.f=new Map;Rf(this)}function Rf(a){a.h=0;a.j=0;a=r(a.l.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.b=2,b.a=b.c,b.h=null,tf(b.c),tf(b.g),tf(b.j)}
  function Sf(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.b.sort(b);a.a.sort(b);for(var d=r(a.b),e=d.next();!e.done;e=d.next())(e=Tf(a,e.value))&&c.push(e);d=r(a.a);for(e=d.next();!e.done;e=d.next())ff(a.c,e.value);d=r(a.c.c);for(e=d.next();!e.done;e=d.next())e=Uf(a,e.value),c.push.apply(c,ja(e));a.c.c=[];a.b=[];a.a=[];return c}
  function Tf(a,b){var c=b.type;if(16===(b.ta&112)){var d=b.ta>>3&1;0===c?a.h=d:a.j=d}c=a.l.get("CC"+(c<<1|(c?a.j:a.h)+1));if(255===b.ta&&255===b.Ja||!b.ta&&!b.Ja||!Vf(b.ta)||!Vf(b.Ja))return 45<=++a.g&&Rf(a),null;a.g=0;b.ta&=127;b.Ja&=127;if(!b.ta&&!b.Ja)return null;d=null;if(16===(b.ta&112))a:{var e=b.ta;d=b.Ja;if(c.h===(e<<8|d))c.h=null;else if(c.h=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=Pf[f]:7===f&&(h=!0);
  d=1===(d&1);if(c.b!==Kf){f=c.a;if(c.b===Jf&&e!==f.a){var k=1+e-f.b;Ff(f,k,1+f.a-f.b,f.b);vf(f,0,k-1);vf(f,e+1,15-e)}f.a=e;c.a.h=d;c.a.f=h;c.a.g=g;c.a.j="black"}}else if(17===(e&247)&&32===(d&240))c.a.h=!1,c.a.f=!1,c.a.g="white",wf(c.a,xf,32),g=!1,e=Pf[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.a.h=1===(d&1),c.a.f=g,c.a.g=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=Of[(d&14)>>1]),c.a.j=g;else if(17===(e&247)&&48===(d&240))wf(c.a,zf,d);else if(18===
  (e&246)&&32===(d&224))wf(c.a,e&1?Df:Bf,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Ja){case 32:Lf(c);break;case 33:c=c.a;c.c[c.a].pop();break;case 37:e=If(c,2,d);break;case 38:e=If(c,3,d);break;case 39:e=If(c,4,d);break;case 40:wf(c.a,xf,32);break;case 41:c.b=2;c.a=c.c;c.a.b=0;c.f=d;break;case 42:tf(c.j);Nf(c);break;case 43:Nf(c);break;case 44:e=c.c;g=null;c.b!==Kf&&(g=uf(e,c.f,d));vf(e,0,15);e=g;break;case 45:e=c.a;c.b!==Jf?e=null:(g=uf(e,c.f,d),h=e.a-e.b+1,Ff(e,h-1,h,e.b),vf(e,
  0,h-1),vf(e,e.a,15-e.a),c.f=d,e=g);break;case 46:vf(c.g,0,15);break;case 47:e=null,c.b!==Kf&&(e=uf(c.c,c.f,d)),g=c.g,c.g=c.c,c.c=g,Lf(c),c.f=d}d=e;break a}d=null}else e=b.Ja,wf(c.a,xf,b.ta),wf(c.a,xf,e);return d}
  function Uf(a,b){var c=[];try{for(;b.ga();){var d=hf(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=hf(b).value&63);if(0!=e){a.f.has(e)||a.f.set(e,new jf(e));for(var g=a.f.get(e),h=b.Z();b.Z()-h<f;){e=b;var k=hf(e),l=k.value,m=k.pts;if(16===l){var n=hf(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.a){var t=g.a;e=null;switch(l){case 8:!$e(t)||0>=t.a&&0>=t.b||(0>=t.a?(t.a=t.h-1,t.b--):t.a--,t.c[t.b][t.a]=null);break;case 13:t.isVisible()&&(e=af(t,p,g.c));if(t.b+1>=t.l){p=t;for(var v=0,w=1;15>w;w++,
  v++)p.c[v]=p.c[w];for(w=0;1>w;w++,v++)p.c[v]=Ye()}else t.b++;t.a=0;break;case 14:t.isVisible()&&(e=af(t,p,g.c));t.c[t.b]=Ye();t.a=0;break;case 12:t.isVisible()&&(e=af(t,p,g.c)),Xe(t),p=t,p.b=0,p.a=0}var y=e}else y=null}else if(128<=l&&159>=l)y=kf(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.a&&(127===e?Ze(g.a,"\u266a"):Ze(g.a,
  String.fromCharCode(e)));else if(160<=l&&255>=l)g.a&&Ze(g.a,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.a)if(rf.has(e)){var z=rf.get(e);Ze(g.a,z)}else Ze(g.a,"_")}else 4256<=l&&4351>=l&&g.a&&(160!=(l&255)?Ze(g.a,"_"):Ze(g.a,"[CC]"));y=null}(e=y)&&c.push(e)}}}}catch(C){if(C instanceof L&&3E3===C.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw C;}return c}function Vf(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Wf(){}var Yf=function Xf(a,b){var d,e,f,g;return Ga(Xf,function(h){if(1==h.a){for(var k=0,l=0,m=0;l<b.length;)2==k&&3==b[l]?k=0:(0==b[l]?k++:k=0,b[m]=b[l],m++),l++;d=l-m;e=0}if(4!=h.a){if(!(e+d<b.length))return h.m(0);for(f=0;255==b[e];)f+=255,e++;f+=b[e++];for(g=0;255==b[e];)g+=255,e++;g+=b[e++];return 4!=f?h.m(4):u(h,b.subarray(e,e+g),4)}e+=g;return h.m(2)})};function Zf(a,b){var c=null,d=null,e=a.H();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.H());b&16&&(d=a.H());return{trackId:e,Ld:c,ye:d}}function $f(a,b){return{Yc:1==b?a.cb():a.H()}}function ag(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.H()}}
  function bg(a,b,c){var d=a.H(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=r(jb(d)),g=f.next();!g.done;g=f.next())g={ud:null,sampleSize:null,yc:null},c&256&&(g.ud=a.H()),c&512&&(g.sampleSize=a.H()),c&1024&&a.skip(4),c&2048&&(g.yc=0==b?a.H():a.$d()),e.push(g);return{gg:d,ce:e}};function cg(){this.f=new Wf;this.c=new Map;this.b=this.a=0}
  cg.prototype.init=function(a){var b=this,c=[],d=[];(new me).box("moov",qe).box("mvex",qe).P("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.H();f=f.H();b.a=e;b.b=f}).box("trak",qe).P("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8),e=f.cb()):(f.skip(4),f.skip(4),e=f.H());c.push(e)}).box("mdia",qe).P("mdhd",function(e){e=ag(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new L(2,2,2010);c.forEach(function(e,f){b.c.set(e,
  d[f])})};
  cg.prototype.parse=function(a){var b=this,c=[],d=this.a,e=this.b,f=[],g=null,h=9E4;(new me).box("moof",qe).box("traf",qe).P("trun",function(k){f=bg(k.reader,k.version,k.flags).ce}).P("tfhd",function(k){k=Zf(k.reader,k.flags);d=k.Ld||b.a;e=k.ye||b.b;k=k.trackId;b.c.has(k)&&(h=b.c.get(k))}).P("tfdt",function(k){g=$f(k.reader,k.version).Yc}).box("mdat",function(k){if(null===g)throw new L(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,t=f,v=0,w=p;for(t.length&&(w=t[0].sampleSize||p);k.ga();){var y=k.H();if(6==
  (k.V()&31)){var z=0;t.length>v&&(z=t[v].yc||0);z=(l+z)/m;for(var C=r(Yf(b.f,k.Ta(y-1))),E=C.next();!E.done;E=C.next())c.push({bf:E.value,pts:z})}else k.skip(y-1);w-=y+4;0==w&&(l=t.length>v?l+(t[v].ud||n):l+n,v++,w=t.length>v?t[v].sampleSize||p:p)}}).parse(a,!1);return c};function dg(){this.b=new cg;this.a=new Qf}dg.prototype.init=function(a){this.b.init(a)};
  function eg(a,b){var c=a.b.parse(b);c=r(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=qb(e.bf);d=a.a;e=e.pts;f=new R(f,0);if(181===f.V()&&49===f.Ab()&&1195456820===f.H()&&3===f.V()){var g=f.V();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.V(),l=(k&4)>>2,m=f.V(),n=f.V();l&&(k&=3,0===k||1===k?d.b.push({pts:e,type:k,ta:m,Ja:n,order:d.b.length}):(d.a.push({pts:e,type:k,value:m,order:d.a.length}),d.a.push({pts:e,type:2,value:n,order:d.a.length})))}}}}return Sf(a.a)};function fg(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function gg(a,b,c){c=void 0===c?0:c;return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b+c>=a.start(0)}function hg(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=r(ig(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}
  function jg(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;var c=navigator.userAgent.match(/Edge\//)||rd("Trident/")||qd()||rd("CrKey")?.5:.1,d=ig(a).findIndex(function(e,f,g){return e.start>b&&(0==f||g[f-1].end-b<=c)});return 0<=d?d:null}function ig(a){if(!a)return[];for(var b=[],c=r(jb(a.length)),d=c.next();!d.done;d=c.next())d=d.value,b.push({start:a.start(d),end:a.end(d)});return b};function kg(a){this.j=null;this.c=a;this.f=this.v=0;this.g=Infinity;this.b=this.a=null;this.l="";this.h=new Map}function lg(a){return mg[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}kg.prototype.destroy=function(){this.c=this.j=null;this.h.clear();return Promise.resolve()};
  function ng(a,b,c,d){var e,f,g;return J(function(h){if(1==h.a)return u(h,Promise.resolve(),2);if(!a.j||!a.c)return h["return"]();if(null==c||null==d)return a.j.parseInit(qb(b)),h["return"]();e={periodStart:a.v,segmentStart:c,segmentEnd:d};f=a.j.parseMedia(qb(b),e);g=f.filter(function(k){return k.startTime>=a.f&&k.startTime<a.g});a.c.append(g);null==a.a&&(a.a=Math.max(c,a.f));a.b=Math.min(d,a.g);x(h)})}
  kg.prototype.remove=function(a,b){var c=this;return J(function(d){if(1==d.a)return u(d,Promise.resolve(),2);!c.c||!c.c.remove(a,b)||null==c.a||b<=c.a||a>=c.b||(a<=c.a&&b>=c.b?c.a=c.b=null:a<=c.a&&b<c.b?c.a=b:a>c.a&&b>=c.b&&(c.b=a));x(d)})};function og(a,b,c){a.f=b;a.g=c}function pg(a,b,c){a.l=b;if(b=a.h.get(b))for(var d=r(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.c.append(e)}
  function qg(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new ze(c.startTime,c.endTime,c.text)});return b}
  function rg(a,b,c,d,e){var f=c+" "+d,g=new Map;b=r(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);k.startTime+=e;k.endTime+=e;k.startTime>=a.f&&k.startTime<a.g&&(g.get(h).get(f).push(k),h==a.l&&a.c.append([k]))}e=r(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.h.has(f)||a.h.set(f,new Map),b=r(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.h.get(f).set(h,k);a.a=null==
  a.a?Math.max(c,a.f):Math.min(a.a,Math.max(c,a.f));a.b=Math.max(a.b,Math.min(d,a.g))}K("shaka.text.TextEngine",kg);kg.prototype.destroy=kg.prototype.destroy;kg.findParser=function(a){return mg[a]};kg.unregisterParser=function(a){delete mg[a]};kg.registerParser=function(a,b){mg[a]=b};var mg={};function sg(a,b,c,d){var e=this;this.a=a;this.h=c;this.f={};this.D={};this.c=null;this.I=d||function(){};this.g={};this.b=new Zc;this.l={};this.v=b;this.A=new Ub;this.j=tg(this,this.A);this.F=new Xc(function(){return ug(e)});this.C=""}function tg(a,b){var c=new MediaSource;a.b.na(c,"sourceopen",function(){URL.revokeObjectURL(a.C);b.resolve()});a.C=vg(c);a.a.src=a.C;return c}function wg(a){var b=jd(a.mimeType,a.codecs),c=kd(a);return lg(b)||MediaSource.isTypeSupported(c)||nc(b,a.type)}q=sg.prototype;
  q.destroy=function(){return this.F.destroy()};
  function ug(a){var b,c,d,e,f,g,h,k;return J(function(l){if(1==l.a){b=[];for(c in a.g)for(d=a.g[c],e=d[0],a.g[c]=d.slice(0,1),e&&b.push(e.p["catch"](Ob)),f=r(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new L(2,7,7003,void 0));a.c&&b.push(a.c.destroy());a.h&&b.push(a.h.destroy());for(k in a.l)b.push(a.l[k].destroy());return u(l,Promise.all(b),2)}a.b&&(a.b.release(),a.b=null);a.a&&(a.a.removeAttribute("src"),a.a.load(),a.a=null);a.j=null;a.c=null;a.h=null;a.f={};a.l={};a.v=null;a.g=
  {};x(l)})}
  q.init=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){if(1==m.a)return d=Tb,u(m,c.A,2);e={};f=r(a.keys());for(g=f.next();!g.done;e={ja:e.ja},g=f.next())e.ja=g.value,h=a.get(e.ja),k=jd(h.mimeType,h.codecs),e.ja==d.$?xg(c,k):(!b&&MediaSource.isTypeSupported(k)||!nc(k,e.ja)||(c.l[e.ja]=new mc,k=oc(e.ja,k)),l=c.j.addSourceBuffer(k),c.b.o(l,"error",function(n){return function(){c.g[n.ja][0].p.reject(new L(2,3,3014,c.a.error?c.a.error.code:0))}}(e)),c.b.o(l,"updateend",function(n){return function(){return yg(c,n.ja)}}(e)),
  c.f[e.ja]=l,c.D[e.ja]=k,c.g[e.ja]=[]);x(m)})};function xg(a,b){a.c||(a.c=new kg(a.h));"application/cea-608"!=b&&"application/cea-708"!=b&&(a.c.j=Qb(mg[b]))}function zg(a){return a.j?"ended"==a.j.readyState:!0}function Ag(a,b){if("text"==b)var c=a.c.a;else c=Bg(a,b),c=!c||1==c.length&&1E-6>c.end(0)-c.start(0)?null:1==c.length&&0>c.start(0)?0:c.length?c.start(0):null;return c}function Cg(a,b){return"text"==b?a.c.b:fg(Bg(a,b))}
  function Dg(a,b,c){if("text"==b)return a=a.c,null==a.b||a.b<c?0:a.b-Math.max(c,a.a);a=Bg(a,b);return hg(a,c)}q.pc=function(){var a={total:ig(this.a.buffered),audio:ig(Bg(this,"audio")),video:ig(Bg(this,"video")),text:[]};if(this.c){var b=this.c.a,c=this.c.b;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function Bg(a,b){try{return a.f[b].buffered}catch(c){return null}}
  function Eg(a,b,c,d,e,f){var g,h,k,l,m,n,p,t;return J(function(v){if(1==v.a){g=Tb;if(b==g.$)return u(v,ng(a.c,c,d,e),0);if(a.l[b])return u(v,pc(a.l[b],c),10);if(f)return a.c||xg(a,"text/vtt"),null==d&&null==e?a.v.init(c):(h=eg(a.v,c),h.length&&(k=a.f[g.Ha].timestampOffset,rg(a.c,h,d,e,k))),c=Fg(a,c,d,b),u(v,Gg(a,b,function(){a.f[b].appendBuffer(c)}),0);c=Fg(a,c,d,b);return u(v,Gg(a,b,function(){a.f[b].appendBuffer(c)}),0)}l=v.b;a.c||xg(a,"text/vtt");l.metadata&&(m=a.f[b].timestampOffset,a.I(l.metadata,
  m,e));l.captions&&l.captions.length&&(n=a.f[g.Ha].timestampOffset,p=qg(l.captions),rg(a.c,p,d,e,n));t=l.data;t=Fg(a,t,d,b);return u(v,Gg(a,b,function(){a.f[b].appendBuffer(t)}),0)})}function Hg(a,b){var c=Cg(a,"video")||0;pg(a.c,b,c)}q.remove=function(a,b,c){var d=this,e;return J(function(f){e=Tb;return a==e.$?u(f,d.c.remove(b,c),0):u(f,Gg(d,a,function(){c<=b?yg(d,a):d.f[a].remove(b,c)}),0)})};
  function Ig(a,b){var c;return J(function(d){c=Tb;return b==c.$?a.c?u(d,a.c.remove(0,Infinity),0):d["return"]():u(d,Gg(a,b,function(){var e=a.j.duration;0>=e?yg(a,b):a.f[b].remove(0,e)}),0)})}q.flush=function(a){var b=this,c;return J(function(d){c=Tb;return a==c.$?d["return"]():u(d,Gg(b,a,function(){b.a.currentTime-=.001;yg(b,a)}),0)})};
  function Jg(a,b,c,d,e){var f;return J(function(g){f=Tb;return b==f.$?(a.c.v=c,og(a.c,d,e),g["return"]()):u(g,Promise.all([Gg(a,b,function(){var h=a.f[b].appendWindowStart,k=a.f[b].appendWindowEnd;a.f[b].abort();a.f[b].appendWindowStart=h;a.f[b].appendWindowEnd=k;yg(a,b)}),Gg(a,b,function(){var h=c;0>h&&(h+=.001);a.f[b].timestampOffset=h;yg(a,b)}),Gg(a,b,function(){a.f[b].appendWindowStart=0;a.f[b].appendWindowEnd=e;a.f[b].appendWindowStart=d;yg(a,b)})]),0)})}
  q.endOfStream=function(a){var b=this;return J(function(c){return u(c,Kg(b,function(){zg(b)||(a?b.j.endOfStream(a):b.j.endOfStream())}),0)})};q.Ea=function(a){var b=this;return J(function(c){return u(c,Kg(b,function(){b.j.duration=a}),0)})};q.getDuration=function(){return this.j.duration};function yg(a,b){var c=a.g[b][0];c&&(c.p.resolve(),Lg(a,b))}function Gg(a,b,c){Yc(a.F);c={start:c,p:new Ub};a.g[b].push(c);1==a.g[b].length&&Mg(a,b);return c.p}
  function Kg(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:Yc(a.F);c=[];d={};for(e in a.f)d.Eb=new Ub,f={start:function(l){return function(){return l.Eb.resolve()}}(d),p:d.Eb},a.g[e].push(f),c.push(d.Eb),1==a.g[e].length&&f.start(),d={Eb:d.Eb};A(k,2);return u(k,Promise.all(c),4);case 4:wa(k,3);break;case 2:throw g=D(k),g;case 3:try{b()}catch(l){throw new L(2,3,3015,l);}finally{for(h in a.f)Lg(a,h)}x(k)}})}function Lg(a,b){a.g[b].shift();Mg(a,b)}
  function Mg(a,b){var c=a.g[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new L(2,3,3017,b)):c.p.reject(new L(2,3,3015,d)),Lg(a,b)}}function Fg(a,b,c,d){var e=a.a.mediaKeys;null==c&&e&&(qd()||rd("Xbox One"))&&"mp4"==a.D[d].split(";")[0].split("/")[1]&&(b=ve(b));return b}var vg=window.URL.createObjectURL;function Ng(a,b){a=Og(a);b=Og(b);return a.split("-")[0]==b.split("-")[0]}function Pg(a,b){a=Og(a);b=Og(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function Qg(a,b){a=Og(a);b=Og(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Og(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Rg.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}function Sg(a,b){a=Og(a);b=Og(b);return b==a?4:Pg(b,a)?3:Qg(b,a)?2:Pg(a,b)?1:0}
  function Tg(a){return a.language?Og(a.language):a.audio&&a.audio.language?Og(a.audio.language):a.video&&a.video.language?Og(a.video.language):"und"}
  function Ug(a,b){for(var c=Og(a),d=new Set,e=r(b),f=e.next();!f.done;f=e.next())d.add(Og(f.value));e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Pg(f,c))return f;e=r(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,Qg(f,c))return f;d=r(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,Pg(c,f))return f;return null}
  var Rg=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",
  "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",
  "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",
  "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",
  "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",
  "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Vg(a,b){function c(l){var m="";l.video&&(m=md(l.video.codecs));var n="";l.audio&&(n=md(l.audio.codecs));return m+"-"+n}var d=Wg(a.variants,b),e=new Bc;d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=c(f);e.push(g,f)}var h=null,k=Infinity;Cc(e,function(l,m){for(var n=0,p=0,t=r(m),v=t.next();!v.done;v=t.next())n+=v.value.bandwidth||0,++p;n/=p;n<k&&(h=l,k=n)});a.variants=a.variants.filter(function(l){return c(l)==h?!0:!1})}
  function Xg(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function Yg(a,b,c){return J(function(d){if(1==d.a)return Zg(a,c),u(d,$g(c),2);ah(b,c);bh(c);x(d)})}
  function Zg(a,b){b.variants=b.variants.filter(function(c){return a&&a.M&&!ge(a,c)?!1:!0})}function $g(a){return J(function(b){a.variants=a.variants.filter(function(c){var d=c.audio;c=c.video;return d&&!wg(d)||c&&!wg(c)?!1:!0});return u(b,Promise.resolve(),0)})}function ah(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!ch(d,a.audio)||c&&a&&a.video&&!ch(c,a.video)?!1:!0})}
  function bh(a){a.textStreams=a.textStreams.filter(function(b){return lg(jd(b.mimeType,b.codecs))})}function ch(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
  function dh(a){var b=a.audio,c=a.video,d=b?b.codecs:null,e=c?c.codecs:null,f=[];e&&f.push(e);d&&f.push(d);var g=[];c&&g.push(c.mimeType);b&&g.push(b.mimeType);g=g[0]||null;var h=[];b&&h.push(b.kind);c&&h.push(c.kind);h=h[0]||null;var k=new Set;if(b)for(var l=r(b.roles),m=l.next();!m.done;m=l.next())k.add(m.value);if(c)for(l=r(c.roles),m=l.next();!m.done;m=l.next())k.add(m.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:h,width:null,height:null,
  frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:g,codecs:f.join(", "),audioCodec:d,videoCodec:e,primary:a.primary,roles:Array.from(k),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||
  null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.label=b.label,a.audioRoles=b.roles);return a}
  function eh(a){return{id:a.id,active:!1,type:"text",bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:a.originalId}}
  function fh(a){a.__shaka_id||(a.__shaka_id=gh++);return a.__shaka_id}function hh(a){var b=ih(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
  function ih(a){return{id:fh(a),active:!1,type:"",bandwidth:0,language:Og(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}}
  function jh(a){return a.allowedByApplication&&a.allowedByKeySystem}function kh(a){return a.filter(function(b){return jh(b)})}
  function Wg(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=r(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ja(e))):d.get(Math.min.apply(Math,ja(c)))}
  function lh(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=Ug(Og(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Og(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=mh(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(Nb,[]);return a.length?
  mh(e,a[0]):e}function mh(a,b){return a.filter(function(c){return c.roles.includes(b)})}var gh=0;function nh(){var a=this;this.h=null;this.c=!1;this.a=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.i.useNetworkInformation){a.a=new Sa;var b=a.chooseVariant();b&&a.h(b)}});this.b=[];this.g=1;this.j=!1;this.i=this.f=null}q=nh.prototype;q.stop=function(){this.h=null;this.c=!1;this.b=[];this.g=1;this.f=null};q.init=function(a){this.h=a};
  q.chooseVariant=function(){var a=oh(this.i.restrictions,this.b),b=this.a.getBandwidthEstimate(ph(this));this.b.length&&!a.length&&(a=oh(null,this.b),a=[a[0]]);var c=a[0]||null;a=r(lb(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.item;var f=isNaN(this.g)?1:Math.abs(this.g);e=f*(e.next||{bandwidth:Infinity}).bandwidth/this.i.bandwidthUpgradeTarget;b>=f*d.bandwidth/this.i.bandwidthDowngradeTarget&&b<=e&&(c=d)}this.f=Date.now();return c};q.enable=function(){this.c=!0};
  q.disable=function(){this.c=!1};q.segmentDownloaded=function(a,b){var c=this.a;if(!(16E3>b)){var d=8E3*b/a,e=a/1E3;c.a+=b;Qa(c.b,e,d);Qa(c.c,e,d)}if(null!=this.f&&this.c)a:{if(!this.j){if(!(128E3<=this.a.a))break a;this.j=!0}else if(Date.now()-this.f<1E3*this.i.switchInterval)break a;c=this.chooseVariant();this.a.getBandwidthEstimate(ph(this));c&&this.h(c)}};q.getBandwidthEstimate=function(){return this.a.getBandwidthEstimate(this.i.defaultBandwidthEstimate)};q.setVariants=function(a){this.b=a};
  q.playbackRateChanged=function(a){this.g=a};q.configure=function(a){this.i=a};function ph(a){var b=a.i.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.i.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function oh(a,b){a&&(b=b.filter(function(c){return Xg(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}K("shaka.abr.SimpleAbrManager",nh);nh.prototype.configure=nh.prototype.configure;
  nh.prototype.playbackRateChanged=nh.prototype.playbackRateChanged;nh.prototype.setVariants=nh.prototype.setVariants;nh.prototype.getBandwidthEstimate=nh.prototype.getBandwidthEstimate;nh.prototype.segmentDownloaded=nh.prototype.segmentDownloaded;nh.prototype.disable=nh.prototype.disable;nh.prototype.enable=nh.prototype.enable;nh.prototype.chooseVariant=nh.prototype.chooseVariant;nh.prototype.init=nh.prototype.init;nh.prototype.stop=nh.prototype.stop;function qh(a,b){this.a=a;this.b=new Set([a]);b=b||[];for(var c=r(b),d=c.next();!d.done;d=c.next())this.add(d.value)}qh.prototype.add=function(a){return rh(this.a,a)?(this.b.add(a),!0):!1};
  function rh(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&sh(c,d)&&th(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(sh(c,d)&&th(c.roles,d.roles)));return c?!1:!0}qh.prototype.values=function(){return this.b.values()};
  function sh(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(g){return md(g)}),d=b.codecs.split(",").map(function(g){return md(g)});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=r(jb(c.length)),f=e.next();!f.done;f=e.next())if(f=f.value,c[f]!=d[f])return!1;return!0}
  function th(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=r(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function wh(a){this.a=a;this.b=new xh(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}wh.prototype.create=function(a){var b=this,c=a.filter(function(d){return rh(b.a,d)});return c.length?new qh(c[0],c):this.b.create(a)};function xh(a,b,c,d){this.c=a;this.f=b;this.a=c;this.b=void 0===d?"":d}
  xh.prototype.create=function(a){var b=[];b=yh(a,this.c);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=zh(b,this.f);a.length&&(b=a);this.a&&(a=Wg(b,this.a),a.length&&(b=a));this.b&&(a=Ah(b,this.b),a.length&&(b=a));a=new qh(b[0]);b=r(b);for(c=b.next();!c.done;c=b.next())c=c.value,rh(a.a,c)&&a.add(c);return a};function yh(a,b){var c=Og(b),d=Ug(c,a.map(function(e){return Tg(e)}));return d?a.filter(function(e){return d==Tg(e)}):[]}
  function zh(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ah(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Bh(){this.a=Ch;this.b=(new Map).set(Ch,2).set(Dh,1)}function Eh(a,b,c){a.b.set(Ch,c).set(Dh,b)}var Dh=0,Ch=1;function Fh(){}function Gh(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.a){if(d&&(e=Hh[d.toLowerCase()]))return k["return"](e);if(f=Ih(a))if(g=Jh[f])return k["return"](g);return d?k.m(2):u(k,Kh(a,b,c),3)}if(2!=k.a&&(d=k.b)&&(h=Hh[d]))return k["return"](h);throw new L(2,4,4E3,a);})}
  function Kh(a,b,c){var d,e,f;return J(function(g){if(1==g.a)return d=Qc([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.b;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function Ih(a){a=(new vb(a)).pa.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}K("shaka.media.ManifestParser",Fh);Fh.unregisterParserByMime=function(a){delete Hh[a]};Fh.registerParserByMime=function(a,b){Hh[a]=b};
  Fh.registerParserByExtension=function(a,b){Jh[a]=b};var Hh={},Jh={};function Lh(a,b,c){this.a=a;this.da=b;this.Y=c}Lh.prototype.Ob=function(){return this.da};Lh.prototype.Kb=function(){return this.Y};function Mh(a,b){return a&&b?a.Ob()==b.Ob()&&a.Kb()==b.Kb()&&Jc(a.a(),b.a()):a==b}K("shaka.media.InitSegmentReference",Lh);Lh.prototype.getEndByte=Lh.prototype.Kb;Lh.prototype.getStartByte=Lh.prototype.Ob;
  function Nh(a,b,c,d,e,f,g,h,k,l){l=void 0===l?[]:l;this.startTime=a;this.endTime=b;this.a=c;this.da=d;this.Y=e;this.c=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.b=l}Nh.prototype.Pe=function(){return this.startTime};Nh.prototype.De=function(){return this.endTime};Nh.prototype.Ob=function(){return this.da};Nh.prototype.Kb=function(){return this.Y};K("shaka.media.SegmentReference",Nh);Nh.prototype.getEndByte=Nh.prototype.Kb;Nh.prototype.getStartByte=Nh.prototype.Ob;
  Nh.prototype.getEndTime=Nh.prototype.De;Nh.prototype.getStartTime=Nh.prototype.Pe;function S(a,b,c){this.f=a;this.xc=b;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.j=0;this.l=!0;this.v=0;this.A=void 0===c?!0:c;this.C=0}q=S.prototype;q.getDuration=function(){return this.g};q.Ie=function(){return this.a};q.Ea=function(a){this.g=a};q.Oe=function(){return this.f};q.ge=function(a){this.j=a};q.Wb=function(a){this.l=a};q.Dd=function(a){this.h=a};q.tf=function(a){this.xc=a};q.Ce=function(){return this.xc};
  q.xb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.md(a[0].startTime);this.a=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.a);this.b=Math.max(this.b,b);null!=this.f&&this.A&&(this.f=(Date.now()+this.j)/1E3-this.b-this.a)}};q.md=function(a){this.c=null==this.c?a:Math.min(this.c,a)};q.ld=function(a){this.a=Math.max(this.a,a)};q.offset=function(a){null!=this.c&&(this.c+=a);null!=this.b&&(this.b+=a)};q.U=function(){return Infinity==this.g&&!this.l};
  q.ab=function(){return Infinity!=this.g&&!this.l};q.sb=function(){return Math.max(this.v,this.Sa()-this.h)};q.he=function(a){this.v=a};q.Sa=function(){return this.U()||this.ab()?Math.min(Math.max(0,(Date.now()+this.j)/1E3-this.a-this.f)+this.C,this.g):this.g};q.Nb=function(a){var b=Math.max(this.c,this.v);return Infinity==this.h?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.Sa()-this.h+a,this.Ka()))};q.rb=function(){return this.Nb(0)};
  q.Ka=function(){return Math.max(0,this.Sa()-(this.U()||this.ab()?this.xc:0))};q.ke=function(){return null==this.f||null!=this.b&&this.A?!1:!0};q.fe=function(a){this.C=a};K("shaka.media.PresentationTimeline",S);S.prototype.setAvailabilityTimeOffset=S.prototype.fe;S.prototype.usingPresentationStartTime=S.prototype.ke;S.prototype.getSeekRangeEnd=S.prototype.Ka;S.prototype.getSeekRangeStart=S.prototype.rb;S.prototype.getSafeSeekRangeStart=S.prototype.Nb;S.prototype.getSegmentAvailabilityEnd=S.prototype.Sa;
  S.prototype.setUserSeekStart=S.prototype.he;S.prototype.getSegmentAvailabilityStart=S.prototype.sb;S.prototype.isInProgress=S.prototype.ab;S.prototype.isLive=S.prototype.U;S.prototype.offset=S.prototype.offset;S.prototype.notifyMaxSegmentDuration=S.prototype.ld;S.prototype.notifyMinSegmentStartTime=S.prototype.md;S.prototype.notifySegments=S.prototype.xb;S.prototype.getDelay=S.prototype.Ce;S.prototype.setDelay=S.prototype.tf;S.prototype.setSegmentAvailabilityDuration=S.prototype.Dd;
  S.prototype.setStatic=S.prototype.Wb;S.prototype.setClockOffset=S.prototype.ge;S.prototype.getPresentationStartTime=S.prototype.Oe;S.prototype.setDuration=S.prototype.Ea;S.prototype.getMaxSegmentDuration=S.prototype.Ie;S.prototype.getDuration=S.prototype.getDuration;function Oh(a,b){this.g=a;this.h=Ph(a);this.a=a.a.currentTime;this.f=Date.now()/1E3;this.b=!1;this.j=b;this.c=function(){}}Oh.prototype.release=function(){this.g=null;this.c=function(){}};function Qh(a,b){a.c=b}function Rh(a){this.a=a}function Ph(a){if(a.a.paused||0==a.a.playbackRate||0==a.a.buffered.length)var b=!1;else a:{b=a.a.currentTime;a=r(ig(a.a.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Sh(a,b,c,d,e){var f=this;this.a=a;this.A=b;this.i=c;this.v=e;this.b=new Zc;this.j=!1;this.l=a.readyState;this.f=!1;this.c=d;this.h=!1;this.b.o(a,"waiting",function(){return Th(f)});this.g=(new M(function(){Th(f)})).va(.25)}Sh.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.g&&(this.g.stop(),this.g=null);this.c&&(this.c.release(),this.c=null);this.a=this.A=this.v=null};Sh.prototype.pd=function(){this.h=!0;Th(this)};
  function Th(a){if(0!=a.a.readyState){if(a.a.seeking){if(!a.j)return}else a.j=!1;if(!a.a.paused){a.a.readyState!=a.l&&(a.f=!1,a.l=a.a.readyState);var b;if(!(b=!a.c)){b=a.c;var c=b.g,d=Ph(c),e=c.a.currentTime,f=Date.now()/1E3;if(b.a!=e||b.h!=d)b.f=f,b.a=e,b.h=d,b.b=!1;e=f-b.f;if(d=e>=b.j&&d&&!b.b)b.c(b.a,e),b.b=!0,b.a=c.a.currentTime;b=!d}if(b){var g=a.i.smallGapLimit;e=a.a.currentTime;b=a.a.buffered;c=jg(b,e);if(!(null==c||0==c&&!a.h||(d=b.start(c),d>=a.A.Ka()))){f=d-e;g=f<=g;var h=!1;.001>f||(g||
  a.f||(a.f=!0,e=new O("largegap",{currentTime:e,gapSize:f}),e.cancelable=!0,a.v(e),a.i.jumpLargeGaps&&!e.defaultPrevented&&(h=!0)),!g&&!h)||(0!=c&&b.end(c-1),a.a.currentTime=d)}}}}};function Uh(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Vh.value().get(b),c.na(a,b,d))}var Vh=new Vb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Wh(a,b,c){var d=this;this.a=a;this.g=b;this.f=c;this.h=!1;this.b=new Zc;this.c=new Xh(a);Uh(this.a,HTMLMediaElement.HAVE_METADATA,this.b,function(){Yh(d,d.f)})}Wh.prototype.release=function(){this.b&&(this.b.release(),this.b=null);null!=this.c&&(this.c.release(),this.c=null);this.g=function(){};this.a=null};function Zh(a){return a.h?a.a.currentTime:a.f}function $h(a,b){0<a.a.readyState?ai(a.c,b):Uh(a.a,HTMLMediaElement.HAVE_METADATA,a.b,function(){Yh(a,a.f)})}
  function Yh(a,b){.001>Math.abs(a.a.currentTime-b)?bi(a):(a.b.na(a.a,"seeking",function(){bi(a)}),ai(a.c,0==a.a.currentTime?b:a.a.currentTime))}function bi(a){a.h=!0;a.b.o(a.a,"seeking",function(){return a.g()})}function Xh(a){var b=this;this.b=a;this.h=10;this.g=this.f=this.c=0;this.a=new M(function(){0>=b.c?b.a.stop():b.b.currentTime!=b.f?b.a.stop():(b.b.currentTime=b.g,b.c--)})}Xh.prototype.release=function(){this.a&&(this.a.stop(),this.a=null);this.b=null};
  function ai(a,b){a.f=a.b.currentTime;a.g=b;a.c=a.h;a.b.currentTime=b;a.a.va(.1)};function ci(a){function b(){null==c.c?c.f=!0:(c.b.na(c.a,"seeking",function(){c.f=!0}),c.a.currentTime=Math.max(0,c.a.currentTime+c.c))}var c=this;this.a=a;this.f=!1;this.c=null;this.b=new Zc;Uh(this.a,HTMLMediaElement.HAVE_CURRENT_DATA,this.b,function(){b()})}ci.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.a=null};ci.prototype.l=function(a){this.c=this.f?this.c:a};ci.prototype.g=function(){return(this.f?this.a.currentTime:this.c)||0};ci.prototype.v=function(){};
  function di(a,b,c,d,e,f){var g=this;this.c=a;this.a=b.presentationTimeline;this.C=b.minBufferTime||0;this.i=c;this.A=e;this.j=null;this.f=new Sh(a,b.presentationTimeline,c,ei(a,c),f);this.b=new Wh(a,function(){a:{var h=g.f;h.j=!0;h.h=!1;h.f=!1;var k=Zh(g.b);h=fi(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.j||g.j<k-1)){g.j=k;$h(g.b,h);h=void 0;break a}g.A();h=void 0}return h},gi(this,d));this.h=(new M(function(){if(0!=g.c.readyState&&!g.c.paused){var h=Zh(g.b),k=g.a.rb(),l=g.a.Ka();3>l-k&&(k=
  l-3);h<k&&(h=fi(g,h),g.c.currentTime=h)}})).va(.25)}di.prototype.release=function(){this.b&&(this.b.release(),this.b=null);this.f&&(this.f.release(),this.f=null);this.h&&(this.h.stop(),this.h=null);this.c=this.b=this.a=this.i=null;this.A=function(){}};di.prototype.l=function(a){$h(this.b,a)};di.prototype.g=function(){var a=Zh(this.b);return 0<this.c.readyState&&!this.c.paused?hi(this,a):a};
  function gi(a,b){null==b?b=Infinity>a.a.getDuration()?a.a.rb():a.a.Ka():0>b&&(b=a.a.Ka()+b);return ii(a,hi(a,b))}di.prototype.v=function(){this.f.pd()};function ii(a,b){var c=a.a.getDuration();return b>=c?c-a.i.durationBackoff:b}function fi(a,b){var c=Math.max(a.C,a.i.rebufferingGoal),d=a.i.safeSeekOffset,e=a.a.rb(),f=a.a.Ka(),g=a.a.getDuration();3>f-e&&(e=f-3);var h=a.a.Nb(c),k=a.a.Nb(d);c=a.a.Nb(c+d);return b>=g?ii(a,b):b>f?f:b<e?gg(a.c.buffered,k)?k:c:b>=h||gg(a.c.buffered,b)?b:c}
  function hi(a,b){var c=a.a.rb();if(b<c)return c;c=a.a.Ka();return b>c?c:b}function ei(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new Oh(new Rh(a),b.stallThreshold);Qh(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function T(a){this.a=a;this.b=null;this.c=0;this.f=!1}q=T.prototype;q.destroy=function(){Jb("shaka.media.SegmentIndex","Please use release() instead of destroy().");this.release();return Promise.resolve()};q.release=function(){this.f||(this.a=[],this.b&&this.b.stop(),this.b=null)};q.Xe=function(){this.f=!0};q.find=function(a){for(var b=this.a.length-1;0<=b;--b){var c=this.a[b];if(a>=c.startTime&&a<c.endTime)return b+this.c}return this.a.length&&a<this.a[0].startTime?this.c:null};
  q.get=function(a){if(0==this.a.length)return null;a-=this.c;return 0>a||a>=this.a.length?null:this.a[a]};q.offset=function(a){if(!this.f)for(var b=r(this.a),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.timestampOffset+=a};q.vb=function(a){!this.f&&a.length&&(this.a=this.a.filter(function(b){return b.startTime<a[0].startTime}),this.a.push.apply(this.a,ja(a)))};q.Xa=function(a){if(!this.f){var b=this.a.length;this.a=this.a.filter(function(c){return c.endTime>a});this.c+=b-this.a.length}};
  q.Ra=function(a,b){if(!this.f){for(;this.a.length;)if(this.a[this.a.length-1].startTime>=b)this.a.pop();else break;for(;this.a.length;)if(this.a[0].endTime<=a)this.a.shift(),this.c++;else break;if(0!=this.a.length){var c=this.a[this.a.length-1];this.a[this.a.length-1]=new Nh(c.startTime,b,c.a,c.da,c.Y,c.c,c.timestampOffset,c.appendWindowStart,c.appendWindowEnd)}}};
  q.Ac=function(a,b){var c=this;this.f||(this.b&&this.b.stop(),this.b=new M(function(){var d=b();d?c.a.push.apply(c.a,ja(d)):(c.b.stop(),c.b=null)}),this.b.va(a))};T.prototype[Symbol.iterator]=function(){return this.qb(0)};T.prototype.qb=function(a){var b=this.find(a);null==b?b=-1:b--;var c=this.get(b+1),d=-1;if(c&&0<c.b.length)for(var e=c.b.length-1;0<=e;--e){var f=c.b[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new ji(this,b,d)};
  function ki(a,b,c){return new T([new Nh(a,a+b,function(){return c},0,null,null,a,a,a+b)])}K("shaka.media.SegmentIndex",T);T.forSingleSegment=ki;T.prototype.getIteratorForTime=T.prototype.qb;T.prototype.updateEvery=T.prototype.Ac;T.prototype.fit=T.prototype.Ra;T.prototype.evict=T.prototype.Xa;T.prototype.merge=T.prototype.vb;T.prototype.offset=T.prototype.offset;T.prototype.get=T.prototype.get;T.prototype.find=T.prototype.find;T.prototype.markImmutable=T.prototype.Xe;T.prototype.release=T.prototype.release;
  T.prototype.destroy=T.prototype.destroy;function ji(a,b,c){this.c=a;this.b=b;this.a=c}ji.prototype.seek=function(a){Jb("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek().");a=this.c.qb(a);this.b=a.b;this.a=a.a;return this.next().value};ji.prototype.current=function(){var a=this.c.get(this.b);a&&0<a.b.length&&a.a().length&&this.a>=a.b.length&&(this.b++,this.a=0,a=this.c.get(this.b));return a&&0<a.b.length?a.b[this.a]:a};
  ji.prototype.next=function(){var a=this.c.get(this.b);a&&0<a.b.length?(this.a++,a.a().length&&this.a==a.b.length&&(this.b++,this.a=0)):(this.b++,this.a=0);a=this.current();return{value:a,done:!a}};K("shaka.media.SegmentIterator",ji);ji.prototype.next=ji.prototype.next;ji.prototype.current=ji.prototype.current;ji.prototype.seek=ji.prototype.seek;function li(){T.call(this,[]);this.g=[]}ra(li,T);q=li.prototype;q.clone=function(){var a=new li;a.g=this.g.slice();return a};
  q.release=function(){for(var a=r(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g=[]};q.find=function(a){for(var b=0,c=r(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.c+d.a.length}return null};q.get=function(a){for(var b=0,c=r(this.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.c+d.a.length}return null};q.offset=function(){};q.vb=function(){};q.Xa=function(){};q.Ra=function(){};q.Ac=function(){};
  K("shaka.media.MetaSegmentIndex",li);li.prototype.updateEvery=li.prototype.Ac;li.prototype.fit=li.prototype.Ra;li.prototype.evict=li.prototype.Xa;li.prototype.merge=li.prototype.vb;li.prototype.offset=li.prototype.offset;li.prototype.get=li.prototype.get;li.prototype.find=li.prototype.find;li.prototype.release=li.prototype.release;function mi(a){var b=this;this.a=a;this.f=!1;this.b=this.a.rc();this.c=new M(function(){b.a.Vd(.25*b.b)})}mi.prototype.release=function(){this.c&&(this.c.stop(),this.c=null);this.a=null};mi.prototype.set=function(a){this.b=a;ni(this)};function ni(a){a.c.stop();var b=a.f?0:a.b;if(0<=b)try{a.a.rc()!=b&&a.a.Cd(b);return}catch(c){}a.c.va(.25);0!=a.a.rc()&&a.a.Cd(0)};function oi(a){var b=this;this.c=a;this.a=new Set;this.b=(new M(function(){pi(b,!1)})).va(.25)}oi.prototype.release=function(){this.b.stop();for(var a=r(this.a),b=a.next();!b.done;b=a.next())b.value.release();this.a.clear()};
  function pi(a,b){for(var c=r(a.a),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=a.c.currentTime,f=b,g=r(d.g.a),h=g.next();!h.done;h=g.next()){h=h.value;var k=d.f.get(h),l=e<h.startTime?qi:e>h.endTime?ri:si;d.f.set(h,l);for(var m=r(d.h),n=m.next();!n.done;n=m.next())n=n.value,n.jb==k&&n.ib==l&&n.$a(h,f)}}};function ti(a){var b=this;this.b=function(){};this.a=new Set;this.f=a;this.c=(new M(function(){for(var c=b.f(),d=r(b.a),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&b.a["delete"](e)})).va(2)}ti.prototype.release=function(){this.b=function(){};this.a.clear();this.c.stop()};function ui(a,b){a.b=b};function vi(a){var b=this;this.g=a;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.h=[{jb:null,ib:si,$a:function(c,d){return b.a(c,d)}},{jb:qi,ib:si,$a:function(c,d){return b.a(c,d)}},{jb:ri,ib:si,$a:function(c,d){return b.a(c,d)}},{jb:si,ib:qi,$a:function(c,d){return b.b(c,d)}},{jb:si,ib:ri,$a:function(c,d){return b.b(c,d)}},{jb:qi,ib:ri,$a:function(c,d){return b.c(c,d)}},{jb:ri,ib:qi,$a:function(c,d){return b.c(c,d)}}]}
  vi.prototype.release=function(){this.g=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};function wi(a,b,c,d){a.a=b;a.b=c;a.c=d}var qi=1,si=2,ri=3;function xi(a,b,c,d,e){a=Qc(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function yi(a,b){var c=this;this.u=b;this.s=a;this.i=null;this.f=1;this.c=this.b=null;this.a=new Map;this.h=!1;this.j=null;this.g=!1;this.F=new Xc(function(){return zi(c)})}yi.prototype.destroy=function(){return this.F.destroy()};function zi(a){var b,c,d,e;return J(function(f){if(1==f.a){b=[];c=r(a.a.values());for(d=c.next();!d.done;d=c.next())e=d.value,Ai(e),b.push(Bi(e));return u(f,Promise.all(b),2)}a.a.clear();a.u=null;a.s=null;a.i=null;x(f)})}
  yi.prototype.configure=function(a){this.i=a;this.j=new rc({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0},!0)};yi.prototype.start=function(){var a=this;return J(function(b){if(1==b.a)return u(b,Ci(a),2);Yc(a.F);a.h=!0;x(b)})};
  function Di(a,b){var c,d,e,f,g,h;J(function(k){switch(k.a){case 1:return c=Tb,A(k,2),u(k,Ig(a.u.L,c.$),4);case 4:wa(k,3);break;case 2:if(d=D(k),a.u)a.u.onError(d);case 3:e=jd(b.mimeType,b.codecs);xg(a.u.L,e);f=a.u.L.h;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=Ei(b),a.a.set(c.$,h),Fi(a,h,0);x(k)}})}function Gi(a){var b=a.a.get("text");b&&(Ai(b),Bi(b)["catch"](function(){}),a.a["delete"]("text"));a.c=null}
  function Hi(a,b){var c=a.a.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.fb&&(Ii(a,e,!1,0,!1),c.fb=d)}else if(d=c.fb)c.fb=null,Ii(a,d,!0,0,!1)}}function Ji(a,b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;a.b=b;a.h&&(b.video&&Ii(a,b.video,c,d,!1),b.audio&&Ii(a,b.audio,c,d,!1))}function Ki(a,b){a.c=b;a.h&&Ii(a,b,!0,0,!1)}
  function Ii(a,b,c,d,e){var f=a.a.get(b.type);f||"text"!=b.type?f&&(f.fb&&(b.trickModeVideo?(f.fb=b,b=b.trickModeVideo):f.fb=null),f.stream!=b||e)&&("text"==b.type&&xg(a.u.L,jd(b.mimeType,b.codecs)),f.stream=b,f.qa=null,c&&(f.Hb?f.Dc=!0:f.La?(f.hb=!0,f.mc=d,f.Dc=!0):(Ai(f),Li(a,f,!0,d)["catch"](function(g){if(a.u)a.u.onError(g)}))),Mi(a,f)["catch"](function(g){if(a.u)a.u.onError(g)})):Di(a,b)}
  function Mi(a,b){var c,d;return J(function(e){if(1==e.a){if(!b.oa)return e["return"]();c=b.stream;d=b.oa;return c.segmentIndex?e.m(2):u(e,c.createSegmentIndex(),2)}if(b.oa!=d||b.stream!=c)return e["return"]();var f=a.u.qc();var g=Cg(a.u.L,b.type),h=b.stream.segmentIndex.find(b.ua?b.ua.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Y?k.Y-k.da:null:null;k&&!h&&(h=(k.endTime-k.startTime)*(b.stream.bandwidth||0)/8);h?((k=k.c)&&(h+=(k.Y?k.Y-k.da:null)||0),k=a.u.getBandwidthEstimate(),f=8*
  h/k<(g||0)-f-Math.max(a.s.minBufferTime||0,a.i.rebufferingGoal)||b.oa.b.a>h?!0:!1):f=!1;f&&b.oa.abort();x(e)})}function Ni(a,b){b.Hb||b.hb||(b.La?(b.hb=!0,b.mc=0):null==Ag(a.u.L,b.type)?null==b.Ga&&Fi(a,b,0):(Ai(b),Li(a,b,!1,0)["catch"](function(c){if(a.u)a.u.onError(c)})))}
  function Ci(a){var b,c,d,e,f,g,h,k,l,m;return J(function(n){if(1==n.a){b=Tb;if(!a.b)throw new L(2,5,5006);c=new Map;d=new Set;a.b.audio&&(c.set(b.mb,a.b.audio),d.add(a.b.audio));a.b.video&&(c.set(b.Ha,a.b.video),d.add(a.b.video));a.c&&(c.set(b.$,a.c),d.add(a.c));e=a.u.L;f=a.i.forceTransmuxTS;return u(n,e.init(c,f),2)}Yc(a.F);var p=a.s.presentationTimeline.getDuration();Infinity>p?a.u.L.Ea(p):a.u.L.Ea(Math.pow(2,32));g=r(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.a.has(k)||
  (m=Ei(l),a.a.set(k,m),Fi(a,m,0));x(n)})}function Ei(a){return{stream:a,type:a.type,qa:null,ua:null,sc:null,hd:null,gd:null,fd:null,fb:null,endOfStream:!1,La:!1,Ga:null,hb:!1,mc:0,Dc:!1,Hb:!1,sd:!1,Pb:!1,oa:null}}
  yi.prototype.Rb=function(a){var b=this,c,d,e,f,g;return J(function(h){switch(h.a){case 1:Yc(b.F);if(a.La||null==a.Ga||a.Hb)return h["return"]();a.Ga=null;if(!a.hb){h.m(2);break}return u(h,Li(b,a,a.Dc,a.mc),3);case 3:return h["return"]();case 2:if(a.stream.segmentIndex){h.m(4);break}c=a.stream;return u(h,a.stream.createSegmentIndex(),5);case 5:if(c!=a.stream)return null==a.Ga&&Fi(b,a,0),h["return"]();case 4:A(h,6);d=Oi(b,a);null!=d&&(Fi(b,a,d),a.Pb=!1);wa(h,7);break;case 6:return e=D(h),u(h,Pi(b,e),
  8);case 8:return h["return"]();case 7:f=Array.from(b.a.values());if(!b.h||!f.every(function(k){return k.endOfStream})){h.m(0);break}return u(h,b.u.L.endOfStream(),10);case 10:Yc(b.F),g=b.u.L.getDuration(),0!=g&&g<b.s.presentationTimeline.getDuration()&&b.s.presentationTimeline.Ea(g),x(h)}})};
  function Oi(a,b){if(Qi(b))return Hg(a.u.L,b.stream.originalId||""),null;var c=a.u.qc(),d=b.ua?b.ua.endTime:c,e=Dg(a.u.L,b.type,c),f=Math.max(a.s.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.f;if(d>=a.s.presentationTimeline.getDuration())return b.endOfStream=!0,"video"==b.type&&(c=a.a.get("text"))&&Qi(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return.5;e=Cg(a.u.L,b.type);e=Ri(a,b,c,e);if(!e)return 1;f=Infinity;var g=Array.from(a.a.values());g=r(g);for(var h=g.next();!h.done;h=
  g.next())h=h.value,Qi(h)||(f=Math.min(f,h.ua?h.ua.endTime:c));if(d>=f+a.s.presentationTimeline.a)return 1;Si(a,b,c,e)["catch"](function(){});return null}function Ri(a,b,c,d){if(b.qa)return b.qa.current();if(b.ua||d)return b.qa=b.stream.segmentIndex.qb(b.ua?b.ua.endTime:d),b.qa.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.qa=b.stream.segmentIndex.qb(d),e=b.qa.next().value);e||(b.qa=b.stream.segmentIndex.qb(c),e=b.qa.next().value);return e}
  function Si(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,w,y;return J(function(z){switch(z.a){case 1:e=Tb;f=b.stream;g=b.qa;b.La=!0;h=Ti(a,b,d);A(z,2);k="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;l=window.ReadableStream;if(a.i.lowLatencyMode&&l&&k)return p=new Uint8Array(0),t=function(C){var E,B,H;return J(function(I){if(1==I.a)return u(I,h,2);Yc(a.F);if(a.g)return I["return"]();p=Ui(p,C);E=!1;B=0;(new me).box("mdat",function(F){B=F.size+F.start;E=!0}).parse(p,!1,!0);if(!E)return I.m(0);H=p.subarray(0,
  B);p=p.subarray(B);return u(I,Vi(a,b,c,f,d,H),0)})},u(z,Wi(a,b,d,t),5);m=Wi(a,b,d);return u(z,Promise.all([h,m]),6);case 6:return n=z.b,Yc(a.F),a.g?z["return"]():b.hb?(b.La=!1,Fi(a,b,0),z["return"]()):u(z,Vi(a,b,c,f,d,n[1]),5);case 5:Yc(a.F);if(a.g)return z["return"]();b.ua=d;g.next();b.La=!1;b.sd=!1;v=a.u.L.pc();w=v[b.type];bb(JSON.stringify(w));b.hb||a.u.pd();Fi(a,b,0);wa(z,0);break;case 2:y=D(z);Yc(a.F,y);if(a.g)return z["return"]();b.La=!1;if(b.type==e.$&&a.i.ignoreTextStreamFailures)a.a["delete"](e.$),
  z.m(0);else if(7001==y.code)b.La=!1,b.Ga=null,Fi(a,b,0),z.m(0);else if(3017==y.code)Xi(a,b,y),z.m(0);else if(1001==y.code&&y.data&&404==y.data[1])b.La=!1,b.Ga=null,Fi(a,b,1),z.m(0);else return b.Pb=!0,y.severity=2,u(z,Pi(a,y),0)}})}function Ui(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
  function Xi(a,b,c){if(!Array.from(a.a.values()).some(function(e){return e!=b&&e.sd})){var d=Math.round(100*a.f);if(20<d)a.f-=.2;else if(4<d)a.f-=.04;else{b.Pb=!0;a.g=!0;a.u.onError(c);return}b.sd=!0}Fi(a,b,4)}
  function Ti(a,b,c){var d,e,f,g,h,k,l;return J(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.hd||e!=b.gd||f!=b.fd)h=function(){var n;return J(function(p){if(1==p.a)return A(p,2),b.gd=e,b.fd=f,b.hd=g,u(p,Jg(a.u.L,b.type,g,e,f),4);if(2!=p.a)return wa(p,0);n=D(p);b.gd=null;b.fd=null;b.hd=null;throw n;})},d.push(h());!Mh(c.c,b.sc)&&(b.sc=c.c)&&(k=Wi(a,b,c.c),l=function(){var n,p,t;return J(function(v){switch(v.a){case 1:return A(v,2),u(v,k,4);
  case 4:return n=v.b,Yc(a.F),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,Eg(a.u.L,b.type,n,null,null,p),5);case 5:wa(v,0);break;case 2:throw t=D(v),b.sc=null,t;}})},d.push(l()));return u(m,Promise.all(d),0)})}
  function Vi(a,b,c,d,e,f){var g;return J(function(h){if(1==h.a)return g=d.closedCaptions&&0<d.closedCaptions.size,null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length&&(new me).P("emsg",function(k){var l=d.emsgSchemeIdUris;if(0===k.version){var m=k.reader.Tb();var n=k.reader.Tb();var p=k.reader.H();var t=k.reader.H();var v=k.reader.H();var w=k.reader.H();var y=e.startTime+t/p}else p=k.reader.H(),y=k.reader.cb()/p,t=y-e.startTime,v=k.reader.H(),w=k.reader.H(),m=k.reader.Tb(),n=k.reader.Tb();k=k.reader.Ta(k.reader.O.byteLength-
  k.reader.Z());l.includes(m)&&("urn:mpeg:dash:event:2012"==m?a.u.af():(l=new O(Yi,{detail:{startTime:y,endTime:y+v/p,schemeIdUri:m,value:n,timescale:p,presentationTimeDelta:t,eventDuration:v,id:w,messageData:k}}),a.u.onEvent(l)))}).parse(f),u(h,Zi(a,b,c),2);if(3!=h.a)return Yc(a.F),u(h,Eg(a.u.L,b.type,f,e.startTime,e.endTime,g),3);Yc(a.F);x(h)})}
  function Zi(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a){d=Math.max(a.i.bufferBehind,a.s.presentationTimeline.a);e=Ag(a.u.L,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.u.L.remove(b.type,e,e+g),2)}Yc(a.F);x(h)})}function Qi(a){return a&&"text"==a.type&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
  function Wi(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.a)return e=Wc,f=xi(c.a(),c.da,c.Y,a.i.retryParameters,d),g=a.u.wb.request(e,f),b.oa=g,u(k,g.promise,2);h=k.b;b.oa=null;return k["return"](h.data)})}
  function Li(a,b,c,d){var e,f;return J(function(g){if(1==g.a)return b.hb=!1,b.Dc=!1,b.mc=0,b.Hb=!0,b.ua=null,b.sc=null,b.qa=null,d?(e=a.u.qc(),f=a.u.L.getDuration(),u(g,a.u.L.remove(b.type,e+d,f),3)):u(g,Ig(a.u.L,b.type),4);if(3!=g.a)return Yc(a.F),c?u(g,a.u.L.flush(b.type),3):g.m(3);Yc(a.F);b.Hb=!1;b.endOfStream=!1;Fi(a,b,0);x(g)})}
  function Fi(a,b,c){var d=b.type;if("text"!=d||a.a.has(d))b.Ga=(new qc(function(){var e;return J(function(f){if(1==f.a)return A(f,2),u(f,a.Rb(b),4);if(2!=f.a)return wa(f,0);e=D(f);if(a.u)a.u.onError(e);x(f)})})).S(c)}function Ai(a){null!=a.Ga&&(a.Ga.stop(),a.Ga=null)}function Bi(a){return J(function(b){return a.oa?u(b,a.oa.abort(),0):b.m(0)})}function Pi(a,b){return J(function(c){if(1==c.a)return u(c,tc(a.j),2);Yc(a.F);a.u.onError(b);b.handled||a.i.failureCallback(b);x(c)})};function $i(a,b){var c=aj(),d=this;this.h=b;this.c=a;this.f=c;this.j=null;this.g=[];this.b=this.a=null;this.l=Promise.resolve().then(function(){return bj(d)});this.F=new Xc(function(){return cj(d)})}$i.prototype.destroy=function(){return this.F.destroy()};function cj(a){var b,c,d;return J(function(e){if(1==e.a)return a.b&&a.b.abort(),dj(a),u(e,a.l,2);a.a&&a.a.Ca.bb();b=r(a.g);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ca.bb();a.a=null;a.g=[];a.h=null;x(e)})}
  function ej(a,b){var c={yb:function(){},tc:function(){},bb:function(){},onError:function(){},vc:function(){},fg:function(){}};a.g.push({create:b,Ca:c});a.b&&a.b.abort();dj(a);return c}
  function bj(a){return J(function(b){if(a.F.a)b=b.m(0);else{if(0==a.g.length||a.a&&!a.a.Za)var c=!1;else{a.a&&(a.a.Ca.bb(),a.a=null);c=a.g.shift();var d=c.create(a.f);d?(c.Ca.yb(),a.a={node:d.node,payload:d.payload,Za:d.Za,Ca:c.Ca}):c.Ca.vc();c=!0}c?c=Promise.resolve():a.a?c=fj(a):(a.h.$e(a.c),a.j=new Ub,c=a.j);b=u(b,c,1)}return b})}
  function fj(a){var b,c;return J(function(d){switch(d.a){case 1:return a.c=a.h.Ke(a.c,a.f,a.a.node,a.a.payload),A(d,2),a.b=a.h.ze(a.c,a.f,a.a.payload),u(d,a.b.promise,4);case 4:a.b=null;a.c==a.a.node&&(a.a.Ca.tc(),a.a=null);wa(d,0);break;case 2:b=D(d);if(7001==b.code)a.a.Ca.bb();else a.a.Ca.onError(b);a.a=null;a.b=null;c=a;return u(d,a.h.handleError(a.f,b),5);case 5:c.c=d.b,x(d)}})}function dj(a){a.j&&(a.j.resolve(),a.j=null)};function gj(a){this.a=null;for(var b=r(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.a=c);this.a||(this.a=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden"}q=gj.prototype;q.remove=function(a,b){if(!this.a)return!1;hj(this.a,function(c){return c.startTime<b&&c.endTime>a});return!0};
  q.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(n,p){return n+"<"+p+">"},"");h=h.reduceRight(function(n,p){return n+"</"+p+">"},"");return g.lineBreak||g.spacer?(g.spacer&&Jb("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=
  g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.a.cues?Array.from(this.a.cues):[];var e={};c=r(c);for(var f=c.next();!f.done;e={kb:e.kb},f=c.next())e.kb=f.value,a.some(function(g){return function(h){return h.startTime==g.kb.startTime&&h.endTime==g.kb.endTime&&h.text==g.kb.payload?!0:!1}}(e))||(f=ij(e.kb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-
  d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=r(a);for(e=a.next();!e.done;e=a.next())this.a.addCue(e.value)};q.destroy=function(){this.a&&(hj(this.a,function(){return!0}),this.a.mode="disabled");this.a=null;return Promise.resolve()};q.isTextVisible=function(){return"showing"==this.a.mode};q.setTextVisibility=function(a){this.a.mode=a?"showing":"hidden"};
  function ij(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
  function hj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=r(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}K("shaka.text.SimpleTextDisplayer",gj);gj.prototype.setTextVisibility=gj.prototype.setTextVisibility;gj.prototype.isTextVisible=gj.prototype.isTextVisible;gj.prototype.destroy=gj.prototype.destroy;gj.prototype.append=gj.prototype.append;gj.prototype.remove=gj.prototype.remove;function jj(){}function kj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}K("shaka.util.Dom",jj);jj.removeAllChildren=kj;function lj(a,b){var c=this;this.h=!1;this.c=[];this.a=a;this.g=b;this.b=document.createElement("div");this.b.classList.add("shaka-text-container");this.b.style.textAlign="center";this.b.style.display="flex";this.b.style.flexDirection="column";this.b.style.alignItems="center";this.b.style.justifyContent="flex-end";this.g.appendChild(this.b);this.j=(new M(function(){mj(c)})).va(.25);this.f=new Map}q=lj.prototype;
  q.append=function(a){var b=ja(this.c).concat(),c={};a=r(a);for(var d=a.next();!d.done;c={Yb:c.Yb},d=a.next())c.Yb=d.value,b.some(function(e){return function(f){return Ke(f,e.Yb)}}(c))||this.c.push(c.Yb);mj(this)};q.destroy=function(){this.g.removeChild(this.b);this.b=null;this.h=!1;this.c=[];this.j&&this.j.stop();this.f.clear()};q.remove=function(a,b){if(!this.b)return!1;this.c=this.c.filter(function(c){return c.startTime<a||c.endTime>=b});mj(this);return!0};q.isTextVisible=function(){return this.h};
  q.setTextVisibility=function(a){this.h=a};
  function mj(a){function b(g){return a.c.includes(g)&&a.h&&g.startTime<=c&&g.endTime>c}for(var c=a.a.currentTime,d=r(a.f.keys()),e=d.next();!e.done;e=d.next())if(e=e.value,!b(e)){var f=a.f.get(e);a.b.removeChild(f);a.f["delete"](e)}d=new Set(a.f.values());e=r(Array.from(a.b.childNodes));for(f=e.next();!f.done;f=e.next())f=f.value,d.has(f)||a.b.removeChild(f);d=a.c.filter(function(g){return b(g)&&!a.f.has(g)}).sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime-h.endTime});
  d=r(d);for(e=d.next();!e.done;e=d.next())e=e.value,f=nj(a,a.b,e,!1),a.f.set(e,f)}function nj(a,b,c,d){var e=document.createElement(d?"span":"div");oj(a,e,c,d);c=r(c.nestedCues);for(d=c.next();!d.done;d=c.next())nj(a,e,d.value,!0);b.appendChild(e);return e}
  function oj(a,b,c,d){var e=b.style,f=0==c.nestedCues.length;c.lineBreak||c.spacer?(c.spacer&&Jb("shaka.extern.Cue","Please use lineBreak instead of spacer."),e.flexBasis="100%",e.height="0"):(e.whiteSpace="pre-wrap",b.textContent=c.payload.replace(/\s+$/g,function(g){return"\u00a0".repeat(g.length)}),e.backgroundColor=c.backgroundColor,e.border=c.border,e.color=c.color,e.direction=c.direction,e.opacity=c.opacity,e.paddingLeft=pj(c.linePadding,c,a.g),e.paddingRight=pj(c.linePadding,c,a.g),c.backgroundImage&&
  (e.backgroundImage="url('"+c.backgroundImage+"')",e.backgroundRepeat="no-repeat",e.backgroundSize="contain",e.backgroundPosition="center",""==c.backgroundColor&&(e.backgroundColor="transparent")),e.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end",f?e.display="inline-block":(e.display="flex",e.flexDirection="row",e.flexWrap="wrap",e.margin="0",e.alignItems=e.justifyContent,e.justifyContent="center"),d&&(e.maxWidth="100%"),e.fontFamily=c.fontFamily,e.fontWeight=
  c.fontWeight.toString(),e.fontStyle=c.fontStyle,e.letterSpacing=c.letterSpacing,e.fontSize=pj(c.fontSize,c,a.g),c.line?1==c.lineInterpretation&&(e.position="absolute",c.writingMode==Ee?c.lineAlign==Ge?e.top=c.line+"%":"end"==c.lineAlign&&(e.bottom=c.line+"%"):"vertical-lr"==c.writingMode?c.lineAlign==Ge?e.left=c.line+"%":"end"==c.lineAlign&&(e.right=c.line+"%"):c.lineAlign==Ge?e.right=c.line+"%":"end"==c.lineAlign&&(e.left=c.line+"%")):c.region&&c.region.id&&(!d&&!f||c.backgroundImage)&&(a=c.region.widthUnits==
  Pe?"%":"px",b=c.region.viewportAnchorUnits==Pe?"%":"px",e.height=c.region.height+(c.region.heightUnits==Pe?"%":"px"),e.width=c.region.width+a,e.position="absolute",e.top=c.region.viewportAnchorY+b,e.left=c.region.viewportAnchorX+b),e.lineHeight=c.lineHeight,c.position&&(c.writingMode==Ee?e.paddingLeft=c.position:e.paddingTop=c.position),"line-left"==c.positionAlign?e.cssFloat="left":"line-right"==c.positionAlign&&(e.cssFloat="right"),e.textAlign=c.textAlign,e.textDecoration=c.textDecoration.join(" "),
  e.writingMode=c.writingMode,c.size&&(c.writingMode==Ee?e.width=c.size+"%":e.height=c.size+"%"))}function pj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),xf:d[2]}:null;if(!d)return a;var e=d.value;switch(d.xf){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}K("shaka.text.UITextDisplayer",lj);lj.prototype.setTextVisibility=lj.prototype.setTextVisibility;
  lj.prototype.isTextVisible=lj.prototype.isTextVisible;lj.prototype.remove=lj.prototype.remove;lj.prototype.destroy=lj.prototype.destroy;lj.prototype.append=lj.prototype.append;function qj(a){var b="WEBVTT\n\n";a=r(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=function(e){var f=Math.floor(e/3600),g=Math.floor(e/60%60),h=Math.floor(e%60);e=Math.floor(1E3*e%1E3);return(10>f?"0":"")+f+":"+(10>g?"0":"")+g+":"+(10>h?"0":"")+h+"."+(100>e?10>e?"00":"0":"")+e};b+=d(c.startTime)+" --\x3e "+d(c.endTime)+"\n";b+=c.payload+"\n\n"}return b}K("shaka.text.WebVttGenerator",function(){});function rj(){}
  function sj(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Ec(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Ec(l)),k=sj(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
  k),g=!1)}return g}function tj(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}K("shaka.util.ConfigUtils",rj);rj.convertToConfigObject=tj;rj.mergeConfigObjects=sj;function uj(){}
  function vj(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:sc(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:$d,logLicenseExchange:!1,updateExpirationTime:1},c={retryParameters:sc(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,
  ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1},hls:{ignoreTextStreamFailures:!1,useFullSegmentsForStartTime:!1}},d={retryParameters:sc(),failureCallback:function(g){return[g]},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,useNativeHlsOnSafari:!0,
  inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1};if(rd("Web0S")||qd()||rd("CrKey"))d.stallSkip=0;var e={trackSelectionCallback:function(g){return J(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return J(function(k){if(1==k.a)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.b;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return[g,
  h]},usePersistentLicense:!0},f={drm:b,manifest:c,streaming:d,offline:e,abrFactory:function(){return new nh},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",
  preferredAudioChannelCount:2,preferForcedSubs:!1,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null}};e.trackSelectionCallback=function(g){return J(function(h){return h["return"](wj(g,f.preferredAudioLanguage))})};return f}
  function xj(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return sj(a,b,c||vj(),d,"")}
  function wj(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=Ug(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return Og(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
  2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=r(a);for(g=d.next();!g.done;g=d.next())g=g.value,"text"==g.type&&c.push(g);return c}K("shaka.util.PlayerConfiguration",uj);uj.mergeConfigObjects=xj;function yj(){this.a=null;this.b=[]}function zj(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!=b&&(a.b.push(a.a),a.a={timestamp:c,state:b,duration:0})}}function Aj(a,b){var c=0;a.a&&a.a.state==b&&(c+=a.a.duration);for(var d=r(a.b),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
  function Bj(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=r(a.b),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.a&&c.push(b(a.a));return c};function Cj(){this.b=this.c=null;this.a=[]}function Dj(a,b,c){a.c!=b&&(a.c=b,a.a.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}))}function Ej(a,b,c){a.b!=b&&(a.b=b,a.a.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Fj(){this.h=this.j=this.C=this.v=this.D=this.f=this.A=this.g=this.c=this.I=this.J=this.M=this.l=this.T=NaN;this.b=new yj;this.a=new Cj};function U(a,b){Dc.call(this);var c=this;this.g=Gj;this.jc=this.a=null;this.T=!1;this.b=new Zc;this.Rc=this.l=this.Pa=this.s=this.hc=this.j=this.c=this.ic=this.C=this.Va=this.A=this.ya=this.v=this.D=this.h=this.K=null;this.Xc=1E9;this.i=Hj(this);this.Wc={width:Infinity,height:Infinity};this.f=null;this.Qa=new xh(this.i.preferredAudioLanguage,this.i.preferredVariantRole,this.i.preferredAudioChannelCount);this.ha=this.i.preferredTextLanguage;this.ec=this.i.preferredTextRole;this.dc=this.i.preferForcedSubs;
  this.Sc=[];b&&b(this);this.K=Ij(this);this.K.zd(this.i.streaming.forceHTTPS);this.I=null;Jj&&(this.I=Qb(Jj));this.b.o(window,"online",function(){c.td()});this.ka={name:"detach"};this.Ia={name:"attach"};this.M={name:"unload"};this.Zc={name:"manifest-parser"};this.Ec={name:"manifest"};this.xa={name:"media-source"};this.Tc={name:"drm-engine"};this.J={name:"load"};this.$c={name:"src-equals-drm-engine"};this.za={name:"src-equals"};var d=new Map;d.set(this.Ia,function(e,f){return yc(Kj(c,e,f))});d.set(this.ka,
  function(e){e.B&&(c.b.wa(e.B,"error"),e.B=null);c.a=null;e=Promise.resolve();return yc(e)});d.set(this.M,function(e){return yc(Lj(c,e))});d.set(this.xa,function(e){e=Mj(c,e);return yc(e)});d.set(this.Zc,function(e,f){var g=Nj(c,e,f);return yc(g)});d.set(this.Ec,function(e){return Oj(c,e)});d.set(this.Tc,function(e){e=Pj(c,e);return yc(e)});d.set(this.J,function(e,f){return yc(Qj(c,e,f))});d.set(this.$c,function(e){e=Rj(c,e);return yc(e)});d.set(this.za,function(e,f){return Sj(c,e,f)});this.X=new $i(this.ka,
  {Ke:function(e,f,g,h){var k=null;e==c.ka&&(k=g==c.ka?c.ka:c.Ia);e==c.Ia&&(k=g==c.ka||f.B!=h.B?c.ka:g==c.Ia?c.Ia:g==c.xa||g==c.J?c.xa:g==c.za?c.$c:null);e==c.xa&&(k=g==c.J&&f.B==h.B?c.Zc:c.M);e==c.Zc&&(k=Tj(c.J,c.Ec,c.M,g,f,h));e==c.Ec&&(k=Tj(c.J,c.Tc,c.M,g,f,h));e==c.Tc&&(k=Tj(c.J,c.J,c.M,g,f,h));e==c.$c&&(k=g==c.za&&f.B==h.B?c.za:c.M);if(e==c.J||e==c.za)k=c.M;e==c.M&&(k=h.B&&f.B==h.B?c.Ia:c.ka);return k},ze:function(e,f,g){c.dispatchEvent(Uj(Vj,{state:e.name}));return d.get(e)(f,g)},handleError:function(e){return J(function(f){return 1==
  f.a?u(f,Lj(c,e),2):f["return"](e.B?c.Ia:c.ka)})},$e:function(e){c.dispatchEvent(Uj(Wj,{state:e.name}))}});a&&this.Gb(a,!0)}ra(U,Dc);function Uj(a,b){return new O(a,b)}q=U.prototype;
  q.destroy=function(){var a=this,b;return J(function(c){switch(c.a){case 1:if(a.g==Xj)return c["return"]();a.g=Xj;b=ej(a.X,function(){return{node:a.ka,payload:aj(),Za:!1}});return u(c,new Promise(function(d){b.yb=function(){};b.tc=function(){d()};b.bb=function(){d()};b.onError=function(){d()};b.vc=function(){d()}}),2);case 2:return u(c,a.X.destroy(),3);case 3:a.b&&(a.b.release(),a.b=null);a.Rc=null;a.l=null;a.i=null;a.f=null;a.jc=null;if(!a.K){c.m(0);break}return u(c,a.K.destroy(),5);case 5:a.K=null,
  x(c)}})};q.Gb=function(a,b){b=void 0===b?!0:b;if(this.g==Xj)return Promise.reject(Yj());var c=aj();c.B=a;nd()||(b=!1);var d=b?this.xa:this.Ia,e=ej(this.X,function(){return{node:d,payload:c,Za:!1}});e.yb=function(){};return Zj(e)};q.detach=function(){var a=this;if(this.g==Xj)return Promise.reject(Yj());var b=ej(this.X,function(){return{node:a.ka,payload:aj(),Za:!1}});b.yb=function(){};return Zj(b)};
  q.Gd=function(a){var b=this;a=void 0===a?!0:a;if(this.g==Xj)return Promise.reject(Yj());nd()||(a=!1);var c=aj(),d=ej(this.X,function(e){var f=e.B&&a?b.xa:e.B?b.Ia:b.ka;c.B=e.B;return{node:f,payload:c,Za:!1}});d.yb=function(){};return Zj(d)};
  q.load=function(a,b,c){var d=this;if(this.g==Xj)return Promise.reject(Yj());this.dispatchEvent(Uj(ak));var e=aj();e.uri=a;e.Ed=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=bk(this,e)?this.za:this.J,g=ej(this.X,function(h){if(null==h.B)return null;e.B=h.B;return{node:f,payload:e,Za:!0}});this.f=new Fj;g.yb=function(){};return new Promise(function(h,k){g.vc=function(){return k(new L(2,7,7002))};g.tc=function(){h();d.dispatchEvent(Uj(ck))};g.bb=function(){return k(Yj())};g.onError=
  function(l){return k(l)}})};
  function bk(a,b){if(!nd())return!0;var c=b.mimeType,d=b.uri||"";c||(c={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[Ih(d)]);if(c){if(""==(b.B||pd()).canPlayType(c))return!1;if(!nd()||!(c in Hh||Ih(d)in Jh)||a.i.streaming.preferNativeHls)return!0;if(sd())return a.i.streaming.useNativeHlsOnSafari}return!1}
  function Kj(a,b,c){null==b.B&&(b.B=c.B,a.b.o(b.B,"error",function(){var d=dk(a);d&&ek(a,d)}));a.a=b.B;return Promise.resolve()}
  function Lj(a,b){var c,d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:return a.g!=Xj&&(a.g=Gj),c=a.Sc.map(function(p){return p()}),a.Sc=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Uj(fk));b.mimeType=null;b.startTime=null;b.uri=null;b.B&&(a.b.wa(b.B,"loadedmetadata"),a.b.wa(b.B,"playing"),a.b.wa(b.B,"pause"),a.b.wa(b.B,"ended"),a.b.wa(b.B,"ratechange"));a.ya&&(a.ya.release(),a.ya=null);a.Va&&(a.Va.stop(),a.Va=null);if(!a.j){n.m(3);break}return u(n,a.j.stop(),4);case 4:a.j=null,a.hc=null;
  case 3:if(!a.l){n.m(5);break}return u(n,a.l.stop(),5);case 5:if(!a.c){n.m(7);break}return u(n,a.c.destroy(),8);case 8:a.c=null;case 7:a.A&&(a.A.release(),a.A=null);a.v&&(a.v.release(),a.v=null);if(!a.D){n.m(9);break}return u(n,a.D.destroy(),10);case 10:a.D=null;case 9:if(a.I)a.I.onAssetUnload();if(!b.B||!b.B.src){n.m(11);break}return u(n,new Promise(function(p){return(new M(p)).S(.1)}),12);case 12:for(b.B.removeAttribute("src"),b.B.load();b.B.lastChild;)b.B.removeChild(b.B.firstChild);case 11:if(!a.h){n.m(13);
  break}return u(n,a.h.destroy(),14);case 14:a.h=null;case 13:a.Pa=null;a.C=null;if(a.s){d=r(a.s.variants);for(e=d.next();!e.done;e=d.next())for(f=e.value,g=r([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=r(a.s.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.s=null;a.f=new Fj;a.Uc=null;gk(a);x(n)}})}
  function Mj(a,b){var c,d,e,f;return J(function(g){if(1==g.a)return c=new dg,d=a.i.textDisplayFactory,e=Qb(d),a.Uc=d,f=hk(b.B,c,e,function(h,k,l){h=r(h);for(var m=h.next();!m.done;m=h.next())if(m=m.value,m.data&&m.cueTime&&m.frames){for(var n=m.cueTime+k,p=l,t=r(m.frames),v=t.next();!v.done;v=t.next())ik(a,n,p,"ID3",v.value);if(a.I)a.I.onHlsTimedMetadata(m,n)}}),u(g,f.A,2);a.D=f;x(g)})}
  function Nj(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.K,a.Pa=d,f=a,u(h,Gh(d,e,a.i.manifest.retryParameters,b.mimeType),2);f.hc=h.b;a.j=Qb(a.hc);g=Ec(a.i.manifest);c.B&&"AUDIO"===c.B.nodeName&&(g.disableVideo=!0);a.j.configure(g);x(h)})}
  function Oj(a,b){var c=b.uri,d=a.K;a.ic=new ti(function(){return a.vd()});ui(a.ic,function(g){jk(a,kk,g);if(a.I)a.I.onDashTimedMetadata(g)});var e={networkingEngine:d,filter:function(g){return J(function(h){return h["return"](a.oc(g))})},makeTextStreamsForClosedCaptions:function(g){return lk(a,g)},onTimelineRegionAdded:function(g){var h=a.ic;a:{var k=r(h.a);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=
  l;break a}k=null}null==k&&(h.a.add(g),h.b(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return ek(a,g)},isLowLatencyMode:function(){return a.i.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.i.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new uc(function(){var g,h,k,l;return J(function(m){if(1==m.a)return g=a,u(m,a.j.start(c,e),2);g.s=m.b;h=Uj(mk);a.dispatchEvent(h);if(0==
  a.s.variants.length)throw new L(2,4,4036);nk(a.s);k=Date.now()/1E3;l=k-f;a.f.A=l;x(m)})}(),function(){return a.j.stop()})}
  function Pj(a,b){var c,d;return J(function(e){return 1==e.a?(c=Date.now()/1E3,d=!0,a.h=ok(a,{wb:a.K,onError:function(f){ek(a,f)},uc:function(f){pk(a,f)},onExpirationUpdated:function(f,g){qk(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==rk&&d&&(d=!1,a.f.f=Date.now()/1E3-c)}}),a.h.configure(a.i.drm),u(e,Dd(a.h,a.s.variants,a.s.offlineSessionIds),2)):3!=e.a?u(e,a.h.Gb(b.B),3):u(e,a.oc(a.s),0)})}
  function Qj(a,b,c){var d,e,f,g,h,k,l,m,n,p;return J(function(t){switch(t.a){case 1:b.startTime=c.startTime;d=b.B;e=b.uri;a.Pa=e;a.A=new mi({rc:function(){return b.B.playbackRate},Cd:function(v){b.B.playbackRate=v},Vd:function(v){b.B.currentTime+=v}});f=function(){return sk(a)};g=function(){return tk(a)};a.b.o(d,"playing",f);a.b.o(d,"pause",f);a.b.o(d,"ended",f);a.b.o(d,"ratechange",g);h=a.i.abrFactory;a.l&&a.Rc==h||(a.Rc=h,a.l=Qb(h),"function"!=typeof a.l.playbackRateChanged&&(Jb("AbrManager","Please use an AbrManager with playbackRateChanged function."),
  a.l.playbackRateChanged=function(){}),a.l.configure(a.i.abr));a.Qa=new xh(a.i.preferredAudioLanguage,a.i.preferredVariantRole,a.i.preferredAudioChannelCount);a.ha=a.i.preferredTextLanguage;uk(a.s.presentationTimeline,a.i.playRangeStart,a.i.playRangeEnd);a.l.init(function(v,w,y){w=void 0===w?!1:w;y=void 0===y?0:y;a.c&&v!=a.c.b&&(Dj(a.f.a,v,!0),Ji(a.c,v,w,y),vk(a))});a.v=wk(a,b.startTime);a.ya=xk(a);k=Math.max(a.s.minBufferTime,a.i.streaming.rebufferingGoal);yk(a,k);Vg(a.s,a.i.preferredAudioChannelCount);
  a.c=zk(a);a.c.configure(a.i.streaming);a.g=Ak;a.dispatchEvent(Uj(Bk));l=Ck(a)?a.l.chooseVariant():null;Dj(a.f.a,l,!0);Ji(a.c,l,!1,0);(m=lh(a.s.textStreams,a.ha,a.ec,a.dc)[0]||null)&&Ej(a.f.a,m,!0);m?(l.audio&&Dk(a,l.audio,m)&&(a.T=!0),a.T&&a.D.h.setTextVisibility(!0),Ek(a)):a.T=!1;m&&(a.i.streaming.alwaysStreamText||a.ed())&&Ki(a.c,m);if(!a.i.streaming.startAtSegmentBoundary){t.m(2);break}n=a.v.g();return u(t,Fk(l,n),3);case 3:p=t.b,a.v.l(p);case 2:return u(t,a.c.start(),4);case 4:a.i.abr.enabled&&
  (a.l.enable(),Gk(a)),ah(a.c?a.c.b:null,a.s),Hk(a.s),Ik(a),vk(a),Ck(a),a.s.variants.some(function(v){return v.primary}),a.b.na(d,"loadedmetadata",function(){a.f.g=Date.now()/1E3-c.Ed}),x(t)}})}
  function Rj(a,b){var c,d,e,f;return J(function(g){return 1==g.a?(c=Tb,d=Date.now()/1E3,e=!0,a.h=ok(a,{wb:a.K,onError:function(h){ek(a,h)},uc:function(h){pk(a,h)},onExpirationUpdated:function(h,k){qk(a,h,k)},onEvent:function(h){a.dispatchEvent(h);h.type==rk&&e&&(e=!1,a.f.f=Date.now()/1E3-d)}}),a.h.configure(a.i.drm),f={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"video/mp4",codecs:"",encrypted:!0,
  drmInfos:[],keyIds:new Set,language:"und",label:null,type:c.Ha,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0},u(g,Dd(a.h,[f],[]),2)):u(g,a.h.Gb(b.B),0)})}
  function Sj(a,b,c){function d(){return sk(a)}b.uri=c.uri;b.startTime=c.startTime;a.Pa=b.uri;a.v=new ci(b.B);null!=b.startTime&&a.v.l(b.startTime);a.A=new mi({rc:function(){return b.B.playbackRate},Cd:function(g){b.B.playbackRate=g},Vd:function(g){b.B.currentTime+=g}});yk(a,a.i.streaming.rebufferingGoal);a.b.o(b.B,"playing",d);a.b.o(b.B,"pause",d);a.b.o(b.B,"ended",d);a.b.o(b.B,"ratechange",function(){return tk(a)});"none"!=a.a.preload&&a.b.na(a.a,"loadedmetadata",function(){a.f.g=Date.now()/1E3-c.Ed});
  a.a.audioTracks&&(a.b.o(a.a.audioTracks,"addtrack",function(){return Ik(a)}),a.b.o(a.a.audioTracks,"removetrack",function(){return Ik(a)}),a.b.o(a.a.audioTracks,"change",function(){return Ik(a)}));a.a.textTracks&&(a.b.o(a.a.textTracks,"addtrack",function(g){Ik(a);Jk(a,g)}),a.b.o(a.a.textTracks,"removetrack",function(){return Ik(a)}),a.b.o(a.a.textTracks,"change",function(){return Ik(a)}));b.B.src=b.uri;(qd()||rd("Web0S"))&&b.B.load();a.g=Kk;a.dispatchEvent(Uj(Bk));var e=new Ub;Uh(a.a,HTMLMediaElement.HAVE_METADATA,
  a.b,function(){e.resolve()});var f=!1;a.Sc.push(function(){f=!0});Uh(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.b,function(){var g;return J(function(h){if(1==h.a){if(f)return h["return"]();Lk(a);g=Mk(a);return g.find(function(k){return"disabled"!=k.mode})?h.m(2):u(h,new Promise(function(k){a.b.na(a.a.textTracks,"change",k);(new M(k)).S(1)}),2)}if(f)return h["return"]();Nk(a);x(h)})});a.a.error?e.reject(dk(a)):"none"==a.a.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),
  e.resolve());a.b.na(a.a,"error",function(){e.reject(dk(a))});return new uc(e,function(){e.reject(new L(2,7,7001));return Promise.resolve()})}function Lk(a){var b=a.i.preferredAudioLanguage;if(""!=b){a.wd(b);var c=a.i.preferredVariantRole;""!=c&&a.wd(b,c)}}function Nk(a){var b=a.i.preferredTextLanguage,c=a.i.preferForcedSubs;if(""!=b){a.xd(b,"",c);var d=a.i.preferredTextRole;""!=d&&a.xd(b,d,c)}}
  function Jk(a,b){var c=b.track;"metadata"==c.kind&&(c.mode="hidden",a.b.o(c,"cuechange",function(){if(c.activeCues)for(var d=r(c.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,ik(a,e.startTime,e.endTime,e.type,e.value),a.I)a.I.onCueMetadataChange(e.value)}),(new M(function(){var d=Ok(a);d=r(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Xb().S(.5))}function ik(a,b,c,d,e){a.dispatchEvent(Uj(Pk,{startTime:b,endTime:c,dg:d,payload:e}))}
  function nk(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function ok(a,b){return new wd(b,a.i.drm.updateExpirationTime)}function Ij(a){return new Mc(function(b,c){a.l&&a.l.segmentDownloaded(b,c)})}
  function wk(a,b){return new di(a.a,a.s,a.i.streaming,b,function(){a.ya&&pi(a.ya,!0);if(a.c)for(var c=a.c,d=c.u.qc(),e=c.i.smallGapLimit,f=r(c.a.keys()),g=f.next();!g.done;g=f.next()){g=g.value;var h=c.a.get(g);h.qa=null;var k=c.u.L;"text"==g?(k=k.c,k=null==k.a||null==k.b?!1:d>=k.a&&d<k.b):(k=Bg(k,g),k=gg(k,d,e));if(!k&&(null!=Cg(c.u.L,g)&&Ni(c,h),h.oa&&(h.oa.abort(),h.oa=null),"text"===g))for(g=c.u.L.v.a,g.g=0,g.b=[],g.a=[],h=g.c,h.c=[],h.b=[],h.a=0,Rf(g),g=r(g.f.values()),h=g.next();!h.done;h=g.next())nf(h.value)}a.C&&
  Qk(a)},function(c){return a.dispatchEvent(c)})}function xk(a){var b=new vi(a.ic);wi(b,function(d){jk(a,Rk,d)},function(d){jk(a,Sk,d)},function(d,e){e||(jk(a,Rk,d),jk(a,Sk,d))});var c=new oi(a.a);c.a.add(b);return c}function yk(a,b){a.C=new Bh;a.C.a=Dh;Eh(a.C,b,Math.min(.5,b/2));gk(a);a.Va=(new M(function(){Qk(a)})).va(.25)}
  function Qk(a){switch(a.g){case Kk:if(a.a.ended)var b=!0;else{var c=fg(a.a.buffered);b=null!=c&&c>=a.a.duration-1}break;case Ak:a:if(a.a.ended||zg(a.D))b=!0;else{if(a.s.presentationTimeline.U()){c=a.s.presentationTimeline.Sa();var d=fg(a.a.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=hg(a.a.buffered,a.a.currentTime);c=a.C;var e=b,f=c.b.get(c.a);b=c.a;d=e||d>=f?Ch:Dh;c.a=d;b!=d&&gk(a)}function hk(a,b,c,d){return new sg(a,b,c,d)}
  function zk(a){return new yi(a.s,{qc:function(){return a.v.g()},getBandwidthEstimate:function(){return a.l.getBandwidthEstimate()},L:a.D,wb:a.K,onError:function(b){return ek(a,b)},onEvent:function(b){return a.dispatchEvent(b)},af:function(){a.j&&a.j.update&&a.j.update()},pd:function(){a.v&&a.v.v();Qk(a)}})}
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=tj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Jb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=
  0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=xj(this.i,a,Hj(this));Tk(this);return c};
  function Tk(a){if(a.j){var b=Ec(a.i.manifest);a.a&&"AUDIO"===a.a.nodeName&&(b.disableVideo=!0);a.j.configure(b)}a.h&&a.h.configure(a.i.drm);if(a.c){a.c.configure(a.i.streaming);try{Uk(a,a.s)}catch(f){ek(a,f)}a.l&&Ck(a);b=a.c.b;!b||b.allowedByApplication&&b.allowedByKeySystem||Vk(a)}a.K&&a.K.zd(a.i.streaming.forceHTTPS);if(a.D&&(b=a.i.textDisplayFactory,a.Uc!=b)){var c=Qb(b),d=a.D,e=d.h;d.h=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.c&&(d.c.c=c);a.Uc=b;a.c&&(b=a.c,(c=b.a.get("text"))&&
  Ii(b,c.stream,!0,0,!0))}a.l&&(a.l.configure(a.i.abr),a.i.abr.enabled?a.l.enable():a.l.disable(),Gk(a));a.C&&(b=a.i.streaming.rebufferingGoal,a.s&&(b=Math.max(b,a.s.minBufferTime)),Eh(a.C,b,Math.min(.5,b/2)));a.s&&uk(a.s.presentationTimeline,a.i.playRangeStart,a.i.playRangeEnd)}q.getConfiguration=function(){var a=Hj(this);xj(a,this.i,Hj(this));return a};q.lf=function(){for(var a in this.i)delete this.i[a];xj(this.i,Hj(this),Hj(this));Tk(this)};q.Fe=function(){return this.g};q.Je=function(){return this.a};
  q.Mb=function(){return this.K};q.bd=function(){return this.Pa};q.Pd=function(){Wa("getAdManager","Shaka Player's ad features are currently in BETA and are NOT yet covered by semantic versioning compatibility guarantees.  The API may change at any time!");return this.I};q.U=function(){return this.s?this.s.presentationTimeline.U():this.a&&this.a.src?Infinity==this.a.duration:!1};q.ab=function(){return this.s?this.s.presentationTimeline.ab():!1};
  q.Ve=function(){if(this.s){var a=this.s.variants;return a.length?!a[0].video:!1}return this.a&&this.a.src?this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight:!1};q.vd=function(){if(this.s){var a=this.s.presentationTimeline;return{start:a.rb(),end:a.Ka()}}return this.a&&this.a.src&&(a=this.a.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};q.keySystem=function(){return Td(this.drmInfo())};q.drmInfo=function(){return this.h?this.h.c:null};
  q.Lb=function(){return this.h?this.h.Lb():Infinity};q.dd=function(){return this.C?this.C.a==Dh:!1};q.Le=function(){return this.a?this.A?this.A.b:1:0};q.wf=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.A.set(a),this.g==Ak&&(this.l.playbackRateChanged(a),Hi(this.c,1<Math.abs(a))))};q.te=function(){this.g==Kk&&this.A.set(1);this.g==Ak&&(this.A.set(1),this.l.playbackRateChanged(1),Hi(this.c,!1))};
  q.cd=function(){if(this.s){for(var a=this.c?this.c.b:null,b=[],c=r(this.s.variants),d=c.next();!d.done;d=c.next())if(d=d.value,jh(d)){var e=dh(d);e.active=d==a;b.push(e)}return b}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map(function(f){return hh(f)}):[]};
  q.tb=function(){if(this.s){for(var a=this.c?this.c.c:null,b=[],c=r(this.s.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=eh(d);e.active=d==a;b.push(e)}return b}return this.a&&this.a.src&&this.a.textTracks?Mk(this).map(function(f){var g=ih(f);g.active="disabled"!=f.mode;g.type="text";g.originalTextId=f.id;"captions"==f.kind&&(g.mimeType="application/cea-608");f.kind&&(g.roles=[f.kind]);"forced"==f.kind&&(g.forced=!0);return g}):[]};
  q.ee=function(a){if(this.s&&this.c){var b=this.s.textStreams.find(function(d){return d.id==a.id});b&&b!=this.c.c&&(Ej(this.f.a,b,!1),Ki(this.c,b),Wk(this),this.ha=b.language)}else if(this.a&&this.a.src&&this.a.textTracks){b=Mk(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,fh(c)==a.id?c.mode=this.T?"showing":"hidden":c.mode="disabled";Wk(this)}};
  q.mf=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.s&&this.c){this.i.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.s.variants.find(function(e){return e.id==a.id});d&&jh(d)&&d!=this.c.b&&(Dj(this.f.a,d,!1),Ji(this.c,d,b,c),Xk(this),this.Qa=new wh(d),Ck(this))}else if(this.a&&this.a.audioTracks){b=Array.from(this.a.audioTracks);b=r(b);for(c=
  b.next();!c.done;c=b.next())c=c.value,fh(c)==a.id&&(c.enabled=!0);Xk(this)}};q.Be=function(){return Yk(this.cd())};q.Se=function(){return Yk(this.tb())};q.Ae=function(){return Array.from(Zk(this.cd()))};q.Re=function(){return Array.from(Zk(this.tb()))};
  q.wd=function(a,b){if(this.s&&this.v)this.Qa=new xh(a,b||"",0,""),Vk(this);else if(this.a&&this.a.audioTracks){var c=Array.from(this.a.audioTracks),d=Og(a),e=null,f=null;c=r(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=hh(g);Og(h.language)==d&&(e=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?(f.enabled=!0,Xk(this)):e&&(e.enabled=!0,Xk(this))}};
  q.xd=function(a,b,c){c=void 0===c?!1:c;if(this.s&&this.v){if(this.ha=a,this.ec=b||"",this.dc=c,(a=lh(this.s.textStreams,this.ha,this.ec,this.dc)[0]||null)&&a!=this.c.c&&(Ej(this.f.a,a,!1),this.i.streaming.alwaysStreamText||this.ed()))Ki(this.c,a),Wk(this)}else{var d=Og(a);(a=this.tb().find(function(e){return Og(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.ee(a)}};
  q.nf=function(a){if(this.s&&this.v){for(var b=null,c=r(this.s.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.Qa=new xh(b.language,"",0,a),Vk(this))}};q.ed=function(){var a=this.T;return this.D?this.D.h.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Mk(this).some(function(b){return"showing"==b.mode}):a};
  function Mk(a){return Array.from(a.a.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function Ok(a){return Array.from(a.a.textTracks).filter(function(b){return"metadata"==b.kind})}
  q.uf=function(a){a=!!a;if(this.T!=a){this.T=a;if(this.g==Ak)this.D.h.setTextVisibility(a),this.i.streaming.alwaysStreamText||(a?this.c.c||(a=lh(this.s.textStreams,this.ha,this.ec,this.dc),0<a.length&&(Ki(this.c,a[0]),Wk(this))):Gi(this.c));else if(this.a&&this.a.src&&this.a.textTracks){var b=Mk(this);b=r(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Ek(this)}};
  q.Ne=function(){if(!this.U())return null;var a=this.X.f,b=0;if(this.v)b=this.v.g();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.s?new Date(1E3*(this.s.presentationTimeline.f+b)):this.a&&this.a.getStartDate?(a=this.a.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
  q.Qd=function(){if(!this.U())return null;if(this.s)return new Date(1E3*this.s.presentationTimeline.f);if(this.a&&this.a.getStartDate){var a=this.a.getStartDate();return isNaN(a.getTime())?null:a}return null};q.pc=function(){if(this.g==Ak)return this.D.pc();var a={total:[],audio:[],video:[],text:[]};this.g==Kk&&(a.total=ig(this.a.buffered));return a};
  q.getStats=function(){if(this.g!=Ak&&this.g!=Kk)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};sk(this);var a=this.a,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.f;b=Math.round(100*b);c.c=isNaN(c.c)?
  b:Math.max(c.c,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.f,b=Number(a.totalVideoFrames),c.M=Number(a.droppedVideoFrames),c.J=b,this.f.I=Number(a.corruptedVideoFrames));this.h?(a=this.h,a=a.D?a.D:NaN):a=NaN;this.f.D=a;if(this.g==Ak){if(a=this.c.b)this.f.j=(this.A?this.A.b:1)*a.bandwidth;a&&a.video&&(c=this.f,b=a.video.height||NaN,c.T=a.video.width||NaN,c.l=b);this.U()&&(a=this.Qd().valueOf()+1E3*this.vd().end,this.f.v=(Date.now()-a)/1E3);this.s&&this.s.presentationTimeline&&
  (this.f.C=this.s.presentationTimeline.a);a=this.l.getBandwidthEstimate();this.f.h=a}var d=this.f;a=d.T;c=d.l;b=d.j;var e=d.J,f=d.M,g=d.I,h=d.h,k=d.c,l=d.g,m=d.A,n=d.f,p=Aj(d.b,"playing"),t=Aj(d.b,"paused"),v=Aj(d.b,"buffering"),w=d.D,y=d.v,z=d.C,C=Bj(d.b),E=[];d=r(d.a.a);for(var B=d.next();!B.done;B=d.next())B=B.value,E.push({timestamp:B.timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
  estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:n,playTime:p,pauseTime:t,bufferingTime:v,licenseTime:w,liveLatency:y,maxSegmentDuration:z,stateHistory:C,switchHistory:E}};
  q.addTextTrack=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;Jb("addTextTrack","Please use an addTextTrackAsync.");if(this.g!=Ak&&this.g!=Kk)throw new L(1,7,7004);if(!d){var h=Ih(a);d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[h];if(!d)throw new L(1,2,2011,h);}if(this.g==Kk){if("text/vtt"!=d)throw new L(1,2,2013,d);g&&(c="forced");d=document.createElement("track");d.setAttribute("src",
  a);d.setAttribute("label",f||"");d.setAttribute("kind",c);d.setAttribute("srclang",b);this.a.appendChild(d);if(a=this.tb().find(function(k){return k.language==b&&k.label==(f||"")&&k.kind==c}))return Ik(this),a;throw new L(1,2,2012);}h=this.s.presentationTimeline.getDuration();if(Infinity==h)throw new L(1,4,4033);a={id:this.Xc++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ki(0,h,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,
  language:b,label:f||null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,closedCaptions:null};if(!lg(jd(a.mimeType,a.codecs)))throw new L(2,2,2014,d);this.s.textStreams.push(a);Ik(this);return eh(a)};
  q.qe=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,t,v,w,y,z,C,E;return J(function(B){switch(B.a){case 1:if(h.g!=Ak&&h.g!=Kk)throw new L(1,7,7004);if(d){B.m(2);break}k=Ih(a);if(d={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"}[k]){B.m(3);break}A(B,4);return u(B,Kh(a,h.K,h.i.streaming.retryParameters),6);case 6:d=B.b;wa(B,3);break;case 4:D(B);case 3:if(!d)throw new L(1,
  2,2011,k);case 2:if(h.g!=Kk){B.m(7);break}if("text/vtt"==d){B.m(8);break}return u(B,$k(a,h.K,h.i.streaming.retryParameters),9);case 9:l=B.b,m=al(h,l,d),n=new Blob([m],{type:"text/vtt"}),a=URL.createObjectURL(n),d="text/vtt";case 8:g&&(c="forced");p=document.createElement("track");p.setAttribute("src",a);p.setAttribute("label",f||"");p.setAttribute("kind",c);p.setAttribute("srclang",b);h.a.appendChild(p);t=h.tb();if(v=t.find(function(H){return H.language==b&&H.label==(f||"")&&H.kind==c}))return Ik(h),
  B["return"](v);throw new L(1,2,2012);case 7:w=Tb;y=h.s.presentationTimeline.getDuration();if(Infinity==y)throw new L(1,4,4033);z={id:h.Xc++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ki(0,y,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:w.$,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,closedCaptions:null};C=jd(z.mimeType,z.codecs);
  E=lg(C);if(!E)throw new L(2,2,2014,d);h.s.textStreams.push(z);Ik(h);return B["return"](eh(z))}})};function $k(a,b,c){var d,e,f;return J(function(g){if(1==g.a)return d=Wc,e=Qc([a],c),e.method="GET",u(g,b.request(d,e).promise,2);f=g.b;return g["return"](f.data)})}function al(a,b,c){var d=mg[c];if(d)return c=d(),a={periodStart:0,segmentStart:0,segmentEnd:a.a.duration},b=qb(b),b=c.parseMedia(b,a),qj(b);throw new L(2,2,2014,c);}q.Bd=function(a,b){this.Wc.width=a;this.Wc.height=b};
  q.td=function(){if(this.g==Ak){var a=this.c;if(a.F.a)a=!1;else if(a.g)a=!1;else{for(var b=r(a.a.values()),c=b.next();!c.done;c=b.next())c=c.value,c.Pb&&(c.Pb=!1,Fi(a,c,.1));a=!0}}else a=!1;return a};q.Ge=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for.");return this.s};q.He=function(){return this.hc};
  function Hj(a){var b=vj();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.U()&&d.includes(c.code)&&(c.severity=1,a.td())};b.textDisplayFactory=function(){return a.jc?new lj(a.a,a.jc):new gj(a.a)};return b}q.ie=function(a){this.jc=a};
  function lk(a,b){for(var c=new Set,d=r(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=r(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=r(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new li;h={id:a.Xc++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
  segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,closedCaptions:null};b.textStreams.push(h);c.add(g)}}q.oc=function(a){var b=this;return J(function(c){if(1==c.a)return u(c,bl(b,a),2);Uk(b,a);x(c)})};
  function bl(a,b){var c;return J(function(d){if(1==d.a)return c=a.c?a.c.b:null,u(d,Yg(a.h,c,b),2);Hk(b);x(d)})}
  function Uk(a,b){for(var c=a.i.restrictions,d=a.Wc,e=!1,f=r(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Xg(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.c&&Ik(a);if(c=a.h?a.h.c:null)for(d=r(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=r((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=r(f.initData||[]),g=f.next();!g.done;g=f.next())g=
  g.value,Md(a.h,g.initDataType,g.initData);cl(a,b)}
  function Fk(a,b){var c,d,e,f,g;return J(function(h){if(1==h.a)return c=a.audio,d=a.video,e=function(k,l){var m,n;return J(function(p){if(1==p.a)return k?u(p,k.createSegmentIndex(),2):p["return"](null);m=k.segmentIndex[Symbol.iterator]().seek(l);if(!m)return p["return"](null);n=m.startTime;return p["return"](n)})},u(h,e(c,b),2);if(3!=h.a)return f=h.b,u(h,e(d,b),3);g=h.b;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
  function gk(a){var b=a.dd();if(a.f&&a.C&&a.v){var c=a.A;c.f=b;ni(c);sk(a)}a.dispatchEvent(Uj(dl,{buffering:b}))}function tk(a){var b=a.a.playbackRate;0!=b&&(a.A&&a.A.set(b),b=Uj(el),a.dispatchEvent(b))}function sk(a){if(a.f&&a.C){var b=a.f.b;a.C.a==Dh?zj(b,"buffering"):a.a.paused?zj(b,"paused"):a.a.ended?zj(b,"ended"):zj(b,"playing")}}
  function Ck(a){try{cl(a,a.s)}catch(c){return ek(a,c),!1}var b=a.s.variants.filter(function(c){return jh(c)});b=a.Qa.create(b);a.l.setVariants(Array.from(b.values()));return!0}function Vk(a){var b;if(b=Ck(a)?a.l.chooseVariant():null){if(b==a.c.b)return;Dj(a.f.a,b,!0);Ji(a.c,b,!0,0);Xk(a)}vk(a)}function Dk(a,b,c){a=Og(a.i.preferredTextLanguage);b=Og(b.language);c=Og(c.language);return Ng(c,a)&&!Ng(b,c)}function vk(a){var b=Uj(fl);gl(a,b)}function Ik(a){var b=Uj(hl);gl(a,b)}
  function Xk(a){var b=Uj(il);gl(a,b)}function Wk(a){var b=Uj(jl);gl(a,b)}function Ek(a){var b=Uj(kl);gl(a,b)}function Gk(a){var b=Uj(ll,{eg:a.i.abr.enabled});gl(a,b)}function ek(a,b){if(a.g!=Xj){var c=Uj(ml,{detail:b});a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function jk(a,b,c){a.dispatchEvent(Uj(b,{detail:{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement}}))}
  function dk(a){if(!a.a.error)return null;var b=a.a.error.code;if(1==b)return null;var c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new L(2,3,3016,b,c,a.a.error.message)}
  function pk(a,b){if(a.c){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=r(a.s.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=r(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=r(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!nl.includes(l)}h!=f.allowedByKeySystem&&
  (e=!0)}}}e&&Ck(a);(d=a.c.b)&&!d.allowedByKeySystem&&Vk(a);e&&Ik(a)}}function qk(a,b,c){if(a.j&&a.j.onExpirationUpdated)a.j.onExpirationUpdated(b,c);b=Uj(ol);a.dispatchEvent(b)}function uk(a,b,c){0<b&&(a.U()||a.he(b));b=a.getDuration();c<b&&(a.U()||a.Ea(c))}
  function cl(a,b){var c=a.h?hd(a.h.T):{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=r(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=r(m);for(var n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=r(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var t=c[d?"00":p];t?nl.includes(t)&&h.add(t):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
  missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new L(2,4,4012,c);}function Hk(a){if(!a.variants.some(jh))throw new L(2,4,4032);}function gl(a,b){J(function(c){if(1==c.a)return u(c,Promise.resolve(),2);a.g!=Xj&&a.dispatchEvent(b);x(c)})}function Zk(a){var b=new Set;a=r(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(Og(c.language)):b.add("und");return b}
  function Yk(a){var b=new Map,c=new Map;a=r(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=Og(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=r(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=r(k),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
  h.push({language:l,role:n,label:p})}});return h}function Yj(){return new L(2,7,7E3)}function Tj(a,b,c,d,e,f){return d==a&&e.B==f.B&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function aj(){return{B:null,mimeType:null,startTime:null,Ed:NaN,uri:null}}function Zj(a){return new Promise(function(b,c){a.bb=function(){return c(Yj())};a.tc=function(){return b()};a.onError=function(d){return c(d)};a.vc=function(){return c(Yj())}})}K("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.ie;
  U.prototype.getManifestParserFactory=U.prototype.He;U.prototype.getManifest=U.prototype.Ge;U.prototype.retryStreaming=U.prototype.td;U.prototype.setMaxHardwareResolution=U.prototype.Bd;U.prototype.addTextTrackAsync=U.prototype.qe;U.prototype.addTextTrack=U.prototype.addTextTrack;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.pc;U.prototype.getPresentationStartTimeAsDate=U.prototype.Qd;U.prototype.getPlayheadTimeAsDate=U.prototype.Ne;
  U.prototype.setTextTrackVisibility=U.prototype.uf;U.prototype.isTextTrackVisible=U.prototype.ed;U.prototype.selectVariantsByLabel=U.prototype.nf;U.prototype.selectTextLanguage=U.prototype.xd;U.prototype.selectAudioLanguage=U.prototype.wd;U.prototype.getTextLanguages=U.prototype.Re;U.prototype.getAudioLanguages=U.prototype.Ae;U.prototype.getTextLanguagesAndRoles=U.prototype.Se;U.prototype.getAudioLanguagesAndRoles=U.prototype.Be;U.prototype.selectVariantTrack=U.prototype.mf;
  U.prototype.selectTextTrack=U.prototype.ee;U.prototype.getTextTracks=U.prototype.tb;U.prototype.getVariantTracks=U.prototype.cd;U.prototype.cancelTrickPlay=U.prototype.te;U.prototype.trickPlay=U.prototype.wf;U.prototype.getPlaybackRate=U.prototype.Le;U.prototype.isBuffering=U.prototype.dd;U.prototype.getExpiration=U.prototype.Lb;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.seekRange=U.prototype.vd;U.prototype.isAudioOnly=U.prototype.Ve;
  U.prototype.isInProgress=U.prototype.ab;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.Pd;U.prototype.getAssetUri=U.prototype.bd;U.prototype.getNetworkingEngine=U.prototype.Mb;U.prototype.getMediaElement=U.prototype.Je;U.prototype.getLoadMode=U.prototype.Fe;U.prototype.resetConfiguration=U.prototype.lf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.unload=U.prototype.Gd;
  U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Gb;
  U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return J(function(h){if(1==h.a)return b={},a?u(h,de(),3):h.m(2);2!=h.a&&(b=h.b);var k={};if(nd()){for(var l in Hh)k[l]=!0;for(var m in Jh)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=r(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var n=m.next();!n.done;n=m.next())n=n.value,k[n]=nd()?!!Hh[n]:od(n);for(var p in l)k[p]=
  nd()?!!Jh[p]:od(l[p]);c=k;k={};p=r('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(","));
  for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=nd()?lg(l)?!0:MediaSource.isTypeSupported(l)||nc(l):od(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=pl;for(g in f)e[g]=f[g]();return h["return"](e)})};
  U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Va("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach))return!1;var a=td();return a&&12>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
  !1:nd()?!0:od("application/x-mpegurl")};U.setAdManagerFactory=function(a){Jj=a};U.registerSupportPlugin=function(a,b){pl[a]=b};U.prototype.destroy=U.prototype.destroy;
  var ll="abrstatuschanged",fl="adaptation",dl="buffering",rk="drmsessionupdate",Yi="emsg",ml="error",ol="expirationupdated",ck="loaded",ak="loading",mk="manifestparsed",Pk="metadata",Vj="onstatechange",Wj="onstateidle",el="ratechange",Bk="streaming",jl="textchanged",kl="texttrackvisibility",kk="timelineregionadded",Rk="timelineregionenter",Sk="timelineregionexit",hl="trackschanged",fk="unloading",il="variantchanged",ql={Df:ll,Ef:fl,Ff:dl,Gf:rk,If:Yi,Error:ml,Jf:ol,Lf:"largegap",Mf:ck,Nf:ak,Of:mk,Metadata:Pk,
  Pf:Vj,Qf:Wj,Rf:el,Sf:"sessiondata",Tf:Bk,Uf:jl,Vf:kl,Wf:kk,Xf:Rk,Yf:Sk,Zf:hl,$f:fk,ag:il},Xj=0,Gj=1,Ak=2,Kk=3;U.LoadMode={DESTROYED:Xj,NOT_LOADED:Gj,MEDIA_SOURCE:Ak,SRC_EQUALS:Kk};U.version="v2.5.20-master-18-g6db55e01";var rl=["2","5"];Kb=new function(a){this.a=a;this.c=Lb;this.b=Mb}(new Ib(Number(rl[0]),Number(rl[1])));var nl=["output-restricted","internal-error"],pl={},Jj=null;function sl(){this.a=[];this.f=this.b=this.c=0};function V(a,b){var c=this;this.c=a;this.a=b;this.f=!1;this.g=this.a.getVolume();this.b=new Zc;this.b.o(this.a,google.ima.AdEvent.Type.PAUSED,function(){c.f=!0});this.b.o(this.a,google.ima.AdEvent.Type.RESUMED,function(){c.f=!1})}q=V.prototype;q.getDuration=function(){return this.c.getDuration()};q.getMinSuggestedDuration=function(){return this.c.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.a.getRemainingTime()};q.isPaused=function(){return this.f};
  q.isSkippable=function(){return 0<=this.c.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.c.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.a.getAdSkippableState()};q.skip=function(){return this.a.skip()};q.pause=function(){return this.a.pause()};q.play=function(){return this.a.resume()};q.getVolume=function(){return this.a.getVolume()};q.setVolume=function(a){return this.a.setVolume(a)};q.isMuted=function(){return 0==this.a.getVolume()};
  q.resize=function(a,b){this.a.resize(a,b,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};q.setMuted=function(a){a?(this.g=this.getVolume(),this.setVolume(0)):this.setVolume(this.g)};q.getSequenceLength=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.a=this.c=null};K("shaka.ads.ClientSideAd",V);
  V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isMuted=V.prototype.isMuted;V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;
  V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;V.prototype.getDuration=V.prototype.getDuration;function tl(a,b,c,d){var e=this;this.h=a;this.a=b;this.l=NaN;this.f=d;this.j=null;this.b=new Zc;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.h,this.a);a.initialize();this.g=new google.ima.AdsLoader(a);this.g.getSettings().setPlayerType("shaka-player");this.g.getSettings().setPlayerVersion("v2.5.20-master-18-g6db55e01");this.c=null;this.b.na(this.g,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){ul(e,f)});this.b.o(this.g,google.ima.AdErrorEvent.Type.AD_ERROR,
  function(f){vl(e,f)});this.a.onended=function(){e.g.contentComplete()}}tl.prototype.stop=function(){this.c&&this.c.stop();this.h&&kj(this.h)};function vl(a,b){b.getError();wl(a,null);a.f(new O("ad-cue-points-changed",{cuepoints:[]}))}
  function ul(a,b){a.f(new O("ads-loaded",{loadTime:Date.now()/1E3-a.l}));a.c=b.getAdsManager(a.a);a.f(new O("ima-ad-manager-loaded",{imaAdManager:a.c}));var c=a.c.getCuePoints();if(c.length){var d=[];c=r(c);for(var e=c.next();!e.done;e=c.next())d.push(new xl(e.value));a.f(new O("ad-cue-points-changed",{cuepoints:d}))}yl(a);try{a.c.init(a.a.offsetWidth,a.a.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.b.o(a.a,"loadeddata",function(){a.c.resize(a.a.offsetWidth,
  a.a.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.c.start()}catch(f){wl(a,null)}}
  function yl(a){a.b.o(a.c,google.ima.AdErrorEvent.Type.AD_ERROR,function(b){vl(a,b)});a.b.o(a.c,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(b){zl(a,b)});a.b.o(a.c,google.ima.AdEvent.Type.STARTED,function(b){zl(a,b)});a.b.o(a.c,google.ima.AdEvent.Type.FIRST_QUARTILE,function(b){a.f(new O("ad-first-quartile",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.MIDPOINT,function(b){a.f(new O("ad-midpoint",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.THIRD_QUARTILE,function(b){a.f(new O("ad-third-quartile",
  {originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.COMPLETE,function(b){a.f(new O("ad-complete",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(b){wl(a,b)});a.b.o(a.c,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(b){wl(a,b)});a.b.o(a.c,google.ima.AdEvent.Type.SKIPPED,function(b){a.f(new O("ad-skipped",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.VOLUME_CHANGED,function(b){a.f(new O("ad-volume-changed",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.VOLUME_MUTED,
  function(b){a.f(new O("ad-muted",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.PAUSED,function(b){a.j.f=!0;a.f(new O("ad-paused",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.RESUMED,function(b){a.j.f=!1;a.f(new O("ad-resumed",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(b){a.f(new O("ad-skip-state-changed",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.CLICK,function(){a.f(new O("ad-clicked"))});a.b.o(a.c,google.ima.AdEvent.Type.AD_PROGRESS,
  function(b){a.f(new O("ad-progress",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.AD_BUFFERING,function(b){a.f(new O("ad-buffering",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.IMPRESSION,function(b){a.f(new O("ad-impression",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.DURATION_CHANGE,function(b){a.f(new O("ad-duration-changed",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.USER_CLOSE,function(b){a.f(new O("ad-closed",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.LOADED,
  function(b){a.f(new O("ad-loaded",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(b){a.f(new O("all-ads-completed",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.LINEAR_CHANGED,function(b){a.f(new O("ad-linear-changed",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.AD_METADATA,function(b){a.f(new O("ad-metadata",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.LOG,function(b){a.f(new O("ad-recoverable-error",{originalEvent:b}))});a.b.o(a.c,
  google.ima.AdEvent.Type.AD_BREAK_READY,function(b){a.f(new O("ad-break-ready",{originalEvent:b}))});a.b.o(a.c,google.ima.AdEvent.Type.INTERACTION,function(b){a.f(new O("ad-interaction",{originalEvent:b}))})}function zl(a,b){var c=b.getAd();a.j=new V(c,a.c);a.f(new O("ad-started",{ad:a.j,sdkAdObject:c,originalEvent:b}));a.h.setAttribute("ad-active","true");a.a.pause()}function wl(a,b){a.f(new O("ad-stopped",{originalEvent:b}));a.h.removeAttribute("ad-active");a.a.play()};function W(a,b){this.c=a;this.b=null;this.a=b}q=W.prototype;q.getDuration=function(){return this.b?this.b.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.b?this.b.duration-this.b.currentTime:-1};q.isPaused=function(){return this.a.paused};q.isSkippable=function(){return this.c.isSkippable()};q.getTimeUntilSkippable=function(){var a=this.c.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
  q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.a.currentTime+=this.getRemainingTime()};q.pause=function(){return this.a.pause()};q.play=function(){return this.a.play()};q.getVolume=function(){return this.a.volume};q.setVolume=function(a){this.a.volume=a};q.isMuted=function(){return this.a.muted};q.resize=function(){};q.setMuted=function(a){this.a.muted=a};q.getSequenceLength=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getTotalAds()};
  q.getPositionInSequence=function(){var a=this.c.getAdPodInfo();return null==a?1:a.getAdPosition()};q.release=function(){this.a=this.b=this.c=null};K("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;
  W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;
  W.prototype.getDuration=W.prototype.getDuration;function Al(a,b,c,d){var e=this;this.v=a;this.a=b;this.g=null;this.D=NaN;this.f=d;this.C=!1;this.A=this.h=this.j=null;this.l="";this.b=new Zc;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.c=new google.ima.dai.api.StreamManager(this.a,this.v,a);this.f(new O("ima-stream-manager-loaded",{imaStreamManager:this.c}));this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Bl(e,f)});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.l.length?e.g.resolve(e.l):
  e.g.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.g=null});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.h=new W(f,e.a);e.A&&(e.h.b=e.A);e.f(new O("ad-started",{ad:e.h}));e.v.setAttribute("ad-active","true")});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.v.removeAttribute("ad-active");var f=e.a.currentTime;
  e.j&&e.j>f&&(e.a.currentTime=e.j,e.j=null)});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.A=f.getStreamData().adProgressData;e.h&&(e.h.b=e.A)});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.f(new O("ad-first-quartile"))});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.f(new O("ad-midpoint"))});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.f(new O("ad-third-quartile"))});
  this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.f(new O("ad-complete"));e.f(new O("ad-stopped"));e.v.removeAttribute("ad-active");e.h=null});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.f(new O("ad-skipped"));e.f(new O("ad-stopped"))});this.b.o(this.c,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=r(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push(new xl(h.start,h.end));e.f(new O("ad-cue-points-changed",
  {cuepoints:f}))})}Al.prototype.stop=function(){this.c.reset();this.l="";this.j=null};Al.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.c.onTimedMetadata(b)}};
  function Bl(a,b){a.f(new O("ads-loaded",{loadTime:Date.now()/1E3-a.D}));var c=b.getStreamData().url;a.g.resolve(c);a.g=null;a.C||a.b.o(a.a,"seeked",function(){var d=a.a.currentTime;if(0!=d){a.c.streamTimeForContentTime(d);var e=a.c.previousCuePointForStreamTime(d);e&&!e.played&&(a.j=d,a.a.currentTime=e.start)}})};function Y(){Dc.call(this);this.a=this.b=null;this.f=new sl;this.c=navigator.language}ra(Y,Dc);q=Y.prototype;q.setLocale=function(a){this.c=a};q.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new L(2,10,1E4);this.b=new tl(a,b,this.c,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.f.a.push(d.loadTime);break;case "ad-started":c.f.c++;break;case "ad-complete":c.f.b++;break;case "ad-skipped":c.f.f++}c.dispatchEvent(d)})};
  q.onAssetUnload=function(){this.b&&this.b.stop();this.dispatchEvent(new O("ad-stopped"));this.f=new sl};q.requestClientSideAds=function(a){if(!this.b)throw new L(1,10,10001);var b=this.b;b.l=Date.now()/1E3;b.g.requestAds(a)};
  q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new L(2,10,10002);this.a=new Al(a,b,this.c,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.f.a.push(d.loadTime);break;case "ad-started":c.f.c++;break;case "ad-complete":c.f.b++;break;case "ad-skipped":c.f.f++}c.dispatchEvent(d)})};
  q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.a)throw new L(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="Shaka Player";a.adTagParameters.mpv="v2.5.20-master-18-g6db55e01";c=this.a;var d=b;c.g?c=Promise.reject(new L(1,10,10004)):(a instanceof
  google.ima.dai.api.LiveStreamRequest&&(c.C=!0),c.g=new Ub,c.c.requestStream(a),c.l=d||"",c.D=Date.now()/1E3,c=c.g);return c};q.replaceServerSideAdTagParameters=function(a){if(!this.a)throw new L(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v2.5.20-master-18-g6db55e01";this.a.c.replaceAdTagParameters(a)};
  q.getStats=function(){var a=this.f;return{loadTimes:a.a,started:a.c,playedCompletely:a.b,skipped:a.f}};q.onDashTimedMetadata=function(a){if(this.a&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.a.c.processMetadata(b,c,a.startTime)}};q.onHlsTimedMetadata=function(a,b){this.a&&this.a.c.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.a)this.a.onCueMetadataChange(a)};K("shaka.ads.AdManager",Y);
  Y.prototype.onCueMetadataChange=Y.prototype.onCueMetadataChange;Y.prototype.onHlsTimedMetadata=Y.prototype.onHlsTimedMetadata;Y.prototype.onDashTimedMetadata=Y.prototype.onDashTimedMetadata;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.replaceServerSideAdTagParameters=Y.prototype.replaceServerSideAdTagParameters;Y.prototype.requestServerSideStream=Y.prototype.requestServerSideStream;Y.prototype.initServerSide=Y.prototype.initServerSide;Y.prototype.requestClientSideAds=Y.prototype.requestClientSideAds;
  Y.prototype.onAssetUnload=Y.prototype.onAssetUnload;Y.prototype.initClientSide=Y.prototype.initClientSide;Y.prototype.setLocale=Y.prototype.setLocale;function xl(a,b){this.start=a;this.end=void 0===b?null:b}Y.ADS_LOADED="ads-loaded";Y.AD_STARTED="ad-started";Y.AD_FIRST_QUARTILE="ad-first-quartile";Y.AD_MIDPOINT="ad-midpoint";Y.AD_THIRD_QUARTILE="ad-third-quartile";Y.AD_COMPLETE="ad-complete";Y.AD_STOPPED="ad-stopped";Y.AD_SKIPPED="ad-skipped";Y.AD_VOLUME_CHANGED="ad-volume-changed";Y.AD_MUTED="ad-muted";
  Y.AD_PAUSED="ad-paused";Y.AD_RESUMED="ad-resumed";Y.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Y.CUEPOINTS_CHANGED="ad-cue-points-changed";Y.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Y.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Y.AD_CLICKED="ad-clicked";Y.AD_PROGRESS="ad-progress";Y.AD_BUFFERING="ad-buffering";Y.AD_IMPRESSION="ad-impression";Y.AD_DURATION_CHANGED="ad-duration-changed";Y.AD_CLOSED="ad-closed";Y.AD_LOADED="ad-loaded";Y.ALL_ADS_COMPLETED="all-ads-completed";
  Y.AD_LINEAR_CHANGED="ad-linear-changed";Y.AD_METADATA="ad-metadata";Y.AD_RECOVERABLE_ERROR="ad-recoverable-error";Y.AD_BREAK_READY="ad-break-ready";Y.AD_INTERACTION="ad-interaction";Jj=function(){return new Y};function Cl(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof O){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=r(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=r(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
  TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=r(ig(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
  function Dl(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=El(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
  function El(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
  var Fl="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Gl="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Hl=["loop","playbackRate"],Il=["pause","play"],Jl={getAssetUri:2,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,getLoadMode:10},Kl={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Ll=[["getConfiguration","configure"]],Ml=[["isTextTrackVisible","setTextTrackVisibility"]],Nl="addTextTrack addTextTrackAsync cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),Ol=["attach",
  "detach","load","unload"];function Pl(a,b,c,d,e,f){var g=this;this.T=a;this.f=new M(b);this.X=c;this.l=!1;this.C=d;this.M=e;this.I=f;this.b=this.h=!1;this.J="";this.j=null;this.v=function(){return Ql(g)};this.A=function(h,k){var l=Dl(k);switch(l.type){case "event":var m=l.targetName;l=l.event;l=new O(l.type,l);g.C(m,l);break;case "update":m=l.update;for(var n in m){l=g.a[n]||{};for(var p in m[n])l[p]=m[n][p]}g.l&&(g.X(),g.l=!1);break;case "asyncComplete":if(n=l.id,l=l.error,p=g.c[n],delete g.c[n],p)if(l){n=new L(l.severity,
  l.category,l.code);for(m in l)n[m]=l[m];p.reject(n)}else p.resolve()}};this.a={video:{},player:{}};this.D=0;this.c={};this.g=null;Rl.add(this)}q=Pl.prototype;q.destroy=function(){Rl["delete"](this);Sl(this);Tl&&Ul(this);this.f&&(this.f.stop(),this.f=null);this.M=this.C=null;this.b=this.h=!1;this.A=this.v=this.g=this.c=this.a=this.j=null;return Promise.resolve()};q.la=function(){return this.b};q.rd=function(){return this.J};
  q.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable&&this.T.length){this.h=!0;this.f.Xb();var a=new chrome.cast.SessionRequest(this.T);a=new chrome.cast.ApiConfig(a,function(b){for(var c=r(Rl),d=c.next();!d.done;d=c.next())Vl(d.value,b)},function(b){for(var c=r(Rl),d=c.next();!d.done;d=c.next())d=d.value,Wl="available"==b,d.f.Xb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Wl&&this.f.S(Xl);(a=Tl)&&a.status!=chrome.cast.SessionStatus.STOPPED?Vl(this,
  a):Tl=null}};q.yd=function(a){this.j=a;this.b&&Yl(this,{type:"appData",appData:this.j})};q.cast=function(a){var b=this;return J(function(c){if(!b.h)throw new L(1,8,8E3);if(!Wl)throw new L(1,8,8001);if(b.b)throw new L(1,8,8002);b.g=new Ub;chrome.cast.requestSession(function(d){return Zl(b,a,d)},function(d){return $l(b,d)});return u(c,b.g,0)})};function am(a){if(a.b){var b=a.I();chrome.cast.requestSession(function(c){return Zl(a,b,c)},function(c){return $l(a,c)})}}
  q.ob=function(){if(this.b){Sl(this);if(Tl){Ul(this);try{Tl.stop(function(){},function(){})}catch(a){}Tl=null}Ql(this)}};
  q.get=function(a,b){var c=this;if("video"==a){if(Il.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.ae.apply(c,[a,b].concat(ja(e)))}}else if("player"==a){if(Kl[b]&&!this.get("player","isLive")())return function(){};if(Nl.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.ae.apply(c,[a,b].concat(ja(e)))};if(Ol.includes(b))return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return c.hf.apply(c,
  [a,b].concat(ja(e)))};if(Jl[b])return function(){return c.a[a][b]}}return this.a[a][b]};q.set=function(a,b,c){this.a[a][b]=c;Yl(this,{type:"set",targetName:a,property:b,value:c})};function Zl(a,b,c){Tl=c;c.addUpdateListener(a.v);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.A);Ql(a);Yl(a,{type:"init",initState:b,appData:a.j});a.g.resolve()}
  function $l(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.g.reject(new L(2,8,c,b))}q.ae=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];Yl(this,{type:"call",targetName:a,methodName:b,args:d})};q.hf=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];e=new Ub;var f=this.D.toString();this.D++;this.c[f]=e;try{Yl(this,{type:"asyncCall",targetName:a,methodName:b,args:d,id:f})}catch(g){e.reject(g)}return e};
  function Vl(a,b){var c=a.I();a.g=new Ub;a.l=!0;Zl(a,c,b)}function Ul(a){var b=Tl;b.removeUpdateListener(a.v);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.A)}function Ql(a){var b=Tl?"connected"==Tl.status:!1;if(a.b&&!b){a.M();for(var c in a.a)a.a[c]={};Sl(a)}a.b=b;a.J=b?Tl.receiver.friendlyName:"";a.f.Xb()}function Sl(a){for(var b in a.c){var c=a.c[b];delete a.c[b];c.reject(new L(1,7,7E3))}}
  function Yl(a,b){var c=Cl(b),d=Tl;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},$a)}catch(e){throw c=new L(2,8,8005,e),d=new O("error",{detail:c}),a.C("player",d),a.ob(),c;}}var Xl=.02,Wl=!1,Tl=null,Rl=new Set;window.__onGCastApiAvailable=function(a){if(a){a=r(Rl);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function bm(a,b,c){Dc.call(this);var d=this;this.f=a;this.c=b;this.b=this.j=this.g=this.l=this.h=null;this.A=c;this.v=new Map;this.a=new Pl(c,function(){return cm(d)},function(){return dm(d)},function(e,f){return em(d,e,f)},function(){return fm(d)},function(){return gm(d)});hm(this)}ra(bm,Dc);q=bm.prototype;
  q.destroy=function(a){a&&this.a.ob();this.b&&(this.b.release(),this.b=null);a=[];this.c&&(a.push(this.c.destroy()),this.c=null);this.a&&(a.push(this.a.destroy()),this.a=null);this.l=this.h=this.f=null;return Promise.all(a)};q.Te=function(){return this.h};q.Me=function(){return this.l};q.se=function(){return this.a.h&&Wl};q.la=function(){return this.a.la()};q.rd=function(){return this.a.rd()};
  q.cast=function(){var a=this,b;return J(function(c){return 1==c.a?(b=gm(a),u(c,a.a.cast(b),2)):a.c?u(c,a.c.Gd(),0):c["return"]()})};q.yd=function(a){this.a.yd(a)};q.vf=function(){am(this.a)};q.ob=function(){this.a.ob()};
  q.ue=function(a){var b=this;return J(function(c){if(1==c.a){if(a==b.A)return c["return"]();b.A=a;b.a.ob();return u(c,b.a.destroy(),2)}b.a=null;b.a=new Pl(a,function(){return cm(b)},function(){return dm(b)},function(d,e){return em(b,d,e)},function(){return fm(b)},function(){return gm(b)});b.a.init();x(c)})};
  function hm(a){a.a.init();a.b=new Zc;for(var b=r(Fl),c=b.next();!c.done;c=b.next())a.b.o(a.f,c.value,function(f){a.a.la()||(f=new O(f.type,f),a.g.dispatchEvent(f))});for(var d in ql)a.b.o(a.c,ql[d],function(f){a.a.la()||a.j.dispatchEvent(f)});a.h={};b={};for(var e in a.f)b.Cb=e,Object.defineProperty(a.h,b.Cb,{configurable:!1,enumerable:!0,get:function(f){return function(){return im(a,f.Cb)}}(b),set:function(f){return function(g){var h=f.Cb;a.a.la()?a.a.set("video",h,g):a.f[h]=g}}(b)}),b={Cb:b.Cb};
  a.l={};jm(a,function(f){Object.defineProperty(a.l,f,{configurable:!1,enumerable:!0,get:function(){return km(a,f)}})});lm(a);a.g=new Dc;a.g.fc=a.h;a.j=new Dc;a.j.fc=a.l}function lm(a){var b=new Map;jm(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.v.set(c,e):a.v.set(e,c)}else b.set(d,c)})}
  function jm(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.c,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=r(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
  function gm(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.c.bd(),startTime:null};a.f.pause();for(var c=r(Hl),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.f[d];a.f.ended||(b.startTime=a.f.currentTime);c=r(Ll);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.c[e[0]]();b.player[d]=e}c=r(Ml);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.c[e[0]](),b.playerAfterLoad[d]=e;return b}function cm(a){var b=new O("caststatuschanged");a.dispatchEvent(b)}
  function dm(a){var b=new O(a.h.paused?"pause":"play");a.g.dispatchEvent(b)}
  function fm(a){for(var b=r(Ll),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.a.get("player",d[0])();a.c[c](d)}var e=a.a.get("player","getAssetUri")();c=a.a.get("video","ended");b=Promise.resolve();var f=a.f.autoplay;d=null;c||(d=a.a.get("video","currentTime"));e&&(a.f.autoplay=!1,b=a.c.load(e,d));var g={};c=r(Hl);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.a.get("video",d);b.then(function(){if(a.f){for(var h=r(Hl),k=h.next();!k.done;k=h.next())k=k.value,a.f[k]=g[k];h=r(Ml);for(k=
  h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.a.get("player",l[0])();a.c[k](l)}a.f.autoplay=f;e&&a.f.play()}},function(h){h=new O(ml,{detail:h});a.c.dispatchEvent(h)})}
  function im(a,b){if("addEventListener"==b)return function(d,e,f){return a.g.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.g.removeEventListener(d,e,f)};if(a.a.la()&&0==Object.keys(a.a.a.video).length){var c=a.f[b];if("function"!=typeof c)return c}return a.a.la()?a.a.get("video",b):(c=a.f[b],"function"==typeof c&&(c=c.bind(a.f)),c)}
  function km(a,b){a.v.has(b)&&(b=a.v.get(b));if("addEventListener"==b)return function(c,d,e){return a.j.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.j.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.h};if("getSharedConfiguration"==b)return a.a.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.c.Mb()};if("getAdManager"==b)return function(){return a.c.Pd()};if("setVideoContainer"==b)return function(c){return a.c.ie(c)};
  if(a.a.la()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.a.la()&&0==Object.keys(a.a.a.video).length&&Jl[b]||!a.a.la()?a.c[b].bind(a.c):a.a.get("player",b)}function em(a,b,c){a.a.la()&&("video"==b?a.g.dispatchEvent(c):"player"==b&&a.j.dispatchEvent(c))}K("shaka.cast.CastProxy",bm);bm.prototype.changeReceiverId=bm.prototype.ue;
  bm.prototype.forceDisconnect=bm.prototype.ob;bm.prototype.suggestDisconnect=bm.prototype.vf;bm.prototype.setAppData=bm.prototype.yd;bm.prototype.cast=bm.prototype.cast;bm.prototype.receiverName=bm.prototype.rd;bm.prototype.isCasting=bm.prototype.la;bm.prototype.canCast=bm.prototype.se;bm.prototype.getPlayer=bm.prototype.Me;bm.prototype.getVideo=bm.prototype.Te;bm.prototype.destroy=bm.prototype.destroy;function mm(a,b,c,d){Dc.call(this);var e=this;this.a=a;this.c=b;this.b=new Zc;this.J={video:a,player:b};this.C=c||function(){};this.M=d||function(f){return f};this.f=null;this.D=!1;this.j=!0;this.h=0;this.A=!1;this.v=!0;this.l=this.g=null;this.I=new M(function(){nm(e)});om(this)}ra(mm,Dc);q=mm.prototype;q.isConnected=function(){return this.D};q.We=function(){return this.j};q.rf=function(a){this.f=a};q.xe=function(){this.f=null};
  q.sf=function(a){this.f||(this.f={metadataType:cast.receiver.media.MetadataType.GENERIC});this.f.title=a};q.qf=function(a){this.f||(this.f={metadataType:cast.receiver.media.MetadataType.GENERIC});this.f.images=[{url:a}]};q.pf=function(a){this.f||(this.f={});this.f.artist=a;this.f.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
  q.destroy=function(){var a=this,b,c;return J(function(d){if(1==d.a)return a.b&&(a.b.release(),a.b=null),b=[],a.c&&(b.push(a.c.destroy()),a.c=null),a.I&&(a.I.stop(),a.I=null),a.a=null,a.J=null,a.C=null,a.D=!1,a.j=!0,a.g=null,a.l=null,u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();x(d)})};
  function om(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return tm(a)};b.onSenderDisconnected=function(){return tm(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&um(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.g);um(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.g)};a.l=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.l.onMessage=function(e){return vm(a,
  e)};a.g=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.g.onMessage=function(e){return wm(a,e)};b.start();b=r(Fl);for(var c=b.next();!c.done;c=b.next())a.b.o(a.a,c.value,function(e){return xm(a,"video",e)});for(var d in ql)a.b.o(a.c,ql[d],function(e){return xm(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.c.Bd(3840,2160):a.c.Bd(1920,1080);a.b.o(a.a,"loadeddata",function(){a.A=!0});a.b.o(a.c,"loading",function(){a.j=
  !1;ym(a)});a.b.o(a.a,"playing",function(){a.j=!1;ym(a)});a.b.o(a.a,"pause",function(){ym(a)});a.b.o(a.c,"unloading",function(){a.j=!0;ym(a)});a.b.o(a.a,"ended",function(){(new M(function(){a.a&&a.a.ended&&(a.j=!0,ym(a))})).S(zm)})}function tm(a){a.h=0;a.v=!0;a.D=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ym(a)}
  function ym(a){var b;J(function(c){if(1==c.a)return u(c,Promise.resolve(),2);if(!a.c)return c["return"]();b=new O("caststatuschanged");a.dispatchEvent(b);Am(a)||Bm(a);x(c)})}
  function Cm(a,b,c){var d,e,f,g,h,k,l,m,n,p;J(function(t){switch(t.a){case 1:for(d in b.player)e=b.player[d],a.c[d](e);a.C(c);f=a.a.autoplay;return b.manifest?(a.a.autoplay=!1,A(t,5),u(t,a.c.load(b.manifest,b.startTime),7)):u(t,Promise.resolve(),3);case 7:wa(t,3);break;case 5:return g=D(t),h=ml,k=new O(h,{detail:g}),a.c.dispatchEvent(k),t["return"]();case 3:if(!a.c)return t["return"]();for(l in b.video)m=b.video[l],a.a[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.c[n](p);a.a.autoplay=f;
  b.manifest&&(a.a.play(),Bm(a));x(t)}})}function xm(a,b,c){a.c&&(nm(a),um(a,{type:"event",targetName:b,event:c},a.g))}
  function nm(a){a.I.S(Dm);for(var b={video:{},player:{}},c=r(Gl),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.a[d];if(a.c.U())for(var e in Kl)0==a.h%Kl[e]&&(b.player[e]=a.c[e]());for(var f in Jl)0==a.h%Jl[f]&&(b.player[f]=a.c[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.A&&(a.h+=1);um(a,{type:"update",update:b},a.g);Am(a)}function Am(a){return a.v&&(a.a.duration||a.c.U())?(Em(a),a.v=!1,!0):!1}
  function Em(a,b){var c={contentId:a.c.bd(),streamType:a.c.U()?"LIVE":"BUFFERED",contentType:""};a.c.U()||(c.duration=a.a.duration);a.f&&(c.metadata=a.f);Bm(a,void 0===b?0:b,c)}
  function wm(a,b){var c=Dl(b.data);switch(c.type){case "init":a.h=0;a.A=!1;a.v=!0;Cm(a,c.initState,c.appData);nm(a);break;case "appData":a.C(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.J[d][e]=c;break;case "call":d=a.J[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
  c.methodName;"player"==d&&"load"==e&&(a.h=0,a.A=!1);var g=c.id,h=b.senderId;f=a.J[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.v=!0}));c.then(function(){return Fm(a,h,g,null)},function(k){return Fm(a,h,g,k)})}}
  function vm(a,b){var c=Dl(b.data);switch(c.type){case "PLAY":a.a.play();Bm(a);break;case "PAUSE":a.a.pause();Bm(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.a.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.a.play(),Bm(a)):e&&"PLAYBACK_PAUSE"==e&&(a.a.pause(),Bm(a));break;case "STOP":a.c.Gd().then(function(){a.c&&Bm(a)});break;case "GET_STATUS":Em(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.a.volume,g=a.a.muted;null!=d&&(a.a.volume=Number(d));
  null!=e&&(a.a.muted=e);f==a.a.volume&&g==a.a.muted||Bm(a);break;case "LOAD":a.h=0;a.A=!1;a.v=!1;d=c.media;e=c.currentTime;f=a.M(d.contentId);g=c.autoplay||!0;a.C(d.customData);g&&(a.a.autoplay=!0);a.c.load(f,e).then(function(){a.c&&Em(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");um(a,{requestId:Number(c.requestId),type:k},a.l)});break;default:um(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.l)}}
  function Fm(a,b,c,d){a.c&&um(a,{type:"asyncComplete",id:c,error:d},a.g,b)}function um(a,b,c,d){a.D&&(a=Cl(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Bm(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.a.playbackRate,playerState:a.j?Gm:a.c.dd()?Hm:a.a.paused?Im:Jm,currentTime:a.a.currentTime,supportedMediaCommands:63,volume:{level:a.a.volume,muted:a.a.muted}};c&&(d.media=c);um(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.l)}
  K("shaka.cast.CastReceiver",mm);mm.prototype.destroy=mm.prototype.destroy;mm.prototype.setContentArtist=mm.prototype.pf;mm.prototype.setContentImage=mm.prototype.qf;mm.prototype.setContentTitle=mm.prototype.sf;mm.prototype.clearContentMetadata=mm.prototype.xe;mm.prototype.setContentMetadata=mm.prototype.rf;mm.prototype.isIdle=mm.prototype.We;mm.prototype.isConnected=mm.prototype.isConnected;var Dm=.5,zm=5,Gm="IDLE",Jm="PLAYING",Hm="BUFFERING",Im="PAUSED";function Km(a){var b=this;this.a=[];this.b=[];this.data=[];(new me).box("moov",qe).P("pssh",function(c){if(!(1<c.version)){var d=qb(c.reader.O,-12,c.size);b.data.push(d);b.a.push(hc(c.reader.Ta(16)));if(0<c.version){d=c.reader.H();d=r(jb(d));for(var e=d.next();!e.done;e=d.next())e=hc(c.reader.Ta(16)),b.b.push(e)}}}).parse(a)}
  function Lm(a){var b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),c=a.length,d=b.length+16+c,e=new Uint8Array(d),f=tb(e),g=0;f.setUint32(g,d);g+=4;f.setUint32(g,1886614376);g+=4;f.setUint32(g,0);g+=4;e.set(b,g);g+=b.length;f.setUint32(g,c);e.set(a,g+4);return e}
  function Mm(a){if(!a)return a;var b=new Km(a);if(1>=b.data.length)return a;a=[];var c={};b=r(b.data);for(var d=b.next();!d.done;c={Zb:c.Zb},d=b.next())c.Zb=d.value,a.some(function(e){return function(f){return ob(f,e.Zb)}}(c))||a.push(c.Zb);return ic.apply(cc,ja(a))};function Nm(a,b){var c=Om(a,b);return 1!=c.length?null:c[0]}function Pm(a,b,c){a=Qm(a,b,c);return 1!=a.length?null:a[0]}function Om(a,b){return Array.from(a.childNodes).filter(function(c){return c instanceof Element&&c.tagName==b})}function Rm(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}function Qm(a,b,c){return Array.from(a.childNodes).filter(function(d){return d instanceof Element&&d.localName==c&&d.namespaceURI==b})}
  function Sm(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Tm(a){return Array.from(a.childNodes).every(Um)?a.textContent.trim():null}function Um(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function Vm(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function Wm(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:Math.floor(a/1E3)}
  function Xm(a){if(!a)return null;a=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}function Ym(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}
  function Zm(a){a=Number(a);return 0===a%1?a:null}function $m(a){a=Number(a);return 0===a%1&&0<a?a:null}function an(a){a=Number(a);return 0===a%1&&0<=a?a:null}function bn(a){a=Number(a);return isNaN(a)?null:a}function cn(a){var b;a=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(a)?null:a}
  function dn(a,b){var c=new DOMParser,d=null,e=null;try{e=c.parseFromString(a,"text/xml")}catch(f){}e&&e.documentElement.tagName==b&&(d=e.documentElement);return d&&0<d.getElementsByTagName("parsererror").length?null:d}function en(a,b){try{var c=Xb(a);return dn(c,b)}catch(d){return null}};function fn(a,b){var c=gn(a),d=null,e=[],f=[],g=new Set(c.map(function(k){return k.keyId}));g["delete"](null);if(1<g.size)throw new L(2,4,4010);b||(f=c.filter(function(k){return"urn:mpeg:dash:mp4protection:2011"==k.de?(d=k.init||d,!1):!0}),f.length&&(e=hn(d,f),0==e.length&&(e=[Sb("",d)])));if(c.length&&(b||!f.length))for(e=[],c=r(jn.values()),f=c.next();!f.done;f=c.next())f=f.value,"org.w3.clearkey"!=f&&e.push(Sb(f,d));if(g=Array.from(g)[0]||null)for(c=r(e),f=c.next();!f.done;f=c.next()){f=r(f.value.initData);
  for(var h=f.next();!h.done;h=f.next())h.value.keyId=g}return{Kd:g,bg:d,drmInfos:e,Od:!0}}function kn(a,b,c){var d=fn(a,c);if(b.Od){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==d.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=d.drmInfos;b.Od=!1}else if(0<d.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(e){return d.drmInfos.some(function(f){return f.keySystem==e.keySystem})}),0==b.drmInfos.length))throw new L(2,4,4008);return d.Kd||b.Kd}
  function ln(a){var b=0,c=tb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+4+2;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=qb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
  function mn(a){a=r(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=r(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}
  function hn(a,b){for(var c=[],d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f=jn.get(e.de);if(f){var g;(g=Pm(e.node,"urn:microsoft:playready","pro"))?(g=fc(g.textContent),g=[{initData:Lm(g),initDataType:"cenc",keyId:e.keyId}]):g=null;g=Sb(f,e.init||a||g);if(f=nn.get(f))g.licenseServerUri=f(e);c.push(g)}}return c}function gn(a){var b=[];a=r(a);for(var c=a.next();!c.done;c=a.next())(c=on(c.value))&&b.push(c);return b}
  function on(a){var b=a.getAttribute("schemeIdUri"),c=Sm(a,"urn:mpeg:cenc:2013","default_KID"),d=Qm(a,"urn:mpeg:cenc:2013","pssh").map(Tm);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new L(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:fc(f),keyId:null}})}catch(f){throw new L(2,4,4007);}return{node:a,de:b,keyId:c,init:0<e.length?e:null}}
  var jn=(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:79f0049a-4098-8642-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime"),nn=(new Map).set("com.widevine.alpha",function(a){return(a=Pm(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||
  "":""}).set("com.microsoft.playready",function(a){a=Pm(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=fc(a.textContent);a=ln(a).filter(function(b){return 1===b.type})[0];if(!a)return"";a=Yb(a.value,!0);return(a=dn(a,"WRMHEADER"))?mn(a):""});function pn(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
  function qn(a,b){var c=rn(a,b,"timescale"),d=1;c&&(d=$m(c)||1);c=rn(a,b,"duration");(c=$m(c||""))&&(c/=d);var e=rn(a,b,"startNumber"),f=Number(rn(a,b,"presentationTimeOffset"))||0,g=an(e||"");if(null==e||null==g)g=1;var h=sn(a,b,"SegmentTimeline");e=null;if(h){e=d;var k=a.N.duration||Infinity,l=Om(h,"S");h=[];var m=-f;l=r(lb(l));for(var n=l.next();!n.done;n=l.next()){n=n.value;var p=n.item,t=n.next,v=Vm(p,"t",an);n=Vm(p,"d",an);var w=Vm(p,"r",Zm);null!=v&&(v-=f);if(!n)break;p=null!=v?v:m;v=w||0;if(0>
  v)if(t){t=Vm(t,"t",an);if(null==t)break;else if(p>=t)break;v=Math.ceil((t-p)/n)-1}else{if(Infinity==k)break;else if(p/e>=k)break;v=Math.ceil((k*e-p)/n)-1}0<h.length&&p!=m&&(h[h.length-1].end=p/e);t=r(jb(v+1));for(v=t.next();!v.done;v=t.next())m=p+n,h.push({start:p/e,end:m/e,Af:p}),p=m}e=h}return{timescale:d,ca:c,Bb:g,Na:f/d||0,Hd:f,timeline:e}}function rn(a,b,c){return[b(a.G),b(a.ea),b(a.ia)].filter(Pb).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
  function sn(a,b,c){return[b(a.G),b(a.ea),b(a.ia)].filter(Pb).map(function(d){return Nm(d,c)}).reduce(function(d,e){return d||e})}
  function tn(a,b,c,d,e,f){for(var g=Sm(a,"http://www.w3.org/1999/xlink","href"),h=Sm(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=r(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return vc(new L(2,4,4028));if("onLoad"!=h)return vc(new L(2,4,4027));var m=Rb([d],[g]);return e.request(0,Qc(m,b)).W(function(n){n=en(n.data,a.tagName);if(!n)return vc(new L(2,4,4001,g));
  for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=r(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return un(a,b,c,m[0],e,f+1)})}
  function un(a,b,c,d,e,f){f=void 0===f?0:f;if(Sm(a,"http://www.w3.org/1999/xlink","href")){var g=tn(a,b,c,d,e,f);c&&(g=g.W(void 0,function(){return un(a,b,c,d,e,f)}));return g}g=[];for(var h=r(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Sm(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(un(k,b,c,d,e,f)));return zc(g).W(function(){return a})};function vn(a,b,c,d,e,f,g){var h,k=(new me).P("sidx",function(l){h=wn(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new L(2,3,3004);}
  function wn(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.H();if(0==k)throw new L(2,3,3005);if(0==g.version){var l=g.reader.H();var m=g.reader.H()}else l=g.reader.cb(),m=g.reader.cb();g.reader.skip(2);var n=g.reader.Ab();a=a+g.size+m;n=r(jb(n));for(m=n.next();!m.done;m=n.next()){var p=g.reader.H();m=(p&2147483648)>>>31;p&=2147483647;var t=g.reader.H();g.reader.skip(4);if(1==m)throw new L(2,3,3006);h.push(new Nh(l/k+c,(l+t)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=t;a+=p}g.parser.stop();
  return h};function xn(a){this.b=tb(a);this.a=new R(this.b,0)}xn.prototype.ga=function(){return this.a.ga()};
  function yn(a){var b=zn(a);if(7<b.length)throw new L(2,3,3002);var c=0;b=r(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=zn(a);a:{d=r(An);for(var e=d.next();!e.done;e=d.next())if(ob(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.b.byteLength-a.a.Z();else{if(8==b.length&&b[1]&224)throw new L(2,3,3001);d=0;e=r(lb(b));for(var f=e.next();!f.done;f=e.next()){f=f.value;var g=f.item;d=0==f.ba?g&(1<<8-b.length)-1:256*d+g}b=d}b=a.a.Z()+b<=a.b.byteLength?b:a.b.byteLength-a.a.Z();d=tb(a.b,
  a.a.Z(),b);a.a.skip(b);return new Bn(c,d)}function zn(a){var b=a.a.Z(),c=a.a.V();if(0==c)throw new L(2,3,3002);c=8-Math.floor(Math.log2(c));a.a.skip(c-1);return qb(a.b,b,c)}var An=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Bn(a,b){this.id=a;this.a=b}
  function Cn(a){if(8<a.a.byteLength)throw new L(2,3,3002);if(8==a.a.byteLength&&a.a.getUint8(0)&224)throw new L(2,3,3001);for(var b=0,c=r(jb(a.a.byteLength)),d=c.next();!d.done;d=c.next())d=a.a.getUint8(d.value),b=256*b+d;return b};function Dn(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new xn(a.a);for(var n=null,p=null;a.ga();){var t=yn(a);if(187==t.id){var v=En(t);v&&(t=c*v.Bf,v=b+v.gf,null!=n&&m.push(new Nh(n+g,t+g,l,p,v-1,f,g,h,k)),n=t,p=v)}}null!=n&&m.push(new Nh(n+g,d+g,l,p,null,f,g,h,k));return m}
  function En(a){var b=new xn(a.a);a=yn(b);if(179!=a.id)throw new L(2,3,3013);a=Cn(a);b=yn(b);if(183!=b.id)throw new L(2,3,3012);b=new xn(b.a);for(var c=0;b.ga();){var d=yn(b);if(241==d.id){c=Cn(d);break}}return{Bf:a,gf:c}};function Fn(a,b){var c=sn(a,b,"Initialization");if(!c)return null;var d=a.G.sa,e=c.getAttribute("sourceURL");e&&(d=Rb(a.G.sa,[e]));e=0;var f=null;if(c=Vm(c,"range",Ym))e=c.start,f=c.end;return new Lh(function(){return d},e,f)}
  function Gn(a,b){var c=Number(rn(a,Hn,"presentationTimeOffset"))||0,d=rn(a,Hn,"timescale"),e=1;d&&(e=$m(d)||1);var f=c/e||0,g=Fn(a,Hn);In(a,g);var h=Fc(a);return{pb:function(){var k=sn(h,Hn,"RepresentationIndex"),l=h.G.sa;k&&(k=k.getAttribute("sourceURL"))&&(l=Rb(h.G.sa,[k]));k=Jn(h);return Kn(h,b,g,l,k.start,k.end,f)}}}
  function Kn(a,b,c,d,e,f,g){var h,k,l,m,n,p,t,v,w,y,z,C,E,B,H;return J(function(I){if(1==I.a)return h=a.presentationTimeline,k=!a.Wa||!a.N.Td,l=a.N.start,m=a.N.duration,n=a.G.mimeType.split("/")[1],p=b,t=null,v=[p(d,e,f),"webm"==n?p(c.a(),c.da,c.Y):null],p=null,u(I,Promise.all(v),2);w=I.b;y=w[0];z=w[1]||null;C=null;E=l-g;B=l;H=m?l+m:Infinity;if("mp4"==n)var F=vn(y,e,d,c,E,B,H);else{F=new xn(z);if(440786851!=yn(F).id)throw new L(2,3,3008);var G=yn(F);if(408125543!=G.id)throw new L(2,3,3009);F=G.a.byteOffset;
  G=new xn(G.a);for(var N=null;G.ga();){var aa=yn(G);if(357149030==aa.id){N=aa;break}}if(!N)throw new L(2,3,3010);N=new xn(N.a);aa=1E6;for(G=null;N.ga();){var ba=yn(N);if(2807729==ba.id)aa=Cn(ba);else if(17545==ba.id)if(4==ba.a.byteLength)G=ba.a.getFloat32(0);else if(8==ba.a.byteLength)G=ba.a.getFloat64(0);else throw new L(2,3,3003);}if(null==G)throw new L(2,3,3011);N=aa/1E9;G*=N;aa=yn(new xn(y));if(475249515!=aa.id)throw new L(2,3,3007);F=Dn(aa,F,N,G,d,c,E,B,H)}C=F;h.xb(C);t=new T(C);k&&t.Ra(B,H);
  return I["return"](t)})}function Hn(a){return a.Ub}function Jn(a){var b=sn(a,Hn,"RepresentationIndex");a=rn(a,Hn,"indexRange");a=Ym(a||"");b&&(a=Vm(b,"range",Ym,a));return a}function In(a,b){Ln(a,b);if(!Jn(a))throw new L(2,4,4002);}function Ln(a,b){var c=a.G.mimeType.split("/")[1];if("text"!=a.G.contentType&&"mp4"!=c&&"webm"!=c)throw new L(2,4,4006);if("webm"==c&&!b)throw new L(2,4,4005);};function Mn(a,b){var c=Fn(a,Nn),d=On(a);if(!d.ca&&!d.timeline&&1<d.ub.length)throw new L(2,4,4002);if(!d.ca&&!a.N.duration&&!d.timeline&&1==d.ub.length)throw new L(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new L(2,4,4002);var e=null,f=null;a.ia.id&&a.G.id&&(f=a.ia.id+","+a.G.id,e=b[f]);c=Pn(a.N.start,a.N.duration,a.G.sa,d,c);e?(e.vb(c),e.Xa(a.presentationTimeline.sb())):(a.presentationTimeline.xb(c),e=new T(c),f&&a.Wa&&(b[f]=e));a.Wa&&a.N.Td||e.Ra(a.N.start,a.N.duration?a.N.start+a.N.duration:
  Infinity);return{pb:function(){return Promise.resolve(e)}}}function Nn(a){return a.Ua}function On(a){var b=Qn(a);a=qn(a,Nn);var c=a.Bb;0==c&&(c=1);var d=0;a.ca?d=a.ca*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ca:a.ca,startTime:d,Bb:c,Na:a.Na,timeline:a.timeline,ub:b}}
  function Pn(a,b,c,d,e){var f=d.ub.length;d.timeline&&d.timeline.length!=d.ub.length&&(f=Math.min(d.timeline.length,d.ub.length));var g=a-d.Na,h=b?a+b:Infinity,k=[],l=d.startTime,m={};f=r(jb(f));for(var n=f.next();!n.done;m={Jc:m.Jc},n=f.next()){n=n.value;var p=d.ub[n];m.Jc=Rb(c,[p.Ze]);var t=void 0;t=null!=d.ca?l+d.ca:d.timeline?d.timeline[n].end:l+b;k.push(new Nh(a+l,a+t,function(v){return function(){return v.Jc}}(m),p.start,p.end,e,g,a,h));l=t}return k}
  function Qn(a){return[a.G.Ua,a.ea.Ua,a.ia.Ua].filter(Pb).map(function(b){return Om(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Rd&&(a.Rd=!0);var c=b.getAttribute("media");b=Vm(b,"mediaRange",Ym,{start:0,end:null});return{Ze:c,start:b.start,end:b.end}})};function Rn(a,b,c,d,e){var f=Sn(a),g=Tn(a);Un(g);var h=Fc(a);if(g.Qb)return Ln(a,f),{pb:function(){var t=pn(g.Qb,h.G.id,null,h.bandwidth||null,null);t=Rb(h.G.sa,[t]);return Kn(h,b,f,t,0,null,g.Na)}};if(g.ca)return d||(a.presentationTimeline.ld(g.ca),a.presentationTimeline.md(a.N.start)),{pb:function(){return Vn(h,g,e,f)}};var k=null;d=null;a.ia.id&&a.G.id&&(d=a.ia.id+","+a.G.id,k=c[d]);var l=Wn(h,g,f),m=a.N.start,n=a.N.duration?a.N.start+a.N.duration:Infinity,p=Infinity!=n;k?(p&&(new T(l)).Ra(m,n),
  k.vb(l),k.Xa(a.presentationTimeline.sb())):(a.presentationTimeline.xb(l),k=new T(l),d&&a.Wa&&(c[d]=k));p&&k.Ra(m,n);return{pb:function(){return Promise.resolve(k)}}}function Xn(a){return a.Vb}function Tn(a){var b=qn(a,Xn),c=rn(a,Xn,"media");a=rn(a,Xn,"index");return{ca:b.ca,timescale:b.timescale,Bb:b.Bb,Na:b.Na,Hd:b.Hd,timeline:b.timeline,kd:c,Qb:a}}
  function Un(a){var b=a.Qb?1:0;b+=a.timeline?1:0;b+=a.ca?1:0;if(0==b)throw new L(2,4,4002);1!=b&&(a.Qb&&(a.timeline=null),a.ca=null);if(!a.Qb&&!a.kd)throw new L(2,4,4002);}
  function Vn(a,b,c,d){function e(I){var F=(I-n)*m,G=F+b.Na;F+=h;return new Nh(F,Math.min(F+m,l),function(){var N=pn(t,w,I,v,G*p);return Rb(y,[N])},0,null,d,z,h,l)}function f(){var I=[Math.max(g.sb(),h),Math.min(g.Sa(),l)].map(function(F){return F-h});return[Math.ceil(I[0]/m),Math.ceil(I[1]/m)-1].map(function(F){return F+n})}var g=a.presentationTimeline,h=a.N.start,k=a.N.duration,l=k?h+k:Infinity,m=b.ca,n=b.Bb,p=b.timescale,t=b.kd,v=a.bandwidth||null,w=a.G.id,y=a.G.sa,z=h-b.Na;k=f();a=a.Wa?Math.max(k[0],
  k[1]-c+1):k[0];c=k[1];k=[];for(var C=a;C<=c;++C){var E=e(C);k.push(E)}var B=new T(k);if(g.Sa()<l){var H=Math.max(a,c+1);B.Ac(m,function(){B.Xa(g.sb());var I=r(f());I.next();I=I.next().value;for(var F=[];H<=I;){var G=e(H);F.push(G);H++}return g.Sa()>=l&&!F.length?null:F})}return Promise.resolve(B)}
  function Wn(a,b,c){var d=a.N.start,e=a.N.duration,f=d-b.Na;e=e?d+e:Infinity;for(var g=[],h={},k=r(lb(b.timeline)),l=k.next();!l.done;h={Ic:h.Ic,Lc:h.Lc,Oc:h.Oc,Fc:h.Fc,Qc:h.Qc,Gc:h.Gc},l=k.next()){l=l.value;var m=l.item,n=m.start,p=m.Af;m=m.end;h.Oc=l.ba+b.Bb;h.Qc=p+b.Hd;h.Lc=a.G.id;h.Fc=a.bandwidth||null;h.Ic=b.kd;h.Gc=a.G.sa;g.push(new Nh(d+n,d+m,function(t){return function(){var v=pn(t.Ic,t.Lc,t.Oc,t.Fc||null,t.Qc);return Rb(t.Gc,[v]).map(function(w){return w.toString()})}}(h),0,null,c,f,d,e))}return g}
  function Sn(a){var b=rn(a,Xn,"initialization");if(!b)return null;var c=a.G.id,d=a.bandwidth||null,e=a.G.sa;return new Lh(function(){var f=pn(b,c,null,d,null);return Rb(e,[f])},0,null)};function Yn(){this.f=[];this.a=[];this.b=[];this.c=[];this.g=new Set}Yn.prototype.release=function(){for(var a=r(this.a.concat(this.b,this.c)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.a=[];this.b=[];this.c=[];this.f=[]};
  function Zn(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,z,C,E,B,H,I,F,G,N,aa,ba,qa,P,Q,X,za;return J(function(xa){switch(xa.a){case 1:d=Tb;$n(b);ao(b);bo(b);if(!c&&1==b.length){e=b[0];a.a=e.kc;a.b=e.Cc;a.c=e.textStreams;xa.m(2);break}f=-1;g=r(lb(b));for(h=g.next();!h.done;h=g.next())l=k=h.value,m=l.ba,n=l.item,a.g.has(n.id)||(a.g.add(n.id),-1==f&&(f=m));if(-1==f)return xa["return"]();p=b.map(function(Na){return Na.kc});t=b.map(function(Na){return Na.Cc});v=b.map(function(Na){return Na.textStreams});w=
  r(v);for(y=w.next();!y.done;y=w.next())z=y.value,z.push(co());return u(xa,eo(a.a,p,f,fo,go),3);case 3:return u(xa,eo(a.b,t,f,fo,go),4);case 4:return u(xa,eo(a.c,v,f,fo,go),2);case 2:C=0;E=[];if(a.b.length&&a.a.length)for(N=r(a.a),aa=N.next();!aa.done;aa=N.next())for(ba=aa.value,qa=r(a.b),P=qa.next();!P.done;P=qa.next())Q=P.value,X=he(ba.drmInfos,Q.drmInfos),ba.drmInfos.length&&Q.drmInfos.length&&!X.length||(za=C++,E.push({id:za,language:ba.language,primary:ba.primary,audio:ba,video:Q,bandwidth:(ba.bandwidth||
  0)+(Q.bandwidth||0),drmInfos:X,allowedByApplication:!0,allowedByKeySystem:!0}));else for(B=a.b.concat(a.a),H=r(B),I=H.next();!I.done;I=H.next())F=I.value,G=C++,E.push({id:G,language:F.language,primary:F.primary,audio:F.type==d.mb?F:null,video:F.type==d.Ha?F:null,bandwidth:F.bandwidth||0,drmInfos:F.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0});a.f=E;x(xa)}})}
  function $n(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.kc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&Ic(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.kc=c}}
  function bo(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&Ic(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
  function ao(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=r(b.Cc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=r(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&Ic(e.roles,h.roles)&&id(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Cc=c}}
  function ho(a){var b,c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,z,C,E,B,H,I;return J(function(F){switch(F.a){case 1:b=Tb;if(1==a.length)return F["return"](a[0]);c=a.map(function(G){return G.filter(function(N){return N.type==b.mb})});d=a.map(function(G){return G.filter(function(N){return N.type==b.Ha})});e=a.map(function(G){return G.filter(function(N){return N.type==b.$})});f=r(e);for(g=f.next();!g.done;g=f.next())h=g.value,h.push({id:0,originalId:"",primary:!1,type:"text",mimeType:"",codecs:"",language:"",label:null,
  width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,closedCaptions:null});return u(F,eo([],c,0,io,jo),2);case 2:return k=F.b,u(F,eo([],d,0,io,jo),3);case 3:return l=F.b,u(F,eo([],e,0,io,jo),4);case 4:m=F.b;n=0;if(l.length&&k.length)for(y=r(k),z=y.next();!z.done;z=y.next())for(C=z.value,E=r(l),B=E.next();!B.done;B=E.next())H=B.value,I=n++,H.variantIds.push(I),C.variantIds.push(I);else for(p=l.concat(k),t=r(p),v=t.next();!v.done;v=
  t.next())w=v.value,w.variantIds=[n++];return F["return"](l.concat(k,m))}})}
  function eo(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v,w,y,z,C,E,B,H,I,F,G,N,aa,ba,qa;return J(function(P){switch(P.a){case 1:f=Tb;g=[];h=r(lb(b));for(k=h.next();!k.done;k=h.next())m=l=k.value,n=m.ba,p=m.item,n>=c?g.push(new Set(p)):g.push(new Set);t=r(a);v=t.next();case 2:if(v.done){P.m(4);break}w=v.value;return u(P,ko(w,b,c,e,g),5);case 5:y=P.b;if(!y)throw new L(2,4,4037);v=t.next();P.m(2);break;case 4:z=r(g),C=z.next();case 6:if(C.done){P.m(8);break}E=C.value;B=r(E);H=B.next();case 9:if(H.done){C=z.next();
  P.m(6);break}I=H.value;return u(P,lo(I,b,d,e,g),12);case 12:(F=P.b)&&a.push(F);H=B.next();P.m(9);break;case 8:G=r(g);for(C=G.next();!C.done;C=G.next())for(N=C.value,aa={},ba=r(N),H=ba.next();!H.done;aa={lb:aa.lb},H=ba.next())if(aa.lb=H.value,aa.lb.type!=f.$||aa.lb.language)if(qa=a.some(function(Q){return function(X){return X.mimeType==Q.lb.mimeType&&md(X.codecs)==md(Q.lb.codecs)}}(aa)))throw new L(2,4,4037);return P["return"](a)}})}
  function ko(a,b,c,d,e){var f;return J(function(g){if(1==g.a)return(f=mo(b,a))?u(g,Promise.all(f.map(function(h){return h.createSegmentIndex()})),2):g["return"](!1);no(a,f,c,d,e);return g["return"](!0)})}function lo(a,b,c,d,e){var f,g;return J(function(h){if(1==h.a)return f=c(a),(g=mo(b,f))?f.createSegmentIndex?u(h,Promise.all(g.map(function(k){return k.createSegmentIndex()})),2):h.m(2):h["return"](null);no(f,g,0,d,e);return h["return"](f)})}
  function no(a,b,c,d,e){b=r(lb(b));for(var f=b.next();!f.done;f=b.next()){var g=f.value;f=g.ba;g=g.item;if(f>=c){d(a,g);var h=!0;"audio"==a.type&&0==Sg(a.language,g.language)&&(h=!1);h&&e[f]["delete"](g)}}}function fo(a){a=Object.assign({},a);a.originalId=null;a.createSegmentIndex=function(){return Promise.resolve()};a.segmentIndex=new li;a.emsgSchemeIdUris=[];a.keyIds=new Set;a.closedCaptions=null;a.trickModeVideo=null;return a}
  function io(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
  function go(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));var c=b.keyIds;c=new Set(ja(a.keyIds).concat(ja(c)));a.keyIds=c;null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");c=he(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new L(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
  (a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}a.segmentIndex.g.push(b.segmentIndex);b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=fo(b.trickModeVideo),a.trickModeVideo.segmentIndex=a.segmentIndex.clone()),go(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&go(a.trickModeVideo,b)}
  function jo(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set(ja(a.keyIds).concat(ja(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ja(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=r(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=r(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
  function mo(a,b){for(var c=[],d=r(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:oo,video:oo,text:po}[f.type],h={audio:qo,video:ro,text:so}[f.type],k=null;e=r(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return null;c.push(f)}return c}function oo(a,b){var c;if(!(c=b.mimeType!=a.mimeType||md(b.codecs)!=md(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<he(c,d).length:1)}return c?!1:!0}
  function po(a,b){return a.language?b.language?0==Sg(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}
  function qo(a,b,c){if(a.id==c.id)return!0;var d=Sg(a.language,b.language),e=Sg(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
  d=to(a.channelsCount,b.channelsCount,c.channelsCount);if(d==uo)return!0;if(d==vo)return!1;d=to(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==uo?!0:d==vo?!1:a.bandwidth&&wo(a.bandwidth,b.bandwidth,c.bandwidth)==uo?!0:!1}
  function ro(a,b,c){if(a.id==c.id)return!0;var d=to(a.width*a.height,b.width*b.height,c.width*c.height);if(d==uo)return!0;if(d==vo)return!1;if(a.frameRate){d=to(a.frameRate,b.frameRate,c.frameRate);if(d==uo)return!0;if(d==vo)return!1}return a.bandwidth&&wo(a.bandwidth,b.bandwidth,c.bandwidth)==uo?!0:!1}
  function so(a,b,c){if(a.id==c.id)return!0;var d=Sg(a.language,b.language),e=Sg(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
  a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function co(){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,closedCaptions:null}}
  function to(a,b,c){if(b==a&&a!=c)return vo;if(c==a&&a!=b)return uo;if(b>a){if(c<=a||c-a<b-a)return uo;if(c-a>b-a)return vo}else{if(c>a)return vo;if(a-c<a-b)return uo;if(a-c>a-b)return vo}return xo}function wo(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?uo:b<a?vo:xo}var uo=1,xo=0,vo=-1;function yo(){var a=this;this.u=this.i=null;this.b=[];this.s=null;this.A=1;this.g={};this.a=new Yn;this.l=0;this.v=new Pa(5);this.j=new M(function(){a.Rb()});this.f=new Kc;this.c=Infinity;this.h=!1}q=yo.prototype;q.configure=function(a){this.i=a};q.start=function(a,b){var c=this,d;return J(function(e){if(1==e.a)return c.h=b.isLowLatencyMode(),c.b=[a],c.u=b,u(e,zo(c),2);d=e.b;c.u&&Ao(c,d);if(!c.u)throw new L(2,7,7001);return e["return"](c.s)})};
  q.stop=function(){for(var a=r(Object.values(this.g)),b=a.next();!b.done;b=a.next())b.value.release();this.a&&this.a.release();this.i=this.u=null;this.b=[];this.s=null;this.g={};this.a=null;null!=this.j&&(this.j.stop(),this.j=null);return this.f.destroy()};q.update=function(){var a=this,b;return J(function(c){if(1==c.a)return A(c,2),u(c,zo(a),4);if(2!=c.a)return wa(c,0);b=D(c);if(!a.u||!b)return c["return"]();a.u.onError(b);x(c)})};q.onExpirationUpdated=function(){};
  function zo(a){var b,c,d,e,f,g,h;return J(function(k){if(1==k.a)return b=Qc(a.b,a.i.retryParameters),c=a.u.networkingEngine,d=Date.now(),e=c.request(0,b),Lc(a.f,e),u(k,e.promise,2);if(3!=k.a){f=k.b;if(!a.u)return k["return"](0);f.uri&&!a.b.includes(f.uri)&&a.b.unshift(f.uri);return u(k,Bo(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;Qa(a.v,1,h);return k["return"](h)})}
  function Bo(a,b,c){var d,e,f,g;return J(function(h){if(1==h.a){d=en(b,"MPD");if(!d)throw new L(2,4,4001,c);e=a.i.dash.xlinkFailGracefully;f=un(d,a.i.retryParameters,e,c,a.u.networkingEngine);Lc(a.f,f);return u(h,f.promise,2)}g=h.b;return h["return"](Co(a,g,c))})}
  function Co(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,z,C,E,B,H,I,F,G,N,aa,ba,qa,P;return J(function(Q){switch(Q.a){case 1:d=[c];e=Om(b,"Location").map(Tm).filter(Pb);0<e.length&&(f=Rb(d,e),d=a.b=f);g=Om(b,"BaseURL");h=g.map(Tm);k=Rb(d,h);l=0;g&&g.length&&(l=Vm(g[0],"availabilityTimeOffset",bn)||0);m=a.i.dash.ignoreMinBufferTime;n=0;m||(n=Vm(b,"minBufferTime",Xm)||0);a.l=Vm(b,"minimumUpdatePeriod",Xm,-1);p=Vm(b,"availabilityStartTime",Wm);t=Vm(b,"timeShiftBufferDepth",Xm);v=a.i.dash.ignoreSuggestedPresentationDelay;
  w=null;v||(w=Vm(b,"suggestedPresentationDelay",Xm));y=a.i.dash.ignoreMaxSegmentDuration;z=null;y||(z=Vm(b,"maxSegmentDuration",Xm));C=b.getAttribute("type")||"static";a.s?E=a.s.presentationTimeline:(B=a.i.defaultPresentationDelay||1.5*n,H=null!=w?w:B,E=new S(p,H,a.i.dash.autoCorrectDrift));I={Wa:"static"!=C,presentationTimeline:E,ia:null,N:null,ea:null,G:null,bandwidth:0,Rd:!1,nb:l};var X=Vm(b,"mediaPresentationDuration",Xm),za=[],xa=0,Na=Om(b,"Period");Na=r(lb(Na));for(var Xa=Na.next();!Xa.done;Xa=
  Na.next()){var gb=Xa.value;Xa=gb.item;gb=gb.next;xa=Vm(Xa,"start",Xm,xa);var Qd=Vm(Xa,"duration",Xm),mb=null;if(gb){var Rd=Vm(gb,"start",Xm);null!=Rd&&(mb=Rd-xa)}else null!=X&&(mb=X-xa);null==mb&&(mb=Qd);Xa=Do(a,I,k,{start:xa,duration:mb,node:Xa,Td:null==mb||!gb});za.push(Xa);if(null==mb){xa=null;break}xa+=mb}F=null!=X?{periods:za,duration:X,Md:!1}:{periods:za,duration:xa,Md:!0};G=F.duration;N=F.periods;E.Wb("static"==C);"static"!=C&&F.Md||E.Ea(G||Infinity);a.c&&!a.h&&(aa=a.u.isAutoLowLatencyMode())&&
  (a.u.enableLowLatencyMode(),a.h=a.u.isLowLatencyMode());a.h?E.fe(a.c):a.c&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");(ba=E.U())&&!isNaN(a.i.availabilityWindowOverride)&&(t=a.i.availabilityWindowOverride);null==t&&(t=Infinity);E.Dd(t);E.ld(z||1);return u(Q,Zn(a.a,N,I.Wa),2);case 2:if(a.s){a.s.variants=a.a.f;a.s.textStreams=a.a.c;Q.m(3);break}a.s=
  {presentationTimeline:E,variants:a.a.f,textStreams:a.a.c,offlineSessionIds:[],minBufferTime:n||0};if(!E.ke()){Q.m(3);break}qa=Om(b,"UTCTiming");return u(Q,Eo(a,k,qa),5);case 5:P=Q.b;if(!a.u)return Q["return"]();E.ge(P);case 3:return a.u.makeTextStreamsForClosedCaptions(a.s),u(Q,a.u.filter(a.s),0)}})}
  function Do(a,b,c,d){b.ia=Fo(d.node,null,c);b.N=d;b.ia.nb=b.nb;b.ia.id||(b.ia.id="__shaka_period_"+d.start);c=Om(d.node,"EventStream");c=r(c);for(var e=c.next();!e.done;e=c.next())Go(a,d.start,d.duration,e.value);c=Om(d.node,"AdaptationSet").map(function(m){return Ho(a,b,m)}).filter(Pb);if(b.Wa){d=[];e=r(c);for(var f=e.next();!f.done;f=e.next()){f=r(f.value.kf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new L(2,4,4018);}d=c.filter(function(m){return!m.Fd});
  c=c.filter(function(m){return m.Fd});c=r(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.Fd.split(" ");g=r(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=r(k.streams);for(var l=k.next();!l.done;h={cc:h.cc},l=k.next())h.cc=l.value,h.cc.trickModeVideo=e.streams.find(function(m){return function(n){return md(m.cc.codecs)==md(n.codecs)}}(h))}}}e=a.i.disableAudio?[]:Io(d,"audio");f=a.i.disableVideo?[]:Io(d,"video");c=a.i.disableText?[]:Io(d,"text");if(!f.length&&
  !e.length)throw new L(2,4,4004);d=[];e=r(e);for(g=e.next();!g.done;g=e.next())d.push.apply(d,ja(g.value.streams));e=[];f=r(f);for(g=f.next();!g.done;g=f.next())e.push.apply(e,ja(g.value.streams));f=[];c=r(c);for(g=c.next();!g.done;g=c.next())f.push.apply(f,ja(g.value.streams));return{id:b.ia.id,kc:d,Cc:e,textStreams:f}}function Io(a,b){return a.filter(function(c){return c.contentType==b})}
  function Ho(a,b,c){b.ea=Fo(c,b.ia,null);if("image"==b.ea.contentType)return null;var d=!1,e=Om(c,"Role"),f=e.map(function(B){return B.getAttribute("value")}).filter(Pb),g=void 0,h="text"==b.ea.contentType;h&&(g="subtitle");e=r(e);for(var k=e.next();!k.done;k=e.next()){k=k.value;var l=k.getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(k=k.getAttribute("value"),k){case "main":d=!0;break;case "caption":case "subtitle":g=k}}l=Om(c,"EssentialProperty");e=null;k=!1;l=r(l);for(var m=
  l.next();!m.done;m=l.next())m=m.value,"http://dashif.org/guidelines/trickmode"==m.getAttribute("schemeIdUri")?e=m.getAttribute("value"):k=!0;l=Om(c,"Accessibility");var n=new Map;l=r(l);for(m=l.next();!m.done;m=l.next()){var p=m.value;m=p.getAttribute("schemeIdUri");p=p.getAttribute("value");if("urn:scte:dash:cc:cea-608:2015"==m)if(m=1,null!=p){p=p.split(";");for(var t=r(p),v=t.next();!v.done;v=t.next()){var w=v.value,y=v=void 0;w.includes("=")?(w=w.split("="),v=w[0].startsWith("CC")?w[0]:"CC"+w[0],
  y=w[1]):(v="CC"+m,2==p.length?m+=2:m++,y=w);n.set(v,Og(y))}}else n.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==m)if(m=1,null!=p)for(p=r(p.split(";")),v=p.next();!v.done;v=p.next())v=v.value,w=t=void 0,v.includes("=")?(v=v.split("="),t="svc"+v[0],w=v[1].split(",")[0].split(":").pop()):(t="svc"+m,m++,w=v),n.set(t,Og(w));else n.set("svc1","und");else"urn:mpeg:dash:role:2011"==m&&null!=p&&(f.push(p),"captions"==p&&(g="caption"))}if(k)return null;k=Om(c,"ContentProtection");var z=fn(k,a.i.dash.ignoreDrmInfo),
  C=Og(c.getAttribute("lang")||"und"),E=c.getAttribute("label");(k=Om(c,"Label"))&&k.length&&(k=k[0],k.textContent&&(E=k.textContent));k=Om(c,"Representation");c=k.map(function(B){return Jo(a,b,z,g,C,E,d,f,n,B)}).filter(function(B){return!!B});if(0==c.length){if(a.i.dash.ignoreEmptyAdaptationSet||h)return null;throw new L(2,4,4003);}if(!b.ea.contentType||"application"==b.ea.contentType)for(b.ea.contentType=Ko(c[0].mimeType,c[0].codecs),h=r(c),l=h.next();!l.done;l=h.next())l.value.type=b.ea.contentType;
  h=r(c);for(l=h.next();!l.done;l=h.next())for(l=l.value,m=r(z.drmInfos),p=m.next();!p.done;p=m.next())p=p.value,p.keyIds=p.keyIds&&l.keyIds?new Set(ja(p.keyIds).concat(ja(l.keyIds))):p.keyIds||l.keyIds;h=k.map(function(B){return B.getAttribute("id")}).filter(Pb);return{id:b.ea.id||"__fake__"+a.A++,contentType:b.ea.contentType,language:C,cg:d,streams:c,drmInfos:z.drmInfos,Fd:e,kf:h}}
  function Jo(a,b,c,d,e,f,g,h,k,l){b.G=Fo(l,b.ea,null);a.c=Math.min(a.c,b.G.nb);if(!Lo(b.G))return null;var m=b.N.start;b.bandwidth=Vm(l,"bandwidth",$m)||0;var n=b.G.contentType;n="text"==n||"application"==n;try{var p=function(z,C,E){return Mo(a,z,C,E)};if(b.G.Ub)var t=Gn(b,p);else if(b.G.Ua)t=Mn(b,a.g);else if(b.G.Vb)t=Rn(b,p,a.g,!!a.s,a.i.dash.initialSegmentLimit);else{var v=b.G.sa,w=b.N.duration||0;t={pb:function(){return Promise.resolve(ki(m,w,v))}}}}catch(z){if(n&&4002==z.code)return null;throw z;
  }p=Om(l,"ContentProtection");p=kn(p,c,a.i.dash.ignoreDrmInfo);p=new Set(p?[p]:[]);Om(l,"SupplementalProperty").some(function(z){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==z.getAttribute("schemeIdUri")&&"JOC"==z.getAttribute("value")})&&(b.G.mimeType="audio/eac3-joc");l=!1;n&&(l=h.includes("forced_subtitle"));var y={id:a.A++,originalId:b.G.id,createSegmentIndex:function(){var z;return J(function(C){if(1==C.a){if(y.segmentIndex)return C.m(0);z=y;return u(C,t.pb(),3)}z.segmentIndex=C.b;
  x(C)})},segmentIndex:null,mimeType:b.G.mimeType,codecs:b.G.codecs,frameRate:b.G.frameRate,pixelAspectRatio:b.G.pixelAspectRatio,bandwidth:b.bandwidth,width:b.G.width,height:b.G.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:p,language:e,label:f,type:b.ea.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.G.emsgSchemeIdUris,roles:h,forced:l,channelsCount:b.G.nd,audioSamplingRate:b.G.audioSamplingRate,closedCaptions:k};return y}
  q.Rb=function(){var a=this,b,c;return J(function(d){switch(d.a){case 1:return b=0,A(d,2),u(d,zo(a),4);case 4:b=d.b;wa(d,3);break;case 2:c=D(d),a.u&&(c.severity=1,a.u.onError(c));case 3:if(!a.u)return d["return"]();Ao(a,b);x(d)}})};function Ao(a,b){0>a.l||a.j.S(Math.max(3,a.l-b,Ra(a.v)))}
  function Fo(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,nd:null,audioSamplingRate:null,nb:0};c=c||b.sa;var d=Om(a,"BaseURL"),e=d.map(Tm),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Vm(a,"frameRate",cn)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Om(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=r(m);for(var p=m.next();!p.done;p=
  m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Om(a,"AudioChannelConfiguration");m=No(m)||b.nd;p=Vm(a,"audioSamplingRate",an)||b.audioSamplingRate;f||(f=Ko(g,h));var t=Nm(a,"SegmentBase"),v=Nm(a,"SegmentTemplate"),w=t?Vm(t,"availabilityTimeOffset",bn)||0:0,y=v?Vm(v,"availabilityTimeOffset",bn)||0:0;d=d&&d.length?Vm(d[0],"availabilityTimeOffset",bn)||0:0;d=b.nb+d+w+y;return{sa:Rb(c,e),Ub:t||b.Ub,Ua:Nm(a,"SegmentList")||b.Ua,Vb:v||b.Vb,width:Vm(a,"width",an)||b.width,height:Vm(a,
  "height",an)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),nd:m,audioSamplingRate:p,nb:d}}
  function No(a){a=r(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
  parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function Lo(a){var b=a.Ub?1:0;b+=a.Ua?1:0;b+=a.Vb?1:0;if(0==b)return"text"==a.contentType||"application"==a.contentType?!0:!1;1!=b&&(a.Ub&&(a.Ua=null),a.Vb=null);return!0}
  function Oo(a,b,c,d){var e,f,g,h,k,l;return J(function(m){if(1==m.a)return e=Rb(b,[c]),f=Qc(e,a.i.retryParameters),f.method=d,g=a.u.networkingEngine.request(4,f),Lc(a.f,g),u(m,g.promise,2);h=m.b;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Xb(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
  function Eo(a,b,c){var d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.getAttribute("value")}}),e=a.i.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=r(d),g=f.next();case 2:if(g.done){n.m(4);break}h=g.value;A(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.m(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.m(8);
  case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}n.m(9);break;case 7:return u(n,Oo(a,b,l,"HEAD"),10);case 10:return n["return"](n.b);case 8:return u(n,Oo(a,b,l,"GET"),11);case 11:return n["return"](n.b);
  case 9:wa(n,3);break;case 5:D(n);case 3:g=f.next();n.m(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n["return"](0)}})}
  function Go(a,b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=Vm(d,"timescale",an)||1;d=r(Om(d,"Event"));for(var h=d.next();!h.done;h=d.next()){h=h.value;var k=Vm(h,"presentationTime",an)||0,l=Vm(h,"duration",an)||0;k=k/g+b;l=k+l/g;null!=c&&(k=Math.min(k,b+c),l=Math.min(l,b+c));h={schemeIdUri:e,value:f,startTime:k,endTime:l,id:h.getAttribute("id")||"",eventElement:h};a.u.onTimelineRegionAdded(h)}}
  function Mo(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.a)return e=Wc,f=xi(b,c,d,a.i.retryParameters),g=a.u.networkingEngine,h=g.request(e,f),Lc(a.f,h),u(l,h.promise,2);k=l.b;return l["return"](k.data)})}function Ko(a,b){return lg(jd(a,b))?"text":a.split("/")[0]}K("shaka.dash.DashParser",yo);Jh.mpd=function(){return new yo};Hh["application/dash+xml"]=function(){return new yo};Hh["video/vnd.mpeg.dash.mpd"]=function(){return new yo};function Po(a,b,c,d){this.a=a;this.type=b;this.R=c;this.segments=d||null}function Qo(a,b,c,d){this.id=a;this.name=b;this.a=c;this.value=void 0===d?null:d}Qo.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.a?this.a.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
  Qo.prototype.getAttribute=function(a){var b=this.a.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function Ro(a,b){var c=a.getAttribute(b);if(!c)throw new L(2,4,4023,b);return c.value}function So(a,b,c){c=void 0===c?[]:c;this.R=b;this.a=a;this.b=c}function To(a,b){this.name=a;this.value=b};function Uo(a,b){return a.filter(function(c){return c.name==b})}function Vo(a,b){return a.filter(function(c){return Ro(c,"TYPE")==b})}function Wo(a,b){var c=Uo(a,b);return c.length?c[0]:null}function Xo(a,b,c){c=void 0===c?0:c;return(a=Wo(a,b))?Number(a.value):c};function Yo(a){this.b=a;this.a=0}function Zo(a){$o(a,/[ \t]+/gm)}function $o(a,b){b.lastIndex=a.a;var c=b.exec(a.b);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.a==a.b.length||null==c||c.position!=a.a)return null;a.a+=c.length;return c.results}function ap(a){return a.a==a.b.length?null:(a=$o(a,/[^ \t\n]*/gm))?a[0]:null};function bp(){this.a=0}
  function cp(a,b,c){b=Xb(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new L(2,4,4015);b=0;for(var e=!0,f=r(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=dp(a.a++,g),--a.a,ep.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;g=r(lb(d));for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=k.ba;var l=k.item;k=k.next;if(/^#(?!EXT)/m.test(l)||e)e=!1;else{l=dp(a.a++,
  l);if(fp.includes(l.name)){if(1!=b)throw new L(2,4,4017);k=d.splice(h,d.length-h);d=c;e=[];g=[];h=[];l=null;k=r(k);for(var m=k.next();!m.done;m=k.next())m=m.value,/^(#EXT)/.test(m)?(m=dp(a.a++,m),ep.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?l=m:"EXT-X-PART"==m.name?h.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?h.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",l=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=Rb([d],[m.trim()])[0],l&&g.push(l),e.push(new So(m,g,h)),g=[],h=[]);h.length&&(l&&
  g.push(l),e.push(new So("",g,h)));return new Po(c,b,f,e)}f.push(l);"EXT-X-STREAM-INF"==l.name&&(l.a.push(new To("URI",k)),e=!0)}}return new Po(c,b,f)}function dp(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new L(2,4,4016,b);var d=c[1],e=c[2];c=[];var f;if(e){e=new Yo(e);var g;(g=$o(e,/^([^,=]+)(?:,|$)/g))&&(f=g[1]);for(var h=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;g=$o(e,h);)c.push(new To(g[1],g[2]||g[3]))}return new Qo(a,d,c,f)}
  var ep="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),fp="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function gp(){}function hp(a){try{var b=ip(a);return xc({uri:a,Zd:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return vc(c)}}function ip(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new L(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new L(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=fc(a):e=ac(a);return{data:e,contentType:c}}
  K("shaka.net.DataUriPlugin",gp);gp.parse=hp;Nc("data",hp);function jp(){var a=this;this.i=this.u=null;this.Va=1;this.l=new Map;this.h=new Map;this.za=new Set;this.a=new Map;this.b=null;this.I="";this.T=new bp;this.ya=0;this.j=new M(function(){a.Rb()});this.f=kp;this.s=null;this.ha=0;this.v=Infinity;this.M=this.Qa=0;this.A=new Kc;this.xa=[];this.D=new Map;this.Pa=!1;this.g=new Map;this.J=null;this.X=new Map;this.C=new Map;this.c=!1}q=jp.prototype;q.configure=function(a){this.i=a};
  q.start=function(a,b){var c=this,d,e;return J(function(f){if(1==f.a)return c.u=b,c.c=b.isLowLatencyMode(),u(f,lp(c,Qc([a],c.i.retryParameters),0),2);if(3!=f.a)return d=f.b,c.I=d.uri,u(f,mp(c,d.data),3);e=c.ya;0<e&&c.j.S(e);return f["return"](c.s)})};q.stop=function(){this.j&&(this.j.stop(),this.j=null);var a=[];this.A&&(a.push(this.A.destroy()),this.A=null);this.i=this.u=null;this.za.clear();this.s=null;this.a.clear();this.h.clear();this.g.clear();this.l.clear();return Promise.all(a)};
  q.update=function(){var a=this,b,c,d;return J(function(e){if(1==e.a){if(a.f==kp)return e["return"]();b=[];a.J=null;c=Array.from(a.a.values());return c.length?u(e,np(a,c[0]),2):e.m(2)}for(d=1;d<c.length;d++)b.push(np(a,c[d]));return u(e,Promise.all(b),0)})};
  function np(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return J(function(w){if(1==w.a)return c=op,d=b.pe,e=new vb(d),a.c&&yb(e,new Ab("_HLS_skip=YES")),u(w,lp(a,Qc([e.toString()],a.i.retryParameters),0),2);if(3!=w.a){f=w.b;g=cp(a.T,f.data,f.uri);if(1!=g.type)throw new L(2,4,4017);h=Uo(g.R,"EXT-X-DEFINE");k=pp(a,h);l=b.stream;return u(w,qp(a,b.Bc,g,l.mimeType,b.jd,k),3)}m=w.b;l.segmentIndex.vb(m);m.length&&(n=Xo(g.R,"EXT-X-MEDIA-SEQUENCE",0),p=b.jd.get(n),l.segmentIndex.Xa(p));t=m[m.length-1];if(v=Wo(g.R,
  "EXT-X-ENDLIST"))rp(a,c.ne),a.b.Ea(t.endTime);x(w)})}q.onExpirationUpdated=function(){};
  function mp(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v,w,y,z,C,E,B,H,I,F,G,N,aa;return J(function(ba){switch(ba.a){case 1:c=cp(a.T,b,a.I);if(0!=c.type)throw new L(2,4,4022);d=Uo(c.R,"EXT-X-DEFINE");for(var qa=r(d),P=qa.next();!P.done;P=qa.next()){var Q=P.value;P=Z(Q,"NAME");Q=Z(Q,"VALUE");P&&Q&&(a.l.has(P)||a.l.set(P,Q))}e=Uo(c.R,"EXT-X-MEDIA");f=Uo(c.R,"EXT-X-STREAM-INF");qa=r(f);for(P=qa.next();!P.done;P=qa.next()){var X=P.value;Q=Z(X,"AUDIO");P=Z(X,"VIDEO");var za=Z(X,"SUBTITLES");X=sp(a,X);if(za){var xa=
  tp("text",X);a.g.set(za,xa);Hc(X,xa)}Q&&(za=up("audio",X),a.g.set(Q,za));P&&(Q=up("video",X),a.g.set(P,Q))}g=Uo(c.R,"EXT-X-SESSION-DATA");h=r(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Z(l,"DATA-ID"),n=Z(l,"URI"),p=Z(l,"LANGUAGE"),t=Z(l,"VALUE"),v={id:m},n&&(v.uri=Rb([a.I],[n])[0]),p&&(v.language=p),t&&(v.value=t),w=new O("sessiondata",v),a.u)a.u.onEvent(w);return u(ba,vp(a,e),2);case 2:qa=Vo(e,"CLOSED-CAPTIONS");qa=r(qa);for(P=qa.next();!P.done;P=qa.next())za=P.value,P=wp(za),Q=Ro(za,"GROUP-ID"),
  za=Ro(za,"INSTREAM-ID"),a.D.get(Q)||a.D.set(Q,new Map),a.D.get(Q).set(za,P);return u(ba,xp(a,f),3);case 3:return y=ba.b,u(ba,yp(a,e),4);case 4:z=ba.b;if(!a.u)throw new L(2,7,7001);if(a.Pa&&0==y.length)throw new L(2,4,4034);E=C=Infinity;B=r(a.a.values());for(H=B.next();!H.done;H=B.next())I=H.value,C=Math.min(C,I.Ud),"text"!=I.stream.type&&(E=Math.min(E,I.Ye-I.Ud));a.f!=kp?(a.b=new S(0,a.i.defaultPresentationDelay?a.i.defaultPresentationDelay:a.M?a.M:3*a.ha),a.b.Wb(!1)):(a.b=new S(null,0),a.b.Wb(!0));
  zp(a);if(a.f!=kp)a.ya=a.v,F=op,a.f==F.me&&(G=a.b.xc,isNaN(a.i.availabilityWindowOverride)||(G=a.i.availabilityWindowOverride),a.b.Dd(G));else for(a.b.Ea(E),a.b.offset(-C),N=r(a.a.values()),H=N.next();!H.done;H=N.next())aa=H.value,aa.stream.segmentIndex.offset(-C),aa.stream.segmentIndex.Ra(0,E);a.s={presentationTimeline:a.b,variants:y,textStreams:z,offlineSessionIds:[],minBufferTime:0};a.u.makeTextStreamsForClosedCaptions(a.s);return u(ba,a.u.filter(a.s),0)}})}
  function pp(a,b){for(var c=new Map,d=r(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.l.get(f))&&c.set(f,e)}return c}
  function yp(a,b){var c,d,e,f,g,h,k,l,m,n,p,t;return J(function(v){if(1==v.a)return c=Vo(b,"SUBTITLES"),d=c.map(function(w){var y,z,C;return J(function(E){if(1==E.a){if(y=a.i.disableText)return E["return"](null);A(E,2);return u(E,Ap(a,w),4)}if(2!=E.a)return z=E.b,E["return"](z.stream);C=D(E);if(a.i.hls.ignoreTextStreamFailures)return E["return"](null);throw C;})}),u(v,Promise.all(d),2);e=v.b;f=r(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=Ro(h,"GROUP-ID"),l=a.g.get(k))if(m=a.h.get(k))for(n=
  r(m),p=n.next();!p.done;p=n.next())t=p.value,t.stream.codecs=l;return v["return"](e.filter(function(w){return w}))})}function vp(a,b){var c;return J(function(d){if(1==d.a)return b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f}),b.length?u(d,Ap(a,b[0]),2):d.m(2);c=b.slice(1).map(function(e){return Ap(a,e)});return u(d,Promise.all(c),0)})}
  function xp(a,b){var c,d,e;return J(function(f){if(1==f.a)return c=b.map(function(g){var h,k,l,m,n,p,t,v;return J(function(w){return 1==w.a?(h=Z(g,"FRAME-RATE"),k=Number(Ro(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=r(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,t=Z(g,"VIDEO-RANGE"),u(w,Bp(a,g,l,h),2)):(v=w.b)?w["return"](Cp(a,v.audio,v.video,k,n,p,h,t)):w["return"]([])})}),u(f,Promise.all(c),2);d=f.b;e=d.reduce(Nb,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
  function Bp(a,b,c,d){var e,f,g,h,k,l,m,n,p,t,v,w,y,z;return J(function(C){if(1==C.a)return e=Tb,f=sp(a,b),g=Z(b,"AUDIO"),h=Z(b,"VIDEO"),l=(k=g||h)&&a.h.has(k)?a.h.get(k):[],m={audio:g?l:[],video:h?l:[]},p=!1,t=Ro(b,"URI"),v=m.audio.find(function(E){return E&&E.Bc==t}),w=tp(e.Ha,f),y=c||d||w,1!=f.length||y?!l.length&&1<f.length?(n=e.Ha,f=[f.join(",")]):m.audio.length&&v?(n=e.mb,p=!0):n=m.video.length?e.mb:e.Ha:n=e.mb,p?C.m(2):u(C,Dp(a,b,f,n),3);2!=C.a&&(z=C.b);if(z)m[z.stream.type]=[z];else if(null===
  z)return C["return"](null);Ep(m);return C["return"](m)})}function sp(a,b){var c=[];a.i.disableVideo||c.push("avc1.42E01E");a.i.disableAudio||c.push("mp4a.40.2");var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=r(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=md(f);c.has(g)||(e.push(f),c.add(g))}return e}function wp(a){a=Z(a,"LANGUAGE")||"und";return Og(a)}
  function Ep(a){a=r(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}
  function Cp(a,b,c,d,e,f,g,h){for(var k=r(c),l=k.next();!l.done;l=k.next()){l=l.value.stream;var m=f,n=g,p=h;l&&(l.width=Number(e)||void 0,l.height=Number(m)||void 0,l.frameRate=Number(n)||void 0,l.hdr=p||void 0)}e=a.i.disableAudio;if(!b.length||e)b=[null];e=a.i.disableVideo;if(!c.length||e)c=[null];e=[];b=r(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=r(c),h=g.next();!h.done;h=g.next())n=h.value,h=f?f.stream:null,k=n?n.stream:null,l=f?f.stream.drmInfos:null,m=n?n.stream.drmInfos:null,n=(n?
  n.Bc:"")+" - "+(f?f.Bc:""),h&&k&&!(l.length&&m.length?0<he(l,m).length:1)||a.za.has(n)||(h={id:a.Va++,language:h?h.language:"und",primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0},e.push(h),a.za.add(n));return e}
  function Ap(a,b){var c,d,e,f,g,h,k,l,m,n,p,t,v;return J(function(w){if(1==w.a){c=Ro(b,"GROUP-ID");d="";var y=Ro(b,"TYPE").toLowerCase();"subtitles"==y&&(y="text");e=y;"text"!=e&&c&&a.g.has(c)&&(d=a.g.get(c));f=Fp(Ro(b,"URI"),a.l);if(a.a.has(f))return w["return"](a.a.get(f));g=wp(b);h=Z(b,"NAME");k=b.getAttribute("DEFAULT");l="YES"==k;y="audio"==e?(y=Z(b,"CHANNELS"))?parseInt(y.split("/")[0],10):null:null;m=y;n=Z(b,"CHARACTERISTICS");p=Z(b,"FORCED");t="YES"==p;return u(w,Gp(a,f,d,e,g,l,h,m,null,n,
  t),2)}v=w.b;a.h.has(c)?a.h.get(c).push(v):a.h.set(c,[v]);if(null==v)return w["return"](null);if(a.a.has(f))return w["return"](a.a.get(f));a.a.set(f,v);return w["return"](v)})}
  function Dp(a,b,c,d){var e,f,g,h;return J(function(k){if(1==k.a){e=Fp(Ro(b,"URI"),a.l);if(a.a.has(e))return k["return"](a.a.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.D.get(l):null;g=up(d,c);return u(k,Gp(a,e,g,d,"und",!1,null,null,f,null,!1),2)}h=k.b;if(null==h)return k["return"](null);if(a.a.has(e))return k["return"](a.a.get(e));a.a.set(e,h);return k["return"](h)})}
  function Gp(a,b,c,d,e,f,g,h,k,l,m){var n,p,t,v,w,y,z,C,E,B,H,I,F,G,N,aa,ba,qa,P,Q,X,za,xa,Na,Xa,gb,Qd,mb,Rd,pm,qm,uh,vh,df,rm,sm;return J(function(Za){switch(Za.a){case 1:return n=Rb([a.I],[b])[0],u(Za,lp(a,Qc([n],a.i.retryParameters),0),2);case 2:p=Za.b;n=p.uri;t=cp(a.T,p.data,n);if(1!=t.type)throw new L(2,4,4017);v=[];if(t.segments)for(w=r(t.segments),y=w.next();!y.done;y=w.next())z=y.value,C=Uo(z.R,"EXT-X-KEY"),v.push.apply(v,ja(C));E=!1;B=[];H=new Set;I=r(v);for(F=I.next();!F.done;F=I.next())if(G=
  F.value,N=Ro(G,"METHOD"),"NONE"!=N){E=!0;if("AES-128"==N)return a.Pa=!0,Za["return"](null);aa=Ro(G,"KEYFORMAT");if(qa=(ba=Hp[aa])?ba(G):null){if(qa.keyIds)for(P=r(qa.keyIds),Q=P.next();!Q.done;Q=P.next())X=Q.value,H.add(X);B.push(qa)}}if(E&&!B.length)throw new L(2,4,4026);za=Uo(t.R,"EXT-X-DEFINE");xa=pp(a,za);Ip(a,t);return u(Za,Jp(a,d,c,t,xa),3);case 3:return Na=Za.b,Kp.includes(Na)&&(c=""),Xa=new Map,A(Za,4),u(Za,qp(a,b,t,Na,Xa,xa),6);case 6:gb=Za.b;wa(Za,5);break;case 4:Qd=D(Za);if(4035==Qd.code)return Va("Skipping unsupported HLS stream",
  Na,b),Za["return"](null);throw Qd;case 5:mb=gb[0].startTime;Rd=gb[gb.length-1].endTime;pm=new T(gb);qm="text"==d?"subtitle":void 0;uh=[];if(l)for(vh=r(l.split(",")),df=vh.next();!df.done;df=vh.next())rm=df.value,uh.push(rm);sm={id:a.Va++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:pm,mimeType:Na,codecs:c,kind:qm,encrypted:E,drmInfos:B,keyIds:H,language:e,label:g,type:d,primary:f,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,
  width:void 0,height:void 0,bandwidth:void 0,roles:uh,forced:m,channelsCount:h,audioSamplingRate:null,closedCaptions:k,hdr:void 0};return Za["return"]({stream:sm,Bc:b,pe:n,Ud:mb,Ye:Rd,jd:Xa})}})}
  function Ip(a,b){var c=Wo(b.R,"EXT-X-PLAYLIST-TYPE"),d=Wo(b.R,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)rp(a,kp);else{c?rp(a,Lp):rp(a,Mp);d=Wo(b.R,"EXT-X-TARGETDURATION");if(!d)throw new L(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=Wo(b.R,"EXT-X-PART-INF");a.c&&c?(a.Qa=Number(Ro(c,"PART-TARGET")),a.v=Math.min(a.Qa,a.v)):a.v=Math.min(d,a.v);a.ha=Math.max(d,a.ha);a.c&&(d=Wo(b.R,"EXT-X-SERVER-CONTROL"),a.M=d?Number(Ro(d,"PART-HOLD-BACK")):0)}}
  function Np(a,b,c,d){c=Wo(c,"EXT-X-MAP");if(!c)return null;var e=Ro(c,"URI");d=Fp(Rb([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.X.has(b)||(c=Op(d,c),a.X.set(b,c));return a.X.get(b)}function Op(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Lh(function(){return[a]},c,d)}
  function Pp(a,b,c,d,e,f,g,h){var k=d.R,l=Fp(d.a,g),m=Wo(k,"EXTINF"),n=g=0,p=null,t=[];if(a.c&&d.b.length){a={};d=r(lb(d.b));for(var v=d.next();!v.done;a={Kc:a.Kc},v=d.next()){v=v.value;var w=v.ba;v=v.item;var y=0==w?c:t[t.length-1];w=0==w?e:y.endTime;var z=Number(Z(v,"DURATION"));z=w+z;var C=0,E=null;"EXT-X-PRELOAD-HINT"==v.name?C=(y=Z(v,"BYTERANGE-START"))?Number(y):0:(C=Z(v,"BYTERANGE"),y=r(Qp(y,C)),C=y.next().value,E=y.next().value);v=Z(v,"URI");a.Kc=Rb([h],[v])[0];t.push(new Nh(w,z,function(B){return function(){return[B.Kc]}}(a),
  C,E,b,f,0,Infinity))}}else if(!m)throw new L(2,4,4024,"EXTINF");m?g=e+Number(m.value.split(",")[0]):g=t[t.length-1].endTime;(h=Wo(k,"EXT-X-BYTERANGE"))?(c=r(Qp(c,h.value)),n=c.next().value,p=c.next().value):t.length&&(n=t[0].da,p=t[t.length-1].Y);return new Nh(e,g,function(){return l.length?[l]:[]},n,p,b,f,0,Infinity,t)}function Qp(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.Y+1,d=c+d-1);return[c,d]}
  function zp(a){if(a.b){for(var b=r(a.xa),c=b.next();!c.done;c=b.next())a.b.xb(c.value);a.xa=[]}}
  function qp(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,w,y,z,C,E,B,H,I,F,G,N,aa,ba,qa,P,Q;return J(function(X){switch(X.a){case 1:g=c.segments;k=Xo(c.R,"EXT-X-MEDIA-SEQUENCE",0);m=(l=Wo(c.R,"EXT-X-SKIP"))?Number(Z(l,"SKIPPED-SEGMENTS")):0;n=k+m;if(a.f!=kp&&e.has(n)){p=e.get(n);X.m(2);break}if(null!=a.J){X.m(3);break}h=Np(a,c.a,g[0].R,f);t=a;return u(X,Rp(a,b,h,d,n,!1,g[0],f),4);case 4:t.J=X.b;case 3:p=a.J;case 2:v=g[0].a,ab(v.split("/").pop()),w=Xo(c.R,"EXT-X-DISCONTINUITY-SEQUENCE"),y=a.C.get(w)||0,z=[],
  C=function(za){return lb(za)},E=r(C(g)),B=E.next();case 5:if(B.done){X.m(7);break}I=H=B.value;F=I.ba;G=I.item;N=z[z.length-1];aa=0==F?p:N.endTime;n=k+m+F;e.set(n,aa);h=Np(a,c.a,G.R,f);ba=Wo(G.R,"EXT-X-DISCONTINUITY");if(!ba){X.m(8);break}w++;return u(X,Sp(a,w,b,h,d,n,G,f,aa),9);case 9:y=X.b;case 8:!a.c&&(qa=a.u.isAutoLowLatencyMode())&&(a.u.enableLowLatencyMode(),a.c=a.u.isLowLatencyMode());P=Wo(G.R,"EXTINF");a.c||P?(Q=Pp(a,h,N,G,aa,y,f,c.a),z.push(Q)):a.c||Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
  B=E.next();X.m(5);break;case 7:return a.xa.push(z),zp(a),X["return"](z)}})}function Sp(a,b,c,d,e,f,g,h,k){var l,m;return J(function(n){if(1==n.a)return l=0,a.C.has(b)?(l=a.C.get(b),n.m(2)):u(n,Rp(a,c,d,e,f,!0,g,h),3);2!=n.a&&(m=n.b,l=k-m,a.C.set(b,l));return n["return"](l)})}
  function Tp(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:c=Wc;d=xi(b.a(),b.da,b.Y,a.i.retryParameters);if(a.i.hls.useFullSegmentsForStartTime)return k["return"](lp(a,d,c));e=xi(b.a(),b.da,b.da+2048-1,a.i.retryParameters);A(k,2);return u(k,lp(a,e,c),4);case 4:return f=k.b,k["return"](f);case 2:g=D(k);if(7001==g.code)throw g;Va("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive!  Your server should support Range requests and CORS preflights.",
  e.uris[0]);return u(k,lp(a,d,c),5);case 5:return h=k.b,k["return"](h)}})}
  function Rp(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,w;return J(function(y){switch(y.a){case 1:k=Pp(a,c,null,g,0,0,h,"");if(a.s&&!f&&(l=a.a.get(b),m=l.jd.get(e),void 0!=m))return y["return"](m);d=d.toLowerCase();if(Kp.includes(d))throw Va("Raw formats are not yet supported.  Skipping "+d),new L(1,4,4035);if("video/webm"==d)throw Va("WebM in HLS is not yet supported.  Skipping."),new L(1,4,4035);if("video/mp4"!=d&&"audio/mp4"!=d){y.m(2);break}n=[Tp(a,k)];c&&n.push(Tp(a,c));return u(y,Promise.all(n),3);case 3:return p=
  y.b,t=p[0],v=p[1]||p[0],y["return"](Up(b,t.uri,t.data,v.data));case 2:if("video/mp2t"!=d){y.m(4);break}return u(y,Tp(a,k),5);case 5:return w=y.b,y["return"](Vp(b,w.uri,w.data));case 4:throw new L(2,4,4030,b);}})}
  function Up(a,b,c,d){var e=0;(new me).box("moov",qe).box("trak",qe).box("mdia",qe).P("mdhd",function(h){e=ag(h.reader,h.version).timescale;h.parser.stop()}).parse(d,!0);if(!e)throw new L(2,4,4030,a,b);var f=0,g=!1;(new me).box("moof",qe).box("traf",qe).P("tfdt",function(h){f=$f(h.reader,h.version).Yc/e;g=!0;h.parser.stop()}).parse(c,!0);if(!g)throw new L(2,4,4030,a,b);return f}
  function Vp(a,b,c){function d(){f.seek(g+188);h=f.V();71!=h&&(f.seek(g+192),h=f.V());71!=h&&(f.seek(g+204),h=f.V());71!=h&&e();f.be(1)}function e(){throw new L(2,4,4030,a,b);}for(var f=new R(c,0),g=0,h=0;;)if(g=f.Z(),h=f.V(),71!=h&&e(),c=f.Ab(),8191==(c&8191))d();else if(c&16384)if(c=(f.V()&48)>>4,0!=c&&2!=c||e(),3==c&&(c=f.V(),f.skip(c)),1!=f.H()>>8)d();else{f.skip(3);c=f.V()>>6;0!=c&&1!=c||e();0==f.V()&&e();c=f.V();var k=f.Ab(),l=f.Ab();return(1073741824*((c&14)>>1)+((k&65534)<<14|(l&65534)>>1))/
  9E4}else d()}function up(a,b){if(1==b.length)return b[0];var c=tp(a,b);if(null!=c)return c;throw new L(2,4,4025,b);}function tp(a,b){for(var c=r(Wp[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=r(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return"text"==a?"":null}
  function Fp(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=r(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new L(2,4,4039,f);}}return c}
  function Jp(a,b,c,d,e){var f,g,h,k,l,m,n,p,t,v;return J(function(w){if(1==w.a){f=Tb;g=Wc;h=Fp(d.segments[0].a,e);k=new vb(h);l=k.pa.split(".").pop();m=Xp[b];if(n=m[l])return w["return"](n);if(b==f.$)return c&&"vtt"!=c&&"wvtt"!=c?w["return"]("application/mp4"):w["return"]("text/vtt");p=Qc([h],a.i.retryParameters);p.method="HEAD";return u(w,lp(a,p,g),2)}t=w.b;v=t.headers["content-type"];if(!v)throw new L(2,4,4021,l);return w["return"](v.split(";")[0])})}
  q.Rb=function(){var a=this,b,c;return J(function(d){if(1==d.a){if(!a.u)return d["return"]();A(d,2);return u(d,a.update(),4)}if(2!=d.a)return b=a.ya,a.j.S(b),wa(d,0);c=D(d);if(!a.u)return d["return"]();c.severity=1;a.u.onError(c);a.j.S(.1);x(d)})};function rp(a,b){a.f=b;a.b&&a.b.Wb(a.f==kp);a.f!=kp||a.j.stop()}function lp(a,b,c){if(!a.A)throw new L(2,7,7001);b=a.u.networkingEngine.request(c,b);Lc(a.A,b);return b.promise}K("shaka.hls.HlsParser",jp);
  var Wp={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Kp=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],Xp={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",
  cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}},Hp={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=Ro(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=Ro(a,"URI");b=ip(b);b=qb(b.data);b=Sb("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);
  return b},"com.microsoft.playready":function(a){var b=Ro(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=Ro(a,"URI");a=ip(a);a=qb(a.data);a=Lm(a);return Sb("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},kp="VOD",Mp="EVENT",Lp="LIVE",op={ne:kp,Hf:Mp,me:Lp};Jh.m3u8=function(){return new jp};Hh["application/x-mpegurl"]=function(){return new jp};Hh["application/vnd.apple.mpegurl"]=function(){return new jp};function Yp(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Zd:d,data:b,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=$b(b)}catch(g){}throw new L(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function Zp(){}function $p(a,b,c,d){var e=new aq;gd(b.headers).forEach(function(k,l){e.append(l,k)});var f=new bq,g={Id:!1,je:!1};a=cq(a,c,{body:b.body||void 0,headers:e,method:b.method,signal:f.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},g,d,b.streamDataCallback);a=new uc(a,function(){g.Id=!0;f.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var h=new M(function(){g.je=!0;f.abort()});h.S(b/1E3);a["finally"](function(){h.stop()})}return a}
  function cq(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,w,y,z,C,E;return J(function(B){switch(B.a){case 1:return g=dq,h=eq,n=m=0,p=Date.now(),A(B,2),u(B,g(a,c),4);case 4:return k=B.b,t=k.clone().body.getReader(),w=(v=k.headers.get("Content-Length"))?parseInt(v,10):0,y=function(H){function I(){var F,G;return J(function(N){switch(N.a){case 1:return A(N,2),u(N,t.read(),4);case 4:F=N.b;wa(N,3);break;case 2:return D(N),N["return"]();case 3:F.done||(m+=F.value.byteLength,f&&f(F.value));G=Date.now();if(100<G-p||
  F.done)e(G-p,m-n,w-m),n=m,p=G;F.done?H.close():(H.enqueue(F.value),I());x(N)}})}I()},new h({start:y}),u(B,k.arrayBuffer(),5);case 5:l=B.b;wa(B,3);break;case 2:z=D(B);if(d.Id)throw new L(1,1,7001,a,b);if(d.je)throw new L(1,1,1003,a,b);throw new L(1,1,1002,a,z,b);case 3:return C={},E=k.headers,E.forEach(function(H,I){C[I.trim()]=H}),B["return"](Yp(C,l,k.status,a,k.url,b))}})}
  function fq(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}K("shaka.net.HttpFetchPlugin",Zp);Zp.isSupported=fq;Zp.parse=$p;var dq=window.fetch,bq=window.AbortController,eq=window.ReadableStream,aq=window.Headers;fq()&&(Nc("http",$p,2),Nc("https",$p,2));function gq(){}
  function hq(a,b,c,d){var e=new iq,f=Date.now(),g=0,h=new Promise(function(k,l){e.open(b.method,a,!0);e.responseType="arraybuffer";e.timeout=b.retryParameters.timeout;e.withCredentials=b.allowCrossSiteCredentials;e.onabort=function(){l(new L(1,1,7001,a,c))};e.onload=function(n){n=n.target;var p=n.getAllResponseHeaders().trim().split("\r\n"),t={};p=r(p);for(var v=p.next();!v.done;v=p.next())v=v.value.split(": "),t[v[0].toLowerCase()]=v.slice(1).join(": ");try{var w=Yp(t,n.response,n.status,a,n.responseURL,
  c);k(w)}catch(y){l(y)}};e.onerror=function(n){l(new L(1,1,1002,a,n,c))};e.ontimeout=function(){l(new L(1,1,1003,a,c))};e.onprogress=function(n){var p=Date.now();if(100<p-f||n.lengthComputable&&n.loaded==n.total)d(p-f,n.loaded-g,n.total-n.loaded),g=n.loaded,f=p};for(var m in b.headers)e.setRequestHeader(m.toLowerCase(),b.headers[m]);e.send(b.body)});return new uc(h,function(){e.abort();return Promise.resolve()})}K("shaka.net.HttpXHRPlugin",gq);gq.parse=hq;var iq=window.XMLHttpRequest;
  Nc("http",hq,1);Nc("https",hq,1);function jq(){this.a=this.f=this.b=0;this.c=new Map;this.g=0}function kq(a,b){a.b+=b;var c=a.g;a.g++;a.c.set(c,b);return c}jq.prototype.close=function(a,b){if(this.c.has(a)){var c=this.c.get(a);this.c["delete"](a);this.f+=c;this.a+=b}};function lq(a){var b=this;this.K=a;this.a=new Map;this.F=new Xc(function(){var c=Array.from(b.a.values());return Promise.all(c.map(function(d){return d["catch"](function(){})}))});this.b=[];this.Yd=function(){};this.Xd=function(){};this.Jb=new jq}lq.prototype.destroy=function(){return this.F.destroy()};function mq(a,b,c){a.Yd=b;a.Xd=c}function nq(a){var b=a.b.map(function(c){return c()});a.b=[];return Promise.all(b)}
  function oq(a,b,c,d,e,f){Yc(a.F);var g=kq(a.Jb,d);d=(a.a.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,t;return J(function(v){if(1==v.a)return u(v,pq(a,c),2);h=v.b;if(a.F.a)throw new L(2,9,7001);if(e)for(m in k=qb(h),l=new Km(k),l.data)n=Number(m),p=l.data[n],t=l.a[n],a.Xd(p,t);a.Jb.close(g,h.byteLength);var w=a.Jb;a.Yd(0==w.b?0:w.f/w.b,a.Jb.a);return v["return"](f(h))})});a.a.set(b,d);return d}
  function qq(a,b,c){Yc(a.F);var d=(a.a.get(b)||Promise.resolve()).then(function(){return J(function(e){return u(e,c(),0)})});a.a.set(b,d)}function rq(a){return J(function(b){return 1==b.a?u(b,Promise.all(a.a.values()),2):b["return"](a.Jb.a)})}function pq(a,b){var c,d,e,f;return J(function(g){if(1==g.a)return c=Wc,d=a.K.request(c,b),e=function(){return d.abort()},a.b.push(e),u(g,d.promise,2);f=g.b;Hc(a.b,e);return g["return"](f.data)})};function sq(a,b){var c=this;this.c=a;this.b=a.objectStore(b);this.a=new Ub;a.onabort=function(d){d.preventDefault();c.a.reject()};a.onerror=function(d){d.preventDefault();c.a.reject()};a.oncomplete=function(){c.a.resolve()}}sq.prototype.abort=function(){var a=this;return J(function(b){if(1==b.a){try{a.c.abort()}catch(c){}A(b,2);return u(b,a.a,4)}if(2!=b.a)return wa(b,0);D(b);x(b)})};
  function tq(a,b){return new Promise(function(c,d){var e=a.b.openCursor();e.onerror=d;e.onsuccess=function(){var f;return J(function(g){if(1==g.a){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();x(g)})}})}sq.prototype.store=function(){return this.b};sq.prototype.promise=function(){return this.a};function uq(a){this.b=a;this.a=[]}uq.prototype.destroy=function(){return Promise.all(this.a.map(function(a){return a.abort()}))};function vq(a,b){return wq(a,b,"readwrite")}function wq(a,b,c){c=a.b.transaction([b],c);var d=new sq(c,b);a.a.push(d);d.promise().then(function(){Hc(a.a,d)},function(){Hc(a.a,d)});return d};function xq(a,b,c){this.b=new uq(a);this.c=b;this.a=c}q=xq.prototype;q.destroy=function(){return this.b.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return yq(this.c)};q.removeSegments=function(a,b){return zq(this,this.c,a,b)};q.getSegments=function(a){var b=this,c;return J(function(d){if(1==d.a)return u(d,Aq(b,b.c,a),2);c=d.b;return d["return"](c.map(function(e){return b.Jd(e)}))})};q.addManifests=function(){return yq(this.a)};
  q.updateManifestExpiration=function(a,b){var c=vq(this.b,this.a),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return zq(this,this.a,a,b)};q.getManifests=function(a){var b=this,c;return J(function(d){if(1==d.a)return u(d,Aq(b,b.a,a),2);c=d.b;return d["return"](Promise.all(c.map(function(e){return b.Ib(e)})))})};
  q.getAllManifests=function(){var a=this,b,c;return J(function(d){return 1==d.a?(b=wq(a.b,a.a,"readonly"),c=new Map,u(d,tq(b,function(e,f){var g;return J(function(h){if(1==h.a)return u(h,a.Ib(f),2);g=h.b;c.set(e,g);x(h)})}),2)):3!=d.a?u(d,b.promise(),3):d["return"](c)})};q.Jd=function(a){return a};q.Ib=function(a){return Promise.resolve(a)};function yq(a){return Promise.reject(new L(2,9,9011,"Cannot add new value to "+a))}
  q.add=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){if(1==m.a){d=vq(c.b,a);e=d.store();f=[];g={};h=r(b);for(k=h.next();!k.done;g={bc:g.bc},k=h.next())l=k.value,g.bc=e.add(l),g.bc.onsuccess=function(n){return function(){f.push(n.bc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
  function zq(a,b,c,d){a=vq(a.b,b);b=a.store();var e={};c=r(c);for(var f=c.next();!f.done;e={ac:e.ac},f=c.next())e.ac=f.value,b["delete"](e.ac).onsuccess=function(g){return function(){return d(g.ac)}}(e);return a.promise()}
  function Aq(a,b,c){var d,e,f,g,h,k,l;return J(function(m){if(1==m.a){d=wq(a.b,b,"readonly");e=d.store();f={};g=[];h={};k=r(c);for(l=k.next();!l.done;h={Fb:h.Fb,Db:h.Db},l=k.next())h.Db=l.value,h.Fb=e.get(h.Db),h.Fb.onsuccess=function(n){return function(){void 0==n.Fb.result&&g.push(n.Db);f[n.Db]=n.Fb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new L(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(n){return f[n]}))})};function Bq(a){this.a=new uq(a)}Bq.prototype.destroy=function(){return this.a.destroy()};Bq.prototype.getAll=function(){var a=this,b,c;return J(function(d){return 1==d.a?(b=wq(a.a,"session-ids","readonly"),c=[],u(d,tq(b,function(e,f){c.push(f)}),2)):3!=d.a?u(d,b.promise(),3):d["return"](c)})};Bq.prototype.add=function(a){var b=vq(this.a,"session-ids"),c=b.store();a=r(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
  Bq.prototype.remove=function(a){var b=this,c;return J(function(d){return 1==d.a?(c=vq(b.a,"session-ids"),u(d,tq(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Cq(){this.a=new Map}Cq.prototype.destroy=function(){for(var a=[],b=r(this.a.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.a.clear();return Promise.all(a)};Cq.prototype.init=function(){var a=this;Dq.forEach(function(e,f){var g=e();g&&a.a.set(f,g)});for(var b=[],c=r(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
  function Eq(a){var b=null;a.a.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Da:d,fa:f},fa:e})})});if(b)return b;throw new L(2,9,9013,"Could not find a cell that supports add-operations");}function Fq(a,b){a.a.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Da:d,fa:f},e)})})}
  function Gq(a,b,c){a=a.a.get(b);if(!a)throw new L(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new L(2,9,9013,"Could not find cell with name "+c);return b}function Hq(a,b){a.a.forEach(function(c){b(c.getEmeSessionCell())})}function Iq(a){var b=Array.from(a.a.keys());if(!b.length)throw new L(2,9,9E3,"No supported storage mechanisms found");return a.a.get(b[0]).getEmeSessionCell()}
  function Jq(a){var b,c,d;return J(function(e){return 1==e.a?(b=Array.from(a.a.values()),c=0<b.length,c||(d=Dq,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.m(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function Kq(a,b){Dq.set(a,b)}K("shaka.offline.StorageMuxer",Cq);Cq.unregister=function(a){Dq["delete"](a)};Cq.register=Kq;Cq.prototype.destroy=Cq.prototype.destroy;var Dq=new Map;function Lq(){xq.apply(this,arguments)}ra(Lq,xq);Lq.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return J(function(g){d=vq(c.b,c.a);e=d.store();f=new Ub;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new L(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
  Lq.prototype.Ib=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.a){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=Mq(a.periods[c],e),b.push(f);return u(h,ho(b),2)}g=h.b;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata})})};
  function Mq(a,b){Nq(a);for(var c=r(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return Oq(e,a.startTime,b)})}
  function Oq(a,b,c){var d=a.initSegmentUri?Pq(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=Pq(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
  dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,closedCaptions:null}}Lq.prototype.Jd=function(a){return{data:a.data}};function Pq(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new L(2,9,9004,"Could not parse uri "+a);}
  function Nq(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=r(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=r(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=r(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
  f=r(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=r(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=r(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function Qq(){xq.apply(this,arguments)}ra(Qq,xq);
  Qq.prototype.Ib=function(a){var b,c,d,e,f,g;return J(function(h){if(1==h.a){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=r(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(Rq(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,ho(b),2)}g=h.b;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g})})};
  function Rq(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
  dataKey:d.dataKey}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,closedCaptions:null}};function Sq(){xq.apply(this,arguments)}ra(Sq,xq);Sq.prototype.hasFixedKeySpace=function(){return!1};Sq.prototype.addSegments=function(a){return this.add(this.c,a)};Sq.prototype.addManifests=function(a){return this.add(this.a,a)};Sq.prototype.Ib=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function Tq(){this.h=this.f=this.c=this.b=this.a=this.g=null}q=Tq.prototype;
  q.init=function(){var a=this,b=new Ub,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.g=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Lq(d,"segment","manifest"):null;a.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Qq(d,"segment-v2","manifest-v2"):null;a.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Qq(d,"segment-v3","manifest-v3"):null;a.c=e;e=d.objectStoreNames;
  e=e.contains("manifest-v5")&&e.contains("segment-v5")?new Sq(d,"segment-v5","manifest-v5"):null;a.f=e;d=d.objectStoreNames.contains("session-ids")?new Bq(d):null;a.h=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=r(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new L(2,9,9001,c.error));d.preventDefault()};return b};
  q.destroy=function(){var a=this;return J(function(b){switch(b.a){case 1:if(!a.a){b.m(2);break}return u(b,a.a.destroy(),2);case 2:if(!a.b){b.m(4);break}return u(b,a.b.destroy(),4);case 4:if(!a.c){b.m(6);break}return u(b,a.c.destroy(),6);case 6:if(!a.f){b.m(8);break}return u(b,a.f.destroy(),8);case 8:if(!a.h){b.m(10);break}return u(b,a.h.destroy(),10);case 10:a.g&&a.g.close(),x(b)}})};
  q.getCells=function(){var a=new Map;this.a&&a.set("v1",this.a);this.b&&a.set("v2",this.b);this.c&&a.set("v3",this.c);this.f&&a.set("v5",this.f);return a};q.getEmeSessionCell=function(){return this.h};
  q.erase=function(){var a=this;return J(function(b){switch(b.a){case 1:if(!a.a){b.m(2);break}return u(b,a.a.destroy(),2);case 2:if(!a.b){b.m(4);break}return u(b,a.b.destroy(),4);case 4:if(!a.c){b.m(6);break}return u(b,a.c.destroy(),6);case 6:if(!a.f){b.m(8);break}return u(b,a.f.destroy(),8);case 8:return a.g&&a.g.close(),u(b,Uq(),10);case 10:return a.g=null,a.a=null,a.b=null,a.c=null,a.f=null,u(b,a.init(),0)}})};
  function Uq(){var a=new Ub,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new L(2,9,9001,b.error));c.preventDefault()};return a}Kq("idb",function(){return rd("CrKey")||!window.indexedDB?null:new Tq});function Vq(a,b,c,d){this.a=a;this.g=b;this.f=c;this.c=d;this.b=["offline:",a,"/",b,"/",c,"/",d].join("")}Vq.prototype.Da=function(){return this.g};Vq.prototype.fa=function(){return this.f};Vq.prototype.key=function(){return this.c};Vq.prototype.toString=function(){return this.b};
  function Wq(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new Vq(b,c,d,Number(a[4])):null};function Xq(a,b){this.b=a;this.a=b}
  function Yq(a,b){var c=new S(null,0);c.Ea(b.duration);var d=b.streams.filter(function(k){return"audio"==k.type}),e=b.streams.filter(function(k){return"video"==k.type});d=Zq(a,d,e,c);e=b.streams.filter(function(k){return"text"==k.type}).map(function(k){return $q(a,k,c)});var f=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var g=r(d.values()),h=g.next();!h.done;h=g.next())h=h.value,h.audio&&h.audio.encrypted&&(h.audio.drmInfos=f),h.video&&h.video.encrypted&&(h.video.drmInfos=f);return{presentationTimeline:c,
  minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e}}
  function Zq(a,b,c,d){for(var e=new Set,f=r(b),g=f.next();!g.done;g=f.next()){var h=r(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=r(c);for(g=f.next();!g.done;g=f.next())for(h=r(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=r(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0});b=r(b);for(e=b.next();!e.done;e=b.next())for(e=e.value,
  g=$q(a,e,d),h=r(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=r(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=$q(a,e,d),g=r(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
  function $q(a,b,c){var d=b.segments.map(function(e){return ar(a,e)});c.xb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new T(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
  roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,closedCaptions:b.closedCaptions}}function ar(a,b){var c=new Vq("segment",a.b,a.a,b.dataKey);return new Nh(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?br(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd)}function br(a,b){var c=new Vq("segment",a.b,a.a,b);return new Lh(function(){return[c.toString()]},0,null)};function cr(){this.a=null}q=cr.prototype;q.configure=function(){};
  q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.a){case 1:d=Wq(a);c.a=d;if(null==d||"manifest"!=d.a)throw new L(2,1,9004,a);e=new Cq;va(m);return u(m,e.init(),4);case 4:return u(m,Gq(e,d.Da(),d.fa()),5);case 5:return f=m.b,u(m,f.getManifests([d.key()]),6);case 6:return g=m.b,h=g[0],k=new Xq(d.Da(),d.fa()),l=Yq(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return ya(m),u(m,e.destroy(),7);case 7:Aa(m,0)}})};q.stop=function(){return Promise.resolve()};
  q.update=function(){};q.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return J(function(m){switch(m.a){case 1:return d=c.a,e=new Cq,A(m,2,3),u(m,e.init(),5);case 5:return u(m,Gq(e,d.Da(),d.fa()),6);case 6:return f=m.b,u(m,f.getManifests([d.key()]),7);case 7:g=m.b;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.m(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return ya(m),u(m,e.destroy(),10);case 10:Aa(m,0);break;case 2:D(m),m.m(3)}})};
  Hh["application/x-offline-manifest"]=function(){return new cr};function dr(){}function er(a){var b=Wq(a);b&&"manifest"==b.a?(a={uri:a,Zd:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=xc(a)):a=b&&"segment"==b.a?fr(b.key(),b):vc(new L(2,1,9004,a));return a}
  function fr(a,b){var c=new Cq;return xc(void 0).W(function(){return c.init()}).W(function(){return Gq(c,b.Da(),b.fa())}).W(function(d){return d.getSegments([b.key()])}).W(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}K("shaka.offline.OfflineScheme",dr);dr.plugin=er;Nc("offline",er);function gr(a,b,c){var d,e,f,g,h,k;return J(function(l){switch(l.a){case 1:d=[];for(var m=[],n=r(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var t=!1,v=r(m),w=v.next();!w.done;w=v.next())if(w=w.value,hr(w.info,p)){w.sessionIds.push(p.sessionId);t=!0;break}t||m.push({info:p,sessionIds:[p.sessionId]})}e=r(m);f=e.next();case 2:if(f.done){l.m(4);break}g=f.value;h=ir(a,b,g);return u(l,h,5);case 5:k=l.b;d=d.concat(k);f=e.next();l.m(2);break;case 4:return l["return"](d)}})}
  function ir(a,b,c){var d,e;return J(function(f){switch(f.a){case 1:return d=new wd({wb:b,onError:function(){},uc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),A(f,2),d.configure(a),u(f,Ed(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:wa(f,3);break;case 2:return D(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return A(f,6),u(f,Nd(d),8);case 8:wa(f,7);break;case 6:return D(f),u(f,d.destroy(),
  9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return J(function(h){if(1==h.a)return A(h,2),u(h,Od(d,g),4);if(2!=h.a)return e.push(g),wa(h,0);D(h);x(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
  function hr(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&Ic(a.audioCapabilities,b.audioCapabilities,c)&&Ic(a.videoCapabilities,b.videoCapabilities,c)};function jr(a,b,c){var d=b.presentationTimeline.getDuration();b=kr(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c}}function lr(a,b){var c=Yq(new Xq(a.Da(),a.fa()),b),d=b.appMetadata||{};c=kr(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d}}
  function kr(a){var b=[],c=kh(a.variants);c=r(c);for(var d=c.next();!d.done;d=c.next())b.push(dh(d.value));a=r(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(eh(c.value));return b};function mr(){this.a={}}function nr(a,b,c){c=c.endTime-c.startTime;return or(a,b)*c}function or(a,b){var c=a.a[b];null==c&&(c=0);return c};function pr(a,b,c){a.variants=a.variants.filter(function(d){return Xg(d,b,c)})}function qr(a){a.variants=a.variants.filter(function(b){var c=!0;b.audio&&(c=c&&wg(b.audio));b.video&&(c=c&&wg(b.video));return c})}function rr(a,b){a.variants=a.variants.filter(function(c){return ge(b,c)})};function sr(a){var b=this;if(a&&a.constructor!=U)throw new L(2,9,9008);this.K=this.i=null;a?(this.i=a.i,this.K=a.Mb()):(this.i=vj(),this.K=new Mc);this.zc=[];this.Sb=[];this.qd=[];var c=!a;this.F=new Xc(function(){var d,e,f,g,h;return J(function(k){switch(k.a){case 1:return u(k,Promise.all(b.qd.map(function(l){return nq(l)})),2);case 2:d=function(){};e=[];f=r(b.Sb);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.m(4);break}return u(k,b.K.destroy(),
  4);case 4:b.i=null,b.K=null,x(k)}})})}function tr(){if(nd())a:{var a=r(Dq.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}q=sr.prototype;q.destroy=function(){return this.F.destroy()};
  q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=tj(a,b));a.manifest&&a.manifest.dash&&"defaultPresentationDelay"in a.manifest.dash&&(Jb("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),a.manifest.defaultPresentationDelay=a.manifest.dash.defaultPresentationDelay,delete a.manifest.dash.defaultPresentationDelay);return xj(this.i,a)};q.getConfiguration=function(){var a=vj();xj(a,this.i,vj());return a};q.Mb=function(){return this.K};
  q.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new lq(this.K);this.qd.push(f);b=ur(this,a,b||{},function(){var h;return J(function(k){if(1==k.a)return u(k,Gh(a,d.K,e.manifest.retryParameters,c||null),2);h=k.b;return k["return"](Qb(h))})},e,f);var g=new uc(b,function(){return nq(f)});g["finally"](function(){Hc(d.qd,f)});g.then=function(h){Jb("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise.  Please update to conform to this new API; you can use the |chain| method instead.");
  return g.promise.then(h)};return vr(this,g)};q.Qe=function(){Jb("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported.");return!1};
  function ur(a,b,c,d,e,f){var g,h,k,l,m,n,p,t,v,w,y;return J(function(z){switch(z.a){case 1:return wr(),h=g=null,k=new Cq,m=l=null,A(z,2,3),u(z,d(),5);case 5:return g=z.b,u(z,xr(a,b,g,e),6);case 6:n=z.b;yr(a);p=!n.presentationTimeline.U()&&!n.presentationTimeline.ab();if(!p)throw new L(2,9,9005,b);return u(z,zr(a,n,function(C){m=m||C},e),7);case 7:h=z.b;yr(a);if(m)throw m;return u(z,a.oc(n,h,e),8);case 8:return u(z,k.init(),9);case 9:return yr(a),u(z,Eq(k),10);case 10:return l=z.b,yr(a),u(z,Ar(a,l.fa,
  h,n,b,c,e,f),11);case 11:t=z.b;yr(a);if(m)throw m;return u(z,l.fa.addManifests([t]),12);case 12:return v=z.b,yr(a),w=new Vq("manifest",l.path.Da,l.path.fa,v[0]),z["return"](lr(w,t));case 3:return ya(z),a.zc=[],u(z,k.destroy(),13);case 13:if(!g){z.m(14);break}return u(z,g.stop(),14);case 14:if(!h){z.m(16);break}return u(z,h.destroy(),16);case 16:Aa(z,0);break;case 2:y=D(z);if(!l){z.m(18);break}return u(z,l.fa.removeSegments(a.zc,function(){}),18);case 18:throw m||y;}})}
  q.oc=function(a,b,c){var d,e,f,g,h,k,l,m,n,p,t,v,w,y,z,C,E,B,H,I,F;return J(function(G){switch(G.a){case 1:d={width:Infinity,height:Infinity};pr(a,c.restrictions,d);qr(a);rr(a,b);e=[];f=c.preferredAudioChannelCount;Vg(a,f);g=r(a.variants);for(h=g.next();!h.done;h=g.next())k=h.value,e.push(dh(k));l=r(a.textStreams);for(m=l.next();!m.done;m=l.next())n=m.value,e.push(eh(n));return u(G,c.offline.trackSelectionCallback(e),2);case 2:p=G.b;t=a.presentationTimeline.getDuration();v=0;w=r(p);for(y=w.next();!y.done;y=
  w.next())z=y.value,C=z.bandwidth*t/8,v+=C;A(G,3);return u(G,c.offline.downloadSizeCallback(v),5);case 5:E=G.b;if(!E)throw new L(2,9,9014);wa(G,4);break;case 3:throw D(G),new L(2,9,9015);case 4:B=new Set;H=new Set;I=r(p);for(y=I.next();!y.done;y=I.next())F=y.value,"variant"==F.type&&B.add(F.id),"text"==F.type&&H.add(F.id);a.variants=a.variants.filter(function(N){return B.has(N.id)});a.textStreams=a.textStreams.filter(function(N){return H.has(N.id)});Br(a);x(G)}})};
  function Ar(a,b,c,d,e,f,g,h){var k,l,m,n,p,t,v,w,y,z,C,E;return J(function(B){switch(B.a){case 1:return k=jr(e,d,f),l=g.offline.progressCallback,m=function(H,I){k.size=I;l(k,H)},n=function(H,I){v&&g.offline.usePersistentLicense&&w==I&&Md(c,"cenc",H)},mq(h,m,n),p=d.variants.some(function(H){var I=H.audio&&H.audio.encrypted;return H.video&&H.video.encrypted||I}),t=d.variants.some(function(H){return(H.video?H.video.drmInfos:[]).concat(H.audio?H.audio.drmInfos:[]).some(function(I){return I.initData&&
  I.initData.length})}),v=p&&!t,w=null,v&&(y=c.c,w=Cr.get(y.keySystem)),va(B),C=z=Dr(a,h,b,c,d,e,f,g),u(B,rq(h),4);case 4:C.size=B.b;z.expiration=c.Lb();E=Vd(c);z.sessionIds=g.offline.usePersistentLicense?E:[];if(p&&g.offline.usePersistentLicense&&!E.length)throw new L(2,9,9007);return B["return"](z);case 2:return ya(B),u(B,h.destroy(),5);case 5:Aa(B,0)}})}q.remove=function(a){return Er(this,Fr(this,a))};
  function Fr(a,b){var c,d,e,f,g,h;return J(function(k){switch(k.a){case 1:wr();c=Wq(b);if(null==c||"manifest"!=c.a)throw new L(2,9,9004,b);d=c;e=new Cq;va(k);return u(k,e.init(),4);case 4:return u(k,Gq(e,d.Da(),d.fa()),5);case 5:return f=k.b,u(k,f.getManifests([d.key()]),6);case 6:return g=k.b,h=g[0],u(k,Promise.all([Gr(a,h,e),Hr(f,d,h)]),2);case 2:return ya(k),u(k,e.destroy(),8);case 8:Aa(k,0)}})}
  function Ir(a,b){for(var c=[],d=r(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:jd(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:jd(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function Gr(a,b,c){return J(function(d){return u(d,Jr(a.K,a.i.drm,c,b),0)})}
  function Hr(a,b,c){function d(){}var e=Kr(c);lr(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.jf=function(){return Er(this,Lr(this))};
  function Lr(a){var b,c,d,e,f,g,h,k,l,m;return J(function(n){switch(n.a){case 1:return wr(),b=a.K,c=a.i.drm,d=new Cq,e=!1,va(n),u(n,d.init(),4);case 4:f=[],Hq(d,function(p){return f.push(p)}),g=r(f),h=g.next();case 5:if(h.done){n.m(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.b,u(n,gr(c,b,l),9);case 9:return m=n.b,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.m(5);break;case 2:return ya(n),u(n,d.destroy(),11);case 11:Aa(n,3);break;case 3:return n["return"](!e)}})}
  q.list=function(){return Er(this,Mr())};function Mr(){var a,b,c;return J(function(d){switch(d.a){case 1:return wr(),a=[],b=new Cq,va(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Fq(b,function(e,f){c=c.then(function(){var g;return J(function(h){if(1==h.a)return u(h,f.getAllManifests(),2);g=h.b;g.forEach(function(k,l){var m=lr(new Vq("manifest",e.Da,e.fa,l),k);a.push(m)});x(h)})})}),u(d,c,2);case 2:return ya(d),u(d,b.destroy(),6);case 6:Aa(d,3);break;case 3:return d["return"](a)}})}
  function xr(a,b,c,d){var e,f,g,h,k;return J(function(l){if(1==l.a)return e=null,f=a.K,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),yr(a),u(l,c.start(b,g),2);if(3!=l.a)return h=l.b,yr(a),k=Nr(h),u(l,Promise.all(fb(k,
  function(m){return m.createSegmentIndex()})),3);yr(a);if(e)throw e;return l["return"](h)})}function zr(a,b,c,d){var e;return J(function(f){switch(f.a){case 1:return e=new wd({wb:a.K,onError:c,uc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,Bd(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Nd(e),3);case 3:return u(f,Ld(e),4);case 4:return f["return"](e)}})}
  function Dr(a,b,c,d,e,f,g,h){for(var k=new mr,l=r(e.variants),m=l.next();!m.done;m=l.next()){var n=k;m=m.value;var p=m.audio,t=m.video;p&&!t&&(n.a[p.id]=p.bandwidth||m.bandwidth);!p&&t&&(n.a[t.id]=t.bandwidth||m.bandwidth);if(p&&t){var v=p.bandwidth||393216,w=t.bandwidth||m.bandwidth-v;0>=w&&(w=m.bandwidth);n.a[p.id]=v;n.a[t.id]=w}}l=r(e.textStreams);for(n=l.next();!n.done;n=l.next())k.a[n.value.id]=52;n=new Map;n.set(null,Promise.resolve(null));m=new Map;p=Nr(e);l=new Map;p=r(p);for(t=p.next();!t.done;t=
  p.next())t=t.value,v=Or(a,b,c,k,e,t,h,n,m),l.set(t.id,v);a=r(e.variants);for(m=a.next();!m.done;m=a.next())b=m.value,b.audio&&l.get(b.audio.id).variantIds.push(b.id),b.video&&l.get(b.video.id).variantIds.push(b.id);a=Array.from(l.values());h=h.offline.usePersistentLicense;(b=d.c)&&h&&(b.initData=[]);return{creationTime:Date.now(),originalManifestUri:f,duration:e.presentationTimeline.getDuration(),size:0,expiration:d.Lb(),streams:a,sessionIds:h?Vd(d):[],drmInfo:b,appMetadata:g}}
  function Or(a,b,c,d,e,f,g,h,k){var l={id:f.id,originalId:f.originalId,primary:f.primary,type:f.type,mimeType:f.mimeType,codecs:f.codecs,frameRate:f.frameRate,pixelAspectRatio:f.pixelAspectRatio,hdr:f.hdr,kind:f.kind,language:f.language,label:f.label,width:f.width||null,height:f.height||null,encrypted:f.encrypted,keyIds:f.keyIds,segments:[],variantIds:[],roles:f.roles,forced:f.forced,channelsCount:f.channelsCount,audioSamplingRate:f.audioSamplingRate,closedCaptions:f.closedCaptions},m=f.id;Pr(f,e.presentationTimeline.sb(),
  function(n){var p=Qr(a,b,m,f.id,c,d,n.c,g,h),t=Rr(a,b,m,f.id,c,d,n,g,k);qq(b,m,function(){var v,w;return J(function(y){if(1==y.a)return u(y,p,2);if(3!=y.a)return v=y.b,u(y,t,3);w=y.b;l.segments.push({initSegmentKey:v,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,dataKey:w});x(y)})})});return l}
  function Qr(a,b,c,d,e,f,g,h,k){if(k.has(g))return k.get(g);h=xi(g.a(),g.da,g.Y,h.streaming.retryParameters);b=oq(b,c,h,.5*or(f,d),!0,function(l){var m;return J(function(n){if(1==n.a)return u(n,e.addSegments([{data:l}]),2);m=n.b;a.zc.push(m[0]);return n["return"](m[0])})});k.set(g,b);return b}
  function Rr(a,b,c,d,e,f,g,h,k){var l=[g.a()[0],g.da,g.Y].join("-");if(k.has(l))return k.get(l);h=xi(g.a(),g.da,g.Y,h.streaming.retryParameters);b=oq(b,c,h,nr(f,d,g),!1,function(m){var n;return J(function(p){if(1==p.a)return u(p,e.addSegments([{data:m}]),2);n=p.b;a.zc.push(n[0]);return p["return"](n[0])})});k.set(l,b);return b}function Pr(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function yr(a){if(a.F.a)throw new L(2,9,7001);}
  function wr(){if(!tr())throw new L(2,9,9E3);}function Er(a,b){return J(function(c){if(1==c.a)return a.Sb.push(b),va(c),u(c,b,4);if(2!=c.a)return c["return"](c.b);ya(c);Hc(a.Sb,b);return Aa(c,0)})}function vr(a,b){var c=b.promise;a.Sb.push(c);return b["finally"](function(){Hc(a.Sb,c)})}
  function Kr(a){var b=[];a=r(a.streams);for(var c=a.next();!c.done;c=a.next()){c=r(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.push(d.initSegmentKey),b.push(d.dataKey)}return b}
  function Jr(a,b,c,d){var e,f,g;return J(function(h){if(1==h.a){if(!d.drmInfo)return h["return"]();e=Iq(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:Ir(d,!1),videoCapabilities:Ir(d,!0)}});return u(h,gr(b,a,f),2)}return 3!=h.a?(g=h.b,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
  function Nr(a){for(var b=new Set,c=r(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);a=r(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
  function Br(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=r(b),d=c.next();!d.done;d=c.next()){d=r(b);for(var e=d.next();!e.done;e=d.next());}b=r(a);for(c=b.next();!c.done;c=b.next())for(c=r(a),d=c.next();!d.done;d=c.next());}K("shaka.offline.Storage",sr);sr.deleteAll=function(){var a;return J(function(b){return 1==b.a?(a=new Cq,va(b),u(b,Jq(a),2)):5!=b.a?(ya(b),u(b,a.destroy(),5)):Aa(b,0)})};sr.prototype.list=sr.prototype.list;
  sr.prototype.removeEmeSessions=sr.prototype.jf;sr.prototype.remove=sr.prototype.remove;sr.prototype.getStoreInProgress=sr.prototype.Qe;sr.prototype.store=sr.prototype.store;sr.prototype.getNetworkingEngine=sr.prototype.Mb;sr.prototype.getConfiguration=sr.prototype.getConfiguration;sr.prototype.configure=sr.prototype.configure;sr.prototype.destroy=sr.prototype.destroy;sr.support=tr;
  var Cr=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");pl.offline=tr;function Sr(){}function Tr(a,b){for(var c={priority:b||0,re:a},d=r(lb(Ur)),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.ba;if(e.item.priority<c.priority){Ur.splice(f,0,c);return}}Ur.push(c)}K("shaka.polyfill",Sr);Sr.register=Tr;Sr.installAll=function(){for(var a=r(Ur),b=a.next();!b.done;b=a.next()){b=b.value;try{b.re()}catch(c){Va("Error installing polyfill!",c)}}};var Ur=[];Tr(function(){Vr()},-1);function Wr(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var c=new Event(b,a);else c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}
  Tr(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||
  document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Wr);document.addEventListener("webkitfullscreenerror",Wr);document.addEventListener("mozfullscreenchange",Wr);document.addEventListener("mozfullscreenerror",Wr);document.addEventListener("MSFullscreenChange",Wr);document.addEventListener("MSFullscreenError",
  Wr)}});function Xr(a,b,c){if("input"==a)switch(this.type){case "range":a="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,a,b,c)}Tr(function(){rd("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Xr)});Tr(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})});Tr(function(){});function Yr(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=a.apply(this,c);c.abort=function(){};return c}}function Zr(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function $r(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"mp2t"==b.split(/ *; */)[0].split("/")[1].toLowerCase()?!1:a(b)}}
  function as(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=md(b)&&a(b)}}function bs(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
  function cs(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)}}
  Tr(function(){var a=td();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?bs():a?($r(),12>=a?(Yr(),Zr()):Yr()):(rd("Tizen 2")||rd("Tizen 3")||rd("Tizen 4"))&&as());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&cs()});function ds(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new es;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new O("change",{});b.dispatchEvent(c)})}function es(){Dc.call(this);this.type="";this.angle=0}ra(es,Dc);
  es.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
  es.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};Tr(function(){screen.orientation||void 0!=window.orientation&&ds()});function fs(a,b){try{var c=new gs(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function hs(a){var b=this.mediaKeys;b&&b!=a&&is(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?is(a,this):Promise.resolve()}function js(a){a=qb(a.initData);if(tb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Yb(a.subarray(4),!0);a=ac(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=rb(a);this.dispatchEvent(b)}
  function gs(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=r(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=r(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.a=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
  gs.prototype.createMediaKeys=function(){var a=new ks(this.keySystem);return Promise.resolve(a)};gs.prototype.getConfiguration=function(){return this.a};function ks(a){this.a=new WebKitMediaKeys(a);this.b=new Zc}ks.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new ls(this.a,a)};ks.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
  function is(a,b){a.b.eb();if(!b)return Promise.resolve();a.b.o(b,"webkitneedkey",js);try{return Uh(b,HTMLMediaElement.HAVE_METADATA,a.b,function(){b.webkitSetMediaKeys(a.a)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function ls(a){Dc.call(this);this.f=null;this.g=a;this.c=this.a=null;this.b=new Zc;this.sessionId="";this.expiration=NaN;this.closed=new Ub;this.keyStatuses=new ms}ra(ls,Dc);q=ls.prototype;
  q.generateRequest=function(a,b){var c=this;this.a=new Ub;try{var d=this.g.createSession("video/mp4",qb(b));this.f=d;this.sessionId=d.sessionId||"";this.b.o(this.f,"webkitkeymessage",function(e){c.a&&(c.a.resolve(),c.a=null);e=new O("message",{messageType:void 0==c.keyStatuses.a?"license-request":"license-renewal",message:rb(e.message)});c.dispatchEvent(e)});this.b.o(d,"webkitkeyadded",function(){c.c&&(ns(c,"usable"),c.c.resolve(),c.c=null)});this.b.o(d,"webkitkeyerror",function(){var e=Error("EME PatchedMediaKeysApple key error");
  e.errorCode=c.f.error;if(null!=c.a)c.a.reject(e),c.a=null;else if(null!=c.c)c.c.reject(e),c.c=null;else switch(c.f.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:ns(c,"output-not-allowed");break;default:ns(c,"internal-error")}});ns(this,"status-pending")}catch(e){this.a.reject(e)}return this.a};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};q.update=function(a){this.c=new Ub;try{this.f.update(qb(a))}catch(b){this.c.reject(b)}return this.c};
  q.close=function(){try{this.f.close(),this.closed.resolve(),this.b.eb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function ns(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new O("keystatuseschange");a.dispatchEvent(c)}function ms(){this.size=0;this.a=void 0}q=ms.prototype;q.forEach=function(a){this.a&&a(this.a,je.value())};
  q.get=function(a){if(this.has(a))return this.a};q.has=function(a){var b=je.value();return this.a&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};Tr(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=hs,window.MediaKeys=ks,window.MediaKeySystemAccess=gs,navigator.requestMediaKeySystemAccess=fs)});function os(a,b){try{var c=new ps(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function qs(a){if(a.initData){var b=document.createEvent("CustomEvent");b.initCustomEvent("encrypted",!1,!1,null);b.initDataType="cenc";b.initData=rb(Mm(a.initData));this.dispatchEvent(b)}}
  function ps(a,b){this.keySystem=a;for(var c=!1,d=r(b),e=d.next();!e.done;e=d.next()){e=e.value;var f={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label},g=!1;if(e.audioCapabilities)for(var h=r(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.audioCapabilities.push(k),c=
  !0));if(e.videoCapabilities)for(h=r(e.videoCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(g=!0,MSMediaKeys.isTypeSupported(this.keySystem,k.contentType.split(";")[0])&&(f.videoCapabilities.push(k),c=!0));g||(c=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==e.persistentState&&(c=!1);if(c){this.a=f;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
  ps.prototype.createMediaKeys=function(){var a=new rs(this.keySystem);return Promise.resolve(a)};ps.prototype.getConfiguration=function(){return this.a};function ss(a){var b=this.mediaKeys;b&&b!=a&&ts(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?ts(a,this):Promise.resolve()}function rs(a){this.a=new MSMediaKeys(a);this.b=new Zc}
  rs.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new us(this.a,a)};rs.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function ts(a,b){a.b.eb();if(!b)return Promise.resolve();a.b.o(b,"msneedkey",qs);try{return Uh(b,HTMLMediaElement.HAVE_METADATA,a.b,function(){b.msSetMediaKeys(a.a)}),Promise.resolve()}catch(c){return Promise.reject(c)}}
  function us(a){Dc.call(this);this.f=null;this.g=a;this.c=this.a=null;this.b=new Zc;this.sessionId="";this.expiration=NaN;this.closed=new Ub;this.keyStatuses=new vs}ra(us,Dc);q=us.prototype;
  q.generateRequest=function(a,b){var c=this;this.a=new Ub;try{this.f=this.g.createSession("video/mp4",qb(b),null),this.b.o(this.f,"mskeymessage",function(d){c.a&&(c.a.resolve(),c.a=null);d=new O("message",{messageType:void 0==c.keyStatuses.a?"license-request":"license-renewal",message:rb(d.message)});c.dispatchEvent(d)}),this.b.o(this.f,"mskeyadded",function(){c.a?(ws(c,"usable"),c.a.resolve(),c.a=null):c.c&&(ws(c,"usable"),c.c.resolve(),c.c=null)}),this.b.o(this.f,"mskeyerror",function(){var d=Error("EME PatchedMediaKeysMs key error");
  d.errorCode=c.f.error;if(null!=c.a)c.a.reject(d),c.a=null;else if(null!=c.c)c.c.reject(d),c.c=null;else switch(c.f.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:ws(c,"output-not-allowed");break;default:ws(c,"internal-error")}}),ws(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};q.update=function(a){this.c=new Ub;try{this.f.update(qb(a))}catch(b){this.c.reject(b)}return this.c};
  q.close=function(){try{this.f.close(),this.closed.resolve(),this.b.eb()}catch(a){this.closed.reject(a)}return this.closed};q.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function ws(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new O("keystatuseschange");a.dispatchEvent(c)}function vs(){this.size=0;this.a=void 0}q=vs.prototype;q.forEach=function(a){this.a&&a(this.a,je.value())};
  q.get=function(a){if(this.has(a))return this.a};q.has=function(a){var b=je.value();return this.a&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};
  Tr(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,window.MediaKeys=rs,window.MediaKeySystemAccess=ps,navigator.requestMediaKeySystemAccess=os,HTMLMediaElement.prototype.setMediaKeys=ss)});function xs(){return Promise.reject(Error("The key system specified is not supported."))}function ys(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function zs(){throw new TypeError("Illegal constructor.");}zs.prototype.createSession=function(){};zs.prototype.setServerCertificate=function(){};function As(){this.keySystem="";throw new TypeError("Illegal constructor.");}As.prototype.getConfiguration=function(){};As.prototype.createMediaKeys=function(){};
  Tr(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=xs,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ys,window.MediaKeys=zs,window.MediaKeySystemAccess=As)},-10);function Bs(a){var b=Cs;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function Ds(a,b){try{var c=new Es(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Fs(a){var b=this.mediaKeys;b&&b!=a&&Gs(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&Gs(a,this);return Promise.resolve()}
  function Es(a,b){this.a=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.a="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=r(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=r(g.audioCapabilities),
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.a)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=r(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.a)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.a)||e.canPlayType("video/webm",this.a));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
  d=!1);if(d){this.b=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}Es.prototype.createMediaKeys=function(){var a=new Hs(this.a);return Promise.resolve(a)};Es.prototype.getConfiguration=function(){return this.b};function Hs(a){this.g=a;this.a=null;this.b=new Zc;this.c=[];this.f=new Map}
  function Gs(a,b){a.a=b;a.b.eb();var c=Cs;b&&(a.b.o(b,c+"needkey",function(d){var e=document.createEvent("CustomEvent");e.initCustomEvent("encrypted",!1,!1,null);e.initDataType="cenc";e.initData=rb(d.initData);a.a.dispatchEvent(e)}),a.b.o(b,c+"keymessage",function(d){var e=Is(a,d.sessionId);e&&(d=new O("message",{messageType:void 0==e.keyStatuses.a?"licenserequest":"licenserenewal",message:d.message}),e.b&&(e.b.resolve(),e.b=null),e.dispatchEvent(d))}),a.b.o(b,c+"keyadded",function(d){if(d=Is(a,d.sessionId))Js(d,
  "usable"),d.a&&d.a.resolve(),d.a=null}),a.b.o(b,c+"keyerror",function(d){var e=Is(a,d.sessionId);e&&e.handleError(d)}))}Hs.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.a||document.createElement("video");b.src||(b.src="about:blank");a=new Ks(b,this.g,a);this.c.push(a);return a};Hs.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
  function Is(a,b){var c=a.f.get(b);return c?c:(c=a.c.shift())?(c.sessionId=b,a.f.set(b,c),c):null}function Ks(a,b,c){Dc.call(this);this.f=a;this.h=!1;this.a=this.b=null;this.c=b;this.g=c;this.sessionId="";this.expiration=NaN;this.closed=new Ub;this.keyStatuses=new Ls}ra(Ks,Dc);q=Ks.prototype;
  q.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.b?(45==a.systemCode&&(b.message="Unsupported session type."),this.b.reject(b),this.b=null):a.sessionId&&this.a?(this.a.reject(b),this.a=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Js(this,"output-restricted"):1==b?Js(this,"expired"):Js(this,"internal-error"))};
  function Ms(a,b,c){if(a.h)return Promise.reject(Error("The session is already initialized."));a.h=!0;try{if("persistent-license"==a.g)if(c)var d=qb(ac("LOAD_SESSION|"+c));else{var e=ac("PERSISTENT|");d=ic(e,b)}else d=qb(b)}catch(g){return Promise.reject(g)}a.b=new Ub;var f=Bs("generateKeyRequest");try{a.f[f](a.c,d)}catch(g){if("InvalidStateError"!=g.name)return a.b=null,Promise.reject(g);(new M(function(){try{a.f[f](a.c,d)}catch(h){a.b.reject(h),a.b=null}})).S(.01)}return a.b}
  function Ns(a,b,c){if(a.a)a.a.then(function(){return Ns(a,b,c)})["catch"](function(){return Ns(a,b,c)});else{a.a=b;if("webkit-org.w3.clearkey"==a.c){var d=Xb(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=fc(e.keys[0].k);e=fc(e.keys[0].kid)}else d=qb(c),e=null;var f=Bs("addKey");try{a.f[f](a.c,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}}
  function Js(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.a=b;c=new O("keystatuseschange");a.dispatchEvent(c)}q.generateRequest=function(a,b){return Ms(this,b,null)};q.load=function(a){return"persistent-license"==this.g?Ms(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new Ub;Ns(this,b,a);return b};
  q.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=Bs("cancelKeyRequest");try{this.f[a](this.c,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function Ls(){this.size=0;this.a=void 0}q=Ls.prototype;q.forEach=function(a){this.a&&a(this.a,je.value())};q.get=function(a){if(this.has(a))return this.a};
  q.has=function(a){var b=je.value();return this.a&&ob(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var Cs="";
  Tr(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Cs="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ds;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Fs;window.MediaKeys=Hs;window.MediaKeySystemAccess=Es}});function Os(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
  function Ps(){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 Qs(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
  function Rs(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function Ss(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}
  Tr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=Ps,Object.defineProperty(a,"disablePictureInPicture",{get:Rs,set:Ss,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Qs,document.addEventListener("webkitpresentationmodechanged",Os,!0))}});function Ts(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}Tr(function(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Ts)});Tr(function(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}});function Us(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Tr(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=Us)}});function Vs(a,b,c){return new window.TextTrackCue(a,b,c)}function Ws(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}Tr(function(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Vs;else if(6==b)a=Ws;else{try{var c=!!Vs(1,2,"")}catch(d){c=!1}c&&(a=Vs)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}});function Xs(){}Xs.prototype.parseInit=function(){};Xs.prototype.parseMedia=function(a,b){var c=null,d=[],e=Xb(a).split(/\r?\n/);e=r(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Ys.exec(f))){var g=Zs.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ze(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};K("shaka.text.LrcTextParser",Xs);Xs.prototype.parseMedia=Xs.prototype.parseMedia;
  Xs.prototype.parseInit=Xs.prototype.parseInit;var Ys=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Zs=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;mg["application/x-subtitle-lrc"]=function(){return new Xs};function $s(){}$s.prototype.parseInit=function(){};
  $s.prototype.parseMedia=function(a,b){var c=Xb(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(E){throw new L(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new L(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new L(2,2,2005,"TTML does not contain <tt> tag.");e=g.getElementsByTagName("body")[0];if(!e)return[];c=Sm(g,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=Sm(g,"http://www.w3.org/ns/ttml#parameter",
  "subFrameRate"),k=Sm(g,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),l=Sm(g,"http://www.w3.org/ns/ttml#parameter","tickRate"),m=Sm(g,"http://www.w3.org/ns/ttml#parameter","cellResolution");f=g.getAttribute("xml:space")||"default";var n=Sm(g,"http://www.w3.org/ns/ttml#styling","extent");if("default"!=f&&"preserve"!=f)throw new L(2,2,2005,"Invalid xml:space value: "+f);f="default"==f;c=new at(c,h,k,l);m=m?(m=/^(\d+) (\d+)$/.exec(m))?{columns:parseInt(m[1],10),rows:parseInt(m[2],10)}:
  null:null;h=(h=g.getElementsByTagName("metadata")[0])?Rm(h):[];k=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));l=[];for(var p=r(g),t=p.next();!t.done;t=p.next()){var v=t.value;t=new Be;var w=v.getAttribute("xml:id");if(w){t.id=w;var y=null;n&&(y=bt.exec(n)||ct.exec(n));w=y?Number(y[1]):null;y=y?Number(y[2]):null;var z,C;if(z=dt(v,k,"extent"))z=(C=bt.exec(z))||ct.exec(z),null!=z&&(t.width=Number(z[1]),t.height=Number(z[2]),C||(null!=w&&(t.width=100*t.width/
  w),null!=y&&(t.height=100*t.height/y)),t.widthUnits=C||null!=w?Pe:0,t.heightUnits=C||null!=y?Pe:0);if(v=dt(v,k,"origin"))z=(C=bt.exec(v))||ct.exec(v),null!=z&&(t.viewportAnchorX=Number(z[1]),t.viewportAnchorY=Number(z[2]),C||(null!=y&&(t.viewportAnchorY=100*t.viewportAnchorY/y),null!=w&&(t.viewportAnchorX=100*t.viewportAnchorX/w)),t.viewportAnchorUnits=C||null!=w?Pe:0)}else t=null;t&&l.push(t)}if(Om(e,"p").length)throw new L(2,2,2001,"<p> can only be inside <div> in TTML");e=r(Om(e,"div"));for(n=
  e.next();!n.done;n=e.next()){n=n.value;if(Om(n,"span").length)throw new L(2,2,2001,"<span> can only be inside <p> in TTML");n=r(Om(n,"p"));for(p=n.next();!p.done;p=n.next())(p=et(p.value,b.periodStart,c,h,k,g,l,f,!1,m))&&d.push(p)}}return d};
  function et(a,b,c,d,e,f,g,h,k,l){var m=a.parentNode;if(a.nodeType==Node.TEXT_NODE){var n=document.createElement("span");n.textContent=a.textContent;a=n}h="default"==(a.getAttribute("xml:space")||(h?"default":"preserve"));n=/\S/.test(a.textContent);if(!(a.hasAttribute("begin")||a.hasAttribute("end")||a.hasAttribute("dur")||n||"br"==a.tagName||k&&!h))return null;var p=ft(a,c);n=p.start;for(p=p.end;m&&m.nodeType==Node.ELEMENT_NODE&&"tt"!=m.tagName;)p=gt(m,c,n,p),n=p.start,p=p.end,m=m.parentNode;null==
  n&&(n=0);n+=b;p=null==p?Infinity:p+b;if("br"==a.tagName)return d=new ze(n,p,""),d.lineBreak=!0,d;var t="";m=[];if(Array.from(a.childNodes).every(function(z){return z.nodeType==Node.TEXT_NODE}))t=a.textContent,h&&(t=t.trim(),t=t.replace(/\s+/g," "));else for(var v=r(a.childNodes),w=v.next();!w.done;w=v.next())(w=et(w.value,b,c,d,e,f,g,h,!0,l))&&m.push(w);b=new ze(n,p,t);b.nestedCues=m;l&&(b.cellResolution=l);if((f=ht(a,"region",f,"")[0])&&f.getAttribute("xml:id")){var y=f.getAttribute("xml:id");b.region=
  g.filter(function(z){return z.id==y})[0]}g=null;l=r(it);for(c=l.next();!c.done&&!(g=ht(a,"backgroundImage",d,"#",c.value)[0]);c=l.next());jt(b,a,f,g,e,k,0==m.length);return b}
  function jt(a,b,c,d,e,f,g){f=f||g;"rtl"==kt(b,c,e,"direction",f)&&(a.direction="rtl");g=kt(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=Ae);(g=kt(b,c,e,"textAlign",f))?(a.positionAlign=lt[g],a.lineAlign=mt[g],a.textAlign=Le[g.toUpperCase()]):a.textAlign="start";if(g=kt(b,c,e,"displayAlign",f))a.displayAlign=Me[g.toUpperCase()];if(g=kt(b,c,e,"color",f))a.color=g;if(g=kt(b,c,e,"backgroundColor",
  f))a.backgroundColor=g;if(g=kt(b,c,e,"border",f))a.border=g;if(g=kt(b,c,e,"fontFamily",f))a.fontFamily=g;(g=kt(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=kt(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=kt(b,c,e,"lineHeight",f))&&g.match(nt)&&(a.lineHeight=g);(g=kt(b,c,e,"fontSize",f))&&(g.match(nt)||g.match(ot))&&(a.fontSize=g);if(g=kt(b,c,e,"fontStyle",f))a.fontStyle=Oe[g.toUpperCase()];if(d){g=d.getAttribute("imagetype");var h=d.getAttribute("encoding");d=d.textContent.trim();
  "PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}(d=kt(b,c,e,"letterSpacing",f))&&d.match(nt)&&(a.letterSpacing=d);(d=kt(b,c,e,"linePadding",f))&&d.match(nt)&&(a.linePadding=d);if(f=kt(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=dt(c,e,"textDecoration"))&&pt(a,c);(b=qt(b,e,"textDecoration"))&&pt(a,b)}
  function pt(a,b){for(var c=r(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&Hc(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&Hc(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
  a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&Hc(a.textDecoration,"overline")}}function kt(a,b,c,d,e){e=void 0===e?!0:e;return(a=qt(a,c,d))?a:e?dt(b,c,d):null}function dt(a,b,c){if(!a)return null;var d=Sm(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:rt(a,b,c)}function qt(a,b,c){var d=Sm(a,"http://www.w3.org/ns/ttml#styling",c);return d?d:rt(a,b,c)}
  function rt(a,b,c){a=ht(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Sm(a[e],"urn:ebu:tt:style",c);f||(f=Sm(a[e],"http://www.w3.org/ns/ttml#styling",c));f||(f=qt(a[e],b,c));f&&(d=f)}return d}
  function ht(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?Sm(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=r(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=r(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function gt(a,b,c,d){a=ft(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
  function ft(a,b){var c=st(a.getAttribute("begin"),b),d=st(a.getAttribute("end"),b),e=st(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
  function st(a,b){var c=null;if(tt.test(a)){c=tt.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.b;f+=g/b.frameRate;c=f+60*e+3600*d}else if(ut.test(a))c=vt(ut,a);else if(wt.test(a))c=vt(wt,a);else if(xt.test(a))c=xt.exec(a),c=Number(c[1])/b.frameRate;else if(yt.test(a))c=yt.exec(a),c=Number(c[1])/b.a;else if(zt.test(a))c=vt(zt,a);else if(a)throw new L(2,2,2001,"Could not parse cue time range in TTML");return c}
  function vt(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}K("shaka.text.TtmlTextParser",$s);$s.prototype.parseMedia=$s.prototype.parseMedia;$s.prototype.parseInit=$s.prototype.parseInit;function at(a,b,c,d){this.frameRate=Number(a)||30;this.b=Number(b)||1;this.a=Number(d);0==this.a&&(this.a=a?this.frameRate*this.b:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
  var bt=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,ot=/^(\d{1,2}(?:\.\d+)?|100)%$/,nt=/^(\d+px|\d+em|\d*\.?\d+c)$/,ct=/^(\d+)px (\d+)px$/,tt=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ut=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,wt=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,xt=/^(\d*(?:\.\d*)?)f$/,yt=/^(\d*(?:\.\d*)?)t$/,zt=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,mt={left:Ge,center:"center",right:"end",start:Ge,end:"end"},lt=
  {left:"line-left",center:"center",right:"line-right"},it=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];mg["application/ttml+xml"]=function(){return new $s};function At(){this.j=new $s}At.prototype.parseInit=function(a){var b=!1;(new me).box("moov",qe).box("trak",qe).box("mdia",qe).box("minf",qe).box("stbl",qe).P("stsd",se).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new L(2,2,2007);};At.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new me).box("mdat",te(function(f){d=!0;e=e.concat(c.j.parseMedia(f,b))})).parse(a,!1);if(!d)throw new L(2,2,2007);return e};K("shaka.text.Mp4TtmlParser",At);At.prototype.parseMedia=At.prototype.parseMedia;
  At.prototype.parseInit=At.prototype.parseInit;mg['application/mp4; codecs="stpp"']=function(){return new At};mg['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new At};mg['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new At};function Bt(){}Bt.prototype.parseInit=function(){};
  Bt.prototype.parseMedia=function(a,b){var c=Xb(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new L(2,2,2E3);c=b.periodStart;if(d[0].includes("X-TIMESTAMP-MAP")){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=Ct(new Yo(e[1]));if(null==c)throw new L(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-c}}f=
  [];e=r(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new Yo(g);var h=new Be;ap(g);Zo(g);for(var k=ap(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
  (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");Zo(g);k=ap(g)}f.push(h)}e=new Map;g=[];d=r(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new ze(0,0,"");for(var n=!1,p=0;p<k.length;p++){var t=/^\s*([^:]+):\s*(.*)/.exec(k[p]);
  if(t){var v=t[2].trim().replace(";","");switch(t[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=Je;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=!0;m.opacity=parseFloat(v);
  break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new Yo(h[0]);m=Ct(k);t=$o(k,/[ \t]+--\x3e[ \t]+/g);n=Ct(k);if(null==m||null==t||null==n)throw new L(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=n,h.payload=""):h=new ze(m,n,"");
  Dt(p,h,e);Zo(k);for(m=ap(k);m;)Et(h,m,f),Zo(k),m=ap(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Dt(a,b,c){var d=dn("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=r(d);for(d=a.next();!d.done;d=a.next())Ft(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
  function Ft(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=r(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next())switch(g=g.value,d.has(g)&&(e=d.get(g).clone(),e.startTime=b.startTime,e.endTime=b.endTime,e.payload=""),g){case "b":e.fontWeight=700;break;case "i":e.fontStyle="italic";break;case "u":e.textDecoration.push("underline")}if(Um(a))e.payload=a.textContent,c.push(e);else for(a=r(a.childNodes),b=a.next();!b.done;b=a.next())Ft(b.value,e,c,d)}
  function Et(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=De:a.textAlign=Le[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
  b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Gt(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=Ne[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=Fe,a.line=Number(c[1]),c[2]&&(a.lineAlign=Ne[c[2].toUpperCase()])}function Gt(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
  function Ct(a){a=$o(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}K("shaka.text.VttTextParser",Bt);Bt.prototype.parseMedia=Bt.prototype.parseMedia;Bt.prototype.parseInit=Bt.prototype.parseInit;mg["text/vtt"]=function(){return new Bt};mg['text/vtt; codecs="vtt"']=function(){return new Bt};mg['text/vtt; codecs="wvtt"']=function(){return new Bt};function Ht(){this.a=null}Ht.prototype.parseInit=function(a){var b=this,c=!1;(new me).box("moov",qe).box("trak",qe).box("mdia",qe).P("mdhd",function(d){d=ag(d.reader,d.version);b.a=d.timescale}).box("minf",qe).box("stbl",qe).P("stsd",se).box("wvtt",function(){c=!0}).parse(a);if(!this.a)throw new L(2,2,2008);if(!c)throw new L(2,2,2008);};
  Ht.prototype.parseMedia=function(a,b){if(!this.a)throw new L(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new me).box("moof",qe).box("traf",qe).P("tfdt",function(B){g=!0;c=$f(B.reader,B.version).Yc}).P("tfhd",function(B){l=Zf(B.reader,B.flags).Ld}).P("trun",function(B){h=!0;d=bg(B.reader,B.version,B.flags).ce}).box("mdat",te(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new L(2,2,2008);for(var m=c,n=new R(e,0),p=r(d),t=p.next();!t.done;t=p.next()){t=t.value;var v=t.ud||l,w=t.yc?
  c+t.yc:m;m=w+(v||0);var y=0;do{var z=n.H();y+=z;var C=n.H(),E=null;"vttc"==ue(C)?8<z&&(E=n.Ta(z-8)):n.skip(z-8);v&&E&&(z=It(E,b.periodStart+w/this.a,b.periodStart+m/this.a),f.push(z))}while(t.sampleSize&&y<t.sampleSize)}return f.filter(Pb)};function It(a,b,c){var d,e,f;(new me).box("payl",te(function(g){d=Xb(g)})).box("iden",te(function(g){e=Xb(g)})).box("sttg",te(function(g){f=Xb(g)})).parse(a);return d?Jt(d,e,f,b,c):null}
  function Jt(a,b,c,d,e){d=new ze(d,e,"");Dt(a,d,new Map);b&&(d.id=b);if(c)for(a=new Yo(c),b=ap(a);b;)Et(d,b,[]),Zo(a),b=ap(a);return d}K("shaka.text.Mp4VttParser",Ht);Ht.prototype.parseMedia=Ht.prototype.parseMedia;Ht.prototype.parseInit=Ht.prototype.parseInit;mg['application/mp4; codecs="wvtt"']=function(){return new Ht};function Kt(){}Kt.prototype.parseInit=function(){};Kt.prototype.parseMedia=function(a){var b=Xb(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=r(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new Yo(c[0]),e=Lt(d),f=$o(d,/,/g);d=Lt(d);if(null==e||null==f||null==d)throw new L(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ze(e,d,c.slice(1).join("\n").trim()))}return a};
  function Lt(a){a=$o(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}K("shaka.text.SbvTextParser",Kt);Kt.prototype.parseMedia=Kt.prototype.parseMedia;Kt.prototype.parseInit=Kt.prototype.parseInit;mg["text/x-subviewer"]=function(){return new Kt};function Mt(){this.j=new Bt}Mt.prototype.parseInit=function(){};Mt.prototype.parseMedia=function(a,b){var c=Xb(a);c=Nt(c);c=qb(ac(c));return this.j.parseMedia(c,b)};function Nt(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=r(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}K("shaka.text.SrtTextParser",Mt);Mt.srt2webvtt=Nt;Mt.prototype.parseMedia=Mt.prototype.parseMedia;
  Mt.prototype.parseInit=Mt.prototype.parseInit;mg["text/srt"]=function(){return new Mt};function Ot(){}Ot.prototype.parseInit=function(){};
  Ot.prototype.parseMedia=function(a){var b="",c="";a=Xb(a).split(/\r?\n\s*\r?\n/);a=r(a);for(var d=a.next();!d.done;d=a.next()){var e=Pt.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=r(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Qt.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Rt);else if("Style"==e){e=f.split(Rt);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
  [];b=null;e={};c=r(c.split(/\r?\n/));for(f=c.next();!f.done;e={Pc:e.Pc},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Qt.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Rt);else if("Dialogue"==f){g=g.split(Rt);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=St(f.Start);var k=St(f.End);g=new ze(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.Pc=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.Pc}}(e)))&&Tt(g,f);d.push(g)}return d};
  function Tt(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Ut(c))a.color=c;if(c=b.BackColour)if(c=Ut(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=He;a.textAlign="start";break;case 2:a.displayAlign=He;a.textAlign=De;break;case 3:a.displayAlign=He;a.textAlign="end";
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=De;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=De;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
  function Ut(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function St(a){a=Vt.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}K("shaka.text.SsaTextParser",Ot);Ot.prototype.parseMedia=Ot.prototype.parseMedia;Ot.prototype.parseInit=Ot.prototype.parseInit;var Pt=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Qt=/^\s*([^:]+):\s*(.*)/,Rt=/\s*,\s*/,Vt=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
  mg["text/x-ssa"]=function(){return new Ot};/*
   @license
   EME Encryption Scheme Polyfill
   Copyright 2019 Google LLC
   SPDX-License-Identifier: Apache-2.0
  */
  function Wt(){}var Xt;function Yt(){Xt?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Xt=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Zt):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
  function Zt(a,b){var c=this,d;return J(function(e){if(1==e.a)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Xt.call(c,a,b),2);d=e.b;if($t(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Xt,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=au;return e["return"](au.call(c,
  a,b))})}
  function au(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return J(function(t){if(1==t.a){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=bu(a);e=[];f=r(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=cu(h.videoCapabilities,d),l=cu(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw n=Error("Unsupported keySystem or supportedConfigurations."),
  n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(t,Xt.call(c,a,e),2)}p=t.b;return t["return"](new du(p,d))})}function cu(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}K("EmeEncryptionSchemePolyfill",Wt);Wt.install=Yt;function eu(){}var fu;
  function gu(){fu?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(fu=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=hu):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
  function hu(a){var b=this,c,d;return J(function(e){if(1==e.a)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(e,fu.call(b,a),2);c=e.b;if(!a.keySystemConfiguration||!c.keySystemAccess)return e["return"](c);d=c.keySystemAccess;if($t(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=fu,e["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
  navigator.mediaCapabilities.decodingInfo=iu;return e["return"](iu.call(b,a))})}
  function iu(a){var b=this,c,d,e,f,g,h,k;return J(function(l){if(1==l.a)return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=bu(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?l["return"](h):u(l,fu.call(b,a),2);k=l.b;k.keySystemAccess&&(k.keySystemAccess=new du(k.keySystemAccess,
  c));return l["return"](k)})}K("McEncryptionSchemePolyfill",eu);eu.install=gu;function du(a,b){this.b=a;this.a=b;this.keySystem=a.keySystem}du.prototype.getConfiguration=function(){var a=this.b.getConfiguration();if(a.videoCapabilities)for(var b=r(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.a;if(a.audioCapabilities)for(b=r(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.a;return a};du.prototype.createMediaKeys=function(){return this.b.createMediaKeys()};
  function bu(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function $t(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function ju(){}
  function Vr(){Yt();gu()}K("EncryptionSchemePolyfills",ju);ju.install=Vr;"undefined"!==typeof module&&module.exports&&(module.exports=ju);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
  
  //# sourceMappingURL=shaka-player.compiled.map