/*
 @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 aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}}
fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(f||"")+"_"+e++,f)}function c(f,g){this.g=f;ca(this,"description",{configurable:!0,writable:!0,value:g})}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");}function y(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ia="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ja;
if("function"==typeof Object.setPrototypeOf)ja=Object.setPrototypeOf;else{var ka;a:{var la={a:!0},ma={};try{ma.__proto__=la;ka=ma.a;break a}catch(a){}ka=!1}ja=ka?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var na=ja;
function oa(a,b){a.prototype=ia(b.prototype);a.prototype.constructor=a;if(na)na(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Om=b.prototype}function pa(){this.s=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.B=this.i=null}function sa(a){if(a.s)throw new TypeError("Generator is already running");a.s=!0}pa.prototype.u=function(a){this.h=a};
function ta(a,b){a.i={Zh:b,mi:!0};a.g=a.m||a.j}pa.prototype.return=function(a){this.i={return:a};this.g=this.j};function H(a,b,c){a.g=c;return{value:b}}pa.prototype.A=function(a){this.g=a};function I(a){a.g=0}function va(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function wa(a,b){a.m=0;a.j=b||0}function xa(a,b,c){a.g=b;a.m=c||0}function za(a,b){a.m=b||0;b=a.i.Zh;a.i=null;return b}function Ca(a){a.B=[a.i];a.m=0;a.j=0}
function Da(a,b){var c=a.B.splice(0)[0];(c=a.i=a.i||c)?c.mi?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function Fa(a){this.g=new pa;this.h=a}function Ga(a,b){sa(a.g);var c=a.g.l;if(c)return Ha(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g.return);a.g.return(b);return Ja(a)}
function Ha(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.s=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Ja(a)}a.g.l=null;d.call(a.g,f);return Ja(a)}function Ja(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.s=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.s=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.mi)throw b.Zh;return{value:b.return,done:!0}}return{value:void 0,done:!0}}
function Ka(a){this.next=function(b){sa(a.g);a.g.l?b=Ha(a,a.g.l.next,b,a.g.u):(a.g.u(b),b=Ja(a));return b};this.throw=function(b){sa(a.g);a.g.l?b=Ha(a,a.g.l["throw"],b,a.g.u):(ta(a.g,b),b=Ja(a));return b};this.return=function(b){return Ga(a,b)};this[Symbol.iterator]=function(){return this}}function La(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 Q(a){return La(new Ka(new Fa(a)))}function Na(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.H),reject:g(this.l)}};b.prototype.H=function(g){if(g===this)this.l(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.G(g):this.m(g)}};
b.prototype.G=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.K(h,g):this.m(g)};b.prototype.l=function(g){this.u(2,g)};b.prototype.m=function(g){this.u(1,g)};b.prototype.u=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.I();this.B()};b.prototype.I=function(){var g=this;e(function(){if(g.C()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
function(){if(this.s)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.B=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
b.prototype.J=function(g){var h=this.j();g.He(h.resolve,h.reject)};b.prototype.K=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,r){return"function"==typeof p?function(u){try{l(p(u))}catch(v){m(v)}}:r}var l,m,n=new b(function(p,r){l=p;m=r});this.He(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.He=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.s=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).He(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(u){return function(v){p[u]=v;r--;0==r&&l(p)}}var p=[],r=0;do p.push(void 0),r++,d(k.value).He(n(p.length-1),m),k=h.next();
while(!k.done)})};return b});function Oa(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Oa(k,g)){var l=new c;ca(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
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(!Oa(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Oa(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&Oa(k,
g)&&Oa(k[g],this.g)};b.prototype.delete=function(k){return d(k)&&Oa(k,g)&&Oa(k[g],this.g)?delete k[g][this.g]:!1};return b});
fa("Map",function(a){function b(){var h={};return h.rc=h.next=h.head=h}function c(h,k){var l=h[1];return ha(function(){if(l){for(;l.head!=h[1];)l=l.rc;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[0][l];if(m&&Oa(h[0],l))for(h=0;h<m.length;h++){var n=m[h];if(k!==k&&n.key!==n.key||k===n.key)return{id:l,list:m,index:h,entry:n}}return{id:l,
list:m,index:-1,entry:void 0}}function e(h){this[0]={};this[1]=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=
m.value[0].x||"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[0][l.id]=[]);l.entry?l.entry.value=k:(l.entry={next:this[1],rc:this[1].rc,head:this[1],key:h,value:k},l.list.push(l.entry),this[1].rc.next=l.entry,this[1].rc=l.entry,this.size++);return this};e.prototype.delete=function(h){h=d(this,h);return h.entry&&h.list?(h.list.splice(h.index,1),h.list.length||delete this[0][h.id],h.entry.rc.next=
h.entry.next,h.entry.next.rc=h.entry.rc,h.entry.head=null,this.size--,!0):!1};e.prototype.clear=function(){this[0]={};this[1]=this[1].rc=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).entry};e.prototype.get=function(h){return(h=d(this,h).entry)&&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});function Pa(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Pa(this,function(b){return b})}});
fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype.delete=function(c){c=this.g.delete(c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;b.prototype[Symbol.iterator]=
b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});fa("Array.prototype.values",function(a){return a?a:function(){return Pa(this,function(b,c){return c})}});
fa("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;g<f;g++)e.push(c.call(d,b[g],g));return e}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});function Qa(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+""}
fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==Qa(this,b,"includes").indexOf(b,c||0)}});fa("String.fromCodePoint",function(a){return a?a:function(b){for(var c="",d=0;d<arguments.length;d++){var e=Number(arguments[d]);if(0>e||1114111<e||e!==Math.floor(e))throw new RangeError("invalid_code_point "+e);65535>=e?c+=String.fromCharCode(e):(e-=65536,c+=String.fromCharCode(e>>>10&1023|55296),c+=String.fromCharCode(e&1023|56320))}return c}});
function Sa(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{ki:e,v:f}}return{ki:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Sa(this,b,c).ki}});
fa("WeakSet",function(a){function b(c){this.g=new WeakMap;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}}if(function(){if(!a||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new a([c]);if(!e.has(c)||e.has(d))return!1;e.delete(c);e.add(d);return!e.has(c)&&e.has(d)}catch(f){return!1}}())return a;b.prototype.add=function(c){this.g.set(c,!0);return this};b.prototype.has=function(c){return this.g.has(c)};b.prototype.delete=function(c){return this.g.delete(c)};return b});
fa("Array.prototype.find",function(a){return a?a:function(b,c){return Sa(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=Qa(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});fa("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)Oa(b,d)&&c.push([d,b[d]]);return c}});
var Ta="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)Oa(d,e)&&(a[e]=d[e])}return a};fa("Object.assign",function(a){return a||Ta});fa("Promise.prototype.finally",function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
fa("Array.prototype.entries",function(a){return a?a:function(){return Pa(this,function(b,c){return[b,c]})}});fa("Number.isNaN",function(a){return a?a:function(b){return"number"===typeof b&&isNaN(b)}});fa("String.prototype.repeat",function(a){return a?a:function(b){var c=Qa(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=1)c+=c;return d}});fa("Number.EPSILON",function(){return Math.pow(2,-52)});
fa("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991});fa("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});fa("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)Oa(b,d)&&c.push(b[d]);return c}});fa("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});
fa("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=Qa(this,b,"endsWith");void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=e}});fa("Math.trunc",function(a){return a?a:function(b){b=Number(b);if(isNaN(b)||Infinity===b||-Infinity===b||0===b)return b;var c=Math.floor(Math.abs(b));return 0>b?-c:c}});function Ua(a){a=Math.trunc(a)||0;0>a&&(a+=this.length);if(!(0>a||a>=this.length))return this[a]}
fa("Array.prototype.at",function(a){return a?a:Ua});function Wa(a){return a?a:Ua}fa("Int8Array.prototype.at",Wa);fa("Uint8Array.prototype.at",Wa);fa("Uint8ClampedArray.prototype.at",Wa);fa("Int16Array.prototype.at",Wa);fa("Uint16Array.prototype.at",Wa);fa("Int32Array.prototype.at",Wa);fa("Uint32Array.prototype.at",Wa);fa("Float32Array.prototype.at",Wa);fa("Float64Array.prototype.at",Wa);fa("String.prototype.at",function(a){return a?a:Ua});var Xa=this||self;
function S(a,b){a=a.split(".");var c=Xa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Ya(){}function Za(){};function T(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
function $a(a){var b=new T(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}T.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};T.prototype.stopImmediatePropagation=function(){this.g=!0};T.prototype.stopPropagation=function(){};S("shaka.util.FakeEvent",T);
var ab={Jl:"abrstatuschanged",Kl:"adaptation",Ll:"audiotrackchanged",Ml:"audiotrackschanged",Nl:"boundarycrossed",Ol:"buffering",Pl:"complete",Ql:"downloadcompleted",Rl:"downloadfailed",Sl:"downloadheadersreceived",Tl:"drmsessionupdate",Vl:"emsg",pm:"prft",Error:"error",Wl:"expirationupdated",Xl:"firstquartile",Yl:"gapjumped",am:"keystatuschanged",em:"loaded",fm:"loading",hm:"manifestparsed",im:"manifestupdated",jm:"mediaqualitychanged",lm:"mediasourcerecovered",Metadata:"metadata",mm:"midpoint",
nm:"nospatialvideoinfo",om:"onstatechange",qm:"ratechange",sm:"segmentappended",tm:"sessiondata",um:"spatialvideoinfo",vm:"stalldetected",wm:"started",xm:"statechanged",ym:"streaming",zm:"textchanged",Am:"texttrackvisibility",Bm:"thirdquartile",Cm:"timelineregionadded",Dm:"timelineregionenter",Em:"timelineregionexit",Fm:"trackschanged",Hm:"unloading",Jm:"variantchanged"};function bb(){}function cb(){}function db(){}function eb(a){var b=Na.apply(1,arguments);fb.has(a)||(fb.add(a),db.apply(bb,y(b)))}function gb(){}function hb(){}function kb(){}var fb=new Set;
window.console&&((new Map).set(1,function(){return console.error.apply(console,y(Na.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,y(Na.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,y(Na.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,y(Na.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,y(Na.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,y(Na.apply(0,arguments)))}),
db=function(){return console.warn.apply(console,y(Na.apply(0,arguments)))},cb=function(){console.error.apply(console,y(Na.apply(0,arguments)))});function lb(){this.g=new Map}q=lb.prototype;q.push=function(a,b){this.g.has(a)?this.g.get(a).push(b):this.g.set(a,[b])};q.get=function(a){return this.g.has(a)?this.g.get(a).slice():null};q.remove=function(a,b){if(this.g.has(a)){var c=this.g.get(a).filter(function(d){return d!=b});this.g.set(a,c);c.length||this.g.delete(a)}};q.forEach=function(a){this.g.forEach(function(b,c){a(c,b)})};q.size=function(){return this.g.size};q.keys=function(){return Array.from(this.g.keys())};function mb(){this.Na=new lb;this.xe=this}mb.prototype.addEventListener=function(a,b){this.Na&&this.Na.push(a,b)};mb.prototype.removeEventListener=function(a,b){this.Na&&this.Na.remove(a,b)};mb.prototype.dispatchEvent=function(a){if(!this.Na)return!0;var b=this.Na.get(a.type)||[],c=this.Na.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.xe;a.currentTarget=this.xe;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
mb.prototype.release=function(){this.Na=null};function nb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())c.push(b(d.value));return c}function ob(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b(c.value))return!1;return!0}function pb(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(b(c.value))return!0;return!1}function rb(a,b){var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,b(d)&&c.push(d);return c};/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var sb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
function tb(a){var b;a instanceof tb?(ub(this,a.ec),this.gd=a.gd,wb(this,a.Eb),xb(this,a.Cd),this.sb=a.sb,yb(this,a.g.clone()),this.Pc=a.Pc):a&&(b=String(a).match(sb))?(ub(this,b[1]||"",!0),this.gd=zb(b[2]||""),wb(this,b[3]||"",!0),xb(this,b[4]),this.sb=zb(b[5]||"",!0),yb(this,b[6]||"",!0),this.Pc=zb(b[7]||"")):this.g=new Ab(null)}q=tb.prototype;q.ec="";q.gd="";q.Eb="";q.Cd=null;q.sb="";q.Pc="";
q.toString=function(){var a=[],b=this.ec;b&&a.push(Bb(b,Cb,!0),":");if(b=this.Eb){a.push("//");var c=this.gd;c&&a.push(Bb(c,Cb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Cd;null!=b&&a.push(":",String(b))}if(b=this.sb)this.Eb&&"/"!=b.charAt(0)&&a.push("/"),a.push(Bb(b,"/"==b.charAt(0)?Db:Eb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.Pc)&&a.push("#",Bb(b,Gb));return a.join("")};
q.resolve=function(a){var b=this.clone();"data"===b.ec&&(b=new tb);var c=!!a.ec;c?ub(b,a.ec):c=!!a.gd;c?b.gd=a.gd:c=!!a.Eb;c?wb(b,a.Eb):c=null!=a.Cd;var d=a.sb;if(c)xb(b,a.Cd);else if(c=!!a.sb){if("/"!=d.charAt(0))if(this.Eb&&!this.sb)d="/"+d;else{var e=b.sb.lastIndexOf("/");-1!=e&&(d=b.sb.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.sb=d:c=""!==a.g.toString();c?yb(b,a.g.clone()):c=!!a.Pc;c&&(b.Pc=a.Pc);return b};q.clone=function(){return new tb(this)};function ub(a,b,c){a.ec=c?zb(b,!0):b;a.ec&&(a.ec=a.ec.replace(/:$/,""))}function wb(a,b,c){a.Eb=c?zb(b,!0):b}function xb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Cd=b}else a.Cd=null}
function yb(a,b,c){b instanceof Ab?a.g=b:(c||(b=Bb(b,Hb)),a.g=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,Ib),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Ib(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Cb=/[#\/\?@]/g,Eb=/[#\?:]/g,Db=/[#\?]/g,Hb=/[#\?@]/g,Gb=/#/g;function Ab(a){this.g=a||null}
function Jb(a){if(!a.kb&&(a.kb=new Map,a.Nd=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}q=Ab.prototype;q.kb=null;q.Nd=null;function Kb(a){Jb(a);return a.Nd}q.add=function(a,b){Jb(this);this.g=null;var c=this.kb.has(a)?this.kb.get(a):null;c||this.kb.set(a,c=[]);c.push(b);this.Nd++;return this};
q.set=function(a,b){Jb(this);this.g=null;this.kb.has(a)?this.kb.set(a,[b]):this.add(a,b);return this};q.get=function(a){Jb(this);return this.kb.get(a)||[]};q.toString=function(){if(this.g)return this.g;if(!this.kb||!this.kb.size)return"";for(var a=[],b=t(this.kb.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=encodeURIComponent(d);d=this.kb.get(d);for(var e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}}return this.g=a.join("&")};
q.clone=function(){var a=new Ab;a.g=this.g;if(this.kb){for(var b=new Map,c=t(this.kb),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;b.set(d,e.concat())}a.kb=b;a.Nd=this.Nd}return a};function Lb(){}function Mb(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!=b.byteLength)return!1;if((ArrayBuffer.isView(a)?a.buffer:a)==(ArrayBuffer.isView(b)?b.buffer:b)&&(a.byteOffset||0)==(b.byteOffset||0))return!0;var c=Nb(a);b=Nb(b);for(var d=0;d<a.byteLength;d++)if(c[d]!=b[d])return!1;return!0}function Ob(a){return ArrayBuffer.isView(a)?0==a.byteOffset&&a.byteLength==a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer:a}
function Nb(a,b,c){c=void 0===c?Infinity:c;return Pb(a,void 0===b?0:b,c,Uint8Array)}function Qb(a,b,c){c=void 0===c?Infinity:c;return Pb(a,void 0===b?0:b,c,Uint16Array)}function Rb(a,b,c){c=void 0===c?Infinity:c;return Pb(a,void 0===b?0:b,c,DataView)}
function Pb(a,b,c,d){var e=ArrayBuffer.isView(a)?a.buffer:a,f=1;"BYTES_PER_ELEMENT"in d&&(f=d.BYTES_PER_ELEMENT);var g=((a.byteOffset||0)+a.byteLength)/f;a=Math.floor(Math.max(0,Math.min(((a.byteOffset||0)+b)/f,g)));return new d(e,a,Math.floor(Math.min(a+Math.max(c,0),g))-a)}S("shaka.util.BufferUtils",Lb);Lb.toDataView=Rb;Lb.toUint16=Qb;Lb.toUint8=Nb;Lb.toArrayBuffer=Ob;Lb.equal=Mb;function V(a,b,c){var d=Na.apply(3,arguments);this.severity=a;this.category=b;this.code=c;this.data=d;this.handled=!1;this.message="Shaka Error "+this.code;if(Sb)try{throw Error(this.message||"Shaka Error");}catch(e){this.stack=e.stack}}V.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")};S("shaka.util.Error",V);var Sb=!0;V.Severity={RECOVERABLE:1,CRITICAL:2};V.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10};
V.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,
CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,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,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,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_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,
HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,
AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,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,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,
PRELOAD_DESTROYED:7006,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,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1E4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Tb(a){this.h=a;this.g=void 0}Tb.prototype.value=function(){void 0===this.g&&(this.g=this.h());return this.g};function Ub(a,b){return a.length&&b.length&&a!==b?0<Vb(a,b).length:!0}
function Vb(a,b){if(!a.length)return b;if(!b.length)return a;var c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.keySystem==f.keySystem){e=new Map;for(var g=t((d.initData||[]).concat(f.initData||[])),h=g.next();!h.done;h=g.next())h=h.value,e.set(h.keyId,h);e=Array.from(e.values());g=d.keyIds&&f.keyIds?new Set([].concat(y(d.keyIds),y(f.keyIds))):d.keyIds||f.keyIds;c.push({keySystem:d.keySystem,licenseServerUri:d.licenseServerUri||
f.licenseServerUri,distinctiveIdentifierRequired:d.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:d.persistentStateRequired||f.persistentStateRequired,videoRobustness:d.videoRobustness||f.videoRobustness,audioRobustness:d.audioRobustness||f.audioRobustness,serverCertificate:d.serverCertificate||f.serverCertificate,serverCertificateUri:d.serverCertificateUri||f.serverCertificateUri,initData:e,keyIds:g});break}}return c}
function Wb(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Xb(a){return a?!!a.match(/^com\.apple\.fps/):!1}var Yb=new Tb(function(){return Ob(new Uint8Array([0]))}),Zb=new Map;function ac(a){this.h=a;this.g=null}ac.prototype.$=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};ac.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function bc(a){this.h=a;this.g=null}bc.prototype.Ia=function(){this.stop();this.h();return this};bc.prototype.$=function(a){var b=this;this.stop();this.g=(new ac(function(){b.h()})).$(a);return this};bc.prototype.xa=function(a){var b=this;this.stop();this.g=(new ac(function(){b.g.$(a);b.h()})).$(a);return this};bc.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};S("shaka.util.Timer",bc);bc.prototype.stop=bc.prototype.stop;bc.prototype.tickEvery=bc.prototype.xa;
bc.prototype.tickAfter=bc.prototype.$;bc.prototype.tickNow=bc.prototype.Ia;function cc(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.isTypeSupported?!0:!1}function dc(a){return""!=ec().canPlayType(a)}function fc(){return navigator.userAgent.match(/Edge?\//)?!0:!1}function gc(){return hc("Xbox One")}function ic(){return hc("Tizen")}function jc(){return hc("Tizen 3")}function kc(){return hc("Web0S")}function lc(){return kc()&&38===mc()}function nc(){return hc("CrKey")&&!hc("VIZIO SmartCast")}
function mc(){if(!hc("Chrome")||navigator.userAgent.match(/Edge\//))return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null}function oc(){return pc()&&(qc()||rc())}function sc(){return hc("PlayStation 5")}function tc(){return hc("PlayStation 4")}function uc(){return hc("Hisense")||hc("VIDAA")}
function vc(){if(!oc()&&(!pc()||oc()))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 rc(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?!0:pc()&&1<navigator.maxTouchPoints}
function qc(){return navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1}function wc(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}
function xc(){return navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase():hc("Android")}function yc(){return navigator.userAgentData&&navigator.userAgentData.platform?"fuchsia"==navigator.userAgentData.platform.toLowerCase():hc("Fuchsia")}function zc(){return ic()||kc()||gc()||tc()||sc()||nc()||uc()||hc("VIZIO SmartCast")||pc()&&!oc()?!0:!1}function hc(a){return(navigator.userAgent||"").includes(a)}
function pc(){return(navigator.vendor||"").includes("Apple")}function ec(){if(Ac)return Ac;Bc||(Bc=new bc(function(){Ac=null}));(Ac=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ac=document.createElement("video"));Bc.$(1);return Ac}function Cc(){if(jc()||hc("Tizen 2")||lc()||tc()||sc())return!1;var a=vc();return pc()&&!oc()&&null!=a&&15>a?!1:!0}
function Dc(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w;return Q(function(x){switch(x.g){case 1:a={width:Infinity,height:Infinity};if(nc()){r=window.cast&&cast.__platform__&&cast.__platform__.canDisplayType;a.width=1280;a.height=720;va(x,14);if(!(u=r)){x.A(16);break}return H(x,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),17)}if(ic()){b=window.devicePixelRatio;a.width=1920<window.screen.width*b?3840:1920;a.height=1080<window.screen.height*b?2160:1080;try{webapis.systeminfo&&
webapis.systeminfo.getMaxVideoResolution?(c=webapis.systeminfo.getMaxVideoResolution(),a.width=c.width,a.height=c.height):webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(a.width=7680,a.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(a.width=3840,a.height=2160)}catch(z){db("Tizen: Error detecting screen size, default screen size 1920x1080.")}x.A(3);break}if(kc()){try{d=JSON.parse(window.PalmSystem.deviceInfo),a.width=
Math.max(1920,d.screenWidth),a.height=Math.max(1080,d.screenHeight)}catch(z){db("WebOS: Error detecting screen size, default screen size 1920x1080."),a.width=1920,a.height=1080}x.A(3);break}if(uc()){e=null;if(window.Hisense_Get4KSupportState)try{e=window.Hisense_Get4KSupportState()}catch(z){}null==e&&(e=hc("UHD"));e?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);x.A(3);break}if(!tc()&&!sc()){f=void 0;try{f="undefined"!==typeof Windows?Windows:chrome.webview.hostObjects.sync.Windows}catch(z){}if(f){a.width=
1920;a.height=1080;try{g=new f.Media.Protection.ProtectionCapabilities;h=f.Media.Protection.ProtectionCapabilityResult;k=null;do k=g.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(k===h.maybe);k===h.probably&&(a.width=3840,a.height=2160)}catch(z){db("Xbox: Error detecting screen size, default screen size 1920x1080.")}}else gc()&&
(a.width=1920,a.height=1080,db("Xbox: Error detecting screen size, default screen size 1920x1080."));x.A(3);break}l=!1;va(x,8);return H(x,window.msdk.device.getDisplayInfo(),10);case 10:m=x.h;l="4K"===m.resolution;xa(x,9);break;case 8:return za(x),va(x,11),H(x,window.msdk.device.getDisplayInfoImmediate(),13);case 13:n=x.h;l="4K"===n.resolution;xa(x,9);break;case 11:p=za(x),db("PlayStation: Failed to get the display info:",p);case 9:l?(a.width=3840,a.height=2160):(a.width=1920,a.height=1080);x.A(3);
break;case 17:u=x.h;case 16:if(u){a.width=3840;a.height=2160;x.A(18);break}if(!(v=r)){x.A(19);break}return H(x,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),20);case 20:v=x.h;case 19:v&&(a.width=1920,a.height=1080);case 18:xa(x,3);break;case 14:w=za(x),cb("Failed to check canDisplayType:",w);case 3:return x.return(a)}})}function Ec(a){return void 0!==window.matchMedia&&window.matchMedia("(color-gamut: p3)").matches?a?"HLG":"PQ":"SDR"}var Bc=null,Ac=null;function Fc(){}
function Gc(a){if(!a)return"";a=Nb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!tc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&cb('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
(a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
function Hc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new V(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Rb(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Ic(d)}
function Jc(a){function b(d){return c.byteLength<=d||9<=c[d]&&126>=c[d]}if(!a)return"";var c=Nb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Gc(c);if(254==c[0]&&255==c[1])return Hc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Hc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Hc(a,!1);if(0==c[1]&&0==c[3])return Hc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Gc(a);throw new V(2,2,2003);}
function Kc(a){if(window.TextEncoder&&!tc()){var b=new TextEncoder;return Ob(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Ob(b)}function Lc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function Ic(a){return Mc.value()(a)}
function Nc(a){var b={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":"\u00a0","&lrm;":"\u200e","&rlm;":"\u200f"},c=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return"#"==e[1]?(e="x"==e[2]||"X"==e[2]?parseInt(e.substring(3),16):parseInt(e.substring(2),10),0<=e&&1114111>=e?String.fromCodePoint(e):""):b[e]||"'"}):a||""}S("shaka.util.StringUtils",Fc);Fc.resetFromCharCode=function(){Mc.g=void 0};
Fc.toUTF16=Lc;Fc.toUTF8=Kc;Fc.fromBytesAutoDetect=Jc;Fc.fromUTF16=Hc;Fc.fromUTF8=Gc;var Mc=new Tb(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={Gc:65536};0<b.Gc;b={Gc:b.Gc},b.Gc/=2)if(a(b.Gc))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Gc)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Gc));return e}}(b);return null});function Oc(){}function Pc(a){a=Ic(Nb(a));return btoa(a)}function Qc(a,b){b=void 0==b?!0:b;a=Pc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")}function Rc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Sc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
function Tc(a){var b=Nb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Uc(){for(var a=Na.apply(0,arguments),b=0,c=0;c<a.length;++c)b+=a[c].byteLength;b=new Uint8Array(b);for(var d=c=0;d<a.length;++d){var e=a[d];ArrayBuffer.isView(e)&&1===e.BYTES_PER_ELEMENT?b.set(e,c):b.set(Nb(e),c);c+=e.byteLength}return b}S("shaka.util.Uint8ArrayUtils",Oc);Oc.concat=Uc;Oc.toHex=Tc;Oc.fromHex=Sc;Oc.fromBase64=Rc;Oc.toBase64=Qc;
Oc.toStandardBase64=Pc;function Vc(a,b,c){c=void 0===c?"":c;if(0==b.length)return a;if(1==a.length&&1==b.length){var d=new tb(a[0]);b=new tb(b[0]);b=d.resolve(b);c&&yb(b,c);return[b.toString()]}b=b.map(function(h){return new tb(h)});d=[];a=t(a);for(var e=a.next();!e.done;e=a.next()){e=new tb(e.value);for(var f=t(b),g=f.next();!g.done;g=f.next())g=e.resolve(g.value),c&&yb(g,c),d.push(g.toString())}return d}
function Wc(a,b,c,d){a={keySystem:a,encryptionScheme:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:c||[],keyIds:new Set};d&&(a.keySystemUris=new Set([d]));return a}
function Xc(a,b){b=void 0===b?"cenc":b;var c=[],d=[],e=[];a.forEach(function(g,h){var k=h;22!=k.length&&(k=Qc(Sc(h),!1));var l=g;22!=l.length&&(l=Qc(Sc(g),!1));g={kty:"oct",kid:k,k:l};c.push(g);d.push(g.kid);e.push(h)});a=JSON.stringify({keys:c});var f=JSON.stringify({kids:d});f=[{initData:Nb(Kc(f)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",encryptionScheme:b,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,
audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:f,keyIds:new Set(e)}}function Yc(a,b){if(1==b.length)return b[0];a=Zc(a,b);if(null!=a)return a;throw new V(2,4,4025,b);}function Zc(a,b){var c=ad.get(a);c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==bd?"":null}
function cd(a,b){var c=[];a=ad.get(a);a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())f=f.value,d.test(f.trim())&&c.push(f.trim())}return c}
var bd="text",dd={Ba:"video",aa:"audio",Ra:bd,Qf:"image",Hl:"application"},ed=1/15,ad=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function fd(){}function gd(a,b){a=hd(a);b=hd(b);return a.split("-")[0]==b.split("-")[0]}function id(a,b){a=hd(a);b=hd(b);a=a.split("-");b=b.split("-");return a[0]==b[0]&&1==a.length&&2==b.length}function jd(a,b){a=hd(a);b=hd(b);a=a.split("-");b=b.split("-");return 2==a.length&&2==b.length&&a[0]==b[0]}
function hd(a){a=t(a.split("-x-"));var b=a.next().value;b=void 0===b?"":b;a=a.next().value;a=void 0===a?"":a;var c=t(b.split("-"));b=c.next().value;b=void 0===b?"":b;c=c.next().value;c=void 0===c?"":c;a=a?"x-"+a:"";b=b.toLowerCase();b=kd.get(b)||b;c=c.toUpperCase();return(c?b+"-"+c:b)+(a?"-"+a:"")}function md(a,b){var c=nd(a),d=nd(b);return a!=c&&b!=d&&c==d}function od(a,b){a=hd(a);b=hd(b);return b==a?4:id(b,a)?3:jd(b,a)?2:id(a,b)?1:0}
function nd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=kd.get(a)||a}function pd(a){return a.language?hd(a.language):a.audio&&a.audio.language?hd(a.audio.language):a.video&&a.video.language?hd(a.video.language):"und"}
function qd(a,b){a=hd(a);var c=new Set;b=t(b);for(var d=b.next();!d.done;d=b.next())c.add(hd(d.value));b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,d==a)return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,id(d,a))return d;b=t(c);for(d=b.next();!d.done;d=b.next())if(d=d.value,jd(d,a))return d;c=t(c);for(b=c.next();!b.done;b=c.next())if(b=b.value,id(a,b))return b;return null}S("shaka.util.LanguageUtils",fd);fd.findClosestLocale=qd;fd.getLocaleForVariant=pd;
fd.getLocaleForText=function(a){return hd(a.language||"und")};fd.getBase=nd;fd.relatedness=od;fd.areSiblings=md;fd.normalize=hd;fd.isSiblingOf=jd;fd.isParentOf=id;fd.areLanguageCompatible=gd;fd.areLocaleCompatible=function(a,b){a=hd(a);b=hd(b);return a==b};
var kd=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 rd(a){mb.call(this);this.j=hd(a);this.i=new Map;this.g=new Set;this.h=new Map}oa(rd,mb);q=rd.prototype;q.release=function(){mb.prototype.release.call(this)};
q.Qh=function(a){var b=this;this.g.clear();a=t(a);for(var c=a.next();!c.done;c=a.next())this.g.add(hd(c.value));sd(this);a=rb(this.g,function(d){return!b.h.has(d)});a.length&&this.dispatchEvent(new T("unknown-locales",(new Map).set("locales",a)));a=rb(this.g,function(d){return b.h.has(d)});a=(new Map).set("locales",a.length?a:[this.j]);this.dispatchEvent(new T("locale-changed",a))};
q.Ua=function(a,b,c){a=hd(a);void 0===c&&(c=td);var d=this.h.get(a)||new Map;b.forEach(function(e,f){d.has(f)&&c!=td||d.set(f,e)});this.h.set(a,d);sd(this);this.dispatchEvent(new T("locale-updated"));return this};q.hl=function(a){for(var b=t(a.keys()),c=b.next();!c.done;c=b.next())c=c.value,a.set(c,this.resolve(c))};q.resolve=function(a){var b=this.i.get(a);if(b)return b;a=(new Map).set("locales",Array.from(this.g)).set("missing",a);this.dispatchEvent(new T("unknown-localization",a));return""};
q.Kj=function(){return this.g};
function sd(a){for(var b=a.h,c=a.j,d=a.g,e=new Set,f=t(d),g=f.next(),h={};!g.done;h={ae:void 0},g=f.next()){h.ae=g.value;e.add(h.ae);e.add(nd(h.ae));g=rb(b.keys(),function(l){return function(m){return md(m,l.ae)}}(h));g.sort();g=t(g);for(var k=g.next();!k.done;k=g.next())e.add(k.value);h=rb(b.keys(),function(l){return function(m){return nd(m)==l.ae}}(h));h.sort();h=t(h);for(g=h.next();!g.done;g=h.next())e.add(g.value)}e.add(c);c=[];e=t(e);for(f=e.next();!f.done;f=e.next())(f=b.get(f.value))&&c.push(f);
c.reverse();a.i.clear();b=t(c);for(e=b.next();!e.done;e=b.next())e.value.forEach(function(l,m){a.i.set(m,l)});b=a.i.keys();e=new Set;c=t(a.g);for(f=c.next();!f.done;f=c.next())f=a.h.get(f.value)||new Map,ud(f,b,e);0<e.size&&(d=(new Map).set("locales",Array.from(d)).set("missing",Array.from(e)),a.dispatchEvent(new T("missing-localizations",d)))}function ud(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,a.get(d)||c.add(d)}S("shaka.ui.Localization",rd);rd.prototype.getCurrentLocales=rd.prototype.Kj;
rd.prototype.resolve=rd.prototype.resolve;rd.prototype.resolveDictionary=rd.prototype.hl;rd.prototype.insert=rd.prototype.Ua;rd.prototype.changeLocale=rd.prototype.Qh;rd.prototype.release=rd.prototype.release;var td=1;rd.ConflictResolution={USE_OLD:0,USE_NEW:td};rd.UNKNOWN_LOCALES="unknown-locales";rd.UNKNOWN_LOCALIZATION="unknown-localization";rd.MISSING_LOCALIZATIONS="missing-localizations";rd.LOCALE_CHANGED="locale-changed";rd.LOCALE_UPDATED="locale-updated";function vd(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}vd.prototype.sample=function(a,b){var c=Math.pow(this.g,a);b=b*(1-c)+c*this.h;isNaN(b)||(this.h=b,this.i+=a)};function xd(a){return a.h/(1-Math.pow(a.g,a.i))};function yd(){this.h=new vd(2);this.j=new vd(5);this.g=0;this.i=128E3;this.l=16E3}yd.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};yd.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a;a/=1E3;this.g+=b;this.h.sample(a,c);this.j.sample(a,c)}};yd.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(xd(this.h),xd(this.j))};function zd(){this.g=new lb}q=zd.prototype;q.release=function(){this.ab();this.g=null};q.o=function(a,b,c,d){this.g&&(a=new Ad(a,b,c,d),this.g.push(b,a))};q.ra=function(a,b,c,d){function e(g){f.Ea(a,b,e);c(g)}var f=this;this.o(a,b,e,d)};q.Ea=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.Ea(),this.g.remove(b,e))}};
q.ab=function(){if(this.g){for(var a=[],b=t(this.g.g.values()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value));a=t(a);for(b=a.next();!b.done;b=a.next())b.value.Ea();this.g.g.clear()}};S("shaka.util.EventManager",zd);zd.prototype.removeAll=zd.prototype.ab;zd.prototype.unlisten=zd.prototype.Ea;zd.prototype.listenOnce=zd.prototype.ra;zd.prototype.listen=zd.prototype.o;zd.prototype.release=zd.prototype.release;
function Ad(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=Bd(a,d);this.target.addEventListener(b,c,this.g)}Ad.prototype.Ea=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function Bd(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 Cd(a)?b:b.capture||!1}
function Cd(a){var b=Dd;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}Dd=b}return b||!1}var Dd=void 0;S("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Ed(a,b){this.g=a;this.h=b}Ed.prototype.toString=function(){return"v"+this.g+"."+this.h};function Fd(a,b){var c=new Ed(5,0),d=Gd,e=d.g,f=c.h-e.h;(0<(c.g-e.g||f)?d.i:d.h)(d.g,c,a,b)}function Hd(a,b,c,d){db([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function Id(a,b,c,d){cb([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(" "))}var Gd=null;function Jd(a,b,c,d){this.g=null;this.l=a;this.i=b;this.m=c;this.s=d;this.j=!1;a:{"undefined"===typeof libDPIModule&&db("Could not find LCEVC Library dependencies on this page");if("undefined"!==typeof LCEVCdec)this.h=LCEVCdec;else if("undefined"!==typeof LcevcDil)this.h=LcevcDil,this.j=!0,Fd("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{db("Could not find LCEVC Library on this page");a=!1;break a}"undefined"===typeof this.h.SupportObject?(db("Could not find LCEVC Library on this page"),
a=!1):(this.h.SupportObject.SupportStatus||db(this.h.SupportObject.SupportError),a="undefined"!==typeof this.h&&"undefined"!==typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}a&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}
function Kd(a,b,c,d){"video"!==d.type||a.s&&!d.baseOriginalId||a.g&&a.g.appendBuffer(b,"video",d.id,-c,!a.s)}function Ld(a){a.g&&a.i.classList.add("shaka-hidden")}Jd.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Md(a){return a&&"undefined"!==typeof LCEVCdec?"lvc1"==a.codecs:!1}S("shaka.lcevc.Dec",Jd);Jd.prototype.release=Jd.prototype.release;function Nd(a){if(Od.has(a))return Od.get(a);var b=window.ManagedMediaSource||window.MediaSource;return b?(b=b.isTypeSupported(a),Od.set(a,b),b):!1}function Pd(){var a=window.ManagedSourceBuffer||window.SourceBuffer;return!!a&&!!a.prototype&&!!a.prototype.changeType}function Qd(){var a=window.ManagedMediaSource||window.MediaSource;return a&&a.prototype?!!a.prototype.setLiveSeekableRange&&!!a.prototype.clearLiveSeekableRange:!1}var Od=new Map;function Rd(){}Rd.prototype.extract=function(){};Rd.prototype.decode=function(){return[]};Rd.prototype.clear=function(){};Rd.prototype.getStreams=function(){return[]};function Sd(){}Sd.prototype.init=function(){};Sd.prototype.parse=function(){return[]};function Td(){}Td.prototype.init=function(){};Td.prototype.i=function(){};Td.prototype.g=function(){};Td.prototype.j=function(){};S("shaka.media.IClosedCaptionParser",Td);function Ud(a){this.l=new Sd;if(a=Vd(a.toLowerCase()))this.l=a();this.h=new Rd;if(a=Wd)this.h=a()}Ud.prototype.init=function(a,b){(void 0===b?0:b)||this.g();this.l.init(a)};Ud.prototype.i=function(a){a=this.l.parse(a);a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=Nb(b.packet);0<c.length&&this.h.extract(c,b.pts)}return this.h.decode()};
Ud.prototype.g=function(){this.h.clear()};Ud.prototype.j=function(){return this.h.getStreams()};function Xd(a,b){Yd.set(a,b)}function Vd(a){return Yd.get(a)}S("shaka.media.ClosedCaptionParser",Ud);Ud.findDecoder=function(){return Wd};Ud.unregisterDecoder=function(){Wd=null};Ud.registerDecoder=function(a){Wd=a};Ud.findParser=Vd;Ud.unregisterParser=function(a){Yd.delete(a)};Ud.registerParser=Xd;var Yd=new Map,Wd=null;function Zd(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=$d;this.scroll=ae}S("shaka.text.CueRegion",Zd);var $d=1;Zd.units={PX:0,PERCENTAGE:$d,LINES:2};var ae="";Zd.scrollMode={NONE:ae,UP:"up"};function be(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function de(a,b){b=a.indexOf(b);-1<b&&a.splice(b,1)}function ee(a,b,c){c||(c=be);if(a.length!=b.length)return!1;b=b.slice();a=t(a);for(var d=a.next(),e={};!d.done;e={oi:void 0},d=a.next()){e.oi=d.value;d=b.findIndex(function(f){return function(g){return c(f.oi,g)}}(e));if(-1==d)return!1;b[d]=b[b.length-1];b.pop()}return 0==b.length}
function fe(a,b,c){if(a===b)return!0;if(!a||!b)return a==b;c||(c=be);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 ge(a){this.h=a||"";this.g=0}function he(a){ie(a,/[ \t]+/gm)}function ie(a,b){b.lastIndex=a.g;b=b.exec(a.h);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.g==a.h.length||null==b||b.position!=a.g)return null;a.g+=b.length;return b.results}function je(a){return a.g==a.h.length?null:(a=ie(a,/[^ \t\n]*/gm))?a[0]:null}
function ke(a){a=ie(a,le);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:(Number(a[6])||0)/1E3+c+60*b+3600*(Number(a[1])||0)}function me(a){return a?ke(new ge(a)):null}var le=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function ne(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||ArrayBuffer.isView(d))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 WeakSet;return b(a)}function oe(a){var b={},c;for(c in a)b[c]=a[c];return b}
function pe(a){if(Array.isArray(a)){for(var b=[],c=0;c<a.length;c++){var d=c.toString(),e=a[c];void 0!==e&&(e=pe(e))&&b.push(d+":"+e)}a="["+b.join(",")+"]"}else if("function"==typeof a)a="";else if(a instanceof Object){c=Object.keys(a);c.sort();b=[];c=t(c);for(d=c.next();!d.done;d=c.next())e=d.value,d=JSON.stringify(e),e=a[e],void 0!==e&&(e=pe(e))&&b.push(d+":"+e);a="{"+b.join(",")+"}"}else a=JSON.stringify(a);return a};/*
 @license
 tXml
 Copyright 2015 Tobias Nickel
 SPDX-License-Identifier: MIT
*/
function qe(a,b){var c=void 0===c?!1:c;a=Jc(a);return re(a,b,c)}function re(a,b,c){a=se(a,void 0===c?!1:c);return!b&&a.length?a[0]:(a=a.find(function(d){return b.split(",").includes(d.tagName)}))?a:null}function te(a){return ue.has(a)?ue.get(a):""}
function se(a,b){function c(f,g){g=void 0===g?!1:g;for(var h=[];a[e];)if(60==a.charCodeAt(e)){if(47===a.charCodeAt(e+1)){g=e+2;e=a.indexOf(">",e);g=a.substring(g,e);var k=g.indexOf(f);if(-1==k){var l=f.indexOf(".");0<l&&(k=g.indexOf(f.substring(0,l)))}if(-1==k)throw f=a.substring(0,e).split("\n"),Error("Unexpected close tag\nLine: "+(f.length-1)+"\nColumn: "+(f[f.length-1].length+1)+"\nChar: "+a[e]);e+1&&(e+=1);break}else if(33===a.charCodeAt(e+1)){if(45==a.charCodeAt(e+2)){for(;-1!==e&&(62!==a.charCodeAt(e)||
45!=a.charCodeAt(e-1)||45!=a.charCodeAt(e-2)||-1==e);)e=a.indexOf(">",e+1);-1===e&&(e=a.length)}else if(91===a.charCodeAt(e+2)&&91===a.charCodeAt(e+8)&&"cdata"===a.substr(e+3,5).toLowerCase()){k=a.indexOf("]]\x3e",e);-1==k?(h.push(a.substr(e+9)),e=a.length):(h.push(a.substring(e+9,k)),e=k+3);continue}e++;continue}a:{l=g;e++;var m=d(),n={};for(k=[];62!==a.charCodeAt(e)&&a[e];){var p=a.charCodeAt(e);if(64<p&&91>p||96<p&&123>p){p=d();for(var r=a.charCodeAt(e);r&&39!==r&&34!==r&&!(64<r&&91>r||96<r&&123>
r)&&62!==r;)e++,r=a.charCodeAt(e);var u=e+1;e=a.indexOf(a[e],u);u=a.slice(u,e);if(39===r||34===r){if(-1===e){l={tagName:m,attributes:n,children:k,parent:null};if(b)for(m=0;m<k.length;m++)"string"!==typeof k[m]&&(k[m].parent=l);k=l;break a}}else u=null,e--;if(p.startsWith("xmlns:")){r=u;var v=p.split(":")[1];ue.set(r,v);ve.set(v,r)}"tt"===m&&"xml:space"===p&&"preserve"===u&&(l=!0);n[p]=u}e++}47!==a.charCodeAt(e-1)?(e++,k=c(m,l)):e++;l={tagName:m,attributes:n,children:k,parent:null};m=k.length;for(n=
0;n<m;n++)p=k[n],"string"!==typeof p?b&&(p.parent=l):n==m-1&&"\n"==p&&k.pop();k=l}h.push(k);if("string"===typeof k)break;"?"===k.tagName[0]&&k.children&&(h.push.apply(h,y(k.children)),k.children=[])}else k=e,e=a.indexOf("<",e)-1,-2===e&&(e=a.length),k=a.slice(k,e+1),g?0<k.length&&h.push(k):h.length&&1==k.length&&"\n"==k[0]?h.push(k):0<k.trim().length&&h.push(k),e++;return h}function d(){for(var f=e;-1==="\r\n\t>/= ".indexOf(a[e])&&a[e];)e++;return a.slice(f,e)}var e=0;return c("")}
function xe(a){return"string"===typeof a}function Ae(a){var b=[];if(!a.children)return[];a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"!==typeof c&&b.push(c);return b}function Be(a,b){var c=[];if(!a.children)return[];a=t(a.children);for(var d=a.next();!d.done;d=a.next())d=d.value,d.tagName===b&&c.push(d);return c}function Ce(a){if("string"===typeof a)return Nc(a);a=a.children.reduce(function(b,c){return"string"===typeof c?b+c:b},"");return""===a?null:Nc(a)}
function De(a){if(!Array.from(a.children).every(function(b){return"string"===typeof b}))return null;(a=Ce(a))&&(a=a.trim());return a}function Ee(a,b,c){c=void 0===c?[]:c;a.tagName===b&&c.push(a);if(a.children){a=t(a.children);for(var d=a.next();!d.done;d=a.next())Ee(d.value,b,c)}return c}function Fe(a,b){a=Be(a,b);return 1!=a.length?null:a[0]}function Ge(a,b,c){a=He(a,b,c);return 1!=a.length?null:a[0]}
function Ie(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.attributes[b];null!=a&&(e=c(a));return null==e?d:e}function Je(a,b,c){b=te(b);return a.attributes[b+":"+c]||null}function He(a,b,c){var d=te(b);b=[];if(a.children)for(c=d?d+":"+c:c,a=t(a.children),d=a.next();!d.done;d=a.next())(d=d.value)&&d.tagName===c&&b.push(d);return b}function Ke(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=Je(a,d.value,c))return d;return null}
function Le(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}function Me(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").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 Ne(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 Oe(a){a=Number(a);return 0===a%1?a:null}function Pe(a){a=Number(a);return 0===a%1&&0<a?a:null}function Qe(a){a=Number(a);return 0===a%1&&0<=a?a:null}function Re(a){a=Number(a);return isNaN(a)?null:a}function Se(a){return a?"true"===a.toLowerCase():!1}
function Ue(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
function Ve(a){var b=[];a=Nc(a).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/);a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=c.match(/^([\w]+)/);if(d){var e=c.match(/(@id='(.*?)')/),f=c.match(/(@t='(\d+)')/),g=c.match(/(@n='(\d+)')/),h=c.match(/\[(\d+)\]/);b.push({name:d[0],id:e?e[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:f?Number(f[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:g?Number(g[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:h?Number(h[1])-1:null,wc:c.split("/@")[1]||
null})}else c.startsWith("@")&&b.length&&(b[b.length-1].wc=c.slice(1))}return b}
function We(a,b){var c=Ve(b.attributes.sel||"");if(c.length){var d=c[c.length-1],e=b.attributes.pos||null;c=d.position;null==c&&(null!==d.t&&(c=Xe(a,"t",d.t)),null!==d.n&&(c=Xe(a,"n",d.n)));null===c?c="prepend"===e?0:a.length:"prepend"===e?--c:"after"===e&&++c;e=b.tagName;(d=d.wc)&&a[c]?Ye(a[c],e,d,De(b)||""):("remove"!==e&&"replace"!==e||a.splice(c,1),"add"!==e&&"replace"!==e||a.splice.apply(a,[c,0].concat(y(b.children))))}}
function Xe(a,b,c){var d=0;a=t(a);for(var e=a.next();!e.done;e=a.next()){if(Number(e.value.attributes[b])===c)return d;d++}return null}function Ye(a,b,c,d){if("remove"===b)delete a.attributes[c];else if("add"===b||"replace"===b)a.attributes[c]=d}
function Ze(a){var b="",c=a.tagName.split(":");0<c.length&&(b=c[0],b=ve.has(b)?ve.get(b):"");b=document.createElementNS(b,a.tagName);for(var d in a.attributes)b.setAttribute(d,a.attributes[d]);a=t(a.children);for(d=a.next();!d.done;d=a.next())d=d.value,c=void 0,"string"==typeof d?c=new Text(d):c=Ze(d),b.appendChild(c);return b}
function $e(a){if(!a)return null;var b={tagName:a.tagName,attributes:oe(a.attributes),children:[],parent:null};a=t(a.children);for(var c=a.next();!c.done;c=a.next())c=c.value,"string"===typeof c?b.children.push(c):(c=$e(c),c.parent=b,b.children.push(c));return b}var ue=new Map,ve=new Map;function af(a,b,c){this.startTime=a;this.endTime=b;this.payload=c;this.region=new Zd;this.position=null;this.positionAlign=bf;this.size=0;this.textAlign=cf;this.direction=df;this.writingMode=ef;this.lineInterpretation=ff;this.line=null;this.lineHeight="";this.lineAlign=gf;this.displayAlign=hf;this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=jf;this.fontStyle=lf;this.linePadding=this.letterSpacing=this.fontFamily="";this.opacity=1;this.textCombineUpright=
"";this.textDecoration=[];this.textStrokeWidth=this.textStrokeColor=this.textShadow="";this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.rubyTag=null;this.cellResolution={Nc:32,rows:15}}function mf(a,b){a=new af(a,b,"");a.lineBreak=!0;return a}af.prototype.clone=function(){var a=new af(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 nf(a,b){if(a.payload!=b.payload||!(.001>Math.abs(a.startTime-b.startTime)&&.001>Math.abs(a.endTime-b.endTime)))return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!fe(a.nestedCues,b.nestedCues,nf))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(!fe(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}
function of(a,b){b=void 0===b?new Map:b;var c=a.payload;if(c.includes("<")){0===b.size&&pf(b);var d=c;c=[];for(var e=-1,f=0;f<d.length;f++)"<"===d[f]?e=f+1:">"===d[f]&&0<e&&(e=d.substr(e,f-e),e.match(qf)&&c.push(e),e=-1);c=t(c);for(f=c.next();!f.done;f=c.next())f=f.value,d=d.replace("<"+f+">",'<div time="'+f+'">'),d+="</div>";a:{f=d;e=[];var g=-1;c="";d=!1;for(var h=0;h<f.length;h++)if("/"===f[h]){var k=f.indexOf(">",h);if(-1===k){c=f;break a}if((k=f.substring(h+1,k))&&"v"==k){d=!0;var l=null;e.length&&
(l=e[e.length-1]);if(l){if(l===k)c+="/"+k+">";else{if(!l.startsWith("v")){c+=f[h];continue}c+="/"+l+">"}h+=k.length+1}else c+=f[h]}else c+=f[h]}else"<"===f[h]?(g=h+1,"v"!=f[g]&&(g=-1)):">"===f[h]&&0<g&&(e.push(f.substr(g,h-g)),g=-1),c+=f[h];f=t(e);for(e=f.next();!e.done;e=f.next())e=e.value,g=e.replace(" ",".voice-"),c=c.replace("<"+e+">","<"+g+">"),c=c.replace("</"+e+">","</"+g+">"),d||(c+="</"+g+">")}c=rf(c);a.payload="";try{var m=re("<span>"+c+"</span>","span")}catch(n){}if(m)if(m=m.children,1!=
m.length||m[0].tagName)for(m=t(m),c=m.next();!c.done;c=m.next())sf(c.value,a,b);else a.payload=Nc(c);else a.payload=Nc(c)}else a.payload=Nc(c)}function pf(a){for(var b=t(Object.entries(tf)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new af(0,0,"");e.color=d;a.set("."+c,e)}b=t(Object.entries(uf));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new af(0,0,""),e.backgroundColor=d,a.set("."+c,e)}
function rf(a){var b={"< ":""," >":" &gt;"},c=/(< +>|<\s|\s>)/g,d=RegExp(c.source);return a&&d.test(a)?a.replace(c,function(e){return b[e]||""}):a||""}
function sf(a,b,c){var d=b.clone();d.nestedCues=[];d.payload="";d.rubyTag="";d.line=null;d.region=new Zd;d.position=null;d.size=0;d.textAlign=cf;if(a.tagName)for(var e=t(a.tagName.split(/(?=[ .])+/g)),f=e.next();!f.done;f=e.next()){var g=f=f.value;if(g.startsWith(".voice-")){var h=g.split("-").pop();g='v[voice="'+h+'"]';c.has(g)||(g="v[voice="+h+"]")}c.has(g)&&(h=d,g=c.get(g))&&(h.backgroundColor=vf(g.backgroundColor,h.backgroundColor),h.color=vf(g.color,h.color),h.fontFamily=vf(g.fontFamily,h.fontFamily),
h.fontSize=vf(g.fontSize,h.fontSize),h.textShadow=vf(g.textShadow,h.textShadow),h.fontWeight=g.fontWeight,h.fontStyle=g.fontStyle,h.opacity=g.opacity,h.rubyTag=g.rubyTag,h.textCombineUpright=g.textCombineUpright,h.wrapLine=g.wrapLine);switch(f){case "br":d=mf(d.startTime,d.endTime);b.nestedCues.push(d);return;case "b":d.fontWeight=wf;break;case "i":d.fontStyle=xf;break;case "u":d.textDecoration.push(yf);break;case "font":if(f=a.attributes.color)d.color=f;break;case "div":f=a.attributes.time;if(!f)break;
if(f=me(f))d.startTime=f;break;case "ruby":case "rp":case "rt":d.rubyTag=f}}e=a.children;if(xe(a)||1==e.length&&xe(e[0]))for(c=Ce(a).split("\n"),a=!0,c=t(c),e=c.next();!e.done;e=c.next())e=e.value,a||(a=mf(d.startTime,d.endTime),b.nestedCues.push(a)),0<e.length&&(a=d.clone(),a.payload=Nc(e),b.nestedCues.push(a)),a=!1;else for(b.nestedCues.push(d),b=t(e),a=b.next();!a.done;a=b.next())sf(a.value,d,c)}function vf(a,b){return a&&0<a.length?a:b}S("shaka.text.Cue",af);af.parseCuePayload=of;af.equal=nf;
af.prototype.clone=af.prototype.clone;var bf="auto";af.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:bf};var cf="center",zf={LEFT:"left",RIGHT:"right",CENTER:cf,START:"start",END:"end"};af.textAlign=zf;var hf="after",Af={BEFORE:"before",CENTER:"center",AFTER:hf};af.displayAlign=Af;var df="ltr";af.direction={HORIZONTAL_LEFT_TO_RIGHT:df,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var ef="horizontal-tb";af.writingMode={HORIZONTAL_TOP_TO_BOTTOM:ef,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};
var ff=0;af.lineInterpretation={LINE_NUMBER:ff,PERCENTAGE:1};var gf="start",Bf={CENTER:"center",START:gf,END:"end"};af.lineAlign=Bf;var tf={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};af.defaultTextColor=tf;var uf={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};af.defaultTextBackgroundColor=uf;var jf=400,wf=700;af.fontWeight={NORMAL:jf,BOLD:wf};
var lf="normal",xf="italic",Cf={NORMAL:lf,ITALIC:xf,OBLIQUE:"oblique"};af.fontStyle=Cf;var yf="underline";af.textDecoration={UNDERLINE:yf,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var qf=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Df(){}Df.prototype.destroy=function(){};function Ef(a,b,c){Ff.set(a.toLowerCase().split(";")[0]+"-"+c,{priority:c,pf:b})}function Gf(a,b){for(var c=a.toLowerCase().split(";")[0],d=t([Hf,If,Jf,Kf]),e=d.next();!e.done;e=d.next())if(e=Ff.get(c+"-"+e.value)){var f=e.pf(),g=f.isSupported(a,b);f.destroy();if(g)return e.pf}return null}S("shaka.transmuxer.TransmuxerEngine",Df);Df.findTransmuxer=Gf;Df.unregisterTransmuxer=function(a,b){Ff.delete(a.toLowerCase().split(";")[0]+"-"+b)};
Df.registerTransmuxer=Ef;Df.prototype.destroy=Df.prototype.destroy;var Ff=new Map,Kf=1,Jf=2,If=3,Hf=4;Df.PluginPriority={FALLBACK:Kf,PREFERRED_SECONDARY:Jf,PREFERRED:If,APPLICATION:Hf};function Lf(){}function Mf(a,b){var c=a;b&&!Nf.includes(a)&&(c+='; codecs="'+b+'"');return c}function Of(a,b){b&&(a+='; codecs="'+b+'"');return a}function Pf(a,b,c){var d=Mf(a,b);b=Of(a,b);Gf(b)?(a=Gf(b))?(a=a(),c=a.convertCodecs(c,b),a.destroy()):c=b:c="video/mp2t"!=a&&"audio"==c?d.replace("video","audio"):d;return c}
function Qf(a,b,c){var d=[b];Rf.forEach(function(e,f){var g=a[f];"codecs"==f?Nf.includes(a.mimeType)||d.push('codecs="'+c+'"'):g&&d.push(e+'="'+g+'"')});"PQ"==a.hdr&&d.push('eotf="smpte2084"');return d.join(";")}function Sf(a){return a.split(";")[0].split("/")[1]}
function Tf(a){var b=Uf(a);a=b[0].toLowerCase();b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:case "mp4a"===a&&"40.34"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:case "ac3"===a:case "ac-3"===a:return"ac-3";
case "mp4a"===a&&"a6"===b:case "eac3"===a:case "ec-3"===a:return"ec-3";case "ac-4"===a:return"ac-4";case "mp4a"===a&&"b2"===b:return"dtsx";case "mp4a"===a&&"a9"===b:return"dtsc";case "vp09"===a:case "vp9"===a:return"vp9";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "vvc1"===a:case "vvi1"===a:return"vvc";case "dvh1"===a:case "dvhe"===a:return b&&b.startsWith("05")?"dovi-p5":"dovi-hevc";case "dvav"===a:case "dva1"===a:return"dovi-avc";case "dav1"===a:return"dovi-av1";
case "dvc1"===a:case "dvi1"===a:return"dovi-vvc"}return a}function Vf(a){var b=[];a=t(a.split(","));for(var c=a.next();!c.done;c=a.next())c=Uf(c.value),b.push(c[0]);return b.sort().join(",")}function Wf(a){return a.split(";")[0]}function Xf(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function Yf(a){return"application/x-mpegurl"===a||"application/vnd.apple.mpegurl"===a}
function Uf(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}S("shaka.util.MimeUtils",Lf);Lf.getFullTypeWithAllCodecs=Of;Lf.getFullType=Mf;var Rf=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Nf=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Zf(a){this.i=null;this.j=a;this.C=!1;this.l=this.u=0;this.m=Infinity;this.h=this.g=null;this.G="";this.B=function(){};this.s=new Map}function $f(a,b){ag.set(a,b)}function bg(a){return ag.get(a)}function cg(a){return ag.has(a)?!0:"application/cea-608"==a||"application/cea-708"==a?!!Wd:!1}Zf.prototype.destroy=function(){this.j=this.i=null;this.s.clear();return Promise.resolve()};
function dg(a,b,c,d,e){var f,g,h,k,l,m,n;return Q(function(p){if(1==p.g)return H(p,Promise.resolve(),2);if(!a.i||!a.j)return p.return();if(null==c||null==d)return a.i.parseInit(Nb(b)),p.return();f=a.C?c:a.u;g={periodStart:a.u,segmentStart:c,segmentEnd:d,vttOffset:f};h=a.i.parseMedia(Nb(b),g,e,[]);k=t(h);for(l=k.next();!l.done;l=k.next())m=l.value,a.B(m,e||null,g);n=h.filter(function(r){return r.startTime>=a.l&&r.startTime<a.m});a.j.append(n);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);I(p)})}
Zf.prototype.remove=function(a,b){var c=this;return Q(function(d){if(1==d.g)return H(d,Promise.resolve(),2);!c.j||!c.j.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));I(d)})};function eg(a,b,c){a.l=b;a.m=c}function fg(a,b,c){a.G=b;if(b=a.s.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.j.append(e)}
function gg(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())gg(a,d.value,c)}
function hg(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);gg(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.G&&a.j.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.s.has(f)||a.s.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.s.get(f).set(h,k);a.g=null==a.g?Math.max(c,
a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}S("shaka.text.TextEngine",Zf);Zf.prototype.destroy=Zf.prototype.destroy;Zf.findParser=bg;Zf.unregisterParser=function(a){ag.delete(a)};Zf.registerParser=$f;var ag=new Map;function ig(a,b){return a.concat(b)}function jg(){}function kg(a){return null!=a}function lg(a,b){return Promise.race([b,new Promise(function(c,d){(new bc(d)).$(a)})])};function mg(){}
function ng(a,b,c,d,e){function f(x){var z=String(x.width||"")+String(x.height||"")+String(Math.round(x.frameRate||0))+(x.hdr||"")+x.fastSwitching;x.dependencyStream&&(z+=x.dependencyStream.baseOriginalId||"");return z}function g(x){var z=x.language+(x.channelsCount||0)+(x.audioSamplingRate||0)+x.roles.join(",")+x.label+x.groupId+x.fastSwitching;x.dependencyStream&&(z+=x.dependencyStream.baseOriginalId||"");return z}if(e.length){var h=a.textStreams;e=t(e);for(var k=e.next(),l={};!k.done;l={Ah:void 0},
k=e.next())if(l.Ah=k.value,k=h.filter(function(x){return function(z){return z.codecs.startsWith(x.Ah)||z.mimeType.startsWith(x.Ah)?!0:!1}}(l)),k.length){h=k;break}a.textStreams=h}h=a.variants;if(b.length||c.length)h=og(h,b,c);if(d.length){b=new lb;c=t(h);for(h=c.next();!h.done;h=c.next())h=h.value,b.push(String(h.video.width||0),h);var m=[];b.forEach(function(x,z){x=0;var B=[];z=t(z);for(var C=z.next(),E={};!C.done;E={Mf:void 0},C=z.next())E.Mf=C.value,C=d.filter(function(D){return function(A){return D.Mf.decodingInfos[0][A]}}(E)).length,
C>x?(x=C,B=[E.Mf]):C==x&&B.push(E.Mf);m.push.apply(m,y(B))});h=m}c=new Set;b=new Set;h=t(h);for(e=h.next();!e.done;e=h.next())e=e.value,e.audio&&c.add(e.audio),e.video&&b.add(e.video);h=Array.from(c).sort(function(x,z){return x.bandwidth-z.bandwidth});var n=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=g(e);l=c.get(k)||[];if(l.length){var p=l[l.length-1],r=Tf(p.codecs),u=Tf(e.codecs);r!=u||e.bandwidth&&p.bandwidth&&!(e.bandwidth>p.bandwidth)||(l.push(e),n.push(e.id))}else l.push(e),
n.push(e.id);c.set(k,l)}var v={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};h=Array.from(b).sort(function(x,z){if(!x.bandwidth||!z.bandwidth||x.bandwidth==z.bandwidth){if(x.codecs&&z.codecs&&x.codecs!=z.codecs&&x.width==z.width){var B=Tf(x.codecs),C=Tf(z.codecs);if(B!=C)return(v[B]||1)-(v[C]||1)}return x.width-z.width}return x.bandwidth-z.bandwidth});b=Pd();var w=[];c=new Map;h=t(h);for(e=h.next();!e.done;e=h.next()){e=e.value;k=f(e);
l=c.get(k)||[];if(l.length){p=l[l.length-1];if(!b&&(r=Tf(p.codecs),u=Tf(e.codecs),r!==u))continue;r=Tf(p.codecs);u=Tf(e.codecs);r!=u||e.bandwidth&&p.bandwidth&&!(e.bandwidth>p.bandwidth)||(l.push(e),w.push(e.id))}else l.push(e),w.push(e.id);c.set(k,l)}a.variants=a.variants.filter(function(x){var z=x.audio;x=x.video;return z&&!n.includes(z.id)||x&&!w.includes(x.id)?!1:!0})}
function og(a,b,c){b=t(b);for(var d=b.next(),e={};!d.done;e={gj:void 0},d=b.next())if(e.gj=d.value,d=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.gj)}}(e)),d.length){a=d;break}c=t(c);b=c.next();for(d={};!b.done;d={Lh:void 0},b=c.next())if(d.Lh=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.Lh)}}(d)),b.length){a=b;break}return a}function pg(a,b,c){a.variants=a.variants.filter(function(d){return qg(d,b,c)})}
function qg(a,b,c){function d(h,k,l){return h>=k&&h<=l}var e=a.video;if(e&&e.width&&e.height){var f=e.width,g=e.height;g>f&&(g=t([g,f]),f=g.next().value,g=g.next().value);if(!d(f,b.minWidth,Math.min(b.maxWidth,c.width))||!d(g,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))return!1}return a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||a&&a.audio&&a.audio.channelsCount&&!d(a.audio.channelsCount,b.minChannelsCount,b.maxChannelsCount)||
!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}function rg(a,b,c,d){c=void 0===c?[]:c;d=void 0===d?{}:d;return Q(function(e){if(1==e.g)return H(e,sg(a,b,0<b.offlineSessionIds.length,c,d),2);vg(b);return H(e,wg(b),0)})}
function sg(a,b,c,d,e){var f,g;return Q(function(h){if(1==h.g)return gc()&&xg(b.variants),H(h,yg(b.variants,c,!1,d),2);f=null;a&&(g=a.h)&&(f=g.keySystem);b.variants=b.variants.filter(function(k){var l=Dg(k,f,e);if(!l){var m=[];k.audio&&m.push(Eg(k.audio));k.video&&m.push(Eg(k.video))}return l});I(h)})}
function xg(a){var b=(new Map).set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),c=new Set;a=t(a);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&c.add(d.video);c=t(c);for(a=c.next();!a.done;a=c.next()){a=a.value;d=t(b);for(var e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;if(a.codecs.includes(e)){a.codecs=a.codecs.replace(e,f);break}}}}
function Dg(a,b,c){if(!a.decodingInfos.some(function(k){return!k.supported||b&&(k=k.keySystemAccess)&&(c[k.keySystem]||k.keySystem)!=b?!1:!0}))return!1;var d=gc(),e=hc("Firefox")&&xc(),f=a.video,g=f&&f.width||0,h=f&&f.height||0;if(d&&f&&(1920<g||1080<h)&&(f.codecs.includes("avc1.")||f.codecs.includes("avc3."))||(d=f&&f.dependencyStream)&&!Md(d))return!1;a=a.audio;return e&&a&&a.encrypted&&a.codecs.toLowerCase().includes("opus")||a&&a.dependencyStream?!1:!0}
function Fg(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(1==l.g){c=function(m,n){if(m){var p=oe(m);p.supported=m.supported&&n.supported;p.powerEfficient=m.powerEfficient&&n.powerEfficient;p.smooth=m.smooth&&n.smooth;n.keySystemAccess&&!p.keySystemAccess&&(p.keySystemAccess=n.keySystemAccess);return p}return n};d=null;e=[];f=t(b);g=f.next();for(h={};!g.done;h={cache:void 0,Ge:void 0},g=f.next())k=g.value,h.Ge=pe(k),h.cache=Gg,h.cache.has(h.Ge)?d=c(d,h.cache.get(h.Ge)):e.push(Hg(k).then(function(m){return function(n){var p=
null;n=t(n||[]);for(var r=n.next();!r.done;r=n.next())p=c(p,r.value);p&&(m.cache.set(m.Ge,p),d=c(d,p))}}(h)));return H(l,Promise.all(e),2)}d&&a.decodingInfos.push(d);I(l)})}
function Hg(a){var b=[""];a.video&&(b=Xf(a.video.contentType).split(","));var c=[""];a.audio&&(c=Xf(a.audio.contentType).split(","));var d=[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;for(var f=t(c),g=f.next(),h={};!g.done;h={Oc:void 0},g=f.next())g=g.value,h.Oc=ne(a),a.video&&(h.Oc.video.contentType=Mf(Wf(h.Oc.video.contentType),e)),a.audio&&(h.Oc.audio.contentType=Mf(Wf(h.Oc.audio.contentType),g)),d.push(new Promise(function(k){return function(l,m){(xc()?lg(5,navigator.mediaCapabilities.decodingInfo(k.Oc)):
navigator.mediaCapabilities.decodingInfo(k.Oc)).then(function(n){l(n)}).catch(m)}}(h)))}return Promise.all(d).catch(function(){JSON.stringify(a);return null})}
function yg(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D;return Q(function(A){switch(A.g){case 1:if(e=a.some(function(F){return F.decodingInfos.length}))return A.return();f=t(d);g=f.next();h={};case 2:if(g.done){A.A(4);break}h.Ei=g.value;k=!1;l=t(a);m=l.next();case 5:if(m.done){A.A(7);break}n=m.value;p=Ig(n,b,c).filter(function(F){return function(G){G=G[0];return(G.keySystemConfiguration&&G.keySystemConfiguration.keySystem)===F.Ei}}(h));r=t(p);u=r.next();case 8:if(u.done){A.A(10);break}v=u.value;
return H(A,Fg(n,v),9);case 9:u=r.next();A.A(8);break;case 10:n.decodingInfos.length&&(k=!0);m=l.next();A.A(5);break;case 7:if(k)return A.return();h={Ei:void 0};g=f.next();A.A(2);break;case 4:w=t(a),x=w.next();case 12:if(x.done){A.A(0);break}z=x.value;B=Ig(z,b,c).filter(function(F){F=F[0];F=F.keySystemConfiguration&&F.keySystemConfiguration.keySystem;return!F||!d.includes(F)});C=t(B);E=C.next();case 15:if(E.done){x=w.next();A.A(12);break}D=E.value;return H(A,Fg(z,D),16);case 16:E=C.next(),A.A(15)}})}
function Ig(a,b,c){var d=a.audio,e=a.video,f=[],g=[];if(e)for(var h=t(e.fullMimeTypes),k=h.next();!k.done;k=h.next()){k=k.value;var l=Xf(k);if(l.includes(",")&&!d){var m=l.split(","),n=Wf(k);l=Yc("video",m);m=Yc("audio",m);m=Jg(m,n);n=Pf(n,m,"audio");g.push({contentType:n,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1})}l=Kg(l);k={contentType:Pf(Wf(k),l,"video"),width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":k.transferFunction=
"srgb";break;case "PQ":k.transferFunction="pq";break;case "HLG":k.transferFunction="hlg"}e.colorGamut&&(k.colorGamut=e.colorGamut);f.push(k)}if(d)for(h=t(d.fullMimeTypes),k=h.next();!k.done;k=h.next())l=k.value,k=Wf(l),l=Jg(Xf(l),k),k=Pf(k,l,"audio"),g.push({contentType:k,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});h=[];0==f.length&&f.push(null);0==g.length&&g.push(null);f=t(f);for(k=f.next();!k.done;k=f.next())for(k=
k.value,l=t(g),n=l.next();!n.done;n=l.next())n=n.value,m={type:c?"file":"media-source"},k&&(m.video=k),n&&(m.audio=n),h.push(m);g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[h];a=[];c=new Map;g=t(g);for(f=g.next();!f.done;f=g.next())f=f.value,c.get(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f);g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];f=t(c.keys());for(k=f.next();!k.done;k=f.next()){k=k.value;n=c.get(k);l=new Map;
n=t(n);for(m=n.next();!m.done;m=n.next()){m=m.value;var p=m.videoRobustness+","+m.audioRobustness;l.get(p)||l.set(p,[]);l.get(p).push(m)}l=t(l.values());for(n=l.next();!n.done;n=l.next()){n=n.value;m=[];p=t(h);for(var r=p.next();!r.done;r=p.next()){r=Object.assign({},r.value);for(var u={keySystem:k,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b},v=t(n),w=v.next();!w.done;w=v.next()){w=w.value;if(w.initData&&w.initData.length){for(var x=new Set,z=t(w.initData),
B=z.next();!B.done;B=z.next())x.add(B.value.initDataType);u.initDataType=w.initData[0].initDataType}w.distinctiveIdentifierRequired&&(u.distinctiveIdentifier="required");w.persistentStateRequired&&(u.persistentState="required");w.sessionType&&(u.sessionTypes=[w.sessionType]);d&&(u.audio?(w.encryptionScheme&&(u.audio.encryptionScheme=u.audio.encryptionScheme||w.encryptionScheme),u.audio.robustness=u.audio.robustness||w.audioRobustness):(u.audio={robustness:w.audioRobustness},w.encryptionScheme&&(u.audio.encryptionScheme=
w.encryptionScheme)),""==u.audio.robustness&&delete u.audio.robustness);e&&(u.video?(w.encryptionScheme&&(u.video.encryptionScheme=u.video.encryptionScheme||w.encryptionScheme),u.video.robustness=u.video.robustness||w.videoRobustness):(u.video={robustness:w.videoRobustness},w.encryptionScheme&&(u.video.encryptionScheme=w.encryptionScheme)),""==u.video.robustness&&delete u.video.robustness)}r.keySystemConfiguration=u;m.push(r)}a.push(m)}}return a}
function Jg(a,b){return"flac"==a.toLowerCase()?oc()?"fLaC":"flac":"opus"===a.toLowerCase()?oc()?"mp4"==Sf(b)?"Opus":"opus":"opus":"ac-3"==a.toLowerCase()&&jc()?"ec-3":a}function Kg(a){if(a.includes("avc1")){var b=a.split(".");if(3==b.length)return a=b.shift()+".",a+=parseInt(b.shift(),10).toString(16),a+=("000"+parseInt(b.shift(),10).toString(16)).slice(-4)}else if("vp9"==a)return"vp09.00.41.08";return a}
function vg(a){a.textStreams=a.textStreams.filter(function(b){b=Mf(b.mimeType,b.codecs);return cg(b)})}
function wg(a){var b,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;"application/mp4"==f&&"mjpg"==e.codecs&&(f="image/jpg");if(Lg.has(f)){l.A(5);break}g=Mg.get(f);if(!g){Lg.set(f,!1);l.A(5);break}return H(l,Ng(g),7);case 7:h=l.h,Lg.set(f,h);case 5:(k=Lg.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,I(l)}})}
function Ng(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)}).catch(function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}
function Og(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=b?b.groupId:null,k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var n=t(b.roles),p=n.next();!p.done;p=n.next())m.add(p.value);if(c)for(n=t(c.roles),p=n.next();!p.done;p=n.next())m.add(p.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,kind:l,
width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:"",audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:h,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,
originalLanguage:null};if(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;a.hdr=c.hdr||null;a.colorGamut=c.colorGamut||null;a.videoLayout=c.videoLayout||null;if(d=c.dependencyStream)a.width=d.width||a.width,a.height=d.height||a.height,a.videoCodec=d.codecs||a.videoCodec;if(g.includes(",")){a.channelsCount=c.channelsCount;a.audioSamplingRate=c.audioSamplingRate;
a.spatialAudio=c.spatialAudio;a.originalLanguage=c.originalLanguage;a.audioMimeType=e;c=g.split(",");try{a.videoCodec=Yc("video",c),a.audioCodec=Yc("audio",c)}catch(r){}}}b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles,a.accessibilityPurpose=b.accessibilityPurpose,a.originalLanguage=b.originalLanguage,b=b.dependencyStream)&&
(a.audioCodec=b.codecs||a.audioCodec);b=[];a.videoCodec&&b.push(a.videoCodec);a.audioCodec&&b.push(a.audioCodec);a.codecs=b.join(", ");return a}
function Pg(a){return{id:a.id,active:!1,type:bd,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,
audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:a.originalId,originalImageId:null,accessibilityPurpose:a.accessibilityPurpose,originalLanguage:a.originalLanguage}}
function Qg(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=Rg(a.segmentIndex));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,
videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId,accessibilityPurpose:null,originalLanguage:null}}function Sg(a){a.__shaka_id||(a.__shaka_id=Tg++);return a.__shaka_id}
function Ug(a){var b=Vg(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="unknown");"subtitles"==a.kind&&(b.mimeType="text/vtt");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function Wg(a){var b=Vg(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 Vg(a){var b=a.language;return{id:Sg(a),active:!1,type:"",bandwidth:0,language:hd(b||"und"),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,
videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:b}}function Xg(a){return a.allowedByApplication&&a.allowedByKeySystem&&0==a.disabledUntilTime}function Yg(a){return a.filter(function(b){return Xg(b)})}
function Zg(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=qd(hd(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return hd(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=$g(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(ig,[]);return a.length?
$g(e,a[0]):e}function $g(a,b){return a.filter(function(c){return c.roles.includes(b)})}function ah(a,b){b.length&&(b=b.filter(function(c){return Tf(a.codecs)==Tf(c.codecs)}).sort(function(c,d){return c.bandwidth&&d.bandwidth&&c.bandwidth!=d.bandwidth?c.bandwidth-d.bandwidth:(c.width||0)-(d.width||0)}),a.trickModeVideo=b[0],1<b.length&&(b=b.find(function(c){return a.width==c.width&&a.height==c.height})))&&(a.trickModeVideo=b)}
function Eg(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
function bh(a,b,c){if(0==c.autoShowText)return!1;if(1==c.autoShowText)return!0;var d=hd(c.preferredTextLanguage);b=hd(b.language);if(2==c.autoShowText)return gd(b,d);if(3==c.autoShowText){if(!a)return!1;a=hd(a.language);return gd(b,d)&&!gd(a,b)}db("Invalid autoShowText setting!");return!1}S("shaka.util.StreamUtils",mg);mg.meetsRestrictions=qg;
var Gg=new Map,Tg=0,Lg=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Mg=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function ch(){var a=this;this.I=null;this.l=!1;this.s=new yd;this.j=new zd;navigator.connection&&navigator.connection.addEventListener&&this.j.o(navigator.connection,"change",function(){if(a.l&&a.g.useNetworkInformation){a.s=new yd;a.g&&a.s.configure(a.g.advanced);var b=a.chooseVariant();b&&navigator.onLine&&a.I(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.H=[];this.J=1;this.K=!1;this.h=this.m=this.g=this.u=null;this.B=new bc(function(){if(a.l&&(a.g.restrictToElementSize||a.g.restrictToScreenSize)){var b=
a.chooseVariant();b&&a.I(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch)}});this.C=window;"documentPictureInPicture"in window&&this.j.o(window.documentPictureInPicture,"enter",function(){a.C=window.documentPictureInPicture.window;a.B&&a.B.Ia();a.j.ra(a.C,"pagehide",function(){a.C=window;a.B&&a.B.Ia()})});this.G=this.i=null}q=ch.prototype;q.stop=function(){this.I=null;this.l=!1;this.H=[];this.J=1;this.m=this.u=null;this.h&&(this.h.disconnect(),this.h=null);this.B.stop();this.G=this.i=null};
q.release=function(){this.j.release();this.B=null};q.init=function(a){this.I=a};
q.chooseVariant=function(){var a=Infinity,b=Infinity;if(this.g.restrictToScreenSize){var c=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;a=this.C.screen.height*c;b=this.C.screen.width*c}if(this.h&&this.g.restrictToElementSize){c=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;var d=this.m.clientHeight,e=this.m.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.m&&(d=this.i.height,e=this.i.width);a=Math.min(a,d*c);b=Math.min(b,e*c)}c=this.H.filter(function(l){return l&&
!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)});c.length||(c=this.H);d=c;c.length!=this.H.length&&(d=this.H.filter(function(l){return l&&(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching?!0:!1)}));c=dh(this,this.g.restrictions,d,Infinity,Infinity);if(Infinity!=a||Infinity!=b){c=eh(c);c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.height>=a&&e.width>=b){a=e.height;b=e.width;break}c=dh(this,this.g.restrictions,d,a,b)}a=this.getBandwidthEstimate();d.length&&
!c.length&&(c=dh(this,null,d,Infinity,Infinity),c=[c[0]]);b=c[0]||null;for(d=0;d<c.length;d++){e=c[d];for(var f=isNaN(this.J)?1:Math.abs(this.J),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<c.length;k++)if(e.bandwidth!=c[k].bandwidth){h=c[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;a>=g&&a<=f&&(b.bandwidth!=e.bandwidth||b.bandwidth==e.bandwidth&&b.video&&e.video&&(b.video.width<e.video.width||b.video.height<e.video.height))&&(b=e)}this.u=Date.now();return b};
q.enable=function(){this.l=!0};q.disable=function(){this.l=!1};q.segmentDownloaded=function(a,b,c){a<this.g.cacheLoadThreshold||(this.s.sample(a,b),c&&null!=this.u&&this.l&&fh(this))};q.trySuggestStreams=function(){null!=this.u&&this.l&&fh(this)};
q.getBandwidthEstimate=function(){var a=this.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(a=1E6*navigator.connection.downlink);if(navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth)return a;a=this.s.getBandwidthEstimate(a);return this.G?this.G.getBandwidthEstimate(a):a};q.setVariants=function(a){this.H=a};q.playbackRateChanged=function(a){this.J=a};
q.setMediaElement=function(a){function b(){c.B.$(gh)}var c=this;this.m=a;this.h&&(this.h.disconnect(),this.h=null);this.m&&"ResizeObserver"in window&&(this.h=new ResizeObserver(b),this.h.observe(this.m));this.j.o(a,"enterpictureinpicture",function(d){d.pictureInPictureWindow&&(c.i=d.pictureInPictureWindow,c.j.o(c.i,"resize",b))});this.j.o(a,"leavepictureinpicture",function(){c.i&&c.j.Ea(c.i,"resize",b);c.i=null})};q.setCmsdManager=function(a){this.G=a};
q.configure=function(a){this.g=a;this.s&&this.g&&this.s.configure(this.g.advanced)};function fh(a){if(!a.K){var b=a.s;if(!(b.g>=b.i))return;a.K=!0;a.u-=1E3*(a.g.switchInterval-a.g.minTimeToSwitch)}Date.now()-a.u<1E3*a.g.switchInterval||(b=a.chooseVariant(),a.getBandwidthEstimate(),b&&a.I(b,a.g.clearBufferSwitch,a.g.safeMarginSwitch))}
function dh(a,b,c,d,e){if(a.G){var f=a.G.di();f&&(c=c.filter(function(g){return g.bandwidth&&f?g.bandwidth<=f:!0}))}b&&(c=c.filter(function(g){return qg(g,b,{width:e,height:d})}));return c.sort(function(g,h){return g.bandwidth-h.bandwidth})}function eh(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=c.value.video)&&c.height&&c.width&&b.push({height:c.height,width:c.width});return b.sort(function(d,e){return d.width-e.width})}S("shaka.abr.SimpleAbrManager",ch);ch.prototype.configure=ch.prototype.configure;
ch.prototype.setCmsdManager=ch.prototype.setCmsdManager;ch.prototype.setMediaElement=ch.prototype.setMediaElement;ch.prototype.playbackRateChanged=ch.prototype.playbackRateChanged;ch.prototype.setVariants=ch.prototype.setVariants;ch.prototype.getBandwidthEstimate=ch.prototype.getBandwidthEstimate;ch.prototype.trySuggestStreams=ch.prototype.trySuggestStreams;ch.prototype.segmentDownloaded=ch.prototype.segmentDownloaded;ch.prototype.disable=ch.prototype.disable;ch.prototype.enable=ch.prototype.enable;
ch.prototype.chooseVariant=ch.prototype.chooseVariant;ch.prototype.init=ch.prototype.init;ch.prototype.release=ch.prototype.release;ch.prototype.stop=ch.prototype.stop;var gh=1;S("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function hh(a,b){var c=ih();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.s=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
function jh(a){var b,c;return Q(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new V(2,7,1010);b=a.g;a.g++;if(0==b)return d.return();c=a.h*(1+(2*Math.random()-1)*a.s);return H(d,new Promise(function(e){(new bc(e)).$(c/1E3)}),2)}a.h*=a.m;I(d)})}function ih(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function kh(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}kh.prototype.resolve=function(){};kh.prototype.reject=function(){};function lh(a,b){this.promise=a;this.i=b;this.g=null}function mh(a){return new lh(Promise.reject(a),function(){return Promise.resolve()})}function nh(){var a=Promise.reject(new V(2,7,7001));a.catch(function(){});return new lh(a,function(){return Promise.resolve()})}function oh(a){return new lh(Promise.resolve(a),function(){return Promise.resolve()})}function ph(a){return new lh(a,function(){return a.catch(function(){})})}lh.prototype.abort=function(){this.g||(this.g=this.i());return this.g};
function qh(a){return new lh(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}lh.prototype.finally=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
lh.prototype.bb=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=rh(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new kh;f.catch(function(){});var g=new V(2,7,7001);this.promise.then(c(!0),c(!1));return new lh(f,function(){return d()})};
function rh(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()}}}ea.Object.defineProperties(lh.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}});S("shaka.util.AbortableOperation",lh);lh.prototype.chain=lh.prototype.bb;lh.prototype["finally"]=lh.prototype.finally;
lh.all=qh;lh.prototype.abort=lh.prototype.abort;lh.notAbortable=ph;lh.completed=oh;lh.aborted=nh;lh.failed=mh;function sh(){this.g=[]}function th(a,b){a.g.push(b.finally(function(){de(a.g,b)}))}sh.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise.catch(function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function uh(a,b,c,d,e,f,g){mb.call(this);this.i=!1;this.u=new sh;this.g=new Set;this.h=new Set;this.m=a||null;this.l=b||null;this.G=c||null;this.H=d||null;this.I=e||null;this.K=f||null;this.J=g||null;this.B=this.C=!1;this.s=16E3;this.j=new Map}oa(uh,mb);q=uh.prototype;q.oh=function(a){this.C=a};q.ph=function(a){this.B=a};function vh(a,b,c,d){d=void 0===d?!1:d;c=c||wh;var e=xh.get(a);(!e||c>=e.priority)&&xh.set(a,{priority:c,pf:b,Tk:d})}
function yh(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())b.g.add(d.value);a=t(a.h);for(c=a.next();!c.done;c=a.next())b.h.add(c.value)}q.Wk=function(a){this.g.add(a)};q.Cl=function(a){this.g.delete(a)};q.uj=function(){this.g.clear()};q.Xk=function(a){this.h.add(a)};q.Dl=function(a){this.h.delete(a)};q.vj=function(){this.h.clear()};q.Sh=function(){this.j.clear()};
function zh(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}q.destroy=function(){this.i=!0;this.g.clear();this.h.clear();this.j.clear();mb.prototype.release.call(this);return this.u.destroy()};
q.request=function(a,b,c){var d=this,e=new Ah;if(this.i){var f=Promise.reject(new V(2,7,7001));f.catch(function(){});return new Bh(f,function(){return Promise.resolve()},e)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?ne(b.retryParameters):ih();b.uris=ne(b.uris);f=Ch(this,a,b,c);var g=f.bb(function(){return Dh(d,a,b,c,new hh(b.retryParameters,!1),0,null,e)}),h=g.bb(function(p){return Eh(d,a,p,c)}),k=Date.now(),l=0;f.promise.then(function(){l=Date.now()-k},function(){});
var m=0;g.promise.then(function(){m=Date.now()},function(){});var n=h.bb(function(p){var r=Date.now()-m,u=p.response;u.timeMs+=l;u.timeMs+=r;p.vk||!d.m||u.fromCache||"HEAD"==b.method||a!=Fh||d.m(u.timeMs,u.data.byteLength,Gh(c));d.J&&d.J(a,u,c);return u},function(p){p&&(p.severity=2);throw p;});f=new Bh(n.promise,function(){return n.abort()},e);th(this.u,f);return f};
function Ch(a,b,c,d){function e(h){f=f.bb(function(){c.body&&(c.body=Ob(c.body));return h(b,c,d)})}var f=oh(void 0);a.I&&e(a.I);a=t(a.g);for(var g=a.next();!g.done;g=a.next())e(g.value);return f.bb(void 0,function(h){if(h instanceof V&&7001==h.code)throw h;throw new V(2,1,1006,h);})}
function Dh(a,b,c,d,e,f,g,h){a.C&&(c.uris[f]=c.uris[f].replace("https://","http://"));a.B&&(c.uris[f]=c.uris[f].replace("http://","https://"));0<f&&a.K&&a.K(b,d,c.uris[f],c.uris[f-1]);var k=new tb(c.uris[f]),l=k.ec,m=!1;l||(l=location.protocol,l=l.slice(0,-1),ub(k,l),c.uris[f]=k.toString());l=l.toLowerCase();var n=(l=xh.get(l))?l.pf:null;if(!n)return mh(new V(2,1,1E3,k));var p=l.Tk;(k=a.j.get(k.Eb))&&(c.headers["common-access-token"]=k);var r=null,u=null,v=!1,w=!1,x;return ph(jh(e)).bb(function(){if(a.i)return nh();
x=Date.now();var z=0;c.requestStartTime=Date.now();var B=n(c.uris[f],c,b,function(D,A,F){r&&r.stop();u&&u.$(E/1E3);a.m&&b==Fh&&(z++,c.packetNumber=z,a.m(D,A,Gh(d),c),m=!0,h.g=F)},function(D){w=!0;c.timeToFirstByte=Date.now()-c.requestStartTime;a.l&&a.l(D,c,b)},{minBytesForProgressEvents:a.s});if(!p)return B;var C=c.retryParameters.connectionTimeout;C&&(r=new bc(function(){v=!0;B.abort()}),r.$(C/1E3));var E=c.retryParameters.stallTimeout;E&&(u=new bc(function(){v=!0;B.abort()}));return B}).bb(function(z){r&&
r.stop();u&&u.stop();void 0==z.timeMs&&(z.timeMs=Date.now()-x);var B=z.headers["common-access-token"];if(B){var C=new tb(z.uri);a.j.set(C.Eb,B)}B={response:z,vk:m};!w&&a.l&&a.l(z.headers,c,b);a.G&&a.G(c,z);return B},function(z){r&&r.stop();u&&u.stop();if(a.H){var B=null,C=0;z instanceof V&&(B=z,1001==z.code&&(C=z.data[1]));a.H(c,B,C,v)}if(a.i)return nh();v&&(z=new V(1,1,1003,c.uris[f],b));if(z instanceof V){if(7001==z.code)throw z;if(1010==z.code)throw g;if(1==z.severity){B=(new Map).set("error",
z);B=new T("retry",B);B.cancelable=!0;a.dispatchEvent(B);if(B.defaultPrevented)throw z;f=(f+1)%c.uris.length;return Dh(a,b,c,d,e,f,z,h)}}throw z;})}
function Eh(a,b,c,d){var e=oh(void 0);a=t(a.h);for(var f=a.next(),g={};!f.done;g={Hi:void 0},f=a.next())g.Hi=f.value,e=e.bb(function(h){return function(){var k=c.response;k.data&&(k.data=Ob(k.data));return(0,h.Hi)(b,k,d)}}(g));return e.bb(function(){return c},function(h){var k=2;if(h instanceof V){if(7001==h.code)throw h;k=h.severity}throw new V(k,1,1007,h);})}function Gh(a){if(a){var b=a.segment;a=a.stream;if(b&&a&&a.fastSwitching&&b.s)return!1}return!0}S("shaka.net.NetworkingEngine",uh);
uh.prototype.request=uh.prototype.request;uh.prototype.destroy=uh.prototype.destroy;uh.makeRequest=zh;uh.defaultRetryParameters=function(){return ih()};uh.prototype.clearCommonAccessTokenMap=uh.prototype.Sh;uh.prototype.clearAllResponseFilters=uh.prototype.vj;uh.prototype.unregisterResponseFilter=uh.prototype.Dl;uh.prototype.registerResponseFilter=uh.prototype.Xk;uh.prototype.clearAllRequestFilters=uh.prototype.uj;uh.prototype.unregisterRequestFilter=uh.prototype.Cl;
uh.prototype.registerRequestFilter=uh.prototype.Wk;uh.unregisterScheme=function(a){xh.delete(a)};uh.registerScheme=vh;uh.prototype.setForceHTTPS=uh.prototype.ph;uh.prototype.setForceHTTP=uh.prototype.oh;function Ah(){this.g=0}uh.NumBytesRemainingClass=Ah;function Bh(a,b,c){lh.call(this,a,b);this.h=c}oa(Bh,lh);uh.PendingRequest=Bh;var Fh=1;uh.RequestType={MANIFEST:0,SEGMENT:Fh,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8};
uh.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var wh=3;uh.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:wh};var xh=new Map;function Hh(a){this.g=!1;this.h=new kh;this.i=a}Hh.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function Ih(a,b){if(a.g){if(b instanceof V&&7003==b.code)throw b;throw new V(2,7,7003,b);}};function Jh(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function Kh(a){var b={};a.forEach(function(c,d){b[d]=c});return b};function Lh(a,b){this.h=Rb(a);this.i=b==Mh;this.g=0}q=Lh.prototype;q.Ma=function(){return this.g<this.h.byteLength};q.Ta=function(){return this.g};q.getLength=function(){return this.h.byteLength};q.ha=function(){try{var a=this.h.getUint8(this.g);this.g+=1;return a}catch(b){throw Nh();}};q.Da=function(){try{var a=this.h.getUint16(this.g,this.i);this.g+=2;return a}catch(b){throw Nh();}};q.X=function(){try{var a=this.h.getUint32(this.g,this.i);this.g+=4;return a}catch(b){throw Nh();}};
q.bh=function(){try{var a=this.h.getInt32(this.g,this.i);this.g+=4;return a}catch(b){throw Nh();}};q.Dd=function(){try{if(this.i){var a=this.h.getUint32(this.g,!0);var b=this.h.getUint32(this.g+4,!0)}else b=this.h.getUint32(this.g,!1),a=this.h.getUint32(this.g+4,!1)}catch(c){throw Nh();}if(2097151<b)throw new V(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};q.Tb=function(a){if(this.g+a>this.h.byteLength)throw Nh();var b=Nb(this.h,this.g,a);this.g+=a;return b};
q.skip=function(a){if(this.g+a>this.h.byteLength)throw Nh();this.g+=a};q.Ii=function(a){if(this.g<a)throw Nh();this.g-=a};q.seek=function(a){if(0>a||a>this.h.byteLength)throw Nh();this.g=a};q.bd=function(){for(var a=this.g;this.Ma()&&0!=this.h.getUint8(this.g);)this.g+=1;a=Nb(this.h,a,this.g-a);this.g+=1;return Gc(a)};function Nh(){return new V(2,3,3E3)}S("shaka.util.DataViewReader",Lh);Lh.prototype.readTerminatedString=Lh.prototype.bd;Lh.prototype.seek=Lh.prototype.seek;Lh.prototype.rewind=Lh.prototype.Ii;
Lh.prototype.skip=Lh.prototype.skip;Lh.prototype.readBytes=Lh.prototype.Tb;Lh.prototype.readUint64=Lh.prototype.Dd;Lh.prototype.readInt32=Lh.prototype.bh;Lh.prototype.readUint32=Lh.prototype.X;Lh.prototype.readUint16=Lh.prototype.Da;Lh.prototype.readUint8=Lh.prototype.ha;Lh.prototype.getLength=Lh.prototype.getLength;Lh.prototype.getPosition=Lh.prototype.Ta;Lh.prototype.hasMoreData=Lh.prototype.Ma;var Mh=1;Lh.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Mh};function Oh(){this.i=new Map;this.h=new Map;this.g=!1}q=Oh.prototype;q.box=function(a,b){a=Ph(a);this.i.set(a,Qh);this.h.set(a,b);return this};q.W=function(a,b){a=Ph(a);this.i.set(a,Rh);this.h.set(a,b);return this};q.stop=function(){this.g=!0};q.parse=function(a,b,c){a=new Lh(a,0);for(this.g=!1;a.Ma()&&!this.g;)this.zd(0,a,b,c)};
q.zd=function(a,b,c,d){var e=b.Ta();if(d&&e+8>b.getLength())this.g=!0;else{var f=b.X(),g=b.X(),h=Sh(g),k=!1;switch(f){case 0:f=b.getLength()-e;break;case 1:if(d&&b.Ta()+8>b.getLength()){this.g=!0;return}f=b.Dd();k=!0}var l=this.h.get(g);if(l){var m=null,n=null;if(this.i.get(g)==Rh){if(d&&b.Ta()+4>b.getLength()){this.g=!0;return}n=b.X();m=n>>>24;n&=16777215}g=e+f;c&&g>b.getLength()&&(g=b.getLength());d&&g>b.getLength()?this.g=!0:(d=g-b.Ta(),b=0<d?b.Tb(d):new Uint8Array(0),b=new Lh(b,0),l({name:h,parser:this,
partialOkay:c||!1,version:m,flags:n,reader:b,size:f,start:e+a,has64BitSize:k}))}else b.skip(Math.min(e+f-b.Ta(),b.getLength()-b.Ta()))}};function Th(a){for(var b=Uh(a);a.reader.Ma()&&!a.parser.g;)a.parser.zd(a.start+b,a.reader,a.partialOkay)}function Vh(a){for(var b=Uh(a),c=a.reader.X(),d=0;d<c&&(a.parser.zd(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function Wh(a){var b=Uh(a);for(a.reader.skip(78);a.reader.Ma()&&!a.parser.g;)a.parser.zd(a.start+b,a.reader,a.partialOkay)}
function Xh(a){var b=Uh(a);a.reader.skip(8);var c=a.reader.Da();a.reader.skip(6);2==c?a.reader.skip(48):a.reader.skip(12);for(1==c&&a.reader.skip(16);a.reader.Ma()&&!a.parser.g;)a.parser.zd(a.start+b,a.reader,a.partialOkay)}function Yh(a){return function(b){a(b.reader.Tb(b.reader.getLength()-b.reader.Ta()))}}function Ph(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function Sh(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}
function Uh(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}S("shaka.util.Mp4Parser",Oh);Oh.headerSize=Uh;Oh.typeToString=Sh;Oh.allData=Yh;Oh.audioSampleEntry=Xh;Oh.visualSampleEntry=Wh;Oh.sampleDescription=Vh;Oh.children=Th;Oh.prototype.parseNext=Oh.prototype.zd;Oh.prototype.parse=Oh.prototype.parse;Oh.prototype.stop=Oh.prototype.stop;Oh.prototype.fullBox=Oh.prototype.W;Oh.prototype.box=Oh.prototype.box;var Qh=0,Rh=1;function Zh(a){var b=this;this.g=[];this.h=[];this.data=[];(new Oh).box("moov",Th).box("moof",Th).W("pssh",function(c){if(!(1<c.version)){var d=Nb(c.reader.h,-12,c.size);b.data.push(d);b.g.push(Tc(c.reader.Tb(16)));if(0<c.version){d=c.reader.X();for(var e=0;e<d;e++){var f=Tc(c.reader.Tb(16));b.h.push(f)}}}}).parse(a)}
function $h(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Rb(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Sc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function ai(a){var b=this;this.G=a;this.j=this.B=null;this.oa=this.ba=!1;this.J=0;this.h=null;this.s=new zd;this.i=new Map;this.T=[];this.C=new Map;this.L=!1;this.m=new kh;this.g=null;this.u=function(c){2==c.severity&&b.m.reject(c);a.onError(c)};this.Y=new Map;this.ea=new Map;this.M=new bc(function(){return bi(b)});this.P=!1;this.N=[];this.U=!1;this.K=new bc(function(){ci(b)});this.m.catch(function(){});this.l=new Hh(function(){return di(b)});this.Z=!1;this.H=this.I=null;this.R=function(){return!1}}
q=ai.prototype;q.destroy=function(){return this.l.destroy()};function di(a){return Q(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.m.reject(),a.K.stop(),a.K=null,a.M.stop(),a.M=null,H(b,ei(a),2);case 2:if(!a.j){b.A(3);break}va(b,4);return H(b,a.j.setMediaKeys(null),6);case 6:xa(b,5);break;case 4:za(b);case 5:a.j=null;case 3:a.h=null,a.B=null,a.C=new Map,a.g=null,a.u=function(){},a.G=null,a.Z=!1,a.I=null,I(b)}})}q.configure=function(a,b){this.g=a;b&&(this.R=b);this.K&&this.K.xa(this.g.updateExpirationTime)};
function fi(a,b,c){a.oa=!0;a.C=new Map;a.P=c;return gi(a,b,!1)}function hi(a,b,c,d){d=void 0===d?!0:d;a.C=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next())a.C.set(e.value,{initData:null,initDataType:null});c=t(a.g.persistentSessionsMetadata);for(e=c.next();!e.done;e=c.next())e=e.value,a.C.set(e.sessionId,{initData:e.initData,initDataType:e.initDataType});a.P=0<a.C.size;return gi(a,b,d)}
function li(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return mi(a,g,[])}
function gi(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E;return Q(function(D){if(1==D.g){ni(a.g.clearKeys,b);d=b.some(function(A){return A.video&&A.video.drmInfos.length||A.audio&&A.audio.drmInfos.length?!0:!1});!d&&c&&(e=Jh(a.g.servers),oi(b,e));f=new Set;g=t(b);for(h=g.next();!h.done;h=g.next())for(k=h.value,l=pi(k),m=t(l),n=m.next();!n.done;n=m.next())p=n.value,f.add(p);r=t(f);for(u=r.next();!u.done;u=r.next())v=u.value,qi(v,Jh(a.g.servers),Jh(a.g.advanced||{}),a.g.keySystemsMapping);w=function(A,
F){var G=[];A=t(A);for(var K=A.next();!K.done;K=A.next()){K=K.value;var L=K[F]||a.g.advanced&&a.g.advanced[K.keySystem]&&a.g.advanced[K.keySystem][F]||"",J;if(J=""==L)J=(J=K.keySystem)?!!J.match(/^com\.widevine\.alpha/):!1;J&&("audioRobustness"==F?L=[a.g.defaultAudioRobustnessForWidevine]:"videoRobustness"==F&&(L=[a.g.defaultVideoRobustnessForWidevine]));if("string"===typeof L)G.push(K);else if(Array.isArray(L))for(0===L.length&&(L=[""]),L=t(L),J=L.next();!J.done;J=L.next()){var M={};G.push(Object.assign({},
K,(M[F]=J.value,M)))}}return G};x=t(b);for(z=x.next();!z.done;z=x.next())B=z.value,B.video&&(B.video.drmInfos=w(B.video.drmInfos,"videoRobustness"),B.video.drmInfos=w(B.video.drmInfos,"audioRobustness")),B.audio&&(B.audio.drmInfos=w(B.audio.drmInfos,"videoRobustness"),B.audio.drmInfos=w(B.audio.drmInfos,"audioRobustness"));return H(D,yg(b,a.P,a.Z,a.g.preferredKeySystems),2)}Ih(a.l);C=d||Object.keys(a.g.servers).length;if(!C)return a.ba=!0,D.return(Promise.resolve());E=mi(a,void 0,b);return D.return(d?
E:E.catch(function(){}))})}function ri(a){var b;return Q(function(c){switch(c.g){case 1:if(a.j.mediaKeys)return c.return();if(!a.I){c.A(2);break}return H(c,a.I,3);case 3:return Ih(a.l),c.return();case 2:return va(c,4),a.I=a.j.setMediaKeys(a.B),H(c,a.I,6);case 6:xa(c,5);break;case 4:b=za(c),a.u(new V(2,6,6003,b.message));case 5:Ih(a.l),I(c)}})}function si(a,b){return Q(function(c){if(1==c.g)return H(c,ri(a),2);ti(a,b.initDataType,Nb(b.initData));I(c)})}
q.Wb=function(a){var b=this;return Q(function(c){if(1==c.g){if(b.j===a)return c.return();if(!b.B)return b.s.ra(a,"encrypted",function(){b.u(new V(2,6,6010))}),c.return();b.j=a;b.s.ra(b.j,"play",function(){for(var d=t(b.N),e=d.next();!e.done;e=d.next())ui(b,e.value);b.U=!0;b.N=[]});b.j.remote?(b.s.o(b.j.remote,"connect",function(){return ei(b)}),b.s.o(b.j.remote,"connecting",function(){return ei(b)}),b.s.o(b.j.remote,"disconnect",function(){return ei(b)})):"webkitCurrentPlaybackTargetIsWireless"in
b.j&&b.s.o(b.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return ei(b)});b.H=b.h?b.h.initData.find(function(d){return 0<d.initData.length})||null:null;return b.H||"com.apple.fps"!==b.h.keySystem||b.C.size?H(c,ri(b),2):c.A(2)}vi(b).catch(function(){});b.H||b.C.size||b.g.parseInbandPsshEnabled||b.s.o(b.j,"encrypted",function(d){return si(b,d)});I(c)})};
function wi(a){var b,c,d,e,f;return Q(function(g){switch(g.g){case 1:if(!a.B||!a.h)return g.return();if(!a.h.serverCertificateUri||a.h.serverCertificate&&a.h.serverCertificate.length){g.A(2);break}b=zh([a.h.serverCertificateUri],a.g.retryParameters);va(g,3);c=a.G.pc.request(5,b,{isPreload:a.R()});return H(g,c.promise,5);case 5:d=g.h;a.h.serverCertificate=Nb(d.data);xa(g,4);break;case 3:throw e=za(g),new V(2,6,6017,e);case 4:if(a.l.g)return g.return();case 2:if(!a.h.serverCertificate||!a.h.serverCertificate.length)return g.return();
va(g,6);return H(g,a.B.setServerCertificate(a.h.serverCertificate),8);case 8:xa(g,0);break;case 6:throw f=za(g),new V(2,6,6004,f.message);}})}function xi(a,b){var c,d,e;return Q(function(f){if(1==f.g)return H(f,yi(a,b,{initData:null,initDataType:null}),2);if(3!=f.g){c=f.h;if(!c)return f.return();d=[];if(e=a.i.get(c))e.Jb=new kh,d.push(e.Jb);d.push(c.remove());return H(f,Promise.all(d),3)}a.i.delete(c);I(f)})}
function vi(a){var b,c,d,e,f;return Q(function(g){if(1==g.g){if(!a.C.size)return g.A(2);a.C.forEach(function(h,k){yi(a,k,h)});return H(g,a.m,3)}if(2!=g.g){b=a.h&&a.h.keyIds||new Set([]);if(0<b.size&&zi(a))return g.return(a.m);a.L=!1;a.m=new kh;a.m.catch(function(){})}c=(a.h?a.h.initData:[])||[];d=t(c);for(e=d.next();!e.done;e=d.next())f=e.value,ti(a,f.initDataType,f.initData);Ai(a)&&a.m.resolve();return g.return(a.m)})}
function ti(a,b,c){if(c.length){if(a.g.ignoreDuplicateInitData){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Mb(c,e.value.initData))return;var f=!1;a.C.forEach(function(g){!f&&Mb(c,g.initData)&&(f=!0)});if(f)return}a.L=!0;0<a.i.size&&Ai(a)&&(a.m.resolve(),a.L=!1,a.m=new kh,a.m.catch(function(){}));Bi(a,b,c,a.h.sessionType)}}function Ci(a){a=a.i.keys();a=nb(a,function(b){return b.sessionId});return Array.from(a)}
q.Dg=function(){var a=this,b=this.i.keys();b=nb(b,function(c){var d=a.i.get(c);return{sessionId:c.sessionId,sessionType:d.type,initData:d.initData,initDataType:d.initDataType}});return Array.from(b)};q.Sd=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};q.Oe=function(){return Kh(this.ea)};
function mi(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:d=new Map;if(c.length){e=Di(a,c,d);n.A(2);break}return H(n,Ei(a,b),3);case 3:e=n.h;case 2:f=e;if(!f){if(!navigator.requestMediaKeySystemAccess)throw new V(2,6,6020);throw new V(2,6,6001);}Ih(a.l);va(n,4);f.getConfiguration();g=a.g.keySystemsMapping[f.keySystem]||f.keySystem;if(c.length){var p=g;var r=d.get(g);var u=[],v=[],w=[],x=[],z=[],B=new Set,C=new Set;Fi(r,u,v,x,w,z,B,C);var E=a.P?"persistent-license":"temporary";
p={keySystem:p,encryptionScheme:u[0],licenseServerUri:v[0],distinctiveIdentifierRequired:r[0].distinctiveIdentifierRequired,persistentStateRequired:r[0].persistentStateRequired,sessionType:r[0].sessionType||E,audioRobustness:r[0].audioRobustness||"",videoRobustness:r[0].videoRobustness||"",serverCertificate:x[0],serverCertificateUri:w[0],initData:z,keyIds:B};0<C.size&&(p.keySystemUris=C);r=t(r);for(C=r.next();!C.done;C=r.next())C=C.value,C.distinctiveIdentifierRequired&&(p.distinctiveIdentifierRequired=
C.distinctiveIdentifierRequired),C.persistentStateRequired&&(p.persistentStateRequired=C.persistentStateRequired);r=p}else r=g,C=b.get(g),p=[],u=[],v=[],w=[],x=[],z=new Set,Fi(C.drmInfos,p,u,w,v,x,z),r={keySystem:r,encryptionScheme:p[0],licenseServerUri:u[0],distinctiveIdentifierRequired:"required"==C.distinctiveIdentifier,persistentStateRequired:"required"==C.persistentState,sessionType:C.sessionTypes[0]||"temporary",audioRobustness:(C.audioCapabilities?C.audioCapabilities[0].robustness:"")||"",
videoRobustness:(C.videoCapabilities?C.videoCapabilities[0].robustness:"")||"",serverCertificate:w[0],serverCertificateUri:v[0],initData:x,keyIds:z};a.h=r;if(!a.h.licenseServerUri)throw new V(2,6,6012,a.h.keySystem);return H(n,f.createMediaKeys(),6);case 6:h=n.h;Ih(a.l);a.B=h;if(!(""!=a.g.minHdcpVersion&&"getStatusForPolicy"in a.B)){n.A(7);break}va(n,8);return H(n,a.B.getStatusForPolicy({minHdcpVersion:a.g.minHdcpVersion}),10);case 10:k=n.h;if("usable"!=k)throw new V(2,6,6018);Ih(a.l);xa(n,7,4);break;
case 8:l=za(n,4);if(l instanceof V)throw l;throw new V(2,6,6019,l.message);case 7:return a.ba=!0,H(n,wi(a),11);case 11:Ih(a.l);xa(n,0);break;case 4:m=za(n);Ih(a.l,m);a.h=null;if(m instanceof V)throw m;throw new V(2,6,6002,m.message);}})}
function Di(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){e=t(pi(e.value));for(var f=e.next();!f.done;f=e.next())f=f.value,c.has(f.keySystem)||c.set(f.keySystem,[]),c.get(f.keySystem).push(f)}if(1==c.size&&c.has(""))throw new V(2,6,6E3);d=a.g.preferredKeySystems;d.length||(e=Jh(a.g.servers),1==e.size&&(d=Array.from(e.keys())));e=t(d);var g=e.next();for(f={};!g.done;f={Fi:void 0},g=e.next()){f.Fi=g.value;g=t(b);for(var h=g.next();!h.done;h=g.next())if(h=h.value.decodingInfos.find(function(n){return function(p){return p.supported&&
null!=p.keySystemAccess&&p.keySystemAccess.keySystem==n.Fi}}(f)))return h.keySystemAccess}e=t([!0,!1]);for(f=e.next();!f.done;f=e.next())for(f=f.value,g=t(b),h=g.next();!h.done;h=g.next()){h=t(h.value.decodingInfos);for(var k=h.next();!k.done;k=h.next())if(k=k.value,k.supported&&k.keySystemAccess){var l=k.keySystemAccess.keySystem;if(!d.includes(l)){var m=c.get(l);!m&&a.g.keySystemsMapping[l]&&(m=c.get(a.g.keySystemsMapping[l]));l=t(m);for(m=l.next();!m.done;m=l.next())if(!!m.value.licenseServerUri==
f)return k.keySystemAccess}}}return null}
function Ei(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x;return Q(function(z){switch(z.g){case 1:if(1==b.size&&b.has(""))throw new V(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.g.preferredKeySystems);h=g.next();case 2:if(h.done){z.A(4);break}k=h.value;if(!b.has(k)){z.A(3);break}l=b.get(k);va(z,6);return H(z,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
z.h,z.return(c);case 6:za(z);case 7:Ih(a.l);case 3:h=g.next();z.A(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){z.A(11);break}p=n.value;r=t(b.keys());u=r.next();case 12:if(u.done){n=m.next();z.A(9);break}v=u.value;w=b.get(v);x=w.drmInfos.some(function(B){return!!B.licenseServerUri});if(x!=p){z.A(13);break}va(z,15);return H(z,navigator.requestMediaKeySystemAccess(v,[w]),17);case 17:return c=z.h,z.return(c);case 15:za(z);case 16:Ih(a.l);case 13:u=r.next();z.A(12);break;case 11:return z.return(c)}})}
function Gi(a){Ai(a)&&a.m.resolve()}function Hi(a,b){(new bc(function(){b.loaded=!0;Gi(a)})).$(Ii)}
function yi(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:try{d=a.B.createSession("persistent-license")}catch(n){return e=new V(2,6,6005,n.message),a.u(e),m.return(Promise.reject(e))}a.s.o(d,"message",function(n){a.j&&a.g.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.U?a.N.push(n):ui(a,n)});a.s.o(d,"keystatuseschange",function(n){return Ji(a,n)});f={initData:c.initData,initDataType:c.initDataType,loaded:!1,Xg:Infinity,Jb:null,type:"persistent-license"};a.i.set(d,f);va(m,2);return H(m,
d.load(b),4);case 4:return g=m.h,Ih(a.l),g||(a.i.delete(d),h=a.g.persistentSessionOnlinePlayback?1:2,a.u(new V(h,6,6013)),f.loaded=!0),Hi(a,f),Gi(a),m.return(d);case 2:k=za(m),Ih(a.l,k),a.i.delete(d),l=a.g.persistentSessionOnlinePlayback?1:2,a.u(new V(l,6,6005,k.message)),f.loaded=!0,Gi(a);case 3:return m.return(Promise.resolve())}})}
function Bi(a,b,c,d){try{var e=a.B.createSession(d)}catch(f){a.u(new V(2,6,6005,f.message));return}a.s.o(e,"message",function(f){a.j&&a.g.delayLicenseRequestUntilPlayed&&a.j.paused&&!a.U?a.N.push(f):ui(a,f)});a.s.o(e,"keystatuseschange",function(f){return Ji(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Xg:Infinity,Jb:null,type:d});try{c=a.g.initDataTransform(c,b,a.h)}catch(f){b=f;f instanceof V||(b=new V(2,6,6016,f));a.u(b);return}a.g.logLicenseExchange&&Qc(c);e.generateRequest(b,c).catch(function(f){if(!a.l.g){a.i.delete(e);
var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.u(new V(2,6,6006,f.message,f,h))}})}function Ki(a){return Q(function(b){return 1==b.g?a.L?H(b,a.m,3):b.A(0):H(b,Promise.all(a.T.map(function(c){return c.promise})),0)})}
function ui(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v;Q(function(w){switch(w.g){case 1:c=b.target;a.g.logLicenseExchange&&Qc(b.message);d=a.i.get(c);e=a.h.licenseServerUri;f=a.g.advanced[a.h.keySystem];"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer);g=zh([e],a.g.retryParameters);g.body=b.message;g.method="POST";g.licenseRequestType=b.messageType;g.sessionId=c.sessionId;g.drmInfo=a.h;d&&(g.initData=d.initData,g.initDataType=d.initDataType);if(f&&f.headers)for(h in f.headers)g.headers[h]=
f.headers[h];if("org.w3.clearkey"===a.h.keySystem){var x=g,z=a.h;try{var B=Jc(x.body);if(B){var C=JSON.parse(B);C.type||(C.type=z.sessionType,x.body=Kc(JSON.stringify(C)))}}catch(E){}}if(Wb(a.h.keySystem))if(x=Hc(g.body,!0,!0),x.includes("PlayReadyKeyMessage")){x=re(x,"PlayReadyKeyMessage");z=Ee(x,"HttpHeader");z=t(z);for(B=z.next();!B.done;B=z.next())C=B.value,B=Ee(C,"name")[0],C=Ee(C,"value")[0],g.headers[Ce(B)]=Ce(C);x=Ee(x,"Challenge")[0];g.body=Rc(Ce(x))}else g.headers["Content-Type"]="text/xml; charset=utf-8";
k=Date.now();va(w,2);m=a.G.pc.request(2,g,{isPreload:a.R()});a.T.push(m);return H(w,m.promise,4);case 4:l=w.h;de(a.T,m);xa(w,3);break;case 2:n=za(w);if(a.l.g)return w.return();p=new V(2,6,6007,n);1==a.i.size?(a.u(p),d&&d.Jb&&d.Jb.reject(p)):(d&&d.Jb&&d.Jb.reject(p),a.i.delete(c),Ai(a)&&(a.m.resolve(),a.M.$(.1)));return w.return();case 3:if(a.l.g)return w.return();a.J+=(Date.now()-k)/1E3;a.g.logLicenseExchange&&Qc(l.data);va(w,5);return H(w,c.update(l.data),7);case 7:xa(w,6);break;case 5:return r=
za(w),u=new V(2,6,6008,r.message),a.u(u),d&&d.Jb&&d.Jb.reject(u),w.return();case 6:if(a.l.g)return w.return();v=new T("drmsessionupdate");a.G.onEvent(v);d&&(d.Jb&&d.Jb.resolve(),Hi(a,d));I(w)}})}
function Ji(a,b){b=b.target;var c=a.i.get(b),d=!1;b.keyStatuses.forEach(function(f,g){if("string"==typeof g){var h=g;g=f;f=h}if(Wb(a.h.keySystem)&&16==g.byteLength&&(fc()||tc())){h=Rb(g);var k=h.getUint32(0,!0),l=h.getUint16(4,!0),m=h.getUint16(6,!0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);"expired"==f&&(d=!0);g=Tc(g).slice(0,32);a.Y.set(g,f)});var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Jb&&(a.i.delete(b),Li(b));Ai(a)&&(a.m.resolve(),
a.M.$(Mi))}function bi(a){var b=a.Y,c=a.ea;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.u(new V(2,6,6014));a.G.lf(Kh(c))}
function Ni(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R;return Q(function(U){if(1==U.g){a="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" ");if(!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)){b=
{};c=t(a);for(d=c.next();!d.done;d=c.next())e=d.value,b[e]=null;return U.return(b)}f="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" ");g=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];h=["150","2000","3000"];k={"com.widevine.alpha":g,"com.widevine.alpha.experiment":g,"com.microsoft.playready.recommendation":h};l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];m=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];
n={videoCapabilities:l,audioCapabilities:m,initDataTypes:["cenc","sinf","skd","keyids"]};p=[null,"cenc","cbcs","cbcs-1-9"];r=new Map;u=function(ua,ba){var Ma,Ra,Aa,qa,Ia,ya,Ea,ra,Ba,Va,vb,ib,jb;return Q(function(qb){switch(qb.g){case 1:return va(qb,2),H(qb,ba.createMediaKeys(),5);case 5:Ma=qb.h;case 4:xa(qb,3);break;case 2:return za(qb),qb.return();case 3:Aa=(Ra=ba.getConfiguration().sessionTypes)?Ra.includes("persistent-license"):!1;jc()&&(Aa=!1);qa=ba.getConfiguration().videoCapabilities;Ia=ba.getConfiguration().audioCapabilities;
ya={persistentState:Aa,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]};r.has(ua)&&r.get(ua)?ya=r.get(ua):r.set(ua,ya);(Ea=qa[0].encryptionScheme)&&!ya.encryptionSchemes.includes(Ea)&&ya.encryptionSchemes.push(Ea);(ra=qa[0].robustness)&&!ya.videoRobustnessLevels.includes(ra)&&ya.videoRobustnessLevels.push(ra);(Ba=Ia[0].robustness)&&!ya.audioRobustnessLevels.includes(Ba)&&ya.audioRobustnessLevels.push(Ba);if("getStatusForPolicy"in Ma){Va=[];vb=t(f);ib=vb.next();
for(jb={};!ib.done;jb={Wd:void 0},ib=vb.next())jb.Wd=ib.value,ya.minHdcpVersions.includes(jb.Wd)||Va.push(Ma.getStatusForPolicy({minHdcpVersion:jb.Wd}).then(function(Fb){return function(Te){"usable"!=Te||ya.minHdcpVersions.includes(Fb.Wd)||ya.minHdcpVersions.push(Fb.Wd)}}(jb)));return H(qb,Promise.all(Va),0)}qb.A(0)}})};v=function(ua,ba,Ma,Ra){var Aa,qa,Ia,ya,Ea,ra,Ba,Va,vb,ib;return Q(function(jb){switch(jb.g){case 1:va(jb,2);Aa=ne(n);qa=t(Aa.videoCapabilities);for(Ia=qa.next();!Ia.done;Ia=qa.next())ya=
Ia.value,ya.encryptionScheme=ba,ya.robustness=Ma;Ea=t(Aa.audioCapabilities);for(ra=Ea.next();!ra.done;ra=Ea.next())Ba=ra.value,Ba.encryptionScheme=ba,Ba.robustness=Ra;Va=ne(Aa);Va.persistentState="required";Va.sessionTypes=["persistent-license"];vb=[Va,Aa];return xc()?H(jb,lg(5,navigator.requestMediaKeySystemAccess(ua,vb)),7):H(jb,navigator.requestMediaKeySystemAccess(ua,vb),6);case 6:ib=jb.h;jb.A(5);break;case 7:ib=jb.h;case 5:return H(jb,u(ua,ib),8);case 8:xa(jb,0);break;case 2:za(jb),I(jb)}})};
w=function(ua,ba,Ma,Ra){var Aa,qa,Ia;return Q(function(ya){switch(ya.g){case 1:return va(ya,2),Aa={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:m[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:ua,video:{encryptionScheme:ba,robustness:Ma},audio:{encryptionScheme:ba,robustness:Ra}}},xc()?H(ya,lg(5,navigator.mediaCapabilities.decodingInfo(Aa)),7):H(ya,navigator.mediaCapabilities.decodingInfo(Aa),
6);case 6:qa=ya.h;ya.A(5);break;case 7:qa=ya.h;case 5:return Ia=qa.keySystemAccess,H(ya,u(ua,Ia),8);case 8:xa(ya,0);break;case 2:za(ya),I(ya)}})};x=t(a);for(z=x.next();!z.done;z=x.next())B=z.value,r.set(B,null);C=function(ua){return"org.w3.clearkey"===ua&&oc()?!1:!0};E=[];D=t(p);for(A=D.next();!A.done;A=D.next())for(F=A.value,G=t(a),K=G.next();!K.done;K=G.next())L=K.value,C(L)&&(E.push(v(L,F,"","")),E.push(w(L,F,"","")));J=t(a);for(M=J.next();!M.done;M=J.next())for(N=M.value,P=t(k[N]||[]),O=P.next();!O.done;O=
P.next())R=O.value,C(N)&&(E.push(v(N,null,R,"")),E.push(v(N,null,"",R)),E.push(w(N,null,R,"")),E.push(w(N,null,"",R)));return H(U,Promise.all(E),2)}return U.return(Kh(r))})}function Li(a){return Q(function(b){if(1==b.g)return va(b,2),H(b,lg(Oi,Promise.all([a.close().catch(function(){}),a.closed])),4);if(2!=b.g)return xa(b,0);za(b);I(b)})}
function ei(a){var b;return Q(function(c){b=Array.from(a.i.entries());a.i.clear();return H(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return Q(function(g){if(1==g.g)return va(g,2),a.oa||a.C.has(e.sessionId)||"persistent-license"!==f.type||a.g.persistentSessionOnlinePlayback?H(g,Li(e),5):H(g,e.remove(),5);if(2!=g.g)return xa(g,0);za(g);I(g)})})),0)})}function pi(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}
function ci(a){a.i.forEach(function(b,c){var d=b.Xg,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.G.onExpirationUpdated(c.sessionId,e),b.Xg=e)})}function Ai(a){a=a.i.values();return ob(a,function(b){return b.loaded})}function zi(a){for(var b=t(a.h&&a.h.keyIds||new Set([])),c=b.next();!c.done;c=b.next())if("usable"!==a.Y.get(c.value))return!1;return!0}
function oi(a,b){var c=[];b.forEach(function(d,e){c.push({keySystem:e,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});a=t(a);for(b=a.next();!b.done;b=a.next())b=b.value,b.video&&(b.video.drmInfos=c),b.audio&&(b.audio.drmInfos=c)}
function Fi(a,b,c,d,e,f,g,h){var k=[];a=t(a);for(var l=a.next(),m={};!l.done;m={Oa:void 0},l=a.next()){m.Oa=l.value;b.includes(m.Oa.encryptionScheme)||b.push(m.Oa.encryptionScheme);"org.w3.clearkey"==m.Oa.keySystem&&m.Oa.licenseServerUri.startsWith("data:application/json;base64,")?k.includes(m.Oa.licenseServerUri)||k.push(m.Oa.licenseServerUri):c.includes(m.Oa.licenseServerUri)||c.push(m.Oa.licenseServerUri);e.includes(m.Oa.serverCertificateUri)||e.push(m.Oa.serverCertificateUri);m.Oa.serverCertificate&&
(d.some(function(r){return function(u){return Mb(u,r.Oa.serverCertificate)}}(m))||d.push(m.Oa.serverCertificate));if(m.Oa.initData){l=t(m.Oa.initData);for(var n=l.next(),p={};!n.done;p={Pg:void 0},n=l.next())p.Pg=n.value,f.some(function(r){return function(u){var v=r.Pg;return u.keyId&&u.keyId==v.keyId?!0:u.initDataType==v.initDataType&&Mb(u.initData,v.initData)}}(p))||f.push(p.Pg)}if(m.Oa.keyIds)for(l=t(m.Oa.keyIds),n=l.next();!n.done;n=l.next())g.add(n.value);if(m.Oa.keySystemUris&&h)for(m=t(m.Oa.keySystemUris),
l=m.next();!l.done;l=m.next())h.add(l.value)}if(1==k.length)c.push(k[0]);else if(0<k.length){b=[];k=t(k);for(d=k.next();!d.done;d=k.next())d=window.atob(d.value.split("data:application/json;base64,").pop()),d=JSON.parse(d),b.push.apply(b,y(d.keys));k=JSON.stringify({keys:b});c.push("data:application/json;base64,"+window.btoa(k))}}
function qi(a,b,c,d){var e=a.keySystem;if(e&&("org.w3.clearkey"!=e||!a.licenseServerUri)){b.size&&b.get(e)&&(b=b.get(e),a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(e))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.serverCertificate||(a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=
c.serverCertificateUri);d[e]&&(a.keySystem=d[e]);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==e&&(a.keySystem="com.chromecast.playready")}}function ni(a,b){a=Jh(a);if(0!=a.size){a=Xc(a);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.drmInfos=[a]),c.audio&&(c.audio.drmInfos=[a])}}var Oi=1,Ii=5,Mi=.5;function Pi(a,b,c){c=void 0===c?!0:c;this.h=a;this.g=new Set([a]);b=b||[];a=t(b);for(b=a.next();!b.done;b=a.next())this.add(b.value,c)}
Pi.prototype.add=function(a,b){var c=this.h;b=void 0===b?!0:b;var d;if(!(d=!!c.audio!=!!a.audio||!!c.video!=!!a.video||c.language!=a.language)&&(d=c.audio&&a.audio)){d=c.audio;var e=a.audio;d=!(!((!d.channelsCount||!e.channelsCount||2<d.channelsCount||2<e.channelsCount)&&d.channelsCount!=e.channelsCount||d.spatialAudio!==e.spatialAudio||b&&!Qi(d,e))&&Ri(d.roles,e.roles)&&d.groupId===e.groupId)}!d&&(d=c.video&&a.video)&&(c=c.video,d=a.video,d=!((!b||Qi(c,d))&&Ri(c.roles,d.roles)));return d?!1:(this.g.add(a),
!0)};Pi.prototype.values=function(){return this.g.values()};function Qi(a,b){if(a.mimeType!=b.mimeType)return!1;a=a.codecs.split(",").map(function(d){return Vf(d)});b=b.codecs.split(",").map(function(d){return Vf(d)});if(a.length!=b.length)return!1;a.sort();b.sort();for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}
function Ri(a,b){a=new Set(a);b=new Set(b);a.delete("main");b.delete("main");if(a.size!=b.size)return!1;a=t(a);for(var c=a.next();!c.done;c=a.next())if(!b.has(c.value))return!1;return!0}S("shaka.media.AdaptationSet",Pi);S("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Si(){}Si.prototype.create=function(){};Si.prototype.configure=function(){};S("shaka.media.AdaptationSetCriteria",Si);function Ti(){this.g=Ui;this.i=(new Map).set(Ui,2).set(Vi,1);this.h=0}var Vi=0,Ui=1;/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Wi(a,b,c){this.g=a;this.i=b;this.h=c}function Xi(a,b){return Q(function(c){if(1==c.g)return H(c,rg(a.h,b,a.g.drm.preferredKeySystems,a.g.drm.keySystemsMapping),2);a.g.streaming.dontChooseCodecs||ng(b,a.g.preferredVideoCodecs,a.g.preferredAudioCodecs,a.g.preferredDecodingAttributes,a.g.preferredTextFormats);if(!b.variants.some(Xg))throw new V(2,4,4032);return c.return(Yi(a,b))})}
function Zi(a,b){var c=a.g.restrictions;a=a.i;var d=!1;b=t(b.variants);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=e.allowedByApplication;e.allowedByApplication=qg(e,c,a);f!=e.allowedByApplication&&(d=!0)}return d}function Yi(a,b){var c=Zi(a,b);if(b){var d=a.h?a.h.h:null;if(d&&a.h.B)for(var e=t(b.variants),f=e.next();!f.done;f=e.next())f=f.value,$i(a,d.keySystem,f.video),$i(a,d.keySystem,f.audio);aj(a,b)}return c}
function $i(a,b,c){if(c){c=t(c.drmInfos);for(var d=c.next();!d.done;d=c.next())if(d=d.value,d.keySystem==b){d=t(d.initData||[]);for(var e=d.next();!e.done;e=d.next())e=e.value,ti(a.h,e.initDataType,e.initData)}}}
function aj(a,b){a=a.h?a.h.Oe():{};var c=Object.keys(a);c=c.length&&"00"==c[0];var d=!1,e=!1,f=new Set,g=new Set;b=t(b.variants);for(var h=b.next();!h.done;h=b.next()){h=h.value;var k=[];h.audio&&k.push(h.audio);h.video&&k.push(h.video);k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.keyIds.size){l=t(l.keyIds);for(var m=l.next();!m.done;m=l.next()){m=m.value;var n=a[c?"00":m];n?bj.includes(n)&&g.add(n):f.add(m)}}h.allowedByApplication?h.allowedByKeySystem&&(d=!0):e=!0}if(!d)throw a={hasAppRestrictions:e,
missingKeys:Array.from(f),restrictedKeyStatuses:Array.from(g)},new V(2,4,4012,a);}var bj=["output-restricted","internal-error"];function cj(){}function dj(a,b){ej.set(a,b)}function fj(){var a={};if(cc())for(var b=t(ej.keys()),c=b.next();!c.done;c=b.next())a[c.value]=!0;b=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(c=b.next();!c.done;c=b.next())c=c.value,a[c]=cc()?ej.has(c):dc(c);return a}function gj(a,b){if(b){var c=ej.get(b.toLowerCase());if(c)return c}throw new V(2,4,4E3,a,b);}S("shaka.media.ManifestParser",cj);cj.unregisterParserByMime=function(a){ej.delete(a)};
cj.registerParserByMime=dj;cj.registerParserByExtension=function(){Fd("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")};cj.AccessibilityPurpose={Im:"visually impaired",Zl:"hard of hearing"};var ej=new Map;function hj(a,b){var c=null,d=null,e=null,f=null,g=a.X();b&1&&(e=a.Dd());b&2&&(f=a.X());b&8&&(c=a.X());b&16&&(d=a.X());return{trackId:g,Od:c,Pd:d,sj:e,Ji:f}}function ij(a,b){return 1==b?(b=a.X(),a=a.X(),{baseMediaDecodeTime:b*Math.pow(2,32)+a}):{baseMediaDecodeTime:a.X()}}function jj(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));b=a.X();a.skip(4);a=a.Da();return{timescale:b,language:String.fromCharCode((a>>10)+96)+String.fromCharCode(((a&960)>>5)+96)+String.fromCharCode((a&31)+96)}}
function kj(a,b,c){var d=a.X(),e=[],f=null;c&1&&(f=a.bh());c&4&&a.skip(4);for(var g=0;g<d;g++){var h={ih:null,sampleSize:null,wf:null};c&256&&(h.ih=a.X());c&512&&(h.sampleSize=a.X());c&1024&&a.skip(4);c&2048&&(h.wf=0==b?a.X():a.bh());e.push(h)}return{Nm:d,hh:e,lg:f}}function lj(a){a.skip(6);a.skip(2);a.skip(8);var b=a.Da();a.skip(2);a.skip(2);a.skip(2);a=a.Da()+a.Da()/65536;return{channelCount:b,sampleRate:a}}function mj(a){a=a.X();return{codec:Sh(a)}}
function nj(a){var b=null,c=null,d=a.Tb(4);var e=String.fromCharCode(d[0]);e+=String.fromCharCode(d[1]);e+=String.fromCharCode(d[2]);e+=String.fromCharCode(d[3]);if("nclx"===e){switch(a.Da()){case 1:case 5:case 6:case 7:b="srgb";break;case 9:b="rec2020";break;case 11:case 12:b="p3"}d=a.Da();a.Da();switch(d){case 1:case 6:case 13:case 14:case 15:c="SDR";break;case 16:c="PQ";break;case 18:c="HLG"}}return{colorGamut:b,re:c}}
function oj(a,b){b=void 0===b?!1:b;a=a.toString(16).toUpperCase();return b?a:("0"+a).slice(-2)}function pj(a){return(10>a?"0":"")+a};function qj(a){if(!rj){rj=!0;var b=new Uint8Array([105,115,111,109]),c=new Uint8Array([97,118,99,49]),d=new Uint8Array([0,0,0,1]);sj=tj("ftyp",b,d,b,c);b=tj("dref",uj);vj=tj("dinf",b)}this.g=a}
function wj(a){for(var b=[],c=t(a.g),d=c.next();!d.done;d=c.next()){var e=b,f=e.push;var g=d.value;d=tj;var h=g.id+1;var k=g.stream.width||0,l=g.stream.height||0;"audio"==g.type&&(l=k=0);var m=g.duration*g.timescale,n=Math.floor(m/(xj+1));m=Math.floor(m%(xj+1));h=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(yj(h,4)),[0,0,0,0],y(yj(n,4)),y(yj(m,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],y(yj(k,2)),[0,0],y(yj(l,
2)),[0,0]));h=tj("tkhd",h);k=tj;n=g.duration*g.timescale;l=Math.floor(n/(xj+1));n=Math.floor(n%(xj+1));m=g.stream.language;m=m.charCodeAt(0)-96<<10|m.charCodeAt(1)-96<<5|m.charCodeAt(2)-96;l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(yj(g.timescale,4)),y(yj(l,4)),y(yj(n,4)),y(yj(m,2)),[0,0]));l=tj("mdhd",l);n=g;m=new Uint8Array([]);switch(n.type){case "video":m=zj;break;case "audio":m=Aj}n=tj("hdlr",m);a:{switch(g.type){case "video":g=tj("minf",tj("vmhd",Bj),vj,Cj(g));break a;
case "audio":g=tj("minf",tj("smhd",Dj),vj,Cj(g));break a}g=new Uint8Array([])}g=k("mdia",l,n,g);d=d("trak",h,g);f.call(e,d)}b=Uc.apply(Oc,y(b));f=a.g[0];c=tj;d=f.duration*f.timescale;e=Math.floor(d/(xj+1));d=Math.floor(d%(xj+1));e=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(y(yj(f.timescale,4)),y(yj(e,4)),y(yj(d,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
255]));e=tj("mvhd",e);d=[];a=t(a.g);for(k=a.next();!k.done;k=a.next())g=d,h=g.push,k=new Uint8Array([0,0,0,0].concat(y(yj(k.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),k=tj("trex",k),h.call(g,k);a=Uc.apply(Oc,y(d));a=tj("mvex",a);d=[];if(f.encrypted){f=t(f.stream.drmInfos);for(g=f.next();!g.done;g=f.next())if(g=g.value,g.initData)for(g=t(g.initData),h=g.next();!h.done;h=g.next())d.push(h.value.initData);f=Uc.apply(Oc,y(d))}else f=new Uint8Array([]);a=c("moov",e,b,a,f);b=new Uint8Array(sj.byteLength+
a.byteLength);b.set(sj);b.set(a,sj.byteLength);return b}
function Cj(a){var b=tj,c="aac";a.codecs.includes("mp3")?c="mp3":a.codecs.includes("ac-3")?c=jc()?"ec-3":"ac-3":a.codecs.includes("ec-3")?c="ec-3":a.codecs.includes("opus")&&(c="opus");var d=new Uint8Array([]);switch(a.type){case "video":if(a.codecs.includes("avc1")){c=a.stream.width||0;d=a.stream.height||0;if(0<a.Wa.byteLength)var e=tj("avcC",a.Wa);else{e=tj;for(var f=7,g=[],h=[],k=0,l=0,m=0,n=0;n<a.Cb.length;n++){var p=Ej(a.Cb[n]);switch(p[0]&31){case 7:g.push(p);f+=p.length+2;break;case 8:h.push(p),
f+=p.length+2}}0<g.length&&(k=g[0][1],m=g[0][2],l=g[0][3]);f=new Uint8Array(f);n=0;f[n++]=1;f[n++]=k;f[n++]=m;f[n++]=l;f[n++]=255;f[n++]=224|g.length;for(k=0;k<g.length;k++)f[n++]=(g[k].length&65280)>>8,f[n++]=g[k].length&255,f.set(g[k],n),n+=g[k].length;f[n++]=h.length;for(g=0;g<h.length;g++)f[n++]=(h[g].length&65280)>>8,f[n++]=h[g].length&255,f.set(h[g],n),n+=h[g].length;e=e("avcC",f)}c=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(yj(c,2)),y(yj(d,2)),[0,72,0,0,0,72,
0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]));d="avc1";h=Fj(a);g=new Uint8Array([]);a.encrypted&&(g=Gj(0,a.stream,a.codecs),d="encv");d=tj(d,c,e,h,g)}else a.codecs.includes("hvc1")&&(d=a.stream.width||0,e=a.stream.height||0,c=new Uint8Array([]),0<a.Wa.byteLength&&(c=tj("hvcC",a.Wa)),d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(y(yj(d,2)),y(yj(e,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,
105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),e="hvc1",h=Fj(a),g=new Uint8Array([]),a.encrypted&&(g=Gj(0,a.stream,a.codecs),e="encv"),d=tj(e,d,c,h,g));break;case "audio":if("mp3"==c)a=tj(".mp3",Hj(a));else if("ac-3"==c)c=tj("dac3",a.Ja),d="ac-3",e=new Uint8Array([]),a.encrypted&&(e=Gj(0,a.stream,a.codecs),d="enca"),a=tj(d,Hj(a),c,e);else if("ec-3"==c)c=tj("dec3",a.Ja),d="ec-3",e=new Uint8Array([]),a.encrypted&&(e=Gj(0,a.stream,a.codecs),
d="enca"),a=tj(d,Hj(a),c,e);else if("opus"==c)c=tj("dOps",a.Ja),d="Opus",e=new Uint8Array([]),a.encrypted&&(e=Gj(0,a.stream,a.codecs),d="enca"),a=tj(d,Hj(a),c,e);else{if(0<a.Ja.byteLength)c=tj("esds",a.Ja);else{c=tj;d=a.id+1;e=a.stream.channelsCount||2;g=a.stream.audioSamplingRate||44100;k=Yc("audio",a.codecs.split(","));l={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};h=l[g];if("mp4a.40.5"===k||"mp4a.40.29"===k)h=l[2*g];g=parseInt(k.split(".").pop(),
10);d=new Uint8Array([0,0,0,0,3,25].concat(y(yj(d,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,g<<3|h>>>1,h<<7|e<<3,6,1,2]));c=c("esds",d)}d="mp4a";e=new Uint8Array([]);a.encrypted&&(e=Gj(0,a.stream,a.codecs),d="enca");a=tj(d,Hj(a),c,e)}d=a}a=tj("stsd",Ij,d);return b("stbl",a,tj("stts",Jj),tj("stsc",Kj),tj("stsz",Lj),tj("stco",Mj))}function Fj(a){if(!a.cb&&!a.eb)return new Uint8Array([]);var b=a.eb;a=new Uint8Array([].concat(y(yj(a.cb,4)),y(yj(b,4))));return tj("pasp",a)}
function Hj(a){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,a.stream.channelsCount||2,0,16,0,0,0,0].concat(y(yj(a.stream.audioSamplingRate||44100,2)),[0,0]))}
function Gj(a,b,c){a=tj;c=new Uint8Array([].concat(y(yj(Nj(c.split(".")[0]),4))));c=tj("frma",c);var d="cenc";var e=b.drmInfos[0];e&&e.encryptionScheme&&(d=e.encryptionScheme);d=new Uint8Array([0,0,0,0].concat(y(yj(Nj(d),4)),[0,1,0,0]));d=tj("schm",d);e=tj;var f=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);b=t(b.drmInfos);for(var g=b.next();!g.done;g=b.next())if((g=g.value)&&g.keyIds&&g.keyIds.size){g=t(g.keyIds);for(var h=g.next();!h.done;h=g.next())f=Ej(h.value)}b=new Uint8Array([0,0,0,0,0,
0,1,8]);b=tj("tenc",b,f);return a("sinf",c,d,e("schi",b))}
function Oj(a){var b=[];a=t(a.g);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=b.push,e=d.apply;var f=tj;var g=new Uint8Array([0,0,0,0].concat(y(yj(c.data?c.data.Ub:0,4))));g=tj("mfhd",g);var h;var k=c.data?c.data.Ab:[];var l=new Uint8Array(4+k.length);for(h=0;h<k.length;h++){var m=k[h].flags;l[h+4]=m.pb<<4|m.rb<<2|m.qb}k=tj("sdtp",l);var n=k.length+92;l=tj;h=new Uint8Array([0,0,0,58].concat(y(yj(c.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));h=tj("tfhd",h);m=c.data?c.data.baseMediaDecodeTime:
0;var p=Math.floor(m%(xj+1));m=new Uint8Array([1,0,0,0].concat(y(yj(Math.floor(m/(xj+1)),4)),y(yj(p,4))));m=tj("tfdt",m);var r=n;n=c.data?c.data.Ab:[];p=n.length;var u=12+16*p,v=new Uint8Array(u);r+=8+u;v.set(["video"===c.type?1:0,0,15,1].concat(y(yj(p,4)),y(yj(r,4))),0);for(r=0;r<p;r++){var w=n[r];u=yj(w.duration,4);var x=yj(w.size,4),z=w.flags;w=yj(w.wb,4);v.set([].concat(y(u),y(x),[z.yb<<2|z.pb,z.rb<<6|z.qb<<4|z.zb,z.ob&61440,z.ob&15],y(w)),12+16*r)}n=tj("trun",v);k=l("traf",h,m,n,k);f=f("moof",
g,k);e.call(d,b,[f,Pj(c)])}return Uc.apply(Oc,y(b))}function Pj(a){a=(a.data?a.data.Ab:[]).map(function(b){return b.data});a=Uc.apply(Oc,y(a));return tj("mdat",a)}function yj(a,b){var c=[];for(--b;0<=b;b--)c.push(a>>8*b&255);return c}function Ej(a){for(var b=new Uint8Array(a.length/2),c=0;c<a.length/2;c+=1)b[c]=parseInt(String(a[2*c]+a[2*c+1]),16);return b}function Nj(a){for(var b=0,c=0;c<a.length;c+=1)b|=a.charCodeAt(c)<<8*(a.length-c-1);return b}
function tj(a){var b=Na.apply(1,arguments),c=Qj.get(a);c||(c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)],Qj.set(a,c));for(var d=8,e=b.length-1;0<=e;e--)d+=b[e].byteLength;e=new Uint8Array(d);e[0]=d>>24&255;e[1]=d>>16&255;e[2]=d>>8&255;e[3]=d&255;e.set(c,4);c=0;for(d=8;c<b.length;c++)e.set(b[c],d),d+=b[c].byteLength;return e}
var rj=!1,xj=Math.pow(2,32)-1,Qj=new Map,zj=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Aj=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Jj=new Uint8Array([0,0,0,0,0,0,0,0]),Kj=new Uint8Array([0,0,0,0,0,0,0,0]),Mj=new Uint8Array([0,0,0,0,0,0,0,0]),Lj=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Bj=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Dj=new Uint8Array([0,
0,0,0,0,0,0,0]),Ij=new Uint8Array([0,0,0,0,0,0,0,1]),sj=new Uint8Array([]),uj=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),vj=new Uint8Array([]);function Rj(a,b,c){function d(r){n.push({box:r,zi:1701733217})}function e(r){n.push({box:r,zi:1701733238})}function f(r){k=!0;r.parser.stop()}function g(r){m.push(r);Th(r)}var h=b=Nb(b),k=!1,l,m=[],n=[];(new Oh).box("moov",g).box("trak",g).box("mdia",g).box("minf",g).box("stbl",g).W("stsd",function(r){l=r;m.push(r);Vh(r)}).W("encv",f).W("enca",f).W("dvav",e).W("dva1",e).W("dvh1",e).W("dvhe",e).W("dvc1",e).W("dvi1",e).W("hev1",e).W("hvc1",e).W("avc1",e).W("avc3",e).W("ac-3",d).W("ec-3",d).W("ac-4",
d).W("Opus",d).W("fLaC",d).W("mp4a",d).parse(b);if(k)return b;if(0==n.length||!l)throw kb(Tc(b)),new V(2,3,3019,c);n.reverse();c=t(n);for(var p=c.next();!p.done;p=c.next())p=p.value,h=Sj(a,h,l,p.box,m,p.zi);return fc()&&wc()&&!gc()?(a=new Uint8Array(b.byteLength+h.byteLength),a.set(h),a.set(b,h.byteLength),a):h}
function Tj(a){a=Nb(a);var b=[];(new Oh).box("mdat",function(g){b.push(g)}).parse(a);for(var c=[],d=0;d<b.length;d++){var e=b[d-1],f=b[d];c.push(Uj(a.subarray(e?e.start+e.size:0,f.start+f.size)))}return Uc.apply(Oc,y(c))}
function Uj(a){function b(n){g.push(n);Th(n)}var c,d,e,f,g=[];(new Oh).box("moof",b).box("traf",b).W("tfhd",function(n){c=n;e=hj(n.reader,n.flags)}).W("trun",function(n){d=n;f=kj(n.reader,n.version,n.flags)}).parse(a);if(e&&2!==e.Ji){var h=c.start+Uh(c)+4+(null!==e.sj?8:0),k=Rb(a);if(null!==e.Ji)k.setUint32(h,2);else{Vj(a,c.start,c.size+4);var l=k.getUint32(c.start+8);k.setUint32(c.start+8,l|2);f&&null!==f.lg&&k.setInt32(d.start+Uh(d)+4,f.lg+4);l=a.subarray(0,h);k=a.subarray(h);a=new Uint8Array(a.byteLength+
4);a.set(l);l=[];for(var m=3;0<=m;m--)l.push(2>>8*m&255);a.set(new Uint8Array(l),h);a.set(k,h+4);h=t(g);for(k=h.next();!k.done;k=h.next())k=k.value,Vj(a,k.start,k.size+4)}}return a}
function Sj(a,b,c,d,e,f){var g=Gj(new qj([]),a,d.name),h=b.subarray(d.start,d.start+d.size);a=new Uint8Array(d.size+g.byteLength);a.set(h,0);Rb(a).setUint32(4,f);a.set(g,d.size);Vj(a,0,a.byteLength);f=new Uint8Array(b.byteLength+a.byteLength);d=oc()||gc()||fc()?d.start:d.start+d.size;g=b.subarray(d);f.set(b.subarray(0,d));f.set(a,d);f.set(g,d+a.byteLength);b=t(e);for(e=b.next();!e.done;e=b.next())e=e.value,Vj(f,e.start,e.size+a.byteLength);a=Rb(f,c.start);c=Uh(c);b=a.getUint32(c);a.setUint32(c,b+
1);return f}function Vj(a,b,c){a=Rb(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}
function Wj(a){function b(e){d.push({start:e.start,size:e.size});Th(e)}var c=Nb(a),d=[];(new Oh).box("moov",b).box("trak",b).box("mdia",b).box("minf",b).box("stbl",b).box("stsd",function(e){d.push({start:e.start,size:e.size});for(var f=Rb(c,e.start),g=0;g<e.size-3;g++){var h=f.getUint32(g);1633889587==h?f.setUint32(g,1700998451):1684103987==h&&f.setUint32(g,1684366131)}}).parse(c);return c};function Xj(a,b,c,d,e,f,g,h){this.S=a;this.hb=b;this.Pa=c;this.xd=void 0===d?null:d;this.timescale=void 0===e?null:e;this.h=void 0===f?null:f;this.aesKey=void 0===g?null:g;this.g=this.mimeType=this.codecs=null;this.encrypted=void 0===h?!1:h}Xj.prototype.cc=function(){return this.hb};Xj.prototype.Zb=function(){return this.Pa};Xj.prototype.me=function(a){this.h=a};Xj.prototype.bc=function(){return this.h};
function Yj(a,b){return a===b?!0:a&&b?a.cc()==b.cc()&&a.Zb()==b.Zb()&&fe(a.S().sort(),b.S().sort())&&Mb(a.bc(),b.bc()):a==b}S("shaka.media.InitSegmentReference",Xj);Xj.prototype.getEndByte=Xj.prototype.Zb;Xj.prototype.getStartByte=Xj.prototype.cc;
function Zj(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v){l=void 0===l?[]:l;r=void 0===r?ak:r;this.startTime=a;this.j=this.endTime=b;this.G=c;this.hb=d;this.Pa=e;this.ia=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.g=l;this.tilesLayout=void 0===m?"":m;this.C=void 0===n?null:n;this.h=void 0===p?null:p;this.status=r;this.preload=!1;this.l=!0;this.m=!1;this.aesKey=void 0===u?null:u;this.thumbnailSprite=null;this.i=-1;this.B=void 0===v?!1:v;this.H=this.s=!1;a=t(this.g);for(b=a.next();!b.done;b=
a.next())b.value.wi();this.B&&this.g.length&&this.g[this.g.length-1].ti();this.u=this.bandwidth=this.mimeType=this.codecs=null;this.I=!1}q=Zj.prototype;q.S=function(){return this.G()};q.getStartTime=function(){return this.startTime};q.Mj=function(){return this.endTime};q.cc=function(){return this.hb};q.Zb=function(){return this.Pa};q.kk=function(){return this.tilesLayout};q.jk=function(){return this.C};q.Ac=function(){return this.status};q.Lk=function(){this.status=bk};
q.Ug=function(){this.preload=!0};q.isPreload=function(){return this.preload};q.wd=function(){this.l=!1};q.Bk=function(){return this.l};q.wi=function(){this.s=!0};q.Dk=function(){return this.s};q.ti=function(){this.H=!0};q.Ck=function(){return this.H};q.si=function(){this.m=!0};q.wk=function(){return this.m};q.Cf=function(a){this.thumbnailSprite=a};q.ik=function(){return this.thumbnailSprite};
q.offset=function(a){this.startTime+=a;this.endTime+=a;this.j+=a;for(var b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.startTime+=a,c.endTime+=a,c.j+=a};q.xh=function(a){null==this.h?cb("Sync attempted without sync time!"):(a=this.h-a-this.startTime,.001<=Math.abs(a)&&this.offset(a))};q.me=function(a,b){this.u=a;this.I=void 0===b?!1:b};q.bc=function(a){var b=this.u;(void 0===a||a)&&this.I&&(this.u=null);return b};
function ck(a,b){a.ia=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())ck(c.value,b)}S("shaka.media.SegmentReference",Zj);Zj.prototype.getSegmentData=Zj.prototype.bc;Zj.prototype.setSegmentData=Zj.prototype.me;Zj.prototype.syncAgainst=Zj.prototype.xh;Zj.prototype.offset=Zj.prototype.offset;Zj.prototype.getThumbnailSprite=Zj.prototype.ik;Zj.prototype.setThumbnailSprite=Zj.prototype.Cf;Zj.prototype.hasByterangeOptimization=Zj.prototype.wk;Zj.prototype.markAsByterangeOptimization=Zj.prototype.si;
Zj.prototype.isLastPartial=Zj.prototype.Ck;Zj.prototype.markAsLastPartial=Zj.prototype.ti;Zj.prototype.isPartial=Zj.prototype.Dk;Zj.prototype.markAsPartial=Zj.prototype.wi;Zj.prototype.isIndependent=Zj.prototype.Bk;Zj.prototype.markAsNonIndependent=Zj.prototype.wd;Zj.prototype.isPreload=Zj.prototype.isPreload;Zj.prototype.markAsPreload=Zj.prototype.Ug;Zj.prototype.markAsUnavailable=Zj.prototype.Lk;Zj.prototype.getStatus=Zj.prototype.Ac;Zj.prototype.getTileDuration=Zj.prototype.jk;
Zj.prototype.getTilesLayout=Zj.prototype.kk;Zj.prototype.getEndByte=Zj.prototype.Zb;Zj.prototype.getStartByte=Zj.prototype.cc;Zj.prototype.getEndTime=Zj.prototype.Mj;Zj.prototype.getStartTime=Zj.prototype.getStartTime;Zj.prototype.getUris=Zj.prototype.S;var ak=0,bk=1;Zj.Status={Il:ak,Gm:bk,gm:2};function dk(a){return 1==a.length&&1E-4>a.end(0)-a.start(0)}function ek(a){return!a||dk(a)?null:a.length?a.end(a.length-1):null}function fk(a,b){return!a||!a.length||dk(a)||b>a.end(a.length-1)?!1:b>=a.start(0)}function gk(a,b){if(!a||!a.length||dk(a))return 0;var c=0;a=t(hk(a));for(var d=a.next();!d.done;d=a.next()){var e=d.value;d=e.start;e=e.end;e>b&&(c+=e-Math.max(d,b))}return c}
function ik(a,b,c){if(!a||!a.length||dk(a))return null;a=hk(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function hk(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function jk(){}function W(a){return document.createElement(a)}function kk(){var a=document.createElement("button");a.setAttribute("type","button");return a}function lk(a,b){var c=document.createElement("source");c.src=a;c.type=void 0===b?"":b;return c}function mk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}S("shaka.util.Dom",jk);jk.removeAllChildren=mk;/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function nk(){}function ok(a,b){return b+10<=a.length&&73===a[b]&&68===a[b+1]&&51===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function pk(a,b){return b+10<=a.length&&51===a[b]&&68===a[b+1]&&73===a[b+2]&&255>a[b+3]&&255>a[b+4]&&128>a[b+6]&&128>a[b+7]&&128>a[b+8]&&128>a[b+9]?!0:!1}function qk(a,b){var c=(a[b]&127)<<21;c|=(a[b+1]&127)<<14;c|=(a[b+2]&127)<<7;return c|=a[b+3]&127}
function rk(a){var b={key:a.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===a.type){if(2>a.size||3!==a.data[0])return null;var c=a.data.subarray(1).indexOf(0);if(-1===c)return null;var d=Gc(Nb(a.data,1,c)),e=a.data[2+c],f=a.data.subarray(3+c).indexOf(0);if(-1===f)return null;var g=Gc(Nb(a.data,3+c,f)),h;"--\x3e"===d?h=Gc(Nb(a.data,4+c+f)):h=Ob(a.data.subarray(4+c+f));b.mimeType=d;b.pictureType=e;b.description=g;b.data=h;return b}if("TXXX"===a.type){if(2>a.size||3!==a.data[0])return null;
d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Gc(Nb(a.data,1,d));a=Gc(Nb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("WXXX"===a.type){if(2>a.size||3!==a.data[0])return null;d=a.data.subarray(1).indexOf(0);if(-1===d)return null;c=Gc(Nb(a.data,1,d));a=Gc(Nb(a.data,2+d)).replace(/\0*$/,"");b.description=c;b.data=a;return b}if("PRIV"===a.type){if(2>a.size)return null;c=a.data.indexOf(0);if(-1===c)return null;c=Gc(Nb(a.data,0,c));b.description=c;"com.apple.streaming.transportStreamTimestamp"==
c?(c=a.data.subarray(c.length+1),a=c[3]&1,c=(c[4]<<23)+(c[5]<<15)+(c[6]<<7)+c[7],c/=45,a&&(c+=4.772185884E7),b.data=c):(a=Ob(a.data.subarray(c.length+1)),b.data=a);return b}if("T"===a.type[0]){if(2>a.size||3!==a.data[0])return null;a=Gc(a.data.subarray(1)).replace(/\0*$/,"");b.data=a;return b}return"W"===a.type[0]?(a=Gc(a.data).replace(/\0*$/,""),b.data=a,b):a.data?(b.data=Ob(a.data),b):null}
function sk(a){for(var b=0,c=[];ok(a,b);){var d=qk(a,b+6);a[b+5]>>6&1&&(b+=10);b+=10;for(d=b+d;b+10<d;){var e=a.subarray(b),f=qk(e,4);e={type:String.fromCharCode(e[0],e[1],e[2],e[3]),size:f,data:e.subarray(10,10+f)};(f=rk(e))&&c.push(f);b+=e.size+10}pk(a,b)&&(b+=10)}return c}function tk(a,b){for(var c=b=void 0===b?0:b,d=0;ok(a,b);)a[b+5]>>6&1&&(d+=10),d+=10,d+=qk(a,b+6),pk(a,b+10)&&(d+=10),b+=d;return 0<d?a.subarray(c,c+d):new Uint8Array([])}S("shaka.util.Id3Utils",nk);nk.getID3Data=tk;
nk.getID3Frames=sk;/*

 Copyright Brightcove, Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/
function uk(a,b){this.j=a;if(void 0===b?0:b){b=new Uint8Array(a.byteLength);for(var c=0,d=0;d<a.byteLength;d++)2<=d&&3==a[d]&&0==a[d-1]&&0==a[d-2]||(b[c]=a[d],c++);this.j=Nb(b,0,c)}this.i=this.j.byteLength;this.g=this.h=0}function vk(a){var b=a.j.byteLength-a.i,c=new Uint8Array(4),d=Math.min(4,a.i);0!==d&&(c.set(a.j.subarray(b,b+d)),a.h=(new Lh(c,0)).X(),a.g=8*d,a.i-=d)}function wk(a,b){if(a.g<=b){b-=a.g;var c=Math.floor(b/8);b-=8*c;a.g-=c;vk(a)}a.h<<=b;a.g-=b}
function xk(a,b){var c=Math.min(a.g,b),d=a.h>>>32-c;a.g-=c;0<a.g?a.h<<=c:0<a.i&&vk(a);c=b-c;return 0<c?d<<c|xk(a,c):d}function yk(a){var b;for(b=0;b<a.g;++b)if(0!==(a.h&2147483648>>>b))return a.h<<=b,a.g-=b,b;vk(a);return b+yk(a)}function zk(a){wk(a,1+yk(a))}function X(a){var b=yk(a);return xk(a,b+1)-1}function Ak(a){a=X(a);return 1&a?1+a>>>1:-1*(a>>>1)}function Bk(a){return 1===xk(a,1)}function Ck(a){return xk(a,8)}
function Dk(a,b){for(var c=8,d=8,e=0;e<b;e++)0!==d&&(d=Ak(a),d=(c+d+256)%256),c=0===d?c:d}function Ek(a){Ck(a);X(a);return X(a)}S("shaka.util.ExpGolomb",uk);function Fk(){this.I=null;this.J=!1;this.m=this.K=null;this.j=[];this.g=[];this.B=this.C=null;this.i=[];this.h=[];this.G=null;this.l=[];this.H=this.s=this.u=null}q=Fk.prototype;q.clearData=function(){this.j=[];this.g=[];this.i=[];this.h=[];this.l=[]};
q.parse=function(a){if(564>a.length)return this;for(var b=Math.max(0,Gk(a)),c=a.length-(a.length+b)%188,d=!1,e=b;e<c;e+=188)if(71==a[e]){var f=!!(a[e+1]&64),g=((a[e+1]&31)<<8)+a[e+2];if(1<(a[e+3]&48)>>4){var h=e+5+a[e+4];if(h==e+188)continue}else h=e+4;switch(g){case 0:f&&(h+=a[h]+1);this.I=(a[h+10]&31)<<8|a[h+11];break;case 17:case 8191:break;case this.I:f&&(h+=a[h]+1);f=a;g={audio:-1,video:-1,Te:-1,audioCodec:"",videoCodec:""};var k=h+3+((f[h+1]&15)<<8|f[h+2])-4;for(h+=12+((f[h+10]&15)<<8|f[h+11]);h<
k;){var l=(f[h+1]&31)<<8|f[h+2],m=(f[h+3]&15)<<8|f[h+4];switch(f[h]){case 6:if(0<m)for(var n=h+5,p=m;2<p;){var r=f[n+1]+2;switch(f[n]){case 5:var u=Ic(f.subarray(n+2,n+r));-1==g.audio&&"Opus"===u?(g.audio=l,g.audioCodec="opus"):-1==g.video&&"AV01"===u&&(g.video=l,g.videoCodec="av1");break;case 106:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");break;case 122:-1==g.audio&&(g.audio=l,g.audioCodec="ec3");break;case 124:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 127:"opus"==g.audioCodec&&(u=
null,128===f[n+2]&&(u=f[n+3]),null!=u&&(this.H={channelCount:0===(u&15)?2:u&15,tj:u,sampleRate:48E3}))}n+=r;p-=r}break;case 15:-1==g.audio&&(g.audio=l,g.audioCodec="aac");break;case 17:-1==g.audio&&(g.audio=l,g.audioCodec="aac-loas");break;case 21:-1==g.Te&&(g.Te=l);break;case 27:-1==g.video&&(g.video=l,g.videoCodec="avc");break;case 3:case 4:-1==g.audio&&(g.audio=l,g.audioCodec="mp3");break;case 36:-1==g.video&&(g.video=l,g.videoCodec="hvc");break;case 129:-1==g.audio&&(g.audio=l,g.audioCodec="ac3");
break;case 132:case 135:-1==g.audio&&(g.audio=l,g.audioCodec="ec3")}h+=m+5}f=g;-1!=f.video&&(this.K=f.video,this.m=f.videoCodec);-1!=f.audio&&(this.C=f.audio,this.B=f.audioCodec);-1!=f.Te&&(this.G=f.Te);d&&!this.J&&(d=!1,e=b-188);this.J=!0;break;case this.K:h=a.subarray(h,e+188);f?this.j.push([h]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(h);break;case this.C:h=a.subarray(h,e+188);f?this.i.push([h]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(h);
break;case this.G:h=a.subarray(h,e+188);f?this.l.push([h]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(h);break;default:d=!0}}return this};
function Hk(a,b){if(1!==(b[0]<<16|b[1]<<8|b[2]))return null;var c={data:new Uint8Array(0),packetLength:b[4]<<8|b[5],pts:null,dts:null,nalus:[]};if(c.packetLength&&c.packetLength>b.byteLength-6)return null;var d=b[7];if(d&192){var e=536870912*(b[9]&14)+4194304*(b[10]&255)+16384*(b[11]&254)+128*(b[12]&255)+(b[13]&254)/2;null==a.u&&(a.u=e);c.pts=Ik(e,a.u);a.u=c.pts;c.dts=c.pts;d&64&&(d=536870912*(b[14]&14)+4194304*(b[15]&255)+16384*(b[16]&254)+128*(b[17]&255)+(b[18]&254)/2,null==a.s&&(a.s=d),c.dts=Ik(d,
a.s));a.s=c.dts}a=b[8]+9;if(b.byteLength<=a)return null;c.data=b.subarray(a);return c}q.Sk=function(a){Fd("TsParser.parseAvcNalus","Please use parseNalus function instead.");return this.Zg(a,{ce:null,state:null})};
q.Zg=function(a,b){var c=a.pts?a.pts/9E4:null;a=a.data;var d=a.byteLength,e=1;"hvc"==this.m&&(e=2);var f=b.state||0,g=f,h=0,k=[],l=-1,m=0;-1==f&&(l=0,m="hvc"==this.m?a[0]>>1&63:a[0]&31,f=0,h=1);for(;h<d;){var n=a[h++];if(f)if(1===f)f=n?0:2;else if(n)if(1==n){n=h-f-1;if(0<=l)k.push({data:a.subarray(l+e,n),fullData:a.subarray(l,n),type:m,time:c,state:null});else if(f=k.length?k[k.length-1]:b.ce)g&&h<=4-g&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-g),f.fullData=f.fullData.subarray(0,f.fullData.byteLength-
g)),0<n&&(n=a.subarray(0,n),f.data=Uc(f.data,n),f.fullData=Uc(f.fullData,n),f.state=0);h<d?(m="hvc"==this.m?a[h]>>1&63:a[h]&31,l=h,f=0):f=-1}else f=0;else f=3;else f=n?0:1}0<=l&&0<=f&&k.push({data:a.subarray(l+e,d),fullData:a.subarray(l,d),type:m,time:c,state:f});!k.length&&b.ce&&(c=k.length?k[k.length-1]:b.ce)&&(c.data=Uc(c.data,a),c.fullData=Uc(c.fullData,a));b.state=f;return k};
q.getMetadata=function(){for(var a=[],b=t(this.l),c=b.next();!c.done;c=b.next())c=Uc.apply(Oc,y(c.value)),(c=Hk(this,c))&&a.push({cueTime:c.pts?c.pts/9E4:null,data:c.data,frames:sk(c.data),dts:c.dts,pts:c.pts});return a};
q.xb=function(){if(this.i.length&&!this.h.length){for(var a=!1,b=t(this.i),c=b.next();!c.done;c=b.next()){var d=Uc.apply(Oc,y(c.value)),e=Hk(this,d);c=this.h.length?this.h[this.h.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.h.length&&e.dts<(c.dts||0)&&(a=!0),this.h.push(e)):this.h.length&&(d=e?e.data:d)&&(c=this.h.pop(),c.data=Uc(c.data,d),this.h.push(c))}a&&(this.h=this.h.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.h};
q.Sc=function(a){a=void 0===a?!0:a;if(this.j.length&&!this.g.length){for(var b=!1,c=t(this.j),d=c.next();!d.done;d=c.next()){var e=Uc.apply(Oc,y(d.value)),f=Hk(this,e);d=this.g.length?this.g[this.g.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.g.length&&f.dts<(d.dts||0)&&(b=!0),this.g.push(f)):this.g.length&&(e=f?f.data:e)&&(d=this.g.pop(),d.data=Uc(d.data,e),this.g.push(d))}if(a){c={ce:null,state:null};d=[];e=t(this.g);for(f=e.next();!f.done;f=e.next())f=f.value,
f.nalus=this.Zg(f,c),f.nalus.length&&(d.push(f),c.ce=f.nalus[f.nalus.length-1]);this.g=d}b&&(this.g=this.g.sort(function(g,h){var k=(g.pts||0)-(h.pts||0);return(g.dts||0)-(h.dts||0)||k}))}return a?this.g:(a=this.g,this.g=[],a)};q.getStartTime=function(a){if("audio"==a){a=null;var b=this.xb();b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4);return a}return"video"==a?(a=null,b=this.Sc(!1),b.length&&(a=b[0],a=Math.min(a.dts,a.pts)/9E4),a):null};q.Rd=function(){return{audio:this.B,video:this.m}};
q.Se=function(){for(var a=[],b=t(this.Sc()),c=b.next();!c.done;c=b.next())a.push.apply(a,y(c.value.nalus));return a};q.rk=function(){Fd("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var a=this.Kg();return{height:a.height,width:a.width}};q.Kg=function(){return"hvc"==this.m?Jk(this):Kk(this)};function Lk(a){var b=a.Sc();return 1<b.length&&(a=b[0].pts,b=b[1].pts,!isNaN(b-a))?String(1/(b-a)*9E4):null}
function Kk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Se();if(!c.length)return b;c=c.find(function(r){return 7==r.type});if(!c)return b;c=new uk(c.data);var d=Ck(c),e=Ck(c),f=Ck(c);zk(c);if(Mk.includes(d)){var g=X(c);3===g&&wk(c,1);zk(c);zk(c);wk(c,1);if(Bk(c)){g=3!==g?8:12;for(var h=0;h<g;h++)Bk(c)&&(6>h?Dk(c,16):Dk(c,64))}}zk(c);g=X(c);if(0===g)X(c);else if(1===g)for(wk(c,1),zk(c),zk(c),g=X(c),h=0;h<g;h++)zk(c);zk(c);wk(c,1);g=X(c);h=X(c);var k=xk(c,1);0===k&&wk(c,1);wk(c,
1);var l=0,m=0,n=0,p=0;Bk(c)&&(l=X(c),m=X(c),n=X(c),p=X(c));b.height=String((2-k)*(h+1)*16-2*n-2*p);b.width=String(16*(g+1)-2*l-2*m);b.codec="avc1."+("0"+d.toString(16).toUpperCase()).slice(-2)+("0"+e.toString(16).toUpperCase()).slice(-2)+("0"+f.toString(16).toUpperCase()).slice(-2);b.frameRate=Lk(a);return b}
function Jk(a){var b={height:null,width:null,codec:null,frameRate:null},c=a.Se();if(!c.length)return b;c=c.find(function(E){return 33==E.type});if(!c)return b;var d=new uk(c.fullData,!0);Ck(d);Ck(d);xk(d,4);var e=xk(d,3);Bk(d);var f=xk(d,2),g=xk(d,1),h=xk(d,5),k=xk(d,32);c=Ck(d);for(var l=Ck(d),m=Ck(d),n=Ck(d),p=Ck(d),r=Ck(d),u=Ck(d),v=[],w=[],x=0;x<e;x++)v.push(Bk(d)),w.push(Bk(d));if(0<e)for(x=e;8>x;x++)xk(d,2);for(x=0;x<e;x++)v[x]&&xk(d,88),w[x]&&Ck(d);X(d);e=X(d);3==e&&xk(d,1);v=X(d);w=X(d);var z=
x=0,B=0,C=0;Bk(d)&&(x+=X(d),z+=X(d),B+=X(d),C+=X(d));b.width=String(v-(x+z)*(1===e||2===e?2:1));b.height=String(w-(B+C)*(1===e?2:1));d=function(E){for(var D=0,A=0;32>A;A++)D|=(E>>A&1)<<31-A;return D>>>0}(k);g=1==g?"H":"L";f="hvc1"+("."+["","A","B","C"][f]+h);f+="."+d.toString(16).toUpperCase();f+="."+g+u;r&&(f+="."+r.toString(16).toUpperCase());p&&(f+="."+p.toString(16).toUpperCase());n&&(f+="."+n.toString(16).toUpperCase());m&&(f+="."+m.toString(16).toUpperCase());l&&(f+="."+l.toString(16).toUpperCase());
c&&(f+="."+c.toString(16).toUpperCase());b.codec=f;b.frameRate=Lk(a);return b}function Ik(a,b){var c=1;for(a>b&&(c=-1);4294967296<Math.abs(b-a);)a+=8589934592*c;return a}function Nk(a){return 0>Gk(a)?!1:!0}function Gk(a){for(var b=Math.min(1E3,a.length-564),c=0;c<b;){if(71==a[c]&&71==a[c+188]&&71==a[c+376])return c;c++}return-1}S("shaka.util.TsParser",Fk);Fk.syncOffset=Gk;Fk.probe=Nk;Fk.prototype.getVideoInfo=Fk.prototype.Kg;Fk.prototype.getVideoResolution=Fk.prototype.rk;
Fk.prototype.getVideoNalus=Fk.prototype.Se;Fk.prototype.getCodecs=Fk.prototype.Rd;Fk.prototype.getStartTime=Fk.prototype.getStartTime;Fk.prototype.getVideoData=Fk.prototype.Sc;Fk.prototype.getAudioData=Fk.prototype.xb;Fk.prototype.getMetadata=Fk.prototype.getMetadata;Fk.prototype.parseNalus=Fk.prototype.Zg;Fk.prototype.parseAvcNalus=Fk.prototype.Sk;Fk.prototype.parse=Fk.prototype.parse;Fk.prototype.clearData=Fk.prototype.clearData;Fk.Timescale=9E4;
var Mk=[100,110,122,244,44,83,86,118,128,138,139,134];function Ok(a,b,c,d){var e=this;this.g=a;this.L=c;this.B=null;this.ba=b;this.l=new Map;this.C=new Map;this.Fa=new Map;this.h=null;this.Na=!1;this.K=d||null;this.u=new Map;this.s=new zd;this.j=new Map;this.M=null;this.I=new kh;this.La="";this.Za=!1;this.Aa=!0;this.Z=!1;this.G=this.N=null;this.i=Pk(this,this.I);this.Ha=this.J=!1;this.P=new Hh(function(){return Qk(e)});this.H=!1;this.R="UNKNOWN";this.Sa=this.Ya=!1;this.Ka=new kh;this.m=!1;this.va=null;this.Y=new Map;this.oa=this.T=this.qa=this.U=null;
this.ea=new kh;this.g.remote&&(this.Z="disconnected"!=this.g.remote.state,this.s.o(this.g.remote,"connect",function(){e.Z="disconnected"!=e.g.remote.state}),this.s.o(this.g.remote,"connecting",function(){e.Z="disconnected"!=e.g.remote.state}),this.s.o(this.g.remote,"disconnect",function(){e.Z="disconnected"!=e.g.remote.state}))}
function Pk(a,b){a.Aa=!0;if(window.ManagedMediaSource){a.G||(a.g.disableRemotePlayback=!0);var c=new ManagedMediaSource;a.s.o(c,"startstreaming",function(){a.Aa=!0});a.s.o(c,"endstreaming",function(){a.Aa=!1})}else c=new MediaSource;a.s.ra(c,"sourceopen",function(){URL.revokeObjectURL(a.La);b.resolve()});a.s.ra(a.g,"playing",function(){a.Za=!0});a.La=Rk(c);a.g.removeAttribute("src");a.N&&a.g.removeChild(a.N);a.G&&a.g.removeChild(a.G);a.N=lk(a.La);a.g.appendChild(a.N);a.G&&a.g.appendChild(a.G);a.g.load();
return c}function Sk(a,b,c){a.g&&window.ManagedMediaSource&&a.i&&(a.G&&a.g.removeChild(a.G),a.G=lk(b,c),a.g.appendChild(a.G),a.g.disableRemotePlayback=!1)}
function Tk(a,b){var c,d,e,f,g,h,k,l,m,n,p;return Q(function(r){if(1==r.g)return a.createSegmentIndex?H(r,a.createSegmentIndex(),2):r.A(2);if(!a.segmentIndex)return r.return(!1);if(0==a.segmentIndex.getNumReferences())return r.return(!0);c=dd;d=new Set;e=t(a.segmentIndex);for(f=e.next();!f.done;f=e.next())if(g=f.value,h=g.mimeType||a.mimeType||"",k=g.codecs||a.codecs||"",h!=a.mimeType||k!=a.codecs)if(l=h+":"+k,!d.has(l))if(d.add(l),b==c.Ra){if(m=Mf(h,k),!cg(m))return r.return(!1)}else if(b==c.Ba?
k=Kg(k):b==c.aa&&(k=Jg(k,h)),n=Qf(a,h,k),p=Of(h,k),!Nd(n)&&!Gf(p))return r.return(!1);return r.return(!0)})}
function Uk(){var a='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",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.01",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(y(Nf)),b=
{};a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;cg(c)?b[c]=!0:b[c]=cc()?Nd(c)||(Gf(c)?!0:!1):dc(c);var d=c.split(";")[0];b[d]=b[d]||b[c]}return b}q=Ok.prototype;q.destroy=function(){return this.P.destroy()};
function Qk(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v;return Q(function(w){if(1==w.g){b=[];c=t(a.u);for(d=c.next();!d.done;d=c.next())for(e=d.value,f=t(e),g=f.next().value,h=f.next().value,k=h[0],l=g,a.u.set(l,h.slice(0,1)),k&&b.push(k.p.catch(jg)),m=t(h.slice(1)),n=m.next();!n.done;n=m.next())p=n.value,p.p.reject(new V(2,7,7003,void 0));a.h&&b.push(a.h.destroy());return H(w,Promise.all(b),2)}r=t(a.j.values());for(u=r.next();!u.done;u=r.next())v=u.value,v.destroy();a.s&&(a.s.release(),a.s=null);a.g&&a.G&&
a.g.removeChild(a.G);a.g&&a.N&&(a.g.removeChild(a.N),a.g.load(),a.g.disableRemotePlayback=!1);a.g=null;a.N=null;a.G=null;a.B=null;a.i=null;a.h=null;a.ba=null;a.l.clear();a.Fa.clear();a.j.clear();a.M=null;a.u.clear();a.K=null;a.Y.clear();a.L=null;I(w)})}
q.init=function(a,b,c,d){b=void 0===b?!1:b;c=void 0===c?"UNKNOWN":c;d=void 0===d?!1:d;var e=this,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return f=dd,H(n,e.I,2);case 2:if(!Vk(e)&&!dl(e)){n.A(3);break}cb("Expected MediaSource to be open during init(); reopening the media source.");e.I=new kh;e.i=Pk(e,e.I);return H(n,e.I,3);case 3:e.H=b,e.R=c,e.Ya=d,e.Sa=!e.H&&"HLS"==e.R&&!e.Ya,e.Y.clear(),e.U=null,e.qa=null,e.T=null,e.oa=null,e.ea=new kh,g=t(a.keys()),h=g.next();case 5:if(h.done){n.A(7);
break}k=h.value;l=a.get(k);return H(n,el(e,k,l,l.codecs),8);case 8:e.m?(e.u.set(f.aa,[]),e.u.set(f.Ba,[])):e.u.set(k,[]);h=g.next();n.A(5);break;case 7:(m=a.get(f.aa))&&m.isAudioMuxedInVideo&&(e.m=!0),I(n)}})};
function el(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v;return Q(function(w){switch(w.g){case 1:return e=dd,f=Ya,g=Za,H(w,Tk(c,b),2);case 2:g.call(f,w.h,"Type negotiation should happen before MediaSourceEngine.init!");b==e.aa&&d&&(d=Jg(d,c.mimeType));h=Mf(c.mimeType,d);if(b==e.Ra){fl(a,h,a.H,c.external);w.A(0);break}k=a.B.forceTransmux;if(!Nd(h)||!a.H&&Nf.includes(h))k=!0;l=Of(c.mimeType,d);if(!k){w.A(4);break}m=Zc(e.aa,(d||"").split(","));n=Zc(e.Ba,(d||"").split(","));if(!m||!n){w.A(5);break}a.m=!0;return H(w,
el(a,e.aa,c,m),6);case 6:return H(w,el(a,e.Ba,c,n),7);case 7:return w.return();case 5:if(p=Gf(l))r=p(),a.j.set(b,r),h=r.convertCodecs(b,l);case 4:u=h+a.B.addExtraFeaturesToSourceBuffer(h);Ih(a.P);try{v=a.i.addSourceBuffer(u)}catch(x){throw new V(2,3,3015,x,"The mediaSource_ status was "+a.i.readyState+" expected 'open'",null);}a.H&&(v.mode=gl);a.s.o(v,"error",function(){var x=a.u.get(b)[0];x.p.reject(new V(2,3,3014,a.g.error?a.g.error.code:0,x.uri))});a.s.o(v,"updateend",function(){return hl(a,b)});
a.l.set(b,v);a.C.set(b,h);a.Fa.set(b,!!c.drmInfos.length);I(w)}})}q.configure=function(a){this.B=a;this.h&&(this.h.B=a.modifyCueCallback)};function il(a){return a.Aa&&!a.Z&&!a.J}
function fl(a,b,c,d){a.h||(a.h=new Zf(a.ba),a.h&&(a.h.B=a.B.modifyCueCallback));var e=a.h;d=d||a.Na;a=a.R;"application/cea-608"==b||"application/cea-708"==b?e.i=null:(e.i=ag.get(b)(),e.i.setSequenceMode?e.i.setSequenceMode(c):Fd("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),e.i.setManifestType?e.i.setManifestType(a):Fd("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),e.C=d)}
function Vk(a){return a.J?!1:a.i?"ended"==a.i.readyState:!0}function dl(a){return a.J?!1:a.i?"closed"==a.i.readyState:!0}function jl(a,b){a.l.size?b==bd?a=a.h.g:(a=kl(a,b),a=!a||dk(a)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null):a=null;return a}function ll(a,b){return a.l.size?b==bd?a.h.h:ek(kl(a,b)):null}function ml(a,b,c){if(b==bd)return a=a.h,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=kl(a,b);return gk(a,c)}
q.Yb=function(){var a={total:this.J?[]:hk(this.g.buffered),audio:hk(kl(this,"audio")),video:hk(kl(this,"video")),text:[]};if(this.h){var b=this.h.g,c=this.h.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function kl(a,b){if(a.J||a.Z)return null;try{return a.l.get(b).buffered}catch(c){return a.l.has(b),null}}
function nl(a,b,c,d,e,f){var g=null,h=[],k=Nb(c);if(Nf.includes(f))b=sk(k),b.length&&d&&((c=b.find(function(r){return"com.apple.streaming.transportStreamTimestamp"===r.description}))&&(g=Math.round(c.data)/1E3),a.L.onMetadata([{cueTime:d.startTime,data:k,frames:b,dts:d.startTime,pts:d.startTime}],0,d.endTime));else if(f.includes("/mp4")&&d&&d.ia&&d.ia.timescale){var l=d.ia.timescale;if(!isNaN(l)){var m=null!=e.emsgSchemeIdUris&&0<e.emsgSchemeIdUris.length||a.B.dispatchAllEmsgBoxes,n=0,p=!1;k=new Oh;
m&&k.W("emsg",function(r){var u=e.emsgSchemeIdUris;if(0===r.version){var v=r.reader.bd();var w=r.reader.bd();var x=r.reader.X();var z=r.reader.X();var B=r.reader.X();var C=r.reader.X();var E=d.startTime+z/x}else x=r.reader.X(),E=r.reader.Dd()/x+d.timestampOffset,z=E-d.startTime,B=r.reader.X(),C=r.reader.X(),v=r.reader.bd(),w=r.reader.bd();r=r.reader.Tb(r.reader.getLength()-r.reader.Ta());if(u&&u.includes(v)||a.B.dispatchAllEmsgBoxes)if("urn:mpeg:dash:event:2012"==v)a.L.Rk();else if(u=E+B/x,x={startTime:E,
endTime:u,schemeIdUri:v,value:w,timescale:x,presentationTimeDelta:z,eventDuration:B,id:C,messageData:r},C=(new Map).set("detail",x),(new T("emsg",C)).cancelable=!0,a.L.Pk(x),"https://aomedia.org/emsg/ID3"==v||"https://developer.apple.com/streaming/emsg-id3"==v)if(v=sk(r),v.length)a.L.onMetadata([{cueTime:E,data:r,frames:v,dts:E,pts:E}],0,u)});k.W("prft",function(r){var u=r.reader,v=r.version;u.X();r=u.X();var w=u.X();r=1E3*r+w/Math.pow(2,32)*1E3;0===v?u=u.X():(v=u.X(),u=u.X(),u=v*Math.pow(2,32)+u);
r=(new Date((new Date(Date.UTC(1900,0,1,0,0,0))).getTime()+r)).getTime();u=(new Map).set("detail",{wallClockTime:r,programStartDate:new Date(r-u/l*1E3)});u=new T("prft",u);a.L.onEvent(u)}).box("moof",Th).box("traf",Th).W("tfdt",function(r){p||(n=ij(r.reader,r.version).baseMediaDecodeTime/l,p=!0,m||r.parser.stop())}).parse(c,!0);p&&0==d.timestampOffset&&(g=n)}}else f.includes("/mp4")||f.includes("/webm")||!Nk(k)||(a.Y.has(b)?a.Y.get(b).clearData():a.Y.set(b,new Fk),h=a.Y.get(b).parse(k),k=h.getStartTime(b),
null!=k&&(g=k),h=h.getMetadata());return{timestamp:g,metadata:h}}
function ol(a,b,c,d,e,f,g,h,k,l){g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;l=void 0===l?!1:l;var m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L;return Q(function(J){switch(J.g){case 1:m=dd;if(b!=m.Ra){J.A(2);break}if("HLS"!=a.R){J.A(3);break}return H(J,a.Ka,4);case 4:n=J.h,a.h.u=n;case 3:return H(J,dg(a.h,c,d?d.startTime:null,d?d.endTime:null,d?d.S()[0]:null),5);case 5:return J.return();case 2:if(l||!a.m){J.A(6);break}return H(J,ol(a,m.aa,c,d,e,f,g,h,k,!0),7);case 7:return H(J,ol(a,m.Ba,c,d,e,f,
g,h,k,!0),8);case 8:return J.return();case 6:if(!a.l.has(b))return J.return();p=a.l.get(b).timestampOffset;r=a.C.get(b);a.j.has(b)&&(r=a.j.get(b).getOriginalMimeType());if(d&&(u=nl(a,b,c,d,e,r),v=u.timestamp,w=u.metadata,null!=v&&(null==a.U&&b==m.Ba&&(a.U=v,a.qa=d.startTime,null!=a.T&&(x=0,a.qa==a.oa&&(x=a.U-a.T),a.ea.resolve(x))),null==a.T&&b==m.aa&&(a.T=v,a.oa=d.startTime,null!=a.U&&(z=0,a.qa==a.oa&&(z=a.U-a.T),a.ea.resolve(z))),B=v,C=Nf,!a.H&&C.includes(a.C.get(b))&&(B=0),E=d.startTime-B,D=Math.abs(p-
E),(.001<=D||g||h)&&(!k||0<E||!p)&&(p=E,a.Sa&&(pl(a,b,function(){return ql(a,b)},null),pl(a,b,function(){return rl(a,b,p)},null))),(A=b==m.Ba||!a.l.has(m.Ba))&&a.Ka.resolve(p)),w.length))a.L.onMetadata(w,p,d?d.endTime:null);f&&b==m.Ba&&(a.h||fl(a,"application/cea-608",a.H,!1),a.M||(F=r.split(";",1)[0],a.M=new Ud(F)),d?(G=a.M.i(c),G.length&&hg(a.h,G,d.startTime,d.endTime,p)):a.M.init(c,h));if(!a.j.has(b)){J.A(9);break}return H(J,a.j.get(b).transmux(c,e,d,a.i.duration,b),10);case 10:c=J.h;case 9:c=
sl(a,e,c,d,b);if(!d||!a.H||b==m.Ra){J.A(11);break}if(!g&&!h){J.A(11);break}K=d.startTime;if("HLS"!=a.R||a.m||b!=m.aa||!a.l.has(m.Ba)){J.A(13);break}return H(J,a.ea,14);case 14:L=J.h,.15<Math.abs(L)&&(K-=L);case 13:pl(a,b,function(){return ql(a,b)},null),pl(a,b,function(){return rl(a,b,K)},null);case 11:return H(J,pl(a,b,function(){var M=c;a.K&&Kd(a.K,M,p,e);a.l.get(b).appendBuffer(M)},d?d.S()[0]:null),15);case 15:I(J)}})}function tl(a,b){var c=ll(a,"video")||0;fg(a.h,b,c)}
function ul(a){a.h&&fg(a.h,"",0)}q.remove=function(a,b,c){var d=this,e;return Q(function(f){return 1==f.g?(e=dd,a==e.Ra?H(f,d.h.remove(b,c),0):c>b?H(f,pl(d,a,function(){return vl(d,a,b,c)},null),5):f.A(0)):d.m?H(f,pl(d,e.aa,function(){return vl(d,e.aa,b,c)},null),0):f.A(0)})};
function wl(a,b){var c;return Q(function(d){return 1==d.g?(c=dd,b==c.Ra?a.h?H(d,a.h.remove(0,Infinity),0):d.return():H(d,pl(a,b,function(){return vl(a,b,0,a.i.duration)},null),4)):a.m?H(d,pl(a,c.aa,function(){return vl(a,c.aa,0,a.i.duration)},null),0):d.A(0)})}q.flush=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=dd,a==c.Ra?d.return():H(d,pl(b,a,function(){b.g.currentTime-=.001;hl(b,a)},null),2)):b.m?H(d,pl(b,c.aa,function(){var e=c.aa;b.g.currentTime-=.001;hl(b,e)},null),0):d.A(0)})};
function xl(a,b,c,d,e,f,g,h,k){var l,m,n;return Q(function(p){if(1==p.g){l=dd;if(b==l.Ra)return f||(a.h.u=c),eg(a.h,d,e),p.return();m=[];return H(p,yl(a,b,g,h,k),2)}n=p.h;n||(m.push(pl(a,b,function(){return ql(a,b)},null)),a.m&&m.push(pl(a,l.aa,function(){return ql(a,l.aa)},null)));f||(m.push(pl(a,b,function(){return rl(a,b,c)},null)),a.m&&m.push(pl(a,l.aa,function(){return rl(a,l.aa,c)},null)));if(0!=d||Infinity!=e)m.push(pl(a,b,function(){var r=a.l.get(b);r.appendWindowStart=0;r.appendWindowEnd=
e;r.appendWindowStart=d;hl(a,b)},null)),a.m&&m.push(pl(a,l.aa,function(){var r=l.aa,u=a.l.get(r);u.appendWindowStart=0;u.appendWindowEnd=e;u.appendWindowStart=d;hl(a,r)},null));return m.length?H(p,Promise.all(m),0):p.A(0)})}
function zl(a,b,c){var d,e;return Q(function(f){if(1==f.g){d=dd;if(b==d.Ra)return f.return();b==d.Ba&&(a.Ka=new kh);if(!a.H||(e=ll(a,b))&&.1>Math.abs(e-c))return f.return();pl(a,b,function(){return ql(a,b)},null);a.m&&pl(a,d.aa,function(){return ql(a,d.aa)},null);return H(f,pl(a,b,function(){return rl(a,b,c)},null),2)}return a.m?H(f,pl(a,d.aa,function(){return rl(a,d.aa,c)},null),0):f.A(0)})}
q.endOfStream=function(a){var b=this;return Q(function(c){return H(c,Al(b,function(){Vk(b)||dl(b)||(a?b.i.endOfStream(a):b.i.endOfStream())}),0)})};q.ub=function(a){var b=this;return Q(function(c){return H(c,Al(b,function(){if(a<b.i.duration)for(var d=t(b.l.keys()),e=d.next();!e.done;e=d.next()){e=e.value;var f={start:function(){},p:new kh,uri:null};b.u.get(e).unshift(f)}b.i.duration=a;b.va=a}),0)})};q.getDuration=function(){return this.i.duration};
function Bl(a,b,c){Q(function(d){return Vk(a)||dl(a)?d.return():H(d,Al(a,function(){Vk(a)||dl(a)||a.i.setLiveSeekableRange(b,c)}),0)})}function Cl(a){Q(function(b){return Vk(a)||dl(a)?b.return():H(b,Al(a,function(){Vk(a)||dl(a)||a.i.clearLiveSeekableRange()}),0)})}function vl(a,b,c,d){d<=c?hl(a,b):a.l.get(b).remove(c,d)}function ql(a,b){var c=a.l.get(b),d=c.appendWindowStart,e=c.appendWindowEnd;c.abort();c.appendWindowStart=d;c.appendWindowEnd=e;hl(a,b)}
function rl(a,b,c){0>c&&(c+=.001);var d=!0;"HLS"==a.R&&(d=ll(a,b),d=!d||.15<Math.abs(d-c)?!0:!1);d&&(a.l.get(b).timestampOffset=c);hl(a,b)}function hl(a,b){if(!a.J){var c=a.u.get(b)[0];c&&(c.p.resolve(),Dl(a,b))}}function pl(a,b,c,d){Ih(a.P);c={start:c,p:new kh,uri:d};a.u.get(b).push(c);1==a.u.get(b).length&&El(a,b);return c.p}
function Al(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u;return Q(function(v){switch(v.g){case 1:Ih(a.P);c=[];d=Array.from(a.l.keys());e=t(d);f=e.next();for(g={};!f.done;g={ready:void 0},f=e.next())h=f.value,g.ready=new kh,k={start:function(w){return function(){return w.ready.resolve()}}(g),p:g.ready,uri:null},l=a.u.get(h),l.push(k),c.push(g.ready),1==l.length&&k.start();va(v,2);return H(v,Promise.all(c),4);case 4:xa(v,3);break;case 2:throw m=za(v),m;case 3:return va(v,5,6),H(v,b(),6);case 6:Ca(v);n=t(d);for(p=
n.next();!p.done;p=n.next())r=p.value,Dl(a,r);Da(v,0);break;case 5:throw u=za(v),new V(2,3,3015,u,a.g.error||"No error in the media element",null);}})}function Dl(a,b){a.u.get(b).shift();El(a,b)}function El(a,b){var c=a.u.get(b)[0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new V(2,3,3017,b)):il(a)?c.p.reject(new V(2,3,3015,d,a.g.error||"No error in the media element",c.uri)):c.p.reject(new V(2,3,3024,b)),Dl(a,b)}}
function sl(a,b,c,d,e){if("mp4"!=Sf(a.C.get(e)))return c;var f=null===d,g=a.Fa.get(e),h=a.L.Qj(),k=!1;d&&d.ia&&(k=d.ia.encrypted);d=d?d.S()[0]:null;if(a=a.B.insertFakeEncryptionInInit&&g)h=Wb(h),a=oc()&&"audio"===e||ic()||gc()||hc("SOPOpenBrowser")||fc()&&wc()&&h;if(a)if(f)c=Rj(b,c,d);else{if(b=!k)b=oc()&&"audio"===e;b&&(c=Tj(c))}f&&jc()&&(c=Wj(c));return c}
function Fl(a,b,c,d){return pl(a,b,function(){if(b!==bd){a.C.get(b);if(Pd()){a.j.has(b)&&(a.j.get(b).destroy(),a.j.delete(b));d&&a.j.set(b,d);var e=c+a.B.addExtraFeaturesToSourceBuffer(c);a.l.get(b).changeType(e);a.C.set(b,c)}hl(a,b)}},null)}
function Gl(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E;return Q(function(D){switch(D.g){case 1:if(a.J)return D.return();c=dd;a.J=!0;a.m=!1;d=a.g.currentTime;e=a.g.autoplay;a.g.paused||(a.Ha=!0);a.Za&&(a.g.autoplay=!1);wa(D,2);a.s.ab();f=t(a.j.values());for(g=f.next();!g.done;g=f.next())h=g.value,h.destroy();k=t(a.l.values());for(l=k.next();!l.done;l=k.next()){m=l.value;try{a.i.removeSourceBuffer(m)}catch(A){}}a.j.clear();a.l.clear();n=a.i.duration;a.I=new kh;a.i=Pk(a,a.I);return H(D,a.I,4);
case 4:!isNaN(n)&&n?a.i.duration=n:!isNaN(a.va)&&a.va&&(a.i.duration=a.va),p=new kh,r=a.i.sourceBuffers,u=b.size,v=0,w=function(){v++;v===u&&(p.resolve(),a.s.Ea(r,"addsourcebuffer",w))},a.s.o(r,"addsourcebuffer",w),x=t(b.keys()),z=x.next();case 5:if(z.done)return(E=b.get(c.aa))&&E.isAudioMuxedInVideo&&(a.m=!0),a.m&&!a.u.has(c.aa)&&a.u.set(c.aa,[]),a.g.currentTime=d,H(D,p,2);B=z.value;C=b.get(B);return H(D,el(a,B,C,C.codecs),6);case 6:z=x.next();D.A(5);break;case 2:Ca(D),a.J=!1,Ih(a.P),a.s.ra(a.g,
"canplaythrough",function(){a.P.g||(a.g.autoplay=e,a.Ha&&(a.Ha=!1,a.g.play()))}),Da(D,0)}})}function Hl(a,b){return Al(a,function(){return Gl(a,b)})}function Il(a,b,c,d){var e=!1,f=Zc("audio",(d||"").split(",")),g=Zc("video",(d||"").split(",")),h=g;"audio"==b&&(h=f);h||(h=d);d=Mf(c,h);var k=a.B.forceTransmux;if(!Nd(d)||!a.H&&Nf.includes(d))k=!0;if(k&&(a=Of(c,h),c=Gf(a))){var l=c();f&&g&&(e=!0);d=l.convertCodecs(b,a)}b=Tf(Xf(d));return{Ch:l,Al:e,Nh:Wf(d),codec:b,mimeType:d}}
function yl(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,x,z;return Q(function(B){if(1==B.g){f=dd;if(b==f.Ra)return B.return(!1);g=Tf(Xf(a.C.get(b)));h=Wf(a.C.get(b));k=Il(a,b,c,d);l=k.Ch;m=k.Al;n=k.Nh;p=k.codec;r=k.mimeType;u=!0;m&&a.C.has(f.aa)&&(v=Il(a,f.aa,c,d),w=Tf(Xf(a.C.get(f.aa))),x=Wf(a.C.get(f.aa)),u=w==v.codec&&x==v.Nh,v.Ch&&v.Ch.destroy());if(g===p&&h===n&&u)return a.j.has(b)&&!l?(a.j.get(b).destroy(),a.j.delete(b)):!a.j.has(b)&&l?a.j.set(b,l):l&&(a.j.has(b)&&a.j.get(b).transmux!=l.transmux?
(a.j.get(b).destroy(),a.j.delete(b),a.j.set(b,l)):l.destroy()),B.return(!1);z=!0;if(a.m||m&&l&&!a.j.has(b))z=!1;if(z&&"smooth"===a.B.codecSwitchingStrategy&&Pd())return H(B,Fl(a,b,r,l),3);l&&l.destroy();return H(B,Hl(a,e),3)}return B.return(!0)})}
function Jl(a,b,c,d){if(b==bd)var e=!1;else{e=Tf(Xf(a.C.get(b)));var f=Wf(a.C.get(b)),g=Mf(c,d),h=a.B.forceTransmux;if(!Nd(g)||!a.H&&Nf.includes(g))h=!0;c=Of(c,d);h&&(h=Gf(c))&&(h=h(),g=h.convertCodecs(b,c),h.destroy());b=Tf(Xf(g));g=Wf(g);e=e!==b||f!==g}return e?"smooth"!==a.B.codecSwitchingStrategy||!Pd()||a.m:!1}var Rk=window.URL.createObjectURL,gl="sequence";function Kl(a,b,c){this.i=a;this.G=b;this.s=this.l=Infinity;this.h=1;this.g=this.j=null;this.B=0;this.C=!0;this.K=!1;this.J=0;this.H=void 0===c?!0:c;this.I=0;this.u=!1;this.m=a}q=Kl.prototype;q.getDuration=function(){return this.l};q.Wj=function(){return this.h};q.Si=function(a){this.i=a};q.ub=function(a){this.l=a};q.ck=function(){return this.i};q.Oi=function(a){this.B=a};q.fd=function(a){a&&!this.C&&(this.K=!0);this.C=a};q.zf=function(a){this.s=a};q.Re=function(){return this.s};
q.mh=function(a){this.G=a};q.Lj=function(){return this.G};q.Ci=function(a,b){if(0!=a.length){var c=(Date.now()+this.B)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.jf(a[0].start+b);this.h=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.h);this.g=Math.max(this.g,d);null!=this.i&&this.H&&!this.u&&(this.i=c-this.g-this.h)}}};
q.ee=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.B)/1E3;a=t(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.h=Math.max(this.h,e.endTime-e.startTime));this.jf(b);this.g=Math.max(this.g,c);null!=this.i&&this.H&&!this.u&&(this.i=d-this.g-this.h)}};q.Bi=function(a,b){this.jf(a);Infinity==b||this.V()||(this.g=Math.max(this.g,b))};q.Xj=function(){return this.g};q.cf=function(){this.u=!0};
q.Fk=function(){return this.u};q.Qi=function(a){this.m=a};q.Pj=function(){return this.m};q.jf=function(a){null==this.j?this.j=a:this.K||(this.j=Math.min(this.j,a))};q.Vg=function(a){this.h=Math.max(this.h,a)};q.offset=function(a){null!=this.j&&(this.j+=a);null!=this.g&&(this.g+=a)};q.V=function(){return Infinity==this.l&&!this.C};q.Wc=function(){return Infinity!=this.l&&!this.C};q.Hb=function(){return Math.max(this.J,this.zc()-this.s)};q.Ui=function(a){this.J=a};
q.zc=function(){return this.V()||this.Wc()?Math.min(Math.max(0,(Date.now()+this.B)/1E3-this.h-this.i)+this.I,this.l):this.g?Math.min(this.g,this.l):this.l};q.Td=function(a){var b=Math.max(this.j,this.J);return Infinity==this.s?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.zc()-this.s+a,this.Gb()))};q.ac=function(){return this.Td(0)};q.Gb=function(){return Math.max(0,this.zc()-(this.V()||this.Wc()?this.G:0))};q.ej=function(){return null==this.i||null!=this.g&&this.H?!1:!0};
q.Ni=function(a){this.I=a};q.Dj=function(){return this.I};S("shaka.media.PresentationTimeline",Kl);Kl.prototype.getAvailabilityTimeOffset=Kl.prototype.Dj;Kl.prototype.setAvailabilityTimeOffset=Kl.prototype.Ni;Kl.prototype.usingPresentationStartTime=Kl.prototype.ej;Kl.prototype.getSeekRangeEnd=Kl.prototype.Gb;Kl.prototype.getSeekRangeStart=Kl.prototype.ac;Kl.prototype.getSafeSeekRangeStart=Kl.prototype.Td;Kl.prototype.getSegmentAvailabilityEnd=Kl.prototype.zc;Kl.prototype.setUserSeekStart=Kl.prototype.Ui;
Kl.prototype.getSegmentAvailabilityStart=Kl.prototype.Hb;Kl.prototype.isInProgress=Kl.prototype.Wc;Kl.prototype.isLive=Kl.prototype.V;Kl.prototype.offset=Kl.prototype.offset;Kl.prototype.notifyMaxSegmentDuration=Kl.prototype.Vg;Kl.prototype.notifyMinSegmentStartTime=Kl.prototype.jf;Kl.prototype.getInitialProgramDateTime=Kl.prototype.Pj;Kl.prototype.setInitialProgramDateTime=Kl.prototype.Qi;Kl.prototype.isStartTimeLocked=Kl.prototype.Fk;Kl.prototype.lockStartTime=Kl.prototype.cf;
Kl.prototype.getMaxSegmentEndTime=Kl.prototype.Xj;Kl.prototype.notifyPeriodDuration=Kl.prototype.Bi;Kl.prototype.notifySegments=Kl.prototype.ee;Kl.prototype.notifyTimeRange=Kl.prototype.Ci;Kl.prototype.getDelay=Kl.prototype.Lj;Kl.prototype.setDelay=Kl.prototype.mh;Kl.prototype.getSegmentAvailabilityDuration=Kl.prototype.Re;Kl.prototype.setSegmentAvailabilityDuration=Kl.prototype.zf;Kl.prototype.setStatic=Kl.prototype.fd;Kl.prototype.setClockOffset=Kl.prototype.Oi;
Kl.prototype.getPresentationStartTime=Kl.prototype.ck;Kl.prototype.setDuration=Kl.prototype.ub;Kl.prototype.setPresentationStartTime=Kl.prototype.Si;Kl.prototype.getMaxSegmentDuration=Kl.prototype.Wj;Kl.prototype.getDuration=Kl.prototype.getDuration;function Ll(a,b,c,d){var e=this;this.u=d;this.g=a;this.C=b;this.h=c;this.s=new zd;this.l=!1;this.H=a.readyState;this.I=this.G=this.j=0;this.m=Ml(this);this.B=!1;this.s.o(a,"waiting",function(){return Nl(e)});this.i=(new bc(function(){Nl(e)})).xa(this.h.gapJumpTimerTime)}Ll.prototype.release=function(){this.s&&(this.s.release(),this.s=null);null!=this.i&&(this.i.stop(),this.i=null);this.m&&(this.m.release(),this.m=null);this.g=this.C=this.u=null};
Ll.prototype.mf=function(){this.B=!0;this.i&&this.i.xa(this.h.gapJumpTimerTime);Nl(this)};
function Nl(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.l)return}else a.l=!1;if(!a.g.paused||a.g.currentTime==a.j&&(a.g.autoplay||a.g.currentTime!=a.j)){a.g.readyState!=a.H&&(a.H=a.g.readyState);var b;if(!(b=!a.m)){b=a.m;var c=b.j,d=Ol(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.s&&d&&!b.h)b.i&&b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=ik(c,b,a.h.gapDetectionThreshold),null==d||0==d&&!a.B||(e=c.start(d),
(f=a.h.gapPadding)&&(e=Math.ceil(100*(e+f))/100),e>=a.C.Gb()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,b==a.j&&(a.j=e),a.G++,a.u(new T("gapjumped")))))}}}
function Ml(a){if(!a.h.stallEnabled)return null;var b=a.h.stallSkip;return new Pl(new Ql(a.g),a.h.stallThreshold,function(){var c;return Q(function(d){if(1==d.g)return c=hk(a.g.buffered),c.length?b?(a.g.currentTime+=b,d.A(2)):H(d,a.g.play(),3):d.return();if(2!=d.g){if(!a.g)return d.return();a.g.pause();a.g.play()}a.I++;a.u(new T("stalldetected"));I(d)})})}function Pl(a,b,c){this.j=a;this.m=Ol(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.s=b;this.i=c}
Pl.prototype.release=function(){this.i=this.j=null};function Ql(a){this.g=a}function Ol(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(hk(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function Rl(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Sl.value().get(b),c.ra(a,b,d))}var Sl=new Tb(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Tl(a,b,c,d){var e=this;this.g=a;this.m=b;this.u=c;this.l=null;this.j=function(){null==e.l&&(e.l=d());return e.l};this.s=!1;this.h=new zd;this.i=new Ul(a);Rl(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Vl(e,e.j())})}Tl.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.m=function(){};this.g=null};function Wl(a){return a.s?a.g.currentTime:a.j()}
function Xl(a,b){0<a.g.readyState?Yl(a.i,b):Rl(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Vl(a,a.j())})}function Vl(a,b){.001>Math.abs(a.g.currentTime-b)?Zl(a):(a.h.ra(a.g,"seeking",function(){Zl(a)}),Yl(a.i,a.g.currentTime&&0!=a.g.currentTime?a.g.currentTime:b))}function Zl(a){a.s=!0;a.h.o(a.g,"seeking",function(){return a.m()});a.u(a.g.currentTime)}
function Ul(a){var b=this;this.g=a;this.m=10;this.j=this.l=this.i=0;this.h=new bc(function(){0>=b.i?b.h.stop():b.g.currentTime!=b.l||b.g.currentTime===b.j?b.h.stop():(b.g.currentTime=b.j,b.i--)})}Ul.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};function Yl(a,b){a.l=a.g.currentTime;a.j=b;a.i=a.m;a.g.currentTime=b;a.h.xa(.1)};function $l(a){this.h=a;this.j=!1;this.g=null;this.i=new zd}q=$l.prototype;q.ready=function(){function a(){if(null==b.g||0==b.g&&Infinity!=b.h.duration)b.j=!0;else{var c=b.h.currentTime,d=b.g;0>b.g&&(d=Math.max(0,c+b.g));c!=d?(b.i.ra(b.h,"seeking",function(){b.j=!0}),b.h.currentTime=d):b.j=!0}}var b=this;Rl(this.h,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};q.release=function(){this.i&&(this.i.release(),this.i=null);this.h=null};q.Sf=function(a){this.g=this.j?this.g:a};
q.De=function(){return(this.j?this.h.currentTime:this.g)||0};q.Hh=function(){return 0};q.Gh=function(){return 0};q.Ai=function(){};
function am(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.l=c;this.u=e;this.s=null;this.j=new Ll(a,b.presentationTimeline,c,f);this.h=new Tl(a,function(){a:{var h=g.j;h.l=!0;h.B=!1;h.i&&h.i.xa(h.h.gapJumpTimerTime);Nl(h);var k=Wl(g.h);h=bm(g,k);if(!Qd()&&.001<Math.abs(h-k)){k=!1;if(!nc()||nc()&&xc())k=!0;else{var l=Date.now()/1E3,m=nc()&&yc()?3:1;if(!g.s||g.s<l-m)g.s=l,k=!0}if(k){Xl(g.h,h);h=void 0;break a}}g.u();h=void 0}return h},function(h){var k=g.j;k.g.seeking&&!k.l&&(k.l=
!0,k.j=h);k.i&&k.i.xa(k.h.gapJumpTimerTime);Nl(k)},function(){var h=d;null==h?h=Infinity>g.g.getDuration()?g.g.ac():g.g.Gb():0>h&&(h=g.g.Gb()+h);return cm(g,dm(g,h))});this.m=new bc(function(){if(0!=g.i.readyState&&!g.i.paused){var h=Wl(g.h),k=g.g.ac(),l=g.g.Gb();3>l-k&&(k=l-3);h<k&&(h=bm(g,h),g.i.currentTime=h)}})}q=am.prototype;q.ready=function(){this.m.xa(.25)};
q.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};q.Sf=function(a){Xl(this.h,a)};q.De=function(){var a=Wl(this.h);return 0<this.i.readyState&&!this.i.paused?dm(this,a):a};q.Hh=function(){return this.j.I};q.Gh=function(){return this.j.G};q.Ai=function(){this.j.mf()};function cm(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}
function bm(a,b){var c=a.l.rebufferingGoal,d=a.l.safeSeekOffset,e=a.g.ac(),f=a.g.Gb(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.Td(c),k=a.g.Td(d);c=a.g.Td(c+d);return b>=g?cm(a,b):b>f?f-a.l.safeSeekEndOffset:b<e?fk(a.i.buffered,k)?k:c:b>=h||fk(a.i.buffered,b)?b:c}function dm(a,b){var c=a.g.ac();if(b<c)return c;a=a.g.Gb();return b>a?a:b};function em(a){this.g=a;this.m=null;this.i=0;this.s=!1}q=em.prototype;q.getNumReferences=function(){return this.g.length};q.getNumEvicted=function(){return this.i};q.release=function(){this.s||(this.g=[],this.m&&this.m.stop(),this.m=null)};q.Mk=function(){this.s=!0};q.Xb=function(a){for(var b=t(this.g),c=b.next();!c.done;c=b.next())a(c.value)};function Rg(a){return a.g[0]||null}
q.find=function(a){for(var b=this.g.length-1,c=b;0<=c;--c){var d=this.g[c],e=c<b?this.g[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.i}return this.g.length&&a<this.g[0].startTime?this.i:null};q.get=function(a){if(0==this.g.length)return null;a-=this.i;return 0>a||a>=this.g.length?null:this.g[a]};q.offset=function(a){if(!this.s)for(var b=t(this.g),c=b.next();!c.done;c=b.next())c.value.offset(a)};
q.ef=function(a){if(!this.s&&a.length){var b=Math.round(1E3*a[0].startTime)/1E3;this.g=this.g.filter(function(c){return Math.round(1E3*c.startTime)/1E3<b});this.g.push.apply(this.g,y(a))}};q.be=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.g.length||d.endTime>c.g[0].startTime)});this.ef(a);this.fb(b)};q.fb=function(a){if(!this.s){var b=this.g.length;this.g=this.g.filter(function(c){return c.endTime>a});this.i+=b-this.g.length}};
q.pd=function(a,b,c){c=void 0===c?!1:c;if(!this.s){for(;this.g.length;)if(this.g[this.g.length-1].startTime>=b)this.g.pop();else break;for(;this.g.length;)if(this.g[0].endTime<=a)this.g.shift(),c||this.i++;else break;0!=this.g.length&&(a=this.g[this.g.length-1],b=new Zj(a.startTime,b,a.G,a.hb,a.Pa,a.ia,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.g,a.tilesLayout,a.C,a.h,a.status,a.aesKey),b.mimeType=a.mimeType,b.codecs=a.codecs,b.i=a.i,this.g[this.g.length-1]=b)}};
q.Gf=function(a,b){var c=this;this.s||(this.m&&this.m.stop(),this.m=new bc(function(){var d=b();d?c.g.push.apply(c.g,y(d)):(c.m.stop(),c.m=null)}),this.m.xa(a))};em.prototype[Symbol.iterator]=function(){return this.$b(0)};
em.prototype.$b=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;var d=this.find(a);if(null==d)return null;var e=this.get(d);c?d++:d--;var f=-1;if(e&&0<e.g.length)for(var g=e.g.length-1;0<=g;--g){var h=e.g[g];if(a>=h.startTime&&a<h.endTime){if(!b){for(;g&&!h.l;)g--,h=e.g[g];if(!h.l)return cb("No independent partial segment found!"),null}c?d--:d++;f=g-1;break}}return new fm(this,d,f,c)};function gm(a,b,c){a=new Zj(a,a+b,function(){return c},0,null,null,a,a,a+b);return new em([a])}
S("shaka.media.SegmentIndex",em);em.forSingleSegment=gm;em.prototype.getIteratorForTime=em.prototype.$b;em.prototype.updateEvery=em.prototype.Gf;em.prototype.fit=em.prototype.pd;em.prototype.evict=em.prototype.fb;em.prototype.mergeAndEvict=em.prototype.be;em.prototype.offset=em.prototype.offset;em.prototype.get=em.prototype.get;em.prototype.find=em.prototype.find;em.prototype.markImmutable=em.prototype.Mk;em.prototype.release=em.prototype.release;em.prototype.getNumEvicted=em.prototype.getNumEvicted;
em.prototype.getNumReferences=em.prototype.getNumReferences;function fm(a,b,c,d){this.i=a;this.h=b;this.g=c;this.reverse=d}q=fm.prototype;q.Gd=function(a){this.reverse=a};q.yj=function(){return this.h};q.current=function(){var a=this.i.get(this.h);a&&0<a.g.length&&a.B&&this.g>=a.g.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.g.length?a.g[this.g]:a};
q.next=function(){var a=this.i.get(this.h);this.reverse?a&&0<a.g.length?(this.g--,0>this.g&&(this.h--,this.g=(a=this.i.get(this.h))&&0<a.g.length?a.g.length-1:0)):(this.h--,this.g=0):a&&0<a.g.length?(this.g++,a.B&&this.g==a.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};q.fh=function(){var a=this.current();if(a.s&&!a.l&&(a=this.i.get(this.h))&&0<a.g.length)for(var b=a.g[this.g];b.l&&!(0>=this.g);)this.g--,b=a.g[this.g]};
S("shaka.media.SegmentIterator",fm);fm.prototype.resetToLastIndependent=fm.prototype.fh;fm.prototype.next=fm.prototype.next;fm.prototype.current=fm.prototype.current;fm.prototype.currentPosition=fm.prototype.yj;fm.prototype.setReverse=fm.prototype.Gd;function hm(){em.call(this,[]);this.h=[]}oa(hm,em);q=hm.prototype;q.clone=function(){var a=new hm;a.h=this.h.slice();a.i=this.i;return a};q.release=function(){for(var a=t(this.h),b=a.next();!b.done;b=a.next())b.value.release();this.h=[]};
q.Xb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.Xb(a)};q.find=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.getNumEvicted()+d.getNumReferences()}return null};q.get=function(a){for(var b=this.i,c=t(this.h),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;e=d.getNumReferences();b+=d.getNumEvicted()+e}return null};q.offset=function(){};q.ef=function(){};
q.fb=function(a){for(var b=t(this.h),c=b.next();!c.done;c=b.next())c.value.fb(a);for(;1<this.h.length&&0==this.h[0].getNumReferences();)a=this.h.shift(),this.i+=a.getNumEvicted(),a.release()};q.be=function(){};q.pd=function(){};q.Gf=function(){};S("shaka.media.MetaSegmentIndex",hm);hm.prototype.updateEvery=hm.prototype.Gf;hm.prototype.fit=hm.prototype.pd;hm.prototype.mergeAndEvict=hm.prototype.be;hm.prototype.evict=hm.prototype.fb;hm.prototype.merge=hm.prototype.ef;hm.prototype.offset=hm.prototype.offset;
hm.prototype.get=hm.prototype.get;hm.prototype.find=hm.prototype.find;hm.prototype.forEachTopLevelReference=hm.prototype.Xb;hm.prototype.release=hm.prototype.release;function im(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Qe();this.h=new bc(function(){b.g.xi(.25*b.i)})}im.prototype.release=function(){this.set(this.Rc());this.h&&(this.h.stop(),this.h=null);this.g=null};im.prototype.set=function(a){this.i=a;jm(this)};im.prototype.Rc=function(){return this.g.Rc()};function jm(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Qe()!=b&&a.g.qh(b);return}catch(c){}a.h.xa(.25);0!=a.g.Qe()&&a.g.qh(0)};function km(a){var b=this;this.j=a;this.h=new zd;this.g=new Set;this.i=(new bc(function(){lm(b,!1)})).Ia();a.paused||this.i.xa(.25);this.h.o(a,"playing",function(){b.i.Ia().xa(.25)});this.h.o(a,"pause",function(){b.i.stop()})}km.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function lm(a,b){var c=a.j.currentTime;a=t(a.g);for(var d=a.next();!d.done;d=a.next())d.value.j(c,b)};function mm(a){mb.call(this);this.g=new Map;this.h=a}oa(mm,mb);mm.prototype.release=function(){this.g.clear();mb.prototype.release.call(this)};function nm(a,b){var c=a.g.get(b);c||(c={ie:[],kg:null,contentType:b},a.g.set(b,c));return c}function om(a,b,c){var d=nm(a,b.contentType);pm(a,d);a={xd:b,position:c};d=d.ie;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
mm.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;var d=c.kg;a:{var e=c.ie;for(var f=e.length-1;0<=f;f--){var g=e[f];if(g.position<=a){e=g.xd;break a}}e=null}f=e&&!(d===e||d&&e&&d.bandwidth==e.bandwidth&&d.audioSamplingRate==e.audioSamplingRate&&d.codecs==e.codecs&&d.contentType==e.contentType&&d.frameRate==e.frameRate&&d.height==e.height&&d.mimeType==e.mimeType&&d.channelsCount==e.channelsCount&&d.pixelAspectRatio==e.pixelAspectRatio&&d.width==e.width);
g=e&&d&&e.label&&d.label&&d.label!==e.label;var h=e&&d&&e.language&&d.language&&d.language!==e.language;d=e&&d&&e.roles&&d.roles&&!fe(d.roles,e.roles);(g||h||d)&&qm(this,a,e.contentType)&&(c.kg=e,d=new T("audiotrackchange",new Map([["quality",e],["position",a]])),this.dispatchEvent(d));f&&qm(this,a,e.contentType)&&(c.kg=e,JSON.stringify(e),c=new T("qualitychange",new Map([["quality",e],["position",a]])),this.dispatchEvent(c))}};
function qm(a,b,c){return(a=a.h()[c])&&0<a.length&&(c=a[a.length-1].end,b>=a[0].start&&b<c)?!0:!1}function pm(a,b){if((a=a.h()[b.contentType])&&0<a.length){var c=a[0].start,d=a[a.length-1].end,e=b.ie;b.ie=e.filter(function(f,g){return f.position<=c&&g+1<e.length&&e[g+1].position<=c||f.position>=d?!1:!0})}else b.ie=[]}
function rm(a){var b={bandwidth:a.bandwidth||0,audioSamplingRate:null,codecs:a.codecs,contentType:a.type,frameRate:null,height:null,mimeType:a.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:a.roles,language:null};"video"==a.type&&(b.frameRate=a.frameRate||null,b.height=a.height||null,b.pixelAspectRatio=a.pixelAspectRatio||null,b.width=a.width||null);"audio"==a.type&&(b.audioSamplingRate=a.audioSamplingRate,b.channelsCount=a.channelsCount,b.label=a.label||null,b.language=
a.language);return b};function sm(a){mb.call(this);this.h=new Map;this.i=a;this.g=null}oa(sm,mb);sm.prototype.release=function(){this.h.clear();this.g&&(this.g.stop(),this.g=null);mb.prototype.release.call(this)};function tm(a,b){var c=b.schemeIdUri+"_"+b.id+"_"+(b.startTime.toFixed(1)+"_"+b.endTime.toFixed(1));a.h.has(c)||(a.h.set(c,b),b=new T("regionadd",new Map([["region",b]])),a.dispatchEvent(b),um(a))}
function um(a){a.g||(a.g=(new bc(function(){for(var b=a.i(),c=t(a.h),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;e.endTime<b.start&&(a.h.delete(d),d=new T("regionremove",new Map([["region",e]])),a.dispatchEvent(d))}!a.h.size&&a.g&&(a.g.stop(),a.g=null)})).xa(2))};function vm(a,b,c,d){this.m=a;this.i=b;this.l=c;this.h=new Map;this.j=new Map;this.g=null;this.s=d}function wm(a,b){a.l=b;a=t(a.h.values());for(var c=a.next();!c.done;c=a.next())c.value.g=b}
function xm(a,b,c){c=void 0===c?!1:c;if(!a.i.segmentIndex)return Promise.resolve();a.g||(a.g=a.i.segmentIndex.$b(b,!0,a.s));if(!a.g)return Promise.resolve();c&&a.g.next();for(b=[];a.h.size<a.m;){c=a.g.next().value;if(!c)break;var d=!0;c.isPreload()&&null!=c.Pa&&(d=!1);2==c.Ac()&&(d=!1);c.bc(!1)&&(d=!1);d&&c.ia&&b.push(ym(a,c.ia));d&&!a.h.has(c)&&(d=new zm(a.l),b.push(Am(d,c,a.i)),a.h.set(c,d))}Bm(a);return Promise.all(b)}
function ym(a,b){if(!a.i.segmentIndex||b.bc()||Array.from(a.j.keys()).some(function(e){return Yj(e,b)}))return Promise.resolve();var c=new zm(a.l),d=Am(c,b,a.i);a.j.set(b,c);return d}function Cm(a,b){b=t(b.keys());for(var c=b.next();!c.done;c=b.next())(c=c.value)&&Dm(a,c)}function Em(a){Cm(a,a.h);Cm(a,a.j);a.g=null}vm.prototype.fb=function(a,b){b=void 0===b?!1:b;for(var c=t(this.h.keys()),d=c.next();!d.done;d=c.next())d=d.value,a>d.endTime&&Dm(this,d);b&&Bm(this)};
vm.prototype.Gd=function(a){this.s=a;this.g&&this.g.Gd(a)};function Bm(a){for(var b=Array.from(a.h.keys()),c=t(a.j.keys()),d=c.next(),e={};!d.done;e={Qg:void 0},d=c.next())e.Qg=d.value,b.some(function(f){return function(g){return Yj(g.ia,f.Qg)}}(e))||Dm(a,e.Qg)}function Fm(a,b){a.m=b;for(var c=Array.from(a.h.keys());c.length>b;){var d=c.pop();d&&Dm(a,d)}Bm(a)}function Gm(a,b){b&&b!==a.i&&(Em(a),a.i=b)}function Dm(a,b){var c=a.h;b instanceof Xj&&(c=a.j);a=c.get(b);c.delete(b);a&&a.abort()}
function zm(a){this.g=a;this.fe=this.wh=null}function Am(a,b,c){var d=new Uint8Array(0);a.fe=a.g(b,c,function(e){return Q(function(f){if(1==f.g)return 0<d.byteLength?d=Uc(d,e):d=e,a.wh?H(f,a.wh(d),3):f.A(0);d=new Uint8Array(0);I(f)})});return a.fe.promise.catch(function(e){return e instanceof V&&7001==e.code?Promise.resolve():Promise.reject(e)})}zm.prototype.abort=function(){this.fe&&this.fe.abort()};function Hm(a){var b=Wf(a),c=b.split("/")[0];a=Xf(a);return{type:c,mimeType:b,codecs:a,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,re:null,colorGamut:null,frameRate:null}}
function Im(a,b,c){function d(A){x=A.name;var F=A.reader;F.skip(24);var G=F.Da(),K=F.Da();F.skip(50);p=String(G);n=String(K);A.reader.Ma()&&Th(A)}function e(A){var F=lj(A.reader);r=F.channelCount;u=F.sampleRate;f(A.name)}function f(A){A=A.toLowerCase();switch(A){case "avc1":case "avc3":h.push(A+".42E01E");l=!0;break;case "hev1":case "hvc1":h.push(A+".1.6.L93.90");l=!0;break;case "dvh1":case "dvhe":h.push(A+".05.04");l=!0;break;case "vp09":h.push(A+".00.10.08");l=!0;break;case "av01":h.push(A+".0.01M.08");
l=!0;break;case "mp4a":g.push("mp4a.40.2");k=!0;break;case "ac-3":case "ec-3":case "ac-4":case "opus":case "flac":g.push(A),k=!0}}var g=[],h=[],k=!1,l=!1,m=null,n=null,p=null,r=null,u=null,v=null,w=null,x;(new Oh).box("moov",Th).box("trak",Th).box("mdia",Th).W("mdhd",function(A){m=jj(A.reader,A.version).language}).box("minf",Th).box("stbl",Th).W("stsd",Vh).box("mp4a",function(A){var F=lj(A.reader);r=F.channelCount;u=F.sampleRate;A.reader.Ma()?Th(A):f(A.name)}).box("esds",function(A){A=A.reader;for(var F=
"mp4a",G,K;A.Ma();){G=A.ha();for(var L=A.ha();L&128;)L=A.ha();if(3==G)A.Da(),L=A.ha(),L&128&&A.Da(),L&64&&A.skip(A.ha()),L&32&&A.Da();else if(4==G)K=A.ha(),A.skip(12);else if(5==G)break}K&&(F+="."+oj(K),5==G&&A.Ma()&&(G=A.ha(),K=(G&248)>>3,31===K&&A.Ma()&&(K=32+((G&7)<<3)+((A.ha()&224)>>5)),F+="."+K));g.push(F);k=!0}).box("ac-3",e).box("ec-3",e).box("ac-4",e).box("Opus",e).box("fLaC",e).box("avc1",d).box("avc3",d).box("hev1",d).box("hvc1",d).box("dva1",d).box("dvav",d).box("dvh1",d).box("dvhe",d).box("vp09",
d).box("av01",d).box("avcC",function(A){var F=x||"";switch(x){case "dvav":F="avc3";break;case "dva1":F="avc1"}A=A.reader;A.skip(1);A=F+"."+oj(A.ha())+oj(A.ha())+oj(A.ha());h.push(A);l=!0}).box("hvcC",function(A){var F=x||"";switch(x){case "dvh1":F="hvc1";break;case "dvhe":F="hev1"}var G=A.reader;G.skip(1);A=G.ha();var K=["","A","B","C"][A>>6],L=A&31,J=G.X(),M=(A&32)>>5?"H":"L";A=[G.ha(),G.ha(),G.ha(),G.ha(),G.ha(),G.ha()];G=G.ha();for(var N=0,P=0;32>P;P++){N|=J&1;if(31==P)break;N<<=1;J>>=1}F=F+("."+
K+L)+("."+oj(N,!0));F+="."+M+G;K="";for(L=A.length;L--;)if((M=A[L])||K)K="."+M.toString(16).toUpperCase()+K;F+=K;h.push(F);l=!0}).box("dvcC",function(A){var F=x||"";switch(x){case "hvc1":F="dvh1";break;case "hev1":F="dvhe";break;case "avc1":F="dva1";break;case "avc3":F="dvav";break;case "av01":F="dav1"}var G=A.reader;G.skip(2);A=G.ha();G=G.ha();h.push(F+"."+pj(A>>1&127)+"."+pj(A<<5&32|G>>3&31));l=!0}).box("dvvC",function(A){var F=x||"";switch(x){case "hvc1":F="dvh1";break;case "hev1":F="dvhe";break;
case "avc1":F="dva1";break;case "avc3":F="dvav";break;case "av01":F="dav1"}var G=A.reader;G.skip(2);A=G.ha();G=G.ha();h.push(F+"."+pj(A>>1&127)+"."+pj(A<<5&32|G>>3&31));l=!0}).W("vpcC",function(A){var F=x||"",G=A.reader;A=G.ha();var K=G.ha();G=G.ha()>>4&15;h.push(F+"."+pj(A)+"."+pj(K)+"."+pj(G));l=!0}).box("av1C",function(A){var F=x||"";switch(x){case "dav1":F="av01"}var G=A.reader;G.skip(1);A=G.ha();G=G.ha();var K=A>>>5,L=(G&64)>>6;h.push(F+"."+K+"."+pj(A&31)+(G>>>7?"H":"M")+"."+pj(2===K&&L?(G&32)>>
5?12:10:L?10:8)+"."+((G&16)>>4)+"."+((G&8)>>3)+((G&4)>>2)+(G&3)+"."+pj(1)+"."+pj(1)+"."+pj(1)+".0");l=!0}).box("enca",Xh).box("encv",Wh).box("sinf",Th).box("frma",function(A){A=mj(A.reader).codec;f(A)}).box("colr",function(A){h=h.map(function(K){if(K.startsWith("av01.")){var L=A.reader,J=L.Ta(),M=L.Tb(4);var N=String.fromCharCode(M[0]);N+=String.fromCharCode(M[1]);N+=String.fromCharCode(M[2]);N+=String.fromCharCode(M[3]);if("nclx"===N){M=L.Da();N=L.Da();var P=L.Da(),O=L.ha()>>7,R=K.split(".");10==
R.length&&(R[6]=pj(M),R[7]=pj(N),R[8]=pj(P),R[9]=String(O),K=R.join("."))}L.seek(J)}return K});var F=nj(A.reader),G=F.colorGamut;v=F.re;w=G}).parse(a||b,!0);if(!g.length&&!h.length)return null;var z=k&&!l,B=new Map;if(l&&!c){c=new Ud("video/mp4");a&&c.init(a);try{c.i(b);for(var C=t(c.j()),E=C.next();!E.done;E=C.next()){var D=E.value;B.set(D,D)}}catch(A){}c.g()}return{type:z?"audio":"video",mimeType:z?"audio/mp4":"video/mp4",codecs:Jm(g.concat(h)).join(", "),language:m,height:n,width:p,channelCount:r,
sampleRate:u,closedCaptions:B,re:v,colorGamut:w,frameRate:null}}function Jm(a){var b=new Set,c=[];a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e=Vf(d);b.has(e)||(c.push(d),b.add(e))}b=cd("audio",c);d=cd("video",c);a=cd(bd,c);d=Km(d);b=b.concat(d).concat(a);return c.length&&!b.length?c:b}
function Km(a){if(1>=a.length)return a;var b=a.find(function(c){return c.startsWith("dvav.")||c.startsWith("dva1.")||c.startsWith("dvh1.")||c.startsWith("dvhe.")||c.startsWith("dav1.")||c.startsWith("dvc1.")||c.startsWith("dvi1.")});return b?Nd('video/mp4; codecs="'+b+'"')?[b]:a.filter(function(c){return c!=b}):a}
function Lm(a){var b=null;(new Oh).box("moov",Th).box("trak",Th).box("mdia",Th).box("minf",Th).box("stbl",Th).W("stsd",Vh).box("encv",Wh).box("enca",Xh).box("sinf",Th).box("schi",Th).W("tenc",function(c){c=c.reader;c.ha();c.ha();c.ha();c.ha();b=Tc(c.Tb(16))}).parse(a,!0);return b}
function Mm(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=b,d.cryptoKey?k.A(2):H(k,d.fetchKey(),3);e=d.iv;if(!e)for(e=Nb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;"CBC"==b.blockCipherMode?h={name:"AES-CBC",iv:e}:h={name:"AES-CTR",counter:e,length:64};return k.return(window.crypto.subtle.decrypt(h,d.cryptoKey,a))})};function Nm(a,b,c,d,e){a=zh(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Om(a,b){var c=this;this.g=b;this.j=a;this.h=null;this.L=new Map;this.G=1;this.u=this.l=null;this.P=0;this.i=new Map;this.K=!1;this.R=null;this.C=!1;this.m=new Hh(function(){return Pm(c)});this.M=Date.now()/1E3;this.s=new Map;this.N={projection:null,hfov:null};this.U=0;this.T=Infinity;this.H=null;this.B=new bc(function(){if(c.j&&c.g)if(c.j.presentationTimeline.V()){var d=c.j.presentationTimeline.ac(),e=c.j.presentationTimeline.Gb();1<e-d?Bl(c.g.ka,d,e):Cl(c.g.ka)}else Cl(c.g.ka),c.B&&c.B.stop()});
this.I=null;this.J=new bc(function(){var d=c.g.video;!d.ended&&c.I&&(d.currentTime=c.I,c.I=null)})}q=Om.prototype;q.destroy=function(){return this.m.destroy()};
function Pm(a){var b,c,d,e,f,g,h;return Q(function(k){if(1==k.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Qm(e),b.push(Rm(e)),e.ma&&(Em(e.ma),e.ma=null);f=t(a.s.values());for(g=f.next();!g.done;g=f.next())h=g.value,Em(h);return H(k,Promise.all(b),2)}a.i.clear();a.s.clear();a.g=null;a.j=null;a.h=null;a.B&&a.B.stop();a.B=null;a.J&&a.J.stop();a.J=null;a.I=null;I(k)})}
q.configure=function(a){this.h=a;this.R=new hh({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);if(a.disableAudioPrefetch){var b=this.i.get("audio");b&&b.ma&&(Em(b.ma),b.ma=null);b=t(this.s.keys());for(var c=b.next();!c.done;c=b.next())c=c.value,Em(this.s.get(c)),this.s.delete(c)}a.disableTextPrefetch&&(b=this.i.get(bd))&&
b.ma&&(Em(b.ma),b.ma=null);a.disableVideoPrefetch&&(b=this.i.get("video"))&&b.ma&&(Em(b.ma),b.ma=null);b=t(this.i.keys());for(c=b.next();!c.done;c=b.next())c=this.i.get(c.value),c.ma?(Fm(c.ma,a.segmentPrefetchLimit),0<a.segmentPrefetchLimit||(Em(c.ma),c.ma=null)):0<a.segmentPrefetchLimit&&(c.ma=Sm(this,c.stream));a.disableAudioPrefetch||Tm(this)};function Um(a,b,c){a.j.presentationTimeline.V()||(a.U=b,a.T=c)}
q.start=function(a){var b=this;return Q(function(c){if(1==c.g)return H(c,Vm(b,a||new Map),2);Ih(b.m);b.K=!0;I(c)})};function Wm(a,b){var c,d,e,f,g,h,k;Q(function(l){switch(l.g){case 1:return c=dd,a.P++,d=a.P,va(l,2),H(l,wl(a.g.ka,c.Ra),4);case 4:xa(l,3);break;case 2:if(e=za(l),a.g)a.g.onError(e);case 3:f=Mf(b.mimeType,b.codecs),fl(a.g.ka,f,a.j.sequenceMode,b.external),g=a.g.ka.ba,(h=g.isTextVisible()||a.h.alwaysStreamText)&&a.P==d&&(k=Xm(a,b),a.i.set(c.Ra,k),Ym(a,k,0)),I(l)}})}
function Zm(a){var b=a.i.get(bd);b&&(Qm(b),Rm(b).catch(function(){}),a.H=a.i.get(bd),a.i.delete(bd));a.u=null}function $m(a,b){for(var c=0>a.g.Xa(),d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.za&&e.za.Gd(c),e.ma&&e.ma.Gd(c);d=t(a.s.values());for(e=d.next();!e.done;e=d.next())e.value.Gd(c);if(c=a.i.get("video"))if(d=c.stream)if(b)(b=d.trickModeVideo)&&!c.Dc&&(an(a,b,!1,0,!1),c.Dc=d);else if(b=c.Dc)c.Dc=null,an(a,b,!0,0,!1)}
function bn(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.K&&(b.video&&an(a,b.video,c,d,e,f),b.audio&&an(a,b.audio,c,d,e,f))}function cn(a,b){Q(function(c){if(1==c.g)return a.H=null,a.u=b,a.K?b.segmentIndex?c.A(2):H(c,b.createSegmentIndex(),2):c.return();an(a,b,!0,0,!1);I(c)})}function dn(a,b){for(var c=t(a.L.entries()),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;d.includes(b.type)&&(e(),a.L.delete(d))}}
function an(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=bd?g&&(g.Dc&&(b.trickModeVideo?(g.Dc=b,b=b.trickModeVideo):g.Dc=null),g.stream!=b||e)&&(a.s.has(b)?g.ma=a.s.get(b):g.ma&&Gm(g.ma,b),b.type==bd&&(e=Mf(b.mimeType,b.codecs),fl(a.g.ka,e,a.j.sequenceMode,b.external)),!a.s.has(g.stream)&&g.stream.closeSegmentIndex&&(g.$a?(e="("+g.type+":"+g.stream.id+")",a.L.has(e)||a.L.set(e,g.stream.closeSegmentIndex)):g.stream.closeSegmentIndex()),e=g.stream.isAudioMuxedInVideo!=b.isAudioMuxedInVideo,g.stream=
b,g.za=null,g.Xf=!!f,b.dependencyStream?g.Qd=Xm(a,b.dependencyStream):g.Qd=null,e?en(a,!0,!1):(c?g.Mc?g.Nf=!0:g.$a?(g.Kc=!0,g.Ke=d,g.Nf=!0):(Qm(g),fn(a,g,!0,d).catch(function(h){if(a.g)a.g.onError(h)})):g.$a||g.Bb||Ym(a,g,0),gn(a,g).catch(function(h){if(a.g)a.g.onError(h)}))):Wm(a,b)}
function gn(a,b){var c,d;return Q(function(e){if(1==e.g){if(!b.Ib)return e.return();c=b.stream;d=b.Ib;return c.segmentIndex?e.A(2):H(e,c.createSegmentIndex(),2)}if(b.Ib!=d||b.stream!=c)return e.return();var f=a.g.sd();var g=ll(a.g.ka,b.type),h=b.stream.segmentIndex.find(b.Qa?b.Qa.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.Pa?k.Pa-k.hb:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.ia)&&(h+=(k.Pa?k.Pa-k.hb:null)||0),k=a.g.getBandwidthEstimate(),
f=8*h/k<(g||0)-f-a.h.rebufferingGoal||b.Ib.h.g>h?!0:!1):f=!1;f&&b.Ib.abort();I(e)})}
q.ed=function(){if(this.g){for(var a=this.g.sd(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);var e=this.g.ka;d==bd?(e=e.h,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=kl(e,d),e=fk(e,a));if(!e){this.M=0;c.ma&&(c.ma.g=null);if("audio"===c.type){e=t(this.s.values());for(var f=e.next();!f.done;f=e.next())f.value.g=null}c.za=null;(null!=ll(this.g.ka,d)||c.$a)&&hn(this,c);c.Ib&&(c.Ib.abort(),c.Ib=null);d===bd&&(d=this.g.ka,d.M&&d.M.g());c.ed=!0}}"keep"!==this.h.crossBoundaryStrategy&&
jn(this)}};function hn(a,b){b.Mc||b.Kc||(b.$a?(b.Kc=!0,b.Ke=0):null==jl(a.g.ka,b.type)?null==b.Bb&&Ym(a,b,0):(Qm(b),fn(a,b,!1,0).catch(function(c){if(a.g)a.g.onError(c)})))}
function Vm(a,b){var c,d,e,f,g,h,k,l,m,n;return Q(function(p){if(1==p.g){c=dd;if(!a.l)throw new V(2,5,5006);d=new Map;e=new Set;a.l.audio&&(d.set(c.aa,a.l.audio),e.add(a.l.audio));a.l.video&&(d.set(c.Ba,a.l.video),e.add(a.l.video));a.u&&(d.set(c.Ra,a.u),e.add(a.u));f=a.g.ka;return H(p,f.init(d,a.j.sequenceMode,a.j.type,a.j.ignoreManifestTimestampsInSegmentsMode),2)}Ih(a.m);a.updateDuration();g=t(d.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=d.get(k),a.i.has(k)||(m=Xm(a,l),b.has(l.id)&&(n=
b.get(l.id),wm(n,function(r,u,v){return kn(r,u,v||null,a.h.retryParameters,a.g.pc)}),m.ma=n),a.i.set(k,m),Ym(a,m,0));I(p)})}function Xm(a,b){var c={stream:b,type:b.type,za:null,ma:Sm(a,b),Qa:null,Pb:null,bf:null,Zc:null,Yc:null,Ze:null,$e:null,Dc:null,endOfStream:!1,$a:!1,Bb:null,Kc:!1,Ke:0,Nf:!1,Mc:!1,ed:!0,Xf:!1,dh:!1,Vd:!1,Ib:null,Qd:null};b.dependencyStream&&(c.Qd=Xm(a,b.dependencyStream));return c}
function Sm(a,b){if("video"===b.type&&a.h.disableVideoPrefetch||"audio"===b.type&&a.h.disableAudioPrefetch||b.type===bd&&("application/cea-608"==b.mimeType||"application/cea-708"==b.mimeType)||b.type===bd&&a.h.disableTextPrefetch)return null;if(a.s.has(b))return a.s.get(b);var c=a.i.get(b.type);return(c=c&&c.ma)&&b===c.i?c:0<a.h.segmentPrefetchLimit?new vm(a.h.segmentPrefetchLimit,b,function(d,e,f){return kn(d,e,f||null,a.h.retryParameters,a.g.pc)},0>a.g.Xa()):null}
function Tm(a){for(var b=a.h.segmentPrefetchLimit,c=a.h.prefetchAudioLanguages,d=t(a.j.variants),e=d.next(),f={};!e.done;f={Lb:void 0},e=d.next())if(f.Lb=e.value,f.Lb.audio)if(a.s.has(f.Lb.audio)){if(e=a.s.get(f.Lb.audio),Fm(e,b),!(0<b&&c.some(function(h){return function(k){return gd(h.Lb.audio.language,k)}}(f)))){var g=a.i.get(f.Lb.audio.type);e!==(g&&g.ma)&&Em(e);a.s.delete(f.Lb.audio)}}else 0>=b||!c.some(function(h){return function(k){return gd(h.Lb.audio.language,k)}}(f))||!(e=Sm(a,f.Lb.audio))||
(f.Lb.audio.segmentIndex||f.Lb.audio.createSegmentIndex(),a.s.set(f.Lb.audio,e))}q.updateDuration=function(){var a=Qd(),b=this.j.presentationTimeline.getDuration();Infinity>b?(a&&(this.B&&this.B.stop(),Cl(this.g.ka)),this.g.ka.ub(b)):a?(this.B&&this.B.xa(.5),this.g.ka.ub(Infinity)):this.g.ka.ub(Math.pow(2,32))};
function ln(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:Ih(a.m);if(b.$a||null==b.Bb||b.Mc)return k.return();b.Bb=null;if(!b.Kc){k.A(2);break}return H(k,fn(a,b,b.Nf,b.Ke),3);case 3:return k.return();case 2:dn(a,b);if(b.stream.segmentIndex){k.A(4);break}c=b.stream;va(k,5);return H(k,b.stream.createSegmentIndex(),7);case 7:xa(k,6);break;case 5:return d=za(k),H(k,mn(a,b,d),8);case 8:return k.return();case 6:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),b.$a||b.Bb||
Ym(a,b,0),k.return();case 4:va(k,9);e=nn(a,b);null!=e&&(Ym(a,b,e),b.Vd=!1);xa(k,10);break;case 9:return f=za(k),H(k,mn(a,b,f),11);case 11:return k.return();case 10:g=Array.from(a.i.values());if(!a.K||!g.every(function(l){return l.endOfStream})){k.A(0);break}return H(k,a.g.ka.endOfStream(),13);case 13:Ih(a.m),h=a.g.ka.getDuration(),0!=h&&h<a.j.presentationTimeline.getDuration()&&a.j.presentationTimeline.ub(h),I(k)}})}
function nn(a,b){if(on(b))return tl(a.g.ka,b.stream.originalId||""),null;b.type==bd&&ul(a.g.ka);if(b.stream.isAudioMuxedInVideo)return null;var c=a.h.updateIntervalSeconds/Math.max(1,Math.abs(a.g.Xa()));if(!il(a.g.ka)&&b.type!=bd)return c/2;var d=a.g.sd();if("audio"===b.type)for(var e=t(a.s.keys()),f=e.next();!f.done;f=e.next())f=a.s.get(f.value),f.fb(d,!0),xm(f,d);e=b.Qa?b.Qa.endTime:d;var g=ml(a.g.ka,b.type,d),h=Math.max(1,Math.max(a.h.rebufferingGoal,a.h.bufferingGoal)*a.G),k=a.j.presentationTimeline.getDuration()-
e;f=ll(a.g.ka,b.type);if(1E-6>k&&f)return b.endOfStream=!0,"video"==b.type&&(a=a.i.get(bd))&&on(a)&&(a.endOfStream=!0),null;b.endOfStream=!1;if(g>=h)return c/2;h=!b.za;f=pn(a,b,d,f);if(!f)return c;g=!1;h&&b.Xf&&(g=!0,b.Xf=!1);h=Infinity;k=Array.from(a.i.values());k=t(k);for(var l=k.next();!l.done;l=k.next())l=l.value,on(l)||l.za&&!l.za.current()||(h=Math.min(h,l.Qa?l.Qa.endTime:d));if(e>=h+a.j.presentationTimeline.h)return c;if("keep"!==a.h.crossBoundaryStrategy&&qn(a,b,f))return null;b.ma&&b.za&&
!a.s.has(b.stream)&&(b.ma.fb(f.startTime),xm(b.ma,f.startTime).catch(function(){}));rn(a,b,d,f,g).catch(function(){});b.Qd&&sn(a,b.Qd,d);return null}
function pn(a,b,c,d){if(b.za)return(c=b.za.current())&&b.Qa&&.001>Math.abs(b.Qa.startTime-c.startTime)&&(c=b.za.next().value),c;if(b.Qa||d)return c=b.Qa?b.Qa.endTime:d,a=0>a.g.Xa(),b.stream.segmentIndex&&(b.za=b.stream.segmentIndex.$b(c,!1,a)),b.za&&b.za.next().value;d=a.j.sequenceMode?0:a.h.inaccurateManifestTolerance;var e=Math.max(c-d,0);a=0>a.g.Xa();var f=null;d&&(b.stream.segmentIndex&&(b.za=b.stream.segmentIndex.$b(e,!1,a)),f=b.za&&b.za.next().value);f||(b.stream.segmentIndex&&(b.za=b.stream.segmentIndex.$b(c,
!1,a)),f=b.za&&b.za.next().value);return f}
function rn(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D;return Q(function(A){switch(A.g){case 1:f=dd;g=b.stream;h=b.za;b.$a=!0;va(A,2);if(2==d.Ac())throw new V(1,1,1011);return H(A,tn(a,b,d,e),4);case 4:Ih(a.m);if(a.C)return A.return();k="video/mp4"==g.mimeType||"audio/mp4"==g.mimeType;l=window.ReadableStream;if((m=a.h.lowLatencyMode&&a.j.isLowLatency)&&l&&k&&("HLS"!=a.j.type||d.m))return r=new Uint8Array(0),v=u=!1,x=function(F){var G,K,L,J;return Q(function(M){switch(M.g){case 1:if(u)return M.return();v=
!0;Ih(a.m);if(a.C)return M.return();va(M,2);r=un(r,F);G=!1;K=0;(new Oh).box("mdat",function(N){K=N.size+N.start;G=!0}).parse(r,!1,!0);if(!G){M.A(4);break}L=r.subarray(0,K);r=r.subarray(K);return H(M,vn(a,b,c,g,d,L,!0,e),5);case 5:b.ma&&b.za&&xm(b.ma,d.startTime,!0);case 4:xa(M,0);break;case 2:w=J=za(M),I(M)}})},H(A,wn(a,b,d,x),9);n=wn(a,b,d);return H(A,n,7);case 7:p=A.h;Ih(a.m);if(a.C)return A.return();Ih(a.m);return b.Kc?(b.$a=!1,Ym(a,b,0),A.return()):H(A,vn(a,b,c,g,d,p,!1,e),6);case 9:z=A.h;if(w)throw w;
if(v){A.A(10);break}u=!0;Ih(a.m);return a.C?A.return():b.Kc?(b.$a=!1,Ym(a,b,0),A.return()):H(A,vn(a,b,c,g,d,z,!1,e),10);case 10:b.ma&&b.za&&xm(b.ma,d.startTime,!0);case 6:Ih(a.m);if(a.C)return A.return();b.Qa=d;h.next();b.$a=!1;b.dh=!1;B=a.g.ka.Yb();C=B[b.type];hb(JSON.stringify(C));b.Kc||(E=null,b.type===f.Ba?E=a.i.get(f.aa):b.type===f.aa&&(E=a.i.get(f.Ba)),E&&E.type==f.aa?a.g.mf(d,b.stream,E.stream.isAudioMuxedInVideo):a.g.mf(d,b.stream,b.stream.codecs.includes(",")));Ym(a,b,0);xa(A,0);break;case 2:D=
za(A);Ih(a.m,D);if(a.C)return A.return();b.$a=!1;if(7001==D.code)b.$a=!1,Qm(b),Ym(a,b,0),A.A(0);else if(b.type==f.Ra&&a.h.ignoreTextStreamFailures)a.i.delete(f.Ra),A.A(0);else{if(3017==D.code)return H(A,xn(a,b,D),0);b.Vd=!0;1==D.category&&b.ma&&Dm(b.ma,d);D.severity=2;return H(A,mn(a,b,D),0)}}})}
function sn(a,b,c){var d,e,f,g,h,k,l,m;Q(function(n){switch(n.g){case 1:d=b.stream;f=(e=d.segmentIndex.$b(c))&&e.next().value;if(!f){n.A(0);break}g=f.ia;if(!g||Yj(g,b.Pb)){n.A(3);break}b.Pb=g;va(n,4);return H(n,wn(a,b,g),6);case 6:h=n.h;var p=a.g.ka;p.K&&Kd(p.K,h,0,d);xa(n,3);break;case 4:throw k=za(n),b.Pb=null,k;case 3:if(b.Qa&&b.Qa==f){n.A(0);break}b.Qa=f;va(n,8);return H(n,wn(a,b,f),10);case 10:l=n.h;p=a.g.ka;p.K&&Kd(p.K,l,0,d);xa(n,0);break;case 8:throw m=za(n),b.Qa=null,m;}})}
function un(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
function xn(a,b,c){var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Array.from(a.i.values());if(e=d.some(function(m){return m!=b&&m.dh}))return l.A(2);f=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;if(g=a.g.disableStream(b.stream,f))return l.return();if(a.h.avoidEvictionOnQuotaExceededError)return Ym(a,b,4),l.return();h=Math.round(100*a.G);if(20<h)a.G-=.2;else if(4<h)a.G-=.04;else return b.Vd=!0,a.C=!0,a.g.onError(c),l.return();b.dh=!0;k=a.g.sd();return H(l,yn(a,b,k),2)}Ym(a,b,4);
I(l)})}
function tn(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B;return Q(function(C){switch(C.g){case 1:e=dd;f=null==b.Qa;g=[];h=Math.max(0,Math.max(c.appendWindowStart,a.U)-.1);k=Math.min(c.appendWindowEnd,a.T)+.01;l=c.codecs||b.stream.codecs;m=Vf(l);n=Wf(c.mimeType||b.stream.mimeType);p=c.timestampOffset;if(p==b.bf&&h==b.Zc&&k==b.Yc&&m==b.Ze&&n==b.$e){C.A(2);break}r=b.Ze&&b.$e&&Jl(a.g.ka,b.type,n,l);if(!r){C.A(3);break}u=null;b.type===e.Ba?u=a.i.get(e.aa):b.type===e.aa&&(u=a.i.get(e.Ba));if(!u){C.A(3);break}return H(C,
Rm(u).catch(function(){}),5);case 5:u.Pb=null,u.Zc=null,u.Yc=null,hn(a,u);case 3:return H(C,zn(a,b,p,h,k,c,m,n),2);case 2:return Yj(c.ia,b.Pb)||(b.Pb=c.ia,c.l&&c.ia&&(v=wn(a,b,c.ia),w=function(){var E,D,A,F,G,K,L;return Q(function(J){switch(J.g){case 1:return va(J,2),H(J,v,4);case 4:return E=J.h,Ih(a.m),D=null,A=new Map,F={projection:null,hfov:null},G=new Oh,G.box("moov",Th).box("trak",Th).box("mdia",Th).W("mdhd",function(M){D=jj(M.reader,M.version).timescale}).box("hdlr",function(M){M=M.reader;M.skip(8);
switch(M.bd()){case "soun":A.set(e.aa,D);break;case "vide":A.set(e.Ba,D)}D=null}).box("minf",Th).box("stbl",Th).W("stsd",Vh).box("encv",Wh).box("avc1",Wh).box("avc3",Wh).box("hev1",Wh).box("hvc1",Wh).box("dvav",Wh).box("dva1",Wh).box("dvh1",Wh).box("dvhe",Wh).box("dvc1",Wh).box("dvi1",Wh).box("vexu",Th).box("proj",Th).W("prji",function(M){M=M.reader.bd();F.projection=M}).box("hfov",function(M){M=M.reader.X()/1E3;F.hfov=M}).parse(E),b.type===e.Ba&&An(a,F),A.has(b.type)?c.ia.timescale=A.get(b.type):
null!=D&&(c.ia.timescale=D),K=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,H(J,a.g.Oh(b.type,E),5);case 5:return H(J,ol(a.g.ka,b.type,E,null,b.stream,K,b.ed,d),6);case 6:xa(J,0);break;case 2:throw L=za(J),b.Pb=null,L;}})},x=c.startTime,f&&(z=ll(a.g.ka,b.type),null!=z&&(x=z)),a.g.Qk(x,c.ia),g.push(w()))),B=b.Qa?b.Qa.i:null,c.i!=B&&g.push(zl(a.g.ka,b.type,c.startTime)),H(C,Promise.all(g),0)}})}
function zn(a,b,c,d,e,f,g,h){var k,l,m,n;return Q(function(p){if(1==p.g)return k=dd,l=new Map,a.l.audio&&l.set(k.aa,a.l.audio),a.l.video&&l.set(k.Ba,a.l.video),va(p,2),b.Zc=d,b.Yc=e,g&&(b.Ze=g),h&&(b.$e=h),b.bf=c,m=a.j.sequenceMode||"HLS"==a.j.type,H(p,xl(a.g.ka,b.type,c,d,e,m,f.mimeType||b.stream.mimeType,f.codecs||b.stream.codecs,l),4);if(2!=p.g)return xa(p,0);n=za(p);b.Zc=null;b.Yc=null;b.Ze=null;b.$e=null;b.bf=null;throw n;})}
function vn(a,b,c,d,e,f,g,h){g=void 0===g?!1:g;h=void 0===h?!1:h;var k,l,m,n,p,r;return Q(function(u){switch(u.g){case 1:return k=d.closedCaptions&&0<d.closedCaptions.size,a.h.shouldFixTimestampOffset&&(m="video/mp4"==d.mimeType||"audio/mp4"==d.mimeType,n=null,e.ia&&(n=e.ia.timescale),(p=m&&n&&"video"===d.type&&"DASH"==a.j.type)&&(l=new Oh),p&&l.box("moof",Th).box("traf",Th).W("tfdt",function(v){var w,x,z,B,C,E;return Q(function(D){w=ij(v.reader,v.version);x=w.baseMediaDecodeTime;if(!x)return D.return();
z=-x/n;B=Number(b.bf)||0;if(!(B<z))return D.A(0);C=b.Zc;E=b.Yc;return H(D,zn(a,b,z,C,E,e),0)})}),p&&l.parse(f,!1,g)),H(u,yn(a,b,c),2);case 2:return Ih(a.m),r=b.ed,b.ed=!1,H(u,a.g.Oh(b.type,f),3);case 3:return H(u,ol(a.g.ka,b.type,f,e,d,k,r,h,g),4);case 4:Ih(a.m),I(u)}})}
function yn(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){if(1==n.g){d=b.stream.segmentIndex;d instanceof hm&&d.fb(a.j.presentationTimeline.Hb());e=Math.max(a.h.bufferBehind*a.G,a.j.presentationTimeline.h);f=jl(a.g.ka,b.type);if(null==f)return a.H==b&&(a.H=null),n.return();g=c-f;h=a.h.evictionGoal;k=a.j.presentationTimeline.ac();l=a.j.presentationTimeline.Gb();m=g-e;l-k>h&&(m=Math.max(g-e,k-h-f));return m<=h?n.return():H(n,a.g.ka.remove(b.type,f,f+m),2)}if(4!=n.g)return Ih(a.m),a.H?H(n,yn(a,a.H,
c),4):n.A(0);Ih(a.m);I(n)})}function on(a){return a&&a.type==bd&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
function wn(a,b,c,d){var e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(e=c.bc())return l.return(e);f=null;if(b.ma){var m=b.ma,n=m.h;c instanceof Xj&&(n=m.j);n.has(c)?(m=n.get(c),d&&(m.wh=d),f=m.fe):f=null}f||(f=kn(c,b.stream,d||null,a.h.retryParameters,a.g.pc));g=0;b.za&&(g=b.za.h);b.Ib=f;return H(l,f.promise,2);case 2:h=l.h;b.Ib=null;k=h.data;if(!c.aesKey){l.A(3);break}return H(l,Mm(k,c.aesKey,g),4);case 4:k=l.h;case 3:return l.return(k)}})}
function kn(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a instanceof Zj?a:void 0,h=g?1:0;a=Nm(a.S(),a.hb,a.Pa,d,c);a.contentType=b.type;return e.request(Fh,a,{type:h,stream:b,segment:g,isPreload:f})}
function fn(a,b,c,d){var e,f;return Q(function(g){if(1==g.g)return b.Kc=!1,b.Nf=!1,b.Ke=0,b.Mc=!0,b.Qa=null,b.za=null,b.ma&&!a.s.has(b.stream)&&Em(b.ma),d?(e=a.g.sd(),f=a.g.ka.getDuration(),H(g,a.g.ka.remove(b.type,e+d,f),3)):H(g,wl(a.g.ka,b.type),4);if(3!=g.g)return Ih(a.m),c?H(g,a.g.ka.flush(b.type),3):g.A(3);Ih(a.m);b.Mc=!1;b.endOfStream=!1;b.$a||b.Bb||Ym(a,b,0);I(g)})}
function Ym(a,b,c){var d=b.type;if(d!=bd||a.i.has(d))b.Bb=(new ac(function(){var e;return Q(function(f){if(1==f.g)return va(f,2),H(f,ln(a,b),4);if(2!=f.g)return xa(f,0);e=za(f);if(a.g)a.g.onError(e);I(f)})})).$(c)}function Qm(a){null!=a.Bb&&(a.Bb.stop(),a.Bb=null)}function Rm(a){return Q(function(b){return a.Ib?H(b,a.Ib.abort(),0):b.A(0)})}
function mn(a,b,c){var d;return Q(function(e){if(1==e.g)return 3024==c.code?(b.$a=!1,Qm(b),Ym(a,b,0),e.return()):H(e,jh(a.R),2);Ih(a.m);if(1===c.category&&1003!=c.code){if(b.Dc)return $m(a,!1),e.return();d=0===a.h.maxDisabledTime&&1011==c.code?1:a.h.maxDisabledTime;c.handled=a.g.disableStream(b.stream,d);c.handled&&(c.severity=1)}if(!c.handled||1011!=c.code)a.g.onError(c);c.handled||a.h.failureCallback(c);I(e)})}
function en(a,b,c){b=void 0===b?!1:b;c=void 0===c?!0:c;var d,e,f,g,h,k;return Q(function(l){if(1==l.g){d=Date.now()/1E3;e=a.h.minTimeBetweenRecoveries;if(!b){if(!a.h.allowMediaSourceRecoveries||d-a.M<e)return l.return(!1);a.M=d}f=dd;if(g=a.i.get(f.aa))g.Pb=null,g.Zc=null,g.Yc=null,c&&hn(a,g),Rm(g).catch(function(){}),g.za&&g.za.fh();if(h=a.i.get(f.Ba))h.Pb=null,h.Zc=null,h.Yc=null,c&&hn(a,h),Rm(h).catch(function(){}),h.za&&h.za.fh();k=new Map;a.l.audio&&k.set(f.aa,a.l.audio);a.l.video&&k.set(f.Ba,
a.l.video);return H(l,Hl(a.g.ka,k),2)}!h||h.Mc||h.$a||h.Bb||Ym(a,h,0);!g||g.Mc||g.$a||g.Bb||Ym(a,g,0);return l.return(!0)})}function An(a,b){if(a.N.projection!=b.projection||a.N.hfov!=b.hfov){if(null!=b.projection||null!=b.hfov){var c=(new Map).set("detail",b);c=new T("spatialvideoinfo",c)}else c=new T("nospatialvideoinfo");c.cancelable=!0;a.g.onEvent(c);a.N=b}}
function jn(a){if("keep"!==a.h.crossBoundaryStrategy){a.J.stop();var b=a.g.sd(),c=a.i.get("video")||a.i.get("audio");c&&(c=c.Pb)&&null!==c.g&&(b=c.g-b,0>b||1<b||(a.I=c.g+.01,a.J.$(b)))}}
function qn(a,b,c){if(b.type===bd)return!1;var d=b.Pb;if(!d)return!1;c=c.ia;var e=d.g!==c.g;"reset_to_encrypted"===a.h.crossBoundaryStrategy&&(d.encrypted||c.encrypted||(e=!1),d.encrypted&&(a.h.crossBoundaryStrategy="keep"));"RESET_ON_ENCRYPTION_CHANGE"===a.h.crossBoundaryStrategy&&d.encrypted==c.encrypted&&(e=!1);if(e&&b.ed){var f=a.g.video,g=f.paused;en(a,!0).then(function(){a.g.onEvent(new T("boundarycrossed"));g||f.play()})}return e};function Bn(){}
function Cn(a,b,c,d,e){var f=e in d;var g=f?c.constructor==Object&&0==Object.keys(d).length:c.constructor==Object&&0==Object.keys(c).length;var h=f||g,k=!0,l;for(l in b){var m=e+"."+l,n=f?d[e]:c[l];h||l in c?void 0===b[l]?void 0===n||h?delete a[l]:a[l]=ne(n):g?a[l]=b[l]:n.constructor==Object&&b[l]&&b[l].constructor==Object?(a[l]||(a[l]=ne(n)),m=Cn(a[l],b[l],n,d,m),k=k&&m):typeof b[l]!=typeof n||null==b[l]||"function"!=typeof b[l]&&b[l].constructor!=n.constructor?(cb("Invalid config, wrong type for "+m),
k=!1):("function"==typeof c[l]&&c[l].length!=b[l].length&&db("Unexpected number of arguments for "+m),a[l]=b[l]):(cb("Invalid config, unrecognized key "+m),k=!1)}return k}function Dn(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function En(a,b){return a&&b}
function Fn(a,b){function c(f){for(var g=t(Object.keys(f)),h=g.next();!h.done;h=g.next())if(h=h.value,!(f[h]instanceof HTMLElement))if(e(f[h])&&0===Object.keys(f[h]).length)delete f[h];else{var k=f[h];Array.isArray(k)&&0===k.length?delete f[h]:"function"==typeof f[h]?delete f[h]:e(f[h])&&(c(f[h]),0===Object.keys(f[h]).length&&delete f[h])}}function d(f,g){return Object.keys(f).reduce(function(h,k){var l=f[k];if(g.hasOwnProperty(k))if(l instanceof HTMLElement&&g[k]instanceof HTMLElement)l.isEqualNode(g[k])||
(h[k]=l);else if(e(l)&&e(g[k])){if(l=d(l,g[k]),0<Object.keys(l).length||!e(l))h[k]=l}else Array.isArray(l)&&Array.isArray(g[k])?ee(l,g[k])||(h[k]=l):Number.isNaN(l)&&Number.isNaN(g[k])||l!==g[k]&&(h[k]=l);else h[k]=l;return h},{})}function e(f){return f&&"object"===typeof f&&!Array.isArray(f)}a=d(a,b);c(a);return a}S("shaka.util.ConfigUtils",Bn);Bn.getDifferenceFromConfigObjects=Fn;Bn.convertToConfigObject=Dn;Bn.mergeConfigObjects=Cn;function Gn(){}function Hn(a){a=Jc(a);return(new tb(a)).Eb}function In(a,b,c){function d(h){Rb(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Nb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new V(2,6,6015);var e;"string"==typeof b?e=Lc(b,!0):e=b;a=Jc(a);a=Lc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}function Jn(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Jc(a).split("skd://").pop();return In(a,c,b)}
function Kn(a,b){2===a&&(a=b.drmInfo)&&Xb(a.keySystem)&&(b.headers["Content-Type"]="application/octet-stream")}S("shaka.drm.FairPlay",Gn);
Gn.commonFairPlayResponse=function(a,b){if(2===a&&(a=b.originalRequest.drmInfo)&&Xb(a.keySystem)){try{var c=Gc(b.data)}catch(e){return}a=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),a=!0);if(!a)try{var d=JSON.parse(c);d.ckc&&(c=d.ckc,a=!0);d.CkcMessage&&(c=d.CkcMessage,a=!0);d.License&&(c=d.License,a=!0)}catch(e){}a&&(b.data=Ob(Rc(c)))}};Gn.muxFairPlayRequest=function(a,b){Kn(a,b)};
Gn.expressplayFairPlayRequest=function(a,b){if(2===a){var c=b.drmInfo;c&&Xb(c.keySystem)&&Kn(a,b)}};Gn.conaxFairPlayRequest=function(a,b){Kn(a,b)};Gn.ezdrmFairPlayRequest=function(a,b){Kn(a,b)};Gn.verimatrixFairPlayRequest=function(a,b){2===a&&(a=b.drmInfo)&&Xb(a.keySystem)&&(a=Nb(b.body),a=Qc(a),b.headers["Content-Type"]="application/x-www-form-urlencoded",b.body=Kc("spc="+a))};Gn.muxInitDataTransform=function(a,b,c){return Jn(a,b,c)};
Gn.expressplayInitDataTransform=function(a,b,c){return Jn(a,b,c)};Gn.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Jc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=Qb(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return In(a,d,b)};Gn.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Jc(a).split(";").pop();return In(a,c,b)};
Gn.verimatrixInitDataTransform=function(a,b,c){return Jn(a,b,c)};Gn.initDataTransform=In;Gn.defaultGetContentId=Hn;Gn.isFairPlaySupported=function(){var a;return Q(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},va(b,2),H(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b.return(!0);za(b);return b.return(!1)})};function Ln(){this.g=null}Ln.prototype.configure=function(a){this.g=a};
Ln.prototype.create=function(a){var b;if(this.g.language){var c=Mn(a,this.g.language);c.length&&(b=c)}b||(b=a.filter(function(d){return d.primary}),b=b.length?b:a);a=Nn(b,this.g.role);a.length&&(b=a);this.g.videoLayout&&(a=On(b,this.g.videoLayout),a.length&&(b=a));this.g.td&&(a=Pn(b,this.g.td),a.length&&(b=a));this.g.channelCount&&(a=Qn(b,this.g.channelCount),a.length&&(b=a));this.g.kd&&(a=Rn(b,this.g.kd),a.length&&(b=a));this.g.Jd&&(a=Sn(b,this.g.Jd),a.length&&(b=a));a=Tn(b,this.g.spatialAudio);
a.length&&(b=a);this.g.audioCodec&&(a=Un(b,this.g.audioCodec),a.length&&(b=a));return new Pi(b[0],b,!("smooth"==this.g.codecSwitchingStrategy&&Pd()))};function Mn(a,b){b=hd(b);var c=qd(b,a.map(function(d){return pd(d)}));return c?a.filter(function(d){return c==pd(d)}):[]}function Nn(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}
function Rn(a,b){return a.filter(function(c){return c.audio&&c.audio.label?c.audio.label.toLowerCase()==b.toLowerCase():!1})}function Sn(a,b){return a.filter(function(c){return c.video&&c.video.label?c.video.label.toLowerCase()==b.toLowerCase():!1})}function Qn(a,b){return a.filter(function(c){return c.audio&&c.audio.channelsCount&&c.audio.channelsCount>b?!1:!0}).sort(function(c,d){return c.audio||d.audio?c.audio?d.audio?(d.audio.channelsCount||0)-(c.audio.channelsCount||0):1:-1:0})}
function Pn(a,b){if("AUTO"==b){var c=a.some(function(d){return d.video&&d.video.hdr&&"HLG"==d.video.hdr?!0:!1});b=Ec(c)}return a.filter(function(d){return d.video&&d.video.hdr&&d.video.hdr!=b?!1:!0})}function On(a,b){return a.filter(function(c){return c.video&&c.video.videoLayout&&c.video.videoLayout!=b?!1:!0})}function Tn(a,b){return a.filter(function(c){return c.audio&&c.audio.spatialAudio!=b?!1:!0})}function Un(a,b){return a.filter(function(c){return c.audio&&c.audio.codecs!=b?!1:!0})};function Vn(){}
function Wn(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:ih(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(m,n,p){"apple"===window.shakaMediaKeysPolyfill&&"skd"==n&&(n=p.serverCertificate,p=Hn(m),m=In(m,p,n));return m},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:gc(),minHdcpVersion:"",
ignoreDuplicateInitData:!hc("Tizen 2"),defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"};(gc()||tc())&&b.preferredKeySystems.push("com.microsoft.playready");var c="reload",d=!1;!Pd()||ic()||tc()||sc()||kc()&&79===mc()||nc()&&!xc()&&!yc()||wc()&&fc()||(c="smooth",d=!0);d={retryParameters:ih(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,
raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey",
"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:Xn,manifestPreprocessorTXml:Yn,sequenceMode:!1,multiTypeVariantsAllowed:d,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},
hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:Cc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:Xn,
manifestPreprocessorTXml:Yn,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var e={retryParameters:ih(),failureCallback:function(m){return En([m])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,
safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16E3,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,
minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:tc()||sc(),dontChooseCodecs:!1,shouldFixTimestampOffset:kc()||ic(),avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep"};
if(kc()||ic()||nc()||uc())e.stallSkip=0;if(navigator.userAgent.match(/Edge\//)||gc())e.gapPadding=.01;ic()&&(e.gapPadding=2);lc()&&(e.crossBoundaryStrategy="reset");jc()&&(e.crossBoundaryStrategy="reset_to_encrypted");var f={trackSelectionCallback:function(m){return Q(function(n){return n.return(m)})},downloadSizeCallback:function(m){var n;return Q(function(p){if(1==p.g)return navigator.storage&&navigator.storage.estimate?H(p,navigator.storage.estimate(),3):p.return(!0);n=p.h;return p.return(n.usage+
m<.95*n.quota)})},progressCallback:function(m,n){return En([m,n])},usePersistentLicense:!0,numberOfParallelDownloads:5};a={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,minChannelsCount:0,maxChannelsCount:Infinity},advanced:{minTotalBytes:128E3,
minBytes:16E3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:20,minTimeToSwitch:oc()?.5:0,preferNetworkInformationBandwidth:!1};c={codecSwitchingStrategy:c,addExtraFeaturesToSourceBuffer:function(m){return En([m],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,modifyCueCallback:function(m,n){return En([m,n])},dispatchAllEmsgBoxes:!1};var g=!1,h=!1,k=!0;zc()&&(h=g=!0,k=!1);var l=
{drm:b,manifest:d,streaming:e,mediaSource:c,offline:f,abrFactory:function(){return new ch},adaptationSetCriteriaFactory:function(){return new (Function.prototype.bind.apply(Ln,[null].concat(y(Na.apply(0,arguments)))))},abr:a,autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],
preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity,minChannelsCount:0,maxChannelsCount:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",
rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:g,skipPlayDetection:h,supportsMultipleMediaElements:k,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0},ignoreHardwareResolution:!1};f.trackSelectionCallback=function(m){return Q(function(n){return n.return(Zn(m,l.preferredAudioLanguage,
l.preferredVideoHdrLevel))})};return l}function $n(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}
function ao(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Cn(a,b,c||Wn(),d,"")}
function Zn(a,b,c){var d=c;"AUTO"==d&&(c=a.some(function(h){return h.hdr&&"HLG"==h.hdr?!0:!1}),d=Ec(c));var e=a.filter(function(h){return"variant"!=h.type||h.hdr&&h.hdr!=d?!1:!0});c=[];var f=qd(b,e.map(function(h){return h.language}));f&&(c=e.filter(function(h){return hd(h.language)==f}));0==c.length&&(c=e.filter(function(h){return h.primary}));0==c.length&&(e.map(function(h){return h.language}),c=e);var g=c.filter(function(h){return h.height&&480>=h.height});g.length&&(g.sort(function(h,k){return k.height-
h.height}),c=g.filter(function(h){return h.height==g[0].height}));b=[];c.length&&(e=Math.floor(c.length/2),c.sort(function(h,k){return h.bandwidth-k.bandwidth}),b.push(c[e]));a=t(a);for(c=a.next();!c.done;c=a.next())c=c.value,c.type!=bd&&"image"!=c.type||b.push(c);return b}function Xn(a){return En([a],a)}function Yn(a){return En([a],a)}S("shaka.util.PlayerConfiguration",Vn);Vn.mergeConfigObjects=ao;Vn.createDefaultForLL=$n;Vn.createDefault=Wn;function bo(){this.g=null;this.h=[]}function co(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);a=t(a.h);for(var d=a.next();!d.done;d=a.next())d=d.value,c+=d.state==b?d.duration:0;return c}function eo(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function fo(){this.i=this.h=null;this.g=[]}function go(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function ho(){this.Lc=this.ri=this.u=this.B=this.K=this.C=this.s=this.j=this.J=this.G=this.i=this.R=this.T=this.M=this.N=this.P=this.l=this.m=NaN;this.L=0;this.H=this.I=NaN;this.g=new bo;this.h=new fo};function io(a,b,c,d){mb.call(this);this.P=a;this.Y=b;this.Ka=d.networkingEngine;this.C=c;this.s=null;this.Ha=0;this.Ya=d.md;this.H=d.Jk;this.Za=d.Kk;this.g=d.config;this.l=this.I=this.h=null;this.va=!1;this.J=d.Vk;this.Aa=!1;this.i=null;this.oa=!1;this.j=this.G=null;this.ba=!1;this.N=new Map;this.Fa=!1;this.La=d.Uk;this.Z=new ho;this.qa=new kh;this.m=new kh;this.R=null;this.u=!1;this.ea=d.rj;this.U=this.L=null;this.Sa=d.qj;this.T=!1;this.M=[];this.K=[];this.B=!0}oa(io,mb);
function jo(a,b,c){(a=b?a.K:a.M)?a.push(c):c()}function ko(a){if(a.K)for(var b=t(a.K),c=b.next();!c.done;c=b.next())c=c.value,c();a.K=null}function lo(a,b){a.R=b;a.T=!0;if(a.M){b=t(a.M);for(var c=b.next();!c.done;c=b.next())c=c.value,c()}a.M=null}q=io.prototype;q.getStartTime=function(){return this.C};q.rd=function(){return this.P};q.Hg=function(){return this.h};function mo(a){a.ba=!0;return a.j}function no(a){a.Aa=!0;return a.J}q.getStats=function(){return this.Z};
function oo(a){a.oa=!0;return a.i}q.bk=function(){return this.L?Og(this.L):null};q.$j=function(){return this.U?Pg(this.U):null};function po(a){a.Fa=!0;return a.N}
q.start=function(){var a=this;(function(){var b;return Q(function(c){switch(c.g){case 1:return H(c,Promise.resolve(),2);case 2:return va(c,3),H(c,qo(a),5);case 5:ro(a);if("webkit"===window.shakaMediaKeysPolyfill){c.A(6);break}return H(c,so(a),7);case 7:ro(a);case 6:return H(c,to(a),8);case 8:ro(a);if(!a.ea||!a.i){c.A(9);break}return H(c,Ki(a.i),10);case 10:ro(a);case 9:a.m.resolve();xa(c,0);break;case 3:b=za(c),b instanceof V&&(7001==b.code||7003==b.code)||a.m.reject(b),I(c)}})})()};
q.dispatchEvent=function(a){return this.R?this.R.dispatchEvent(a):mb.prototype.dispatchEvent.call(this,a)};q.onError=function(a){2===a.severity&&(this.m.reject(a),this.destroy());var b=(new Map).set("detail",a);b=new T("error",b);this.dispatchEvent(b);b.defaultPrevented&&(a.handled=!0)};function ro(a){if(a.u)throw new V(2,7,7003);}function uo(a,b){a.dispatchEvent(new T("onstatechange",(new Map).set("state",b)))}
function qo(a){var b,c,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:uo(a,"manifest-parser");a.l||(a.I=gj(a.P,a.Y),a.l=a.I(),a.l.configure(a.g.manifest,function(){return a.B}));b=Date.now()/1E3;uo(a,"manifest");if(a.h){m.A(2);break}return H(m,a.l.start(a.P,a.Za),3);case 3:a.h=m.h;if(1!=a.h.variants.length){m.A(2);break}c=[];d=a.h.variants[0];e=t([d.video,d.audio]);for(f=e.next();!f.done;f=e.next())(g=f.value)&&!g.segmentIndex&&c.push(g.createSegmentIndex());if(!(0<c.length)){m.A(2);break}return H(m,
Promise.all(c),2);case 2:return a.qa.resolve(),h=new T("manifestparsed",void 0),H(m,Promise.resolve(),7);case 7:a.dispatchEvent(h);if(0==a.h.variants.length)throw new V(2,4,4036);vo(a.h);k=Date.now()/1E3;l=k-b;a.Z.J=l;I(m)}})}
function so(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:if(!a.h||a.i)return k.return();uo(a,"drm-engine");a.Ha=Date.now()/1E3;a.i=a.Ya();a.H.h=a.i;a.i.configure(a.g.drm,function(){return a.B});c=Zi(a.H,a.h);if(!c){k.A(2);break}d=new T("trackschanged",void 0);return H(k,Promise.resolve(),3);case 3:ro(a),a.dispatchEvent(d);case 2:return e=Yg(a.h.variants),f=!0,a.h&&a.h.presentationTimeline&&"HLS"!=a.h.type&&(f=a.h.presentationTimeline.V()),H(k,hi(a.i,e,a.h.offlineSessionIds,f),4);case 4:ro(a);
if(!b){k.A(5);break}return H(k,a.i.Wb(b),6);case 6:ro(a);case 5:return H(k,Xi(a.H,a.h),7);case 7:g=k.h;if(!g){k.A(0);break}h=new T("trackschanged",void 0);return H(k,Promise.resolve(),9);case 9:a.dispatchEvent(h),I(k)}})}q.configure=function(a,b){a=Dn(a,b);ao(this.g,a)};q.getConfiguration=function(){return ne(this.g)};
function to(a){var b,c,d,e,f,g,h;return Q(function(k){a.s||(a.s=a.g.adaptationSetCriteriaFactory(),a.s.configure({language:a.g.preferredAudioLanguage,role:a.g.preferredVariantRole,channelCount:a.g.preferredAudioChannelCount,td:a.g.preferredVideoHdrLevel,spatialAudio:a.g.preferSpatialAudio,videoLayout:a.g.preferredVideoLayout,kd:a.g.preferredAudioLabel,Jd:a.g.preferredVideoLabel,codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:""}));a.Sa&&(b=a.g.abrFactory,a.G=b,a.j=b(),a.j.configure(a.g.abr));
if(!a.ea)return k.A(0);c=a.h.presentationTimeline.V();d=Yg(a.h.variants);e=a.s.create(d);a.j.configure(a.g.abr);a.j.setVariants(Array.from(e.values()));f=a.j.chooseVariant();if(!f)return k.A(0);g=[];a.L=f;f.video&&g.push(wo(a,f.video,c));f.audio&&g.push(wo(a,f.audio,c));(h=Zg(a.h.textStreams,a.g.preferredTextLanguage,a.g.preferredTextRole,a.g.preferForcedSubs)[0]||null)&&bh(f.audio,h,a.g)&&(g.push(wo(a,h,c)),a.U=h);return H(k,Promise.all(g),0)})}
function wo(a,b,c){var d,e,f,g,h;return Q(function(k){if(1==k.g)return d=a.g.streaming.segmentPrefetchLimit||2,e=new vm(d,b,function(l,m,n){return kn(l,m,n||null,a.g.streaming.retryParameters,a.Ka,a.B)},!1),a.N.set(b.id,e),b.segmentIndex?k.A(2):H(k,b.createSegmentIndex(),2);f=a.C||0;g=b.segmentIndex.$b(f);h=null;g&&(h=g.current(),h||(h=g.next().value));h||(h=Rg(b.segmentIndex));return h?c?h.ia?H(k,ym(e,h.ia),0):k.A(0):H(k,xm(e,h.startTime),0):k.A(0)})}q.Gl=function(){return this.m};
q.destroy=function(){var a=this,b,c,d;return Q(function(e){switch(e.g){case 1:a.u=!0;if(!a.l||a.va){e.A(2);break}return H(e,a.l.stop(),2);case 2:if(!a.j||a.ba){e.A(4);break}return H(e,a.j.stop(),4);case 4:a.J&&!a.Aa&&a.J.release();if(!a.i||a.oa){e.A(6);break}return H(e,a.i.destroy(),6);case 6:if(0<a.N.size&&!a.Fa)for(b=t(a.N.values()),c=b.next();!c.done;c=b.next())d=c.value,Em(d);I(e)}})};
function vo(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))}S("shaka.media.PreloadManager",io);io.prototype.destroy=io.prototype.destroy;io.prototype.waitForFinish=io.prototype.Gl;io.prototype.getPrefetchedTextTrack=io.prototype.$j;io.prototype.getPrefetchedVariantTrack=io.prototype.bk;function xo(a,b){mb.call(this);var c=this;this.i=a;this.l=b;this.g=new Map;this.m=[{jd:null,hd:yo,Uc:function(d,e){return zo(c,"enter",d,e)}},{jd:Ao,hd:yo,Uc:function(d,e){return zo(c,"enter",d,e)}},{jd:Bo,hd:yo,Uc:function(d,e){return zo(c,"enter",d,e)}},{jd:yo,hd:Ao,Uc:function(d,e){return zo(c,"exit",d,e)}},{jd:yo,hd:Bo,Uc:function(d,e){return zo(c,"exit",d,e)}},{jd:Ao,hd:Bo,Uc:function(d,e){e?zo(c,"skip",d,e):(zo(c,"enter",d,e),zo(c,"exit",d,e))}},{jd:Bo,hd:Ao,Uc:function(d,e){return zo(c,"skip",
d,e)}}];this.h=new zd;this.h.o(this.i,"regionremove",function(d){c.g.delete(d.region)})}oa(xo,mb);xo.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;mb.prototype.release.call(this)};
xo.prototype.j=function(a,b){if(!this.l||0!=a){this.l=!1;for(var c=t(this.i.h.values()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?Ao:a>d.endTime?Bo:yo;this.g.set(d,f);for(var g=t(this.m),h=g.next();!h.done;h=g.next())h=h.value,h.jd==e&&h.hd==f&&h.Uc(d,b)}}};function zo(a,b,c,d){b=new T(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Ao=1,yo=2,Bo=3;function Co(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:var n=(new tb(a)).sb.split("/").pop().split(".");d=1==n.length?"":n.pop().toLowerCase();if(e=Do.get(d))return m.return(e);f=0;g=zh([a],c);va(m,2);g.method="HEAD";return H(m,b.request(f,g).promise,4);case 4:h=m.h;e=h.headers["content-type"];xa(m,3);break;case 2:k=za(m);if(!k||1002!=k.code&&1001!=k.code){m.A(3);break}g.method="GET";return H(m,b.request(f,g).promise,6);case 6:l=m.h,e=l.headers["content-type"];case 3:return m.return(e?
e.toLowerCase().split(";").shift():"")}})}
var Do=(new Map).set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv",
"text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function Eo(a,b){if(a.lineBreak)return"\n";if(a.nestedCues.length)return a.nestedCues.map(function(g){return Eo(g,a)}).join("");if(!a.payload)return a.payload;var c=[],d=a.fontWeight>=wf,e=a.fontStyle==xf,f=a.textDecoration.includes(yf);d&&c.push(["b"]);e&&c.push(["i"]);f&&c.push(["u"]);e=a.color;""==e&&b&&(e=b.color);d="";(e=Fo(e))&&(d+="."+e);e=a.backgroundColor;""==e&&b&&(e=b.backgroundColor);(b=Fo(e))&&(d+=".bg_"+b);d&&c.push(["c",d]);return c.reduceRight(function(g,h){var k=t(h);h=k.next().value;
k=k.next().value;return"<"+h+(void 0===k?"":k)+">"+g+"</"+h+">"},a.payload)}
function Fo(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null}function Go(a,b){var c=[];a=t(Ho(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,y(Go(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=Eo(d,b);c.push(e)}return c}
function Ho(a){var b=[];a=t(a);for(var c=a.next(),d={};!c.done;d={hg:void 0},c=a.next())d.hg=c.value,b.some(function(e){return function(f){return nf(e.hg,f)}}(d))||b.push(d.hg);return b}
function Io(a){function b(d){for(var e=5381,f=d.length;f;)e=33*e^d.charCodeAt(--f);return(e>>>0).toString()}if(a.startTime>=a.endTime)return null;var c=new VTTCue(a.startTime,a.endTime,a.payload);c.id=b(a.startTime.toString())+b(a.endTime.toString())+b(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(d){}"center"==a.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==a.writingMode?c.vertical="lr":"vertical-rl"==a.writingMode&&
(c.vertical="rl");1==a.lineInterpretation&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};function Jo(a,b){this.h=a;this.i=b;this.g=null;a=t(Array.from(this.h.textTracks));for(b=a.next();!b.done;b=a.next())b=b.value,"metadata"!==b.kind&&"chapters"!==b.kind&&(b.mode="disabled",b.label==this.i&&(this.g=b));this.g&&(this.g.mode="hidden")}q=Jo.prototype;q.configure=function(){};q.remove=function(a,b){if(!this.g)return!1;Ko(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
q.append=function(a){if(this.g){var b=Go(a),c=[];a=this.g.cues?Array.from(this.g.cues):[];b=t(b);for(var d=b.next(),e={};!d.done;e={ud:void 0},d=b.next())e.ud=d.value,!a.some(function(f){return function(g){return g.startTime==f.ud.startTime&&g.endTime==f.ud.endTime&&g.text==f.ud.payload?!0:!1}}(e))&&e.ud.payload&&(d=Io(e.ud))&&c.push(d);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-
c.indexOf(f):c.indexOf(f)-c.indexOf(g)});a=t(a);for(b=a.next();!b.done;b=a.next())this.g.addCue(b.value)}};q.destroy=function(){this.g&&(Ko(this.g,function(){return!0}),this.g.mode="disabled");this.g=this.h=null;return Promise.resolve()};q.isTextVisible=function(){return this.g?"showing"==this.g.mode:!1};q.setTextVisibility=function(a){a&&!this.g&&Lo(this);this.g&&(this.g.mode=a?"showing":"hidden")};q.setTextLanguage=function(){};q.enableTextDisplayer=function(){Lo(this)};
function Lo(a){a.h&&!a.g&&(a.g=a.h.addTextTrack("subtitles",a.i),a.g.mode="hidden")}function Ko(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}S("shaka.text.SimpleTextDisplayer",Jo);Jo.prototype.enableTextDisplayer=Jo.prototype.enableTextDisplayer;Jo.prototype.setTextLanguage=Jo.prototype.setTextLanguage;Jo.prototype.setTextVisibility=Jo.prototype.setTextVisibility;
Jo.prototype.isTextVisible=Jo.prototype.isTextVisible;Jo.prototype.destroy=Jo.prototype.destroy;Jo.prototype.append=Jo.prototype.append;Jo.prototype.remove=Jo.prototype.remove;Jo.prototype.configure=Jo.prototype.configure;function Mo(){}q=Mo.prototype;q.configure=function(){};q.remove=function(){};q.append=function(){};q.destroy=function(){};q.isTextVisible=function(){return!1};q.setTextVisibility=function(){};q.setTextLanguage=function(){};q.enableTextDisplayer=function(){};S("shaka.text.StubTextDisplayer",Mo);Mo.prototype.enableTextDisplayer=Mo.prototype.enableTextDisplayer;Mo.prototype.setTextLanguage=Mo.prototype.setTextLanguage;Mo.prototype.setTextVisibility=Mo.prototype.setTextVisibility;
Mo.prototype.isTextVisible=Mo.prototype.isTextVisible;Mo.prototype.destroy=Mo.prototype.destroy;Mo.prototype.append=Mo.prototype.append;Mo.prototype.remove=Mo.prototype.remove;Mo.prototype.configure=Mo.prototype.configure;function No(a,b){var c=this;document.fullscreenEnabled||db("Using UITextDisplayer in a browser without Fullscreen API support causes subtitles to not be rendered in fullscreen");this.B=!1;this.h=[];this.j=a;this.G=b;this.u=this.m=null;this.g=W("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.G.appendChild(this.g);this.s=new bc(function(){c.j.paused||
Oo(c)});Po(this);this.l=new Map;this.i=new zd;this.i.o(document,"fullscreenchange",function(){Oo(c,!0)});this.i.o(this.j,"seeking",function(){Oo(c,!0)});this.i.o(this.j,"ratechange",function(){Po(c)});this.i.o(this.j,"resize",function(){var d=c.j,e=d.videoWidth;d=d.videoHeight;e&&d?c.m=e/d:c.m=null});this.C=null;"ResizeObserver"in window&&(this.C=new ResizeObserver(function(){Oo(c,!0)}),this.C.observe(this.g));this.H=new Map}q=No.prototype;q.configure=function(a){this.u=a;Po(this);Oo(this,!0)};
q.append=function(a){var b=[].concat(y(this.h));a=t(Ho(a));for(var c=a.next(),d={};!c.done;d={ig:void 0},c=a.next())d.ig=c.value,b.some(function(e){return function(f){return nf(f,e.ig)}}(d))||this.h.push(d.ig);this.h.length&&Po(this);Oo(this)};q.destroy=function(){if(!this.g)return Promise.resolve();this.G.removeChild(this.g);this.g=null;this.B=!1;this.h=[];this.s&&(this.s.stop(),this.s=null);this.l.clear();this.i&&(this.i.release(),this.i=null);this.C&&(this.C.disconnect(),this.C=null);return Promise.resolve()};
q.remove=function(a,b){if(!this.g)return!1;var c=this.h.length;this.h=this.h.filter(function(d){return d.startTime<a||d.endTime>=b});Oo(this,c>this.h.length);this.h.length||Po(this);return!0};q.isTextVisible=function(){return this.B};q.setTextVisibility=function(a){this.B=a;Oo(this,!0)};q.setTextLanguage=function(a){a&&"und"!=a?this.g.setAttribute("lang",a):this.g.setAttribute("lang","")};q.enableTextDisplayer=function(){};
function Po(a){a.s&&(a.h.length?a.s.xa((a.u?a.u.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(a.j.playbackRate))):a.s.stop())}function Qo(a,b){for(;null!=b;){if(b==a.g)return!0;b=b.parentElement}return!1}
function Ro(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.l.get(k),m=k.startTime<=d&&k.endTime>d,n=l?l.jj:null;l&&(g.push(l.jg),l.dd&&g.push(l.dd),m||(f=!0,a.l.delete(k),l=null));m&&(h.push(k),l?Qo(a,n)||(f=!0):(So(a,k,e),l=a.l.get(k),n=l.jj,f=!0));0<k.nestedCues.length&&n&&Ro(a,k.nestedCues,n,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(p,r){return p.startTime!=
r.startTime?p.startTime-r.startTime:p.endTime-r.endTime});h=t(h);for(d=h.next();!d.done;d=h.next())d=a.l.get(d.value),d.dd?(d.dd.contains(c)&&d.dd.removeChild(c),c.appendChild(d.dd),d.dd.appendChild(d.jg)):c.appendChild(d.jg)}}function Oo(a,b){if(a.g){var c=a.j.currentTime;if(!a.B||(void 0===b?0:b)){b=t(a.H.values());for(var d=b.next();!d.done;d=b.next())mk(d.value);mk(a.g);a.l.clear();a.H.clear()}a.B&&Ro(a,a.h,a.g,c,[])}}
function So(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");b.rubyTag&&(e=b.rubyTag);d=!d&&0<b.nestedCues.length;var f=W(e);"br"!=e&&To(a,f,b,c,d);c=null;if(b.region&&b.region.id){var g=b.region,h=a.m===4/3?2.5:1.9;c=g.id+"_"+g.width+"x"+g.height+(g.heightUnits==$d?"%":"px")+"-"+g.viewportAnchorX+"x"+g.viewportAnchorY+(g.viewportAnchorUnits==$d?"%":"px");if(a.H.has(c))c=a.H.get(c);else{e=W("span");var k=g.heightUnits==$d?"%":"px",l=g.widthUnits==$d?"%":"px",m=g.viewportAnchorUnits==
$d?"%":"px";e.id="shaka-text-region---"+c;e.classList.add("shaka-text-region");e.style.position="absolute";var n=g.height,p=g.width;2===g.heightUnits&&(n=5.33*g.height,k="%");2===g.widthUnits&&(p=g.width*h,l="%");e.style.height=n+k;e.style.width=p+l;2===g.viewportAnchorUnits?(h=g.viewportAnchorY/75*100,k=g.viewportAnchorX/(a.m===4/3?160:210)*100,h-=g.regionAnchorY*n/100,k-=g.regionAnchorX*p/100,e.style.top=h+"%",e.style.left=k+"%"):(e.style.top=g.viewportAnchorY-g.regionAnchorY*n/100+m,e.style.left=
g.viewportAnchorX-g.regionAnchorX*p/100+m);0!==g.heightUnits&&0!==g.widthUnits&&0!==g.viewportAnchorUnits&&(g=Math.max(0,Math.min(100-(parseInt(e.style.width.slice(0,-1),10)||0),parseInt(e.style.left.slice(0,-1),10)||0)),e.style.top=Math.max(0,Math.min(100-(parseInt(e.style.height.slice(0,-1),10)||0),parseInt(e.style.top.slice(0,-1),10)||0))+"%",e.style.left=g+"%");e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":
"center"==b.displayAlign?"center":"flex-end";a.H.set(c,e);c=e}}e=f;d&&(e=W("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,e.style.lineHeight="normal",f.appendChild(e));a.l.set(b,{jg:f,jj:e,dd:c})}function Uo(a){var b=a.direction,c=a.positionAlign;a=a.textAlign;return c!==bf?c:"left"===a||"start"===a&&b===df||"end"===a&&"rtl"===b?"line-left":"right"===a||"start"===a&&"rtl"===b||"end"===a&&b===df?"line-right":"center"}
function To(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Vo(c.linePadding,c,a.G);f.paddingRight=Vo(c.linePadding,c,a.G);f.textCombineUpright=c.textCombineUpright;f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage=
"url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",c.backgroundColor&&(f.backgroundColor=c.backgroundColor),f.width="100%",f.height="100%";else{if(c.nestedCues.length)var l=b;else l=W("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=Wo(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}if(h&&!d[d.length-1].isContainer)f.display=
"inline";else{f.display="flex";f.flexDirection="column";f.alignItems="center";if("left"==c.textAlign||"start"==c.textAlign)f.width="100%",f.alignItems="start";else if("right"==c.textAlign||"end"==c.textAlign)f.width="100%",f.alignItems="end";f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"center":"flex-end"}g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Vo(c.fontSize,
c,a.G,a.u?a.u.fontScaleFactor:1);d=c.line;null!=d&&(g=c.lineInterpretation,g==ff&&(g=1,h=16,a.m&&1>a.m&&(h=32),d=0>d?100+d/h*100:d/h*100),1==g&&(f.position="absolute",c.writingMode==ef?(f.width="100%",c.lineAlign==gf?f.top=d+"%":"end"==c.lineAlign&&(f.bottom=100-d+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==gf?f.left=d+"%":"end"==c.lineAlign&&(f.right=100-d+"%")):(f.height="100%",c.lineAlign==gf?f.right=d+"%":"end"==c.lineAlign&&(f.left=100-d+"%"))));f.lineHeight=c.lineHeight;
a=Uo(c);"line-left"==a?(f.cssFloat="left",null!==c.position&&(f.position="absolute",c.writingMode==ef?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%")):"line-right"==a?(f.cssFloat="right",null!==c.position&&(f.position="absolute",c.writingMode==ef?(f.right=100-c.position+"%",f.width="auto"):f.bottom=c.position+"%")):null!==c.position&&50!=c.position&&(f.position="absolute",c.writingMode==ef?(f.left=c.position+"%",f.width="auto"):f.top=c.position+"%");f.textAlign=c.textAlign;f.textDecoration=
c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==ef?f.width=c.size+"%":f.height=c.size+"%")}
function Vo(a,b,c,d){d=void 0===d?1:d;var e=(e=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(e[1]),unit:e[2]}:null;if(!e)return a;a=e.unit;d*=e.value;switch(a){case "%":return d/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*d/b.cellResolution.rows+"px";default:return d+a}}function Wo(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}S("shaka.text.UITextDisplayer",No);No.prototype.enableTextDisplayer=No.prototype.enableTextDisplayer;
No.prototype.setTextLanguage=No.prototype.setTextLanguage;No.prototype.setTextVisibility=No.prototype.setTextVisibility;No.prototype.isTextVisible=No.prototype.isTextVisible;No.prototype.remove=No.prototype.remove;No.prototype.destroy=No.prototype.destroy;No.prototype.append=No.prototype.append;No.prototype.configure=No.prototype.configure;function Xo(a,b){function c(f){for(var g=f,h=t(b),k=h.next();!k.done;k=h.next())k=k.value,k.end&&k.start<f&&(g+=k.end-k.start);f=Math.floor(g/3600);h=Math.floor(g/60%60);k=Math.floor(g%60);g=Math.floor(1E3*g%1E3);return(10>f?"0":"")+f+":"+(10>h?"0":"")+h+":"+(10>k?"0":"")+k+"."+(100>g?10>g?"00":"0":"")+g}var d=Go(a);a="WEBVTT\n\n";d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,a+=c(e.startTime)+" --\x3e "+c(e.endTime)+function(f){var g=[];switch(f.textAlign){case "left":g.push("align:left");
break;case "right":g.push("align:right");break;case cf:g.push("align:middle");break;case "start":g.push("align:start");break;case "end":g.push("align:end")}switch(f.writingMode){case "vertical-lr":g.push("vertical:lr");break;case "vertical-rl":g.push("vertical:rl")}return g.length?" "+g.join(" "):""}(e)+"\n",a+=e.payload+"\n\n";return a}S("shaka.text.WebVttGenerator",function(){});function Yo(a,b){this.h=a;this.g=b;this.i=void 0;this.u=!1;this.H=!0;this.l=this.C=!1;this.s=this.m=void 0;this.B=0;this.I=!1;this.G=new zd;this.j=null}Yo.prototype.setMediaElement=function(a){this.j=a;Zo(this)};Yo.prototype.configure=function(a){this.g=a};function $o(a){a.u=!1;a.H=!0;a.C=!1;a.l=!1;a.m=0;a.s=0;a.B=0;a.I=!1;a.j=null;a.G.ab()}function ap(a,b){a.l=b;a.l?a.i==bp?a.i=cp:a.i==dp&&(a.i=ep):a.i==cp?a.i=bp:a.i==ep&&(a.i=dp)}
function fp(a,b){if(a.g&&a.g.enabled&&a.g.version==gp&&a.j&&a.j.autoplay){var c=a.j.play();c&&c.then(function(){a.B=b}).catch(function(){a.B=0})}}
function hp(a,b,c){try{if(!a.g.enabled)return b;var d=ip(a);a:{switch(c.toLowerCase()){case "audio/mp4":case "audio/webm":case "audio/ogg":case "audio/mpeg":case "audio/aac":case "audio/flac":case "audio/wav":var e=jp;break a;case "video/webm":case "video/mp4":case "video/mpeg":case "video/mp2t":e=kp;break a;case "application/x-mpegurl":case "application/vnd.apple.mpegurl":case "application/dash+xml":case "video/vnd.mpeg.dash.mpd":case "application/vnd.ms-sstr+xml":e=lp;break a}e=void 0}d.ot=e;d.su=
!0;var f=mp(d);return Bp(b,f)}catch(g){return eb("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Zo(a){a.G.ra(a.j,"play",function(){a.m||(a.m=Date.now())});a.G.ra(a.j,"playing",function(){a.s||(a.s=Date.now())})}function ip(a){a.g.sessionId||(a.g.sessionId=window.crypto.randomUUID());return{v:a.g.version,sf:a.i,sid:a.g.sessionId,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
function Cp(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,ip(a));c.pr=a.h.Xa();var e=c.ot===Dp||c.ot===kp;a.C&&e&&(c.bs=!0,c.su=!0,a.C=!1);null==c.su&&(c.su=a.H);c.v===gp&&(a.h.V()&&(c.ltc=a.h.Pe()),e=!a.I&&a.s&&a.m?a.s-(a.B||a.m):void 0,void 0!=e&&(c.msd=e,a.I=!0));a=Ep(a,c);if(d)d=Fp(a),Object.keys(d).length&&Object.assign(b.headers,d);else{var f=mp(a);f&&(b.uris=b.uris.map(function(g){return Bp(g,f)}))}}}
function Ep(a,b){var c=a.g.includeKeys;return c.length?Object.keys(b).reduce(function(d,e){c.includes(e)&&(d[e]=b[e]);return d},{}):b}function Gp(a){if(0===a.type)return Hp;if(a=a.stream){var b=a.type;if("video"==b)return a.codecs&&a.codecs.includes(",")?kp:Dp;if("audio"==b)return jp;if("text"==b)return"application/mp4"===a.mimeType?Ip:Jp}}
function Kp(a,b){b=a.h.Yb()[b];if(!b.length)return NaN;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):NaN}function Lp(a,b){b=a.h.Yb()[b];if(!b.length)return 0;var c=a.h.getCurrentTime();return(a=b.find(function(d){return d.start<=c&&d.end>=c}))?1E3*(a.end-c):0}
function Mp(a,b){var c=a.h.Mb();if(!c.length)return NaN;a=c[0];c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,"variant"===d.type&&d.bandwidth>a.bandwidth&&(a=d);switch(b){case Dp:return a.videoBandwidth||NaN;case jp:return a.audioBandwidth||NaN;default:return a.bandwidth}}
function mp(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Fp(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=mp(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
function Bp(a,b){if(!b||a.includes("offline:"))return a;a=new tb(a);a.g.set("CMCD",b);return a.toString()}var lp="m",jp="a",Dp="v",kp="av",Hp="i",Jp="c",Ip="tt",gp=2,bp="d",cp="ld",dp="h",ep="lh";S("shaka.util.CmcdManager.StreamingFormat",{DASH:bp,cm:cp,HLS:dp,dm:ep,rm:"s",OTHER:"o"});function Np(a){this.h=a;this.g=null}q=Np.prototype;q.configure=function(a){this.h=a};q.di=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(Op)?1E3*this.g.get(Op):null};q.ci=function(){return this.h.enabled&&this.g&&this.g.has(Pp)?1E3*this.g.get(Pp):null};q.dk=function(){return this.h.enabled&&this.g&&this.g.has(Qp)?this.g.get(Qp):null};q.ek=function(){return this.h.enabled&&this.g&&this.g.has(Rp)?this.g.get(Rp):null};
q.getBandwidthEstimate=function(a){var b=this.ci();if(!b)return a;var c=this.h.estimatedThroughputWeightRatio;return 0<c&&1>=c?a*(1-c)+b*c:a};function Sp(a){return a?"false"===a.toLowerCase()?!1:/^[-0-9]/.test(a)?parseInt(a,10):a.replace(/["]+/g,""):!0}S("shaka.util.CmsdManager",Np);Np.prototype.getBandwidthEstimate=Np.prototype.getBandwidthEstimate;Np.prototype.getRoundTripTime=Np.prototype.ek;Np.prototype.getResponseDelay=Np.prototype.dk;Np.prototype.getEstimatedThroughput=Np.prototype.ci;
Np.prototype.getMaxBitrate=Np.prototype.di;var Pp="etp",Op="mb",Qp="rd",Rp="rtt";function Tp(){this.g=null;this.h=[]}function Up(a,b){return Q(function(c){if(1==c.g)return a.g?H(c,new Promise(function(d){return a.h.push(d)}),2):c.A(2);a.g=b;I(c)})}Tp.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null};function Y(a,b,c){b=void 0===b?null:b;mb.call(this);var d=this;this.m=Vp;this.h=null;this.Pf=b;this.va=!1;this.ze=new zd;this.pe=new zd;this.l=new zd;this.Za=new zd;this.nc=new zd;this.I=this.K=this.G=this.H=null;this.Be=0;this.ba=new Tp;this.Y=this.Ob=this.T=this.i=this.kc=this.J=this.j=this.je=this.P=this.Ih=this.oa=this.M=this.La=this.Fa=this.ke=this.N=this.Aa=this.L=this.Sa=null;this.Z=!1;this.Ka=this.s=null;this.Tf=1E9;this.ye=[];this.Rf=-1;this.g=Wp(this);this.Uf=$n();this.R=null;this.Ce=-1;
this.Ya=null;this.qa={width:Infinity,height:Infinity};this.Of=new Wi(this.g,this.qa,null);this.we=[];this.B=null;this.U=this.g.adaptationSetCriteriaFactory();this.U.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:this.g.preferredAudioChannelCount,td:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,kd:this.g.preferredAudioLabel,Jd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,
audioCodec:""});this.qc=this.g.preferredTextLanguage;this.ue=this.g.preferredTextRole;this.se=this.g.preferForcedSubs;this.qe=[];c&&c(this);this.M=Xp(this);this.oa=new Np(this.g.cmsd);this.H=Yp(this);this.H.oh(this.g.streaming.forceHTTP);this.H.ph(this.g.streaming.forceHTTPS);this.H.s=this.g.streaming.minBytesForProgressEvents;this.sc=this.ea=this.u=null;this.Wf=!1;this.Vf=new bc(function(){return Q(function(e){if(1==e.g)return d.ea?H(e,d.Wb(d.sc,!0),3):e.A(0);if(4!=e.g)return H(e,d.load(d.ea),4);
d.Wf?d.sc.pause():d.sc.play();d.ea=null;d.Wf=!1;I(e)})});Zp&&(this.u=Zp(),this.u.configure(this.g.ads),this.nc.o(this.u,"ad-content-pause-requested",function(e){var f;return Q(function(g){if(1==g.g){d.Vf.stop();if(d.ea)return g.A(0);d.sc=d.h;d.Wf=d.isEnded();f=e.saveLivePosition||!1;return H(g,d.Xh(!0,f),3)}d.ea=g.h;I(g)})}),this.nc.o(this.u,"ad-content-resume-requested",function(e){e=e.offset||0;if(d.ea){var f=d.ea;f.C&&e&&(f.C+=e)}d.Vf.$(.1)}),this.nc.o(this.u,"ad-content-attach-requested",function(){return Q(function(e){return d.h||
!d.sc?e.A(0):H(e,d.Wb(d.sc,!0),0)})}));this.ze.o(window,"online",function(){$p(d);d.gh()});this.ve=new bc(function(){for(var e=Date.now()/1E3,f=!1,g=!0,h=t(d.i.variants),k=h.next();!k.done;k=h.next())k=k.value,0<k.disabledUntilTime&&k.disabledUntilTime<=e&&(k.disabledUntilTime=0,f=!0),0<k.disabledUntilTime&&(g=!1);g&&d.ve.stop();f&&aq(d,!1,void 0,!1,!1)});this.Ha=null;a&&(Fd("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Wb(a,
!0));this.C=null}oa(Y,mb);function bq(a){null!=a.P&&(Ld(a.P),a.P.release(),a.P=null)}function cq(a,b,c){c||b.lcevc.enabled?(bq(a),null==a.P&&(a.P=new Jd(a.h,a.Ih,b.lcevc,c),a.K&&(a.K.K=a.P))):bq(a)}function dq(a,b){return new T(a,b)}q=Y.prototype;
q.destroy=function(){var a=this,b;return Q(function(c){switch(c.g){case 1:if(a.m==eq)return c.return();bq(a);b=a.detach();a.m=eq;return H(c,b,2);case 2:return H(c,a.mg(),3);case 3:a.ze&&(a.ze.release(),a.ze=null);a.pe&&(a.pe.release(),a.pe=null);a.l&&(a.l.release(),a.l=null);a.Za&&(a.Za.release(),a.Za=null);a.nc&&(a.nc.release(),a.nc=null);a.Ka=null;a.g=null;a.B=null;a.Pf=null;a.M=null;a.oa=null;if(!a.H){c.A(4);break}return H(c,a.H.destroy(),5);case 5:a.H=null;case 4:a.s&&(a.s.release(),a.s=null),
mb.prototype.release.call(a),I(c)}})};function fq(a,b){gq.set(a,b)}function hq(){window.Promise||db("A Promise implementation or polyfill is required");return window.Promise&&window.Uint8Array&&Array.prototype.forEach&&!hc("Trident/")?cc()?!0:dc("application/x-mpegurl"):!1}function iq(a,b){a.dispatchEvent(dq("onstatechange",(new Map).set("state",b)))}
q.Wb=function(a,b){b=void 0===b?!0:b;var c=this,d,e,f;return Q(function(g){switch(g.g){case 1:if(c.m==eq)throw new V(2,7,7E3);d=c.h&&c.h==a;if(!c.h||c.h==a){g.A(2);break}return H(g,c.detach(),2);case 2:return H(g,jq(c,"attach"),4);case 4:if(g.h)return g.return();va(g,5,6);d||(iq(c,"attach"),e=function(){var h=kq(c,!1);h&&lq(c,h)},c.pe.o(a,"error",e),c.h=a,c.M&&c.M.setMediaElement(a));if(!b||!cc()||c.K){g.A(6);break}return H(g,mq(c),6);case 6:Ca(g);c.ba.release();Da(g,0);break;case 5:return f=za(g),
H(g,c.detach(),10);case 10:throw f;}})};q.Kh=function(a){this.Ih=a};q.detach=function(a){a=void 0===a?!1:a;var b=this;return Q(function(c){if(1==c.g){if(b.m==eq)throw new V(2,7,7E3);return H(c,b.vc(!1,a),2)}if(3!=c.g)return H(c,jq(b,"detach"),3);if(c.h)return c.return();try{b.h&&(b.pe.ab(),b.h=null),iq(b,"detach"),b.u&&!a&&b.u.release()}finally{b.ba.release()}I(c)})};
function jq(a,b){var c;return Q(function(d){return 1==d.g?(c=++a.Be,H(d,Up(a.ba,b),2)):c!=a.Be?(a.ba.release(),d.return(!0)):d.return(!1)})}
q.vc=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d,e,f,g,h,k,l,m,n,p;return Q(function(r){switch(r.g){case 1:return c.m!=eq&&(c.m=Vp),H(r,jq(c,"unload"),2);case 2:if(r.h)return r.return();wa(r,3);c.Z=!1;iq(c,"unload");bq(c);d=c.qe.map(function(u){return u()});c.qe=[];return H(r,Promise.all(d),5);case 5:c.dispatchEvent(dq("unloading"));c.ke&&(c.ke.release(),c.ke=null);c.Fa&&(c.Fa.release(),c.Fa=null);c.La&&(c.La.release(),c.La=null);c.h&&(c.l.ab(),c.Za.ab());c.ve.stop();c.Sa&&(c.Sa.release(),
c.Sa=null);c.Aa&&(c.Aa.stop(),c.Aa=null);if(!c.J){r.A(6);break}return H(r,c.J.stop(),7);case 7:c.J=null,c.kc=null;case 6:if(!c.s){r.A(8);break}return H(r,c.s.stop(),8);case 8:if(!c.j){r.A(10);break}return H(r,c.j.destroy(),11);case 11:c.j=null;case 10:c.L&&(c.L.release(),c.L=null);c.I&&(c.I.release(),c.I=null);if("webkit"!==window.shakaMediaKeysPolyfill||!c.G){r.A(12);break}return H(r,c.G.destroy(),13);case 13:c.G=null;case 12:if(!c.K){r.A(14);break}return H(r,c.K.destroy(),15);case 15:c.K=null;case 14:if(c.u&&
!b)c.u.onAssetUnload();c.ea&&!b&&(c.ea.destroy(),c.ea=null);b||c.Vf.stop();c.M&&$o(c.M);c.oa&&(c.oa.g=null);if(!c.C){r.A(16);break}return H(r,c.C.destroy(),17);case 17:c.C=null;case 16:c.h&&(mk(c.h),c.h.src&&(c.h.removeAttribute("src"),c.h.load()));if(!c.G){r.A(18);break}return H(r,c.G.destroy(),19);case 19:c.G=null;case 18:c.Ha&&c.T!=c.Ha.rd()&&(c.Ha.u||c.Ha.destroy(),c.Ha=null);c.T=null;c.Ob=null;c.N=null;if(c.i){e=t(c.i.variants);for(f=e.next();!f.done;f=e.next())for(g=f.value,h=t([g.audio,g.video]),
k=h.next();!k.done;k=h.next())(l=k.value)&&l.segmentIndex&&l.segmentIndex.release();m=t(c.i.textStreams);for(n=m.next();!n.done;n=m.next())p=n.value,p.segmentIndex&&p.segmentIndex.release()}c.g&&c.g.streaming.clearDecodingCache&&(Gg.clear(),Zb.clear());c.i=null;c.B=new ho;c.Ae=null;c.Ya=null;c.R=null;c.Ce=-1;c.ye=[];c.Rf=-1;c.H&&c.H.Sh();nq(c);case 3:Ca(r);c.ba.release();Da(r,4);break;case 4:if(a&&cc()&&!c.K&&c.h)return H(r,mq(c),0);r.A(0)}})};q.Fl=function(a){this.Y=a};
q.load=function(a,b,c){b=void 0===b?null:b;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w;return Q(function(x){switch(x.g){case 1:if(d.m==eq)throw new V(2,7,7E3);e=null;f="";if(a instanceof io){if(a.u)throw new V(2,7,7006);e=a;f=e.rd()||""}else f=a||"";return H(x,Up(d.ba,"load"),2);case 2:d.ba.release();if(!d.h)throw new V(2,7,7002);if(!d.T){x.A(3);break}d.T=f;return H(x,d.vc(!1),3);case 3:g=++d.Be;h=function(){return Q(function(z){if(1==z.g)return d.Be==g?z.A(0):e?H(z,e.destroy(),3):z.A(3);throw new V(2,7,
7E3);})};k=function(z,B){return Q(function(C){switch(C.g){case 1:return wa(C,2),H(C,Up(d.ba,B),4);case 4:return H(C,h(),5);case 5:return H(C,z(),6);case 6:return H(C,h(),7);case 7:e&&d.g&&(e.g=d.g);case 2:Ca(C),d.ba.release(),Da(C,0)}})};va(x,5,6);null==b&&e&&(b=e.getStartTime());d.Y=b;d.Z=!1;d.dispatchEvent(dq("loading"));if(e){c=e.Y;x.A(8);break}if(c){x.A(8);break}return H(x,k(function(){return Q(function(z){if(1==z.g)return H(z,oq(d,f),2);c=z.h;I(z)})},"guessMimeType_"),8);case 8:l=!!e;if(e){lo(e,
d);d.B=e.getStats();x.A(11);break}return H(x,pq(d,f,b,c,!0),12);case 12:(e=x.h)?(e.B=!1,lo(e,d),d.B=e.getStats(),e.start(),e.m.catch(function(){})):d.B=new ho;case 11:m=!e;n=Date.now()/1E3;d.B=e?e.getStats():new ho;d.T=f;d.Ob=c||null;d.Fa=new sm(function(){return d.ya()});if(m)return H(x,k(function(){return Q(function(z){return H(z,qq(d,c),0)})},"initializeSrcEqualsDrmInner_"),23);d.La=new sm(function(){return d.ya()});return H(x,k(function(){return Q(function(z){if(1==z.g)return H(z,Promise.race([e.qa,
e.m]),2);d.kc=e.I;var B=e;B.va=!0;d.J=B.l;d.i=e.Hg();I(z)})},"waitForFinish"),15);case 15:if(d.K){x.A(16);break}return H(x,k(function(){return Q(function(z){return H(z,mq(d),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return d.i&&d.i.textStreams.length&&(d.C.enableTextDisplayer?d.C.enableTextDisplayer():Fd("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),H(x,k(function(){return Q(function(z){return H(z,e.m,0)})},"waitForFinish"),18);
case 18:d.g=e.getConfiguration();d.Of=e.H;d.J&&d.J.setMediaElement&&d.h&&d.J.setMediaElement(d.h);d.ke=no(e);d.je=e.La;if(p=e.s)d.U=p;l&&d.h&&"AUDIO"===d.h.nodeName&&(rq(d),d.configure("manifest.disableVideo",!0));if(e.i){x.A(19);break}return H(x,k(function(){return Q(function(z){return H(z,so(e,d.h),0)})},"drmEngine_.init"),19);case 19:return d.G=oo(e),H(x,k(function(){return Q(function(z){return H(z,d.G.Wb(d.h),0)})},"drmEngine_.attach"),21);case 21:return!(r=e.G)||d.Ka&&d.Ka==r||(d.s=mo(e),d.Ka=
e.G,"function"!=typeof d.s.setMediaElement&&(Fd("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),d.s.setMediaElement=function(){}),"function"!=typeof d.s.setCmsdManager&&(Fd("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),d.s.setCmsdManager=function(){}),"function"!=typeof d.s.trySuggestStreams&&(Fd("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),d.s.trySuggestStreams=
function(){})),u=po(e),v=e.L,H(x,k(function(){return Q(function(z){return H(z,sq(d,n,v,u),0)})},"loadInner_"),22);case 22:ko(e);d.Ob&&oc()&&Yf(d.Ob)&&Sk(d.K,d.T,d.Ob);x.A(14);break;case 23:return H(x,k(function(){return Q(function(z){return H(z,tq(d,n,c),0)})},"srcEqualsInner_"),14);case 14:d.dispatchEvent(dq("loaded"));case 6:Ca(x);if(!e){x.A(25);break}return H(x,e.destroy(),25);case 25:d.Ha=null;Da(x,0);break;case 5:w=za(x);if(!w||7E3==w.code){x.A(27);break}return H(x,d.vc(!1),27);case 27:throw w;
}})};function rq(a){for(var b=t(a.i.variants),c=b.next();!c.done;c=b.next())c=c.value,c.video&&(c.video.closeSegmentIndex(),c.video=null),c.bandwidth=c.audio&&c.audio.bandwidth?c.audio.bandwidth:0;a.i.variants=a.i.variants.filter(function(d){return d.audio})}q.Bl=function(a,b){a=void 0===a?!0:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?H(e,uq(c),2):3!=e.g?(d=e.h,H(e,c.vc(a,b),3)):e.return(d)})};
q.Xh=function(a,b){a=void 0===a?!1:a;b=void 0===b?!1:b;var c=this,d;return Q(function(e){return 1==e.g?H(e,uq(c,b),2):3!=e.g?(d=e.h,H(e,c.detach(a),3)):e.return(d)})};
function uq(a,b){b=void 0===b?!1:b;var c,d;return Q(function(e){if(1==e.g){c=null;if(!(a.i&&a.J&&a.kc&&a.T))return e.A(2);d=a.h.currentTime;a.V()&&!b&&(d=null);return H(e,vq(a,a.T,d,a.Ob,!0,!1,!1),3)}if(2!=e.g){c=e.h;a.we.push(c);a.J&&a.J.setMediaElement&&a.J.setMediaElement(null);var f=c,g=a.J,h=a.kc;f.h=a.i;f.l=g;f.I=h;f=c;g=a.Ka;f.j=a.s;f.G=g;c.s=a.U;c.start();a.i=null;a.J=null;a.kc=null;a.s=null;a.Ka=null}return e.return(c)})}
q.preload=function(a,b,c){b=void 0===b?null:b;var d=this,e;return Q(function(f){if(1==f.g)return H(f,pq(d,a,b,c),2);(e=f.h)?e.start():lq(d,new V(2,7,7005));return f.return(e)})};q.mg=function(){var a=this,b,c,d,e;return Q(function(f){b=[];c=t(a.we);for(d=c.next();!d.done;d=c.next())e=d.value,e.u||b.push(e.destroy());a.we=[];return H(f,Promise.all(b),0)})};
function pq(a,b,c,d,e){e=void 0===e?!1:e;var f,g,h,k;return Q(function(l){if(1==l.g)return d?l.A(2):H(l,oq(a,b),3);2!=l.g&&(d=l.h);if(f=wq(a,d))return l.return(null);g=!1;h=!0;e&&(a.s&&a.Ka==a.g.abrFactory&&(h=!1),a.h&&"AUDIO"===a.h.nodeName&&(g=!0));k=vq(a,b,c,d||null,!e,g,h);k=e?k.then(function(m){m.B=!1;return m}):k.then(function(m){a.we.push(m);return m});return l.return(k)})}
function vq(a,b,c,d,e,f,g){e=void 0===e?!0:e;f=void 0===f?!1:f;g=void 0===g?!0:g;var h,k,l,m,n,p,r,u,v,w,x,z,B,C;return Q(function(E){if(1==E.g)return h=null,k=ne(a.g),f&&(k.manifest.disableVideo=!0),l=function(){return h.T&&h.u?null:h},m=function(){return l()?l().getConfiguration():a.g},Infinity!=a.qa.width||Infinity!=a.qa.height||a.g.ignoreHardwareResolution?E.A(2):H(E,Dc(),3);2!=E.g&&(n=E.h,a.qa.width=n.width,a.qa.height=n.height);p=new Wi(k,a.qa,null);r={networkingEngine:a.H,filter:function(D){var A,
F;return Q(function(G){if(1==G.g)return H(G,Xi(p,D),2);if(4!=G.g){A=G.h;if(!A)return G.A(0);F=dq("trackschanged");return H(G,Promise.resolve(),4)}h.dispatchEvent(F);I(G)})},makeTextStreamsForClosedCaptions:function(D){return xq(a,D)},onTimelineRegionAdded:function(D){tm(h.J,D)},onEvent:function(D){return h.dispatchEvent(D)},onError:function(D){return h.onError(D)},isLowLatencyMode:function(){return m().streaming.lowLatencyMode},updateDuration:function(){a.j&&h.T&&a.j.updateDuration()},newDrmInfo:function(D){var A=
h.i,F=A?A.h:null;F&&A.B&&$i(p,F.keySystem,D)},onManifestUpdated:function(){var D=(new Map).set("isLive",a.V());h.dispatchEvent(dq("manifestupdated",D));jo(h,!1,function(){if(a.u)a.u.onManifestUpdated(a.V())})},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},onMetadata:function(D,A,F,G){var K=D;if("com.apple.hls.interstitial"==D&&(K="com.apple.quicktime.HLS",D={startTime:A,endTime:F,values:G},a.u))a.u.onHLSInterstitialMetadata(a,a.h,D);G=t(G);D=G.next();for(var L={};!D.done;L={ah:void 0},
D=G.next())L.ah=D.value,"ID"!=L.ah.name&&jo(h,!1,function(J){return function(){yq(a,A,F,K,J.ah)}}(L))},disableStream:function(D){return a.disableStream(D,a.g.streaming.maxDisabledTime)},addFont:function(D,A){return a.addFont(D,A)}};u=new sm(function(){return a.ya()});u.addEventListener("regionadd",function(D){var A=D.region;zq(a,"timelineregionadded",A,h);jo(h,!1,function(){a.u&&(a.u.onDashTimedMetadata(A),a.u.onDASHInterstitialMetadata(a,a.h,A))})});v=null;k.streaming.observeQualityChanges&&(v=new mm(function(){return a.Yb()}),
v.addEventListener("qualitychange",function(D){Aq(a,D.quality,D.position)}),v.addEventListener("audiotrackchange",function(D){Aq(a,D.quality,D.position,!0)}));w=!0;x={pc:a.H,onError:function(D){return h.onError(D)},lf:function(D){jo(h,!0,function(){a:{var A=D,F=dq("keystatuschanged");a.dispatchEvent(F);var G=Object.keys(A);1==G.length&&""==G[0]&&(G=["00"],A={"00":A[""]});F=1==G.length&&"00"==G[0];var K=!1;if(G.length){G=a.keySystem();for(var L=Jh(a.g.drm.clearKeys),J=t(a.i.variants),M=J.next();!M.done;M=
J.next()){M=M.value;var N=[];M.audio&&N.push(M.audio);M.video&&N.push(M.video);N=t(N);for(var P=N.next();!P.done;P=N.next()){var O=P.value;P=M.allowedByKeySystem;if(O.keyIds.size)if(O.drmInfos.length&&!L.size){O=t(O.drmInfos);for(var R=O.next();!R.done;R=O.next())if(R=R.value,R.keyIds.size&&R.keySystem==G){M.allowedByKeySystem=!0;R=t(R.keyIds);for(var U=R.next();!U.done;U=R.next())if(U=U.value,(U=A[F?"00":U])||a.G.H)M.allowedByKeySystem=M.allowedByKeySystem&&!!U&&!bj.includes(U)}}else for(M.allowedByKeySystem=
!0,O=t(O.keyIds),R=O.next();!R.done;R=O.next())if(R=R.value,(R=A[F?"00":R])||a.G.H)M.allowedByKeySystem=M.allowedByKeySystem&&!!R&&!bj.includes(R);P!=M.allowedByKeySystem&&(K=!0)}}}if(K&&(Bq(a),!Cq(a)))break a;(A=a.j.l)&&!A.allowedByKeySystem&&aq(a)}})},onExpirationUpdated:function(D,A){var F=dq("expirationupdated");h.dispatchEvent(F);if((F=h.l)&&F.onExpirationUpdated)F.onExpirationUpdated(D,A)},onEvent:function(D){h.dispatchEvent(D);"drmsessionupdate"==D.type&&w&&(w=!1,D=Date.now()/1E3-h.Ha,(a.B||
h.getStats()).j=D,a.P&&Ld(a.P))}};z=Yp(a,l);yh(a.H,z);B=function(){return a.md(x)};C={config:k,Kk:r,Vk:u,Uk:v,md:B,Jk:p,networkingEngine:z,rj:e,qj:g};h=new io(b,d,c,C);return E.return(h)})}function oq(a,b){var c,d;return Q(function(e){if(1==e.g)return c=a.g.manifest.retryParameters,H(e,Co(b,a.H,c),2);d=e.h;"application/x-mpegurl"==d&&oc()&&(d="application/vnd.apple.mpegurl");return e.return(d)})}
function wq(a,b){if(!cc())return!0;if(b){if(""==(a.h||ec()).canPlayType(b))return!1;if(!cc()||!ej.has(b))return!0;if(Yf(b))return oc()&&(a.g.drm.servers["com.apple.fps"]||a.g.drm.servers["com.apple.fps.1_0"])?a.g.streaming.useNativeHlsForFairPlay:a.g.streaming.preferNativeHls;if("application/dash+xml"===b||"video/vnd.mpeg.dash.mpd"===b)return a.g.streaming.preferNativeDash}return!1}
function Dq(a){var b=a.g.textDisplayFactory;b!==a.Ae&&(a.C=b(),a.C.configure?a.C.configure(a.g.textDisplayer):Fd("Text displayer w/ configure",'Text displayer should have a "configure" method!'),a.Ae=b,a.C.setTextVisibility(a.va))}
function mq(a){var b,c,d;return Q(function(e){if(1==e.g)return iq(a,"media-source"),a.h.removeAttribute("src"),mk(a.h),Dq(a),b=Eq(a.h,a.C,{Qj:function(){return a.keySystem()},onMetadata:function(f,g,h){f=t(f);for(var k=f.next();!k.done;k=f.next())if(k=k.value,k.data&&"number"==typeof k.cueTime&&k.frames){var l=k.cueTime+g,m=h;m&&l>m&&(m=l);for(var n=t(k.frames),p=n.next();!p.done;p=n.next())yq(a,l,m,"org.id3",p.value);if(a.u)a.u.onHlsTimedMetadata(k,l)}},Pk:function(f){a.La&&tm(a.La,{schemeIdUri:f.schemeIdUri,
startTime:f.startTime,endTime:f.endTime,id:String(f.id),emsg:f})},onEvent:function(f){return a.dispatchEvent(f)},Rk:function(){a.J&&a.J.update&&a.J.update()}},a.P),b.configure(a.g.mediaSource),c=a.g.manifest,d=c.segmentRelativeVttTiming,b.Na=d,H(e,b.I,2);a.K=b;I(e)})}
function Fq(a,b,c){function d(){return Gq(a)}a.l.o(b,"playing",d);a.l.o(b,"pause",d);a.l.o(b,"ended",d);a.l.o(b,"ratechange",function(){var e=a.h.playbackRate;0!=e&&(a.L&&(a.L.set(e),a.m==Hq&&a.s.playbackRateChanged(e),Iq(a,e)),e=dq("ratechange"),a.dispatchEvent(e))});b.remote&&(a.l.o(b.remote,"connect",function(){return Bq(a)}),a.l.o(b.remote,"connecting",function(){return Bq(a)}),a.l.o(b.remote,"disconnect",function(){return Q(function(e){if(1==e.g)return a.j&&"disconnected"==b.remote.state?H(e,
en(a.j),2):e.A(2);Bq(a);I(e)})}));b.audioTracks&&(a.l.o(b.audioTracks,"addtrack",function(){return Bq(a)}),a.l.o(b.audioTracks,"removetrack",function(){return Bq(a)}),a.l.o(b.audioTracks,"change",function(){return Bq(a)}));b.textTracks&&(a.l.o(b.textTracks,"addtrack",function(e){if(e.track)switch(e=e.track,e.kind){case "metadata":Jq(a,e);break;case "chapters":Kq(a,e);break;default:Bq(a)}}),a.l.o(b.textTracks,"removetrack",function(){return Bq(a)}),a.l.o(b.textTracks,"change",function(){return Bq(a)}),
"keep"!==a.g.streaming.crossBoundaryStrategy&&(a.l.o(b,"waiting",function(){a.j&&jn(a.j)}),a.l.o(b,"timeupdate",function(){a.j&&jn(a.j)})));"none"!=b.preload&&a.l.ra(b,"loadedmetadata",function(){a.B.G=Date.now()/1E3-c})}
function sq(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M;return Q(function(N){switch(N.g){case 1:iq(a,"load");e=a.h;a.L=new im({Qe:function(){return e.playbackRate},Rc:function(){return e.defaultPlaybackRate},qh:function(P){e.playbackRate=P},xi:function(P){e.currentTime+=P}});Fq(a,e,b);f=!1;g=t(a.i.variants);for(h=g.next();!h.done;h=g.next())k=h.value,(l=k.video&&k.video.dependencyStream)&&(f=Md(l));cq(a,a.g,f);a.qc=a.g.preferredTextLanguage;a.ue=a.g.preferredTextRole;a.se=a.g.preferForcedSubs;
Lq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.s.init(function(P,O,R){a.i&&a.j&&P!=a.j.l&&Mq(a,P,!0,void 0===O?!1:O,void 0===R?0:R)});a.s.setMediaElement(e);a.s.setCmsdManager(a.oa);a.j=Nq(a);a.j.configure(a.g.streaming);a.m=Hq;a.dispatchEvent(dq("streaming"));m=c;case 2:(p=a.j.l)||m||(m=Cq(a)?a.s.chooseVariant():null);r=[];n=p||m;u=t([n.video,n.audio]);for(v=u.next();!v.done;v=u.next())(w=v.value)&&!w.segmentIndex&&(r.push(w.createSegmentIndex()),w.dependencyStream&&r.push(w.dependencyStream.createSegmentIndex()));
if(!(0<r.length)){N.A(4);break}return H(N,Promise.all(r),4);case 4:if(!n||0!=n.disabledUntilTime){N.A(2);break}if(a.J&&a.J.onInitialVariantChosen)a.J.onInitialVariantChosen(n);a.i.isLowLatency&&(a.g.streaming.lowLatencyMode?a.configure(a.Uf):db("Low-latency 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."));a.M&&(ap(a.M,a.i.isLowLatency&&a.g.streaming.lowLatencyMode),
fp(a.M,1E3*b));Lq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);Um(a.j,a.g.playRangeStart,a.g.playRangeEnd);x=function(P){a.I=Oq(a,P);a.Sa=Pq(a,P);Qq(a,e,!1)};a.g.streaming.startAtSegmentBoundary||(z=a.Y,null==z&&a.i.startTime&&(z=a.i.startTime),x(z));if(p){N.A(7);break}if(!a.g.streaming.startAtSegmentBoundary){N.A(8);break}B=a.i.presentationTimeline;C=a.Y||a.h.currentTime;null==a.Y&&a.i.startTime&&(C=a.i.startTime);E=B.ac();D=B.Gb();C<E?C=E:C>D&&(C=D);return H(N,Rq(m,C),9);case 9:A=
N.h,x(A);case 8:Mq(a,m,!0,!1,0);case 7:return a.I.ready(),F=a.jc().find(function(P){return P.active}),F||((G=Zg(a.i.textStreams,a.qc,a.ue,a.se)[0]||null)&&go(a.B.h,G,!0),m&&(G?(bh(m.audio,G,a.g)&&(a.va=!0),a.va&&a.C.setTextVisibility(!0),Sq(a)):a.va=!1),G&&(a.g.streaming.alwaysStreamText||a.Xc())&&(cn(a.j,G),Tq(a))),H(N,a.j.start(d),10);case 10:a.g.abr.enabled&&(a.s.enable(),Uq(a));Bq(a);Cq(a);a.i.variants.some(function(P){return P.primary});if((K=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||
a.i.serviceDescription||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)L=function(){return Vq(a)},a.l.o(e,"timeupdate",L);K||(J=function(){return Wq(a)},a.l.o(e,"timeupdate",J),Wq(a),a.i.nextUrl&&(0<a.g.streaming.preloadNextUrlWindow&&(M=function(){var P;return Q(function(O){if(1==O.g){P=a.ya().end-a.h.currentTime;if(isNaN(P)||!(P<=a.g.streaming.preloadNextUrlWindow))return O.A(0);a.l.Ea(e,"timeupdate",M);return H(O,a.preload(a.i.nextUrl),4)}a.Ha=O.h;I(O)})},a.l.o(e,"timeupdate",
M)),a.l.o(e,"ended",function(){a.load(a.Ha||a.i.nextUrl)})));if(a.u)a.u.onManifestUpdated(K);a.Z=!0;I(N)}})}
function qq(a,b){var c,d,e,f,g;return Q(function(h){return 1==h.g?(c=dd,d=Date.now()/1E3,e=!0,a.G=a.md({pc:a.H,onError:function(k){lq(a,k)},lf:function(){},onExpirationUpdated:function(){var k=dq("expirationupdated");a.dispatchEvent(k)},onEvent:function(k){a.dispatchEvent(k);"drmsessionupdate"==k.type&&e&&(e=!1,a.B.j=Date.now()/1E3-d)}}),a.G.configure(a.g.drm),f={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
g={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:b?Wf(b):"",codecs:b?Xf(b):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:c.Ba,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
baseOriginalId:null},g.fullMimeTypes.add(Mf(g.mimeType,g.codecs)),b.startsWith("audio/")?(g.type=c.aa,f.audio=g):f.video=g,a.G.Z=!0,H(h,hi(a.G,[f],[]),2)):H(h,a.G.Wb(a.h),0)})}
function tq(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;return Q(function(v){switch(v.g){case 1:iq(a,"src-equals");d=a.h;a.I=new $l(d);e=!1;a.qe.push(function(){e=!0});null!=a.Y&&a.I.Sf(a.Y);a.Sa=Xq(a,a.Y||0);a.L=new im({Qe:function(){return d.playbackRate},Rc:function(){return d.defaultPlaybackRate},qh:function(w){d.playbackRate=w},xi:function(w){d.currentTime+=w}});Qq(a,d,!0);d.textTracks&&(Dq(a),f=function(){var w=Yq(a).find(function(x){return"disabled"!==x.mode});w&&(w.mode="showing")},g=function(){var w=
Yq(a).find(function(x){return"disabled"!==x.mode});w&&(w.mode="hidden")},a.l.o(d,"enterpictureinpicture",function(){return f()}),a.l.o(d,"leavepictureinpicture",function(){return g()}),d.remote?(a.l.o(d.remote,"connect",function(){return g()}),a.l.o(d.remote,"connecting",function(){return g()}),a.l.o(d.remote,"disconnect",function(){return g()})):"webkitCurrentPlaybackTargetIsWireless"in d&&a.l.o(d,"webkitcurrentplaybacktargetiswirelesschanged",function(){return g()}),h=d,h.webkitSupportsFullscreen&&
a.l.o(h,"webkitpresentationmodechanged",function(){"inline"!=h.webkitPresentationMode?f():g()}));Fq(a,d,b);k=hp(a.M,a.T,c);!k.includes("#t=")&&(0<a.g.playRangeStart||isFinite(a.g.playRangeEnd))&&(k+="#t=",0<a.g.playRangeStart&&(k+=a.g.playRangeStart),isFinite(a.g.playRangeEnd)&&(k+=","+a.g.playRangeEnd));if(!a.K){v.A(2);break}return H(v,a.K.destroy(),3);case 3:a.K=null;case 2:return mk(d),d.src=k,(ic()||kc())&&d.load(),"none"!=d.preload&&!d.autoplay&&Yf(c)&&oc()&&d.load(),a.m=Zq,a.dispatchEvent(dq("streaming")),
l=new kh,Rl(d,HTMLMediaElement.HAVE_METADATA,a.l,function(){a.I.ready();l.resolve()}),m=function(){return new Promise(function(w){var x=new bc(w);a.l.o(d.textTracks,"change",function(){return x.$(.5)});x.$(.5)})},Rl(d,HTMLMediaElement.HAVE_CURRENT_DATA,a.l,function(){var w,x,z,B,C;return Q(function(E){if(1==E.g)return H(E,m(),2);if(e)return E.return();$q(a);w=Yq(a);w.some(function(D){return"showing"===D.mode})&&(a.va=!0,a.C.setTextVisibility(!0));w.length&&(a.C.enableTextDisplayer?a.C.enableTextDisplayer():
Fd("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!'));x=!1;z=t(w);for(B=z.next();!B.done;B=z.next())C=B.value,"disabled"!==C.mode&&(x?(C.mode="disabled",db("Found more than one enabled text track, disabling it",C)):(ar(a,C),x=!0));br(a);I(E)})}),d.error?l.reject(kq(a)):"none"==d.preload&&(db('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.'),
l.resolve()),a.l.ra(d,"error",function(){l.reject(kq(a))}),H(v,lg(a.g.streaming.loadTimeout,l),4);case 4:if((n=a.V())&&(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled||a.g.streaming.liveSync.panicMode)||a.g.streaming.vodDynamicPlaybackRate)p=function(){return Vq(a)},a.l.o(d,"timeupdate",p);n||(r=function(){return Wq(a)},a.l.o(d,"timeupdate",r),Wq(a));a.u&&(a.u.onManifestUpdated(n),n&&(u=a.ya().end,a.l.o(d,"progress",function(){var w=a.ya().end;u!=w&&(a.u.onManifestUpdated(a.V()),u=w)})));
a.Z=!0;I(v)}})}function $q(a){var b=a.g.preferredAudioLanguage;""!=b&&a.Ki(b,a.g.preferredVariantRole)}function br(a){var b=a.g.preferredTextLanguage;""!=b&&a.jh(b,a.g.preferredTextRole,a.g.preferForcedSubs)}
function Jq(a,b){if("metadata"==b.kind){b.mode="hidden";a.l.o(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,yq(a,e.startTime,e.endTime,e.type,e.value),a.u)a.u.onCueMetadataChange(e.value);if(b.cues){d=[];e=t(b.cues);for(var f=e.next(),g={};!f.done;g={xc:void 0},f=e.next())g.xc=f.value,"com.apple.quicktime.HLS"==g.xc.type&&null!=g.xc.startTime&&(f=d.find(function(h){return function(k){return k.startTime==h.xc.startTime&&k.endTime==h.xc.endTime}}(g)),
f||(f={startTime:g.xc.startTime,endTime:g.xc.endTime,values:[]},d.push(f)),f.values.push(g.xc.value));d=t(d);for(e=d.next();!e.done;e=d.next())e=e.value,e.values.some(function(h){return"X-ASSET-URI"==h.key||"X-ASSET-LIST"==h.key})&&a.u&&(e.values.push({key:"CUE",description:"",data:0!=e.startTime||a.V()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),a.u.onHLSInterstitialMetadata(a,a.h,e))}});var c=(new bc(function(){var d=cr(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Ia().$(.5);
a.qe.push(function(){c.stop()})}}function dr(a,b){b=(new Map).set("startTime",b.startTime).set("endTime",b.endTime).set("metadataType",b.schemeIdUri).set("payload",b.payload);a.dispatchEvent(dq("metadata",b))}function yq(a,b,c,d,e){a.Fa&&(b={schemeIdUri:d,startTime:b,endTime:c||Infinity,id:"",payload:e},b.id=JSON.stringify(b),tm(a.Fa,b))}function Kq(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new bc(function(){b.mode="hidden"})).Ia().$(.5);a.qe.push(function(){c.stop()})}}
q.Zk=function(){for(var a=this.ba;a.g;)a.release()};q.md=function(a){return new ai(a)};
function Yp(a,b){function c(e){b()?b().dispatchEvent(e):a.dispatchEvent(e)}function d(e){b()?jo(b(),!0,e):e()}b||(b=function(){return null});return new uh(function(e,f,g,h){var k=b()?b().j:a.s;k&&k.segmentDownloaded(e,f,g,h)},function(e,f,g){f=(new Map).set("headers",e).set("request",f).set("requestType",g);c(dq("downloadheadersreceived",f));d(function(){if(a.oa){var h=a.oa;if(h.h.enabled){var k=e["cmsd-static"];if(k)try{var l=new Map,m=k.split(",");for(k=0;k<m.length;k++){var n=m[k].split("=");l.set(n[0],
Sp(n[1]))}}catch(w){}if(l=e["cmsd-dynamic"]){try{var p=new Map,r=l.split(";");for(l=1;l<r.length;l++){var u=r[l].split("=");p.set(u[0],Sp(u[1]))}var v=p}catch(w){v=null}v&&(h.g=v)}}}})},function(e,f){e=(new Map).set("request",e).set("response",f);c(dq("downloadcompleted",e))},function(e,f,g,h){e=(new Map).set("request",e).set("error",f).set("httpResponseCode",g).set("aborted",h);c(dq("downloadfailed",e))},function(e,f,g){d(function(){var h=a.M,k=g;k=void 0===k?{}:k;if(h.g.enabled)if("HEAD"===f.method)Cp(h,
f);else switch(e){case 0:try{if(h.g.enabled){if(k.type){a:{switch(k.type){case 4:var l=h.l?cp:bp;break a;case 3:case 2:l=h.l?ep:dp;break a;case 5:l="s";break a}l=void 0}h.i=l}Cp(h,f,{ot:lp,su:!h.u})}}catch(N){eb("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",N)}break;case Fh:try{if(h.g.enabled){var m=k.segment;l=0;m&&(l=m.endTime-m.startTime);var n={d:1E3*l,st:h.h.V()?"l":"v"};n.ot=Gp(k);var p=n.ot===Dp||n.ot===jp||n.ot===kp||n.ot===Ip,r=k.stream;if(r){var u=h.h.Xa();if(p&&(n.bl=Kp(h,
r.type),n.ot!==Ip)){var v=Lp(h,r.type);n.dl=u?v/Math.abs(u):v}r.bandwidth&&(n.br=r.bandwidth/1E3);if(r.segmentIndex&&m){var w=r.segmentIndex.$b(m.endTime,!0,0>u);if(w){var x=w.next().value;if(x&&x!=m){if(!fe(m.S(),x.S())){var z=x.S()[0],B=f.uris[0],C=new URL(z),E=new URL(B);if(C.origin!==E.origin)var D=z;else{for(var A=C.pathname.split("/").slice(1),F=E.pathname.split("/").slice(1,-1);A[0]===F[0];)A.shift(),F.shift();for(;F.length;)F.shift(),A.unshift("..");D=A.join("/")}n.nor=D}if((x.hb||x.Pa)&&
(m.hb!=x.hb||m.Pa!=x.Pa)){var G=x.hb+"-";x.Pa&&(G+=x.Pa);n.nrr=G}}}var K=h.h.Xa()||1,L=Lp(h,r.type)||500,J=r.bandwidth;var M=J?J*(m.endTime-m.startTime)/1E3/(L/K/1E3)*h.g.rtpSafetyFactor:NaN;isNaN(M)||(n.rtp=M)}}p&&n.ot!==Ip&&(n.tb=Mp(h,n.ot)/1E3);Cp(h,f,n)}}catch(N){eb("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",N)}break;case 2:case 5:case 6:Cp(h,f,{ot:"k"});break;case 4:Cp(h,f,{ot:"o"})}})},function(e,f,g,h){(e=b()?b().l:a.J)&&e.banLocation&&e.banLocation(h)},function(e,f){if(f.data){f=
f.data.byteLength;var g=b()?b().getStats():a.B;g&&(g.Lc=isNaN(g.Lc)?f:g.Lc+f,0===e&&(g.ri=f))}})}function Oq(a,b){return new am(a.h,a.i,a.g.streaming,b,function(){a.Sa&&lm(a.Sa,!0);a.j&&a.j.ed();a.N&&er(a)},function(c){return a.dispatchEvent(c)})}
function Pq(a,b){var c=a.V()||0<b;b=new xo(a.ke,c);b.addEventListener("enter",function(f){zq(a,"timelineregionenter",f.region)});b.addEventListener("exit",function(f){zq(a,"timelineregionexit",f.region)});b.addEventListener("skip",function(f){var g=f.region;f.seeking||(zq(a,"timelineregionenter",g),zq(a,"timelineregionexit",g))});var d=new xo(a.Fa,c);d.addEventListener("enter",function(f){dr(a,f.region)});c=new xo(a.La,c);c.addEventListener("enter",function(f){f=(new Map).set("detail",f.region.emsg);
a.dispatchEvent(dq("emsg",f))});var e=new km(a.h);e.g.add(b);e.g.add(d);e.g.add(c);a.je&&e.g.add(a.je);return e}function Xq(a,b){b=new xo(a.Fa,0<b);b.addEventListener("enter",function(d){dr(a,d.region)});var c=new km(a.h);c.g.add(b);return c}
function Qq(a,b,c){a.N=new Ti;a.N.g=Vi;fr(a);nq(a);a.Aa=new bc(function(){er(a)});a.g.streaming.rebufferingGoal&&a.Aa.xa(.25);a.l.o(b,"waiting",function(){return er(a)});a.l.o(b,"canplaythrough",function(){return er(a)});a.l.o(b,"playing",function(){return er(a)});a.l.o(b,"seeked",function(){return er(a)});c&&(a.l.o(b,"stalled",function(){return er(a)}),a.l.o(b,"progress",function(){return er(a)}),a.l.o(b,"timeupdate",function(){return er(a)}))}
function fr(a){var b=a.g.streaming.rebufferingGoal;a.N.i.set(Ui,Math.min(.5,b/2)).set(Vi,b)}
function er(a){switch(a.m){case Zq:if(a.isEnded())var b=!0;else{var c=ek(a.h.buffered);b=null!=c&&c>=a.h.duration-1}break;case Hq:a:if(a.isEnded()||Vk(a.K))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.zc();var d=ek(a.h.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=gk(a.h.buffered,a.h.currentTime);c=a.N;var e=b,f=c.i.get(c.g);b=c.g;d=e||d>=f&&0<d?Ui:Vi;c.g=d;(b=b!=d)&&d===Ui&&(c.h=Date.now());b&&nq(a)}function Eq(a,b,c,d){return new Ok(a,b,c,d)}
function Xp(a){return new Yo({getBandwidthEstimate:function(){return a.s?a.s.getBandwidthEstimate():NaN},Yb:function(){return a.Yb()},getCurrentTime:function(){return a.h?a.h.currentTime:0},Xa:function(){return a.Xa()},Fb:function(){return a.Fb()},Mb:function(){return a.Mb()},V:function(){return a.V()},Pe:function(){return a.Pe()}},a.g.cmcd)}
function Nq(a){return new Om(a.i,{sd:function(){return a.I?a.I.De():0},getBandwidthEstimate:function(){return a.s.getBandwidthEstimate()},Xa:function(){return a.Xa()},video:a.h,ka:a.K,pc:a.H,onError:function(b){return lq(a,b)},onEvent:function(b){return a.dispatchEvent(b)},mf:function(b,c,d){var e=b.startTime;b=b.endTime;c=c.type;if(c!=bd){if(a.I){a.I.Ai();var f=jl(a.K,c);!a.V()&&a.h.paused&&!a.h.seeking&&null!=f&&0<f&&a.I.De()<f&&a.I.Sf(f)}er(a)}d=(new Map).set("start",e).set("end",b).set("contentType",
c).set("isMuxed",d);a.dispatchEvent(dq("segmentappended",d))},Qk:function(b,c){(c=c.xd)&&a.je&&om(a.je,c,b)},Oh:function(b,c){var d=a.G;if(d.g.parseInbandPsshEnabled&&!d.H&&["audio","video"].includes(b)){b=new Zh(Nb(c));c=0;for(var e=t(b.data),f=e.next();!f.done;f=e.next())c+=f.value.length;if(0==c)d=Promise.resolve();else{c=new Uint8Array(c);e=0;b=t(b.data);for(f=b.next();!f.done;f=b.next())f=f.value,c.set(f,e),e+=f.length;ti(d,"cenc",c);d=d.m}}else d=Promise.resolve();return d},disableStream:function(b,
c){return a.disableStream(b,c)}})}
q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Dn(a,b));a.streaming&&"forceTransmuxTS"in a.streaming&&(Fd("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmuxTS,delete a.streaming.forceTransmuxTS);a.streaming&&"forceTransmux"in a.streaming&&(Fd("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),a.mediaSource.mediaSource=a.streaming.forceTransmux,delete a.streaming.forceTransmux);
a.streaming&&"useNativeHlsOnSafari"in a.streaming&&(Fd("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead."),a.streaming.preferNativeHls=a.streaming.useNativeHlsOnSafari&&oc(),delete a.streaming.useNativeHlsOnSafari);if(a.streaming&&"boolean"==typeof a.streaming.liveSync){Fd("streaming.liveSync","Please Use streaming.liveSync.enabled instead.");var c=a.streaming.liveSync;a.streaming.liveSync={};a.streaming.liveSync.enabled=
c}if(a.streaming&&!(a.streaming.liveSync&&"targetLatency"in a.streaming.liveSync)&&("liveSyncMinLatency"in a.streaming||"liveSyncMaxLatency"in a.streaming)){c=a.streaming.liveSyncMinLatency||0;var d=Math.abs((a.streaming.liveSyncMaxLatency||1)-c)/2;a.streaming.liveSync=a.streaming.liveSync||{};a.streaming.liveSync.targetLatency=c+d;a.streaming.liveSync.targetLatencyTolerance=d}a.streaming&&"liveSyncMaxLatency"in a.streaming&&(Fd("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),
delete a.streaming.liveSyncMaxLatency);a.streaming&&"liveSyncMinLatency"in a.streaming&&(Fd("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete a.streaming.liveSyncMinLatency);a.streaming&&"liveSyncTargetLatency"in a.streaming&&(Fd("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatency=
a.streaming.liveSyncTargetLatency,delete a.streaming.liveSyncTargetLatency);a.streaming&&"liveSyncTargetLatencyTolerance"in a.streaming&&(Fd("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.targetLatencyTolerance=a.streaming.liveSyncTargetLatencyTolerance,delete a.streaming.liveSyncTargetLatencyTolerance);a.streaming&&"liveSyncPlaybackRate"in a.streaming&&(Fd("streaming.liveSyncPlaybackRate",
"Please Use streaming.liveSync.maxPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.maxPlaybackRate=a.streaming.liveSyncPlaybackRate,delete a.streaming.liveSyncPlaybackRate);a.streaming&&"liveSyncMinPlaybackRate"in a.streaming&&(Fd("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.minPlaybackRate=a.streaming.liveSyncMinPlaybackRate,delete a.streaming.liveSyncMinPlaybackRate);
a.streaming&&"liveSyncPanicMode"in a.streaming&&(Fd("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicMode=a.streaming.liveSyncPanicMode,delete a.streaming.liveSyncPanicMode);a.streaming&&"liveSyncPanicThreshold"in a.streaming&&(Fd("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),a.streaming.liveSync=a.streaming.liveSync||{},a.streaming.liveSync.panicThreshold=
a.streaming.liveSyncPanicThreshold,delete a.streaming.liveSyncPanicThreshold);if(a.mediaSource&&"sourceBufferExtraFeatures"in a.mediaSource){Fd("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var e=a.mediaSource.sourceBufferExtraFeatures;a.mediaSource.addExtraFeaturesToSourceBuffer=function(){return e};delete a.mediaSource.sourceBufferExtraFeatures}a.manifest&&a.manifest.hls&&"useSafariBehaviorForLive"in a.manifest.hls&&(Fd("manifest.hls.useSafariBehaviorForLive configuration",
"Please Use liveSync config to keep on live Edge instead."),delete a.manifest.hls.useSafariBehaviorForLive);a.streaming&&"parsePrftBox"in a.streaming&&(Fd("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete a.streaming.parsePrftBox);a.manifest&&a.manifest.dash&&"enableAudioGroups"in a.manifest.dash&&(Fd("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete a.manifest.dash.enableAudioGroups);a.streaming&&
"dispatchAllEmsgBoxes"in a.streaming&&(Fd("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),a.mediaSource.dispatchAllEmsgBoxes=a.streaming.dispatchAllEmsgBoxes,delete a.streaming.dispatchAllEmsgBoxes);a.streaming&&"autoLowLatencyMode"in a.streaming&&(Fd("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),a.streaming.lowLatencyMode=a.streaming.autoLowLatencyMode,delete a.streaming.autoLowLatencyMode);a.manifest&&
a.manifest.dash&&"ignoreSupplementalCodecs"in a.manifest.dash&&(Fd("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=a.manifest.dash.ignoreSupplementalCodecs,delete a.manifest.dash.ignoreSupplementalCodecs);a.manifest&&a.manifest.hls&&"ignoreSupplementalCodecs"in a.manifest.hls&&(Fd("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),a.manifest.ignoreSupplementalCodecs=
a.manifest.hls.ignoreSupplementalCodecs,delete a.manifest.hls.ignoreSupplementalCodecs);a.manifest&&a.manifest.dash&&"updatePeriod"in a.manifest.dash&&(Fd("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=a.manifest.dash.updatePeriod,delete a.manifest.dash.updatePeriod);a.manifest&&a.manifest.hls&&"updatePeriod"in a.manifest.hls&&(Fd("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),a.manifest.updatePeriod=
a.manifest.hls.updatePeriod,delete a.manifest.hls.updatePeriod);a.manifest&&a.manifest.dash&&"ignoreDrmInfo"in a.manifest.dash&&(Fd("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),a.manifest.ignoreDrmInfo=a.manifest.dash.ignoreDrmInfo,delete a.manifest.dash.ignoreDrmInfo);if(a.drm&&a.drm.advanced){c=!1;for(var f in a.drm.advanced){var g=a.drm.advanced[f];d=g.videoRobustness;g=g.audioRobustness;"videoRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].videoRobustness)&&
(a.drm.advanced[f].videoRobustness=[d],c=!0);"audioRobustness"in a.drm.advanced[f]&&!Array.isArray(a.drm.advanced[f].audioRobustness)&&(a.drm.advanced[f].audioRobustness=[g],c=!0)}c&&Fd("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}a.streaming&&"crossBoundaryStrategy"in a.streaming&&"keep"!=a.streaming.crossBoundaryStrategy&&(a.streaming.inaccurateManifestTolerance=0);f=
ao(this.g,a,Wp(this));gr(this);return f};q.xj=function(a){this.Uf=a};
function gr(a){a.Of=new Wi(a.g,a.qa,a.G);if(a.J){var b=ne(a.g.manifest);a.h&&"AUDIO"===a.h.nodeName&&(b.disableVideo=!0);a.J.configure(b)}a.G&&a.G.configure(a.g.drm);if(a.j){a.j.configure(a.g.streaming);try{a.m!=eq&&Yi(a.Of,a.i)&&Bq(a)}catch(e){lq(a,e)}a.s&&Cq(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||aq(a)}a.H&&(a.H.oh(a.g.streaming.forceHTTP),a.H.ph(a.g.streaming.forceHTTPS),a.H.s=a.g.streaming.minBytesForProgressEvents);a.K&&(a.K.configure(a.g.mediaSource),a.K.Na=a.g.manifest.segmentRelativeVttTiming);
if(a.C)if(b=a.g.textDisplayFactory,a.Ae!=b){var c=a.C;a.C=b();a.C.configure?a.C.configure(a.g.textDisplayer):Fd("Text displayer w/ configure",'Text displayer should have a "configure" method!');a.C.setTextLanguage||Fd("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!');a.C.setTextVisibility(c.isTextVisible());c.destroy();if(a.K){c=a.K;var d=a.C;c.ba=d;c.h&&(c.h.j=d)}a.Ae=b;a.j&&(b=a.j,(c=b.i.get(bd))&&an(b,c.stream,!0,0,!0))}else a.C.configure&&a.C.configure(a.g.textDisplayer);
a.s&&(a.s.configure(a.g.abr),a.g.abr.enabled?a.s.enable():a.s.disable(),Uq(a));a.N&&fr(a);a.Aa&&(a.g.streaming.rebufferingGoal?a.Aa.xa(.25):a.Aa.stop());a.i&&Lq(a.i.presentationTimeline,a.g.playRangeStart,a.g.playRangeEnd);a.u&&a.u.configure(a.g.ads);a.M&&a.M.configure(a.g.cmcd);a.oa&&a.oa.configure(a.g.cmsd)}q.getConfiguration=function(){var a=Wp(this);ao(a,this.g,Wp(this));return a};q.Hj=function(){return this.Uf};q.ei=function(){var a=Wp(this);ao(a,this.g,Wp(this));return Fn(this.g,Wp(this))};
q.ai=function(){if(this.h){var a=this.h.buffered.length;a=a?this.h.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.h.currentTime+b,this.ya().end);if(a>=b)return 1;if(!(a<=this.h.currentTime)&&a<b)return(a-this.h.currentTime)/(b-this.h.currentTime)}return 0};q.fl=function(){for(var a in this.g)delete this.g[a];ao(this.g,Wp(this),Wp(this));gr(this)};q.Rj=function(){return this.m};q.Ig=function(){return this.i?this.i.type:null};q.Yj=function(){return this.h};
q.Fb=function(){return this.H};q.rd=function(){return this.T};q.Ne=function(){return this.u?this.u:null};q.V=function(){return this.i&&!this.gb()?this.i.presentationTimeline.V():this.h&&this.h.src?Infinity==this.h.duration:!1};q.Wc=function(){return this.i?this.i.presentationTimeline.Wc():!1};q.Vc=function(){if(this.i&&!this.gb()){var a=this.i.variants;return a.length?!a[0].video:!1}return this.h&&this.h.src?this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight:!1};
q.ya=function(){if(this.i&&!this.gb()){if(!this.Z&&"HLS"==this.i.type)return{start:0,end:0};var a=this.i.presentationTimeline;return{start:a.ac(),end:a.Gb()}}if(this.h&&this.h.src&&(a=this.h.seekable)&&a.length){var b=this.g?this.g.playRangeStart:0;b=Math.max(a.start(0),b);var c=this.g?this.g.playRangeEnd:Infinity;a=Math.min(a.end(a.length-1),c);return{start:b,end:a}}return{start:0,end:0}};q.tk=function(){this.V()&&(this.h.currentTime=this.ya().end)};q.zk=function(){return this.Z};
q.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};q.drmInfo=function(){return this.G?this.G.h:null};q.Sd=function(){return this.G?this.G.Sd():Infinity};q.Dg=function(){return this.G?this.G.Dg():[]};q.Oe=function(){return this.G?this.G.Oe():{}};q.Ve=function(){return this.N?this.N.g==Vi:!1};q.Xa=function(){return this.h?this.L?this.L.i:1:0};
q.Jc=function(a,b){b=void 0===b?!0:b;0==a?db("A trick play rate of 0 is unsupported!"):(this.L.set(a),this.m==Hq&&(this.s.playbackRateChanged(a),$m(this.j,b&&1<Math.abs(a))),Iq(this,a))};q.ld=function(){var a=this.L.Rc();this.m==Zq&&this.L.set(a);this.m==Hq&&(this.L.set(a),this.s.playbackRateChanged(a),$m(this.j,!1));this.Za.ab()};
q.Mb=function(){if(this.i&&!this.gb()){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,Xg(e)){var f=Og(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(g){return Wg(g)}):[]};
q.jc=function(){if(this.i&&!this.gb()){for(var a=this.j?this.j.u:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=Pg(d);e.active=d==a;b.push(e)}return b}return this.h&&this.h.src&&this.h.textTracks?Yq(this).map(function(f){return Ug(f)}):[]};q.Gg=function(){var a=this.ye;this.i&&(a=this.i.imageStreams);return a.map(function(b){return Qg(b)})};
q.Aj=function(a){var b=this,c,d;return Q(function(e){if(1==e.g)return H(e,hr(b,a),2);c=e.h;if(!c)return e.return(null);d=[];c.segmentIndex.Xb(function(f){var g=ir(f.tilesLayout||c.tilesLayout);if(g){g=g.rows*g.Nc;for(var h=f.j-f.startTime,k=0;k<g;k++){var l=jr(c,f.startTime+h*k/g);l&&d.push(l)}}});c.closeSegmentIndex&&c.closeSegmentIndex();return e.return(d)})};function ir(a){return a?(a=/(\d+)x(\d+)/.exec(a))?{Nc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}
q.ii=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?H(e,hr(c,a),2):(d=e.h)?e.return(jr(d,b)):e.return(null)})};function hr(a,b){var c,d;return Q(function(e){if(1==e.g){if(a.m!=Hq&&a.m!=Zq)return e.return(null);c=a.ye;a.i&&(c=a.i.imageStreams);d=c[0];if(!d)return e.return(null);null!=b&&(d=c.find(function(f){return f.id==b}));return d?d.segmentIndex?e.A(2):H(e,d.createSegmentIndex(),2):e.return(null)}return e.return(d)})}
function jr(a,b){var c=a.segmentIndex.find(b);if(null==c)return null;c=a.segmentIndex.get(c);var d=ir(c.tilesLayout||a.tilesLayout);if(!d)return null;var e=a.width||0,f=a.height||0,g=e/d.Nc,h=f/d.rows,k=d.Nc*d.rows,l=c.j-c.startTime;l=c.C||l/k;var m=c.startTime,n=0,p=0;1<k&&(b=Math.floor((b-c.startTime)/l),m=c.startTime+b*l,n=b%d.Nc*g,p=Math.floor(b/d.Nc)*h);b=!1;if(d=c.thumbnailSprite)b=!0,h=d.height,n=d.positionX,p=d.positionY,g=d.width;return{segment:c,imageHeight:f,imageWidth:e,height:h,positionX:n,
positionY:p,startTime:m,duration:l,uris:c.S(),width:g,sprite:b,mimeType:c.mimeType||a.mimeType,codecs:c.codecs||a.codecs}}
q.kh=function(a){function b(){var d=c.i.textStreams.find(function(e){return e.id==a.id});d&&d!=c.j.u&&(go(c.B.h,d,!1),cn(c.j,d),kr(c),Tq(c),c.qc=d.language)}var c=this;if(this.i&&this.I&&(b(),!this.gb()))return;(function(){if(c.h&&c.h.textTracks){var d=Yq(c),e=d.find(function(f){return"disabled"!==f.mode});if(d=d.find(function(f){return Sg(f)===a.id}))e!==d&&(e&&(e.mode="disabled",c.l.Ea(e,"cuechange"),c.C.remove(0,Infinity)),d&&ar(c,d)),kr(c),Tq(c)}})()};
function ar(a,b){a.l.o(b,"cuechange",function(){a.C.remove(0,Math.max(0,a.h.currentTime-a.g.streaming.bufferBehind));var c={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},d=[],e=Array.from(b.activeCues||[]);e=t(e);for(var f=e.next();!f.done;f=e.next()){f=f.value;if(Infinity===f.endTime||f.endTime<f.startTime)f=null;else{var g=new af(f.startTime,f.endTime,f.text);g.line="number"===typeof f.line?f.line:null;f.lineAlign&&(g.lineAlign=f.lineAlign);g.lineInterpretation=f.snapToLines?
ff:1;g.position="number"===typeof f.position?f.position:null;f.positionAlign&&(g.positionAlign=f.positionAlign);g.size=f.size;g.textAlign=f.align;"lr"===f.vertical?g.writingMode="vertical-lr":"rl"===f.vertical&&(g.writingMode="vertical-rl");f.region&&(g.region.id=f.region.id,g.region.height=f.region.lines,g.region.heightUnits=2,g.region.regionAnchorX=f.region.regionAnchorX,g.region.regionAnchorY=f.region.regionAnchorY,g.region.scroll=f.region.scroll,g.region.viewportAnchorX=f.region.viewportAnchorX,
g.region.viewportAnchorY=f.region.viewportAnchorY,g.region.viewportAnchorUnits=$d,g.region.width=f.region.width,g.region.widthUnits=$d);of(g);f=g}f&&((g=a.g.mediaSource.modifyCueCallback)&&g(f,null,c),d.push(f))}a.C.append(d)});b.mode=document.pictureInPictureElement?"showing":"hidden"}
q.le=function(a,b,c){function d(){var f=e.i.variants.find(function(h){return h.id==a.id});if(f&&Xg(f)){var g=e.j.l;e.g.abr.enabled&&(g.video!=f.video||g.audio&&f.audio&&g.audio.language==f.audio.language&&g.audio.channelsCount==f.audio.channelsCount&&g.audio.label==f.audio.label)&&db("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack().");e.gb()?Mq(e,f,!1,!1,0):Mq(e,f,!1,b||!1,c||0);e.U.configure({language:f.language,
role:f.audio&&f.audio.roles&&f.audio.roles[0]||"",channelCount:f.audio&&f.audio.channelsCount?f.audio.channelsCount:0,td:f.video&&f.video.hdr?f.video.hdr:"",spatialAudio:f.audio&&f.audio.spatialAudio?f.audio.spatialAudio:!1,videoLayout:f.video&&f.video.videoLayout?f.video.videoLayout:"",kd:f.audio&&f.audio.label?f.audio.label:"",Jd:"",codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:f.audio&&f.audio.codecs?f.audio.codecs:""});Cq(e)}}var e=this;b=void 0===b?!1:b;c=void 0===
c?0:c;if(this.i&&this.I&&(d(),!this.gb()))return;(function(){if(e.h&&e.h.audioTracks){var f=Array.from(e.h.audioTracks);f=t(f);for(var g=f.next();!g.done;g=f.next())if(g=g.value,Sg(g)==a.id){lr(e,g);break}}})()};
q.Li=function(a,b){b=void 0===b?0:b;var c=this.Mb();if(c.length){var d=c.find(function(e){return e.active});d&&(c=c.find(function(e){return e.videoId===d.videoId&&e.language==a.language&&e.label==a.label&&e.audioMimeType==a.mimeType&&e.audioCodec==a.codecs&&e.primary==a.primary&&fe(e.audioRoles,a.roles)&&e.accessibilityPurpose==a.accessibilityPurpose&&e.channelsCount==a.channelsCount&&e.audioSamplingRate==a.audioSamplingRate&&e.spatialAudio==a.spatialAudio}))&&!c.active&&this.le(c,!0,b)}};
q.getAudioTracks=function(){var a=this.Mb();if(!a.length)return[];var b=a.find(function(e){return e.active});if(!b)return[];var c=a;this.m==Hq&&(c=a.filter(function(e){return e.originalVideoId===b.originalVideoId&&e.audioCodec}));if(!c.length)return[];a=new Set;c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,a.add({active:d.active,language:d.language,label:d.label,mimeType:d.audioMimeType,codecs:d.audioCodec,primary:d.primary,roles:d.audioRoles||[],accessibilityPurpose:d.accessibilityPurpose,
channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,originalLanguage:d.originalLanguage});return a.size?Array.from(a):[]};q.Cj=function(){return mr(this.Mb())};q.hk=function(){return mr(this.jc())};q.Bj=function(){return Array.from(nr(this.Mb()))};q.gk=function(){return Array.from(nr(this.jc()))};
q.Ki=function(a,b,c,d,e,f,g){function h(){function l(u,v){return u.video||v.video?u.video&&v.video?Math.abs((u.video.height||0)-(v.video.height||0))+Math.abs((u.video.width||0)-(v.video.width||0)):Infinity:0}k.U=k.g.adaptationSetCriteriaFactory();k.U.configure({language:a,role:b||"",channelCount:c||0,td:"",spatialAudio:f||!1,videoLayout:"",kd:g||"",Jd:"",codecSwitchingStrategy:k.g.mediaSource.codecSwitchingStrategy,audioCodec:e||""});var m=k.j.l,n=k.U.create(k.i.variants),p=null;n=t(n.values());for(var r=
n.next();!r.done;r=n.next())r=r.value,Xg(r)&&(!p||l(p,m)>l(r,m))&&(p=r);p!=m&&(p?(m=Og(p),k.le(m,!0,d||0)):aq(k))}var k=this;c=void 0===c?0:c;d=void 0===d?0:d;e=void 0===e?"":e;f=void 0===f?!1:f;g=void 0===g?"":g;if(this.i&&this.I&&(h(),!this.gb()))return;(function(){if(k.h&&k.h.audioTracks){var l=Zg(k.Mb(),a,b||"",!1)[0];l&&k.le(l)}})()};
q.jh=function(a,b,c){function d(){e.qc=a;e.ue=b||"";e.se=c||!1;var f=Zg(e.i.textStreams,e.qc,e.ue,e.se)[0]||null;f&&f!=e.j.u&&(go(e.B.h,f,!1),e.g.streaming.alwaysStreamText||e.Xc())&&(cn(e.j,f),kr(e),Tq(e))}var e=this;c=void 0===c?!1:c;if(this.i&&this.I&&(d(),!this.gb()))return;(function(){var f=Zg(e.jc(),a,b||"",c||!1)[0];f&&e.kh(f)})()};
q.ol=function(a,b,c){function d(){for(var f=null,g=t(e.i.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.audio.label==a){f=h;break}null!=f&&(e.U=e.g.adaptationSetCriteriaFactory(),e.U.configure({language:f.language,role:"",channelCount:0,td:"",spatialAudio:!1,videoLayout:"",Jd:"",kd:a,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:""}),aq(e,b,c))}var e=this;b=void 0===b?!0:b;c=void 0===c?0:c;if(this.i&&this.I&&(d(),!this.gb()))return;(function(){if(e.h&&e.h.audioTracks){var f=
Array.from(e.h.audioTracks),g=null;f=t(f);for(var h=f.next();!h.done;h=f.next())h=h.value,h.label==a&&(g=h);g&&lr(e,g)}})()};q.Xc=function(){var a=this.va;return this.C?this.C.isTextVisible():a};q.bi=function(){return this.h&&this.h.currentSrc&&this.h.textTracks?or(this).map(function(a){return Ug(a)}):[]};
q.Eg=function(a){if(!this.h||!this.h.currentSrc||!this.h.textTracks)return[];var b=hd(a),c=or(this).filter(function(h){return hd(h.language)==b});if(!c||!c.length)return[];a=[];var d=new Set;c=t(c);for(var e=c.next();!e.done;e=c.next())if((e=e.value)&&e.cues){e=t(e.cues);for(var f=e.next();!f.done;f=e.next()){var g=f.value;(f=g.id)&&""!=f||(f=g.startTime+"-"+g.endTime+"-"+g.text);g={id:f,title:g.text,startTime:g.startTime,endTime:g.endTime};d.has(f)||(a.push(g),d.add(f))}}return a};
function Yq(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function cr(a){return Array.from(a.h.textTracks).filter(function(b){return"metadata"==b.kind})}function or(a){return Array.from(a.h.textTracks).filter(function(b){return"chapters"==b.kind})}
q.Af=function(a){a=!!a;this.va!=a&&(this.va=a,this.m==Hq?(this.C.setTextVisibility(a),this.g.streaming.alwaysStreamText||(a?this.j.u||(a=Zg(this.i.textStreams,this.qc,this.ue,this.se),0<a.length&&(cn(this.j,a[0]),kr(this),Tq(this))):Zm(this.j))):this.h&&this.h.src&&this.h.textTracks&&this.C.setTextVisibility(a),Sq(this))};
q.Zj=function(){if(this.I)var a=this.I.De();else{if(null==this.Y)return new Date;a=this.Y}if(this.i&&!this.gb()){var b=this.i.presentationTimeline;return new Date(1E3*((b.m||b.i)+a))}return this.h&&this.h.getStartDate?(b=this.h.getStartDate(),isNaN(b.getTime())?null:new Date(b.getTime()+1E3*a)):null};q.gi=function(){if(this.i&&!this.gb()){var a=this.i.presentationTimeline;return new Date(1E3*(a.m||a.i))}return this.h&&this.h.getStartDate?(a=this.h.getStartDate(),isNaN(a.getTime())?null:a):null};
q.Re=function(){return this.V()?this.i?this.i.presentationTimeline.Re():null:null};q.Yb=function(){if(this.m==Hq)return this.K.Yb();var a={total:[],audio:[],video:[],text:[]};this.m==Zq&&(a.total=hk(this.h.buffered));return a};q.Pe=function(){if(!this.h||!this.h.currentTime)return null;var a=this.gi().getTime()+1E3*this.h.currentTime;return Math.floor(Date.now()-a)};
q.getStats=function(){if(this.m!=Hq&&this.m!=Zq)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],
stateHistory:[]};Gq(this);var a=this.h,b=a.currentTime/a.duration;if(!isNaN(b)&&!this.V()){var c=this.B;b=Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.I&&(this.B.R=this.I.Gh(),this.B.T=this.I.Hh());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.B;var d=Number(c.totalVideoFrames);b.P=Number(c.droppedVideoFrames);b.N=d;this.B.M=Number(c.corruptedVideoFrames)}this.G?(c=this.G,c=c.J?c.J:NaN):c=NaN;this.B.s=c;if(this.m==Hq){c=this.j.l;b=this.j.u;if(c){d=this.L?this.L.i:1;
var e=d*c.bandwidth;b&&b.bandwidth&&(e+=d*b.bandwidth);this.B.B=e}c&&c.video&&(b=this.B,d=c.video.height||NaN,b.m=c.video.width||NaN,b.l=d);this.V()&&(c=this.Pe()||0,this.B.C=c/1E3);this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(this.B.K=this.i.presentationTimeline.h));c=this.s.getBandwidthEstimate();this.B.u=c}this.m==Zq&&(c=this.B,c.Lc=isNaN(c.Lc)?NaN:c.Lc+NaN,c=this.B,b=a.videoHeight||NaN,c.m=a.videoWidth||NaN,c.l=b);var f=this.B;a=f.m;c=f.l;b=f.B;d=
f.N;e=f.P;var g=f.M,h=f.T,k=f.R,l=f.u,m=f.i,n=f.G,p=f.J,r=f.j,u=co(f.g,"playing"),v=co(f.g,"paused"),w=co(f.g,"buffering"),x=f.s,z=f.C,B=f.K,C=f.ri,E=f.Lc,D=f.L,A=f.I,F=f.H,G=eo(f.g),K=[];f=t(f.h.g);for(var L=f.next();!L.done;L=f.next())L=L.value,K.push({timestamp:L.timestamp,id:L.id,type:L.type,fromAdaptation:L.fromAdaptation,bandwidth:L.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:e,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,
loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:r,playTime:u,pauseTime:v,bufferingTime:w,licenseTime:x,liveLatency:z,maxSegmentDuration:B,manifestSizeBytes:C,bytesDownloaded:E,nonFatalErrorCount:D,manifestPeriodCount:A,manifestGapCount:F,stateHistory:G,switchHistory:K}};
q.nj=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,r,u,v,w,x,z,B,C;return Q(function(E){switch(E.g){case 1:if(h.m!=Hq&&h.m!=Zq)throw new V(1,7,7004);"subtitles"!=c&&"captions"!=c&&db("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){E.A(2);break}return H(E,pr(h,a),3);case 3:d=E.h;case 2:k=[];h.u&&(k=h.u.getCuePoints());if(h.m!=Zq){E.A(4);break}g&&(c="forced");return H(E,qr(h,a,b,c,d,f||"",k),5);case 5:l=hd(b);m=h.jc();if(n=m.find(function(D){return hd(D.language)==
l&&D.label==(f||"")&&D.kind==c}))return Bq(h),E.return(n);throw new V(1,2,2012);case 4:p=dd;r=h.ya();u=r.end-r.start;h.i&&(u=h.i.presentationTimeline.getDuration());if(Infinity==u)throw new V(1,4,4033);if(!k.length){E.A(6);break}return H(E,rr(h,a,h.H,h.g.streaming.retryParameters),7);case 7:v=E.h,w=sr(h,v,d,k),x=new Blob([w],{type:"text/vtt"}),a=Rk(x),d="text/vtt";case 6:z={id:h.Tf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:gm(0,u,[a]),mimeType:d||
"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:p.Ra,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Mf(d||"",e||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};B=Mf(z.mimeType,z.codecs);C=cg(B);if(!C)throw new V(2,2,2014,d);h.i.textStreams.push(z);
Bq(h);return E.return(Pg(z))}})};
q.oj=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C;return Q(function(E){switch(E.g){case 1:if(c.m!=Hq&&c.m!=Zq)throw new V(1,7,7004);if(b){E.A(2);break}return H(E,pr(c,a),3);case 3:b=E.h;case 2:if("text/vtt"!=b)throw new V(1,2,2017,a);d=dd;e=c.ya();f=e.end-e.start;c.i&&(f=c.i.presentationTimeline.getDuration());if(Infinity==f)throw new V(1,4,4045);return H(E,rr(c,a,c.H,c.g.streaming.retryParameters),4);case 4:g=E.h;h=bg(b);if(!h)throw new V(2,2,2014,b);k=h();l={periodStart:0,segmentStart:0,
segmentEnd:f,vttOffset:0};m=Nb(g);n=k.parseMedia(m,l,a,[]);p=[];r=t(n);u=r.next();for(v={};!u.done;v={Lf:void 0,nd:void 0},u=r.next())v.nd=u.value,v.Lf=null,w=function(D){return function(){null==D.Lf&&(D.Lf=Vc([a],[D.nd.payload]));return D.Lf||[]}}(v),x=new Zj(v.nd.startTime,v.nd.endTime,w,0,null,null,0,0,Infinity),v.nd.payload.includes("#xywh")&&(z=v.nd.payload.split("#xywh=")[1].split(","),4===z.length&&x.Cf({height:parseInt(z[3],10),positionX:parseInt(z[0],10),positionY:parseInt(z[1],10),width:parseInt(z[2],
10)})),p.push(x);B=b;if(!p.length){E.A(5);break}return H(E,Co(p[0].S()[0],c.H,c.g.manifest.retryParameters),6);case 6:B=E.h;case 5:return C={id:c.Tf++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new em(p),mimeType:B||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:d.Qf,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Mf(B||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},c.m==Zq?c.ye.push(C):c.i.imageStreams.push(C),Bq(c),E.return(Qg(C))}})};
q.mj=function(a,b,c){var d=this,e,f,g,h;return Q(function(k){switch(k.g){case 1:if(d.m!=Hq&&d.m!=Zq)throw new V(1,7,7004);if(c){k.A(2);break}return H(k,pr(d,a),3);case 3:c=k.h;case 2:return e=[],d.u&&(e=d.u.getCuePoints()),H(k,qr(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.bi();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return H(k,new Promise(function(l,m){d.l.ra(f,"load",l);d.l.ra(f,"error",function(){m(new V(1,2,2015))})}),6);case 6:return Bq(d),k.return(h);case 5:throw new V(1,
2,2012);}})};function pr(a,b){var c;return Q(function(d){switch(d.g){case 1:return va(d,2),H(d,Co(b,a.H,a.g.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:za(d);case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}
function qr(a,b,c,d,e,f,g){var h,k,l,m;return Q(function(n){if(1==n.g)return"text/vtt"!=e||g.length?H(n,rr(a,b,a.H,a.g.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=sr(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Rk(l),e="text/vtt");m=document.createElement("track");var p=a.M,r=b;try{if(p.g.enabled){var u=ip(p);u.ot=Jp;u.su=!0;var v=mp(u);var w=Bp(r,v)}else w=r}catch(x){eb("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",x),w=r}m.src=w;m.label=f;m.kind=d;m.srclang=c;a.h.getAttribute("crossorigin")||
a.h.setAttribute("crossorigin","anonymous");a.h.appendChild(m);return n.return(m)})}function rr(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){e=Fh;f=zh([b],d);f.method="GET";var k=a.M;try{k.g.enabled&&Cp(k,f,{ot:Jp,su:!0})}catch(l){eb("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return H(h,c.request(e,f).promise,2)}g=h.h;return h.return(g.data)})}
function sr(a,b,c,d){var e=bg(c);if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.h.duration,vttOffset:0},b=Nb(b),b=c.parseMedia(b,a,null,[]),Xo(b,d);throw new V(2,2,2014,c);}q.xl=function(a,b){this.qa.width=a;this.qa.height=b};q.gh=function(a){if(this.m==Hq){var b=this.j;a=void 0===a?.1:a;if(b.m.g)b=!1;else if(b.C)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,!d.Vd||d.$a||d.Bb||(d.Vd=!1,Ym(b,d,a));b=!0}}else b=!1;return b};
q.Hg=function(){db("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for.");return this.i};q.Vj=function(){return this.kc};
q.Nj=function(){var a={video:null,audio:null,text:null};if(this.m!=Hq)return a;var b=this.j.l,c=this.h.currentTime;b=t([b.video,b.audio,this.j.u]);for(var d=b.next();!d.done;d=b.next())if((d=d.value)&&d.segmentIndex){var e=d.segmentIndex.find(c);e=d.segmentIndex.get(e);e={codecs:e.codecs||d.codecs,mimeType:e.mimeType||d.mimeType,bandwidth:e.bandwidth||d.bandwidth};"video"==d.type?(e.width=d.width,e.height=d.height,a.video=e):"audio"==d.type?a.audio=e:d.type==bd&&(a.text=e)}return a};
function Wp(a){var b=Wn();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?(d=1,a.g.streaming.lowLatencyMode&&(d=.1)):1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.gh(d))}};b.textDisplayFactory=function(){return!a.Pf||oc()&&!document.fullscreenEnabled?"addTextTrack"in a.h?new Jo(a.h,"Shaka Player TextTrack"):new Mo:new No(a.h,a.Pf)};return b}q.sh=function(a){this.Pf=a};
function xq(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new hm,l=e.closedCaptions.get(g);h={id:a.Tf++,originalId:g,groupId:null,
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:bd,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Mf(h,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};
b.textStreams.push(h);c.add(g)}}
function Rq(a,b){var c,d,e,f,g;return Q(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,n,p;return Q(function(r){if(1==r.g)return k?k.segmentIndex?r.A(2):H(r,k.createSegmentIndex(),2):r.return(null);n=(m=k.segmentIndex.$b(l))?m.next().value:null;if(!n)return r.return(null);p=n.startTime;return r.return(p)})},H(h,e(c,b),2);if(3!=h.g)return f=h.h,H(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h.return(Math.max(g,f)):null!=g?h.return(g):null!=f?h.return(f):h.return(b)})}
function nq(a){var b=a.Ve();if(a.B&&a.N&&a.I){if(0==a.g.streaming.rebufferingGoal){var c=a.L;c.j=!1;jm(c)}else c=a.L,c.j=b,jm(c);a.M&&(c=a.M,b||c.u||(c.u=!0),c.u&&b&&(c.C=!0),c.H=b);Gq(a);c=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;if(a.g.streaming.liveSync.dynamicTargetLatency.enabled&&b&&a.Ce<c){c=a.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var d=a.g.streaming.liveSync.targetLatencyTolerance,e=a.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;a.R&&(a.R=Math.min(a.R+
++a.Ce*e,c-d))}}b=(new Map).set("buffering",b);a.dispatchEvent(dq("buffering",b))}function Iq(a,b){a.Za.ab();a.Za.o(a.h,"timeupdate",function(){var c=a.h.currentTime,d=a.ya(),e=a.V()?a.g.streaming.safeSeekOffset:0;0<b?Math.floor(c)>=Math.floor(d.end)&&a.ld():Math.floor(c)<=Math.floor(d.start+e)&&a.ld()})}
function Gq(a){if(a.B&&a.N){var b=a.B.g,c="playing";a.N.g==Vi?c="buffering":a.isEnded()?c="ended":a.h.paused&&(c="paused");var d=c;if(null==b.g)b.g={timestamp:Date.now()/1E3,state:d,duration:0},b=!0;else{var e=Date.now()/1E3;b.g.duration=e-b.g.timestamp;b.g.state==d?b=!1:(b.h.push(b.g),b.g={timestamp:e,state:d,duration:0},b=!0)}b&&(c=(new Map).set("newstate",c),a.dispatchEvent(dq("statechanged",c)))}}
function Vq(a){var b=a.h.playbackRate,c=a.V();if(a.g.streaming.vodDynamicPlaybackRate&&!c){var d=a.g.streaming.vodDynamicPlaybackRateLowBufferRate,e=a.ai();e<=a.g.streaming.vodDynamicPlaybackRateBufferRatio?b!=d&&a.Jc(d,!1):1==e&&b!==a.L.Rc()&&a.ld()}if(c&&(c=a.ya(),Number.isFinite(c.end)&&!(a.h.currentTime<c.start||a.h.paused))){d=a.g.streaming.liveSync.targetLatencyTolerance;e=a.g.streaming.liveSync.dynamicTargetLatency.enabled;var f=a.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;
if(a.g.streaming.liveSync&&a.g.streaming.liveSync.enabled){var g=a.g.streaming.liveSync.targetLatency;var h=g+d;var k=Math.max(0,g-d);var l=a.g.streaming.liveSync.maxPlaybackRate;var m=a.g.streaming.liveSync.minPlaybackRate}else a.i&&a.i.serviceDescription&&(g=a.i.serviceDescription.targetLatency,null!=a.i.serviceDescription.targetLatency?h=a.i.serviceDescription.targetLatency+d:null!=a.i.serviceDescription.maxLatency&&(h=a.i.serviceDescription.maxLatency),null!=a.i.serviceDescription.targetLatency?
k=Math.max(0,a.i.serviceDescription.targetLatency-d):null!=a.i.serviceDescription.minLatency&&(k=a.i.serviceDescription.minLatency),l=a.i.serviceDescription.maxPlaybackRate||a.g.streaming.liveSync.maxPlaybackRate,m=a.i.serviceDescription.minPlaybackRate||a.g.streaming.liveSync.minPlaybackRate);a.R||"number"!==typeof g||(a.R=g);var n=a.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;e&&a.Ya&&null!==a.R&&"number"===typeof g&&a.Ce<n&&Date.now()-a.Ya>1E3*f&&(f=a.g.streaming.liveSync.dynamicTargetLatency.minLatency,
a.R=Math.max(a.R-(g-f)/2,f+d),a.Ya=Date.now());e&&null!==a.R&&(h=a.R+d,k=a.R-d);g=c.end-a.h.currentTime;d=0;a.m==Zq&&(e=a.h.buffered,0<e.length&&(d=e.end(e.length-1),d=Math.max(l,d-c.end)));c=a.g.streaming.liveSync.panicMode;e=1E3*a.g.streaming.liveSync.panicThreshold;f=Date.now()-a.N.h;c&&!m&&(m=a.g.streaming.liveSync.minPlaybackRate);c&&m&&f<=e?b!=m&&a.Jc(m,!1):void 0!=h&&l&&g-d>h?(b!=l&&a.Jc(l,!1),a.Ya=null):void 0!=k&&m&&g-d<k?(b!=m&&a.Jc(m,!1),a.Ya=null):b!==a.L.Rc()&&(a.ld(),a.Ya=Date.now())}}
function Wq(a){if(a.h){var b=function(e,f){var g=void 0===g?Number.EPSILON:g;if(e===f)g=!0;else{var h=Math.abs(e-f);g=h<=g?!0:g!==Number.EPSILON?Math.abs(h-g)<=Number.EPSILON:!1}return(g||f>e)&&a.Rf<e?(a.Rf=e,!0):!1},c=a.ya();c=c.end-c.start;c=0<c?a.h.currentTime/c:0;if(!isNaN(c)){c*=100;if(b(0,c))var d=dq("started");else b(25,c)?d=dq("firstquartile"):b(50,c)?d=dq("midpoint"):b(75,c)?d=dq("thirdquartile"):(b(100,c)&&(d=dq("complete")),a.g&&Infinity!=a.g.playRangeEnd&&a.isEnded()&&a.h.pause());d&&
a.dispatchEvent(d)}}}function Cq(a){try{aj(a.Of,a.i)}catch(c){return lq(a,c),!1}var b=Yg(a.i.variants);b=a.U.create(b);a.s.setVariants(Array.from(b.values()));return!0}function aq(a,b,c,d,e){b=void 0===b?!0:b;c=void 0===c?0:c;d=void 0===d?!1:d;e=void 0===e?!0:e;var f;(f=Cq(a)?a.s.chooseVariant():null)&&Mq(a,f,e,b,c,d)}
function Mq(a,b,c,d,e,f){f=void 0===f?!1:f;var g=a.j.l;if(b==g)d&&bn(a.j,b,d,e,!0);else{var h=a.B.h;h.h!=b&&(h.h=b,h.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));bn(a.j,b,d,e,f,c);d=null;g&&(d=Og(g));g=Og(b);g.active=!0;if(a.P&&(e=a.P,b=b.video)){b.dependencyStream&&(b=b.dependencyStream);f=0;h=-1;switch(b.mimeType){case "video/webm":f=1;break;case "video/mp4":f=2}switch(a.Ig()){case "DASH":h=1;break;case "HLS":h=0}e.g&&(e.g.setLevelSwitching(b.id,
!0),e.g.setContainerFormat(f),e.j||e.g.setStreamingFormat(h))}c?(c=(new Map).set("oldTrack",d).set("newTrack",g),c=dq("adaptation",c),tr(a,c)):ur(a,d,g);vr(a,d,g)}}function lr(a,b){var c=Array.from(a.h.audioTracks).find(function(d){return d.enabled});b.enabled=!0;c&&(b.id!==c.id&&(c.enabled=!1),c=Wg(c),b=Wg(b),ur(a,c,b),vr(a,c,b))}function Bq(a){var b=dq("trackschanged");tr(a,b);wr(a)}function ur(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=dq("variantchanged",b);tr(a,b)}
function vr(a,b,c){var d=!1;b&&b.audioId==c.audioId&&b.audioGroupId==c.audioGroupId||(d=!0);d&&wr(a)}function wr(a){var b=dq("audiotrackschanged");tr(a,b)}function kr(a){var b=dq("textchanged");tr(a,b)}function Sq(a){var b=dq("texttrackvisibility");tr(a,b)}function Uq(a){a.g.abr.enabled||$p(a);var b=(new Map).set("newStatus",a.g.abr.enabled);tr(a,dq("abrstatuschanged",b))}function Tq(a){var b=a.jc().find(function(c){return c.active});b&&a.C&&a.C.setTextLanguage&&a.C.setTextLanguage(b.language)}
function $p(a,b){b=void 0===b?!0:b;if(a.m==Hq){a.ve.stop();for(var c=t(a.i.variants),d=c.next();!d.done;d=c.next())d.value.disabledUntilTime=0;b&&Cq(a)}}
q.disableStream=function(a,b){if(!this.g.abr.enabled||this.m===eq||!navigator.onLine||0==b||!this.i)return!1;if(this.i.variants.some(function(h){var k=h[a.type];return k&&k.id!==a.id&&!h.disabledUntilTime?"audio"==a.type?a.language===k.language:!0:!1})){for(var c=!1,d=!1,e=t(this.i.variants),f=e.next();!f.done;f=e.next()){f=f.value;var g=f[a.type];g&&(g.id===a.id?(f.disabledUntilTime=Date.now()/1E3+b,c=!0):g.trickModeVideo&&g.trickModeVideo.id==a.id&&(d=!0))}if(!c&&d)return!1;this.ve.xa(1);b=this.Yb().video.reduce(function(h,
k){return h+k.end-k.start},0);aq(this,!1,b,!0,!1);return!0}return!1};
function lq(a,b){var c,d,e,f;return Q(function(g){switch(g.g){case 1:if(a.m==eq)return g.return();1===b.severity&&a.B.L++;c=!0;if(!(a.Z&&a.i&&a.j)||3016!=b.code&&3014!=b.code&&3015!=b.code&&3018!=b.code){g.A(2);break}if(oc()&&3016==b.code)return g.return();va(g,3);return H(g,en(a.j),5);case 5:d=g.h;c=!d;d&&(e=dq("mediasourcerecovered"),a.dispatchEvent(e));xa(g,2);break;case 3:za(g),c=!0;case 2:if(!c)return g.return();2===b.severity&&$p(a,!1);f=dq("error",(new Map).set("detail",b));a.dispatchEvent(f);
f.defaultPrevented&&(b.handled=!0);I(g)}})}
q.addFont=function(a,b){var c,d,e,f,g;return Q(function(h){if(1==h.g)return"fonts"in document&&"FontFace"in window?H(h,document.fonts.ready,3):h.A(0);if(!("entries"in document.fonts))return h.return();c=function(k){k=k.entries();for(var l=[],m=k.next();!1===m.done;)l.push(m.value),m=k.next();return l};d=t(c(document.fonts));for(e=d.next();!e.done;e=d.next())if(f=e.value,f.family==a&&"swap"==f.display)return h.return();g=new FontFace(a,"url("+b+")",{display:"swap"});document.fonts.add(g);I(h)})};
function zq(a,b,c,d){d=void 0===d?a:d;a=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,timescale:c.timescale,eventElement:c.eventElement,eventNode:c.eventNode});d.dispatchEvent(dq(b,a))}
function Aq(a,b,c,d){d=void 0===d?!1:d;b=(new Map).set("mediaQuality",{bandwidth:b.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate,height:b.height,mimeType:b.mimeType,channelsCount:b.channelsCount,pixelAspectRatio:b.pixelAspectRatio,width:b.width,label:b.label,roles:b.roles,language:b.language}).set("position",c);a.dispatchEvent(dq(d?"audiotrackchanged":"mediaqualitychanged",b))}
function kq(a,b){b=void 0===b?!0:b;if(!a.h.error)return b?new V(2,3,3016):null;var c=a.h.error.code;if(!b&&1==c)return null;if(b=a.h.error.msExtendedCode)0>b&&(b+=Math.pow(2,32)),b=b.toString(16);return new V(2,3,3016,c,b,a.h.error.message)}function Lq(a,b,c){0<b&&(a.V()||a.Ui(b));b=a.getDuration();c<b&&(a.V()||a.ub(c))}function tr(a,b){Q(function(c){if(1==c.g)return H(c,Promise.resolve(),2);a.m!=eq&&a.dispatchEvent(b);I(c)})}
function nr(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(hd(c.language)):b.add("und");return b}
function mr(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=hd(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){k=t(k);for(var m=k.next();!m.done;m=k.next()){m=m.value;var n=null;c.has(l)&&c.get(l).has(m)&&(n=c.get(l).get(m));
h.push({language:l,role:m,label:n})}});return h}q.gb=function(){return this.h&&this.h.remote?"disconnected"!=this.h.remote.state:!1};q.isEnded=function(){return!this.h||this.h.ended?!0:this.Z&&!this.V()&&this.h.currentTime>=this.ya().end};S("shaka.Player",Y);Y.prototype.isEnded=Y.prototype.isEnded;Y.prototype.isRemotePlayback=Y.prototype.gb;Y.prototype.addFont=Y.prototype.addFont;Y.prototype.setVideoContainer=Y.prototype.sh;Y.prototype.getFetchedPlaybackInfo=Y.prototype.Nj;
Y.prototype.getManifestParserFactory=Y.prototype.Vj;Y.prototype.getManifest=Y.prototype.Hg;Y.prototype.retryStreaming=Y.prototype.gh;Y.prototype.setMaxHardwareResolution=Y.prototype.xl;Y.prototype.addChaptersTrack=Y.prototype.mj;Y.prototype.addThumbnailsTrack=Y.prototype.oj;Y.prototype.addTextTrackAsync=Y.prototype.nj;Y.prototype.getStats=Y.prototype.getStats;Y.prototype.getBufferedInfo=Y.prototype.Yb;Y.prototype.getSegmentAvailabilityDuration=Y.prototype.Re;
Y.prototype.getPresentationStartTimeAsDate=Y.prototype.gi;Y.prototype.getPlayheadTimeAsDate=Y.prototype.Zj;Y.prototype.setTextTrackVisibility=Y.prototype.Af;Y.prototype.getChapters=Y.prototype.Eg;Y.prototype.getChaptersTracks=Y.prototype.bi;Y.prototype.isTextTrackVisible=Y.prototype.Xc;Y.prototype.selectVariantsByLabel=Y.prototype.ol;Y.prototype.selectTextLanguage=Y.prototype.jh;Y.prototype.selectAudioLanguage=Y.prototype.Ki;Y.prototype.getTextLanguages=Y.prototype.gk;
Y.prototype.getAudioLanguages=Y.prototype.Bj;Y.prototype.getTextLanguagesAndRoles=Y.prototype.hk;Y.prototype.getAudioLanguagesAndRoles=Y.prototype.Cj;Y.prototype.getAudioTracks=Y.prototype.getAudioTracks;Y.prototype.selectAudioTrack=Y.prototype.Li;Y.prototype.selectVariantTrack=Y.prototype.le;Y.prototype.selectTextTrack=Y.prototype.kh;Y.prototype.getThumbnails=Y.prototype.ii;Y.prototype.getAllThumbnails=Y.prototype.Aj;Y.prototype.getImageTracks=Y.prototype.Gg;Y.prototype.getTextTracks=Y.prototype.jc;
Y.prototype.getVariantTracks=Y.prototype.Mb;Y.prototype.cancelTrickPlay=Y.prototype.ld;Y.prototype.trickPlay=Y.prototype.Jc;Y.prototype.getPlaybackRate=Y.prototype.Xa;Y.prototype.isBuffering=Y.prototype.Ve;Y.prototype.getKeyStatuses=Y.prototype.Oe;Y.prototype.getActiveSessionsMetadata=Y.prototype.Dg;Y.prototype.getExpiration=Y.prototype.Sd;Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.isFullyLoaded=Y.prototype.zk;Y.prototype.goToLive=Y.prototype.tk;
Y.prototype.seekRange=Y.prototype.ya;Y.prototype.isAudioOnly=Y.prototype.Vc;Y.prototype.isInProgress=Y.prototype.Wc;Y.prototype.isLive=Y.prototype.V;Y.prototype.getAdManager=Y.prototype.Ne;Y.prototype.getAssetUri=Y.prototype.rd;Y.prototype.getNetworkingEngine=Y.prototype.Fb;Y.prototype.getMediaElement=Y.prototype.Yj;Y.prototype.getManifestType=Y.prototype.Ig;Y.prototype.getLoadMode=Y.prototype.Rj;Y.prototype.resetConfiguration=Y.prototype.fl;Y.prototype.getBufferFullness=Y.prototype.ai;
Y.prototype.getNonDefaultConfiguration=Y.prototype.ei;Y.prototype.getConfigurationForLowLatency=Y.prototype.Hj;Y.prototype.getConfiguration=Y.prototype.getConfiguration;Y.prototype.configurationForLowLatency=Y.prototype.xj;Y.prototype.configure=Y.prototype.configure;Y.prototype.releaseAllMutexes=Y.prototype.Zk;Y.prototype.destroyAllPreloads=Y.prototype.mg;Y.prototype.preload=Y.prototype.preload;Y.prototype.detachAndSavePreload=Y.prototype.Xh;Y.prototype.unloadAndSavePreload=Y.prototype.Bl;
Y.prototype.load=Y.prototype.load;Y.prototype.updateStartTime=Y.prototype.Fl;Y.prototype.unload=Y.prototype.vc;Y.prototype.detach=Y.prototype.detach;Y.prototype.attachCanvas=Y.prototype.Kh;Y.prototype.attach=Y.prototype.Wb;
Y.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:b={};if(!a){h.A(2);break}return H(h,Ni(),3);case 3:b=h.h;case 2:return c=fj(),d=Uk(),H(h,Dc(),4);case 4:return e=h.h,f={manifest:c,media:d,drm:b,hardwareResolution:e},g=gq,g.forEach(function(k,l){f[l]=k()}),h.return(f)}})};Y.isBrowserSupported=hq;Y.setAdManagerFactory=function(a){Zp=a};Y.registerSupportPlugin=fq;Y.prototype.destroy=Y.prototype.destroy;var eq=0,Vp=1,Hq=2,Zq=3;
Y.LoadMode={DESTROYED:eq,NOT_LOADED:Vp,MEDIA_SOURCE:Hq,SRC_EQUALS:Zq};Y.version="v4.14.8";var xr=["4","14"];Gd=new function(a){this.g=a;this.i=Hd;this.h=Id}(new Ed(Number(xr[0]),Number(xr[1])));var gq=new Map,Zp=null;function yr(){this.g=[];this.i=this.m=this.l=this.j=this.h=0}function zr(a){return a.g.length?a.g.reduce(function(b,c){return b+c},0)/a.g.length:0};function Ar(a,b,c){var d=this;this.g=a;this.h=b;this.j=c;this.i=!1;this.l=this.h.getVolume();this.m=new zd;this.m.o(this.h,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.m.o(this.h,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}q=Ar.prototype;q.needsSkipUI=function(){return!1};q.isClientRendering=function(){return!0};q.hasCustomClick=function(){return!0};q.isUsingAnotherMediaElement=function(){return!0};q.getDuration=function(){return this.g.getDuration()};
q.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()};q.getRemainingTime=function(){return this.h.getRemainingTime()};q.isPaused=function(){return this.i};q.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()};q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return this.h.getAdSkippableState()};q.skip=function(){return this.h.skip()};q.pause=function(){return this.h.pause()};
q.play=function(){return this.h.resume()};q.getVolume=function(){return this.h.getVolume()};q.setVolume=function(a){this.j.volume=a;return this.h.setVolume(a)};q.isMuted=function(){return 0==this.h.getVolume()};q.isLinear=function(){return this.g.isLinear()};q.resize=function(a,b){var c=!1,d=this.j;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.h.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};
q.setMuted=function(a){(this.j.muted=a)?(this.l=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.l)};q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()};
q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return this.g.getMediaUrl()};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};
q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.g=null};S("shaka.ads.ClientSideAd",Ar);Ar.prototype.release=Ar.prototype.release;Ar.prototype.getPodIndex=Ar.prototype.getPodIndex;Ar.prototype.getTimeOffset=Ar.prototype.getTimeOffset;Ar.prototype.getMediaUrl=Ar.prototype.getMediaUrl;Ar.prototype.getAdvertiserName=Ar.prototype.getAdvertiserName;Ar.prototype.getCreativeAdId=Ar.prototype.getCreativeAdId;Ar.prototype.getAdId=Ar.prototype.getAdId;
Ar.prototype.getVastMediaWidth=Ar.prototype.getVastMediaWidth;Ar.prototype.getVastMediaHeight=Ar.prototype.getVastMediaHeight;Ar.prototype.getVastMediaBitrate=Ar.prototype.getVastMediaBitrate;Ar.prototype.getDescription=Ar.prototype.getDescription;Ar.prototype.getTitle=Ar.prototype.getTitle;Ar.prototype.getPositionInSequence=Ar.prototype.getPositionInSequence;Ar.prototype.getSequenceLength=Ar.prototype.getSequenceLength;Ar.prototype.setMuted=Ar.prototype.setMuted;Ar.prototype.resize=Ar.prototype.resize;
Ar.prototype.isLinear=Ar.prototype.isLinear;Ar.prototype.isMuted=Ar.prototype.isMuted;Ar.prototype.setVolume=Ar.prototype.setVolume;Ar.prototype.getVolume=Ar.prototype.getVolume;Ar.prototype.play=Ar.prototype.play;Ar.prototype.pause=Ar.prototype.pause;Ar.prototype.skip=Ar.prototype.skip;Ar.prototype.canSkipNow=Ar.prototype.canSkipNow;Ar.prototype.getTimeUntilSkippable=Ar.prototype.getTimeUntilSkippable;Ar.prototype.isSkippable=Ar.prototype.isSkippable;Ar.prototype.isPaused=Ar.prototype.isPaused;
Ar.prototype.getRemainingTime=Ar.prototype.getRemainingTime;Ar.prototype.getMinSuggestedDuration=Ar.prototype.getMinSuggestedDuration;Ar.prototype.getDuration=Ar.prototype.getDuration;Ar.prototype.isUsingAnotherMediaElement=Ar.prototype.isUsingAnotherMediaElement;Ar.prototype.hasCustomClick=Ar.prototype.hasCustomClick;Ar.prototype.isClientRendering=Ar.prototype.isClientRendering;Ar.prototype.needsSkipUI=Ar.prototype.needsSkipUI;function Br(){}
function Cr(a,b){var c=[];a=t(Be(a,"Ad"));for(var d=a.next();!d.done;d=a.next())if(d=Fe(d.value,"InLine"))if(d=Fe(d,"Creatives")){d=t(Be(d,"Creative"));for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=Fe(e,"Linear");f&&Dr(c,b,f);if(e=Fe(e,"NonLinearAds")){e=Be(e,"NonLinear");e=t(e);for(var g=e.next();!g.done;g=e.next())a:{f=c;var h=b,k=g.value,l=Fe(k,"StaticResource");if(l)g=l.attributes.creativeType;else{l=Fe(k,"HTMLResource");if(!l)break a;g="text/html"}if(l=De(l)){"text/html"===g&&(l="data:text/html;charset=UTF-8,"+
encodeURIComponent(l));var m=Ie(k,"width",Oe)||Ie(k,"expandedWidth",Oe),n=Ie(k,"height",Oe)||Ie(k,"expandedHeight",Oe);if(m||n){var p=null;(k=k.attributes.minSuggestedDuration)&&(p=me(k));k=0;null!=h&&(k=h);f.push({id:null,groupId:null,startTime:k,endTime:null,uri:l,mimeType:g,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:p,once:!0,pre:null==h,post:Infinity==h,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:m||0,y:n||0}},displayOnBackground:!1,
currentVideo:null,background:null})}}}}}}return c}
function Dr(a,b,c){var d=0;null!=b&&(d=b);var e=null;c.attributes.skipoffset&&(e=me(c.attributes.skipoffset),isNaN(e)&&(e=null));if(c=Fe(c,"MediaFiles")){var f=Be(c,"MediaFile");c=f;f=f.filter(function(h){return"streaming"==h.attributes.delivery});f.length&&(c=f);c=c.sort(function(h,k){return(parseInt(k.attributes.height,10)||0)-(parseInt(h.attributes.height,10)||0)});c=t(c);for(f=c.next();!f.done;f=c.next())if(f=f.value,!f.attributes.apiFramework){var g=De(f);if(g){a.push({id:null,groupId:null,startTime:d,
endTime:null,uri:g,mimeType:f.attributes.type||null,isSkippable:null!=e,skipOffset:e,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==b,post:Infinity==b,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}S("shaka.ads.Utils",Br);Br.ADS_LOADED="ads-loaded";Br.AD_STARTED="ad-started";Br.AD_FIRST_QUARTILE="ad-first-quartile";Br.AD_MIDPOINT="ad-midpoint";Br.AD_THIRD_QUARTILE="ad-third-quartile";Br.AD_COMPLETE="ad-complete";
Br.AD_STOPPED="ad-stopped";Br.AD_SKIPPED="ad-skipped";Br.AD_VOLUME_CHANGED="ad-volume-changed";Br.AD_MUTED="ad-muted";Br.AD_PAUSED="ad-paused";Br.AD_RESUMED="ad-resumed";Br.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";Br.CUEPOINTS_CHANGED="ad-cue-points-changed";Br.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";Br.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";Br.AD_CLICKED="ad-clicked";Br.AD_PROGRESS="ad-progress";Br.AD_BUFFERING="ad-buffering";Br.AD_IMPRESSION="ad-impression";
Br.AD_DURATION_CHANGED="ad-duration-changed";Br.AD_CLOSED="ad-closed";Br.AD_LOADED="ad-loaded";Br.ALL_ADS_COMPLETED="all-ads-completed";Br.AD_LINEAR_CHANGED="ad-linear-changed";Br.AD_METADATA="ad-metadata";Br.AD_RECOVERABLE_ERROR="ad-recoverable-error";Br.AD_ERROR="ad-error";Br.AD_BREAK_READY="ad-break-ready";Br.AD_INTERACTION="ad-interaction";Br.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";Br.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";Br.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function Er(a,b,c,d,e){var f=this;this.u=a;this.i=b;this.H=!1;this.B=this.s=null;this.I=NaN;this.l=e;this.j=null;this.h=new zd;google.ima.settings.setLocale(c);google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0);this.G=new google.ima.AdDisplayContainer(this.u,this.i);this.G.initialize();this.m=new google.ima.AdsLoader(this.G);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.14.8");this.g=null;this.C=d||new google.ima.AdsRenderingSettings;this.h.o(this.m,
google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(g){Fr(f,g)});this.h.o(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(g){Gr(f,g)});this.h.o(this.i,"ended",function(){f.m.contentComplete()});this.h.ra(this.i,"play",function(){f.H=!0})}Er.prototype.configure=function(a){this.s=a};Er.prototype.stop=function(){this.g&&this.g.stop();this.u&&mk(this.u)};
Er.prototype.release=function(){this.stop();this.B&&this.B.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy();this.G.destroy()};function Gr(a,b){b.getError();b=(new Map).set("originalEvent",b);a.l(new T("ad-error",b));Hr(a,null);a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
function Fr(a,b){a.l(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.I)));if(a.s.customPlayheadTracker){var c={currentTime:a.i.currentTime};a.g=b.getAdsManager(c,a.C);a.i.muted?a.g.setVolume(0):a.g.setVolume(a.i.volume);a.h.o(a.i,"timeupdate",function(){a.i.duration&&(c.currentTime=a.i.currentTime)});a.h.o(a.i,"volumechange",function(){a.j&&(a.j.setVolume(a.i.volume),a.i.muted&&a.j.setMuted(!0))})}else a.g=b.getAdsManager(a.i,a.C);a.l(new T("ima-ad-manager-loaded",(new Map).set("imaAdManager",
a.g)));var d=a.g.getCuePoints();if(d.length){b=[];d=t(d);for(var e=d.next();!e.done;e=d.next())b.push({start:e.value,end:null});a.l(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}Ir(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Jr(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.o(a.i,"loadeddata",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Jr(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window?(a.B=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,
a.i.offsetHeight,Jr(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.B.observe(a.i)):a.h.o(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Jr(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.H||a.s.skipPlayDetection?a.g.start():a.h.ra(a.i,"play",function(){a.H=!0;a.g.start()})}catch(f){Hr(a,null)}}
function Jr(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
function Ir(a){function b(c,d){c=(new Map).set("originalEvent",c);a.l(new T(d,c))}a.h.o(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Gr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Kr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.STARTED,function(c){Kr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.o(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
function(c){b(c,"ad-third-quartile")});a.h.o(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.o(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Hr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Hr(a,c)});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.o(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
a.h.o(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j&&(a.j.i=!0,b(c,"ad-paused"))});a.h.o(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j&&(a.j.i=!1,b(c,"ad-resumed"))});a.h.o(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){a.j&&b(c,"ad-skip-state-changed")});a.h.o(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.o(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});
a.h.o(a.g,google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.o(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.o(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.o(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.o(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.o(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.o(a.g,
google.ima.AdEvent.Type.AD_METADATA,function(c){b(c,"ad-metadata")});a.h.o(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.o(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.o(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}
function Kr(a,b){var c=b.getAd();c?(a.j=new Ar(c,a.g,a.i),b.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||a.s.supportsMultipleMediaElements||a.l(new T("ad-content-pause-requested")),b=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b),a.l(new T("ad-started",b)),a.j.isLinear()&&(a.u.setAttribute("ad-active","true"),a.s.customPlayheadTracker||a.i.pause(),a.i.muted?(b=a.j,b.l=a.i.volume,b.h.setVolume(0)):a.j.setVolume(a.i.volume))):db("The IMA SDK fired a "+b.type+" event with no associated ad. Unable to play ad!")}
function Hr(a,b){b&&b.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!a.s.supportsMultipleMediaElements&&a.l(new T("ad-content-resume-requested"));a.l(new T("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.u.removeAttribute("ad-active"),a.s.customPlayheadTracker||a.i.ended||a.i.play())};function Lr(a,b,c,d,e,f){this.g=a;this.i=b;this.j=(this.h=b.isSkippable)?b.skipOffset||0:b.skipOffset;this.l=b.skipFor;this.B=c;this.s=d;this.m=e;this.u=f;this.C=b.overlay}q=Lr.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!0};q.hasCustomClick=function(){return!1};q.isUsingAnotherMediaElement=function(){return this.u};q.getDuration=function(){var a=this.g.duration;return isNaN(a)?-1:a};q.getMinSuggestedDuration=function(){return this.getDuration()};
q.getRemainingTime=function(){var a=this.g.duration;return isNaN(a)?-1:a-this.g.currentTime};q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h};q.getTimeUntilSkippable=function(){if(this.isSkippable()){var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)}return Math.max(this.getRemainingTime(),0)};q.canSkipNow=function(){return this.h&&0==this.getTimeUntilSkippable()};
q.skip=function(){this.canSkipNow()&&this.B()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return null==this.C};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.s};q.getPositionInSequence=function(){return this.m};q.getTitle=function(){return""};
q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.i.id||""};q.getCreativeAdId=function(){return""};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return this.i.uri};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.g=null};S("shaka.ads.InterstitialAd",Lr);Lr.prototype.release=Lr.prototype.release;
Lr.prototype.getPodIndex=Lr.prototype.getPodIndex;Lr.prototype.getTimeOffset=Lr.prototype.getTimeOffset;Lr.prototype.getMediaUrl=Lr.prototype.getMediaUrl;Lr.prototype.getAdvertiserName=Lr.prototype.getAdvertiserName;Lr.prototype.getCreativeAdId=Lr.prototype.getCreativeAdId;Lr.prototype.getAdId=Lr.prototype.getAdId;Lr.prototype.getVastMediaWidth=Lr.prototype.getVastMediaWidth;Lr.prototype.getVastMediaHeight=Lr.prototype.getVastMediaHeight;Lr.prototype.getVastMediaBitrate=Lr.prototype.getVastMediaBitrate;
Lr.prototype.getDescription=Lr.prototype.getDescription;Lr.prototype.getTitle=Lr.prototype.getTitle;Lr.prototype.getPositionInSequence=Lr.prototype.getPositionInSequence;Lr.prototype.getSequenceLength=Lr.prototype.getSequenceLength;Lr.prototype.setMuted=Lr.prototype.setMuted;Lr.prototype.resize=Lr.prototype.resize;Lr.prototype.isLinear=Lr.prototype.isLinear;Lr.prototype.isMuted=Lr.prototype.isMuted;Lr.prototype.setVolume=Lr.prototype.setVolume;Lr.prototype.getVolume=Lr.prototype.getVolume;
Lr.prototype.play=Lr.prototype.play;Lr.prototype.pause=Lr.prototype.pause;Lr.prototype.skip=Lr.prototype.skip;Lr.prototype.canSkipNow=Lr.prototype.canSkipNow;Lr.prototype.getTimeUntilSkippable=Lr.prototype.getTimeUntilSkippable;Lr.prototype.isSkippable=Lr.prototype.isSkippable;Lr.prototype.isPaused=Lr.prototype.isPaused;Lr.prototype.getRemainingTime=Lr.prototype.getRemainingTime;Lr.prototype.getMinSuggestedDuration=Lr.prototype.getMinSuggestedDuration;Lr.prototype.getDuration=Lr.prototype.getDuration;
Lr.prototype.isUsingAnotherMediaElement=Lr.prototype.isUsingAnotherMediaElement;Lr.prototype.hasCustomClick=Lr.prototype.hasCustomClick;Lr.prototype.isClientRendering=Lr.prototype.isClientRendering;Lr.prototype.needsSkipUI=Lr.prototype.needsSkipUI;function Mr(a,b,c){this.g=a;this.j=b;this.h=c;this.i=null==a.overlay}q=Mr.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!0};q.hasCustomClick=function(){return!1};q.isUsingAnotherMediaElement=function(){return!1};q.getDuration=function(){return-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return-1};q.isPaused=function(){return!1};q.isSkippable=function(){return!1};q.getTimeUntilSkippable=function(){return 0};
q.canSkipNow=function(){return!1};q.skip=function(){};q.pause=function(){};q.play=function(){};q.getVolume=function(){return 1};q.setVolume=function(){};q.isMuted=function(){return!1};q.isLinear=function(){return this.i};q.resize=function(){};q.setMuted=function(){};q.getSequenceLength=function(){return this.j};q.getPositionInSequence=function(){return this.h};q.getTitle=function(){return""};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};
q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.g.id||""};q.getCreativeAdId=function(){return""};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return this.g.uri};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){};S("shaka.ads.InterstitialStaticAd",Mr);Mr.prototype.release=Mr.prototype.release;Mr.prototype.getPodIndex=Mr.prototype.getPodIndex;Mr.prototype.getTimeOffset=Mr.prototype.getTimeOffset;
Mr.prototype.getMediaUrl=Mr.prototype.getMediaUrl;Mr.prototype.getAdvertiserName=Mr.prototype.getAdvertiserName;Mr.prototype.getCreativeAdId=Mr.prototype.getCreativeAdId;Mr.prototype.getAdId=Mr.prototype.getAdId;Mr.prototype.getVastMediaWidth=Mr.prototype.getVastMediaWidth;Mr.prototype.getVastMediaHeight=Mr.prototype.getVastMediaHeight;Mr.prototype.getVastMediaBitrate=Mr.prototype.getVastMediaBitrate;Mr.prototype.getDescription=Mr.prototype.getDescription;Mr.prototype.getTitle=Mr.prototype.getTitle;
Mr.prototype.getPositionInSequence=Mr.prototype.getPositionInSequence;Mr.prototype.getSequenceLength=Mr.prototype.getSequenceLength;Mr.prototype.setMuted=Mr.prototype.setMuted;Mr.prototype.resize=Mr.prototype.resize;Mr.prototype.isLinear=Mr.prototype.isLinear;Mr.prototype.isMuted=Mr.prototype.isMuted;Mr.prototype.setVolume=Mr.prototype.setVolume;Mr.prototype.getVolume=Mr.prototype.getVolume;Mr.prototype.play=Mr.prototype.play;Mr.prototype.pause=Mr.prototype.pause;Mr.prototype.skip=Mr.prototype.skip;
Mr.prototype.canSkipNow=Mr.prototype.canSkipNow;Mr.prototype.getTimeUntilSkippable=Mr.prototype.getTimeUntilSkippable;Mr.prototype.isSkippable=Mr.prototype.isSkippable;Mr.prototype.isPaused=Mr.prototype.isPaused;Mr.prototype.getRemainingTime=Mr.prototype.getRemainingTime;Mr.prototype.getMinSuggestedDuration=Mr.prototype.getMinSuggestedDuration;Mr.prototype.getDuration=Mr.prototype.getDuration;Mr.prototype.isUsingAnotherMediaElement=Mr.prototype.isUsingAnotherMediaElement;
Mr.prototype.hasCustomClick=Mr.prototype.hasCustomClick;Mr.prototype.isClientRendering=Mr.prototype.isClientRendering;Mr.prototype.needsSkipUI=Mr.prototype.needsSkipUI;function Nr(a,b,c,d){var e=this;this.T=null;this.B=a;this.J=b;this.g=c;this.H=null;this.C=!0;this.h=this.g;this.i=d;this.U=new Set;this.I=new Set;this.G=new Map;this.M=new Map;this.j=new Y;Or(this);this.K=new zd;this.l=new zd;this.L=!1;this.ba=this.m=this.u=this.s=null;this.ea=!1;this.P=-1;this.Z=function(){if(!e.L&&e.s&&!e.J.gb()){e.s=e.g.currentTime;e.u&&!e.u.pre&&!e.u.post&&e.s<e.u.startTime&&(e.u=null);var f=Pr(e);f&&Qr(e,f,1,1,Date.now())}};this.Y=function(){if(!(e.L||e.s||e.J.gb())){e.s=e.g.currentTime;
var f=Pr(e,!0);f&&Qr(e,f,1,1,Date.now())}};this.R=new bc(this.Z);this.N=new bc(function(){var f,g,h,k,l,m,n,p,r,u,v;return Q(function(w){switch(w.g){case 1:if(!e.I.size||null==e.s){w.A(0);break}f=e.J.m;if(f==eq||f==Vp)return w.return();g=!1;h=Array.from(e.I);k=e.J.ya();l=t(h);m=l.next();case 3:if(m.done){w.A(5);break}n=m.value;if(n==e.u){w.A(4);break}p=n.endTime||n.startTime;if(!(1<=k.start-p)){r=n.startTime-e.s;0<r&&10>=r&&(!e.G.has(n)&&Rr(n)&&e.G.set(n,e.j.preload(n.uri,null,n.mimeType||void 0)),
Sr(e,n));w.A(4);break}if(!e.G.has(n)){w.A(7);break}return H(w,e.G.get(n),8);case 8:(u=w.h)&&u.destroy(),e.G.delete(n);case 7:Tr(e,n),v=JSON.stringify(n),e.U.has(v)&&e.U.delete(v),e.I.delete(n),Ur(e),n.overlay||(g=!0);case 4:m=l.next();w.A(3);break;case 5:g&&Vr(e),I(w)}})})}q=Nr.prototype;q.configure=function(a){this.T=a;Wr(this)};
function Xr(a){if(!a.ea&&a.I.size){a.K.o(a.g,"playing",a.Y);a.K.o(a.g,"timeupdate",a.Y);a.K.o(a.g,"ended",a.Z);if("requestVideoFrameCallback"in a.g&&!zc()){var b=a.g,c=function(){-1!=a.P&&(a.Z(),-1!=a.P&&(a.P=b.requestVideoFrameCallback(c)))};a.P=b.requestVideoFrameCallback(c)}else a.R.xa(.025);a.N&&a.N.xa(1);a.ea=!0}}
function Ur(a){a.ea&&!a.I.size&&(a.K.Ea(a.g,"playing",a.Y),a.K.Ea(a.g,"timeupdate",a.Y),a.K.Ea(a.g,"ended",a.Z),-1!=a.P&&(a.g.cancelVideoFrameCallback(a.P),a.P=-1),a.R&&a.R.stop(),a.N&&a.N.stop(),a.ea=!1)}
function Wr(a){if(a.B&&a.T&&!a.L){var b=a.T.supportsMultipleMediaElements,c=a.g;c.webkitSupportsFullscreen&&c.webkitDisplayingFullscreen&&(b=!1);a.C==b&&(a.C=!b,a.C?(a.h=a.g,a.H&&(a.H.parentElement&&a.B.removeChild(a.H),a.H=null)):(a.H||(b=document.createElement(a.g.tagName),b.autoplay=!0,b.style.position="absolute",b.style.top="0",b.style.left="0",b.style.width="100%",b.style.height="100%",b.style.display="none",b.setAttribute("playsinline",""),a.H=b),a.h=a.H))}}
q.stop=function(){this.l&&this.l.ab();this.U.clear();this.I.clear();this.j.mg();if(this.G.size){var a=Array.from(this.G.values());a=t(a);for(var b=a.next();!b.done;b=a.next())(b=b.value)&&b.then(function(c){c&&c.destroy()})}this.G.clear();if(this.M.size)for(a=Array.from(this.M.keys()),a=t(a),b=a.next();!b.done;b=a.next())Tr(this,b.value);this.M.clear();this.j.detach();this.L=!1;this.u=this.s=null;this.C=!0;this.h=this.g;this.H=null;Yr(this);Ur(this);this.B&&mk(this.B);this.m&&(this.m.stop(),this.m=
null)};q.release=function(){this.stop();this.K&&this.K.release();this.l&&this.l.release();this.R&&(this.R.stop(),this.R=null);this.N&&(this.N.stop(),this.N=null);this.j.destroy()};q.yc=function(){return this.j};function Zr(a,b){var c;Q(function(d){if(1==d.g)return Or(a),H(d,$r(a,b),2);c=d.h;c.length?as(a,c):db("Unsupported HLS interstitial",b);I(d)})}
function bs(a,b){var c=Fe(b.eventNode,"OverlayEvent"),d=c.attributes.uri,e=c.attributes.mimeType,f="true"==c.attributes.loop,g=Ie(c,"z",Oe);if(d&&0!=g){var h={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920,y:1080}},k=Fe(c,"Viewport"),l=Fe(c,"TopLeft"),m=Fe(c,"Size");if(k&&l&&m){h=Ie(k,"x",Oe);if(null==h)return;k=Ie(k,"y",Oe);if(null==k)return;var n=Ie(l,"x",Oe);if(null==n)return;l=Ie(l,"y",Oe);if(null==l)return;var p=Ie(m,"x",Oe);if(null==p)return;m=Ie(m,"y",Oe);if(null==m)return;h={viewport:{x:h,
y:k},topLeft:{x:n,y:l},size:{x:p,y:m}}}m=Fe(c,"SqueezeCurrent");c=null;m&&(m=Ie(m,"percentage",Re))&&(c={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*m,y:1080*m}});as(a,[{id:b.id,groupId:null,startTime:b.startTime,endTime:b.endTime,uri:d,mimeType:e,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:f,overlay:h,displayOnBackground:-1==g,currentVideo:c,background:null}])}}
q.addAdUrlInterstitial=function(a){var b=this,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return c={type:12},H(n,cs(b,a,c),2);case 2:d=n.h;e=qe(d,"VAST,vmap:VMAP");if(!e)throw new V(2,10,10007);f=[];if("VAST"==e.tagName){f=Cr(e,b.s);n.A(3);break}if("vmap:VMAP"!=e.tagName){n.A(3);break}for(var p=[],r=t(Be(e,"vmap:AdBreak")),u=r.next();!u.done;u=r.next()){var v=u.value,w=v.attributes.timeOffset;w&&(u=null,"start"==w?u=0:"end"==w?u=Infinity:u=me(w),(v=Fe(v,"vmap:AdSource"))&&(v=Fe(v,"vmap:AdTagURI"))&&
(v=Ce(v))&&p.push({time:u,uri:v}))}g=t(p);h=g.next();case 5:if(h.done){n.A(3);break}k=h.value;return H(n,cs(b,k.uri,c),8);case 8:l=n.h;m=qe(l,"VAST");if(!m)throw new V(2,10,10007);f.push.apply(f,y(Cr(m,k.time)));h=g.next();n.A(5);break;case 3:as(b,f),I(n)}})};
function as(a,b){var c,d,e,f,g,h,k,l;Q(function(m){switch(m.g){case 1:c=!1,d=t(b),e=d.next();case 2:if(e.done){m.A(4);break}f=e.value;if(!f.uri){db("Missing URL in interstitial",f);m.A(3);break}if(f.mimeType){m.A(5);break}va(m,6);g=a.j.Fb();return H(m,Co(f.uri,g,a.J.getConfiguration().streaming.retryParameters),8);case 8:f.mimeType=m.h;xa(m,5);break;case 6:za(m);case 5:h=f.id||JSON.stringify(f);if(a.U.has(h)){m.A(3);break}f.loop&&!f.overlay&&db("Loop is only supported in overlay interstitials",f);
f.overlay||(c=!0);a.U.add(h);a.I.add(f);k=!1;f.pre&&null==a.s?k=!0:0!=f.startTime||f.canJump?null!=a.s&&(l=f.startTime-a.s,0<l&&10>=l&&(k=!0)):k=!0;k&&(!a.G.has(f)&&Rr(f)&&a.G.set(f,a.j.preload(f.uri,null,f.mimeType||void 0)),Sr(a,f));case 3:e=d.next();m.A(2);break;case 4:c&&Vr(a),Xr(a),I(m)}})}
function Pr(a,b,c){b=void 0===b?!1:b;c=void 0===c?null:c;var d=0,e=null;if(a.I.size&&null!=a.s){var f=a.g.ended,g=Array.from(a.I).sort(function(m,n){return n.startTime-m.startTime}),h=g;h=b?g.filter(function(m){return m.pre}):f?g.filter(function(m){return m.post}):g.filter(function(m){return!m.pre&&!m.post});g=t(h);for(h=g.next();!h.done;h=g.next()){h=h.value;var k=!1;if(b)k=h.pre;else if(f)k=h.post;else if(!h.pre&&!h.post){var l=a.s-Math.round(1E3*h.startTime)/1E3;0<l&&(1>=l||!h.canJump)&&(k=null==
c&&a.u&&!a.u.pre&&!a.u.post&&a.u.startTime>=h.startTime?!1:!0)}k&&(!a.u||h.startTime>=a.u.startTime)&&(d==(c||0)?e=h:e&&!h.canJump&&.001<Math.round(1E3*h.startTime)/1E3-Math.round(1E3*e.startTime)/1E3&&(e=h,d=0),d++)}}return e}
function Qr(a,b,c,d,e,f){f=void 0===f?0:f;a.u=b;Wr(a);!a.h.parentElement&&a.B&&a.B.appendChild(a.h);1==d&&1==c&&(c=Array.from(a.I).filter(function(g){return b.pre?g.pre==b.pre:b.post?g.post==b.post:.001>Math.abs(g.startTime-b.startTime)}).length);b.once&&(f++,a.I.delete(b),Ur(a),b.overlay||Vr(a));b.mimeType&&(b.mimeType.startsWith("image/")||"text/html"===b.mimeType)?b.overlay?ds(a,b,c,d,f):db("Unsupported interstitial",b):a.C&&b.overlay?db("Unsupported interstitial",b):es(a,b,c,d,e,f)}
function ds(a,b,c,d,e){function f(){a.m&&(a.m.stop(),a.m=null);a.B.removeChild(k);Yr(a,b);a.i(new T("ad-stopped"));var p=Pr(a,b.pre,d-e);p?(a.l.ab(),Qr(a,p,c,++d,Date.now(),e)):a.L=!1}var g=b.overlay,h="text/html"==b.mimeType?"iframe":"img",k=document.createElement(h);k.style.objectFit="contain";k.style.position="absolute";k.style.border="none";fs(a,b);a.i(new T("ad-started",(new Map).set("ad",new Mr(b,c,d))));"iframe"==h?k.src=b.uri:(k.src=b.uri,k.onerror=function(p){a.i(new T("ad-error",(new Map).set("originalEvent",
p)));f()});var l=g.viewport,m=g.topLeft;g=g.size;0==l.x&&0==l.y?(k.width=b.overlay.size.x,k.height=b.overlay.size.y,k.style.bottom="10%",k.style.left="0",k.style.right="0",k.style.width="100%",b.overlay.size.y||"iframe"!=h||(k.style.height="auto")):(k.style.height=g.y/l.y*100+"%",k.style.left=m.x/l.x*100+"%",k.style.top=m.y/l.y*100+"%",k.style.width=g.x/l.x*100+"%");a.B.appendChild(k);var n=Date.now();a.m&&a.m.stop();a.m=new bc(function(){b.playoutLimit&&(Date.now()-n)/1E3>b.playoutLimit?(a.i(new T("ad-complete")),
f()):b.endTime&&a.g.currentTime>b.endTime?(a.i(new T("ad-complete")),f()):a.g.currentTime<b.startTime&&(a.i(new T("ad-skipped")),f())});b.playoutLimit&&!b.endTime?a.m.$(b.playoutLimit):b.endTime&&a.m.xa(.025);a.l.o(a.g,"seeked",function(){var p=a.g.currentTime;if(p<b.startTime||b.endTime&&p>b.endTime)a.m&&a.m.stop(),a.i(new T("ad-skipped")),f()})}
function es(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D;Q(function(A){switch(A.g){case 1:g=Date.now();a.L=!0;if(!a.C||1!=d){A.A(2);break}a.i(new T("ad-content-pause-requested",(new Map).set("saveLivePosition",!0)));h=new kh;k=function(F){return Q(function(G){if(1==G.g)return"detach"!=F.state?G.A(0):zc()?H(G,new Promise(function(K){return(new bc(K)).$(.1)}),3):G.A(3);h.resolve();a.l.Ea(a.J,"onstatechange",k);I(G)})};a.l.o(a.J,"onstatechange",k);return H(A,h,2);case 2:return fs(a,b),a.C||(a.h.style.display=
"",b.overlay?(a.h.loop=b.loop,l=b.overlay.viewport,m=b.overlay.topLeft,n=b.overlay.size,a.h.style.height=n.y/l.y*100+"%",a.h.style.left=m.x/l.x*100+"%",a.h.style.top=m.y/l.y*100+"%",a.h.style.width=n.x/l.x*100+"%"):(a.g.pause(),null!=b.resumeOffset&&0!=b.resumeOffset&&(a.g.currentTime+=b.resumeOffset),a.h.loop=!1,a.h.style.height="100%",a.h.style.left="0",a.h.style.top="0",a.h.style.width="100%")),p=!1,r=function(){if(!a.C&&!b.overlay&&null==b.resumeOffset)if(b.timelineRange&&b.endTime&&Infinity!=
b.endTime)a.g.currentTime!=b.endTime&&(a.g.currentTime=b.endTime);else{var F=Date.now();a.g.currentTime+=(F-e)/1E3;e=F}},u=function(F){var G,K;return Q(function(L){if(1==L.g){r();G=Pr(a,b.pre,d-f);if(F&&b.groupId)for(;G&&G.groupId==b.groupId;)d++,G=Pr(a,b.pre,d-f);a.m&&(!b.groupId||G&&G.groupId!=b.groupId)&&(a.m.stop(),a.m=null);Yr(a,b);if(G&&!G.overlay)return L.A(2);b.post&&(a.s=null,a.u=null);return a.C?H(L,a.j.detach(),4):H(L,a.j.vc(),4)}2!=L.g&&(a.C&&(K=b.resumeOffset,null==K&&(K=b.timelineRange&&
b.endTime&&Infinity!=b.endTime?b.endTime-(a.s||0):(Date.now()-e)/1E3),a.i(new T("ad-content-resume-requested",(new Map).set("offset",K)))),a.i(new T("ad-stopped")),a.l.ab(),a.L=!1,a.C?Vr(a):(a.h.style.display="none",r(),a.g.ended||a.g.play()));Wr(a);G&&(a.i(new T("ad-stopped")),a.l.ab(),Qr(a,G,c,++d,e,f));I(L)})},v=function(F){return Q(function(G){if(p)return G.return();p=!0;a.i(new T("ad-error",(new Map).set("originalEvent",F)));return H(G,u(!1),0)})},w=function(){return Q(function(F){if(1==F.g){if(p)return F.return();
p=!0;return H(F,u(!1),2)}a.i(new T("ad-complete"));I(F)})},a.ba=function(){return Q(function(F){if(p)return F.return();p=!0;a.i(new T("ad-skipped"));return H(F,u(!0),0)})},x=new Lr(a.h,b,a.ba,c,d,!a.C),a.C||(x.setMuted(a.g.muted),x.setVolume(a.g.volume)),a.i(new T("ad-started",(new Map).set("ad",x))),(z=x.canSkipNow())&&a.i(new T("ad-skip-state-changed")),a.l.ra(a.j,"error",v),a.l.o(a.h,"timeupdate",function(){if(a.h.duration){var F=x.canSkipNow();z!=F&&0<x.getRemainingTime()&&0<x.getDuration()&&
a.i(new T("ad-skip-state-changed"));z=F}}),a.l.ra(a.j,"firstquartile",function(){r();a.i(new T("ad-first-quartile"))}),a.l.ra(a.j,"midpoint",function(){r();a.i(new T("ad-midpoint"))}),a.l.ra(a.j,"thirdquartile",function(){r();a.i(new T("ad-third-quartile"))}),a.l.ra(a.j,"complete",w),a.l.o(a.h,"play",function(){a.i(new T("ad-resumed"))}),a.l.o(a.h,"pause",function(){var F=a.j.getConfiguration();a.h.currentTime>=F.playRangeEnd?w():a.i(new T("ad-paused"))}),a.l.o(a.h,"volumechange",function(){a.h.muted?
a.i(new T("ad-muted")):a.i(new T("ad-volume-changed"))}),va(A,4),Or(a),b.startTime&&b.endTime&&Infinity!=b.endTime&&b.startTime!=b.endTime&&(B=b.endTime-b.startTime,0<B&&a.j.configure("playRangeEnd",B)),b.playoutLimit&&!a.m&&(a.m=(new bc(function(){a.ba()})).$(b.playoutLimit),a.j.configure("playRangeEnd",b.playoutLimit)),H(A,a.j.Wb(a.h),6);case 6:return a.G.has(b)?H(A,a.G.get(b),10):H(A,a.j.load(b.uri,null,b.mimeType||void 0),8);case 10:return C=A.h,a.G.delete(b),C?H(A,a.j.load(C),8):H(A,a.j.load(b.uri,
null,b.mimeType||void 0),8);case 8:a.h.play();E=(Date.now()-g)/1E3;a.i(new T("ads-loaded",(new Map).set("loadTime",E)));a.C&&a.g.play();b.overlay&&(a.l.o(a.g,"seeking",function(){var F=a.g.currentTime-b.startTime;.1<Math.abs(F-a.h.currentTime)&&(a.h.currentTime=F)}),a.l.o(a.g,"seeked",function(){var F=a.g.currentTime;(F<b.startTime||b.endTime&&F>b.endTime)&&a.ba()}));xa(A,0);break;case 4:D=za(A);if(!a.L)return A.return();v(D);I(A)}})}
function fs(a,b){b.displayOnBackground&&(a.g.style.zIndex="1");if(null!=b.currentVideo){var c=b.currentVideo;a.g.style.transformOrigin="top left";var d=!0,e=[],f=c.topLeft.x/c.viewport.x*100;0<f&&100>=f&&(e.push("translateX("+f+"%)"),d=!1);f=c.topLeft.y/c.viewport.y*100;0<f&&100>=f&&(e.push("translateY("+f+"%)"),d=!1);f=c.size.x/c.viewport.x;1>f&&e.push("scaleX("+f+")");c=c.size.y/c.viewport.y;1>f&&e.push("scaleY("+c+")");e.length&&(a.g.style.transform=e.join(" "));d&&(a.g.style.transition="transform 250ms")}a.B&&
(a.B.style.pointerEvents="none",b.background&&(a.B.style.background=b.background));a.H&&(a.H.style.background=b.overlay?"":"rgb(0, 0, 0)")}function Yr(a,b){if(!b||b.displayOnBackground)a.g.style.zIndex="";b&&null==b.currentVideo||(a.g.style.transformOrigin="",a.g.style.transition="",a.g.style.transform="");a.B&&(a.B.style.pointerEvents="",!b||b.background)&&(a.B.style.background="");a.H&&(a.H.style.background="")}
function $r(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R,U,ua,ba,Ma,Ra,Aa,qa,Ia,ya,Ea;return Q(function(ra){switch(ra.g){case 1:c=[];if(!b)return ra.return(c);d=b.values.find(function(Ba){return"X-ASSET-URI"==Ba.key});e=b.values.find(function(Ba){return"X-ASSET-LIST"==Ba.key});if(!d&&!e)return ra.return(c);f=null;if(g=b.values.find(function(Ba){return"ID"==Ba.key}))f=g.data;h=null==f?Math.floor(10*b.startTime)/10:b.startTime;(k=b.endTime)&&Infinity!=b.endTime&&"number"==
typeof b.endTime&&(k=null==f?Math.floor(10*b.endTime)/10:b.endTime);l=b.values.find(function(Ba){return"X-RESTRICT"==Ba.key});n=m=!0;l&&l.data&&(p=l.data,m=!p.includes("SKIP"),n=!p.includes("JUMP"));r=m?0:null;if(u=b.values.find(function(Ba){return"X-ENABLE-SKIP-AFTER"==Ba.key}))v=u.data,r=parseFloat(v),isNaN(r)&&(r=m?0:null);w=null;if(x=b.values.find(function(Ba){return"X-ENABLE-SKIP-FOR"==Ba.key}))z=x.data,w=parseFloat(z),isNaN(r)&&(w=null);B=null;if(C=b.values.find(function(Ba){return"X-RESUME-OFFSET"==
Ba.key}))E=C.data,B=parseFloat(E),isNaN(B)&&(B=null);D=null;if(A=b.values.find(function(Ba){return"X-PLAYOUT-LIMIT"==Ba.key}))F=A.data,D=parseFloat(F),isNaN(D)&&(D=null);L=K=G=!1;if(J=b.values.find(function(Ba){return"CUE"==Ba.key}))M=J.data,G=M.includes("ONCE"),K=M.includes("PRE"),L=M.includes("POST");N=!1;(P=b.values.find(function(Ba){return"X-TIMELINE-OCCUPIES"==Ba.key}))?(O=P.data,N=O.includes("RANGE")):!C&&a.J.V()&&(N=!K&&!L);if(d){R=d.data;if(!R)return ra.return(c);c.push({id:f,groupId:null,
startTime:h,endTime:k,uri:R,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:B,playoutLimit:D,once:G,pre:K,post:L,timelineRange:N,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});ra.A(2);break}if(!e){ra.A(2);break}U=e.data;if(!U)return ra.return(c);va(ra,4);ua={type:11};return H(ra,cs(a,U,ua),6);case 6:ba=ra.h;Ma=Gc(ba);Ra=JSON.parse(Ma);if(Aa=Ra["SKIP-CONTROL"])qa=Aa["ENABLE-SKIP-AFTER"],"number"==typeof qa&&(r=parseFloat(qa),isNaN(qa)&&(r=
m?0:null)),Ia=Aa["ENABLE-SKIP-FOR"],"number"==typeof Ia&&(w=parseFloat(Ia),isNaN(Ia)&&(w=null));for(ya=0;ya<Ra.ASSETS.length;ya++)Ea=Ra.ASSETS[ya],Ea.URI&&c.push({id:f+"_shaka_asset_"+ya,groupId:f,startTime:h,endTime:k,uri:Ea.URI,mimeType:null,isSkippable:m,skipOffset:r,skipFor:w,canJump:n,resumeOffset:B,playoutLimit:D,once:G,pre:K,post:L,timelineRange:N,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});xa(ra,2);break;case 4:za(ra);case 2:return ra.return(c)}})}
function Vr(a){for(var b=[],c=t(a.I),d=c.next(),e={};!d.done;e={uc:void 0},d=c.next())d=d.value,d.overlay||(e.uc={start:d.startTime,end:null},d.pre?(e.uc.start=0,e.uc.end=null):d.post?(e.uc.start=-1,e.uc.end=null):d.timelineRange&&(e.uc.end=d.endTime),b.find(function(f){return function(g){return f.uc.start==g.start&&f.uc.end==g.end}}(e))||b.push(e.uc));a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",b)))}
function Or(a){a.j.configure(a.J.ei());a.j.configure("ads.disableHLSInterstitial",!0);a.j.configure("ads.disableDASHInterstitial",!0);a.j.configure("playRangeEnd",Infinity);yh(a.J.Fb(),a.j.Fb())}function cs(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=zh([b],ih()),e=a.J.Fb().request(7,d,c),H(g,e.promise,2);f=g.h;return g.return(f.data)})}function Rr(a){return(a=a.mimeType)?!a.startsWith("image/")&&"text/html"!==a:!0}
function Sr(a,b){if(!(a.M.has(b)||a.T&&!a.T.allowPreloadOnDomElements)){var c=function(f){var g=document.createElement("link");g.rel="preload";g.href=f;g.as="image";document.head.appendChild(g);return g},d=[];if(b.background){var e=b.background.match(/url\(('|")?([^'"()]+)('|")\)?/);e&&d.push(c(e[2]))}b.mimeType.startsWith("image/")&&d.push(c(b.uri));a.M.set(b,d)}}
function Tr(a,b){if(a.M.has(b)){var c=a.M.get(b);c=t(c);for(var d=c.next();!d.done;d=c.next())d=d.value,d.parentNode.removeChild(d);a.M.delete(b)}};function gs(a,b,c,d,e){this.h=a;this.j=me(this.h.skipOffset);this.g=e;this.i=b;this.l=c;this.s=d;this.m=!1}q=gs.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.hasCustomClick=function(){return!1};q.isUsingAnotherMediaElement=function(){return!1};q.getDuration=function(){return this.h.durationInSeconds};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime};
q.isPaused=function(){return this.g.paused};q.isSkippable=function(){return"number"==typeof this.j?!0:!1};q.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var a=this.getRemainingTime()+this.j-this.getDuration();return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.m=!0;this.g.currentTime+=this.getRemainingTime()};q.pause=function(){return this.g.pause()};q.play=function(){return this.g.play()};
q.getVolume=function(){return this.g.volume};q.setVolume=function(a){this.g.volume=a};q.isMuted=function(){return this.g.muted};q.isLinear=function(){return this.s};q.resize=function(){};q.setMuted=function(a){this.g.muted=a};q.getSequenceLength=function(){return this.l?this.l:1};q.getPositionInSequence=function(){return this.i?this.i:1};q.getTitle=function(){return this.h.adTitle};q.getDescription=function(){return""};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return 0};
q.getVastMediaWidth=function(){return 0};q.getAdId=function(){return this.h.adId};q.getCreativeAdId=function(){return this.h.creativeId};q.getAdvertiserName=function(){return""};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){return 0};q.getPodIndex=function(){return 0};q.release=function(){this.l=this.i=this.g=this.h=null};S("shaka.ads.MediaTailorAd",gs);gs.prototype.release=gs.prototype.release;gs.prototype.getPodIndex=gs.prototype.getPodIndex;gs.prototype.getTimeOffset=gs.prototype.getTimeOffset;
gs.prototype.getMediaUrl=gs.prototype.getMediaUrl;gs.prototype.getAdvertiserName=gs.prototype.getAdvertiserName;gs.prototype.getCreativeAdId=gs.prototype.getCreativeAdId;gs.prototype.getAdId=gs.prototype.getAdId;gs.prototype.getVastMediaWidth=gs.prototype.getVastMediaWidth;gs.prototype.getVastMediaHeight=gs.prototype.getVastMediaHeight;gs.prototype.getVastMediaBitrate=gs.prototype.getVastMediaBitrate;gs.prototype.getDescription=gs.prototype.getDescription;gs.prototype.getTitle=gs.prototype.getTitle;
gs.prototype.getPositionInSequence=gs.prototype.getPositionInSequence;gs.prototype.getSequenceLength=gs.prototype.getSequenceLength;gs.prototype.setMuted=gs.prototype.setMuted;gs.prototype.resize=gs.prototype.resize;gs.prototype.isLinear=gs.prototype.isLinear;gs.prototype.isMuted=gs.prototype.isMuted;gs.prototype.setVolume=gs.prototype.setVolume;gs.prototype.getVolume=gs.prototype.getVolume;gs.prototype.play=gs.prototype.play;gs.prototype.pause=gs.prototype.pause;gs.prototype.skip=gs.prototype.skip;
gs.prototype.canSkipNow=gs.prototype.canSkipNow;gs.prototype.getTimeUntilSkippable=gs.prototype.getTimeUntilSkippable;gs.prototype.isSkippable=gs.prototype.isSkippable;gs.prototype.isPaused=gs.prototype.isPaused;gs.prototype.getRemainingTime=gs.prototype.getRemainingTime;gs.prototype.getMinSuggestedDuration=gs.prototype.getMinSuggestedDuration;gs.prototype.getDuration=gs.prototype.getDuration;gs.prototype.isUsingAnotherMediaElement=gs.prototype.isUsingAnotherMediaElement;
gs.prototype.hasCustomClick=gs.prototype.hasCustomClick;gs.prototype.isClientRendering=gs.prototype.isClientRendering;gs.prototype.needsSkipUI=gs.prototype.needsSkipUI;function hs(a,b,c,d){this.C=a;this.L=b;this.h=c;this.l=null;this.R=NaN;this.i=d;this.K=!1;this.B=null;this.j=[];this.N=[];this.M=this.G=this.g=null;this.H=new Map;this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.s=new zd}hs.prototype.stop=function(){for(var a=t(this.m),b=a.next();!b.done;b=a.next())b=b.value,this.s.Ea(b.target,b.type,b.listener);is(this);this.m=[];this.u=[];this.I="";this.P=!0;this.J="";this.B=null;this.j=[];this.N=[];this.H.clear()};
hs.prototype.release=function(){this.stop();this.s&&this.s.release()};hs.prototype.onManifestUpdated=function(a){this.K=a;""!=this.I&&(js(this,this.I,this.P),this.P=!1)};hs.prototype.getCuePoints=function(){for(var a=[],b=t(this.j),c=b.next();!c.done;c=b.next()){c=t(c.value.ads);for(var d=c.next();!d.done;d=c.next())d=d.value,a.push({start:d.startTimeInSeconds,end:d.startTimeInSeconds+d.durationInSeconds})}return a};
function ks(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u;Q(function(v){if(1==v.g)return d={type:7},e=zh([b],ih()),e.method="POST",c&&(f=JSON.stringify(c),e.body=Kc(f)),g=a.L.request(7,e,d),va(v,2),H(v,g.promise,4);if(2!=v.g){h=v.h;k=Gc(h.data);l=JSON.parse(k);if(l.manifestUrl&&l.trackingUrl)m=new tb(b),n=new tb(l.trackingUrl),a.I=m.resolve(n).toString(),p=Date.now()/1E3,r=p-a.R,a.i(new T("ads-loaded",(new Map).set("loadTime",r))),u=new tb(l.manifestUrl),a.l.resolve(m.resolve(u).toString()),a.l=null;else throw Error("Insufficient data from MediaTailor.");
return xa(v,0)}za(v);if(!a.J.length)return a.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),a.l=null,v.return();a.l.resolve(a.J);a.l=null;I(v)})}
function js(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z;Q(function(B){if(1==B.g)return d={type:8},e=zh([b],ih()),f=a.L.request(7,e,d),va(B,2),H(B,f.promise,4);if(2!=B.g){g=B.h;h=[];k=Gc(g.data);l=JSON.parse(k);if(0<l.avails.length){if(JSON.stringify(a.j)!=JSON.stringify(l.avails)){a.j=l.avails;m=t(a.j);for(n=m.next();!n.done;n=m.next())for(p=n.value,r=t(p.nonLinearAdsList),u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v.nonLinearAdList),x=w.next();!x.done;x=w.next())z=x.value,ls(a,z);h=a.getCuePoints();
a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h)))}}else a.j.length&&a.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",h))),is(a),a.j=[];c&&(a.K||0<h.length)&&ms(a);return xa(B,0)}za(B);I(B)})}
function ls(a,b){var c,d,e,f,g,h,k,l,m;Q(function(n){if(1==n.g){if(!b.staticResource)return n.return();c=ns(b);if(d=a.H.get(c))return n.return();e={type:9};f=zh([b.staticResource],ih());g=a.L.request(7,f,e);va(n,2);a.H.set(c,[]);return H(n,g.promise,4)}if(2!=n.g)return h=n.h,k=Gc(h.data),l=JSON.parse(k),m=l.apps,a.H.set(c,m),xa(n,0);za(n);a.H.delete(c);I(n)})}
function ns(a){return[a.adId,a.adParameters,a.adSystem,a.adTitle,a.creativeAdId,a.creativeId,a.creativeSequence,a.height,a.width,a.staticResource].join("")}function ms(a){os(a);a.K||(ps(a),a.s.o(a.h,"seeked",function(){ps(a)}),a.s.o(a.h,"ended",function(){is(a)}));a.s.o(a.h,"timeupdate",function(){os(a)})}
function ps(a){var b=a.h.currentTime;if(0!=b&&null==a.B){for(var c,d,e=t(a.j),f=e.next();!f.done;f=e.next()){f=f.value;for(var g=t(f.ads),h=g.next();!h.done;h=g.next())if(h=h.value,!d)h.startTimeInSeconds<b&&(d=h,c=f);else if(h.startTimeInSeconds<b&&h.startTimeInSeconds>d.startTimeInSeconds+d.durationInSeconds){d=h;c=f;break}}c&&d&&!a.N.includes(d.adId)&&(a.B=b,a.h.currentTime=c.startTimeInSeconds)}}
function os(a){if(a.h.duration&&(a.g||a.j.length)){var b=a.h.currentTime,c=!1;if(a.g){c=!0;var d=a.G,e=d.startTimeInSeconds+.5*d.durationInSeconds,f=d.startTimeInSeconds+.75*d.durationInSeconds;b>=d.startTimeInSeconds+.25*d.durationInSeconds&&!a.u.includes("firstQuartile")?(a.u.push("firstQuartile"),qs(a,"firstQuartile")):b>=e&&!a.u.includes("midpoint")?(a.u.push("midpoint"),qs(a,"midpoint")):b>=f&&!a.u.includes("thirdQuartile")&&(a.u.push("thirdQuartile"),qs(a,"thirdQuartile"));d=a.g.getRemainingTime();
e=a.g.getDuration();a.g.canSkipNow()&&0<d&&0<e&&qs(a,"skipStateChanged");0<e&&(0>=d||d>e)&&is(a)}if(!a.g||!a.g.isLinear()){a:for(d=t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g&&a.g.isLinear())break;for(f=0;f<e.ads.length;f++){var g=e.ads[f],h=g.startTimeInSeconds+g.durationInSeconds;if(g.startTimeInSeconds<=b&&h>b){if(a.N.includes(g.adId)){if(a.h.ended)continue;a.h.currentTime=h;break a}is(a);a.M=e;a.g=new gs(g,f+1,e.ads.length,!0,a.h);a.G=g;0===f&&qs(a,"breakStart");rs(a);break}}}if(!a.g)for(d=
t(a.j),e=d.next();!e.done;e=d.next()){e=e.value;if(a.g)break;for(f=0;f<e.nonLinearAdsList.length;f++)if(g=e.nonLinearAdsList[f],g.nonLinearAdList.length){h=e.startTimeInSeconds;var k=a.H.get(ns(g.nonLinearAdList[0]));if(h<=b&&k&&k.length){is(a);h=a;k=t(k);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.data.source.length){var m=document.createElement("img");m.src=l.data.source[0].url;m.style.top=(l.placeholder.top||0)+"%";m.style.height=100-(l.placeholder.top||0)+"%";m.style.left=(l.placeholder.left||
0)+"%";m.style.maxWidth=100-(l.placeholder.left||0)+"%";m.style.objectFit="contain";m.style.position="absolute";h.C.appendChild(m)}a.M=e;a.g=new gs(g,f+1,e.ads.length,!1,a.h);a.G=g;0===f&&qs(a,"breakStart");rs(a);break}}}c&&!a.g&&(b=a.h.currentTime,a.B&&a.B>b&&(a.h.currentTime=a.B),a.B=null)}}}
function is(a){if(a.g){for(;a.C.lastChild;)a.C.removeChild(a.C.firstChild);a.K||a.N.push(a.G.adId);var b=a.g.m;(void 0===b?0:b)?qs(a,"skip"):qs(a,"complete");b=t(a.m);for(var c=b.next();!c.done;c=b.next())c=c.value,a.s.Ea(c.target,c.type,c.listener);a.m=[];a.u=[];b=a.g.getPositionInSequence();c=a.g.getSequenceLength();b===c&&qs(a,"breakEnd");a.g=null;a.G=null;a.M=null}}
function rs(a){var b=!1;a.h.paused?b=!0:(qs(a,"impression"),qs(a,"start"));a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted&&qs(a,"mute")}});a.m.push({target:a.h,type:"volumechange",listener:function(){a.h.muted||qs(a,"unmute")}});a.m.push({target:a.h,type:"play",listener:function(){b?(qs(a,"impression"),qs(a,"start"),b=!1):qs(a,"resume")}});a.m.push({target:a.h,type:"pause",listener:function(){qs(a,"pause")}});for(var c=t(a.m),d=c.next();!d.done;d=c.next())d=d.value,a.s.o(d.target,
d.type,d.listener)}
function qs(a,b){var c=a.G.trackingEvents.find(function(f){return f.eventType==b});c||(c=a.M.adBreakTrackingEvents.find(function(f){return f.eventType==b}));if(c){var d={type:10};c=t(c.beaconUrls);for(var e=c.next();!e.done;e=c.next())(e=e.value)&&""!=e&&(e=zh([e],ih()),e.method="POST",a.L.request(7,e,d))}switch(b){case "impression":a.i(new T("ad-impression"));break;case "start":a.i(new T("ad-started",(new Map).set("ad",a.g)));break;case "mute":a.i(new T("ad-muted"));break;case "unmute":a.i(new T("ad-volume-changed"));break;
case "resume":a.i(new T("ad-resumed"));break;case "pause":a.i(new T("ad-paused"));break;case "firstQuartile":a.i(new T("ad-first-quartile"));break;case "midpoint":a.i(new T("ad-midpoint"));break;case "thirdQuartile":a.i(new T("ad-third-quartile"));break;case "complete":a.i(new T("ad-complete"));a.i(new T("ad-stopped"));break;case "skip":a.i(new T("ad-skipped"));a.i(new T("ad-stopped"));break;case "breakStart":a.C.setAttribute("ad-active","true");break;case "breakEnd":a.C.removeAttribute("ad-active");
break;case "skipStateChanged":a.i(new T("ad-skip-state-changed"))}};function ss(a,b){this.g=a;this.i=null;this.h=b}q=ss.prototype;q.needsSkipUI=function(){return!0};q.isClientRendering=function(){return!1};q.hasCustomClick=function(){return!0};q.isUsingAnotherMediaElement=function(){return!1};q.getDuration=function(){return this.i?this.i.duration:-1};q.getMinSuggestedDuration=function(){return this.getDuration()};q.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1};q.isPaused=function(){return this.h.paused};q.isSkippable=function(){return this.g.isSkippable()};
q.getTimeUntilSkippable=function(){var a=this.g.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};q.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};q.skip=function(){this.h.currentTime+=this.getRemainingTime()};q.pause=function(){return this.h.pause()};q.play=function(){return this.h.play()};q.getVolume=function(){return this.h.volume};q.setVolume=function(a){this.h.volume=a};q.isMuted=function(){return this.h.muted};q.isLinear=function(){return!0};q.resize=function(){};
q.setMuted=function(a){this.h.muted=a};q.getSequenceLength=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getTotalAds()};q.getPositionInSequence=function(){var a=this.g.getAdPodInfo();return null==a?1:a.getAdPosition()};q.getTitle=function(){return this.g.getTitle()};q.getDescription=function(){return this.g.getDescription()};q.getVastMediaBitrate=function(){return 0};q.getVastMediaHeight=function(){return this.g.getVastMediaHeight()};q.getVastMediaWidth=function(){return this.g.getVastMediaWidth()};
q.getAdId=function(){return this.g.getAdId()};q.getCreativeAdId=function(){return this.g.getCreativeAdId()};q.getAdvertiserName=function(){return this.g.getAdvertiserName()};q.getMediaUrl=function(){return null};q.getTimeOffset=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getTimeOffset()};q.getPodIndex=function(){var a=this.g.getAdPodInfo();return null==a?0:a.getPodIndex()};q.release=function(){this.h=this.i=this.g=null};S("shaka.ads.ServerSideAd",ss);ss.prototype.release=ss.prototype.release;
ss.prototype.getPodIndex=ss.prototype.getPodIndex;ss.prototype.getTimeOffset=ss.prototype.getTimeOffset;ss.prototype.getMediaUrl=ss.prototype.getMediaUrl;ss.prototype.getAdvertiserName=ss.prototype.getAdvertiserName;ss.prototype.getCreativeAdId=ss.prototype.getCreativeAdId;ss.prototype.getAdId=ss.prototype.getAdId;ss.prototype.getVastMediaWidth=ss.prototype.getVastMediaWidth;ss.prototype.getVastMediaHeight=ss.prototype.getVastMediaHeight;ss.prototype.getVastMediaBitrate=ss.prototype.getVastMediaBitrate;
ss.prototype.getDescription=ss.prototype.getDescription;ss.prototype.getTitle=ss.prototype.getTitle;ss.prototype.getPositionInSequence=ss.prototype.getPositionInSequence;ss.prototype.getSequenceLength=ss.prototype.getSequenceLength;ss.prototype.setMuted=ss.prototype.setMuted;ss.prototype.resize=ss.prototype.resize;ss.prototype.isLinear=ss.prototype.isLinear;ss.prototype.isMuted=ss.prototype.isMuted;ss.prototype.setVolume=ss.prototype.setVolume;ss.prototype.getVolume=ss.prototype.getVolume;
ss.prototype.play=ss.prototype.play;ss.prototype.pause=ss.prototype.pause;ss.prototype.skip=ss.prototype.skip;ss.prototype.canSkipNow=ss.prototype.canSkipNow;ss.prototype.getTimeUntilSkippable=ss.prototype.getTimeUntilSkippable;ss.prototype.isSkippable=ss.prototype.isSkippable;ss.prototype.isPaused=ss.prototype.isPaused;ss.prototype.getRemainingTime=ss.prototype.getRemainingTime;ss.prototype.getMinSuggestedDuration=ss.prototype.getMinSuggestedDuration;ss.prototype.getDuration=ss.prototype.getDuration;
ss.prototype.isUsingAnotherMediaElement=ss.prototype.isUsingAnotherMediaElement;ss.prototype.hasCustomClick=ss.prototype.hasCustomClick;ss.prototype.isClientRendering=ss.prototype.isClientRendering;ss.prototype.needsSkipUI=ss.prototype.needsSkipUI;function ts(a,b,c,d){var e=this;this.u=a;this.l=b;this.j=null;this.H=NaN;this.i=d;this.I=!1;this.B=this.m=this.s=null;this.C="";this.G=[];this.h=new zd;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.u,a);this.i(new T("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){us(e,f)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new ss(f,e.l);e.B&&(e.m.i=e.B);e.i(new T("ad-started",(new Map).set("ad",e.m)));e.u.setAttribute("ad-active","true")});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.u.removeAttribute("ad-active");
var f=e.l.currentTime;e.s&&e.s>f&&(e.l.currentTime=e.s,e.s=null)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.B=f.getStreamData().adProgressData;e.m&&(e.m.i=e.B)});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new T("ad-first-quartile"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new T("ad-midpoint"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new T("ad-third-quartile"))});
this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new T("ad-complete"));e.i(new T("ad-stopped"));e.u.removeAttribute("ad-active");e.m=null});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new T("ad-skipped"));e.i(new T("ad-stopped"))});this.h.o(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.G=
f;e.i(new T("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}q=ts.prototype;q.configure=function(){};q.stop=function(){this.C="";this.s=null;this.G=[]};q.release=function(){this.stop();this.h&&this.h.release()};q.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};q.getCuePoints=function(){return this.G};
function us(a,b){a.i(new T("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.H)));b=b.getStreamData().url;a.j.resolve(b);a.j=null;a.I||a.h.o(a.l,"seeked",function(){var c=a.l.currentTime;if(0!=c){a.g.streamTimeForContentTime(c);var d=a.g.previousCuePointForStreamTime(c);d&&!d.played&&(a.s=c,a.l.currentTime=d.start)}})};function vs(){mb.call(this);this.h=this.i=this.j=this.g=null;this.m=new yr;this.s=navigator.language;this.l=null}oa(vs,mb);q=vs.prototype;q.setLocale=function(a){this.s=a};q.configure=function(a){this.l=a;this.g&&this.g.configure(this.l);this.j&&this.j.configure(this.l);this.h&&this.h.configure(this.l)};q.initInterstitial=function(a,b,c){var d=this;this.g&&this.g.release();this.g=new Nr(a,b,c,function(e){return ws(d,e)});this.g.configure(this.l)};
q.initClientSide=function(a,b,c){var d=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new V(2,10,1E4);this.j&&this.j.release();this.j=new Er(a,b,this.s,c,function(e){return ws(d,e)});this.j.configure(this.l)};q.release=function(){this.g&&(this.g.release(),this.g=null);this.j&&(this.j.release(),this.j=null);this.i&&(this.i.release(),this.i=null);this.h&&(this.h.release(),this.h=null);mb.prototype.release.call(this)};
q.onAssetUnload=function(){this.g&&this.g.stop();this.j&&this.j.stop();this.i&&this.i.stop();this.h&&this.h.stop();this.dispatchEvent(new T("ad-stopped"));this.dispatchEvent(new T("ad-content-attach-requested"));this.m=new yr};q.requestClientSideAds=function(a){if(!this.j)throw new V(1,10,10001);var b=this.j;b.g&&b.g.destroy();b.m&&b.m.contentComplete();b.I=Date.now()/1E3;b.m.requestAds(a)};
q.updateClientSideAdsRenderingSettings=function(a){if(!this.j)throw new V(1,10,10001);var b=this.j;b.C=a;b.g&&b.g.updateAdsRenderingSettings(b.C)};q.initMediaTailor=function(a,b,c){var d=this;this.i&&this.i.release();this.i=new hs(a,b,c,function(e){return ws(d,e)})};q.requestMediaTailorStream=function(a,b,c){if(!this.i)throw new V(1,10,10005);var d=this.i;c=void 0===c?"":c;d.l?a=Promise.reject(new V(1,10,10004)):(d.l=new kh,ks(d,a,b),d.J=c||"",d.R=Date.now()/1E3,a=d.l);return a};
q.addMediaTailorTrackingUrl=function(a){if(!this.i)throw new V(1,10,10005);var b=this.i;b.I=a;b.i(new T("ads-loaded",(new Map).set("loadTime",0)))};q.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new V(2,10,10002);this.h&&this.h.release();this.h=new ts(a,b,this.s,function(d){return ws(c,d)});this.h.configure(this.l)};
q.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.h)throw new V(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&db('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 overridden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.14.8";c=this.h;c.j?a=Promise.reject(new V(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
(c.I=!0),c.j=new kh,c.g.requestStream(a),c.C=b||"",c.H=Date.now()/1E3,a=c.j);return a};q.replaceServerSideAdTagParameters=function(a){if(!this.h)throw new V(1,10,10003);(a.mpt||a.mpv)&&db('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 overridden.');a.mpt="Shaka Player";a.mpv="v4.14.8";this.h.g.replaceAdTagParameters(a)};
q.getServerSideCuePoints=function(){Fd("AdManager.getServerSideCuePoints","Please use getCuePoints function.");return this.getCuePoints()};q.getCuePoints=function(){var a=[];this.h&&(a=a.concat(this.h.getCuePoints()));this.i&&(a=a.concat(this.i.getCuePoints()));return a};q.getStats=function(){var a=this.m;return{loadTimes:a.g,averageLoadTime:zr(a),started:a.h,overlayAds:a.j,playedCompletely:a.l,skipped:a.m,errors:a.i}};q.onManifestUpdated=function(a){if(this.i)this.i.onManifestUpdated(a)};
q.onDashTimedMetadata=function(a){this.h&&"urn:google:dai:2018"==a.schemeIdUri&&this.h.g.processMetadata(a.schemeIdUri,a.eventNode?a.eventNode.attributes.messageData:null,a.startTime)};q.onHlsTimedMetadata=function(a,b){this.h&&this.h.g.processMetadata("ID3",a.data,b)};q.onCueMetadataChange=function(a){if(this.h)this.h.onCueMetadataChange(a)};q.onHLSInterstitialMetadata=function(a,b,c){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,a,b),this.g&&Zr(this.g,c))};
q.onDASHInterstitialMetadata=function(a,b,c){if(!this.l||!this.l.disableDASHInterstitial){var d=c.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==d||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==d){if(this.g||this.initInterstitial(null,a,b),this.g&&(a=this.g,b="urn:mpeg:dash:event:alternativeMPD:replace:2025"==c.schemeIdUri,d="urn:mpeg:dash:event:alternativeMPD:insert:2025"==c.schemeIdUri,b||d)){for(var e=c.startTime,f=c.endTime,g=null,h=0,k,l=t(c.eventNode.children),m=l.next();!m.done;m=
l.next())if(m=m.value,"AlternativeMPD"==m.tagName){if(m=m.attributes.uri){k=m;break}}else if("InsertPresentation"==m.tagName||"ReplacePresentation"==m.tagName){var n=m.attributes.url;if(n){k=n;(l=Ie(m,"maxDuration",Oe))&&(g=l/c.timescale);(l=Ie(m,"returnOffset",Oe))&&(h=l/c.timescale);b&&h&&(f=e+h);break}}k&&as(a,[{id:c.id,groupId:null,startTime:e,endTime:f,uri:k,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:d?h:null,playoutLimit:g,once:!1,pre:!1,post:!1,timelineRange:b&&
!d,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else("urn:mpeg:dash:event:2012"==d||"urn:scte:dash:scte214-events"==d)&&c.eventNode&&Fe(c.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,a,b),this.g&&bs(this.g,c))}};q.addCustomInterstitial=function(a){if(!this.g)throw new V(1,10,10006);as(this.g,[a])};q.addAdUrlInterstitial=function(a){if(!this.g)throw new V(1,10,10006);return this.g.addAdUrlInterstitial(a)};
q.getInterstitialPlayer=function(){if(!this.g)throw new V(1,10,10006);return this.g.yc()};function ws(a,b){if(b&&b.type)switch(b.type){case "ads-loaded":a.m.g.push(b.loadTime);break;case "ad-started":a.m.h++;var c=b.ad;c&&!c.isLinear()&&a.m.j++;break;case "ad-complete":a.m.l++;break;case "ad-skipped":a.m.m++;break;case "ad-error":a.m.i++}a.dispatchEvent(b)}S("shaka.ads.AdManager",vs);vs.prototype.getInterstitialPlayer=vs.prototype.getInterstitialPlayer;vs.prototype.addAdUrlInterstitial=vs.prototype.addAdUrlInterstitial;
vs.prototype.addCustomInterstitial=vs.prototype.addCustomInterstitial;vs.prototype.onDASHInterstitialMetadata=vs.prototype.onDASHInterstitialMetadata;vs.prototype.onHLSInterstitialMetadata=vs.prototype.onHLSInterstitialMetadata;vs.prototype.onCueMetadataChange=vs.prototype.onCueMetadataChange;vs.prototype.onHlsTimedMetadata=vs.prototype.onHlsTimedMetadata;vs.prototype.onDashTimedMetadata=vs.prototype.onDashTimedMetadata;vs.prototype.onManifestUpdated=vs.prototype.onManifestUpdated;
vs.prototype.getStats=vs.prototype.getStats;vs.prototype.getCuePoints=vs.prototype.getCuePoints;vs.prototype.getServerSideCuePoints=vs.prototype.getServerSideCuePoints;vs.prototype.replaceServerSideAdTagParameters=vs.prototype.replaceServerSideAdTagParameters;vs.prototype.requestServerSideStream=vs.prototype.requestServerSideStream;vs.prototype.initServerSide=vs.prototype.initServerSide;vs.prototype.addMediaTailorTrackingUrl=vs.prototype.addMediaTailorTrackingUrl;
vs.prototype.requestMediaTailorStream=vs.prototype.requestMediaTailorStream;vs.prototype.initMediaTailor=vs.prototype.initMediaTailor;vs.prototype.updateClientSideAdsRenderingSettings=vs.prototype.updateClientSideAdsRenderingSettings;vs.prototype.requestClientSideAds=vs.prototype.requestClientSideAds;vs.prototype.onAssetUnload=vs.prototype.onAssetUnload;vs.prototype.release=vs.prototype.release;vs.prototype.initClientSide=vs.prototype.initClientSide;vs.prototype.initInterstitial=vs.prototype.initInterstitial;
vs.prototype.configure=vs.prototype.configure;vs.prototype.setLocale=vs.prototype.setLocale;vs.ADS_LOADED="ads-loaded";vs.AD_STARTED="ad-started";vs.AD_FIRST_QUARTILE="ad-first-quartile";vs.AD_MIDPOINT="ad-midpoint";vs.AD_THIRD_QUARTILE="ad-third-quartile";vs.AD_COMPLETE="ad-complete";vs.AD_STOPPED="ad-stopped";vs.AD_SKIPPED="ad-skipped";vs.AD_VOLUME_CHANGED="ad-volume-changed";vs.AD_MUTED="ad-muted";vs.AD_PAUSED="ad-paused";vs.AD_RESUMED="ad-resumed";vs.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";
vs.CUEPOINTS_CHANGED="ad-cue-points-changed";vs.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";vs.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";vs.AD_CLICKED="ad-clicked";vs.AD_PROGRESS="ad-progress";vs.AD_BUFFERING="ad-buffering";vs.AD_IMPRESSION="ad-impression";vs.AD_DURATION_CHANGED="ad-duration-changed";vs.AD_CLOSED="ad-closed";vs.AD_LOADED="ad-loaded";vs.ALL_ADS_COMPLETED="all-ads-completed";vs.AD_LINEAR_CHANGED="ad-linear-changed";vs.AD_METADATA="ad-metadata";
vs.AD_RECOVERABLE_ERROR="ad-recoverable-error";vs.AD_ERROR="ad-error";vs.AD_BREAK_READY="ad-break-ready";vs.AD_INTERACTION="ad-interaction";vs.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested";vs.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested";vs.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";Zp=function(){return new vs};function xs(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof T){var d={};for(e in c)(b=c[e])&&"object"==typeof b?"detail"==e&&(d[e]=b):e in Event||(d[e]=b);return d}if(c instanceof Error){var e=new Set(["name","message","stack"]);for(d in c)e.add(d);d=t(Object.getOwnPropertyNames(c));for(b=d.next();!b.done;b=d.next())e.add(b.value);d={};e=t(e);for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=c[b];c={__type__:"Error",contents:d}}else if(c instanceof
TimeRanges){e={__type__:"TimeRanges",length:c.length,start:[],end:[]};c=t(hk(c));for(d=c.next();!d.done;d=c.next())d=d.value,b=d.end,e.start.push(d.start),e.end.push(b);c=e}else c=ArrayBuffer.isView(c)&&1===c.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return c}})}
function ys(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=zs(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){b=c.contents;c=Error(b.message);for(d in b)c[d]=b[d];d=c}else d=c;return d})}
function zs(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
var As="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Bs="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Cs=["loop","playbackRate"],Ds=["pause","play"],Es=(new Map).set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",
4).set("getTextLanguagesAndRoles",4).set("getImageTracks",2).set("getThumbnails",2).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1),Fs=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getTextTracks",2).set("getVariantTracks",2),Gs=(new Map).set("getPlayheadTimeAsDate",
1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),Hs=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],Is=[["isTextTrackVisible","setTextTrackVisibility"]],Js="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure configurationForLowLatency getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
Ks=["attach","attachCanvas","detach","load","unload"];function Ls(a,b,c,d,e,f,g){var h=this;this.I=a;this.L=g;this.l=new bc(b);this.M=c;this.u=!1;this.B=d;this.H=e;this.N=f;this.i=this.m=!1;this.K="";this.s=null;this.C=function(){return Ms(h)};this.G=function(k,l){k=ys(l);switch(k.type){case "event":var m=k.targetName,n=$a(k.event);h.B(m,n);break;case "update":m=k.update;for(n in m){k=h.g[n]||{};for(var p in m[n])k[p]=m[n][p]}h.u&&(h.M(),h.u=!1);break;case "asyncComplete":if(n=k.id,p=k.error,k=h.h.get(n),h.h.delete(n),k)if(p){n=new V(p.severity,p.category,
p.code);for(m in p)n[m]=p[m];k.reject(n)}else k.resolve()}};this.g={video:{},player:{}};this.J=0;this.h=new Map;this.j=null;Ns.add(this)}q=Ls.prototype;q.destroy=function(){Ns.delete(this);Os(this);Ps&&Qs(this);this.l&&(this.l.stop(),this.l=null);this.H=this.B=null;this.i=this.m=!1;this.G=this.C=this.j=this.h=this.g=this.s=null;return Promise.resolve()};q.Va=function(){return this.i};q.rf=function(){return this.K};
q.init=function(){if(this.I.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.l.Ia();var a=new chrome.cast.SessionRequest(this.I,[],null,this.L,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(Ns),d=c.next();!d.done;d=c.next()){d=d.value;var e=b;d.j=new kh;d.u=!0;Rs(d,e)}},function(b){for(var c=t(Ns),d=c.next();!d.done;d=c.next())d=d.value,Ss="available"==b,d.l.Ia()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});Ss&&this.l.$(Ts);(a=Ps)&&
a.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new kh,this.u=!0,Rs(this,a)):Ps=null}else window.__onGCastApiAvailable!==Us&&(Vs=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=Us)};q.lh=function(a){this.s=a;this.i&&Ws(this,{type:"appData",appData:this.s})};
q.cast=function(){var a=this;return Q(function(b){if(!a.m)throw new V(1,8,8E3);if(!Ss)throw new V(1,8,8001);if(a.i)throw new V(1,8,8002);a.j=new kh;chrome.cast.requestSession(function(c){return Rs(a,c)},function(c){return Xs(a,c)});return H(b,a.j,0)})};function Ys(a){a.i&&chrome.cast.requestSession(function(b){return Rs(a,b)},function(b){return Xs(a,b)})}q.qd=function(){if(this.i){Os(this);if(Ps){Qs(this);try{Ps.stop(function(){},function(){})}catch(a){}Ps=null}Ms(this)}};
q.get=function(a,b){var c=this;if("video"==a){if(Ds.includes(b))return function(){return c.Gi.apply(c,[a,b].concat(y(Na.apply(0,arguments))))}}else if("player"==a){if(Gs.has(b)&&!this.get("player","isLive")())return function(){};if(Js.includes(b))return function(){return c.Gi.apply(c,[a,b].concat(y(Na.apply(0,arguments))))};if(Ks.includes(b))return function(){return c.$k.apply(c,[a,b].concat(y(Na.apply(0,arguments))))};if(Es.has(b)||Fs.has(b))return function(){return c.g[a][b]}}return this.g[a][b]};
q.set=function(a,b,c){this.g[a][b]=c;Ws(this,{type:"set",targetName:a,property:b,value:c})};function Rs(a,b){var c=a.N();Ps=b;b.addUpdateListener(a.C);b.addMessageListener("urn:x-cast:com.google.shaka.v2",a.G);Ms(a);Ws(a,{type:"init",initState:c,appData:a.s});a.j.resolve()}function Xs(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.j.reject(new V(2,8,c,b))}
q.Gi=function(a,b){Ws(this,{type:"call",targetName:a,methodName:b,args:Na.apply(2,arguments)})};q.$k=function(a,b){var c=Na.apply(2,arguments),d=new kh,e=this.J.toString();this.J++;this.h.set(e,d);try{Ws(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function Qs(a){var b=Ps;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.G)}
function Ms(a){var b=Ps?"connected"==Ps.status:!1;if(a.i&&!b){a.H();for(var c in a.g)a.g[c]={};Os(a)}a.i=b;a.K=b?Ps.receiver.friendlyName:"";a.l.Ia()}function Os(a){if(a.h)for(var b=t(a.h.keys()),c=b.next();!c.done;c=b.next()){c=c.value;var d=a.h.get(c);a.h.delete(c);d.reject(new V(1,7,7E3))}}
function Ws(a,b){b=xs(b);var c=Ps;try{c.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},gb)}catch(d){throw b=new V(2,8,8005,d),c=new T("error",(new Map).set("detail",b)),a.B("player",c),a.qd(),b;}}var Ts=.02,Ss=!1,Ps=null,Vs=null,Ns=new Set;function Us(a){Vs?window.__onGCastApiAvailable=Vs:delete window.__onGCastApiAvailable;Vs=null;if(a)for(var b=t(Ns),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Zs(a,b,c,d){d=void 0===d?!1:d;mb.call(this);var e=this;this.i=a;this.h=b;this.m=this.s=this.l=this.u=this.j=null;this.G=c;this.C=d;this.B=new Map;this.g=null;window.chrome?(this.g=new Ls(c,function(){return $s(e)},function(){return at(e)},function(f,g){return bt(e,f,g)},function(){return ct(e)},function(){return dt(e)},d),et(this)):(this.j=this.i,this.u=this.h)}oa(Zs,mb);q=Zs.prototype;
q.destroy=function(a){this.g&&a&&this.g.qd();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.u=this.j=this.i=null;mb.prototype.release.call(this);return Promise.all(a)};q.Bc=function(){return this.j};q.yc=function(){return this.u};q.ag=function(){return this.g?this.g.m&&Ss:!1};q.Va=function(){return this.g?this.g.Va():!1};q.rf=function(){return this.g?this.g.rf():""};
q.cast=function(){var a=this;return Q(function(b){return 1==b.g?a.g?H(b,a.g.cast(),2):b.return():a.h?H(b,a.h.vc(),0):b.return()})};q.lh=function(a){this.g&&this.g.lh(a)};q.Zi=function(){this.g&&Ys(this.g)};q.qd=function(){this.g&&this.g.qd()};
q.Rh=function(a,b){b=void 0===b?!1:b;var c=this;return Q(function(d){if(1==d.g){if(a==c.G&&b==c.C)return d.return();c.G=a;c.C=b;if(!c.g)return d.return();c.g.qd();return H(d,c.g.destroy(),2)}c.g=null;c.g=new Ls(a,function(){return $s(c)},function(){return at(c)},function(e,f){return bt(c,e,f)},function(){return ct(c)},function(){return dt(c)},b);c.g.init();I(d)})};
function et(a){a.g.init();a.m=new zd;for(var b=t(As),c=b.next();!c.done;c=b.next())a.m.o(a.i,c.value,function(f){a.g.Va()||(f=$a(f),a.l.dispatchEvent(f))});for(var d in ab)a.m.o(a.h,ab[d],function(f){a.g.Va()||a.s.dispatchEvent(f)});a.j={};b={};for(var e in a.i)b={$d:b.$d},b.$d=e,Object.defineProperty(a.j,b.$d,{configurable:!1,enumerable:!0,get:function(f){return function(){return ft(a,f.$d)}}(b),set:function(f){return function(g){var h=f.$d;a.g.Va()?a.g.set("video",h,g):a.i[h]=g}}(b)});a.u={};gt(a,
function(f){Object.defineProperty(a.u,f,{configurable:!1,enumerable:!0,get:function(){return ht(a,f)}})});it(a);a.l=new mb;a.l.xe=a.j;a.s=new mb;a.s.xe=a.u}function it(a){var b=new Map;gt(a,function(c,d){b.has(d)?(d=b.get(d),c.length<d.length?a.B.set(c,d):a.B.set(d,c)):b.set(d,c)})}
function gt(a,b){function c(k){return"constructor"==k||"function"!=typeof d[k]?!1:!e.has(k)}var d=a.h,e=new Set,f;for(f in d)c(f)&&(e.add(f),b(f,d[f]));a=Object.getPrototypeOf(d);for(f=Object.getPrototypeOf({});a&&a!=f;){for(var g=t(Object.getOwnPropertyNames(a)),h=g.next();!h.done;h=g.next())h=h.value,c(h)&&(e.add(h),b(h,d[h]));a=Object.getPrototypeOf(a)}}
function dt(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.rd(),startTime:null};a.i.pause();for(var c=t(Cs),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(Hs);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(Is);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function $s(a){var b=new T("caststatuschanged");a.dispatchEvent(b)}
function at(a){var b=new T(a.j.paused?"pause":"play");a.l.dispatchEvent(b)}
function ct(a){for(var b=t(Hs),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();d=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;c=null;d||(c=a.g.get("video","currentTime"));var g;(d=a.g.get("player","getTextTracks")())&&d.length&&(g=d.find(function(l){return l.active}));var h=a.g.get("player","isTextTrackVisible")();e&&(a.i.autoplay=!1,b=a.h.load(e,c));var k={};c=t(Cs);for(d=c.next();!d.done;d=c.next())d=
d.value,k[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var l=t(Cs),m=l.next();!m.done;m=l.next())m=m.value,a.i[m]=k[m];l=t(Is);for(m=l.next();!m.done;m=l.next()){var n=m.value;m=n[1];n=a.g.get("player",n[0])();a.h[m](n)}a.h.Af(h);g&&a.h.jh(g.language,g.roles,g.forced);a.i.autoplay=f;e&&a.i.play()}},function(l){l=(new Map).set("detail",l);l=new T("error",l);a.h.dispatchEvent(l)})}
function ft(a,b){if("addEventListener"==b)return function(d,e,f){return a.l.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.l.removeEventListener(d,e,f)};if(a.g.Va()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.Va()?a.g.get("video",b):(b=a.i[b],"function"==typeof b&&(b=b.bind(a.i)),b)}
function ht(a,b){a.B.has(b)&&(b=a.B.get(b));if("addEventListener"==b)return function(c,d,e){return a.s.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.s.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.j};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.Fb()};if("getDrmEngine"==b)return function(){return a.h.G};if("getAdManager"==b)return function(){return a.h.Ne()};
if("setVideoContainer"==b)return function(c){return a.h.sh(c)};if(a.g.Va()){if("getManifest"==b||"drmInfo"==b)return function(){db(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){db(b+"() does not work while casting!");return Promise.resolve()}}return a.g.Va()&&0==Object.keys(a.g.g.video).length&&(Es.has(b)||Fs.has(b))||!a.g.Va()?a.h[b].bind(a.h):a.g.get("player",b)}
function bt(a,b,c){a.g.Va()&&("video"==b?a.l.dispatchEvent(c):"player"==b&&a.s.dispatchEvent(c))}S("shaka.cast.CastProxy",Zs);Zs.prototype.changeReceiverId=Zs.prototype.Rh;Zs.prototype.forceDisconnect=Zs.prototype.qd;Zs.prototype.suggestDisconnect=Zs.prototype.Zi;Zs.prototype.setAppData=Zs.prototype.lh;Zs.prototype.cast=Zs.prototype.cast;Zs.prototype.receiverName=Zs.prototype.rf;Zs.prototype.isCasting=Zs.prototype.Va;Zs.prototype.canCast=Zs.prototype.ag;Zs.prototype.getPlayer=Zs.prototype.yc;
Zs.prototype.getVideo=Zs.prototype.Bc;Zs.prototype.destroy=Zs.prototype.destroy;function jt(a,b,c,d){mb.call(this);var e=this;this.g=a;this.h=b;this.j=new zd;this.J={video:a,player:b};this.H=c||function(){};this.K=d||function(f){return f};this.i=null;this.I=!1;this.s=!0;this.m=0;this.C=!1;this.B=!0;this.u=this.l=null;this.G=new bc(function(){kt(e)});lt(this)}oa(jt,mb);q=jt.prototype;q.isConnected=function(){return this.I};q.Ak=function(){return this.s};q.ul=function(a){this.i=a};q.wj=function(){this.i=null};
q.vl=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};q.rl=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};q.ql=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
q.destroy=function(){var a=this,b,c;return Q(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.J=null,a.H=null,a.I=!1,a.s=!0,a.l=null,a.u=null,mb.prototype.release.call(a),H(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();I(d)})};
function lt(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return mt(a)};b.onSenderDisconnected=function(){return mt(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&nt(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);nt(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.u=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.u.onMessage=function(e){return ot(a,
e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return pt(a,e)};b.start();b=t(As);for(var c=b.next();!c.done;c=b.next())a.j.o(a.g,c.value,function(e){return qt(a,"video",e)});for(var d in ab)a.j.o(a.h,ab[d],function(e){return qt(a,"player",e)});a.j.o(a.g,"loadeddata",function(){a.C=!0});a.j.o(a.h,"loading",function(){a.s=!1;rt(a)});a.j.o(a.g,"playing",function(){a.s=!1;rt(a)});a.j.o(a.g,"pause",function(){rt(a)});a.j.o(a.h,"unloading",function(){a.s=!0;rt(a)});
a.j.o(a.g,"ended",function(){(new bc(function(){a.g&&a.g.ended&&(a.s=!0,rt(a))})).$(st)})}function mt(a){a.m=0;a.B=!0;a.I=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;rt(a)}function rt(a){var b;Q(function(c){if(1==c.g)return H(c,Promise.resolve(),2);if(!a.h)return c.return();b=new T("caststatuschanged");a.dispatchEvent(b);tt(a)||ut(a);I(c)})}
function vt(a,b,c){var d,e,f,g,h,k,l,m,n,p;Q(function(r){switch(r.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.H(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,va(r,5),H(r,a.h.load(b.manifest,b.startTime),7)):H(r,Promise.resolve(),3);case 7:xa(r,3);break;case 5:return g=za(r),h=(new Map).set("detail",g),k=new T("error",h),a.h&&a.h.dispatchEvent(k),r.return();case 3:if(!a.h)return r.return();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],a.h[n](p);
a.g.autoplay=f;b.manifest&&(a.g.play(),ut(a));I(r)}})}function qt(a,b,c){a.h&&(kt(a),nt(a,{type:"event",targetName:b,event:c},a.l))}
function kt(a){a.G.$(wt);for(var b={video:{},player:{}},c=t(Bs),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];a.h.V()&&Gs.forEach(function(e,f){0==a.m%e&&(b.player[f]=a.h[f]())});Es.forEach(function(e,f){0==a.m%e&&(b.player[f]=a.h[f]())});if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;nt(a,{type:"update",update:b},a.l);Fs.forEach(function(e,f){0==a.m%e&&(e={player:{}},e.player[f]=a.h[f](),nt(a,{type:"update",update:e},
a.l))});a.C&&(a.m+=1);tt(a)}function tt(a){return a.B&&(a.g.duration||a.h.V())?(xt(a),a.B=!1,!0):!1}function xt(a,b){var c={contentId:a.h.rd(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);ut(a,void 0===b?0:b,c)}
function pt(a,b){var c=ys(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.B=!0;vt(a,c.initState,c.appData);kt(a);break;case "appData":a.H(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d)if(b=cast.receiver.CastReceiverManager.getInstance(),"volume"==e){b.setSystemVolumeLevel(c);break}else if("muted"==e){b.setSystemVolumeMuted(c);break}a.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.m=0,a.C=!1);var f=c.id,g=b.senderId;b=a.J[d];c=b[e].apply(b,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.B=!0}));c.then(function(){return yt(a,g,f,null)},function(h){return yt(a,g,f,h)})}}
function ot(a,b){var c=ys(b.data);switch(c.type){case "PLAY":a.g.play();ut(a);break;case "PAUSE":a.g.pause();ut(a);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(a.g.currentTime=Number(b));d&&"PLAYBACK_START"==d?(a.g.play(),ut(a)):d&&"PLAYBACK_PAUSE"==d&&(a.g.pause(),ut(a));break;case "STOP":a.h.vc().then(function(){a.h&&ut(a)});break;case "GET_STATUS":xt(a,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=d.muted;var e=a.g.volume,f=a.g.muted;null!=b&&(a.g.volume=Number(b));
null!=d&&(a.g.muted=d);e==a.g.volume&&f==a.g.muted||ut(a);break;case "LOAD":a.m=0;a.C=!1;a.B=!1;b=c.media;d=c.currentTime;e=a.K(b.contentId);f=c.autoplay||!0;a.H(b.customData);f&&(a.g.autoplay=!0);a.h.load(e,d).then(function(){a.h&&xt(a)}).catch(function(g){var h="LOAD_FAILED";7==g.category&&7E3==g.code&&(h="LOAD_CANCELLED");nt(a,{requestId:Number(c.requestId),type:h},a.u)});break;default:nt(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.u)}}
function yt(a,b,c,d){a.h&&nt(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function nt(a,b,c,d){a.I&&(a=xs(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function ut(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.s?zt:a.h.Ve()?At:a.g.paused?Bt:Ct,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);nt(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.u)}
S("shaka.cast.CastReceiver",jt);jt.prototype.destroy=jt.prototype.destroy;jt.prototype.setContentArtist=jt.prototype.ql;jt.prototype.setContentImage=jt.prototype.rl;jt.prototype.setContentTitle=jt.prototype.vl;jt.prototype.clearContentMetadata=jt.prototype.wj;jt.prototype.setContentMetadata=jt.prototype.ul;jt.prototype.isIdle=jt.prototype.Ak;jt.prototype.isConnected=jt.prototype.isConnected;var wt=.5,st=5,zt="IDLE",Ct="PLAYING",At="BUFFERING",Bt="PAUSED";function Dt(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(C){return null!=C&&""!=C.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(C){return null!=C&&""!=C.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",n=Et(d,e,h,k,l,m);f<=g;f++){for(var p=c[f],r=-1,u=-1,v=0;v<p.length;v++)if(null!=p[v]&&""!==p[v].g.trim()){r=v;break}for(v=p.length-1;0<=v;v--)if(null!=p[v]&&""!==p[v].g.trim()){u=v;break}if(-1===
r||-1===u)p=Ft(d,e),a.nestedCues.push(p);else{for(;r<=u;r++)if(v=p[r]){var w=v.l,x=v.i,z=v.j,B=v.h;if(w!=h||x!=k||z!=l||B!=m)n.payload&&a.nestedCues.push(n),n=Et(d,e,w,x,z,B),h=w,k=x,l=z,m=B;n.payload+=v.g}else n.payload+=" ";n.payload&&a.nestedCues.push(n);f!==g&&(n=Ft(d,e),a.nestedCues.push(n));n=Et(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}function Et(a,b,c,d,e,f){a=new af(a,b,"");c&&a.textDecoration.push(yf);d&&(a.fontStyle=xf);a.color=e;a.backgroundColor=f;return a}
function Ft(a,b){a=new af(a,b,"");a.lineBreak=!0;return a}function Gt(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Ht(a,b){this.i=[];this.g=1;this.h=0;this.G=a;this.C=b;this.j=this.m=!1;this.l="white";this.s="black";this.u=this.B=null;It(this)}function Jt(a,b,c){var d="CC"+((a.G<<1|a.C)+1),e=new af(b,c,"");e.lineInterpretation=1;var f=Kt.get(a.g);f&&(e.line=f);null!=a.u&&null!=a.B&&(e.position=10+Math.min(70,10*a.u)+2.5*a.B);(b=Dt(e,d,a.i,b,c))&&15<a.g+b.cue.nestedCues.length-3&&(f=Kt.get(a.g+3-b.cue.nestedCues.length))&&(e.line=f);return b}function It(a){Lt(a,0,15);a.g=1}
function Mt(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case 0:d=Nt.has(c)?Nt.get(c):String.fromCharCode(c);break;case 1:d=Ot.get(c);break;case 2:a.i[a.g].pop();d=Pt.get(c);break;case 3:a.i[a.g].pop(),d=Qt.get(c)}d&&a.i[a.g].push(new Gt(d,a.m,a.j,a.s,a.l))}}function Rt(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Lt(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
var Nt=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"]]),Ot=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57," "],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Pt=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"]]),Qt=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"]]),Kt=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function St(a,b){this.h=0;this.s=new Ht(a,b);this.i=new Ht(a,b);this.g=this.j=new Ht(a,b);this.l=0;this.m=null}function Tt(a,b,c){a.g=a.i;var d=a.g,e=null;3!==a.h&&4!==a.h&&(e=Jt(d,a.l,c),c=a.i,c.g=0<c.h?c.h:0,Lt(c,0,15),c=a.j,c.g=0<c.h?c.h:0,Lt(c,0,15),d.g=15);a.h=3;d.h=b;return e}function Ut(a){a.h=1;a.g=a.j;a.g.h=0}function Vt(a){eb("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.s;a.h=4}var Wt="black green blue cyan red yellow magenta black".split(" "),Xt="white green blue cyan red yellow magenta white_italics".split(" ");function Yt(a,b){this.K=b;this.N=a;this.L=this.l=!1;this.m=this.s=this.I=this.M=this.J=0;this.H=2;this.i=[];this.g=this.h=this.j=0;this.G=this.B=!1;this.C="white";this.u="black";Zt(this)}function Zt(a){a.i=[];for(var b=0;16>b;b++)a.i.push($t())}function $t(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function au(a,b){bu(a)&&(a.i[a.h][a.g]=new Gt(b,a.G,a.B,a.u,a.C),a.g++)}function bu(a){var b=a.g<a.m&&0<=a.g;return a.h<a.s&&0<=a.h&&b}Yt.prototype.isVisible=function(){return this.l};
function cu(a){for(var b=0,c=1;16>c;c++,b++)a.i[b]=a.i[c];for(c=0;1>c;c++,b++)a.i[b]=$t()}
function du(a,b,c){var d=new af(a.j,b,"");d.textAlign=0===a.H?"left":1===a.H?"right":cf;var e=d.region;a.K&&(e.id+="svc"+a.K);e.id+="win"+a.N;e.height=a.s;e.width=a.m;e.heightUnits=2;e.widthUnits=2;e.viewportAnchorX=a.J;e.viewportAnchorY=a.M;e.viewportAnchorUnits=a.L?$d:2;switch(a.I){case 0:e.regionAnchorX=0;e.regionAnchorY=0;break;case 1:e.regionAnchorX=50;e.regionAnchorY=0;break;case 2:e.regionAnchorX=100;e.regionAnchorY=0;break;case 3:e.regionAnchorX=0;e.regionAnchorY=50;break;case 4:e.regionAnchorX=
50;e.regionAnchorY=50;break;case 5:e.regionAnchorX=100;e.regionAnchorY=50;break;case 6:e.regionAnchorX=0;e.regionAnchorY=100;break;case 7:e.regionAnchorX=50;e.regionAnchorY=100;break;case 8:e.regionAnchorX=100,e.regionAnchorY=100}if(c=Dt(d,"svc"+c,a.i,a.j,b))a.j=b;return c}Yt.prototype.display=function(){this.l=!0};function eu(){this.i=[];this.h=null;this.g=0}function fu(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new gu(a.h)),a.h=null,a.g=0))}function gu(a){this.g=0;this.h=a}gu.prototype.Ma=function(){return this.g<this.h.length};gu.prototype.Ta=function(){return this.g};function hu(a){if(!a.Ma())throw new V(2,2,3E3);return a.h[a.g++]}gu.prototype.skip=function(a){if(this.g+a>this.h.length)throw new V(2,2,3E3);this.g+=a};
gu.prototype.Ii=function(a){if(0>this.g-a)throw new V(2,2,3E3);this.g-=a};function iu(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
function ju(a,b,c,d){if(!a.g)return[];if(24==c)return c=hu(b).value,d=hu(b).value,c=function(f){return f.map(function(g){return("0"+(g&255).toString(16)).slice(-2)}).join("")}([c,d]),au(a.g,String.fromCharCode(parseInt(c,16))),[];b=a.g;var e=null;switch(c){case 8:!bu(b)||0>=b.g&&0>=b.h||(0>=b.g?(b.g=b.m-1,b.h--):b.g--,b.i[b.h][b.g]=null);break;case 13:b.isVisible()&&(e=du(b,d,a.i));b.h+1>=b.s?cu(b):b.h++;b.g=0;break;case 14:b.isVisible()&&(e=du(b,d,a.i));b.i[b.h]=$t();b.g=0;break;case 12:b.isVisible()&&
(e=du(b,d,a.i)),Zt(b),b.h=0,b.g=0}return e?[e]:[]}
function ku(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=hu(b).value;b=[];c=t(lu(a,c));for(var e=c.next();!e.done;e=c.next()){e=a.h[e.value];if(e.isVisible()){var f=du(e,d,a.i);f&&b.push(f)}Zt(e)}return b}if(137===c)for(b=hu(b).value,b=t(lu(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.display();else{if(138===c){c=hu(b).value;b=null;c=t(lu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=du(e,d,a.i)),e.l=!1;return b?
[b]:[]}if(139===c){c=hu(b).value;b=null;c=t(lu(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=du(e,d,a.i):e.j=d,e.l=!e.l;return b?[b]:[]}if(140===c)return b=hu(b).value,mu(a,b,d);if(143===c)return d=mu(a,255,d),nu(a),d;if(144===c)b.skip(1),d=hu(b).value,a.g&&(a.g.B=0<(d&128),a.g.G=0<(d&64));else if(145===c)d=hu(b).value,c=hu(b).value,b.skip(1),a.g&&(b=ou((c&48)>>4,(c&12)>>2,c&3),a.g.C=ou((d&48)>>4,(d&12)>>2,d&3),a.g.u=b);else if(146===c)d=hu(b).value,b=hu(b).value,a.g&&(a=
a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),b.skip(1),d=hu(b).value,b.skip(1),a.g&&(a.g.H=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];e||(f=new Yt(c,a.i),f.j=d,a.h[c]=f);d=hu(b).value;f=hu(b).value;var g=hu(b).value,h=hu(b).value,k=hu(b).value;b=hu(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.G=!1,b.B=!1,b.C="white",b.u="black");b=a.h[c];b.l=0<(d&32);b.M=f&127;b.J=g;b.I=(h&240)>>4;b.L=0<(f&128);b.s=(h&15)+1;b.m=(k&63)+1;a.g=a.h[c]}}}return[]}
function lu(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}function mu(a,b,c){var d=[];b=t(lu(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(f=du(f,c,a.i))&&d.push(f);a.h[e]=null}return d}function nu(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function ou(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return pu[a<<2|b<<1|c]}
var qu=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"]]),pu="black blue green cyan red magenta yellow white".split(" ");function ru(){this.h=[];this.g=[];this.i=new eu;this.l=0;this.m=new Map([["CC1",new St(0,0)],["CC2",new St(0,1)],["CC3",new St(1,0)],["CC4",new St(1,1)]]);this.u=this.s=0;this.j=new Map;this.C=!0;this.B=new Set;su(this)}ru.prototype.clear=function(){this.l=0;this.h=[];this.g=[];var a=this.i;a.i=[];a.h=[];a.g=0;su(this);a=t(this.j.values());for(var b=a.next();!b.done;b=a.next())nu(b.value)};
function su(a){a.s=0;a.u=0;for(var b=t(a.m.values()),c=b.next();!c.done;c=b.next())c=c.value,c.h=0,c.g=c.j,c.m=null,It(c.i),It(c.j),It(c.s);a.C=!0}
ru.prototype.extract=function(a,b){if(this.C){for(var c=t(this.m.values()),d=c.next();!d.done;d=c.next())d.value.l=b;this.C=!1}a=new Lh(a,0);if(!(8>a.getLength())&&181===a.ha()&&49===a.Da()&&1195456820===a.X()&&3===a.ha()&&(c=a.ha(),0!==(c&64)))for(c&=31,a.skip(1),d=0;d<c;d++){var e=a.ha(),f=(e&4)>>2,g=a.ha(),h=a.ha();f&&(e&=3,0===e||1===e?this.h.push({pts:b,type:e,Db:g,fc:h,order:this.h.length}):(this.g.push({pts:b,type:e,value:g,order:this.g.length}),this.g.push({pts:b,type:2,value:h,order:this.g.length})))}};
ru.prototype.decode=function(){function a(e,f){return e.pts-f.pts||e.order-f.order}var b=[];this.h.sort(a);this.g.sort(a);for(var c=t(this.h),d=c.next();!d.done;d=c.next())(d=tu(this,d.value))&&b.push(d);c=t(this.g);for(d=c.next();!d.done;d=c.next())fu(this.i,d.value);c=t(this.i.i);for(d=c.next();!d.done;d=c.next())d=uu(this,d.value),b.push.apply(b,y(d));this.i.i=[];this.h=[];this.g=[];return b};
function tu(a,b){var c=b.type;if(16===(b.Db&112)){var d=b.Db>>3&1;0===c?a.s=d:a.u=d}d="CC"+((c<<1|(c?a.u:a.s))+1);c=a.m.get(d);if(255===b.Db&&255===b.fc||!b.Db&&!b.fc||!vu(b.Db)||!vu(b.fc))return 45<=++a.l&&su(a),null;a.l=0;b.Db&=127;b.fc&=127;var e=b.Db;if(1<=e&&15>=e||!b.Db&&!b.fc)return null;e=null;if(16===(b.Db&112))a:{a.B.add(d),d=b.Db;a=b.fc;if(c.m===(d<<8|a))c.m=null;else if(c.m=d<<8|a,16===(d&240)&&64===(a&192)){b=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(d&7)<<1|a>>5&1];d="white";e=!1;var f=
null;var g=95<a?a-96:a-64;13>=g?d=Xt[Math.floor(g/2)]:15>=g?e=!0:f=Math.floor((g-16)/2);a=1===(a&1);4!==c.h&&(g=c.g,3===c.h&&b!==g.g&&(c=1+b-g.h,Rt(g,c,1+g.g-g.h,g.h),Lt(g,0,c-1),Lt(g,b+1,15-b)),g.g=b,g.m=a,g.j=e,g.l=d,g.u=f,g.s="black")}else if(17===(d&247)&&32===(a&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Mt(c.g,0,32),d=!1,b=Xt[(a&14)>>1],"white_italics"===b&&(b="white",d=!0),c.g.m=1===(a&1),c.g.j=d,c.g.l=b;else if(16===(d&247)&&32===(a&240)||23===(d&247)&&45===(a&255))b="black",0===(d&7)&&(b=Wt[(a&
14)>>1]),c.g.s=b;else if(17===(d&247)&&48===(a&240))Mt(c.g,1,a);else if(18===(d&246)&&32===(a&224))Mt(c.g,d&1?3:2,a);else{if(20===(d&246)&&32===(a&240)){a=b.pts;d=null;switch(b.fc){case 32:Ut(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:d=Tt(c,2,a);break;case 38:d=Tt(c,3,a);break;case 39:d=Tt(c,4,a);break;case 40:Mt(c.g,0,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.l=a;break;case 42:It(c.s);Vt(c);break;case 43:Vt(c);break;case 44:b=c.i;d=null;4!==c.h&&(d=Jt(b,c.l,a));Lt(b,0,15);break;case 45:b=
c.g;3!==c.h?d=null:(d=Jt(b,c.l,a),e=b.g-b.h+1,Rt(b,e-1,e,b.h),Lt(b,0,e-1),Lt(b,b.g,15-b.g),c.l=a);break;case 46:Lt(c.j,0,15);break;case 47:b=null,4!==c.h&&(b=Jt(c.i,c.l,a)),d=c.j,c.j=c.i,c.i=d,Ut(c),c.l=a,d=b}e=d;break a}(23==d||31==d)&&33<=a&&35>=a&&(c.g.B=a-32)}e=null}else a=b.fc,Mt(c.g,0,b.Db),Mt(c.g,0,a);return e}
function uu(a,b){var c=[];try{for(;b.Ma();){var d=hu(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=hu(b).value&63);if(0!=e){a.B.add("svc"+e);a.j.has(e)||a.j.set(e,new iu(e));for(var g=a.j.get(e),h=b.Ta();b.Ta()-h<f;){e=g;var k=b,l=hu(k),m=l.value,n=l.pts;if(16===m){var p=hu(k);m=m<<16|p.value}if(0<=m&&31>=m)var r=ju(e,k,m,n);else if(128<=m&&159>=m)r=ku(e,k,m,n);else{if(4096<=m&&4127>=m)e=k,k=m&255,8<=k&&15>=k?e.skip(1):16<=k&&23>=k?e.skip(2):24<=k&&31>=k&&e.skip(3);else if(4224<=m&&4255>=m)e=k,k=m&
255,128<=k&&135>=k?e.skip(4):136<=k&&143>=k&&e.skip(5);else if(32<=m&&127>=m)k=m,e.g&&(127===k?au(e.g,"\u266a"):au(e.g,String.fromCharCode(k)));else if(160<=m&&255>=m)e.g&&au(e.g,String.fromCharCode(m));else if(4128<=m&&4223>=m){if(k=m&255,e.g)if(qu.has(k)){var u=qu.get(k);au(e.g,u)}else au(e.g,"_")}else 4256<=m&&4351>=m&&e.g&&(160!=(m&255)?au(e.g,"_"):au(e.g,"[CC]"));r=[]}c.push.apply(c,y(r))}}}}catch(v){if(v instanceof V&&3E3===v.code)eb("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");
else throw v;}return c}function vu(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b}ru.prototype.getStreams=function(){return Array.from(this.B)};S("shaka.cea.CeaDecoder",ru);Wd=function(){return new ru};function wu(a){for(var b=[],c=a,d=a=0;d<c.length;)2==a&&3==c[d]?(a=0,c=[].concat(y(c)),c.splice(d,1),c=new Uint8Array(c)):0==c[d]?a++:a=0,d++;a=c;for(d=0;d<a.length;){for(c=0;255==a[d];)c+=255,d++;c+=a[d++];for(var e=0;255==a[d];)e+=255,d++;e+=a[d++];4==c&&b.push(a.subarray(d,d+e));d+=e}return b};function xu(){this.j=new Map;this.i=this.h=0;this.g=yu}
xu.prototype.init=function(a){function b(f){f=f.name;zu.has(f)&&(c.g=zu.get(f))}var c=this,d=[],e=[];(new Oh).box("moov",Th).box("mvex",Th).W("trex",function(f){var g=f.reader;g.skip(4);g.skip(4);f=g.X();g=g.X();c.h=f;c.i=g}).box("trak",Th).W("tkhd",function(f){var g=f.reader;f=f.version;1==f?(g.skip(8),g.skip(8)):(g.skip(4),g.skip(4));var h=g.X();1==f?g.skip(8):g.skip(4);g.skip(4);g.skip(8);g.skip(2);g.skip(2);g.skip(2);g.skip(2);g.skip(36);g.Da();g.Da();g.Da();g.Da();d.push(h)}).box("mdia",Th).W("mdhd",
function(f){f=jj(f.reader,f.version);e.push(f.timescale)}).box("minf",Th).box("stbl",Th).W("stsd",Vh).box("avc1",b).box("avc3",b).box("dvav",b).box("dva1",b).box("hev1",b).box("hvc1",b).box("dvh1",b).box("dvhe",b).box("vvc1",b).box("vvi1",b).box("dvc1",b).box("dvi1",b).box("encv",Wh).box("sinf",Th).box("frma",function(f){f=mj(f.reader).codec;zu.has(f)&&(c.g=zu.get(f))}).parse(a,!0);if(!d.length||!e.length||d.length!=e.length)throw new V(2,2,2010);this.g==yu&&db("Unable to determine bitstream format for CEA parsing!");
d.forEach(function(f,g){c.j.set(f,e[g])})};
xu.prototype.parse=function(a){var b=this;if(this.g==yu)return[];var c=[],d=0,e=[];(new Oh).box("moof",function(f){d=f.start;e=[];Th(f)}).box("traf",function(f){e.push({baseMediaDecodeTime:null,Od:b.h,Pd:b.i,Di:[],timescale:9E4});Th(f)}).W("trun",function(f){var g=e[e.length-1];f=kj(f.reader,f.version,f.flags);g.Di.push(f)}).W("tfhd",function(f){var g=e[e.length-1];f=hj(f.reader,f.flags);g.Od=f.Od||b.h;g.Pd=f.Pd||b.i;f=f.trackId;b.j.has(f)&&(g.timescale=b.j.get(f))}).W("tfdt",function(f){var g=e[e.length-
1];f=ij(f.reader,f.version);g.baseMediaDecodeTime=f.baseMediaDecodeTime}).box("mdat",function(f){for(var g=d-f.start-8,h=f.reader.Ta(),k=t(e),l=k.next();!l.done;l=k.next()){l=l.value;if(null===l.baseMediaDecodeTime)throw db("Unable to find base media decode time for CEA captions!"),new V(2,2,2010);f.reader.seek(h);Au(b,f.reader,l.baseMediaDecodeTime,l.timescale,l.Od,l.Pd,g,l.Di,c)}}).parse(a,!1);return c};
function Au(a,b,c,d,e,f,g,h,k){var l=0,m=f,n=h.map(function(u){return u.hh});n=[].concat.apply([],y(n));n.length&&(m=n[0].sampleSize||f);for(b.skip(g+h[0].lg);b.Ma();){g=b.X();var p=b.ha(),r=null;r=!1;h=1;switch(a.g){case Bu:r=p&31;r=6==r;break;case Cu:h=2;b.skip(1);r=p>>1&63;r=39==r||40==r;break;case Du:h=2;b.skip(1);r=p>>1&63;r=23==r||24==r;break;default:return}if(r)for(p=0,l<n.length&&(p=n[l].wf||0),p=(c+p)/d,h=t(wu(b.Tb(g-h))),r=h.next();!r.done;r=h.next())k.push({packet:r.value,pts:p});else try{b.skip(g-
h)}catch(u){break}m-=g+4;0==m&&(c=l<n.length?c+(n[l].ih||e):c+e,l++,l<n.length?m=n[l].sampleSize||f:m=f)}}S("shaka.cea.Mp4CeaParser",xu);var yu=0,Bu=1,Cu=2,Du=3,zu=(new Map).set("avc1",Bu).set("avc3",Bu).set("dvav",Bu).set("dva1",Bu).set("hev1",Cu).set("hvc1",Cu).set("dvh1",Cu).set("dvhe",Cu).set("vvc1",Du).set("vvi1",Du).set("dvc1",Du).set("dvi1",Du);Xd("video/mp4",function(){return new xu});function Eu(){this.g=null}Eu.prototype.init=function(){};Eu.prototype.parse=function(a){this.g?this.g.clearData():this.g=new Fk;var b=[];a=Nb(a);if(!Nk(a))return b;a=this.g.parse(a);var c=a.Rd(),d=a.Se();a=[];switch(c.video){case "avc":a.push(6);break;case "hvc":a.push(39),a.push(40)}if(!a.length)return b;c=t(d);for(d=c.next();!d.done;d=c.next())if(d=d.value,a.includes(d.type)&&null!=d.time)for(var e=t(wu(d.data)),f=e.next();!f.done;f=e.next())b.push({packet:f.value,pts:d.time});return b};
S("shaka.cea.TsCeaParser",Eu);Xd("video/mp2t",function(){return new Eu});function Fu(a){var b=0,c=Rb(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Nb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}function Gu(a){a=Rc(Ce(a));a=Fu(a).filter(function(b){return b.type===Hu})[0];if(!a)return null;a=Hc(a.value,!0);return(a=re(a,"WRMHEADER"))?a:null}
function Iu(a){try{var b=Gu(a);if(b)a:{for(var c=t(Ee(b,"DATA")),d=c.next();!d.done;d=c.next()){var e=d.value;if(e.children)for(var f=t(e.children),g=f.next();!g.done;g=f.next()){var h=g.value;if("LA_URL"==h.tagName){var k=Ce(h);break a}}}k=""}else k="";return k}catch(l){return""}}var Hu=1;function Ju(a,b,c){var d=Ku(a),e=null;a=[];var f=[],g=null,h=new Set(d.map(function(l){return l.keyId}));h.delete(null);var k="cenc";if(1<h.size)throw new V(2,4,4010);if(!b){f=d.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Ed});if(1<f.length)throw new V(2,4,4050);f.length&&(g=Lu(f[0]));(f=d.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ed}))&&f.encryptionScheme&&(k=f.encryptionScheme);f=d.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Ed?(e=l.init||e,!1):"urn:mpeg:dash:sea:2012"!=
l.Ed});f.length&&(a=Mu(e,k,f,c,h),0==a.length&&(a=[Wc("",k,e)]))}if(d.length&&!g&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(Wc(c,k,e));if(h=Array.from(h)[0]||null)for(k=t(a),b=k.next();!b.done;b=k.next())for(b=t(b.value.initData),c=b.next();!c.done;c=b.next())c.value.keyId=h;return{Vh:h,Km:e,drmInfos:a,Yf:g,$h:!0}}
function Nu(a,b,c,d){var e=Ju(a,c,d);if(b.$h){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.$h=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new V(2,4,4008);return e.Vh||b.Vh}
function Ou(a){var b=Ge(a.node,"https://dashif.org/CPS","Laurl");if(b&&(b=Ce(b)))return b;if((b=Ge(a.node,"urn:microsoft:playready","pro"))&&Ce(b))return Iu(b);if(a=Ge(a.node,"urn:mpeg:cenc:2013","pssh"))if(a=Ce(a)){b=Rc(a);a=8;b=Rb(b);var c=b.getUint8(a);a+=20;0<c&&(a+=4+16*b.getUint32(a));a=Nb(b,a+4);a=Pc(a);a=re("<pro>"+a+"</pro>");return Iu(a)}return""}
function Mu(a,b,c,d,e){var f=[];c=t(c);for(var g=c.next();!g.done;g=c.next()){g=g.value;var h=d[g.Ed];if(h){var k;if((k=Ge(g.node,"urn:microsoft:playready","pro"))&&Ce(k)){k=Ce(k);k=Rc(k);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);k=[{initData:$h(k,l,new Set,0),initDataType:"cenc",keyId:g.keyId}]}else k=null;l=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===g.Ed){l=g;var m=e;if(0==m.size)l=null;else{var n=new Uint8Array([16,119,239,236,192,178,77,2,
172,227,60,30,82,226,251,75]),p=new Uint8Array([]);l=[{initData:$h(p,n,m,1),initDataType:"cenc",keyId:l.keyId}]}}k=Wc(h,b,g.init||a||k||l);if(h=Pu.get(h))k.licenseServerUri=h(g);f.push(k)}}return f}function Ku(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Qu(c.value))&&b.push(c);return b}
function Qu(a){var b=a.attributes.schemeIdUri,c=Je(a,"urn:mpeg:cenc:2013","default_KID"),d=He(a,"urn:mpeg:cenc:2013","pssh").map(De),e=a.attributes.value;if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new V(2,4,4009);var f=[];try{f=d.map(function(g){return{initDataType:"cenc",initData:Rc(g),keyId:null}})}catch(g){throw new V(2,4,4007);}return{node:a,Ed:b,keyId:c,init:0<f.length?f:null,encryptionScheme:e}}
function Lu(a){if(!window.crypto||!window.crypto.subtle)throw db("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new V(2,4,4042);var b=Ge(a.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!b)throw new V(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=b.attributes.schemeIdUri)throw new V(2,4,4051);b=Ge(a.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod");if(!b)throw new V(2,4,4051);a=b.attributes.IV;b=Nc(b.attributes.keyUriTemplate);
if(!a||!b)throw new V(2,4,4051);a=Sc(a.substr(2));if(16!=a.byteLength)throw new V(2,4,4048);return{Gk:b,iv:a}}
var Pu=(new Map).set("com.apple.fps",function(a){if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4054);if(a=Ge(a.node,"https://dashif.org/CPS","Laurl"))if(a=Ce(a))return a;return""}).set("com.widevine.alpha",function(a){var b=Ge(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Ce(b))?b:(a=Ge(a.node,"urn:microsoft","laurl"))?Nc(a.attributes.licenseUrl)||"":""}).set("com.microsoft.playready",Ou).set("com.microsoft.playready.recommendation",Ou).set("com.microsoft.playready.software",
Ou).set("com.microsoft.playready.hardware",Ou).set("org.w3.clearkey",function(a){var b=Ge(a.node,"https://dashif.org/CPS","Laurl");return b&&(b=Ce(b))?b:(a=Ge(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.attributes.Lic_type&&a&&(a=Ce(a))?a:""});function Ru(a,b,c,d,e,f){var g=(new Map).set("RepresentationID",b).set("Number",c).set("SubNumber",d).set("Bandwidth",e).set("Time",f);return a.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(h,k,l,m){if("$$"==h)return"$";var n=g.get(k);if(null==n)return h;"RepresentationID"==k&&l&&(l=void 0);"Time"==k&&"bigint"!=typeof n&&(.2<=Math.abs(n-Math.round(n))&&db("Calculated $Time$ values must be close to integers"),n=Math.round(n));switch(m){case void 0:case "d":case "i":case "u":h=
n.toString();break;case "o":h=n.toString(8);break;case "x":h=n.toString(16);break;case "X":h=n.toString(16).toUpperCase();break;default:h=n.toString()}l=window.parseInt(l,10)||1;return Array(Math.max(0,l-h.length)+1).join("0")+h})}
function Su(a,b){var c=Tu(a,b,"timescale"),d=1;c&&(d=Pe(c)||1);c=Tu(a,b,"duration");var e=(c=Pe(c||""))?c/d:null,f=Tu(a,b,"startNumber"),g=Number(Tu(a,b,"presentationTimeOffset"))||0,h=Qe(f||"");if(null==f||null==h)h=1;f=null;if(b=Uu(a,b,"SegmentTimeline")){b=Be(b,"S");f=d;a=a.ua.duration||Infinity;for(var k=h,l=[],m=-g,n=0;n<b.length;++n){var p=b[n],r=b[n+1],u=Ie(p,"t",Qe),v=Ie(p,"d",Qe),w=Ie(p,"r",Oe);p=Ie(p,"k",Oe)||0;null!=u&&(u-=g);if(v){u=null!=u?u:m;w=w||0;if(0>w)if(r){r=Ie(r,"t",Qe);if(null==
r)break;else if(u>=r)break;w=Math.ceil((r-u)/v)-1}else{if(Infinity==a)break;else if(u/f>=a)break;w=Math.ceil((a*f-u)/v)-1}0<l.length&&u!=m&&(l[l.length-1].end=u/f);for(r=0;r<=w;++r)m=u+v,l.push({start:u/f,end:m/f,Fh:u,dc:p,ll:l.length+k}),u=m}}f=l}return{timescale:d,Ff:c,mb:e,oe:h,Ec:g/d||0,Eh:g,timeline:f}}function Vu(a,b){return[b(a.O),b(a.sa),b(a.Ga)].filter(kg)}function Tu(a,b,c){b=Vu(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=d.value.attributes[c]);d=b.next());return a}
function Uu(a,b,c){b=Vu(a,b);a=null;b=t(b);for(var d=b.next();!d.done&&!(a=Fe(d.value,c));d=b.next());return a}
function Wu(a,b,c,d,e,f){for(var g=Je(a,"http://www.w3.org/1999/xlink","href"),h=Je(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Object.keys(a.attributes)),l=k.next();!l.done;l=k.next()){l=l.value;var m=l.split(":"),n=te("http://www.w3.org/1999/xlink");m[0]==n&&delete a.attributes[l]}if(5<=f)return mh(new V(2,4,4028));if("onLoad"!=h)return mh(new V(2,4,4027));var p=Vc([d],[g]);return e.request(0,zh(p,b)).bb(function(r){r=qe(r.data,a.tagName);if(!r)return mh(new V(2,4,4001,g));for(a.children=
[];r.children.length;){var u=r.children.shift();a.children.push(u)}u=t(Object.keys(r.attributes));for(var v=u.next();!v.done;v=u.next())v=v.value,a.attributes[v]=r.attributes[v];return Xu(a,b,c,p[0],e,f+1)})}
function Xu(a,b,c,d,e,f){f=void 0===f?0:f;if(Je(a,"http://www.w3.org/1999/xlink","href")){var g=Wu(a,b,c,d,e,f);c&&(g=g.bb(void 0,function(){return Xu(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Ae(a)),k=h.next(),l={};!k.done;l={Ld:void 0},k=h.next())l.Ld=k.value,"urn:mpeg:dash:resolve-to-zero:2013"==Je(l.Ld,"http://www.w3.org/1999/xlink","href")?a.children=a.children.filter(function(m){return function(n){return n!==m.Ld}}(l)):"SegmentTimeline"!=l.Ld.tagName&&g.push(Xu(l.Ld,b,c,d,e,f));return qh(g).bb(function(){return a})}
;function Yu(a,b,c,d,e,f,g){var h,k=(new Oh).W("sidx",function(l){h=Zu(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new V(2,3,3004);}
function Zu(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.X();if(0==k)throw new V(2,3,3005);if(0==g.version){var l=g.reader.X();var m=g.reader.X()}else l=g.reader.Dd(),m=g.reader.Dd();g.reader.skip(2);var n=g.reader.Da();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.X(),r=(p&2147483648)>>>31;p&=2147483647;var u=g.reader.X();g.reader.skip(4);if(1==r)throw new V(2,3,3006);h.push(new Zj(l/k+c,(l+u)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=u;a+=p}g.parser.stop();return h};function $u(a){this.h=Rb(a);this.g=new Lh(this.h,0)}$u.prototype.Ma=function(){return this.g.Ma()};
function av(a){var b=bv(a);if(7<b.length)throw new V(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=bv(a);a:{d=t(cv);for(var e=d.next();!e.done;e=d.next())if(Mb(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.Ta();else{if(8==b.length&&b[1]&224)throw new V(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.Ta()+b<=a.h.byteLength?b:a.h.byteLength-a.g.Ta();d=Rb(a.h,a.g.Ta(),b);a.g.skip(b);return new dv(c,
d)}function bv(a){var b=a.g.Ta(),c=a.g.ha();if(0==c)throw new V(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Nb(a.h,b,c)}var cv=[[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 dv(a,b){this.id=a;this.g=b}
function ev(a){if(8<a.g.byteLength)throw new V(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new V(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function fv(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new $u(a.g);for(var n=null,p=null;a.Ma();){var r=av(a);if(187==r.id){var u=gv(r);u&&(r=c*u.El,u=b+u.Yk,null!=n&&m.push(new Zj(n+g,r+g,l,p,u-1,f,g,h,k)),n=r,p=u)}}null!=n&&m.push(new Zj(n+g,d+g,l,p,null,f,g,h,k));return m}
function gv(a){var b=new $u(a.g);a=av(b);if(179!=a.id)throw new V(2,3,3013);a=ev(a);b=av(b);if(183!=b.id)throw new V(2,3,3012);b=new $u(b.g);for(var c=0;b.Ma();){var d=av(b);if(241==d.id){c=ev(d);break}}return{El:a,Yk:c}};function hv(a,b,c){b=Uu(a,b,"Initialization");if(!b)return null;var d=a.O.jb(),e=b.attributes.sourceURL;e&&(d=Vc(d,[Nc(e)],a.Kb()));e=0;var f=null;if(b=Ie(b,"range",Ne))e=b.start,f=b.end;c=new Xj(function(){return d},e,f,iv(a),null,null,c,a.sa.encrypted);c.codecs=a.O.codecs;c.mimeType=a.O.mimeType;a.ua&&(c.g=a.ua.start+a.ua.duration);return c}
function jv(a,b,c){var d=Number(Tu(a,kv,"presentationTimeOffset"))||0,e=Tu(a,kv,"timescale"),f=1;e&&(f=Pe(e)||1);var g=d/f||0,h=hv(a,kv,c);lv(a,h);var k=oe(a);return{Qc:function(){var l=Uu(k,kv,"RepresentationIndex");var m=k.O.jb();l&&(l=Nc(l.attributes.sourceURL))&&(m=Vc(m,[l],k.Kb()));l=mv(k);return nv(k,b,h,m,l.start,l.end,g)}}}
function nv(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F;return Q(function(G){if(1==G.g)return h=a.presentationTimeline,k=!a.ic||!a.ua.ni,l=a.ua.start,m=a.ua.duration,n=a.O.mimeType.split("/")[1],p=b,r=null,u=[p(d,e,f,!1),"webm"==n?p(c.S(),c.hb,c.Pa,!0):null],p=null,H(G,Promise.all(u),2);v=G.h;w=v[0];x=v[1]||null;z=null;B=l-g;C=l;E=m?l+m:Infinity;if("mp4"==n)var K=Yu(w,e,d,c,B,C,E);else{K=w;var L=new $u(x);if(440786851!=av(L).id)throw new V(2,3,3008);var J=av(L);if(408125543!=J.id)throw new V(2,
3,3009);L=J.g.byteOffset;J=new $u(J.g);for(var M=null;J.Ma();){var N=av(J);if(357149030==N.id){M=N;break}}if(!M)throw new V(2,3,3010);M=new $u(M.g);N=1E6;for(J=null;M.Ma();){var P=av(M);if(2807729==P.id)N=ev(P);else if(17545==P.id)if(4==P.g.byteLength)J=P.g.getFloat32(0);else if(8==P.g.byteLength)J=P.g.getFloat64(0);else throw new V(2,3,3003);}if(null==J)throw new V(2,3,3011);M=N/1E9;J*=M;K=av(new $u(K));if(475249515!=K.id)throw new V(2,3,3007);K=fv(K,L,M,J,d,c,B,C,E)}z=K;D=t(z);for(A=D.next();!A.done;A=
D.next())F=A.value,F.codecs=a.O.codecs,F.mimeType=a.O.mimeType,F.bandwidth=a.bandwidth;h.ee(z);r=new em(z);k&&r.pd(C,E,!0);return G.return(r)})}function kv(a){return a.Fd}function mv(a){var b=Uu(a,kv,"RepresentationIndex");a=Tu(a,kv,"indexRange");a=Ne(a||"");b&&(a=Ie(b,"range",Ne,a));return a}function lv(a,b){ov(a,b);if(!mv(a))throw new V(2,4,4002);}
function ov(a,b){var c=a.O.mimeType.split("/")[1];if(a.O.contentType!=bd&&"mp4"!=c&&"webm"!=c)throw new V(2,4,4006);if("webm"==c&&!b)throw new V(2,4,4005);}
function iv(a){var b=a.O;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.kf,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null,label:a.sa.label||null,roles:a.roles||null,language:a.sa.language||null}};function pv(a,b,c){var d=hv(a,qv,c),e=rv(a);if(!e.mb&&!e.timeline&&1<e.yd.length)throw new V(2,4,4002);if(!e.mb&&!a.ua.duration&&!e.timeline&&1==e.yd.length)throw new V(2,4,4002);if(e.timeline&&0==e.timeline.length)throw new V(2,4,4002);var f=null,g=null;a.Ga.id&&a.O.id&&(g=b.get(a.Ga.id+","+a.O.id))&&(f=g.segmentIndex);var h=sv(a.ua.start,a.ua.duration,a.O.jb,e,d,c,a.O.mimeType,a.O.codecs,a.bandwidth,a.Kb);b=!f;f?f.be(h,a.presentationTimeline.Hb()):f=new em(h);a.presentationTimeline.ee(h);a.ic&&
a.ua.ni||f.pd(a.ua.start,a.ua.duration?a.ua.start+a.ua.duration:Infinity,b);g&&(g.segmentIndex=f);return{Qc:function(){f&&0!=f.getNumReferences()||f.ef(h);return Promise.resolve(f)}}}function qv(a){return a.tc}function rv(a){var b=tv(a);a=Su(a,qv);var c=a.oe;0==c&&(c=1);var d=0;a.mb?d=a.mb*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{mb:a.mb,startTime:d,oe:c,Ec:a.Ec,timeline:a.timeline,yd:b}}
function sv(a,b,c,d,e,f,g,h,k,l){var m=d.yd.length;d.timeline&&d.timeline.length!=d.yd.length&&(m=Math.min(d.timeline.length,d.yd.length));for(var n=a-d.Ec,p=b?a+b:Infinity,r=[],u=d.startTime,v={},w=0;w<m;v={Hf:void 0,xf:void 0},w++){v.xf=d.yd[w];var x=u;u=void 0;u=null!=d.mb?x+d.mb:d.timeline?d.timeline[w].end:x+b;v.Hf=null;v=new Zj(a+x,a+u,function(z){return function(){null==z.Hf&&(z.Hf=Vc(c(),[z.xf.Nk],l()));return z.Hf}}(v),v.xf.start,v.xf.end,e,n,a,p,[],"",null,null,ak,f);v.codecs=h;v.mimeType=
g;v.bandwidth=k;r.push(v)}return r}function tv(a){return[a.O.tc,a.sa.tc,a.Ga.tc].filter(kg).map(function(b){return Be(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.attributes.indexRange&&!a.Og&&(a.Og=!0);var c=Nc(b.attributes.media);b=Ie(b,"mediaRange",Ne,{start:0,end:null});return{Nk:c,start:b.start,end:b.end}})};function uv(a,b,c,d,e,f,g,h,k){k||a.O.Ue||(a.O.Ue=Tu(a,vv,"initialization"));var l=a.O.Ue?wv(a,g):null,m=xv(a);yv(m);var n=oe(a);if(m.Yd)return ov(a,l),{Qc:function(){var v=Ru(m.Yd,n.O.originalId,null,null,n.bandwidth||null,null);v=Vc(n.O.jb(),[v]);return nv(n,b,l,v,0,null,m.Ec)}};if(m.mb)return d||"image"===a.sa.contentType||"text"===a.sa.contentType||(c=a.ua.start,d=a.Ga.id,k=a.ua.duration,d=(d=null!=d&&f.get(d)||k)?c+d:Infinity,a.presentationTimeline.Vg(m.mb),a.presentationTimeline.Bi(c,d)),{Qc:function(){return zv(n,
m,e,l,f,g,h,a.O.yf)}};var p=null;d=d=null;a.Ga.id&&a.O.id&&(d=a.Ga.id+","+a.O.id,d=c.get(d))&&(p=d.segmentIndex);var r=a.ua.start,u=a.ua.duration?r+a.ua.duration:Infinity;p?(c=p,Av(c,m,r,u,l),c.fb(a.presentationTimeline.Hb())):p=new Bv(m,a.O.originalId,a.bandwidth,a.O.jb,a.Kb,r,u,l,g,a.O.yf);m.timeline&&"image"!==a.sa.contentType&&"text"!==a.sa.contentType&&a.presentationTimeline.Ci(p.h?p.h.timeline:[],r);d&&a.ic&&(d.segmentIndex=p);return{Qc:function(){p instanceof Bv&&0==p.getNumReferences()&&Av(p,
m,r,u,l);return Promise.resolve(p)}}}function vv(a){return a.Fc}function xv(a){var b=Su(a,vv),c=Tu(a,vv,"media"),d=Tu(a,vv,"index"),e=Tu(a,vv,"k"),f=0;e&&(f=parseInt(e,10));return{Ff:b.Ff,mb:b.mb,timescale:b.timescale,oe:b.oe,Ec:b.Ec,Eh:b.Eh,timeline:b.timeline,Cc:c&&Nc(c),Yd:d,mimeType:a.O.mimeType,codecs:a.O.codecs,bandwidth:a.bandwidth,Ok:f}}
function yv(a){var b=a.Yd?1:0;b+=a.timeline?1:0;b+=a.mb?1:0;if(0==b)throw new V(2,4,4002);1!=b&&(a.Yd&&(a.timeline=null),a.Ff=null,a.mb=null);if(!a.Yd&&!a.Cc)throw new V(2,4,4002);}
function zv(a,b,c,d,e,f,g,h){function k(J){var M=J-w,N=M*v,P=b.Ff,O=M*P;"BigInt"in window&&O>Number.MAX_SAFE_INTEGER&&(O=BigInt(M)*BigInt(P));N+=p;M=N+v;P=Math.min(M,m());var R=[],U=b.Ok;if(U)for(var ua=(P-N)/U,ba={},Ma=0;Ma<U;ba={Xi:void 0},Ma++){var Ra=N+ua*Ma,Aa=Ra+ua;ba.Xi=Ma+1;ba=new Zj(Ra,Aa,function(qa){return function(){var Ia=Ru(x,B,J,qa.Xi,z,O);return Vc(C(),[Ia],E())}}(ba),0,null,d,D,p,m(),[],"",null,null,ak,f);ba.codecs=a.O.codecs;ba.mimeType=a.O.mimeType;0==h?0<Ma&&ba.wd():0!=Ma%h&&ba.wd();
R.push(ba)}N=new Zj(N,P,function(){if(U)return[];var qa=Ru(x,B,J,null,z,O);return Vc(C(),[qa],E())},0,null,d,D,p,m(),R,"",null,null,ak,f,0<R.length);N.codecs=a.O.codecs;N.mimeType=a.O.mimeType;N.bandwidth=a.bandwidth;N.j=M;return N}function l(){var J=[Math.max(n.Hb(),p),Math.min(n.zc(),m())].map(function(M){return M-p});J=[Math.ceil(J[0]/v),Math.ceil(J[1]/v)-1];a.O.vb&&J[1]++;return J.map(function(M){return M+w})}function m(){var J=null!=r&&e.get(r)||u;return J?p+J:Infinity}var n=a.presentationTimeline,
p=a.ua.start,r=a.Ga.id,u=a.ua.duration,v=b.mb,w=b.oe,x=b.Cc,z=a.bandwidth||null,B=a.O.id,C=a.O.jb,E=a.Kb,D=p-b.Ec,A=l();c=a.ic?Math.max(A[0],A[1]-c+1):A[0];g=g||A[1];A=[];for(var F=c;F<=g;++F){var G=k(F);A.push(G)}var K=new em(A);A=n.zc()<m();F=n.V();if(A||F){var L=Math.max(c,g+1);c=v;a.O.vb&&(c=.1);K.Gf(c,function(){var J=n.Hb();K.fb(J);var M=t(l());M.next();M=M.next().value;for(var N=[];L<=M;){var P=k(L);N.push(P);L++}return J>m()&&!N.length?null:N})}return Promise.resolve(K)}
function wv(a,b){var c=a.O.Ue;c||(c=Tu(a,vv,"initialization"));if(!c)return null;c=Nc(c);var d=a.O.originalId,e=a.bandwidth||null,f=a.O.jb,g=a.Kb;b=new Xj(function(){var h=Ru(c,d,null,null,e,null);return Vc(f(),[h],g())},0,null,iv(a),null,null,b,a.sa.encrypted);b.codecs=a.O.codecs;b.mimeType=a.O.mimeType;a.ua&&(b.g=a.ua.start+a.ua.duration);return b}
function Bv(a,b,c,d,e,f,g,h,k,l){em.call(this,[]);this.h=a;this.H=b;this.C=c;this.G=d;this.J=e;this.j=f;this.l=g;this.u=h;this.B=k;this.I=l;Cv(this)}oa(Bv,em);q=Bv.prototype;q.getNumReferences=function(){return this.h?this.h.timeline.length:0};q.release=function(){em.prototype.release.call(this);this.h=null};
q.fb=function(a){if(this.h){for(var b=0,c=this.h.timeline,d=0;d<c.length;d+=1)if(c[d].end+this.j<=a)b+=1;else break;0<b&&(this.h.timeline=c.slice(b),this.g.length>=b&&(this.g=this.g.slice(b)),this.i+=b,0===this.getNumReferences()&&this.release())}};
function Av(a,b,c,d,e){Dv(a,e);if(a.h){c=a.h.timeline;a.h.Cc!==b.Cc&&(a.h.Cc=b.Cc);if(c.length){var f=c[c.length-1];b=b.timeline.filter(function(g){return g.end>f.end})}else b=b.timeline.slice();0<b.length&&a.h.timeline.push.apply(a.h.timeline,y(b));a.l!==d&&(a.l=d)}else a.h=b,a.j=c,a.l=d;Cv(a)}function Dv(a,b){if(a.u!==b){a.u=b;a=t(a.g);for(var c=a.next();!c.done;c=a.next())(c=c.value)&&ck(c,b)}}
function Cv(a){if(a.h&&!a.s){for(var b=[],c=t(a.h.timeline),d=c.next();!d.done;d=c.next())d=d.value,d.start>=a.l||0>=d.end||b.push(d);a.h.timeline=b;a.fb(a.j)}}
q.find=function(a){if(this.h&&this.h.timeline&&this.h.timeline.length&&a<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var b=this.h.timeline;if(a<this.j||a>=this.l)return null;for(var c=b.length-1,d=0;d<b.length;d++){var e=b[d],f=e.start+this.j;e=d<c?b[d+1].start+this.j:Infinity===this.l?e.end+this.j:this.l;if(a>=f&&a<e)return d+this.i}return null};
q.get=function(a){var b=this;a-=this.i;if(0>a||a>=this.getNumReferences()||!this.h)return null;var c=this.g[a];if(!c){var d=this.h.timeline[a],e=d.ll,f=d.Fh+this.h.Eh;c=this.j-this.h.Ec;var g=this.j+d.end,h=g;a===this.getNumReferences()-1&&Infinity!==this.l&&(h=this.l);for(var k=this.h.codecs,l=this.h.mimeType,m=this.h.bandwidth,n=[],p=(d.end-d.start)/d.dc,r={},u=0;u<d.dc;r={If:void 0,Yi:void 0},u++){var v=d.start+p*u,w=v+p;r.Yi=u+1;r.If=null;r=new Zj(this.j+v,this.j+w,function(x){return function(){if(!b.h)return[];
null==x.If&&(x.If=Ev(b.h.Cc,b.H,e,b.C,f,x.Yi,b.G,b.J));return x.If}}(r),0,null,this.u,c,this.j,this.l,[],"",null,null,ak,this.B);r.codecs=k;r.mimeType=l;r.bandwidth=m;0==this.I?0<u&&r.wd():0!=u%this.I&&r.wd();n.push(r)}c=new Zj(this.j+d.start,h,function(){return 0<d.dc||!b.h?[]:Ev(b.h.Cc,b.H,e,b.C,f,null,b.G,b.J)},0,null,this.u,c,this.j,this.l,n,"",null,null,ak,this.B,0<d.dc);c.codecs=k;c.mimeType=l;c.j=g;c.bandwidth=m;this.g[a]=c}return c};
q.Xb=function(a){Cv(this);for(var b=0;b<this.getNumReferences();b++){var c=this.get(b+this.i);c&&a(c)}};function Ev(a,b,c,d,e,f,g,h){a=Ru(a,b,c,f,d||null,e);return Vc(g(),[a],h()).map(function(k){return k.toString()})};function Fv(a){this.s=null;this.B=a;this.I=new sh;this.i=[];this.h=null;this.m=[];this.C=null;this.H=[];this.G=300;this.l=new Map;this.j=new Map;this.g=null;this.u="UNKNOWN"}Fv.prototype.configure=function(a){this.s=a};Fv.prototype.destroy=function(){this.B=this.s=null;this.i=[];this.h=null;this.m=[];this.H=[];this.l.clear();null!=this.g&&(this.g.stop(),this.g=null);return this.I.destroy()};Fv.prototype.setManifestType=function(a){this.u=a};
function Gv(a,b){var c,d,e,f,g,h,k;return Q(function(l){if(1==l.g)return c=Vc(a.i,[Hv(a,b)]),d=zh(c,a.s.retryParameters),e=a.B.networkingEngine.request(8,d),th(a.I,e),va(l,2),H(l,e.promise,4);if(2!=l.g)return f=l.h,g=Gc(f.data),h=JSON.parse(g),1==h.VERSION&&Iv(a,h,f.uri),xa(l,0);if((k=za(l))&&7001==k.code)return l.return();null!=a.g&&(a.g.stop(),a.g=null);a.g=new bc(function(){Gv(a,b)});a.g.$(a.G);I(l)})}
function Hv(a,b){if(!a.m.length)return b;b=new tb(b);var c=a.C||a.m[0],d=Math.round(a.B.getBandwidthEstimate()),e=b.g;"DASH"==a.u?(e.add("_DASH_pathway",c),e.add("_DASH_throughput",String(d))):"HLS"==a.u&&(e.add("_HLS_pathway",c),e.add("_HLS_throughput",String(d)));Kb(e)&&yb(b,e);return b.toString()}function Iv(a,b,c){null!=a.g&&(a.g.stop(),a.g=null);var d=b["RELOAD-URI"]||c;a.g=new bc(function(){Gv(a,d)});if(c=b.TTL)a.G=c;a.g.$(a.G);a.m=b["PATHWAY-PRIORITY"]||[];a.H=b["PATHWAY-CLONES"]||[]}
function Jv(a,b,c,d){var e=a.l.get(b);e||(e=new Map);e.set(c,d);a.l.set(b,e)}Fv.prototype.banLocation=function(a){this.j.set(a,Date.now()+6E4)};
function Kv(a,b,c){c=void 0===c?!1:c;b=a.l.get(b)||new Map;for(var d=[],e=t(a.m),f=e.next(),g={};!f.done;g={Bd:void 0},f=e.next())if(g.Bd=f.value,f=b.get(g.Bd))d.push({$g:g.Bd,location:f});else if(f=a.H.find(function(k){return function(l){return l.$l==k.Bd}}(g))){var h=b.get(f["BASE-ID"]);h&&(f["URI-REPLACEMENT"].kj?(h=new tb(h),wb(h,f["URI-REPLACEMENT"].kj),d.push({$g:g.Bd,location:h.toString()})):d.push({$g:g.Bd,location:h}))}e=Date.now();g=t(a.j.keys());for(f=g.next();!f.done;f=g.next())f=f.value,
h=a.j.get(f),e>h&&a.j.delete(f);d=d.filter(function(k){for(var l=t(a.j.keys()),m=l.next();!m.done;m=l.next())if(m.value.includes((new tb(k.location)).Eb))return!1;return!0});d.length&&(a.C=d[0].$g);d=d.map(function(k){return k.location});if(!d.length&&a.h)for(e=t(a.h.split(",")),g=e.next();!g.done;g=e.next())if(g=b.get(g.value))a.C=a.h,d.push(g);if(!d.length)for(b=t(b.values()),e=b.next();!e.done;e=b.next())d.push(e.value);return c?d:Vc(a.i,d)};function Lv(){this.l=[];this.h=[];this.g=[];this.j=[];this.i=[];this.u=this.s=!1;this.m=new Set}q=Lv.prototype;q.release=function(){for(var a=t(this.h.concat(this.g,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.h=[];this.g=[];this.j=[];this.i=[];this.l=[];this.u=this.s=!1;this.m.clear()};q.pk=function(){return this.l};q.Jg=function(){return this.j.slice()};q.Oj=function(){return this.i};
q.Wh=function(a,b){if(a){if("audio"==a.type)for(var c=t(this.h),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("video"==a.type)for(c=t(this.g),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a}),d.trickModeVideo&&(d.trickModeVideo.matchedStreams=d.trickModeVideo.matchedStreams.filter(function(e){return e!==a})),d.dependencyStream&&(d.dependencyStream.matchedStreams=d.dependencyStream.matchedStreams.filter(function(e){return e!==
a}));else if(a.type==bd)for(c=t(this.j),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});else if("image"==a.type)for(c=t(this.i),d=c.next();!d.done;d=c.next())d=d.value,d.matchedStreams=d.matchedStreams.filter(function(e){return e!==a});a.segmentIndex&&a.closeSegmentIndex();this.m.delete(b)}};
function Mv(a,b){var c=[],d=[],e=[],f=[];a=t(a);for(var g=a.next();!g.done;g=a.next()){var h=g.value;g=new Map(h.audioStreams.map(function(n){return[Nv(n),n]}));var k=new Map(h.videoStreams.map(function(n){return[Ov(n),n]})),l=new Map(h.textStreams.map(function(n){return[Pv(n),n]}));h=new Map(h.imageStreams.map(function(n){return[Qv(n),n]}));if(b){var m=Rv(bd);l.set(Pv(m),m);m=Rv("image");h.set(Qv(m),m)}c.push(g);d.push(k);e.push(l);f.push(h)}return{Mh:c,hj:d,bj:e,li:f}}
q.fg=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R,U,ua;return Q(function(ba){if(1==ba.g){e=dd;if(!b&&1==a.length)return f=Mv(a,!1),g=f.Mh,h=f.hj,k=f.bj,l=f.li,d.h=Array.from(g[0].values()),d.g=Array.from(h[0].values()),d.j=Array.from(k[0].values()),d.i=Array.from(l[0].values()),ba.A(2);m=c?d.m.size:0;n=-1;for(p=0;p<a.length;p++)r=a[p],d.m.has(r.id)||(d.m.add(r.id),-1==n&&(n=p));if(-1==n)return ba.return();u=Mv(a,!0);v=u.Mh;w=u.hj;x=u.bj;
z=u.li;return H(ba,Promise.all([Sv(d,d.h,v,n,Tv,Uv,m),Sv(d,d.g,w,n,Tv,Uv,m),Sv(d,d.j,x,n,Tv,Uv,m),Sv(d,d.i,z,n,Tv,Uv,m)]),2)}B=0;C=[];if(d.g.length&&d.h.length)for(L=t(d.h),J=L.next();!J.done;J=L.next())for(M=J.value,N=t(d.g),P=N.next();!P.done;P=N.next())O=P.value,R=Vb(M.drmInfos,O.drmInfos),M.drmInfos.length&&O.drmInfos.length&&!R.length||(U=(M.bandwidth||0)+(O.bandwidth||0),M.dependencyStream&&(U+=M.dependencyStream.bandwidth||0),O.dependencyStream&&(U+=O.dependencyStream.bandwidth||0),ua=B++,
C.push({id:ua,language:M.language,disabledUntilTime:0,primary:M.primary,audio:M,video:O,bandwidth:U,drmInfos:R,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(E=d.g.length?d.g:d.h,D=t(E),A=D.next();!A.done;A=D.next())F=A.value,G=B++,K=F.bandwidth||0,F.dependencyStream&&(K+=F.dependencyStream.bandwidth||0),C.push({id:G,language:F.language,disabledUntilTime:0,primary:F.primary,audio:F.type==e.aa?F:null,video:F.type==e.Ba?F:null,bandwidth:K,drmInfos:F.drmInfos,allowedByApplication:!0,
allowedByKeySystem:!0,decodingInfos:[]});d.l=C;I(ba)})};
function Vv(a){var b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N;return Q(function(P){switch(P.g){case 1:b=dd;if(1==a.length)return P.return(a[0]);c=a.map(function(O){return new Map(O.filter(function(R){return R.type===b.aa}).map(function(R){return[Nv(R),R]}))});d=a.map(function(O){return new Map(O.filter(function(R){return R.type===b.Ba}).map(function(R){return[Ov(R),R]}))});e=a.map(function(O){return new Map(O.filter(function(R){return R.type===b.Ra}).map(function(R){return[Pv(R),
R]}))});f=a.map(function(O){return new Map(O.filter(function(R){return R.type===b.Qf}).map(function(R){return[Qv(R),R]}))});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,l=Wv(b.Ra),k.set(Pv(l),l);m=t(f);for(n=m.next();!n.done;n=m.next())p=n.value,r=Wv(b.Qf),p.set(Qv(r),r);u=new Lv;return H(P,Sv(u,[],c,0,Xv,Yv,0),2);case 2:return v=P.h,H(P,Sv(u,[],d,0,Xv,Yv,0),3);case 3:return w=P.h,H(P,Sv(u,[],e,0,Xv,Yv,0),4);case 4:return x=P.h,H(P,Sv(u,[],f,0,Xv,Yv,0),5);case 5:z=P.h;B=0;if(w.length&&v.length)for(F=
t(v),G=F.next();!G.done;G=F.next())for(K=G.value,L=t(w),J=L.next();!J.done;J=L.next())M=J.value,N=B++,M.variantIds.push(N),K.variantIds.push(N);else for(C=w.concat(v),E=t(C),D=E.next();!D.done;D=E.next())A=D.value,A.variantIds=[B++];return P.return(w.concat(v).concat(x).concat(z))}})}
function Sv(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K;return Q(function(L){switch(L.g){case 1:h=[];for(k=0;k<c.length;k++)k>=d?h.push(new Set(c[k].values())):h.push(new Set);l=t(b);m=l.next();case 2:if(m.done){L.A(4);break}n=m.value;return H(L,Zv(a,n,c,d,f,h,g),5);case 5:p=L.h;if(!p)throw new V(2,4,4037);m=l.next();L.A(2);break;case 4:r=t(h);for(u=r.next();!u.done;u=r.next())for(v=u.value,w=t(v),x=w.next();!x.done;x=w.next())z=x.value,(B=$v(a,z,c,e,f,h))&&b.push(B);C=t(h);for(E=C.next();!E.done;E=
C.next())for(D=E.value,A=t(D),F=A.next(),G={};!F.done;G={uh:void 0},F=A.next())if(G.uh=F.value,!aw(G.uh)&&(K=b.some(function(J){return function(M){return bw(a,J.uh,M)}}(G))))throw new V(2,4,4037);return L.return(b)}})}function Zv(a,b,c,d,e,f,g){return Q(function(h){if(1==h.g)return cw(a,c,b,0<g),b.matchedStreams?b.segmentIndex?H(h,dw(b,d+g),2):h.A(2):h.return(!1);ew(b,d,e,f,g);return h.return(!0)})}
function dw(a,b){var c,d,e,f,g,h;return Q(function(k){if(1==k.g){c=[];d=a.matchedStreams;for(e=b;e<d.length;e++)f=d[e],c.push(f.createSegmentIndex()),f.trickModeVideo&&!f.trickModeVideo.segmentIndex&&c.push(f.trickModeVideo.createSegmentIndex()),f.dependencyStream&&!f.dependencyStream.segmentIndex&&c.push(f.dependencyStream.createSegmentIndex());return H(k,Promise.all(c),2)}if(a.segmentIndex instanceof hm)for(g=b;g<d.length;g++)h=d[g],h.segmentIndex&&a.segmentIndex.h.push(h.segmentIndex);I(k)})}
function $v(a,b,c,d,e,f){if(aw(b))return null;var g=d(b);cw(a,c,g);g.createSegmentIndex&&(g.createSegmentIndex=function(){return Q(function(h){if(g.segmentIndex)return h.A(0);g.segmentIndex=new hm;return H(h,dw(g,0),0)})});if(!g.matchedStreams||!g.matchedStreams.length)return null;ew(g,0,e,f,0);return g}
function ew(a,b,c,d,e){var f=a.matchedStreams;for(b+=e;b<f.length;b++){var g=f[b];c(a,g);var h=!0;"audio"==a.type&&0==od(a.language,g.language)&&(h=!1);if(h&&(d[b-e].delete(g),g.fullMimeTypes))for(g=t(g.fullMimeTypes.values()),h=g.next();!h.done;h=g.next())a.fullMimeTypes.add(h.value)}}
function Tv(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.roles=b.roles.slice();b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set(a.keyIds);b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):
null;b.trickModeVideo=null;b.dependencyStream=null;return b}function Xv(a){var b=Object.assign({},a);b.roles=b.roles.slice();b.keyIds=new Set(a.keyIds);b.segments=[];b.variantIds=[];b.closedCaptions=a.closedCaptions?new Map(a.closedCaptions):null;return b}
function Uv(a,b){function c(g,h){g||(g=[]);h=t(h);for(var k=h.next();!k.done;k=h.next())k=k.value,g.includes(k)||g.push(k);return g}a.roles=c(a.roles,b.roles);b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=c(a.emsgSchemeIdUris,b.emsgSchemeIdUris));for(var d=t(b.keyIds),e=d.next();!e.done;e=d.next())a.keyIds.add(e.value);null==a.originalId?a.originalId=b.originalId:(d=b.originalId||"")&&!a.originalId.endsWith(d)&&(a.originalId+=","+d);d=Vb(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!d.length)throw new V(2,
4,4038);a.drmInfos=d;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),d=t(b.closedCaptions),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.closedCaptions.set(e,f)}a.bandwidth&&b.bandwidth&&(a.bandwidth=Math.max(a.bandwidth,b.bandwidth));b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=Tv(b.trickModeVideo),a.trickModeVideo.matchedStreams=[],a.trickModeVideo.createSegmentIndex=function(){if(a.trickModeVideo.segmentIndex)return Promise.resolve();
for(var g=new hm,h=t(a.trickModeVideo.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.trickModeVideo.segmentIndex=g;return Promise.resolve()}),a.trickModeVideo.matchedStreams.push(b.trickModeVideo),Uv(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&(a.trickModeVideo.matchedStreams.push(b),Uv(a.trickModeVideo,b));b.dependencyStream?(a.dependencyStream||(a.dependencyStream=Tv(b.dependencyStream),a.dependencyStream.matchedStreams=[],a.dependencyStream.createSegmentIndex=
function(){if(a.dependencyStream.segmentIndex)return Promise.resolve();for(var g=new hm,h=t(a.dependencyStream.matchedStreams),k=h.next();!k.done;k=h.next())g.h.push(k.value.segmentIndex);a.dependencyStream.segmentIndex=g;return Promise.resolve()}),a.dependencyStream.matchedStreams.push(b.dependencyStream),Uv(a.dependencyStream,b.dependencyStream)):a.dependencyStream&&(a.dependencyStream.matchedStreams.push(b),Uv(a.dependencyStream,b))}
function Yv(a,b){var c=a.roles;c||(c=[]);for(var d=t(b.roles),e=d.next();!e.done;e=d.next())e=e.value,c.includes(e)||c.push(e);a.roles=c;c=t(b.keyIds);for(d=c.next();!d.done;d=c.next())a.keyIds.add(d.value);a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,y(b.segments));if(b.closedCaptions)for(a.closedCaptions||(a.closedCaptions=new Map),b=t(b.closedCaptions),c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,a.closedCaptions.set(c,d)}
function cw(a,b,c,d){d=(void 0===d?0:d)?c.matchedStreams:[];b=t(b);for(var e=b.next();!e.done;e=b.next()){e=fw(a,e.value,c);if(!e)return;d.push(e)}c.matchedStreams=d}
function fw(a,b,c){var d={audio:Nv,video:Ov,text:Pv,image:Qv}[c.type],e=null,f=d(c);if(b.has(f))e=b.get(f);else{f={audio:function(l,m){return bw(a,l,m)},video:function(l,m){return bw(a,l,m)},text:gw,image:hw}[c.type];for(var g={audio:iw,video:jw,text:kw,image:lw}[c.type],h=t(b.values()),k=h.next();!k.done;k=h.next())k=k.value,!f(c,k)||c.fastSwitching!=k.fastSwitching||e&&!g(c,e,k)||(e=k)}a.u&&!aw(e)&&b.delete(d(e));return e}
function mw(a,b){return a.mimeType!=b.mimeType?!1:nw(a.codecs)===nw(b.codecs)}q.Mi=function(a){this.s=a};q.Ti=function(a){this.u=a};function bw(a,b,c){return!mw(b,c)&&!a.s||b.drmInfos&&!Ub(b.drmInfos,c.drmInfos)?!1:!0}function gw(a,b){return b.language?a.forced!==b.forced||0==od(a.language,b.language)||b.kind!=a.kind?!1:!0:!0}function hw(){return!0}
function iw(a,b,c){var d=mw(a,b),e=mw(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=od(a.language,b.language);e=od(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}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;if(c.roles.length!==b.roles.length)return c.roles.length<
b.roles.length}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;d=ow(a.channelsCount,b.channelsCount,c.channelsCount);if(d==pw)return!0;if(d==qw)return!1;d=ow(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==pw?!0:d==qw?!1:a.bandwidth&&rw(a.bandwidth,b.bandwidth,c.bandwidth)==pw?!0:!1}
function jw(a,b,c){var d=mw(a,b),e=mw(a,c);if(d&&!e)return!1;if(!d&&e)return!0;d=ow(a.width*a.height,b.width*b.height,c.width*c.height);if(d==pw)return!0;if(d==qw)return!1;if(a.frameRate){d=ow(a.frameRate,b.frameRate,c.frameRate);if(d==pw)return!0;if(d==qw)return!1}return a.bandwidth&&rw(a.bandwidth,b.bandwidth,c.bandwidth)==pw?!0:!1}
function kw(a,b,c){var d=od(a.language,b.language),e=od(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(b.label!==c.label){if(a.label===b.label)return!1;if(a.label===c.label)return!0}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 lw(a,b,c){return ow(a.width*a.height,b.width*b.height,c.width*c.height)==pw?!0:!1}
function Wv(a){return{id:0,originalId:"",groupId:null,primary:!1,type:a,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}
function Rv(a){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new em([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:a,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,
baseOriginalId:null}}function ow(a,b,c){if(b==a&&a!=c)return qw;if(c==a&&a!=b)return pw;if(b>a){if(c<=a||c-a<b-a)return pw;if(c-a>b-a)return qw}else{if(c>a)return qw;if(a-c<a-b)return pw;if(a-c>a-b)return qw}return sw}function rw(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?pw:b<a?qw:sw}function aw(a){switch(a.type){case bd:return!a.language;case "image":return!a.tilesLayout;default:return!1}}
function Ov(a){return JSON.stringify([a.fastSwitching,a.width,a.frameRate,nw(a.codecs),a.mimeType,a.label,a.roles,a.closedCaptions?Array.from(a.closedCaptions.entries()):null,a.bandwidth,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}
function Nv(a){return JSON.stringify([a.fastSwitching,a.channelsCount,a.language,a.bandwidth,a.label,nw(a.codecs),a.mimeType,a.roles,a.audioSamplingRate,a.primary,a.dependencyStream?a.dependencyStream.baseOriginalId:null,Array.from(a.keyIds)])}function Pv(a){return JSON.stringify([a.language,a.label,a.codecs,a.mimeType,a.bandwidth,a.roles])}function Qv(a){return JSON.stringify([a.width,a.codecs,a.mimeType])}function nw(a){if(!tw.has(a)){var b=Tf(a);tw.set(a,b)}return tw.get(a)}
S("shaka.util.PeriodCombiner",Lv);Lv.prototype.setUseStreamOnce=Lv.prototype.Ti;Lv.prototype.setAllowMultiTypeVariants=Lv.prototype.Mi;Lv.prototype.combinePeriods=Lv.prototype.fg;Lv.prototype.deleteStream=Lv.prototype.Wh;Lv.prototype.getImageStreams=Lv.prototype.Oj;Lv.prototype.getTextStreams=Lv.prototype.Jg;Lv.prototype.getVariants=Lv.prototype.pk;var pw=1,sw=0,qw=-1,tw=new Map;function uw(a,b){var c=new DOMParser,d=vw.value()(a);a=null;try{a=c.parseFromString(d,"text/xml")}catch(e){return null}c=a.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;if(!("createNodeIterator"in document))return c;for(b=document.createNodeIterator(a,NodeFilter.SHOW_ALL);a=b.nextNode();)if(a instanceof HTMLElement||a instanceof SVGElement)return null;return c}function ww(a,b){try{var c=Jc(a);return uw(c,b)}catch(d){return null}}
var vw=new Tb(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function xw(){var a=this;this.j=this.g=null;this.B=[];this.i=null;this.va=1;this.H=[];this.l={hf:"",type:"",profiles:[],mc:null,vb:0,jb:null,ge:0};this.u=new Map;this.s=new Map;this.C=new Map;this.oa=new Map;this.m=new Lv;this.K=0;this.qa=new vd(5);this.L=new bc(function(){if(a.J&&!a.g.continueLoadingWhenPaused&&(a.I.Ea(a.J,"timeupdate"),a.J.paused)){a.I.ra(a.J,"timeupdate",function(){return yw(a)});return}yw(a)});this.P=new sh;this.N=null;this.G=[];this.Z=Infinity;this.ea=!1;this.h=null;this.M=0;
this.R=!1;this.I=new zd;this.J=null;this.T=!1;this.Y="";this.ba=function(){return!1};this.U=[]}q=xw.prototype;q.configure=function(a,b){var c=this.j&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.ba=b);c&&this.i&&this.i.presentationTimeline.V()&&this.L.Ia();this.h&&this.h.configure(this.g);this.m&&(this.m.Mi(this.g.dash.multiTypeVariantsAllowed&&Pd()),this.m.Ti(this.g.dash.useStreamOnceInPeriodFlattening))};
q.start=function(a,b){var c=this,d;return Q(function(e){if(1==e.g)return c.ea=b.isLowLatencyMode(),c.B=[a],c.j=b,H(e,zw(c),2);d=e.h;c.j&&Aw(c,d);if(!c.j)throw new V(2,7,7001);return e.return(c.i)})};
q.stop=function(){for(var a=t(this.s.values()),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.m&&this.m.release();this.g=this.j=null;this.B=[];this.i=null;this.s.clear();this.C.clear();this.u.clear();this.l={hf:"",type:"",profiles:[],mc:null,vb:0,jb:null,ge:0};this.m=null;null!=this.L&&(this.L.stop(),this.L=null);this.h&&this.h.destroy();this.I&&(this.I.release(),this.I=null);return this.P.destroy()};
q.update=function(){var a=this,b;return Q(function(c){if(1==c.g)return va(c,2),H(c,zw(a),4);if(2!=c.g)return xa(c,0);b=za(c);if(!a.j||!b)return c.return();a.j.onError(b);I(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(a){if(this.i&&this.i.presentationTimeline.V()){var b=a.video||a.audio;if(b&&b.segmentIndex){a=this.i.presentationTimeline.zc();var c=b.segmentIndex.find(a);null!=c&&(b=b.segmentIndex.get(c))&&(this.K=b.endTime-a,Aw(this,0))}}};
q.banLocation=function(a){this.h&&this.h.banLocation(a)};q.setMediaElement=function(a){this.J=a};
function zw(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(p){if(1==p.g)return b=4,c="MPD",d=Bw(a),e=a.B,d.length?(e=d,c="Patch",b=6):1<a.B.length&&a.h&&(f=Kv(a.h,"Location",!0),f.length&&(e=f)),g=zh(e,a.g.retryParameters),h=Date.now(),H(p,Cw(a,g,0,{type:b}),2);if(3!=p.g){k=p.h;if(!a.j)return p.return(0);k.uri&&k.uri!=k.originalUri&&!a.B.includes(k.uri)&&a.B.unshift(k.uri);l=new tb(k.uri);a.Y=l.g.toString();return H(p,Dw(a,k.data,k.uri,c),3)}m=Date.now();n=(m-h)/1E3;a.qa.sample(1,n);return p.return(n)})}
function Dw(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u;return Q(function(v){if(1==v.g){e=b;f=a.g.dash.manifestPreprocessor;g=Xn;if(f!=g){Fd("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead.");h=ww(e,d);if(!h)throw new V(2,4,4001,c);f(h);e=Kc(h.outerHTML)}k=qe(e,d);if(!k)throw new V(2,4,4001,c);l=a.g.dash.manifestPreprocessorTXml;m=Yn;l!=m&&l(k);if("Patch"===d)return v.return(Ew(a,k));if(n=a.g.dash.disableXlinkProcessing)return v.return(Fw(a,k,c));
p=a.g.dash.xlinkFailGracefully;r=Xu(k,a.g.retryParameters,p,c,a.j.networkingEngine);th(a.P,r);return H(v,r.promise,2)}u=v.h;return v.return(Fw(a,u,c))})}
function Fw(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R,U,ua,ba,Ma,Ra,Aa,qa,Ia,ya,Ea,ra,Ba,Va,vb,ib,jb,qb,Fb,Te,$c,we,tg,ug;return Q(function(ld){switch(ld.g){case 1:a.h&&a.h.l.clear();d=[c];e=[];f=new Map;g=Be(b,"Location");h=t(g);for(k=h.next();!k.done;k=h.next())if(l=k.value,m=l.attributes.serviceLocation,n=De(l))p=Vc(d,[n])[0],m&&(a.h?Jv(a.h,"Location",m,p):f.set(m,p)),e.push(p);a.h?(r=Kv(a.h,"Location",!0),0<r.length&&(d=a.B=r)):e.length&&(d=a.B=e);a.l.hf=b.attributes.id||
"";a.l.ge=Ie(b,"publishTime",Le)||0;a.H=Be(b,"PatchLocation");u=Promise.resolve();if((v=Fe(b,"ContentSteering"))&&a.j){w=v.attributes.defaultServiceLocation;if(a.h)a.h.i=d,a.h.h=w;else if(a.h=new Fv(a.j),a.h.configure(a.g),a.h.setManifestType("DASH"),a.h.i=d,a.h.h=w,x=De(v))(z=Ie(v,"queryBeforeStart",Se,!1))?u=Gv(a.h,x):Gv(a.h,x);B=t(f.keys());for(C=B.next();!C.done;C=B.next())E=C.value,D=f.get(E),Jv(a.h,"Location",E,D)}A=Be(b,"BaseURL");F=!1;if(a.h)for(G=t(A),K=G.next();!K.done;K=G.next())L=K.value,
J=L.attributes.serviceLocation,M=De(L),J&&M&&(Jv(a.h,"BaseURL",J,M),F=!0);a.U=null;F&&a.h||(N=A.map(De),a.U=Vc(d,N));P=function(){return a.h&&F?Kv(a.h,"BaseURL"):a.U?a.U:[]};a.l.jb=P;O=0;A&&A.length&&(O=Ie(A[0],"availabilityTimeOffset",Re)||0);a.l.vb=O;a.K=Ie(b,"minimumUpdatePeriod",Me,-1);R=Ie(b,"availabilityStartTime",Le);U=Ie(b,"timeShiftBufferDepth",Me);ua=a.g.dash.ignoreSuggestedPresentationDelay;ba=null;ua||(ba=Ie(b,"suggestedPresentationDelay",Me));Ma=a.g.dash.ignoreMaxSegmentDuration;Ra=null;
Ma||(Ra=Ie(b,"maxSegmentDuration",Me));Aa=b.attributes.type||"static";a.i&&a.i.presentationTimeline&&(a.T=a.i.presentationTimeline.V()&&"static"==Aa);a.l.type=Aa;if(a.i)for(qa=a.i.presentationTimeline,Ia=qa.Hb(),ya=t(a.s.values()),Ea=ya.next();!Ea.done;Ea=ya.next())ra=Ea.value,ra.segmentIndex&&ra.segmentIndex.fb(Ia);else Ba=a.g.dash.ignoreMinBufferTime,Va=0,Ba||(Va=Ie(b,"minBufferTime",Me)||0),vb=0,vb=null!=ba?Math.min(ba,U||Infinity):0<a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:Math.min(1.5*
Va,U||Infinity),qa=new Kl(R,vb,a.g.dash.autoCorrectDrift);qa.fd("static"==Aa);(ib=qa.V())&&!isNaN(a.g.availabilityWindowOverride)&&(U=a.g.availabilityWindowOverride);null==U&&(U=Infinity);qa.zf(U);jb=b.attributes.profiles||"";a.l.profiles=jb.split(",");qb={ic:"static"!=Aa,presentationTimeline:qa,Ga:null,ua:null,sa:null,O:null,bandwidth:0,Og:!1,vb:O,mc:null,profiles:jb.split(","),roles:null,Kb:function(){return""}};return H(ld,u,2);case 2:a.M=0;Fb=Gw(a,qb,P,b,!1);Te=Fb.duration;$c=Fb.periods;("static"!=
Aa||a.T)&&Fb.Yh||qa.ub(Te||Infinity);a.R&&a.ea&&qa.Ni(a.Z);qa.Vg(Ra||1);a.R&&a.ea&&(we=null!=ba?ba:a.g.defaultPresentationDelay,qa.mh(we));if(!a.i)return H(ld,a.m.fg($c,qb.ic),6);a.i.periodCount=$c.length;a.i.gapCount=a.M;return H(ld,Hw(a,$c,!1),4);case 6:a.i={presentationTimeline:qa,variants:a.m.l,textStreams:a.m.Jg(),imageStreams:a.m.i,offlineSessionIds:[],sequenceMode:a.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Iw(b),nextUrl:Jw(b),periodCount:$c.length,
gapCount:a.M,isLowLatency:a.R,startTime:null};if(!qa.ej()){ld.A(7);break}tg=Be(b,"UTCTiming");return H(ld,Kw(a,P,tg),8);case 8:ug=ld.h;if(!a.j)return ld.return();qa.Oi(ug);case 7:qa.cf(),a.m&&!a.i.presentationTimeline.V()&&a.m.release();case 4:a.j.makeTextStreamsForClosedCaptions(a.i),Lw(a),I(ld)}})}function Hw(a,b,c){var d;return Q(function(e){if(1==e.g)return H(e,a.m.fg(b,!0,c),2);a.i.variants=a.m.l;d=a.m.Jg();0<d.length&&(a.i.textStreams=d);a.i.imageStreams=a.m.i;a.j.filter(a.i);I(e)})}
function Ew(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J;return Q(function(M){if(1==M.g){c=b.attributes.mpdId;d=Ie(b,"originalPublishTime",Le);if(!c||c!==a.l.hf||d!==a.l.ge)throw a.H=[],new V(1,4,4052);e=[];f=[];g=new Set;h=t(Ae(b));for(k=h.next();!k.done;k=h.next())if(l=k.value,m=Ve(l.attributes.sel||""),n=m[m.length-1],p=De(l)||"","MPD"===n.name)if("mediaPresentationDuration"===n.wc){r=De(l)||"";var N=Me(r);if(null!=N){a.l.mc=N;for(var P=t(a.u.values()),O=P.next();!O.done;O=P.next())O.value.mc=
N}}else if("type"===n.wc){a.i.presentationTimeline.fd("static"==p);a.l.type=p;N=t(a.u.values());for(P=N.next();!P.done;P=N.next())P.value.ic="dynamic"==p;"static"==p&&(a.K=-1)}else"publishTime"===n.wc?a.l.ge=Le(p)||0:null===n.wc&&"add"===l.tagName&&f.push(l);else if("PatchLocation"===n.name)We(a.H,l);else if("Period"===n.name)"add"===l.tagName?f.push(l):"remove"===l.tagName&&n.id&&Mw(a,n.id);else if("SegmentTemplate"===n.name){P=Ve(l.attributes.sel||"");N=P[P.length-1];if(N.wc){P=Nw(a,P);O=De(l)||
"";for(var R=t(P),U=R.next();!U.done;U=R.next())U=a.u.get(U.value),Ye(U.O.Fc,l.tagName,N.wc,O);N=P}else N=[];u=N;v=t(u);for(w=v.next();!w.done;w=v.next())x=w.value,g.add(x)}else if("SegmentTimeline"===n.name||"S"===n.name){N=Ve(l.attributes.sel||"");N=Nw(a,N);P=t(N);for(O=P.next();!O.done;O=P.next())O=a.u.get(O.value),O=Uu(O,vv,"SegmentTimeline"),R=Be(O,"S"),We(R,l),O.children=R;z=N;B=t(z);for(C=B.next();!C.done;C=B.next())E=C.value,g.add(E)}D=t(g);for(A=D.next();!A.done;A=D.next())F=A.value,Ow(a,
F);G=t(f);for(K=G.next();!K.done;K=G.next())L=K.value,e.push.apply(e,y(Pw(a,L)));if(!e.length)return M.A(2);a.i.periodCount+=e.length;a.i.gapCount=a.M;return H(M,Hw(a,e,!0),2)}"static"==a.l.type&&(J=a.l.mc,a.i.presentationTimeline.ub(J||Infinity));I(M)})}
function Pw(a,b){return Gw(a,{ic:"dynamic"==a.l.type,presentationTimeline:a.i.presentationTimeline,Ga:null,ua:null,sa:null,O:null,bandwidth:0,Og:!1,vb:a.l.vb,profiles:a.l.profiles,mc:a.l.mc,roles:null,Kb:function(){return""}},a.l.jb,b,!0).periods}function Mw(a,b){a.i.periodCount--;for(var c=t(a.u.keys()),d=c.next();!d.done;d=c.next())if(d=d.value,d.startsWith(b)){var e=a.u.get(d);Uu(e,vv,"SegmentTimeline").children=[];Ow(a,d);a.u.delete(d)}a.G=a.G.filter(function(f){return f!==b})}
function Nw(a,b){var c="",d="",e=-1,f="";b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,"Period"===g.name?c=g.id:"AdaptationSet"===g.name?(d=g.id,null!==g.position&&(e=g.position)):"Representation"===g.name&&(f=g.id);b=[];if(f)b.push(c+","+f);else if(d)for(e=t(a.u.values()),a=e.next();!a.done;a=e.next())a=a.value,a.Ga.id===c&&a.sa.id===d&&a.O.id&&b.push(c+","+a.O.id);else if(-1<e)for(d=t(a.u.values()),a=d.next();!a.done;a=d.next())a=a.value,a.Ga.id===c&&a.sa.position===e&&a.O.id&&b.push(c+
","+a.O.id);return b}function Ow(a,b){var c=a.u.get(b),d=a.s.get(b);d.segmentIndex&&d.segmentIndex.fb(a.i.presentationTimeline.Hb());try{var e=uv(c,function(f,g,h,k){return Qw(a,f,g,h,k)},a.s,!0,a.g.dash.initialSegmentLimit,a.oa,c.O.aesKey,null,!0);d.createSegmentIndex=function(){return Q(function(f){if(1==f.g)return d.segmentIndex?f.A(0):H(f,e.Qc(),3);d.segmentIndex=f.h;I(f)})}}catch(f){if(b=c.O.contentType,b!=bd&&"application"!=b&&"image"!=b||4002!=f.code)throw f;}}
function Iw(a){var b=Fe(a,"ServiceDescription");if(!b)return null;a=Fe(b,"Latency");b=Fe(b,"PlaybackRate");if(!a&&!b)return null;var c={};a&&("target"in a.attributes&&(c.targetLatency=parseInt(a.attributes.target,10)/1E3),"max"in a.attributes&&(c.maxLatency=parseInt(a.attributes.max,10)/1E3),"min"in a.attributes&&(c.minLatency=parseInt(a.attributes.min,10)/1E3));b&&("max"in b.attributes&&(c.maxPlaybackRate=parseFloat(b.attributes.max)),"min"in b.attributes&&(c.minPlaybackRate=parseFloat(b.attributes.min)));
return c}function Jw(a){a=Be(a,"SupplementalProperty");if(!a.length)return null;a=t(a);for(var b=a.next();!b.done;b=a.next())if(b=b.value,"urn:mpeg:dash:chaining:2016"==b.attributes.schemeIdUri)return b.attributes.value;return null}
function Gw(a,b,c,d,e){var f=b.mc;f||(f=Ie(d,"mediaPresentationDuration",Me),a.l.mc=f);var g=0;a.i&&a.i.presentationTimeline&&a.T&&(g=a.i.presentationTimeline.ac());var h=[],k=g;d=Be(d,"Period");for(var l=0;l<d.length;l++){var m=d[l],n=d[l+1],p=Ie(m,"start",Me,k),r=m.attributes.id,u=Ie(m,"duration",Me);p=0==l&&0==p&&a.T?g:p;var v=null;if(n){var w=Ie(n,"start",Me);null!=w&&(v=w-p+g)}else null!=f&&(v=f-p+g);w=ed;v&&u&&Math.abs(v-u)>w&&v>u&&a.M++;null==v&&(v=u);if(!(null!==a.N&&null!==r&&null!==p&&p<
a.N)||a.G.includes(r)||l+1==d.length){null!==p&&(null===a.N||p>a.N)&&(a.N=p);k=Rw(a,b,c,{start:p,duration:v,node:m,ni:null==v||!n});h.push(k);b.Ga.id&&v&&a.oa.set(b.Ga.id,v);if(null==v){k=null;break}k=p+v}}if(e)for(b=t(h),c=b.next();!c.done;c=b.next())c=c.value.id,a.G.includes(c)||a.G.push(c);else a.G=h.map(function(x){return x.id});return null!=f?{periods:h,duration:f+g,Yh:!1}:{periods:h,duration:k,Yh:!0}}
function Lw(a){var b=Array.from(a.C.keys()).filter(function(h){return!a.G.includes(h)});b=t(b);for(var c=b.next();!c.done;c=b.next()){c=c.value;for(var d=!0,e=t(a.C.get(c)),f=e.next();!f.done;f=e.next()){f=f.value;var g=a.s.get(f);g&&(g.segmentIndex&&0!=g.segmentIndex.getNumReferences()?d=!1:(a.m&&a.m.Wh(g,c),a.s.delete(f)))}d&&a.C.delete(c)}}
function Rw(a,b,c,d){b.Ga=Sw(a,d.node,null,c);b.ua=d;b.Ga.vb=b.vb;b.Ga.id||(b.Ga.id="__shaka_period_"+d.start);var e=Be(d.node,"EventStream");c=b.presentationTimeline.Hb();e=t(e);for(var f=e.next();!f.done;f=e.next())Tw(a,d.start,d.duration,f.value,c);c=Be(d.node,"SupplementalProperty");c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,"urn:mpeg:dash:urlparam:2014"==e.attributes.schemeIdUri&&(e=Uw(a,e)))b.Kb=e;c=Be(d.node,"AdaptationSet").map(function(r,u){return Vw(a,b,u,r)}).filter(kg);if(b.ic){e=
[];f=t(c);for(var g=f.next();!g.done;g=f.next()){g=t(g.value.cl);for(var h=g.next();!h.done;h=g.next())e.push(h.value)}if(e.length!=(new Set(e)).size)throw new V(2,4,4018);}e=new Map;f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.zj),h=g.next();!h.done;h=g.next()){var k=t(h.value);h=k.next().value;k=k.next().value;e.set(h,k)}if(e.size)for(f=null,g=t(c),h=g.next();!h.done;h=g.next()){h=h.value;k=[];for(var l=t(h.streams),m=l.next(),n={};!m.done;n={vh:void 0},m=l.next())if(n.vh=m.value,e.has(n.vh.originalId)){f||
(f=Be(d.node,"AdaptationSet").map(function(r,u){return Vw(a,b,u,r)}).filter(kg));m=t(f);for(var p=m.next();!p.done;p=m.next())if(p=p.value.streams.find(function(r){return function(u){return u.originalId==r.vh.originalId}}(n)))p.dependencyStream=e.get(p.originalId),k.push(p)}k.length&&h.streams.push.apply(h.streams,y(k))}d=c.filter(function(r){return!r.Dh});c=c.filter(function(r){return r.Dh});if(!a.g.disableIFrames)for(c=t(c),e=c.next();!e.done;e=c.next())for(e=e.value,f=e.Dh.split(" "),g=t(d),h=
g.next();!h.done;h=g.next())if(h=h.value,f.includes(h.id))for(h=t(h.streams),k=h.next();!k.done;k=h.next())ah(k.value,e.streams);c=Ww(a.g.disableAudio,d,"audio");e=Ww(a.g.disableVideo,d,"video");f=Ww(a.g.disableText,d,bd);d=Ww(a.g.disableThumbnails,d,"image");if(0===e.length&&0===c.length)throw new V(2,4,4004);return{id:b.Ga.id,audioStreams:c,videoStreams:e,textStreams:f,imageStreams:d}}
function Ww(a,b,c){return a||!b.length?[]:b.reduce(function(d,e){if(e.contentType!=c)return d;d.push.apply(d,y(e.streams));return d},[])}
function Vw(a,b,c,d){function e(J){var M=J.attributes["dvb:fontFamily"];J=J.attributes["dvb:url"];M&&J&&(J=Vc(b.sa.jb(),[J],b.Kb()),a.j.addFont(M,J[0]))}function f(J){switch(J){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function g(J){switch(J){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.sa=Sw(a,d,b.Ga,null);b.sa.position=c;var h=!1;c=Be(d,"Role");var k=c.map(function(J){return J.attributes.value}).filter(kg),
l=void 0,m=b.sa.contentType==bd;m&&(l="subtitle");c=t(c);for(var n=c.next();!n.done;n=c.next()){n=n.value;var p=n.attributes.schemeIdUri;if(null==p||"urn:mpeg:dash:role:2011"==p)switch(n=n.attributes.value,n){case "main":h=!0;break;case "caption":case "subtitle":l=n}}var r=Be(d,"EssentialProperty");c=null;var u=!1;n=null;p=!1;r=t(r);for(var v=r.next();!v.done;v=r.next()){v=v.value;var w=v.attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==w)c=v.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==
w)var x=g(parseInt(v.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==w)var z=f(parseInt(v.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=w&&("urn:mpeg:dash:ssr:2023"==w&&a.g.dash.enableFastSwitching?u=!0:"urn:dvb:dash:fontdownload:2014"==w?e(v):"urn:mpeg:dash:urlparam:2014"==w?(n=Uw(a,v))||(p=!0):p=!0)}if(p)return null;var B=null;p=Be(d,"SupplementalProperty");p=t(p);for(r=p.next();!r.done;r=p.next())r=r.value,v=r.attributes.schemeIdUri,"http://dashif.org/guidelines/last-segment-number"==
v?B=parseInt(r.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?x=g(parseInt(r.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==v?z=f(parseInt(r.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==v?e(r):"urn:mpeg:dash:urlparam:2014"==v&&(n=Uw(a,r));n&&(b.Kb=n);n=Be(d,"Accessibility");var C=new Map,E;n=t(n);for(p=n.next();!p.done;p=n.next())if(r=p.value,p=r.attributes.schemeIdUri,r=r.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=p||a.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=
p||a.g.disableText)"urn:mpeg:dash:role:2011"==p?null!=r&&(k.push(r),"captions"==r&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==p&&("1"==r?E="visually impaired":"2"==r&&(E="hard of hearing"));else if(p=1,null!=r)for(r=t(r.split(";")),v=r.next();!v.done;v=r.next()){w=v.value;var D=v=void 0;w.includes("=")?(w=w.split("="),v="svc"+w[0],D=w[1].split(",")[0].split(":").pop()):(v="svc"+p,p++,D=w);C.set(v,hd(D))}else C.set("svc1","und");else if(p=1,null!=r)for(r=r.split(";"),v=t(r),w=v.next();!w.done;w=
v.next()){D=w.value;var A=w=void 0;D.includes("=")?(D=D.split("="),w=D[0].startsWith("CC")?D[0]:"CC"+D[0],A=D[1]||"und"):(w="CC"+p,2==r.length?p+=2:p++,A=D);C.set(w,hd(A))}else C.set("CC1","und");n=Be(d,"ContentProtection");var F=Ju(n,a.g.ignoreDrmInfo,a.g.dash.keySystemsByURI);b.sa.encrypted=0<n.length;var G=hd(b.sa.language||"und"),K=b.sa.label,L=new Map;d=Be(d,"Representation");if(!a.g.ignoreSupplementalCodecs){n=[];p=t(d);for(r=p.next();!r.done;r=p.next())if(v=r.value,r=Je(v,"urn:scte:dash:scte214-extensions",
"supplementalCodecs"))v=ne(v),v.attributes.codecs=r.split(" ").join(","),v.attributes.id&&(v.attributes.supplementalId=v.attributes.id+"_supplementalCodecs"),n.push(v);d.push.apply(d,y(n))}n=d.map(function(J){var M=Xw(a,b,F,l,G,K,h,k,C,J,E,B);return M&&(M.hdr=M.hdr||x,M.colorGamut=M.colorGamut||z,M.fastSwitching=u,J=J.attributes.dependencyId)?(M.baseOriginalId=J,L.set(J,M),null):M}).filter(function(J){return!!J});if(0==n.length&&0==L.size){c="image"==b.sa.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||
m||c)return null;throw new V(2,4,4003);}if(!b.sa.contentType||"application"==b.sa.contentType)for(b.sa.contentType=Yw(n[0].mimeType,n[0].codecs),m=t(n),p=m.next();!p.done;p=m.next())p.value.type=b.sa.contentType;m=b.sa.id||"__fake__"+a.va++;p=t(n);for(r=p.next();!r.done;r=p.next()){r=r.value;v=t(F.drmInfos);for(w=v.next();!w.done;w=v.next())w=w.value,w.keyIds=w.keyIds&&r.keyIds?new Set([].concat(y(w.keyIds),y(r.keyIds))):w.keyIds||r.keyIds;r.groupId=m}d=d.map(function(J){return J.attributes.supplementalId||
J.attributes.id}).filter(kg);return{id:m,contentType:b.sa.contentType,language:G,Lm:h,streams:n,drmInfos:F.drmInfos,Dh:c,cl:d,zj:L}}
function Uw(a,b){if((b=Ge(b,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&Ie(b,"useMPDUrlQuery",Se,!1)){var c=b.attributes.queryTemplate;if(c)return function(){return"$querypart$"==c?a.Y:c.split("&").map(function(d){if("$querypart$"==d)return a.Y;var e=/\$query:(.*?)\$/g.exec(d);if(e&&2==e.length){e=e[1];var f=(new Ab(a.Y)).get(e);if(f.length)return e+"="+f[0]}return d}).join("&")}}return null}
function Xw(a,b,c,d,e,f,g,h,k,l,m,n){b.O=Sw(a,l,b.sa,null);var p=b.O.id;a.Z=Math.min(a.Z,b.O.vb);a.R=0<a.Z;if(!Zw(b.O))return null;var r=b.ua.start;b.bandwidth=Ie(l,"bandwidth",Pe)||0;b.roles=h;var u=Be(l,"SupplementalProperty"),v=Be(l,"EssentialProperty"),w=Be(l,"ContentProtection");l=null;var x=v.find(function(P){return"urn:mpeg:dash:urlparam:2014"==P.attributes.schemeIdUri});x?l=Uw(a,x):(x=u.find(function(P){return"urn:mpeg:dash:urlparam:2014"==P.attributes.schemeIdUri}))&&(l=Uw(a,x));l&&(b.Kb=
l);x=b.O.contentType;l=x==bd||"application"==x;x="image"==x;w.length&&(b.sa.encrypted=!0);try{var z=void 0;if(c.Yf){var B=b.O.jb,C=b.Kb,E=Vc(B(),[c.Yf.Gk],C()),D=zh(E,a.g.retryParameters);z={bitsKey:128,blockCipherMode:"CBC",iv:c.Yf.iv,firstMediaSequenceNumber:0,fetchKey:function(){var P,O,R;return Q(function(U){if(1==U.g)return H(U,Cw(a,D,6),2);if(3!=U.g){P=U.h;if(!P.data||16!=P.data.byteLength)throw new V(2,4,4049);O={name:"AES-CBC"};R=z;return H(U,window.crypto.subtle.importKey("raw",P.data,O,
!0,["decrypt"]),3)}R.cryptoKey=U.h;z.fetchKey=void 0;I(U)})}}}b.O.aesKey=z;B=function(P,O,R,U){return Qw(a,P,O,R,U)};if(b.O.Fd)var A=jv(b,B,z);else if(b.O.tc)A=pv(b,a.s,z);else if(b.O.Fc)A=uv(b,B,a.s,!!a.i,a.g.dash.initialSegmentLimit,a.oa,z,n,!1);else{var F=b.ua.duration||0,G=b.O.jb,K=b.O.mimeType,L=b.O.codecs;A={Qc:function(){var P=gm(r,F,G());P.Xb(function(O){O.mimeType=K;O.codecs=L});return Promise.resolve(P)}}}}catch(P){if((l||x)&&4002==P.code)return null;throw P;}n=Nu(w,c,a.g.ignoreDrmInfo,
a.g.dash.keySystemsByURI);n=new Set(n?[n]:[]);w=!1;u.some(function(P){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==P.attributes.schemeIdUri&&"JOC"==P.attributes.value})&&(w=!0);u=!1;l&&(u=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var J;if(x&&((v=v.find(function(P){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(P.attributes.schemeIdUri)}))&&(J=v.attributes.value),!J))return null;var M;l=b.O.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&
(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(M="PQ");v=b.O.id?b.Ga.id+","+b.O.id:"";a.H.length&&p&&a.u.set(b.Ga.id+","+p,$w(b));var N=v&&a.s.has(v)?a.s.get(v):{id:a.va++,originalId:b.O.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){N.segmentIndex&&(N.segmentIndex.release(),N.segmentIndex=null)},segmentIndex:null,mimeType:b.O.mimeType,codecs:l,frameRate:b.O.frameRate,pixelAspectRatio:b.O.pixelAspectRatio,bandwidth:b.bandwidth,
width:b.O.width,height:b.O.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:n,language:e,originalLanguage:b.sa.language,label:f,type:b.sa.contentType,primary:g,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:b.O.emsgSchemeIdUris,roles:h,forced:u,channelsCount:b.O.kf,audioSamplingRate:b.O.audioSamplingRate,spatialAudio:w,closedCaptions:k,hdr:M,colorGamut:void 0,videoLayout:void 0,tilesLayout:J,accessibilityPurpose:m,external:!1,fastSwitching:!1,fullMimeTypes:new Set([Mf(b.O.mimeType,
b.O.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};N.createSegmentIndex=function(){var P;return Q(function(O){if(1==O.g){if(N.segmentIndex)return O.A(0);P=N;return H(O,A.Qc(),3)}P.segmentIndex=O.h;I(O)})};v&&b.ic&&!a.s.has(v)&&(b=b.Ga.id||"",a.C.has(b)||a.C.set(b,[]),a.s.set(v,N),a.C.get(b).push(v));return N}
function $w(a){function b(c){if(!c)return null;c=oe(c);c.Fd=null;c.tc=null;c.Fc=$e(c.Fc);return c}a=oe(a);a.Ga=b(a.Ga);a.sa=b(a.sa);a.O=b(a.O);a.ua&&(a.ua=oe(a.ua),a.ua.node=null);return a}
function yw(a){var b,c;return Q(function(d){switch(d.g){case 1:return b=0,va(d,2),H(d,zw(a),4);case 4:b=d.h;xa(d,3);break;case 2:if(c=za(d),a.j){if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.j.onError(c),d.return();c.severity=1;a.j.onError(c)}case 3:if(!a.j)return d.return();a.j.onManifestUpdated();Aw(a,b);I(d)}})}function Aw(a,b){if(!(0>a.K)){var c=a.K;0<=a.g.updatePeriod&&(c=a.g.updatePeriod);a.L.$(Math.max(c-b,xd(a.qa)))}}
function Sw(a,b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,kf:null,audioSamplingRate:null,vb:0,yf:0,encrypted:!1};d=d||c.jb;var e=b.attributes.id,f=b.attributes.supplementalId,g=Be(b,"BaseURL"),h,k=!1;if(a.h)for(var l=t(g),m=l.next();!m.done;m=l.next()){var n=m.value;m=n.attributes.serviceLocation;n=De(n);m&&n&&(Jv(a.h,e,m,n),k=!0)}k&&a.h||(h=g.map(De));l=b.attributes.contentType||c.contentType;m=b.attributes.mimeType||c.mimeType;n=
Jm([b.attributes.codecs||c.codecs]).join(",");var p=Ie(b,"frameRate",Ue)||c.frameRate,r=b.attributes.sar||c.pixelAspectRatio,u=ax(Be(b,"InbandEventStream"),c.emsgSchemeIdUris),v=Be(b,"AudioChannelConfiguration");v=bx(v)||c.kf;var w=Ie(b,"audioSamplingRate",Qe)||c.audioSamplingRate;l||(l=Yw(m,n));var x=Fe(b,"SegmentBase"),z=Fe(b,"SegmentTemplate"),B=x?Ie(x,"availabilityTimeOffset",Re)||0:0,C=z?Ie(z,"availabilityTimeOffset",Re)||0:0,E=g&&g.length?Ie(g[0],"availabilityTimeOffset",Re)||0:0;B=c.vb+E+B+
C;C=null;(E=Fe(b,"SegmentSequenceProperties"))&&(E=Fe(E,"SAP"))&&(C=Ie(E,"cadence",Oe));E=b.attributes.label;var D=Be(b,"Label");D&&D.length&&(D=D[0],Ce(D)&&(E=Ce(D)));return{jb:function(){return Vc(d(),g.length?a.h&&k?Kv(a.h,e):h?h:[]:[])},Fd:x||c.Fd,tc:Fe(b,"SegmentList")||c.tc,Fc:z||c.Fc,width:Ie(b,"width",Qe)||c.width,height:Ie(b,"height",Qe)||c.height,contentType:l,mimeType:m,codecs:n,frameRate:p,pixelAspectRatio:r,emsgSchemeIdUris:u,id:f||e,originalId:e,language:b.attributes.lang,kf:v,audioSamplingRate:w,
vb:B,Ue:null,yf:C||c.yf,label:E||null,encrypted:!1}}function ax(a,b){b=b.slice();a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value.attributes.schemeIdUri,b.includes(c)||b.push(c);return b}
function bx(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;var c=b.attributes.schemeIdUri;if(c&&(b=b.attributes.value))switch(c){case "urn:mpeg:dash:outputChannelPositionList:2012":return b.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(b,10);if(!b)continue;return b;case "tag:dolby.com,2015:dash:audio_channel_configuration:2015":c=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2];b=parseInt(b,
16);if(!b)continue;for(var d=0,e=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":c=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse();b=parseInt(b,16);if(!b)continue;for(e=d=0;e<c.length;e++)b&1<<e&&(d+=c[e]);if(d)return d;continue;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(c=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(b=parseInt(b,10))&&0<b&&b<c.length)return c[b]}}return null}
function Zw(a){var b=a.Fd?1:0;b+=a.tc?1:0;b+=a.Fc?1:0;if(0==b)return a.contentType==bd||"application"==a.contentType?!0:!1;1!=b&&(a.Fd&&(a.tc=null),a.Fc=null);return!0}
function cx(a,b,c,d){var e,f,g,h,k,l,m;return Q(function(n){if(1==n.g)return e=[Nc(c)],f=Vc(b(),e),g=zh(f,a.g.retryParameters),g.method=d,h=a.j.networkingEngine.request(4,g,{isPreload:a.ba()}),th(a.P,h),H(n,h.promise,2);k=n.h;if("HEAD"==d){if(!k.headers||!k.headers.date)return n.return(0);l=k.headers.date}else l=Gc(k.data);m=Date.parse(l);return isNaN(m)?n.return(0):n.return(m-Date.now())})}
function Kw(a,b,c){var d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.attributes.schemeIdUri,value:p.attributes.value}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){n.A(4);break}h=g.value;va(n,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return n.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return n.A(8);
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":db("NTP UTCTiming scheme is not supported");break;default:db("Unrecognized scheme in UTCTiming element",k)}n.A(9);break;case 7:return H(n,cx(a,b,l,"HEAD"),10);case 10:return n.return(n.h);case 8:return H(n,cx(a,b,l,"GET"),11);case 11:return n.return(n.h);case 9:xa(n,
3);break;case 5:za(n);case 3:g=f.next();n.A(2);break;case 4:return db("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),n.return(0)}})}
function Tw(a,b,c,d,e){var f=d.attributes.schemeIdUri||"",g=d.attributes.value||"",h=Ie(d,"timescale",Qe)||1,k=Ie(d,"presentationTimeOffset",Qe)||0;d=t(Be(d,"Event"));for(var l=d.next();!l.done;l=d.next()){l=l.value;var m=Ie(l,"presentationTime",Qe)||0,n=Ie(l,"duration",Qe)||0;m=Math.max((m-k)/h+b,b);n=m+n/h;null!=c&&(m=Math.min(m,b+c),n=Math.min(n,b+c));n<e||(l={schemeIdUri:f,value:g,startTime:m,endTime:n,id:l.attributes.id||"",timescale:h,eventElement:Ze(l),eventNode:$e(l)},a.j.onTimelineRegionAdded(l))}}
function Qw(a,b,c,d,e){var f,g,h,k;return Q(function(l){if(1==l.g)return f=Fh,g=e?0:1,h=Nm(b,c,d,a.g.retryParameters),H(l,Cw(a,h,f,{type:g}),2);k=l.h;return l.return(k.data)})}function Yw(a,b){b=Mf(a,b);return cg(b)?bd:a.split("/")[0]}function Cw(a,b,c,d){d||(d={});d.isPreload=a.ba();b=a.j.networkingEngine.request(c,b,d);th(a.P,b);return b.promise}
function Bw(a){var b=a.l.ge;if(!a.l.hf||!b||!a.H.length)return[];var c=Date.now()/1E3,d=a.H.filter(function(e){e=Qe(e.attributes.ttl);return!e||b+e>c}).map(De).filter(kg);return d.length?Vc(a.B,d):[]}S("shaka.dash.DashParser",xw);dj("application/dash+xml",function(){return new xw});dj("video/vnd.mpeg.dash.mpd",function(){return new xw});function dx(){}S("shaka.dependencies",dx);dx.has=function(a){return ex.has(a)};dx.add=function(a,b){if(!fx[a])throw Error(a+" is not supported");a==gx?Fd("mux.js","mux.js is no longer used in Shaka Player."):ex.set(a,function(){return b})};var gx="muxjs",fx={Mm:gx,ISOBoxer:"ISOBoxer"};dx.Allowed=fx;var ex=new Map([["ISOBoxer",function(){return window.ISOBoxer}]]);function hx(a,b,c){this.type=a;this.na=b;this.segments=c||null}function ix(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}ix.prototype.toString=function(a){function b(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)}var c="#"+this.name,d=this.attributes?this.attributes.filter(function(e){return a?!a.has(e.name):!0}).map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};
function jx(a,b){if(b)return a.toString();b=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return a.toString(b)}function kx(a,b){a=a.attributes.filter(function(c){return c.name==b});return a.length?a[0]:null}function lx(a,b,c){return(a=kx(a,b))?a.value:c||null}function mx(a,b){a=kx(a,b);if(!a)throw new V(2,4,4023,b);return a.value}function nx(a,b,c){c=void 0===c?[]:c;this.na=b;this.g=a;this.dc=c}function ox(a,b){this.name=a;this.value=b};function px(a,b){return a.filter(function(c){return c.name==b})}function qx(a,b){return a.filter(function(c){return mx(c,"TYPE")==b})}function rx(a,b){a=t(a);for(var c=a.next();!c.done;c=a.next())if(c=c.value,c.name===b)return c;return null}function sx(a,b,c){c=void 0===c?0:c;return(a=rx(a,b))?Number(a.value):c}function tx(a,b,c){return b?ux(a,[b],c):[]}function ux(a,b,c){if(!b.length)return[];var d=b;c&&c.size&&(d=b.map(function(e){return vx(e,c)}));return Vc(a,d)}
function vx(a,b){if(!b||!b.size)return a;a=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}");var c=a.match(/{\$\w*}/g);if(c){c=t(c);for(var d=c.next();!d.done;d=c.next()){d=d.value;var e=d.slice(2,d.length-1),f=b.get(e);if(f)a=a.replace(d,f);else throw new V(2,4,4039,e);}}return a};function wx(){this.g=0}
function xx(a,b){b=Gc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var c=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(c[0]))throw new V(2,4,4015);b=0;for(var d=!0,e=t(c),f=e.next();!f.done;f=e.next())if(f=f.value,/^#(?!EXT)/m.test(f)||d)d=!1;else if(f=yx(a,f),--a.g,zx.includes(f.name)){b=1;break}else"EXT-X-STREAM-INF"==f.name&&(d=!0);e=[];d=!0;for(f=0;f<c.length;f++){var g=c[f],h=c[f+1];if(/^#(?!EXT)/m.test(g)||d)d=!1;else{g=yx(a,g);if(Ax.includes(g.name)){if(1!=b)throw new V(2,4,4017);g=
c.splice(f,c.length-f);c=[];d=[];f=[];h=null;g=t(g);for(var k=g.next();!k.done;k=g.next())k=k.value,/^(#EXT)/.test(k)?(k=yx(a,k),zx.includes(k.name)?e.push(k):"EXT-X-MAP"==k.name?h=k:"EXT-X-PART"==k.name?f.push(k):"EXT-X-PRELOAD-HINT"==k.name?"PART"==lx(k,"TYPE")?f.push(k):"MAP"==lx(k,"TYPE")&&(k.name="EXT-X-MAP",h=k):d.push(k)):/^#(?!EXT)/m.test(k)||(k=k.trim(),h&&d.push(h),c.push(new nx(k,d,f)),d=[],f=[]);f.length&&(h&&d.push(h),c.push(new nx("",d,f)));return new hx(b,e,c)}e.push(g);"EXT-X-STREAM-INF"==
g.name&&(g.attributes.push(new ox("URI",h)),d=!0)}}return new hx(b,e)}function yx(a,b){a=a.g++;var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new V(2,4,4016,b);b=c[1];var d=c[2];c=[];var e;if(d){d=new ge(d);var f;(f=ie(d,/^([^,=]+)(?:,|$)/g))&&(e=f[1]);for(var g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;f=ie(d,g);)c.push(new ox(f[1],f[2]||f[3])),he(d)}return new ix(a,b,c,e)}
var zx="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" "),Ax="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" ");function Bx(){}function Cx(a,b){try{var c=Dx(a);return oh({uri:a,originalUri:a,data:c.data,headers:{"content-type":c.contentType},originalRequest:b})}catch(d){return mh(d)}}
function Dx(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new V(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new V(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=Rc(a):e=Kc(a);return{data:e,contentType:c}}S("shaka.net.DataUriPlugin",Bx);Bx.parse=Cx;vh("data",Cx);function Ex(){var a=this;this.g=this.h=null;this.H=1;this.B=new Map;this.K=new Map;this.N=new Map;this.N.set("video",new Map);this.N.set("audio",new Map);this.N.set(bd,new Map);this.N.set("image",new Map);this.nc=(new Map).set("com.apple.streamingkeydelivery",function(b,c,d){return Fx(a,b,c,d)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(b){var c=mx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=mx(b,"URI");c=Dx(c.split("?")[0]);
c=Nb(c.data);d=Wc("com.widevine.alpha",d,[{initDataType:"cenc",initData:c}]);(b=lx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));b=Promise.resolve(d)}else b=Promise.resolve(null);return b}).set("com.microsoft.playready",function(b){var c=mx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");b=mx(b,"URI");b=Dx(b.split("?")[0]);b=Nb(b.data);c=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);c=$h(b,c,new Set,0);d=Wc("com.microsoft.playready",
d,[{initDataType:"cenc",initData:c}]);if(b=re(["<PLAYREADY>",Qc(b),"</PLAYREADY>"].join("\n")))d.licenseServerUri=Iu(b);d=Promise.resolve(d)}else d=Promise.resolve(null);return d}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(b){var c=mx(b,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(c)){var d="cenc";"SAMPLE-AES"==c&&(d="cbcs");c=mx(b,"URI");c=Dx(c.split("?")[0]);c=Nb(c.data);d=Wc("com.huawei.wiseplay",d,[{initDataType:"cenc",initData:c}]);(b=lx(b,"KEYID"))&&d.keyIds.add(b.toLowerCase().substr(2));
b=Promise.resolve(d)}else b=Promise.resolve(null);return b});this.Za=new Set;this.i=new Map;this.l=null;this.G="";this.La=new wx;this.L=-1;this.ba=Infinity;this.Z=this.sc=this.Ya=!1;this.C=new bc(function(){if(a.U&&!a.g.continueLoadingWhenPaused&&(a.T.Ea(a.U,"timeupdate"),a.U.paused)){a.T.ra(a.U,"timeupdate",function(){return Gx(a)});return}Gx(a)});this.Na=Hx;this.m=null;this.Sa=0;this.s=Infinity;this.Ka=this.Fa=this.R=0;this.Y=new sh;this.I=new Map;this.J=new Map;this.Aa=new Map;this.oa=new Map;
this.M=new Map;this.qa=new Map;this.va=new Map;this.qc=this.ea=!1;this.Ob=new vd(5);this.j=null;this.P=!0;this.Ha=new Set;this.T=new zd;this.u=this.U=null;this.kc=function(){return!1}}q=Ex.prototype;q.configure=function(a,b){var c=this.h&&a.updatePeriod!=this.g.updatePeriod&&0<=a.updatePeriod;this.g=a;b&&(this.kc=b);this.j&&this.j.configure(this.g);c&&this.m&&this.m.presentationTimeline.V()&&this.C.Ia()};
q.start=function(a,b){var c=this,d;return Q(function(e){return 1==e.g?(c.h=b,c.ea=b.isLowLatencyMode(),H(e,Ix(c,[a]).promise,2)):3!=e.g?(d=e.h,c.G=d.uri,H(e,Jx(c,d.data),3)):e.return(c.m)})};
q.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.Y&&(a.push(this.Y.destroy()),this.Y=null);this.g=this.h=null;this.Za.clear();this.m=null;this.i.clear();this.K.clear();this.J.clear();this.B.clear();this.Aa.clear();this.oa.clear();this.M.clear();this.qa.clear();this.va.clear();this.Ha.clear();this.j&&this.j.destroy();this.T&&(this.T.release(),this.T=null);return Promise.all(a)};
q.update=function(){var a=this,b,c,d,e,f,g,h,k,l,m,n,p;return Q(function(r){if(1==r.g){if(!Kx(a))return r.return();b=[];c=Array.from(a.i.values());a.s=Infinity;a.m.gapCount=0;d=c.filter(function(u){return u.stream.segmentIndex});e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,b.push(Lx(a,g));return H(r,Promise.all(b),2)}Mx(a,d.map(function(u){return u.stream}));h=d.some(function(u){return 0==u.Ud});d.length&&!h&&(k=Nx,Ox(a,k.lj),l=d.map(function(u){return u.lc}),a.l.ub(Math.min.apply(Math,y(l))),
a.h.updateDuration());h&&Px(a);m=t(d);for(n=m.next();!n.done;n=m.next())p=n.value,p.stream.isAudioMuxedInVideo||!p.stream.segmentIndex||Rg(p.stream.segmentIndex)||a.h.disableStream(p.stream);I(r)})};function Qx(a,b){return Kx(a)?a.N.get(b.type):b.df}
function Lx(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R,U,ua,ba,Ma,Ra;return Q(function(Aa){switch(Aa.g){case 1:if(b.stream.isAudioMuxedInVideo)return Aa.return();c=[];d=t(b.S());for(e=d.next();!e.done;e=d.next())f=e.value,g=new tb(f),h=g.g,b.Ie&&(0<=b.Rb&&h.add("_HLS_msn",String(b.Rb)),0<=b.Sb&&h.add("_HLS_part",String(b.Sb))),b.Je&&h.add("_HLS_skip","YES"),Kb(h)&&yb(g,zb(h.toString())),c.push(g.toString());va(Aa,2);return H(Aa,Ix(a,c,!0).promise,4);case 4:k=Aa.h;xa(Aa,
3);break;case 2:throw l=za(Aa),a.h&&a.h.disableStream(b.stream),l;case 3:if(!b.stream.segmentIndex)return Aa.return();m=xx(a.La,k.data);if(1!=m.type)throw new V(2,4,4017);n=k.uri;n==k.originalUri||b.S().includes(n)||b.tf.push(n);p=px(m.na,"EXT-X-DEFINE");r=Rx(a,p,n);u=b.stream;v=Qx(a,b);return H(Aa,Sx(a,m,u.mimeType,b.S,r),5);case 5:w=Aa.h;x=w.keyIds;z=w.drmInfos;B=w.encrypted;C=w.Jh;u.encrypted||!B||C||(u.encrypted=!0);E=function(qa,Ia){return qa.size===Ia.size&&[].concat(y(qa)).every(function(ya){return Ia.has(ya)})};
E(u.keyIds,x)||(u.keyIds=x,u.drmInfos=z,a.h.newDrmInfo(u));D=Tx(a,m,v,r,b.S,b.type);A=D.segments;if(F=D.bandwidth)u.bandwidth=F;G=rm(u);K=t(A);for(L=K.next();!L.done;L=K.next())J=L.value,J.ia&&(J.ia.xd=G);u.segmentIndex.be(A,a.l.Hb());A.length&&(M=sx(m.na,"EXT-X-MEDIA-SEQUENCE",0),P=(N=rx(m.na,"EXT-X-SKIP"))?Number(lx(N,"SKIPPED-SEGMENTS")):0,O=Ux(M,A),R=O.Rb,U=O.Sb,b.Rb=R+P,b.Sb=U,ua=v.get(M),u.segmentIndex.fb(ua));if(ba=Rg(u.segmentIndex))b.$c=ba.startTime,Ma=A[A.length-1],b.lc=Ma.endTime;if(Ra=
rx(m.na,"EXT-X-ENDLIST"))b.Ud=!0;Vx(a,m);Wx(a,m.na,u.type,r,b.S);I(Aa)}})}q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(a){this.j&&this.j.banLocation(a)};q.setMediaElement=function(a){this.U=a};
function Xx(a,b,c){c=void 0===c?!1:c;for(var d=-1==a.L,e=t(b),f=e.next();!f.done;f=e.next()){f=f.value;var g=f.stream.segmentIndex,h=Qx(a,f);if(g=Rg(g)){h=t(h);for(var k=h.next();!k.done;k=h.next()){k=t(k.value);var l=k.next().value;if(k.next().value==g.startTime){d&&(a.L=Math.max(a.L,l));f.ng=l;break}}}}if(!(0>a.L))for(b=t(b),d=b.next();!d.done;d=b.next())if(d=d.value,Yx(a,d.type)||c)if(e=d.stream.segmentIndex)if(f=a.L-d.ng,0<f&&(e.g.splice(0,f),e=Rg(e)))e=-e.startTime,d.stream.segmentIndex.offset(e),
Zx(a,d,e)}
function $x(a,b){if(Infinity==a.ba){b=t(b);for(var c=b.next();!c.done;c=b.next())c=Rg(c.value.stream.segmentIndex),null!=c&&null!=c.h&&(a.ba=Math.min(a.ba,c.h))}b=a.ba;if(Infinity!=b){c=t(a.i.values());for(var d=c.next();!d.done;d=c.next())if(d=d.value,!Yx(a,d.type)){var e=d.stream.segmentIndex;if(null!=e){var f=Rg(e);if(f)if(null==f.h)cb("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.S(),"Expect AV sync issues!");else for(Zx(a,d,f.h-b-f.startTime),d=t(e),e=d.next();!e.done;e=d.next())e.value.xh(b)}}}}
function Zx(a,b,c){if(!(.001>Math.abs(c))){b.$c+=c;b.lc+=c;a=Qx(a,b);for(var d=t(a),e=d.next();!e.done;e=d.next()){var f=t(e.value);e=f.next().value;f=f.next().value;a.set(e,f+c)}b.S()}}
function Jx(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R,U,ua,ba,Ma,Ra,Aa,qa,Ia,ya,Ea;return Q(function(ra){switch(ra.g){case 1:c=dd;d=xx(a.La,b);e=px(d.na,"EXT-X-DEFINE");f=[];g=[];h=[];a.l=new Kl(null,0);a.l.fd(!0);k=function(){return[a.G]};l=null;m=new Map;if(1==d.type)return a.P=!1,R=px(d.na,"EXT-X-DEFINE"),m=Rx(a,R,a.G),l=c.Ba,U="",ua=new Map,H(ra,ay(a,a.H++,m,d,k,"",l,U,!0,"Media Playlist",null,ua,null,!1,null,!1),7);by(a,e);n=px(d.na,"EXT-X-MEDIA");p=px(d.na,"EXT-X-STREAM-INF");
r=px(d.na,"EXT-X-IMAGE-STREAM-INF");u=px(d.na,"EXT-X-I-FRAME-STREAM-INF");v=px(d.na,"EXT-X-SESSION-KEY");w=px(d.na,"EXT-X-SESSION-DATA");x=px(d.na,"EXT-X-CONTENT-STEERING");cy(a,w);return H(ra,dy(a,x),4);case 4:if(!a.g.ignoreSupplementalCodecs){z=[];B=t(p);C=B.next();for(E={};!C.done;E={$i:void 0},C=B.next())if(D=C.value,A=lx(D,"SUPPLEMENTAL-CODECS"))E.$i=A.split(/\s*,\s*/).map(function(Ba){return Ba.split("/")[0]}),F=D.attributes.map(function(Ba){return function(Va){var vb=Va.name,ib=Va.value;"CODECS"==
vb&&(ib=Ba.$i.join(","),Va=Va.value.split(","),1<Va.length&&(Va=Zc("audio",Va))&&(ib+=","+Va));return new ox(vb,ib)}}(E)),z.push(new ix(D.id,D.name,F,null));p.push.apply(p,y(z));G=[];K=t(u);L=K.next();for(J={};!L.done;J={aj:void 0},L=K.next())if(M=L.value,N=lx(M,"SUPPLEMENTAL-CODECS"))J.aj=N.split(/\s*,\s*/).map(function(Ba){return Ba.split("/")[0]}),P=M.attributes.map(function(Ba){return function(Va){var vb=Va.name;Va=Va.value;"CODECS"==vb&&(Va=Ba.aj.join(","));return new ox(vb,Va)}}(J)),G.push(new ix(M.id,
M.name,P,null));u.push.apply(u,y(G))}ey(a,p);fy(a,n);O=gy(a,u);return H(ra,hy(a,p,v,n,k,a.B,O),5);case 5:return f=ra.h,g=iy(a,n),H(ra,jy(a,r,u),6);case 6:h=ra.h;ra.A(3);break;case 7:ba=ra.h,a.i.set(a.G,ba),ba.stream&&(Ma=rm(ba.stream),ba.stream.segmentIndex.Xb(function(Ba){Ba.ia&&(Ba.ia.xd=Ma)})),l=ba.stream.type,f.push({id:0,language:hd(U||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==l?ba.stream:null,video:"video"==l?ba.stream:null,bandwidth:ba.stream.bandwidth||0,allowedByApplication:!0,
allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.h)throw new V(2,7,7001);ky(a,d);1==d.type&&(Kx(a)&&(ly(a,d),Ra=a.s,a.C.$(Ra)),Aa=Array.from(a.i.values()),my(a,Aa),Px(a),Wx(a,d.na,l,m,k));a.m={presentationTimeline:a.l,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],sequenceMode:a.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:a.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:a.u};
if(a.Z||!a.g.hls.disableCodecGuessing){ra.A(8);break}qa=[];Ia=t(a.m.variants);for(ya=Ia.next();!ya.done;ya=Ia.next())Ea=ya.value,Ea.audio&&""===Ea.audio.codecs&&qa.push(Ea.audio.createSegmentIndex()),Ea.video&&""===Ea.video.codecs&&qa.push(Ea.video.createSegmentIndex());return H(ra,Promise.all(qa),8);case 8:a.h.makeTextStreamsForClosedCaptions(a.m),I(ra)}})}
function ny(a,b){var c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B;return Q(function(C){if(1==C.g){c=Hm(a.g.hls.mediaPlaylistFullMimeType);if(!b.length)return C.return(c);d=oy(a,b);e=d.segment;f=d.segmentIndex;g=e.S();h=g[0];k=new tb(h);l=k.sb.split(".").pop();return(m=py.get(l))?C.return(Hm(m)):H(C,Promise.all([qy(a,e.ia,0),qy(a,e,f)]),2)}n=C.h;p=n[0].mimeType;r=n[1].mimeType;u=n[0].data;v=n[1].data;w="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" ");x=["audio/mp4","video/mp4","video/iso.segment"];
if(Nk(Nb(v))){var E=v,D=a.g.disableAudio,A=a.g.disableVideo,F=a.g.disableText;var G=Nb(E);var K=(new Fk).parse(G),L=K.Rd();G=K.Kg();var J=[],M=!1,N=!1;if(!D)switch(L.audio){case "aac":case "aac-loas":K.xb().length&&(J.push("mp4a.40.2"),M=!0);break;case "mp3":K.xb().length&&(J.push("mp4a.40.34"),M=!0);break;case "ac3":K.xb().length&&(J.push("ac-3"),M=!0);break;case "ec3":K.xb().length&&(J.push("ec-3"),M=!0);break;case "opus":K.xb().length&&(J.push("opus"),M=!0)}if(!A)switch(L.video){case "avc":G.codec?
J.push(G.codec):J.push("avc1.42E01E");N=!0;break;case "hvc":G.codec?J.push(G.codec):J.push("hvc1.1.6.L93.90");N=!0;break;case "av1":J.push("av01.0.01M.08"),N=!0}if(J.length){D=M&&!N;A=new Map;if(N&&!F){F=new Ud("video/mp2t");F.i(E);E=t(F.j());for(N=E.next();!N.done;N=E.next())N=N.value,A.set(N,N);F.g()}G={type:D?"audio":"video",mimeType:"video/mp2t",codecs:J.join(", "),language:null,height:G.height,width:G.width,channelCount:null,sampleRate:null,closedCaptions:A,re:null,colorGamut:null,frameRate:G.frameRate}}else G=
null;if(z=G)return C.return(z)}else if(w.includes(l)||x.includes(r)||p&&x.includes(p))if(B=Im(u,v,a.g.disableText))return C.return(B);return r?C.return(Hm(r)):p?C.return(Hm(p)):C.return(c)})}
function qy(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:if(!b)return l.return({mimeType:null,data:null});d=Fh;e=Nm(b.S(),b.cc(),b.Zb(),a.g.retryParameters);f=b instanceof Zj?1:0;return H(l,ry(a,e,d,{type:f}).promise,2);case 2:g=l.h;h=g.data;if(!b.aesKey){l.A(3);break}return H(l,Mm(h,b.aesKey,c),4);case 4:h=l.h;case 3:return b instanceof Zj?b.me(h,!0):b.me(h),(k=g.headers["content-type"])&&(k=k.split(";")[0].toLowerCase()),l.return({mimeType:k,data:h})}})}
function Px(a){if(Kx(a)){if(a.Na==sy){for(var b=Infinity,c=Infinity,d=t(a.i.values()),e=d.next();!e.done;e=d.next())e=e.value,e.stream.segmentIndex&&"text"!=e.stream.type&&!e.stream.isAudioMuxedInVideo&&(b=Math.min(b,e.lc),c=Math.min(c,e.$c));b=b-c||0;isNaN(a.g.availabilityWindowOverride)||(b=a.g.availabilityWindowOverride);a.l.zf(b)}}else a.l.ub(ty(a));if(!a.l.u)for(b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,!c.stream.segmentIndex||"audio"!=c.type&&"video"!=c.type||(c=Rg(c.stream.segmentIndex))&&
c.h&&a.l.Qi(c.h);a.l.cf()}function by(a,b){var c=(new tb(a.G)).g;b=t(b);for(var d=b.next();!d.done;d=b.next()){var e=d.value;d=lx(e,"NAME");var f=lx(e,"VALUE");e=lx(e,"QUERYPARAM");d&&f&&(a.B.has(d)||a.B.set(d,f));e&&(d=c.get(e)[0])&&!a.B.has(d)&&a.B.set(e,d)}}
function Rx(a,b,c){c=(new tb(c)).g;var d=new Map;b=t(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value,g=lx(f,"NAME"),h=lx(f,"VALUE");e=lx(f,"QUERYPARAM");f=lx(f,"IMPORT");g&&h&&(d.has(g)||d.set(g,h));e&&(g=c.get(e)[0])&&!d.has(g)&&d.set(e,g);f&&(e=a.B.get(f))&&d.set(f,e)}return d}
function ey(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=lx(d,"AUDIO");c=lx(d,"VIDEO");var f=lx(d,"SUBTITLES");d=uy(a,d);if(f){var g=Zc(bd,d);a.J.set(f,g);de(d,g)}e&&(f=Zc("audio",d),f||(f=a.g.hls.defaultAudioCodec),a.J.set(e,f));c&&(e=Zc("video",d),e||(e=a.g.hls.defaultVideoCodec),a.J.set(c,e))}}
function cy(a,b){b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=lx(d,"DATA-ID");c=lx(d,"URI");var f=lx(d,"LANGUAGE");d=lx(d,"VALUE");e=(new Map).set("id",e);c&&e.set("uri",tx([a.G],c,a.B)[0]);f&&e.set("language",f);d&&e.set("value",d);c=new T("sessiondata",e);if(a.h)a.h.onEvent(c)}}
function dy(a,b){var c,d,e,f,g,h;return Q(function(k){if(!a.h||!a.g)return k.return();d=t(b);for(e=d.next();!e.done;e=d.next())if(f=e.value,g=lx(f,"PATHWAY-ID"),h=lx(f,"SERVER-URI"),g&&h){a.j=new Fv(a.h);a.j.configure(a.g);a.j.i=[a.G];a.j.setManifestType("HLS");a.j.h=g;c=Gv(a.j,h);break}return H(k,c,0)})}
function iy(a,b){var c=qx(b,"SUBTITLES");b=c.map(function(g){if(a.g.disableText)return null;try{return vy(a,[g],new Map).stream}catch(h){if(a.g.hls.ignoreTextStreamFailures)return null;throw h;}});c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=mx(d.value,"GROUP-ID");if(d=a.J.get(e))if(e=a.K.get(e)){e=t(e);for(var f=e.next();!f.done;f=e.next())f=f.value,f.stream.codecs=d,f.stream.mimeType=wy(bd,d)||xy(bd),yy(f.stream)}}return b.filter(function(g){return g})}
function yy(a){var b=new Set([Mf(a.mimeType,a.codecs)]);a.segmentIndex&&a.segmentIndex.Xb(function(c){c.mimeType&&b.add(Mf(c.mimeType,a.codecs))});a.fullMimeTypes=b}
function jy(a,b,c){var d,e;return Q(function(f){if(1==f.g)return d=b.map(function(g){var h,k,l;return Q(function(m){if(1==m.g){if(h=a.g.disableThumbnails)return m.return(null);va(m,2);return H(m,zy(a,g),4)}if(2!=m.g)return k=m.h,m.return(k.stream);l=za(m);if(a.g.hls.ignoreImageStreamFailures)return m.return(null);throw l;})}).concat(c.map(function(g){if(a.g.disableThumbnails)return null;try{var h=Ay(a,g);return"image"!==h.stream.type?null:h.stream}catch(k){if(a.g.hls.ignoreImageStreamFailures)return null;
throw k;}})),H(f,Promise.all(d),2);e=f.h;return f.return(e.filter(function(g){return g}))})}function By(a,b,c){b=b.filter(function(h){var k=lx(h,"URI")||"";h=lx(h,"TYPE");return"SUBTITLES"!=h&&(""!=k||"AUDIO"==h)});var d={};b=t(b);for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=jx(e,!a.j);d[f]?d[f].push(e):d[f]=[e]}for(var g in d)vy(a,d[g],c,!1)}function gy(a,b){return b.map(function(c){c=Ay(a,c);return"video"!==c.stream.type?null:c.stream}).filter(function(c){return c})}
function hy(a,b,c,d,e,f,g){var h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R,U,ua,ba,Ma,Ra,Aa,qa,Ia,ya;return Q(function(Ea){switch(Ea.g){case 1:h=[];k=new Set;if(a.g.ignoreDrmInfo||!(0<c.length)){Ea.A(2);break}l=t(c);m=l.next();case 3:if(m.done){Ea.A(2);break}n=m.value;p=mx(n,"METHOD");r=lx(n,"KEYFORMAT")||"identity";u=null;if("NONE"==p){Ea.A(4);break}if(Cy(p)){v=tx(e(),mx(n,"URI"),f);w=v.sort().join("");a.M.has(w)||(x=zh(v,a.g.retryParameters),z=ry(a,x,6).promise,a.M.set(w,z));Ea.A(4);break}if("identity"==
r)return H(Ea,Dy(a,n,"",e,null,f),12);B=a.nc.get(r);if(!B){C=null;Ea.A(10);break}return H(Ea,B(n,"",null),11);case 11:C=Ea.h;case 10:u=C;Ea.A(6);break;case 12:u=Ea.h;case 6:if(u){if(u.keyIds)for(E=t(u.keyIds),D=E.next();!D.done;D=E.next())A=D.value,k.add(A);h.push(u)}case 4:m=l.next();Ea.A(3);break;case 2:F={};G=t(b);for(K=G.next();!K.done;K=G.next())L=K.value,J=jx(L,!a.j),F[J]?F[J].push(L):F[J]=[L];M=[];for(N in F)P=F[N],O=P[0],R=lx(O,"FRAME-RATE"),U=Number(lx(O,"AVERAGE-BANDWIDTH"))||Number(mx(O,
"BANDWIDTH")),ua=lx(O,"RESOLUTION"),ba=t(ua?ua.split("x"):[null,null]),Ma=ba.next().value,Ra=ba.next().value,Aa=lx(O,"VIDEO-RANGE"),(qa=lx(O,"REQ-VIDEO-LAYOUT"))&&qa.includes(",")&&(Ia=qa.split(",").filter(function(ra){return"CH-STEREO"==ra||"CH-MONO"==ra}),qa=Ia[0]),qa=qa||"CH-MONO",ya=Ey(a,P,d),M.push.apply(M,y(Vy(a,ya.audio,ya.video,U,Ma,Ra,R,Aa,qa,h,k,g)));return Ea.return(M.filter(function(ra){return null!=ra}))}})}
function Ey(a,b,c){for(var d={audio:[],video:[]},e=new Map,f=[],g=!1,h=!1,k=t(b),l=k.next();!l.done;l=k.next()){var m=l.value;l=lx(m,"AUDIO");var n=lx(m,"VIDEO"),p=l||n;p&&(f.includes(p)||f.push(p),(m=lx(m,"PATHWAY-ID"))&&e.set(p,m),l?g=!0:n&&(h=!0))}f.length&&c.length&&(c=c.filter(function(u){return f.includes(mx(u,"GROUP-ID"))}),By(a,c,e));c=(e=f.sort().join(","))&&a.K.has(e)?a.K.get(e):[];g?d.audio.push.apply(d.audio,y(c)):h&&d.video.push.apply(d.video,y(c));g=!1;var r=b.map(function(u){return mx(u,
"URI")});l=d.audio.find(function(u){return u&&u.S().find(function(v){return r.includes(v)})});h=uy(a,b[0]);c=Zc("video",h);(k=Zc("audio",h))&&!c?(l="audio",g=0<d.audio.length):!d.audio.length&&!d.video.length&&k&&c?(l="video",h=[[c,k].join()]):d.audio.length&&l?(l="audio",g=!0):l=d.video.length&&!d.audio.length?"audio":"video";g||(a=Wy(a,b,h,l),e&&(a.stream.groupId=e),d[a.stream.type]=[a]);return d}
function uy(a,b){b=lx(b,"CODECS")||"";a.Z=0<b.length;a.Z||a.g.hls.disableCodecGuessing||(b=[],a.g.disableVideo||b.push(a.g.hls.defaultVideoCodec),a.g.disableAudio||b.push(a.g.hls.defaultAudioCodec),b=b.join(","));return Jm(b.split(/\s*,\s*/))}
function Vy(a,b,c,d,e,f,g,h,k,l,m,n){for(var p=t(c),r=p.next();!r.done;r=p.next())Xy(r.value.stream,e,f,g,h,k,null);e=a.g.disableAudio;if(!b.length||e)b=[null];e=a.g.disableVideo;if(!c.length||e)c=[null];e=[];b=t(b);for(f=b.next();!f.done;f=b.next())for(f=f.value,g=t(c),h=g.next();!h.done;h=g.next()){var u=h.value;if(h=f?f.stream:null)h.drmInfos=l,h.keyIds=m;if(k=u?u.stream:null)k.drmInfos=l,k.keyIds=m,a.g.disableIFrames||ah(k,n);k&&!h&&(k.bandwidth=d);!k&&h&&(h.bandwidth=d);p=f?f.stream.drmInfos:
null;r=u?u.stream.drmInfos:null;u=u?u.S().sort().join(","):"";var v=f?f.S().sort().join(","):"",w=[];h&&h.codecs&&w.push(h.codecs);k&&k.codecs&&w.push(k.codecs);u=[u,v,w.sort()].join("-");h&&k&&!Ub(p,r)||a.Za.has(u)||(h={id:a.H++,language:h?h.language:"und",disabledUntilTime:0,primary:!!h&&h.primary||!!k&&k.primary,audio:h,video:k,bandwidth:d,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.push(h),a.Za.add(u))}return e}
function fy(a,b){b=qx(b,"CLOSED-CAPTIONS");a.P=0==b.length;b=t(b);for(var c=b.next();!c.done;c=b.next()){var d=c.value,e=lx(d,"LANGUAGE");c=hd(e||"und");e||(e=lx(d,"NAME"))&&(c=e);e=mx(d,"GROUP-ID");d=mx(d,"INSTREAM-ID").replace("SERVICE","svc");a.I.get(e)||a.I.set(e,new Map);a.I.get(e).set(d,c)}}
function vy(a,b,c,d){d=void 0===d?!0:d;for(var e=[],f=[],g=new Map,h=t(b),k=h.next();!k.done;k=h.next()){var l=k.value;k=d?mx(l,"URI"):lx(l,"URI")||"shaka://hls-muxed";l=mx(l,"GROUP-ID");e.push(k);f.push(l);g.set(l,k)}d=f.sort().join(",");k=b[0];b="";h=mx(k,"TYPE").toLowerCase();"subtitles"==h&&(h=bd);if(h==bd)b=lx(k,"CODECS")||"";else for(f=t(f),l=f.next();!l.done;l=f.next())if(l=l.value,a.J.has(l)){b=a.J.get(l);break}f=e.sort().join(",");if(a.i.has(f))return a.i.get(f);l=a.H++;if(a.j){g=t(g);for(var m=
g.next();!m.done;m=g.next()){var n=t(m.value);m=n.next().value;n=n.next().value;(m=c.get(m))&&Jv(a.j,l,m,n)}}c=lx(k,"LANGUAGE");g=lx(k,"NAME");m="YES"==lx(k,"DEFAULT");"audio"==h?n=(n=lx(k,"CHANNELS"))?parseInt(n.split("/")[0],10):null:n=null;var p;"audio"==h?(p=lx(k,"CHANNELS"))?(p=p.split("/"),p=2!=p.length?!1:"JOC"===p[1]||p[1].includes("ATMOS")):p=!1:p=!1;var r=lx(k,"CHARACTERISTICS"),u="YES"==lx(k,"FORCED");"audio"==h?k=(k=lx(k,"SAMPLE-RATE"))?parseInt(k,10):null:k=null;e=Yy(a,l,e,b,h,c,m,g,
n,null,r,u,k,p);e.stream&&(e.stream.groupId=d);a.K.has(d)?a.K.get(d).push(e):a.K.set(d,[e]);a.i.set(f,e);return e}
function zy(a,b){var c,d,e,f,g,h,k,l,m,n;return Q(function(p){if(1==p.g){c=mx(b,"URI");d=lx(b,"CODECS","jpeg")||"";if(a.i.has(c))return p.return(a.i.get(c));e=lx(b,"LANGUAGE");f=lx(b,"NAME");g=lx(b,"CHARACTERISTICS");h=Yy(a,a.H++,[c],d,"image",e,!1,f,null,null,g,!1,null,!1);return(k=lx(b,"RESOLUTION"))?H(p,h.stream.createSegmentIndex(),3):p.A(2)}2!=p.g&&(l=Rg(h.stream.segmentIndex),m=l.tilesLayout)&&(h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=Number(k.split("x")[1])*
Number(m.split("x")[1]));if(n=lx(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.i.set(c,h);return p.return(h)})}
function Ay(a,b){var c="video",d=mx(b,"URI"),e=lx(b,"CODECS")||"";"mjpg"==e&&(c="image");if(a.i.has(d))return a.i.get(d);var f=lx(b,"LANGUAGE"),g=lx(b,"NAME"),h=lx(b,"CHARACTERISTICS");c=Yy(a,a.H++,[d],e,c,f,!1,g,null,null,h,!1,null,!1);e=lx(b,"RESOLUTION");f=t(e?e.split("x"):[null,null]);e=f.next().value;f=f.next().value;c.stream.width=Number(e)||void 0;c.stream.height=Number(f)||void 0;if(b=lx(b,"BANDWIDTH"))c.stream.bandwidth=Number(b);a.i.set(d,c);return c}
function Wy(a,b,c,d){for(var e=a.H++,f=[],g=t(b),h=g.next();!h.done;h=g.next()){var k=h.value;h=mx(k,"URI");k=lx(k,"PATHWAY-ID");a.j&&k&&Jv(a.j,e,k,h);f.push(h)}g=f.sort().join(",")+c.sort().join(",");if(a.i.has(g))return a.i.get(g);h=f.join(",");a:{b=lx(b[0],"CLOSED-CAPTIONS");if("video"==d){if(a.g.disableText){a.P=!1;b=null;break a}if(b){if("NONE"!=b){b=a.I.get(b);break a}a.P=!1}else if(!b&&a.I.size)for(b=t(a.I.keys()).next();!b.done;){b=a.I.get(b.value);break a}}b=null}c=Yc(d,c);d=Yy(a,e,f,c,d,
null,!1,h,null,b,null,!1,null,!1);a.i.set(g,d);return d}
function Yy(a,b,c,d,e,f,g,h,k,l,m,n,p,r){function u(C){var E,D,A,F,G,K,L,J,M,N,P,O,R,U,ua,ba,Ma,Ra,Aa,qa,Ia,ya,Ea;return Q(function(ra){switch(ra.g){case 1:return E=dd,va(ra,2),H(ra,C.promise,4);case 4:D=ra.h;if(C.aborted)return ra.return();A=D.uri;A!=D.originalUri&&(F=x.S(),F.includes(A)||x.tf.push(A));G=xx(a.La,D.data);if(1!=G.type)throw new V(2,4,4017);K=px(G.na,"EXT-X-DEFINE");L=Rx(a,K,A);J=!1;(!a.Z&&a.g.hls.disableCodecGuessing||a.P&&e==E.Ba&&!a.g.hls.disableClosedCaptionsDetection)&&0<G.segments.length&&
(a.P=!1,J=!0);M=!a.Z&&a.g.hls.disableCodecGuessing;N=Kx(a);return H(ra,ay(a,0,L,G,v,d,e,f,g,h,k,l,m,n,p,r,void 0,J,M),5);case 5:P=ra.h;if(C.aborted)return ra.return();O=P.stream;ky(a,G);Kx(a)&&!N&&ly(a,G);x.$c=P.$c;x.lc=P.lc;x.Je=P.Je;x.Ie=P.Ie;x.Ud=P.Ud;x.df=P.df;x.Rb=P.Rb;x.Sb=P.Sb;x.Tg=!0;w.segmentIndex=O.segmentIndex;w.encrypted=O.encrypted;w.drmInfos=O.drmInfos;w.keyIds=O.keyIds;w.mimeType=O.mimeType;w.bandwidth=w.bandwidth||O.bandwidth;w.codecs=w.codecs||O.codecs;w.closedCaptions=w.closedCaptions||
O.closedCaptions;w.width=w.width||O.width;w.height=w.height||O.height;w.hdr=w.hdr||O.hdr;w.colorGamut=w.colorGamut||O.colorGamut;w.frameRate=w.frameRate||O.frameRate;"und"==w.language&&"und"!=O.language&&(w.language=O.language);w.language=w.language||O.language;w.channelsCount=w.channelsCount||O.channelsCount;w.audioSamplingRate=w.audioSamplingRate||O.audioSamplingRate;yy(w);w.drmInfos.length&&a.h.newDrmInfo(w);R=!1;if(!l&&w.closedCaptions||l&&w.closedCaptions&&l.size!=w.closedCaptions.size)R=!0;
a.m&&R&&a.h.makeTextStreamsForClosedCaptions(a.m);if(e==E.Ba||e==E.aa)for(U=t(a.i.values()),ua=U.next();!ua.done;ua=U.next())ba=ua.value,ba.Tg||ba.type!=e||(ba.stream.mimeType=O.mimeType,yy(ba.stream));e==E.Ra&&(Ma=Rg(O.segmentIndex))&&Ma.ia&&(w.mimeType="application/mp4",yy(w));Ra=rm(w);w.segmentIndex.Xb(function(Ba){Ba.ia&&(Ba.ia.xd=Ra)});Zy(a)&&(a.sc?my(a,[x]):(a.sc=!0,Aa=Array.from(a.i.values()),qa=Aa.filter(function(Ba){return Ba.stream.segmentIndex}),my(a,qa),Px(a),Ia=a.s,0<Ia&&a.C.$(Ia)));
Wx(a,G.na,w.type,L,v);a.m&&(a.m.startTime=a.u);xa(ra,0);break;case 2:ya=za(ra);w.closeSegmentIndex();if(7001===ya.code)return ra.return();Ea=a.h.disableStream(w);if(!Ea)throw ya;I(ra)}})}function v(){return a.j&&1<c.length?Kv(a.j,b):x.tf.concat(ux([a.G],c,a.B))}var w=$y(a,d,e,f,g,h,k,l,m,n,p,r);c.includes("shaka://hls-muxed")&&(w.isAudioMuxedInVideo=!0,w.mimeType="video/mp2t",yy(w));var x={stream:w,type:e,tf:[],$c:0,lc:0,df:new Map,Je:!1,Ie:!1,Ud:!1,ng:-1,Rb:-1,Sb:-1,Tg:!1,S:v},z=null,B;w.createSegmentIndex=
function(){if(z)return z;if(w.isAudioMuxedInVideo)return w.segmentIndex=new em([]),Promise.resolve();B=Ix(a,x.S(),!0);return z=new Promise(function(C){C(u(B))})};w.closeSegmentIndex=function(){z&&!w.segmentIndex&&B.abort();w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null);z=null};return x}
function ty(a){var b=Infinity;a=t(a.i.values());for(var c=a.next();!c.done;c=a.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&!c.stream.isAudioMuxedInVideo&&(b=Math.min(b,c.lc));return b}function Mx(a,b){var c=[];b=t(b);for(var d=b.next();!d.done;d=b.next())d=d.value,d.segmentIndex&&d.segmentIndex.Xb(function(e){c.push(e)});a.l.ee(c)}
function my(a,b){if(!Kx(a))for(var c=ty(a),d=t(b),e=d.next();!e.done;e=d.next())e.value.stream.segmentIndex.pd(0,c);Mx(a,b.map(function(f){return f.stream}));d=Array.from(a.i.values()).filter(function(f){return f.stream.segmentIndex});c=d.some(function(f){return"audio"==f.stream.type});e=d.some(function(f){return"video"==f.stream.type});d=Kx(a)&&!a.Ya;c=!Kx(a)&&a.Ya&&!(c&&e);a.g.hls.ignoreManifestProgramDateTime||d||c?Xx(a,b,d):($x(a,b),0<a.g.hls.ignoreManifestProgramDateTimeForTypes.length&&Xx(a,
b))}function Yx(a,b){return a.g.hls.ignoreManifestProgramDateTime?!0:a.g.hls.ignoreManifestProgramDateTimeForTypes.includes(b)}function Zy(a){if(!a.m)return!1;var b=[],c=[];a=t(a.m.variants);for(var d=a.next();!d.done;d=a.next())d=d.value,d.video&&b.push(d.video),d.audio&&c.push(d.audio);return 0<b.length&&!b.some(function(e){return e.segmentIndex})||0<c.length&&!c.some(function(e){return e.segmentIndex})?!1:!0}
function ay(a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z){x=void 0===x?!0:x;z=void 0===z?!0:z;var B,C,E,D,A,F,G,K,L,J,M,N,P,O,R,U,ua,ba,Ma,Ra,Aa,qa,Ia,ya,Ea,ra,Ba,Va,vb;return Q(function(ib){switch(ib.g){case 1:B=d.segments||[];C=B.every(function(jb){return rx(jb.na,"EXT-X-GAP")?!0:!1});if(!B.length||C)throw new V(2,4,4053);az(a,d);Kx(a)&&Vx(a,d);E=Kx(a)?a.N.get(g):new Map;D=Tx(a,d,E,c,e,g);A=D.segments;F=D.bandwidth;M=J=L=K=G=null;if(!(0<A.length&&x)){ib.A(2);break}return H(ib,ny(a,A),3);case 3:N=ib.h,
g=N.type,h=N.language,m=N.channelCount,u=N.sampleRate,a.g.disableText||(n=N.closedCaptions),K=N.height,G=N.width,L=N.re,J=N.colorGamut,M=N.frameRate,z&&(w=N.mimeType,f=N.codecs);case 2:if(w){ib.A(4);break}return H(ib,bz(a,g,f,A),5);case 5:w=ib.h,g!=bd||f||"application/mp4"!=w||!A[0]||A[0].ia||(w="text/vtt");case 4:return H(ib,Sx(a,d,w,e,c),6);case 6:P=ib.h;O=P.drmInfos;R=P.keyIds;U=P.encrypted;ua=P.Jh;if(U&&!O.length&&!ua)throw new V(2,4,4026);ba=$y(a,f,g,h,k,l,m,n,p,r,u,v);ba.encrypted=U&&!ua;ba.drmInfos=
O;ba.keyIds=R;ba.mimeType=w;F&&(ba.bandwidth=F);yy(ba);"video"==g&&(G||K||L||J)&&Xy(ba,G,K,M,L,null,J);Kx(a)&&Vx(a,d);Ma=A[0].startTime;Ra=A[A.length-1];Aa=Ra.endTime;qa=new em(A);ba.segmentIndex=qa;ya=(Ia=rx(d.na,"EXT-X-SERVER-CONTROL"))?null!=kx(Ia,"CAN-SKIP-UNTIL"):!1;Ea=Ia?null!=kx(Ia,"CAN-BLOCK-RELOAD"):!1;ra=sx(d.na,"EXT-X-MEDIA-SEQUENCE",0);Ba=Ux(ra,A);Va=Ba.Rb;vb=Ba.Sb;return ib.return({stream:ba,type:g,tf:[],S:e,$c:Ma,lc:Aa,Je:ya,Ie:Ea,Ud:!1,ng:-1,Rb:Va,Sb:vb,df:E,Tg:!1})}})}
function Ux(a,b){a=a+b.length-1;var c=-1;if(!b.length)return a++,{Rb:a,Sb:c};b=b[b.length-1];var d=b.g;if(!b.g.length)return a++,b.m&&(c=0),{Rb:a,Sb:c};c=d.length-1;d[d.length-1].isPreload()||(a++,c=0);return{Rb:a,Sb:c}}
function $y(a,b,c,d,e,f,g,h,k,l,m,n){var p=wy(c,b)||xy(c),r=[];if(k){k=t(k.split(","));for(var u=k.next();!u.done;u=k.next())r.push(u.value)}k=void 0;u=null;c==bd?k=r.includes("public.accessibility.transcribes-spoken-dialog")&&r.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":r.includes("public.accessibility.describes-video")&&(u="visually impaired");r.length||"subtitle"!==k||r.push("subtitle");a={id:a.H++,originalId:f,groupId:null,createSegmentIndex:function(){return Promise.resolve()},
segmentIndex:null,mimeType:p,codecs:b,kind:c==bd?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:hd(d||"und"),originalLanguage:d,label:f,type:c,primary:e,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:r,forced:l,channelsCount:g,audioSamplingRate:m,spatialAudio:n,closedCaptions:h,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,
fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};yy(a);return a}
function Sx(a,b,c,d,e){var f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R;return Q(function(U){switch(U.g){case 1:f=new Map;if(!a.g.ignoreDrmInfo&&b.segments)for(g=t(b.segments),h=g.next();!h.done;h=g.next())if(k=h.value,l=px(k.na,"EXT-X-KEY"),m=null,l.length)for(m=cz(a,b,k.na,d,e),n=t(l),p=n.next();!p.done;p=n.next())r=p.value,f.set(r,m);v=u=!1;w=[];x=new Set;z=t(f);B=z.next();case 2:if(B.done){U.A(4);break}C=B.value;E=t(C);D=E.next().value;A=E.next().value;F=D;G=A;K=mx(F,"METHOD");if("NONE"==
K){U.A(3);break}u=!0;L=lx(F,"KEYFORMAT")||"identity";J=null;if(Cy(K)){v=!0;U.A(3);break}if("identity"==L)return H(U,Dy(a,F,c,d,G,e),11);M=a.nc.get(L);if(!M){N=null;U.A(9);break}return H(U,M(F,c,G),10);case 10:N=U.h;case 9:J=N;U.A(6);break;case 11:J=U.h;case 6:if(J){if(J.keyIds)for(P=t(J.keyIds),O=P.next();!O.done;O=P.next())R=O.value,x.add(R);w.push(J)}case 3:B=z.next();U.A(2);break;case 4:return U.return({drmInfos:w,keyIds:x,encrypted:u,Jh:v})}})}
function dz(a,b,c,d,e){if(!window.crypto||!window.crypto.subtle)throw db("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new V(2,4,4042);var f=0,g=lx(b,"IV","");if(g){var h=Sc(g.substr(2));if(16!=h.byteLength)throw new V(2,4,4048);}else f=sx(c.na,"EXT-X-MEDIA-SEQUENCE",0);var k=tx(d(),mx(b,"URI"),e),l=k.sort().join("");c=b.toString()+"-"+f+"-"+l;if(!a.oa.has(c)){var m={bitsKey:128,blockCipherMode:"CBC",iv:h,firstMediaSequenceNumber:f};switch(mx(b,
"METHOD")){case "AES-256":m.bitsKey=256;break;case "AES-256-CTR":m.bitsKey=256,m.blockCipherMode="CTR"}m.fetchKey=function(){var n,p,r,u;return Q(function(v){if(1==v.g)return a.M.has(l)||(n=zh(k,a.g.retryParameters),p=ry(a,n,6).promise,a.M.set(l,p)),H(v,a.M.get(l),2);if(3!=v.g){r=v.h;if(!r.data||r.data.byteLength!=m.bitsKey/8)throw new V(2,4,4049);u={name:"CTR"==m.blockCipherMode?"AES-CTR":"AES-CBC",length:m.bitsKey};return H(v,window.crypto.subtle.importKey("raw",r.data,u,!0,["decrypt"]),3)}m.cryptoKey=
v.h;m.fetchKey=void 0;I(v)})};a.oa.set(c,m)}return a.oa.get(c)}function ky(a,b){null==a.u&&(b=rx(b.na,"EXT-X-START"))&&(a.u=Number(mx(b,"TIME-OFFSET")))}function az(a,b){var c=rx(b.na,"EXT-X-PLAYLIST-TYPE");b=rx(b.na,"EXT-X-ENDLIST");b=c&&"VOD"==c.value||b;c=c&&"EVENT"==c.value&&!b;c=!b&&!c;b?Ox(a,Hx):c?Ox(a,sy):Ox(a,ez)}
function Vx(a,b){var c=Infinity,d=b.segments;if(d.length)for(var e=d.length-1;0<=e;){var f=rx(d[e].na,"EXTINF");if(f){c=Number(f.value.split(",")[0]);break}e--}d=rx(b.na,"EXT-X-TARGETDURATION");if(!d)throw new V(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);if(e=rx(b.na,"EXT-X-PART-INF"))a.R=Number(mx(e,"PART-TARGET"));b=rx(b.na,"EXT-X-SERVER-CONTROL");a.ea&&a.R?(a.s=a.qc?5*a.R<=c?Math.min(a.R,a.s):Math.min(c,a.s):Math.min(a.R,a.s),a.Ka=b?Number(mx(b,"PART-HOLD-BACK")):0):(a.s=Math.min(c,a.s),
c=b?kx(b,"HOLD-BACK"):null,a.Fa=c?Number(c.value):0);a.Sa=Math.max(d,a.Sa)}function ly(a,b){var c=0;if(a.g.defaultPresentationDelay)c=a.g.defaultPresentationDelay;else if(a.Ka)c=a.Ka;else if(a.Fa)c=a.Fa;else{var d=b.segments.length,e=a.g.hls.liveSegmentsDelay;e>d-2&&(e=Math.max(1,d-2));for(e=d-e;e<d;e++){var f=rx(b.segments[e].na,"EXTINF");c=f?c+Math.ceil(Number(f.value.split(",")[0])):c+a.Sa}}a.u&&0>a.u&&(c=Math.min(-a.u,c),a.u+=c);a.l.Si(0);a.l.mh(c);a.l.fd(!1)}
function cz(a,b,c,d,e){var f=rx(c,"EXT-X-MAP");if(!f)return null;var g=mx(f,"URI"),h=tx(d(),g,e);g=[h.toString(),lx(f,"BYTERANGE","")].join("-");if(!a.Aa.has(g)){var k=void 0,l=null,m=!1;c=t(c);for(var n=c.next();!n.done;n=c.next())n=n.value,"EXT-X-KEY"==n.name?(m=mx(n,"METHOD"),Cy(m)&&n.id<f.id?(m=!1,k=dz(a,n,b,d,e)):m="NONE"!=m):"EXT-X-BYTERANGE"==n.name&&n.id<f.id&&(l=n);b=fz(h,f,l,k,m);a.Aa.set(g,b)}return a.Aa.get(g)}
function fz(a,b,c,d,e){var f=0,g=null;b=lx(b,"BYTERANGE");!b&&c&&(b=c.value);b&&(f=b.split("@"),g=Number(f[0]),f=Number(f[1]),g=f+g-1,d&&(c=g+1-f,c%16&&(g+=16-c%16)));return new Xj(function(){return a},f,g,null,null,null,d,e)}
function gz(a,b,c,d,e,f,g,h,k){function l(U){U=(new tb(U)).sb.split(".").pop();var ua=hz.get(g).get(U);ua||(ua=py.get(U));return ua}var m=d.na,n=rx(m,"EXTINF"),p=0,r=0,u=null;d.dc.length&&(a.m.isLowLatency=!0);var v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var w=rx(m,"EXT-X-PROGRAM-DATE-TIME");w&&w.value&&(v=Le(w.value),a.Ya=!0)}var x=ak;rx(m,"EXT-X-GAP")&&(a.m.gapCount++,x=2);if(!n){if(0==d.dc.length)throw new V(2,4,4024,"EXTINF");if(!a.ea)return null}var z=[];w=!1;var B=null,C=!1,E=!1;if(a.ea&&
d.dc.length){p=b&&window.ReadableStream&&a.g.hls.allowLowLatencyByteRangeOptimization;for(var D=v,A={},F=0;F<d.dc.length;A={Jf:void 0,nf:void 0},F++){var G=d.dc[F],K=0==F?c:z[z.length-1],L=0==F?e:K.endTime,J=Number(lx(G,"DURATION"))||a.R;if(J){var M=L+J,N=0,P=null;"EXT-X-PRELOAD-HINT"==G.name?(N=(N=lx(G,"BYTERANGE-START"))?Number(N):0,(K=lx(G,"BYTERANGE-LENGTH"))?P=N+Number(K)-1:N&&(P=Number.MAX_SAFE_INTEGER)):(N=lx(G,"BYTERANGE"),P=t(iz(K,N)),N=P.next().value,P=P.next().value);A.nf=lx(G,"URI");if(A.nf){K=
ak;"YES"==lx(G,"GAP")&&(a.m.gapCount++,K=2,C=!0);A.Jf=null;var O=function(U){return function(){null==U.Jf&&(U.Jf=tx(h(),U.nf,f));return U.Jf}}(A);p&&0<=N&&null!=P&&(B=O,w=!0);L=new Zj(L,M,O,N,P,b,0,0,Infinity,[],"",null,D,K,k);"EXT-X-PRELOAD-HINT"==G.name&&(L.Ug(),E=!0);"YES"!=lx(G,"INDEPENDENT")&&0<F&&L.wd();if(A=l(A.nf))L.mimeType=A,jz.has(A)&&(L.ia=null);z.push(L);D&&(D+=J)}}}}if(n){n=Number(n.value.split(",")[0]);if(0==n)return null;p=e+n}else if(z.length)p=z[z.length-1].endTime;else return null;
w&&(C||0!=z[0].hb?(w=!1,B=null):z=[]);(n=rx(m,"EXT-X-BYTERANGE"))?(u=t(iz(c,n.value)),r=u.next().value,u=u.next().value):z.length&&(r=z[0].hb,u=z[z.length-1].Pa);c="";n=null;"image"==g&&(c="1x1",m=rx(m,"EXT-X-TILES"))&&(c=mx(m,"LAYOUT"),(m=lx(m,"DURATION"))&&(n=Number(m)));var R=null;b=new Zj(e,p,function(){if(B)return B();null==R&&(R=tx(h(),d.g,f));return R||[]},r,u,b,0,0,Infinity,z,c,n,v,x,k,0<z.length&&!!d.g);if(e=l(d.g))b.mimeType=e,jz.has(e)&&(b.ia=null);w&&(a.qc=!0,b.si(),E&&b.Ug());return b}
function iz(a,b){var c=0,d=null;b&&(c=b.split("@"),b=Number(c[0]),c=c[1]?Number(c[1]):a.Pa+1,d=c+b-1);return[c,d]}
function Wx(a,b,c,d,e){if("video"==c||"audio"==c){var f=a.l.m;if(f&&!Yx(a,c))for(b=px(b,"EXT-X-DATERANGE"),b=b.filter(function(L){return null!=kx(L,"START-DATE")}).sort(function(L,J){L=mx(L,"START-DATE");J=mx(J,"START-DATE");return L<J?-1:L>J?1:0}),c=0;c<b.length;c++){var g=b[c];try{var h=mx(g,"ID");if(!a.Ha.has(h)){var k=mx(g,"START-DATE"),l=Le(k);if(!isNaN(l)){var m=Math.max(0,l-f),n=null,p=lx(g,"END-DATE");if(p){var r=Le(p);if(!isNaN(r)&&(n=r-f,0>n))continue}if(null==n){var u=lx(g,"DURATION")||
lx(g,"PLANNED-DURATION");if(u){var v=parseFloat(u);isNaN(v)||(n=m+v);if(0>l-f+v)continue}}var w=lx(g,"CLASS")||"com.apple.quicktime.HLS",x="YES"==lx(g,"END-ON-NEXT");if(null==n&&x){for(var z=c+1;z<b.length;z++){var B=lx(b[z],"CLASS")||"com.apple.quicktime.HLS";if(w==B){var C=mx(b[z],"START-DATE"),E=Le(C);if(!isNaN(E)&&E&&E>l){n=Math.max(0,E-f);break}}}if(null==n)continue}z=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var D=[],A=t(g.attributes),F=A.next();!F.done;F=A.next()){var G=
F.value;if(!z.includes(G.name)){var K=vx(G.value,d);if("X-ASSET-URI"==G.name||"X-ASSET-LIST"==G.name)K=tx(e(),G.value,d)[0];D.push({key:G.name,description:"",data:K,mimeType:null,pictureType:null})}}if(1<D.length)a.h.onMetadata(w,m,n,D);a.Ha.add(h)}}}catch(L){}}}}
function Tx(a,b,c,d,e,f){var g=b.segments,h=void 0,k=sx(b.na,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=sx(b.na,"EXT-X-MEDIA-SEQUENCE",0),m=rx(b.na,"EXT-X-SKIP"),n=m?Number(lx(m,"SKIPPED-SEGMENTS")):0,p=l+n,r=0;Kx(a)&&c.has(p)&&(r=c.get(p));0===r&&a.Na==sy&&0<c.size&&!c.has(p)&&null!=a.l.i&&(r=a.l.Hb());var u=[],v=null;m=[];for(var w=0;w<g.length;w++){var x=g[w],z=0==w?r:v.endTime;p=l+n+w;rx(x.na,"EXT-X-DISCONTINUITY")&&(k++,v&&v.ia&&(v.ia.g=z));var B=t(x.na);for(var C=B.next();!C.done;C=B.next())C=C.value,
"EXT-X-KEY"==C.name&&(Cy(mx(C,"METHOD"))?h=dz(a,C,b,e,d):h=void 0);c.set(p,z);B=cz(a,b,x.na,e,d);if(z=gz(a,B,v,x,z,d,f,e,h))(v=sx(x.na,"EXT-X-BITRATE"))?m.push({bitrate:v,duration:z.endTime-z.startTime}):m.length&&(v=m.pop(),v.duration+=z.endTime-z.startTime,m.push(v)),v=z,z.i=k,Yx(a,f)&&null!=a.L&&p<a.L||u.push(z)}b=void 0;m.length&&(b=m.reduce(function(E,D){return E+D.duration},0),b=Math.round(m.reduce(function(E,D){return E+D.bitrate*D.duration},0)/b*1E3));if(m=u.some(function(E){return null!=
E.h}))for(c={},d=0;d<u.length;c={Me:void 0,Le:void 0,Fe:void 0,cd:void 0,Ee:void 0},d++)if(c.cd=u[d],null==c.cd.h)for(c.Le=0,c.Me=d,e=function(E){return function(){var D=u[E.Me];if(D){if(null!=D.h)return D.h+E.Le;E.Le-=D.endTime-D.startTime;E.Me+=1}return null}}(c),c.Ee=0,c.Fe=d,g=function(E){return function(){var D=u[E.Fe];if(D){D!=E.cd&&(E.Ee+=D.endTime-D.startTime);if(null!=D.h)return D.h+E.Ee;--E.Fe}return null}}(c);null==c.cd.h;)c.cd.h=g(),null==c.cd.h&&(c.cd.h=e());if(m)for(c=t(u),d=c.next();!d.done;d=
c.next())for(e=d.value,d=e.h,e=t(e.g),g=e.next();!g.done;g=e.next())g=g.value,g.h=d,d+=g.endTime-g.startTime;c=a.ba;if(m&&Infinity!=c&&!Yx(a,f))for(a=t(u),f=a.next();!f.done;f=a.next())f.value.xh(c);return{segments:u,bandwidth:b}}function wy(a,b){if(a==bd){if("vtt"==b||"wvtt"==b)return"text/vtt";if(b&&""!==b)return"application/mp4"}return"image"!=a||b&&"jpeg"!=b?"audio"==a&&"mp4a.40.34"==b?"audio/mpeg":"mjpg"==b?"application/mp4":null:"image/jpeg"}
function xy(a){return a==bd?"text/vtt":hz.get(a).get("mp4")}function oy(a,b){a=Kx(a)?Math.trunc((b.length-1)/2):0;for(var c=b[a];2==c.Ac()&&a+1<b.length;)a++,c=b[a];return{segment:c,segmentIndex:a}}
function bz(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w;return Q(function(x){switch(x.g){case 1:e=Fh;f=oy(a,d);g=f.segment;if(2==g.status)return x.return(xy(b));h=g.S();k=new tb(h[0]);l=k.sb.split(".").pop();m=hz.get(b);if((n=m.get(l))||(n=py.get(l))||(n=wy(b,c)))return x.return(n);r=1;u=zh(h,a.g.retryParameters);va(x,2);u.method="HEAD";return H(x,ry(a,u,e,{type:r}).promise,4);case 4:v=x.h;p=v.headers["content-type"];xa(x,3);break;case 2:w=za(x);if(!w||1002!=w.code&&1001!=w.code){x.A(3);break}u.method=
"GET";a.g.hls.allowRangeRequestsToGuessMimeType&&(u.headers.Range="bytes=0-0");return H(x,ry(a,u,e,{type:r}).promise,6);case 6:v=x.h,p=v.headers["content-type"];case 3:if(!p){x.A(7);break}n=p.toLowerCase().split(";")[0];if("application/octet-stream"!=n){x.A(8);break}if(v.data.byteLength){x.A(9);break}u.method="GET";return H(x,ry(a,u,e,{type:r}).promise,10);case 10:v=x.h;case 9:Nk(Nb(v.data))&&(n="video/mp2t");case 8:if("application/octet-stream"!=n)return x.return(n);case 7:return x.return(xy(b))}})}
function Xy(a,b,c,d,e,f,g){a&&(a.width=Number(b)||void 0,a.height=Number(c)||void 0,a.frameRate=Number(d)||void 0,a.hdr=e||void 0,a.videoLayout=f||void 0,a.colorGamut=g||void 0)}function Ix(a,b,c){return ry(a,zh(b,a.g.retryParameters),0,{type:c?2:3})}
function Gx(a){var b,c,d,e,f,g;return Q(function(h){switch(h.g){case 1:if(!a.h)return h.return();va(h,2);b=Date.now();return H(h,a.update(),4);case 4:c=Date.now();Kx(a)&&(d=(c-b)/1E3,a.Ob.sample(1,d),e=0<a.g.updatePeriod?a.g.updatePeriod:a.s,f=Math.max(0,e-xd(a.Ob)),a.C.$(f));xa(h,3);break;case 2:g=za(h);if(!a.h)return h.return();if(a.g.raiseFatalErrorOnManifestUpdateRequestFailure)return a.h.onError(g),h.return();g.severity=1;a.h.onError(g);a.C.$(.1);case 3:if(!a.h)return h.return();a.h.onManifestUpdated();
I(h)}})}function Kx(a){return a.Na!=Hx}function Ox(a,b){a.Na=b;a.l&&a.l.fd(!Kx(a));Kx(a)||a.C.stop()}function ry(a,b,c,d){if(!a.Y)throw new V(2,7,7001);d||(d={});d.isPreload=a.kc();b=a.h.networkingEngine.request(c,b,d);th(a.Y,b);return b}function Cy(a){return"AES-128"==a||"AES-256"==a||"AES-256-CTR"==a}
function Fx(a,b,c,d){var e,f,g,h,k,l;return Q(function(m){if(1==m.g){if("video/mp2t"==c)throw new V(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4041);e=mx(b,"METHOD");f=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!f.includes(e))return m.return(null);g="cenc";"SAMPLE-AES"==e&&(g="cbcs");h=mx(b,"URI");k=Wc("com.apple.fps",g,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],h);var n=(new tb(h)).Eb.replace(/-/g,"").toLowerCase();return(l=32===n.length&&/^[0-9a-f]+$/.test(n)?
n:null)||!d?m.A(2):H(m,kz(a,d),3)}2!=m.g&&(l=m.h);l&&k.keyIds.add(l);return m.return(k)})}
function Dy(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w,x;return Q(function(z){switch(z.g){case 1:if("video/mp2t"==c)throw new V(2,4,4040);if("apple"===window.shakaMediaKeysPolyfill)throw new V(2,4,4041);g=mx(b,"METHOD");h=["SAMPLE-AES","SAMPLE-AES-CTR"];if(!h.includes(g))return z.return(null);k=tx(d(),mx(b,"URI"),f);if(k[0].startsWith("data:text/plain;base64,")){l=Tc(Rc(k[0].split("data:text/plain;base64,").pop()));z.A(2);break}m=k.sort().join("");a.qa.has(m)||(n=zh(k,a.g.retryParameters),p=ry(a,n,6).promise,
a.qa.set(m,p));return H(z,a.qa.get(m),3);case 3:r=z.h,l=Tc(r.data);case 2:u="00000000000000000000000000000000";if(!e){z.A(4);break}return H(z,kz(a,e),5);case 5:(v=z.h)&&(u=v);case 4:return w=new Map,w.set(u,l),x="cenc","SAMPLE-AES"==g&&(x="cbcs"),z.return(Xc(w,x))}})}
function kz(a,b){var c,d,e,f;return Q(function(g){if(1==g.g){c=null;if(a.va.has(b))return c=a.va.get(b),g.A(2);d=Nm(b.S(),b.cc(),b.Zb(),a.g.retryParameters);e=Fh;return H(g,ry(a,d,e,{type:0}).promise,3)}2!=g.g&&(f=g.h,b.me(f.data),c=Lm(f.data),a.va.set(b,c));return g.return(c)})}S("shaka.hls.HlsParser",Ex);
var py=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),lz=(new Map).set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),mz=(new Map).set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts",
"video/mp2t").set("tsv","video/mp2t"),nz=(new Map).set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),oz=(new Map).set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),hz=(new Map).set("audio",lz).set("video",mz).set("text",nz).set("image",oz),jz=new Set(["video/mp2t"].concat(y(Nf))),
Hx="VOD",ez="EVENT",sy="LIVE",Nx={lj:Hx,Ul:ez,bm:sy};dj("application/x-mpegurl",function(){return new Ex});dj("application/vnd.apple.mpegurl",function(){return new Ex});function pz(a){return Iu(a)}var qz=(new Map).set("com.microsoft.playready",pz).set("com.microsoft.playready.recommendation",pz).set("com.microsoft.playready.software",pz).set("com.microsoft.playready.hardware",pz);function rz(){var a=this;this.h=this.g=null;this.l=[];this.j=null;this.u=1;this.i=null;this.G=new vd(5);this.s=new bc(function(){sz(a)});this.C=new sh;this.m=new Map;this.B=function(){return!1}}q=rz.prototype;q.configure=function(a,b){this.g=a;b&&(this.B=b)};q.start=function(a,b){var c=this;return Q(function(d){if(1==d.g)return c.l=[a],c.h=b,H(d,tz(c),2);if(!c.h)throw new V(2,7,7001);return d.return(c.j)})};
function sz(a){var b;Q(function(c){switch(c.g){case 1:return va(c,2),H(c,tz(a),4);case 4:xa(c,3);break;case 2:b=za(c),a.h&&(b.severity=1,a.h.onError(b));case 3:if(!a.h)return c.return();I(c)}})}q.stop=function(){this.g=this.h=null;this.l=[];this.j=null;null!=this.s&&(this.s.stop(),this.s=null);this.m.clear();return this.C.destroy()};
q.update=function(){var a=this,b;return Q(function(c){if(1==c.g)return va(c,2),H(c,tz(a),4);if(2!=c.g)return xa(c,0);b=za(c);if(!a.h||!b)return c.return();a.h.onError(b);I(c)})};q.onExpirationUpdated=function(){};q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};
function tz(a){var b,c,d,e,f,g,h;return Q(function(k){if(1==k.g)return b=zh(a.l,a.g.retryParameters),c=a.h.networkingEngine,d=Date.now(),e=c.request(0,b,{type:5,isPreload:a.B()}),th(a.C,e),H(k,e.promise,2);f=k.h;if(!a.h)return k.return();f.uri&&!a.l.includes(f.uri)&&a.l.unshift(f.uri);var l=f.uri,m=f.data,n=a.g.mss.manifestPreprocessor;if(n!=Xn){Fd("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead.");m=ww(m,"SmoothStreamingMedia");if(!m)throw new V(2,
4,4046,l);n(m);m=Kc(m.outerHTML)}var p=qe(m,"SmoothStreamingMedia");if(!p)throw new V(2,4,4046,l);l=a.g.mss.manifestPreprocessorTXml;l!=Yn&&l(p);a.i||(a.i=new Kl(null,0));if(l=Ie(p,"IsLive",Se,!1))throw new V(2,4,4047);a.i.fd(!l);n=Ie(p,"TimeScale",Qe,1E7);m=Ie(p,"DVRWindowLength",Qe);l&&(0===m||isNaN(m))&&(m=Infinity);var r=Ie(p,"CanSeek",Se,!1);0===m&&r&&(m=Infinity);r=null;m&&0<m&&(r=m/n);l&&!isNaN(a.g.availabilityWindowOverride)&&(r=a.g.availabilityWindowOverride);null==r&&(r=Infinity);a.i.zf(r);
m=Ie(p,"Duration",Qe,Infinity);l||a.i.ub(m/n);l={variants:[],textStreams:[],timescale:n,duration:m/n};var u;r=Be(p,"Protection");n=a.g.mss.keySystemsBySystemId;m=[];r=t(r);for(u=r.next();!u.done;u=r.next())m=m.concat(Be(u.value,"ProtectionHeader"));if(m.length){r=[];for(u=0;u<m.length;u++){var v=m[u],w=v.attributes.SystemID.toLowerCase(),x=n[w];if(x){var z;a:{if(z=Gu(v)){z=t(Ee(z,"DATA"));for(var B=z.next();!B.done;B=z.next())if(B=Fe(B.value,"KID")){z=Rc(Ce(B));z=new Uint8Array([z[3],z[2],z[1],z[0],
z[5],z[4],z[7],z[6]].concat(y(z.slice(8))));z=Tc(z);break a}}z=null}B=Rc(Ce(v));w=Sc(w.replace(/-/g,""));w=[{initData:$h(B,w,new Set,0),initDataType:"cenc",keyId:z}];w=Wc(x,"cenc",w);z&&w.keyIds.add(z);if(x=qz.get(x))w.licenseServerUri=x(v);r.push(w)}}n=r}else n=[];u=n;r=[];n=[];m=[];p=Be(p,"StreamIndex");p=t(p);for(v=p.next();!v.done;v=p.next()){v=v.value;x=Be(v,"QualityLevel");w=l.timescale;z=l.duration;B=Be(v,"c");for(var C=[],E=0,D=0;D<B.length;++D){var A=B[D],F=B[D+1],G=Ie(A,"t",Qe),K=Ie(A,"d",
Qe);A=Ie(A,"r",Oe);if(!K)break;G=null!=G?G:E;(A=A||0)&&A--;if(0>A)if(F){F=Ie(F,"t",Qe);if(null==F)break;else if(G>=F)break;A=Math.ceil((F-G)/K)-1}else{if(Infinity==z)break;else if(G/w>=z)break;A=Math.ceil((z*w-G)/K)-1}for(F=0;F<=A;++F)E=G+K,C.push({start:G/w,end:E/w,Fh:G}),G=E}w=C;x=t(x);for(z=x.next();!z.done;z=x.next())(z=uz(a,v,z.value,w,u,l))&&("audio"!=z.type||a.g.disableAudio?"video"!=z.type||a.g.disableVideo?z.type!=bd||a.g.disableText||m.push(z):n.push(z):r.push(z))}p=[];r=t(0<r.length?r:
[null]);for(u=r.next();!u.done;u=r.next())for(u=u.value,v=t(0<n.length?n:[null]),C=v.next();!C.done;C=v.next())x=p,w=x.push,z=a,B=u,C=C.value,D=0,B&&B.bandwidth&&0<B.bandwidth&&(D+=B.bandwidth),C&&C.bandwidth&&0<C.bandwidth&&(D+=C.bandwidth),z={id:z.u++,language:B?B.language:"und",disabledUntilTime:0,primary:!!B&&B.primary||!!C&&C.primary,audio:B,video:C,bandwidth:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},w.call(x,z);l.variants=p;l.textStreams=m;a.j?(a.j.variants=l.variants,
a.j.textStreams=l.textStreams,a.h.filter(a.j)):(a.j={presentationTimeline:a.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:a.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},a.i.cf());Promise.resolve();g=Date.now();h=(g-d)/1E3;a.G.sample(1,h);I(k)})}
function uz(a,b,c,d,e,f){var g=b.attributes.Type;if("audio"!==g&&"video"!==g&&"text"!==g)return db("Ignoring unrecognized type:",g),null;var h=b.attributes.Language,k=a.u++,l=Ie(c,"Bitrate",Pe),m=Ie(c,"MaxWidth",Pe),n=Ie(c,"MaxHeight",Pe),p=Ie(c,"Channels",Pe),r=Ie(c,"SamplingRate",Pe),u=f.duration;d.length&&(u=d[d.length-1].end-d[0].start);var v=a.i.getDuration();a.i.ub(Math.min(u,v));var w={id:k,originalId:b.attributes.Name||String(k),groupId:null,createSegmentIndex:function(){return Promise.resolve()},
closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:m||void 0,height:n||void 0,kind:"",encrypted:0<e.length,drmInfos:e,keyIds:new Set,language:hd(h||"und"),originalLanguage:h,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:p,audioSamplingRate:r,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,
tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:u,timescale:f.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if(e=b.attributes.Subtype)(e=vz.get(e))&&w.roles.push(e),"main"===e&&(w.primary=!0);e=c.attributes.FourCC;if(null===e||""===e)e=b.attributes.FourCC;if(!e)if("audio"===g)e="AAC";else if("video"===g)return db('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),
null;if(!wz.includes(e.toUpperCase()))return db("Codec not supported:",e),null;c=xz(c,g,e,w);w.mssPrivateData.codecPrivateData=c;switch(g){case "audio":if(!c)return db("Quality unsupported without CodecPrivateData",g),null;w.type="audio";w.mimeType="mss/audio/mp4";w.codecs=yz(e,c);break;case "video":if(!c)return db("Quality unsupported without CodecPrivateData",g),null;w.type="video";w.mimeType="mss/video/mp4";w.codecs=zz(c);break;case "text":if(w.type=bd,w.mimeType="application/mp4","TTML"===e||
"DFXP"===e)w.codecs="stpp"}w.fullMimeTypes.add(Mf(w.mimeType,w.codecs));w.createSegmentIndex=function(){if(w.segmentIndex)return Promise.resolve();if(a.m.has(w.id))var x=a.m.get(w.id);else x=[],"video"==w.type&&(x=w.mssPrivateData.codecPrivateData.split("00000001").slice(1)),x={id:w.id,type:w.type,codecs:w.codecs,encrypted:w.encrypted,timescale:w.mssPrivateData.timescale,duration:w.mssPrivateData.duration,Cb:x,Ja:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,eb:0,data:null,stream:w},x=wj(new qj([x])),
a.m.set(w.id,x);x=Az(a,new Xj(function(){return[]},0,null,rm(w),w.mssPrivateData.timescale,x,null,w.encrypted),w,b,d);w.segmentIndex=new em(x);return Promise.resolve()};w.closeSegmentIndex=function(){w.segmentIndex&&(w.segmentIndex.release(),w.segmentIndex=null)};return w}
function xz(a,b,c,d){if(a=a.attributes.CodecPrivateData)return a;if("audio"!==b)return null;b=d.channelsCount||2;a=d.audioSamplingRate||44100;var e={96E3:0,88200:1,64E3:2,48E3:3,44100:4,32E3:5,24E3:6,22050:7,16E3:8,12E3:9,11025:10,8E3:11,7350:12};d=e[a];if("AACH"===c)return c=new Uint8Array(4),a=e[2*a],c[0]=40|d>>1,c[1]=d<<7|b<<3|a>>1,c[2]=a<<7|8,c[3]=0,b=new Uint16Array(2),b[0]=(c[0]<<8)+c[1],b[1]=(c[2]<<8)+c[3],b[0].toString(16)+b[1].toString(16);c=new Uint8Array(2);c[0]=16|d>>1;c[1]=d<<7|b<<3;
b=new Uint16Array(1);b[0]=(c[0]<<8)+c[1];return b[0].toString(16)}function yz(a,b){var c=0;"AACH"===a&&(c=5);b?0===c&&(c=(parseInt(b.substr(0,2),16)&248)>>3):(c=2,"AACH"===a&&(c=5));return"mp4a.40."+c}function zz(a){var b=/00000001[0-9]7/.exec(a);return b.length&&a?"avc1."+a.substr(a.indexOf(b[0])+10,6):""}
function Az(a,b,c,d,e){var f=d.attributes.Url.replace("{bitrate}",String(c.bandwidth));d=[];e=t(e);for(var g=e.next(),h={};!g.done;h={Df:void 0},g=e.next())h.Df=g.value,d.push(new Zj(h.Df.start,h.Df.end,function(k){return function(){return Vc(a.l,[f.replace("{start time}",String(k.Df.Fh))])}}(h),0,null,b,0,0,c.mssPrivateData.duration));return d}S("shaka.mss.MssParser",rz);
var wz="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),vz=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");dj("application/vnd.ms-sstr+xml",function(){return new rz});function Bz(a,b,c,d,e,f,g){if(200<=c&&299>=c&&202!=c||304==c)return{uri:e||d,originalUri:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"],originalRequest:f};f=null;try{f=Jc(b)}catch(h){}throw new V(401==c||403==c?2:1,1,1001,d,c,f,a,g,e||d);};function Cz(){}
function Dz(a,b,c,d,e,f){var g=new Ez;Jh(b.headers).forEach(function(m,n){g.append(n,m)});var h=new Fz,k={Ph:!1,dj:!1};a=Gz(a,b,c,{body:b.body||void 0,headers:g,method:b.method,signal:h.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},k,d,e,b.streamDataCallback,f.minBytesForProgressEvents||0);a=new lh(a,function(){k.Ph=!0;h.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var l=new bc(function(){k.dj=!0;h.abort()});l.$(b/1E3);a.finally(function(){l.stop()})}return a}
function Gz(a,b,c,d,e,f,g,h,k){var l,m,n,p,r,u,v,w,x,z,B,C,E,D;return Q(function(A){switch(A.g){case 1:return l=Hz,m=Iz,p=new ArrayBuffer(0),u=r=0,v=Date.now(),va(A,2),H(A,l(a,d),4);case 4:n=A.h;g(Jz(n.headers));if("HEAD"==d.method){A.A(5);break}x=(w=n.headers.get("Content-Length"))?parseInt(w,10):0;if(!n.body)return H(A,n.arrayBuffer(),9);z=n.clone().body.getReader();B=function(F){function G(){var K,L,J,M;return Q(function(N){switch(N.g){case 1:return va(N,2),H(N,z.read(),4);case 4:K=N.h;xa(N,3);
break;case 2:return za(N),N.return();case 3:if(K.done){N.A(5);break}r+=K.value.byteLength;if(!h){N.A(5);break}return H(N,h(K.value),5);case 5:L=Date.now();J=r-u;if(100<L-v&&J>=k||K.done)M=K.done?0:x-r,f(L-v,J,M),u=r,v=L;K.done?F.close():(F.enqueue(K.value),G());I(N)}})}G()};new m({start:B});return H(A,n.arrayBuffer(),8);case 8:p=A.h;A.A(5);break;case 9:p=A.h,C=Date.now(),f(C-v,p.byteLength,0);case 5:xa(A,3);break;case 2:E=za(A);if(e.Ph)throw new V(1,1,7001,a,c);if(e.dj)throw new V(1,1,1003,a,c);throw new V(1,
1,1002,a,E,c);case 3:return D=Jz(n.headers),A.return(Bz(D,p,n.status,a,n.url,b,c))}})}function Jz(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}function Kz(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)}S("shaka.net.HttpFetchPlugin",Cz);Cz.isSupported=Kz;Cz.parse=Dz;
var Hz=window.fetch,Fz=window.AbortController,Iz=window.ReadableStream,Ez=window.Headers;Kz()&&(vh("http",Dz,2,!0),vh("https",Dz,2,!0),vh("blob",Dz,2,!0));function Lz(){}
function Mz(a,b,c,d,e,f){var g=new Nz,h=Date.now(),k=0,l=new Promise(function(m,n){g.open(b.method,a,!0);g.responseType="arraybuffer";g.timeout=b.retryParameters.timeout;g.withCredentials=b.allowCrossSiteCredentials;g.onabort=function(){n(new V(1,1,7001,a,c))};var p=!1;g.onreadystatechange=function(){if(2==g.readyState&&!p){var u=Oz(g);e(u);p=!0}};g.onload=function(u){var v=Oz(g),w=g.response;try{d(Date.now()-h,u.loaded-k,0);var x=Bz(v,w,g.status,a,g.responseURL,b,c);m(x)}catch(z){n(z)}};g.onerror=
function(u){n(new V(1,1,1002,a,u,c))};g.ontimeout=function(){n(new V(1,1,1003,a,c))};g.onprogress=function(u){var v=Date.now(),w=f.minBytesForProgressEvents||0,x=u.loaded-k;if(100<v-h&&x>=w||u.lengthComputable&&u.loaded==u.total)d(v-h,x,4==g.readyState?0:u.total-u.loaded),k=u.loaded,h=v};for(var r in b.headers)g.setRequestHeader(r.toLowerCase(),b.headers[r]);g.send(b.body)});return new lh(l,function(){g.abort();return Promise.resolve()})}
function Oz(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}S("shaka.net.HttpXHRPlugin",Lz);Lz.parse=Mz;var Nz=window.XMLHttpRequest;vh("http",Mz,1,!0);vh("https",Mz,1,!0);vh("blob",Mz,1,!0);function Pz(a,b,c,d,e){this.g=a;this.i=b;this.groupId=c;this.h=d;this.j=e}function Qz(a){var b=a.bc(!1);return b?Qc(b):a.S().map(function(c){return"{"+encodeURI(c.split("#xywh=")[0])+"}"}).join("")+":"+a.hb+":"+a.Pa}function Rz(a,b){return Nm(a.g.S(),a.g.hb,a.g.Pa,b.streaming.retryParameters)};function Sz(){this.g=this.j=this.i=0;this.h=new Map;this.l=0}function Tz(a,b){a.i+=b;var c=a.l;a.l++;a.h.set(c,b);return c}Sz.prototype.close=function(a,b){if(this.h.has(a)){var c=this.h.get(a);this.h.delete(a);this.j+=c;this.g+=b}};function Uz(a){return 0==a.i?0:a.j/a.i};function Vz(a){var b=this;this.u=a;this.i=new Map;this.h=new Hh(function(){return Wz(b).catch(function(){})});this.j=[];this.s=function(){};this.m=function(){};this.g=new Sz;this.l=!1}Vz.prototype.destroy=function(){return this.h.destroy()};function Xz(a,b,c){a.s=b;a.m=c}function Wz(a){a.l=!0;var b=a.j.map(function(c){return c()});a.j=[];return Promise.all(b)}
function Yz(a,b,c,d,e,f){Ih(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,r;return Q(function(u){if(1==u.g)return H(u,Zz(a,c),2);h=u.h;if(a.h.g)throw new V(2,9,7001);if(e)for(m in k=Nb(h),l=new Zh(k),l.data)n=Number(m),p=l.data[n],r=l.g[n],a.m(p,r);a.g.close(d,h.byteLength);a.s(Uz(a.g),a.g.g);return u.return(f(h))})});a.i.set(b,g)}
function $z(a,b,c,d,e,f){Ih(a.h);var g=(a.i.get(b)||Promise.resolve()).then(function(){if(a.h.g)throw new V(2,9,7001);if(e){var h=Nb(c);h=new Zh(h);for(var k in h.data){var l=Number(k);a.m(h.data[l],h.g[l])}}a.g.close(d,c.byteLength);a.s(Uz(a.g),a.g.g);return f(c)});a.i.set(b,g)}function aA(a){return Q(function(b){return 1==b.g?H(b,Promise.all(a.i.values()),2):b.return(a.g.g)})}
function Zz(a,b){var c,d,e,f;return Q(function(g){if(1==g.g)return c=Fh,d=a.u.request(c,b),e=function(){return d.abort()},a.j.push(e),H(g,d.promise,2);f=g.h;de(a.j,e);return g.return(f.data)})};function bA(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new kh;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}bA.prototype.abort=function(){var a=this;return Q(function(b){if(1==b.g){try{a.i.abort()}catch(c){}va(b,2);return H(b,a.g,4)}if(2!=b.g)return xa(b,0);za(b);I(b)})};
function cA(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return Q(function(g){if(1==g.g){if(null==e.result)return c(),g.return();f=e.result;return H(g,b(f.key,f.value,f),2)}f.continue();I(g)})}})}bA.prototype.store=function(){return this.h};bA.prototype.promise=function(){return this.g};function dA(a){this.h=a;this.g=[]}dA.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function eA(a,b){return fA(a,b,"readwrite")}function fA(a,b,c){c=a.h.transaction([b],c);var d=new bA(c,b);a.g.push(d);d.promise().then(function(){de(a.g,d)},function(){de(a.g,d)});return d};function gA(a,b,c){this.h=new dA(a);this.i=b;this.g=c}q=gA.prototype;q.destroy=function(){return this.h.destroy()};q.hasFixedKeySpace=function(){return!0};q.addSegments=function(){return hA(this.i)};q.removeSegments=function(a,b){return iA(this,this.i,a,b)};q.getSegments=function(a){var b=this,c;return Q(function(d){if(1==d.g)return H(d,jA(b,b.i,a),2);c=d.h;return d.return(c.map(function(e){return b.Uh(e)}))})};q.addManifests=function(){return hA(this.g)};
q.updateManifest=function(){return Promise.reject(new V(2,9,9016,"Cannot modify values in "+this.g))};function kA(a,b,c){a=eA(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}q.updateManifestExpiration=function(a,b){var c=eA(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};q.removeManifests=function(a,b){return iA(this,this.g,a,b)};
q.getManifests=function(a){var b=this,c;return Q(function(d){if(1==d.g)return H(d,jA(b,b.g,a),2);c=d.h;return d.return(Promise.all(c.map(function(e){return b.Md(e)})))})};q.getAllManifests=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=fA(a.h,a.g,"readonly"),c=new Map,H(d,cA(b,function(e,f){var g;return Q(function(h){if(1==h.g)return H(h,a.Md(f),2);g=h.h;c.set(e,g);I(h)})}),2)):3!=d.g?H(d,b.promise(),3):d.return(c)})};q.Uh=function(a){return a};q.Md=function(a){return Promise.resolve(a)};
function hA(a){return Promise.reject(new V(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 Q(function(m){if(1==m.g){d=eA(c.h,a);e=d.store();f=[];g=t(b);h=g.next();for(k={};!h.done;k={eh:void 0},h=g.next())l=h.value,k.eh=e.add(l),k.eh.onsuccess=function(n){return function(){f.push(n.eh.result)}}(k);return H(m,d.promise(),2)}return m.return(f)})};
function iA(a,b,c,d){a=eA(a.h,b);b=a.store();c=t(c);for(var e=c.next(),f={};!e.done;f={Sg:void 0},e=c.next())f.Sg=e.value,b.delete(f.Sg).onsuccess=function(g){return function(){return d(g.Sg)}}(f);return a.promise()}
function jA(a,b,c){var d,e,f,g,h,k,l;return Q(function(m){if(1==m.g){d=fA(a.h,b,"readonly");e=d.store();f={};g=[];h=t(c);k=h.next();for(l={};!k.done;l={vf:void 0,Ye:void 0},k=h.next())l.Ye=k.value,l.vf=e.get(l.Ye),l.vf.onsuccess=function(n){return function(){void 0==n.vf.result&&g.push(n.Ye);f[n.Ye]=n.vf.result}}(l);return H(m,d.promise(),2)}if(g.length)throw new V(2,9,9012,"Could not find values for "+g);return m.return(c.map(function(n){return f[n]}))})};function lA(a){this.g=new dA(a)}lA.prototype.destroy=function(){return this.g.destroy()};lA.prototype.getAll=function(){var a=this,b,c;return Q(function(d){return 1==d.g?(b=fA(a.g,"session-ids","readonly"),c=[],H(d,cA(b,function(e,f){c.push(f)}),2)):3!=d.g?H(d,b.promise(),3):d.return(c)})};lA.prototype.add=function(a){var b=eA(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
lA.prototype.remove=function(a){var b=this,c;return Q(function(d){return 1==d.g?(c=eA(b.g,"session-ids"),H(d,cA(c,function(e,f,g){a.includes(f.sessionId)&&g.delete()}),2)):H(d,c.promise(),0)})};function mA(){this.g=new Map}mA.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};mA.prototype.init=function(){var a=this;nA.forEach(function(e,f){(e=e())&&a.g.set(f,e)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
function oA(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Qb:d,ib:f},ib:e})})});if(b)return b;throw new V(2,9,9013,"Could not find a cell that supports add-operations");}function pA(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Qb:d,ib:f},e)})})}
function qA(a,b,c){a=a.g.get(b);if(!a)throw new V(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new V(2,9,9013,"Could not find cell with name "+c);return b}function rA(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function sA(a){var b=Array.from(a.g.keys());if(!b.length)throw new V(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
function tA(a){var b,c,d;return Q(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=nA,d.forEach(function(f){(f=f())&&b.push(f)})),H(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):H(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function uA(a,b){nA.set(a,b)}S("shaka.offline.StorageMuxer",mA);mA.unregister=function(a){nA.delete(a)};mA.register=uA;mA.prototype.destroy=mA.prototype.destroy;var nA=new Map;function vA(){gA.apply(this,arguments)}oa(vA,gA);vA.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return Q(function(g){d=eA(c.h,c.g);e=d.store();f=new kh;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new V(2,9,9012,"Could not find values for "+a))};return H(g,Promise.all([d.promise(),f]),0)})};
vA.prototype.Md=function(a){var b,c,d,e,f,g;return Q(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=wA(a.periods[c],e),b.push(f);return H(h,Vv(b),2)}g=h.h;return h.return({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
function wA(a,b){xA(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return yA(e,a.startTime,b)})}
function yA(a,b,c){var d=a.initSegmentUri?zA(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,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=
zA(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}vA.prototype.Uh=function(a){return{data:a.data}};
function zA(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 V(2,9,9004,"Could not parse uri "+a);}
function xA(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){d=c++;for(var e=t(a),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d)}if(!a.length&&b.length)for(d=c++,
e=t(b),f=e.next();!f.done;f=e.next())f.value.variantIds.push(d);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function AA(){gA.apply(this,arguments)}oa(AA,gA);
AA.prototype.Md=function(a){var b,c,d,e,f,g;return Q(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(BA(n,k.startTime,k.startTime+e));f=l;b.push(f)}return H(h,Vv(b),2)}g=h.h;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,sequenceMode:!1})})};
function BA(a,b,c){return{id:a.id,originalId:a.originalId,groupId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:a.kind,language:a.language,originalLanguage:a.language||null,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,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}};function CA(){gA.apply(this,arguments)}oa(CA,gA);q=CA.prototype;q.hasFixedKeySpace=function(){return!1};q.addSegments=function(a){return this.add(this.i,a)};q.addManifests=function(a){return this.add(this.g,a)};q.updateManifest=function(a,b){return kA(this,a,b)};q.Md=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function DA(){this.m=this.j=this.i=this.h=this.g=this.l=null}q=DA.prototype;
q.init=function(){var a=this,b=new kh,c=!1,d=new bc(function(){c=!0;b.reject(new V(2,9,9017))});d.$(5);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new vA(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new AA(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
new AA(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new CA(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new lA(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new V(2,
9,9001,e.error)),d.stop(),f.preventDefault())};return b};q.destroy=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return H(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return H(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return H(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return H(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return H(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),I(b)}})};
q.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};q.getEmeSessionCell=function(){return this.m};
q.erase=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return H(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return H(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return H(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return H(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),H(b,EA(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,H(b,a.init(),0)}})};
function EA(){var a=new kh,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new V(2,9,9001,b.error));c.preventDefault()};return a}uA("idb",function(){return(!nc()||nc()&&xc())&&!gc()&&window.indexedDB?new DA:null});function FA(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}FA.prototype.Qb=function(){return this.i};FA.prototype.ib=function(){return this.h};FA.prototype.key=function(){return this.l};FA.prototype.toString=function(){return this.j};
function GA(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 FA(b,c,d,Number(a[4])):null};function HA(a,b){this.h=a;this.g=b}
function IA(a,b){var c=new Kl(null,0);c.ub(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=JA(a,d,e,c);e=b.streams.filter(function(l){return l.type==bd}).map(function(l){return KA(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return KA(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:b.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}
function JA(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){g=t(g.value.variantIds);for(var h=g.next();!h.done;h=g.next())e.add(h.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(g=t(g.value.variantIds),h=g.next();!h.done;h=g.next())e.add(h.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
b.next())for(g=e.value,e=KA(a,g,d),g=t(g.variantIds),h=g.next();!h.done;h=g.next())h=f.get(h.value),h.language=e.language,h.primary=h.primary||e.primary,h.audio=e;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=KA(a,e,d),e=t(e.variantIds),g=e.next();!g.done;g=e.next())g=f.get(g.value),g.primary=g.primary||b.primary,g.video=b;return f}
function KA(a,b,c){var d=b.segments.map(function(e){return LA(a,e,b)});c.ee(d);return{id:b.id,originalId:b.originalId,groupId:b.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new em(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,colorGamut:b.colorGamut,videoLayout:b.videoLayout,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,originalLanguage:b.originalLanguage||
null,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout,mssPrivateData:b.mssPrivateData,accessibilityPurpose:null,external:b.external,fastSwitching:b.fastSwitching,fullMimeTypes:new Set([Mf(b.mimeType,b.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}
function LA(a,b,c){var d=new FA("segment",a.h,a.g,b.dataKey);a=new Zj(b.startTime,b.endTime,function(){return[d.toString()]},0,null,null!=b.initSegmentKey?MA(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"");a.mimeType=b.mimeType||c.mimeType||"";a.codecs=b.codecs||c.codecs||"";b.thumbnailSprite&&a.Cf(b.thumbnailSprite);return a}function MA(a,b){var c=new FA("segment",a.h,a.g,b);return new Xj(function(){return[c.toString()]},0,null)};function NA(){this.g=null}q=NA.prototype;q.configure=function(){};
q.start=function(a,b){var c=this,d,e,f,g,h,k,l;return Q(function(m){switch(m.g){case 1:d=GA(a);c.g=d;if(null==d||"manifest"!=d.g)throw new V(2,1,9004,a);e=new mA;wa(m,2);return H(m,e.init(),4);case 4:return H(m,qA(e,d.Qb(),d.ib()),5);case 5:return f=m.h,H(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new HA(d.Qb(),d.ib()),l=IA(k,h),b.makeTextStreamsForClosedCaptions(l),m.return(l);case 2:return Ca(m),H(m,e.destroy(),7);case 7:Da(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 Q(function(m){switch(m.g){case 1:return d=c.g,e=new mA,va(m,2,3),H(m,e.init(),5);case 5:return H(m,qA(e,d.Qb(),d.ib()),6);case 6:return f=m.h,H(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return H(m,f.updateManifestExpiration(d.key(),b),3);case 3:return Ca(m),H(m,e.destroy(),10);case 10:Da(m,0);break;case 2:za(m),m.A(3)}})};
q.onInitialVariantChosen=function(){};q.banLocation=function(){};q.setMediaElement=function(){};dj("application/x-offline-manifest",function(){return new NA});function OA(){}function PA(a,b){var c=GA(a);c&&"manifest"==c.g?(a={uri:a,originalUri:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:b},a=oh(a)):a=c&&"segment"==c.g?QA(c.key(),c,b):mh(new V(2,1,9004,a));return a}
function QA(a,b,c){var d=new mA;return oh(void 0).bb(function(){return d.init()}).bb(function(){return qA(d,b.Qb(),b.ib())}).bb(function(e){return e.getSegments([b.key()])}).bb(function(e){return{uri:b,data:e[0].data,headers:{},originalRequest:c}}).finally(function(){return d.destroy()})}S("shaka.offline.OfflineScheme",OA);OA.plugin=PA;vh("offline",PA);function RA(a,b,c){var d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var r=!1,u=t(m),v=u.next();!v.done;v=u.next())if(v=v.value,SA(v.info,p)){v.sessionIds.push(p.sessionId);r=!0;break}r||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=TA(a,b,g);return H(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l.return(d)}})}
function TA(a,b,c){var d,e;return Q(function(f){switch(f.g){case 1:return d=new ai({pc:b,onError:function(){},lf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),va(f,2),d.configure(a),H(f,li(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:xa(f,3);break;case 2:return za(f),H(f,d.destroy(),5);case 5:return f.return([]);case 3:return e=[],H(f,Promise.all(c.sessionIds.map(function(g){return Q(function(h){if(1==
h.g)return va(h,2),H(h,xi(d,g),4);if(2!=h.g)return e.push(g),xa(h,0);za(h);I(h)})})),6);case 6:return H(f,d.destroy(),7);case 7:return f.return(e)}})}function SA(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&ee(a.audioCapabilities,b.audioCapabilities,c)&&ee(a.videoCapabilities,b.videoCapabilities,c)};function UA(a,b,c){var d=b.presentationTimeline.getDuration();b=VA(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function WA(a,b){var c=IA(new HA(a.Qb(),a.ib()),b),d=b.appMetadata||{};c=VA(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
function VA(a){var b=[],c=Yg(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(Og(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(Pg(c.value));return b};function XA(){this.g=new Map}function YA(a,b){var c=b.audio,d=b.video;c&&!d&&a.g.set(c.id,c.bandwidth||b.bandwidth);!c&&d&&a.g.set(d.id,d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g.set(c.id,e);a.g.set(d.id,f)}}function ZA(a,b){a.g.set(b.id,b.bandwidth||2048)}function $A(a,b){a=a.g.get(b);null==a&&(a=0);return a};function aB(a){var b=this;if(a&&a.constructor!=Y)throw new V(2,9,9008);this.g=this.h=null;a?(this.h=a.g,this.g=a.Fb()):(this.h=Wn(),this.g=new uh);this.i=[];this.l=[];var c=!a;this.j=new Hh(function(){var d,e,f,g,h;return Q(function(k){switch(k.g){case 1:return H(k,Promise.all(b.l.map(function(l){return Wz(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return H(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return H(k,b.g.destroy(),4);
case 4:b.h=null,b.g=null,I(k)}})});this.m=1E9}function bB(){if(cc())a:{var a=t(nA.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=aB.prototype;q.destroy=function(){return this.j.destroy()};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Dn(a,b));return ao(this.h,a)};q.getConfiguration=function(){var a=Wn();ao(a,this.h,Wn());return a};q.Fb=function(){return this.g};
q.store=function(a,b,c,d,e){var f=this,g=this.getConfiguration(),h=new Vz(this.g);this.l.push(h);b=cB(this,a,b||{},d||[],e||[],function(){var k;return Q(function(l){if(1==l.g)return c?l.A(2):H(l,Co(a,f.g,g.manifest.retryParameters),3);2!=l.g&&(c=l.h);k=gj(a,c||null);return l.return(k())})},g,h);b=new lh(b,function(){return Wz(h)});b.finally(function(){de(f.l,h)});return dB(this,b)};
function cB(a,b,c,d,e,f,g,h){var k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P;return Q(function(O){switch(O.g){case 1:return eB(),l=k=null,m=new mA,r=p=n=null,va(O,2,3),H(O,f(),5);case 5:return k=O.h,H(O,fB(a,b,k,g),6);case 6:u=O.h;gB(a);v=!u.presentationTimeline.V()&&!u.presentationTimeline.Wc();if(!v)throw new V(2,9,9005,b);w=t(d);x=w.next();case 7:if(x.done){O.A(9);break}z=x.value;return H(O,hB(a,z,u),10);case 10:B=O.h;u.imageStreams.push(B);gB(a);x=w.next();O.A(7);break;case 9:C=t(e),E=C.next();
case 11:if(E.done)return ni(g.drm.clearKeys,u.variants),F=u.variants.some(function(R){if(R.audio)for(var U=t(R.audio.drmInfos),ua=U.next();!ua.done;ua=U.next())if(ua.value.licenseServerUri.startsWith("data:"))return!0;if(R.video)for(R=t(R.video.drmInfos),U=R.next();!U.done;U=R.next())if(U.value.licenseServerUri.startsWith("data:"))return!0;return!1}),G=g.offline.usePersistentLicense,F&&(G=!1),H(O,a.md(u,function(R){r=r||R},g,G),15);D=E.value;return H(O,iB(a,u,D.uri,D.language,D.kind,D.mime,D.codecs),
14);case 14:A=O.h;u.textStreams.push(A);gB(a);E=C.next();O.A(11);break;case 15:l=O.h;gB(a);if(r)throw r;return H(O,jB(u,l,g,G),16);case 16:return H(O,m.init(),17);case 17:return gB(a),H(O,oA(m),18);case 18:return n=O.h,gB(a),K=kB(l,u,b,c,g,h,G),L=K.Ik,J=K.Bh,H(O,n.ib.addManifests([L]),19);case 19:M=O.h;gB(a);p=M[0];gB(a);if(r)throw r;return H(O,lB(a,J,p,L,h,g,n.ib,u,l,G),20);case 20:return gB(a),mB(u,L,l,G),H(O,n.ib.updateManifest(p,L),21);case 21:return gB(a),N=new FA("manifest",n.path.Qb,n.path.ib,
p),O.return(WA(N,L));case 3:return Ca(O),H(O,m.destroy(),22);case 22:if(!k){O.A(23);break}return H(O,k.stop(),23);case 23:if(!l){O.A(25);break}return H(O,l.destroy(),25);case 25:Da(O,0);break;case 2:P=za(O);if(null==p){O.A(27);break}return H(O,nB(p),27);case 27:throw r||P;}})}
function lB(a,b,c,d,e,f,g,h,k,l){var m,n,p,r,u,v,w,x,z,B,C;return Q(function(E){switch(E.g){case 1:m={};n=0;p=function(){if(a.j.g||e.l)throw new V(2,9,7001);};r=function(D,A){var F,G,K,L,J,M,N,P,O;return Q(function(R){if(1==R.g){F=t(D);G=F.next();for(K={};!G.done;K={hc:void 0},G=F.next())K.hc=G.value,p(),L=Rz(K.hc,f),J=K.hc.i,M=K.hc.h,N=function(U){return function(ua){var ba,Ma,Ra,Aa;return Q(function(qa){switch(qa.g){case 1:ba=U.hc.g;Ma=ba.bc(!1);if(!ba.aesKey||Ma){qa.A(2);break}return H(qa,Mm(ua,
ba.aesKey,U.hc.j),3);case 3:ua=qa.h;case 2:return Ra=Qz(ba),H(qa,g.addSegments([{data:ua}]),4);case 4:Aa=qa.h,p(),m[Ra]=Aa[0],n+=ua.byteLength,I(qa)}})}}(K),P=K.hc.g,(O=P.bc(!1))?$z(e,K.hc.groupId,O,J,M,N):Yz(e,K.hc.groupId,L,J,M,N);return H(R,aA(e),2)}p();if(!A||e.l)return R.A(0);mB(h,d,k,l);return H(R,g.updateManifest(c,d),0)})};u=!1;va(E,2);if(!oB(h)||!u||pB(h)){E.A(4);break}return H(E,r(b.filter(function(D){return D.h}),!0),5);case 5:return p(),b=b.filter(function(D){return!D.h}),v=m,w=n,m={},
n=0,H(E,qB(g,c,d,v,w,function(){return gB(a)}),6);case 6:p();case 4:if(u){E.A(7);break}return H(E,r(b,!1),8);case 8:return p(),x=m,z=n,m={},n=0,H(E,qB(g,c,d,x,z,function(){return p()}),9);case 9:p();case 7:xa(E,0);break;case 2:return B=za(E),C=Object.values(m),H(E,g.removeSegments(C,function(){}),10);case 10:throw B;}})}
function nB(a){var b,c,d,e;return Q(function(f){switch(f.g){case 1:return b=new mA,H(f,b.init(),2);case 2:return H(f,oA(b),3);case 3:return c=f.h,d=new FA("manifest",c.path.Qb,c.path.ib,a),H(f,b.destroy(),4);case 4:return e=new aB,H(f,e.remove(d.toString()),0)}})}
function qB(a,b,c,d,e,f){var g,h,k,l,m,n,p,r,u,v,w;return Q(function(x){switch(x.g){case 1:g=!1;va(x,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())r=p.value,u=r.pendingSegmentRefId?d[r.pendingSegmentRefId]:null,null!=u&&(r.dataKey=u,r.pendingSegmentRefId=void 0),u=r.pendingInitSegmentRefId?d[r.pendingInitSegmentRefId]:null,null!=u&&(r.initSegmentKey=u,r.pendingInitSegmentRefId=void 0),r.pendingSegmentRefId&&(h=!1),r.pendingInitSegmentRefId&&
(h=!1);c.size+=e;h&&(c.isIncomplete=!1);return H(x,a.updateManifest(b,c),4);case 4:g=!0;f();xa(x,0);break;case 2:return v=za(x),H(x,nB(b),5);case 5:if(g){x.A(6);break}w=Object.values(d);return H(x,a.removeSegments(w,function(){}),6);case 6:throw v;}})}
function jB(a,b,c,d){var e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E,D,A,F,G,K,L,J,M,N,P,O,R;return Q(function(U){switch(U.g){case 1:return e={width:Infinity,height:Infinity},pg(a,c.restrictions,e),H(U,sg(b,a,d,c.drm.preferredKeySystems,c.drm.keySystemsMapping),2);case 2:f=[];g=c.preferredDecodingAttributes;h=c.preferredVideoCodecs;k=c.preferredAudioCodecs;l=c.preferredTextFormats;ng(a,h,k,g,l);m=t(a.variants);for(n=m.next();!n.done;n=m.next())p=n.value,f.push(Og(p));r=t(a.textStreams);for(u=r.next();!u.done;u=
r.next())v=u.value,f.push(Pg(v));w=t(a.imageStreams);for(x=w.next();!x.done;x=w.next())z=x.value,f.push(Qg(z));return H(U,c.offline.trackSelectionCallback(f),3);case 3:B=U.h;C=a.presentationTimeline.getDuration();E=0;D=t(B);for(A=D.next();!A.done;A=D.next())F=A.value,G=F.bandwidth*C/8,E+=G;va(U,4);return H(U,c.offline.downloadSizeCallback(E),6);case 6:K=U.h;if(!K)throw new V(2,9,9014);xa(U,5);break;case 4:L=za(U);if(L instanceof V)throw L;throw new V(2,9,9015);case 5:J=new Set;M=new Set;N=new Set;
P=t(B);for(O=P.next();!O.done;O=P.next())R=O.value,"variant"==R.type&&J.add(R.id),"text"==R.type&&M.add(R.id),"image"==R.type&&N.add(R.id);a.variants=a.variants.filter(function(ua){return J.has(ua.id)});a.textStreams=a.textStreams.filter(function(ua){return M.has(ua.id)});a.imageStreams=a.imageStreams.filter(function(ua){return N.has(ua.id)});rB(a);I(U)}})}
function kB(a,b,c,d,e,f,g){var h=UA(c,b,d),k=e.offline.progressCallback;Xz(f,function(u,v){h.size=v;k(h,u)},function(u,v){l&&g&&m==v&&ti(a,"cenc",u)});var l=oB(b)&&!pB(b),m=null;l&&(m=sB.get(a.h.keySystem));for(var n=new XA,p=t(b.textStreams),r=p.next();!r.done;r=p.next())n.g.set(r.value.id,52);p=t(b.imageStreams);for(r=p.next();!r.done;r=p.next())ZA(n,r.value);p=t(b.variants);for(r=p.next();!r.done;r=p.next())YA(n,r.value);f=tB(f,n,b,e);e=f.streams;f=f.Bh;(n=a.h)&&g&&(n.initData=[]);return{Ik:{creationTime:Date.now(),
originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.Sd(),streams:e,sessionIds:g?Ci(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode,type:b.type},Bh:f}}function oB(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
function pB(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function mB(a,b,c,d){b.expiration=c.Sd();c=Ci(c);b.sessionIds=d?c:[];if(oB(a)&&d&&!c.length)throw new V(2,9,9007);}q.remove=function(a){return uB(this,vB(this,a))};
function vB(a,b){var c,d,e,f,g,h;return Q(function(k){switch(k.g){case 1:eB();c=GA(b);if(null==c||"manifest"!=c.g)throw new V(2,9,9004,b);d=c;e=new mA;wa(k,2);return H(k,e.init(),4);case 4:return H(k,qA(e,d.Qb(),d.ib()),5);case 5:return f=k.h,H(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],H(k,Promise.all([wB(a,h,e),xB(f,d,h)]),2);case 2:return Ca(k),H(k,e.destroy(),8);case 8:Da(k,0)}})}
function yB(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Mf(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Mf(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function wB(a,b,c){return Q(function(d){return H(d,zB(a.g,a.h.drm,c,b),0)})}
function xB(a,b,c){function d(){}var e=AB(c);WA(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}q.al=function(){return uB(this,BB(this))};
function BB(a){var b,c,d,e,f,g,h,k,l,m;return Q(function(n){switch(n.g){case 1:return eB(),b=a.g,c=a.h.drm,d=new mA,e=!1,wa(n,2),H(n,d.init(),4);case 4:f=[],rA(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return H(n,k.getAll(),8);case 8:return l=n.h,H(n,RA(c,b,l),9);case 9:return m=n.h,H(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return Ca(n),H(n,d.destroy(),11);case 11:Da(n,3);break;case 3:return n.return(!e)}})}
q.list=function(){return uB(this,CB())};function CB(){var a,b,c;return Q(function(d){switch(d.g){case 1:return eB(),a=[],b=new mA,wa(d,2),H(d,b.init(),4);case 4:return c=Promise.resolve(),pA(b,function(e,f){c=c.then(function(){var g;return Q(function(h){if(1==h.g)return H(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){k=WA(new FA("manifest",e.Qb,e.ib,l),k);a.push(k)});I(h)})})}),H(d,c,2);case 2:return Ca(d),H(d,b.destroy(),6);case 6:Da(d,3);break;case 3:return d.return(a)}})}
function fB(a,b,c,d){var e,f,g,h,k;return Q(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return d.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},
addFont:function(){}},c.configure(d.manifest),gB(a),H(l,c.start(b,g),2);if(3!=l.g)return h=l.h,gB(a),k=DB(h),H(l,Promise.all(nb(k,function(m){return m.createSegmentIndex()})),3);gB(a);if(e)throw e;return l.return(h)})}
function hB(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,x;return Q(function(z){switch(z.g){case 1:return H(z,EB(a,b),2);case 2:d=z.h;if("text/vtt"!=d)throw new V(1,2,2017,b);return H(z,FB(b,a.g,a.h.streaming.retryParameters),3);case 3:e=z.h;f=bg(d);if(!f)throw new V(2,2,2014,d);g=f();h={periodStart:0,segmentStart:0,segmentEnd:c.presentationTimeline.getDuration(),vttOffset:0};k=Nb(e);l=g.parseMedia(k,h,b,[]);m=[];n=t(l);p=n.next();for(r={};!p.done;r={Kf:void 0,od:void 0},p=n.next())r.od=p.value,r.Kf=null,
u=function(B){return function(){null==B.Kf&&(B.Kf=Vc([b],[B.od.payload]));return B.Kf||[]}}(r),v=new Zj(r.od.startTime,r.od.endTime,u,0,null,null,0,0,Infinity),r.od.payload.includes("#xywh")&&(w=r.od.payload.split("#xywh=")[1].split(","),4===w.length&&v.Cf({height:parseInt(w[3],10),positionX:parseInt(w[0],10),positionY:parseInt(w[1],10),width:parseInt(w[2],10)})),m.push(v);x=d;if(!m.length){z.A(4);break}return H(z,Co(m[0].S()[0],a.g,a.h.manifest.retryParameters),5);case 5:x=z.h;case 4:return z.return({id:a.m++,
originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new em(m),mimeType:x||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Mf(x||
"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}
function iB(a,b,c,d,e,f,g){var h,k,l;return Q(function(m){if(1==m.g)return f?m.A(2):H(m,EB(a,c),3);2!=m.g&&(f=m.h);h={id:a.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:gm(0,b.presentationTimeline.getDuration(),[c]),mimeType:f||"",codecs:g||"",kind:e,encrypted:!1,drmInfos:[],keyIds:new Set,language:d,originalLanguage:d,label:null,type:bd,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,
audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([Mf(f||"",g||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null};k=Mf(h.mimeType,h.codecs);l=cg(k);if(!l)throw new V(2,2,2014,f);return m.return(h)})}
function EB(a,b){var c;return Q(function(d){switch(d.g){case 1:return va(d,2),H(d,Co(b,a.g,a.h.streaming.retryParameters),4);case 4:c=d.h;xa(d,3);break;case 2:za(d);case 3:if(c)return d.return(c);throw new V(1,2,2011,b);}})}function FB(a,b,c){var d,e,f;return Q(function(g){if(1==g.g)return d=Fh,e=zh([a],c),e.method="GET",H(g,b.request(d,e).promise,2);f=g.h;return g.return(f.data)})}
q.md=function(a,b,c,d){var e=this,f;return Q(function(g){return 1==g.g?(f=new ai({pc:e.g,onError:b,lf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),f.configure(c.drm),H(g,fi(f,a.variants,d),2)):3!=g.g?H(g,vi(f),3):g.return(f)})};
function tB(a,b,c,d){var e=new Map,f=DB(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=GB(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),Bh:Array.from(e.values())}}
function GB(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,groupId:d.groupId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,colorGamut:d.colorGamut,videoLayout:d.videoLayout,kind:d.kind,language:d.language,originalLanguage:d.originalLanguage,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,
audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,tilesLayout:d.tilesLayout,mssPrivateData:d.mssPrivateData,external:d.external,fastSwitching:d.fastSwitching,isAudioMuxedInVideo:d.isAudioMuxedInVideo},h=e.offline.numberOfParallelDownloads,k=0===h?d.id:0;HB(d,c.presentationTimeline.Hb(),function(l,m){var n=Qz(l),p=void 0;if(!f.has(n)){var r=l.endTime-l.startTime;r=$A(b,d.id)*r;r=Tz(a.g,r);f.set(n,new Pz(l,r,k,!1,m))}l.ia&&(p=Qz(l.ia),f.has(p)||(r=.5*
$A(b,d.id),r=Tz(a.g,r),f.set(p,new Pz(l.ia,r,k,!0,m))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:n,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite});0!==h&&(k=(k+1)%h)});return g}
function HB(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d,b),d=a.segmentIndex.get(++b)}function gB(a){if(a.j.g)throw new V(2,9,7001);}function eB(){if(!bB())throw new V(2,9,9E3);}function uB(a,b){return Q(function(c){if(1==c.g)return a.i.push(b),wa(c,2),H(c,b,4);if(2!=c.g)return c.return(c.h);Ca(c);de(a.i,b);return Da(c,0)})}function dB(a,b){var c=b.promise;a.i.push(c);return b.finally(function(){de(a.i,c)})}
function AB(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
function zB(a,b,c,d){var e,f,g;return Q(function(h){if(1==h.g){if(!d.drmInfo)return h.return();e=sA(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:yB(d,!1),videoCapabilities:yB(d,!0)}});return H(h,RA(b,a,f),2)}return 3!=h.g?(g=h.h,H(h,e.remove(g),3)):H(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
function DB(a){for(var b=new Set,c=t(a.variants),d=c.next();!d.done;d=c.next())d=d.value,d.audio&&b.add(d.audio),d.video&&b.add(d.video);c=t(a.textStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.imageStreams);for(c=a.next();!c.done;c=a.next())b.add(c.value);return b}
function rB(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}S("shaka.offline.Storage",aB);aB.deleteAll=function(){var a;return Q(function(b){return 1==b.g?(a=new mA,wa(b,2),H(b,tA(a),2)):5!=b.g?(Ca(b),H(b,a.destroy(),5)):Da(b,0)})};
aB.prototype.list=aB.prototype.list;aB.prototype.removeEmeSessions=aB.prototype.al;aB.prototype.remove=aB.prototype.remove;aB.prototype.store=aB.prototype.store;aB.prototype.getNetworkingEngine=aB.prototype.Fb;aB.prototype.getConfiguration=aB.prototype.getConfiguration;aB.prototype.configure=aB.prototype.configure;aB.prototype.destroy=aB.prototype.destroy;aB.support=bB;
var sB=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");
fq("offline",bB);function IB(){}function JB(){for(var a=t(KB),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){db("Error installing polyfill!",c)}}}function LB(a,b){a={priority:b||0,callback:a};for(b=0;b<KB.length;b++)if(KB[b].priority<a.priority){KB.splice(b,0,a);return}KB.push(a)}S("shaka.polyfill",IB);IB.register=LB;IB.installAll=JB;var KB=[];function MB(){}function NB(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())OB(b.value)}function OB(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}IB.Aria=MB;MB.install=NB;LB(NB);function PB(){}function QB(){tc()||hc("Sky_STB")||RB()}IB.EncryptionScheme=PB;PB.install=QB;LB(QB,-2);function SB(){}
function TB(){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",UB);document.addEventListener("webkitfullscreenerror",UB);document.addEventListener("mozfullscreenchange",UB);document.addEventListener("mozfullscreenerror",UB);document.addEventListener("MSFullscreenChange",UB);document.addEventListener("MSFullscreenError",UB)}}
function UB(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}IB.Fullscreen=SB;SB.install=TB;LB(TB);function VB(){}function WB(){var a=!0;if(nc()&&!xc()&&!yc()||oc()||sc()||tc()||kc()||ic()||uc()||pc()&&!oc())a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),XB=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=YB)}
function YB(a){var b,c,d,e,f,g,h,k,l,m,n;return Q(function(p){switch(p.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};c=a.video;d=a.audio;if("media-source"!=a.type){if("file"==a.type){if(c&&(e=c.contentType,f=dc(e),!f)||d&&(g=d.contentType,h=dc(g),!h))return p.return(b)}else return p.return(b);p.A(2);break}if(!cc())return p.return(b);if(!c){p.A(3);break}return H(p,ZB(c),4);case 4:if(k=p.h,!k)return p.return(b);case 3:if(d){var r=d.contentType;nc()&&d.spatialRendering&&
(r+="; spatialRendering=true");l=Nd(r);if(!l)return p.return(b)}case 2:if(!a.keySystemConfiguration)return b.supported=!0,p.return(b);m=a.keySystemConfiguration;return H(p,$B(c,d,m),6);case 6:if(n=p.h)b.supported=!0,b.keySystemAccess=n;case 5:return p.return(b)}})}
function ZB(a){var b,c;return Q(function(d){return 1==d.g?nc()?H(d,aC(a),3):ic()?(b=a.contentType,a.width&&a.height&&(b+="; width="+a.width,b+="; height="+a.height),a.framerate&&(b+="; framerate="+a.framerate),a.bitrate&&(b+="; bitrate="+a.bitrate),d.return(Nd(b))):d.A(2):2!=d.g?(c=d.h,d.return(c)):d.return(Nd(a.contentType))})}
function $B(a,b,c){var d,e,f,g,h,k,l,m,n,p,r;return Q(function(u){switch(u.g){case 1:d=[];e=[];c.audio&&(f={robustness:c.audio.robustness||"",contentType:b.contentType},ic()&&b.contentType.includes('codecs="ac-3"')&&(f.contentType='audio/mp4; codecs="ec-3"'),c.audio.encryptionScheme&&(f.encryptionScheme=c.audio.encryptionScheme),d.push(f));c.video&&(g={robustness:c.video.robustness||"",contentType:a.contentType},c.video.encryptionScheme&&(g.encryptionScheme=c.video.encryptionScheme),e.push(g));h=
{initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes};d.length&&(h.audioCapabilities=d);e.length&&(h.videoCapabilities=e);k=a?a.contentType:"";l=b?b.contentType:"";m=Wf(k)+";"+Vf(k);n=Wf(l)+";"+Vf(l);p=c.keySystem;r=null;va(u,2);if(Zb.has(m+"#"+n+"#"+p)){r=Zb.get(m+"#"+n+"#"+p)||null;u.A(4);break}return H(u,navigator.requestMediaKeySystemAccess(c.keySystem,[h]),5);case 5:r=u.h,Zb.set(m+"#"+n+"#"+p,r);case 4:xa(u,
3);break;case 2:za(u);case 3:return u.return(r)}})}
function aC(a){var b,c,d,e,f;return Q(function(g){if(1==g.g){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return g.return(Nd(a.contentType));b=a.contentType;a.width&&a.height&&1280<a.width&&720<a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(c=Math.round(a.framerate),24>c||30<c)&&(b+="; framerate="+a.framerate);d=a.transferFunction||"";switch(d){case "":case "srgb":break;case "pq":b+="; eotf=smpte2084";break;case "hlg":b+="; eotf=arib-std-b67";break;
default:return g.return(!1)}e=!1;f=bC;return f.has(b)?(e=f.get(b),g.A(2)):H(g,cast.__platform__.canDisplayType(b),3)}2!=g.g&&(e=g.h,f.set(b,e));return g.return(e)})}IB.MediaCapabilities=VB;VB.install=WB;var XB=null;VB.originalMcap=XB;var bC=new Map;LB(WB,-1);function cC(){}function dC(){var a=vc();if(window.MediaSource||window.ManagedMediaSource)a&&window.MediaSource?12>=a?(eC(),fC()):15>=a&&eC():hc("DT_STB_BCM")?(eC(),fC()):(hc("Tizen 2")||jc()||hc("Tizen 4"))&&gC();(window.MediaSource||window.ManagedMediaSource)&&hC();window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&iC()}
function eC(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Na.apply(0,arguments));b.abort=function(){};return b}}function fC(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}
function hC(){if(window.MediaSource){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"mp2t"!=Sf(c)&&a(c)}}if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"mp2t"!=Sf(c)&&b(c)}}}
function gC(){var a=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(c){return"opus"!=Vf(c)&&a(c)};if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);window.ManagedMediaSource.isTypeSupported=function(c){return"opus"!=Vf(c)&&b(c)}}}
function iC(){var a=MediaSource.isTypeSupported;kc()||(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)})}IB.MediaSource=cC;cC.install=dC;LB(dC);function jC(){}function kC(){screen.orientation&&screen.orientation.unlock||(void 0!=screen.orientation?lC():void 0!=window.orientation&&mC())}function lC(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()});void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}
function mC(){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 nC;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new T("change");b.dispatchEvent(c)})}IB.Orientation=jC;jC.install=kC;function nC(){mb.call(this);this.type="";this.angle=0}oa(nC,mb);
nC.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)};
nC.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};LB(kC);function oC(){}var pC,qC,rC,sC,tC,uC;
function vC(a){if(window.HTMLVideoElement&&window.WebKitMediaKeys){if(void 0===a?0:a)pC=!0,qC=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),rC=HTMLMediaElement.prototype.setMediaKeys,sC=window.MediaKeys,tC=window.MediaKeySystemAccess,uC=navigator.requestMediaKeySystemAccess;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=wC;window.MediaKeys=xC;window.MediaKeySystemAccess=yC;navigator.requestMediaKeySystemAccess=
zC;window.shakaMediaKeysPolyfill=AC;Gg.clear();Zb.clear()}}function zC(a,b){try{var c=new yC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function wC(a){var b=this.mediaKeys;b&&b!=a&&BC(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?BC(a,this):Promise.resolve()}
function CC(a){a=Nb(a.initData);if(Rb(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Hc(a.subarray(4),!0);a=Kc(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Ob(a);this.dispatchEvent(b)}IB.PatchedMediaKeysApple=oC;
oC.uninstall=function(){pC&&(pC=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",qC),HTMLMediaElement.prototype.setMediaKeys=rC,window.MediaKeys=sC,window.MediaKeySystemAccess=tC,navigator.requestMediaKeySystemAccess=uC,qC=uC=rC=tC=sC=null,window.shakaMediaKeysPolyfill="",Gg.clear(),Zb.clear())};oC.install=vC;
function yC(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(a=t(b),b=a.next();!b.done;b=a.next()){var c=b.value;if("required"==c.persistentState)b=null;else{b={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:c.initDataTypes,sessionTypes:["temporary"],label:c.label};var d=!1,e=!1;if(c.audioCapabilities)for(var f=t(c.audioCapabilities),g=f.next();!g.done;g=f.next())g=g.value,g.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
g.contentType.split(";")[0])&&(b.audioCapabilities.push(g),e=!0));if(c.videoCapabilities)for(c=t(c.videoCapabilities),f=c.next();!f.done;f=c.next())f=f.value,f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));b=e?b:null}if(b){this.g=b;return}}a=Error("Unsupported keySystem");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}
yC.prototype.createMediaKeys=function(){var a=new xC(this.keySystem);return Promise.resolve(a)};yC.prototype.getConfiguration=function(){return this.g};function xC(a){this.h=new WebKitMediaKeys(a);this.g=new zd}xC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new DC(this.h,a)};xC.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function BC(a,b){a.g.ab();if(!b)return Promise.resolve();a.g.o(b,"webkitneedkey",CC);try{return Rl(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}xC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function DC(a){mb.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new zd;this.sessionId="";this.expiration=NaN;this.closed=new kh;this.keyStatuses=new EC}oa(DC,mb);q=DC.prototype;
q.generateRequest=function(a,b){var c=this;this.h=new kh;try{var d=this.l.createSession("video/mp4",Nb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.o(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Ac()?"license-request":"license-renewal").set("message",Ob(e.message));e=new T("message",e);c.dispatchEvent(e)});this.j.o(d,"webkitkeyadded",function(){c.g&&(FC(c,"usable"),c.g.resolve(),c.g=null)});this.j.o(d,"webkitkeyerror",
function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:FC(c,"output-not-allowed");break;default:FC(c,"internal-error")}});FC(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};q.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
q.update=function(a){this.g=new kh;try{this.i.update(Nb(a))}catch(b){this.g.reject(b)}return this.g};q.close=function(){try{this.i.close(),this.closed.resolve(),this.j.ab()}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 FC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}
function EC(){this.size=0;this.g=void 0}q=EC.prototype;q.Ac=function(){return this.g};q.forEach=function(a){this.g&&a(this.g,Yb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yb.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var AC="apple";LB(function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||vC())});function GC(){}function HC(){window.MediaKeys&&(!MediaKeys.prototype.setServerCertificate||jc()||hc("Tizen 4")||hc("Tizen 5.0")||lc())&&(MediaKeys.prototype.setServerCertificate=IC)}function IC(){return Promise.resolve(!1)}IB.PatchedMediaKeysCert=GC;GC.install=HC;LB(HC);function JC(){}
function KC(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)LC="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=MC;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=NC;window.MediaKeys=OC;window.MediaKeySystemAccess=PC;window.shakaMediaKeysPolyfill=QC}}
function RC(a){var b=LC;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function MC(a,b){try{var c=new PC(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function NC(a){var b=this.mediaKeys;b&&b!=a&&SC(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&SC(a,this);return Promise.resolve()}IB.PatchedMediaKeysWebkit=JC;JC.install=KC;
function PC(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=t(f.audioCapabilities),
l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType.split(";")[0],this.g)&&(g.audioCapabilities.push(l),d=!0));if(f.videoCapabilities)for(k=t(f.videoCapabilities),l=k.next();!l.done;l=k.next())l=l.value,l.contentType&&(h=!0,e.canPlayType(l.contentType,this.g)&&(g.videoCapabilities.push(l),d=!0));h||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==f.persistentState&&(c?(g.persistentState="required",g.sessionTypes=["persistent-license"]):
d=!1);if(d){this.h=g;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";a=Error(c);a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;throw a;}PC.prototype.createMediaKeys=function(){var a=new OC(this.g);return Promise.resolve(a)};PC.prototype.getConfiguration=function(){return this.h};function OC(a){this.l=a;this.h=null;this.g=new zd;this.i=[];this.j=new Map}
function SC(a,b){a.h=b;a.g.ab();var c=LC;b&&(a.g.o(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Ob(d.initData);a.h.dispatchEvent(e)}),a.g.o(b,c+"keymessage",function(d){var e=TC(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Ac()?"licenserequest":"licenserenewal").set("message",d.message),d=new T("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.o(b,c+"keyadded",function(d){(d=TC(a,d.sessionId))&&d.ready()}),
a.g.o(b,c+"keyerror",function(d){var e=TC(a,d.sessionId);if(e){var f=Error("EME v0.1b key error"),g=d.errorCode;g.systemCode=d.systemCode;f.errorCode=g;!d.sessionId&&e.h?(45==d.systemCode&&(f.message="Unsupported session type."),e.h.reject(f),e.h=null):d.sessionId&&e.g?(e.g.reject(f),e.g=null):(f=d.systemCode,d.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?UC(e,"output-restricted"):1==f?UC(e,"expired"):UC(e,"internal-error"))}}))}
OC.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new VC(b,this.l,a);this.i.push(a);return a};OC.prototype.setServerCertificate=function(){return Promise.resolve(!1)};OC.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};
function TC(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function VC(a,b,c){mb.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new kh;this.keyStatuses=new WC}oa(VC,mb);q=VC.prototype;q.ready=function(){UC(this,"usable");this.g&&this.g.resolve();this.g=null};
function XC(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Nb(Kc("LOAD_SESSION|"+c));else{var e=Kc("PERSISTENT|");d=Uc(e,b)}else d=Nb(b)}catch(g){return Promise.reject(g)}a.h=new kh;var f=RC("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new bc(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).$(.01)}return a.h}
function YC(a,b,c){if(a.g)a.g.then(function(){return YC(a,b,c)}).catch(function(){return YC(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Gc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Rc(e.keys[0].k);e=Rc(e.keys[0].kid)}else d=Nb(c),e=null;var f=RC("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
function UC(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;b=new T("keystatuseschange");a.dispatchEvent(b)}q.generateRequest=function(a,b){return XC(this,b,null)};q.load=function(a){return"persistent-license"==this.l?XC(this,null,a):Promise.reject(Error("Not a persistent session."))};q.update=function(a){var b=new kh;YC(this,b,a);return b};
q.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=RC("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};q.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function WC(){this.size=0;this.g=void 0}q=WC.prototype;q.Ac=function(){return this.g};
q.forEach=function(a){this.g&&a(this.g,Yb.value())};q.get=function(a){if(this.has(a))return this.g};q.has=function(a){var b=Yb.value();return this.g&&Mb(a,b)?!0:!1};q.entries=function(){};q.keys=function(){};q.values=function(){};var LC="",QC="webkit";LB(KC);function ZC(){}function $C(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=aD,Object.defineProperty(a,"disablePictureInPicture",{get:bD,set:cD,enumerable:!0,configurable:!0}),document.exitPictureInPicture=dD,document.addEventListener("webkitpresentationmodechanged",eD,!0))}}
function eD(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 aD(){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 dD(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
function bD(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function cD(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}IB.PiPWebkit=ZC;ZC.install=$C;LB($C);function fD(){}function gD(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=hD))}function hD(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}IB.RandomUUID=fD;fD.install=gD;LB(gD);function iD(){}function jD(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:kD})}function kD(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}IB.Symbol=iD;iD.install=jD;LB(jD);function lD(){}function mD(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b.catch(function(){});return b}}}IB.VideoPlayPromise=lD;lD.install=mD;LB(mD);function nD(){}function oD(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||lc())&&(a.getVideoPlaybackQuality=pD)}}function pD(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}IB.VideoPlaybackQuality=nD;nD.install=oD;LB(oD);function qD(){}function rD(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=sD;else if(6==b)a=tD;else{try{var c=!!sD(1,2,"")}catch(d){c=!1}c&&(a=sD)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function sD(a,b,c){return new window.TextTrackCue(a,b,c)}function tD(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}IB.VTTCue=qD;qD.install=rD;LB(rD);function uD(){}uD.prototype.parseInit=function(){};uD.prototype.setSequenceMode=function(){};uD.prototype.setManifestType=function(){};uD.prototype.parseMedia=function(a,b){var c=null,d=[];a=Gc(a).split(/\r?\n/);a=t(a);for(var e=a.next();!e.done;e=a.next())if((e=e.value)&&!/^\s+$/.test(e)&&(e=vD.exec(e))){var f=wD.exec(e[1]);f=60*parseInt(f[1],10)+parseFloat(f[2].replace(",","."));e=new af(f,b.segmentEnd?b.segmentEnd:f+2,e[2]);c&&(c.endTime=f,d.push(c));c=e}c&&d.push(c);return d};
S("shaka.text.LrcTextParser",uD);uD.prototype.parseMedia=uD.prototype.parseMedia;uD.prototype.setManifestType=uD.prototype.setManifestType;uD.prototype.setSequenceMode=uD.prototype.setSequenceMode;uD.prototype.parseInit=uD.prototype.parseInit;var vD=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,wD=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;$f("application/x-subtitle-lrc",function(){return new uD});function xD(){}xD.prototype.parseInit=function(){};xD.prototype.setSequenceMode=function(){};xD.prototype.setManifestType=function(){};
xD.prototype.parseMedia=function(a,b,c,d){var e=Gc(a);a=[];if(""==e)return a;var f=re(e,"tt",!0);if(!f)throw new V(2,2,2005,"Failed to parse TTML.");e=Ee(f,"body")[0];if(!e)return[];var g=Ke(f,yD,"frameRate"),h=Ke(f,yD,"subFrameRate"),k=Ke(f,yD,"frameRateMultiplier"),l=Ke(f,yD,"tickRate"),m=Ke(f,yD,"cellResolution"),n=f.attributes["xml:space"]||"default",p=Ke(f,zD,"extent");if("default"!=n&&"preserve"!=n)throw new V(2,2,2005,"Invalid xml:space value: "+n);n="default"==n;g=new AD(g,h,k,l);m=BD(m);
h=Ee(f,"metadata")[0];h=(h?h.children:[]).filter(function(v){return"\n"!=v});k=Ee(f,"style");f=Ee(f,"region");l=[];for(var r=t(f),u=r.next();!u.done;u=r.next())(u=CD(u.value,k,p))&&l.push(u);if(Be(e,"p").length)throw new V(2,2,2001,"<p> can only be inside <div> in TTML");p=t(Be(e,"div"));for(r=p.next();!r.done;r=p.next())if(Be(r.value,"span").length)throw new V(2,2,2001,"<span> can only be inside <p> in TTML");if(b=DD(e,b,g,h,k,f,l,n,m,null,!1,c,d))b.backgroundColor||(b.backgroundColor="transparent"),
a.push(b);return a};
function DD(a,b,c,d,e,f,g,h,k,l,m,n,p){var r=l;if(xe(a)){if(!m)return null;var u={tagName:"span",children:[Ce(a)],attributes:{},parent:null}}else u=a;for(var v=null,w=t(ED),x=w.next();!x.done&&!(v=FD(u,"backgroundImage",d,"#",x.value)[0]);x=w.next());w=null;x=Ke(u,ED,"backgroundImage");var z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(x&&z.test(x)){w=parseInt(x.split(":").pop(),10)-1;if(w>=p.length)return null;w=p[w]}else n&&x&&!x.startsWith("#")&&(z=new tb(n),x=new tb(x),(x=z.resolve(x).toString())&&
(w=x));if("p"==a.tagName||v||w)m=!0;a=m;x="default"==(u.attributes["xml:space"]||(h?"default":"preserve"));z=u.children.every(xe);h=[];if(!z)for(var B=t(u.children),C=B.next();!C.done;C=B.next())(C=DD(C.value,b,c,d,e,f,g,x,k,u,m,n,p))&&h.push(C);d=null!=l;n=Ce(u);n=u.children.length&&n&&/\S/.test(n);B=u.attributes.begin||u.attributes.end||u.attributes.dur;if(!(B||n||"br"==u.tagName||0!=h.length||d&&!x))return null;p=GD(u,c);n=p.start;for(p=p.end;r&&r.tagName&&"tt"!=r.tagName;)p=HD(r,c,n,p),n=p.start,
p=p.end,r=r.parent;null==n&&(n=0);n+=b.periodStart;p=null==p?Infinity:p+b.periodStart;n=Math.max(n,b.segmentStart);p=Math.min(p,b.segmentEnd);if(!B&&0<h.length)for(n=Infinity,p=0,b=t(h),c=b.next();!c.done;c=b.next())c=c.value,n=Math.min(n,c.startTime),p=Math.max(p,c.endTime);if("br"==u.tagName)return e=new af(n,p,""),e.lineBreak=!0,e;b="";z&&(b=Nc(Ce(u)||""),x&&(b=b.replace(/\s+/g," ")));b=new af(n,p,b);b.nestedCues=h;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=FD(u,"region",f,"")[0];if(u.attributes.region&&
k&&k.attributes["xml:id"]){var E=k.attributes["xml:id"];b.region=g.filter(function(D){return D.id==E})[0]}g=k;l&&d&&!u.attributes.region&&!u.attributes.style&&(g=FD(l,"region",f,"")[0]);ID(b,u,g,v,w,e,a,0==h.length);return b}
function CD(a,b,c){var d=new Zd,e=a.attributes["xml:id"];if(!e)return null;d.id=e;e=null;c&&(e=JD.exec(c)||KD.exec(c));c=e?Number(e[1]):null;e=e?Number(e[2]):null;var f,g=LD(a,b,"extent");if(g){var h=(f=JD.exec(g))||KD.exec(g);null!=h&&(d.width=Number(h[1]),d.height=Number(h[2]),f||(null!=c&&(d.width=100*d.width/c),null!=e&&(d.height=100*d.height/e)),d.widthUnits=f||null!=c?$d:0,d.heightUnits=f||null!=e?$d:0)}if(a=LD(a,b,"origin"))if(h=(f=JD.exec(a))||KD.exec(a),null!=h)d.viewportAnchorX=Number(h[1]),
d.viewportAnchorY=Number(h[2]),f?g||(d.width=100-d.viewportAnchorX,d.widthUnits=$d,d.height=100-d.viewportAnchorY,d.heightUnits=$d):(null!=e&&(d.viewportAnchorY=100*d.viewportAnchorY/e),null!=c&&(d.viewportAnchorX=100*d.viewportAnchorX/c)),d.viewportAnchorUnits=f||null!=c?$d:0;return d}function MD(a){var b=a.match(/rgba\(([^)]+)\)/);return b&&(b=b[1].split(","),4==b.length)?(b[3]=String(Number(b[3])/255),"rgba("+b.join(",")+")"):a}
function ID(a,b,c,d,e,f,g,h){g=g||h;"rtl"==ND(b,c,f,"direction",g)&&(a.direction="rtl");h=ND(b,c,f,"writingMode",g);"tb"==h||"tblr"==h?a.writingMode="vertical-lr":"tbrl"==h?a.writingMode="vertical-rl":"rltb"==h||"rl"==h?a.direction="rtl":h&&(a.direction=df);(h=ND(b,c,f,"textAlign",!0))?(a.positionAlign=OD.get(h),a.lineAlign=PD.get(h),a.textAlign=zf[h.toUpperCase()]):a.textAlign=cf;if(h=ND(b,c,f,"displayAlign",!0))a.displayAlign=Af[h.toUpperCase()];if(h=ND(b,c,f,"color",g))a.color=MD(h);if(h=ND(b,
c,f,"backgroundColor",g))a.backgroundColor=MD(h);if(h=ND(b,c,f,"border",g))a.border=h;if(h=ND(b,c,f,"fontFamily",g))switch(h){case "monospaceSerif":a.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case "proportionalSansSerif":a.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case "sansSerif":a.fontFamily="sans-serif";break;case "monospaceSansSerif":a.fontFamily="Consolas,monospace";break;case "proportionalSerif":a.fontFamily="serif";break;default:a.fontFamily=h.split(",").filter(function(k){return"default"!=
k}).join(",")}(h=ND(b,c,f,"fontWeight",g))&&"bold"==h&&(a.fontWeight=wf);h=ND(b,c,f,"wrapOption",g);a.wrapLine=h&&"noWrap"==h?!1:!0;(h=ND(b,c,f,"lineHeight",g))&&h.match(QD)&&(a.lineHeight=h);(h=ND(b,c,f,"fontSize",g))&&(h.match(QD)||h.match(RD))&&(a.fontSize=h);if(h=ND(b,c,f,"fontStyle",g))a.fontStyle=Cf[h.toUpperCase()];d?(e=d.attributes.imageType||d.attributes.imagetype,h=d.attributes.encoding,d=Ce(d).trim(),"PNG"==e&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)):e&&(a.backgroundImage=
e);if(d=ND(b,c,f,"textOutline",g))d=d.split(" "),d[0].match(QD)?a.textStrokeColor=a.color:(a.textStrokeColor=MD(d[0]),d.shift()),d[0]&&d[0].match(QD)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=ND(b,c,f,"letterSpacing",g))&&d.match(QD)&&(a.letterSpacing=d);(d=ND(b,c,f,"linePadding",g))&&d.match(QD)&&(a.linePadding=d);if(d=ND(b,c,f,"opacity",g))a.opacity=parseFloat(d);(d=LD(c,f,"textDecoration"))&&SD(a,d);(d=TD(b,f,"textDecoration"))&&SD(a,d);if(d=ND(b,c,f,"textCombine",g))a.textCombineUpright=
d;switch(ND(b,c,f,"ruby",g)){case "container":a.rubyTag="ruby";break;case "text":a.rubyTag="rt"}}
function SD(a,b){b=t(b.split(" "));for(var c=b.next();!c.done;c=b.next())switch(c.value){case "underline":a.textDecoration.includes(yf)||a.textDecoration.push(yf);break;case "noUnderline":a.textDecoration.includes(yf)&&de(a.textDecoration,yf);break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&de(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&de(a.textDecoration,"overline")}}function ND(a,b,c,d,e){e=void 0===e?!0:e;return(a=TD(a,c,d))?a:e?LD(b,c,d):null}function LD(a,b,c){if(!a)return null;var d=Ke(a,zD,c);return d?d:UD(a,b,c)}function TD(a,b,c){var d=Ke(a,zD,c);return d?d:UD(a,b,c)}
function UD(a,b,c){a=FD(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Je(a[e],"urn:ebu:tt:style",c);f||(f=Ke(a[e],zD,c));f||(f=TD(a[e],b,c));f&&(d=f)}return d}function FD(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;!a&&!(a=e?Je(g,e,b):g.attributes[b])&&(g=g.parent,g););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.attributes["xml:id"]==e){f.push(g);break}return f}
function HD(a,b,c,d){a=GD(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 GD(a,b){var c=VD(a.attributes.begin,b),d=VD(a.attributes.end,b);a=VD(a.attributes.dur,b);null==d&&null!=a&&(d=c+a);return{start:c,end:d}}
function VD(a,b){var c=null;if(WD.test(a)){a=WD.exec(a);c=Number(a[1]);var d=Number(a[2]),e=Number(a[3]),f=Number(a[4]);f+=(Number(a[5])||0)/b.h;e+=f/b.frameRate;c=e+60*d+3600*c}else if(XD.test(a))c=YD(XD,a);else if(ZD.test(a))c=YD(ZD,a);else if($D.test(a))a=$D.exec(a),c=Number(a[1])/b.frameRate;else if(aE.test(a))a=aE.exec(a),c=Number(a[1])/b.g;else if(bE.test(a))c=YD(bE,a);else if(a)throw new V(2,2,2001,"Could not parse cue time range in TTML");return c}
function YD(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)}function BD(a){return a?(a=/^(\d+) (\d+)$/.exec(a))?{Nc:parseInt(a[1],10),rows:parseInt(a[2],10)}:null:null}S("shaka.text.TtmlTextParser",xD);xD.prototype.parseMedia=xD.prototype.parseMedia;xD.prototype.setManifestType=xD.prototype.setManifestType;xD.prototype.setSequenceMode=xD.prototype.setSequenceMode;xD.prototype.parseInit=xD.prototype.parseInit;
function AD(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
var JD=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,RD=/^(\d{1,4}(?:\.\d+)?|100)%$/,QD=/^(\d+px|\d+em|\d*\.?\d+c)$/,KD=/^(\d+)px (\d+)px$/,WD=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,XD=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,ZD=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,$D=/^(\d*(?:\.\d*)?)f$/,aE=/^(\d*(?:\.\d*)?)t$/,bE=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),PD=(new Map).set("left",gf).set("center","center").set("right",
"end").set("start",gf).set("end","end"),OD=(new Map).set("left","line-left").set("center","center").set("right","line-right"),yD=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],zD=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],ED=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];$f("application/ttml+xml",function(){return new xD});function cE(){this.g=new xD}cE.prototype.parseInit=function(a){var b=!1;(new Oh).box("moov",Th).box("trak",Th).box("mdia",Th).box("minf",Th).box("stbl",Th).W("stsd",Vh).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new V(2,2,2007);};cE.prototype.setSequenceMode=function(){};cE.prototype.setManifestType=function(){};
cE.prototype.parseMedia=function(a,b,c){var d=[],e=null,f=[],g=new Map,h=[];(new Oh).box("moof",Th).box("traf",Th).W("tfhd",function(x){e=hj(x.reader,x.flags).Pd}).W("trun",function(x){x=kj(x.reader,x.version,x.flags);x=t(x.hh);for(var z=x.next();!z.done;z=x.next())h.push(z.value.sampleSize||e||0)}).W("subs",function(x){for(var z=x.reader,B=z.X(),C=-1,E=0;E<B;E++){var D=z.X();C+=D;D=z.Da();for(var A=[],F=0;F<D;F++)1==x.version?A.push(z.X()):A.push(z.Da()),z.ha(),z.ha(),z.X();g.set(C,A)}}).box("mdat",
Yh(function(x){f.push(x)})).parse(a,!1);if(0==f.length)throw new V(2,2,2007);for(var k=Uc.apply(Oc,y(f)),l=0,m=0;m<h.length;m++){var n=Nb(k,l,h[m]);l+=h[m];var p=g.get(m);if(p&&p.length){n=Nb(n,0,p[0]);for(var r=[],u=p[0],v=1;v<p.length;v++){var w=Nb(a,u,p[v]);w=Pc(w);r.push("data:image/png;base64,"+w);u+=p[v]}d=d.concat(this.g.parseMedia(n,b,c,r))}else d=d.concat(this.g.parseMedia(n,b,c,[]))}return d};S("shaka.text.Mp4TtmlParser",cE);cE.prototype.parseMedia=cE.prototype.parseMedia;
cE.prototype.setManifestType=cE.prototype.setManifestType;cE.prototype.setSequenceMode=cE.prototype.setSequenceMode;cE.prototype.parseInit=cE.prototype.parseInit;$f('application/mp4; codecs="stpp"',function(){return new cE});$f('application/mp4; codecs="stpp.ttml"',function(){return new cE});$f('application/mp4; codecs="stpp.ttml.im1i"',function(){return new cE});$f('application/mp4; codecs="stpp.ttml.im1t"',function(){return new cE});$f('application/mp4; codecs="stpp.ttml.im2i"',function(){return new cE});
$f('application/mp4; codecs="stpp.ttml.im2t"',function(){return new cE});$f('application/mp4; codecs="stpp.ttml.etd1"',function(){return new cE});$f('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new cE});$f('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new cE});$f('application/mp4; codecs="stpp.TTML.im1t"',function(){return new cE});function dE(){this.g="UNKNOWN"}dE.prototype.parseInit=function(){};dE.prototype.setSequenceMode=function(){};dE.prototype.setManifestType=function(a){this.g=a};
dE.prototype.parseMedia=function(a,b){a=Gc(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var c=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(c[0]))throw new V(2,2,2E3);a=b.vttOffset;if("HLS"==this.g)if(c[0].includes("X-TIMESTAMP-MAP")){var d=c[0];a=d.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);d=d.match(/MPEGTS:(\d+)/m);if(!a||!d)throw new V(2,2,2E3);a=me(a[1]);if(null==a)throw new V(2,2,2E3);d=Number(d[1]);for(var e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,
d+=8589934592;a=b.periodStart+d/9E4-a}else b.periodStart&&b.vttOffset==b.periodStart&&(a=0);b=[];d=t(c[0].split("\n"));for(e=d.next();!e.done;e=d.next())if(e=e.value,/^Region:/.test(e)){e=new ge(e);var f=new Zd;je(e);he(e);for(var g=je(e);g;){var h=f,k=g;(g=/^id=(.*)$/.exec(k))?h.id=g[1]:(g=/^width=(\d{1,2}|100)%$/.exec(k))?h.width=Number(g[1]):(g=/^lines=(\d+)$/.exec(k))?(h.height=Number(g[1]),h.heightUnits=2):(g=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.regionAnchorX=Number(g[1]),
h.regionAnchorY=Number(g[2])):(g=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(k))?(h.viewportAnchorX=Number(g[1]),h.viewportAnchorY=Number(g[2])):/^scroll=up$/.exec(k)&&(h.scroll="up");he(e);g=je(e)}b.push(f)}d=new Map;pf(d);e=[];c=t(c.slice(1));for(f=c.next();!f.done;f=c.next()){f=f.value.split("\n");if((1!=f.length||f[0])&&!/^NOTE($|[ \t])/.test(f[0])&&"STYLE"==f[0]){h=[];g=-1;for(k=1;k<f.length;k++)f[k].includes("::cue")&&(h.push([]),g=h.length-1),-1!=g&&(h[g].push(f[k]),f[k].includes("}")&&
(g=-1));h=t(h);for(g=h.next();!g.done;g=h.next()){var l=g.value;g="global";(k=l[0].match(/\((.*)\)/))&&(g=k.pop());k=l.slice(1,-1);l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(k=l[1].split(";"));(l=d.get(g))||(l=new af(0,0,""));for(var m=!1,n=0;n<k.length;n++){var p=/^\s*([^:]+):\s*(.*)/.exec(k[n]);if(p){var r=p[2].trim().replace(";","");switch(p[1].trim()){case "background-color":case "background":m=!0;l.backgroundColor=r;break;case "color":m=!0;l.color=r;break;case "font-family":m=!0;l.fontFamily=
r;break;case "font-size":m=!0;l.fontSize=r;break;case "font-weight":if(700<=parseInt(r,10)||"bold"==r)m=!0,l.fontWeight=wf;break;case "font-style":switch(r){case "normal":m=!0;l.fontStyle=lf;break;case "italic":m=!0;l.fontStyle=xf;break;case "oblique":m=!0,l.fontStyle="oblique"}break;case "opacity":m=!0;l.opacity=parseFloat(r);break;case "text-combine-upright":m=!0;l.textCombineUpright=r;break;case "text-shadow":m=!0;l.textShadow=r;break;case "white-space":m=!0,l.wrapLine="noWrap"!=r}}}m&&d.set(g,
l)}}l=f;m=a;if(1==l.length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])f=null;else if(f=null,l[0].includes("--\x3e")||(f=l[0],l.splice(0,1)),h=new ge(l[0]),g=ke(h),n=ie(h,/[ \t]+--\x3e[ \t]+/g),k=ke(h),null==g||null==n||null==k)db("Failed to parse VTT time code. Cue skipped:",f,l),f=null;else{g+=m;k+=m;m=l.slice(1).join("\n").trim();d.has("global")?(l=d.get("global").clone(),l.startTime=g,l.endTime=k,l.payload=m):l=new af(g,k,m);he(h);for(g=je(h);g;)eE(l,g,b),he(h),g=je(h);
of(l,d);null!=f&&(l.id=f);f=l}f&&e.push(f)}return e};
function eE(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=cf:a.textAlign=zf[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|middle|center|start|end|auto))?$/.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"==b||"middle"==b?"center":bf);else if(d=/^region:(.*)$/.exec(b)){if(b=fE(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=Bf[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ff,a.line=Number(c[1]),c[2]&&(a.lineAlign=Bf[c[2].toUpperCase()])}
function fE(a,b){a=a.filter(function(c){return c.id==b});return a.length?a[0]:null}S("shaka.text.VttTextParser",dE);dE.prototype.parseMedia=dE.prototype.parseMedia;dE.prototype.setManifestType=dE.prototype.setManifestType;dE.prototype.setSequenceMode=dE.prototype.setSequenceMode;dE.prototype.parseInit=dE.prototype.parseInit;$f("text/vtt",function(){return new dE});$f('text/vtt; codecs="vtt"',function(){return new dE});$f('text/vtt; codecs="wvtt"',function(){return new dE});function gE(){this.g=null}gE.prototype.parseInit=function(a){var b=this,c=!1;(new Oh).box("moov",Th).box("trak",Th).box("mdia",Th).W("mdhd",function(d){d=jj(d.reader,d.version);b.g=d.timescale}).box("minf",Th).box("stbl",Th).W("stsd",Vh).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new V(2,2,2008);if(!c)throw new V(2,2,2008);};gE.prototype.setSequenceMode=function(){};gE.prototype.setManifestType=function(){};
gE.prototype.parseMedia=function(a,b){if(!a.length)return[];if(!this.g)throw new V(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new Oh).box("moof",Th).box("traf",Th).W("tfdt",function(B){g=!0;c=ij(B.reader,B.version).baseMediaDecodeTime}).W("tfhd",function(B){l=hj(B.reader,B.flags).Od}).W("trun",function(B){h=!0;d=kj(B.reader,B.version,B.flags).hh}).box("mdat",Yh(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new V(2,2,2008);a=c;for(var m=new Lh(e,0),n=t(d),p=n.next();!p.done;p=n.next()){p=
p.value;var r=p.ih||l,u=p.wf?c+p.wf:a;a=u+(r||0);var v=0;do{var w=m.X();v+=w;var x=m.X(),z=null;"vttc"==Sh(x)?8<w&&(z=m.Tb(w-8)):m.skip(w-8);r&&z&&(w=hE(z,b.periodStart+u/this.g,b.periodStart+a/this.g),f.push(w))}while(p.sampleSize&&v<p.sampleSize)}return f.filter(kg)};function hE(a,b,c){var d,e,f;(new Oh).box("payl",Yh(function(g){d=Gc(g)})).box("iden",Yh(function(g){e=Gc(g)})).box("sttg",Yh(function(g){f=Gc(g)})).parse(a);return d?iE(d,e,f,b,c):null}
function iE(a,b,c,d,e){a=new af(d,e,a);of(a);b&&(a.id=b);if(c)for(b=new ge(c),c=je(b);c;)eE(a,c,[]),he(b),c=je(b);return a}S("shaka.text.Mp4VttParser",gE);gE.prototype.parseMedia=gE.prototype.parseMedia;gE.prototype.setManifestType=gE.prototype.setManifestType;gE.prototype.setSequenceMode=gE.prototype.setSequenceMode;gE.prototype.parseInit=gE.prototype.parseInit;$f('application/mp4; codecs="wvtt"',function(){return new gE});function jE(){}jE.prototype.parseInit=function(){};jE.prototype.setSequenceMode=function(){};jE.prototype.setManifestType=function(){};jE.prototype.parseMedia=function(a){var b=Gc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new ge(c[0]),e=ke(d),f=ie(d,/,/g);d=ke(d);if(null==e||null==f||null==d)throw new V(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new af(e,d,c.slice(1).join("\n").trim()))}return a};
S("shaka.text.SbvTextParser",jE);jE.prototype.parseMedia=jE.prototype.parseMedia;jE.prototype.setManifestType=jE.prototype.setManifestType;jE.prototype.setSequenceMode=jE.prototype.setSequenceMode;jE.prototype.parseInit=jE.prototype.parseInit;$f("text/x-subviewer",function(){return new jE});function kE(){this.g=new dE}kE.prototype.parseInit=function(){};kE.prototype.setSequenceMode=function(){};kE.prototype.setManifestType=function(){};kE.prototype.parseMedia=function(a,b,c){a=Gc(a);a=lE(a);a=Nb(Kc(a));return this.g.parseMedia(a,b,c,[])};
function lE(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return b}S("shaka.text.SrtTextParser",kE);kE.srt2webvtt=lE;kE.prototype.parseMedia=kE.prototype.parseMedia;
kE.prototype.setManifestType=kE.prototype.setManifestType;kE.prototype.setSequenceMode=kE.prototype.setSequenceMode;kE.prototype.parseInit=kE.prototype.parseInit;$f("text/srt",function(){return new kE});function mE(){}mE.prototype.parseInit=function(){};mE.prototype.setSequenceMode=function(){};mE.prototype.setManifestType=function(){};
mE.prototype.parseMedia=function(a){var b="",c="",d=null,e=null;e=Gc(a).split(/\r?\n\s*\r?\n/);a=t(e);for(e=a.next();!e.done;e=a.next()){var f=e.value;e=f;if(f=nE.exec(f))d=f[1],e=f[2];"V4 Styles"==d||"V4+ Styles"==d?(b=e,b=c?b+("\n"+e):e):"Events"==d&&(c=c?c+("\n"+e):e)}d=[];e=null;b=t(b.split(/\r?\n/));for(a=b.next();!a.done;a=b.next())if(a=a.value,!/^\s*;/.test(a)&&(f=oE.exec(a)))if(a=f[1].trim(),f=f[2].trim(),"Format"==a)e=f.split(pE);else if("Style"==a){a=f.split(pE);f={};for(var g=0;g<e.length&&
g<a.length;g++)f[e[g]]=a[g];d.push(f)}e=[];b=null;c=t(c.split(/\r?\n/));f=c.next();for(a={};!f.done;a={Wi:void 0},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=oE.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(pE);else if("Dialogue"==f){g=g.split(pE);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=qE(f.Start);var k=qE(f.End);g=new af(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));a.Wi=f.Style;(a=d.find(function(l){return function(m){return m.Name==
l.Wi}}(a)))&&rE(g,a);e.push(g)}return e};
function rE(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=sE(c))a.color=c;if(c=b.BackColour)if(c=sE(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=wf);b.Italic&&(a.fontStyle=xf);b.Underline&&a.textDecoration.push(yf);if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=hf;a.textAlign="start";break;case 2:a.displayAlign=hf;a.textAlign=cf;break;case 3:a.displayAlign=hf;a.textAlign="end";break;case 5:a.displayAlign=
"before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=cf;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=cf;break;case 11:a.displayAlign="center",a.textAlign="end"}if(b=b.AlphaLevel)a.opacity=parseFloat(b)}function sE(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 qE(a){a=tE.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}S("shaka.text.SsaTextParser",mE);mE.prototype.parseMedia=mE.prototype.parseMedia;mE.prototype.setManifestType=mE.prototype.setManifestType;mE.prototype.setSequenceMode=mE.prototype.setSequenceMode;mE.prototype.parseInit=mE.prototype.parseInit;var nE=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,oE=/^\s*([^:]+):\s*(.*)/,pE=/\s*,\s*/,tE=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;
$f("text/x-ssa",function(){return new mE});function uE(a,b){var c=a[b+1]&1?7:9;return b+c<=a.length&&(a=((a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5)-c,0<a)?{Xd:c,wa:a}:null}function vE(a,b){var c=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],d=(a[b+2]&60)>>>2;if(d>c.length-1)return null;var e=((a[b+2]&192)>>>6)+1,f=(a[b+2]&1)<<2;f|=(a[b+3]&192)>>>6;return{sampleRate:c[d],channelCount:f,codec:"mp4a.40."+e}}
function wE(a,b){if(b+1<a.length&&255===a[b]&&240===(a[b+1]&246)){var c=a[b+1]&1?7:9;if(b+c>=a.length)return!1;var d=(a[b+3]&3)<<11|a[b+4]<<3|(a[b+5]&224)>>>5;if(d<=c)return!1;b+=d;return b===a.length||b+1<a.length&&255===a[b]&&240===(a[b+1]&246)}return!1}
function xE(a,b){switch(a){case "mp4a.40.2":if(1===b)return new Uint8Array([0,200,0,128,35,128]);if(2===b)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===b)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,
2,0,178,0,32,8,224]);break;default:if(1===b)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===b||3===b)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null};function yE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=yE.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/aac"==a.toLowerCase().split(";")[0]?Nd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/aac"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Xf(b)||"mp4a.40.2")+'"':b};q.getOriginalMimeType=function(){return this.j};
q.transmux=function(a,b,c,d){for(var e=Nb(a),f=tk(e),g=f.length;g<e.length&&!wE(e,g);g++);a=1E3*c.endTime;f=sk(f);f.length&&c&&(f=f.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(a=f.data);f=vE(e,g);if(!f)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=f.sampleRate;b.channelsCount=f.channelCount;for(var h=[];g<e.length;){var k=uE(e,g);if(!k)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));var l=k.Xd+k.wa;g+l<=e.length&&h.push({data:e.subarray(g+
k.Xd,g+l),size:k.wa,duration:1024,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}});g+=l}e=f.sampleRate;a=Math.floor(a*e/1E3);d={id:b.id,type:"audio",codecs:f.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Cb:[],Ja:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.h,baseMediaDecodeTime:a,Ab:h},stream:b};d=new qj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=wj(d),this.g.set(c,b));c=this.i!==b;d=Oj(d);this.i=b;this.h++;return c?(b=Uc(b,d),Promise.resolve(b)):
Promise.resolve(d)};S("shaka.transmuxer.AacTransmuxer",yE);yE.prototype.transmux=yE.prototype.transmux;yE.prototype.getOriginalMimeType=yE.prototype.getOriginalMimeType;yE.prototype.convertCodecs=yE.prototype.convertCodecs;yE.prototype.isSupported=yE.prototype.isSupported;yE.prototype.destroy=yE.prototype.destroy;Ef("audio/aac",function(){return new yE("audio/aac")},Kf);function zE(a,b){if(b+8>a.length||11!==a[b]||119!==a[b+1])return null;var c=a[b+4]>>6;if(3<=c)return null;var d=a[b+4]&63,e=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,
1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*d+c];if(b+e>a.length)return null;var f=a[b+6]>>5,g=0;2===f?g+=2:(f&1&&1!==f&&(g+=2),f&4&&(g+=2));g=(a[b+6]<<8|a[b+7])>>12-g&1;var h=a[b+5]&7;a=new Uint8Array([c<<6|a[b+5]>>3<<1|h>>2,(h&3)<<6|f<<3|g<<2|d>>4,d<<4&224]);return{sampleRate:[48E3,44100,32E3][c],channelCount:[2,1,2,3,3,4,4,5][f]+g,Ja:a,wa:e}}
function AE(a,b){if(11===a[b]&&119===a[b+1]){var c=0,d=5;b+=d;for(var e,f;0<d;){f=a[b];var g=Math.min(d,8),h=8-g;e=4278190080>>>24+h<<h;e=(f&e)>>h;c=c?c<<g|e:e;b+=1;d-=g}if(16>c)return!0}return!1};function BE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=BE.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ac3"==a.toLowerCase().split(";")[0]?Nd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ac3"==b.toLowerCase().split(";")[0]?jc()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':b};q.getOriginalMimeType=function(){return this.j};
q.transmux=function(a,b,c,d){a=Nb(a);for(var e=tk(a),f=e.length;f<a.length&&!AE(a,f);f++);var g=1E3*c.endTime;e=sk(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=zE(a,f);if(!l)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ja;k.push({data:a.subarray(f,f+l.wa),size:l.wa,duration:1536,
wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}});f+=l.wa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Cb:[],Ja:h,Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.h,baseMediaDecodeTime:a,Ab:k},stream:b};d=new qj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=wj(d),this.g.set(c,b));c=this.i!==b;d=Oj(d);this.i=b;this.h++;return c?(b=Uc(b,d),Promise.resolve(b)):Promise.resolve(d)};S("shaka.transmuxer.Ac3Transmuxer",BE);
BE.prototype.transmux=BE.prototype.transmux;BE.prototype.getOriginalMimeType=BE.prototype.getOriginalMimeType;BE.prototype.convertCodecs=BE.prototype.convertCodecs;BE.prototype.isSupported=BE.prototype.isSupported;BE.prototype.destroy=BE.prototype.destroy;Ef("audio/ac3",function(){return new BE("audio/ac3")},Kf);function CE(a,b){if(b+8>a.length||2935!==(a[b]<<8|a[b+1]<<0))return null;var c=new uk(a.subarray(b+2));wk(c,2);wk(c,3);var d=xk(c,11)+1<<1,e=xk(c,2);if(3==e){e=xk(c,2);e=[24E3,22060,16E3][e];var f=3}else e=[48E3,44100,32E3][e],f=xk(c,2);var g=xk(c,3),h=xk(c,1);c=xk(c,5);if(b+d>a.byteLength)return null;a=Math.floor(d*e/(16*[1,2,3,6][f]));a=new Uint8Array([(a&8160)>>5,(a&31)<<3,e<<6|c<<1|0,0|g<<1|h<<0,0]);return{sampleRate:e,channelCount:[2,1,2,3,3,4,4,5][g]+h,Ja:a,wa:d}};function DE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=DE.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/ec3"==a.toLowerCase().split(";")[0]?Nd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/ec3"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':b};q.getOriginalMimeType=function(){return this.j};
q.transmux=function(a,b,c,d){a=Nb(a);for(var e=tk(a),f=e.length;f<a.length&&2935!==(a[f]<<8|a[f+1]<<0);f++);var g=1E3*c.endTime;e=sk(e);e.length&&c&&(e=e.find(function(m){return"com.apple.streaming.transportStreamTimestamp"===m.description}))&&(g=e.data);e=0;for(var h=new Uint8Array([]),k=[];f<a.length;){var l=CE(a,f);if(!l)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));b.audioSamplingRate=l.sampleRate;b.channelsCount=l.channelCount;e=l.sampleRate;h=l.Ja;k.push({data:a.subarray(f,f+l.wa),
size:l.wa,duration:1536,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}});f+=l.wa}a=Math.floor(g*e/1E3);d={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:e,duration:d,Cb:[],Ja:h,Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.h,baseMediaDecodeTime:a,Ab:k},stream:b};d=new qj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=wj(d),this.g.set(c,b));c=this.i!==b;d=Oj(d);this.i=b;this.h++;return c?(b=Uc(b,d),Promise.resolve(b)):Promise.resolve(d)};
S("shaka.transmuxer.Ec3Transmuxer",DE);DE.prototype.transmux=DE.prototype.transmux;DE.prototype.getOriginalMimeType=DE.prototype.getOriginalMimeType;DE.prototype.convertCodecs=DE.prototype.convertCodecs;DE.prototype.isSupported=DE.prototype.isSupported;DE.prototype.destroy=DE.prototype.destroy;Ef("audio/ec3",function(){return new DE("audio/ec3")},Kf);function EE(a){if(!a.length)return null;var b=a.find(function(v){return 7==v.type});a=a.find(function(v){return 8==v.type});if(!b||!a)return null;var c=new uk(b.data),d=Ck(c);Ck(c);Ck(c);zk(c);if(FE.includes(d)&&(d=X(c),3===d&&wk(c,1),zk(c),zk(c),wk(c,1),Bk(c))){d=3!==d?8:12;for(var e=0;e<d;e++)Bk(c)&&(6>e?Dk(c,16):Dk(c,64))}zk(c);d=X(c);if(0===d)X(c);else if(1===d)for(wk(c,1),zk(c),zk(c),d=X(c),e=0;e<d;e++)zk(c);zk(c);wk(c,1);var f=X(c),g=X(c),h=xk(c,1);0===h&&wk(c,1);wk(c,1);var k=0,l=0,m=0,n=0;
Bk(c)&&(k=X(c),l=X(c),m=X(c),n=X(c));e=d=1;if(Bk(c)&&Bk(c)){var p=Ck(c),r=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],u=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];0<p&&16>=p?(d=r[p-1],e=u[p-1]):255===p&&(d=xk(c,16),e=xk(c,16))}c=(2-h)*(g+1)*16-2*m-2*n;f=16*(f+1)-2*k-2*l;k=[];b=b.fullData;k.push(b.byteLength>>>8&255);k.push(b.byteLength&255);k=k.concat.apply(k,y(b));b=[];a=a.fullData;b.push(a.byteLength>>>8&255);b.push(a.byteLength&255);b=b.concat.apply(b,y(a));a=new Uint8Array([1,k[3],k[4],
k[5],255,225].concat(k,[1],b));return{height:c,width:f,Wa:a,cb:d,eb:e}}
function GE(a){function b(u){e={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:u.pts,dts:u.dts,nalus:[]}}function c(){if(e&&e.nalus.length&&e.frame){for(var u=[],v=t(e.nalus),w=v.next();!w.done;w=v.next()){w=w.value;var x=w.fullData.byteLength,z=new Uint8Array(4);z[0]=x>>24&255;z[1]=x>>16&255;z[2]=x>>8&255;z[3]=x&255;u.push(z);u.push(w.fullData)}e.data=Uc.apply(Oc,y(u));d.push(e)}}for(var d=[],e=null,f=!1,g=0;g<a.length;g++){var h=a[g],k=h.nalus,l=!1;e&&k.length&&!f&&(c(),b(h));k=t(h.nalus);for(var m=
k.next();!m.done;m=k.next()){m=m.value;var n=!1;switch(m.type){case 1:var p=!1;n=!0;var r=m.data;l&&4<r.length&&(r=Ek(new uk(r)),2===r||4===r||7===r||9===r)&&(p=!0);p&&e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=p;break;case 5:n=!0;e&&e.frame&&!e.isKeyframe&&(c(),e=null);e||b(h);e.frame=!0;e.isKeyframe=!0;break;case 6:n=!0;break;case 7:l=n=!0;break;case 8:n=!0;break;case 9:f=n=!0;e&&e.frame&&(c(),e=null);e||b(h);break;case 12:n=!0;break;default:n=!1}e&&n&&e.nalus.push(m)}}c();
return d}var FE=[100,110,122,244,44,83,86,118,128,138,139,134];function HE(a){if(!a.length)return null;var b=a.find(function(g){return 32==g.type}),c=a.find(function(g){return 33==g.type}),d=a.find(function(g){return 34==g.type});if(!b||!c||!d)return null;var e=IE(b.fullData);a=JE(c.fullData);var f=KE(d.fullData);b=LE(b.fullData,c.fullData,d.fullData,{Wg:e.Wg,yh:e.yh,Bg:a.Bg,Cg:a.Cg,vg:a.vg,Ag:a.Ag,wg:a.wg,xg:a.xg,yg:a.yg,zg:a.zg,og:a.og,pg:a.pg,qg:a.qg,rg:a.rg,sg:a.sg,ug:a.ug,gg:a.gg,gf:a.gf,eg:a.eg,$f:a.$f,Zf:a.Zf,Yg:f.Yg});return{height:a.height,width:a.width,
Wa:b,cb:a.kl,eb:a.jl}}function IE(a){var b=new uk(a,!0);Ck(b);Ck(b);xk(b,4);xk(b,2);xk(b,6);a=xk(b,3);b=Bk(b);return{Wg:a+1,yh:b}}
function JE(a){a=new uk(a,!0);Ck(a);Ck(a);var b=0,c=0,d=0,e=0;xk(a,4);var f=xk(a,3);Bk(a);for(var g=xk(a,2),h=xk(a,1),k=xk(a,5),l=Ck(a),m=Ck(a),n=Ck(a),p=Ck(a),r=Ck(a),u=Ck(a),v=Ck(a),w=Ck(a),x=Ck(a),z=Ck(a),B=Ck(a),C=[],E=[],D=0;D<f;D++)C.push(Bk(a)),E.push(Bk(a));if(0<f)for(D=f;8>D;D++)xk(a,2);for(D=0;D<f;D++)C[D]&&xk(a,88),E[D]&&Ck(a);X(a);C=X(a);3==C&&xk(a,1);E=X(a);D=X(a);Bk(a)&&(b+=X(a),c+=X(a),d+=X(a),e+=X(a));var A=X(a),F=X(a),G=X(a);if(Bk(a))for(var K=0;K<=f;K++)X(a),X(a),X(a);else X(a),
X(a),X(a);X(a);X(a);X(a);X(a);X(a);X(a);if(Bk(a)&&Bk(a))for(K=0;4>K;K++)for(var L=0;L<(3===K?2:6);L++)if(Bk(a)){var J=Math.min(64,1<<4+(K<<1));1<K&&Ak(a);for(var M=0;M<J;M++)Ak(a)}else X(a);Bk(a);Bk(a);Bk(a)&&(Ck(a),X(a),X(a),Bk(a));K=X(a);for(J=L=0;J<K;J++)if(M=!1,0!==J&&(M=Bk(a)),M){J===K&&X(a);Bk(a);X(a);for(var N=M=0;N<=L;N++){var P=Bk(a),O=!1;P||(O=Bk(a));(P||O)&&M++}L=M}else{N=X(a);M=X(a);L=N+M;for(P=0;P<N;P++)X(a),Bk(a);for(N=0;N<M;N++)X(a),Bk(a)}if(Bk(a))for(K=X(a),L=0;L<K;L++){for(J=0;J<
G+4;J++)xk(a,1);xk(a,1)}K=G=1;L=0;Bk(a);Bk(a);if(Bk(a)){Bk(a)&&(J=Ck(a),M=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],N=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],0<J&&16>=J?(G=M[J-1],K=N[J-1]):255===J&&(G=xk(a,16),K=xk(a,16)));Bk(a)&&Bk(a);Bk(a)&&(xk(a,3),Bk(a),Bk(a)&&(Ck(a),Ck(a),Ck(a)));Bk(a)&&(X(a),X(a));Bk(a);Bk(a);Bk(a);if(J=Bk(a))X(a),X(a),X(a),X(a);if(Bk(a)&&(xk(a,32),xk(a,32),Bk(a)&&X(a),Bk(a))){N=!1;J=Bk(a);M=Bk(a);if(J||M){if(N=Bk(a))Ck(a),xk(a,5),Bk(a),xk(a,5);xk(a,4);xk(a,4);N&&
xk(a,4);xk(a,5);xk(a,5);xk(a,5)}for(P=0;P<=f;P++){var R=!0;O=1;Bk(a)||(R=Bk(a));var U=!1;R?X(a):U=Bk(a);U||(O=X(a)+1);if(J){for(R=0;R<O;R++)X(a),X(a),N&&(X(a),X(a));Bk(a)}if(M){for(R=0;R<O;R++)X(a),X(a),N&&(X(a),X(a));Bk(a)}}}Bk(a)&&(Bk(a),Bk(a),Bk(a),L=X(a),X(a),X(a),X(a),X(a))}return{vg:B,Bg:g,Cg:h,Ag:k,wg:l,xg:m,yg:n,zg:p,og:r,pg:u,qg:v,rg:w,sg:x,ug:z,gf:L,gg:0,eg:C,$f:A,Zf:F,width:E-(b+c)*(1===C||2===C?2:1),height:D-(d+e)*(1===C?2:1),kl:G,jl:K}}
function KE(a){var b=new uk(a,!0);Ck(b);Ck(b);X(b);X(b);Bk(b);Bk(b);xk(b,3);Bk(b);Bk(b);X(b);X(b);Ak(b);Bk(b);Bk(b);Bk(b)&&X(b);Ak(b);Ak(b);Bk(b);Bk(b);Bk(b);Bk(b);a=Bk(b);b=Bk(b);var c=1;b&&a?c=0:b?c=3:a&&(c=2);return{Yg:c}}
function LE(a,b,c,d){var e=new Uint8Array(23+(5+a.byteLength)+(5+b.byteLength)+(5+c.byteLength));e[0]=1;e[1]=(d.Bg&3)<<6|(d.Cg?1:0)<<5|d.Ag&31;e[2]=d.wg;e[3]=d.xg;e[4]=d.yg;e[5]=d.zg;e[6]=d.og;e[7]=d.pg;e[8]=d.qg;e[9]=d.rg;e[10]=d.sg;e[11]=d.ug;e[12]=d.vg;e[13]=240|(d.gf&3840)>>8;e[14]=d.gf&255;e[15]=252|d.Yg&3;e[16]=252|d.eg&3;e[17]=248|d.$f&7;e[18]=248|d.Zf&7;e[19]=0;e[20]=0;e[21]=(d.gg&3)<<6|(d.Wg&7)<<3|(d.yh?1:0)<<2|3;e[22]=3;e[23]=160;e[24]=0;e[25]=1;e[26]=(a.byteLength&65280)>>8;e[27]=(a.byteLength&
255)>>0;e.set(a,28);e[23+(5+a.byteLength)]=161;e[a.byteLength+29]=0;e[a.byteLength+30]=1;e[a.byteLength+31]=(b.byteLength&65280)>>8;e[a.byteLength+32]=(b.byteLength&255)>>0;e.set(b,a.byteLength+33);e[23+(a.byteLength+10+b.byteLength)]=162;e[a.byteLength+10+b.byteLength+24]=0;e[a.byteLength+10+b.byteLength+25]=1;e[a.byteLength+10+b.byteLength+26]=(c.byteLength&65280)>>8;e[a.byteLength+10+b.byteLength+27]=(c.byteLength&255)>>0;e.set(c,a.byteLength+10+b.byteLength+28);return e};function ME(a,b){var c=a[b+1]>>3&3,d=a[b+1]>>1&3,e=a[b+2]>>4&15,f=a[b+2]>>2&3;if(1!==c&&0!==e&&15!==e&&3!==f){var g=a[b+3]>>6;e=1E3*NE[14*(3===c?3-d:3===d?3:4)+e-1];f=OE[3*(3===c?0:2===c?1:2)+f];c=PE[c][d];var h=QE[d],k=Math.floor(c*e/f+(a[b+2]>>1&1))*h,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);(l=l?parseInt(l[1],10):0)&&87>=l&&2===d&&224E3<=e&&0===g&&(a[b+3]|=128);return{sampleRate:f,channelCount:3===g?1:2,wa:k,il:8*c*h}}return null}
function RE(a,b){return 255===a[b]&&224===(a[b+1]&224)&&0!==(a[b+1]&6)}function SE(a,b){if(b+1<a.length&&RE(a,b)){var c=ME(a,b),d=4;c&&c.wa&&(d=c.wa);b+=d;return b===a.length||b+1<a.length&&RE(a,b)}return!1}
var NE=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],OE=[44100,48E3,32E3,22050,24E3,16E3,11025,12E3,8E3],PE=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],QE=[0,1,1,4];function TE(a){this.j=a;this.h=0;this.g=new Map;this.i=null}q=TE.prototype;q.destroy=function(){this.g.clear()};q.isSupported=function(a){return"audio/mpeg"==a.toLowerCase().split(";")[0]?Nd(this.convertCodecs("audio",a)):!1};q.convertCodecs=function(a,b){return"audio/mpeg"==b.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':b};q.getOriginalMimeType=function(){return this.j};
q.transmux=function(a,b,c,d){for(var e=Nb(a),f=tk(e).length;f<e.length&&!SE(e,f);f++);var g;for(a=[];f<e.length;){var h=ME(e,f);if(!h)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));g||(g=h);f+h.wa<=e.length&&a.push({data:e.subarray(f,f+h.wa),size:h.wa,duration:1152,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}});f+=h.wa}if(!g)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));e=9E4*g.il/g.sampleRate*this.h;d={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:g.sampleRate,
duration:d,Cb:[],Ja:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.h,baseMediaDecodeTime:e,Ab:a},stream:b};d=new qj([d]);c=b.id+"_"+c.i;this.g.has(c)?b=this.g.get(c):(b=wj(d),this.g.set(c,b));c=this.i!==b;d=Oj(d);this.i=b;this.h++;return c?(b=Uc(b,d),Promise.resolve(b)):Promise.resolve(d)};S("shaka.transmuxer.Mp3Transmuxer",TE);TE.prototype.transmux=TE.prototype.transmux;TE.prototype.getOriginalMimeType=TE.prototype.getOriginalMimeType;TE.prototype.convertCodecs=TE.prototype.convertCodecs;
TE.prototype.isSupported=TE.prototype.isSupported;TE.prototype.destroy=TE.prototype.destroy;Ef("audio/mpeg",function(){return new TE("audio/mpeg")},Kf);function UE(a){this.h=a;this.g=null}q=UE.prototype;q.destroy=function(){};q.isSupported=function(a){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var b=Xf(a).split(","),c=Zc("audio",b);b=Zc("video",b);return!c||b||"mp3"!=Tf(c)?!1:Nd(this.convertCodecs("audio",a))};q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?"audio/mpeg":b};q.getOriginalMimeType=function(){return this.h};
q.transmux=function(a,b,c,d,e){this.g?this.g.clearData():this.g=new Fk;a=Nb(a);a=this.g.parse(a);if("mp3"!=a.Rd().audio||"audio"!=e)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));c=new Uint8Array([]);e=t(a.xb());for(a=e.next();!a.done;a=e.next())if(a=a.value.data)for(b=0;b<a.length;)(d=ME(a,b))?(b+d.wa<=a.length&&(c=Uc(c,a.subarray(b,b+d.wa))),b+=d.wa):b++;return Promise.resolve(c)};S("shaka.transmuxer.MpegTsTransmuxer",UE);UE.prototype.transmux=UE.prototype.transmux;
UE.prototype.getOriginalMimeType=UE.prototype.getOriginalMimeType;UE.prototype.convertCodecs=UE.prototype.convertCodecs;UE.prototype.isSupported=UE.prototype.isSupported;UE.prototype.destroy=UE.prototype.destroy;Ef("video/mp2t",function(){return new UE("video/mp2t")},Jf);/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/
function VE(a){this.h=a;(this.g=ex.get("ISOBoxer")())&&WE(this)}
function WE(a){function b(){this._procFullBox();this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8));this._procField("sample_count","uint",32);this._procEntries("entry",this.sample_count,function(c){this._procEntryField(c,"InitializationVector","data",8);this.flags&2&&(this._procEntryField(c,"NumberOfEntries","uint",16),this._procSubEntries(c,"clearAndCryptedData",c.NumberOfEntries,function(d){this._procEntryField(d,"BytesOfClearData",
"uint",16);this._procEntryField(d,"BytesOfEncryptedData","uint",32)}))})}a.g.addBoxProcessor("saio",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32));this._procField("entry_count","uint",32);this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)});a.g.addBoxProcessor("saiz",function(){this._procFullBox();this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter",
"uint",32));this._procField("default_sample_info_size","uint",8);this._procField("sample_count","uint",32);0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)});a.g.addBoxProcessor("senc",b);a.g.addBoxProcessor("uuid",function(){for(var c=!0,d=0;16>d;d++)this.usertype[d]!==XE[d]&&(c=!1);c&&(this._parsing&&(this.type="sepiff"),b.call(this))})}q=VE.prototype;q.destroy=function(){};
q.isSupported=function(a,b){var c=a.startsWith("mss/");if(!this.g||!c)return!1;if(b)return Nd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Nd(b)||Nd(a)};q.convertCodecs=function(a,b){return b.replace("mss/","")};q.getOriginalMimeType=function(){return this.h};
q.transmux=function(a,b,c){if(!c)return Promise.resolve(Nb(a));if(!b.mssPrivateData)return Promise.reject(new V(2,3,3020,c?c.S()[0]:null));try{var d,e=this.g.parseBuffer(a),f=e.fetch("tfhd");f.track_ID=b.id+1;var g=e.fetch("tfdt"),h=e.fetch("traf");null===g&&(g=this.g.createFullBox("tfdt",h,f),g.version=1,g.flags=0,g.baseMediaDecodeTime=Math.floor(c.startTime*b.mssPrivateData.timescale));var k=e.fetch("trun"),l=e.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var m=e.fetch("tfrf");
m&&m._parent.boxes.splice(m._parent.boxes.indexOf(m),1);var n=e.fetch("sepiff");if(null!==n){n.type="senc";n.usertype=void 0;var p=e.fetch("saio");if(null===p){p=this.g.createFullBox("saio",h);p.version=0;p.flags=0;p.entry_count=1;p.offset=[0];var r=this.g.createFullBox("saiz",h);r.version=0;r.flags=0;r.sample_count=n.sample_count;r.default_sample_info_size=0;r.sample_info_size=[];if(n.flags&2)for(d=0;d<n.sample_count;d+=1)r.sample_info_size[d]=10+6*n.entry[d].NumberOfEntries;else r.default_sample_info_size=
8}}f.flags&=16777214;f.flags|=131072;k.flags|=1;var u=e.fetch("moof");k.data_offset=u.getLength()+8;var v=e.fetch("saio");null!==v&&(v.offset[0]=YE(u,"traf")+YE(h,"senc")+16);var w=Nb(e.write());return Promise.resolve(w)}catch(x){return x instanceof V?Promise.reject(x):Promise.reject(new V(2,3,3022,c?c.S()[0]:null))}};function YE(a,b){for(var c=8,d=0;d<a.boxes.length&&a.boxes[d].type!==b;d++)c+=a.boxes[d].size;return c}S("shaka.transmuxer.MssTransmuxer",VE);VE.prototype.transmux=VE.prototype.transmux;
VE.prototype.getOriginalMimeType=VE.prototype.getOriginalMimeType;VE.prototype.convertCodecs=VE.prototype.convertCodecs;VE.prototype.isSupported=VE.prototype.isSupported;VE.prototype.destroy=VE.prototype.destroy;var XE=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);Ef("mss/audio/mp4",function(){return new VE("mss/audio/mp4")},Kf);Ef("mss/video/mp4",function(){return new VE("mss/video/mp4")},Kf);function ZE(a){this.m=a;this.g=0;this.i=new Map;this.l=this.h=this.j=null}q=ZE.prototype;q.destroy=function(){this.i.clear();this.h&&this.h.destroy()};
q.isSupported=function(a,b){if("video/mp2t"!=a.toLowerCase().split(";")[0])return!1;var c=a;b&&(c=this.convertCodecs(b,a));var d=Xf(c).split(",");c=Zc("audio",d);d=Zc("video",d);if(c&&(c=Tf(c),!$E.includes(c))||d&&(c=Tf(d),!aF.includes(c)))return!1;if(b)return Nd(this.convertCodecs(b,a));b=this.convertCodecs("audio",a);a=this.convertCodecs("video",a);return Nd(b)||Nd(a)};
q.convertCodecs=function(a,b){return"video/mp2t"==b.toLowerCase().split(";")[0]?(b=Xf(b).replace("mp4a.40.34","mp3").split(",").map(function(c){return Jg(c,"audio/mp4")}).map(Kg).join(","),"audio"==a?'audio/mp4; codecs="'+b+'"':'video/mp4; codecs="'+b+'"'):b};q.getOriginalMimeType=function(){return this.m};
q.transmux=function(a,b,c,d,e){var f=Nb(a);if("audio"==e&&!Nk(f)){for(var g=tk(f),h=g.length;h<f.length;h++)if(SE(f,h))return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));for(h=g.length;h<f.length;h++)if(wE(f,h))return this.h||(this.h=new yE("audio/aac")),this.h.transmux(a,b,c,d,e);return Promise.reject(new V(2,3,3018,c?c.S()[0]:null))}this.j?this.j.clearData():this.j=new Fk;var k=this.j.parse(f),l=[],m=k.Rd();try{var n=null;if("video"==e){switch(m.video){case "avc":var p=[],r=null,u=k.Sc(),v=
GE(u);if(!v.length)throw new V(2,3,3023,c?c.S()[0]:null);for(var w=0;w<v.length;w++){var x=v[w];null==r&&(r=x.dts);var z=void 0;z=w+1<v.length?(v[w+1].dts||0)-(x.dts||0):1<v.length?(x.dts||0)-(v[w-1].dts||0):9E4*(c.endTime-c.startTime);p.push({data:x.data,size:x.data.byteLength,duration:z,wb:Math.round((x.pts||0)-(x.dts||0)),flags:{yb:0,rb:0,qb:0,ob:0,pb:x.isKeyframe?2:1,zb:x.isKeyframe?0:1}})}for(var B=[],C=t(u),E=C.next();!E.done;E=C.next())B.push.apply(B,y(E.value.nalus));var D=EE(B);if(!D||null==
r)throw new V(2,3,3018,c?c.S()[0]:null);b.height=D.height;b.width=D.width;n={id:b.id,type:"video",codecs:"avc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Cb:[],Ja:new Uint8Array([]),Wa:D.Wa,cb:D.cb,eb:D.eb,data:{Ub:this.g,baseMediaDecodeTime:r,Ab:p},stream:b};break;case "hvc":var A=[],F=null,G=[],K=k.Sc();if(!K.length)throw new V(2,3,3023,c?c.S()[0]:null);for(var L=0;L<K.length;L++){var J=K[L],M=J.nalus;G.push.apply(G,y(M));for(var N=!1,P=[],O=!1,R=t(M),U=R.next();!U.done;U=
R.next()){var ua=U.value;switch(ua.type){case 1:case 0:var ba=O=!0;break;case 19:case 20:case 21:N=ba=O=!0;break;case 32:ba=!0;break;case 33:ba=!0;break;case 34:ba=!0;break;case 35:O=ba=!0;break;case 39:case 40:ba=!0;break;default:ba=!1}if(O&&ba){var Ma=ua.fullData.byteLength,Ra=new Uint8Array(4);Ra[0]=Ma>>24&255;Ra[1]=Ma>>16&255;Ra[2]=Ma>>8&255;Ra[3]=Ma&255;P.push(Ra);P.push(ua.fullData)}}var Aa=P.length?{data:Uc.apply(Oc,y(P)),isKeyframe:N}:null;if(Aa){null==F&&null!=J.dts&&(F=J.dts);var qa=void 0;
qa=L+1<K.length?(K[L+1].dts||0)-(J.dts||0):1<K.length?(J.dts||0)-(K[L-1].dts||0):9E4*(c.endTime-c.startTime);A.push({data:Aa.data,size:Aa.data.byteLength,duration:qa,wb:Math.round((J.pts||0)-(J.dts||0)),flags:{yb:0,rb:0,qb:0,ob:0,pb:Aa.isKeyframe?2:1,zb:Aa.isKeyframe?0:1}})}}var Ia=HE(G);if(!Ia||null==F)throw new V(2,3,3018,c?c.S()[0]:null);b.height=Ia.height;b.width=Ia.width;n={id:b.id,type:"video",codecs:"hvc1",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:9E4,duration:d,Cb:[],Ja:new Uint8Array([]),
Wa:Ia.Wa,cb:Ia.cb,eb:Ia.eb,data:{Ub:this.g,baseMediaDecodeTime:F,Ab:A},stream:b}}n&&(l.push(n),n=null)}if("audio"==e){switch(m.audio){case "aac":for(var ya=[],Ea,ra=null,Ba=null,Va=null,vb=t(k.xb()),ib=vb.next();!ib.done;ib=vb.next()){var jb=ib.value,qb=jb.data;if(qb){var Fb=0;if(-1==Ba&&Va)qb=Uc(Va,jb.data),Ba=null;else if(null!=Ba&&Va){Fb=Math.max(0,Ba);var Te=Uc(Va,qb.subarray(0,Fb));ya.push({data:Te,size:Te.byteLength,duration:1024,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}});Ba=Va=null}Ea=vE(qb,
Fb);if(!Ea)throw new V(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=Ea.sampleRate;b.channelsCount=Ea.channelCount;null==ra&&null!==jb.pts&&(ra=jb.pts);for(;Fb<qb.length;){var $c=uE(qb,Fb);if(!$c){Va=qb.subarray(Fb,qb.length);Ba=-1;break}var we=$c.Xd+$c.wa;Ba=Math.max(0,Fb+we-qb.length);0!=Ba?Va=qb.subarray(Fb+$c.Xd,Fb+we):Fb+we<=qb.length&&ya.push({data:qb.subarray(Fb+$c.Xd,Fb+we),size:$c.wa,duration:1024,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}});Fb+=we}}}if(!Ea||null==ra){if(!k.Sc().length)throw new V(2,
3,3018,c?c.S()[0]:null);ra=9E4*c.startTime;var tg=Zc("audio",b.codecs.split(","));if(!tg||!b.channelsCount||!b.audioSamplingRate)throw new V(2,3,3018,c?c.S()[0]:null);Ea={sampleRate:b.audioSamplingRate,channelCount:b.channelsCount,codec:tg};var ug=xE(tg,b.channelsCount);if(!ug)throw new V(2,3,3018,c?c.S()[0]:null);for(var ld=ra+9E4*(c.endTime-c.startTime),Fy=ra;Fy<ld;)ya.push({data:ug,size:ug.byteLength,duration:1024,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}}),Fy+=1024/Ea.sampleRate*9E4}var Gy=Ea.sampleRate,
RI=ra/9E4*Gy;n={id:b.id,type:"audio",codecs:Ea.codec,encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Gy,duration:d,Cb:[],Ja:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.g,baseMediaDecodeTime:RI,Ab:ya},stream:b};break;case "ac3":for(var Hy=[],Wk=0,np=new Uint8Array([]),Xk=null,Iy=t(k.xb()),op=Iy.next();!op.done;op=Iy.next()){var pp=op.value,qp=pp.data;null==Xk&&null!==pp.pts&&(Xk=pp.pts);for(var zg=0;zg<qp.length;){var ye=zE(qp,zg);ye?(b.audioSamplingRate=ye.sampleRate,b.channelsCount=
ye.channelCount,Wk=ye.sampleRate,np=ye.Ja,Hy.push({data:qp.subarray(zg,zg+ye.wa),size:ye.wa,duration:1536,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}}),zg+=ye.wa):zg++}}if(0==Wk||0==np.byteLength||null==Xk)throw new V(2,3,3018,c?c.S()[0]:null);var SI=Xk/9E4*Wk;n={id:b.id,type:"audio",codecs:"ac-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Wk,duration:d,Cb:[],Ja:np,Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.g,baseMediaDecodeTime:SI,Ab:Hy},stream:b};break;case "ec3":for(var Jy=[],Yk=0,
rp=new Uint8Array([]),Zk=null,Ky=t(k.xb()),sp=Ky.next();!sp.done;sp=Ky.next()){var tp=sp.value,up=tp.data;null==Zk&&null!==tp.pts&&(Zk=tp.pts);for(var Ag=0;Ag<up.length;){var ze=CE(up,Ag);ze?(b.audioSamplingRate=ze.sampleRate,b.channelsCount=ze.channelCount,Yk=ze.sampleRate,rp=ze.Ja,Jy.push({data:up.subarray(Ag,Ag+ze.wa),size:ze.wa,duration:1536,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}}),Ag+=ze.wa):Ag++}}if(0==Yk||0==rp.byteLength||null==Zk)throw new V(2,3,3018,c?c.S()[0]:null);var TI=Zk/9E4*Yk;
n={id:b.id,type:"audio",codecs:"ec-3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Yk,duration:d,Cb:[],Ja:rp,Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.g,baseMediaDecodeTime:TI,Ab:Jy},stream:b};break;case "mp3":for(var Ly=[],$k,al=null,My=t(k.xb()),vp=My.next();!vp.done;vp=My.next()){var wp=vp.value,ii=wp.data;if(ii){null==al&&null!==wp.pts&&(al=wp.pts);for(var kf=0;kf<ii.length;){var Bg=ME(ii,kf);Bg?($k||($k=Bg),kf+Bg.wa<=ii.length&&Ly.push({data:ii.subarray(kf,kf+Bg.wa),size:Bg.wa,duration:1152,
wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}}),kf+=Bg.wa):kf++}}}if(!$k||null==al)throw new V(2,3,3018,c?c.S()[0]:null);var Ny=$k.sampleRate,UI=al/9E4*Ny;n={id:b.id,type:"audio",codecs:"mp3",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Ny,duration:d,Cb:[],Ja:new Uint8Array([]),Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.g,baseMediaDecodeTime:UI,Ab:Ly},stream:b};break;case "opus":var Oy=[],bl=null,wd=k.H;if(!wd)throw new V(2,3,3018,c?c.S()[0]:null);var $b=[];switch(wd.tj){case 1:case 2:$b=
[0];break;case 0:$b=[255,1,1,0,1];break;case 128:$b=[255,2,0,0,1];break;case 3:$b=[1,2,1,0,2,1];break;case 4:$b=[1,2,2,0,1,2,3];break;case 5:$b=[1,3,2,0,4,1,2,3];break;case 6:$b=[1,4,2,0,4,1,2,3,5];break;case 7:$b=[1,4,2,0,4,1,2,3,5,6];break;case 8:$b=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:$b=[1,1,2,0,1];break;case 131:$b=[1,1,3,0,1,2];break;case 132:$b=[1,1,4,0,1,2,3];break;case 133:$b=[1,1,5,0,1,2,3,4];break;case 134:$b=[1,1,6,0,1,2,3,4,5];break;case 135:$b=[1,1,7,0,1,2,3,4,5,6];break;case 136:$b=
[1,1,8,0,1,2,3,4,5,6,7]}var Py=new Uint8Array([0,wd.channelCount,0,0,wd.sampleRate>>>24&255,wd.sampleRate>>>17&255,wd.sampleRate>>>8&255,wd.sampleRate>>>0&255,0,0].concat(y($b)));for(var Qy=wd.sampleRate,Ry=t(k.xb()),xp=Ry.next();!xp.done;xp=Ry.next()){var yp=xp.value,Cg=yp.data;null==bl&&null!==yp.pts&&(bl=yp.pts);for(var ji=0;ji<Cg.length;){for(var VI=0!==(Cg[ji+1]&16),WI=0!==(Cg[ji+1]&8),ce=ji+2,cl=0;255===Cg[ce];)cl+=255,ce+=1;cl+=Cg[ce];ce+=1;ce+=VI?2:0;ce+=WI?2:0;var Sy=Cg.slice(ce,ce+cl);Oy.push({data:Sy,
size:Sy.byteLength,duration:960,wb:0,flags:{yb:0,rb:0,qb:0,ob:0,pb:2,zb:0}});ji=ce+cl}}if(0==Py.byteLength||null==bl)throw new V(2,3,3018,c?c.S()[0]:null);b.audioSamplingRate=wd.sampleRate;b.channelsCount=wd.channelCount;var XI=bl/9E4*Qy;n={id:b.id,type:"audio",codecs:"opus",encrypted:b.encrypted&&0<b.drmInfos.length,timescale:Qy,duration:d,Cb:[],Ja:Py,Wa:new Uint8Array([]),cb:0,eb:0,data:{Ub:this.g,baseMediaDecodeTime:XI,Ab:Oy},stream:b}}n&&(l.push(n),n=null)}}catch(zp){return zp&&3023==zp.code?
Promise.resolve(new Uint8Array([])):Promise.reject(zp)}if(!l.length)return Promise.reject(new V(2,3,3018,c?c.S()[0]:null));var Ty=new qj(l),Ap=b.id+"_"+c.i;if(this.i.has(Ap))var ki=this.i.get(Ap);else ki=wj(Ty),this.i.set(Ap,ki);var YI=this.l!==ki,Uy=Oj(Ty);this.l=ki;this.g++;if(YI){var ZI=Uc(ki,Uy);return Promise.resolve(ZI)}return Promise.resolve(Uy)};S("shaka.transmuxer.TsTransmuxer",ZE);ZE.prototype.transmux=ZE.prototype.transmux;ZE.prototype.getOriginalMimeType=ZE.prototype.getOriginalMimeType;
ZE.prototype.convertCodecs=ZE.prototype.convertCodecs;ZE.prototype.isSupported=ZE.prototype.isSupported;ZE.prototype.destroy=ZE.prototype.destroy;var $E=["aac","ac-3","ec-3","mp3","opus"],aF=["avc","hevc"];Ef("video/mp2t",function(){return new ZE("video/mp2t")},If);function bF(){}oa(bF,Gn);S("shaka.util.FairPlayUtils",bF);/*
 @license
 EME Encryption Scheme Polyfill
 Copyright 2019 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function cF(){}var dF;
function eF(){dF||navigator.emeEncryptionSchemePolyfilled?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(dF=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=fF,navigator.emeEncryptionSchemePolyfilled=!0):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
function fF(a,b){var c=this,d;return Q(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),H(e,dF.call(c,a,b),2);d=e.h;if(gF(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=dF,e.return(d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=hF;return e.return(hF.call(c,
a,b))})}
function hF(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,r,u;return Q(function(v){if(1==v.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=iF(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=jF(h.videoCapabilities,d),l=jF(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 H(v,dF.call(c,a,e),2)}p=v.h;u=r=null;e[0]&&(e[0].videoCapabilities&&(r=e[0].videoCapabilities[0].encryptionScheme),e[0].audioCapabilities&&(u=e[0].audioCapabilities[0].encryptionScheme));return v.return(new kF(p,r,u))})}function jF(a,b){return a?a.filter(function(c){return lF(c.encryptionScheme,b)}):a}S("EmeEncryptionSchemePolyfill",cF);cF.install=eF;function mF(){}var nF;
function oF(){nF||navigator.mediaCapabilitiesEncryptionSchemePolyfilled?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(nF=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=pF,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
function pF(a){var b=this,c,d;return Q(function(e){switch(e.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),H(e,nF.call(b,a),2);case 2:c=e.h;if(!c.supported||!a.keySystemConfiguration)return e.return(c);if((d=c.keySystemAccess)&&gF(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=nF,e.return(c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
navigator.mediaCapabilities.decodingInfo=qF;if(d){e.A(3);break}return H(e,rF(a),4);case 4:return c.keySystemAccess=e.h,e.return(c);case 3:return e.return(qF.call(b,a))}})}
function qF(a){var b=this,c,d,e,f,g,h,k;return Q(function(l){switch(l.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),d=c=null,!a.keySystemConfiguration||(e=a.keySystemConfiguration,f=e.keySystem,d=e.audio&&e.audio.encryptionScheme,c=e.video&&e.video.encryptionScheme,g=iF(f),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},lF(d,g)&&lF(c,g))?H(l,nF.call(b,a),2):l.return(h);case 2:k=l.h;if(k.keySystemAccess){k.keySystemAccess=
new kF(k.keySystemAccess,c,d);l.A(3);break}if(!a.keySystemConfiguration){l.A(3);break}return H(l,rF(a),5);case 5:k.keySystemAccess=l.h;case 3:return l.return(k)}})}
function rF(a){var b,c;return Q(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType,encryptionScheme:e.audio.encryptionScheme});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType,encryptionScheme:e.video.encryptionScheme});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};
f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return H(d,navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d.return(c)})}S("McEncryptionSchemePolyfill",mF);mF.install=oF;function kF(a,b,c){this.g=a;this.i=b||null;this.h=c||null;this.keySystem=a.keySystem}
kF.prototype.getConfiguration=function(){var a=this.g.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.i;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.h;return a};kF.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};
function iF(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs";if(a.startsWith("com.huawei"))return"cenc";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}
function gF(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 lF(a,b){if(!a||a==b)return!0;if("cbcs"==a||"cbcs-1-9"==a)if(sF||tF||uF)return!0;return!1}function vF(){}function RB(){eF();oF()}S("EncryptionSchemePolyfills",vF);vF.install=RB;var uF=navigator.userAgent.includes("CrKey"),sF=100<=parseInt(navigator.userAgent.split("Firefox/").pop(),10),wF;
var xF=navigator.userAgent||"";if(xF.includes("Web0S")){var yF=xF.match(/Chrome\/(\d+)/);wF=yF?79<=parseInt(yF[1],10):!1}else wF=!1;var tF=wF;"undefined"!==typeof module&&module.exports&&(module.exports=vF);/*
 @license
 Copyright 2013 Ali Al Dallal

 Licensed under the MIT license.

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
*/
for(var zF={ach:{D:"Lwo",F:"Acholi"},ady:{D:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",F:"Adyghe"},af:{D:"Afrikaans",F:"Afrikaans"},"af-NA":{D:"Afrikaans (Namibia)",F:"Afrikaans (Namibia)"},"af-ZA":{D:"Afrikaans (South Africa)",F:"Afrikaans (South Africa)"},ak:{D:"T\u0255\u0265i",F:"Akan"},ar:{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic"},"ar-AR":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic"},"ar-MA":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",F:"Arabic (Morocco)"},
"ar-SA":{D:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",F:"Arabic (Saudi Arabia)"},"ay-BO":{D:"Aymar aru",F:"Aymara"},az:{D:"Az\u0259rbaycan dili",F:"Azerbaijani"},"az-AZ":{D:"Az\u0259rbaycan dili",F:"Azerbaijani"},"be-BY":{D:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",F:"Belarusian"},bg:{D:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",F:"Bulgarian"},"bg-BG":{D:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
F:"Bulgarian"},bn:{D:"\u09ac\u09be\u0982\u09b2\u09be",F:"Bengali"},"bn-IN":{D:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",F:"Bengali (India)"},"bn-BD":{D:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",F:"Bengali (Bangladesh)"},"bs-BA":{D:"Bosanski",F:"Bosnian"},ca:{D:"Catal\u00e0",F:"Catalan"},"ca-ES":{D:"Catal\u00e0",F:"Catalan"},cak:{D:"Maya Kaqchikel",F:"Kaqchikel"},"ck-US":{D:"\u13e3\u13b3\u13a9 (tsalagi)",F:"Cherokee"},cs:{D:"\u010ce\u0161tina",
F:"Czech"},"cs-CZ":{D:"\u010ce\u0161tina",F:"Czech"},cy:{D:"Cymraeg",F:"Welsh"},"cy-GB":{D:"Cymraeg",F:"Welsh"},da:{D:"Dansk",F:"Danish"},"da-DK":{D:"Dansk",F:"Danish"},de:{D:"Deutsch",F:"German"},"de-AT":{D:"Deutsch (\u00d6sterreich)",F:"German (Austria)"},"de-DE":{D:"Deutsch (Deutschland)",F:"German (Germany)"},"de-CH":{D:"Deutsch (Schweiz)",F:"German (Switzerland)"},dsb:{D:"Dolnoserb\u0161\u0107ina",F:"Lower Sorbian"},el:{D:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",F:"Greek"},"el-GR":{D:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
F:"Greek (Greece)"},en:{D:"English",F:"English"},"en-GB":{D:"English (UK)",F:"English (UK)"},"en-AU":{D:"English (Australia)",F:"English (Australia)"},"en-CA":{D:"English (Canada)",F:"English (Canada)"},"en-IE":{D:"English (Ireland)",F:"English (Ireland)"},"en-IN":{D:"English (India)",F:"English (India)"},"en-PI":{D:"English (Pirate)",F:"English (Pirate)"},"en-UD":{D:"English (Upside Down)",F:"English (Upside Down)"},"en-US":{D:"English (US)",F:"English (US)"},"en-ZA":{D:"English (South Africa)",
F:"English (South Africa)"},"en@pirate":{D:"English (Pirate)",F:"English (Pirate)"},eo:{D:"Esperanto",F:"Esperanto"},"eo-EO":{D:"Esperanto",F:"Esperanto"},es:{D:"Espa\u00f1ol",F:"Spanish"},"es-AR":{D:"Espa\u00f1ol (Argentine)",F:"Spanish (Argentina)"},"es-419":{D:"Espa\u00f1ol (Latinoam\u00e9rica)",F:"Spanish (Latin America)"},"es-CL":{D:"Espa\u00f1ol (Chile)",F:"Spanish (Chile)"},"es-CO":{D:"Espa\u00f1ol (Colombia)",F:"Spanish (Colombia)"},"es-EC":{D:"Espa\u00f1ol (Ecuador)",F:"Spanish (Ecuador)"},
"es-ES":{D:"Espa\u00f1ol (Espa\u00f1a)",F:"Spanish (Spain)"},"es-LA":{D:"Espa\u00f1ol (Latinoam\u00e9rica)",F:"Spanish (Latin America)"},"es-NI":{D:"Espa\u00f1ol (Nicaragua)",F:"Spanish (Nicaragua)"},"es-MX":{D:"Espa\u00f1ol (M\u00e9xico)",F:"Spanish (Mexico)"},"es-US":{D:"Espa\u00f1ol (Estados Unidos)",F:"Spanish (United States)"},"es-VE":{D:"Espa\u00f1ol (Venezuela)",F:"Spanish (Venezuela)"},et:{D:"eesti keel",F:"Estonian"},"et-EE":{D:"Eesti (Estonia)",F:"Estonian (Estonia)"},eu:{D:"Euskara",F:"Basque"},
"eu-ES":{D:"Euskara",F:"Basque"},fa:{D:"\u0641\u0627\u0631\u0633\u06cc",F:"Persian"},"fa-IR":{D:"\u0641\u0627\u0631\u0633\u06cc",F:"Persian"},"fb-LT":{D:"Leet Speak",F:"Leet"},ff:{D:"Fulah",F:"Fulah"},fi:{D:"Suomi",F:"Finnish"},"fi-FI":{D:"Suomi",F:"Finnish"},"fo-FO":{D:"F\u00f8royskt",F:"Faroese"},fr:{D:"Fran\u00e7ais",F:"French"},"fr-CA":{D:"Fran\u00e7ais (Canada)",F:"French (Canada)"},"fr-FR":{D:"Fran\u00e7ais (France)",F:"French (France)"},"fr-BE":{D:"Fran\u00e7ais (Belgique)",F:"French (Belgium)"},
"fr-CH":{D:"Fran\u00e7ais (Suisse)",F:"French (Switzerland)"},"fy-NL":{D:"Frysk",F:"Frisian (West)"},ga:{D:"Gaeilge",F:"Irish"},"ga-IE":{D:"Gaeilge (Gaelic)",F:"Irish (Gaelic)"},gl:{D:"Galego",F:"Galician"},"gl-ES":{D:"Galego",F:"Galician"},"gn-PY":{D:"Ava\u00f1e'\u1ebd",F:"Guarani"},"gu-IN":{D:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",F:"Gujarati"},"gx-GR":{D:"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",F:"Classical Greek"},he:{D:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",
F:"Hebrew"},"he-IL":{D:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",F:"Hebrew"},hi:{D:"\u0939\u093f\u0928\u094d\u0926\u0940",F:"Hindi"},"hi-IN":{D:"\u0939\u093f\u0928\u094d\u0926\u0940",F:"Hindi"},hr:{D:"Hrvatski",F:"Croatian"},"hr-HR":{D:"Hrvatski",F:"Croatian"},hsb:{D:"Hornjoserb\u0161\u0107ina",F:"Upper Sorbian"},ht:{D:"Krey\u00f2l",F:"Haitian Creole"},hu:{D:"Magyar",F:"Hungarian"},"hu-HU":{D:"Magyar",F:"Hungarian"},"hy-AM":{D:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",F:"Armenian"},id:{D:"Bahasa Indonesia",
F:"Indonesian"},"id-ID":{D:"Bahasa Indonesia",F:"Indonesian"},is:{D:"\u00cdslenska",F:"Icelandic"},"is-IS":{D:"\u00cdslenska (Iceland)",F:"Icelandic (Iceland)"},it:{D:"Italiano",F:"Italian"},"it-IT":{D:"Italiano",F:"Italian"},ja:{D:"\u65e5\u672c\u8a9e",F:"Japanese"},"ja-JP":{D:"\u65e5\u672c\u8a9e",F:"Japanese"},"jv-ID":{D:"Basa Jawa",F:"Javanese"},"ka-GE":{D:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",F:"Georgian"},"kk-KZ":{D:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",F:"Kazakh"},km:{D:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",
F:"Khmer"},"km-KH":{D:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",F:"Khmer"},kab:{D:"Taqbaylit",F:"Kabyle"},kn:{D:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",F:"Kannada"},"kn-IN":{D:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",F:"Kannada (India)"},ko:{D:"\ud55c\uad6d\uc5b4",F:"Korean"},"ko-KR":{D:"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",F:"Korean (Korea)"},ku:{D:"Kurd\u00ee",F:"Kurdish"},"ku-TR":{D:"Kurd\u00ee",F:"Kurdish"},la:{D:"Latin",F:"Latin"},"la-VA":{D:"Latin",F:"Latin"},lb:{D:"L\u00ebtzebuergesch",
F:"Luxembourgish"},"li-NL":{D:"L\u00e8mb\u00f6rgs",F:"Limburgish"},lt:{D:"Lietuvi\u0173",F:"Lithuanian"},"lt-LT":{D:"Lietuvi\u0173",F:"Lithuanian"},lv:{D:"Latvie\u0161u",F:"Latvian"},"lv-LV":{D:"Latvie\u0161u",F:"Latvian"},mai:{D:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0",F:"Maithili"},"mg-MG":{D:"Malagasy",F:"Malagasy"},mk:{D:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",F:"Macedonian"},"mk-MK":{D:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
F:"Macedonian (Macedonian)"},ml:{D:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",F:"Malayalam"},"ml-IN":{D:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",F:"Malayalam"},"mn-MN":{D:"\u041c\u043e\u043d\u0433\u043e\u043b",F:"Mongolian"},mr:{D:"\u092e\u0930\u093e\u0920\u0940",F:"Marathi"},"mr-IN":{D:"\u092e\u0930\u093e\u0920\u0940",F:"Marathi"},ms:{D:"Bahasa Melayu",F:"Malay"},"ms-MY":{D:"Bahasa Melayu",F:"Malay"},mt:{D:"Malti",F:"Maltese"},"mt-MT":{D:"Malti",F:"Maltese"},my:{D:"\u1017\u1019\u102c\u1005\u1000\u102c",
F:"Burmese"},nb:{D:"Norsk (bokm\u00e5l)",F:"Norwegian (bokmal)"},"nb-NO":{D:"Norsk (bokm\u00e5l)",F:"Norwegian (bokmal)"},ne:{D:"\u0928\u0947\u092a\u093e\u0932\u0940",F:"Nepali"},"ne-NP":{D:"\u0928\u0947\u092a\u093e\u0932\u0940",F:"Nepali"},nl:{D:"Nederlands",F:"Dutch"},"nl-BE":{D:"Nederlands (Belgi\u00eb)",F:"Dutch (Belgium)"},"nl-NL":{D:"Nederlands (Nederland)",F:"Dutch (Netherlands)"},"nn-NO":{D:"Norsk (nynorsk)",F:"Norwegian (nynorsk)"},no:{D:"Norsk",F:"Norwegian"},oc:{D:"Occitan",F:"Occitan"},
"or-IN":{D:"\u0b13\u0b21\u0b3c\u0b3f\u0b06",F:"Oriya"},pa:{D:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",F:"Punjabi"},"pa-IN":{D:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",F:"Punjabi (India)"},pl:{D:"Polski",F:"Polish"},"pl-PL":{D:"Polski",F:"Polish"},"ps-AF":{D:"\u067e\u069a\u062a\u0648",F:"Pashto"},pt:{D:"Portugu\u00eas",F:"Portuguese"},"pt-BR":{D:"Portugu\u00eas (Brasil)",F:"Portuguese (Brazil)"},"pt-PT":{D:"Portugu\u00eas (Portugal)",F:"Portuguese (Portugal)"},
"qu-PE":{D:"Qhichwa",F:"Quechua"},"rm-CH":{D:"Rumantsch",F:"Romansh"},ro:{D:"Rom\u00e2n\u0103",F:"Romanian"},"ro-RO":{D:"Rom\u00e2n\u0103",F:"Romanian"},ru:{D:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",F:"Russian"},"ru-RU":{D:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",F:"Russian"},"sa-IN":{D:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",F:"Sanskrit"},"se-NO":{D:"Davvis\u00e1megiella",F:"Northern S\u00e1mi"},"si-LK":{D:"\u0db4\u0dc5\u0dcf\u0dad",F:"Sinhala (Sri Lanka)"},sk:{D:"Sloven\u010dina",
F:"Slovak"},"sk-SK":{D:"Sloven\u010dina (Slovakia)",F:"Slovak (Slovakia)"},sl:{D:"Sloven\u0161\u010dina",F:"Slovenian"},"sl-SI":{D:"Sloven\u0161\u010dina",F:"Slovenian"},"so-SO":{D:"Soomaaliga",F:"Somali"},sq:{D:"Shqip",F:"Albanian"},"sq-AL":{D:"Shqip",F:"Albanian"},sr:{D:"\u0421\u0440\u043f\u0441\u043a\u0438",F:"Serbian"},"sr-RS":{D:"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",F:"Serbian (Serbia)"},su:{D:"Basa Sunda",F:"Sundanese"},sv:{D:"Svenska",F:"Swedish"},"sv-SE":{D:"Svenska",F:"Swedish"},
sw:{D:"Kiswahili",F:"Swahili"},"sw-KE":{D:"Kiswahili",F:"Swahili (Kenya)"},ta:{D:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",F:"Tamil"},"ta-IN":{D:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",F:"Tamil"},te:{D:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",F:"Telugu"},"te-IN":{D:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",F:"Telugu"},tg:{D:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",F:"Tajik"},"tg-TJ":{D:"\u0442\u043e\u04b7\u0438\u043a\u04e3",F:"Tajik"},th:{D:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
F:"Thai"},"th-TH":{D:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",F:"Thai (Thailand)"},tl:{D:"Filipino",F:"Filipino"},"tl-PH":{D:"Filipino",F:"Filipino"},tlh:{D:"tlhIngan-Hol",F:"Klingon"},tr:{D:"T\u00fcrk\u00e7e",F:"Turkish"},"tr-TR":{D:"T\u00fcrk\u00e7e",F:"Turkish"},"tt-RU":{D:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",F:"Tatar"},uk:{D:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",F:"Ukrainian"},"uk-UA":{D:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
F:"Ukrainian"},ur:{D:"\u0627\u0631\u062f\u0648",F:"Urdu"},"ur-PK":{D:"\u0627\u0631\u062f\u0648",F:"Urdu"},uz:{D:"O'zbek",F:"Uzbek"},"uz-UZ":{D:"O'zbek",F:"Uzbek"},vi:{D:"Ti\u1ebfng Vi\u1ec7t",F:"Vietnamese"},"vi-VN":{D:"Ti\u1ebfng Vi\u1ec7t",F:"Vietnamese"},"xh-ZA":{D:"isiXhosa",F:"Xhosa"},yi:{D:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",F:"Yiddish"},"yi-DE":{D:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",F:"Yiddish (German)"},zh:{D:"\u4e2d\u6587",F:"Chinese"},"zh-HANS":{D:"\u4e2d\u6587\u7b80\u4f53",
F:"Chinese Simplified"},"zh-HANT":{D:"\u4e2d\u6587\u7e41\u9ad4",F:"Chinese Traditional"},"zh-CN":{D:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",F:"Chinese Simplified (China)"},"zh-HK":{D:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",F:"Chinese Traditional (Hong Kong)"},"zh-SG":{D:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",F:"Chinese Simplified (Singapore)"},"zh-TW":{D:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",F:"Chinese Traditional (Taiwan)"},"zu-ZA":{D:"isiZulu",F:"Zulu"}},AF=t(Object.keys(zF)),BF=AF.next();!BF.done;BF=
AF.next()){var CF=BF.value;zF[CF.toLowerCase()]=zF[CF]};function DF(a,b){var c=this;this.parent=a;this.controls=b;this.eventManager=new zd;this.localization=this.controls.Aa;this.player=this.controls.yc();this.video=this.controls.Bc();this.adManager=this.player.Ne();this.ad=b.getAd();this.eventManager.o(this.adManager,"ad-started",function(d){c.ad=d.ad});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null})}
DF.prototype.release=function(){this.eventManager.release();this.ad=this.adManager=this.video=this.player=this.localization=this.eventManager=this.controls=this.parent=null};S("shaka.ui.Element",DF);DF.prototype.release=DF.prototype.release;function EF(a){return FF(a,"shaka-back-to-overflow-button")}function FF(a,b){a=a.getElementsByClassName(b);return a.length?a[0]:null}function GF(a){a&&(a=FF(a,"shaka-chosen-item"))&&a.parentElement.focus()}function HF(){var a=W("i");a.classList.add("material-icons-round");a.classList.add("shaka-chosen-item");a.textContent="done";a.ariaHidden="true";return a}function IF(a,b){a&&(b?a.classList.remove("shaka-hidden"):a.classList.add("shaka-hidden"))}
function JF(a,b){var c=Math.floor(a/3600),d=Math.floor(a/60%60);a=Math.floor(a%60);10>a&&(a="0"+a);a=d+":"+a;b&&(10>d&&(a="0"+a),a=c+":"+a);return a};function KF(a,b){DF.call(this,a,b);var c=this;this.i=W("div");this.i.classList.add("shaka-ad-counter");this.parent.appendChild(this.i);this.h=W("span");this.h.classList.add("shaka-ad-counter-span");this.i.appendChild(this.h);this.g=new bc(function(){if(c.ad.isLinear()){var d=Math.round(c.ad.getRemainingTime()),e=c.ad.getDuration();-1!=d&&-1!=e&&(0<d?(d=JF(e-d,!1)+" / "+JF(e,!1),1<c.ad.getSequenceLength()?c.h.textContent=d:(e=c.localization.resolve("AD_TIME"),c.h.textContent=e.replace("[AD_TIME]",
d))):(c.g.stop(),c.h.textContent=""))}});this.eventManager.o(this.localization,"locale-updated",function(){});this.eventManager.o(this.localization,"locale-changed",function(){});this.eventManager.o(this.adManager,"ad-started",function(){c.g.Ia();c.g.xa(.5)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g.stop();c.h.textContent=""});this.ad&&(this.g.Ia(),this.g.xa(.5))}oa(KF,DF);KF.prototype.release=function(){this.g.stop();this.g=null;DF.prototype.release.call(this)};
S("shaka.ui.AdCounter",KF);function LF(a,b){DF.call(this,a,b);var c=this;this.g=W("div");this.g.classList.add("shaka-ad-position");IF(this.g,!1);this.parent.appendChild(this.g);this.h=W("span");this.h.classList.add("shaka-ad-position-span");this.g.appendChild(this.h);this.eventManager.o(this.localization,"locale-updated",function(){c.ad&&MF(c)});this.eventManager.o(this.localization,"locale-changed",function(){c.ad&&MF(c)});this.eventManager.o(this.adManager,"ad-started",function(){MF(c)});this.eventManager.o(this.adManager,
"ad-stopped",function(){c.h.textContent="";IF(c.g,!1)});this.ad&&MF(this)}oa(LF,DF);function MF(a){var b=a.ad.getSequenceLength();if(1<b&&a.ad.isLinear()){var c=a.ad.getPositionInSequence();a.h.textContent=a.localization.resolve("AD_PROGRESS").replace("[AD_ON]",String(c)).replace("[NUM_ADS]",String(b));IF(a.g,!0)}}S("shaka.ui.AdPosition",LF);function NF(a,b){DF.call(this,a,b);var c=this;this.j=this.controls.g;this.h=this.controls.j;this.i=[];this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-context-menu");this.g.classList.add("shaka-hidden");this.h.appendChild(this.g);this.eventManager.o(this.h,"contextmenu",function(d){if(c.g.classList.contains("shaka-hidden")){d.preventDefault();var e=c.h.getBoundingClientRect();c.g.style.left=d.clientX-e.left+"px";c.g.style.top=d.clientY-e.top+"px";IF(c.g,!0)}else IF(c.g,
!1)});this.eventManager.o(window,"click",function(){IF(c.g,!1)});this.eventManager.o(this.g,"click",function(){IF(c.g,!1)});OF(this)}oa(NF,DF);NF.prototype.release=function(){this.h=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];DF.prototype.release.call(this)};NF.prototype.Th=function(){IF(this.g,!1)};function PF(a,b){QF.set(a,b)}
function OF(a){for(var b=t(a.j.contextMenuElements),c=b.next();!c.done;c=b.next()){c=c.value;var d=QF.get(c);d?a.i.push(d.create(a.g,a.controls)):db("Unrecognized context menu element:",c)}}S("shaka.ui.ContextMenu",NF);NF.registerElement=PF;NF.prototype.closeMenu=NF.prototype.Th;var QF=new Map;function RF(a,b){DF.call(this,a,b);var c=this;this.button=kk();this.parent.appendChild(this.button);this.eventManager.o(this.localization,"locale-updated",function(){c.g()});this.eventManager.o(this.localization,"locale-changed",function(){c.g()});this.eventManager.o(this.video,"play",function(){c.g();c.h()});this.eventManager.o(this.video,"pause",function(){c.g();c.h()});this.eventManager.o(this.video,"seeking",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-paused",function(){c.g();
c.h()});this.eventManager.o(this.adManager,"ad-resumed",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-started",function(){c.g();c.h()});this.eventManager.o(this.adManager,"ad-stopped",function(){c.g();c.h()});this.eventManager.o(this.button,"click",function(){c.controls.Ca()&&SF(c.controls)});this.ad&&(this.g(),this.h())}oa(RF,DF);RF.prototype.isPaused=function(){if(this.ad&&this.ad.isLinear())var a=this.ad.isPaused();else a=this.controls,a=a.u.paused&&!a.U;return a};
RF.prototype.isEnded=function(){return this.ad&&this.ad.isLinear()?!1:this.player?this.player.isEnded():!0};RF.prototype.g=function(){};RF.prototype.h=function(){};S("shaka.ui.PlayButton",RF);function TF(a,b){RF.call(this,a,b);this.button.classList.add("shaka-play-button");this.button.classList.add("shaka-no-propagation");this.h();this.g()}oa(TF,RF);TF.prototype.h=function(){this.isPaused()?this.button.setAttribute("icon","play"):this.button.setAttribute("icon","pause")};TF.prototype.g=function(){var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)};S("shaka.ui.BigPlayButton",TF);function UF(a,b){DF.call(this,a,b);var c=this;this.s=null;this.j=this.C=!1;this.B=this.u=null;this.l=new bc(function(){0===parseInt(c.h.textContent,10)&&VF(c.controls);var d=parseInt(c.h.textContent,10);0!==d&&(c.video.currentTime=c.controls.Fg()+d);c.g.style.opacity="0";c.C=!1;c.h.textContent="0s"});this.g=W("div");this.parent.appendChild(this.g);this.h=W("span");this.h.textContent="0s";this.g.appendChild(this.h);this.i=W("span");this.i.classList.add("shaka-forward-rewind-container-icon");this.g.appendChild(this.i);
this.m=!1;this.eventManager.o(this.g,"touchstart",function(d){c.controls.Ca()&&(0<d.touches.length&&(c.u=d.touches[0].clientX,c.B=d.touches[0].clientY),c.j=!1)});this.eventManager.o(this.g,"touchmove",function(d){if(0<d.touches.length&&null!=c.u&&null!=c.B){var e=d.touches[0].clientX-c.u;d=d.touches[0].clientY-c.B;10<Math.sqrt(e*e+d*d)&&(c.j=!0)}});this.eventManager.o(this.g,"touchend",function(d){if(c.controls.Ca()&&!c.j)if(c.controls.Kd())d.preventDefault(),c.controls.Tc();else if(0<c.controls.g.tapSeekDistance)if(d.preventDefault(),
d=c.controls.g.tapSeekDistance,!c.C)c.C=!0,c.s=Date.now(),c.l.$(.5);else if(c.s+500>Date.now()){c.l.stop();c.s=Date.now();var e=parseInt(c.h.textContent,10);e=c.m?e-d:e+d;c.h.textContent=e.toString()+"s";c.g.style.opacity="1";c.l.$(.5)}})}oa(UF,DF);S("shaka.ui.HiddenSeekButton",UF);function WF(a,b){UF.call(this,a,b);this.g.classList.add("shaka-fast-forward-container");this.i.textContent="fast_forward";this.m=!1}oa(WF,UF);S("shaka.ui.HiddenFastForwardButton",WF);function XF(a,b){UF.call(this,a,b);this.g.classList.add("shaka-rewind-container");this.i.textContent="fast_rewind";this.m=!0}oa(XF,UF);S("shaka.ui.HiddenRewindButton",XF);function YF(a,b,c,d){DF.call(this,a,b);var e=this;this.container=W("div");this.container.classList.add("shaka-range-container");this.container.classList.add.apply(this.container.classList,y(c));this.i=!1;this.bar=document.createElement("input");this.H=new bc(function(){e.onChangeEnd();e.i=!1});this.bar.classList.add("shaka-range-element");this.bar.classList.add.apply(this.bar.classList,y(d));this.bar.type="range";this.bar.step="any";this.bar.min="0";this.bar.max="1";this.bar.value="0";this.container.appendChild(this.bar);
this.parent.appendChild(this.container);this.eventManager.o(this.bar,"mousedown",function(f){e.controls.Ca()&&(e.i=!0,e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"touchstart",function(f){e.controls.Ca()&&(e.i=!0,ZF(e,f),e.onChangeStart());f.stopPropagation()});this.eventManager.o(this.bar,"input",function(){e.onChange()});this.eventManager.o(this.bar,"touchmove",function(f){e.i&&(ZF(e,f),e.onChange());f.stopPropagation()});this.eventManager.o(this.bar,"touchend",function(f){e.i&&
(e.i=!1,ZF(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"touchcancel",function(f){e.i&&(e.i=!1,ZF(e,f),e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"mouseup",function(f){e.i&&(e.i=!1,e.onChangeEnd());f.stopPropagation()});this.eventManager.o(this.bar,"blur",function(){e.i&&(e.i=!1,e.onChangeEnd())});this.eventManager.o(this.bar,"contextmenu",function(f){f.preventDefault();f.stopPropagation()})}oa(YF,DF);q=YF.prototype;
q.release=function(){this.H&&(this.H.stop(),this.H=null);DF.prototype.release.call(this)};q.setRange=function(a,b){this.bar.min=a;this.bar.max=b};q.onChangeStart=function(){};q.onChange=function(){};q.onChangeEnd=function(){};q.changeTo=function(a){this.i||(this.i=!0,this.onChangeStart());var b=parseFloat(this.bar.min),c=parseFloat(this.bar.max);this.bar.value=a>c?c:a<b?b:a;this.onChange();this.H.$(.5)};q.getValue=function(){return parseFloat(this.bar.value)};
q.setValue=function(a){this.i||(this.bar.value=a)};function ZF(a,b){b.preventDefault();var c=b.changedTouches[0],d=a.bar.getBoundingClientRect();b=parseFloat(a.bar.min);var e=parseFloat(a.bar.max);c=b+(e-b)/d.width*(c.clientX-d.left);c<b?c=b:c>e&&(c=e);a.bar.value=c}S("shaka.ui.RangeElement",YF);YF.prototype.setValue=YF.prototype.setValue;YF.prototype.getValue=YF.prototype.getValue;YF.prototype.changeTo=YF.prototype.changeTo;YF.prototype.onChangeEnd=YF.prototype.onChangeEnd;
YF.prototype.onChange=YF.prototype.onChange;YF.prototype.onChangeStart=YF.prototype.onChangeStart;YF.prototype.setRange=YF.prototype.setRange;function $F(a,b){YF.call(this,a,b,["shaka-seek-bar-container"],["shaka-seek-bar","shaka-no-propagation","shaka-show-controls-on-mouse-over"]);var c=this;this.G=W("div");this.G.classList.add("shaka-ad-markers");this.container.insertBefore(this.G,this.container.childNodes[0]);this.J=this.controls.g;this.u=new bc(function(){var d=c.getValue();c.player.V()||d==c.video.duration&&(d-=.001);c.video.currentTime=d});this.B=new bc(function(){aG(c)});this.M=!1;this.h=W("div");this.h.id="shaka-player-ui-thumbnail-container";
this.g=W("img");this.g.id="shaka-player-ui-thumbnail-image";this.g.draggable=!1;this.L=W("div");this.L.id="shaka-player-ui-thumbnail-time-container";this.I=W("div");this.I.id="shaka-player-ui-thumbnail-time";this.L.appendChild(this.I);this.h.appendChild(this.g);this.h.appendChild(this.L);this.container.appendChild(this.h);this.j=W("div");this.j.id="shaka-player-ui-time-container";this.container.appendChild(this.j);this.l=this.m=null;this.K=!1;this.s=new bc(function(){bG(c)});this.C=[];this.eventManager.o(this.localization,
"locale-updated",function(){return cG(c)});this.eventManager.o(this.localization,"locale-changed",function(){return cG(c)});this.eventManager.o(this.adManager,"ad-started",function(){dG(c)||IF(c.container,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){dG(c)&&IF(c.container,!0)});this.eventManager.o(this.adManager,"ad-cue-points-changed",function(d){c.C=d.cuepoints;eG(c)});this.eventManager.o(this.player,"unloading",function(){c.C=[];eG(c);c.l&&(c.l.abort(),c.l=null);c.m=null;bG(c);
fG(c)});this.eventManager.o(this.bar,"mousemove",function(d){var e=c.bar.getBoundingClientRect(),f=parseFloat(c.bar.min);d=d.clientX-e.left;e=Math.round(f+(parseFloat(c.bar.max)-f)/e.width*d);c.player.Gg().length?(fG(c),gG(c,d,e)):(bG(c),f=c.j.clientWidth,c.j.style.width="auto",c.j.style.height="20px",c.j.style.top="-30px",c.j.style.left=Math.min(c.bar.offsetWidth-f,Math.max(0,d-f/2))+"px",c.j.style.right="",c.j.style.visibility="visible",d=c.player.ya(),c.player.V()?(d=d.end-e,1>d?(c.j.textContent=
c.localization.resolve("LIVE"),c.j.style.left="",c.j.style.right="0px"):c.j.textContent="-"+hG(d)):c.j.textContent=hG(e-d.start))});this.eventManager.o(this.container,"mouseleave",function(){fG(c);c.s.stop();c.s.$(.25)});this.setValue(this.video.currentTime);this.update();cG(this);this.ad&&IF(this.container,!1)}oa($F,YF);q=$F.prototype;q.release=function(){this.u&&(this.u.stop(),this.u=null,this.B.stop(),this.B=null);YF.prototype.release.call(this)};
q.onChangeStart=function(){this.M=!this.video.paused;this.controls.rh(!0);this.video.pause();this.s.stop();this.K=!0};q.onChange=function(){if(this.video.duration)if(this.update(),this.u.$(.125),this.player.Gg().length){var a=parseFloat(this.bar.min),b=parseFloat(this.bar.max),c=this.bar.getBoundingClientRect(),d=Math.round(this.getValue());gG(this,(d-a)/((b-a)/c.width),d)}else bG(this)};
q.onChangeEnd=function(){this.u.Ia();this.controls.rh(!1);this.M&&this.video.play();this.K&&(this.K=!1,this.s.stop(),this.s.$(.25))};q.isShowing=function(){return!this.container.classList.contains("shaka-hidden")};
q.update=function(){var a=this.J.seekBarColors,b=this.getValue(),c=this.video.buffered.length,d=c?this.video.buffered.start(0):0,e=c?this.video.buffered.end(c-1):0,f=this.player.ya(),g=f.end-f.start;this.setRange(f.start,f.end);dG(this)?(IF(this.container,!0),0==c?this.container.style.background=a.base:(c=(Math.max(d,f.start)-f.start)/g||0,e=(Math.min(e,f.end)-f.start)/g||0,b=(Math.min(Math.max(b,f.start),f.end)-f.start)/g||0,this.container.style.background="linear-gradient("+["to right",(this.J.showUnbufferedStart?
a.base:a.played)+" "+100*c+"%",a.played+" "+100*c+"%",a.played+" "+100*b+"%",a.buffered+" "+100*b+"%",a.buffered+" "+100*e+"%",a.base+" "+100*e+"%"].join()+")")):IF(this.container,!1)};
function aG(a){if(a.C.length){for(var b=a.player.ya(),c=b.end-b.start,d=["to right"],e=[],f=a.J.seekBarColors.adBreaks,g=!1,h=t(a.C),k=h.next();!k.done;k=h.next())if(k=k.value,-1==k.start&&!k.end)g=!0;else if(!k.end&&k.start>=b.start||"number"==typeof k.end&&k.end>b.start){var l=(Math.max(k.start,b.start)-b.start)/c||0,m=l+.01;k.end&&(m=(k.end-b.start)/c||0);e.push({start:l,end:m})}e=e.sort(function(n,p){return n.start-p.start});b=t(e);for(c=b.next();!c.done;c=b.next())c=c.value,d.push("transparent "+
100*c.start+"%"),d.push(f+" "+100*c.start+"%"),d.push(f+" "+100*c.end+"%"),d.push("transparent "+100*c.end+"%");g&&(d.push("transparent 99%"),d.push(f+" 99%"));a.G.style.background="linear-gradient("+d.join(",")+")"}else a.G.style.background="transparent",a.B.stop()}function eG(a){function b(){aG(a);var c=a.player.ya();c=c.end-c.start;a.player.V()&&5<c&&a.B.xa(.25)}a.player.Z?b():a.eventManager.ra(a.player,"loaded",b)}
function dG(a){var b=a.player.ya();b=b.end-b.start;return a.player.V()&&(5>b||!isFinite(b))?!1:null==a.ad||!a.ad.isLinear()}function cG(a){a.bar.ariaLabel=a.localization.resolve("SEEK")}
function gG(a,b,c){var d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B;Q(function(C){switch(C.g){case 1:return 0>c&&(c=0),d=a.player.ya(),e=Math.max(Math.ceil(d.start),Math.min(Math.floor(d.end),c)),a.player.V()?(f=d.end-c,a.I.textContent=1>f?a.localization.resolve("LIVE"):"-"+hG(f)):a.I.textContent=hG(c),H(C,a.player.ii(null,e),2);case 2:g=C.h;if(!g||!g.uris.length)return bG(a),C.return();g.width<g.height?a.h.classList.add("portrait-thumbnail"):a.h.classList.remove("portrait-thumbnail");h=-10;k=a.h.clientWidth;
l=Math.floor(9*k/16);a.h.style.height=l+"px";a.h.style.top=-(l-h)+"px";m=Math.min(a.bar.offsetWidth-k,Math.max(0,b-k/2));a.h.style.left=m+"px";a.h.style.visibility="visible";n=g.uris[0].split("#xywh=")[0];if(a.m&&n===a.m.uris[0].split("#xywh=")[0]&&g.segment.cc()==a.m.segment.cc()&&g.segment.Zb()==a.m.segment.Zb()){C.A(3);break}a.m=g;a.l&&(a.l.abort(),a.l=null);if("mjpg"!=g.codecs&&!n.startsWith("offline:")){C.A(4);break}a.g.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>';va(C,
5);p=Fh;r=Nm(g.segment.S(),g.segment.cc(),g.segment.Zb(),a.player.getConfiguration().streaming.retryParameters);a.l=a.player.Fb().request(p,r,{type:1});return H(C,a.l.promise,7);case 7:u=C.h;a.l=null;"mjpg"==g.codecs?(v=(new Oh).box("mdat",Yh(function(E){n=URL.createObjectURL(new Blob([E],{type:"image/jpeg"}))})),v.parse(u.data,!1)):(w=g.mimeType||"image/jpeg",x=new Blob([u.data],{type:w}),n=URL.createObjectURL(x));xa(C,4);break;case 5:z=za(C);if(7001==z.code)return C.return();throw z;case 4:try{a.h.removeChild(a.g)}catch(E){}a.g=
W("img");a.g.id="shaka-player-ui-thumbnail-image";a.g.draggable=!1;a.g.src=n;a.g.onload=function(){n.startsWith("blob:")&&URL.revokeObjectURL(n)};a.h.insertBefore(a.g,a.h.firstChild);case 3:B=k/g.width,g.imageHeight?a.g.height=g.imageHeight:g.sprite||(a.g.style.height="100%",a.g.style.objectFit="contain"),g.imageWidth?a.g.width=g.imageWidth:g.sprite||(a.g.style.width="100%",a.g.style.objectFit="contain"),a.g.style.left="-"+B*g.positionX+"px",a.g.style.top="-"+B*g.positionY+"px",a.g.style.transform=
"scale("+B+")",a.g.style.transformOrigin="left top",l=Math.floor(k*g.height/g.width),a.h.style.height=l+"px",a.h.style.top=-(l-h)+"px",I(C)}})}function bG(a){a.h.style.visibility="hidden"}function fG(a){a.j.style.visibility="hidden"}function hG(a){var b=Math.round(a);a=Math.floor(b/3600);var c=Math.floor((b-3600*a)/60);b=b-3600*a-60*c;10>b&&(b="0"+b);return 0<a?(10>c&&(c="0"+c),a+":"+c+":"+b):c+":"+b}S("shaka.ui.SeekBar",$F);function iG(){}iG.prototype.create=function(a,b){return new $F(a,b)};
$F.Factory=iG;function jG(a,b){DF.call(this,a,b);var c=this;this.j=W("div");this.j.classList.add("shaka-skip-ad-container");this.parent.appendChild(this.j);this.h=W("div");this.h.classList.add("shaka-skip-ad-counter");IF(this.h,!1);this.j.appendChild(this.h);this.g=kk();this.g.classList.add("shaka-skip-ad-button");this.g.disabled=!0;IF(this.g,!1);this.g.classList.add("shaka-no-propagation");this.j.appendChild(this.g);kG(this);this.i=new bc(function(){if(c.ad.isSkippable()){var d=Math.round(c.ad.getTimeUntilSkippable());
0<d?c.h.textContent=d:(c.i.stop(),IF(c.h,!1))}else lG(c)});this.eventManager.o(this.localization,"locale-updated",function(){kG(c)});this.eventManager.o(this.localization,"locale-changed",function(){kG(c)});this.eventManager.o(this.adManager,"ad-started",function(){mG(c)});this.eventManager.o(this.adManager,"ad-skip-state-changed",function(){c.ad.isSkippable()?c.ad.canSkipNow()&&(c.g.disabled=!1,c.i.stop(),IF(c.h,!1)):lG(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){lG(c)});this.eventManager.o(this.g,
"click",function(){c.ad.skip()});this.ad&&mG(this)}oa(jG,DF);jG.prototype.release=function(){this.i.stop();this.i=null;DF.prototype.release.call(this)};function kG(a){a.g.textContent=a.localization.resolve("SKIP_AD")}function mG(a){a.ad.isSkippable()&&a.ad.needsSkipUI()&&(IF(a.g,!0),IF(a.h,!0),a.h.textContent="",a.i.Ia(),a.i.xa(.5))}function lG(a){a.i.stop();a.g.disabled=!0;IF(a.g,!1);IF(a.h,!1)}S("shaka.ui.SkipAdButton",jG);/*
 @license
 glMatrix: https://github.com/toji/gl-matrix/
 Copyright 2015-2021, Brandon Jones, Colin MacKenzie IV
 SPDX-License-Identifier: MIT
*/
function nG(){var a=new Float32Array(16);a[0]=1;a[5]=1;a[10]=1;a[15]=1;return a}function oG(a,b,c){b=1/Math.tan(b/2);a[0]=b/c;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=b;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[11]=-1;a[12]=0;a[13]=0;a[15]=0;c=1/-99.9;a[10]=100.1*c;a[14]=20*c}
function pG(a,b,c){var d=b[0],e=b[1],f=b[2],g=b[3],h=b[4],k=b[5],l=b[6],m=b[7],n=b[8],p=b[9],r=b[10],u=b[11],v=b[12],w=b[13],x=b[14];b=b[15];var z=c[0],B=c[1],C=c[2],E=c[3];a[0]=z*d+B*h+C*n+E*v;a[1]=z*e+B*k+C*p+E*w;a[2]=z*f+B*l+C*r+E*x;a[3]=z*g+B*m+C*u+E*b;z=c[4];B=c[5];C=c[6];E=c[7];a[4]=z*d+B*h+C*n+E*v;a[5]=z*e+B*k+C*p+E*w;a[6]=z*f+B*l+C*r+E*x;a[7]=z*g+B*m+C*u+E*b;z=c[8];B=c[9];C=c[10];E=c[11];a[8]=z*d+B*h+C*n+E*v;a[9]=z*e+B*k+C*p+E*w;a[10]=z*f+B*l+C*r+E*x;a[11]=z*g+B*m+C*u+E*b;z=c[12];B=c[13];
C=c[14];E=c[15];a[12]=z*d+B*h+C*n+E*v;a[13]=z*e+B*k+C*p+E*w;a[14]=z*f+B*l+C*r+E*x;a[15]=z*g+B*m+C*u+E*b}
function qG(a,b){var c=new Float32Array(3),d=b[0],e=b[1],f=b[2],g=b[4],h=b[5],k=b[6],l=b[8],m=b[9],n=b[10];c[0]=Math.sqrt(d*d+e*e+f*f);c[1]=Math.sqrt(g*g+h*h+k*k);c[2]=Math.sqrt(l*l+m*m+n*n);k=1/c[0];l=1/c[1];m=1/c[2];g=b[0]*k;c=b[1]*l;d=b[2]*m;e=b[4]*k;h=b[5]*l;f=b[6]*m;k*=b[8];l*=b[9];b=b[10]*m;m=g+h+b;0<m?(b=2*Math.sqrt(m+1),a[3]=.25*b,a[0]=(f-l)/b,a[1]=(k-d)/b,a[2]=(c-e)/b):g>h&&g>b?(b=2*Math.sqrt(1+g-h-b),a[3]=(f-l)/b,a[0]=.25*b,a[1]=(c+e)/b,a[2]=(k+d)/b):h>b?(b=2*Math.sqrt(1+h-g-b),a[3]=(k-
d)/b,a[0]=(c+e)/b,a[1]=.25*b,a[2]=(f+l)/b):(b=2*Math.sqrt(1+b-g-h),a[3]=(c-e)/b,a[0]=(k+d)/b,a[1]=(f+l)/b,a[2]=.25*b)}function rG(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c+c,g=d+d,h=e+e;c*=f;var k=d*f;d*=g;var l=e*f,m=e*g;e*=h;f*=b;g*=b;b*=h;a[0]=1-d-e;a[1]=k+b;a[2]=l-g;a[3]=0;a[4]=k-b;a[5]=1-c-e;a[6]=m+f;a[7]=0;a[8]=l+g;a[9]=m-f;a[10]=1-c-d;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};function sG(){var a=new Float32Array(4);a[3]=1;return a}function tG(a,b){var c=b[0],d=b[1],e=b[2];b=b[3];var f=c*c+d*d+e*e+b*b;0<f&&(f=1/Math.sqrt(f));a[0]=c*f;a[1]=d*f;a[2]=e*f;a[3]=b*f};function uG(a){var b=[],c=[],d=[],e=Math.PI;a=(void 0===a?0:a)?e/2:e;for(var f=0;100>=f;f++){var g=f*e/100,h=Math.sin(g);g=Math.cos(g);for(var k=0;100>=k;k++){var l=2*k*a/100;b.push(Math.sin(l)*h,g,Math.cos(l)*h);c.push(k/100,f/100)}}for(e=0;100>e;e++)for(a=0;100>a;a++)f=101*e+a,h=f+101,d.push(f,h,f+1),d.push(h,h+1,f+1);return{fj:b,cj:c,indices:d}};function vG(a,b,c,d,e){this.i=a;this.va=b;this.s=c;this.g=d;this.u=new zd;this.N=sG();this.h=sG();this.oa=this.qa=this.ea=this.l=null;this.G=nG();this.K=nG();this.P=nG();this.Z=nG();this.C=null;this.R=!1;this.L=this.B=null;this.Aa=this.Na=0;this.ba=this.T=this.U=this.M=null;this.J=this.I=0;this.j=75;this.Y=0;this.m=e;this.H=-1;wG(this)}
vG.prototype.release=function(){-1!=this.H&&(this.i.cancelVideoFrameCallback(this.H),this.H=-1);this.u&&(this.u.release(),this.u=null);this.B&&(this.B.stop(),this.B=null);this.L&&(this.L.stop(),this.L=null)};vG.prototype.Id=function(){(this.R=!this.R)||this.g.viewport(0,0,this.s.width,this.s.height);xG(this,!1)};
function wG(a){yG(a);zG(a);AG(a);BG(a);CG(a);Rl(a.i,HTMLMediaElement.HAVE_CURRENT_DATA,a.u,function(){a.i.readyState>=HTMLMediaElement.HAVE_ENOUGH_DATA&&xG(a);if("requestVideoFrameCallback"in a.i){var b=function(){-1!=a.H&&(xG(a),-1!=a.H&&(a.H=a.i.requestVideoFrameCallback(b)))};a.H=a.i.requestVideoFrameCallback(b)}else{var c;a.u.o(a.i,"canplaythrough",function(){xG(a)});a.u.o(a.i,"playing",function(){a.B&&a.B.stop();if(!c){var d=a.va.Mb();d=t(d);for(var e=d.next();!e.done;e=d.next())(e=e.value.frameRate)&&
(!c||c<e)&&(c=e)}c||(c=60);xG(a);a.B=(new bc(function(){xG(a)})).Ia().xa(1/c)});a.u.o(a.i,"pause",function(){a.B&&a.B.stop();a.B=null;xG(a)});a.u.o(a.i,"seeked",function(){xG(a)});a.u.o(document,"visibilitychange",function(){xG(a)})}})}
function yG(a){var b=a.G,c=[0,0,0],d=[1,0,0],e=[0,1,0],f=c[0],g=c[1];c=c[2];var h=e[0];var k=e[1];var l=e[2];var m=d[0];e=d[1];var n=d[2];if(1E-6>Math.abs(f-m)&&1E-6>Math.abs(g-e)&&1E-6>Math.abs(c-n))for(f=0;16>f;f++)b[f]=0==f%5?1:0;else{d=f-m;e=g-e;m=c-n;var p=1/Math.sqrt(d*d+e*e+m*m);d*=p;e*=p;m*=p;n=k*m-l*e;l=l*d-h*m;h=h*e-k*d;(p=Math.sqrt(n*n+l*l+h*h))?(p=1/p,n*=p,l*=p,h*=p):h=l=n=0;k=e*h-m*l;var r=m*n-d*h;var u=d*l-e*n;(p=Math.sqrt(k*k+r*r+u*u))?(p=1/p,k*=p,r*=p,u*=p):u=r=k=0;b[0]=n;b[1]=k;b[2]=
d;b[3]=0;b[4]=l;b[5]=r;b[6]=e;b[7]=0;b[8]=h;b[9]=u;b[10]=m;b[11]=0;b[12]=-(n*f+l*g+h*c);b[13]=-(k*f+r*g+u*c);b[14]=-(d*f+e*g+m*c);b[15]=1}qG(a.N,a.G);a=b=a.Z;c=[4,4,4];f=c[0];g=c[1];c=c[2];b[0]=a[0]*f;b[1]=a[1]*f;b[2]=a[2]*f;b[3]=a[3]*f;b[4]=a[4]*g;b[5]=a[5]*g;b[6]=a[6]*g;b[7]=a[7]*g;b[8]=a[8]*c;b[9]=a[9]*c;b[10]=a[10]*c;b[11]=a[11]*c;b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
function zG(a){DG(a);a.g.viewport(0,0,a.g.drawingBufferWidth,a.g.drawingBufferHeight);a.g.clearColor(0,0,0,1);a.g.enable(a.g.CULL_FACE);a.g.cullFace(a.g.FRONT);a.g.clear(a.g.COLOR_BUFFER_BIT)}
function AG(a){var b=EG(a,a.g.VERTEX_SHADER),c=EG(a,a.g.FRAGMENT_SHADER);a.l=a.g.createProgram();a.g.attachShader(a.l,b);a.g.attachShader(a.l,c);a.g.linkProgram(a.l);"cubemap"==a.m?(a.U=a.g.getAttribLocation(a.l,"aVertexPosition"),a.T=a.g.getAttribLocation(a.l,"aTextureCoord")):(a.U=a.g.getAttribLocation(a.l,"a_vPosition"),a.g.enableVertexAttribArray(a.U),a.T=a.g.getAttribLocation(a.l,"a_TexCoordinate"),a.g.enableVertexAttribArray(a.T))}
function EG(a,b){switch(b){case a.g.VERTEX_SHADER:var c="cubemap"==a.m?"attribute vec4 aVertexPosition;\nattribute vec2 aTextureCoord;\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\nvarying highp vec2 vTextureCoord;\nvarying highp vec3 vLighting;\nvoid main(void) {\n  gl_Position = uProjectionMatrix * uModelViewMatrix * aVertexPosition;\n  vTextureCoord = aTextureCoord;\n}":"attribute vec4 a_vPosition;\n// Per-vertex texture coordinate info\nattribute vec2 a_TexCoordinate;\nuniform mat4 u_VPMatrix;\n// Passed into the fragment shader.\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nvoid main()\n{\n gl_Position = u_VPMatrix * a_vPosition;\n // Pass through texture coord\n v_TexCoordinate = a_TexCoordinate;\n pass_position = a_vPosition.xyz;\n}";
break;case a.g.FRAGMENT_SHADER:c="cubemap"==a.m?"varying highp vec2 vTextureCoord;\nuniform sampler2D uSampler;\nvoid main(void) {\n  highp vec4 texelColor = texture2D(uSampler, vTextureCoord);\n  gl_FragColor = vec4(texelColor.rgb , texelColor.a);\n}":"precision highp float;\n#define PI 3.141592653589793238462643383279\nvarying vec2 v_TexCoordinate;\nvarying vec3 pass_position;\nuniform sampler2D uSampler;\nvoid main(void) {\nhighp float xValue =\n      (PI + atan(pass_position.z, pass_position.x)) / (2.0 * PI);\n vec2 tc = vec2(xValue, v_TexCoordinate.t);\n tc = vec2(tc.x , tc.y);\nhighp vec4 texelColor =\n      texture2D(uSampler, tc);\n  gl_FragColor = vec4(texelColor.rgb, texelColor.a);\n}";
break;default:return null}b=a.g.createShader(b);a.g.shaderSource(b,c);a.g.compileShader(b);return b}
function BG(a){a.M="cubemap"==a.m?{fj:[-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,1,1,-1,1,1,1,1,-1,1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1],cj:[2/3,.5,1/3,.5,1/3,0,2/3,0,2/3,.5,2/3,0,1,0,1,.5,1,1,2/3,1,2/3,.5,1,.5,0,.5,0,0,1/3,0,1/3,.5,0,.5,1/3,.5,1/3,1,0,1,1/3,1,1/3,.5,2/3,.5,2/3,1],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}:"halfequirectangular"==a.m?uG(!0):
uG();a.ea=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ea);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.M.fj),a.g.STATIC_DRAW);a.qa=a.g.createBuffer();a.g.bindBuffer(a.g.ARRAY_BUFFER,a.qa);a.g.bufferData(a.g.ARRAY_BUFFER,new Float32Array(a.M.cj),a.g.STATIC_DRAW);a.oa=a.g.createBuffer();a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.oa);a.g.bufferData(a.g.ELEMENT_ARRAY_BUFFER,new Uint16Array(a.M.indices),a.g.STATIC_DRAW)}
function CG(a){a.ba=a.g.createTexture();a.g.bindTexture(a.g.TEXTURE_2D,a.ba);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_S,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_WRAP_T,a.g.CLAMP_TO_EDGE);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MIN_FILTER,a.g.NEAREST);a.g.texParameteri(a.g.TEXTURE_2D,a.g.TEXTURE_MAG_FILTER,a.g.NEAREST)}
function xG(a,b){b=void 0===b?!0:b;var c=a.va.m==Hq;if(!(!a.i||2>a.i.readyState||!c&&0==a.i.playbackRate)){oG(a.K,a.j*Math.PI/180,1.5625);"cubemap"==a.m?oG(a.K,a.j*Math.PI/180,2.5):oG(a.K,a.j*Math.PI/180,1.5625);a.g.useProgram(a.l);a.g.clear(a.g.COLOR_BUFFER_BIT);DG(a);b&&(a.g.activeTexture(a.g.TEXTURE0),a.g.bindTexture(a.g.TEXTURE_2D,a.ba),a.g.pixelStorei(a.g.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),a.g.texImage2D(a.g.TEXTURE_2D,0,a.g.RGBA,a.g.RGBA,a.g.UNSIGNED_BYTE,a.i));if("equirectangular"==a.m||"halfequirectangular"==
a.m)pG(a.P,a.G,a.Z),pG(a.P,a.K,a.P);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.ea);a.g.vertexAttribPointer(a.U,3,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.U);a.g.bindBuffer(a.g.ARRAY_BUFFER,a.qa);a.g.vertexAttribPointer(a.T,2,a.g.FLOAT,!1,0,0);a.g.enableVertexAttribArray(a.T);a.g.bindBuffer(a.g.ELEMENT_ARRAY_BUFFER,a.oa);"cubemap"==a.m?(a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uProjectionMatrix"),!1,a.K),a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,"uModelViewMatrix"),!1,a.P)):a.g.uniformMatrix4fv(a.g.getUniformLocation(a.l,
"u_VPMatrix"),!1,a.P);a.g.uniform1i(a.g.getUniformLocation(a.l,"uSampler"),0);a.R&&a.g.viewport(0,0,a.s.width/2,a.s.height);a.g.drawElements(a.g.TRIANGLES,a.M.indices.length,a.g.UNSIGNED_SHORT,0);a.R&&(a.g.viewport(a.s.width/2,0,a.s.width/2,a.s.height),a.g.drawElements(a.g.TRIANGLES,a.M.indices.length,a.g.UNSIGNED_SHORT,0))}}
function DG(a){var b=a.i.videoWidth;b||(b=a.s.scrollWidth);var c=a.i.videoHeight;c||(c=a.s.scrollHeight);if(a.Na!==b||a.Aa!==c){a.s.width=b;a.s.height=c;a.Na=b;a.Aa=c;var d=b/c,e=a.K,f=-d,g=1/(d-f);e[0]=0*g;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=0;e[6]=0;e[7]=0;e[8]=(d+f)*g;e[9]=0;e[10]=-1;e[11]=-1;e[12]=0;e[13]=0;e[14]=-0;e[15]=0;a.K=e;a.g.viewport(0,0,b,c)}}
function FG(a,b,c,d){var e=Infinity,f=90*Math.PI/180;"halfequirectangular"==a.m&&(e=90*Math.PI/180,f/=2);var g="cubemap"==a.m?a.P:a.G;a.I+=b;a.J+=c;if(a.I<e&&a.I>-e){e=Math.sin(b);b=Math.cos(b);var h=g[0],k=g[1],l=g[2],m=g[3],n=g[8],p=g[9],r=g[10],u=g[11];g!==g&&(g[4]=g[4],g[5]=g[5],g[6]=g[6],g[7]=g[7],g[12]=g[12],g[13]=g[13],g[14]=g[14],g[15]=g[15]);g[0]=h*b-n*e;g[1]=k*b-p*e;g[2]=l*b-r*e;g[3]=m*b-u*e;g[8]=h*e+n*b;g[9]=k*e+p*b;g[10]=l*e+r*b;g[11]=m*e+u*b}else a.I-=b;a.J<f&&a.J>-f?(f=nG(),e=nG(),b=
-1*c,c=Math.sin(b),b=Math.cos(b),h=e[4],k=e[5],l=e[6],m=e[7],n=e[8],p=e[9],r=e[10],u=e[11],e!==f&&(f[0]=e[0],f[1]=e[1],f[2]=e[2],f[3]=e[3],f[12]=e[12],f[13]=e[13],f[14]=e[14],f[15]=e[15]),f[4]=h*b+n*c,f[5]=k*b+p*c,f[6]=l*b+r*c,f[7]=m*b+u*c,f[8]=n*b-h*c,f[9]=p*b-k*c,f[10]=r*b-l*c,f[11]=u*b-m*c,pG(g,f,g)):a.J-=c;c=nG();f=nG();e=Math.sin(d);d=Math.cos(d);b=f[0];h=f[1];k=f[2];l=f[3];m=f[4];n=f[5];p=f[6];r=f[7];f!==c&&(c[8]=f[8],c[9]=f[9],c[10]=f[10],c[11]=f[11],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=
f[15]);c[0]=b*d+m*e;c[1]=h*d+n*e;c[2]=k*d+p*e;c[3]=l*d+r*e;c[4]=m*d-b*e;c[5]=n*d-h*e;c[6]=p*d-k*e;c[7]=r*d-l*e;pG(g,c,g);xG(a,!1)}
function GG(a,b){if(void 0===b||b)qG(a.h,a.G),a.Y=0,a.C=sG(),a.C[0]=(a.h[0]-a.N[0])/20,a.C[1]=(a.h[1]-a.N[1])/20,a.C[2]=(a.h[2]-a.N[2])/20,a.C[3]=(a.h[3]-a.N[3])/20;a.h[0]-=a.C[0];a.h[1]-=a.C[1];a.h[2]-=a.C[2];a.h[3]-=a.C[3];b=nG();tG(a.h,a.h);rG(b,a.h);a.G=b;a.L&&(a.L.stop(),a.L=null);20>a.Y?a.L=(new bc(function(){GG(a,!1);a.I=0;a.J=0;a.Y++;xG(a,!1)})).$(.025):(rG(b,a.N),a.G=b)};function HG(a,b,c,d,e){mb.call(this);var f=this;this.i=a;this.m=b;this.L=c;this.K=d;this.u=e;this.s=new zd;this.h=new zd;this.G=IG(this);this.g=null;this.j=!1;this.J=this.I=this.H=this.C=this.B=0;this.l=null;this.s.o(d,"loading",function(){f.g&&GG(f.g);JG(f)});this.s.o(d,"spatialvideoinfo",function(g){g=g.detail;switch(g.projection){case "hequ":switch(g.hfov){case 360:f.l="equirectangular";break;case 180:f.l="halfequirectangular"}break;case "fish":f.l="equirectangular";break;default:f.l=null}JG(f)});
this.s.o(d,"nospatialvideoinfo",function(){f.l=null;JG(f)});this.s.o(d,"unloading",function(){f.l=null;JG(f)});JG(this)}oa(HG,mb);q=HG.prototype;q.release=function(){this.s&&(this.s.release(),this.s=null);this.h&&(this.h.release(),this.h=null);this.g&&(this.g.release(),this.g=null);mb.prototype.release.call(this)};q.configure=function(a){this.u=a;JG(this)};q.cg=function(){return!!this.G};q.Nb=function(){return!!this.g};q.Id=function(){this.g?this.g.Id():db("Not playing VR content")};
q.Ng=function(a){this.g?FG(this.g,a*KG,0,0):db("Not playing VR content")};q.Lg=function(a){this.g?FG(this.g,0,a*KG,0):db("Not playing VR content")};q.Mg=function(a){this.g?FG(this.g,0,0,a*KG):db("Not playing VR content")};
function JG(a){if(a.m)if(a.u.displayInVrMode||a.l){var b=a.l||a.u.defaultVrProjectionMode;a.g?a.g.m!=b&&(a.h.ab(),a.g.release(),LG(a,b)):(a.m.style.display="",LG(a,b),a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Nb()))))}else a.u.displayInVrMode||a.l||!a.g||(a.m.style.display="none",a.h.ab(),a.g.release(),a.g=null,a.dispatchEvent(new T("vrstatuschanged",(new Map).set("newStatus",a.Nb()))))}function LG(a,b){a.G&&a.m&&(a.g=new vG(a.L,a.K,a.m,a.G,b),MG(a))}
function IG(a){if(!a.m||zc())return null;for(var b=t(["webgl2","webgl"]),c=b.next();!c.done;c=b.next())if(c=a.m.getContext(c.value))return c;return null}
function MG(a){a.h.o(a.i,"mousedown",function(d){if(!a.j){var e=d.clientX;d=d.clientY;a.j=!0;a.B=e;a.C=d}});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchstart",function(d){if(!a.j){var e=d.touches[0].clientX;d=d.touches[0].clientY;a.j=!0;a.B=e;a.C=d}});a.h.o(a.i,"wheel",function(d){if(!a.j){var e=a.g,f=d.deltaY;f/=50;20<=e.j&&100>=e.j&&(e.j+=f);20>e.j?e.j=20:100<e.j&&(e.j=100);xG(e,!1);d.preventDefault();d.stopPropagation()}});a.h.o(a.i,"mousemove",function(d){a.j&&NG(a,d.clientX,d.clientY)});0<navigator.maxTouchPoints&&
a.h.o(a.i,"touchmove",function(d){a.j&&NG(a,d.touches[0].clientX,d.touches[0].clientY);d.preventDefault()});a.h.o(a.i,"mouseleave",function(){a.j=!1});a.h.o(a.i,"mouseup",function(){a.j=!1});0<navigator.maxTouchPoints&&a.h.o(a.i,"touchend",function(){a.j=!1});var b=!1;if(window.DeviceOrientationEvent)if("function"==typeof DeviceMotionEvent.requestPermission){var c=function(){DeviceMotionEvent.requestPermission().then(function(d){"granted"!==d||b||(b=!0,OG(a))})};DeviceMotionEvent.requestPermission().then(function(d){a.h.Ea(a.i,
"click",c);a.h.Ea(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Ea(a.i,"touchend",c);"granted"!==d?(a.h.ra(a.i,"click",c),a.h.ra(a.i,"mouseup",c),0<navigator.maxTouchPoints&&a.h.ra(a.i,"touchend",c)):(b=!0,OG(a))}).catch(function(){a.h.Ea(a.i,"click",c);a.h.Ea(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.Ea(a.i,"touchend",c);a.h.ra(a.i,"click",c);a.h.ra(a.i,"mouseup",c);0<navigator.maxTouchPoints&&a.h.ra(a.i,"touchend",c)})}else b=!0,OG(a)}
function OG(a){a.h.o(window,"deviceorientation",function(b){if(a.g){var c=(b.alpha||0)-a.H,d=(b.beta||0)-a.I,e=(b.gamma||0)-a.J;if(10<Math.abs(c)||10<Math.abs(d)||5<Math.abs(e))d=e=c=0;a.H=b.alpha||0;a.I=b.beta||0;a.J=b.gamma||0;b=screen.orientation.angle;90==b||-90==b?FG(a.g,c*KG*-1,e*KG*-1,0):FG(a.g,c*KG*-1,d*KG,0)}})}function NG(a,b,c){var d=-.6*Math.PI/180;FG(a.g,(b-a.B)*d,-1*(c-a.C)*d,0);a.B=b;a.C=c}var KG=Math.PI/180;function Z(a,b,c,d,e){mb.call(this);var f=this;this.Z=!0;this.g=e;this.G=new Zs(c,a,this.g.castReceiverAppId,this.g.castAndroidReceiverCompatible);this.va=!0;this.u=this.G.Bc();this.m=c;this.B=this.G.yc();this.ba=a;this.l=b;this.Ob=d;this.qa=this.B.Ne();this.s=this.i=null;this.U=!1;this.J=[];this.Sa=[];this.La=!1;this.K=new bc(function(){f.l.classList.add("no-cursor");f.La=!1;PG(f)});this.ea=new bc(function(){f.j.removeAttribute("shown");f.Y&&f.Y.Th();f.N.$(f.g.closeMenusDelay)});this.N=new bc(function(){for(var g=
t(f.J),h=g.next();!h.done;h=g.next())IF(h.value,!1)});this.Fa=new bc(function(){f.Ca()&&QG(f)});this.P=null;this.I=[];this.Aa=RG();this.h=new zd;this.C=null;this.configure(this.g);SG(this);TG(this);this.oa=new Set;UG(this);this.Fa.xa(this.g.refreshTickInSeconds);this.h.o(this.Aa,"locale-changed",function(g){g=g.locales[0];f.qa.setLocale(g);f.l.setAttribute("lang",g)});this.qa.initInterstitial(this.H,this.ba,this.m)}oa(Z,mb);q=Z.prototype;
q.destroy=function(){var a=this;return Q(function(b){switch(b.g){case 1:if(document.pictureInPictureElement!=a.m){b.A(2);break}return H(b,document.exitPictureInPicture(),2);case 2:a.h&&(a.h.release(),a.h=null);a.K&&(a.K.stop(),a.K=null);a.ea&&(a.ea.stop(),a.ea=null);a.N&&(a.N.stop(),a.N=null);a.Fa&&(a.Fa.stop(),a.Fa=null);a.C&&(a.C.release(),a.C=null);VG(a);a.j&&(a.l.removeChild(a.j),a.j=null);if(!a.G){b.A(4);break}return H(b,a.G.destroy(),5);case 5:a.G=null;case 4:a.L&&(a.l.removeChild(a.L),a.L=
null);a.H&&(a.l.removeChild(a.H),a.H=null);if(!a.ba){b.A(6);break}return H(b,a.ba.destroy(),7);case 7:a.ba=null;case 6:a.B=null,a.m=null,a.u=null,a.Aa=null,a.oa.clear(),WG(a),mb.prototype.release.call(a),I(b)}})};function VG(a){for(var b=t(a.I),c=b.next();!c.done;c=b.next())c.value.release();a.I=[]}function XG(a,b){YG.set(a,b)}q.pj=function(a){this.va=a;UG(this)};q.Hk=function(){PG(this)};
q.configure=function(a){var b=this;this.g=a;this.G.Rh(a.castReceiverAppId,a.castAndroidReceiverCompatible);this.s&&(this.s=null);this.Ka&&(this.Ka=null);this.Y&&(this.Y=null);this.C&&this.C.configure(a);this.j?(mk(this.j),VG(this)):(ZG(this),$G(this),this.C=new HG(this.j,this.Ob,this.m,this.B,this.g));this.l.classList.add("shaka-video-container");this.m.classList.add("shaka-video");aH(this);this.g.addBigPlayButton&&bH(this);this.g.customContextMenu&&(this.Y=new NF(this.T,this),this.I.push(this.Y));
this.L||cH(this);this.g.seekOnTaps&&(dH(this),eH(this));this.Ha=W("div");this.Ha.classList.add("shaka-server-side-ad-container");this.j.appendChild(this.Ha);fH(this);this.J=Array.from(this.l.getElementsByClassName("shaka-settings-menu"));this.J.push.apply(this.J,y(Array.from(this.l.getElementsByClassName("shaka-overflow-menu"))));gH(this);this.Sa=Array.from(this.l.getElementsByClassName("shaka-show-controls-on-mouse-over"));PG(this);a=t(this.l.getElementsByClassName("shaka-no-propagation"));for(var c=
a.next();!c.done;c=a.next()){c=c.value;var d=function(e){return e.stopPropagation()};this.h.o(c,"click",d);this.h.o(c,"dblclick",d);0<navigator.maxTouchPoints&&this.h.o(c,"touchend",function(e){b.Ca()&&e.stopPropagation()})}};q.nh=function(a){(this.Z=a)?(this.l.setAttribute("shaka-controls","true"),this.m.tabIndex=-1,this.m.controls=!1):this.l.removeAttribute("shaka-controls");PG(this)};q.Pi=function(a){this.m.controls=a;this.m.tabIndex=a?0:-1;a&&this.nh(!1)};q.getAd=function(){return this.i};
q.Ej=function(){return this.G};q.Uj=function(){return this.Aa};q.qk=function(){return this.l};q.Bc=function(){return this.u};q.Tj=function(){return this.m};q.yc=function(){return this.B};q.Sj=function(){return this.ba};q.Jj=function(){return this.j};q.fk=function(){return this.Ha};q.Fj=function(){return this.H};q.Gj=function(){return this.g};q.Ek=function(){return this.U};q.rh=function(a){(this.U=a)?this.K.stop():this.K.$(3)};q.yk=function(){return this.va};
q.Fg=function(){return this.s?this.s.getValue():this.u.currentTime};q.Ri=function(a){this.P=a};q.Kd=function(){return this.J.some(function(a){return!a.classList.contains("shaka-hidden")})};q.Tc=function(){this.N.Ia()};function hH(a){return!document.fullscreenEnabled||a.m.webkitSupportsFullscreen&&a.g.preferVideoFullScreenInVisionOS&&qc()&&"xr"in navigator?!1:!0}q.Zd=function(){return hH(this)||(!this.i||!this.i.isUsingAnotherMediaElement())&&this.m.webkitSupportsFullscreen?!0:!1};
q.vd=function(){if(hH(this))return!!document.fullscreenElement;var a=this.m;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1};
function iH(a){var b,c,d;return Q(function(e){switch(e.g){case 1:va(e,2);if(!hH(a)){b=a.m;b.webkitSupportsFullscreen&&b.webkitEnterFullscreen();e.A(4);break}if(!document.pictureInPictureElement){e.A(5);break}return H(e,document.exitPictureInPicture(),5);case 5:return c=a.g.fullScreenElement,H(e,c.requestFullscreen({navigationUI:"hide"}),7);case 7:if(!a.g.forceLandscapeOnFullscreen||!screen.orientation){e.A(4);break}va(e,9);return H(e,screen.orientation.lock("landscape"),11);case 11:xa(e,4,2);break;
case 9:za(e,2);case 4:xa(e,0);break;case 2:d=za(e),a.dispatchEvent(new T("error",(new Map).set("detail",d))),I(e)}})}function jH(a){var b;return Q(function(c){if(!hH(a))return b=a.m,b.webkitSupportsFullscreen&&b.webkitExitFullscreen(),c.A(0);screen.orientation&&screen.orientation.unlock();return H(c,document.exitFullscreen(),0)})}q.Ef=function(){var a=this;return Q(function(b){return a.vd()?H(b,jH(a),0):H(b,iH(a),0)})};
q.We=function(){return this.G.Va()?!1:"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture||document.pictureInPictureEnabled?!this.m.disablePictureInPicture:!1};q.Xe=function(){return"documentPictureInPicture"in window&&this.g.preferDocumentPictureInPicture?!!window.documentPictureInPicture.window:!!document.pictureInPictureElement};
q.Hd=function(){var a=this,b,c;return Q(function(d){if(1==d.g)return va(d,2),"documentPictureInPicture"in window&&a.g.preferDocumentPictureInPicture?H(d,kH(a),5):document.pictureInPictureElement?H(d,document.exitPictureInPicture(),5):(document.fullscreenElement&&document.exitFullscreen(),b=a.m,H(d,b.requestPictureInPicture(),5));if(2!=d.g)return xa(d,0);c=za(d);a.dispatchEvent(new T("error",(new Map).set("detail",c)));I(d)})};
function kH(a){var b,c,d,e,f,g;return Q(function(h){if(1==h.g){if(window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),h.return();b=a.l;c=b.getBoundingClientRect();return H(h,window.documentPictureInPicture.requestWindow({width:c.width,height:c.height}),2)}d=h.h;lH(d);e=b.parentNode||document.body;f=a.l.cloneNode(!0);f.style.visibility="hidden";f.style.height=getComputedStyle(b).height;e.appendChild(f);g=document.createElement("style");g.append("[data-shaka-player-container] {\n      width: 100% !important; max-height: 100%}");
d.document.head.append(g);d.document.body.append(b);a.h.ra(d,"pagehide",function(){f.replaceWith(b)});I(h)})}
function lH(a){var b=[].concat(y(document.styleSheets)).map(function(d){try{return[].concat(y(d.cssRules)).map(function(f){return f.cssText}).join("")}catch(f){var e=document.createElement("link");e.rel="stylesheet";e.type=d.type;e.media=d.media;e.href=d.href;a.document.head.appendChild(e)}return""}).filter(Boolean).join("\n"),c=document.createElement("style");c.textContent=b;a.document.head.appendChild(c)}
q.Vi=function(){IF(this.M,!0);IF(this.H,!0);this.i.hasCustomClick()?this.j.setAttribute("ad-active","true"):this.j.removeAttribute("ad-active")};q.ji=function(){IF(this.M,!1);IF(this.H,!1);this.j.removeAttribute("ad-active")};function SF(a){if(a.Z){if(a.i&&(a.i&&a.i.isPaused()?a.i.play():a.i&&a.i.pause(),a.i.isLinear()))return;a.u.duration&&(a.u.paused&&!a.U?(a.B.isEnded()&&(a.u.currentTime=a.B.ya().start),a.u.play()):a.u.pause())}}
function ZG(a){a.j=W("div");a.j.classList.add("shaka-controls-container");a.l.appendChild(a.j);a.l.setAttribute("shaka-controls","true");a.h.o(a.j,"touchend",function(b){a.u.duration&&(a.Ca()?a.P=Date.now():(mH(a,b),b.cancelable&&b.preventDefault()))});a.h.o(a.j,"click",function(){VF(a)});a.h.o(a.j,"dblclick",function(){a.g.doubleClickForFullscreen&&a.Zd()&&a.Ef()})}function bH(a){var b=W("div");b.classList.add("shaka-play-button-container");a.j.appendChild(b);a.Ka=new TF(b,a);a.I.push(a.Ka)}
function aH(a){var b=W("div");b.classList.add("shaka-scrim-container");a.j.appendChild(b)}function nH(a){a.M=W("div");a.M.classList.add("shaka-ad-controls");var b=null!=a.i&&a.i.isLinear();IF(a.M,b);a.R.appendChild(a.M);b=new LF(a.M,a);a.I.push(b);b=new KF(a.M,a);a.I.push(b);b=new jG(a.M,a);a.I.push(b)}
function cH(a){a.L=W("div");a.L.classList.add("shaka-spinner-container");a.l.appendChild(a.L);var b=W("div");b.classList.add("shaka-spinner");a.L.appendChild(b);a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("shaka-spinner-svg");a.setAttribute("viewBox","0 0 30 30");b.appendChild(a);b=document.createElementNS("http://www.w3.org/2000/svg","circle");b.classList.add("shaka-spinner-path");b.setAttribute("cx","15");b.setAttribute("cy","15");b.setAttribute("r","14.5");b.setAttribute("fill",
"none");b.setAttribute("stroke-width","1");b.setAttribute("stroke-miterlimit","10");a.appendChild(b)}function dH(a){var b=W("div");b.classList.add("shaka-hidden-fast-forward-container");a.j.appendChild(b);a.Ya=new WF(b,a);a.I.push(a.Ya)}function eH(a){var b=W("div");b.classList.add("shaka-hidden-rewind-container");a.j.appendChild(b);a.Za=new XF(b,a);a.I.push(a.Za)}
function fH(a){a.R=W("div");a.R.classList.add("shaka-bottom-controls");a.R.classList.add("shaka-no-propagation");a.j.appendChild(a.R);a.h.o(a.R,"click",function(d){d.target.closest(".shaka-overflow-button")||a.Tc()});nH(a);a.T=W("div");a.T.classList.add("shaka-controls-button-panel");a.T.classList.add("shaka-show-controls-on-mouse-over");a.g.enableTooltips&&a.T.classList.add("shaka-tooltips-on");a.R.appendChild(a.T);for(var b=t(a.g.controlPanelElements),c=b.next();!c.done;c=b.next())c=c.value,YG.get(c)?
(c=YG.get(c).create(a.T,a),a.I.push(c)):db("Unrecognized control panel element requested:",c)}function gH(a){if(a.g.addSeekBar)a.s=oH.create(a.R,a),a.I.push(a.s);else{a=t(a.J);for(var b=a.next();!b.done;b=a.next())b.value.classList.add("shaka-low-position")}}function $G(a){a.H=W("div");a.H.classList.add("shaka-client-side-ad-container");IF(a.H,!1);a.h.o(a.H,"click",function(){VF(a)});a.l.appendChild(a.H)}
function SG(a){a.h.o(a.B,"buffering",function(){pH(a)});pH(a);a.h.o(window,"keydown",function(b){qH(a,b)});a.h.o(window,"click",function(){return a.Tc()});a.h.o(a,"submenuopen",function(){a.Tc()});a.h.o(a.u,"play",function(){PG(a)});a.h.o(a.u,"pause",function(){PG(a)});a.h.o(a.l,"mousemove",function(b){mH(a,b)});a.h.o(a.l,"touchmove",function(b){mH(a,b)},{passive:!0});a.h.o(a.l,"touchend",function(b){mH(a,b)},{passive:!0});a.h.o(a.l,"mouseleave",function(){a.P||a.K.Ia()});a.h.o(a.l,"wheel",function(b){mH(a,
b)},{passive:!0});a.h.o(a.G,"caststatuschanged",function(){UG(a)});a.h.o(a.C,"vrstatuschanged",function(){a.dispatchEvent(new T("vrstatuschanged"))});a.h.o(a.l,"keydown",function(b){var c=document.activeElement,d=c&&c.classList?c.classList.contains("shaka-volume-bar"):!1,e=c&&c.classList&&c.classList.contains("shaka-seek-bar");a.j.contains(c)&&mH(a,b);if(a.g.enableKeyboardPlaybackControls){c=a.g.keyboardSeekDistance;var f=a.g.keyboardLargeSeekDistance;switch(b.key){case "ArrowLeft":a.s&&e&&!d&&0<
c&&(b.preventDefault(),rH(a,a.s.getValue()-c));break;case "ArrowRight":a.s&&e&&!d&&0<c&&(b.preventDefault(),rH(a,a.s.getValue()+c));break;case "PageDown":a.s&&e&&0<c&&(b.preventDefault(),rH(a,a.s.getValue()-f));break;case "PageUp":a.s&&e&&0<c&&(b.preventDefault(),rH(a,a.s.getValue()+f));break;case "Home":a.s&&rH(a,a.B.ya().start);break;case "End":a.s&&rH(a,a.B.ya().end);break;case "f":a.Zd()&&a.Ef();break;case "m":a.i&&a.i.isLinear()?a.i.setMuted(!a.i.isMuted()):a.m.muted=!a.m.muted;break;case "p":a.We()&&
a.Hd();break;case " ":e&&SF(a)}}});a.h.o(a.l,"keyup",function(b){a.oa.delete(b.key)});a.h.o(a.qa,"ad-started",function(b){a.i=b.ad;a.Vi();pH(a)});a.h.o(a.qa,"ad-stopped",function(){a.i=null;a.ji();pH(a)});screen.orientation&&a.h.o(screen.orientation,"change",function(){return Q(function(b){return H(b,sH(a),0)})})}
function TG(a){if(a.g.setupMediaSession&&navigator.mediaSession){var b=function(f,g){try{navigator.mediaSession.setActionHandler(f,function(h){g(h)})}catch(h){}},c=function(){if(a.i&&a.i.isLinear())d();else{var f=a.B.ya(),g=f.end-f.start;f=parseFloat((a.u.currentTime-f.start).toFixed(2));a.B.V()&&1>Math.abs(g-f)&&(g=Infinity);try{navigator.mediaSession.setPositionState({duration:Math.max(0,g),playbackRate:a.u.playbackRate,position:Math.max(0,f)})}catch(h){}}},d=function(){try{navigator.mediaSession.setPositionState()}catch(f){}},
e=function(f){var g=a.g.keyboardSeekDistance;switch(f.action){case "pause":SF(a);break;case "play":SF(a);break;case "seekbackward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.i&&a.i.isLinear()||rH(a,a.s.getValue()-(f.seekOffset||g));break;case "seekforward":if(f.seekOffset&&!isFinite(f.seekOffset))break;a.i&&a.i.isLinear()||rH(a,a.s.getValue()+(f.seekOffset||g));break;case "seekto":if(f.seekTime&&!isFinite(f.seekTime))break;a.i&&a.i.isLinear()||rH(a,a.B.ya().start+f.seekTime);break;case "stop":a.B.vc();
break;case "enterpictureinpicture":a.i&&a.i.isLinear()||a.Hd()}};b("pause",e);b("play",e);b("seekbackward",e);b("seekforward",e);b("seekto",e);b("stop",e);("documentPictureInPicture"in window||document.pictureInPictureEnabled)&&b("enterpictureinpicture",e);b=function(){a.B.V()||0!=a.B.ya().start?(c(),a.h.o(a.u,"timeupdate",c)):d()};a.B.Z&&b();a.h.o(a.B,"loaded",b);a.h.o(a.B,"unloading",function(){a.h.Ea(a.u,"timeupdate",c)});a.h.o(a.B,"metadata",function(f){if(f=f.payload){var g;"TIT2"==f.key&&f.data&&
(g=f.data);var h;"APIC"==f.key&&"--\x3e"==f.mimeType&&(h=f.data);g&&(f={title:g,artwork:[]},navigator.mediaSession.metadata&&(f=navigator.mediaSession.metadata,f.title=g),navigator.mediaSession.metadata=new MediaMetadata(f));h&&(g=a.m,h!=g.poster&&(g.poster=h),g={title:"",artwork:[{src:h}]},navigator.mediaSession.metadata&&(g=navigator.mediaSession.metadata,g.artwork=[{src:h}]),navigator.mediaSession.metadata=new MediaMetadata(g))}})}}
function WG(a){if(a.g.setupMediaSession&&navigator.mediaSession){try{navigator.mediaSession.setPositionState()}catch(b){}a=function(b){try{navigator.mediaSession.setActionHandler(b,null)}catch(c){}};a("pause");a("play");a("seekbackward");a("seekforward");a("seekto");a("stop");a("enterpictureinpicture")}}
function sH(a){return Q(function(b){return a.u&&0!=a.u.readyState&&!a.G.Va()&&a.g.enableFullscreenOnRotation&&a.Zd()?screen.orientation.type.includes("landscape")&&!a.vd()?H(b,iH(a),0):screen.orientation.type.includes("portrait")&&a.vd()?H(b,jH(a),0):b.A(0):b.return()})}
function mH(a,b){"mousemove"==b.type&&(a.j.classList.remove("shaka-keyboard-navigation"),PG(a));"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?a.P=Date.now():a.P+1E3<Date.now()&&(a.P=null);a.P&&"mousemove"==b.type||(a.l.classList.remove("no-cursor"),a.La=!0,a.N.stop(),a.Ca()||(QG(a),PG(a)),a.K.stop(),"touchend"!=b.type&&"wheel"!=b.type&&"keyup"!=b.type&&a.P||a.K.$(3))}
function tH(a){return window.matchMedia("hover: hover").matches?a.Sa.some(function(b){return b.matches(":hover")}):!1}function PG(a){var b=a.i?a.i.isPaused():!1,c=a.u.paused&&!a.U,d=a.j.classList.contains("shaka-keyboard-navigation");b||(!a.i||!a.i.isLinear())&&c||a.La||d||tH(a)?(QG(a),a.j.setAttribute("shown","true"),a.ea.stop()):a.ea.$(a.g.fadeDelay)}function VF(a){a.Z&&!a.Nb()&&(a.Kd()?a.N.Ia():a.g.singleClickForPlayAndPause&&SF(a))}
function UG(a){var b=a.G.Va();a.dispatchEvent(new T("caststatuschanged",(new Map).set("newStatus",b)));b?a.j.setAttribute("casting","true"):a.j.removeAttribute("casting")}function pH(a){a.Z&&(a.i&&a.i.isClientRendering()&&a.i.isLinear()?IF(a.L,!1):IF(a.L,a.B.Ve()))}q.Ca=function(){return this.Z?null!=this.j.getAttribute("shown")||null!=this.j.getAttribute("casting"):!1};function rH(a,b){a.u.currentTime=b;QG(a)}
function QG(a){if(a.s)if(a.s.setValue(a.u.currentTime),a.s.update(),a.s.isShowing())for(var b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.remove("shaka-low-position");else for(b=t(a.J),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position");a.dispatchEvent(new T("timeandseekrangeupdated"))}
function qH(a,b){a.oa.add(b.key);var c=a.Kd();"Tab"==b.key&&(a.j.classList.add("shaka-keyboard-navigation"),PG(a),a.h.o(window,"mousedown",function(){a.h.Ea(window,"mousedown")}));"Escape"==b.key&&a.N.Ia();c&&a.oa.has("Tab")&&uH(a,b)}
function uH(a,b){var c=a.J.filter(function(f){return!f.classList.contains("shaka-hidden")});if(c.length){var d=c[0];if(d.childNodes.length){for(c=d.firstElementChild;c&&c.classList.contains("shaka-hidden");)c=c.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var e=document.activeElement;a.oa.has("Shift")?e==c&&(b.preventDefault(),d.focus()):e==d&&(b.preventDefault(),c.focus())}}}
q.zl=function(){var a=new Event("mousemove",{bubbles:!1,cancelable:!1});mH(this,a)};q.xk=function(){this.K.Ia()};q.cg=function(){return this.C.cg()};q.Nb=function(){return this.C.Nb()};
q.nk=function(){var a=this.C;if(a.g){a=a.g;qG(a.h,a.G);var b=a.h;a=b[0];var c=b[1],d=b[2];b=b[3];var e=d*d,f=b*b;var g=a*a+c*c+e+f;var h=a*b-c*d;h>.499995*g?(g=Math.PI/2,a=2*Math.atan2(c,a)):h<-.499995*g?(g=-Math.PI/2,a=2*Math.atan2(c,a)):(g=Math.asin(2*(a*d-b*c)),a=Math.atan2(2*(a*b+c*d),1-2*(e+f)));a=180*Math.acos(Math.cos(a)*Math.cos(g))/Math.PI}else db("Not playing VR content"),a=null;return a};q.lk=function(){var a=this.C;a.g?a=a.g.j:(db("Not playing VR content"),a=null);return a};
q.yl=function(a){var b=this.C;b.g?(0>a?(db("Field of view should be greater than 0"),a=0):100<a&&(db("Field of view should be less than 100"),a=100),b=b.g,b.j=a,xG(b,!1)):db("Not playing VR content")};q.Id=function(){this.C.Id()};q.Ng=function(a){this.C.Ng(a)};q.Lg=function(a){this.C.Lg(a)};q.Mg=function(a){this.C.Mg(a)};
function RG(){var a=new rd("en");a.Ua("ar",new Map([["AD_DURATION","\u0645\u062f\u0629 \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["AD_PROGRESS","\u0627\u0644\u0625\u0639\u0644\u0627\u0646 [AD_ON] \u0645\u0646 [NUM_ADS]"],["AD_STATISTICS","\u0625\u062d\u0635\u0627\u0621\u0627\u062a \u0627\u0644\u0625\u0639\u0644\u0627\u0646\u0627\u062a"],["AD_TIME","\u0627\u0644\u0625\u0639\u0644\u0627\u0646: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u062a\u0644\u0642\u0627\u0626\u064a"],["BACK","\u0631\u062c\u0648\u0639"],
["CAPTIONS","\u0627\u0644\u062a\u0631\u062c\u0645\u0629 \u0648\u0627\u0644\u0634\u0631\u062d"],["CAST","\u0625\u0631\u0633\u0627\u0644..."],["CHAPTERS","\u0627\u0644\u0641\u0635\u0648\u0644"],["DOWNLOAD_VIDEO_FRAME","\u062d\u0641\u0638 \u0625\u0637\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648"],["ENTER_LOOP_MODE","\u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["ENTER_PICTURE_IN_PICTURE",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],
["EXIT_FULL_SCREEN","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["EXIT_LOOP_MODE","\u0625\u064a\u0642\u0627\u0641 \u062a\u0643\u0631\u0627\u0631 \u0627\u0644\u0641\u064a\u062f\u064a\u0648 \u0627\u0644\u062d\u0627\u0644\u064a"],["EXIT_PICTURE_IN_PICTURE",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["FAST_FORWARD","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],
["FULL_SCREEN","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["LANGUAGE","\u0627\u0644\u0644\u063a\u0629"],["LIVE","\u0645\u0628\u0627\u0634\u0631"],["LOOP","\u062a\u0643\u0631\u0627\u0631"],["MORE_SETTINGS","\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0625\u0639\u062f\u0627\u062f\u0627\u062a"],["MULTIPLE_LANGUAGES","\u0644\u063a\u0627\u062a \u0645\u062a\u0639\u062f\u062f\u0629"],["MUTE","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["NOT_APPLICABLE","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],
["OFF","\u0625\u064a\u0642\u0627\u0641"],["ON","\u062a\u0634\u063a\u064a\u0644"],["PAUSE","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"],["PICTURE_IN_PICTURE","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],["PLAY","\u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["PLAYBACK_RATE","\u0633\u0631\u0639\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["QUALITY","\u0627\u0644\u062c\u0648\u062f\u0629"],["RECENTER_VR","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0648\u0633\u064a\u0637"],
["REPLAY","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644"],["RESOLUTION","\u062f\u0631\u062c\u0629 \u0627\u0644\u062f\u0642\u0629"],["REWIND","\u062a\u0631\u062c\u064a\u0639"],["SEEK","\u0627\u0644\u0628\u062d\u062b \u0628\u0627\u0644\u062a\u0645\u0631\u064a\u0631"],["SKIP_AD","\u062a\u062e\u0637\u0651\u064a \u0627\u0644\u0625\u0639\u0644\u0627\u0646"],["SKIP_TO_LIVE","\u0627\u0644\u0627\u0646\u062a\u0642\u0627\u0644 \u0625\u0644\u0649 \u0628\u062b \u0645\u0628\u0627\u0634\u0631"],
["STATISTICS","\u0627\u0644\u0625\u062d\u0635\u0627\u0621\u0627\u062a"],["SUBTITLE_FORCED","\u0639\u0631\u0636 \u0625\u062c\u0628\u0627\u0631\u064a"],["SURROUND","\u0635\u0648\u062a \u0645\u062d\u064a\u0637\u064a"],["TOGGLE_STEREOSCOPIC","\u0625\u064a\u0642\u0627\u0641 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0645\u062c\u0633\u0651\u0645 \u0623\u0648 \u062a\u0641\u0639\u064a\u0644\u0647"],["UNDETERMINED_LANGUAGE","\u063a\u064a\u0631 \u0645\u062d\u062f\u062f"],["UNMUTE","\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0635\u0648\u062a"],
["UNRECOGNIZED_LANGUAGE","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641"],["VOLUME","\u0645\u0633\u062a\u0648\u0649 \u0627\u0644\u0635\u0648\u062a"]]));a.Ua("de",new Map([["AD_DURATION","Dauer der Werbeanzeige"],["AD_PROGRESS","Werbung\u00a0[AD_ON] von\u00a0[NUM_ADS]"],["AD_STATISTICS","Anzeigenstatistiken"],["AD_TIME","Werbeanzeige: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Zur\u00fcck"],["CAPTIONS","Untertitel"],["CAST","Streamen..."],["CHAPTERS","Kapitel"],["DOWNLOAD_VIDEO_FRAME",
"Videoframe speichern"],["ENTER_LOOP_MODE","In Endlosschleife spielen"],["ENTER_PICTURE_IN_PICTURE","Bild im Bild aktivieren"],["EXIT_FULL_SCREEN","Vollbildmodus beenden"],["EXIT_LOOP_MODE","Endlosschleife stoppen"],["EXIT_PICTURE_IN_PICTURE","Bild im Bild beenden"],["FAST_FORWARD","Vorspulen"],["FULL_SCREEN","Vollbildmodus"],["LANGUAGE","Sprache"],["LIVE","Live"],["LOOP","Schleife"],["MORE_SETTINGS","Weitere Einstellungen"],["MULTIPLE_LANGUAGES","Mehrere Sprachen"],["MUTE","Stummschalten"],["NOT_APPLICABLE",
"Nicht zutreffend"],["OFF","Aus"],["ON","Ein"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Bild im Bild"],["PLAY","Wiedergabe"],["PLAYBACK_RATE","Geschwindigkeit"],["QUALITY","Qualit\u00e4t"],["RECENTER_VR","Zentrieren"],["REPLAY","Noch einmal wiedergeben"],["RESOLUTION","Aufl\u00f6sung"],["REWIND","Zur\u00fcckspulen"],["SEEK","Suche"],["SKIP_AD","\u00dcberspringen"],["SKIP_TO_LIVE","Zum Live-Videostream wechseln"],["STATISTICS","Statistiken"],["SUBTITLE_FORCED","Erzwungen"],["SURROUND","Surround"],
["TOGGLE_STEREOSCOPIC","Einstellung \u201estereoskopisch\u201c ein\u2011/ausschalten"],["UNDETERMINED_LANGUAGE","Unbestimmt"],["UNMUTE","Stummschaltung aufheben"],["UNRECOGNIZED_LANGUAGE","Unbekannt"],["VOLUME","Lautst\u00e4rke"]]));a.Ua("en",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS",
"Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE","Enter Picture-in-Picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit Picture-in-Picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE",
"Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recenter"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip Ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],
["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognized"],["VOLUME","Volume"]]));a.Ua("en-GB",new Map([["AD_DURATION","Ad duration"],["AD_PROGRESS","Ad [AD_ON] of [NUM_ADS]"],["AD_STATISTICS","Ad statistics"],["AD_TIME","Ad: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Auto"],["BACK","Back"],["CAPTIONS","Captions"],["CAST","Cast..."],["CHAPTERS","Chapters"],["DOWNLOAD_VIDEO_FRAME","Save video frame"],["ENTER_LOOP_MODE","Loop the current video"],["ENTER_PICTURE_IN_PICTURE",
"Enter picture-in-picture"],["EXIT_FULL_SCREEN","Exit full screen"],["EXIT_LOOP_MODE","Stop looping the current video"],["EXIT_PICTURE_IN_PICTURE","Exit picture-in-picture"],["FAST_FORWARD","Fast-forward"],["FULL_SCREEN","Full screen"],["LANGUAGE","Language"],["LIVE","Live"],["LOOP","Loop"],["MORE_SETTINGS","More settings"],["MULTIPLE_LANGUAGES","Multiple languages"],["MUTE","Mute"],["NOT_APPLICABLE","Not applicable"],["OFF","Off"],["ON","On"],["PAUSE","Pause"],["PICTURE_IN_PICTURE","Picture-in-picture"],
["PLAY","Play"],["PLAYBACK_RATE","Playback speed"],["QUALITY","Quality"],["RECENTER_VR","Recentre"],["REPLAY","Replay"],["RESOLUTION","Resolution"],["REWIND","Rewind"],["SEEK","Seek"],["SKIP_AD","Skip ad"],["SKIP_TO_LIVE","Skip ahead to live"],["STATISTICS","Statistics"],["SUBTITLE_FORCED","Forced"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Toggle stereoscopic"],["UNDETERMINED_LANGUAGE","Undetermined"],["UNMUTE","Unmute"],["UNRECOGNIZED_LANGUAGE","Unrecognised"],["VOLUME","volume"]]));a.Ua("es",
new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas del anuncio"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Enviar..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Reproducir en bucle el v\u00eddeo actual"],["ENTER_PICTURE_IN_PICTURE","Activar el modo imagen en imagen"],
["EXIT_FULL_SCREEN","Salir del modo de pantalla completa"],["EXIT_LOOP_MODE","Dejar de reproducir en bucle el v\u00eddeo actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo imagen en imagen"],["FAST_FORWARD","Avanzar r\u00e1pidamente"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],["LOOP","Reproducir en bucle"],["MORE_SETTINGS","M\u00e1s ajustes"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],
["ON","Activado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Imagen en imagen"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND","Rebobinar"],["SEEK","Buscar"],["SKIP_AD","Saltar anuncio"],["SKIP_TO_LIVE","Ir al v\u00eddeo en directo"],["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Envolvente"],["TOGGLE_STEREOSCOPIC",
"Activar/Desactivar estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Activar sonido"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]]));a.Ua("es-419",new Map([["AD_DURATION","Duraci\u00f3n del anuncio"],["AD_PROGRESS","Anuncio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estad\u00edsticas de anuncios"],["AD_TIME","Anuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tico"],["BACK","Atr\u00e1s"],["CAPTIONS","Subt\u00edtulos"],["CAST","Transmitir..."],
["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Guardar fotograma"],["ENTER_LOOP_MODE","Repetir indefinidamente el video actual"],["ENTER_PICTURE_IN_PICTURE","Ingresar al modo de pantalla en pantalla"],["EXIT_FULL_SCREEN","Salir de pantalla completa"],["EXIT_LOOP_MODE","Detener la repetici\u00f3n indefinida del video actual"],["EXIT_PICTURE_IN_PICTURE","Salir del modo de pantalla en pantalla"],["FAST_FORWARD","Avanzar"],["FULL_SCREEN","Pantalla completa"],["LANGUAGE","Idioma"],["LIVE","En directo"],
["LOOP","Repetir indefinidamente"],["MORE_SETTINGS","M\u00e1s opciones de configuraci\u00f3n"],["MULTIPLE_LANGUAGES","Varios idiomas"],["MUTE","Silenciar"],["NOT_APPLICABLE","No aplicable"],["OFF","Desactivado"],["ON","Activado"],["PAUSE","Detener"],["PICTURE_IN_PICTURE","Pantalla en pantalla"],["PLAY","Reproducir"],["PLAYBACK_RATE","Velocidad de reproducci\u00f3n"],["QUALITY","Calidad"],["RECENTER_VR","Volver a centrar"],["REPLAY","Volver a reproducir"],["RESOLUTION","Resoluci\u00f3n"],["REWIND",
"Retroceder"],["SEEK","Buscar"],["SKIP_AD","Omitir anuncio"],["SKIP_TO_LIVE","Adelantar hasta la transmisi\u00f3n en vivo"],["STATISTICS","Estad\u00edsticas"],["SUBTITLE_FORCED","Forzado"],["SURROUND","Sonido envolvente"],["TOGGLE_STEREOSCOPIC","Activar o desactivar el modo estereosc\u00f3pico"],["UNDETERMINED_LANGUAGE","Sin especificar"],["UNMUTE","Dejar de silenciar"],["UNRECOGNIZED_LANGUAGE","No reconocida"],["VOLUME","Volumen"]]));a.Ua("fr",new Map([["AD_DURATION","Dur\u00e9e de l'annonce"],["AD_PROGRESS",
"Annonce\u00a0[AD_ON] sur\u00a0[NUM_ADS]"],["AD_STATISTICS","Statistiques sur les annonces"],["AD_TIME","Annonce\u00a0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatique"],["BACK","Retour"],["CAPTIONS","Sous-titres"],["CAST","Caster\u2026"],["CHAPTERS","Chapitres"],["DOWNLOAD_VIDEO_FRAME","T\u00e9l\u00e9charger l'image de la vid\u00e9o"],["ENTER_LOOP_MODE","Lire en boucle la vid\u00e9o en cours"],["ENTER_PICTURE_IN_PICTURE","Utiliser le mode Picture-in-Picture"],["EXIT_FULL_SCREEN","Quitter le mode plein \u00e9cran"],
["EXIT_LOOP_MODE","Arr\u00eater la lecture en boucle de la vid\u00e9o en cours"],["EXIT_PICTURE_IN_PICTURE","Quitter le mode\u00a0PIP (Picture-in-picture)"],["FAST_FORWARD","Avance rapide"],["FULL_SCREEN","Plein \u00e9cran"],["LANGUAGE","Langue"],["LIVE","En direct"],["LOOP","R\u00e9p\u00e9ter"],["MORE_SETTINGS","Plus de param\u00e8tres"],["MULTIPLE_LANGUAGES","Plusieurs langues"],["MUTE","Couper le son"],["NOT_APPLICABLE","Non applicable"],["OFF","D\u00e9sactiv\u00e9e"],["ON","Activ\u00e9e"],["PAUSE",
"Pause"],["PICTURE_IN_PICTURE","Picture-in-Picture"],["PLAY","Visionner"],["PLAYBACK_RATE","Vitesse de lecture"],["QUALITY","Qualit\u00e9"],["RECENTER_VR","Recentrer"],["REPLAY","Revoir"],["RESOLUTION","R\u00e9solution"],["REWIND","Retour arri\u00e8re"],["SEEK","Chercher"],["SKIP_AD","Passer l'annonce"],["SKIP_TO_LIVE","Acc\u00e9der \u00e0 la partie la plus r\u00e9cente du direct"],["STATISTICS","Statistiques"],["SUBTITLE_FORCED","Forc\u00e9"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Activer/D\u00e9sactiver le mode st\u00e9r\u00e9oscopique"],
["UNDETERMINED_LANGUAGE","Langue ind\u00e9termin\u00e9e"],["UNMUTE","R\u00e9activer le son"],["UNRECOGNIZED_LANGUAGE","Non reconnu"],["VOLUME","Volume"]]));a.Ua("it",new Map([["AD_DURATION","Durata dell'annuncio"],["AD_PROGRESS","Annuncio [AD_ON] di [NUM_ADS]"],["AD_STATISTICS","Statistiche sugli annunci"],["AD_TIME","Annuncio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatica"],["BACK","Indietro"],["CAPTIONS","Sottotitoli"],["CAST","Trasmetti..."],["CHAPTERS","Capitoli"],["DOWNLOAD_VIDEO_FRAME",
"Salva fotogramma"],["ENTER_LOOP_MODE","Riproduci in loop il video corrente"],["ENTER_PICTURE_IN_PICTURE","Attiva Picture in picture"],["EXIT_FULL_SCREEN","Esci da schermo intero"],["EXIT_LOOP_MODE","Interrompi riproduzione in loop del video corrente"],["EXIT_PICTURE_IN_PICTURE","Esci da Picture in picture"],["FAST_FORWARD","Avanti veloce"],["FULL_SCREEN","Schermo intero"],["LANGUAGE","Lingua"],["LIVE","Dal vivo"],["LOOP","Riproduci in loop"],["MORE_SETTINGS","Altre impostazioni"],["MULTIPLE_LANGUAGES",
"Pi\u00f9 lingue"],["MUTE","Disattiva audio"],["NOT_APPLICABLE","Non applicabile"],["OFF","Disattivo"],["ON","Attivo"],["PAUSE","Metti in pausa"],["PICTURE_IN_PICTURE","Picture in picture"],["PLAY","Riproduci"],["PLAYBACK_RATE","Velocit\u00e0 di riproduzione"],["QUALITY","Qualit\u00e0"],["RECENTER_VR","Ricentra"],["REPLAY","Riproduci di nuovo"],["RESOLUTION","Risoluzione"],["REWIND","Riavvolgi"],["SEEK","Cerca"],["SKIP_AD","Salta annuncio"],["SKIP_TO_LIVE","Passa alla trasmissione dal vivo"],["STATISTICS",
"Statistiche"],["SUBTITLE_FORCED","Forzata"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Pulsante di attivazione/disattivazione stereoscopico"],["UNDETERMINED_LANGUAGE","Indeterminata"],["UNMUTE","Riattiva audio"],["UNRECOGNIZED_LANGUAGE","Non riconosciuto"],["VOLUME","Volume"]]));a.Ua("ja",new Map([["AD_DURATION","\u5e83\u544a\u518d\u751f\u6642\u9593"],["AD_PROGRESS","[AD_ON] \u756a\u76ee\u306e\u5e83\u544a\uff08\u5168 [NUM_ADS] \u500b\uff09"],["AD_STATISTICS","\u5e83\u544a\u306e\u7d71\u8a08\u60c5\u5831"],
["AD_TIME","\u5e83\u544a: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u623b\u308b"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u30ad\u30e3\u30b9\u30c8..."],["CHAPTERS","\u7ae0"],["DOWNLOAD_VIDEO_FRAME","\u52d5\u753b\u30d5\u30ec\u30fc\u30e0\u3092\u4fdd\u5b58"],["ENTER_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u3092\u30eb\u30fc\u30d7\u518d\u751f"],["ENTER_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u958b\u59cb"],["EXIT_FULL_SCREEN",
"\u5168\u753b\u9762\u8868\u793a\u3092\u7d42\u4e86"],["EXIT_LOOP_MODE","\u73fe\u5728\u306e\u52d5\u753b\u306e\u30eb\u30fc\u30d7\u518d\u751f\u3092\u505c\u6b62"],["EXIT_PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u7d42\u4e86"],["FAST_FORWARD","\u65e9\u9001\u308a"],["FULL_SCREEN","\u5168\u753b\u9762\u8868\u793a"],["LANGUAGE","\u8a00\u8a9e"],["LIVE","\u30e9\u30a4\u30d6"],["LOOP","\u30eb\u30fc\u30d7"],["MORE_SETTINGS","\u8a73\u7d30\u8a2d\u5b9a"],
["MULTIPLE_LANGUAGES","\u591a\u8a00\u8a9e"],["MUTE","\u30df\u30e5\u30fc\u30c8"],["NOT_APPLICABLE","\u8a72\u5f53\u306a\u3057"],["OFF","\u30aa\u30d5"],["ON","\u30aa\u30f3"],["PAUSE","\u4e00\u6642\u505c\u6b62"],["PICTURE_IN_PICTURE","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc"],["PLAY","\u518d\u751f"],["PLAYBACK_RATE","\u518d\u751f\u901f\u5ea6"],["QUALITY","\u54c1\u8cea"],["RECENTER_VR","\u4e2d\u5fc3\u3092\u518d\u8a2d\u5b9a"],["REPLAY","\u3082\u3046\u4e00\u5ea6\u518d\u751f"],
["RESOLUTION","\u89e3\u50cf\u5ea6"],["REWIND","\u5dfb\u304d\u623b\u3057"],["SEEK","\u30b7\u30fc\u30af\u518d\u751f"],["SKIP_AD","\u5e83\u544a\u3092\u30b9\u30ad\u30c3\u30d7"],["SKIP_TO_LIVE","\u30e9\u30a4\u30d6\u914d\u4fe1\u307e\u3067\u30b9\u30ad\u30c3\u30d7"],["STATISTICS","\u7d71\u8a08\u60c5\u5831"],["SUBTITLE_FORCED","\u5f37\u5236"],["SURROUND","\u30b5\u30e9\u30a6\u30f3\u30c9"],["TOGGLE_STEREOSCOPIC","\u7acb\u4f53\u753b\u50cf\u3092\u5207\u308a\u66ff\u3048\u308b"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],
["UNMUTE","\u30df\u30e5\u30fc\u30c8\u3092\u89e3\u9664"],["UNRECOGNIZED_LANGUAGE","\u4e0d\u660e"],["VOLUME","\u97f3\u91cf"]]));a.Ua("ko",new Map([["AD_DURATION","\uad11\uace0 \uae30\uac04"],["AD_PROGRESS","\uad11\uace0 [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\uad11\uace0 \ud1b5\uacc4"],["AD_TIME","\uad11\uace0: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\uc790\ub3d9"],["BACK","\ub4a4\ub85c"],["CAPTIONS","\uc790\ub9c9"],["CAST","\uc804\uc1a1..."],["CHAPTERS","\uc7a5"],["DOWNLOAD_VIDEO_FRAME",
"\ub3d9\uc601\uc0c1 \ud504\ub808\uc784 \uc800\uc7a5"],["ENTER_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd"],["ENTER_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc2dc\uc791"],["EXIT_FULL_SCREEN","\uc804\uccb4\ud654\uba74 \ub2eb\uae30"],["EXIT_LOOP_MODE","\ud604\uc7ac \ub3d9\uc601\uc0c1 \ubc18\ubcf5 \uc7ac\uc0dd \uc911\uc9c0"],["EXIT_PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc \uc885\ub8cc"],["FAST_FORWARD","\ube68\ub9ac \uac10\uae30"],["FULL_SCREEN","\uc804\uccb4\ud654\uba74"],["LANGUAGE",
"\uc5b8\uc5b4"],["LIVE","\uc2e4\uc2dc\uac04"],["LOOP","\ubc18\ubcf5 \uc7ac\uc0dd"],["MORE_SETTINGS","\uc124\uc815 \ub354\ubcf4\uae30"],["MULTIPLE_LANGUAGES","\uc5ec\ub7ec \uc5b8\uc5b4"],["MUTE","\uc74c\uc18c\uac70"],["NOT_APPLICABLE","\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c"],["OFF","\uc0ac\uc6a9 \uc548\ud568"],["ON","\uc0ac\uc6a9"],["PAUSE","\uc77c\uc2dc\uc911\uc9c0"],["PICTURE_IN_PICTURE","PIP \ubaa8\ub4dc"],["PLAY","\uc7ac\uc0dd"],["PLAYBACK_RATE","\uc7ac\uc0dd \uc18d\ub3c4"],["QUALITY","\ud488\uc9c8"],
["RECENTER_VR","\uc911\uc2ec \uc7ac\uc124\uc815"],["REPLAY","\ub2e4\uc2dc\ubcf4\uae30"],["RESOLUTION","\ud574\uc0c1\ub3c4"],["REWIND","\ub418\uac10\uae30"],["SEEK","\ucc3e\uae30"],["SKIP_AD","\uad11\uace0 \uac74\ub108\ub6f0\uae30"],["SKIP_TO_LIVE","\ub77c\uc774\ube0c \ub3d9\uc601\uc0c1\uc73c\ub85c \uac74\ub108\ub6f0\uae30"],["STATISTICS","\ud1b5\uacc4"],["SUBTITLE_FORCED","\uac15\uc81c"],["SURROUND","\uc11c\ub77c\uc6b4\ub4dc"],["TOGGLE_STEREOSCOPIC","\uc785\uccb4 \ubcf4\uae30 \uc804\ud658"],["UNDETERMINED_LANGUAGE",
"\ubbf8\uc815"],["UNMUTE","\uc74c\uc18c\uac70 \ud574\uc81c"],["UNRECOGNIZED_LANGUAGE","\uc54c \uc218 \uc5c6\uc74c"],["VOLUME","\ubcfc\ub968"]]));a.Ua("nl",new Map([["AD_DURATION","Advertentieduur"],["AD_PROGRESS","Advertentie [AD_ON] van [NUM_ADS]"],["AD_STATISTICS","Advertentiestatistieken"],["AD_TIME","Advertentie: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatisch"],["BACK","Terug"],["CAPTIONS","Ondertiteling"],["CAST","Casten..."],["CHAPTERS","Hoofdstukken"],["DOWNLOAD_VIDEO_FRAME",
"Videoframe opslaan"],["ENTER_LOOP_MODE","De huidige video lussen"],["ENTER_PICTURE_IN_PICTURE","Scherm-in-scherm openen"],["EXIT_FULL_SCREEN","Volledig scherm sluiten"],["EXIT_LOOP_MODE","De huidige video niet meer lussen"],["EXIT_PICTURE_IN_PICTURE","Scherm-in-scherm afsluiten"],["FAST_FORWARD","Vooruitspoelen"],["FULL_SCREEN","Volledig scherm"],["LANGUAGE","Taal"],["LIVE","Live"],["LOOP","Lussen"],["MORE_SETTINGS","Meer instellingen"],["MULTIPLE_LANGUAGES","Meerdere talen"],["MUTE","Geluid uitzetten"],
["NOT_APPLICABLE","Niet van toepassing"],["OFF","Uit"],["ON","Aan"],["PAUSE","Onderbreken"],["PICTURE_IN_PICTURE","Scherm-in-scherm"],["PLAY","Afspelen"],["PLAYBACK_RATE","Afspeelsnelheid"],["QUALITY","Kwaliteit"],["RECENTER_VR","Opnieuw centreren"],["REPLAY","Opnieuw afspelen"],["RESOLUTION","Resolutie"],["REWIND","Terugspoelen"],["SEEK","Zoeken"],["SKIP_AD","Advertentie overslaan"],["SKIP_TO_LIVE","Doorgaan naar live"],["STATISTICS","Statistieken"],["SUBTITLE_FORCED","Afgedwongen"],["SURROUND",
"Surround"],["TOGGLE_STEREOSCOPIC","Stereoscopisch aan-/uitzetten"],["UNDETERMINED_LANGUAGE","Onbepaald"],["UNMUTE","Geluid aanzetten"],["UNRECOGNIZED_LANGUAGE","Onbekend"],["VOLUME","Volume"]]));a.Ua("pl",new Map([["AD_DURATION","Czas trwania reklamy"],["AD_PROGRESS","Reklama\u00a0[AD_ON] z\u00a0[NUM_ADS]"],["AD_STATISTICS","Statystyki reklam"],["AD_TIME","Reklama: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Automatycznie"],["BACK","Wstecz"],["CAPTIONS","Napisy"],["CAST","Przesy\u0142aj..."],
["CHAPTERS","Rozdzia\u0142y"],["DOWNLOAD_VIDEO_FRAME","Zapisz klatk\u0119 filmu"],["ENTER_LOOP_MODE","Odtwarzaj bie\u017c\u0105cy film w\u00a0p\u0119tli"],["ENTER_PICTURE_IN_PICTURE","W\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["EXIT_FULL_SCREEN","Zamknij pe\u0142ny ekran"],["EXIT_LOOP_MODE","Wy\u0142\u0105cz odtwarzanie bie\u017c\u0105cego filmu w\u00a0p\u0119tli"],["EXIT_PICTURE_IN_PICTURE","Wy\u0142\u0105cz tryb obrazu w\u00a0obrazie"],["FAST_FORWARD","Przewi\u0144 do przodu"],["FULL_SCREEN",
"Pe\u0142ny ekran"],["LANGUAGE","J\u0119zyk"],["LIVE","Na \u017cywo"],["LOOP","Odtwarzaj w\u00a0p\u0119tli"],["MORE_SETTINGS","Wi\u0119cej ustawie\u0144"],["MULTIPLE_LANGUAGES","Wiele j\u0119zyk\u00f3w"],["MUTE","Wycisz"],["NOT_APPLICABLE","Nie dotyczy"],["OFF","Wy\u0142\u0105czone"],["ON","W\u0142\u0105czone"],["PAUSE","Wstrzymaj"],["PICTURE_IN_PICTURE","Obraz w\u00a0obrazie"],["PLAY","Odtw\u00f3rz"],["PLAYBACK_RATE","Szybko\u015b\u0107 odtwarzania"],["QUALITY","Jako\u015b\u0107"],["RECENTER_VR",
"Wy\u015brodkuj"],["REPLAY","Odtw\u00f3rz ponownie"],["RESOLUTION","Rozdzielczo\u015b\u0107"],["REWIND","Przewi\u0144 do ty\u0142u"],["SEEK","Szukaj"],["SKIP_AD","Pomi\u0144 reklam\u0119"],["SKIP_TO_LIVE","Przejd\u017a do transmisji na \u017cywo"],["STATISTICS","Statystyki"],["SUBTITLE_FORCED","Wymuszone"],["SURROUND","Przestrzenny"],["TOGGLE_STEREOSCOPIC","Prze\u0142\u0105cz tryb stereoskopowy"],["UNDETERMINED_LANGUAGE","Nie okre\u015blono"],["UNMUTE","Wy\u0142\u0105cz wyciszenie"],["UNRECOGNIZED_LANGUAGE",
"Nierozpoznany"],["VOLUME","G\u0142o\u015bno\u015b\u0107"]]));a.Ua("pt-BR",new Map([["AD_DURATION","Dura\u00e7\u00e3o do an\u00fancio"],["AD_PROGRESS","An\u00fancio [AD_ON] de [NUM_ADS]"],["AD_STATISTICS","Estat\u00edsticas de an\u00fancios"],["AD_TIME","An\u00fancio: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Autom\u00e1tica"],["BACK","Voltar"],["CAPTIONS","Legendas"],["CAST","Transmitir..."],["CHAPTERS","Cap\u00edtulos"],["DOWNLOAD_VIDEO_FRAME","Salvar frame do v\u00eddeo"],["ENTER_LOOP_MODE",
"Repetir o v\u00eddeo atual"],["ENTER_PICTURE_IN_PICTURE","Entrar no modo picture-in-picture"],["EXIT_FULL_SCREEN","Sair do modo tela cheia"],["EXIT_LOOP_MODE","Parar repeti\u00e7\u00e3o do v\u00eddeo atual"],["EXIT_PICTURE_IN_PICTURE","Sair de picture-in-picture"],["FAST_FORWARD","Avan\u00e7ar"],["FULL_SCREEN","Tela cheia"],["LANGUAGE","Idioma"],["LIVE","Ao vivo"],["LOOP","Repetir"],["MORE_SETTINGS","Mais defini\u00e7\u00f5es"],["MULTIPLE_LANGUAGES","V\u00e1rios idiomas"],["MUTE","Desativar som"],
["NOT_APPLICABLE","N\u00e3o relevante"],["OFF","Desativado"],["ON","Ativado"],["PAUSE","Pausar"],["PICTURE_IN_PICTURE","Picture-in-picture"],["PLAY","Reproduzir"],["PLAYBACK_RATE","Velocidade da reprodu\u00e7\u00e3o"],["QUALITY","Qualidade"],["RECENTER_VR","Centralizar"],["REPLAY","Repetir"],["RESOLUTION","Resolu\u00e7\u00e3o"],["REWIND","Voltar"],["SEEK","Procurar"],["SKIP_AD","Pular an\u00fancio"],["SKIP_TO_LIVE","Pular para transmiss\u00e3o ao vivo"],["STATISTICS","Estat\u00edsticas"],["SUBTITLE_FORCED",
"Exibi\u00e7\u00e3o for\u00e7ada"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC","Alternar imagem estereosc\u00f3pica"],["UNDETERMINED_LANGUAGE","Indeterminado"],["UNMUTE","Ativar som"],["UNRECOGNIZED_LANGUAGE","N\u00e3o reconhecido"],["VOLUME","Volume"]]));a.Ua("ru",new Map([["AD_DURATION","\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u043a\u043b\u0430\u043c\u044b"],["AD_PROGRESS","\u0420\u0435\u043a\u043b\u0430\u043c\u0430 [AD_ON] \u0438\u0437 [NUM_ADS]"],
["AD_STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439"],["AD_TIME","\u0420\u0435\u043a\u043b\u0430\u043c\u0430: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0410\u0432\u0442\u043e"],["BACK","\u041d\u0430\u0437\u0430\u0434"],["CAPTIONS","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b"],["CAST","\u0422\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c..."],["CHAPTERS","\u042d\u043f\u0438\u0437\u043e\u0434\u044b"],
["DOWNLOAD_VIDEO_FRAME","\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u0434\u0440 \u0432\u0438\u0434\u0435\u043e"],["ENTER_LOOP_MODE","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0438\u0434\u0435\u043e"],["ENTER_PICTURE_IN_PICTURE",'\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["EXIT_FULL_SCREEN","\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["EXIT_LOOP_MODE","\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0446\u0438\u043a\u043b\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043e"],["EXIT_PICTURE_IN_PICTURE",'\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["FAST_FORWARD","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430 \u0432\u043f\u0435\u0440\u0435\u0434"],["FULL_SCREEN","\u041f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c"],["LANGUAGE","\u042f\u0437\u044b\u043a"],["LIVE","\u041f\u0440\u044f\u043c\u043e\u0439 \u044d\u0444\u0438\u0440"],["LOOP","\u0417\u0430\u0446\u0438\u043a\u043b\u0438\u0442\u044c"],["MORE_SETTINGS","\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],
["MULTIPLE_LANGUAGES","\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u043e\u0432"],["MUTE","\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["NOT_APPLICABLE","\u041d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e"],["OFF","\u0412\u044b\u043a\u043b."],["ON","\u0412\u043a\u043b."],["PAUSE","\u041f\u0430\u0443\u0437\u0430"],["PICTURE_IN_PICTURE","\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"],
["PLAY","\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438"],["PLAYBACK_RATE","\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f"],["QUALITY","\u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e"],["RECENTER_VR","\u0426\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e"],["REPLAY","\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c"],
["RESOLUTION","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435"],["REWIND","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434"],["SEEK","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430"],["SKIP_AD","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c"],["SKIP_TO_LIVE","\u041f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043f\u0440\u044f\u043c\u043e\u0439 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438"],
["STATISTICS","\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430"],["SUBTITLE_FORCED","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e"],["SURROUND","\u041e\u0431\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0432\u0443\u043a"],["TOGGLE_STEREOSCOPIC","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0435\u0440\u0435\u043e\u0441\u043a\u043e\u043f\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0435\u0436\u0438\u043c"],
["UNDETERMINED_LANGUAGE","\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e"],["UNMUTE","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["UNRECOGNIZED_LANGUAGE","\u041d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043e"],["VOLUME","\u0413\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c"]]));a.Ua("th",new Map([["AD_DURATION","\u0e23\u0e30\u0e22\u0e30\u0e40\u0e27\u0e25\u0e32\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_PROGRESS","\u0e42\u0e06\u0e29\u0e13\u0e32 [AD_ON] \u0e08\u0e32\u0e01 [NUM_ADS] \u0e23\u0e32\u0e22\u0e01\u0e32\u0e23"],
["AD_STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34\u0e42\u0e06\u0e29\u0e13\u0e32"],["AD_TIME","\u0e42\u0e06\u0e29\u0e13\u0e32: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34"],["BACK","\u0e01\u0e25\u0e31\u0e1a"],["CAPTIONS","\u0e04\u0e33\u0e1a\u0e23\u0e23\u0e22\u0e32\u0e22\u0e41\u0e17\u0e19\u0e40\u0e2a\u0e35\u0e22\u0e07"],["CAST","\u0e41\u0e04\u0e2a\u0e15\u0e4c..."],["CHAPTERS","\u0e1a\u0e17"],["DOWNLOAD_VIDEO_FRAME","\u0e1a\u0e31\u0e19\u0e17\u0e36\u0e01\u0e40\u0e1f\u0e23\u0e21\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d"],
["ENTER_LOOP_MODE","\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["ENTER_PICTURE_IN_PICTURE","\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["EXIT_FULL_SCREEN","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e41\u0e1a\u0e1a\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["EXIT_LOOP_MODE",
"\u0e2b\u0e22\u0e38\u0e14\u0e27\u0e19\u0e0b\u0e49\u0e33\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d\u0e1b\u0e31\u0e08\u0e08\u0e38\u0e1a\u0e31\u0e19"],["EXIT_PICTURE_IN_PICTURE","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["FAST_FORWARD","\u0e01\u0e23\u0e2d\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32"],["FULL_SCREEN","\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["LANGUAGE","\u0e20\u0e32\u0e29\u0e32"],
["LIVE","\u0e2a\u0e14"],["LOOP","\u0e25\u0e39\u0e1b"],["MORE_SETTINGS","\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21"],["MULTIPLE_LANGUAGES","\u0e2b\u0e25\u0e32\u0e22\u0e20\u0e32\u0e29\u0e32"],["MUTE","\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["NOT_APPLICABLE","\u0e44\u0e21\u0e48\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e02\u0e49\u0e2d\u0e07"],["OFF","\u0e1b\u0e34\u0e14"],["ON","\u0e40\u0e1b\u0e34\u0e14"],["PAUSE","\u0e2b\u0e22\u0e38\u0e14\u0e0a\u0e31\u0e48\u0e27\u0e04\u0e23\u0e32\u0e27"],
["PICTURE_IN_PICTURE","\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["PLAY","\u0e40\u0e25\u0e48\u0e19"],["PLAYBACK_RATE","\u0e04\u0e27\u0e32\u0e21\u0e40\u0e23\u0e47\u0e27\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e25\u0e48\u0e19"],["QUALITY","\u0e04\u0e38\u0e13\u0e20\u0e32\u0e1e"],["RECENTER_VR","\u0e08\u0e31\u0e14\u0e01\u0e36\u0e48\u0e07\u0e01\u0e25\u0e32\u0e07\u0e43\u0e2b\u0e21\u0e48"],["REPLAY","\u0e40\u0e25\u0e48\u0e19\u0e0b\u0e49\u0e33"],
["RESOLUTION","\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14"],["REWIND","\u0e01\u0e23\u0e2d\u0e01\u0e25\u0e31\u0e1a"],["SEEK","\u0e04\u0e49\u0e19\u0e2b\u0e32"],["SKIP_AD","\u0e02\u0e49\u0e32\u0e21\u0e42\u0e06\u0e29\u0e13\u0e32"],["SKIP_TO_LIVE","\u0e02\u0e49\u0e32\u0e21\u0e44\u0e1b\u0e17\u0e35\u0e48\u0e01\u0e32\u0e23\u0e16\u0e48\u0e32\u0e22\u0e17\u0e2d\u0e14\u0e2a\u0e14"],["STATISTICS","\u0e2a\u0e16\u0e34\u0e15\u0e34"],["SUBTITLE_FORCED","\u0e1a\u0e31\u0e07\u0e04\u0e31\u0e1a"],
["SURROUND","\u0e40\u0e0b\u0e2d\u0e23\u0e4c\u0e23\u0e32\u0e27\u0e14\u0e4c"],["TOGGLE_STEREOSCOPIC","\u0e40\u0e1b\u0e34\u0e14/\u0e1b\u0e34\u0e14\u0e1f\u0e35\u0e40\u0e08\u0e2d\u0e23\u0e4c\u0e2a\u0e32\u0e21\u0e21\u0e34\u0e15\u0e34"],["UNDETERMINED_LANGUAGE","\u0e44\u0e21\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14"],["UNMUTE","\u0e40\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["UNRECOGNIZED_LANGUAGE","\u0e17\u0e35\u0e48\u0e44\u0e21\u0e48\u0e23\u0e39\u0e49\u0e08\u0e31\u0e01"],["VOLUME","\u0e23\u0e30\u0e14\u0e31\u0e1a\u0e40\u0e2a\u0e35\u0e22\u0e07"]]));
a.Ua("tr",new Map([["AD_DURATION","Reklam s\u00fcresi"],["AD_PROGRESS","[AD_ON]/[NUM_ADS] reklam"],["AD_STATISTICS","Reklam istatistikleri"],["AD_TIME","Reklam: [AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","Otomatik"],["BACK","Geri"],["CAPTIONS","Altyaz\u0131lar"],["CAST","Yay\u0131nla..."],["CHAPTERS","B\u00f6l\u00fcmler"],["DOWNLOAD_VIDEO_FRAME","Video karesini kaydet"],["ENTER_LOOP_MODE","Mevcut videoyu d\u00f6ng\u00fcye al"],["ENTER_PICTURE_IN_PICTURE","Pencere i\u00e7inde Pencere moduna gir"],
["EXIT_FULL_SCREEN","Tam ekrandan \u00e7\u0131k"],["EXIT_LOOP_MODE","Mevcut videonun d\u00f6ng\u00fcs\u00fcn\u00fc durdur"],["EXIT_PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencereden \u00c7\u0131k"],["FAST_FORWARD","\u0130leri sar"],["FULL_SCREEN","Tam ekran"],["LANGUAGE","Dil"],["LIVE","Canl\u0131"],["LOOP","D\u00f6ng\u00fc"],["MORE_SETTINGS","Daha fazla ayar"],["MULTIPLE_LANGUAGES","Birden \u00e7ok dil"],["MUTE","Sesi kapat"],["NOT_APPLICABLE","Ge\u00e7erli de\u011fil"],["OFF","Kapal\u0131"],
["ON","A\u00e7\u0131k"],["PAUSE","Duraklat"],["PICTURE_IN_PICTURE","Pencere \u0130\u00e7inde Pencere"],["PLAY","Oynat"],["PLAYBACK_RATE","\u00c7alma h\u0131z\u0131"],["QUALITY","Kalite"],["RECENTER_VR","Ortala"],["REPLAY","Tekrar Oynat"],["RESOLUTION","\u00c7\u00f6z\u00fcn\u00fcrl\u00fck"],["REWIND","Geri sar"],["SEEK","Ara"],["SKIP_AD","Reklam\u0131 Atla"],["SKIP_TO_LIVE","Canl\u0131 yay\u0131na atla"],["STATISTICS","\u0130statistikler"],["SUBTITLE_FORCED","Zorunlu"],["SURROUND","Surround"],["TOGGLE_STEREOSCOPIC",
"Stereoskopik modu a\u00e7/kapat"],["UNDETERMINED_LANGUAGE","Belirsiz"],["UNMUTE","Sesi a\u00e7"],["UNRECOGNIZED_LANGUAGE","Tan\u0131nmayan"],["VOLUME","Ses"]]));a.Ua("zh",new Map([["AD_DURATION","\u5e7f\u544a\u6301\u7eed\u65f6\u95f4"],["AD_PROGRESS","\u5e7f\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5e7f\u544a\u7edf\u8ba1\u4fe1\u606f"],["AD_TIME","\u5e7f\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52a8"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e\u2026"],
["CHAPTERS","\u7ae0\u8282"],["DOWNLOAD_VIDEO_FRAME","\u4fdd\u5b58\u89c6\u9891\u5e27"],["ENTER_LOOP_MODE","\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["ENTER_PICTURE_IN_PICTURE","\u8fdb\u5165\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u73af\u64ad\u653e\u5f53\u524d\u89c6\u9891"],["EXIT_PICTURE_IN_PICTURE","\u9000\u51fa\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["FAST_FORWARD","\u5feb\u8fdb"],
["FULL_SCREEN","\u5168\u5c4f"],["LANGUAGE","\u8bed\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u73af\u64ad\u653e"],["MORE_SETTINGS","\u66f4\u591a\u8bbe\u7f6e"],["MULTIPLE_LANGUAGES","\u591a\u79cd\u8bed\u8a00"],["MUTE","\u9759\u97f3"],["NOT_APPLICABLE","\u4e0d\u9002\u7528"],["OFF","\u5173\u95ed"],["ON","\u5f00\u542f"],["PAUSE","\u6682\u505c"],["PICTURE_IN_PICTURE","\u753b\u4e2d\u753b"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u753b\u8d28"],["RECENTER_VR",
"\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u653e"],["RESOLUTION","\u5206\u8fa8\u7387"],["REWIND","\u5feb\u9000"],["SEEK","\u8fdb\u5ea6"],["SKIP_AD","\u8df3\u8fc7\u5e7f\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7edf\u8ba1\u4fe1\u606f"],["SUBTITLE_FORCED","\u5df2\u5f3a\u5236\u663e\u793a"],["SURROUND","\u73af\u7ed5\u58f0"],["TOGGLE_STEREOSCOPIC","\u5207\u6362\u7acb\u4f53\u58f0"],["UNDETERMINED_LANGUAGE","\u672a\u786e\u5b9a"],["UNMUTE","\u53d6\u6d88\u9759\u97f3"],
["UNRECOGNIZED_LANGUAGE","\u65e0\u6cd5\u8bc6\u522b"],["VOLUME","\u97f3\u91cf"]]));a.Ua("zh-TW",new Map([["AD_DURATION","\u5ee3\u544a\u9577\u5ea6"],["AD_PROGRESS","\u5ee3\u544a [AD_ON]/[NUM_ADS]"],["AD_STATISTICS","\u5ee3\u544a\u7d71\u8a08\u8cc7\u6599"],["AD_TIME","\u5ee3\u544a\uff1a[AD_TIME]"],["AIRPLAY","AirPlay"],["AUTO_QUALITY","\u81ea\u52d5"],["BACK","\u8fd4\u56de"],["CAPTIONS","\u5b57\u5e55"],["CAST","\u6295\u653e..."],["CHAPTERS","\u7ae0\u7bc0"],["DOWNLOAD_VIDEO_FRAME","\u5132\u5b58\u5f71\u7247\u5f71\u683c"],
["ENTER_LOOP_MODE","\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["ENTER_PICTURE_IN_PICTURE","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["EXIT_FULL_SCREEN","\u9000\u51fa\u5168\u87a2\u5e55\u6a21\u5f0f"],["EXIT_LOOP_MODE","\u505c\u6b62\u5faa\u74b0\u64ad\u653e\u76ee\u524d\u7684\u5f71\u7247"],["EXIT_PICTURE_IN_PICTURE","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["FAST_FORWARD","\u5feb\u8f49"],["FULL_SCREEN","\u5168\u87a2\u5e55"],["LANGUAGE","\u8a9e\u8a00"],["LIVE","\u76f4\u64ad"],["LOOP","\u5faa\u74b0\u64ad\u653e"],
["MORE_SETTINGS","\u986f\u793a\u66f4\u591a\u8a2d\u5b9a"],["MULTIPLE_LANGUAGES","\u591a\u7a2e\u8a9e\u8a00"],["MUTE","\u975c\u97f3"],["NOT_APPLICABLE","\u4e0d\u9069\u7528"],["OFF","\u95dc\u9589"],["ON","\u958b\u555f"],["PAUSE","\u66ab\u505c"],["PICTURE_IN_PICTURE","\u5b50\u6bcd\u756b\u9762"],["PLAY","\u64ad\u653e"],["PLAYBACK_RATE","\u64ad\u653e\u901f\u5ea6"],["QUALITY","\u97f3\u8cea"],["RECENTER_VR","\u91cd\u65b0\u7f6e\u4e2d"],["REPLAY","\u91cd\u64ad"],["RESOLUTION","\u89e3\u6790\u5ea6"],["REWIND",
"\u5012\u8f49"],["SEEK","\u641c\u5c0b"],["SKIP_AD","\u7565\u904e\u5ee3\u544a"],["SKIP_TO_LIVE","\u8df3\u81f3\u5f53\u524d\u76f4\u64ad"],["STATISTICS","\u7d71\u8a08\u8cc7\u6599"],["SUBTITLE_FORCED","\u5f37\u5236\u986f\u793a"],["SURROUND","\u74b0\u5834\u97f3\u6548"],["TOGGLE_STEREOSCOPIC","\u5207\u63db\u7acb\u9ad4\u5f71\u50cf"],["UNDETERMINED_LANGUAGE","\u4e0d\u660e"],["UNMUTE","\u53d6\u6d88\u975c\u97f3"],["UNRECOGNIZED_LANGUAGE","\u7121\u6cd5\u8fa8\u8b58"],["VOLUME","\u97f3\u91cf"]]));a.Qh(navigator.languages||
[]);return a}S("shaka.ui.Controls",Z);Z.prototype.incrementRoll=Z.prototype.Mg;Z.prototype.incrementPitch=Z.prototype.Lg;Z.prototype.incrementYaw=Z.prototype.Ng;Z.prototype.toggleStereoscopicMode=Z.prototype.Id;Z.prototype.setVRFieldOfView=Z.prototype.yl;Z.prototype.getVRFieldOfView=Z.prototype.lk;Z.prototype.getVRNorth=Z.prototype.nk;Z.prototype.isPlayingVR=Z.prototype.Nb;Z.prototype.canPlayVR=Z.prototype.cg;Z.prototype.hideUI=Z.prototype.xk;Z.prototype.showUI=Z.prototype.zl;
Z.prototype.isOpaque=Z.prototype.Ca;Z.prototype.hideAdUI=Z.prototype.ji;Z.prototype.showAdUI=Z.prototype.Vi;Z.prototype.togglePiP=Z.prototype.Hd;Z.prototype.isPiPEnabled=Z.prototype.Xe;Z.prototype.isPiPAllowed=Z.prototype.We;Z.prototype.toggleFullScreen=Z.prototype.Ef;Z.prototype.isFullScreenEnabled=Z.prototype.vd;Z.prototype.isFullScreenSupported=Z.prototype.Zd;Z.prototype.hideSettingsMenus=Z.prototype.Tc;Z.prototype.anySettingsMenusAreOpen=Z.prototype.Kd;Z.prototype.setLastTouchEventTime=Z.prototype.Ri;
Z.prototype.getDisplayTime=Z.prototype.Fg;Z.prototype.isCastAllowed=Z.prototype.yk;Z.prototype.setSeeking=Z.prototype.rh;Z.prototype.isSeeking=Z.prototype.Ek;Z.prototype.getConfig=Z.prototype.Gj;Z.prototype.getClientSideAdContainer=Z.prototype.Fj;Z.prototype.getServerSideAdContainer=Z.prototype.fk;Z.prototype.getControlsContainer=Z.prototype.Jj;Z.prototype.getLocalPlayer=Z.prototype.Sj;Z.prototype.getPlayer=Z.prototype.yc;Z.prototype.getLocalVideo=Z.prototype.Tj;Z.prototype.getVideo=Z.prototype.Bc;
Z.prototype.getVideoContainer=Z.prototype.qk;Z.prototype.getLocalization=Z.prototype.Uj;Z.prototype.getCastProxy=Z.prototype.Ej;Z.prototype.getAd=Z.prototype.getAd;Z.prototype.setEnabledNativeControls=Z.prototype.Pi;Z.prototype.setEnabledShakaControls=Z.prototype.nh;Z.prototype.configure=Z.prototype.configure;Z.prototype.loadComplete=Z.prototype.Hk;Z.prototype.allowCast=Z.prototype.pj;Z.registerSeekBar=function(a){oH=a};Z.registerElement=XG;Z.prototype.destroy=Z.prototype.destroy;
var YG=new Map,oH=new iG;function vH(a,b){DF.call(this,a,b);var c=this;this.l=this.controls.g;this.j=this.controls.j;this.i=[];this.g=kk();this.g.classList.add("shaka-overflow-menu-button");this.g.classList.add("shaka-no-propagation");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");this.g.textContent="more_vert";this.parent.appendChild(this.g);this.h=W("div");this.h.classList.add("shaka-overflow-menu");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");
this.h.classList.add("shaka-hidden");this.j.appendChild(this.h);wH(this);this.eventManager.o(this.localization,"locale-updated",function(){xH(c)});this.eventManager.o(this.localization,"locale-changed",function(){xH(c)});this.eventManager.o(this.adManager,"ad-started",function(){c.ad&&c.ad.isLinear()&&IF(c.g,!1)});this.eventManager.o(this.adManager,"ad-stopped",function(){IF(c.g,!0)});this.eventManager.o(this.controls,"submenuopen",function(){IF(c.h,!1)});this.eventManager.o(this.h,"touchstart",function(d){c.controls.Ri(Date.now());
d.stopPropagation()});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&yH(c)});xH(this);this.ad&&this.ad.isLinear()&&IF(this.g,!1)}oa(vH,DF);vH.prototype.release=function(){this.j=null;for(var a=t(this.i),b=a.next();!b.done;b=a.next())b.value.release();this.i=[];DF.prototype.release.call(this)};function zH(a,b){AH.set(a,b)}
function wH(a){for(var b=t(a.l.overflowMenuButtons),c=b.next();!c.done;c=b.next())c=c.value,AH.get(c)?(c=AH.get(c),a.i.push(c.create(a.h,a.controls))):db("Unrecognized overflow menu element requested:",c)}function yH(a){if(a.controls.Kd())a.controls.Tc();else{IF(a.h,!0);PG(a.controls);var b=function(c){return 0==c.classList.contains("shaka-hidden")};pb(a.h.childNodes,b)&&rb(a.h.childNodes,b)[0].focus()}}function xH(a){a.g.ariaLabel=a.localization.resolve("MORE_SETTINGS")}
S("shaka.ui.OverflowMenu",vH);vH.registerElement=zH;function BH(){}BH.prototype.create=function(a,b){return new vH(a,b)};XG("overflow_menu",new BH);var AH=new Map;function CH(a,b){function c(e){return d.i[e]}DF.call(this,a,b);var d=this;this.h=kk();this.h.classList.add("shaka-ad-statistics-button");this.j=W("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.h.appendChild(this.j);a=W("label");a.classList.add("shaka-overflow-button-label");this.u=W("span");a.appendChild(this.u);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.h.appendChild(a);this.parent.appendChild(this.h);
this.g=W("div");this.g.classList.add("shaka-no-propagation");this.g.classList.add("shaka-show-controls-on-mouse-over");this.g.classList.add("shaka-ad-statistics-container");this.g.classList.add("shaka-hidden");this.controls.j.appendChild(this.g);this.C=[];this.i=this.adManager.getStats();IF(this.h,0<this.i.started);this.s=new Map;this.B=(new Map).set("loadTimes",function(e){var f=0;e=t(d.i[e]);for(var g=e.next();!g.done;g=e.next())f+=parseFloat(g.value);return f}).set("averageLoadTime",c).set("started",
c).set("overlayAds",c).set("playedCompletely",c).set("skipped",c).set("errors",c);this.l=new bc(function(){d.i=d.adManager.getStats();for(var e=t(d.C),f=e.next();!f.done;f=e.next())f=f.value,d.s.get(f).textContent=d.B.get(f)(f)});DH(this);EH(this);this.eventManager.o(this.localization,"locale-updated",function(){DH(d)});this.eventManager.o(this.localization,"locale-changed",function(){DH(d)});this.eventManager.o(this.h,"click",function(){d.controls.Ca()&&(FH(d),DH(d))});this.eventManager.o(this.player,
"loading",function(){IF(d.h,!1)});this.eventManager.o(this.adManager,"ad-started",function(){IF(d.h,!0)})}oa(CH,DF);function FH(a){a.g.classList.contains("shaka-hidden")?(a.j.textContent="insert_chart",a.l.xa(.1),IF(a.g,!0)):(a.j.textContent="insert_chart_outlined",a.l.stop(),IF(a.g,!1))}
function DH(a){a.u.textContent=a.localization.resolve("AD_STATISTICS");a.h.ariaLabel=a.localization.resolve("AD_STATISTICS");a.m.textContent=a.localization.resolve(a.g.classList.contains("shaka-hidden")?"OFF":"ON")}function GH(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.B.get(b)(b);c.appendChild(d);a.s.set(b,d);return c}
function EH(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=W("i");c.classList.add("material-icons-round");c.textContent="close";b.appendChild(c);a.g.appendChild(b);a.eventManager.o(c,"click",function(){FH(a)});b=t(a.controls.g.adStatisticsList);for(c=b.next();!c.done;c=b.next())c=c.value,c in a.i?(a.g.appendChild(GH(a,c)),a.C.push(c)):db("Unrecognized ad statistic element:",c)}CH.prototype.release=function(){this.l.stop();this.l=null;DF.prototype.release.call(this)};
S("shaka.ui.AdStatisticsButton",CH);function HH(){}HH.prototype.create=function(a,b){return new CH(a,b)};zH("ad_statistics",new HH);PF("ad_statistics",new HH);function IH(a,b){DF.call(this,a,b);var c=this;this.g=kk();this.g.classList.add("shaka-airplay-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="airplay";this.g.appendChild(this.h);window.WebKitPlaybackTargetAvailabilityEvent||this.g.classList.add("shaka-hidden");a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);
this.i=W("span");this.i.classList.add("shaka-current-selection-span");a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);JH(this);KH(this);this.eventManager.o(this.localization,"locale-updated",function(){JH(c)});this.eventManager.o(this.localization,"locale-changed",function(){JH(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.controls.Bc().webkitShowPlaybackTargetPicker()});a=this.controls.Bc();this.eventManager.o(a,"webkitplaybacktargetavailabilitychanged",
function(d){var e=c.player.m==Zq;IF(c.g,"available"==d.availability&&e)});this.eventManager.o(a,"webkitcurrentplaybacktargetiswirelesschanged",function(){KH(c)})}oa(IH,DF);function KH(a){var b=a.controls.Bc();a.g.ariaPressed=b&&b.webkitCurrentPlaybackTargetIsWireless?"true":"false"}function JH(a){a.g.ariaLabel=a.localization.resolve("AIRPLAY");a.j.textContent=a.localization.resolve("AIRPLAY")}S("shaka.ui.AirPlayButton",IH);function LH(){}LH.prototype.create=function(a,b){return new IH(a,b)};
zH("airplay",new LH);XG("airplay",new LH);function MH(a,b){DF.call(this,a,b);var c=this;this.g=document.createElement("canvas");this.g.style.position="absolute";this.g.style.top="0";this.g.style.left="0";this.g.style.pointerEvents="none";this.parent.appendChild(this.g);NH(this);this.i=this.h=null;window.ResizeObserver?(this.i=new ResizeObserver(function(){return NH(c)}),this.i.observe(this.parent)):window.addEventListener("resize",function(){return NH(c)})}oa(MH,DF);function OH(a){return(a=a.g.getContext("2d"))?a:null}
function NH(a){a.g.width=a.parent.offsetWidth;a.g.height=a.parent.offsetHeight}
MH.prototype.Bf=function(a,b){a={type:"static",text:a,position:"top-right",color:"rgba(255, 255, 255, 0.7)",size:20,alpha:.7,interval:2E3,skip:500,displayDuration:2E3,transitionDuration:.5};b=Object.assign({},a,b||a);if("static"===b.type){if(a=OH(this)){a.clearRect(0,0,this.g.width,this.g.height);a.globalAlpha=b.alpha;a.fillStyle=b.color;a.font=b.size+"px Arial";var c=a.measureText(b.text);switch(b.position){case "top-left":c=20;var d=b.size+20;break;case "top-right":c=this.g.width-c.width-20;d=b.size+
20;break;case "bottom-left":c=20;d=this.g.height-20;break;case "bottom-right":c=this.g.width-c.width-20;d=this.g.height-20;break;default:c=(this.g.width-c.width)/2,d=(this.g.height+b.size)/2}a.fillText(b.text,c,d)}}else"dynamic"===b.type&&PH(this,b)};
function PH(a,b){function c(){if(a.h){e.clearRect(0,0,a.g.width,a.g.height);switch(h){case "fadeIn":g=Math.min(b.alpha,g+l);g>=b.alpha&&(h="display");break;case "display":0>=--k&&(h="fadeOut");break;case "fadeOut":g=Math.max(0,g-l),0>=g&&(h="transition",f=d(),k=Math.round(60*b.displayDuration),h="fadeIn")}0<g&&(e.globalAlpha=g,e.fillStyle=b.color,e.font=b.size+"px Arial",e.fillText(b.text,f.left,f.top));a.h&&(a.h=requestAnimationFrame(c))}}function d(){e.font=b.size+"px Arial";var n=e.measureText(b.text).width,
p=b.size;n=[{left:20,top:p+20},{left:a.g.width-n-20,top:p+20},{left:20,top:a.g.height-20},{left:a.g.width-n-20,top:a.g.height-20},{left:(a.g.width-n)/2,top:(a.g.height+p)/2}];p=n[m];m=(m+1)%n.length;return p}var e=a.g.getContext("2d"),f={left:0,top:0},g=0,h="fadeIn",k=Math.round(60*b.displayDuration),l=1/(Math.round(60*b.transitionDuration)/2),m=0;f=d();a.h=requestAnimationFrame(c)}
MH.prototype.uf=function(){this.h&&(cancelAnimationFrame(this.h),this.h=null);var a=OH(this);a&&a.clearRect(0,0,this.g.width,this.g.height)};MH.prototype.release=function(){var a=this;this.g&&this.g.parentNode&&this.g.parentNode.removeChild(this.g);this.i?(this.i.disconnect(),this.i=null):window.removeEventListener("resize",function(){return NH(a)});DF.prototype.release.call(this)};S("shaka.ui.Watermark",MH);MH.prototype.removeWatermark=MH.prototype.uf;MH.prototype.setTextWatermark=MH.prototype.Bf;function QH(a,b,c,d){d=void 0===d?null:d;this.j=a;this.l=b;this.h=RH(this);var e="",f=!1;b.dataset&&b.dataset.shakaPlayerCastReceiverId?(f=b.dataset,e=f.shakaPlayerCastReceiverId,f="true"===f.shakaPlayerCastAndroidReceiverCompatible):c.dataset&&c.dataset.shakaPlayerCastReceiverId&&(f=c.dataset,e=f.shakaPlayerCastReceiverId,f="true"===f.shakaPlayerCastAndroidReceiverCompatible);e.length&&(this.h.castReceiverAppId=e,this.h.castAndroidReceiverCompatible=f);b.dataset.shakaPlayerContainer="";b.ui=this;
this.Rg()&&b.classList.add("shaka-mobile");this.g=new Z(a,b,c,d,this.h);c.controls||a.sh(b);b.ui=this;c.ui=this;this.i=new MH(this.l,this.g)}q=QH.prototype;q.destroy=function(){var a=this;return Q(function(b){if(1==b.g)return a.g?H(b,a.g.destroy(),2):b.A(2);if(4!=b.g)return a.g=null,a.j?H(b,a.j.destroy(),4):b.A(4);a.j=null;a.i=null;I(b)})};q.Rg=function(){return navigator.userAgentData?navigator.userAgentData.mobile:rc()||xc()};
q.getConfiguration=function(){var a=RH(this);Cn(a,this.h,RH(this),{},"");return a};q.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=Dn(a,b));var c=Object.assign({},this.h);Cn(c,a,RH(this),{},"");c.castReceiverAppId&&!c.overflowMenuButtons.includes("cast")&&c.overflowMenuButtons.push("cast");var d=Fn(c,this.h);Object.keys(d).length&&(this.h=c,this.g.configure(this.h),this.g.dispatchEvent(new T("uiupdated")))};q.Ij=function(){return this.g};q.wl=function(a){this.g.nh(a)};
q.Bf=function(a,b){this.i&&this.i.Bf(a,b)};q.uf=function(){this.i&&this.i.uf()};
function RH(a){var b={controlPanelElements:"play_pause time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:"captions quality language chapter picture_in_picture cast playback_rate recenter_vr toggle_stereoscopic".split(" "),statisticsList:"width height corruptedFrames decodedFrames droppedFrames drmTimeSeconds licenseTime liveLatency loadLatency bufferingTime manifestTimeSeconds estimatedBandwidth streamBandwidth maxSegmentDuration pauseTime playTime completionPercent manifestSizeBytes bytesDownloaded nonFatalErrorCount manifestPeriodCount manifestGapCount".split(" "),adStatisticsList:"loadTimes averageLoadTime started overlayAds playedCompletely skipped errors".split(" "),
contextMenuElements:["loop","picture_in_picture","save_video_frame","statistics","ad_statistics"],playbackRates:[.5,.75,1,1.25,1.5,1.75,2],fastForwardRates:[2,4,8,1],rewindRates:[-1,-2,-4,-8],addSeekBar:!0,addBigPlayButton:!1,customContextMenu:!1,castReceiverAppId:"",castAndroidReceiverCompatible:!1,clearBufferOnQualityChange:!0,showUnbufferedStart:!1,seekBarColors:{base:"rgba(255, 255, 255, 0.3)",buffered:"rgba(255, 255, 255, 0.54)",played:"rgb(255, 255, 255)",adBreaks:"rgb(255, 204, 0)"},volumeBarColors:{base:"rgba(255, 255, 255, 0.54)",
level:"rgb(255, 255, 255)"},trackLabelFormat:SH,textTrackLabelFormat:SH,fadeDelay:0,closeMenusDelay:2,doubleClickForFullscreen:!0,singleClickForPlayAndPause:!0,enableKeyboardPlaybackControls:!0,enableFullscreenOnRotation:!0,forceLandscapeOnFullscreen:!0,enableTooltips:!1,keyboardSeekDistance:5,keyboardLargeSeekDistance:60,fullScreenElement:a.l,preferDocumentPictureInPicture:!0,showAudioChannelCountVariants:!0,seekOnTaps:0<navigator.maxTouchPoints,tapSeekDistance:10,refreshTickInSeconds:.125,displayInVrMode:!1,
defaultVrProjectionMode:"equirectangular",setupMediaSession:!0,preferVideoFullScreenInVisionOS:!1,showAudioCodec:!0,showVideoCodec:!0};"remote"in HTMLMediaElement.prototype?b.overflowMenuButtons.push("remote"):window.WebKitPlaybackTargetAvailabilityEvent&&b.overflowMenuButtons.push("airplay");a.Rg()&&(b.addBigPlayButton=!0,b.controlPanelElements=b.controlPanelElements.filter(function(c){return"play_pause"!=c&&"volume"!=c}));b.overflowMenuButtons.push("save_video_frame");return b}
function TH(){var a,b,c,d,e,f,g,h,k,l,m,n,p,r,u,v,w,x,z,B,C,E;return Q(function(D){switch(D.g){case 1:JB();if(!hq())return UH("shaka-ui-load-failed",VH),D.return();a=document.querySelectorAll("[data-shaka-player-container]");b=document.querySelectorAll("[data-shaka-player]");c=document.querySelectorAll("[data-shaka-player-canvas]");d=document.querySelectorAll("[data-shaka-player-vr-canvas]");if(!b.length&&!a.length){D.A(2);break}if(b.length&&!a.length){e=t(b);for(f=e.next();!f.done;f=e.next())g=f.value,
g.ui||(h=document.createElement("div"),k=g.parentElement,k.replaceChild(h,g),h.appendChild(g),l=WH(h,c,d),m=l.pi,n=l.ij,XH(h,g,m,n));D.A(2);break}p=t(a);r=p.next();case 4:if(r.done){D.A(2);break}u=r.value;if(u.ui){D.A(5);break}v=null;w=t(b);for(x=w.next();!x.done;x=w.next())if(z=x.value,z.parentElement==u){v=z;break}v||(v=document.createElement("video"),v.setAttribute("playsinline",""),u.appendChild(v));B=WH(u,c,d);C=B.pi;E=B.ij;va(D,7);return H(D,XH(u,v,C,E),9);case 9:xa(D,5);break;case 7:return za(D),
UH("shaka-ui-load-failed",YH),D.return();case 5:r=p.next();D.A(4);break;case 2:UH("shaka-ui-loaded"),I(D)}})}function UH(a,b){var c=null;void 0!=b&&(c={reasonCode:b});a=new CustomEvent(a,{detail:c});document.dispatchEvent(a)}
function XH(a,b,c,d){var e,f,g,h,k,l,m,n,p,r;return Q(function(u){switch(u.g){case 1:e=new Y;f=new QH(e,a,b,d);e.Kh(c);b.controls&&f.g.Pi(!0);g=[];if(h=b.getAttribute("src"))g.push(h),b.removeAttribute("src");k=t(b.getElementsByTagName("source"));for(l=k.next();!l.done;l=k.next())m=l.value,g.push(m.src),b.removeChild(m);return H(u,e.Wb(b),2);case 2:n=t(g),p=n.next();case 3:if(p.done){u.A(0);break}r=p.value;va(u,6);return H(u,f.g.yc().load(r),8);case 8:u.A(0);break;case 6:za(u);case 4:p=n.next(),u.A(3)}})}
function WH(a,b,c){var d=null;b=t(b);for(var e=b.next();!e.done;e=b.next())if(e=e.value,e.parentElement==a){d=e;break}d||(d=document.createElement("canvas"),d.classList.add("shaka-canvas-container"),a.appendChild(d));b=null;c=t(c);for(e=c.next();!e.done;e=c.next())if(e=e.value,e.parentElement==a){b=e;break}b||(b=document.createElement("canvas"),b.classList.add("shaka-vr-canvas-container"),a.appendChild(b));return{pi:d,ij:b}}S("shaka.ui.Overlay",QH);QH.prototype.removeWatermark=QH.prototype.uf;
QH.prototype.setTextWatermark=QH.prototype.Bf;QH.prototype.setEnabled=QH.prototype.wl;QH.prototype.getControls=QH.prototype.Ij;QH.prototype.configure=QH.prototype.configure;QH.prototype.getConfiguration=QH.prototype.getConfiguration;QH.prototype.isMobile=QH.prototype.Rg;QH.prototype.destroy=QH.prototype.destroy;var SH=0;QH.TrackLabelFormat={LANGUAGE:SH,ROLE:1,LANGUAGE_ROLE:2,LABEL:3};var VH=0,YH=1;QH.FailReasonCode={NO_BROWSER_SUPPORT:VH,PLAYER_FAILED_TO_LOAD:YH};
"complete"==document.readyState?Q(function(a){if(1==a.g)return H(a,Promise.resolve(),2);TH();I(a)}):window.addEventListener("load",TH);function ZH(a,b,c,d,e,f,g,h){function k(K){var L="";"aac"==K?L="AAC":"ac-3"===K?L="Dolby":"ec-3"===K?L="DD+":"ac-4"===K?L="Dolby AC-4":"opus"===K?L="Opus":"flac"===K&&(L="fLaC");return L?" "+L:L}function l(K){var L="";5<=K&&(L=" "+e.resolve("SURROUND"));return L}function m(K,L,J,M,N,P){L=[K,L,P];g&&null!=M&&L.push(M);h&&n(K)&&N&&L.push(N);J&&3==f&&L.push(J);return L.join(": ")}function n(K){return r.has(K)&&1<r.get(K).size}for(var p=a.find(function(K){return 1==K.active}),r=new Map,u=t(a),v=u.next();!v.done;v=
u.next())v=v.value,v.codecs&&(r.has(v.language)||r.set(v.language,new Set),r.get(v.language).add(Tf(v.codecs)));u=EF(b);mk(b);b.appendChild(u);u=new Set;p=p?m(p.language,p.roles.join(", "),p.label,p.channelsCount,p.codecs,p.spatialAudio):"";a=t(a);var w=a.next();for(v={};!w.done;v={Vb:void 0},w=a.next()){v.Vb=w.value;w=v.Vb.language;var x=v.Vb.roles.join(", "),z=v.Vb.label,B=v.Vb.channelsCount,C=v.Vb.codecs&&Tf(v.Vb.codecs),E=v.Vb.spatialAudio,D=m(w,x,z,B,C,E);if(!u.has(D)){u.add(D);var A=kk();A.addEventListener("click",
function(K){return function(){c(K.Vb)}}(v));var F=W("span");A.appendChild(F);F.textContent=$H(w,e);var G="";h&&g&&E&&("ec-3"==C||"ac-4"==C)?G+=" Dolby Atmos":(h&&n(w)&&(G+=k(C)),g&&(G+=l(B)));switch(f){case SH:F.textContent+=G;break;case 1:F.textContent+=G;x?F.textContent=x:(db("Track #"+JSON.stringify(v.Vb)+" does not have a role, but the UI is configured to only show role."),F.textContent="?");break;case 2:F.textContent+=G;x&&(F.textContent+=": "+x);break;case 3:z?F.textContent=z:(db("Track #"+
JSON.stringify(v.Vb)+" does not have a label, but the UI is configured to only show labels."),F.textContent="?")}D==p&&(A.appendChild(HF()),F.classList.add("shaka-chosen-item"),A.ariaSelected="true",d.textContent=F.textContent);b.appendChild(A)}}}
function aI(a,b,c,d,e,f,g){function h(B,C,E){B=[B,C];E&&3==g&&B.push(E);return B.join(": ")}var k=a.find(function(B){return 1==B.active}),l=EF(b);mk(b);b.appendChild(l);l=new Set;k=k?h(k.language,k.roles.join(", "),k.label):"";a=t(a);for(var m=a.next(),n={};!m.done;n={Hc:void 0},m=a.next()){n.Hc=m.value;m=n.Hc.language;var p=n.Hc.forced,r=f.resolve("SUBTITLE_FORCED"),u=n.Hc.roles.join(", "),v=n.Hc.label,w=h(m,u,v);if(!l.has(w)){l.add(w);var x=kk();x.addEventListener("click",function(B){return function(){c(B.Hc)}}(n));
var z=W("span");x.appendChild(z);z.textContent=$H(m,f);switch(g){case SH:p&&(z.textContent+=" ("+r+")");break;case 1:u?z.textContent=u:(db("Track #"+n.Hc.id+" does not have a role, but the UI is configured to only show role."),z.textContent="?");p&&(z.textContent+=" ("+r+")");break;case 2:u&&(z.textContent+=": "+u);p&&(z.textContent+=" ("+r+")");break;case 3:v?z.textContent=v:(db("Track #"+n.Hc.id+" does not have a label, but the UI is configured to only show labels."),z.textContent="?")}d&&w==k&&
(x.appendChild(HF()),z.classList.add("shaka-chosen-item"),x.ariaSelected="true",e.textContent=z.textContent);b.appendChild(x)}}}function $H(a,b){if(!a&&!b)return"";switch(a){case "mul":return b.resolve("MULTIPLE_LANGUAGES");case "und":return b.resolve("UNDETERMINED_LANGUAGE");case "zxx":return b.resolve("NOT_APPLICABLE")}var c=nd(a);return a in zF?zF[a].D:c in zF?zF[c].D+" ("+a+")":b.resolve("UNRECOGNIZED_LANGUAGE")+" ("+a+")"};function bI(a,b,c){DF.call(this,a,b);var d=this;cI(this,c);dI(this);eI(this);this.eventManager.o(this.button,"click",function(){d.controls.Ca()&&(d.menu.classList.contains("shaka-hidden")?(d.controls.dispatchEvent(new T("submenuopen")),IF(d.menu,!0),GF(d.menu)):IF(d.menu,!1))})}oa(bI,DF);
function cI(a,b){a.button=kk();a.button.classList.add("shaka-overflow-button");a.icon=W("i");a.icon.classList.add("material-icons-round");a.icon.textContent=b;a.button.appendChild(a.icon);b=W("label");b.classList.add("shaka-overflow-button-label");b.classList.add("shaka-overflow-menu-only");a.nameSpan=W("span");b.appendChild(a.nameSpan);a.currentSelection=W("span");a.currentSelection.classList.add("shaka-current-selection-span");b.appendChild(a.currentSelection);a.button.appendChild(b);a.parent.appendChild(a.button)}
function dI(a){a.menu=W("div");a.menu.classList.add("shaka-no-propagation");a.menu.classList.add("shaka-show-controls-on-mouse-over");a.menu.classList.add("shaka-settings-menu");a.menu.classList.add("shaka-hidden");a.backButton=kk();a.backButton.classList.add("shaka-back-to-overflow-button");a.menu.appendChild(a.backButton);a.eventManager.o(a.backButton,"click",function(){a.controls.Tc()});var b=W("i");b.classList.add("material-icons-round");b.textContent="close";a.backButton.appendChild(b);a.backSpan=
W("span");a.backButton.appendChild(a.backSpan);a.controls.j.appendChild(a.menu)}function eI(a){a.parent.classList.contains("shaka-overflow-menu")&&(a.backButton.firstChild.textContent="arrow_back",a.eventManager.o(a.menu,"click",function(){function b(c){return 0==c.classList.contains("shaka-hidden")}IF(a.menu,!1);IF(a.parent,!0);pb(a.parent.childNodes,b)&&rb(a.parent.childNodes,b)[0].focus();PG(a.controls)}))}S("shaka.ui.SettingsMenu",bI);function fI(a,b){bI.call(this,a,b,"language");var c=this;this.button.classList.add("shaka-language-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-audio-languages");this.eventManager.o(this.localization,"locale-updated",function(){gI(c)});this.eventManager.o(this.localization,"locale-changed",function(){gI(c)});this.eventManager.o(this.player,"loading",function(){hI(c)});this.eventManager.o(this.player,"audiotrackschanged",function(){hI(c)});gI(this);hI(this)}
oa(fI,bI);function hI(a){var b=a.player.getAudioTracks();ZH(b,a.menu,function(c){a.player.Li(c)},a.currentSelection,a.localization,a.controls.g.trackLabelFormat,a.controls.g.showAudioChannelCountVariants,a.controls.g.showAudioCodec);GF(a.menu);a.controls.dispatchEvent(new T("languageselectionupdated"));a.button.setAttribute("shaka-status",a.currentSelection.innerText);IF(a.button,2<a.menu.getElementsByTagName("button").length)}
function gI(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("LANGUAGE");a.nameSpan.textContent=a.localization.resolve("LANGUAGE");a.backSpan.textContent=a.localization.resolve("LANGUAGE")}S("shaka.ui.AudioLanguageSelection",fI);function iI(){}iI.prototype.create=function(a,b){return new fI(a,b)};zH("language",new iI);XG("language",new iI);function jI(a,b){DF.call(this,a,b);var c=this;this.h=this.controls.G;this.g=kk();this.g.classList.add("shaka-cast-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="cast";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);kI(this);lI(this);this.eventManager.o(this.localization,"locale-updated",function(){kI(c)});this.eventManager.o(this.localization,"locale-changed",function(){kI(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&mI(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){lI(c)})}oa(jI,DF);
function mI(a){var b;Q(function(c){if(1==c.g){if(a.h.Va())return a.h.Zi(),c.A(0);va(c,3);a.g.disabled=!0;return H(c,a.h.cast(),5)}if(3!=c.g)return a.g.disabled=!1,xa(c,0);b=za(c);a.g.disabled=!1;8004!=b.code&&a.controls.dispatchEvent(new T("error",(new Map).set("detail",b)));I(c)})}function lI(a){var b=a.h.ag()&&a.controls.va,c=a.h.Va();IF(a.g,b);a.i.textContent=c?"cast_connected":"cast";b&&(a.g.ariaPressed=c?"true":"false");nI(a)}
function nI(a){a.j.textContent=a.h.Va()?a.h.rf():a.localization.resolve("OFF")}function kI(a){a.g.ariaLabel=a.localization.resolve("CAST");a.l.textContent=a.localization.resolve("CAST");nI(a)}S("shaka.ui.CastButton",jI);function oI(){}oI.prototype.create=function(a,b){return new jI(a,b)};zH("cast",new oI);XG("cast",new oI);function pI(a,b){bI.call(this,a,b,"bookmarks");var c=this;this.button.classList.add("shaka-chapter-button");this.menu.classList.add("shaka-chapters");this.button.classList.add("shaka-tooltip-status");this.g=[];this.h="und";this.eventManager.o(this.localization,"locale-updated",function(){qI(c);rI(c)});this.eventManager.o(this.localization,"locale-changed",function(){qI(c);rI(c)});this.eventManager.o(this.player,"unloading",function(){sI(c);c.h="und";c.g=[]});this.eventManager.o(this.player,"trackschanged",
function(){rI(c)});qI(this);rI(this)}oa(pI,bI);function qI(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("CHAPTERS");a.nameSpan.textContent=a.localization.resolve("CHAPTERS");a.backSpan.textContent=a.localization.resolve("CHAPTERS")}function sI(a){var b=EF(a.menu);mk(a.menu);a.menu.appendChild(b);IF(a.button,!1)}
function rI(a){function b(h,k){return!h&&!k||h.id===k.id&&h.title===k.title&&h.startTime===k.startTime&&h.endTime===k.endTime}for(var c="und",d=[],e=t(Array.from(a.localization.g)),f=e.next();!f.done&&(c=f.value,d=a.player.Eg(c)||[],!d.length);f=e.next());d.length||(c="und",d=a.player.Eg(c)||[]);e=c!==a.h;f=a.g.length!==d.length||!a.g.some(function(h,k){k=d.at(k);return b(h,k)||d.some(function(l){return b(h,l)})});a.h=c;a.g=d;if(!d.length)sI(a);else if(e||f){c=t(a.g);f=c.next();for(e={};!f.done;e=
{dg:void 0},f=c.next()){e.dg=f.value;f=kk();var g=W("span");g.classList.add("shaka-chapter");g.textContent=e.dg.title;f.appendChild(g);a.eventManager.o(f,"click",function(h){return function(){a.controls.Ca()&&(a.video.currentTime=h.dg.startTime)}}(e));a.menu.appendChild(f)}IF(a.button,!0);GF(a.menu)}}S("shaka.ui.ChapterSelection",pI);function tI(){}tI.prototype.create=function(a,b){return new pI(a,b)};zH("chapter",new tI);XG("chapter",new tI);function uI(a,b){DF.call(this,a,b);var c=this;this.g=kk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-fast-forward-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status","1x");this.g.textContent="fast_forward";this.parent.appendChild(this.g);vI(this);this.h=this.controls.g.fastForwardRates;this.eventManager.o(this.localization,"locale-updated",function(){vI(c)});this.eventManager.o(this.localization,"locale-changed",function(){vI(c)});
this.eventManager.o(this.g,"click",function(){if(c.controls.Ca()&&c.video.duration){var d=c.h.indexOf(c.player.Xa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Jc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",c.player.Xa()+"x")})}oa(uI,DF);function vI(a){a.g.ariaLabel=a.localization.resolve("FAST_FORWARD")}S("shaka.ui.FastForwardButton",uI);function wI(){}
wI.prototype.create=function(a,b){return new uI(a,b)};XG("fast_forward",new wI);function xI(a,b){DF.call(this,a,b);var c=this;this.h=this.controls.m;this.g=kk();this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons-round");this.g.classList.add("shaka-tooltip");yI(this);this.g.textContent="fullscreen";this.parent.appendChild(this.g);zI(this);this.eventManager.o(this.localization,"locale-updated",function(){zI(c)});this.eventManager.o(this.localization,"locale-changed",function(){zI(c)});this.eventManager.o(this.g,"click",function(){return Q(function(d){return c.controls.Ca()?
H(d,c.controls.Ef(),0):d.return()})});this.eventManager.o(document,"fullscreenchange",function(){c.g.textContent=c.controls.vd()?"fullscreen_exit":"fullscreen";zI(c)});this.eventManager.o(this.h,"loadedmetadata",function(){yI(c)});this.eventManager.o(this.h,"loadeddata",function(){yI(c)});this.eventManager.o(this.adManager,"ad-started",function(){yI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){yI(c)})}oa(xI,DF);
function yI(a){a.controls.Zd()?a.g.classList.remove("shaka-hidden"):a.g.classList.add("shaka-hidden")}function zI(a){var b=a.controls.vd()?"EXIT_FULL_SCREEN":"FULL_SCREEN";a.g.ariaLabel=a.localization.resolve(b)}S("shaka.ui.FullscreenButton",xI);function AI(){}AI.prototype.create=function(a,b){return new xI(a,b)};XG("fullscreen",new AI);function BI(a,b){DF.call(this,a,b);var c=this;this.g=kk();this.g.classList.add("shaka-loop-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="repeat";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.l=W("span");this.l.textContent=this.localization.resolve("LOOP");a.appendChild(this.l);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
a.appendChild(this.j);this.g.appendChild(a);CI(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){CI(c)});this.eventManager.o(this.localization,"locale-changed",function(){CI(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&(c.video.loop=!c.video.loop,c.h.Ia(),c.h.xa(1))});this.m=this.video.loop;this.h=new bc(function(){c.m!=c.video.loop&&(CI(c),c.m=c.video.loop)});this.h.xa(1)}oa(BI,DF);
BI.prototype.release=function(){this.h.stop();this.h=null;DF.prototype.release.call(this)};function CI(a){a.l.textContent=a.localization.resolve("LOOP");a.j.textContent=a.localization.resolve(a.video.loop?"ON":"OFF");a.i.textContent=a.video.loop?"repeat_on":"repeat";a.g.ariaLabel=a.localization.resolve(a.video.loop?"EXIT_LOOP_MODE":"ENTER_LOOP_MODE")}S("shaka.ui.LoopButton",BI);function DI(){}DI.prototype.create=function(a,b){return new BI(a,b)};zH("loop",new DI);XG("loop",new DI);PF("loop",new DI);function EI(a,b){DF.call(this,a,b);var c=this;this.g=kk();this.g.classList.add("shaka-mute-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="volume_up";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("MUTE");a.appendChild(this.i);this.j=W("span");this.j.classList.add("shaka-current-selection-span");
a.appendChild(this.j);this.g.appendChild(a);this.parent.appendChild(this.g);FI(this);GI(this);this.eventManager.o(this.localization,"locale-updated",function(){FI(c)});this.eventManager.o(this.localization,"locale-changed",function(){FI(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&(c.ad&&c.ad.isLinear()?c.ad.setMuted(!c.ad.isMuted()):c.video.muted||0!=c.video.volume?c.video.muted=!c.video.muted:c.video.volume=1)});this.eventManager.o(this.video,"volumechange",function(){FI(c);
GI(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){FI(c);GI(c)});this.eventManager.o(this.adManager,"ad-muted",function(){FI(c);GI(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){c.ad=null;FI(c);GI(c)})}oa(EI,DF);function FI(a){var b=a.ad?a.ad.isMuted()?"UNMUTE":"MUTE":a.video.muted||0==a.video.volume?"UNMUTE":"MUTE";a.g.ariaLabel=a.localization.resolve(b);a.i.textContent=a.localization.resolve(b)}
function GI(a){var b=a.ad?a.ad.isMuted()?"volume_off":"volume_up":a.video.muted||0==a.video.volume?"volume_off":"volume_up";a.h.textContent=b}S("shaka.ui.MuteButton",EI);function HI(){}HI.prototype.create=function(a,b){return new EI(a,b)};zH("mute",new HI);XG("mute",new HI);PF("mute",new HI);function II(a,b){DF.call(this,a,b);var c=this;this.l=this.controls.m;this.g=kk();this.g.classList.add("shaka-pip-button");this.g.classList.add("shaka-tooltip");this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent="picture_in_picture_alt";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");this.j.textContent=this.localization.resolve("PICTURE_IN_PICTURE");a.appendChild(this.j);this.h=
W("span");this.h.classList.add("shaka-current-selection-span");a.appendChild(this.h);this.g.appendChild(a);JI(this);this.parent.appendChild(this.g);this.controls.We()||IF(this.g,!1);this.eventManager.o(this.localization,"locale-updated",function(){JI(c)});this.eventManager.o(this.localization,"locale-changed",function(){JI(c)});this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.controls.Hd()});this.eventManager.o(this.l,"enterpictureinpicture",function(){KI(c)});this.eventManager.o(this.l,
"leavepictureinpicture",function(){LI(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){MI(c)});this.eventManager.o(this.player,"trackschanged",function(){MI(c)});"documentPictureInPicture"in window&&this.eventManager.o(window.documentPictureInPicture,"enter",function(d){KI(c);c.eventManager.ra(d.window,"pagehide",function(){LI(c)})})}oa(II,DF);
function KI(a){a.i.textContent="branding_watermark";a.g.ariaLabel=a.localization.resolve("EXIT_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("ON")}function LI(a){a.i.textContent="picture_in_picture_alt";a.g.ariaLabel=a.localization.resolve("ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve("OFF")}
function JI(a){a.j.textContent=a.localization.resolve("PICTURE_IN_PICTURE");var b=a.controls.Xe();a.g.ariaLabel=a.localization.resolve(b?"EXIT_PICTURE_IN_PICTURE":"ENTER_PICTURE_IN_PICTURE");a.h.textContent=a.localization.resolve(b?"ON":"OFF")}function MI(a){Q(function(b){if(!a.controls.We())return IF(a.g,!1),a.controls.Xe()?H(b,a.controls.Hd(),0):b.A(0);if(!a.player||!a.player.Vc())return IF(a.g,!0),b.A(0);IF(a.g,!1);return a.controls.Xe()?H(b,a.controls.Hd(),0):b.A(0)})}S("shaka.ui.PipButton",II);
function NI(){}NI.prototype.create=function(a,b){return new II(a,b)};zH("picture_in_picture",new NI);XG("picture_in_picture",new NI);PF("picture_in_picture",new NI);function OI(a,b){bI.call(this,a,b,"slow_motion_video");var c=this;this.button.classList.add("shaka-playbackrate-button");this.menu.classList.add("shaka-playback-rates");this.button.classList.add("shaka-tooltip-status");this.eventManager.o(this.localization,"locale-updated",function(){PI(c)});this.eventManager.o(this.localization,"locale-changed",function(){PI(c)});this.eventManager.o(this.player,"loaded",function(){QI(c)});this.eventManager.o(this.player,"ratechange",function(){QI(c)});PI(this);$I(this);
QI(this)}oa(OI,bI);function PI(a){a.backButton.ariaLabel=a.localization.resolve("BACK");a.button.ariaLabel=a.localization.resolve("PLAYBACK_RATE");a.nameSpan.textContent=a.localization.resolve("PLAYBACK_RATE");a.backSpan.textContent=a.localization.resolve("PLAYBACK_RATE")}
function QI(a){var b=a.player.Xa(),c=FF(a.menu,"material-icons-round shaka-chosen-item");if(c){var d=c.parentElement;d.removeAttribute("aria-selected");d.getElementsByTagName("span")[0].classList.remove("shaka-chosen-item");d.removeChild(c)}if(c=Array.from(a.menu.querySelectorAll("span")).find(function(e){return e.textContent==b+"x"}))d=c.parentElement,d.appendChild(HF()),d.ariaSelected="true",c.classList.add("shaka-chosen-item");a.currentSelection.textContent=b+"x";a.button.setAttribute("shaka-status",
b+"x")}function $I(a){for(var b=t(a.controls.g.playbackRates),c=b.next(),d={};!c.done;d={qf:void 0},c=b.next()){d.qf=c.value;c=kk();var e=W("span");e.textContent=d.qf+"x";c.appendChild(e);a.eventManager.o(c,"click",function(f){return function(){f.qf==a.video.defaultPlaybackRate?a.player.ld():a.player.Jc(f.qf,!1)}}(d));a.menu.appendChild(c)}GF(a.menu)}S("shaka.ui.PlaybackRateSelection",OI);function aJ(){}aJ.prototype.create=function(a,b){return new OI(a,b)};zH("playback_rate",new aJ);
XG("playback_rate",new aJ);function bJ(a,b){DF.call(this,a,b);var c=this;this.g=kk();this.g.classList.add("shaka-current-time");cJ(this,"0:00");this.parent.appendChild(this.g);this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.player.V()&&(c.video.currentTime=c.player.ya().end)});this.eventManager.o(this.player,"loading",function(){IF(c.g,!0)});this.eventManager.o(this.controls,"timeandseekrangeupdated",function(){var d=c.controls.U,e=c.controls.Fg(),f=c.player.ya(),g=f.end-f.start;isFinite(g)?c.player.V()?(e=
Math.max(0,Math.floor(f.end-e)),g=3600<=g,1<=e||d?(cJ(c,"- "+JF(e,g)),c.g.disabled=!1):(cJ(c,c.localization.resolve("LIVE")),c.g.disabled=!0)):(d=3600<=g,e=JF(Math.max(0,e-f.start),d),g&&(e+=" / "+JF(g,d)),cJ(c,e),c.g.disabled=!0):(cJ(c,c.localization.resolve("LIVE")),c.g.disabled=!0)});this.eventManager.o(this.player,"trackschanged",function(){c.player.V()&&(c.g.ariaLabel=c.localization.resolve("SKIP_TO_LIVE"))});this.eventManager.o(this.adManager,"ad-started",function(){IF(c.g,!c.ad.isLinear())});
this.eventManager.o(this.adManager,"ad-stopped",function(){IF(c.g,!0)})}oa(bJ,DF);function cJ(a,b){b!=a.g.textContent&&(a.g.textContent=b)}S("shaka.ui.PresentationTimeTracker",bJ);function dJ(){}dJ.prototype.create=function(a,b){return new bJ(a,b)};XG("time_and_duration",new dJ);function eJ(a,b){DF.call(this,a,b);var c=this;this.g=kk();this.g.classList.add("shaka-recenter-vr-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="control_camera";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);fJ(this);this.eventManager.o(this.localization,"locale-updated",function(){fJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){fJ(c)});var d=this.controls.C;this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&(d.g?GG(d.g):db("Not playing VR content"))});this.eventManager.o(d,"vrstatuschanged",function(){IF(c.g,c.controls.Nb())});IF(this.g,this.controls.Nb())}oa(eJ,DF);
function fJ(a){a.g.ariaLabel=a.localization.resolve("RECENTER_VR");a.j.textContent=a.localization.resolve("RECENTER_VR")}S("shaka.ui.RecenterVRButton",eJ);function gJ(){}gJ.prototype.create=function(a,b){return new eJ(a,b)};zH("recenter_vr",new gJ);XG("recenter_vr",new gJ);function hJ(a,b){DF.call(this,a,b);var c=this;this.j=oc();this.g=kk();this.g.classList.add("shaka-remote-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.i=W("i");this.i.classList.add("material-icons-round");this.i.textContent=this.j?"airplay":"cast";this.g.appendChild(this.i);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.m=W("span");a.appendChild(this.m);this.l=W("span");this.l.classList.add("shaka-current-selection-span");
a.appendChild(this.l);this.g.appendChild(a);this.parent.appendChild(this.g);this.h=-1;iJ(this);IF(this.g,!1);this.video.remote?(this.eventManager.o(this.localization,"locale-updated",function(){iJ(c)}),this.eventManager.o(this.localization,"locale-changed",function(){iJ(c)}),this.eventManager.o(this.controls,"caststatuschanged",function(){jJ(c)}),this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&c.video.remote.prompt()}),this.eventManager.o(this.video.remote,"connect",function(){jJ(c);
kJ(c)}),this.eventManager.o(this.video.remote,"connecting",function(){jJ(c);kJ(c)}),this.eventManager.o(this.video.remote,"disconnect",function(){jJ(c);kJ(c)}),this.eventManager.o(this.player,"loaded",function(){jJ(c)}),jJ(this,!0),kJ(this)):this.g.classList.add("shaka-hidden")}oa(hJ,DF);hJ.prototype.release=function(){this.video.remote&&-1!=this.h&&this.video.remote.cancelWatchAvailability(this.h).catch(function(){});DF.prototype.release.call(this)};
function jJ(a,b){b=void 0===b?!1:b;var c,d;Q(function(e){switch(e.g){case 1:if(a.controls.G.ag()&&a.controls.va||!a.video.remote){IF(a.g,!1);-1!=a.h&&(a.video.remote.cancelWatchAvailability(a.h),a.h=-1);e.A(0);break}if("disconnected"==a.video.remote.state||b){c=function(f){if(a.player){var g=a.video.disableRemotePlayback,h=!0;oc()&&a.player.m==Hq&&"HLS"!=a.player.Ig()&&(h=!1);IF(a.g,h&&f&&!g)}else IF(a.g,!1)};va(e,7);if(-1==a.h){e.A(9);break}return H(e,a.video.remote.cancelWatchAvailability(a.h),
10)}if(-1==a.h){e.A(0);break}return H(e,a.video.remote.cancelWatchAvailability(a.h),6);case 6:a.h=-1;e.A(0);break;case 10:a.h=-1;case 9:xa(e,8);break;case 7:za(e);case 8:return va(e,11),H(e,a.video.remote.watchAvailability(c),13);case 13:d=e.h;a.h=d;xa(e,0);break;case 11:za(e),c(!0),I(e)}})}function iJ(a){var b=a.j?a.localization.resolve("AIRPLAY"):a.localization.resolve("CAST");a.g.ariaLabel=b;a.m.textContent=b}
function kJ(a){a.j||(a.i.textContent="disconnected"==a.video.remote.state?"cast":"cast_connected")}S("shaka.ui.RemoteButton",hJ);function lJ(){}lJ.prototype.create=function(a,b){return new hJ(a,b)};zH("remote",new lJ);XG("remote",new lJ);function mJ(a,b){bI.call(this,a,b,"settings");var c=this;this.button.classList.add("shaka-resolution-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-resolutions");this.eventManager.o(this.localization,"locale-updated",function(){nJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){nJ(c)});this.eventManager.o(this.player,"loading",function(){oJ(c)});this.eventManager.o(this.player,"variantchanged",function(){oJ(c)});this.eventManager.o(this.player,
"trackschanged",function(){oJ(c)});this.eventManager.o(this.player,"abrstatuschanged",function(){oJ(c)});oJ(this)}oa(mJ,bI);
function oJ(a){var b=[];a.player.m!=Zq&&(b=a.player.Mb());var c=b.find(function(k){return k.active});c&&(b=b.filter(function(k){if(k.language!=c.language||a.controls.g.showAudioChannelCountVariants&&k.channelsCount&&c.channelsCount&&k.channelsCount!=c.channelsCount)return!1;var l=a.controls.g.trackLabelFormat;return(1==l||2==l)&&JSON.stringify(k.audioRoles)!=JSON.stringify(c.audioRoles)||3==l&&k.label!=c.label?!1:!0}));b=a.player.Vc()?b.filter(function(k,l){return b.findIndex(function(m){return m.bandwidth==
k.bandwidth})==l}):1<[].concat(y(new Set(b.map(function(k){return k.audioId})))).filter(kg).length?b.filter(function(k,l){return b.findIndex(function(m){var n=m.height==k.height&&m.videoBandwidth==k.videoBandwidth&&m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout;n&&a.controls.g.showVideoCodec&&m.videoCodec&&k.videoCodec&&(n=Tf(m.videoCodec)==Tf(k.videoCodec));return n})==l}):b.filter(function(k,l){return b.findIndex(function(m){var n=m.height==k.height&&m.bandwidth==k.bandwidth&&
m.frameRate==k.frameRate&&m.hdr==k.hdr&&m.videoLayout==k.videoLayout;n&&a.controls.g.showVideoCodec&&m.videoCodec&&k.videoCodec&&(n=Tf(m.videoCodec)==Tf(k.videoCodec));return n})==l});a.player.Vc()?b.sort(function(k,l){return l.bandwidth-k.bandwidth}):b.sort(function(k,l){return l.height==k.height||null==k.height||null==l.height?l.bandwidth-k.bandwidth:l.height-k.height});var d=EF(a.menu);mk(a.menu);a.menu.appendChild(d);d=a.player.getConfiguration().abr.enabled;for(var e=t(b),f=e.next(),g={};!f.done;g=
{Ic:void 0},f=e.next()){g.Ic=f.value;f=kk();f.classList.add("explicit-resolution");a.eventManager.o(f,"click",function(k){return function(){var l=k.Ic;a.player.configure({abr:{enabled:!1}});a.player.le(l,a.controls.g.clearBufferOnQualityChange)}}(g));var h=W("span");h.textContent=!a.player.Vc()&&g.Ic.height&&g.Ic.width?pJ(a,g.Ic,b):g.Ic.bandwidth?Math.round(g.Ic.bandwidth/1E3)+" kbits/s":"Unknown";f.appendChild(h);d||g.Ic!=c||(f.ariaSelected="true",f.appendChild(HF()),h.classList.add("shaka-chosen-item"),
a.currentSelection.textContent=h.textContent);a.menu.appendChild(f)}e=kk();e.classList.add("shaka-enable-abr-button");a.eventManager.o(e,"click",function(){a.player.configure({abr:{enabled:!0}});oJ(a)});a.g=W("span");a.g.classList.add("shaka-auto-span");a.g.textContent=a.localization.resolve("AUTO_QUALITY");e.appendChild(a.g);d&&(e.ariaSelected="true",e.appendChild(HF()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"));a.button.setAttribute("shaka-status",
a.currentSelection.textContent);a.menu.appendChild(e);GF(a.menu);a.controls.dispatchEvent(new T("resolutionselectionupdated"));nJ(a);IF(a.button,1<b.length)}
function pJ(a,b,c){function d(l,m){return l!=m&&l.height==m.height&&l.hdr==m.hdr&&Math.round(l.frameRate||0)==Math.round(m.frameRate||0)}var e=b.height||0,f=b.width||0,g=e;f/e>16/9&&(g=Math.round(9*f/16));f=g+"p";if(2160==g||2160==e)f="4K";e=new Set;g=t(c);for(var h=g.next();!h.done;h=g.next())h=h.value,h.frameRate&&e.add(Math.round(h.frameRate));1<e.size&&(e=b.frameRate)&&(50<=e||20>=e)&&(f+=Math.round(b.frameRate));if("PQ"==b.hdr||"HLG"==b.hdr)f+=" (HDR)";"CH-STEREO"==b.videoLayout&&(f+=" (3D)");
if(c.some(function(l){return d(b,l)})&&(c.some(function(l){return d(b,l)&&(l.videoBandwidth||l.bandwidth)==(b.videoBandwidth||b.bandwidth)})||(f+=" ("+Math.round((b.videoBandwidth||b.bandwidth)/1E3)+" kbits/s)"),a.controls.g.showVideoCodec)){var k=function(l){var m="";l&&(l=Tf(l),m=l.startsWith("dovi-")?"Dolby Vision":l.toUpperCase());return m?" "+m:m};c.some(function(l){return d(b,l)&&k(l.videoCodec)!=k(b.videoCodec)})&&(f+=k(b.videoCodec))}return f}
function nJ(a){var b=a.player.Vc()?"QUALITY":"RESOLUTION";a.button.ariaLabel=a.localization.resolve(b);a.backButton.ariaLabel=a.localization.resolve(b);a.backSpan.textContent=a.localization.resolve(b);a.nameSpan.textContent=a.localization.resolve(b);a.g.textContent=a.localization.resolve("AUTO_QUALITY");a.player.getConfiguration().abr.enabled&&(a.currentSelection.textContent=a.localization.resolve("AUTO_QUALITY"))}S("shaka.ui.ResolutionSelection",mJ);function qJ(){}
qJ.prototype.create=function(a,b){return new mJ(a,b)};zH("quality",new qJ);XG("quality",new qJ);function rJ(a,b){DF.call(this,a,b);var c=this;this.g=kk();this.g.classList.add("material-icons-round");this.g.classList.add("shaka-rewind-button");this.g.classList.add("shaka-tooltip-status");this.g.setAttribute("shaka-status",this.localization.resolve("OFF"));this.g.textContent="fast_rewind";this.parent.appendChild(this.g);sJ(this);this.h=this.controls.g.rewindRates;this.eventManager.o(this.localization,"locale-updated",function(){sJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){sJ(c)});
this.eventManager.o(this.g,"click",function(){if(c.controls.Ca()&&c.video.duration){var d=c.h.indexOf(c.player.Xa())+1;d=d!=c.h.length?c.h[d]:c.h[0];c.video.paused&&c.video.play();c.player.Jc(d);c.g.setAttribute("shaka-status",d+"x")}});this.eventManager.o(this.player,"ratechange",function(){c.g.setAttribute("shaka-status",c.player.Xa()+"x")})}oa(rJ,DF);function sJ(a){a.g.ariaLabel=a.localization.resolve("REWIND")}S("shaka.ui.RewindButton",rJ);function tJ(){}
tJ.prototype.create=function(a,b){return new rJ(a,b)};XG("rewind",new tJ);function uJ(a,b){DF.call(this,a,b);var c=this;this.l=this.controls.G;this.g=kk();this.g.classList.add("shaka-save.video-frame-button");this.g.classList.add("shaka-tooltip");this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="download";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.i=W("span");this.i.textContent=this.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.appendChild(this.i);
this.j=W("span");this.j.classList.add("shaka-current-selection-span");a.appendChild(this.j);this.g.appendChild(a);vJ(this);this.parent.appendChild(this.g);this.eventManager.o(this.localization,"locale-updated",function(){vJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){vJ(c)});this.eventManager.o(this.g,"click",function(){var d=document.createElement("canvas"),e=d.getContext("2d"),f=c.controls.m;d.width=f.videoWidth;d.height=f.videoHeight;e.drawImage(f,0,0,d.width,d.height);
d=d.toDataURL("image/png");e=document.createElement("a");e.href=d;e.download="videoframe_"+f.currentTime.toFixed(3)+".png";e.click()});this.eventManager.o(this.controls.C,"vrstatuschanged",function(){wJ(c)});this.eventManager.o(this.adManager,"ad-started",function(){wJ(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){wJ(c)});this.eventManager.o(this.player,"unloading",function(){wJ(c)});this.eventManager.o(this.player,"loaded",function(){wJ(c)});this.eventManager.o(this.player,"loaded",
function(){wJ(c)});this.eventManager.o(this.video,"play",function(){wJ(c)});this.eventManager.o(this.video,"pause",function(){wJ(c)});this.eventManager.o(this.video,"seeking",function(){wJ(c)});this.eventManager.o(this.controls,"caststatuschanged",function(){wJ(c)});wJ(this)}oa(uJ,DF);function wJ(a){var b=!0;a.controls.Nb()&&(b=!1);b&&a.l.Va()&&(b=!1);b&&(a.player.drmInfo()||a.player.Vc())&&(b=!1);b&&a.ad&&(b=!1);b&&a.video.remote&&"disconnected"!=a.video.remote.state&&(b=!1);IF(a.g,b)}
function vJ(a){a.g.ariaLabel=a.localization.resolve("DOWNLOAD_VIDEO_FRAME");a.i.textContent=a.localization.resolve("DOWNLOAD_VIDEO_FRAME")}S("shaka.ui.SaveVideoFrameButton",uJ);function xJ(){}xJ.prototype.create=function(a,b){return new uJ(a,b)};zH("save_video_frame",new xJ);PF("save_video_frame",new xJ);function yJ(a,b){RF.call(this,a,b);this.button.classList.add("shaka-small-play-button");this.button.classList.add("material-icons-round");this.button.classList.add("shaka-tooltip");this.h();this.g()}oa(yJ,RF);yJ.prototype.h=function(){this.isEnded()?this.button.textContent="replay":this.button.textContent=this.isPaused()?"play_arrow":"pause"};
yJ.prototype.g=function(){if(this.isEnded())this.button.ariaLabel=this.localization.resolve("REPLAY");else{var a=this.isPaused()?"PLAY":"PAUSE";this.button.ariaLabel=this.localization.resolve(a)}};S("shaka.ui.SmallPlayButton",yJ);function zJ(){}zJ.prototype.create=function(a,b){return new yJ(a,b)};XG("play_pause",new zJ);function AJ(a,b){DF.call(this,a,b);a=W("div");a.classList.add("shaka-spacer");a.ariaHidden="true";this.parent.appendChild(a)}oa(AJ,DF);S("shaka.ui.Spacer",AJ);function BJ(){}BJ.prototype.create=function(a,b){return new AJ(a,b)};XG("spacer",new BJ);function CJ(a,b){function c(m){m=parseInt(l.g[m],10);return 2E9<m?(m/1E9).toFixed(2)+"GB":1E6<m?(m/1E6).toFixed(2)+"MB":1E3<m?(m/1E3).toFixed(2)+"KB":m+"B"}function d(m){return l.g[m]+" (gaps)"}function e(m){return JF(l.g[m],!1)+" (m)"}function f(m){return Math.round(l.g[m]/1E3)+" (kbits/s)"}function g(m){return l.g[m].toFixed(2)+" (s)"}function h(m){return l.g[m]+" (frames)"}function k(m){return l.g[m]+" (px)"}DF.call(this,a,b);var l=this;this.i=kk();this.i.classList.add("shaka-statistics-button");
this.j=W("i");this.j.classList.add("material-icons-round");this.j.textContent="insert_chart_outlined";this.i.appendChild(this.j);a=W("label");a.classList.add("shaka-overflow-button-label");this.u=W("span");a.appendChild(this.u);this.m=W("span");this.m.classList.add("shaka-current-selection-span");a.appendChild(this.m);this.i.appendChild(a);this.parent.appendChild(this.i);this.h=W("div");this.h.classList.add("shaka-no-propagation");this.h.classList.add("shaka-show-controls-on-mouse-over");this.h.classList.add("shaka-statistics-container");
this.h.classList.add("shaka-hidden");this.controls.j.appendChild(this.h);this.C=[];this.G=["stateHistory","switchHistory"];this.g=this.player.getStats();this.s=new Map;this.B=(new Map).set("width",k).set("height",k).set("completionPercent",function(m){return l.g[m]+" (%)"}).set("bufferingTime",g).set("drmTimeSeconds",g).set("licenseTime",g).set("liveLatency",g).set("loadLatency",g).set("manifestTimeSeconds",g).set("estimatedBandwidth",f).set("streamBandwidth",f).set("maxSegmentDuration",g).set("pauseTime",
e).set("playTime",e).set("corruptedFrames",h).set("decodedFrames",h).set("droppedFrames",h).set("stallsDetected",function(m){return l.g[m]+" (stalls)"}).set("gapsJumped",d).set("manifestSizeBytes",c).set("bytesDownloaded",c).set("nonFatalErrorCount",function(m){return l.g[m]+" (errors)"}).set("manifestPeriodCount",function(m){return l.g[m]+" (periods)"}).set("manifestGapCount",d);this.l=new bc(function(){l.g=l.player.getStats();for(var m=t(l.C),n=m.next();!n.done;n=m.next()){n=n.value;var p=l.s.get(n);
p.textContent=l.B.get(n)(n);p&&p.parentElement&&IF(p.parentElement,!isNaN(l.g[n]))}});DJ(this);EJ(this);this.eventManager.o(this.localization,"locale-updated",function(){DJ(l)});this.eventManager.o(this.localization,"locale-changed",function(){DJ(l)});this.eventManager.o(this.i,"click",function(){FJ(l);DJ(l)})}oa(CJ,DF);function FJ(a){a.h.classList.contains("shaka-hidden")?(a.j.textContent="insert_chart",a.l.xa(.1),IF(a.h,!0)):(a.j.textContent="insert_chart_outlined",a.l.stop(),IF(a.h,!1))}
function DJ(a){a.u.textContent=a.localization.resolve("STATISTICS");a.i.ariaLabel=a.localization.resolve("STATISTICS");a.m.textContent=a.localization.resolve(a.h.classList.contains("shaka-hidden")?"OFF":"ON")}function GJ(a,b){var c=W("div"),d=W("label");d.textContent=b+":";c.appendChild(d);d=W("span");d.textContent=a.B.get(b)(b);c.appendChild(d);a.s.set(b,d);return c}
function EJ(a){var b=W("div");b.classList.add("shaka-no-propagation");b.classList.add("shaka-statistics-close");var c=W("i");c.classList.add("material-icons-round");c.textContent="close";b.appendChild(c);a.h.appendChild(b);a.eventManager.o(c,"click",function(){FJ(a)});b=t(a.controls.g.statisticsList);for(c=b.next();!c.done;c=b.next())if(c=c.value,c in a.g&&!a.G.includes(c)){var d=GJ(a,c);a.h.appendChild(d);a.C.push(c)}else db("Unrecognized statistic element:",c)}
CJ.prototype.release=function(){this.l.stop();this.l=null;DF.prototype.release.call(this)};S("shaka.ui.StatisticsButton",CJ);function HJ(){}HJ.prototype.create=function(a,b){return new CJ(a,b)};zH("statistics",new HJ);PF("statistics",new HJ);function IJ(a,b){bI.call(this,a,b,"closed_caption");var c=this;this.button.classList.add("shaka-caption-button");this.button.classList.add("shaka-tooltip-status");this.menu.classList.add("shaka-text-languages");this.player&&this.player.Xc()?this.button.ariaPressed="true":this.button.ariaPressed="false";JJ(this);this.eventManager.o(this.localization,"locale-updated",function(){KJ(c);LJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){KJ(c);LJ(c)});this.eventManager.o(this.player,
"loading",function(){MJ(c)});this.eventManager.o(this.player,"texttrackvisibility",function(){NJ(c);LJ(c)});this.eventManager.o(this.player,"textchanged",function(){LJ(c)});this.eventManager.o(this.player,"trackschanged",function(){MJ(c)});NJ(this);KJ(this);LJ(this);MJ(this)}oa(IJ,bI);function JJ(a){var b=kk();b.ariaSelected="true";a.menu.appendChild(b);b.appendChild(HF());a.g=W("span");a.g.classList.add("shaka-auto-span");b.appendChild(a.g)}
function NJ(a){a.player.Xc()?(a.icon.textContent="closed_caption",a.button.ariaPressed="true"):(a.icon.textContent="closed_caption_disabled",a.button.ariaPressed="false");a.controls.dispatchEvent(new T("captionselectionupdated"))}
function LJ(a){var b=a.player.jc();aI(b,a.menu,function(c){return OJ(a,c)},a.player.Xc(),a.currentSelection,a.localization,a.controls.g.textTrackLabelFormat);b=kk();b.classList.add("shaka-turn-captions-off-button");a.eventManager.o(b,"click",function(){a.player.Af(!1);LJ(a)});b.appendChild(a.g);a.menu.appendChild(b);a.player.Xc()||(b.ariaSelected="true",b.appendChild(HF()),a.g.classList.add("shaka-chosen-item"),a.currentSelection.textContent=a.localization.resolve("OFF"));a.button.setAttribute("shaka-status",
a.currentSelection.textContent);GF(a.menu);a.controls.dispatchEvent(new T("captionselectionupdated"))}function OJ(a,b){return Q(function(c){a.player.kh(b);return H(c,a.player.Af(!0),0)})}function KJ(a){a.button.ariaLabel=a.localization.resolve("CAPTIONS");a.backButton.ariaLabel=a.localization.resolve("BACK");a.nameSpan.textContent=a.localization.resolve("CAPTIONS");a.backSpan.textContent=a.localization.resolve("CAPTIONS");a.g.textContent=a.localization.resolve("OFF")}
function MJ(a){var b=0<a.player.jc().length;IF(a.button,b);LJ(a)}S("shaka.ui.TextSelection",IJ);function PJ(){}PJ.prototype.create=function(a,b){return new IJ(a,b)};zH("captions",new PJ);XG("captions",new PJ);function QJ(a,b){DF.call(this,a,b);var c=this;this.g=kk();this.g.classList.add("shaka-toggle-stereoscopic-button");this.g.classList.add("shaka-tooltip");this.g.ariaPressed="false";this.h=W("i");this.h.classList.add("material-icons-round");this.h.textContent="3d_rotation";this.g.appendChild(this.h);a=W("label");a.classList.add("shaka-overflow-button-label");a.classList.add("shaka-overflow-menu-only");this.j=W("span");a.appendChild(this.j);this.i=W("span");this.i.classList.add("shaka-current-selection-span");
a.appendChild(this.i);this.g.appendChild(a);this.parent.appendChild(this.g);RJ(this);this.eventManager.o(this.localization,"locale-updated",function(){RJ(c)});this.eventManager.o(this.localization,"locale-changed",function(){RJ(c)});var d=this.controls.C;this.eventManager.o(this.g,"click",function(){c.controls.Ca()&&d.Id()});this.eventManager.o(d,"vrstatuschanged",function(){IF(c.g,c.controls.Nb())});IF(this.g,this.controls.Nb())}oa(QJ,DF);
function RJ(a){a.g.ariaLabel=a.localization.resolve("TOGGLE_STEREOSCOPIC");a.j.textContent=a.localization.resolve("TOGGLE_STEREOSCOPIC")}S("shaka.ui.ToggleStereoscopicButton",QJ);function SJ(){}SJ.prototype.create=function(a,b){return new QJ(a,b)};zH("toggle_stereoscopic",new SJ);XG("toggle_stereoscopic",new SJ);function TJ(a,b){YF.call(this,a,b,["shaka-volume-bar-container"],["shaka-volume-bar"]);var c=this;this.g=this.controls.g;this.setRange(0,100);this.eventManager.o(this.video,"volumechange",function(){return UJ(c)});this.eventManager.o(this.adManager,"ad-volume-changed",function(){return VJ(c)});this.eventManager.o(this.adManager,"ad-muted",function(){return VJ(c)});this.eventManager.o(this.adManager,"ad-stopped",function(){return UJ(c)});this.eventManager.o(this.localization,"locale-updated",function(){return WJ(c)});
this.eventManager.o(this.localization,"locale-changed",function(){return WJ(c)});UJ(this);WJ(this);if(this.ad)this.onChange()}oa(TJ,YF);TJ.prototype.onChange=function(){this.ad&&this.ad.isLinear()?this.ad.setVolume(this.getValue()/100):(this.video.volume=this.getValue()/100,0<this.video.volume&&(this.video.muted=!1))};function UJ(a){a.video.muted?a.setValue(0):a.setValue(100*a.video.volume);XJ(a)}function VJ(a){var b=a.ad.getVolume();a.setValue(100*b);XJ(a)}
function XJ(a){var b=a.g.volumeBarColors,c=["to right"];c.push(b.level+a.getValue()+"%");c.push(b.base+a.getValue()+"%");c.push(b.base+"100%");a.container.style.background="linear-gradient("+c.join(",")+")"}function WJ(a){a.bar.ariaLabel=a.localization.resolve("VOLUME")}S("shaka.ui.VolumeBar",TJ);function YJ(){}YJ.prototype.create=function(a,b){return new TJ(a,b)};XG("volume",new YJ);}).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.ui.map